@midas-ds/components 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{Button-B4vMZbC6.js → Button-DL6nqUco.js} +22 -22
- package/CHANGELOG.md +6 -1
- package/{Checkbox-DnKWanep.js → Checkbox-q0dugR2t.js} +8 -8
- package/{Collection-COLWgm24.js → Collection-KMFfVuzU.js} +2 -2
- package/{Dialog-Cb6toyXO.js → Dialog-D6Bqrpn-.js} +170 -169
- package/Disclosure-dAZYXyTH.js +225 -0
- package/Disclosure.css +1 -0
- package/{FocusScope-C8i7CH6y.js → FocusScope-B7CkxXNC.js} +1 -1
- package/{Form-BQQs3jUk.js → Form-BWBjJC6v.js} +42 -42
- package/{Group-CdwXhx8Q.js → Group-D7_8007y.js} +10 -10
- package/Heading-RCRHv6hd.js +15 -0
- package/{Hidden-DngIphiL.js → Hidden-CVlUgUJM.js} +1 -1
- package/{Link-iAZLB3RI.js → Link-BnQvB-hH.js} +8 -8
- package/{ListBox-BKWkIIm6.js → ListBox-DBBiqvcR.js} +72 -72
- package/{ListKeyboardDelegate-BH-K5hyq.js → ListKeyboardDelegate-gCXy-Xnn.js} +2 -2
- package/{PressResponder-Cz-TRBHO.js → PressResponder-B4g56kDz.js} +5 -5
- package/{RSPContexts-EOiWkKOf.js → RSPContexts-BW2SEIqe.js} +2 -2
- package/{SelectionManager-8o40f7mx.js → SelectionManager-BfXUE1qg.js} +113 -129
- package/{Separator-BlvmQjwz.js → Separator-BBX9m2O2.js} +2 -2
- package/{Tag--W5TgxmK.js → Tag-DWt0koFj.js} +74 -74
- package/Text-BCF0xvqL.js +15 -0
- package/{TextField-DeK_yiK-.js → TextField-CX4eOQf6.js} +33 -33
- package/{TextField.module-0-u4LVPp.js → TextField.module-DdICj682.js} +7 -7
- package/{VisuallyHidden-CFx06Bae.js → VisuallyHidden-Dhr5caPC.js} +1 -1
- package/accordion/Accordion.d.ts +8 -8
- package/accordion/AccordionItem.d.ts +11 -3
- package/accordion/index.d.ts +0 -3
- package/{context-Bnqknrce.js → context-BpJLnOuu.js} +11 -11
- package/global.css +1 -0
- package/index.d.ts +1 -0
- package/index.js +105 -110
- package/index10.js +1 -1
- package/index11.js +1 -1
- package/index12.js +1 -1
- package/index13.js +1 -1
- package/index14.js +1 -1
- package/index15.js +2 -2
- package/index16.js +2 -2
- package/index17.js +1 -1
- package/index18.js +1 -1
- package/index19.js +2 -2
- package/index2.js +1 -1
- package/index20.js +2 -2
- package/index21.js +1 -1
- package/index22.js +1 -1
- package/index23.js +1 -1
- package/index24.js +1 -1
- package/index25.js +2 -2
- package/index26.js +2 -2
- package/index27.js +2 -2
- package/index28.js +1 -1
- package/index29.js +2 -8
- package/index3.js +1 -1
- package/index30.js +17 -16
- package/index31.js +1 -1
- package/index32.js +1 -1
- package/index33.js +1 -1
- package/index34.js +2 -2
- package/index36.js +1 -1
- package/index37.js +1 -1
- package/index38.js +1 -1
- package/index39.js +1 -1
- package/index4.js +1 -1
- package/index40.js +19 -12
- package/index41.js +61 -14
- package/index42.js +44 -22
- package/index43.js +13 -11
- package/index44.js +25 -4
- package/index45.js +16 -51
- package/index46.js +19 -16
- package/index47.js +49 -27
- package/index48.js +5 -18
- package/index49.js +25 -21
- package/index5.js +1 -1
- package/index50.js +16 -47
- package/index51.js +7 -3
- package/index52.js +18 -18
- package/index53.js +16 -16
- package/index54.js +5 -3
- package/index55.js +7 -20
- package/index56.js +13 -16
- package/index57.js +6 -8
- package/index58.js +5 -8
- package/index59.js +17 -13
- package/index6.js +1 -1
- package/index60.js +20 -7
- package/index61.js +59 -7
- package/index62.js +13 -17
- package/index63.js +9 -20
- package/index64.js +38 -46
- package/index65.js +85 -15
- package/index66.js +74 -11
- package/index67.js +23 -62
- package/index68.js +64 -80
- package/index69.js +68 -62
- package/index7.js +1 -1
- package/index70.js +138 -22
- package/index71.js +66 -65
- package/index72.js +40 -78
- package/index73.js +75 -133
- package/index74.js +69 -68
- package/index75.js +96 -34
- package/index76.js +258 -65
- package/index77.js +715 -63
- package/index78.js +478 -93
- package/index79.js +303 -263
- package/index8.js +1 -1
- package/index80.js +343 -677
- package/index81.js +242 -479
- package/index82.js +1332 -282
- package/index83.js +966 -346
- package/index84.js +344 -210
- package/index85.js +2024 -1286
- package/index86.js +2314 -955
- package/index87.js +6785 -340
- package/index88.js +15 -2099
- package/index89.js +12 -2367
- package/index9.js +1 -1
- package/index90.js +4 -6834
- package/index91.js +7 -15
- package/package.json +1 -1
- package/useControlledState-Kv9K2AYu.js +30 -0
- package/{useDescription-BPs7eRff.js → useDescription-B7stiK3j.js} +1 -1
- package/useEvent-Xk5kn5Ns.js +21 -0
- package/{useField-Dz62UHCP.js → useField-DMzJIIN4.js} +5 -5
- package/{useFilter-ViwzkzZe.js → useFilter-Bt9dbV1U.js} +1 -1
- package/{useFocusRing-BKGhL91C.js → useFocusRing-9PXyKy2A.js} +26 -26
- package/{useFocusable-CRSmYEQc.js → useFocusable-CcEBZe40.js} +1 -1
- package/{useGridSelectionCheckbox-CVEvUCJL.js → useGridSelectionCheckbox-DYgEnElE.js} +3 -3
- package/{useHasTabbableChild-C8y4fwiY.js → useHasTabbableChild-D6DwR81L.js} +5 -5
- package/{useHighlightSelectionDescription-CD74uzLh.js → useHighlightSelectionDescription-WYAbP4No.js} +4 -4
- package/useLabels-9zaZ9oa0.js +17 -0
- package/{useListState-DKnP5TB5.js → useListState-BfTeKTk5.js} +1 -1
- package/{useLocalizedStringFormatter-DsZ-ZWSk.js → useLocalizedStringFormatter-BlCbn-hX.js} +1 -1
- package/{useSingleSelectListState-BHTLh8Ob.js → useSingleSelectListState-DPkaL0la.js} +2 -2
- package/Text-CQPW6xs7.js +0 -15
- package/accordion/AccordionContent.d.ts +0 -3
- package/accordion/AccordionTagContext.d.ts +0 -3
- package/accordion/AccordionTrigger.d.ts +0 -3
- package/index-DK9ZACEc.js +0 -642
- package/index.css +0 -1
- package/index92.js +0 -14
- package/index93.js +0 -6
- package/index94.js +0 -9
- package/useControlledState-DrAoodI6.js +0 -45
package/index-DK9ZACEc.js
DELETED
|
@@ -1,642 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import R from "react";
|
|
3
|
-
import { jsx as u, Fragment as he } from "react/jsx-runtime";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import './index.css';const Ae = '"../theme/tokens.css"', be = '"Inter", sans-serif', Re = "#bfbfbf", _e = "#e6e6e6", Ne = "#000000", ye = "300ms", Ie = "400", xe = "_root_nq4cs_4", Pe = "_trigger_nq4cs_8", we = "_item_nq4cs_34", Se = "_content_nq4cs_52", Ee = "_slideDown_nq4cs_1", Me = "_slideUp_nq4cs_1", Oe = "_header_nq4cs_90", Te = "_triggerText_nq4cs_94", mn = {
|
|
6
|
-
tokens: Ae,
|
|
7
|
-
display: be,
|
|
8
|
-
gray50: Re,
|
|
9
|
-
gray20: _e,
|
|
10
|
-
black: Ne,
|
|
11
|
-
normalTransition: ye,
|
|
12
|
-
regularWeight: Ie,
|
|
13
|
-
root: xe,
|
|
14
|
-
trigger: Pe,
|
|
15
|
-
item: we,
|
|
16
|
-
content: Se,
|
|
17
|
-
slideDown: Ee,
|
|
18
|
-
slideUp: Me,
|
|
19
|
-
header: Oe,
|
|
20
|
-
triggerText: Te
|
|
21
|
-
};
|
|
22
|
-
function V(e, n = []) {
|
|
23
|
-
let t = [];
|
|
24
|
-
function o(c, s) {
|
|
25
|
-
const a = i.createContext(s), d = t.length;
|
|
26
|
-
t = [...t, s];
|
|
27
|
-
const l = (f) => {
|
|
28
|
-
var b;
|
|
29
|
-
const { scope: v, children: m, ...g } = f, h = ((b = v == null ? void 0 : v[e]) == null ? void 0 : b[d]) || a, A = i.useMemo(() => g, Object.values(g));
|
|
30
|
-
return /* @__PURE__ */ u(h.Provider, { value: A, children: m });
|
|
31
|
-
};
|
|
32
|
-
l.displayName = c + "Provider";
|
|
33
|
-
function C(f, v) {
|
|
34
|
-
var h;
|
|
35
|
-
const m = ((h = v == null ? void 0 : v[e]) == null ? void 0 : h[d]) || a, g = i.useContext(m);
|
|
36
|
-
if (g) return g;
|
|
37
|
-
if (s !== void 0) return s;
|
|
38
|
-
throw new Error(`\`${f}\` must be used within \`${c}\``);
|
|
39
|
-
}
|
|
40
|
-
return [l, C];
|
|
41
|
-
}
|
|
42
|
-
const r = () => {
|
|
43
|
-
const c = t.map((s) => i.createContext(s));
|
|
44
|
-
return function(a) {
|
|
45
|
-
const d = (a == null ? void 0 : a[e]) || c;
|
|
46
|
-
return i.useMemo(
|
|
47
|
-
() => ({ [`__scope${e}`]: { ...a, [e]: d } }),
|
|
48
|
-
[a, d]
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
return r.scopeName = e, [o, De(r, ...n)];
|
|
53
|
-
}
|
|
54
|
-
function De(...e) {
|
|
55
|
-
const n = e[0];
|
|
56
|
-
if (e.length === 1) return n;
|
|
57
|
-
const t = () => {
|
|
58
|
-
const o = e.map((r) => ({
|
|
59
|
-
useScope: r(),
|
|
60
|
-
scopeName: r.scopeName
|
|
61
|
-
}));
|
|
62
|
-
return function(c) {
|
|
63
|
-
const s = o.reduce((a, { useScope: d, scopeName: l }) => {
|
|
64
|
-
const f = d(c)[`__scope${l}`];
|
|
65
|
-
return { ...a, ...f };
|
|
66
|
-
}, {});
|
|
67
|
-
return i.useMemo(() => ({ [`__scope${n.scopeName}`]: s }), [s]);
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
return t.scopeName = n.scopeName, t;
|
|
71
|
-
}
|
|
72
|
-
function Y(e, n) {
|
|
73
|
-
if (typeof e == "function")
|
|
74
|
-
return e(n);
|
|
75
|
-
e != null && (e.current = n);
|
|
76
|
-
}
|
|
77
|
-
function Z(...e) {
|
|
78
|
-
return (n) => {
|
|
79
|
-
let t = !1;
|
|
80
|
-
const o = e.map((r) => {
|
|
81
|
-
const c = Y(r, n);
|
|
82
|
-
return !t && typeof c == "function" && (t = !0), c;
|
|
83
|
-
});
|
|
84
|
-
if (t)
|
|
85
|
-
return () => {
|
|
86
|
-
for (let r = 0; r < o.length; r++) {
|
|
87
|
-
const c = o[r];
|
|
88
|
-
typeof c == "function" ? c() : Y(e[r], null);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
function x(...e) {
|
|
94
|
-
return i.useCallback(Z(...e), e);
|
|
95
|
-
}
|
|
96
|
-
var S = i.forwardRef((e, n) => {
|
|
97
|
-
const { children: t, ...o } = e, r = i.Children.toArray(t), c = r.find(Le);
|
|
98
|
-
if (c) {
|
|
99
|
-
const s = c.props.children, a = r.map((d) => d === c ? i.Children.count(s) > 1 ? i.Children.only(null) : i.isValidElement(s) ? s.props.children : null : d);
|
|
100
|
-
return /* @__PURE__ */ u(L, { ...o, ref: n, children: i.isValidElement(s) ? i.cloneElement(s, void 0, a) : null });
|
|
101
|
-
}
|
|
102
|
-
return /* @__PURE__ */ u(L, { ...o, ref: n, children: t });
|
|
103
|
-
});
|
|
104
|
-
S.displayName = "Slot";
|
|
105
|
-
var L = i.forwardRef((e, n) => {
|
|
106
|
-
const { children: t, ...o } = e;
|
|
107
|
-
if (i.isValidElement(t)) {
|
|
108
|
-
const r = Ve(t);
|
|
109
|
-
return i.cloneElement(t, {
|
|
110
|
-
...Ue(o, t.props),
|
|
111
|
-
// @ts-ignore
|
|
112
|
-
ref: n ? Z(n, r) : r
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
return i.Children.count(t) > 1 ? i.Children.only(null) : null;
|
|
116
|
-
});
|
|
117
|
-
L.displayName = "SlotClone";
|
|
118
|
-
var ke = ({ children: e }) => /* @__PURE__ */ u(he, { children: e });
|
|
119
|
-
function Le(e) {
|
|
120
|
-
return i.isValidElement(e) && e.type === ke;
|
|
121
|
-
}
|
|
122
|
-
function Ue(e, n) {
|
|
123
|
-
const t = { ...n };
|
|
124
|
-
for (const o in n) {
|
|
125
|
-
const r = e[o], c = n[o];
|
|
126
|
-
/^on[A-Z]/.test(o) ? r && c ? t[o] = (...a) => {
|
|
127
|
-
c(...a), r(...a);
|
|
128
|
-
} : r && (t[o] = r) : o === "style" ? t[o] = { ...r, ...c } : o === "className" && (t[o] = [r, c].filter(Boolean).join(" "));
|
|
129
|
-
}
|
|
130
|
-
return { ...e, ...t };
|
|
131
|
-
}
|
|
132
|
-
function Ve(e) {
|
|
133
|
-
var o, r;
|
|
134
|
-
let n = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = n && "isReactWarning" in n && n.isReactWarning;
|
|
135
|
-
return t ? e.ref : (n = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, t = n && "isReactWarning" in n && n.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
|
|
136
|
-
}
|
|
137
|
-
function $e(e) {
|
|
138
|
-
const n = e + "CollectionProvider", [t, o] = V(n), [r, c] = t(
|
|
139
|
-
n,
|
|
140
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
141
|
-
), s = (m) => {
|
|
142
|
-
const { scope: g, children: h } = m, A = R.useRef(null), b = R.useRef(/* @__PURE__ */ new Map()).current;
|
|
143
|
-
return /* @__PURE__ */ u(r, { scope: g, itemMap: b, collectionRef: A, children: h });
|
|
144
|
-
};
|
|
145
|
-
s.displayName = n;
|
|
146
|
-
const a = e + "CollectionSlot", d = R.forwardRef(
|
|
147
|
-
(m, g) => {
|
|
148
|
-
const { scope: h, children: A } = m, b = c(a, h), p = x(g, b.collectionRef);
|
|
149
|
-
return /* @__PURE__ */ u(S, { ref: p, children: A });
|
|
150
|
-
}
|
|
151
|
-
);
|
|
152
|
-
d.displayName = a;
|
|
153
|
-
const l = e + "CollectionItemSlot", C = "data-radix-collection-item", f = R.forwardRef(
|
|
154
|
-
(m, g) => {
|
|
155
|
-
const { scope: h, children: A, ...b } = m, p = R.useRef(null), _ = x(g, p), y = c(l, h);
|
|
156
|
-
return R.useEffect(() => (y.itemMap.set(p, { ref: p, ...b }), () => void y.itemMap.delete(p))), /* @__PURE__ */ u(S, { [C]: "", ref: _, children: A });
|
|
157
|
-
}
|
|
158
|
-
);
|
|
159
|
-
f.displayName = l;
|
|
160
|
-
function v(m) {
|
|
161
|
-
const g = c(e + "CollectionConsumer", m);
|
|
162
|
-
return R.useCallback(() => {
|
|
163
|
-
const A = g.collectionRef.current;
|
|
164
|
-
if (!A) return [];
|
|
165
|
-
const b = Array.from(A.querySelectorAll(`[${C}]`));
|
|
166
|
-
return Array.from(g.itemMap.values()).sort(
|
|
167
|
-
(y, I) => b.indexOf(y.ref.current) - b.indexOf(I.ref.current)
|
|
168
|
-
);
|
|
169
|
-
}, [g.collectionRef, g.itemMap]);
|
|
170
|
-
}
|
|
171
|
-
return [
|
|
172
|
-
{ Provider: s, Slot: d, ItemSlot: f },
|
|
173
|
-
v,
|
|
174
|
-
o
|
|
175
|
-
];
|
|
176
|
-
}
|
|
177
|
-
function J(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
178
|
-
return function(r) {
|
|
179
|
-
if (e == null || e(r), t === !1 || !r.defaultPrevented)
|
|
180
|
-
return n == null ? void 0 : n(r);
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
function Q(e) {
|
|
184
|
-
const n = i.useRef(e);
|
|
185
|
-
return i.useEffect(() => {
|
|
186
|
-
n.current = e;
|
|
187
|
-
}), i.useMemo(() => (...t) => {
|
|
188
|
-
var o;
|
|
189
|
-
return (o = n.current) == null ? void 0 : o.call(n, ...t);
|
|
190
|
-
}, []);
|
|
191
|
-
}
|
|
192
|
-
function $({
|
|
193
|
-
prop: e,
|
|
194
|
-
defaultProp: n,
|
|
195
|
-
onChange: t = () => {
|
|
196
|
-
}
|
|
197
|
-
}) {
|
|
198
|
-
const [o, r] = We({ defaultProp: n, onChange: t }), c = e !== void 0, s = c ? e : o, a = Q(t), d = i.useCallback(
|
|
199
|
-
(l) => {
|
|
200
|
-
if (c) {
|
|
201
|
-
const f = typeof l == "function" ? l(e) : l;
|
|
202
|
-
f !== e && a(f);
|
|
203
|
-
} else
|
|
204
|
-
r(l);
|
|
205
|
-
},
|
|
206
|
-
[c, e, r, a]
|
|
207
|
-
);
|
|
208
|
-
return [s, d];
|
|
209
|
-
}
|
|
210
|
-
function We({
|
|
211
|
-
defaultProp: e,
|
|
212
|
-
onChange: n
|
|
213
|
-
}) {
|
|
214
|
-
const t = i.useState(e), [o] = t, r = i.useRef(o), c = Q(n);
|
|
215
|
-
return i.useEffect(() => {
|
|
216
|
-
r.current !== o && (c(o), r.current = o);
|
|
217
|
-
}, [o, r, c]), t;
|
|
218
|
-
}
|
|
219
|
-
var qe = [
|
|
220
|
-
"a",
|
|
221
|
-
"button",
|
|
222
|
-
"div",
|
|
223
|
-
"form",
|
|
224
|
-
"h2",
|
|
225
|
-
"h3",
|
|
226
|
-
"img",
|
|
227
|
-
"input",
|
|
228
|
-
"label",
|
|
229
|
-
"li",
|
|
230
|
-
"nav",
|
|
231
|
-
"ol",
|
|
232
|
-
"p",
|
|
233
|
-
"span",
|
|
234
|
-
"svg",
|
|
235
|
-
"ul"
|
|
236
|
-
], P = qe.reduce((e, n) => {
|
|
237
|
-
const t = i.forwardRef((o, r) => {
|
|
238
|
-
const { asChild: c, ...s } = o, a = c ? S : n;
|
|
239
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(a, { ...s, ref: r });
|
|
240
|
-
});
|
|
241
|
-
return t.displayName = `Primitive.${n}`, { ...e, [n]: t };
|
|
242
|
-
}, {}), E = globalThis != null && globalThis.document ? i.useLayoutEffect : () => {
|
|
243
|
-
};
|
|
244
|
-
function Fe(e, n) {
|
|
245
|
-
return i.useReducer((t, o) => n[t][o] ?? t, e);
|
|
246
|
-
}
|
|
247
|
-
var X = (e) => {
|
|
248
|
-
const { present: n, children: t } = e, o = je(n), r = typeof t == "function" ? t({ present: o.isPresent }) : i.Children.only(t), c = x(o.ref, Be(r));
|
|
249
|
-
return typeof t == "function" || o.isPresent ? i.cloneElement(r, { ref: c }) : null;
|
|
250
|
-
};
|
|
251
|
-
X.displayName = "Presence";
|
|
252
|
-
function je(e) {
|
|
253
|
-
const [n, t] = i.useState(), o = i.useRef({}), r = i.useRef(e), c = i.useRef("none"), s = e ? "mounted" : "unmounted", [a, d] = Fe(s, {
|
|
254
|
-
mounted: {
|
|
255
|
-
UNMOUNT: "unmounted",
|
|
256
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
257
|
-
},
|
|
258
|
-
unmountSuspended: {
|
|
259
|
-
MOUNT: "mounted",
|
|
260
|
-
ANIMATION_END: "unmounted"
|
|
261
|
-
},
|
|
262
|
-
unmounted: {
|
|
263
|
-
MOUNT: "mounted"
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
return i.useEffect(() => {
|
|
267
|
-
const l = w(o.current);
|
|
268
|
-
c.current = a === "mounted" ? l : "none";
|
|
269
|
-
}, [a]), E(() => {
|
|
270
|
-
const l = o.current, C = r.current;
|
|
271
|
-
if (C !== e) {
|
|
272
|
-
const v = c.current, m = w(l);
|
|
273
|
-
e ? d("MOUNT") : m === "none" || (l == null ? void 0 : l.display) === "none" ? d("UNMOUNT") : d(C && v !== m ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
274
|
-
}
|
|
275
|
-
}, [e, d]), E(() => {
|
|
276
|
-
if (n) {
|
|
277
|
-
let l;
|
|
278
|
-
const C = n.ownerDocument.defaultView ?? window, f = (m) => {
|
|
279
|
-
const h = w(o.current).includes(m.animationName);
|
|
280
|
-
if (m.target === n && h && (d("ANIMATION_END"), !r.current)) {
|
|
281
|
-
const A = n.style.animationFillMode;
|
|
282
|
-
n.style.animationFillMode = "forwards", l = C.setTimeout(() => {
|
|
283
|
-
n.style.animationFillMode === "forwards" && (n.style.animationFillMode = A);
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
}, v = (m) => {
|
|
287
|
-
m.target === n && (c.current = w(o.current));
|
|
288
|
-
};
|
|
289
|
-
return n.addEventListener("animationstart", v), n.addEventListener("animationcancel", f), n.addEventListener("animationend", f), () => {
|
|
290
|
-
C.clearTimeout(l), n.removeEventListener("animationstart", v), n.removeEventListener("animationcancel", f), n.removeEventListener("animationend", f);
|
|
291
|
-
};
|
|
292
|
-
} else
|
|
293
|
-
d("ANIMATION_END");
|
|
294
|
-
}, [n, d]), {
|
|
295
|
-
isPresent: ["mounted", "unmountSuspended"].includes(a),
|
|
296
|
-
ref: i.useCallback((l) => {
|
|
297
|
-
l && (o.current = getComputedStyle(l)), t(l);
|
|
298
|
-
}, [])
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
function w(e) {
|
|
302
|
-
return (e == null ? void 0 : e.animationName) || "none";
|
|
303
|
-
}
|
|
304
|
-
function Be(e) {
|
|
305
|
-
var o, r;
|
|
306
|
-
let n = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, t = n && "isReactWarning" in n && n.isReactWarning;
|
|
307
|
-
return t ? e.ref : (n = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, t = n && "isReactWarning" in n && n.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
|
|
308
|
-
}
|
|
309
|
-
var Ge = i.useId || (() => {
|
|
310
|
-
}), Ke = 0;
|
|
311
|
-
function ee(e) {
|
|
312
|
-
const [n, t] = i.useState(Ge());
|
|
313
|
-
return E(() => {
|
|
314
|
-
t((o) => o ?? String(Ke++));
|
|
315
|
-
}, [e]), n ? `radix-${n}` : "";
|
|
316
|
-
}
|
|
317
|
-
var W = "Collapsible", [He, ne] = V(W), [ze, q] = He(W), te = i.forwardRef(
|
|
318
|
-
(e, n) => {
|
|
319
|
-
const {
|
|
320
|
-
__scopeCollapsible: t,
|
|
321
|
-
open: o,
|
|
322
|
-
defaultOpen: r,
|
|
323
|
-
disabled: c,
|
|
324
|
-
onOpenChange: s,
|
|
325
|
-
...a
|
|
326
|
-
} = e, [d = !1, l] = $({
|
|
327
|
-
prop: o,
|
|
328
|
-
defaultProp: r,
|
|
329
|
-
onChange: s
|
|
330
|
-
});
|
|
331
|
-
return /* @__PURE__ */ u(
|
|
332
|
-
ze,
|
|
333
|
-
{
|
|
334
|
-
scope: t,
|
|
335
|
-
disabled: c,
|
|
336
|
-
contentId: ee(),
|
|
337
|
-
open: d,
|
|
338
|
-
onOpenToggle: i.useCallback(() => l((C) => !C), [l]),
|
|
339
|
-
children: /* @__PURE__ */ u(
|
|
340
|
-
P.div,
|
|
341
|
-
{
|
|
342
|
-
"data-state": j(d),
|
|
343
|
-
"data-disabled": c ? "" : void 0,
|
|
344
|
-
...a,
|
|
345
|
-
ref: n
|
|
346
|
-
}
|
|
347
|
-
)
|
|
348
|
-
}
|
|
349
|
-
);
|
|
350
|
-
}
|
|
351
|
-
);
|
|
352
|
-
te.displayName = W;
|
|
353
|
-
var oe = "CollapsibleTrigger", re = i.forwardRef(
|
|
354
|
-
(e, n) => {
|
|
355
|
-
const { __scopeCollapsible: t, ...o } = e, r = q(oe, t);
|
|
356
|
-
return /* @__PURE__ */ u(
|
|
357
|
-
P.button,
|
|
358
|
-
{
|
|
359
|
-
type: "button",
|
|
360
|
-
"aria-controls": r.contentId,
|
|
361
|
-
"aria-expanded": r.open || !1,
|
|
362
|
-
"data-state": j(r.open),
|
|
363
|
-
"data-disabled": r.disabled ? "" : void 0,
|
|
364
|
-
disabled: r.disabled,
|
|
365
|
-
...o,
|
|
366
|
-
ref: n,
|
|
367
|
-
onClick: J(e.onClick, r.onOpenToggle)
|
|
368
|
-
}
|
|
369
|
-
);
|
|
370
|
-
}
|
|
371
|
-
);
|
|
372
|
-
re.displayName = oe;
|
|
373
|
-
var F = "CollapsibleContent", ce = i.forwardRef(
|
|
374
|
-
(e, n) => {
|
|
375
|
-
const { forceMount: t, ...o } = e, r = q(F, e.__scopeCollapsible);
|
|
376
|
-
return /* @__PURE__ */ u(X, { present: t || r.open, children: ({ present: c }) => /* @__PURE__ */ u(Ye, { ...o, ref: n, present: c }) });
|
|
377
|
-
}
|
|
378
|
-
);
|
|
379
|
-
ce.displayName = F;
|
|
380
|
-
var Ye = i.forwardRef((e, n) => {
|
|
381
|
-
const { __scopeCollapsible: t, present: o, children: r, ...c } = e, s = q(F, t), [a, d] = i.useState(o), l = i.useRef(null), C = x(n, l), f = i.useRef(0), v = f.current, m = i.useRef(0), g = m.current, h = s.open || a, A = i.useRef(h), b = i.useRef(void 0);
|
|
382
|
-
return i.useEffect(() => {
|
|
383
|
-
const p = requestAnimationFrame(() => A.current = !1);
|
|
384
|
-
return () => cancelAnimationFrame(p);
|
|
385
|
-
}, []), E(() => {
|
|
386
|
-
const p = l.current;
|
|
387
|
-
if (p) {
|
|
388
|
-
b.current = b.current || {
|
|
389
|
-
transitionDuration: p.style.transitionDuration,
|
|
390
|
-
animationName: p.style.animationName
|
|
391
|
-
}, p.style.transitionDuration = "0s", p.style.animationName = "none";
|
|
392
|
-
const _ = p.getBoundingClientRect();
|
|
393
|
-
f.current = _.height, m.current = _.width, A.current || (p.style.transitionDuration = b.current.transitionDuration, p.style.animationName = b.current.animationName), d(o);
|
|
394
|
-
}
|
|
395
|
-
}, [s.open, o]), /* @__PURE__ */ u(
|
|
396
|
-
P.div,
|
|
397
|
-
{
|
|
398
|
-
"data-state": j(s.open),
|
|
399
|
-
"data-disabled": s.disabled ? "" : void 0,
|
|
400
|
-
id: s.contentId,
|
|
401
|
-
hidden: !h,
|
|
402
|
-
...c,
|
|
403
|
-
ref: C,
|
|
404
|
-
style: {
|
|
405
|
-
"--radix-collapsible-content-height": v ? `${v}px` : void 0,
|
|
406
|
-
"--radix-collapsible-content-width": g ? `${g}px` : void 0,
|
|
407
|
-
...e.style
|
|
408
|
-
},
|
|
409
|
-
children: h && r
|
|
410
|
-
}
|
|
411
|
-
);
|
|
412
|
-
});
|
|
413
|
-
function j(e) {
|
|
414
|
-
return e ? "open" : "closed";
|
|
415
|
-
}
|
|
416
|
-
var Ze = te, Je = re, Qe = ce, Xe = i.createContext(void 0);
|
|
417
|
-
function en(e) {
|
|
418
|
-
const n = i.useContext(Xe);
|
|
419
|
-
return e || n || "ltr";
|
|
420
|
-
}
|
|
421
|
-
var N = "Accordion", nn = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [B, tn, on] = $e(N), [O, Cn] = V(N, [
|
|
422
|
-
on,
|
|
423
|
-
ne
|
|
424
|
-
]), G = ne(), ie = R.forwardRef(
|
|
425
|
-
(e, n) => {
|
|
426
|
-
const { type: t, ...o } = e, r = o, c = o;
|
|
427
|
-
return /* @__PURE__ */ u(B.Provider, { scope: e.__scopeAccordion, children: t === "multiple" ? /* @__PURE__ */ u(an, { ...c, ref: n }) : /* @__PURE__ */ u(sn, { ...r, ref: n }) });
|
|
428
|
-
}
|
|
429
|
-
);
|
|
430
|
-
ie.displayName = N;
|
|
431
|
-
var [se, rn] = O(N), [ae, cn] = O(
|
|
432
|
-
N,
|
|
433
|
-
{ collapsible: !1 }
|
|
434
|
-
), sn = R.forwardRef(
|
|
435
|
-
(e, n) => {
|
|
436
|
-
const {
|
|
437
|
-
value: t,
|
|
438
|
-
defaultValue: o,
|
|
439
|
-
onValueChange: r = () => {
|
|
440
|
-
},
|
|
441
|
-
collapsible: c = !1,
|
|
442
|
-
...s
|
|
443
|
-
} = e, [a, d] = $({
|
|
444
|
-
prop: t,
|
|
445
|
-
defaultProp: o,
|
|
446
|
-
onChange: r
|
|
447
|
-
});
|
|
448
|
-
return /* @__PURE__ */ u(
|
|
449
|
-
se,
|
|
450
|
-
{
|
|
451
|
-
scope: e.__scopeAccordion,
|
|
452
|
-
value: a ? [a] : [],
|
|
453
|
-
onItemOpen: d,
|
|
454
|
-
onItemClose: R.useCallback(() => c && d(""), [c, d]),
|
|
455
|
-
children: /* @__PURE__ */ u(ae, { scope: e.__scopeAccordion, collapsible: c, children: /* @__PURE__ */ u(le, { ...s, ref: n }) })
|
|
456
|
-
}
|
|
457
|
-
);
|
|
458
|
-
}
|
|
459
|
-
), an = R.forwardRef((e, n) => {
|
|
460
|
-
const {
|
|
461
|
-
value: t,
|
|
462
|
-
defaultValue: o,
|
|
463
|
-
onValueChange: r = () => {
|
|
464
|
-
},
|
|
465
|
-
...c
|
|
466
|
-
} = e, [s = [], a] = $({
|
|
467
|
-
prop: t,
|
|
468
|
-
defaultProp: o,
|
|
469
|
-
onChange: r
|
|
470
|
-
}), d = R.useCallback(
|
|
471
|
-
(C) => a((f = []) => [...f, C]),
|
|
472
|
-
[a]
|
|
473
|
-
), l = R.useCallback(
|
|
474
|
-
(C) => a((f = []) => f.filter((v) => v !== C)),
|
|
475
|
-
[a]
|
|
476
|
-
);
|
|
477
|
-
return /* @__PURE__ */ u(
|
|
478
|
-
se,
|
|
479
|
-
{
|
|
480
|
-
scope: e.__scopeAccordion,
|
|
481
|
-
value: s,
|
|
482
|
-
onItemOpen: d,
|
|
483
|
-
onItemClose: l,
|
|
484
|
-
children: /* @__PURE__ */ u(ae, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ u(le, { ...c, ref: n }) })
|
|
485
|
-
}
|
|
486
|
-
);
|
|
487
|
-
}), [ln, T] = O(N), le = R.forwardRef(
|
|
488
|
-
(e, n) => {
|
|
489
|
-
const { __scopeAccordion: t, disabled: o, dir: r, orientation: c = "vertical", ...s } = e, a = R.useRef(null), d = x(a, n), l = tn(t), f = en(r) === "ltr", v = J(e.onKeyDown, (m) => {
|
|
490
|
-
var H;
|
|
491
|
-
if (!nn.includes(m.key)) return;
|
|
492
|
-
const g = m.target, h = l().filter((k) => {
|
|
493
|
-
var z;
|
|
494
|
-
return !((z = k.ref.current) != null && z.disabled);
|
|
495
|
-
}), A = h.findIndex((k) => k.ref.current === g), b = h.length;
|
|
496
|
-
if (A === -1) return;
|
|
497
|
-
m.preventDefault();
|
|
498
|
-
let p = A;
|
|
499
|
-
const _ = 0, y = b - 1, I = () => {
|
|
500
|
-
p = A + 1, p > y && (p = _);
|
|
501
|
-
}, D = () => {
|
|
502
|
-
p = A - 1, p < _ && (p = y);
|
|
503
|
-
};
|
|
504
|
-
switch (m.key) {
|
|
505
|
-
case "Home":
|
|
506
|
-
p = _;
|
|
507
|
-
break;
|
|
508
|
-
case "End":
|
|
509
|
-
p = y;
|
|
510
|
-
break;
|
|
511
|
-
case "ArrowRight":
|
|
512
|
-
c === "horizontal" && (f ? I() : D());
|
|
513
|
-
break;
|
|
514
|
-
case "ArrowDown":
|
|
515
|
-
c === "vertical" && I();
|
|
516
|
-
break;
|
|
517
|
-
case "ArrowLeft":
|
|
518
|
-
c === "horizontal" && (f ? D() : I());
|
|
519
|
-
break;
|
|
520
|
-
case "ArrowUp":
|
|
521
|
-
c === "vertical" && D();
|
|
522
|
-
break;
|
|
523
|
-
}
|
|
524
|
-
const ve = p % b;
|
|
525
|
-
(H = h[ve].ref.current) == null || H.focus();
|
|
526
|
-
});
|
|
527
|
-
return /* @__PURE__ */ u(
|
|
528
|
-
ln,
|
|
529
|
-
{
|
|
530
|
-
scope: t,
|
|
531
|
-
disabled: o,
|
|
532
|
-
direction: r,
|
|
533
|
-
orientation: c,
|
|
534
|
-
children: /* @__PURE__ */ u(B.Slot, { scope: t, children: /* @__PURE__ */ u(
|
|
535
|
-
P.div,
|
|
536
|
-
{
|
|
537
|
-
...s,
|
|
538
|
-
"data-orientation": c,
|
|
539
|
-
ref: d,
|
|
540
|
-
onKeyDown: o ? void 0 : v
|
|
541
|
-
}
|
|
542
|
-
) })
|
|
543
|
-
}
|
|
544
|
-
);
|
|
545
|
-
}
|
|
546
|
-
), M = "AccordionItem", [dn, K] = O(M), de = R.forwardRef(
|
|
547
|
-
(e, n) => {
|
|
548
|
-
const { __scopeAccordion: t, value: o, ...r } = e, c = T(M, t), s = rn(M, t), a = G(t), d = ee(), l = o && s.value.includes(o) || !1, C = c.disabled || e.disabled;
|
|
549
|
-
return /* @__PURE__ */ u(
|
|
550
|
-
dn,
|
|
551
|
-
{
|
|
552
|
-
scope: t,
|
|
553
|
-
open: l,
|
|
554
|
-
disabled: C,
|
|
555
|
-
triggerId: d,
|
|
556
|
-
children: /* @__PURE__ */ u(
|
|
557
|
-
Ze,
|
|
558
|
-
{
|
|
559
|
-
"data-orientation": c.orientation,
|
|
560
|
-
"data-state": ge(l),
|
|
561
|
-
...a,
|
|
562
|
-
...r,
|
|
563
|
-
ref: n,
|
|
564
|
-
disabled: C,
|
|
565
|
-
open: l,
|
|
566
|
-
onOpenChange: (f) => {
|
|
567
|
-
f ? s.onItemOpen(o) : s.onItemClose(o);
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
)
|
|
571
|
-
}
|
|
572
|
-
);
|
|
573
|
-
}
|
|
574
|
-
);
|
|
575
|
-
de.displayName = M;
|
|
576
|
-
var ue = "AccordionHeader", fe = R.forwardRef(
|
|
577
|
-
(e, n) => {
|
|
578
|
-
const { __scopeAccordion: t, ...o } = e, r = T(N, t), c = K(ue, t);
|
|
579
|
-
return /* @__PURE__ */ u(
|
|
580
|
-
P.h3,
|
|
581
|
-
{
|
|
582
|
-
"data-orientation": r.orientation,
|
|
583
|
-
"data-state": ge(c.open),
|
|
584
|
-
"data-disabled": c.disabled ? "" : void 0,
|
|
585
|
-
...o,
|
|
586
|
-
ref: n
|
|
587
|
-
}
|
|
588
|
-
);
|
|
589
|
-
}
|
|
590
|
-
);
|
|
591
|
-
fe.displayName = ue;
|
|
592
|
-
var U = "AccordionTrigger", pe = R.forwardRef(
|
|
593
|
-
(e, n) => {
|
|
594
|
-
const { __scopeAccordion: t, ...o } = e, r = T(N, t), c = K(U, t), s = cn(U, t), a = G(t);
|
|
595
|
-
return /* @__PURE__ */ u(B.ItemSlot, { scope: t, children: /* @__PURE__ */ u(
|
|
596
|
-
Je,
|
|
597
|
-
{
|
|
598
|
-
"aria-disabled": c.open && !s.collapsible || void 0,
|
|
599
|
-
"data-orientation": r.orientation,
|
|
600
|
-
id: c.triggerId,
|
|
601
|
-
...a,
|
|
602
|
-
...o,
|
|
603
|
-
ref: n
|
|
604
|
-
}
|
|
605
|
-
) });
|
|
606
|
-
}
|
|
607
|
-
);
|
|
608
|
-
pe.displayName = U;
|
|
609
|
-
var me = "AccordionContent", Ce = R.forwardRef(
|
|
610
|
-
(e, n) => {
|
|
611
|
-
const { __scopeAccordion: t, ...o } = e, r = T(N, t), c = K(me, t), s = G(t);
|
|
612
|
-
return /* @__PURE__ */ u(
|
|
613
|
-
Qe,
|
|
614
|
-
{
|
|
615
|
-
role: "region",
|
|
616
|
-
"aria-labelledby": c.triggerId,
|
|
617
|
-
"data-orientation": r.orientation,
|
|
618
|
-
...s,
|
|
619
|
-
...o,
|
|
620
|
-
ref: n,
|
|
621
|
-
style: {
|
|
622
|
-
"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
|
|
623
|
-
"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
|
|
624
|
-
...e.style
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
);
|
|
628
|
-
}
|
|
629
|
-
);
|
|
630
|
-
Ce.displayName = me;
|
|
631
|
-
function ge(e) {
|
|
632
|
-
return e ? "open" : "closed";
|
|
633
|
-
}
|
|
634
|
-
var gn = ie, vn = de, hn = fe, An = pe, bn = Ce;
|
|
635
|
-
export {
|
|
636
|
-
bn as C,
|
|
637
|
-
hn as H,
|
|
638
|
-
vn as I,
|
|
639
|
-
gn as R,
|
|
640
|
-
An as T,
|
|
641
|
-
mn as s
|
|
642
|
-
};
|
package/index.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._root_nq4cs_4{width:100%}._trigger_nq4cs_8{font-family:Inter,sans-serif;color:#000;background-color:transparent;border:0;padding:1.5rem;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;gap:10px}._trigger_nq4cs_8:focus-visible{outline:#000000 auto 2px}._trigger_nq4cs_8 svg{transition:transform .3s cubic-bezier(.87,0,.13,1)}._trigger_nq4cs_8[data-state=open] svg{transform:rotate(180deg)}._item_nq4cs_34{font-family:Inter,sans-serif;border-style:solid;border-color:#bfbfbf;border-width:1px 0 0;overflow:hidden}._item_nq4cs_34:hover ._trigger_nq4cs_8{background-color:#e6e6e6}._item_nq4cs_34:last-child{border-width:1px 0}._content_nq4cs_52{padding:0 1.5rem;overflow:hidden}._content_nq4cs_52[data-state=open]{animation:_slideDown_nq4cs_1 .3s cubic-bezier(.87,0,.13,1);margin-bottom:1.5rem}._content_nq4cs_52[data-state=closed]{animation:_slideUp_nq4cs_1 .3s cubic-bezier(.87,0,.13,1)}@keyframes _slideDown_nq4cs_1{0%{height:0;margin-bottom:0}to{height:var(--radix--content-height);margin-bottom:1.5rem}}@keyframes _slideUp_nq4cs_1{0%{height:var(--radix--content-height);margin-bottom:1.5rem}to{height:0;margin:0}}._header_nq4cs_90{margin:0}._triggerText_nq4cs_94{margin:0;padding:0;font-size:1.25rem;font-weight:400}
|
package/index92.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import "./Form-BQQs3jUk.js";
|
|
4
|
-
import "./TextField.module-0-u4LVPp.js";
|
|
5
|
-
import "./useField-Dz62UHCP.js";
|
|
6
|
-
import "./Text-CQPW6xs7.js";
|
|
7
|
-
import { I as n, T as I, s as T } from "./TextField-DeK_yiK-.js";
|
|
8
|
-
import "./index69.js";
|
|
9
|
-
import "./clsx-OuTLNxxd.js";
|
|
10
|
-
export {
|
|
11
|
-
n as InputWrapper,
|
|
12
|
-
I as TextField,
|
|
13
|
-
T as ssnRegEx
|
|
14
|
-
};
|
package/index93.js
DELETED