@povio/ui 3.3.0 → 3.3.1

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 (98) hide show
  1. package/README.md +1 -1
  2. package/dist/browser-tests/checkbox/CheckboxGroupHarness.d.ts +10 -0
  3. package/dist/browser-tests/checkbox/CheckboxHarness.d.ts +10 -0
  4. package/dist/browser-tests/checkbox/checkbox-group.spec.d.ts +1 -0
  5. package/dist/browser-tests/checkbox/checkbox.spec.d.ts +1 -0
  6. package/dist/browser-tests/datetime-picker/DateTimeHarnesses.d.ts +43 -0
  7. package/dist/browser-tests/datetime-picker/assertions.d.ts +9 -0
  8. package/dist/browser-tests/datetime-picker/date-input-focus.firefox.spec.d.ts +1 -0
  9. package/dist/browser-tests/datetime-picker/date-picker.spec.d.ts +1 -0
  10. package/dist/browser-tests/datetime-picker/date-range-picker.spec.d.ts +1 -0
  11. package/dist/browser-tests/datetime-picker/date-time-picker.spec.d.ts +1 -0
  12. package/dist/browser-tests/datetime-picker/time-picker.spec.d.ts +1 -0
  13. package/dist/browser-tests/file-upload/FileUploadHarness.d.ts +4 -0
  14. package/dist/browser-tests/file-upload/file-upload.spec.d.ts +1 -0
  15. package/dist/browser-tests/file-upload-container/FileUploadContainerHarness.d.ts +4 -0
  16. package/dist/browser-tests/file-upload-container/file-upload-container.spec.d.ts +1 -0
  17. package/dist/browser-tests/input-upload/InputUploadHarness.d.ts +9 -0
  18. package/dist/browser-tests/input-upload/input-upload.spec.d.ts +1 -0
  19. package/dist/browser-tests/modal/ModalHarness.d.ts +5 -0
  20. package/dist/browser-tests/modal/modal.spec.d.ts +1 -0
  21. package/dist/browser-tests/number-input/NumberInputHarness.d.ts +10 -0
  22. package/dist/browser-tests/number-input/number-input.spec.d.ts +1 -0
  23. package/dist/browser-tests/number-range-input/NumberRangeInputHarness.d.ts +10 -0
  24. package/dist/browser-tests/number-range-input/number-range-input.spec.d.ts +1 -0
  25. package/dist/browser-tests/password-input/PasswordInputHarness.d.ts +6 -0
  26. package/dist/browser-tests/password-input/password-input.spec.d.ts +1 -0
  27. package/dist/browser-tests/radio-group/RadioGroupHarness.d.ts +15 -0
  28. package/dist/browser-tests/radio-group/radio-group.spec.d.ts +1 -0
  29. package/dist/browser-tests/selection/SelectionHarnesses.d.ts +61 -0
  30. package/dist/browser-tests/selection/autocomplete.spec.d.ts +1 -0
  31. package/dist/browser-tests/selection/interactions.d.ts +2 -0
  32. package/dist/browser-tests/selection/query-autocomplete.spec.d.ts +1 -0
  33. package/dist/browser-tests/selection/query-select.spec.d.ts +1 -0
  34. package/dist/browser-tests/selection/select.spec.d.ts +1 -0
  35. package/dist/browser-tests/slider/SliderHarness.d.ts +11 -0
  36. package/dist/browser-tests/slider/slider.spec.d.ts +1 -0
  37. package/dist/browser-tests/text-area/TextAreaHarness.d.ts +10 -0
  38. package/dist/browser-tests/text-area/text-area.spec.d.ts +1 -0
  39. package/dist/browser-tests/text-input/TextInputHarness.d.ts +10 -0
  40. package/dist/browser-tests/text-input/text-input.spec.d.ts +1 -0
  41. package/dist/browser-tests/toggle/ToggleHarness.d.ts +10 -0
  42. package/dist/browser-tests/toggle/toggle.spec.d.ts +1 -0
  43. package/dist/browser-tests/utils/blur.d.ts +22 -0
  44. package/dist/browser-tests/utils/events.d.ts +4 -0
  45. package/dist/browser-tests/utils/input.d.ts +10 -0
  46. package/dist/components/Breadcrumbs/Breadcrumbs.js +206 -55
  47. package/dist/components/buttons/Button/button.cva.d.ts +1 -1
  48. package/dist/components/buttons/Button/button.cva.js +4 -4
  49. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
  50. package/dist/components/buttons/PillButton/pillButton.cva.js +4 -4
  51. package/dist/components/buttons/shared/ButtonContent.js +80 -22
  52. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
  53. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +222 -74
  54. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +182 -56
  55. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +128 -41
  56. package/dist/components/inputs/DateTime/shared/Calendar.js +339 -139
  57. package/dist/components/inputs/DateTime/shared/CalendarCell.js +308 -114
  58. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -35
  59. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +229 -95
  60. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +296 -115
  61. package/dist/components/inputs/DateTime/shared/DateField.js +306 -135
  62. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +338 -140
  63. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
  64. package/dist/components/inputs/File/FileUpload.js +1 -1
  65. package/dist/components/inputs/File/InputUpload.js +261 -65
  66. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +180 -48
  67. package/dist/components/inputs/File/shared/FileUploadContentError.js +265 -95
  68. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +261 -99
  69. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +234 -56
  70. package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
  71. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +313 -75
  72. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +83 -23
  73. package/dist/components/inputs/Selection/Select/QuerySelect.js +96 -30
  74. package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
  75. package/dist/components/inputs/Selection/shared/useSelectItems.js +108 -48
  76. package/dist/components/inputs/Skeleton/InputFrame.js +550 -177
  77. package/dist/components/inputs/TextEditor/TextEditor.js +389 -87
  78. package/dist/components/navigation/Accordion/Accordion.js +69 -22
  79. package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
  80. package/dist/components/navigation/Stepper/Stepper.js +67 -22
  81. package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
  82. package/dist/components/overlays/BottomSheet/BottomSheet.js +1 -1
  83. package/dist/components/overlays/Modal/Modal.d.ts +3 -2
  84. package/dist/components/overlays/Modal/Modal.js +3 -1
  85. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +110 -29
  86. package/dist/components/shared/pagination/Pagination.js +108 -22
  87. package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
  88. package/dist/components/status/Alert/Alert.js +97 -30
  89. package/dist/components/table/InfiniteTable.js +67 -16
  90. package/dist/components/text/Typography/Typography.js +23 -8
  91. package/dist/config/confirmation.context.js +1 -1
  92. package/dist/config/theme.context.js +98 -45
  93. package/dist/config/uiConfig.context.js +39 -8
  94. package/dist/hooks/useDebounceCallback.js +51 -17
  95. package/dist/hooks/useFormAutosave.js +120 -33
  96. package/dist/hooks/useLongPressRepeat.js +55 -20
  97. package/dist/vitest.setup.browser.d.ts +6 -0
  98. package/package.json +1 -1
