@povio/ui 2.3.2-rc.1 → 2.3.2-rc.3

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.
Files changed (28) hide show
  1. package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -1
  2. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +7 -2
  3. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -1
  4. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +7 -2
  5. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -1
  6. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +7 -2
  7. package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +1 -0
  8. package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -2
  9. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +109 -108
  10. package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +1 -0
  11. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +2 -1
  12. package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +14 -99
  13. package/dist/components/inputs/Inputs/InputItem.d.ts +2 -2
  14. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +1 -0
  15. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
  16. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +73 -3
  17. package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +3 -3
  18. package/dist/components/inputs/Selection/Select/QuerySelect.js +72 -3
  19. package/dist/components/inputs/Selection/Select/Select.js +1 -0
  20. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +5 -0
  21. package/dist/components/inputs/Selection/shared/querySelect.utils.js +15 -3
  22. package/dist/components/inputs/Skeleton/InputFrame.d.ts +2 -0
  23. package/dist/components/inputs/Skeleton/InputFrame.js +353 -333
  24. package/dist/config/uiConfig.context.d.ts +1 -0
  25. package/dist/config/uiConfig.context.js +1 -0
  26. package/dist/tw-ui-plugin.js +4 -0
  27. package/package.json +1 -1
  28. package/dist/components/inputs/shared/StaticInput.d.ts +0 -38
