@povio/ui 3.3.0-rc.4 → 3.3.0

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 (63) hide show
  1. package/README.md +15 -1
  2. package/dist/components/Breadcrumbs/Breadcrumbs.js +55 -206
  3. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
  4. package/dist/components/buttons/shared/ButtonContent.js +22 -80
  5. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
  6. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +93 -227
  7. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +84 -202
  8. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +60 -132
  9. package/dist/components/inputs/DateTime/shared/Calendar.js +139 -339
  10. package/dist/components/inputs/DateTime/shared/CalendarCell.js +114 -308
  11. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +35 -150
  12. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +95 -229
  13. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +115 -296
  14. package/dist/components/inputs/DateTime/shared/DateField.js +135 -306
  15. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +140 -338
  16. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
  17. package/dist/components/inputs/File/FileUpload.js +1 -1
  18. package/dist/components/inputs/File/InputUpload.js +65 -261
  19. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +48 -180
  20. package/dist/components/inputs/File/shared/FileUploadContentError.js +95 -265
  21. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +99 -261
  22. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +56 -234
  23. package/dist/components/inputs/File/shared/ProgressBar.js +15 -102
  24. package/dist/components/inputs/FormField/FormField.js +34 -47
  25. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +75 -313
  26. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +23 -83
  27. package/dist/components/inputs/Selection/Select/QuerySelect.js +30 -96
  28. package/dist/components/inputs/Selection/Select/Select.js +3 -3
  29. package/dist/components/inputs/Selection/shared/SelectInput.js +1 -0
  30. package/dist/components/inputs/Selection/shared/SelectListBox.js +51 -163
  31. package/dist/components/inputs/Selection/shared/useSelectItems.js +48 -108
  32. package/dist/components/inputs/Skeleton/InputFrame.js +177 -552
  33. package/dist/components/inputs/TextEditor/TextEditor.js +87 -389
  34. package/dist/components/inputs/shared/InputClear.js +24 -40
  35. package/dist/components/navigation/Accordion/Accordion.js +22 -69
  36. package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
  37. package/dist/components/navigation/Stepper/Stepper.js +22 -67
  38. package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
  39. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +29 -110
  40. package/dist/components/shared/pagination/Pagination.js +22 -108
  41. package/dist/components/status/Alert/Alert.js +30 -97
  42. package/dist/components/table/InfiniteTable.js +16 -67
  43. package/dist/components/table/Table.d.ts +2 -8
  44. package/dist/components/table/Table.js +33 -55
  45. package/dist/components/text/Typography/Typography.js +8 -23
  46. package/dist/config/confirmation.context.js +1 -1
  47. package/dist/config/theme.context.js +45 -98
  48. package/dist/config/uiConfig.context.js +8 -39
  49. package/dist/config/uiOverrides.context.d.ts +0 -1
  50. package/dist/hooks/useDebounceCallback.js +17 -51
  51. package/dist/hooks/useFormAutosave.js +33 -120
  52. package/dist/hooks/useLongPressRepeat.js +20 -55
  53. package/dist/index.d.ts +0 -1
  54. package/dist/index.js +1 -2
  55. package/package.json +2 -2
  56. package/dist/components/inputs/FormField/formField.cva.d.ts +0 -11
  57. package/dist/components/inputs/FormField/formField.cva.js +0 -16
  58. package/dist/components/table/TableColumnFilterInput.d.ts +0 -9
  59. package/dist/components/table/TableColumnFilterInput.js +0 -108
  60. package/dist/components/table/TableColumnFilterPlaceholder.d.ts +0 -5
  61. package/dist/components/table/TableColumnFilterPlaceholder.js +0 -41
  62. package/dist/components/table/TableColumnFilterRow.d.ts +0 -16
  63. package/dist/components/table/TableColumnFilterRow.js +0 -68
@@ -10,22 +10,14 @@ 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";
14
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
14
  import { clsx } from "clsx";
16
- import { useImperativeHandle, useRef, useState } from "react";
15
+ import { useCallback, useImperativeHandle, useRef, useState } from "react";
17
16
  import { Button } from "react-aria-components";
