@pismo/marola 2.1.64 → 2.1.66

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 (114) 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/Icon/types.d.ts +1 -1
  46. package/dist/components/IconButton/IconButton.js +1 -1
  47. package/dist/components/Input/Input.js +335 -320
  48. package/dist/components/InputSearch/InputSearch.d.ts +31 -31
  49. package/dist/components/InputSearch/InputSearch.stories.d.ts +31 -31
  50. package/dist/components/Popover/Popover.d.ts +3 -3
  51. package/dist/components/Popover/Popover.js +2 -2
  52. package/dist/components/Popover/Popover.stories.d.ts +3 -3
  53. package/dist/components/Popover/PopoverBody.d.ts +0 -1
  54. package/dist/components/Popover/PopoverFooter.d.ts +0 -1
  55. package/dist/components/Popover/PopoverHeader.d.ts +0 -1
  56. package/dist/components/RadioButton/RadioButton.d.ts +0 -1
  57. package/dist/components/RadioButton/RadioButton.js +684 -769
  58. package/dist/components/RadioButton/RadioOption.d.ts +0 -1
  59. package/dist/components/RadioButton/RadioOption.js +3 -3
  60. package/dist/components/ResultContainer/ResultContainer.d.ts +0 -1
  61. package/dist/components/ResultContainer/ResultContainer.stories.d.ts +9 -9
  62. package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
  63. package/dist/components/ResultWithChips/ResultWithChips.stories.d.ts +9 -9
  64. package/dist/components/RowItem/RowItem.js +2 -2
  65. package/dist/components/Select/Select.js +625 -591
  66. package/dist/components/Skeleton/Skeleton.d.ts +0 -1
  67. package/dist/components/Snackbar/Snackbar.js +295 -239
  68. package/dist/components/Snackbar/Snackbar.stories.d.ts +113 -113
  69. package/dist/components/StepperNavigator/StepperNavigator.d.ts +0 -1
  70. package/dist/components/Table/Table.stories.d.ts +5 -5
  71. package/dist/components/Tabs/Tab.js +107 -98
  72. package/dist/components/Tabs/TabPanel.js +58 -55
  73. package/dist/components/Tabs/Tabs.js +246 -231
  74. package/dist/components/ToastCard/ToastCard.js +31 -31
  75. package/dist/components/Toggle/Toggle.js +147 -137
  76. package/dist/components/Toggle/Toggle.stories.d.ts +5 -5
  77. package/dist/components/ToggleGroup/Toggle.d.ts +0 -1
  78. package/dist/components/ToggleGroup/Toggle.js +2 -2
  79. package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
  80. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
  81. package/dist/components/Tooltip/Tooltip.js +266 -325
  82. package/dist/components/Tooltip/Tooltip.stories.d.ts +4 -4
  83. package/dist/components/TransactionRow/TransactionRow.stories.d.ts +21 -21
  84. package/dist/contexts/DraggableProvider/DraggableProvider.d.ts +0 -1
  85. package/dist/contexts/DraggableProvider/DraggableProvider.js +1 -1
  86. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
  87. package/dist/{dayjs.min-ClQKmc--.js → dayjs.min-BtgZiFZY.js} +14 -14
  88. package/dist/getReactElementRef-iorwYm2A.js +19 -0
  89. package/dist/{index-1UpBa69h.js → index-ew-96uBP.js} +2129 -2128
  90. package/dist/isFocusVisible-CPZqtjv2.js +12 -0
  91. package/dist/main.js +2 -2
  92. package/dist/{ownerDocument-By592Iy6.js → ownerDocument-CU-LCrtd.js} +1 -1
  93. package/dist/react-BTbo_5A3.js +526 -0
  94. package/dist/setRef-Bo0HEdBB.js +6 -0
  95. package/dist/useButton-C2E_LFJp.js +90 -0
  96. package/dist/useControlled-BYdyS7Pn.js +31 -0
  97. package/dist/useId-CK6Kn3Tn.js +21 -0
  98. package/dist/useList-BLW78Lq7.js +446 -0
  99. package/dist/utils/draggable.d.ts +2 -2
  100. package/dist/utils/iconsList.js +118 -112
  101. package/package.json +1 -1
  102. package/dist/Button-BrEDdtHO.js +0 -130
  103. package/dist/Popup-Dffqo7wT.js +0 -1246
  104. package/dist/RadioOption-DYovqiwF.js +0 -720
  105. package/dist/combineHooksSlotProps-BhQ14uyD.js +0 -79
  106. package/dist/exactProp-SYjL19cU.js +0 -13
  107. package/dist/react-BvI-Sw9b.js +0 -509
  108. package/dist/useButton-CezPDte8.js +0 -105
  109. package/dist/useControlled-CCMYYdCM.js +0 -31
  110. package/dist/useId-BW-oWmul.js +0 -19
  111. package/dist/useIsFocusVisible-BH4IAdcw.js +0 -69
  112. package/dist/useList-nqLfZem8.js +0 -435
  113. package/dist/useSlotProps-CYHDC4TN.js +0 -834
  114. package/dist/useTimeout-DxF9kiZL.js +0 -36
@@ -1,16 +1,16 @@
1
- import { jsx as V, jsxs as le, Fragment as Ne } from "react/jsx-runtime";
2
- import * as f from "react";
3
- import { useState as Ve, useEffect as Se } from "react";
4
- import { c as Q } from "../../clsx-OuTLNxxd.js";
5
- import { Icon as De } from "../Icon/Icon.js";
6
- import { Typography as Me } from "../Typography/Typography.js";
1
+ import { jsx as V, jsxs as Me, Fragment as He } from "react/jsx-runtime";
2
+ import * as y from "react";
3
+ import { useState as Ke, useEffect as Fe } from "react";
4
+ import { c as ce } from "../../clsx-OuTLNxxd.js";
5
+ import { Icon as We } from "../Icon/Icon.js";
6
+ import { Typography as ze } from "../Typography/Typography.js";
7
7
  import "../Input/Input.js";
8
8
  import "../Avatar/Avatar.js";
9
9
  import "../Button/Button.js";
10
- import "../../Toggle-DcZTfLrC.js";
10
+ import "../../Toggle-nnDfpqI1.js";
11
11
  import "../Dialog/Dialog.js";
12
12
  import "../DatePicker/DatePicker.js";
13
- import { r as Te } from "../../index-1UpBa69h.js";
13
+ import { r as Be } from "../../index-ew-96uBP.js";
14
14
  import "../Draggable/useDraggable.js";
15
15
  import "../IconButton/IconButton.js";
16
16
  import "../InputSearch/InputSearch.js";
@@ -21,903 +21,818 @@ import "../Tabs/Tabs.js";
21
21
  import "../../Group-DJz1rK2n.js";
22
22
  import "../../contexts/SnackbarProvider/SnackbarProvider.js";
23
23
  import "../../utils/iconsList.js";
