@phillips/seldon 1.143.2 → 1.145.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/_virtual/build.js +4 -0
- package/dist/_virtual/defaults.js +4 -0
- package/dist/_virtual/encode-new-lines.js +4 -0
- package/dist/_virtual/encode-param-value.js +4 -0
- package/dist/_virtual/fold-line.js +4 -0
- package/dist/_virtual/format-date.js +4 -0
- package/dist/_virtual/format-duration.js +4 -0
- package/dist/_virtual/format-text.js +4 -0
- package/dist/_virtual/format.js +4 -0
- package/dist/_virtual/index.browser.js +6 -0
- package/dist/_virtual/index.cjs.production.min.js +4 -0
- package/dist/_virtual/index.esm.js +6 -0
- package/dist/_virtual/index10.js +4 -0
- package/dist/_virtual/index11.js +4 -0
- package/dist/_virtual/index12.js +4 -0
- package/dist/_virtual/index7.js +4 -0
- package/dist/_virtual/index8.js +4 -0
- package/dist/_virtual/index9.js +4 -0
- package/dist/_virtual/set-alarm.js +4 -0
- package/dist/_virtual/set-contact.js +4 -0
- package/dist/_virtual/set-description.js +4 -0
- package/dist/_virtual/set-geolocation.js +4 -0
- package/dist/_virtual/set-location.js +4 -0
- package/dist/_virtual/set-organizer.js +4 -0
- package/dist/_virtual/set-summary.js +4 -0
- package/dist/_virtual/validate.js +4 -0
- package/dist/components/AddToCalendar/AddToCalendar.d.ts +10 -0
- package/dist/components/AddToCalendar/AddToCalendar.js +62 -0
- package/dist/components/AddToCalendar/AddToCalendar.stories.d.ts +25 -0
- package/dist/components/AddToCalendar/AddToCalendar.test.d.ts +1 -0
- package/dist/components/AddToCalendar/calendarLinks.d.ts +6 -0
- package/dist/components/AddToCalendar/calendarLinks.js +89 -0
- package/dist/components/AddToCalendar/calendarLinks.test.d.ts +1 -0
- package/dist/components/AddToCalendar/index.d.ts +1 -0
- package/dist/components/AddToCalendar/types.d.ts +8 -0
- package/dist/components/ComboBox/ComboBox.d.ts +69 -0
- package/dist/components/ComboBox/ComboBox.js +221 -0
- package/dist/components/ComboBox/ComboBox.stories.d.ts +18 -0
- package/dist/components/ComboBox/ComboBox.test.d.ts +1 -0
- package/dist/components/ComboBox/index.d.ts +1 -0
- package/dist/components/PhoneNumberPicker/PhoneNumberPicker.d.ts +38 -0
- package/dist/components/PhoneNumberPicker/PhoneNumberPicker.stories.d.ts +14 -0
- package/dist/components/PhoneNumberPicker/PhoneNumberPicker.test.d.ts +1 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.js +116 -112
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +208 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +608 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/dist/index.js +218 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-roving-focus/dist/index.js +183 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +18 -17
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper/dist/index.js +218 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.js +17 -0
- package/dist/node_modules/cmdk/dist/index.js +312 -0
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
- package/dist/node_modules/date-fns/_lib/format/formatters.js +517 -0
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +20 -0
- package/dist/node_modules/date-fns/addHours.js +9 -0
- package/dist/node_modules/date-fns/addMilliseconds.js +9 -0
- package/dist/node_modules/date-fns/constants.js +6 -5
- package/dist/node_modules/date-fns/format.js +58 -0
- package/dist/node_modules/date-fns/getDayOfYear.js +11 -0
- package/dist/node_modules/date-fns/getISOWeek.js +12 -0
- package/dist/node_modules/date-fns/getISOWeekYear.js +15 -0
- package/dist/node_modules/date-fns/getWeek.js +12 -0
- package/dist/node_modules/date-fns/getWeekYear.js +16 -0
- package/dist/node_modules/date-fns/isDate.js +7 -0
- package/dist/node_modules/date-fns/isValid.js +9 -0
- package/dist/node_modules/date-fns/startOfISOWeek.js +8 -0
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +11 -0
- package/dist/node_modules/date-fns/startOfWeekYear.js +12 -0
- package/dist/node_modules/date-fns/startOfYear.js +9 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js +7 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js +7 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js +63 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js +4 -0
- package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js +71 -0
- package/dist/node_modules/date-fns-tz/dist/esm/toDate/index.js +180 -0
- package/dist/node_modules/date-fns-tz/dist/esm/toZonedTime/index.js +10 -0
- package/dist/node_modules/ics/dist/defaults.js +23 -0
- package/dist/node_modules/ics/dist/index.js +115 -0
- package/dist/node_modules/ics/dist/pipeline/build.js +50 -0
- package/dist/node_modules/ics/dist/pipeline/format.js +70 -0
- package/dist/node_modules/ics/dist/pipeline/index.js +53 -0
- package/dist/node_modules/ics/dist/pipeline/validate.js +17 -0
- package/dist/node_modules/ics/dist/schema/index.js +211 -0
- package/dist/node_modules/ics/dist/utils/encode-new-lines.js +9 -0
- package/dist/node_modules/ics/dist/utils/encode-param-value.js +9 -0
- package/dist/node_modules/ics/dist/utils/fold-line.js +14 -0
- package/dist/node_modules/ics/dist/utils/format-date.js +68 -0
- package/dist/node_modules/ics/dist/utils/format-duration.js +10 -0
- package/dist/node_modules/ics/dist/utils/format-text.js +9 -0
- package/dist/node_modules/ics/dist/utils/index.js +87 -0
- package/dist/node_modules/ics/dist/utils/set-alarm.js +49 -0
- package/dist/node_modules/ics/dist/utils/set-contact.js +18 -0
- package/dist/node_modules/ics/dist/utils/set-description.js +15 -0
- package/dist/node_modules/ics/dist/utils/set-geolocation.js +10 -0
- package/dist/node_modules/ics/dist/utils/set-location.js +15 -0
- package/dist/node_modules/ics/dist/utils/set-organizer.js +16 -0
- package/dist/node_modules/ics/dist/utils/set-summary.js +15 -0
- package/dist/node_modules/nanoid/index.browser.js +19 -0
- package/dist/node_modules/nanoid/url-alphabet/index.js +4 -0
- package/dist/node_modules/property-expr/index.js +77 -0
- package/dist/node_modules/runes2/dist/index.cjs.development.js +139 -0
- package/dist/node_modules/runes2/dist/index.cjs.production.min.js +86 -0
- package/dist/node_modules/runes2/dist/index.js +8 -0
- package/dist/node_modules/tiny-case/index.js +17 -0
- package/dist/node_modules/toposort/index.js +65 -0
- package/dist/node_modules/yup/index.esm.js +1899 -0
- package/dist/scss/_vars.scss +3 -0
- package/dist/scss/_vars.scss.js +3 -0
- package/dist/scss/componentStyles.scss +2 -0
- package/dist/scss/components/AddToCalendar/_addToCalendar.scss +64 -0
- package/dist/scss/components/ComboBox/_combobox.scss +149 -0
- package/package.json +8 -2
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import * as p from "react";
|
|
2
|
+
import { composeEventHandlers as m } from "../../primitive/dist/index.js";
|
|
3
|
+
import { composeRefs as x } from "../../react-compose-refs/dist/index.js";
|
|
4
|
+
import { createContextScope as S } from "../../react-context/dist/index.js";
|
|
5
|
+
import { useControllableState as E } from "../node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
|
|
6
|
+
import { Primitive as P } from "../node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
7
|
+
import { createMenuScope as D, Anchor as y, Content as O, Group as T, Label as G, Item as k, CheckboxItem as L, RadioGroup as K, RadioItem as U, ItemIndicator as B, Separator as F, Arrow as H, SubTrigger as W, SubContent as $, Root as j, Portal as X } from "../../react-menu/dist/index.js";
|
|
8
|
+
import { useId as g } from "../../react-id/dist/index.js";
|
|
9
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
10
|
+
var f = "DropdownMenu", [q, Ao] = S(
|
|
11
|
+
f,
|
|
12
|
+
[D]
|
|
13
|
+
), i = D(), [z, v] = q(f), _ = (o) => {
|
|
14
|
+
const {
|
|
15
|
+
__scopeDropdownMenu: n,
|
|
16
|
+
children: r,
|
|
17
|
+
dir: e,
|
|
18
|
+
open: t,
|
|
19
|
+
defaultOpen: u,
|
|
20
|
+
onOpenChange: s,
|
|
21
|
+
modal: d = !0
|
|
22
|
+
} = o, c = i(n), M = p.useRef(null), [l, w] = E({
|
|
23
|
+
prop: t,
|
|
24
|
+
defaultProp: u ?? !1,
|
|
25
|
+
onChange: s,
|
|
26
|
+
caller: f
|
|
27
|
+
});
|
|
28
|
+
return /* @__PURE__ */ a(
|
|
29
|
+
z,
|
|
30
|
+
{
|
|
31
|
+
scope: n,
|
|
32
|
+
triggerId: g(),
|
|
33
|
+
triggerRef: M,
|
|
34
|
+
contentId: g(),
|
|
35
|
+
open: l,
|
|
36
|
+
onOpenChange: w,
|
|
37
|
+
onOpenToggle: p.useCallback(() => w((C) => !C), [w]),
|
|
38
|
+
modal: d,
|
|
39
|
+
children: /* @__PURE__ */ a(j, { ...c, open: l, onOpenChange: w, dir: e, modal: d, children: r })
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
_.displayName = f;
|
|
44
|
+
var R = "DropdownMenuTrigger", h = p.forwardRef(
|
|
45
|
+
(o, n) => {
|
|
46
|
+
const { __scopeDropdownMenu: r, disabled: e = !1, ...t } = o, u = v(R, r), s = i(r);
|
|
47
|
+
return /* @__PURE__ */ a(y, { asChild: !0, ...s, children: /* @__PURE__ */ a(
|
|
48
|
+
P.button,
|
|
49
|
+
{
|
|
50
|
+
type: "button",
|
|
51
|
+
id: u.triggerId,
|
|
52
|
+
"aria-haspopup": "menu",
|
|
53
|
+
"aria-expanded": u.open,
|
|
54
|
+
"aria-controls": u.open ? u.contentId : void 0,
|
|
55
|
+
"data-state": u.open ? "open" : "closed",
|
|
56
|
+
"data-disabled": e ? "" : void 0,
|
|
57
|
+
disabled: e,
|
|
58
|
+
...t,
|
|
59
|
+
ref: x(n, u.triggerRef),
|
|
60
|
+
onPointerDown: m(o.onPointerDown, (d) => {
|
|
61
|
+
!e && d.button === 0 && d.ctrlKey === !1 && (u.onOpenToggle(), u.open || d.preventDefault());
|
|
62
|
+
}),
|
|
63
|
+
onKeyDown: m(o.onKeyDown, (d) => {
|
|
64
|
+
e || (["Enter", " "].includes(d.key) && u.onOpenToggle(), d.key === "ArrowDown" && u.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(d.key) && d.preventDefault());
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
) });
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
h.displayName = R;
|
|
71
|
+
var J = "DropdownMenuPortal", I = (o) => {
|
|
72
|
+
const { __scopeDropdownMenu: n, ...r } = o, e = i(n);
|
|
73
|
+
return /* @__PURE__ */ a(X, { ...e, ...r });
|
|
74
|
+
};
|
|
75
|
+
I.displayName = J;
|
|
76
|
+
var N = "DropdownMenuContent", b = p.forwardRef(
|
|
77
|
+
(o, n) => {
|
|
78
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = v(N, r), u = i(r), s = p.useRef(!1);
|
|
79
|
+
return /* @__PURE__ */ a(
|
|
80
|
+
O,
|
|
81
|
+
{
|
|
82
|
+
id: t.contentId,
|
|
83
|
+
"aria-labelledby": t.triggerId,
|
|
84
|
+
...u,
|
|
85
|
+
...e,
|
|
86
|
+
ref: n,
|
|
87
|
+
onCloseAutoFocus: m(o.onCloseAutoFocus, (d) => {
|
|
88
|
+
s.current || t.triggerRef.current?.focus(), s.current = !1, d.preventDefault();
|
|
89
|
+
}),
|
|
90
|
+
onInteractOutside: m(o.onInteractOutside, (d) => {
|
|
91
|
+
const c = d.detail.originalEvent, M = c.button === 0 && c.ctrlKey === !0, l = c.button === 2 || M;
|
|
92
|
+
(!t.modal || l) && (s.current = !0);
|
|
93
|
+
}),
|
|
94
|
+
style: {
|
|
95
|
+
...o.style,
|
|
96
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
97
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
98
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
99
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
100
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
b.displayName = N;
|
|
107
|
+
var Q = "DropdownMenuGroup", V = p.forwardRef(
|
|
108
|
+
(o, n) => {
|
|
109
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = i(r);
|
|
110
|
+
return /* @__PURE__ */ a(T, { ...t, ...e, ref: n });
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
V.displayName = Q;
|
|
114
|
+
var Y = "DropdownMenuLabel", Z = p.forwardRef(
|
|
115
|
+
(o, n) => {
|
|
116
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = i(r);
|
|
117
|
+
return /* @__PURE__ */ a(G, { ...t, ...e, ref: n });
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
Z.displayName = Y;
|
|
121
|
+
var oo = "DropdownMenuItem", A = p.forwardRef(
|
|
122
|
+
(o, n) => {
|
|
123
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = i(r);
|
|
124
|
+
return /* @__PURE__ */ a(k, { ...t, ...e, ref: n });
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
A.displayName = oo;
|
|
128
|
+
var eo = "DropdownMenuCheckboxItem", ro = p.forwardRef((o, n) => {
|
|
129
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = i(r);
|
|
130
|
+
return /* @__PURE__ */ a(L, { ...t, ...e, ref: n });
|
|
131
|
+
});
|
|
132
|
+
ro.displayName = eo;
|
|
133
|
+
var no = "DropdownMenuRadioGroup", to = p.forwardRef((o, n) => {
|
|
134
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = i(r);
|
|
135
|
+
return /* @__PURE__ */ a(K, { ...t, ...e, ref: n });
|
|
136
|
+
});
|
|
137
|
+
to.displayName = no;
|
|
138
|
+
var ao = "DropdownMenuRadioItem", po = p.forwardRef((o, n) => {
|
|
139
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = i(r);
|
|
140
|
+
return /* @__PURE__ */ a(U, { ...t, ...e, ref: n });
|
|
141
|
+
});
|
|
142
|
+
po.displayName = ao;
|
|
143
|
+
var io = "DropdownMenuItemIndicator", uo = p.forwardRef((o, n) => {
|
|
144
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = i(r);
|
|
145
|
+
return /* @__PURE__ */ a(B, { ...t, ...e, ref: n });
|
|
146
|
+
});
|
|
147
|
+
uo.displayName = io;
|
|
148
|
+
var so = "DropdownMenuSeparator", co = p.forwardRef((o, n) => {
|
|
149
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = i(r);
|
|
150
|
+
return /* @__PURE__ */ a(F, { ...t, ...e, ref: n });
|
|
151
|
+
});
|
|
152
|
+
co.displayName = so;
|
|
153
|
+
var lo = "DropdownMenuArrow", wo = p.forwardRef(
|
|
154
|
+
(o, n) => {
|
|
155
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = i(r);
|
|
156
|
+
return /* @__PURE__ */ a(H, { ...t, ...e, ref: n });
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
wo.displayName = lo;
|
|
160
|
+
var mo = "DropdownMenuSubTrigger", fo = p.forwardRef((o, n) => {
|
|
161
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = i(r);
|
|
162
|
+
return /* @__PURE__ */ a(W, { ...t, ...e, ref: n });
|
|
163
|
+
});
|
|
164
|
+
fo.displayName = mo;
|
|
165
|
+
var Mo = "DropdownMenuSubContent", go = p.forwardRef((o, n) => {
|
|
166
|
+
const { __scopeDropdownMenu: r, ...e } = o, t = i(r);
|
|
167
|
+
return /* @__PURE__ */ a(
|
|
168
|
+
$,
|
|
169
|
+
{
|
|
170
|
+
...t,
|
|
171
|
+
...e,
|
|
172
|
+
ref: n,
|
|
173
|
+
style: {
|
|
174
|
+
...o.style,
|
|
175
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
176
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
177
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
178
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
179
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
});
|
|
184
|
+
go.displayName = Mo;
|
|
185
|
+
var Co = _, xo = h, So = I, Eo = b, Po = A;
|
|
186
|
+
export {
|
|
187
|
+
Eo as Content,
|
|
188
|
+
_ as DropdownMenu,
|
|
189
|
+
wo as DropdownMenuArrow,
|
|
190
|
+
ro as DropdownMenuCheckboxItem,
|
|
191
|
+
b as DropdownMenuContent,
|
|
192
|
+
V as DropdownMenuGroup,
|
|
193
|
+
A as DropdownMenuItem,
|
|
194
|
+
uo as DropdownMenuItemIndicator,
|
|
195
|
+
Z as DropdownMenuLabel,
|
|
196
|
+
I as DropdownMenuPortal,
|
|
197
|
+
to as DropdownMenuRadioGroup,
|
|
198
|
+
po as DropdownMenuRadioItem,
|
|
199
|
+
co as DropdownMenuSeparator,
|
|
200
|
+
go as DropdownMenuSubContent,
|
|
201
|
+
fo as DropdownMenuSubTrigger,
|
|
202
|
+
h as DropdownMenuTrigger,
|
|
203
|
+
Po as Item,
|
|
204
|
+
So as Portal,
|
|
205
|
+
Co as Root,
|
|
206
|
+
xo as Trigger,
|
|
207
|
+
Ao as createDropdownMenuScope
|
|
208
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import "react-dom";
|
|
3
|
+
import { createSlot as l } from "../../react-slot/dist/index.js";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
var u = [
|
|
6
|
+
"a",
|
|
7
|
+
"button",
|
|
8
|
+
"div",
|
|
9
|
+
"form",
|
|
10
|
+
"h2",
|
|
11
|
+
"h3",
|
|
12
|
+
"img",
|
|
13
|
+
"input",
|
|
14
|
+
"label",
|
|
15
|
+
"li",
|
|
16
|
+
"nav",
|
|
17
|
+
"ol",
|
|
18
|
+
"p",
|
|
19
|
+
"select",
|
|
20
|
+
"span",
|
|
21
|
+
"svg",
|
|
22
|
+
"ul"
|
|
23
|
+
], w = u.reduce((t, i) => {
|
|
24
|
+
const o = l(`Primitive.${i}`), r = f.forwardRef((e, m) => {
|
|
25
|
+
const { asChild: a, ...p } = e, s = a ? o : i;
|
|
26
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(s, { ...p, ref: m });
|
|
27
|
+
});
|
|
28
|
+
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
29
|
+
}, {});
|
|
30
|
+
export {
|
|
31
|
+
w as Primitive
|
|
32
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
import { useComposedRefs as m } from "../../../../../react-compose-refs/dist/index.js";
|
|
3
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
4
|
+
// @__NO_SIDE_EFFECTS__
|
|
5
|
+
function V(e) {
|
|
6
|
+
const r = /* @__PURE__ */ y(e), o = t.forwardRef((l, n) => {
|
|
7
|
+
const { children: i, ...a } = l, c = t.Children.toArray(i), s = c.find(g);
|
|
8
|
+
if (s) {
|
|
9
|
+
const f = s.props.children, d = c.map((p) => p === s ? t.Children.count(f) > 1 ? t.Children.only(null) : t.isValidElement(f) ? f.props.children : null : p);
|
|
10
|
+
return /* @__PURE__ */ u(r, { ...a, ref: n, children: t.isValidElement(f) ? t.cloneElement(f, void 0, d) : null });
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ u(r, { ...a, ref: n, children: i });
|
|
13
|
+
});
|
|
14
|
+
return o.displayName = `${e}.Slot`, o;
|
|
15
|
+
}
|
|
16
|
+
// @__NO_SIDE_EFFECTS__
|
|
17
|
+
function y(e) {
|
|
18
|
+
const r = t.forwardRef((o, l) => {
|
|
19
|
+
const { children: n, ...i } = o, a = t.isValidElement(n) ? R(n) : void 0, c = m(a, l);
|
|
20
|
+
if (t.isValidElement(n)) {
|
|
21
|
+
const s = C(i, n.props);
|
|
22
|
+
return n.type !== t.Fragment && (s.ref = c), t.cloneElement(n, s);
|
|
23
|
+
}
|
|
24
|
+
return t.Children.count(n) > 1 ? t.Children.only(null) : null;
|
|
25
|
+
});
|
|
26
|
+
return r.displayName = `${e}.SlotClone`, r;
|
|
27
|
+
}
|
|
28
|
+
var E = Symbol("radix.slottable");
|
|
29
|
+
function g(e) {
|
|
30
|
+
return t.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === E;
|
|
31
|
+
}
|
|
32
|
+
function C(e, r) {
|
|
33
|
+
const o = { ...r };
|
|
34
|
+
for (const l in r) {
|
|
35
|
+
const n = e[l], i = r[l];
|
|
36
|
+
/^on[A-Z]/.test(l) ? n && i ? o[l] = (...c) => {
|
|
37
|
+
const s = i(...c);
|
|
38
|
+
return n(...c), s;
|
|
39
|
+
} : n && (o[l] = n) : l === "style" ? o[l] = { ...n, ...i } : l === "className" && (o[l] = [n, i].filter(Boolean).join(" "));
|
|
40
|
+
}
|
|
41
|
+
return { ...e, ...o };
|
|
42
|
+
}
|
|
43
|
+
function R(e) {
|
|
44
|
+
let r = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, o = r && "isReactWarning" in r && r.isReactWarning;
|
|
45
|
+
return o ? e.ref : (r = Object.getOwnPropertyDescriptor(e, "ref")?.get, o = r && "isReactWarning" in r && r.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
V as createSlot
|
|
49
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { useLayoutEffect as m } from "../../../../../react-use-layout-effect/dist/index.js";
|
|
3
|
+
var v = o[" useInsertionEffect ".trim().toString()] || m;
|
|
4
|
+
function w({
|
|
5
|
+
prop: e,
|
|
6
|
+
defaultProp: s,
|
|
7
|
+
onChange: t = () => {
|
|
8
|
+
},
|
|
9
|
+
caller: f
|
|
10
|
+
}) {
|
|
11
|
+
const [u, c, i] = R({
|
|
12
|
+
defaultProp: s,
|
|
13
|
+
onChange: t
|
|
14
|
+
}), n = e !== void 0, a = n ? e : u;
|
|
15
|
+
{
|
|
16
|
+
const r = o.useRef(e !== void 0);
|
|
17
|
+
o.useEffect(() => {
|
|
18
|
+
const l = r.current;
|
|
19
|
+
l !== n && console.warn(
|
|
20
|
+
`${f} is changing from ${l ? "controlled" : "uncontrolled"} to ${n ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
21
|
+
), r.current = n;
|
|
22
|
+
}, [n, f]);
|
|
23
|
+
}
|
|
24
|
+
const d = o.useCallback(
|
|
25
|
+
(r) => {
|
|
26
|
+
if (n) {
|
|
27
|
+
const l = C(r) ? r(e) : r;
|
|
28
|
+
l !== e && i.current?.(l);
|
|
29
|
+
} else
|
|
30
|
+
c(r);
|
|
31
|
+
},
|
|
32
|
+
[n, e, c, i]
|
|
33
|
+
);
|
|
34
|
+
return [a, d];
|
|
35
|
+
}
|
|
36
|
+
function R({
|
|
37
|
+
defaultProp: e,
|
|
38
|
+
onChange: s
|
|
39
|
+
}) {
|
|
40
|
+
const [t, f] = o.useState(e), u = o.useRef(t), c = o.useRef(s);
|
|
41
|
+
return v(() => {
|
|
42
|
+
c.current = s;
|
|
43
|
+
}, [s]), o.useEffect(() => {
|
|
44
|
+
u.current !== t && (c.current?.(t), u.current = t);
|
|
45
|
+
}, [t, u]), [t, f, c];
|
|
46
|
+
}
|
|
47
|
+
function C(e) {
|
|
48
|
+
return typeof e == "function";
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
w as useControllableState
|
|
52
|
+
};
|