@cfx-dev/ui-components 4.2.24 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Combination-CSgOhzm-.js +2198 -0
- package/dist/Combination-N-vN9BB-.js +823 -0
- package/dist/Table.module-DHI1mXN2.js +17 -0
- package/dist/assets/all_css.css +1 -0
- package/dist/assets/css/Checkbox.css +1 -1
- package/dist/assets/css/DataTable.css +1 -0
- package/dist/assets/css/Table.css +1 -1
- package/dist/assets/general/global.css +1 -1
- package/dist/cfxIcons-B9nzO6TW.js +98 -0
- package/dist/components/Accordion/Accordion.js +25 -26
- package/dist/components/Accordion/AccordionShowcase.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Avatar/Avatar.js +21 -20
- package/dist/components/Avatar/AvatarShowcase.js +1 -1
- package/dist/components/Badge/Badge.d.ts +2 -1
- package/dist/components/Badge/Badge.js +29 -29
- package/dist/components/Badge/BadgeShowcase.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenu.js +2 -2
- package/dist/components/BurgerMenu/BurgerMenuButton.js +1 -1
- package/dist/components/BurgerMenu/BurgerMenuShowcase.js +1 -1
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.js +83 -81
- package/dist/components/Button/ButtonShowcase.js +2 -2
- package/dist/components/Button/LinkButton.d.ts +1 -1
- package/dist/components/Button/LinkButton.js +18 -17
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +7 -7
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.js +154 -242
- package/dist/components/ClipboardButton/ClipboardButton.js +7 -7
- package/dist/components/ControlBox/ControlBox.d.ts +3 -2
- package/dist/components/ControlBox/ControlBox.js +13 -10
- package/dist/components/CountryFlag/CountryFlag.d.ts +3 -2
- package/dist/components/CountryFlag/CountryFlag.js +14 -11
- package/dist/components/DataTable/DataTable.d.ts +40 -0
- package/dist/components/DataTable/DataTable.js +163 -0
- package/dist/components/DataTable/DataTableShowcase.d.ts +5 -0
- package/dist/components/DataTable/DataTableShowcase.js +60 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +6 -0
- package/dist/components/Decorate/Decorate.d.ts +3 -2
- package/dist/components/Decorate/Decorate.js +19 -15
- package/dist/components/Dot/Dot.d.ts +2 -1
- package/dist/components/Dot/Dot.js +15 -13
- package/dist/components/DropdownSelect/DropdownSelect.d.ts +2 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +665 -1836
- package/dist/components/DropdownSelect/DropdownSelectShowcase.js +1 -1
- package/dist/components/Flyout/Flyout.d.ts +2 -1
- package/dist/components/Flyout/Flyout.js +22 -20
- package/dist/components/Icon/Icon.d.ts +2 -1
- package/dist/components/Icon/Icon.js +19 -17
- package/dist/components/IconBig/IconBig.d.ts +2 -1
- package/dist/components/IconBig/IconBig.js +16 -14
- package/dist/components/Icons/IconsShowcase.js +1 -1
- package/dist/components/Icons/cfx-icons/Radio.d.ts +5 -0
- package/dist/components/Icons/cfx-icons/Radio.js +36 -0
- package/dist/components/Icons/cfx-icons/Square.js +15 -9
- package/dist/components/Icons/cfxIcons.d.ts +1 -0
- package/dist/components/Icons/cfxIcons.js +62 -60
- package/dist/components/Icons/index.js +1 -1
- package/dist/components/Indicator/Indicator.js +9 -10
- package/dist/components/InfoPanel/InfoPanelShowcase.js +1 -1
- package/dist/components/Input/Input.d.ts +4 -1
- package/dist/components/Input/Input.js +101 -88
- package/dist/components/Input/InputShowcase.js +1 -1
- package/dist/components/Input/RichInput.d.ts +2 -1
- package/dist/components/Input/RichInput.js +37 -34
- package/dist/components/InputDropzone/InputDropzone.d.ts +1 -1
- package/dist/components/InputDropzone/InputDropzone.js +1723 -625
- package/dist/components/Interactive/Interactive.d.ts +2 -1
- package/dist/components/Interactive/Interactive.js +14 -12
- package/dist/components/Island/Island.d.ts +2 -1
- package/dist/components/Island/Island.js +24 -24
- package/dist/components/Layout/Box/Box.d.ts +8 -2
- package/dist/components/Layout/Box/Box.js +53 -51
- package/dist/components/Layout/Box/Box.types.d.ts +22 -0
- package/dist/components/Layout/Box/Box.types.js +4 -0
- package/dist/components/Layout/Box/index.d.ts +1 -1
- package/dist/components/Layout/Box/index.js +3 -3
- package/dist/components/Layout/Center/Center.d.ts +2 -1
- package/dist/components/Layout/Center/Center.js +19 -18
- package/dist/components/Layout/Flex/Flex.d.ts +6 -10
- package/dist/components/Layout/Flex/Flex.js +53 -64
- package/dist/components/Layout/Flex/FlexRestricter.d.ts +2 -1
- package/dist/components/Layout/Flex/FlexRestricter.js +13 -12
- package/dist/components/Layout/Flex/FlexShowcase.js +1 -1
- package/dist/components/Layout/Flex/index.d.ts +2 -2
- package/dist/components/Layout/Flex/index.js +8 -8
- package/dist/components/Layout/Page/Page.js +11 -12
- package/dist/components/Layout/Scrollable/Rail.d.ts +1 -1
- package/dist/components/Layout/Scrollable/Scrollable.d.ts +2 -1
- package/dist/components/Layout/Scrollable/Scrollable.js +40 -38
- package/dist/components/Layout/Scrollable/ScrollableShowcase.js +1 -1
- package/dist/components/Layout/Scrollable/VirtualScrollable.js +98 -98
- package/dist/components/Link/LinkShowcase.js +1 -1
- package/dist/components/Loaf/Loaf.d.ts +2 -1
- package/dist/components/Loaf/Loaf.js +17 -16
- package/dist/components/Logos/LogosShowcase.js +1 -1
- package/dist/components/Modal/Modal.js +16 -17
- package/dist/components/Modal/ModalShowcase.js +14 -11
- package/dist/components/NavList/NavList.d.ts +2 -1
- package/dist/components/NavList/NavList.js +19 -18
- package/dist/components/OnScreenSensor.js +1 -1
- package/dist/components/Overlay/Overlay.d.ts +4 -2
- package/dist/components/Overlay/Overlay.js +31 -23
- package/dist/components/Popover/Popover.d.ts +3 -2
- package/dist/components/Popover/Popover.js +31 -30
- package/dist/components/Popover/PopoverShowcase.js +4 -4
- package/dist/components/PremiumBadge/PremiumBadge.d.ts +2 -1
- package/dist/components/PremiumBadge/PremiumBadge.js +12 -11
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +666 -1617
- package/dist/components/Select/SelectShowcase.js +1 -1
- package/dist/components/Shroud/Shroud.d.ts +2 -1
- package/dist/components/Shroud/Shroud.js +16 -14
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +26 -27
- package/dist/components/Skeleton/SkeletonShowcase.js +4 -4
- package/dist/components/Slider/Slider.d.ts +2 -1
- package/dist/components/Slider/Slider.js +326 -377
- package/dist/components/Slider/SliderShowcase.js +1 -1
- package/dist/components/Switch/Switch.js +109 -155
- package/dist/components/Table/TableBody.d.ts +8 -0
- package/dist/components/Table/TableBody.js +14 -0
- package/dist/components/Table/TableCell.d.ts +11 -0
- package/dist/components/Table/TableCell.js +54 -0
- package/dist/components/Table/TableCellCheckbox.d.ts +11 -0
- package/dist/components/Table/TableCellCheckbox.js +20 -0
- package/dist/components/Table/TableHeader.d.ts +9 -0
- package/dist/components/Table/TableHeader.js +24 -0
- package/dist/components/Table/TableIconButton.d.ts +6 -0
- package/dist/components/Table/TableIconButton.js +16 -0
- package/dist/components/Table/TableRoot.d.ts +8 -0
- package/dist/components/Table/TableRoot.js +23 -0
- package/dist/components/Table/TableRow.d.ts +13 -0
- package/dist/components/Table/TableRow.js +46 -0
- package/dist/components/Table/TableShowcase.js +56 -57
- package/dist/components/Table/index.d.ts +20 -2
- package/dist/components/Table/index.js +17 -5
- package/dist/components/Tabular/TabularShowcase.js +1 -1
- package/dist/components/Text/Text.d.ts +6 -3
- package/dist/components/Text/Text.js +67 -63
- package/dist/components/Text/TextShowcase.js +40 -33
- package/dist/components/Title/Title.d.ts +3 -1
- package/dist/components/Title/TitleShowcase.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupShowcase.js +1 -1
- package/dist/index-BHuChyf5.js +238 -0
- package/dist/index-Cl_RnsqN.js +386 -0
- package/dist/index-DZEAOJqB.js +53 -0
- package/dist/index-HDl8nGsm.js +70 -0
- package/dist/main.d.ts +6 -4
- package/dist/main.js +66 -65
- package/dist/{medium-BA3EQDZW.js → medium-Bq5NvyU7.js} +1 -1
- package/dist/styles-scss/global.scss +1 -0
- package/dist/tslib.es6-CtHwNPxX.js +72 -0
- package/dist/utils/hooks/useClipboardComponent.d.ts +1 -1
- package/dist/utils/hooks/useOutlet.js +1 -1
- package/dist/utils/hooks/usePopoverController.d.ts +1 -1
- package/dist/utils/links.js +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -1
- package/dist/utils/mergeRefs.js +1 -1
- package/dist/utils/ui/ui.d.ts +1 -0
- package/dist/utils/ui/ui.js +45 -36
- package/dist/utils/ui/ui.types.d.ts +4 -0
- package/package.json +6 -5
- package/dist/Combination-Cbiw1XRb.js +0 -792
- package/dist/cfxIcons-BNd1WgpX.js +0 -96
- package/dist/components/Table/Table.d.ts +0 -42
- package/dist/components/Table/Table.js +0 -170
- package/dist/index-2hJuj4UN.js +0 -19069
- package/dist/index-AweK2ufS.js +0 -171
- package/dist/index-BlbvKsmN.js +0 -82
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-Bz27DCHt.js +0 -1342
- package/dist/index-Cf5Yu9oD.js +0 -67
- package/dist/tslib.es6-CBKHJX9H.js +0 -151
package/dist/index-AweK2ufS.js
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import * as l from "react";
|
|
2
|
-
import h from "react";
|
|
3
|
-
import { jsx as y, Fragment as w } from "react/jsx-runtime";
|
|
4
|
-
function L(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
|
|
5
|
-
return function(n) {
|
|
6
|
-
if (e == null || e(n), o === !1 || !n.defaultPrevented)
|
|
7
|
-
return t == null ? void 0 : t(n);
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
function A(e, t) {
|
|
11
|
-
if (typeof e == "function")
|
|
12
|
-
return e(t);
|
|
13
|
-
e != null && (e.current = t);
|
|
14
|
-
}
|
|
15
|
-
function O(...e) {
|
|
16
|
-
return (t) => {
|
|
17
|
-
let o = !1;
|
|
18
|
-
const r = e.map((n) => {
|
|
19
|
-
const c = A(n, t);
|
|
20
|
-
return !o && typeof c == "function" && (o = !0), c;
|
|
21
|
-
});
|
|
22
|
-
if (o)
|
|
23
|
-
return () => {
|
|
24
|
-
for (let n = 0; n < r.length; n++) {
|
|
25
|
-
const c = r[n];
|
|
26
|
-
typeof c == "function" ? c() : A(e[n], null);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
function I(...e) {
|
|
32
|
-
return l.useCallback(O(...e), e);
|
|
33
|
-
}
|
|
34
|
-
function E(e, t = []) {
|
|
35
|
-
let o = [];
|
|
36
|
-
function r(c, s) {
|
|
37
|
-
const i = l.createContext(s), f = o.length;
|
|
38
|
-
o = [...o, s];
|
|
39
|
-
const S = (R) => {
|
|
40
|
-
var d;
|
|
41
|
-
const { scope: C, children: a, ...u } = R, p = ((d = C == null ? void 0 : C[e]) == null ? void 0 : d[f]) || i, m = l.useMemo(() => u, Object.values(u));
|
|
42
|
-
return /* @__PURE__ */ y(p.Provider, { value: m, children: a });
|
|
43
|
-
};
|
|
44
|
-
S.displayName = c + "Provider";
|
|
45
|
-
function M(R, C) {
|
|
46
|
-
var p;
|
|
47
|
-
const a = ((p = C == null ? void 0 : C[e]) == null ? void 0 : p[f]) || i, u = l.useContext(a);
|
|
48
|
-
if (u) return u;
|
|
49
|
-
if (s !== void 0) return s;
|
|
50
|
-
throw new Error(`\`${R}\` must be used within \`${c}\``);
|
|
51
|
-
}
|
|
52
|
-
return [S, M];
|
|
53
|
-
}
|
|
54
|
-
const n = () => {
|
|
55
|
-
const c = o.map((s) => l.createContext(s));
|
|
56
|
-
return function(i) {
|
|
57
|
-
const f = (i == null ? void 0 : i[e]) || c;
|
|
58
|
-
return l.useMemo(
|
|
59
|
-
() => ({ [`__scope${e}`]: { ...i, [e]: f } }),
|
|
60
|
-
[i, f]
|
|
61
|
-
);
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
return n.scopeName = e, [r, v(n, ...t)];
|
|
65
|
-
}
|
|
66
|
-
function v(...e) {
|
|
67
|
-
const t = e[0];
|
|
68
|
-
if (e.length === 1) return t;
|
|
69
|
-
const o = () => {
|
|
70
|
-
const r = e.map((n) => ({
|
|
71
|
-
useScope: n(),
|
|
72
|
-
scopeName: n.scopeName
|
|
73
|
-
}));
|
|
74
|
-
return function(c) {
|
|
75
|
-
const s = r.reduce((i, { useScope: f, scopeName: S }) => {
|
|
76
|
-
const R = f(c)[`__scope${S}`];
|
|
77
|
-
return { ...i, ...R };
|
|
78
|
-
}, {});
|
|
79
|
-
return l.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
return o.scopeName = t.scopeName, o;
|
|
83
|
-
}
|
|
84
|
-
var _ = l.forwardRef((e, t) => {
|
|
85
|
-
const { children: o, ...r } = e, n = l.Children.toArray(o), c = n.find(V);
|
|
86
|
-
if (c) {
|
|
87
|
-
const s = c.props.children, i = n.map((f) => f === c ? l.Children.count(s) > 1 ? l.Children.only(null) : l.isValidElement(s) ? s.props.children : null : f);
|
|
88
|
-
return /* @__PURE__ */ y(N, { ...r, ref: t, children: l.isValidElement(s) ? l.cloneElement(s, void 0, i) : null });
|
|
89
|
-
}
|
|
90
|
-
return /* @__PURE__ */ y(N, { ...r, ref: t, children: o });
|
|
91
|
-
});
|
|
92
|
-
_.displayName = "Slot";
|
|
93
|
-
var N = l.forwardRef((e, t) => {
|
|
94
|
-
const { children: o, ...r } = e;
|
|
95
|
-
if (l.isValidElement(o)) {
|
|
96
|
-
const n = j(o);
|
|
97
|
-
return l.cloneElement(o, {
|
|
98
|
-
...$(r, o.props),
|
|
99
|
-
// @ts-ignore
|
|
100
|
-
ref: t ? O(t, n) : n
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
return l.Children.count(o) > 1 ? l.Children.only(null) : null;
|
|
104
|
-
});
|
|
105
|
-
N.displayName = "SlotClone";
|
|
106
|
-
var T = ({ children: e }) => /* @__PURE__ */ y(w, { children: e });
|
|
107
|
-
function V(e) {
|
|
108
|
-
return l.isValidElement(e) && e.type === T;
|
|
109
|
-
}
|
|
110
|
-
function $(e, t) {
|
|
111
|
-
const o = { ...t };
|
|
112
|
-
for (const r in t) {
|
|
113
|
-
const n = e[r], c = t[r];
|
|
114
|
-
/^on[A-Z]/.test(r) ? n && c ? o[r] = (...i) => {
|
|
115
|
-
c(...i), n(...i);
|
|
116
|
-
} : n && (o[r] = n) : r === "style" ? o[r] = { ...n, ...c } : r === "className" && (o[r] = [n, c].filter(Boolean).join(" "));
|
|
117
|
-
}
|
|
118
|
-
return { ...e, ...o };
|
|
119
|
-
}
|
|
120
|
-
function j(e) {
|
|
121
|
-
var r, n;
|
|
122
|
-
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
|
123
|
-
return o ? e.ref : (t = (n = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
124
|
-
}
|
|
125
|
-
function k(e) {
|
|
126
|
-
const t = e + "CollectionProvider", [o, r] = E(t), [n, c] = o(
|
|
127
|
-
t,
|
|
128
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
129
|
-
), s = (a) => {
|
|
130
|
-
const { scope: u, children: p } = a, m = h.useRef(null), d = h.useRef(/* @__PURE__ */ new Map()).current;
|
|
131
|
-
return /* @__PURE__ */ y(n, { scope: u, itemMap: d, collectionRef: m, children: p });
|
|
132
|
-
};
|
|
133
|
-
s.displayName = t;
|
|
134
|
-
const i = e + "CollectionSlot", f = h.forwardRef(
|
|
135
|
-
(a, u) => {
|
|
136
|
-
const { scope: p, children: m } = a, d = c(i, p), x = I(u, d.collectionRef);
|
|
137
|
-
return /* @__PURE__ */ y(_, { ref: x, children: m });
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
f.displayName = i;
|
|
141
|
-
const S = e + "CollectionItemSlot", M = "data-radix-collection-item", R = h.forwardRef(
|
|
142
|
-
(a, u) => {
|
|
143
|
-
const { scope: p, children: m, ...d } = a, x = h.useRef(null), g = I(u, x), P = c(S, p);
|
|
144
|
-
return h.useEffect(() => (P.itemMap.set(x, { ref: x, ...d }), () => void P.itemMap.delete(x))), /* @__PURE__ */ y(_, { [M]: "", ref: g, children: m });
|
|
145
|
-
}
|
|
146
|
-
);
|
|
147
|
-
R.displayName = S;
|
|
148
|
-
function C(a) {
|
|
149
|
-
const u = c(e + "CollectionConsumer", a);
|
|
150
|
-
return h.useCallback(() => {
|
|
151
|
-
const m = u.collectionRef.current;
|
|
152
|
-
if (!m) return [];
|
|
153
|
-
const d = Array.from(m.querySelectorAll(`[${M}]`));
|
|
154
|
-
return Array.from(u.itemMap.values()).sort(
|
|
155
|
-
(P, b) => d.indexOf(P.ref.current) - d.indexOf(b.ref.current)
|
|
156
|
-
);
|
|
157
|
-
}, [u.collectionRef, u.itemMap]);
|
|
158
|
-
}
|
|
159
|
-
return [
|
|
160
|
-
{ Provider: s, Slot: f, ItemSlot: R },
|
|
161
|
-
C,
|
|
162
|
-
r
|
|
163
|
-
];
|
|
164
|
-
}
|
|
165
|
-
export {
|
|
166
|
-
k as a,
|
|
167
|
-
E as b,
|
|
168
|
-
O as c,
|
|
169
|
-
L as d,
|
|
170
|
-
I as u
|
|
171
|
-
};
|
package/dist/index-BlbvKsmN.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import * as o from "react";
|
|
2
|
-
import { r as d } from "./index-2hJuj4UN.js";
|
|
3
|
-
import { jsx as c, Fragment as m } from "react/jsx-runtime";
|
|
4
|
-
function h(r, e) {
|
|
5
|
-
typeof r == "function" ? r(e) : r != null && (r.current = e);
|
|
6
|
-
}
|
|
7
|
-
function y(...r) {
|
|
8
|
-
return (e) => r.forEach((n) => h(n, e));
|
|
9
|
-
}
|
|
10
|
-
var u = o.forwardRef((r, e) => {
|
|
11
|
-
const { children: n, ...t } = r, i = o.Children.toArray(n), l = i.find(E);
|
|
12
|
-
if (l) {
|
|
13
|
-
const s = l.props.children, a = i.map((p) => p === l ? o.Children.count(s) > 1 ? o.Children.only(null) : o.isValidElement(s) ? s.props.children : null : p);
|
|
14
|
-
return /* @__PURE__ */ c(f, { ...t, ref: e, children: o.isValidElement(s) ? o.cloneElement(s, void 0, a) : null });
|
|
15
|
-
}
|
|
16
|
-
return /* @__PURE__ */ c(f, { ...t, ref: e, children: n });
|
|
17
|
-
});
|
|
18
|
-
u.displayName = "Slot";
|
|
19
|
-
var f = o.forwardRef((r, e) => {
|
|
20
|
-
const { children: n, ...t } = r;
|
|
21
|
-
if (o.isValidElement(n)) {
|
|
22
|
-
const i = C(n);
|
|
23
|
-
return o.cloneElement(n, {
|
|
24
|
-
...g(t, n.props),
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
ref: e ? y(e, i) : i
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
return o.Children.count(n) > 1 ? o.Children.only(null) : null;
|
|
30
|
-
});
|
|
31
|
-
f.displayName = "SlotClone";
|
|
32
|
-
var v = ({ children: r }) => /* @__PURE__ */ c(m, { children: r });
|
|
33
|
-
function E(r) {
|
|
34
|
-
return o.isValidElement(r) && r.type === v;
|
|
35
|
-
}
|
|
36
|
-
function g(r, e) {
|
|
37
|
-
const n = { ...e };
|
|
38
|
-
for (const t in e) {
|
|
39
|
-
const i = r[t], l = e[t];
|
|
40
|
-
/^on[A-Z]/.test(t) ? i && l ? n[t] = (...a) => {
|
|
41
|
-
l(...a), i(...a);
|
|
42
|
-
} : i && (n[t] = i) : t === "style" ? n[t] = { ...i, ...l } : t === "className" && (n[t] = [i, l].filter(Boolean).join(" "));
|
|
43
|
-
}
|
|
44
|
-
return { ...r, ...n };
|
|
45
|
-
}
|
|
46
|
-
function C(r) {
|
|
47
|
-
var t, i;
|
|
48
|
-
let e = (t = Object.getOwnPropertyDescriptor(r.props, "ref")) == null ? void 0 : t.get, n = e && "isReactWarning" in e && e.isReactWarning;
|
|
49
|
-
return n ? r.ref : (e = (i = Object.getOwnPropertyDescriptor(r, "ref")) == null ? void 0 : i.get, n = e && "isReactWarning" in e && e.isReactWarning, n ? r.props.ref : r.props.ref || r.ref);
|
|
50
|
-
}
|
|
51
|
-
var R = [
|
|
52
|
-
"a",
|
|
53
|
-
"button",
|
|
54
|
-
"div",
|
|
55
|
-
"form",
|
|
56
|
-
"h2",
|
|
57
|
-
"h3",
|
|
58
|
-
"img",
|
|
59
|
-
"input",
|
|
60
|
-
"label",
|
|
61
|
-
"li",
|
|
62
|
-
"nav",
|
|
63
|
-
"ol",
|
|
64
|
-
"p",
|
|
65
|
-
"span",
|
|
66
|
-
"svg",
|
|
67
|
-
"ul"
|
|
68
|
-
], P = R.reduce((r, e) => {
|
|
69
|
-
const n = o.forwardRef((t, i) => {
|
|
70
|
-
const { asChild: l, ...s } = t, a = l ? u : e;
|
|
71
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ c(a, { ...s, ref: i });
|
|
72
|
-
});
|
|
73
|
-
return n.displayName = `Primitive.${e}`, { ...r, [e]: n };
|
|
74
|
-
}, {});
|
|
75
|
-
function b(r, e) {
|
|
76
|
-
r && d.flushSync(() => r.dispatchEvent(e));
|
|
77
|
-
}
|
|
78
|
-
export {
|
|
79
|
-
P,
|
|
80
|
-
u as S,
|
|
81
|
-
b as d
|
|
82
|
-
};
|