@@ -10,14 +10,22 @@ import { datePickerInputContentRowDefinition } from "./datePickerInput.cva.js";
10
10
  import { renderDatePickerTodayIcon } from "./datePickerTodayIcon.js";
11
11
  import { useFirefoxDateSegmentSelectionGuard } from "./useFirefoxDateSegmentSelectionGuard.js";
12
12
  import { InputClear } from "../../shared/InputClear.js";
13
+ import { c } from "react/compiler-runtime";
13
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
15
  import { clsx } from "clsx";
15
- import { useCallback, useImperativeHandle, useRef, useState } from "react";
16
+ import { useImperativeHandle, useRef, useState } from "react";
16
17
  import { Button } from "react-aria-components";
17
18
  import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
18
19
  import { getLocalTimeZone, today } from "@internationalized/date";
19
20
  //#region src/components/inputs/DateTime/shared/DatePickerInput.tsx
20
- var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, headerProps, todayIcon, todayIconButtonSize = "none", todayIconButtonComponent, todayIconPlacement = "content", isDirty, isRequired, disableManualEntry, autoFixYear = false, placeholder, className, onOpenDropdown, dateGranularity = "day", timeZone: timeZoneProp, isTimeOptional = false, format, fireBlurOnChange, onClear: onClearProp, ...props }) => {
21
+ var DatePickerInput = (t0) => {
22
+ const $ = c(98);
23
+ const { ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, headerProps, todayIcon, todayIconButtonSize: t1, todayIconButtonComponent, todayIconPlacement: t2, isDirty, isRequired, disableManualEntry, autoFixYear: t3, placeholder, className, onOpenDropdown, dateGranularity: t4, timeZone: timeZoneProp, isTimeOptional: t5, format, fireBlurOnChange, onClear: onClearProp, ...props } = t0;
24
+ const todayIconButtonSize = t1 === void 0 ? "none" : t1;
25
+ const todayIconPlacement = t2 === void 0 ? "content" : t2;
26
+ const autoFixYear = t3 === void 0 ? false : t3;
27
+ const dateGranularity = t4 === void 0 ? "day" : t4;
28
+ const isTimeOptional = t5 === void 0 ? false : t5;
21
29
  const uiConfig = UIConfig.useConfig();
22
30
  const timeZone = timeZoneProp ?? uiConfig.dateInput.timeZone;
23
31
  let effectiveTimeZone = getLocalTimeZone();
@@ -26,56 +34,107 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
26
34
  const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
27
35
  const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
28
36
  const [canClear, setCanClear] = useState(false);
29
- const { hoverProps, isHovered } = useHover({ isDisabled });
37
+ let t6;
38
+ if ($[0] !== isDisabled) {
39
+ t6 = { isDisabled };
40
+ $[0] = isDisabled;
41
+ $[1] = t6;
42
+ } else t6 = $[1];
43
+ const { hoverProps, isHovered } = useHover(t6);
30
44
  const [isFocused, setIsFocused] = useState(false);
31
- const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: (isFocusWithin) => {
32
- setIsFocused(isFocusWithin);
33
- if (!isFocusWithin && autoFixYear) {
34
- dateFieldRef.current?.autoFixYear();
35
- endDateFieldRef.current?.autoFixYear();
36
- }
37
- } });
45
+ let t7;
46
+ if ($[2] !== autoFixYear) {
47
+ t7 = { onFocusWithinChange: (isFocusWithin) => {
48
+ setIsFocused(isFocusWithin);
49
+ if (!isFocusWithin && autoFixYear) {
50
+ dateFieldRef.current?.autoFixYear();
51
+ endDateFieldRef.current?.autoFixYear();
52
+ }
53
+ } };
54
+ $[2] = autoFixYear;
55
+ $[3] = t7;
56
+ } else t7 = $[3];
57
+ const { focusWithinProps } = useFocusWithin(t7);
38
58
  const { isFocusVisible } = useFocusVisible();
