@pismo/marola 2.1.64 → 2.1.65

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 (112) hide show
  1. package/dist/Button-CJaBSdv1.js +135 -0
  2. package/dist/ClassNameConfigurator-CVRWfyIa.js +847 -0
  3. package/dist/{ClickAwayListener-Z08peX_P.js → ClickAwayListener-BnYMO5Ki.js} +26 -33
  4. package/dist/Popup-D267EI4e.js +1338 -0
  5. package/dist/{Portal-DJapUCn6.js → Portal-BrGvxB96.js} +32 -36
  6. package/dist/RadioOption-DyRY8xlF.js +1094 -0
  7. package/dist/{Toggle-DcZTfLrC.js → Toggle-nnDfpqI1.js} +31 -31
  8. package/dist/assets/Checkbox.css +1 -1
  9. package/dist/assets/DropdownMenu.css +1 -1
  10. package/dist/assets/ToastCard.css +1 -1
  11. package/dist/assets/Toggle2.css +1 -1
  12. package/dist/combineHooksSlotProps-j-8UVeYo.js +86 -0
  13. package/dist/components/Alert/Alert.stories.d.ts +6 -6
  14. package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
  15. package/dist/components/Autocomplete/Autocomplete.js +311 -320
  16. package/dist/components/Autocomplete/Autocomplete.stories.d.ts +1 -1
  17. package/dist/components/Avatar/Avatar.stories.d.ts +4 -4
  18. package/dist/components/BankingCard/BankingCard.d.ts +0 -1
  19. package/dist/components/Button/Button.js +1 -1
  20. package/dist/components/Checkbox/Checkbox.js +56 -56
  21. package/dist/components/Checkbox/Checkbox.stories.d.ts +8 -8
  22. package/dist/components/Chip/Chip.js +3 -3
  23. package/dist/components/DatePicker/DatePicker.js +742 -639
  24. package/dist/components/DatePicker/DatePicker.stories.d.ts +8 -8
  25. package/dist/components/DatePicker/dateUtils.d.ts +2 -2
  26. package/dist/components/DatePicker/dateUtils.js +1 -1
  27. package/dist/components/DatePicker/keyboardNavigation.d.ts +1 -1
  28. package/dist/components/DatePicker/renderCalendarDays.js +1 -1
  29. package/dist/components/DatePicker/renderPeriodSelection.js +1 -1
  30. package/dist/components/Dialog/CloseIconButton.js +1 -1
  31. package/dist/components/Dialog/Dialog.js +372 -352
  32. package/dist/components/Dialog/Dialog.stories.d.ts +96 -135
  33. package/dist/components/DoubleAutocomplete/DoubleAutocomplete.d.ts +1 -1
  34. package/dist/components/DoubleAutocomplete/DoubleAutocomplete.js +2 -2
  35. package/dist/components/DoubleAutocomplete/DoubleAutocomplete.stories.d.ts +1 -1
  36. package/dist/components/DoubleInput/DoubleInput.stories.d.ts +1 -1
  37. package/dist/components/Draggable/Draggable.d.ts +0 -1
  38. package/dist/components/Draggable/Draggable.js +1 -1
  39. package/dist/components/Draggable/Draggable.stories.d.ts +2 -3
  40. package/dist/components/Draggable/useDraggable.js +1 -1
  41. package/dist/components/DropdownMenu/DropdownMenu.d.ts +3 -1
  42. package/dist/components/DropdownMenu/DropdownMenu.js +39 -34
  43. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +6 -4
  44. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +4 -4
  45. package/dist/components/IconButton/IconButton.js +1 -1
  46. package/dist/components/Input/Input.js +335 -320
  47. package/dist/components/InputSearch/InputSearch.d.ts +31 -31
  48. package/dist/components/InputSearch/InputSearch.stories.d.ts +31 -31
  49. package/dist/components/Popover/Popover.d.ts +3 -3
  50. package/dist/components/Popover/Popover.js +2 -2
  51. package/dist/components/Popover/Popover.stories.d.ts +3 -3
  52. package/dist/components/Popover/PopoverBody.d.ts +0 -1
  53. package/dist/components/Popover/PopoverFooter.d.ts +0 -1
  54. package/dist/components/Popover/PopoverHeader.d.ts +0 -1
  55. package/dist/components/RadioButton/RadioButton.d.ts +0 -1
  56. package/dist/components/RadioButton/RadioButton.js +684 -769
  57. package/dist/components/RadioButton/RadioOption.d.ts +0 -1
  58. package/dist/components/RadioButton/RadioOption.js +3 -3
  59. package/dist/components/ResultContainer/ResultContainer.d.ts +0 -1
  60. package/dist/components/ResultContainer/ResultContainer.stories.d.ts +9 -9
  61. package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
  62. package/dist/components/ResultWithChips/ResultWithChips.stories.d.ts +9 -9
  63. package/dist/components/RowItem/RowItem.js +2 -2
  64. package/dist/components/Select/Select.js +625 -591
  65. package/dist/components/Skeleton/Skeleton.d.ts +0 -1
  66. package/dist/components/Snackbar/Snackbar.js +295 -239
  67. package/dist/components/Snackbar/Snackbar.stories.d.ts +113 -113
  68. package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -1
  69. package/dist/components/Table/Table.stories.d.ts +5 -5
  70. package/dist/components/Tabs/Tab.js +107 -98
  71. package/dist/components/Tabs/TabPanel.js +58 -55
  72. package/dist/components/Tabs/Tabs.js +246 -231
  73. package/dist/components/ToastCard/ToastCard.js +31 -31
  74. package/dist/components/Toggle/Toggle.js +147 -137
  75. package/dist/components/Toggle/Toggle.stories.d.ts +5 -5
  76. package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
  77. package/dist/components/ToggleGroup/Toggle.js +2 -2
  78. package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
  79. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
  80. package/dist/components/Tooltip/Tooltip.js +266 -325
  81. package/dist/components/Tooltip/Tooltip.stories.d.ts +4 -4
  82. package/dist/components/TransactionRow/TransactionRow.stories.d.ts +21 -21
  83. package/dist/contexts/DraggableProvider/DraggableProvider.d.ts +0 -1
  84. package/dist/contexts/DraggableProvider/DraggableProvider.js +1 -1
  85. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
  86. package/dist/{dayjs.min-ClQKmc--.js → dayjs.min-BtgZiFZY.js} +14 -14
  87. package/dist/getReactElementRef-iorwYm2A.js +19 -0
  88. package/dist/{index-1UpBa69h.js → index-ew-96uBP.js} +2129 -2128
  89. package/dist/isFocusVisible-CPZqtjv2.js +12 -0
  90. package/dist/main.js +2 -2
  91. package/dist/{ownerDocument-By592Iy6.js → ownerDocument-CU-LCrtd.js} +1 -1
  92. package/dist/react-BTbo_5A3.js +526 -0
  93. package/dist/setRef-Bo0HEdBB.js +6 -0
  94. package/dist/useButton-C2E_LFJp.js +90 -0
  95. package/dist/useControlled-BYdyS7Pn.js +31 -0
  96. package/dist/useId-CK6Kn3Tn.js +21 -0
  97. package/dist/useList-BLW78Lq7.js +446 -0
  98. package/dist/utils/draggable.d.ts +2 -2
  99. package/package.json +1 -1
  100. package/dist/Button-BrEDdtHO.js +0 -130
  101. package/dist/Popup-Dffqo7wT.js +0 -1246
  102. package/dist/RadioOption-DYovqiwF.js +0 -720
  103. package/dist/combineHooksSlotProps-BhQ14uyD.js +0 -79
  104. package/dist/exactProp-SYjL19cU.js +0 -13
  105. package/dist/react-BvI-Sw9b.js +0 -509
  106. package/dist/useButton-CezPDte8.js +0 -105
  107. package/dist/useControlled-CCMYYdCM.js +0 -31
  108. package/dist/useId-BW-oWmul.js +0 -19
  109. package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
  110. package/dist/useList-nqLfZem8.js +0 -435
  111. package/dist/useSlotProps-CYHDC4TN.js +0 -834
  112. package/dist/useTimeout-DxF9kiZL.js +0 -36
