@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
@@ -38,403 +38,101 @@ var extensions = [
38
38
  defaultProtocol: "https"
39
39
  })
40
40
  ];
41
- var TextEditorBase = (t0) => {
42
- const $ = c(132);
43
- const { ref, as: t1, placeholder, label, hideLabel, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, value, className, editorClassName, isDirty, onChange, onBlur } = t0;
44
- const as = t1 === void 0 ? "default" : t1;
41
+ var TextEditorBase = ({ ref, as = "default", placeholder, label, hideLabel, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, value, className, editorClassName, isDirty, onChange, onBlur }) => {
45
42
  const contentRef = useRef(null);
46
- let t2;
47
- if ($[0] !== isDisabled) {
48
- t2 = { isDisabled };
49
- $[0] = isDisabled;
50
- $[1] = t2;
51
- } else t2 = $[1];
52
- const { hoverProps, isHovered } = useHover(t2);
43
+ const { hoverProps, isHovered } = useHover({ isDisabled });
53
44
  const [isFocused, setIsFocused] = useState(false);
54
- let t3;
55
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
56
- t3 = { onFocusWithinChange: setIsFocused };
57
- $[2] = t3;
58
- } else t3 = $[2];
59
- const { focusWithinProps } = useFocusWithin(t3);
45
+ const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocused });
60
46
  const { isFocusVisible } = useFocusVisible();
61
47
  const inputSideCva = UIOverrides.useCva("input.sideCva", inputSideDefinition);