39
59
  const dateFieldRef = useRef(null);
40
60
  const endDateFieldRef = useRef(null);
41
61
  const containerRef = useRef(null);
42
62
  useFirefoxDateSegmentSelectionGuard(containerRef);
43
- const normalizedFieldProps = {
44
- ...fieldProps,
45
- value: isValueControlled ? fieldValue ?? null : fieldProps.value ?? null,
46
- shouldAutoFixYear: autoFixYear
47
- };
48
- const normalizedEndFieldProps = endFieldProps ? {
49
- ...endFieldProps,
50
- value: isValueControlled ? endFieldValue ?? null : endFieldProps.value ?? null,
51
- shouldAutoFixYear: autoFixYear
52
- } : void 0;
53
- const clearInput = useCallback(() => {
54
- dateFieldRef.current?.clearField();
55
- endDateFieldRef.current?.clearField();
56
- if (onClearProp) onClearProp();
57
- else {
58
- fieldProps.onChange?.(null);
59
- endFieldProps?.onChange?.(null);
60
- if (fireBlurOnChange) {
61
- fieldProps.onBlur?.(null);
62
- endFieldProps?.onBlur?.(null);
63
+ const t8 = isValueControlled ? fieldValue ?? null : fieldProps.value ?? null;
64
+ let t9;
65
+ if ($[4] !== autoFixYear || $[5] !== fieldProps || $[6] !== t8) {
66
+ t9 = {
67
+ ...fieldProps,
68
+ value: t8,
69
+ shouldAutoFixYear: autoFixYear
70
+ };
71
+ $[4] = autoFixYear;
72
+ $[5] = fieldProps;
73
+ $[6] = t8;
74
+ $[7] = t9;
75
+ } else t9 = $[7];
76
+ const normalizedFieldProps = t9;
77
+ let t10;
78
+ if ($[8] !== autoFixYear || $[9] !== endFieldProps || $[10] !== endFieldValue || $[11] !== isValueControlled) {
79
+ t10 = endFieldProps ? {
80
+ ...endFieldProps,
81
+ value: isValueControlled ? endFieldValue ?? null : endFieldProps.value ?? null,
82
+ shouldAutoFixYear: autoFixYear
83
+ } : void 0;
84
+ $[8] = autoFixYear;
85
+ $[9] = endFieldProps;
86
+ $[10] = endFieldValue;
87
+ $[11] = isValueControlled;
88
+ $[12] = t10;
89
+ } else t10 = $[12];
90
+ const normalizedEndFieldProps = t10;
91
+ let t11;
92
+ if ($[13] !== endFieldProps || $[14] !== fieldProps || $[15] !== fireBlurOnChange || $[16] !== onClearProp) {
93
+ t11 = () => {
94
+ dateFieldRef.current?.clearField();
95
+ endDateFieldRef.current?.clearField();
96
+ if (onClearProp) onClearProp();
97
+ else {
98
+ fieldProps.onChange?.(null);
99
+ endFieldProps?.onChange?.(null);
100
+ if (fireBlurOnChange) {
101
+ fieldProps.onBlur?.(null);
102
+ endFieldProps?.onBlur?.(null);
103
+ }
63
104
  }
64
- }
65
- setCanClear(false);
66
- }, [
67
- endFieldProps,
68
- fieldProps,
69
- fireBlurOnChange,
70
- onClearProp
71
- ]);
72
- useImperativeHandle(ref, () => ({
73
- clear: clearInput,
74
- getContainer: () => containerRef.current
75
- }), [clearInput]);
76
- const onClearChange = useCallback((canClearInput) => {
77
- setCanClear(canClearInput);
78
- }, []);
105
+ setCanClear(false);
106
+ };
107
+ $[13] = endFieldProps;
108
+ $[14] = fieldProps;
109
+ $[15] = fireBlurOnChange;
110
+ $[16] = onClearProp;
111
+ $[17] = t11;
112
+ } else t11 = $[17];
113
+ const clearInput = t11;
114
+ let t12;
115
+ let t13;
116
+ if ($[18] !== clearInput) {
117
+ t12 = () => ({
118
+ clear: clearInput,
119
+ getContainer: () => containerRef.current
120
+ });
121
+ t13 = [clearInput];
122
+ $[18] = clearInput;
123
+ $[19] = t12;
124
+ $[20] = t13;
125
+ } else {
126
+ t12 = $[19];
127
+ t13 = $[20];
128
+ }
129
+ useImperativeHandle(ref, t12, t13);
130
+ let t14;
131
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
132
+ t14 = (canClearInput) => {
133
+ setCanClear(canClearInput);
134
+ };
135
+ $[21] = t14;
136
+ } else t14 = $[21];
137
+ const onClearChange = t14;
79
138
  const showClear = canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null;