@@ -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;
@@ -367,6 +371,7 @@ var DatePickerInner = (t0) => {
367
371
  inputClassName: clsx("min-w-input-width-min-width", props.inputClassName),
368
372
  contentClassName: "pr-0!",
369
373
  contentWrapperClassName: datePickerInputContentRowCva({ size }),
374
+ contentGroup: "date-picker",
370
375
  labelPlacement: "content-row",
371
376
  dataAttributes: {
372
377
  dataIsEmpty: dateValue == null,
@@ -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;
@@ -715,6 +719,7 @@ var DateRangePickerInner = (t0) => {
715
719
  inputClassName: clsx("min-w-input-width-min-width", props.inputClassName),
716
720
  contentClassName: "pr-0!",
717
721
  contentWrapperClassName: datePickerInputContentRowCva({ size }),
722
+ contentGroup: "date-picker",
718
723
  labelPlacement: "content-row",
719
724
  dataAttributes: {
720
725
  dataIsEmpty: !hasProvidedRangeValue,
@@ -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;
@@ -291,6 +295,7 @@ var DateTimePickerInner = (t0) => {
291
295
  inputClassName: clsx("min-w-input-width-min-width", props.inputClassName),
292
296
  contentClassName: "pr-0!",
293
297
  contentWrapperClassName: datePickerInputContentRowCva({ size }),
298
+ contentGroup: "date-picker",
294
299
  labelPlacement: "content-row",
295
300
  dataAttributes: {
296
301
  dataIsEmpty: dateTimeValue == null,
@@ -498,6 +498,7 @@ var TimePickerInner = (t0) => {
498
498
  className: clsx("group relative inline-flex w-full flex-col text-left", props.className),
499
499
  inputClassName: clsx("min-w-input-width-min-width", props.inputClassName),
500
500
  contentClassName: "pr-0!",
501
+ contentGroup: "date-picker",
501
502
  labelPlacement: "content-row",
502
503
  dataAttributes: {
503
504
  dataIsEmpty: timeValue_0 == null,
@@ -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(107);
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] = todayIconButtonSize;
170
- $[31] = t16;
171
- } else t16 = $[31];
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 ($[32] !== as || $[33] !== inputSizeCva || $[34] !== size) {
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
- $[32] = as;
198
- $[33] = inputSizeCva;
199
- $[34] = size;
200
- $[35] = t29;
201
- } else t29 = $[35];
199
+ $[33] = as;
200
+ $[34] = inputSizeCva;
201
+ $[35] = size;
202
+ $[36] = t29;
203
+ } else t29 = $[36];
202
204
  let t30;
203
- if ($[36] !== as || $[37] !== headerProps) {
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
- $[36] = as;
209
- $[37] = headerProps;
210
- $[38] = t30;
211
- } else t30 = $[38];
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 ($[39] !== datePickerInputContentRowCva || $[40] !== size) {
216
+ if ($[40] !== datePickerInputContentRowCva || $[41] !== size) {
215
217
  t32 = datePickerInputContentRowCva({ size });
216
- $[39] = datePickerInputContentRowCva;
217
- $[40] = size;
218
- $[41] = t32;
219
- } else t32 = $[41];
218
+ $[40] = datePickerInputContentRowCva;
219
+ $[41] = size;
220
+ $[42] = t32;
221
+ } else t32 = $[42];
220
222
  let t33;
221
- if ($[42] !== disableManualEntry || $[43] !== isDisabled || $[44] !== onOpenDropdown) {
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
- $[42] = disableManualEntry;
228
- $[43] = isDisabled;
229
- $[44] = onOpenDropdown;
230
- $[45] = t33;
231
- } else t33 = $[45];
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 ($[46] !== as || $[47] !== dateGranularity || $[48] !== disableManualEntry || $[49] !== effectiveTimeZone || $[50] !== fieldProps || $[51] !== format || $[52] !== hidePlaceholder || $[53] !== isDisabled || $[54] !== isInvalid || $[55] !== isTimeOptional || $[56] !== normalizedEndFieldProps || $[57] !== normalizedFieldProps || $[58] !== onClearChange || $[59] !== placeholder) {
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
- $[46] = as;
267
- $[47] = dateGranularity;
268
- $[48] = disableManualEntry;
269
- $[49] = effectiveTimeZone;
270
- $[50] = fieldProps;
271
- $[51] = format;
272
- $[52] = hidePlaceholder;
273
- $[53] = isDisabled;
274
- $[54] = isInvalid;
275
- $[55] = isTimeOptional;
276
- $[56] = normalizedEndFieldProps;
277
- $[57] = normalizedFieldProps;
278
- $[58] = onClearChange;
279
- $[59] = placeholder;
280
- $[60] = t35;
281
- } else t35 = $[60];
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 ($[61] !== t32 || $[62] !== t33 || $[63] !== t34 || $[64] !== t35) {
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
- $[61] = t32;
293
- $[62] = t33;
294
- $[63] = t34;
295
- $[64] = t35;
296
- $[65] = t36;
297
- } else t36 = $[65];
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 ($[66] !== t29 || $[67] !== t30 || $[68] !== t31 || $[69] !== t36) {
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,36 @@ var DatePickerInput = (t0) => {
305
307
  t36
306
308
  ]
307
309
  });
308
- $[66] = t29;
309
- $[67] = t30;
310
- $[68] = t31;
311
- $[69] = t36;
312
- $[70] = t37;
313
- } else t37 = $[70];
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 ($[71] !== as || $[72] !== inputSizeCva || $[73] !== size) {
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
- $[71] = as;
321
- $[72] = inputSizeCva;
322
- $[73] = size;
323
- $[74] = t38;
324
- } else t38 = $[74];
322
+ $[72] = as;
323
+ $[73] = inputSizeCva;
324
+ $[74] = size;
325
+ $[75] = t38;
326
+ } else t38 = $[75];
325
327
  let t39;
326
- if ($[75] !== clearInput || $[76] !== isClearable || $[77] !== showClear) {
328
+ if ($[76] !== clearInput || $[77] !== isClearable || $[78] !== showClear) {
327
329
  t39 = isClearable && /* @__PURE__ */ jsx(InputClear, {
328
330
  onClear: clearInput,
329
- show: showClear,
330
- style: showClear ? { visibility: "visible" } : void 0
331
+ show: showClear
331
332
  });
332
- $[75] = clearInput;
333
- $[76] = isClearable;
334
- $[77] = showClear;
335
- $[78] = t39;
336
- } else t39 = $[78];
333
+ $[76] = clearInput;
334
+ $[77] = isClearable;
335
+ $[78] = showClear;
336
+ $[79] = t39;
337
+ } else t39 = $[79];
337
338
  let t40;
338
- if ($[79] !== buttonProps || $[80] !== disableDropdown || $[81] !== disableManualEntry || $[82] !== isDisabled || $[83] !== pickerIcon) {
339
+ if ($[80] !== buttonProps || $[81] !== disableDropdown || $[82] !== disableManualEntry || $[83] !== isDisabled || $[84] !== pickerIcon) {
339
340
  t40 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
340
341
  label: "",
341
342
  color: "secondary",
@@ -344,26 +345,26 @@ var DatePickerInput = (t0) => {
344
345
  isDisabled,
345
346
  className: "border-0!"
346
347
  });
347
- $[79] = buttonProps;
348
- $[80] = disableDropdown;
349
- $[81] = disableManualEntry;
350
- $[82] = isDisabled;
351
- $[83] = pickerIcon;
352
- $[84] = t40;
353
- } else t40 = $[84];
348
+ $[80] = buttonProps;
349
+ $[81] = disableDropdown;
350
+ $[82] = disableManualEntry;
351
+ $[83] = isDisabled;
352
+ $[84] = pickerIcon;
353
+ $[85] = t40;
354
+ } else t40 = $[85];
354
355
  let t41;
355
- if ($[85] !== t38 || $[86] !== t39 || $[87] !== t40) {
356
+ if ($[86] !== t38 || $[87] !== t39 || $[88] !== t40) {
356
357
  t41 = /* @__PURE__ */ jsxs("div", {
357
358
  className: t38,
358
359
  children: [t39, t40]
359
360
  });
360
- $[85] = t38;
361
- $[86] = t39;
362
- $[87] = t40;
363
- $[88] = t41;
364
- } else t41 = $[88];
361
+ $[86] = t38;
362
+ $[87] = t39;
363
+ $[88] = t40;
364
+ $[89] = t41;
365
+ } else t41 = $[89];
365
366
  let t42;
366
- if ($[89] !== focusWithinProps || $[90] !== groupProps || $[91] !== hoverProps || $[92] !== t17 || $[93] !== t18 || $[94] !== t19 || $[95] !== t20 || $[96] !== t21 || $[97] !== t22 || $[98] !== t23 || $[99] !== t24 || $[100] !== t25 || $[101] !== t26 || $[102] !== t27 || $[103] !== t28 || $[104] !== t37 || $[105] !== t41) {
367
+ 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
368
  t42 = /* @__PURE__ */ jsxs("div", {
368
369
  ref: containerRef,
369
370
  ...groupProps,
@@ -385,25 +386,25 @@ var DatePickerInput = (t0) => {
385
386
  "data-is-filled": t28,
386
387
  children: [t37, t41]
387
388
  });
388
- $[89] = focusWithinProps;
389
- $[90] = groupProps;
390
- $[91] = hoverProps;
391
- $[92] = t17;
392
- $[93] = t18;
393
- $[94] = t19;
394
- $[95] = t20;
395
- $[96] = t21;
396
- $[97] = t22;
397
- $[98] = t23;
398
- $[99] = t24;
399
- $[100] = t25;
400
- $[101] = t26;
401
- $[102] = t27;
402
- $[103] = t28;
403
- $[104] = t37;
404
- $[105] = t41;
405
- $[106] = t42;
406
- } else t42 = $[106];
389
+ $[90] = focusWithinProps;
390
+ $[91] = groupProps;
391
+ $[92] = hoverProps;
392
+ $[93] = t17;
393
+ $[94] = t18;
394
+ $[95] = t19;
395
+ $[96] = t20;
396
+ $[97] = t21;
397
+ $[98] = t22;
398
+ $[99] = t23;
399
+ $[100] = t24;
400
+ $[101] = t25;
401
+ $[102] = t26;
402
+ $[103] = t27;
403
+ $[104] = t28;
404
+ $[105] = t37;
405
+ $[106] = t41;
406
+ $[107] = t42;
407
+ } else t42 = $[107];
407
408
  return t42;
408
409
  };
409
410
  //#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;