62
- const t4 = isHeaderHidden || as === "filter" || as === "floating";
63
- let t5;
64
- if ($[3] !== error || $[4] !== errorClassName || $[5] !== headerClassName || $[6] !== helperText || $[7] !== hideLabel || $[8] !== isDisabled || $[9] !== isRequired || $[10] !== label || $[11] !== rightContent || $[12] !== t4 || $[13] !== tooltipText) {
65
- t5 = {
66
- error,
67
- label,
68
- tooltipText,
69
- helperText,
70
- isRequired,
71
- rightContent,
72
- isHeaderHidden: t4,
73
- hideLabel,
74
- isDisabled,
75
- headerClassName,
76
- errorClassName
77
- };
78
- $[3] = error;
79
- $[4] = errorClassName;
80
- $[5] = headerClassName;
81
- $[6] = helperText;
82
- $[7] = hideLabel;
83
- $[8] = isDisabled;
84
- $[9] = isRequired;
85
- $[10] = label;
86
- $[11] = rightContent;
87
- $[12] = t4;
88
- $[13] = tooltipText;
89
- $[14] = t5;
90
- } else t5 = $[14];
91
- const formFieldProps = t5;
92
- let t6;
93
- if ($[15] !== label) {
94
- t6 = { label };
95
- $[15] = label;
96
- $[16] = t6;
97
- } else t6 = $[16];
98
- const { labelProps, fieldProps } = useLabel(t6);
99
- let t7;
100
- if ($[17] !== as || $[18] !== placeholder) {
101
- t7 = Placeholder.configure({ placeholder: as === "floating" ? "" : placeholder });
102
- $[17] = as;
103
- $[18] = placeholder;
104
- $[19] = t7;
105
- } else t7 = $[19];
106
- let t8;
107
- if ($[20] !== t7) {
108
- t8 = [...extensions, t7];
109
- $[20] = t7;
110
- $[21] = t8;
111
- } else t8 = $[21];
112
- let t9;
113
- if ($[22] !== editorClassName) {
114
- t9 = clsx("min-h-40 rounded-b-sm p-2 outline-none", editorClassName);
115
- $[22] = editorClassName;
116
- $[23] = t9;
117
- } else t9 = $[23];
118
- let t10;
119
- if ($[24] !== t9) {
120
- t10 = { attributes: { class: t9 } };
121
- $[24] = t9;
122
- $[25] = t10;
123
- } else t10 = $[25];
124
- let t11;
125
- if ($[26] !== onChange) {
126
- t11 = (event) => {
48
+ const formFieldProps = {
49
+ error,
50
+ label,
51
+ tooltipText,
52
+ helperText,
53
+ isRequired,
54
+ rightContent,
55
+ isHeaderHidden: isHeaderHidden || as === "filter" || as === "floating",
56
+ hideLabel,
57
+ isDisabled,
58
+ headerClassName,
59
+ errorClassName
60
+ };
61
+ const { labelProps, fieldProps } = useLabel({ label });
62
+ const editor = useEditor({
63
+ extensions: [...extensions, Placeholder.configure({ placeholder: as === "floating" ? "" : placeholder })],
64
+ editorProps: { attributes: { class: clsx("min-h-40 rounded-b-sm p-2 outline-none", editorClassName) } },
65
+ onUpdate: (event) => {
127
66
  onChange?.({
128
67
  json: event.editor.getJSON(),
129
68
  html: event.editor.getHTML()
130
69
  });
131
- };
132
- $[26] = onChange;
133
- $[27] = t11;
134
- } else t11 = $[27];
135
- const t12 = !isDisabled;
136
- let t13;
137
- if ($[28] !== onBlur || $[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t8) {
138
- t13 = {
139
- extensions: t8,
140
- editorProps: t10,
141
- onUpdate: t11,
142
- immediatelyRender: false,
143
- editable: t12,
144
- onBlur
145
- };
146
- $[28] = onBlur;
147
- $[29] = t10;
148
- $[30] = t11;
149
- $[31] = t12;
150
- $[32] = t8;
151
- $[33] = t13;
152
- } else t13 = $[33];
153
- let t14;
154
- if ($[34] !== editorClassName || $[35] !== isDisabled) {
155
- t14 = [isDisabled, editorClassName];
156
- $[34] = editorClassName;
157
- $[35] = isDisabled;
158
- $[36] = t14;
159
- } else t14 = $[36];
160
- const editor = useEditor(t13, t14);
161
- let t15;
162
- if ($[37] !== editor || $[38] !== value?.json) {
163
- t15 = () => {
164
- const content = value?.json ?? null;
165
- if (editor) {
166
- if (!isEqual(content, editor.getJSON())) editor.commands.setContent(content);
167
- } else if (!isEqual(content, contentRef.current)) contentRef.current = content ?? null;
168
- };
169
- $[37] = editor;
170
- $[38] = value?.json;
171
- $[39] = t15;
172
- } else t15 = $[39];
173
- let t16;
174
- if ($[40] !== value) {
175
- t16 = [value];
176
- $[40] = value;
177
- $[41] = t16;
178
- } else t16 = $[41];
179
- useEffect(t15, t16);
180
- let t17;
181
- let t18;
182
- if ($[42] !== editor) {
183
- t17 = () => {
184
- if (editor && contentRef.current) {
185
- editor.commands.setContent(contentRef.current);
186
- contentRef.current = null;
187
- }
188
- };
189
- t18 = [editor];
190
- $[42] = editor;
191
- $[43] = t17;
192
- $[44] = t18;
193
- } else {
194
- t17 = $[43];
195
- t18 = $[44];
196
- }
197
- useEffect(t17, t18);
198
- const t19 = hideLabel || isHeaderHidden;
199
- let T0;
200
- let t20;
201
- let t21;
202
- let t22;
203
- let t23;
204
- let t24;
205
- let t25;
206
- let t26;
207
- let t27;
208
- let t28;
209
- let t29;
210
- let t30;
211
- let t31;
212
- let t32;
213
- let t33;
214
- let t34;
215
- let t35;
216
- let t36;
217
- let t37;
218
- let t38;
219
- let t39;
220
- let t40;
221
- let t41;
222
- if ($[45] !== as || $[46] !== className || $[47] !== editor || $[48] !== fieldProps || $[49] !== focusWithinProps || $[50] !== formFieldProps || $[51] !== headerClassName || $[52] !== helperText || $[53] !== hoverProps || $[54] !== inputSideCva || $[55] !== isDirty || $[56] !== isDisabled || $[57] !== isFocusVisible || $[58] !== isFocused || $[59] !== isHovered || $[60] !== isRequired || $[61] !== label || $[62] !== labelProps || $[63] !== ref || $[64] !== rightContent || $[65] !== t19 || $[66] !== tooltipText) {
223
- const headerProps = {
224
- label,
225
- tooltipText,
226
- helperText,
227
- isRequired,
228
- rightContent,
229
- isHeaderHidden: t19,
230
- isDisabled,
231
- className: headerClassName,
232
- labelProps
233
- };
234
- T0 = FormField;
235
- t37 = formFieldProps;
236
- t38 = ref;
237
- t39 = as;
238
- t40 = labelProps;
239
- if ($[90] !== className) {
240
- t41 = clsx("group w-full", className);
241
- $[90] = className;
242
- $[91] = t41;
243
- } else t41 = $[91];
244
- if ($[92] === Symbol.for("react.memo_cache_sentinel")) {
245
- t22 = clsx("group/text-editor relative", "h-full w-full rounded-sm border border-elevation-outline-default-2 border-solid bg-elevation-fill-default-1", uiOutlineClass, "focus-within:border focus-within:border-input-outlined-outline-active", "focus-visible:outline-interactive-contained-primary-focus", "hover:border hover:border-input-outlined-outline-hover");
246
- $[92] = t22;
247
- } else t22 = $[92];
248
- t23 = true;
249
- t24 = "";
250
- t25 = isHovered || void 0;
251
- t26 = isDisabled || void 0;
252
- t27 = isDisabled || void 0;
253
- t28 = isFocused || void 0;
254
- t29 = isFocused && isFocusVisible || void 0;
255
- t30 = !editor?.isEmpty;
256
- t31 = isRequired || void 0;
257
- t32 = isDirty || void 0;
258
- t33 = hoverProps;
259
- t34 = focusWithinProps;
260
- t35 = fieldProps;
261
- if ($[93] !== editor) {
262
- t36 = /* @__PURE__ */ jsx(TextEditorToolbar, { editor });
263
- $[93] = editor;
264
- $[94] = t36;
265
- } else t36 = $[94];
266
- const t42 = as === "floating" && "pt-3";
267
- if ($[95] !== t42) {
268
- t20 = clsx("relative overflow-auto", t42);
269
- $[95] = t42;
270
- $[96] = t20;
271
- } else t20 = $[96];
272
- t21 = as === "floating" && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
273
- as,
274
- ...headerProps,
275
- className: clsx(headerProps.className, inputSideCva({
276
- size: "default",
277
- type: "left"
278
- }))
279
- });
280
- $[45] = as;
281
- $[46] = className;
282
- $[47] = editor;
283
- $[48] = fieldProps;
284
- $[49] = focusWithinProps;
285
- $[50] = formFieldProps;
286
- $[51] = headerClassName;
287
- $[52] = helperText;
288
- $[53] = hoverProps;
289
- $[54] = inputSideCva;
290
- $[55] = isDirty;
291
- $[56] = isDisabled;
292
- $[57] = isFocusVisible;
293
- $[58] = isFocused;
294
- $[59] = isHovered;
295
- $[60] = isRequired;
296
- $[61] = label;
297
- $[62] = labelProps;
298
- $[63] = ref;
299
- $[64] = rightContent;
300
- $[65] = t19;
301
- $[66] = tooltipText;
302
- $[67] = T0;
303
- $[68] = t20;
304
- $[69] = t21;
305
- $[70] = t22;
306
- $[71] = t23;
307
- $[72] = t24;
308
- $[73] = t25;
309
- $[74] = t26;
310
- $[75] = t27;
311
- $[76] = t28;
312
- $[77] = t29;
313
- $[78] = t30;
314
- $[79] = t31;
315
- $[80] = t32;
316
- $[81] = t33;
317
- $[82] = t34;
318
- $[83] = t35;
319
- $[84] = t36;
320
- $[85] = t37;
321
- $[86] = t38;
322
- $[87] = t39;
323
- $[88] = t40;
324
- $[89] = t41;
325
- } else {
326
- T0 = $[67];
327
- t20 = $[68];
328
- t21 = $[69];
329
- t22 = $[70];
330
- t23 = $[71];
331
- t24 = $[72];
332
- t25 = $[73];
333
- t26 = $[74];
334
- t27 = $[75];
335
- t28 = $[76];
336
- t29 = $[77];
337
- t30 = $[78];
338
- t31 = $[79];
339
- t32 = $[80];
340
- t33 = $[81];
341
- t34 = $[82];
342
- t35 = $[83];
343
- t36 = $[84];
344
- t37 = $[85];
345
- t38 = $[86];
346
- t39 = $[87];
347
- t40 = $[88];
348
- t41 = $[89];
349
- }
350
- const t42 = as === "floating" ? "" : placeholder;
351
- const t43 = as === "floating" && editor?.isEmpty && "[&_p:before]:opacity-0";
352
- let t44;
353
- if ($[97] !== t43) {
354
- t44 = clsx(t43);
355
- $[97] = t43;
356
- $[98] = t44;
357
- } else t44 = $[98];
358
- let t45;
359
- if ($[99] !== editor || $[100] !== t42 || $[101] !== t44) {
360
- t45 = /* @__PURE__ */ jsx(EditorContent, {
361
- editor,
362
- placeholder: t42,
363
- className: t44
364
- });
365
- $[99] = editor;
366
- $[100] = t42;
367
- $[101] = t44;
368
- $[102] = t45;
369
- } else t45 = $[102];
370
- let t46;
371
- if ($[103] !== t20 || $[104] !== t21 || $[105] !== t45) {
372
- t46 = /* @__PURE__ */ jsxs("div", {
373
- className: t20,
374
- children: [t21, t45]
375
- });
376
- $[103] = t20;
377
- $[104] = t21;
378
- $[105] = t45;
379
- $[106] = t46;
380
- } else t46 = $[106];
381
- let t47;
382
- if ($[107] !== t22 || $[108] !== t23 || $[109] !== t24 || $[110] !== t25 || $[111] !== t26 || $[112] !== t27 || $[113] !== t28 || $[114] !== t29 || $[115] !== t30 || $[116] !== t31 || $[117] !== t32 || $[118] !== t33 || $[119] !== t34 || $[120] !== t35 || $[121] !== t36 || $[122] !== t46) {
383
- t47 = /* @__PURE__ */ jsxs("div", {
384
- className: t22,
385
- "data-text-editor": t23,
386
- "data-rac": t24,
387
- "data-hovered": t25,
388
- "data-disabled": t26,
389
- "data-is-disabled": t27,
390
- "data-focus-within": t28,
391
- "data-focus-visible": t29,
392
- "data-is-filled": t30,
393
- "data-is-required": t31,
394
- "data-is-dirty": t32,
395
- ...t33,
396
- ...t34,
397
- ...t35,
398
- children: [t36, t46]
399
- });
400
- $[107] = t22;
401
- $[108] = t23;
402
- $[109] = t24;
403
- $[110] = t25;
404
- $[111] = t26;
405
- $[112] = t27;
406
- $[113] = t28;
407
- $[114] = t29;
408
- $[115] = t30;
409
- $[116] = t31;
410
- $[117] = t32;
411
- $[118] = t33;
412
- $[119] = t34;
413
- $[120] = t35;
414
- $[121] = t36;
415
- $[122] = t46;
416
- $[123] = t47;
417
- } else t47 = $[123];
418
- let t48;
419
- if ($[124] !== T0 || $[125] !== t37 || $[126] !== t38 || $[127] !== t39 || $[128] !== t40 || $[129] !== t41 || $[130] !== t47) {
420
- t48 = /* @__PURE__ */ jsx(T0, {
421
- ...t37,
422
- ref: t38,
423
- as: t39,
424
- labelProps: t40,
425
- className: t41,
426
- children: t47
427
- });
428
- $[124] = T0;
429
- $[125] = t37;
430
- $[126] = t38;
431
- $[127] = t39;
432
- $[128] = t40;
433
- $[129] = t41;
434
- $[130] = t47;
435
- $[131] = t48;
436
- } else t48 = $[131];
437
- return t48;
70
+ },
71
+ immediatelyRender: false,
72
+ editable: !isDisabled,
73
+ onBlur
74
+ }, [isDisabled, editorClassName]);
75
+ useEffect(() => {
76
+ const content = value?.json ?? null;
77
+ if (editor) {
78
+ if (!isEqual(content, editor.getJSON())) editor.commands.setContent(content);
79
+ } else if (!isEqual(content, contentRef.current)) contentRef.current = content ?? null;
80
+ }, [value]);
81
+ useEffect(() => {
82
+ if (editor && contentRef.current) {
83
+ editor.commands.setContent(contentRef.current);
84
+ contentRef.current = null;
85
+ }
86
+ }, [editor]);
87
+ const headerProps = {
88
+ label,
89
+ tooltipText,
90
+ helperText,
91
+ isRequired,
92
+ rightContent,
93
+ isHeaderHidden: hideLabel || isHeaderHidden,
94
+ isDisabled,
95
+ className: headerClassName,
96
+ labelProps
97
+ };
98
+ return /* @__PURE__ */ jsx(FormField, {
99
+ ...formFieldProps,
100
+ ref,
101
+ as,
102
+ labelProps,
103
+ className: clsx("group w-full", className),
104
+ children: /* @__PURE__ */ jsxs("div", {
105
+ className: clsx("group/text-editor relative", "h-full w-full rounded-sm border border-elevation-outline-default-2 border-solid bg-elevation-fill-default-1", uiOutlineClass, "focus-within:border focus-within:border-input-outlined-outline-active", "focus-visible:outline-interactive-contained-primary-focus", "hover:border hover:border-input-outlined-outline-hover"),
106
+ "data-text-editor": true,
107
+ "data-rac": "",
108
+ "data-hovered": isHovered || void 0,
109
+ "data-disabled": isDisabled || void 0,
110
+ "data-is-disabled": isDisabled || void 0,
111
+ "data-focus-within": isFocused || void 0,
112
+ "data-focus-visible": isFocused && isFocusVisible || void 0,
113
+ "data-is-filled": !editor?.isEmpty,
114
+ "data-is-required": isRequired || void 0,
115
+ "data-is-dirty": isDirty || void 0,
116
+ ...hoverProps,
117
+ ...focusWithinProps,
118
+ ...fieldProps,
119
+ children: [/* @__PURE__ */ jsx(TextEditorToolbar, { editor }), /* @__PURE__ */ jsxs("div", {
120
+ className: clsx("relative overflow-auto", as === "floating" && "pt-3"),
121
+ children: [as === "floating" && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
122
+ as,
123
+ ...headerProps,
124
+ className: clsx(headerProps.className, inputSideCva({
125
+ size: "default",
126
+ type: "left"
127
+ }))
128
+ }), /* @__PURE__ */ jsx(EditorContent, {
129
+ editor,
130
+ placeholder: as === "floating" ? "" : placeholder,
131
+ className: clsx(as === "floating" && editor?.isEmpty && "[&_p:before]:opacity-0")
132
+ })]
133
+ })]
134
+ })
135
+ });
438
136
  };