80
139
  const isTodayIconDisabled = isDisabled || buttonProps.isDisabled;
81
140
  const onToday = () => {
@@ -102,104 +161,243 @@ var DatePickerInput = ({ ref, as, groupProps, fieldProps, endFieldProps, fieldVa
102
161
  });
103
162
  const shouldRenderTodayIconWithFieldLabel = todayIconPlacement === "fieldLabel";
104
163
  const pickerIcon = isDateTime ? uiConfig.dateInput.dateTimeIcon : uiConfig.dateInput.calendarIcon;
105
- return /* @__PURE__ */ jsxs("div", {
106
- ref: containerRef,
107
- ...groupProps,
108
- ...focusWithinProps,
109
- ...hoverProps,
110
- className: clsx("group group/date-picker-content relative flex items-center justify-between gap-2", shouldShrinkInput ? "min-w-0" : "min-w-input-width-min-width", groupProps.className, inputBaseCva({
111
- variant,
164
+ const t15 = clsx("group group/date-picker-content relative flex items-center justify-between gap-2", shouldShrinkInput ? "min-w-0" : "min-w-input-width-min-width", groupProps.className, inputBaseCva({
165
+ variant,
166
+ as,
167
+ ...props
168
+ }), className);
169
+ const t16 = isHovered || void 0;
170
+ const t17 = isDisabled || void 0;
171
+ const t18 = isDisabled || void 0;
172
+ const t19 = isInvalid || void 0;
173
+ const t20 = normalizedFieldProps.value == null || void 0;
174
+ const t21 = isFocused || void 0;
175
+ const t22 = isFocused && isFocusVisible || void 0;
176
+ const t23 = normalizedFieldProps.value != null || void 0;
177
+ const t24 = isDirty || void 0;
178
+ const t25 = isRequired || void 0;
179
+ const t26 = normalizedFieldProps.value != null || void 0;
180
+ const t27 = shouldShrinkInput ? "min-w-0 flex-1 w-full" : "w-full";
181
+ let t28;
182
+ if ($[22] !== as || $[23] !== inputSizeCva || $[24] !== size || $[25] !== t27) {
183
+ t28 = clsx("flex items-center gap-input-gap-input-text-to-elements pr-0!", t27, inputSizeCva({
184
+ size,
185
+ as
186
+ }));
187
+ $[22] = as;
188
+ $[23] = inputSizeCva;
189
+ $[24] = size;
190
+ $[25] = t27;
191
+ $[26] = t28;
192
+ } else t28 = $[26];
193
+ let t29;
194
+ if ($[27] !== as || $[28] !== headerProps) {
195
+ t29 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
112
196
  as,
113
- ...props
114
- }), className),
115
- "data-rac": "",
116
- "data-datetime-input": "",
117
- "data-hovered": isHovered || void 0,
118
- "data-disabled": isDisabled || void 0,
119
- "data-is-disabled": isDisabled || void 0,
120
- "data-invalid": isInvalid || void 0,
121
- "data-is-empty": normalizedFieldProps.value == null || void 0,
122
- "data-focus-within": isFocused || void 0,
123
- "data-focus-visible": isFocused && isFocusVisible || void 0,
124
- "data-has-selection": normalizedFieldProps.value != null || void 0,
125
- "data-is-dirty": isDirty || void 0,
126
- "data-is-required": isRequired || void 0,
127
- "data-is-filled": normalizedFieldProps.value != null || void 0,
128
- children: [/* @__PURE__ */ jsxs("div", {
129
- className: clsx("flex items-center gap-input-gap-input-text-to-elements pr-0!", shouldShrinkInput ? "min-w-0 flex-1 w-full" : "w-full", inputSizeCva({
130
- size,
131
- as
132
- })),
197
+ ...headerProps
198
+ });
199
+ $[27] = as;
200
+ $[28] = headerProps;
201
+ $[29] = t29;
202
+ } else t29 = $[29];
203
+ const t30 = shouldRenderTodayIconWithFieldLabel && todayIconButton;
204
+ let t31;
205
+ if ($[30] !== datePickerInputContentRowCva || $[31] !== size) {
206
+ t31 = datePickerInputContentRowCva({ size });
207
+ $[30] = datePickerInputContentRowCva;
208
+ $[31] = size;
209
+ $[32] = t31;
210
+ } else t31 = $[32];
211
+ let t32;
212
+ if ($[33] !== disableManualEntry || $[34] !== isDisabled || $[35] !== onOpenDropdown) {
213
+ t32 = disableManualEntry && /* @__PURE__ */ jsx(Button, {
214
+ onPress: onOpenDropdown,
215
+ className: "absolute inset-0 z-base",
216
+ isDisabled
217
+ });
218
+ $[33] = disableManualEntry;
219
+ $[34] = isDisabled;
220
+ $[35] = onOpenDropdown;
221
+ $[36] = t32;
222
+ } else t32 = $[36];
223
+ const t33 = !shouldRenderTodayIconWithFieldLabel && todayIconButton;
224
+ let t34;
225
+ if ($[37] !== as || $[38] !== dateGranularity || $[39] !== disableManualEntry || $[40] !== effectiveTimeZone || $[41] !== fieldProps || $[42] !== format || $[43] !== hidePlaceholder || $[44] !== isDisabled || $[45] !== isInvalid || $[46] !== isTimeOptional || $[47] !== normalizedEndFieldProps || $[48] !== normalizedFieldProps || $[49] !== onClearChange || $[50] !== placeholder) {
226
+ t34 = disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
227
+ size: "label-1",
228
+ className: "text-text-default-3",
229
+ children: placeholder
230
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DateField, {
231
+ ref: dateFieldRef,
232
+ ...normalizedFieldProps,
233
+ isDisabled,
234
+ isInvalid,
235
+ onClearChange,
236
+ hidePlaceholder,
237
+ disableManualEntry,
238
+ dateGranularity,
239
+ isTimeOptional,
240
+ format,
241
+ timeZone: effectiveTimeZone,
242
+ segmentGroup: normalizedEndFieldProps ? "start" : void 0
243
+ }), normalizedEndFieldProps && /* @__PURE__ */ jsxs(Fragment, { children: [!((as === "floating" || as === "filter") && hidePlaceholder) && /* @__PURE__ */ jsx("span", {
244
+ className: clsx("pointer-events-none select-none", isDisabled && "text-interactive-text-secondary-disabled"),
245
+ children: "–"
246
+ }), /* @__PURE__ */ jsx(DateField, {
247
+ ref: endDateFieldRef,
248
+ ...normalizedEndFieldProps,
249
+ isDisabled,
250
+ isInvalid,
251
+ onClearChange,
252
+ hidePlaceholder,
253
+ disableManualEntry,
254
+ isTimeOptional,
255
+ format,
256
+ timeZone: effectiveTimeZone,
257
+ segmentGroup: "end"
258
+ })] })] });
259
+ $[37] = as;
260
+ $[38] = dateGranularity;
261
+ $[39] = disableManualEntry;
262
+ $[40] = effectiveTimeZone;
263
+ $[41] = fieldProps;
264
+ $[42] = format;
265
+ $[43] = hidePlaceholder;
266
+ $[44] = isDisabled;
267
+ $[45] = isInvalid;
268
+ $[46] = isTimeOptional;
269
+ $[47] = normalizedEndFieldProps;
270
+ $[48] = normalizedFieldProps;
271
+ $[49] = onClearChange;
272
+ $[50] = placeholder;
273
+ $[51] = t34;
274
+ } else t34 = $[51];
275
+ let t35;
276
+ if ($[52] !== t31 || $[53] !== t32 || $[54] !== t33 || $[55] !== t34) {
277
+ t35 = /* @__PURE__ */ jsxs("div", {
278
+ className: t31,
133
279
  children: [
134
- as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
135
- as,
136
- ...headerProps
137
- }),
138
- shouldRenderTodayIconWithFieldLabel && todayIconButton,
139
- /* @__PURE__ */ jsxs("div", {
140
- className: datePickerInputContentRowCva({ size }),
141
- children: [
142
- disableManualEntry && /* @__PURE__ */ jsx(Button, {
143
- onPress: onOpenDropdown,
144
- className: "absolute inset-0 z-base",
145
- isDisabled
146
- }),
147
- !shouldRenderTodayIconWithFieldLabel && todayIconButton,
148
- disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
149
- size: "label-1",
150
- className: "text-text-default-3",
151
- children: placeholder
152
- }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DateField, {
153
- ref: dateFieldRef,
154
- ...normalizedFieldProps,
155
- isDisabled,
156
- isInvalid,
157
- onClearChange,
158
- hidePlaceholder,
159
- disableManualEntry,
160
- dateGranularity,
161
- isTimeOptional,
162
- format,
163
- timeZone: effectiveTimeZone,
164
- segmentGroup: normalizedEndFieldProps ? "start" : void 0
165
- }), normalizedEndFieldProps && /* @__PURE__ */ jsxs(Fragment, { children: [!((as === "floating" || as === "filter") && hidePlaceholder) && /* @__PURE__ */ jsx("span", {
166
- className: clsx("pointer-events-none select-none", isDisabled && "text-interactive-text-secondary-disabled"),
167
- children: "–"
168
- }), /* @__PURE__ */ jsx(DateField, {
169
- ref: endDateFieldRef,
170
- ...normalizedEndFieldProps,
171
- isDisabled,
172
- isInvalid,
173
- onClearChange,
174
- hidePlaceholder,
175
- disableManualEntry,
176
- isTimeOptional,
177
- format,
178
- timeZone: effectiveTimeZone,
179
- segmentGroup: "end"
180
- })] })] })
181
- ]
182
- })
280
+ t32,
281
+ t33,
282
+ t34
183
283
  ]
