From d15527421a6e95aab1f4a7740e48f626576eaf96 Mon Sep 17 00:00:00 2001 From: Danil Khaliulin Date: Tue, 25 Aug 2026 00:41:02 +0800 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=B8=20date-picker=20=D0=BD=D0=B0=20=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D1=8B=D0=B5=20=D1=82=D0=BE=D0=BA=D0=B5=D0=BD=D1=8B:=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B7=D0=B8=D1=86=D0=B8=D1=8F=20=D0=BA=D1=80=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=B8=D0=BA=D0=B0,=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5?= =?UTF-8?q?=D1=80=D1=8B=20=D0=B8=D0=BA=D0=BE=D0=BD=D0=BE=D0=BA=20=D0=B8=20?= =?UTF-8?q?=D1=88=D0=B8=D1=80=D0=B8=D0=BD=D0=B0=20=D0=B7=D0=B0=D0=B3=D0=BE?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tokens/components/date-picker.ts | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/lib/providers/prime-preset/tokens/components/date-picker.ts b/src/lib/providers/prime-preset/tokens/components/date-picker.ts index 0c480004..1a7307f5 100644 --- a/src/lib/providers/prime-preset/tokens/components/date-picker.ts +++ b/src/lib/providers/prime-preset/tokens/components/date-picker.ts @@ -29,10 +29,15 @@ export const datePickerCss = ({ dt }: { dt: (token: string) => string }): string justify-content: space-between; } +.p-datepicker-day-selected:not(.p-disabled):hover { + background: ${dt('datepicker.extend.extDate.selectedHoverBackground')}; +} + .p-datepicker-title { display: flex; align-items: center; gap: ${dt('datepicker.title.gap')}; + min-width: ${dt('datepicker.extend.extTitle.width')}; margin: 0 auto; } @@ -50,9 +55,7 @@ export const datePickerCss = ({ dt }: { dt: (token: string) => string }): string } .p-datepicker-today.p-datepicker-today > .p-datepicker-day:not(.p-datepicker-day-selected) { - border: ${dt('dimension.size.100')} solid ${dt( - 'datepicker.extend.extToday.borderColor' -)}; + border: ${dt('dimension.size.100')} solid ${dt('datepicker.extend.extToday.borderColor')}; } .p-datepicker-today.p-datepicker-today:hover > .p-datepicker-day:not(.p-datepicker-day-selected), @@ -71,21 +74,18 @@ export const datePickerCss = ({ dt }: { dt: (token: string) => string }): string margin: ${dt('datepicker.dayView.margin')}; } -/* ─── Weekday header text ─── */ .p-datepicker-weekday { font-family: ${dt('fonts.fontFamily.base')}; font-size: ${dt('fonts.fontSize.300')}; font-weight: ${dt('fonts.fontWeight.demibold')}; } -/* ─── Day cell text ─── */ .p-datepicker-day { font-family: ${dt('fonts.fontFamily.base')}; font-size: ${dt('fonts.fontSize.300')}; font-weight: ${dt('fonts.fontWeight.regular')}; } -/* ─── Скрываем нативный time picker (заменён кастомным в footer) ─── */ .p-datepicker-time-picker.p-datepicker-time-picker:not(.p-datepicker-time-picker-custom) { display: none; } @@ -112,29 +112,27 @@ export const datePickerCss = ({ dt }: { dt: (token: string) => string }): string .p-datepicker-clear-icon { display: flex; align-items: center; - inset-inline-end: var(--p-form-field-padding-x); + inset-inline-end: ${dt('inputtext.root.paddingX')}; color: ${dt('datepicker.inputIcon.color')}; } .p-datepicker:has(.p-datepicker-input-icon-container) .p-datepicker-clear-icon { - inset-inline-end: calc((var(--p-form-field-padding-x) * 1.5) + var(--p-icon-size)); + inset-inline-end: calc((${dt('inputtext.root.paddingX')} * 1.5) + ${dt('inputtext.extend.iconSize')}); } .p-datepicker:has(.p-inputtext-lg) .p-datepicker-dropdown .p-icon, .p-datepicker:has(.p-inputtext-lg) .p-datepicker-input-icon, .p-datepicker:has(.p-inputtext-lg) .p-datepicker-clear-icon .ti-x { - font-size: var(--p-form-field-lg-font-size); - width: var(--p-form-field-lg-font-size); - height: var(--p-form-field-lg-font-size); + font-size: ${dt('inputtext.root.lg.fontSize')}; + width: ${dt('inputtext.root.lg.fontSize')}; + height: ${dt('inputtext.root.lg.fontSize')}; } -/* ─── Clear icon: скрываем при пустом значении ─── */ .p-datepicker.p-datepicker:not(.p-inputwrapper-filled) .p-datepicker-clear-icon, .p-datepicker.p-datepicker:has(.p-datepicker-input:placeholder-shown) .p-datepicker-clear-icon { display: none; } -/* ─── Custom time picker (InputNumber без кнопок) ─── */ .p-datepicker-time-picker-custom.p-datepicker-time-picker-custom { display: flex; align-items: center;