439
137
  var TextEditor = (props) => {
440
138
  const $ = c(15);
@@ -1,7 +1,5 @@
1
1
  import { CloseIcon } from "../../../assets/icons/Close.js";
2
- import { UIOverrides } from "../../../config/uiOverrides.context.js";
3
2
  import { UIConfig } from "../../../config/uiConfig.context.js";
4
- import { buttonIconSizeDefinition } from "../../buttons/Button/button.cva.js";
5
3
  import { InlineIconButton } from "../../buttons/InlineIconButton/InlineIconButton.js";
6
4
  import "../../../config/i18n.js";
7
5
  import { c } from "react/compiler-runtime";
@@ -10,70 +8,56 @@ import { clsx } from "clsx";
10
8
  import { useTranslation } from "react-i18next";
11
9
  //#region src/components/inputs/shared/InputClear.tsx
12
10
  var InputClear = (t0) => {
13
- const $ = c(16);
11
+ const $ = c(12);
14
12
  const { onClear, className, style, show, renderStatic } = t0;
15
- const ui = UIConfig.useConfig();
16
- const buttonIconSizeCva = UIOverrides.useCva("button.iconSize", buttonIconSizeDefinition);
17
- const alwaysShowClear = ui.input.alwaysShowClear;
13
+ const alwaysShowClear = UIConfig.useConfig().input.alwaysShowClear;
18
14
  let clearClassName;
19
15
  let t1;
20
- if ($[0] !== alwaysShowClear || $[1] !== buttonIconSizeCva || $[2] !== className || $[3] !== renderStatic || $[4] !== show || $[5] !== style) {
16
+ if ($[0] !== alwaysShowClear || $[1] !== className || $[2] !== renderStatic || $[3] !== show || $[4] !== style) {
21
17
  t1 = Symbol.for("react.early_return_sentinel");
22
18
  bb0: {
23
19
  clearClassName = clsx("relative z-raised flex items-center", !alwaysShowClear && "md:invisible group-focus-within:visible group-hover/date-picker-content:visible group-hover/select-content:visible group-hover/text-area:visible group-hover:visible", "border-0!", !show && "invisible!", className);
24
20
  if (renderStatic) {
25
- const t2 = clsx("group inline-flex items-center justify-center border border-solid border-support-transparent-outline", "rounded-button-rounding-s p-0 text-interactive-text-secondary-idle", clearClassName);
26
- let t3;
27
- if ($[8] !== buttonIconSizeCva) {
28
- t3 = buttonIconSizeCva({
29
- size: "none",
30
- className: "shrink-0"
31
- });
32
- $[8] = buttonIconSizeCva;
33
- $[9] = t3;
34
- } else t3 = $[9];
35
- let t4;
36
- if ($[10] !== t3) {
37
- t4 = /* @__PURE__ */ jsx(CloseIcon, { className: t3 });
38
- $[10] = t3;
39
- $[11] = t4;
40
- } else t4 = $[11];
21
+ let t2;
22
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
23
+ t2 = /* @__PURE__ */ jsx(CloseIcon, { className: "h-6 w-6 shrink-0" });
24
+ $[7] = t2;
25
+ } else t2 = $[7];
41
26
  t1 = /* @__PURE__ */ jsx("button", {
42
27
  type: "button",
43
28
  "aria-hidden": "true",
44
29
  tabIndex: -1,
45
- className: t2,
30
+ className: clsx("group inline-flex items-center justify-center border border-solid border-support-transparent-outline", "rounded-button-rounding-s p-0 text-interactive-text-secondary-idle", clearClassName),
46
31
  style,
47
- children: t4
32
+ children: t2
48
33
  });
49
34
  break bb0;
50
35
  }
51
36
  }
52
37
  $[0] = alwaysShowClear;
53
- $[1] = buttonIconSizeCva;
54
- $[2] = className;
55
- $[3] = renderStatic;
56
- $[4] = show;
57
- $[5] = style;
58
- $[6] = clearClassName;
59
- $[7] = t1;
38
+ $[1] = className;
39
+ $[2] = renderStatic;
40
+ $[3] = show;
41
+ $[4] = style;
42
+ $[5] = clearClassName;
43
+ $[6] = t1;
60
44
  } else {
61
- clearClassName = $[6];
62
- t1 = $[7];
45
+ clearClassName = $[5];
46
+ t1 = $[6];
63
47
  }
64
48
  if (t1 !== Symbol.for("react.early_return_sentinel")) return t1;
65
49
  let t2;
66
- if ($[12] !== clearClassName || $[13] !== onClear || $[14] !== style) {
50
+ if ($[8] !== clearClassName || $[9] !== onClear || $[10] !== style) {
67
51
  t2 = /* @__PURE__ */ jsx(InputClearButton, {
68
52
  onClear,
69
53
  className: clearClassName,
70
54
  style
71
55
  });
72
- $[12] = clearClassName;
73
- $[13] = onClear;
74
- $[14] = style;
75
- $[15] = t2;
76
- } else t2 = $[15];
56
+ $[8] = clearClassName;
57
+ $[9] = onClear;
58
+ $[10] = style;
59
+ $[11] = t2;
60
+ } else t2 = $[11];
77
61
  return t2;
78
62
  };
79
63
  var InputClearButton = (t0) => {