184
- }), /* @__PURE__ */ jsxs("div", {
185
- className: clsx(inputSizeCva({
186
- size,
187
- as
188
- }), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!"),
189
- children: [isClearable && /* @__PURE__ */ jsx(InputClear, {
190
- onClear: clearInput,
191
- show: showClear
192
- }), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
193
- label: "",
194
- color: "secondary",
195
- ...buttonProps,
196
- icon: pickerIcon,
197
- isDisabled,
198
- className: "border-0!",
199
- "data-static-press-action": ""
200
- })]
201
- })]
202
- });
284
+ });
285
+ $[52] = t31;
286
+ $[53] = t32;
287
+ $[54] = t33;
288
+ $[55] = t34;
289
+ $[56] = t35;
290
+ } else t35 = $[56];
291
+ let t36;
292
+ if ($[57] !== t28 || $[58] !== t29 || $[59] !== t30 || $[60] !== t35) {
293
+ t36 = /* @__PURE__ */ jsxs("div", {
294
+ className: t28,
295
+ children: [
296
+ t29,
297
+ t30,
298
+ t35
299
+ ]
300
+ });
301
+ $[57] = t28;
302
+ $[58] = t29;
303
+ $[59] = t30;
304
+ $[60] = t35;
305
+ $[61] = t36;
306
+ } else t36 = $[61];
307
+ let t37;
308
+ if ($[62] !== as || $[63] !== inputSizeCva || $[64] !== size) {
309
+ t37 = clsx(inputSizeCva({
310
+ size,
311
+ as
312
+ }), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!");
313
+ $[62] = as;
314
+ $[63] = inputSizeCva;
315
+ $[64] = size;
316
+ $[65] = t37;
317
+ } else t37 = $[65];
318
+ let t38;
319
+ if ($[66] !== clearInput || $[67] !== isClearable || $[68] !== showClear) {
320
+ t38 = isClearable && /* @__PURE__ */ jsx(InputClear, {
321
+ onClear: clearInput,
322
+ show: showClear
323
+ });
324
+ $[66] = clearInput;
325
+ $[67] = isClearable;
326
+ $[68] = showClear;
327
+ $[69] = t38;
328
+ } else t38 = $[69];
329
+ let t39;
330
+ if ($[70] !== buttonProps || $[71] !== disableDropdown || $[72] !== disableManualEntry || $[73] !== isDisabled || $[74] !== pickerIcon) {
331
+ t39 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
332
+ label: "",
333
+ color: "secondary",
334
+ ...buttonProps,
335
+ icon: pickerIcon,
336
+ isDisabled,
337
+ className: "border-0!",
338
+ "data-static-press-action": ""
339
+ });
340
+ $[70] = buttonProps;
341
+ $[71] = disableDropdown;
342
+ $[72] = disableManualEntry;
343
+ $[73] = isDisabled;
344
+ $[74] = pickerIcon;
345
+ $[75] = t39;
346
+ } else t39 = $[75];
347
+ let t40;
348
+ if ($[76] !== t37 || $[77] !== t38 || $[78] !== t39) {
349
+ t40 = /* @__PURE__ */ jsxs("div", {
350
+ className: t37,
351
+ children: [t38, t39]
352
+ });
353
+ $[76] = t37;
354
+ $[77] = t38;
355
+ $[78] = t39;
356
+ $[79] = t40;
357
+ } else t40 = $[79];
358
+ let t41;
359
+ if ($[80] !== focusWithinProps || $[81] !== groupProps || $[82] !== hoverProps || $[83] !== t15 || $[84] !== t16 || $[85] !== t17 || $[86] !== t18 || $[87] !== t19 || $[88] !== t20 || $[89] !== t21 || $[90] !== t22 || $[91] !== t23 || $[92] !== t24 || $[93] !== t25 || $[94] !== t26 || $[95] !== t36 || $[96] !== t40) {
360
+ t41 = /* @__PURE__ */ jsxs("div", {
361
+ ref: containerRef,
362
+ ...groupProps,
363
+ ...focusWithinProps,
364
+ ...hoverProps,
365
+ className: t15,
366
+ "data-rac": "",
367
+ "data-datetime-input": "",
368
+ "data-hovered": t16,
369
+ "data-disabled": t17,
370
+ "data-is-disabled": t18,
371
+ "data-invalid": t19,
372
+ "data-is-empty": t20,
373
+ "data-focus-within": t21,
374
+ "data-focus-visible": t22,
375
+ "data-has-selection": t23,
376
+ "data-is-dirty": t24,
377
+ "data-is-required": t25,
378
+ "data-is-filled": t26,
379
+ children: [t36, t40]
380
+ });
381
+ $[80] = focusWithinProps;
382
+ $[81] = groupProps;
383
+ $[82] = hoverProps;
384
+ $[83] = t15;
385
+ $[84] = t16;
386
+ $[85] = t17;
387
+ $[86] = t18;
388
+ $[87] = t19;
389
+ $[88] = t20;
390
+ $[89] = t21;
391
+ $[90] = t22;
392
+ $[91] = t23;
393
+ $[92] = t24;
394
+ $[93] = t25;
395
+ $[94] = t26;
396
+ $[95] = t36;
397
+ $[96] = t40;
398
+ $[97] = t41;
399
+ } else t41 = $[97];
400
+ return t41;
203
401
  };
