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/libs/dotcms-scss/angular/dotcms-theme/components/form/_calendar.scss b/core-web/libs/dotcms-scss/angular/dotcms-theme/components/form/_calendar.scss index 3cd6e1813527..941a9b988f65 100644 --- a/core-web/libs/dotcms-scss/angular/dotcms-theme/components/form/_calendar.scss +++ b/core-web/libs/dotcms-scss/angular/dotcms-theme/components/form/_calendar.scss @@ -47,6 +47,10 @@ width: $icon-lg-box; font-size: $icon-lg; } + + .p-icon-wrapper { + color: $color-palette-primary-500; + } } .p-button:enabled.p-datepicker-trigger .pi { @@ -238,7 +242,7 @@ p-calendar.p-calendar-clearable { } .p-calendar-clear-icon { - margin-top: -12px; + margin-top: -0.438rem; color: $color-palette-gray-500; width: $icon-lg-box; font-size: $icon-lg;