@povio/ui 2.3.2-rc.1 → 2.3.2-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +6 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -1
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +6 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -1
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +6 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +108 -106
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +14 -99
- package/dist/config/uiConfig.context.d.ts +1 -0
- package/dist/config/uiConfig.context.js +1 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { FocusEvent, Ref } from 'react';
|
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { DatePickerStateOptions } from 'react-stately';
|
|
5
5
|
import { DatePickerInputHandle } from '../shared/DatePickerInput';
|
|
6
|
-
import { DatePickerTodayIcon, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from '../shared/datePicker.types';
|
|
6
|
+
import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from '../shared/datePicker.types';
|
|
7
7
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
8
8
|
import { ControlProps } from '../../shared/form.types';
|
|
9
9
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
@@ -15,6 +15,7 @@ interface DatePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<Da
|
|
|
15
15
|
className?: string;
|
|
16
16
|
todayIcon?: DatePickerTodayIcon;
|
|
17
17
|
todayIconButtonSize?: DatePickerTodayIconButtonSize;
|
|
18
|
+
todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
|
|
18
19
|
todayIconPlacement?: DatePickerTodayIconPlacement;
|
|
19
20
|
isDirty?: boolean;
|
|
20
21
|
disableManualEntry?: boolean;
|
|
@@ -27,7 +27,7 @@ import { useCalendarState, useDatePickerState } from "react-stately";
|
|
|
27
27
|
var DATE_PICKER_TIME_ZONE = "UTC";
|
|
28
28
|
var DatePickerBase = (props) => {
|
|
29
29
|
const ui = UIConfig.useConfig();
|
|
30
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDirty, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, placeholder, inputClassName, as: asProp, hideLabel: hideLabelProp, variant: variantProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, granularity: granularityProp, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, format, ...rest } = props;
|
|
30
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDirty, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, placeholder, inputClassName, as: asProp, hideLabel: hideLabelProp, variant: variantProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, granularity: granularityProp, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, format, ...rest } = props;
|
|
31
31
|
const as = asProp ?? ui.input.as;
|
|
32
32
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
33
33
|
const variant = variantProp ?? ui.input.variant;
|
|
@@ -35,6 +35,7 @@ var DatePickerBase = (props) => {
|
|
|
35
35
|
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
36
36
|
const todayIcon = todayIconProp ?? ui.dateInput.todayIcon;
|
|
37
37
|
const todayIconButtonSize = todayIconButtonSizeProp ?? ui.dateInput.todayIconButtonSize;
|
|
38
|
+
const todayIconButtonComponent = todayIconButtonComponentProp ?? ui.dateInput.todayIconButtonComponent;
|
|
38
39
|
const todayIconPlacement = todayIconPlacementProp ?? ui.dateInput.todayIconPlacement;
|
|
39
40
|
const shouldForceLeadingZeros = shouldForceLeadingZerosProp ?? ui.dateInput.shouldForceLeadingZeros;
|
|
40
41
|
const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
|
|
@@ -217,6 +218,7 @@ var DatePickerBase = (props) => {
|
|
|
217
218
|
headerProps,
|
|
218
219
|
todayIcon,
|
|
219
220
|
todayIconButtonSize,
|
|
221
|
+
todayIconButtonComponent,
|
|
220
222
|
todayIconPlacement,
|
|
221
223
|
onOpenDropdown: () => state.toggle(),
|
|
222
224
|
placeholder,
|
|
@@ -342,11 +344,13 @@ var DatePickerInner = (t0) => {
|
|
|
342
344
|
const isDisabled = isFormControlDisabled || !!props.isDisabled;
|
|
343
345
|
const todayIcon = props.todayIcon ?? ui.dateInput.todayIcon;
|
|
344
346
|
const todayIconButtonSize = props.todayIconButtonSize ?? ui.dateInput.todayIconButtonSize;
|
|
347
|
+
const todayIconButtonComponent = props.todayIconButtonComponent ?? ui.dateInput.todayIconButtonComponent;
|
|
345
348
|
const todayIconPlacement = props.todayIconPlacement ?? ui.dateInput.todayIconPlacement;
|
|
346
349
|
const staticTodayIcon = renderDatePickerTodayIcon(todayIcon, {
|
|
347
350
|
isDisabled,
|
|
348
351
|
renderStatic: true,
|
|
349
|
-
size: todayIconButtonSize
|
|
352
|
+
size: todayIconButtonSize,
|
|
353
|
+
todayIconButtonComponent
|
|
350
354
|
});
|
|
351
355
|
const disableManualEntry = props.disableManualEntry ?? ui.dateInput.disableManualEntry;
|
|
352
356
|
const showDropdown = !props.disableDropdown || disableManualEntry;
|
|
@@ -4,7 +4,7 @@ import { DateValue } from 'react-aria';
|
|
|
4
4
|
import { FieldValues } from 'react-hook-form';
|
|
5
5
|
import { DateRangePickerStateOptions } from 'react-stately';
|
|
6
6
|
import { DatePickerInputHandle } from '../shared/DatePickerInput';
|
|
7
|
-
import { DatePickerTodayIcon, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from '../shared/datePicker.types';
|
|
7
|
+
import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from '../shared/datePicker.types';
|
|
8
8
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
9
9
|
import { ControlProps } from '../../shared/form.types';
|
|
10
10
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
@@ -16,6 +16,7 @@ interface DateRangePickerBaseProps extends FormFieldProps, InputVariantProps, Om
|
|
|
16
16
|
className?: string;
|
|
17
17
|
todayIcon?: DatePickerTodayIcon;
|
|
18
18
|
todayIconButtonSize?: DatePickerTodayIconButtonSize;
|
|
19
|
+
todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
|
|
19
20
|
todayIconPlacement?: DatePickerTodayIconPlacement;
|
|
20
21
|
isDirty?: boolean;
|
|
21
22
|
disableManualEntry?: boolean;
|
|
@@ -32,7 +32,7 @@ var DATE_PICKER_TIME_ZONE = "UTC";
|
|
|
32
32
|
var DateRangePickerBase = (props) => {
|
|
33
33
|
const ui = UIConfig.useConfig();
|
|
34
34
|
const { t } = useTranslation();
|
|
35
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, hideSidebar, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, ...rest } = props;
|
|
35
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, hideSidebar, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, ...rest } = props;
|
|
36
36
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
37
37
|
const variant = variantProp ?? ui.input.variant;
|
|
38
38
|
const as = asProp ?? ui.input.as;
|
|
@@ -40,6 +40,7 @@ var DateRangePickerBase = (props) => {
|
|
|
40
40
|
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
41
41
|
const todayIcon = todayIconProp ?? ui.dateInput.todayIcon;
|
|
42
42
|
const todayIconButtonSize = todayIconButtonSizeProp ?? ui.dateInput.todayIconButtonSize;
|
|
43
|
+
const todayIconButtonComponent = todayIconButtonComponentProp ?? ui.dateInput.todayIconButtonComponent;
|
|
43
44
|
const todayIconPlacement = todayIconPlacementProp ?? ui.dateInput.todayIconPlacement;
|
|
44
45
|
const shouldForceLeadingZeros = shouldForceLeadingZerosProp ?? ui.dateInput.shouldForceLeadingZeros;
|
|
45
46
|
const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
|
|
@@ -528,6 +529,7 @@ var DateRangePickerBase = (props) => {
|
|
|
528
529
|
headerProps,
|
|
529
530
|
todayIcon,
|
|
530
531
|
todayIconButtonSize,
|
|
532
|
+
todayIconButtonComponent,
|
|
531
533
|
todayIconPlacement,
|
|
532
534
|
isDirty,
|
|
533
535
|
disableManualEntry,
|
|
@@ -690,11 +692,13 @@ var DateRangePickerInner = (t0) => {
|
|
|
690
692
|
const isDisabled = isFormControlDisabled || !!props.isDisabled;
|
|
691
693
|
const todayIcon = props.todayIcon ?? ui.dateInput.todayIcon;
|
|
692
694
|
const todayIconButtonSize = props.todayIconButtonSize ?? ui.dateInput.todayIconButtonSize;
|
|
695
|
+
const todayIconButtonComponent = props.todayIconButtonComponent ?? ui.dateInput.todayIconButtonComponent;
|
|
693
696
|
const todayIconPlacement = props.todayIconPlacement ?? ui.dateInput.todayIconPlacement;
|
|
694
697
|
const staticTodayIcon = renderDatePickerTodayIcon(todayIcon, {
|
|
695
698
|
isDisabled,
|
|
696
699
|
renderStatic: true,
|
|
697
|
-
size: todayIconButtonSize
|
|
700
|
+
size: todayIconButtonSize,
|
|
701
|
+
todayIconButtonComponent
|
|
698
702
|
});
|
|
699
703
|
const disableManualEntry = props.disableManualEntry ?? ui.dateInput.disableManualEntry;
|
|
700
704
|
const showDropdown = !props.disableDropdown || disableManualEntry;
|
|
@@ -3,7 +3,7 @@ import { DateValue } from 'react-aria';
|
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { DatePickerStateOptions } from 'react-stately';
|
|
5
5
|
import { DatePickerInputHandle } from '../shared/DatePickerInput';
|
|
6
|
-
import { DatePickerTodayIcon, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from '../shared/datePicker.types';
|
|
6
|
+
import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from '../shared/datePicker.types';
|
|
7
7
|
import { FormFieldProps } from '../../FormField/FormField';
|
|
8
8
|
import { ControlProps } from '../../shared/form.types';
|
|
9
9
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
@@ -14,6 +14,7 @@ interface DateTimePickerBaseProps extends FormFieldProps, InputVariantProps, Omi
|
|
|
14
14
|
isClearable?: boolean;
|
|
15
15
|
todayIcon?: DatePickerTodayIcon;
|
|
16
16
|
todayIconButtonSize?: DatePickerTodayIconButtonSize;
|
|
17
|
+
todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
|
|
17
18
|
todayIconPlacement?: DatePickerTodayIconPlacement;
|
|
18
19
|
isDirty?: boolean;
|
|
19
20
|
disableManualEntry?: boolean;
|
|
@@ -25,7 +25,7 @@ import { useCalendarState, useDatePickerState } from "react-stately";
|
|
|
25
25
|
//#region src/components/inputs/DateTime/DateTimePicker/DateTimePicker.tsx
|
|
26
26
|
var DateTimePickerBase = (props) => {
|
|
27
27
|
const ui = UIConfig.useConfig();
|
|
28
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, isTimeOptional, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, timeZone: _timeZone, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, format, setDateValueOnDateSelection: setDateValueOnDateSelectionProp, ...rest } = props;
|
|
28
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, isTimeOptional, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, timeZone: _timeZone, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, format, setDateValueOnDateSelection: setDateValueOnDateSelectionProp, ...rest } = props;
|
|
29
29
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
30
30
|
const variant = variantProp ?? ui.input.variant;
|
|
31
31
|
const as = asProp ?? ui.input.as;
|
|
@@ -33,6 +33,7 @@ var DateTimePickerBase = (props) => {
|
|
|
33
33
|
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
34
34
|
const todayIcon = todayIconProp ?? ui.dateInput.todayIcon;
|
|
35
35
|
const todayIconButtonSize = todayIconButtonSizeProp ?? ui.dateInput.todayIconButtonSize;
|
|
36
|
+
const todayIconButtonComponent = todayIconButtonComponentProp ?? ui.dateInput.todayIconButtonComponent;
|
|
36
37
|
const todayIconPlacement = todayIconPlacementProp ?? ui.dateInput.todayIconPlacement;
|
|
37
38
|
const shouldForceLeadingZeros = shouldForceLeadingZerosProp ?? ui.dateInput.shouldForceLeadingZeros;
|
|
38
39
|
const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
|
|
@@ -205,6 +206,7 @@ var DateTimePickerBase = (props) => {
|
|
|
205
206
|
headerProps,
|
|
206
207
|
todayIcon,
|
|
207
208
|
todayIconButtonSize,
|
|
209
|
+
todayIconButtonComponent,
|
|
208
210
|
todayIconPlacement,
|
|
209
211
|
isRequired,
|
|
210
212
|
disableManualEntry,
|
|
@@ -267,11 +269,13 @@ var DateTimePickerInner = (t0) => {
|
|
|
267
269
|
const isDisabled = isFormControlDisabled || !!props.isDisabled;
|
|
268
270
|
const todayIcon = props.todayIcon ?? ui.dateInput.todayIcon;
|
|
269
271
|
const todayIconButtonSize = props.todayIconButtonSize ?? ui.dateInput.todayIconButtonSize;
|
|
272
|
+
const todayIconButtonComponent = props.todayIconButtonComponent ?? ui.dateInput.todayIconButtonComponent;
|
|
270
273
|
const todayIconPlacement = props.todayIconPlacement ?? ui.dateInput.todayIconPlacement;
|
|
271
274
|
const staticTodayIcon = renderDatePickerTodayIcon(todayIcon, {
|
|
272
275
|
isDisabled,
|
|
273
276
|
renderStatic: true,
|
|
274
|
-
size: todayIconButtonSize
|
|
277
|
+
size: todayIconButtonSize,
|
|
278
|
+
todayIconButtonComponent
|
|
275
279
|
});
|
|
276
280
|
const disableManualEntry = props.disableManualEntry ?? ui.dateInput.disableManualEntry;
|
|
277
281
|
const showDropdown = !props.disableDropdown || disableManualEntry;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
2
|
import { DatePickerAria } from 'react-aria';
|
|
3
|
-
import { DatePickerTodayIcon, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from './datePicker.types';
|
|
3
|
+
import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from './datePicker.types';
|
|
4
4
|
import { FormFieldHeaderProps } from '../../FormField/FormFieldHeader';
|
|
5
5
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
6
6
|
export interface DatePickerInputHandle {
|
|
@@ -25,6 +25,7 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
25
25
|
headerProps?: FormFieldHeaderProps;
|
|
26
26
|
todayIcon?: DatePickerTodayIcon;
|
|
27
27
|
todayIconButtonSize?: DatePickerTodayIconButtonSize;
|
|
28
|
+
todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
|
|
28
29
|
todayIconPlacement?: DatePickerTodayIconPlacement;
|
|
29
30
|
isDirty?: boolean;
|
|
30
31
|
isRequired?: boolean;
|
|
@@ -40,5 +41,5 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
40
41
|
fireBlurOnChange?: boolean;
|
|
41
42
|
onClear?: () => void;
|
|
42
43
|
}
|
|
43
|
-
export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, todayIconButtonSize, todayIconPlacement, isDirty, isRequired, disableManualEntry, autoFixYear, placeholder, className, onOpenDropdown, dateGranularity, timeZone, isTimeOptional, format, fireBlurOnChange, onClear: onClearProp, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, todayIconButtonSize, todayIconButtonComponent, todayIconPlacement, isDirty, isRequired, disableManualEntry, autoFixYear, placeholder, className, onOpenDropdown, dateGranularity, timeZone, isTimeOptional, format, fireBlurOnChange, onClear: onClearProp, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
45
|
export {};
|
|
@@ -18,8 +18,8 @@ import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
|
18
18
|
import { today } from "@internationalized/date";
|
|
19
19
|
//#region src/components/inputs/DateTime/shared/DatePickerInput.tsx
|
|
20
20
|
var DatePickerInput = (t0) => {
|
|
21
|
-
const $ = c(
|
|
22
|
-
const { ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, todayIconButtonSize: t1, todayIconPlacement: t2, isDirty, isRequired, disableManualEntry, autoFixYear: t3, placeholder, className, onOpenDropdown, dateGranularity: t4, timeZone, isTimeOptional: t5, format, fireBlurOnChange, onClear: onClearProp, ...props } = t0;
|
|
21
|
+
const $ = c(108);
|
|
22
|
+
const { ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, todayIconButtonSize: t1, todayIconButtonComponent, todayIconPlacement: t2, isDirty, isRequired, disableManualEntry, autoFixYear: t3, placeholder, className, onOpenDropdown, dateGranularity: t4, timeZone, isTimeOptional: t5, format, fireBlurOnChange, onClear: onClearProp, ...props } = t0;
|
|
23
23
|
const todayIconButtonSize = t1 === void 0 ? "none" : t1;
|
|
24
24
|
const todayIconPlacement = t2 === void 0 ? "content" : t2;
|
|
25
25
|
const autoFixYear = t3 === void 0 ? false : t3;
|
|
@@ -157,18 +157,20 @@ var DatePickerInput = (t0) => {
|
|
|
157
157
|
const onToday = t15;
|
|
158
158
|
const hidePlaceholder = as === "floating" && !fieldProps.value && !isFocused;
|
|
159
159
|
let t16;
|
|
160
|
-
if ($[27] !== isTodayIconDisabled || $[28] !== onToday || $[29] !== todayIcon || $[30] !== todayIconButtonSize) {
|
|
160
|
+
if ($[27] !== isTodayIconDisabled || $[28] !== onToday || $[29] !== todayIcon || $[30] !== todayIconButtonComponent || $[31] !== todayIconButtonSize) {
|
|
161
161
|
t16 = renderDatePickerTodayIcon(todayIcon, {
|
|
162
162
|
isDisabled: isTodayIconDisabled,
|
|
163
163
|
onPress: onToday,
|
|
164
|
-
size: todayIconButtonSize
|
|
164
|
+
size: todayIconButtonSize,
|
|
165
|
+
todayIconButtonComponent
|
|
165
166
|
});
|
|
166
167
|
$[27] = isTodayIconDisabled;
|
|
167
168
|
$[28] = onToday;
|
|
168
169
|
$[29] = todayIcon;
|
|
169
|
-
$[30] =
|
|
170
|
-
$[31] =
|
|
171
|
-
|
|
170
|
+
$[30] = todayIconButtonComponent;
|
|
171
|
+
$[31] = todayIconButtonSize;
|
|
172
|
+
$[32] = t16;
|
|
173
|
+
} else t16 = $[32];
|
|
172
174
|
const todayIconButton = t16;
|
|
173
175
|
const shouldRenderTodayIconWithFieldLabel = todayIconPlacement === "fieldLabel";
|
|
174
176
|
const pickerIcon = isDateTime ? uiConfig.dateInput.dateTimeIcon : uiConfig.dateInput.calendarIcon;
|
|
@@ -189,49 +191,49 @@ var DatePickerInput = (t0) => {
|
|
|
189
191
|
const t27 = isRequired || void 0;
|
|
190
192
|
const t28 = normalizedFieldProps.value != null || void 0;
|
|
191
193
|
let t29;
|
|
192
|
-
if ($[
|
|
194
|
+
if ($[33] !== as || $[34] !== inputSizeCva || $[35] !== size) {
|
|
193
195
|
t29 = clsx("flex w-full items-center gap-input-gap-input-text-to-elements pr-0!", inputSizeCva({
|
|
194
196
|
size,
|
|
195
197
|
as
|
|
196
198
|
}));
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
} else t29 = $[
|
|
199
|
+
$[33] = as;
|
|
200
|
+
$[34] = inputSizeCva;
|
|
201
|
+
$[35] = size;
|
|
202
|
+
$[36] = t29;
|
|
203
|
+
} else t29 = $[36];
|
|
202
204
|
let t30;
|
|
203
|
-
if ($[
|
|
205
|
+
if ($[37] !== as || $[38] !== headerProps) {
|
|
204
206
|
t30 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
205
207
|
as,
|
|
206
208
|
...headerProps
|
|
207
209
|
});
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
} else t30 = $[
|
|
210
|
+
$[37] = as;
|
|
211
|
+
$[38] = headerProps;
|
|
212
|
+
$[39] = t30;
|
|
213
|
+
} else t30 = $[39];
|
|
212
214
|
const t31 = shouldRenderTodayIconWithFieldLabel && todayIconButton;
|
|
213
215
|
let t32;
|
|
214
|
-
if ($[
|
|
216
|
+
if ($[40] !== datePickerInputContentRowCva || $[41] !== size) {
|
|
215
217
|
t32 = datePickerInputContentRowCva({ size });
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
} else t32 = $[
|
|
218
|
+
$[40] = datePickerInputContentRowCva;
|
|
219
|
+
$[41] = size;
|
|
220
|
+
$[42] = t32;
|
|
221
|
+
} else t32 = $[42];
|
|
220
222
|
let t33;
|
|
221
|
-
if ($[
|
|
223
|
+
if ($[43] !== disableManualEntry || $[44] !== isDisabled || $[45] !== onOpenDropdown) {
|
|
222
224
|
t33 = disableManualEntry && /* @__PURE__ */ jsx(Button, {
|
|
223
225
|
onPress: onOpenDropdown,
|
|
224
226
|
className: "absolute inset-0 z-0",
|
|
225
227
|
isDisabled
|
|
226
228
|
});
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
} else t33 = $[
|
|
229
|
+
$[43] = disableManualEntry;
|
|
230
|
+
$[44] = isDisabled;
|
|
231
|
+
$[45] = onOpenDropdown;
|
|
232
|
+
$[46] = t33;
|
|
233
|
+
} else t33 = $[46];
|
|
232
234
|
const t34 = !shouldRenderTodayIconWithFieldLabel && todayIconButton;
|
|
233
235
|
let t35;
|
|
234
|
-
if ($[
|
|
236
|
+
if ($[47] !== as || $[48] !== dateGranularity || $[49] !== disableManualEntry || $[50] !== effectiveTimeZone || $[51] !== fieldProps || $[52] !== format || $[53] !== hidePlaceholder || $[54] !== isDisabled || $[55] !== isInvalid || $[56] !== isTimeOptional || $[57] !== normalizedEndFieldProps || $[58] !== normalizedFieldProps || $[59] !== onClearChange || $[60] !== placeholder) {
|
|
235
237
|
t35 = disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
|
|
236
238
|
size: "label-1",
|
|
237
239
|
className: "text-text-default-3",
|
|
@@ -263,24 +265,24 @@ var DatePickerInput = (t0) => {
|
|
|
263
265
|
format,
|
|
264
266
|
timeZone: effectiveTimeZone
|
|
265
267
|
})] })] });
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
} else t35 = $[
|
|
268
|
+
$[47] = as;
|
|
269
|
+
$[48] = dateGranularity;
|
|
270
|
+
$[49] = disableManualEntry;
|
|
271
|
+
$[50] = effectiveTimeZone;
|
|
272
|
+
$[51] = fieldProps;
|
|
273
|
+
$[52] = format;
|
|
274
|
+
$[53] = hidePlaceholder;
|
|
275
|
+
$[54] = isDisabled;
|
|
276
|
+
$[55] = isInvalid;
|
|
277
|
+
$[56] = isTimeOptional;
|
|
278
|
+
$[57] = normalizedEndFieldProps;
|
|
279
|
+
$[58] = normalizedFieldProps;
|
|
280
|
+
$[59] = onClearChange;
|
|
281
|
+
$[60] = placeholder;
|
|
282
|
+
$[61] = t35;
|
|
283
|
+
} else t35 = $[61];
|
|
282
284
|
let t36;
|
|
283
|
-
if ($[
|
|
285
|
+
if ($[62] !== t32 || $[63] !== t33 || $[64] !== t34 || $[65] !== t35) {
|
|
284
286
|
t36 = /* @__PURE__ */ jsxs("div", {
|
|
285
287
|
className: t32,
|
|
286
288
|
children: [
|
|
@@ -289,14 +291,14 @@ var DatePickerInput = (t0) => {
|
|
|
289
291
|
t35
|
|
290
292
|
]
|
|
291
293
|
});
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
} else t36 = $[
|
|
294
|
+
$[62] = t32;
|
|
295
|
+
$[63] = t33;
|
|
296
|
+
$[64] = t34;
|
|
297
|
+
$[65] = t35;
|
|
298
|
+
$[66] = t36;
|
|
299
|
+
} else t36 = $[66];
|
|
298
300
|
let t37;
|
|
299
|
-
if ($[
|
|
301
|
+
if ($[67] !== t29 || $[68] !== t30 || $[69] !== t31 || $[70] !== t36) {
|
|
300
302
|
t37 = /* @__PURE__ */ jsxs("div", {
|
|
301
303
|
className: t29,
|
|
302
304
|
children: [
|
|
@@ -305,37 +307,37 @@ var DatePickerInput = (t0) => {
|
|
|
305
307
|
t36
|
|
306
308
|
]
|
|
307
309
|
});
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
} else t37 = $[
|
|
310
|
+
$[67] = t29;
|
|
311
|
+
$[68] = t30;
|
|
312
|
+
$[69] = t31;
|
|
313
|
+
$[70] = t36;
|
|
314
|
+
$[71] = t37;
|
|
315
|
+
} else t37 = $[71];
|
|
314
316
|
let t38;
|
|
315
|
-
if ($[
|
|
317
|
+
if ($[72] !== as || $[73] !== inputSizeCva || $[74] !== size) {
|
|
316
318
|
t38 = clsx(inputSizeCva({
|
|
317
319
|
size,
|
|
318
320
|
as
|
|
319
321
|
}), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!");
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
} else t38 = $[
|
|
322
|
+
$[72] = as;
|
|
323
|
+
$[73] = inputSizeCva;
|
|
324
|
+
$[74] = size;
|
|
325
|
+
$[75] = t38;
|
|
326
|
+
} else t38 = $[75];
|
|
325
327
|
let t39;
|
|
326
|
-
if ($[
|
|
328
|
+
if ($[76] !== clearInput || $[77] !== isClearable || $[78] !== showClear) {
|
|
327
329
|
t39 = isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
328
330
|
onClear: clearInput,
|
|
329
331
|
show: showClear,
|
|
330
332
|
style: showClear ? { visibility: "visible" } : void 0
|
|
331
333
|
});
|
|
332
|
-
$[
|
|
333
|
-
$[
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
} else t39 = $[
|
|
334
|
+
$[76] = clearInput;
|
|
335
|
+
$[77] = isClearable;
|
|
336
|
+
$[78] = showClear;
|
|
337
|
+
$[79] = t39;
|
|
338
|
+
} else t39 = $[79];
|
|
337
339
|
let t40;
|
|
338
|
-
if ($[
|
|
340
|
+
if ($[80] !== buttonProps || $[81] !== disableDropdown || $[82] !== disableManualEntry || $[83] !== isDisabled || $[84] !== pickerIcon) {
|
|
339
341
|
t40 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
340
342
|
label: "",
|
|
341
343
|
color: "secondary",
|
|
@@ -344,26 +346,26 @@ var DatePickerInput = (t0) => {
|
|
|
344
346
|
isDisabled,
|
|
345
347
|
className: "border-0!"
|
|
346
348
|
});
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
} else t40 = $[
|
|
349
|
+
$[80] = buttonProps;
|
|
350
|
+
$[81] = disableDropdown;
|
|
351
|
+
$[82] = disableManualEntry;
|
|
352
|
+
$[83] = isDisabled;
|
|
353
|
+
$[84] = pickerIcon;
|
|
354
|
+
$[85] = t40;
|
|
355
|
+
} else t40 = $[85];
|
|
354
356
|
let t41;
|
|
355
|
-
if ($[
|
|
357
|
+
if ($[86] !== t38 || $[87] !== t39 || $[88] !== t40) {
|
|
356
358
|
t41 = /* @__PURE__ */ jsxs("div", {
|
|
357
359
|
className: t38,
|
|
358
360
|
children: [t39, t40]
|
|
359
361
|
});
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
} else t41 = $[
|
|
362
|
+
$[86] = t38;
|
|
363
|
+
$[87] = t39;
|
|
364
|
+
$[88] = t40;
|
|
365
|
+
$[89] = t41;
|
|
366
|
+
} else t41 = $[89];
|
|
365
367
|
let t42;
|
|
366
|
-
if ($[
|
|
368
|
+
if ($[90] !== focusWithinProps || $[91] !== groupProps || $[92] !== hoverProps || $[93] !== t17 || $[94] !== t18 || $[95] !== t19 || $[96] !== t20 || $[97] !== t21 || $[98] !== t22 || $[99] !== t23 || $[100] !== t24 || $[101] !== t25 || $[102] !== t26 || $[103] !== t27 || $[104] !== t28 || $[105] !== t37 || $[106] !== t41) {
|
|
367
369
|
t42 = /* @__PURE__ */ jsxs("div", {
|
|
368
370
|
ref: containerRef,
|
|
369
371
|
...groupProps,
|
|
@@ -385,25 +387,25 @@ var DatePickerInput = (t0) => {
|
|
|
385
387
|
"data-is-filled": t28,
|
|
386
388
|
children: [t37, t41]
|
|
387
389
|
});
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
} else t42 = $[
|
|
390
|
+
$[90] = focusWithinProps;
|
|
391
|
+
$[91] = groupProps;
|
|
392
|
+
$[92] = hoverProps;
|
|
393
|
+
$[93] = t17;
|
|
394
|
+
$[94] = t18;
|
|
395
|
+
$[95] = t19;
|
|
396
|
+
$[96] = t20;
|
|
397
|
+
$[97] = t21;
|
|
398
|
+
$[98] = t22;
|
|
399
|
+
$[99] = t23;
|
|
400
|
+
$[100] = t24;
|
|
401
|
+
$[101] = t25;
|
|
402
|
+
$[102] = t26;
|
|
403
|
+
$[103] = t27;
|
|
404
|
+
$[104] = t28;
|
|
405
|
+
$[105] = t37;
|
|
406
|
+
$[106] = t41;
|
|
407
|
+
$[107] = t42;
|
|
408
|
+
} else t42 = $[107];
|
|
407
409
|
return t42;
|
|
408
410
|
};
|
|
409
411
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IconButtonProps } from '../../../buttons/IconButton/IconButton';
|
|
2
2
|
export type DatePickerTodayIcon = boolean | IconButtonProps["icon"];
|
|
3
3
|
export type DatePickerTodayIconButtonSize = IconButtonProps["size"];
|
|
4
|
+
export type DatePickerTodayIconButtonComponent = "iconButton" | "inlineIconButton";
|
|
4
5
|
export type DatePickerTodayIconPlacement = "content" | "fieldLabel";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC, ReactElement, SVGProps } from 'react';
|
|
2
2
|
import { PressEvent } from 'react-aria-components';
|
|
3
|
-
import { DatePickerTodayIcon, DatePickerTodayIconButtonSize } from './datePicker.types';
|
|
3
|
+
import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize } from './datePicker.types';
|
|
4
4
|
type TodayIconComponent = FC<SVGProps<SVGSVGElement>> | ReactElement;
|
|
5
5
|
type DatePickerTodayIconOptions = {
|
|
6
6
|
className?: string;
|
|
@@ -8,6 +8,7 @@ type DatePickerTodayIconOptions = {
|
|
|
8
8
|
onPress?: (event: PressEvent) => void;
|
|
9
9
|
renderStatic?: boolean;
|
|
10
10
|
size?: DatePickerTodayIconButtonSize;
|
|
11
|
+
todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
|
|
11
12
|
};
|
|
12
13
|
export declare const getDatePickerTodayIcon: (todayIcon: DatePickerTodayIcon | undefined) => TodayIconComponent | null;
|
|
13
14
|
export declare const renderDatePickerTodayIcon: (todayIcon: DatePickerTodayIcon | undefined, options?: DatePickerTodayIconOptions) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { UIStyle } from "../../../../config/uiStyle.context.js";
|
|
2
|
-
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
|
-
import { button, buttonContent, buttonIconSize, buttonSize } from "../../../buttons/Button/button.cva.js";
|
|
4
1
|
import { IconButton } from "../../../buttons/IconButton/IconButton.js";
|
|
2
|
+
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
3
|
import { TodayIcon } from "../../../../assets/icons/Today.js";
|
|
6
|
-
import {
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { clsx } from "clsx";
|
|
9
|
-
import { cloneElement, isValidElement } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
5
|
//#region src/components/inputs/DateTime/shared/datePickerTodayIcon.tsx
|
|
11
6
|
var getDatePickerTodayIcon = (todayIcon) => {
|
|
12
7
|
if (!todayIcon) return null;
|
|
@@ -15,103 +10,23 @@ var getDatePickerTodayIcon = (todayIcon) => {
|
|
|
15
10
|
var renderDatePickerTodayIcon = (todayIcon, options) => {
|
|
16
11
|
const icon = getDatePickerTodayIcon(todayIcon);
|
|
17
12
|
if (!icon) return;
|
|
18
|
-
const { className, isDisabled, onPress, renderStatic, size = "none" } = options ?? {};
|
|
19
|
-
const
|
|
20
|
-
if (renderStatic) return /* @__PURE__ */ jsx(StaticDatePickerTodayIcon, {
|
|
21
|
-
icon,
|
|
22
|
-
className: todayIconClassName,
|
|
23
|
-
isDisabled,
|
|
24
|
-
size
|
|
25
|
-
});
|
|
26
|
-
return /* @__PURE__ */ jsx(IconButton, {
|
|
13
|
+
const { className, isDisabled, onPress, renderStatic, size = "none", todayIconButtonComponent = "iconButton" } = options ?? {};
|
|
14
|
+
const buttonProps = {
|
|
27
15
|
label: "",
|
|
28
16
|
icon,
|
|
29
17
|
size,
|
|
30
18
|
isDisabled,
|
|
31
|
-
onPress
|
|
32
|
-
|
|
19
|
+
onPress
|
|
20
|
+
};
|
|
21
|
+
if (todayIconButtonComponent === "inlineIconButton") return /* @__PURE__ */ jsx(InlineIconButton, {
|
|
22
|
+
...buttonProps,
|
|
23
|
+
staticRender: renderStatic,
|
|
24
|
+
className: className ?? "relative z-1 !border-none"
|
|
25
|
+
});
|
|
26
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
27
|
+
...buttonProps,
|
|
28
|
+
className: className ?? "relative z-1"
|
|
33
29
|
});
|
|
34
|
-
};
|
|
35
|
-
var StaticDatePickerTodayIcon = (t0) => {
|
|
36
|
-
const $ = c(19);
|
|
37
|
-
const { icon, className, isDisabled, size } = t0;
|
|
38
|
-
const uiConfig = UIConfig.useConfig();
|
|
39
|
-
const buttonCva = UIStyle.useCva("button.cva", button);
|
|
40
|
-
const buttonSizeCva = UIStyle.useCva("button.sizeCva", buttonSize);
|
|
41
|
-
const buttonContentCva = UIStyle.useCva("button.contentCva", buttonContent);
|
|
42
|
-
const buttonIconSizeCva = UIStyle.useCva("button.iconSize", buttonIconSize);
|
|
43
|
-
let t1;
|
|
44
|
-
if ($[0] !== buttonIconSizeCva || $[1] !== icon || $[2] !== size) {
|
|
45
|
-
const iconClassName = buttonIconSizeCva({
|
|
46
|
-
size,
|
|
47
|
-
className: "shrink-0"
|
|
48
|
-
});
|
|
49
|
-
bb0: {
|
|
50
|
-
if (isValidElement(icon)) {
|
|
51
|
-
t1 = cloneElement(icon, { className: clsx(iconClassName, icon.props.className) });
|
|
52
|
-
break bb0;
|
|
53
|
-
}
|
|
54
|
-
const Icon = icon;
|
|
55
|
-
let t2;
|
|
56
|
-
if ($[4] !== Icon || $[5] !== iconClassName) {
|
|
57
|
-
t2 = /* @__PURE__ */ jsx(Icon, { className: iconClassName });
|
|
58
|
-
$[4] = Icon;
|
|
59
|
-
$[5] = iconClassName;
|
|
60
|
-
$[6] = t2;
|
|
61
|
-
} else t2 = $[6];
|
|
62
|
-
t1 = t2;
|
|
63
|
-
}
|
|
64
|
-
$[0] = buttonIconSizeCva;
|
|
65
|
-
$[1] = icon;
|
|
66
|
-
$[2] = size;
|
|
67
|
-
$[3] = t1;
|
|
68
|
-
} else t1 = $[3];
|
|
69
|
-
const renderedIcon = t1;
|
|
70
|
-
const variant = uiConfig.button.variant;
|
|
71
|
-
let t2;
|
|
72
|
-
if ($[7] !== buttonContentCva || $[8] !== buttonCva || $[9] !== buttonSizeCva || $[10] !== className || $[11] !== size || $[12] !== variant) {
|
|
73
|
-
t2 = clsx(buttonCva({
|
|
74
|
-
className,
|
|
75
|
-
size,
|
|
76
|
-
variant,
|
|
77
|
-
width: "hug"
|
|
78
|
-
}), buttonSizeCva({
|
|
79
|
-
iconOnly: true,
|
|
80
|
-
size
|
|
81
|
-
}), buttonContentCva({
|
|
82
|
-
iconOnly: true,
|
|
83
|
-
iconPosition: "left",
|
|
84
|
-
size
|
|
85
|
-
}));
|
|
86
|
-
$[7] = buttonContentCva;
|
|
87
|
-
$[8] = buttonCva;
|
|
88
|
-
$[9] = buttonSizeCva;
|
|
89
|
-
$[10] = className;
|
|
90
|
-
$[11] = size;
|
|
91
|
-
$[12] = variant;
|
|
92
|
-
$[13] = t2;
|
|
93
|
-
} else t2 = $[13];
|
|
94
|
-
let t3;
|
|
95
|
-
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
96
|
-
t3 = /* @__PURE__ */ jsx("span", { className: "sr-only" });
|
|
97
|
-
$[14] = t3;
|
|
98
|
-
} else t3 = $[14];
|
|
99
|
-
let t4;
|
|
100
|
-
if ($[15] !== isDisabled || $[16] !== renderedIcon || $[17] !== t2) {
|
|
101
|
-
t4 = /* @__PURE__ */ jsxs("button", {
|
|
102
|
-
type: "button",
|
|
103
|
-
"aria-hidden": "true",
|
|
104
|
-
tabIndex: -1,
|
|
105
|
-
disabled: isDisabled,
|
|
106
|
-
className: t2,
|
|
107
|
-
children: [renderedIcon, t3]
|
|
108
|
-
});
|
|
109
|
-
$[15] = isDisabled;
|
|
110
|
-
$[16] = renderedIcon;
|
|
111
|
-
$[17] = t2;
|
|
112
|
-
$[18] = t4;
|
|
113
|
-
} else t4 = $[18];
|
|
114
|
-
return t4;
|
|
115
30
|
};
|
|
116
31
|
//#endregion
|
|
117
32
|
export { renderDatePickerTodayIcon };
|
|
@@ -41,6 +41,7 @@ export declare namespace UIConfig {
|
|
|
41
41
|
dateTimeIcon?: ReactElement;
|
|
42
42
|
timeIcon?: ReactElement;
|
|
43
43
|
setDateValueOnDateSelection?: boolean;
|
|
44
|
+
todayIconButtonComponent?: DatePickerProps["todayIconButtonComponent"];
|
|
44
45
|
};
|
|
45
46
|
actionModal: Pick<ActionModalProps, "titleTypography" | "descriptionTypography">;
|
|
46
47
|
bottomSheet: Pick<BottomSheetProps, "closeDragThreshold" | "closeVelocityThreshold" | "hideThumb" | "headerTypography">;
|