@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
@@ -38,101 +38,403 @@ var extensions = [
38
38
  defaultProtocol: "https"
39
39
  })
40
40
  ];
41
- var TextEditorBase = ({ ref, as = "default", placeholder, label, hideLabel, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, value, className, editorClassName, isDirty, onChange, onBlur }) => {
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;
42
45
  const contentRef = useRef(null);
43
- const { hoverProps, isHovered } = useHover({ isDisabled });
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);
44
53
  const [isFocused, setIsFocused] = useState(false);
45
- const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocused });
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);
46
60
  const { isFocusVisible } = useFocusVisible();
47
61
  const inputSideCva = UIOverrides.useCva("input.sideCva", inputSideDefinition);
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) => {
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) => {
66
127
  onChange?.({
67
128
  json: event.editor.getJSON(),
68
129
  html: event.editor.getHTML()
69
130
  });
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
- });
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;
136
438
  };
137
439
  var TextEditor = (props) => {
138
440
  const $ = c(15);
@@ -1,34 +1,81 @@
1
1
  import { UIOverrides } from "../../../config/uiOverrides.context.js";
2
2
  import { accordionDefinition } from "./accordion.cva.js";
3
3
  import { AccordionItem } from "./AccordionItem.js";
4
+ import { c } from "react/compiler-runtime";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  import { clsx } from "clsx";
6
7
  import { DisclosureGroup } from "react-aria-components";
7
8
  //#region src/components/navigation/Accordion/Accordion.tsx
8
- var Accordion = ({ items, variant = "filled", actionPosition = "right", allowsMultipleExpanded = false, expandedKeys, defaultExpandedKeys, onExpandedChange, className, disabled }) => {
9
- return /* @__PURE__ */ jsx(DisclosureGroup, {
10
- allowsMultipleExpanded,
11
- expandedKeys,
12
- defaultExpandedKeys,
13
- onExpandedChange,
14
- className: clsx(UIOverrides.useCva("accordion.cva", accordionDefinition)({
9
+ var Accordion = (t0) => {
10
+ const $ = c(23);
11
+ const { items, variant: t1, actionPosition: t2, allowsMultipleExpanded: t3, expandedKeys, defaultExpandedKeys, onExpandedChange, className, disabled } = t0;
12
+ const variant = t1 === void 0 ? "filled" : t1;
13
+ const actionPosition = t2 === void 0 ? "right" : t2;
14
+ const allowsMultipleExpanded = t3 === void 0 ? false : t3;
15
+ const accordionCva = UIOverrides.useCva("accordion.cva", accordionDefinition);
16
+ const t4 = items.length === 1;
17
+ let t5;
18
+ if ($[0] !== accordionCva || $[1] !== className || $[2] !== t4 || $[3] !== variant) {
19
+ t5 = clsx(accordionCva({
15
20
  className,
16
21
  variant,
17
- singleItem: items.length === 1
18
- })),
19
- isDisabled: disabled,
20
- children: items.map((item) => /* @__PURE__ */ jsx(AccordionItem, {
21
- id: item.id,
22
- heading: item.heading,
23
- subheading: item.subheading,
24
- icon: item.icon,
25
- variant,
26
- actionPosition,
27
- disabled: item.disabled || disabled,
28
- isSingle: items.length === 1,
29
- children: item.children
30
- }, item.id))
31
- });
22
+ singleItem: t4
23
+ }));
24
+ $[0] = accordionCva;
25
+ $[1] = className;
26
+ $[2] = t4;
27
+ $[3] = variant;
28
+ $[4] = t5;
29
+ } else t5 = $[4];
30
+ let t6;
31
+ if ($[5] !== actionPosition || $[6] !== disabled || $[7] !== items || $[8] !== variant) {
32
+ let t7;
33
+ if ($[10] !== actionPosition || $[11] !== disabled || $[12] !== items.length || $[13] !== variant) {
34
+ t7 = (item) => /* @__PURE__ */ jsx(AccordionItem, {
35
+ id: item.id,
36
+ heading: item.heading,
37
+ subheading: item.subheading,
38
+ icon: item.icon,
39
+ variant,
40
+ actionPosition,
41
+ disabled: item.disabled || disabled,
42
+ isSingle: items.length === 1,
43
+ children: item.children
44
+ }, item.id);
45
+ $[10] = actionPosition;
46
+ $[11] = disabled;
47
+ $[12] = items.length;
48
+ $[13] = variant;
49
+ $[14] = t7;
50
+ } else t7 = $[14];
51
+ t6 = items.map(t7);
52
+ $[5] = actionPosition;
53
+ $[6] = disabled;
54
+ $[7] = items;
55
+ $[8] = variant;
56
+ $[9] = t6;
57
+ } else t6 = $[9];
58
+ let t7;
59
+ if ($[15] !== allowsMultipleExpanded || $[16] !== defaultExpandedKeys || $[17] !== disabled || $[18] !== expandedKeys || $[19] !== onExpandedChange || $[20] !== t5 || $[21] !== t6) {
60
+ t7 = /* @__PURE__ */ jsx(DisclosureGroup, {
61
+ allowsMultipleExpanded,
62
+ expandedKeys,
63
+ defaultExpandedKeys,
64
+ onExpandedChange,
65
+ className: t5,
66
+ isDisabled: disabled,
67
+ children: t6
68
+ });
69
+ $[15] = allowsMultipleExpanded;
70
+ $[16] = defaultExpandedKeys;
71
+ $[17] = disabled;
72
+ $[18] = expandedKeys;
73
+ $[19] = onExpandedChange;
74
+ $[20] = t5;
75
+ $[21] = t6;
76
+ $[22] = t7;
77
+ } else t7 = $[22];
78
+ return t7;
32
79
  };
33
80
  //#endregion
34
81
  export { Accordion };