From 9f21af8b918dab85937a1393dec91c274ec39575 Mon Sep 17 00:00:00 2001 From: Nicolas Molina Date: Fri, 16 Aug 2024 12:00:34 -0400 Subject: [PATCH] chore(dotcms-ui): fix color --- .../primeng/form/AutoComplete.stories.ts | 4 +-- .../stories/primeng/form/Calendar.stories.ts | 32 +++++++++++++++---- core-web/package.json | 3 +- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/core-web/apps/dotcms-ui/src/stories/primeng/form/AutoComplete.stories.ts b/core-web/apps/dotcms-ui/src/stories/primeng/form/AutoComplete.stories.ts index e3278e2f5f06..8b8ac578ea92 100644 --- a/core-web/apps/dotcms-ui/src/stories/primeng/form/AutoComplete.stories.ts +++ b/core-web/apps/dotcms-ui/src/stories/primeng/form/AutoComplete.stories.ts @@ -2,7 +2,7 @@ import { Meta, moduleMetadata, StoryObj } from '@storybook/angular'; import { UPDATE_STORY_ARGS } from '@storybook/core-events'; import { BrowserModule } from '@angular/platform-browser'; -import { NoopAnimationsModule } from '@angular/platform-browser/animations'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete'; @@ -41,7 +41,7 @@ const meta: Meta = { }, decorators: [ moduleMetadata({ - imports: [AutoCompleteModule, NoopAnimationsModule, BrowserModule] + imports: [AutoCompleteModule, BrowserAnimationsModule, BrowserModule] }) ], args: { diff --git a/core-web/apps/dotcms-ui/src/stories/primeng/form/Calendar.stories.ts b/core-web/apps/dotcms-ui/src/stories/primeng/form/Calendar.stories.ts index ddd13c776e7e..fb488eb8d27f 100644 --- a/core-web/apps/dotcms-ui/src/stories/primeng/form/Calendar.stories.ts +++ b/core-web/apps/dotcms-ui/src/stories/primeng/form/Calendar.stories.ts @@ -1,9 +1,16 @@ -import { Meta, moduleMetadata, StoryObj } from '@storybook/angular'; +import { + Meta, + moduleMetadata, + StoryObj, + argsToTemplate, + componentWrapperDecorator +} from '@storybook/angular'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { ButtonModule } from 'primeng/button'; -import { Calendar } from 'primeng/calendar'; +import { Calendar, CalendarModule } from 'primeng/calendar'; +import { ChevronLeftIcon } from 'primeng/icons/chevronleft'; const TODAY = new Date(); const DAYS_TO_DISABLE = 5; @@ -16,13 +23,14 @@ const meta: Meta = { component: Calendar, decorators: [ moduleMetadata({ - imports: [BrowserAnimationsModule, ButtonModule] - }) + imports: [BrowserAnimationsModule, ButtonModule, CalendarModule, ChevronLeftIcon] + }), + componentWrapperDecorator((story) => `
${story}
`) ], args: { disabled: false, readonlyInput: true, - showIcon: true, + showIcon: false, showTime: true, showClear: true, inline: false, @@ -72,11 +80,21 @@ const meta: Meta = { description: 'Defines the quantity of the selection, valid values are "single", "multiple" and "range".' } - } + }, + render: (args) => ({ + props: args, + template: `` + }) }; export default meta; type Story = StoryObj; -export const Primary: Story = {}; +export const Default: Story = {}; + +export const WithIcon: Story = { + args: { + showIcon: true + } +}; diff --git a/core-web/package.json b/core-web/package.json index d571e07492de..e350e4f93286 100644 --- a/core-web/package.json +++ b/core-web/package.json @@ -273,5 +273,6 @@ }, "nx": { "includedScripts": [] - } + }, + "packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a" }