24
- import { u as ne, C as xe, a as Y, b as oe, m as G, D as _e, c as Ae, d as Pe, e as ce, f as ke, r as ve, g as He, h as Ke, s as P } from "../../RadioOption-DYovqiwF.js";
25
- import { R as Ut } from "../../RadioOption-DYovqiwF.js";
26
- import { P as d } from "../../useSlotProps-CYHDC4TN.js";
27
- const Le = Object.is;
28
- function Ge(e, t) {
29
- if (e === t)
30
- return !0;
31
- if (!(e instanceof Object) || !(t instanceof Object))
32
- return !1;
33
- let o = 0, r = 0;
34
- for (const n in e)
35
- if (o += 1, !Le(e[n], t[n]) || !(n in t))
36
- return !1;
37
- for (const n in t)
38
- r += 1;
39
- return o === r;
40
- }
41
- function ze(e, t) {
42
- const o = e.compareDocumentPosition(t);
43
- return o & Node.DOCUMENT_POSITION_FOLLOWING || o & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : o & Node.DOCUMENT_POSITION_PRECEDING || o & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
44
- }
45
- function Fe(e, t) {
46
- if (e.size !== t.size)
47
- return !1;
48
- for (const [o, r] of e.entries()) {
49
- const n = t.get(o);
50
- if ((r == null ? void 0 : r.index) !== (n == null ? void 0 : n.index) || n !== void 0 && !Ge(r, n))
51
- return !1;
52
- }
53
- return !0;
54
- }
55
- function de(e) {
56
- const {
57
- children: t,
58
- elementsRef: o,
59
- labelsRef: r,
60
- onMapChange: n
61
- } = e, [u, l] = f.useState(() => /* @__PURE__ */ new Map()), g = f.useCallback((s, i) => {
62
- l((c) => new Map(c).set(s, i ?? null));
63
- }, []), a = f.useCallback((s) => {
64
- l((i) => {
65
- const c = new Map(i);
66
- return c.delete(s), c;
67
- });
68
- }, []);
69
- ne(() => {
70
- const s = new Map(u);
71
- Array.from(s.keys()).sort(ze).forEach((c, m) => {
72
- const y = u.get(c) ?? {};
73
- s.set(c, {
74
- ...y,
75
- index: m
76
- });
77
- }), Fe(u, s) || (l(s), n == null || n(s));
78
- }, [u, n]);
79
- const p = f.useMemo(() => ({
80
- register: g,
81
- unregister: a,
82
- map: u,
83
- elementsRef: o,
84
- labelsRef: r
85
- }), [g, a, u, o, r]);
86
- return /* @__PURE__ */ V(xe.Provider, {
87
- value: p,
88
- children: t
89
- });
90
- }
91
- process.env.NODE_ENV !== "production" && (de.propTypes = {
92
- // ┌────────────────────────────── Warning ──────────────────────────────┐
93
- // │ These PropTypes are generated from the TypeScript type definitions. │
94
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
95
- // └─────────────────────────────────────────────────────────────────────┘
96
- /**
97
- * @ignore
98
- */
99
- children: d.node,
100
- /**
101
- * A ref to the list of HTML elements, ordered by their index.
102
- * `useListNavigation`'s `listRef` prop.
103
- */
104
- elementsRef: d.any,
105
- /**
106
- * A ref to the list of element labels, ordered by their index.
107
- * `useTypeahead`'s `listRef` prop.
108
- */
109
- labelsRef: d.shape({
110
- current: d.arrayOf(d.string).isRequired
111
- }),
112
- /**
113
- * @ignore
114
- */
115
- onMapChange: d.func
116
- });
117
- const fe = /* @__PURE__ */ f.createContext(void 0);
118
- process.env.NODE_ENV !== "production" && (fe.displayName = "DirectionContext");
119
- function je(e = !0) {
120
- const t = f.useContext(fe);
121
- if (t === void 0 && !e)
122
- throw new Error("Base UI: DirectionContext is missing.");
123
- return (t == null ? void 0 : t.direction) ?? "ltr";
124
- }
125
- function Ue({
24
+ import { u as L, a as he, b as F, C as Ue, f as we, N as Oe, c as Ne, d as be, A as Ye, E as pe, e as Ge, g as $e, h as ve, i as je, j as Je, m as Xe, k as qe, l as Ze, v as Qe, s as j } from "../../RadioOption-DyRY8xlF.js";
25
+ import { R as ln } from "../../RadioOption-DyRY8xlF.js";
26
+ import { i as et, a as me, b as Ce } from "../../Popup-D267EI4e.js";
27
+ function tt({
126
28
  controlled: e,
127
29
  default: t,
128
- name: o,
129
- state: r = "value"
30
+ name: i,
31
+ state: o = "value"
130
32
  }) {
131
33
  const {
132
- current: n
133
- } = f.useRef(e !== void 0), [u, l] = f.useState(t), g = n ? e : u;
34
+ current: l
35
+ } = y.useRef(e !== void 0), [n, u] = y.useState(t), m = l ? e : n;
134
36
  if (process.env.NODE_ENV !== "production") {
135
- f.useEffect(() => {
136
- n !== (e !== void 0) && console.error([`Base UI: A component is changing the ${n ? "" : "un"}controlled ${r} state of ${o} to be ${n ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${o} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
37
+ y.useEffect(() => {
38
+ l !== (e !== void 0) && console.error([`Base UI: A component is changing the ${l ? "" : "un"}controlled ${o} state of ${i} to be ${l ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${i} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
137
39
  `));
138
- }, [r, o, e]);
40
+ }, [o, i, e]);
139
41
  const {
140
- current: p
141
- } = f.useRef(t);
142
- f.useEffect(() => {
143
- !n && !Object.is(p, t) && console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${o} after being initialized. To suppress this warning opt to use a controlled ${o}.`].join(`
42
+ current: r
43
+ } = y.useRef(t);
44
+ y.useEffect(() => {
45
+ !l && JSON.stringify(r) !== JSON.stringify(t) && console.error([`Base UI: A component is changing the default ${o} state of an uncontrolled ${i} after being initialized. To suppress this warning opt to use a controlled ${i}.`].join(`
144
46
  `));
145
47
  }, [JSON.stringify(t)]);
146
48
  }
147
- const a = f.useCallback((p) => {
148
- n || l(p);
49
+ const f = y.useCallback((r) => {
50
+ l || u(r);
149
51
  }, []);
150
- return [g, a];
52
+ return [m, f];
151
53
  }
152
- let ee = null, te;
153
- function $e() {
154
- return ee == null && (ee = document.createElement("div")), te === void 0 && (te = ee.computedStyleMap !== void 0), te;
54
+ function nt(e) {
55
+ const {
56
+ children: t,
57
+ elementsRef: i,
58
+ labelsRef: o,
59
+ onMapChange: l
60
+ } = e, n = L(l), u = y.useRef(0), m = he(ot).current, f = he(rt).current, [r, a] = y.useState(0), s = y.useRef(r), p = L((c, E) => {
61
+ f.set(c, E ?? null), s.current += 1, a(s.current);
62
+ }), w = L((c) => {
63
+ f.delete(c), s.current += 1, a(s.current);
64
+ }), M = y.useMemo(() => {
65
+ const c = /* @__PURE__ */ new Map();
66
+ return Array.from(f.keys()).filter((d) => d.isConnected).sort(it).forEach((d, h) => {
67
+ const R = f.get(d) ?? {};
68
+ c.set(d, {
69
+ ...R,
70
+ index: h
71
+ });
72
+ }), c;
73
+ }, [f, r]);
74
+ F(() => {
75
+ if (typeof MutationObserver != "function" || M.size === 0)
76
+ return;
77
+ const c = new MutationObserver((E) => {
78
+ const d = /* @__PURE__ */ new Set(), h = (R) => d.has(R) ? d.delete(R) : d.add(R);
79
+ E.forEach((R) => {
80
+ R.removedNodes.forEach(h), R.addedNodes.forEach(h);
81
+ }), d.size === 0 && (s.current += 1, a(s.current));
82
+ });
83
+ return M.forEach((E, d) => {
84
+ d.parentElement && c.observe(d.parentElement, {
85
+ childList: !0
86
+ });
87
+ }), () => {
88
+ c.disconnect();
89
+ };
90
+ }, [M]), F(() => {
91
+ s.current === r && (i.current.length !== M.size && (i.current.length = M.size), o && o.current.length !== M.size && (o.current.length = M.size), u.current = M.size), n(M);
92
+ }, [n, M, i, o, r]), F(() => () => {
93
+ i.current = [];
94
+ }, [i]), F(() => () => {
95
+ o && (o.current = []);
96
+ }, [o]);
97
+ const b = L((c) => (m.add(c), () => {
98
+ m.delete(c);
99
+ }));
100
+ F(() => {
101
+ m.forEach((c) => c(M));
102
+ }, [m, M]);
103
+ const S = y.useMemo(() => ({
104
+ register: p,
105
+ unregister: w,
106
+ subscribeMapChange: b,
107
+ elementsRef: i,
108
+ labelsRef: o,
109
+ nextIndexRef: u
110
+ }), [p, w, b, i, o, u]);
111
+ return /* @__PURE__ */ V(Ue.Provider, {
112
+ value: S,
113
+ children: t
114
+ });
115
+ }
116
+ function rt() {
117
+ return /* @__PURE__ */ new Map();
118
+ }
119
+ function ot() {
120
+ return /* @__PURE__ */ new Set();
155
121
  }
156
- function We(e) {
157
- return e && e.ownerDocument || document;
122
+ function it(e, t) {
123
+ const i = e.compareDocumentPosition(t);
124
+ return i & Node.DOCUMENT_POSITION_FOLLOWING || i & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING || i & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
158
125
  }
159
- function Be(e) {
160
- return We(e).defaultView || window;
126
+ const Se = /* @__PURE__ */ y.createContext(void 0);
127
+ process.env.NODE_ENV !== "production" && (Se.displayName = "DirectionContext");
128
+ function st() {
129
+ const e = y.useContext(Se);
130
+ return (e == null ? void 0 : e.direction) ?? "ltr";
161
131
  }
162
- const z = "ArrowUp", k = "ArrowDown", v = "ArrowLeft", x = "ArrowRight", q = "Home", J = "End", ge = [v, x], Ye = [v, x, q, J], he = [z, k], qe = [z, k, q, J], me = [...ge, ...he], Je = [...me, q, J];
163
- function U(e) {
132
+ function at(e) {
133
+ return e == null || e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true";
134
+ }
135
+ const fe = "ArrowLeft", de = "ArrowRight", lt = "ArrowUp", ut = "ArrowDown";
136
+ function ct(e, t) {
137
+ var o;
138
+ if (!e || !t)
139
+ return !1;
140
+ const i = (o = t.getRootNode) == null ? void 0 : o.call(t);
141
+ if (e.contains(t))
142
+ return !0;
143
+ if (i && et(i)) {
144
+ let l = t;
145
+ for (; l; ) {
146
+ if (e === l)
147
+ return !0;
148
+ l = l.parentNode || l.host;
149
+ }
150
+ }
151
+ return !1;
152
+ }
153
+ function J(e) {
164
154
  e.preventDefault(), e.stopPropagation();
165
155
  }
166
- function $(e, t, o) {
167
- return Math.floor(e / t) !== o;
156
+ function re(e, t, i) {
157
+ return Math.floor(e / t) !== i;
168
158
  }
169
- function W(e, t) {
159
+ function ie(e, t) {
170
160
  return t < 0 || t >= e.current.length;
171
161
  }
172
- function Xe(e, t) {
173
- return N(e, {
162
+ function ft(e, t) {
163
+ return _(e, {
174
164
  disabledIndices: t
175
165
  });
176
166
  }
177
- function Ze(e, t) {
178
- return N(e, {
167
+ function dt(e, t) {
168
+ return _(e, {
179
169
  decrement: !0,
180
170
  startingIndex: e.current.length,
181
171
  disabledIndices: t
182
172
  });
183
173
  }
184
- function N(e, {
174
+ function _(e, {
185
175
  startingIndex: t = -1,
186
- decrement: o = !1,
187
- disabledIndices: r,
188
- amount: n = 1
176
+ decrement: i = !1,
177
+ disabledIndices: o,
178
+ amount: l = 1
189
179
  } = {}) {
190
- const u = e.current;
191
- let l = t;
180
+ let n = t;
192
181
  do
193
- l += o ? -n : n;
194
- while (l >= 0 && l <= u.length - 1 && B(u, l, r));
195
- return l;
182
+ n += i ? -l : l;
183
+ while (n >= 0 && n <= e.current.length - 1 && Z(e, n, o));
184
+ return n;
196
185
  }
197
- function Qe(e, {
186
+ function gt(e, {
198
187
  event: t,
199
- orientation: o,
200
- loop: r,
188
+ orientation: i,
189
+ loopFocus: o,
190
+ rtl: l,
201
191
  cols: n,
202
192
  disabledIndices: u,
203
- minIndex: l,
204
- maxIndex: g,
205
- prevIndex: a,
206
- rtl: p,
207
- stopEvent: s = !1
193
+ minIndex: m,
194
+ maxIndex: f,
195
+ prevIndex: r,
196
+ stopEvent: a = !1
208
197
  }) {
209
- let i = a;
210
- if (t.key === z) {
211
- if (s && U(t), a === -1)
212
- i = g;
213
- else if (i = N(e, {
214
- startingIndex: i,
198
+ let s = r;
199
+ const p = [], w = {};
200
+ let M = !1;
201
+ {
202
+ let c = null, E = -1;
203
+ e.current.forEach((d, h) => {
204
+ if (d == null)
205
+ return;
206
+ const R = d.closest('[role="row"]');
207
+ R && (M = !0), (R !== c || E === -1) && (c = R, E += 1, p[E] = []), p[E].push(h), w[h] = E;
208
+ });
209
+ }
210
+ const b = M && p.length > 0 && p.some((c) => c.length !== n);
211
+ function S(c) {
212
+ if (!b || r === -1)
213
+ return;
214
+ const E = w[r];
215
+ if (E == null)
216
+ return;
217
+ const d = p[E].indexOf(r);
218
+ let h = c === "up" ? E - 1 : E + 1;
219
+ o && (h < 0 ? h = p.length - 1 : h >= p.length && (h = 0));
220
+ const R = /* @__PURE__ */ new Set();
221
+ for (; h >= 0 && h < p.length && !R.has(h); ) {
222
+ R.add(h);
223
+ const O = p[h];
224
+ if (O.length === 0) {
225
+ h = c === "up" ? h - 1 : h + 1;
226
+ continue;
227
+ }
228
+ const B = Math.min(d, O.length - 1);
229
+ for (let D = B; D >= 0; D -= 1) {
230
+ const g = O[D];
231
+ if (!Z(e, g, u))
232
+ return g;
233
+ }
234
+ h = c === "up" ? h - 1 : h + 1, o && (h < 0 ? h = p.length - 1 : h >= p.length && (h = 0));
235
+ }
236
+ }
237
+ if (t.key === lt) {
238
+ const c = S("up");
239
+ if (c !== void 0)
240
+ a && J(t), s = c;
241
+ else {
242
+ if (a && J(t), r === -1)
243
+ s = f;
244
+ else if (s = _(e, {
245
+ startingIndex: s,
246
+ amount: n,
247
+ decrement: !0,
248
+ disabledIndices: u
249
+ }), o && (r - n < m || s < 0)) {
250
+ const E = r % n, d = f % n, h = f - (d - E);
251
+ d === E ? s = f : s = d > E ? h : h - n;
252
+ }
253
+ ie(e, s) && (s = r);
254
+ }
255
+ }
256
+ if (t.key === ut) {
257
+ const c = S("down");
258
+ c !== void 0 ? (a && J(t), s = c) : (a && J(t), r === -1 ? s = m : (s = _(e, {
259
+ startingIndex: r,
215
260
  amount: n,
216
- decrement: !0,
217
261
  disabledIndices: u
218
- }), r && (a - n < l || i < 0)) {
219
- const c = a % n, m = g % n, y = g - (m - c);
220
- m === c ? i = g : i = m > c ? y : y - n;
221
- }
222
- W(e, i) && (i = a);
262
+ }), o && r + n > f && (s = _(e, {
263
+ startingIndex: r % n - n,
264
+ amount: n,
265
+ disabledIndices: u
266
+ }))), ie(e, s) && (s = r));
223
267
  }
224
- if (t.key === k && (s && U(t), a === -1 ? i = l : (i = N(e, {
225
- startingIndex: a,
226
- amount: n,
227
- disabledIndices: u
228
- }), r && a + n > g && (i = N(e, {
229
- startingIndex: a % n - n,
230
- amount: n,
231
- disabledIndices: u
232
- }))), W(e, i) && (i = a)), o === "both") {
233
- const c = p ? v : x, m = p ? x : v, y = Math.floor(a / n);
234
- t.key === c && (s && U(t), a % n !== n - 1 ? (i = N(e, {
235
- startingIndex: a,
268
+ if (i === "both") {
269
+ const c = me(r / n);
270
+ t.key === (l ? fe : de) && (a && J(t), r % n !== n - 1 ? (s = _(e, {
271
+ startingIndex: r,
236
272
  disabledIndices: u
237
- }), r && $(i, n, y) && (i = N(e, {
238
- startingIndex: a - a % n - 1,
273
+ }), o && re(s, n, c) && (s = _(e, {
274
+ startingIndex: r - r % n - 1,
239
275
  disabledIndices: u
240
- }))) : r && (i = N(e, {
241
- startingIndex: a - a % n - 1,
276
+ }))) : o && (s = _(e, {
277
+ startingIndex: r - r % n - 1,
242
278
  disabledIndices: u
243
- })), $(i, n, y) && (i = a)), t.key === m && (s && U(t), a % n !== 0 ? (i = N(e, {
244
- startingIndex: a,
279
+ })), re(s, n, c) && (s = r)), t.key === (l ? de : fe) && (a && J(t), r % n !== 0 ? (s = _(e, {
280
+ startingIndex: r,
245
281
  decrement: !0,
246
282
  disabledIndices: u
247
- }), r && $(i, n, y) && (i = N(e, {
248
- startingIndex: a + (n - a % n),
283
+ }), o && re(s, n, c) && (s = _(e, {
284
+ startingIndex: r + (n - r % n),
249
285
  decrement: !0,
250
286
  disabledIndices: u
251
- }))) : r && (i = N(e, {
252
- startingIndex: a + (n - a % n),
287
+ }))) : o && (s = _(e, {
288
+ startingIndex: r + (n - r % n),
253
289
  decrement: !0,
254
290
  disabledIndices: u
255
- })), $(i, n, y) && (i = a));
256
- const C = Math.floor(g / n) === y;
257
- W(e, i) && (r && C ? i = t.key === m ? g : N(e, {
258
- startingIndex: a - a % n - 1,
291
+ })), re(s, n, c) && (s = r));
292
+ const E = me(f / n) === c;
293
+ ie(e, s) && (o && E ? s = t.key === (l ? de : fe) ? f : _(e, {
294
+ startingIndex: r - r % n - 1,
259
295
  disabledIndices: u
260
- }) : i = a);
296
+ }) : s = r);
261
297
  }
262
- return i;
298
+ return s;
263
299
  }
264
- function et(e, t, o) {
265
- const r = [];
266
- let n = 0;
300
+ function ht(e, t, i) {
301
+ const o = [];
302
+ let l = 0;
267
303
  return e.forEach(({
268
- width: u,
269
- height: l
270
- }, g) => {
271
- if (u > t && process.env.NODE_ENV !== "production")
272
- throw new Error(`[Base UI]: Invalid grid - item width at index ${g} is greater than grid columns`);
273
- let a = !1;
274
- for (o && (n = 0); !a; ) {
275
- const p = [];
276
- for (let s = 0; s < u; s += 1)
277
- for (let i = 0; i < l; i += 1)
278
- p.push(n + s + i * t);
279
- n % t + u <= t && p.every((s) => r[s] == null) ? (p.forEach((s) => {
280
- r[s] = g;
281
- }), a = !0) : n += 1;
304
+ width: n,
305
+ height: u
306
+ }, m) => {
307
+ if (n > t && process.env.NODE_ENV !== "production")
308
+ throw new Error(process.env.NODE_ENV !== "production" ? `[Floating UI]: Invalid grid - item width at index ${m} is greater than grid columns` : we(29, m));
309
+ let f = !1;
310
+ for (i && (l = 0); !f; ) {
311
+ const r = [];
312
+ for (let a = 0; a < n; a += 1)
313
+ for (let s = 0; s < u; s += 1)
314
+ r.push(l + a + s * t);
315
+ l % t + n <= t && r.every((a) => o[a] == null) ? (r.forEach((a) => {
316
+ o[a] = m;
317
+ }), f = !0) : l += 1;
282
318
  }
283
- }), [...r];
319
+ }), [...o];
284
320
  }
285
- function tt(e, t, o, r, n) {
321
+ function pt(e, t, i, o, l) {
286
322
  if (e === -1)
287
323
  return -1;
288
- const u = o.indexOf(e), l = t[e];
289
- switch (n) {
324
+ const n = i.indexOf(e), u = t[e];
325
+ switch (l) {
290
326
  case "tl":
291
- return u;
327
+ return n;
292
328
  case "tr":
293
- return l ? u + l.width - 1 : u;
329
+ return u ? n + u.width - 1 : n;
294
330
  case "bl":
295
- return l ? u + (l.height - 1) * r : u;
331
+ return u ? n + (u.height - 1) * o : n;
296
332
  case "br":
297
- return o.lastIndexOf(e);
333
+ return i.lastIndexOf(e);
298
334
  default:
299
335
  return -1;
300
336
  }
301
337
  }
302
- function nt(e, t) {
303
- return t.flatMap((o, r) => e.includes(o) ? [r] : []);
304
- }
305
- function B(e, t, o) {
306
- if (o)
307
- return o.includes(t);
308
- const r = e[t];
309
- return r == null || r.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true";
310
- }
311
- function ot(e) {
312
- if ($e()) {
313
- const t = e.computedStyleMap().get("direction");
314
- return t == null ? void 0 : t.value;
338
+ function mt(e, t) {
339
+ return t.flatMap((i, o) => e.includes(i) ? [o] : []);
340
+ }
341
+ function Z(e, t, i) {
342
+ if (typeof i == "function")
343
+ return i(t);
344
+ if (i)
345
+ return i.includes(t);
346
+ const o = e.current[t];
347
+ return o ? o.hasAttribute("disabled") || o.getAttribute("aria-disabled") === "true" : !1;
348
+ }
349
+ const Q = "ArrowUp", X = "ArrowDown", se = "ArrowLeft", ee = "ArrowRight", ae = "Home", le = "End", Ie = /* @__PURE__ */ new Set([se, ee]), Rt = /* @__PURE__ */ new Set([se, ee, ae, le]), Te = /* @__PURE__ */ new Set([Q, X]), yt = /* @__PURE__ */ new Set([Q, X, ae, le]), Pe = /* @__PURE__ */ new Set([...Ie, ...Te]), Et = /* @__PURE__ */ new Set([...Pe, ae, le]), Ae = "Shift", Mt = "Control", wt = "Alt", Ot = "Meta", Nt = /* @__PURE__ */ new Set([Ae, Mt, wt, Ot]);
350
+ function bt(e) {
351
+ return Ce(e) && e.tagName === "INPUT";
352
+ }
353
+ function Re(e) {
354
+ return !!(bt(e) && e.selectionStart != null || Ce(e) && e.tagName === "TEXTAREA");
355
+ }
356
+ function ye(e, t, i, o) {
357
+ if (!e || !t || !t.scrollTo)
358
+ return;
359
+ let l = e.scrollLeft, n = e.scrollTop;
360
+ const u = e.clientWidth < e.scrollWidth, m = e.clientHeight < e.scrollHeight;
361
+ if (u && o !== "vertical") {
362
+ const f = Ee(e, t, "left"), r = oe(e), a = oe(t);
363
+ i === "ltr" && (f + t.offsetWidth + a.scrollMarginRight > e.scrollLeft + e.clientWidth - r.scrollPaddingRight ? l = f + t.offsetWidth + a.scrollMarginRight - e.clientWidth + r.scrollPaddingRight : f - a.scrollMarginLeft < e.scrollLeft + r.scrollPaddingLeft && (l = f - a.scrollMarginLeft - r.scrollPaddingLeft)), i === "rtl" && (f - a.scrollMarginRight < e.scrollLeft + r.scrollPaddingLeft ? l = f - a.scrollMarginLeft - r.scrollPaddingLeft : f + t.offsetWidth + a.scrollMarginRight > e.scrollLeft + e.clientWidth - r.scrollPaddingRight && (l = f + t.offsetWidth + a.scrollMarginRight - e.clientWidth + r.scrollPaddingRight));
315
364
  }
316
- return Be(e).getComputedStyle(e).direction;
317
- }
318
- let se = 0;
319
- function rt(e, t = "mui") {
320
- const [o, r] = f.useState(e), n = e || o;
321
- return f.useEffect(() => {
322
- o == null && (se += 1, r(`${t}-${se}`));
323
- }, [o, t]), n;
324
- }
325
- const it = {
326
- ...f
327
- }, ue = it.useId;
328
- function at(e, t) {
329
- if (ue !== void 0) {
330
- const o = ue();
331
- return `${t}-${o}`;
365
+ if (m && o !== "horizontal") {
366
+ const f = Ee(e, t, "top"), r = oe(e), a = oe(t);
367
+ f - a.scrollMarginTop < e.scrollTop + r.scrollPaddingTop ? n = f - a.scrollMarginTop - r.scrollPaddingTop : f + t.offsetHeight + a.scrollMarginBottom > e.scrollTop + e.clientHeight - r.scrollPaddingBottom && (n = f + t.offsetHeight + a.scrollMarginBottom - e.clientHeight + r.scrollPaddingBottom);
332
368
  }
333
- return rt(e, t);
334
- }
335
- function st(e) {
336
- return at(e, "base-ui");
337
- }
338
- function ut() {
339
- return typeof window < "u";
369
+ e.scrollTo({
370
+ left: l,
371
+ top: n,
372
+ behavior: "auto"
373
+ });
340
374
  }
341
- function lt(e) {
342
- var t;
343
- return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
375
+ function Ee(e, t, i) {
376
+ const o = i === "left" ? "offsetLeft" : "offsetTop";
377
+ let l = 0;
378
+ for (; t.offsetParent && (l += t[o], t.offsetParent !== e); )
379
+ t = t.offsetParent;
380
+ return l;
344
381
  }
345
- function ct(e) {
346
- return !ut() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof lt(e).ShadowRoot;
382
+ function oe(e) {
383
+ const t = getComputedStyle(e);
384
+ return {
385
+ scrollMarginTop: parseFloat(t.scrollMarginTop) || 0,
386
+ scrollMarginRight: parseFloat(t.scrollMarginRight) || 0,
387
+ scrollMarginBottom: parseFloat(t.scrollMarginBottom) || 0,
388
+ scrollMarginLeft: parseFloat(t.scrollMarginLeft) || 0,
389
+ scrollPaddingTop: parseFloat(t.scrollPaddingTop) || 0,
390
+ scrollPaddingRight: parseFloat(t.scrollPaddingRight) || 0,
391
+ scrollPaddingBottom: parseFloat(t.scrollPaddingBottom) || 0,
392
+ scrollPaddingLeft: parseFloat(t.scrollPaddingLeft) || 0
393
+ };
347
394
  }
348
- function dt(e, t) {
349
- if (!e || !t)
350
- return !1;
351
- const o = t.getRootNode == null ? void 0 : t.getRootNode();
352
- if (e.contains(t))
353
- return !0;
354
- if (o && ct(o)) {
355
- let r = t;
356
- for (; r; ) {
357
- if (e === r)
358
- return !0;
359
- r = r.parentNode || r.host;
395
+ function Ct(e, t) {
396
+ return {
397
+ ...e,
398
+ state: {
399
+ ...e.state,
400
+ valid: !t && e.state.valid
360
401
  }
361
- }
362
- return !1;
402
+ };
363
403
  }
364
- const pe = /* @__PURE__ */ f.createContext({
404
+ const _e = /* @__PURE__ */ y.createContext({
365
405
  formRef: {
366
406
  current: {
367
407
  fields: /* @__PURE__ */ new Map()
368
408
  }
369
409
  },
370
410
  errors: {},
371
- onClearErrors: () => {
411
+ clearErrors: Oe,
412
+ validationMode: "onSubmit",
413
+ submitAttemptedRef: {
414
+ current: !1
372
415
  }
373
416
  });
374
- process.env.NODE_ENV !== "production" && (pe.displayName = "FormContext");
375
- function ye() {
376
- return f.useContext(pe);
417
+ process.env.NODE_ENV !== "production" && (_e.displayName = "FormContext");
418
+ function Le() {
419
+ return y.useContext(_e);
377
420
  }
378
- function Ce(e, t) {
379
- return {
380
- ...e,
381
- state: {
382
- ...e.state,
383
- valid: !t && e.state.valid
384
- }
385
- };
386
- }
387
- const ft = Object.keys(_e);
388
- function gt() {
389
- const {
390
- setValidityData: e,
391
- validate: t,
392
- messageIds: o,
393
- validityData: r,
394
- validationMode: n,
395
- validationDebounceTime: u,
396
- invalid: l,
397
- markedDirtyRef: g,
398
- controlId: a,
399
- state: p
400
- } = Y(), {
401
- formRef: s
402
- } = ye(), i = f.useRef(-1), c = f.useRef(null);
403
- f.useEffect(() => () => {
404
- window.clearTimeout(i.current);
405
- }, []);
406
- const m = oe(async (R) => {
407
- const E = c.current;
408
- if (!E)
409
- return;
410
- function O(S) {
411
- return ft.reduce((T, b) => (T[b] = S.validity[b], !S.validity.customError && !g.current && (T[b] = b === "valid"), T), {});
412
- }
413
- window.clearTimeout(i.current);
414
- const I = t(R);
415
- let h = null;
416
- typeof I == "object" && I !== null && "then" in I ? h = await I : h = I;
417
- let M = "";
418
- h !== null && (M = Array.isArray(h) ? h.join(`
419
- `) : h), E.setCustomValidity(M);
420
- const X = O(E);
421
- let w = [];
422
- Array.isArray(h) ? w = h : h ? w = [h] : E.validationMessage && (w = [E.validationMessage]);
423
- const _ = {
424
- value: R,
425
- state: X,
426
- error: Array.isArray(h) ? h[0] : h ?? E.validationMessage,
427
- errors: w,
428
- initialValue: r.initialValue
429
- };
430
- if (a) {
431
- const S = s.current.fields.get(a);
432
- S && s.current.fields.set(a, {
433
- ...S,
434
- ...Ce(_, l)
435
- });
436
- }
437
- e(_);
438
- }), y = f.useCallback((R = {}) => G(R, {
439
- ...o.length && {
440
- "aria-describedby": o.join(" ")
441
- },
442
- ...p.valid === !1 && {
443
- "aria-invalid": !0
444
- }
445
- }), [o, p.valid]), C = f.useCallback((R = {}) => G(y(R), {
446
- onChange(E) {
447
- if (E.nativeEvent.defaultPrevented || l || n !== "onChange")
448
- return;
449
- const O = E.currentTarget;
450
- if (O.value === "") {
451
- m(O.value);
452
- return;
453
- }
454
- window.clearTimeout(i.current), u ? i.current = window.setTimeout(() => {
455
- m(O.value);
456
- }, u) : m(O.value);
457
- }
458
- }), [y, l, n, u, m]);
459
- return f.useMemo(() => ({
460
- getValidationProps: y,
461
- getInputValidationProps: C,
462
- inputRef: c,
463
- commitValidation: m
464
- }), [y, C, m]);
465
- }
466
- function ht(e) {
421
+ function St(e) {
467
422
  const {
468
- formRef: t
469
- } = ye(), {
470
- invalid: o,
423
+ enabled: t = !0,
424
+ value: i,
425
+ id: o,
426
+ name: l,
427
+ controlRef: n,
428
+ commit: u
429
+ } = e, {
430
+ formRef: m
431
+ } = Le(), {
432
+ invalid: f,
471
433
  markedDirtyRef: r,
472
- validityData: n,
473
- setValidityData: u
474
- } = Y(), {
475
- value: l,
476
- id: g,
477
- controlRef: a,
478
- commitValidation: p
479
- } = e, s = Ae(e.getValue);
480
- ne(() => {
481
- var c;
482
- let i = l;
483
- i === void 0 && (i = (c = s.current) == null ? void 0 : c.call(s)), n.initialValue === null && i !== n.initialValue && u((m) => ({
484
- ...m,
485
- initialValue: i
434
+ validityData: a,
435
+ setValidityData: s
436
+ } = Ne(), p = L(e.getValue);
437
+ F(() => {
438
+ if (!t)
439
+ return;
440
+ let w = i;
441
+ w === void 0 && (w = p()), a.initialValue === null && w !== null && s((M) => ({
442
+ ...M,
443
+ initialValue: w
486
444
  }));
487
- }, [u, l, n.initialValue, s]), ne(() => {
488
- g && t.current.fields.set(g, {
489
- controlRef: a,
490
- validityData: Ce(n, o),
445
+ }, [t, s, i, a.initialValue, p]), F(() => {
446
+ !t || !o || m.current.fields.set(o, {
447
+ getValue: p,
448
+ name: l,
449
+ controlRef: n,
450
+ validityData: Ct(a, f),
491
451
  validate() {
492
- var c;
493
- let i = l;
494
- i === void 0 && (i = (c = s.current) == null ? void 0 : c.call(s)), r.current = !0, Te.flushSync(() => p(i));
452
+ let w = i;
453
+ w === void 0 && (w = p()), r.current = !0, Be.flushSync(() => u(w));
495
454
  }
496
455
  });
497
- }, [p, a, t, s, g, o, r, n, l]);
498
- }
499
- const L = void 0;
500
- function mt(e) {
456
+ }, [u, n, t, m, p, o, f, r, l, a, i]), F(() => {
457
+ const w = m.current.fields;
458
+ return () => {
459
+ o && w.delete(o);
460
+ };
461
+ }, [m, o]);
462
+ }
463
+ function It(e, t) {
464
+ const i = y.useRef(e), o = L(t);
465
+ F(() => {
466
+ i.current !== e && o(i.current);
467
+ }, [e, o]), F(() => {
468
+ i.current = e;
469
+ }, [e]);
470
+ }
471
+ const xe = /* @__PURE__ */ y.createContext({
472
+ legendId: void 0,
473
+ setLegendId: () => {
474
+ },
475
+ disabled: void 0
476
+ });
477
+ process.env.NODE_ENV !== "production" && (xe.displayName = "FieldsetRootContext");
478
+ function Tt(e = !1) {
479
+ const t = y.useContext(xe);
480
+ if (!t && !e)
481
+ throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>." : we(86));
482
+ return t;
483
+ }
484
+ const Pt = [];
485
+ function At(e) {
501
486
  const {
502
487
  itemSizes: t,
503
- cols: o = 1,
504
- loop: r = !0,
505
- dense: n = !1,
506
- orientation: u = "both",
507
- direction: l,
508
- highlightedIndex: g,
509
- onHighlightedIndexChange: a,
510
- rootRef: p,
511
- enableHomeAndEndKeys: s = !1,
512
- stopEventPropagation: i = !1
513
- } = e, [c, m] = f.useState(0), y = o > 1, C = g ?? c, R = oe(a ?? m), E = f.useRef(l ?? null), O = f.useRef(null), I = Pe(O, p), h = f.useRef([]), M = f.useCallback((X = {}) => G(X, {
514
- "aria-orientation": u === "both" ? void 0 : u,
515
- ref: I,
516
- onKeyDown(w) {
517
- const _ = s ? Je : me;
518
- if (!_.includes(w.key))
519
- return;
520
- const S = O.current;
521
- if (!S)
488
+ cols: i = 1,
489
+ loopFocus: o = !0,
490
+ dense: l = !1,
491
+ orientation: n = "both",
492
+ direction: u,
493
+ highlightedIndex: m,
494
+ onHighlightedIndexChange: f,
495
+ rootRef: r,
496
+ enableHomeAndEndKeys: a = !1,
497
+ stopEventPropagation: s = !1,
498
+ disabledIndices: p,
499
+ modifierKeys: w = Pt
500
+ } = e, [M, b] = y.useState(0), S = i > 1, c = y.useRef(null), E = be(c, r), d = y.useRef([]), h = y.useRef(!1), R = m ?? M, O = L((g, T = !1) => {
501
+ if ((f ?? b)(g), T) {
502
+ const k = d.current[g];
503
+ ye(c.current, k, u, n);
504
+ }
505
+ }), B = L((g) => {
506
+ if (g.size === 0 || h.current)
507
+ return;
508
+ h.current = !0;
509
+ const T = Array.from(g.keys()), k = T.find((C) => C == null ? void 0 : C.hasAttribute(Ye)) ?? null, x = k ? T.indexOf(k) : -1;
510
+ x !== -1 && O(x), ye(c.current, k, u, n);
511
+ }), D = y.useMemo(() => ({
512
+ "aria-orientation": n === "both" ? void 0 : n,
513
+ ref: E,
514
+ onFocus(g) {
515
+ !c.current || !Re(g.target) || g.target.setSelectionRange(0, g.target.value.length ?? 0);
516
+ },
517
+ onKeyDown(g) {
518
+ const T = a ? Et : Pe;
519
+ if (!T.has(g.key) || _t(g, w) || !c.current)
522
520
  return;
523
- (E == null ? void 0 : E.current) == null && (E.current = ot(S));
524
- const T = E.current === "rtl";
525
- let b = C;
526
- const F = Xe(h, L), j = Ze(h, L);
527
- if (y) {
528
- const H = t || Array.from({
529
- length: h.current.length
521
+ const x = u === "rtl", C = x ? se : ee, W = {
522
+ horizontal: C,
523
+ vertical: X,
524
+ both: C
525
+ }[n], z = x ? ee : se, N = {
526
+ horizontal: z,
527
+ vertical: Q,
528
+ both: z
529
+ }[n];
530
+ if (Re(g.target) && !at(g.target)) {
531
+ const P = g.target.selectionStart, H = g.target.selectionEnd, q = g.target.value ?? "";
532
+ if (P == null || g.shiftKey || P !== H || g.key !== N && P < q.length || g.key !== W && P > 0)
533
+ return;
534
+ }
535
+ let I = R;
536
+ const U = ft(d, p), Y = dt(d, p);
537
+ if (S) {
538
+ const P = t || Array.from({
539
+ length: d.current.length
530
540
  }, () => ({
531
541
  width: 1,
532
542
  height: 1
533
- })), A = et(H, o, n), we = A.findIndex((D) => D != null && !B(h.current, D, L)), Oe = A.reduce((D, K, Ie) => K != null && !B(h.current, K, L) ? Ie : D, -1);
534
- b = A[Qe({
535
- current: A.map((D) => D ? h.current[D] : null)
543
+ })), H = ht(P, i, l), q = H.findIndex((K) => K != null && !Z(d, K, p)), ne = H.reduce((K, $, ue) => $ != null && !Z(d, $, p) ? ue : K, -1);
544
+ I = H[gt({
545
+ current: H.map((K) => K ? d.current[K] : null)
536
546
  }, {
537
- event: w,
538
- orientation: u,
539
- loop: r,
540
- cols: o,
547
+ event: g,
548
+ orientation: n,
549
+ loopFocus: o,
550
+ cols: i,
541
551
  // treat undefined (empty grid spaces) as disabled indices so we
542
552
  // don't end up in them
543
- disabledIndices: nt([...h.current.map((D, K) => B(h.current, K) ? K : void 0), void 0], A),
544
- minIndex: we,
545
- maxIndex: Oe,
546
- prevIndex: tt(
547
- C > j ? F : C,
553
+ disabledIndices: mt([...p || d.current.map((K, $) => Z(d, $) ? $ : void 0), void 0], H),
554
+ minIndex: q,
555
+ maxIndex: ne,
556
+ prevIndex: pt(
557
+ R > Y ? U : R,
558
+ P,
548
559
  H,
549
- A,
550
- o,
560
+ i,
551
561
  // use a corner matching the edge closest to the direction we're
552
562
  // moving in so we don't end up in the same item. Prefer
553
563
  // top/left over bottom/right.
554
564
  // eslint-disable-next-line no-nested-ternary
555
- w.key === k ? "bl" : w.key === x ? "tr" : "tl"
565
+ g.key === X ? "bl" : g.key === ee ? "tr" : "tl"
556
566
  ),
557
- rtl: T
567
+ rtl: x
558
568
  })];
559
569
  }
560
- const re = T ? v : x, ie = {
561
- horizontal: [re],
562
- vertical: [k],
563
- both: [re, k]
564
- }[u], ae = T ? x : v, Z = {
565
- horizontal: [ae],
566
- vertical: [z],
567
- both: [ae, z]
568
- }[u], be = y ? _ : {
569
- horizontal: s ? Ye : ge,
570
- vertical: s ? qe : he,
571
- both: _
572
- }[u];
573
- s && (w.key === q ? b = F : w.key === J && (b = j)), b === C && [...ie, ...Z].includes(w.key) && (r && b === j && ie.includes(w.key) ? b = F : r && b === F && Z.includes(w.key) ? b = j : b = N(h, {
574
- startingIndex: b,
575
- decrement: Z.includes(w.key),
576
- disabledIndices: L
577
- })), b !== C && !W(h, b) && (i && w.stopPropagation(), be.includes(w.key) && w.preventDefault(), R(b), queueMicrotask(() => {
578
- var H;
579
- (H = h.current[b]) == null || H.focus();
570
+ const G = {
571
+ horizontal: [C],
572
+ vertical: [X],
573
+ both: [C, X]
574
+ }[n], v = {
575
+ horizontal: [z],
576
+ vertical: [Q],
577
+ both: [z, Q]
578
+ }[n], te = S ? T : {
579
+ horizontal: a ? Rt : Ie,
580
+ vertical: a ? yt : Te,
581
+ both: T
582
+ }[n];
583
+ a && (g.key === ae ? I = U : g.key === le && (I = Y)), I === R && (G.includes(g.key) || v.includes(g.key)) && (o && I === Y && G.includes(g.key) ? I = U : o && I === U && v.includes(g.key) ? I = Y : I = _(d, {
584
+ startingIndex: I,
585
+ decrement: v.includes(g.key),
586
+ disabledIndices: p
587
+ })), I !== R && !ie(d, I) && (s && g.stopPropagation(), te.has(g.key) && g.preventDefault(), O(I, !0), queueMicrotask(() => {
588
+ var P;
589
+ (P = d.current[I]) == null || P.focus();
580
590
  }));
581
591
  }
582
- }), [C, i, o, n, h, y, t, r, I, R, u, s]);
583
- return f.useMemo(() => ({
584
- getRootProps: M,
585
- highlightedIndex: C,
586
- onHighlightedIndexChange: R,
587
- elementsRef: h
588
- }), [M, C, R, h]);
589
- }
590
- function Ee(e) {
592
+ }), [i, l, u, p, d, a, R, S, t, o, E, w, O, n, s]);
593
+ return y.useMemo(() => ({
594
+ props: D,
595
+ highlightedIndex: R,
596
+ onHighlightedIndexChange: O,
597
+ elementsRef: d,
598
+ disabledIndices: p,
599
+ onMapChange: B,
600
+ relayKeyboardEvent: D.onKeyDown
601
+ }), [D, R, O, d, p, B]);
602
+ }
603
+ function _t(e, t) {
604
+ for (const i of Nt.values())
605
+ if (!t.includes(i) && e.getModifierState(i))
606
+ return !0;
607
+ return !1;
608
+ }
609
+ function Lt(e) {
591
610
  const {
592
611
  render: t,
593
- className: o,
594
- highlightedIndex: r,
595
- onHighlightedIndexChange: n,
596
- orientation: u,
597
- dense: l,
598
- itemSizes: g,
599
- loop: a,
600
- cols: p,
601
- direction: s,
602
- enableHomeAndEndKeys: i,
603
- onMapChange: c,
604
- stopEventPropagation: m,
605
- rootRef: y,
606
- ...C
607
- } = e, {
608
- getRootProps: R,
609
- highlightedIndex: E,
610
- onHighlightedIndexChange: O,
611
- elementsRef: I
612
- } = mt({
613
- itemSizes: g,
614
- cols: p,
615
- loop: a,
616
- dense: l,
617
- orientation: u,
618
- highlightedIndex: r,
619
- onHighlightedIndexChange: n,
620
- rootRef: y,
621
- stopEventPropagation: m,
622
- enableHomeAndEndKeys: i,
623
- direction: s
624
- }), {
625
- renderElement: h
626
- } = ce({
627
- propGetter: R,
628
- render: t ?? "div",
629
- state: {},
630
- className: o,
631
- extraProps: C
632
- }), M = f.useMemo(() => ({
633
- highlightedIndex: E,
634
- onHighlightedIndexChange: O
635
- }), [E, O]);
636
- return /* @__PURE__ */ V(ke.Provider, {
637
- value: M,
638
- children: /* @__PURE__ */ V(de, {
639
- elementsRef: I,
640
- onMapChange: c,
641
- children: h()
612
+ className: i,
613
+ refs: o = pe,
614
+ props: l = pe,
615
+ state: n = Ge,
616
+ stateAttributesMapping: u,
617
+ highlightedIndex: m,
618
+ onHighlightedIndexChange: f,
619
+ orientation: r,
620
+ dense: a,
621
+ itemSizes: s,
622
+ loopFocus: p,
623
+ cols: w,
624
+ enableHomeAndEndKeys: M,
625
+ onMapChange: b,
626
+ stopEventPropagation: S = !0,
627
+ rootRef: c,
628
+ disabledIndices: E,
629
+ modifierKeys: d,
630
+ highlightItemOnHover: h = !1,
631
+ tag: R = "div",
632
+ ...O
633
+ } = e, B = st(), {
634
+ props: D,
635
+ highlightedIndex: g,
636
+ onHighlightedIndexChange: T,
637
+ elementsRef: k,
638
+ onMapChange: x,
639
+ relayKeyboardEvent: C
640
+ } = At({
641
+ itemSizes: s,
642
+ cols: w,
643
+ loopFocus: p,
644
+ dense: a,
645
+ orientation: r,
646
+ highlightedIndex: m,
647
+ onHighlightedIndexChange: f,
648
+ rootRef: c,
649
+ stopEventPropagation: S,
650
+ enableHomeAndEndKeys: M,
651
+ direction: B,
652
+ disabledIndices: E,
653
+ modifierKeys: d
654
+ }), W = $e(R, e, {
655
+ state: n,
656
+ ref: o,
657
+ props: [D, ...l, O],
658
+ stateAttributesMapping: u
659
+ }), z = y.useMemo(() => ({
660
+ highlightedIndex: g,
661
+ onHighlightedIndexChange: T,
662
+ highlightItemOnHover: h,
663
+ relayKeyboardEvent: C
664
+ }), [g, T, h, C]);
665
+ return /* @__PURE__ */ V(ve.Provider, {
666
+ value: z,
667
+ children: /* @__PURE__ */ V(nt, {
668
+ elementsRef: k,
669
+ onMapChange: (N) => {
670
+ b == null || b(N), x(N);
671
+ },
672
+ children: W
642
673
  })
643
674
  });
644
675
  }
645
- process.env.NODE_ENV !== "production" && (Ee.propTypes = {
646
- // ┌────────────────────────────── Warning ──────────────────────────────┐
647
- // │ These PropTypes are generated from the TypeScript type definitions. │
648
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
649
- // └─────────────────────────────────────────────────────────────────────┘
650
- /**
651
- * @ignore
652
- */
653
- children: d.node,
654
- /**
655
- * CSS class applied to the element, or a function that
656
- * returns a class based on the component’s state.
657
- */
658
- className: d.oneOfType([d.func, d.string]),
659
- /**
660
- * @ignore
661
- */
662
- cols: d.number,
663
- /**
664
- * @ignore
665
- */
666
- dense: d.bool,
667
- /**
668
- * @ignore
669
- */
670
- direction: d.oneOf(["ltr", "rtl"]),
671
- /**
672
- * @ignore
673
- */
674
- enableHomeAndEndKeys: d.bool,
675
- /**
676
- * @ignore
677
- */
678
- highlightedIndex: d.number,
679
- /**
680
- * @ignore
681
- */
682
- itemSizes: d.arrayOf(d.shape({
683
- height: d.number.isRequired,
684
- width: d.number.isRequired
685
- })),
686
- /**
687
- * @ignore
688
- */
689
- loop: d.bool,
690
- /**
691
- * @ignore
692
- */
693
- onHighlightedIndexChange: d.func,
694
- /**
695
- * @ignore
696
- */
697
- onMapChange: d.func,
698
- /**
699
- * @ignore
700
- */
701
- orientation: d.oneOf(["both", "horizontal", "vertical"]),
702
- /**
703
- * Allows you to replace the component’s HTML element
704
- * with a different tag, or compose it with another component.
705
- *
706
- * Accepts a `ReactElement` or a function that returns the element to render.
707
- */
708
- render: d.oneOfType([d.element, d.func]),
709
- /**
710
- * @ignore
711
- */
712
- rootRef: ve,
713
- /**
714
- * @ignore
715
- */
716
- stopEventPropagation: d.bool
717
- });
718
- function pt(e) {
676
+ const xt = [Ae], De = /* @__PURE__ */ y.forwardRef(function(t, i) {
719
677
  const {
720
- disabled: t = !1,
721
- name: o,
722
- defaultValue: r,
723
- readOnly: n,
724
- value: u
725
- } = e, {
726
- labelId: l,
727
- setTouched: g,
728
- setFocused: a,
729
- validationMode: p
730
- } = Y(), s = gt(), i = st(), [c, m] = Ue({
731
- controlled: u,
732
- default: r,
678
+ render: o,
679
+ className: l,
680
+ disabled: n,
681
+ readOnly: u,
682
+ required: m,
683
+ onValueChange: f,
684
+ value: r,
685
+ defaultValue: a,
686
+ name: s,
687
+ inputRef: p,
688
+ id: w,
689
+ ...M
690
+ } = t, {
691
+ setTouched: b,
692
+ setFocused: S,
693
+ shouldValidateOnChange: c,
694
+ validationMode: E,
695
+ name: d,
696
+ disabled: h,
697
+ state: R,
698
+ validation: O,
699
+ setDirty: B,
700
+ setFilled: D,
701
+ validityData: g
702
+ } = Ne(), {
703
+ labelId: T
704
+ } = je(), {
705
+ clearErrors: k
706
+ } = Le(), x = Tt(!0), C = h || n, W = d ?? s, z = Je(w), [N, I] = tt({
707
+ controlled: r,
708
+ default: a,
733
709
  name: "RadioGroup",
734
710
  state: "value"
711
+ }), U = L(f), Y = L((A, ge) => {
712
+ U(A, ge), !ge.isCanceled && I(A);
713
+ }), G = y.useRef(null), v = L((A) => {
714
+ G.current == null && A != null && (G.current = A);
735
715
  });
736
- ht({
737
- id: i,
738
- commitValidation: s.commitValidation,
739
- value: c,
740
- controlRef: s.inputRef
716
+ St({
717
+ id: z,
718
+ commit: O.commit,
719
+ value: N,
720
+ controlRef: G,
721
+ name: W,
722
+ getValue: () => N ?? null
723
+ }), It(N, () => {
724
+ k(W), B(N !== g.initialValue), D(N != null), c() ? O.commit(N) : O.commit(N, !0);
741
725
  });
742
- const [y, C] = f.useState(!1), R = f.useCallback((I = {}) => G(s.getValidationProps(I), {
743
- role: "radiogroup",
744
- "aria-disabled": t || void 0,
745
- "aria-readonly": n || void 0,
746
- "aria-labelledby": l,
726
+ const [te, P] = y.useState(!1), H = L((A) => {
727
+ ct(A.currentTarget, A.relatedTarget) || (b(!0), S(!1), E === "onBlur" && O.commit(N));
728
+ }), q = L((A) => {
729
+ A.key.startsWith("Arrow") && (b(!0), P(!0), S(!0));
730
+ }), ne = y.useMemo(() => N == null ? "" : typeof N == "string" ? N : JSON.stringify(N), [N]), K = be(O.inputRef, p), $ = Xe({
731
+ value: ne,
732
+ ref: K,
733
+ id: z,
734
+ name: ne ? W : void 0,
735
+ disabled: C,
736
+ readOnly: u,
737
+ required: m,
738
+ "aria-labelledby": M["aria-labelledby"] ?? (x == null ? void 0 : x.legendId),
739
+ "aria-hidden": !0,
740
+ tabIndex: -1,
741
+ style: Qe,
742
+ onChange: Oe,
743
+ // suppress a Next.js error
747
744
  onFocus() {
748
- a(!0);
749
- },
750
- onBlur(h) {
751
- dt(h.currentTarget, h.relatedTarget) || (g(!0), a(!1), p === "onBlur" && s.commitValidation(c));
752
- },
753
- onKeyDownCapture(h) {
754
- h.key.startsWith("Arrow") && (g(!0), C(!0), a(!0));
745
+ var A;
746
+ (A = G.current) == null || A.focus();
755
747
  }
756
- }), [s, t, n, l, a, g, p, c]), E = f.useMemo(() => c == null ? "" : typeof c == "string" ? c : JSON.stringify(c), [c]), O = f.useCallback((I = {}) => G(s.getInputValidationProps(I), {
757
- type: "hidden",
758
- value: E,
759
- ref: s.inputRef,
760
- id: i,
761
- name: o,
762
- disabled: t,
763
- readOnly: n
764
- }), [s, E, i, o, t, n]);
765
- return f.useMemo(() => ({
766
- getRootProps: R,
767
- getInputProps: O,
768
- checkedValue: c,
769
- setCheckedValue: m,
770
- touched: y,
771
- setTouched: C,
772
- fieldControlValidation: s
773
- }), [R, O, c, m, y, s]);
774
- }
775
- const Re = /* @__PURE__ */ f.forwardRef(function(t, o) {
776
- const {
777
- render: r,
778
- className: n,
779
- disabled: u,
780
- readOnly: l,
781
- required: g,
782
- onValueChange: a,
783
- name: p,
784
- ...s
785
- } = t, i = je(), c = pt(t), {
786
- state: m,
787
- disabled: y
788
- } = Y(), C = y || u, R = oe(a ?? (() => {
789
- })), E = f.useMemo(() => ({
790
- ...m,
748
+ }, O.getInputValidationProps), ue = y.useMemo(() => ({
749
+ ...R,
791
750
  disabled: C ?? !1,
792
- required: g ?? !1,
793
- readOnly: l ?? !1
794
- }), [m, C, l, g]), O = f.useMemo(() => ({
795
- ...m,
796
- ...c,
797
- onValueChange: R,
751
+ required: m ?? !1,
752
+ readOnly: u ?? !1
753
+ }), [R, C, u, m]), Ve = y.useMemo(() => ({
754
+ ...R,
755
+ checkedValue: N,
798
756
  disabled: C,
799
- readOnly: l,
800
- required: g
801
- }), [m, C, R, c, l, g]), {
802
- renderElement: I
803
- } = ce({
804
- propGetter: c.getRootProps,
805
- render: r ?? "div",
806
- ref: o,
807
- className: n,
808
- state: E,
809
- extraProps: s,
810
- customStyleHookMapping: Ke
811
- });
812
- return /* @__PURE__ */ le(He.Provider, {
813
- value: O,
814
- children: [/* @__PURE__ */ V(Ee, {
815
- direction: i,
757
+ validation: O,
758
+ name: W,
759
+ onValueChange: U,
760
+ readOnly: u,
761
+ registerControlRef: v,
762
+ required: m,
763
+ setCheckedValue: Y,
764
+ setTouched: P,
765
+ touched: te
766
+ }), [N, C, O, R, W, U, u, v, m, Y, P, te]), ke = {
767
+ role: "radiogroup",
768
+ "aria-required": m || void 0,
769
+ "aria-disabled": C || void 0,
770
+ "aria-readonly": u || void 0,
771
+ "aria-labelledby": T,
772
+ onFocus() {
773
+ S(!0);
774
+ },
775
+ onBlur: H,
776
+ onKeyDownCapture: q
777
+ };
778
+ return /* @__PURE__ */ Me(qe.Provider, {
779
+ value: Ve,
780
+ children: [/* @__PURE__ */ V(Lt, {
781
+ render: o,
782
+ className: l,
783
+ state: ue,
784
+ props: [ke, O.getValidationProps, M],
785
+ refs: [i],
786
+ stateAttributesMapping: Ze,
816
787
  enableHomeAndEndKeys: !1,
817
- render: I()
788
+ modifierKeys: xt
818
789
  }), /* @__PURE__ */ V("input", {
819
- ...c.getInputProps()
790
+ ...$
820
791
  })]
821
792
  });
822
793
  });
823
- process.env.NODE_ENV !== "production" && (Re.propTypes = {
824
- // ┌────────────────────────────── Warning ──────────────────────────────┐
825
- // │ These PropTypes are generated from the TypeScript type definitions. │
826
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
827
- // └─────────────────────────────────────────────────────────────────────┘
828
- /**
829
- * @ignore
830
- */
831
- children: d.node,
832
- /**
833
- * CSS class applied to the element, or a function that
834
- * returns a class based on the component’s state.
835
- */
836
- className: d.oneOfType([d.func, d.string]),
837
- /**
838
- * The uncontrolled value of the radio button that should be initially selected.
839
- *
840
- * To render a controlled radio group, use the `value` prop instead.
841
- */
842
- defaultValue: d.any,
843
- /**
844
- * Whether the component should ignore user interaction.
845
- * @default false
846
- */
847
- disabled: d.bool,
848
- /**
849
- * Identifies the field when a form is submitted.
850
- */
851
- name: d.string,
852
- /**
853
- * Callback fired when the value changes.
854
- */
855
- onValueChange: d.func,
856
- /**
857
- * Whether the user should be unable to select a different radio button in the group.
858
- * @default false
859
- */
860
- readOnly: d.bool,
861
- /**
862
- * Allows you to replace the component’s HTML element
863
- * with a different tag, or compose it with another component.
864
- *
865
- * Accepts a `ReactElement` or a function that returns the element to render.
866
- */
867
- render: d.oneOfType([d.element, d.func]),
868
- /**
869
- * Whether the user must choose a value before submitting a form.
870
- * @default false
871
- */
872
- required: d.bool,
873
- /**
874
- * The controlled value of the radio item that should be currently selected.
875
- *
876
- * To render an uncontrolled radio group, use the `defaultValue` prop instead.
877
- */
878
- value: d.any
879
- });
880
- const zt = ({
794
+ process.env.NODE_ENV !== "production" && (De.displayName = "RadioGroup");
795
+ const on = ({
881
796
  className: e,
882
797
  name: t,
883
- label: o,
884
- disabled: r,
885
- defaultValue: n,
886
- checked: u,
887
- "data-testid": l = "radio-button-group",
888
- onChange: g,
889
- children: a
798
+ label: i,
799
+ disabled: o,
800
+ defaultValue: l,
801
+ checked: n,
802
+ "data-testid": u = "radio-button-group",
803
+ onChange: m,
804
+ children: f
890
805
  }) => {
891
- a || console.error(
806
+ f || console.error(
892
807
  "[Marola - Radio Button component]A new component version using RadioGroup is available. Please use that instead."
893
808
  );
894
- const [p, s] = Ve(u), i = Q(P["legacy-radio--input"], r && P["legacy-radio--input__disabled"]), c = Q(P["legacy-radio--label"], r && P["legacy-radio--label__disabled"]), m = Q(P["legacy-radio"], r && P["legacy-radio--disabled"], e);
895
- Se(() => {
896
- s(u);
897
- }, [u]);
898
- const y = () => {
899
- if (r)
809
+ const [r, a] = Ke(n), s = ce(j["legacy-radio--input"], o && j["legacy-radio--input__disabled"]), p = ce(j["legacy-radio--label"], o && j["legacy-radio--label__disabled"]), w = ce(j["legacy-radio"], o && j["legacy-radio--disabled"], e);
810
+ Fe(() => {
811
+ a(n);
812
+ }, [n]);
813
+ const M = () => {
814
+ if (o)
900
815
  return;
901
- const C = !p;
902
- s(C), g(C);
816
+ const b = !r;
817
+ a(b), m(b);
903
818
  };
904
- return a ? /* @__PURE__ */ V(Ne, { children: /* @__PURE__ */ V(
905
- Re,
819
+ return f ? /* @__PURE__ */ V(He, { children: /* @__PURE__ */ V(
820
+ De,
906
821
  {
907
- "data-testid": l,
908
- onValueChange: g,
822
+ "data-testid": u,
823
+ onValueChange: (b, S) => m(b, S.event),
909
824
  name: t,
910
- defaultValue: n,
825
+ defaultValue: l,
911
826
  className: e,
912
- children: a
827
+ children: f
913
828
  }
914
- ) }) : /* @__PURE__ */ le("div", { "data-testid": l, onClick: () => y(), className: m, children: [
915
- /* @__PURE__ */ V("input", { name: t, type: "radio", checked: p, readOnly: !0 }),
916
- /* @__PURE__ */ V("span", { className: i, children: p && /* @__PURE__ */ V(De, { icon: "circle", color: "var(--accent)", size: 8 }) }),
917
- /* @__PURE__ */ V(Me, { className: c, variant: "base-lg", children: o })
829
+ ) }) : /* @__PURE__ */ Me("div", { "data-testid": u, onClick: () => M(), className: w, children: [
830
+ /* @__PURE__ */ V("input", { name: t, type: "radio", checked: r, readOnly: !0 }),
831
+ /* @__PURE__ */ V("span", { className: s, children: r && /* @__PURE__ */ V(We, { icon: "circle", color: "var(--accent)", size: 8 }) }),
832
+ /* @__PURE__ */ V(ze, { className: p, variant: "base-lg", children: i })
918
833
  ] });
919
834
  };
920
835
  export {
921
- zt as RadioButton,
922
- Ut as RadioOption
836
+ on as RadioButton,
837
+ ln as RadioOption
923
838
  };