@phillips/seldon 1.138.0 → 1.140.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/components/Countdown/Countdown.js +42 -38
- package/dist/components/Countdown/Countdown.stories.d.ts +14 -0
- package/dist/index.d.ts +42 -41
- package/dist/index.js +171 -169
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +27 -27
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +24 -9
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +50 -34
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +45 -45
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +239 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +30 -25
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +13 -13
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +364 -338
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +41 -40
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +2 -2
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +1 -1
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.d.ts +75 -0
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.js +131 -0
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.stories.d.ts +78 -0
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.test.d.ts +1 -0
- package/dist/patterns/FavoritesCollectionTile/index.d.ts +1 -0
- package/dist/scss/_vars.scss +1 -0
- package/dist/scss/_vars.scss.js +1 -0
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Countdown/_countdown.scss +10 -0
- package/dist/scss/components/Countdown/_duration.scss +0 -6
- package/dist/scss/patterns/FavoritesCollectionTile/_favoritesCollectionTile.scss +159 -0
- package/package.json +2 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +0 -9
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -29
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +0 -68
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -127
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -136
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +0 -15
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +0 -35
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +0 -47
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -112
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -31
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -16
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -62
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
- package/dist/node_modules/@radix-ui/react-select/node_modules/tslib/tslib.es6.js +0 -27
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +0 -53
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import { composeEventHandlers as P } from "../../primitive/dist/index.js";
|
|
3
|
+
import { useComposedRefs as O } from "../../react-compose-refs/dist/index.js";
|
|
4
|
+
import { createContextScope as L } from "../../react-context/dist/index.js";
|
|
5
|
+
import { DismissableLayer as G } from "../../react-dismissable-layer/dist/index.js";
|
|
6
|
+
import { useFocusGuards as H } from "../../react-focus-guards/dist/index.js";
|
|
7
|
+
import { FocusScope as K } from "../../react-focus-scope/dist/index.js";
|
|
8
|
+
import { useId as $ } from "../../react-id/dist/index.js";
|
|
9
|
+
import { createPopperScope as _, Anchor as x, Content as j, Arrow as U, Root as V } from "../../react-popper/dist/index.js";
|
|
10
|
+
import { Portal as W } from "../../react-portal/dist/index.js";
|
|
11
|
+
import { Presence as w } from "../../react-presence/dist/index.js";
|
|
12
|
+
import { Primitive as E } from "../../react-primitive/dist/index.js";
|
|
13
|
+
import { createSlot as Z } from "../../react-slot/dist/index.js";
|
|
14
|
+
import { useControllableState as q } from "../../react-use-controllable-state/dist/index.js";
|
|
15
|
+
import { hideOthers as z } from "../../../aria-hidden/dist/es2015/index.js";
|
|
16
|
+
import B from "../../../react-remove-scroll/dist/es2015/Combination.js";
|
|
17
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
18
|
+
var R = "Popover", [b, _o] = L(R, [
|
|
19
|
+
_
|
|
20
|
+
]), m = _(), [J, u] = b(R), F = (o) => {
|
|
21
|
+
const {
|
|
22
|
+
__scopePopover: n,
|
|
23
|
+
children: t,
|
|
24
|
+
open: a,
|
|
25
|
+
defaultOpen: e,
|
|
26
|
+
onOpenChange: r,
|
|
27
|
+
modal: s = !1
|
|
28
|
+
} = o, i = m(n), d = c.useRef(null), [v, g] = c.useState(!1), [h = !1, l] = q({
|
|
29
|
+
prop: a,
|
|
30
|
+
defaultProp: e,
|
|
31
|
+
onChange: r
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ p(V, { ...i, children: /* @__PURE__ */ p(
|
|
34
|
+
J,
|
|
35
|
+
{
|
|
36
|
+
scope: n,
|
|
37
|
+
contentId: $(),
|
|
38
|
+
triggerRef: d,
|
|
39
|
+
open: h,
|
|
40
|
+
onOpenChange: l,
|
|
41
|
+
onOpenToggle: c.useCallback(() => l((C) => !C), [l]),
|
|
42
|
+
hasCustomAnchor: v,
|
|
43
|
+
onCustomAnchorAdd: c.useCallback(() => g(!0), []),
|
|
44
|
+
onCustomAnchorRemove: c.useCallback(() => g(!1), []),
|
|
45
|
+
modal: s,
|
|
46
|
+
children: t
|
|
47
|
+
}
|
|
48
|
+
) });
|
|
49
|
+
};
|
|
50
|
+
F.displayName = R;
|
|
51
|
+
var N = "PopoverAnchor", Q = c.forwardRef(
|
|
52
|
+
(o, n) => {
|
|
53
|
+
const { __scopePopover: t, ...a } = o, e = u(N, t), r = m(t), { onCustomAnchorAdd: s, onCustomAnchorRemove: i } = e;
|
|
54
|
+
return c.useEffect(() => (s(), () => i()), [s, i]), /* @__PURE__ */ p(x, { ...r, ...a, ref: n });
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
Q.displayName = N;
|
|
58
|
+
var S = "PopoverTrigger", y = c.forwardRef(
|
|
59
|
+
(o, n) => {
|
|
60
|
+
const { __scopePopover: t, ...a } = o, e = u(S, t), r = m(t), s = O(n, e.triggerRef), i = /* @__PURE__ */ p(
|
|
61
|
+
E.button,
|
|
62
|
+
{
|
|
63
|
+
type: "button",
|
|
64
|
+
"aria-haspopup": "dialog",
|
|
65
|
+
"aria-expanded": e.open,
|
|
66
|
+
"aria-controls": e.contentId,
|
|
67
|
+
"data-state": T(e.open),
|
|
68
|
+
...a,
|
|
69
|
+
ref: s,
|
|
70
|
+
onClick: P(o.onClick, e.onOpenToggle)
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
return e.hasCustomAnchor ? i : /* @__PURE__ */ p(x, { asChild: !0, ...r, children: i });
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
y.displayName = S;
|
|
77
|
+
var A = "PopoverPortal", [X, Y] = b(A, {
|
|
78
|
+
forceMount: void 0
|
|
79
|
+
}), D = (o) => {
|
|
80
|
+
const { __scopePopover: n, forceMount: t, children: a, container: e } = o, r = u(A, n);
|
|
81
|
+
return /* @__PURE__ */ p(X, { scope: n, forceMount: t, children: /* @__PURE__ */ p(w, { present: t || r.open, children: /* @__PURE__ */ p(W, { asChild: !0, container: e, children: a }) }) });
|
|
82
|
+
};
|
|
83
|
+
D.displayName = A;
|
|
84
|
+
var f = "PopoverContent", M = c.forwardRef(
|
|
85
|
+
(o, n) => {
|
|
86
|
+
const t = Y(f, o.__scopePopover), { forceMount: a = t.forceMount, ...e } = o, r = u(f, o.__scopePopover);
|
|
87
|
+
return /* @__PURE__ */ p(w, { present: a || r.open, children: r.modal ? /* @__PURE__ */ p(eo, { ...e, ref: n }) : /* @__PURE__ */ p(ro, { ...e, ref: n }) });
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
M.displayName = f;
|
|
91
|
+
var oo = Z("PopoverContent.RemoveScroll"), eo = c.forwardRef(
|
|
92
|
+
(o, n) => {
|
|
93
|
+
const t = u(f, o.__scopePopover), a = c.useRef(null), e = O(n, a), r = c.useRef(!1);
|
|
94
|
+
return c.useEffect(() => {
|
|
95
|
+
const s = a.current;
|
|
96
|
+
if (s) return z(s);
|
|
97
|
+
}, []), /* @__PURE__ */ p(B, { as: oo, allowPinchZoom: !0, children: /* @__PURE__ */ p(
|
|
98
|
+
k,
|
|
99
|
+
{
|
|
100
|
+
...o,
|
|
101
|
+
ref: e,
|
|
102
|
+
trapFocus: t.open,
|
|
103
|
+
disableOutsidePointerEvents: !0,
|
|
104
|
+
onCloseAutoFocus: P(o.onCloseAutoFocus, (s) => {
|
|
105
|
+
s.preventDefault(), r.current || t.triggerRef.current?.focus();
|
|
106
|
+
}),
|
|
107
|
+
onPointerDownOutside: P(
|
|
108
|
+
o.onPointerDownOutside,
|
|
109
|
+
(s) => {
|
|
110
|
+
const i = s.detail.originalEvent, d = i.button === 0 && i.ctrlKey === !0, v = i.button === 2 || d;
|
|
111
|
+
r.current = v;
|
|
112
|
+
},
|
|
113
|
+
{ checkForDefaultPrevented: !1 }
|
|
114
|
+
),
|
|
115
|
+
onFocusOutside: P(
|
|
116
|
+
o.onFocusOutside,
|
|
117
|
+
(s) => s.preventDefault(),
|
|
118
|
+
{ checkForDefaultPrevented: !1 }
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
) });
|
|
122
|
+
}
|
|
123
|
+
), ro = c.forwardRef(
|
|
124
|
+
(o, n) => {
|
|
125
|
+
const t = u(f, o.__scopePopover), a = c.useRef(!1), e = c.useRef(!1);
|
|
126
|
+
return /* @__PURE__ */ p(
|
|
127
|
+
k,
|
|
128
|
+
{
|
|
129
|
+
...o,
|
|
130
|
+
ref: n,
|
|
131
|
+
trapFocus: !1,
|
|
132
|
+
disableOutsidePointerEvents: !1,
|
|
133
|
+
onCloseAutoFocus: (r) => {
|
|
134
|
+
o.onCloseAutoFocus?.(r), r.defaultPrevented || (a.current || t.triggerRef.current?.focus(), r.preventDefault()), a.current = !1, e.current = !1;
|
|
135
|
+
},
|
|
136
|
+
onInteractOutside: (r) => {
|
|
137
|
+
o.onInteractOutside?.(r), r.defaultPrevented || (a.current = !0, r.detail.originalEvent.type === "pointerdown" && (e.current = !0));
|
|
138
|
+
const s = r.target;
|
|
139
|
+
t.triggerRef.current?.contains(s) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && e.current && r.preventDefault();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
), k = c.forwardRef(
|
|
145
|
+
(o, n) => {
|
|
146
|
+
const {
|
|
147
|
+
__scopePopover: t,
|
|
148
|
+
trapFocus: a,
|
|
149
|
+
onOpenAutoFocus: e,
|
|
150
|
+
onCloseAutoFocus: r,
|
|
151
|
+
disableOutsidePointerEvents: s,
|
|
152
|
+
onEscapeKeyDown: i,
|
|
153
|
+
onPointerDownOutside: d,
|
|
154
|
+
onFocusOutside: v,
|
|
155
|
+
onInteractOutside: g,
|
|
156
|
+
...h
|
|
157
|
+
} = o, l = u(f, t), C = m(t);
|
|
158
|
+
return H(), /* @__PURE__ */ p(
|
|
159
|
+
K,
|
|
160
|
+
{
|
|
161
|
+
asChild: !0,
|
|
162
|
+
loop: !0,
|
|
163
|
+
trapped: a,
|
|
164
|
+
onMountAutoFocus: e,
|
|
165
|
+
onUnmountAutoFocus: r,
|
|
166
|
+
children: /* @__PURE__ */ p(
|
|
167
|
+
G,
|
|
168
|
+
{
|
|
169
|
+
asChild: !0,
|
|
170
|
+
disableOutsidePointerEvents: s,
|
|
171
|
+
onInteractOutside: g,
|
|
172
|
+
onEscapeKeyDown: i,
|
|
173
|
+
onPointerDownOutside: d,
|
|
174
|
+
onFocusOutside: v,
|
|
175
|
+
onDismiss: () => l.onOpenChange(!1),
|
|
176
|
+
children: /* @__PURE__ */ p(
|
|
177
|
+
j,
|
|
178
|
+
{
|
|
179
|
+
"data-state": T(l.open),
|
|
180
|
+
role: "dialog",
|
|
181
|
+
id: l.contentId,
|
|
182
|
+
...C,
|
|
183
|
+
...h,
|
|
184
|
+
ref: n,
|
|
185
|
+
style: {
|
|
186
|
+
...h.style,
|
|
187
|
+
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
188
|
+
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
189
|
+
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
190
|
+
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
191
|
+
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
), I = "PopoverClose", to = c.forwardRef(
|
|
201
|
+
(o, n) => {
|
|
202
|
+
const { __scopePopover: t, ...a } = o, e = u(I, t);
|
|
203
|
+
return /* @__PURE__ */ p(
|
|
204
|
+
E.button,
|
|
205
|
+
{
|
|
206
|
+
type: "button",
|
|
207
|
+
...a,
|
|
208
|
+
ref: n,
|
|
209
|
+
onClick: P(o.onClick, () => e.onOpenChange(!1))
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
to.displayName = I;
|
|
215
|
+
var no = "PopoverArrow", ao = c.forwardRef(
|
|
216
|
+
(o, n) => {
|
|
217
|
+
const { __scopePopover: t, ...a } = o, e = m(t);
|
|
218
|
+
return /* @__PURE__ */ p(U, { ...e, ...a, ref: n });
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
ao.displayName = no;
|
|
222
|
+
function T(o) {
|
|
223
|
+
return o ? "open" : "closed";
|
|
224
|
+
}
|
|
225
|
+
var xo = F, wo = y, Eo = D, bo = M;
|
|
226
|
+
export {
|
|
227
|
+
bo as Content,
|
|
228
|
+
F as Popover,
|
|
229
|
+
Q as PopoverAnchor,
|
|
230
|
+
ao as PopoverArrow,
|
|
231
|
+
to as PopoverClose,
|
|
232
|
+
M as PopoverContent,
|
|
233
|
+
D as PopoverPortal,
|
|
234
|
+
y as PopoverTrigger,
|
|
235
|
+
Eo as Portal,
|
|
236
|
+
xo as Root,
|
|
237
|
+
wo as Trigger,
|
|
238
|
+
_o as createPopoverScope
|
|
239
|
+
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import * as i from "react";
|
|
2
|
-
import * as g from "react-dom";
|
|
3
2
|
import { useComposedRefs as O } from "../../react-compose-refs/dist/index.js";
|
|
4
3
|
import { useLayoutEffect as A } from "../../react-use-layout-effect/dist/index.js";
|
|
5
4
|
function E(n, e) {
|
|
6
|
-
return i.useReducer((t,
|
|
5
|
+
return i.useReducer((t, r) => e[t][r] ?? t, n);
|
|
7
6
|
}
|
|
8
|
-
var
|
|
9
|
-
const { present: e, children: t } = n,
|
|
10
|
-
return typeof t == "function" ||
|
|
7
|
+
var T = (n) => {
|
|
8
|
+
const { present: e, children: t } = n, r = R(e), a = typeof t == "function" ? t({ present: r.isPresent }) : i.Children.only(t), c = O(r.ref, v(a));
|
|
9
|
+
return typeof t == "function" || r.isPresent ? i.cloneElement(a, { ref: c }) : null;
|
|
11
10
|
};
|
|
12
|
-
|
|
11
|
+
T.displayName = "Presence";
|
|
13
12
|
function R(n) {
|
|
14
|
-
const [e, t] = i.useState(),
|
|
13
|
+
const [e, t] = i.useState(), r = i.useRef({}), a = i.useRef(n), c = i.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
|
|
15
14
|
mounted: {
|
|
16
15
|
UNMOUNT: "unmounted",
|
|
17
16
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -25,41 +24,47 @@ function R(n) {
|
|
|
25
24
|
}
|
|
26
25
|
});
|
|
27
26
|
return i.useEffect(() => {
|
|
28
|
-
const
|
|
29
|
-
c.current = N === "mounted" ?
|
|
27
|
+
const o = l(r.current);
|
|
28
|
+
c.current = N === "mounted" ? o : "none";
|
|
30
29
|
}, [N]), A(() => {
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
const
|
|
34
|
-
n ? s("MOUNT") :
|
|
30
|
+
const o = r.current, m = a.current;
|
|
31
|
+
if (m !== n) {
|
|
32
|
+
const f = c.current, u = l(o);
|
|
33
|
+
n ? s("MOUNT") : u === "none" || o?.display === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
|
|
35
34
|
}
|
|
36
35
|
}, [n, s]), A(() => {
|
|
37
36
|
if (e) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
let o;
|
|
38
|
+
const m = e.ownerDocument.defaultView ?? window, d = (u) => {
|
|
39
|
+
const g = l(r.current).includes(u.animationName);
|
|
40
|
+
if (u.target === e && g && (s("ANIMATION_END"), !a.current)) {
|
|
41
|
+
const y = e.style.animationFillMode;
|
|
42
|
+
e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
|
|
43
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = y);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}, f = (u) => {
|
|
47
|
+
u.target === e && (c.current = l(r.current));
|
|
43
48
|
};
|
|
44
|
-
return e.addEventListener("animationstart",
|
|
45
|
-
e.removeEventListener("animationstart",
|
|
49
|
+
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
|
|
50
|
+
m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
|
|
46
51
|
};
|
|
47
52
|
} else
|
|
48
53
|
s("ANIMATION_END");
|
|
49
54
|
}, [e, s]), {
|
|
50
55
|
isPresent: ["mounted", "unmountSuspended"].includes(N),
|
|
51
|
-
ref: i.useCallback((
|
|
52
|
-
|
|
56
|
+
ref: i.useCallback((o) => {
|
|
57
|
+
o && (r.current = getComputedStyle(o)), t(o);
|
|
53
58
|
}, [])
|
|
54
59
|
};
|
|
55
60
|
}
|
|
56
|
-
function
|
|
61
|
+
function l(n) {
|
|
57
62
|
return n?.animationName || "none";
|
|
58
63
|
}
|
|
59
|
-
function
|
|
64
|
+
function v(n) {
|
|
60
65
|
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
61
66
|
return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
|
|
62
67
|
}
|
|
63
68
|
export {
|
|
64
|
-
|
|
69
|
+
T as Presence
|
|
65
70
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import * as p from "react-dom";
|
|
3
|
+
import { createSlot as c } from "../../react-slot/dist/index.js";
|
|
4
4
|
import { jsx as u } from "react/jsx-runtime";
|
|
5
|
-
var
|
|
5
|
+
var l = [
|
|
6
6
|
"a",
|
|
7
7
|
"button",
|
|
8
8
|
"div",
|
|
@@ -19,17 +19,17 @@ var c = [
|
|
|
19
19
|
"span",
|
|
20
20
|
"svg",
|
|
21
21
|
"ul"
|
|
22
|
-
],
|
|
23
|
-
const
|
|
24
|
-
const { asChild:
|
|
25
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(n, { ...
|
|
22
|
+
], h = l.reduce((t, i) => {
|
|
23
|
+
const o = c(`Primitive.${i}`), r = f.forwardRef((e, m) => {
|
|
24
|
+
const { asChild: a, ...s } = e, n = a ? o : i;
|
|
25
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(n, { ...s, ref: m });
|
|
26
26
|
});
|
|
27
|
-
return
|
|
27
|
+
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
28
28
|
}, {});
|
|
29
|
-
function
|
|
30
|
-
|
|
29
|
+
function w(t, i) {
|
|
30
|
+
t && p.flushSync(() => t.dispatchEvent(i));
|
|
31
31
|
}
|
|
32
32
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
h as Primitive,
|
|
34
|
+
w as dispatchDiscreteCustomEvent
|
|
35
35
|
};
|