@@ -1,720 +0,0 @@
1
- import { jsx as p, jsxs as A } from "react/jsx-runtime";
2
- import { c as J } from "./clsx-OuTLNxxd.js";
3
- import "./utils/iconsList.js";
4
- import { Typography as Q } from "./components/Typography/Typography.js";
5
- import * as s from "react";
6
- import "./components/Input/Input.js";
7
- import "./components/Avatar/Avatar.js";
8
- import "./components/Button/Button.js";
9
- import "./Toggle-DcZTfLrC.js";
10
- import "./components/Dialog/Dialog.js";
11
- import "./components/DatePicker/DatePicker.js";
12
- import { r as X } from "./index-1UpBa69h.js";
13
- import "./components/Draggable/useDraggable.js";
14
- import "./components/IconButton/IconButton.js";
15
- import "./components/InputSearch/InputSearch.js";
16
- import "./components/Select/Select.js";
17
- import "./components/Popover/Popover.js";
18
- import "./components/Table/Table.js";
19
- import "./components/Tabs/Tabs.js";
20
- import "./Group-DJz1rK2n.js";
21
- import "./contexts/SnackbarProvider/SnackbarProvider.js";
22
- import { P as a } from "./useSlotProps-CYHDC4TN.js";
23
- import './assets/RadioOption.css';const P = () => {
24
- };
25
- function Z(e, t) {
26
- let n = {};
27
- return Object.entries(e).forEach(([o, r]) => {
28
- if (t != null && t.hasOwnProperty(o)) {
29
- const d = t[o](r);
30
- d != null && (n = {
31
- ...n,
32
- ...d
33
- });
34
- return;
35
- }
36
- r === !0 ? n[`data-${o.toLowerCase()}`] = "" : r && (n[`data-${o.toLowerCase()}`] = r.toString());
37
- }), n;
38
- }
39
- function ee(e, t) {
40
- return typeof e == "function" ? e(t) : e;
41
- }
42
- function w(e, ...t) {
43
- let n = t[0];
44
- for (let o = 1; o < t.length; o += 1)
45
- n = F(n, t[o]);
46
- return F(e, n);
47
- }
48
- function F(e, t) {
49
- return e ? Object.entries(e).reduce((n, [o, r]) => (// This approach is more efficient than using a regex.
50
- o[0] === "o" && o[1] === "n" && o.charCodeAt(2) >= 65 && o.charCodeAt(2) <= 90 && typeof r == "function" ? n[o] = (d) => {
51
- let i = !1;
52
- const u = r, l = t[o], m = d;
53
- m.preventBaseUIHandler = () => {
54
- i = !0;
55
- };
56
- const f = u(m);
57
- return i || l == null || l(m), f;
58
- } : o === "style" ? (r || t.style) && (n[o] = {
59
- ...t.style,
60
- ...r || {}
61
- }) : o === "className" ? r ? t.className ? n[o] = r + " " + t.className : n[o] = r : n[o] = t.className : n[o] = r, n), {
62
- ...t
63
- }) : t;
64
- }
65
- function te(e, t, n) {
66
- return typeof e == "function" ? e(t, n) : /* @__PURE__ */ s.cloneElement(e, {
67
- ...w(e.props, t),
68
- ref: t.ref
69
- });
70
- }
71
- function M(...e) {
72
- return s.useMemo(() => e.every((t) => t == null) ? null : (t) => {
73
- e.forEach((n) => {
74
- ne(n, t);
75
- });
76
- }, e);
77
- }
78
- function ne(e, t) {
79
- typeof e == "function" ? e(t) : e && (e.current = t);
80
- }
81
- const oe = parseInt(s.version, 10);
82
- function re(e) {
83
- return oe >= e;
84
- }
85
- function se(e, ...t) {
86
- let n;
87
- return typeof e != "function" ? n = re(19) ? e.props.ref : e.ref : n = null, M(n, ...t);
88
- }
89
- const ie = {
90
- button: (e) => /* @__PURE__ */ p("button", {
91
- type: "button",
92
- ...e
93
- }),
94
- div: (e) => /* @__PURE__ */ p("div", {
95
- ...e
96
- }),
97
- h2: (e) => /* @__PURE__ */ p("h2", {
98
- ...e
99
- }),
100
- h3: (e) => /* @__PURE__ */ p("h3", {
101
- ...e
102
- }),
103
- output: (e) => /* @__PURE__ */ p("output", {
104
- ...e
105
- }),
106
- p: (e) => /* @__PURE__ */ p("p", {
107
- ...e
108
- }),
109
- span: (e) => /* @__PURE__ */ p("span", {
110
- ...e
111
- }),
112
- a: (e) => /* @__PURE__ */ p("a", {
113
- ...e
114
- }),
115
- label: (e) => /* @__PURE__ */ p("label", {
116
- ...e
117
- }),
118
- input: (e) => /* @__PURE__ */ p("input", {
119
- ...e
120
- }),
121
- fieldset: (e) => /* @__PURE__ */ p("fieldset", {
122
- ...e
123
- }),
124
- form: (e) => /* @__PURE__ */ p("form", {
125
- ...e
126
- }),
127
- img: (e) => /* @__PURE__ */ p("img", {
128
- alt: "",
129
- ...e
130
- })
131
- };
132
- function D(e) {
133
- const {
134
- render: t,
135
- className: n,
136
- state: o,
137
- ref: r,
138
- propGetter: d = (C) => C,
139
- extraProps: i,
140
- customStyleHookMapping: u
141
- } = e, l = ee(n, o), f = {
142
- ...s.useMemo(() => Z(o, u), [o, u]),
143
- ...i
144
- };
145
- let h;
146
- typeof t == "string" ? h = ie[t] : h = t;
147
- const c = d(f), R = {
148
- ...c,
149
- ref: se(h, r, c.ref)
150
- };
151
- return l !== void 0 && (R.className = l), {
152
- renderElement: () => te(h, R, o)
153
- };
154
- }
155
- const E = typeof window < "u" ? s.useLayoutEffect : s.useEffect, q = /* @__PURE__ */ s.createContext({
156
- register: () => {
157
- },
158
- unregister: () => {
159
- },
160
- map: /* @__PURE__ */ new Map(),
161
- elementsRef: {
162
- current: []
163
- }
164
- });
165
- process.env.NODE_ENV !== "production" && (q.displayName = "CompositeListContext");
166
- function ae() {
167
- return s.useContext(q);
168
- }
169
- function V(e) {
170
- const t = s.useRef(e);
171
- return E(() => {
172
- t.current = e;
173
- }), s.useCallback((...n) => {
174
- var o;
175
- return (o = t.current) == null ? void 0 : o.call(t, ...n);
176
- }, []);
177
- }
178
- function de(e, t = !1) {
179
- const [n, o] = s.useState(), [r, d] = s.useState(e);
180
- return e && !r && (d(!0), n !== "starting" && !t && o("starting")), !e && r && n !== "ending" && o("ending"), !e && !r && n === "ending" && o(void 0), E(() => {
181
- if (!e)
182
- return;
183
- t && o("starting");
184
- const i = requestAnimationFrame(() => {
185
- o(void 0);
186
- });
187
- return () => {
188
- cancelAnimationFrame(i);
189
- };
190
- }, [e, t]), s.useMemo(() => ({
191
- mounted: r,
192
- setMounted: d,
193
- transitionStatus: n
194
- }), [r, n]);
195
- }
196
- function le(e = {}) {
197
- const {
198
- label: t,
199
- metadata: n
200
- } = e, {
201
- register: o,
202
- unregister: r,
203
- map: d,
204
- elementsRef: i,
205
- labelsRef: u
206
- } = ae(), [l, m] = s.useState(null), f = s.useRef(null), h = s.useCallback((c) => {
207
- if (f.current = c, l !== null && (i.current[l] = c, u)) {
208
- const R = t !== void 0;
209
- u.current[l] = R ? t : (c == null ? void 0 : c.textContent) ?? null;
210
- }
211
- }, [l, i, u, t]);
212
- return E(() => {
213
- const c = f.current;
214
- if (c)
215
- return o(c, n), () => {
216
- r(c);
217
- };
218
- }, [o, r, n]), E(() => {
219
- var R;
220
- const c = f.current ? (R = d.get(f.current)) == null ? void 0 : R.index : null;
221
- c != null && m(c);
222
- }, [d]), s.useMemo(() => ({
223
- ref: h,
224
- index: l ?? -1
225
- }), [l, h]);
226
- }
227
- const ue = {
228
- "data-starting-style": ""
229
- }, ce = {
230
- "data-ending-style": ""
231
- }, fe = {
232
- transitionStatus(e) {
233
- return e === "starting" ? ue : e === "ending" ? ce : null;
234
- }
235
- };
236
- function pe(e, t = !1) {
237
- const n = s.useRef(-1), o = s.useRef(-1), r = V(() => {
238
- cancelAnimationFrame(n.current), clearTimeout(o.current);
239
- });
240
- return s.useEffect(() => r, [r]), V((d) => {
241
- r();
242
- const i = e.current;
243
- i && (typeof i.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED ? d() : n.current = requestAnimationFrame(() => {
244
- function u() {
245
- i && Promise.allSettled(i.getAnimations().map((l) => l.finished)).then(() => {
246
- X.flushSync(d);
247
- });
248
- }
249
- t ? o.current = window.setTimeout(u) : u();
250
- }));
251
- });
252
- }
253
- const me = a.oneOfType([a.func, a.object]);
254
- function he(e) {
255
- const t = s.useRef(e);
256
- return E(() => {
257
- t.current = e;
258
- }), t;
259
- }
260
- function Re(e) {
261
- const {
262
- open: t,
263
- ref: n,
264
- onComplete: o
265
- } = e, r = he(t), d = V(o), i = pe(n, t);
266
- E(() => {
267
- i(() => {
268
- t === r.current && d();
269
- });
270
- }, [t, d, i, r]);
271
- }
272
- let L = /* @__PURE__ */ function(e) {
273
- return e.disabled = "data-disabled", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.filled = "data-filled", e.focused = "data-focused", e;
274
- }({});
275
- const ye = {
276
- badInput: !1,
277
- customError: !1,
278
- patternMismatch: !1,
279
- rangeOverflow: !1,
280
- rangeUnderflow: !1,
281
- stepMismatch: !1,
282
- tooLong: !1,
283
- tooShort: !1,
284
- typeMismatch: !1,
285
- valid: null,
286
- valueMissing: !1
287
- }, ge = {
288
- valid(e) {
289
- return e === null ? null : e ? {
290
- [L.valid]: ""
291
- } : {
292
- [L.invalid]: ""
293
- };
294
- }
295
- }, _ = () => {
296
- }, H = /* @__PURE__ */ s.createContext({
297
- invalid: void 0,
298
- controlId: void 0,
299
- setControlId: _,
300
- labelId: void 0,
301
- setLabelId: _,
302
- messageIds: [],
303
- setMessageIds: _,
304
- name: void 0,
305
- validityData: {
306
- state: ye,
307
- errors: [],
308
- error: "",
309
- value: "",
310
- initialValue: null
311
- },
312
- setValidityData: _,
313
- disabled: void 0,
314
- touched: !1,
315
- setTouched: _,
316
- dirty: !1,
317
- setDirty: _,
318
- filled: !1,
319
- setFilled: _,
320
- focused: !1,
321
- setFocused: _,
322
- validate: () => null,
323
- validationMode: "onBlur",
324
- validationDebounceTime: 0,
325
- state: {
326
- disabled: !1,
327
- valid: null,
328
- touched: !1,
329
- dirty: !1,
330
- filled: !1,
331
- focused: !1
332
- },
333
- markedDirtyRef: {
334
- current: !1
335
- }
336
- });
337
- process.env.NODE_ENV !== "production" && (H.displayName = "FieldRootContext");
338
- function G(e = !0) {
339
- const t = s.useContext(H);
340
- if (t.setControlId === _ && !e)
341
- throw new Error("Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
342
- return t;
343
- }
344
- const be = {
345
- clip: "rect(0 0 0 0)",
346
- overflow: "hidden",
347
- whiteSpace: "nowrap",
348
- position: "fixed",
349
- top: 0,
350
- left: 0,
351
- border: 0,
352
- padding: 0,
353
- width: 1,
354
- height: 1,
355
- margin: -1
356
- }, U = /* @__PURE__ */ s.createContext({
357
- disabled: void 0,
358
- readOnly: void 0,
359
- required: void 0,
360
- checkedValue: "",
361
- setCheckedValue: P,
362
- onValueChange: P,
363
- touched: !1,
364
- setTouched: P
365
- });
366
- process.env.NODE_ENV !== "production" && (U.displayName = "RadioGroupContext");
367
- function B() {
368
- return s.useContext(U);
369
- }
370
- function xe(e) {
371
- const {
372
- disabled: t,
373
- readOnly: n,
374
- value: o,
375
- required: r
376
- } = e, {
377
- checkedValue: d,
378
- setCheckedValue: i,
379
- onValueChange: u,
380
- touched: l,
381
- setTouched: m,
382
- fieldControlValidation: f
383
- } = B(), {
384
- setDirty: h,
385
- validityData: c,
386
- setTouched: R,
387
- setFilled: x,
388
- validationMode: C
389
- } = G(), g = d === o, v = s.useRef(null);
390
- E(() => {
391
- var b;
392
- (b = v.current) != null && b.checked && x(!0);
393
- }, [x]);
394
- const I = s.useCallback((b) => w(f ? f.getValidationProps(b) : b, {
395
- role: "radio",
396
- type: "button",
397
- "aria-checked": g,
398
- "aria-required": r || void 0,
399
- "aria-disabled": t || void 0,
400
- "aria-readonly": n || void 0,
401
- disabled: t,
402
- onKeyDown(y) {
403
- y.key === "Enter" && y.preventDefault();
404
- },
405
- onClick(y) {
406
- var N;
407
- y.defaultPrevented || t || n || (y.preventDefault(), (N = v.current) == null || N.click());
408
- },
409
- onFocus(y) {
410
- var N;
411
- y.defaultPrevented || t || n || !l || ((N = v.current) == null || N.click(), m(!1));
412
- }
413
- }), [f, g, r, t, n, l, m]), T = s.useCallback((b) => w(b, {
414
- type: "radio",
415
- ref: v,
416
- tabIndex: -1,
417
- style: be,
418
- "aria-hidden": !0,
419
- disabled: t,
420
- checked: g,
421
- required: r,
422
- readOnly: n,
423
- onChange(y) {
424
- y.nativeEvent.defaultPrevented || t || n || o == null || (R(!0), h(o !== c.initialValue), i(o), x(!0), u == null || u(o, y.nativeEvent), C === "onChange" && (f == null || f.commitValidation(o)));
425
- }
426
- }), [t, g, r, n, o, R, h, c.initialValue, i, x, u, C, f]);
427
- return s.useMemo(() => ({
428
- checked: g,
429
- getRootProps: I,
430
- getInputProps: T
431
- }), [g, I, T]);
432
- }
433
- const S = /* @__PURE__ */ s.createContext(void 0);
434
- process.env.NODE_ENV !== "production" && (S.displayName = "RadioRootContext");
435
- function Ce() {
436
- const e = s.useContext(S);
437
- if (e === void 0)
438
- throw new Error("Base UI: RadioRootContext is missing. Radio parts must be placed within <Radio.Root>.");
439
- return e;
440
- }
441
- const j = /* @__PURE__ */ s.createContext(void 0);
442
- process.env.NODE_ENV !== "production" && (j.displayName = "CompositeRootContext");
443
- function K() {
444
- const e = s.useContext(j);
445
- if (e === void 0)
446
- throw new Error("Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");
447
- return e;
448
- }
449
- function _e(e = {}) {
450
- const {
451
- highlightedIndex: t,
452
- onHighlightedIndexChange: n
453
- } = K(), {
454
- ref: o,
455
- index: r
456
- } = le(e), d = t === r, i = s.useCallback((u = {}) => w(u, {
457
- tabIndex: d ? 0 : -1,
458
- onFocus() {
459
- n(r);
460
- }
461
- }), [d, r, n]);
462
- return s.useMemo(() => ({
463
- getItemProps: i,
464
- ref: o,
465
- index: r
466
- }), [i, o, r]);
467
- }
468
- function $(e) {
469
- const {
470
- render: t,
471
- className: n,
472
- itemRef: o,
473
- metadata: r,
474
- ...d
475
- } = e, {
476
- highlightedIndex: i
477
- } = K(), {
478
- getItemProps: u,
479
- ref: l,
480
- index: m
481
- } = _e({
482
- metadata: r
483
- }), f = s.useMemo(() => ({
484
- highlighted: m === i
485
- }), [m, i]), h = M(o, l), {
486
- renderElement: c
487
- } = D({
488
- propGetter: u,
489
- ref: h,
490
- render: t ?? "div",
491
- state: f,
492
- className: n,
493
- extraProps: d
494
- });
495
- return c();
496
- }
497
- process.env.NODE_ENV !== "production" && ($.propTypes = {
498
- // ┌────────────────────────────── Warning ──────────────────────────────┐
499
- // │ These PropTypes are generated from the TypeScript type definitions. │
500
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
501
- // └─────────────────────────────────────────────────────────────────────┘
502
- /**
503
- * @ignore
504
- */
505
- children: a.node,
506
- /**
507
- * CSS class applied to the element, or a function that
508
- * returns a class based on the component’s state.
509
- */
510
- className: a.oneOfType([a.func, a.string]),
511
- /**
512
- * @ignore
513
- */
514
- itemRef: me,
515
- /**
516
- * @ignore
517
- */
518
- metadata: a.any,
519
- /**
520
- * Allows you to replace the component’s HTML element
521
- * with a different tag, or compose it with another component.
522
- *
523
- * Accepts a `ReactElement` or a function that returns the element to render.
524
- */
525
- render: a.oneOfType([a.element, a.func])
526
- });
527
- const W = {
528
- checked(e) {
529
- return e ? {
530
- "data-checked": ""
531
- } : {
532
- "data-unchecked": ""
533
- };
534
- },
535
- ...fe,
536
- ...ge
537
- }, Y = /* @__PURE__ */ s.forwardRef(function(t, n) {
538
- const {
539
- render: o,
540
- className: r,
541
- disabled: d = !1,
542
- readOnly: i = !1,
543
- required: u = !1,
544
- ...l
545
- } = t, {
546
- disabled: m,
547
- readOnly: f,
548
- required: h,
549
- setCheckedValue: c
550
- } = B(), {
551
- state: R,
552
- disabled: x
553
- } = G(), C = x || m || d, g = f || i, v = h || u, {
554
- getRootProps: I,
555
- getInputProps: T,
556
- checked: b
557
- } = xe({
558
- ...t,
559
- disabled: C,
560
- readOnly: g
561
- }), y = s.useMemo(() => ({
562
- ...R,
563
- required: v,
564
- disabled: C,
565
- readOnly: g,
566
- checked: b
567
- }), [R, C, g, b, v]), N = s.useMemo(() => y, [y]), {
568
- renderElement: k
569
- } = D({
570
- propGetter: I,
571
- render: o ?? "button",
572
- ref: n,
573
- className: r,
574
- state: y,
575
- extraProps: l,
576
- customStyleHookMapping: W
577
- });
578
- return /* @__PURE__ */ A(S.Provider, {
579
- value: N,
580
- children: [c === P ? k() : /* @__PURE__ */ p($, {
581
- render: k()
582
- }), /* @__PURE__ */ p("input", {
583
- ...T()
584
- })]
585
- });
586
- });
587
- process.env.NODE_ENV !== "production" && (Y.propTypes = {
588
- // ┌────────────────────────────── Warning ──────────────────────────────┐
589
- // │ These PropTypes are generated from the TypeScript type definitions. │
590
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
591
- // └─────────────────────────────────────────────────────────────────────┘
592
- /**
593
- * @ignore
594
- */
595
- children: a.node,
596
- /**
597
- * CSS class applied to the element, or a function that
598
- * returns a class based on the component’s state.
599
- */
600
- className: a.oneOfType([a.func, a.string]),
601
- /**
602
- * Whether the component should ignore user interaction.
603
- * @default false
604
- */
605
- disabled: a.bool,
606
- /**
607
- * Whether the user should be unable to select the radio button.
608
- * @default false
609
- */
610
- readOnly: a.bool,
611
- /**
612
- * Allows you to replace the component’s HTML element
613
- * with a different tag, or compose it with another component.
614
- *
615
- * Accepts a `ReactElement` or a function that returns the element to render.
616
- */
617
- render: a.oneOfType([a.element, a.func]),
618
- /**
619
- * Whether the user must choose a value before submitting a form.
620
- * @default false
621
- */
622
- required: a.bool,
623
- /**
624
- * The unique identifying value of the radio in a group.
625
- */
626
- value: a.any.isRequired
627
- });
628
- const z = /* @__PURE__ */ s.forwardRef(function(t, n) {
629
- const {
630
- render: o,
631
- className: r,
632
- keepMounted: d = !1,
633
- ...i
634
- } = t, u = Ce(), l = u.checked, {
635
- transitionStatus: m,
636
- setMounted: f
637
- } = de(l), h = s.useMemo(() => ({
638
- ...u,
639
- transitionStatus: m
640
- }), [u, m]), c = s.useRef(null), R = M(n, c), {
641
- renderElement: x
642
- } = D({
643
- render: o ?? "span",
644
- ref: R,
645
- className: r,
646
- state: h,
647
- extraProps: i,
648
- customStyleHookMapping: W
649
- });
650
- return Re({
651
- open: l,
652
- ref: c,
653
- onComplete() {
654
- l || f(!1);
655
- }
656
- }), d || l ? x() : null;
657
- });
658
- process.env.NODE_ENV !== "production" && (z.propTypes = {
659
- // ┌────────────────────────────── Warning ──────────────────────────────┐
660
- // │ These PropTypes are generated from the TypeScript type definitions. │
661
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
662
- // └─────────────────────────────────────────────────────────────────────┘
663
- /**
664
- * @ignore
665
- */
666
- children: a.node,
667
- /**
668
- * CSS class applied to the element, or a function that
669
- * returns a class based on the component’s state.
670
- */
671
- className: a.oneOfType([a.func, a.string]),
672
- /**
673
- * Whether to keep the HTML element in the DOM when the radio button is inactive.
674
- * @default false
675
- */
676
- keepMounted: a.bool,
677
- /**
678
- * Allows you to replace the component’s HTML element
679
- * with a different tag, or compose it with another component.
680
- *
681
- * Accepts a `ReactElement` or a function that returns the element to render.
682
- */
683
- render: a.oneOfType([a.element, a.func])
684
- });
685
- const ve = "_option_1xyfv_9", Ne = "_radio_1xyfv_1", Ee = "_indicator_1xyfv_43", O = {
686
- "radio-label": "_radio-label_1xyfv_1",
687
- "radio-label__disabled": "_radio-label__disabled_1xyfv_4",
688
- option: ve,
689
- radio: Ne,
690
- indicator: Ee,
691
- "legacy-radio": "_legacy-radio_1xyfv_59",
692
- "legacy-radio--label": "_legacy-radio--label_1xyfv_67",
693
- "legacy-radio--label__disabled": "_legacy-radio--label__disabled_1xyfv_70",
694
- "legacy-radio--input": "_legacy-radio--input_1xyfv_74",
695
- "legacy-radio--input__disabled": "_legacy-radio--input__disabled_1xyfv_84",
696
- "legacy-radio--disabled": "_legacy-radio--disabled_1xyfv_95"
697
- }, We = ({ label: e, value: t, disabled: n, "data-testid": o }) => {
698
- const r = J(O["radio-label"], n && O["radio-label__disabled"]);
699
- return /* @__PURE__ */ A("label", { className: O.option, "data-testid": o, children: [
700
- /* @__PURE__ */ p(Y, { disabled: n, value: t, className: O.radio, children: /* @__PURE__ */ p(z, { className: O.indicator }) }),
701
- /* @__PURE__ */ p(Q, { color: "var(--colors-neutral-text-color-text)", className: r, variant: "base-lg", children: e })
702
- ] });
703
- };
704
- export {
705
- q as C,
706
- ye as D,
707
- We as R,
708
- G as a,
709
- V as b,
710
- he as c,
711
- M as d,
712
- D as e,
713
- j as f,
714
- U as g,
715
- ge as h,
716
- w as m,
717
- me as r,
718
- O as s,
719
- E as u
720
- };