204
402
  //#endregion
205
403
  export { DatePickerInput };
@@ -1,27 +1,76 @@
1
1
  import "../../../../config/i18n.js";
2
2
  import { TextButton } from "../../../buttons/TextButton/TextButton.js";
3
+ import { c } from "react/compiler-runtime";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
4
5
  import { clsx } from "clsx";
5
6
  import { useTranslation } from "react-i18next";
6
7
  //#region src/components/inputs/DateTime/shared/DateTimeDialogFooter.tsx
7
- var DateTimeDialogFooter = ({ isValid = true, isDisabled = false, onTodayPress, onApply }) => {
8
+ var DateTimeDialogFooter = (t0) => {
9
+ const $ = c(16);
10
+ const { isValid: t1, isDisabled: t2, onTodayPress, onApply } = t0;
11
+ const isValid = t1 === void 0 ? true : t1;
12
+ const isDisabled = t2 === void 0 ? false : t2;
8
13
  const { t } = useTranslation("ui");
9
- return /* @__PURE__ */ jsxs("footer", {
10
- className: clsx("flex shrink-0 items-center gap-2 bg-elevation-fill-default-2 px-4 py-3 md:border-elevation-outline-default-1 md:border-t md:bg-elevation-fill-default-1 md:py-1-5", onTodayPress ? "justify-between" : "justify-end"),
11
- children: [onTodayPress && /* @__PURE__ */ jsx(TextButton, {
14
+ const t3 = onTodayPress ? "justify-between" : "justify-end";
15
+ let t4;
16
+ if ($[0] !== t3) {
17
+ t4 = clsx("flex shrink-0 items-center gap-2 bg-elevation-fill-default-2 px-4 py-3 md:border-elevation-outline-default-1 md:border-t md:bg-elevation-fill-default-1 md:py-1-5", t3);
18
+ $[0] = t3;
19
+ $[1] = t4;
20
+ } else t4 = $[1];
21
+ let t5;
22
+ if ($[2] !== isDisabled || $[3] !== onTodayPress || $[4] !== t) {
23
+ t5 = onTodayPress && /* @__PURE__ */ jsx(TextButton, {
12
24
  type: "button",
13
25
  color: "primary",
14
26
  isDisabled,
15
27
  onPress: onTodayPress,
16
- children: t(($) => $.ui.datePicker.today)
17
- }), /* @__PURE__ */ jsx(TextButton, {
28
+ children: t(_temp)
29
+ });
30
+ $[2] = isDisabled;
31
+ $[3] = onTodayPress;
32
+ $[4] = t;
33
+ $[5] = t5;
34
+ } else t5 = $[5];
35
+ const t6 = !isValid;
36
+ let t7;
37
+ if ($[6] !== t) {
38
+ t7 = t(_temp2);
39
+ $[6] = t;
40
+ $[7] = t7;
41
+ } else t7 = $[7];
42
+ let t8;
43
+ if ($[8] !== onApply || $[9] !== t6 || $[10] !== t7) {
44
+ t8 = /* @__PURE__ */ jsx(TextButton, {
18
45
  type: "button",
19
46
  color: "secondary",
20
47
  onPress: onApply,
21
- isDisabled: !isValid,
22
- children: t(($_0) => $_0.ui.datePicker.save)
23
- })]
24
- });
48
+ isDisabled: t6,
49
+ children: t7
50
+ });
51
+ $[8] = onApply;
52
+ $[9] = t6;
53
+ $[10] = t7;
54
+ $[11] = t8;
55
+ } else t8 = $[11];
56
+ let t9;
57
+ if ($[12] !== t4 || $[13] !== t5 || $[14] !== t8) {
58
+ t9 = /* @__PURE__ */ jsxs("footer", {
59
+ className: t4,
60
+ children: [t5, t8]
61
+ });
62
+ $[12] = t4;
63
+ $[13] = t5;
64
+ $[14] = t8;
65
+ $[15] = t9;
66
+ } else t9 = $[15];
67
+ return t9;
25
68
  };
69
+ function _temp($) {
70
+ return $.ui.datePicker.today;
71
+ }
72
+ function _temp2($_0) {
73
+ return $_0.ui.datePicker.save;
74
+ }
26
75
  //#endregion
27
76
  export { DateTimeDialogFooter };
@@ -18,7 +18,7 @@ import { Controller } from "react-hook-form";
18
18
  //#region src/components/inputs/File/FileUpload.tsx
19
19
  var FileUploadBase = (props) => {
20
20
  const { t } = useTranslation("ui");
21
- const { ref: _ref, label, tooltipText, variant = "vertical", as = "button", helperText, isRequired, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, allowsMultiple = false, hideLabel, acceptedFileTypes, clearOnSuccess, emptyText = t(($) => $.ui.fileUpload.emptyText), uploadText = t(($) => $.ui.fileUpload.uploadText), browseText = t(($) => $.ui.fileUpload.browse), fileUpload, fileRemove, children, listRenderer, browseButtonProps, cancelButtonProps, onInvalidFileType, defaultState, ...rest } = props;
21
+ const { ref: _ref, label, tooltipText, variant = "vertical", as = "button", helperText, isRequired, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, allowsMultiple = false, hideLabel, acceptedFileTypes, clearOnSuccess, emptyText = t(($) => $.ui.fileUpload.emptyText), uploadText = t(($_0) => $_0.ui.fileUpload.uploadText), browseText = t(($_1) => $_1.ui.fileUpload.browse), fileUpload, fileRemove, children, listRenderer, browseButtonProps, cancelButtonProps, onInvalidFileType, defaultState, ...rest } = props;
22
22
  const ui = UIConfig.useConfig();
23
23
  const fileUploadDropZoneCva = UIOverrides.useCva("fileUpload.dropZoneCva", fileUploadDropZoneDefinition);
24
24
  const getInitialState = () => {