18
17
  import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
19
18
  import { getLocalTimeZone, today } from "@internationalized/date";
20
19
  //#region src/components/inputs/DateTime/shared/DatePickerInput.tsx
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;
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 }) => {
29
21
  const uiConfig = UIConfig.useConfig();
30
22
  const timeZone = timeZoneProp ?? uiConfig.dateInput.timeZone;
31
23
  let effectiveTimeZone = getLocalTimeZone();
@@ -34,107 +26,56 @@ var DatePickerInput = (t0) => {
34
26
  const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
35
27
  const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
36
28
  const [canClear, setCanClear] = useState(false);
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);
29
+ const { hoverProps, isHovered } = useHover({ isDisabled });
44
30
  const [isFocused, setIsFocused] = useState(false);
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);
31
+ const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: (isFocusWithin) => {
32
+ setIsFocused(isFocusWithin);
33
+ if (!isFocusWithin && autoFixYear) {
34
+ dateFieldRef.current?.autoFixYear();
35
+ endDateFieldRef.current?.autoFixYear();
36
+ }
37
+ } });
58
38
  const { isFocusVisible } = useFocusVisible();
59
39
  const dateFieldRef = useRef(null);
60
40
  const endDateFieldRef = useRef(null);
61
41
  const containerRef = useRef(null);
62
42
  useFirefoxDateSegmentSelectionGuard(containerRef);
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
- }
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);
104
63
  }
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;
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
+ }, []);
138
79
  const showClear = canClear || hasValue || normalizedFieldProps.value != null || normalizedEndFieldProps?.value != null;
139
80
  const isTodayIconDisabled = isDisabled || buttonProps.isDisabled;
140
81
  const onToday = () => {
@@ -161,243 +102,104 @@ var DatePickerInput = (t0) => {
161
102
  });
162
103
  const shouldRenderTodayIconWithFieldLabel = todayIconPlacement === "fieldLabel";
163
104
  const pickerIcon = isDateTime ? uiConfig.dateInput.dateTimeIcon : uiConfig.dateInput.calendarIcon;
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, {
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,
196
112
  as,
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,
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
+ })),
279
133
  children: [
280
- t32,
281
- t33,
282
- t34
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
+ })
283
183
  ]
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;
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
+ });
401
203
  };
402
204
  //#endregion
403
205
  export { DatePickerInput };
@@ -1,76 +1,27 @@
1
1
  import "../../../../config/i18n.js";
2
2
  import { TextButton } from "../../../buttons/TextButton/TextButton.js";
3
- import { c } from "react/compiler-runtime";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
5
4
  import { clsx } from "clsx";
6
5
  import { useTranslation } from "react-i18next";
7
6
  //#region src/components/inputs/DateTime/shared/DateTimeDialogFooter.tsx
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;
7
+ var DateTimeDialogFooter = ({ isValid = true, isDisabled = false, onTodayPress, onApply }) => {
13
8
  const { t } = useTranslation("ui");
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, {
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, {
24
12
  type: "button",
25
13
  color: "primary",
26
14
  isDisabled,
27
15
  onPress: onTodayPress,
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, {
16
+ children: t(($) => $.ui.datePicker.today)
17
+ }), /* @__PURE__ */ jsx(TextButton, {
45
18
  type: "button",
46
19
  color: "secondary",
47
20
  onPress: onApply,
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;
21
+ isDisabled: !isValid,
22
+ children: t(($_0) => $_0.ui.datePicker.save)
23
+ })]
24
+ });
68
25
  };
69
- function _temp($) {
70
- return $.ui.datePicker.today;
71
- }
72
- function _temp2($_0) {
73
- return $_0.ui.datePicker.save;
74
- }
75
26
  //#endregion
76
27
  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(($_0) => $_0.ui.fileUpload.uploadText), browseText = t(($_1) => $_1.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(($) => $.ui.fileUpload.uploadText), browseText = t(($) => $.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 = () => {