@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.
Files changed (136) hide show
  1. package/dist/_virtual/build.js +4 -0
  2. package/dist/_virtual/defaults.js +4 -0
  3. package/dist/_virtual/encode-new-lines.js +4 -0
  4. package/dist/_virtual/encode-param-value.js +4 -0
  5. package/dist/_virtual/fold-line.js +4 -0
  6. package/dist/_virtual/format-date.js +4 -0
  7. package/dist/_virtual/format-duration.js +4 -0
  8. package/dist/_virtual/format-text.js +4 -0
  9. package/dist/_virtual/format.js +4 -0
  10. package/dist/_virtual/index.browser.js +6 -0
  11. package/dist/_virtual/index.cjs.production.min.js +4 -0
  12. package/dist/_virtual/index.esm.js +6 -0
  13. package/dist/_virtual/index10.js +4 -0
  14. package/dist/_virtual/index11.js +4 -0
  15. package/dist/_virtual/index12.js +4 -0
  16. package/dist/_virtual/index7.js +4 -0
  17. package/dist/_virtual/index8.js +4 -0
  18. package/dist/_virtual/index9.js +4 -0
  19. package/dist/_virtual/set-alarm.js +4 -0
  20. package/dist/_virtual/set-contact.js +4 -0
  21. package/dist/_virtual/set-description.js +4 -0
  22. package/dist/_virtual/set-geolocation.js +4 -0
  23. package/dist/_virtual/set-location.js +4 -0
  24. package/dist/_virtual/set-organizer.js +4 -0
  25. package/dist/_virtual/set-summary.js +4 -0
  26. package/dist/_virtual/validate.js +4 -0
  27. package/dist/components/AddToCalendar/AddToCalendar.d.ts +10 -0
  28. package/dist/components/AddToCalendar/AddToCalendar.js +62 -0
  29. package/dist/components/AddToCalendar/AddToCalendar.stories.d.ts +25 -0
  30. package/dist/components/AddToCalendar/AddToCalendar.test.d.ts +1 -0
  31. package/dist/components/AddToCalendar/calendarLinks.d.ts +6 -0
  32. package/dist/components/AddToCalendar/calendarLinks.js +89 -0
  33. package/dist/components/AddToCalendar/calendarLinks.test.d.ts +1 -0
  34. package/dist/components/AddToCalendar/index.d.ts +1 -0
  35. package/dist/components/AddToCalendar/types.d.ts +8 -0
  36. package/dist/components/ComboBox/ComboBox.d.ts +69 -0
  37. package/dist/components/ComboBox/ComboBox.js +221 -0
  38. package/dist/components/ComboBox/ComboBox.stories.d.ts +18 -0
  39. package/dist/components/ComboBox/ComboBox.test.d.ts +1 -0
  40. package/dist/components/ComboBox/index.d.ts +1 -0
  41. package/dist/components/PhoneNumberPicker/PhoneNumberPicker.d.ts +38 -0
  42. package/dist/components/PhoneNumberPicker/PhoneNumberPicker.stories.d.ts +14 -0
  43. package/dist/components/PhoneNumberPicker/PhoneNumberPicker.test.d.ts +1 -0
  44. package/dist/index.d.ts +10 -1
  45. package/dist/index.js +116 -112
  46. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +208 -0
  47. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.js +32 -0
  48. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  49. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
  50. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +608 -0
  51. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
  52. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-collection/dist/index.js +48 -0
  53. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
  54. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
  55. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/dist/index.js +218 -0
  56. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
  57. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
  58. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
  59. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-roving-focus/dist/index.js +183 -0
  60. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  61. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
  62. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +18 -17
  63. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-arrow/dist/index.js +24 -0
  64. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
  65. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-scope/dist/index.js +136 -0
  66. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper/dist/index.js +218 -0
  67. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal/dist/index.js +15 -0
  68. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence/dist/index.js +70 -0
  69. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
  70. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js +49 -0
  71. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +52 -0
  72. package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.js +17 -0
  73. package/dist/node_modules/cmdk/dist/index.js +312 -0
  74. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
  75. package/dist/node_modules/date-fns/_lib/format/formatters.js +517 -0
  76. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
  77. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
  78. package/dist/node_modules/date-fns/_lib/protectedTokens.js +20 -0
  79. package/dist/node_modules/date-fns/addHours.js +9 -0
  80. package/dist/node_modules/date-fns/addMilliseconds.js +9 -0
  81. package/dist/node_modules/date-fns/constants.js +6 -5
  82. package/dist/node_modules/date-fns/format.js +58 -0
  83. package/dist/node_modules/date-fns/getDayOfYear.js +11 -0
  84. package/dist/node_modules/date-fns/getISOWeek.js +12 -0
  85. package/dist/node_modules/date-fns/getISOWeekYear.js +15 -0
  86. package/dist/node_modules/date-fns/getWeek.js +12 -0
  87. package/dist/node_modules/date-fns/getWeekYear.js +16 -0
  88. package/dist/node_modules/date-fns/isDate.js +7 -0
  89. package/dist/node_modules/date-fns/isValid.js +9 -0
  90. package/dist/node_modules/date-fns/startOfISOWeek.js +8 -0
  91. package/dist/node_modules/date-fns/startOfISOWeekYear.js +11 -0
  92. package/dist/node_modules/date-fns/startOfWeekYear.js +12 -0
  93. package/dist/node_modules/date-fns/startOfYear.js +9 -0
  94. package/dist/node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js +7 -0
  95. package/dist/node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js +7 -0
  96. package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js +63 -0
  97. package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js +4 -0
  98. package/dist/node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js +71 -0
  99. package/dist/node_modules/date-fns-tz/dist/esm/toDate/index.js +180 -0
  100. package/dist/node_modules/date-fns-tz/dist/esm/toZonedTime/index.js +10 -0
  101. package/dist/node_modules/ics/dist/defaults.js +23 -0
  102. package/dist/node_modules/ics/dist/index.js +115 -0
  103. package/dist/node_modules/ics/dist/pipeline/build.js +50 -0
  104. package/dist/node_modules/ics/dist/pipeline/format.js +70 -0
  105. package/dist/node_modules/ics/dist/pipeline/index.js +53 -0
  106. package/dist/node_modules/ics/dist/pipeline/validate.js +17 -0
  107. package/dist/node_modules/ics/dist/schema/index.js +211 -0
  108. package/dist/node_modules/ics/dist/utils/encode-new-lines.js +9 -0
  109. package/dist/node_modules/ics/dist/utils/encode-param-value.js +9 -0
  110. package/dist/node_modules/ics/dist/utils/fold-line.js +14 -0
  111. package/dist/node_modules/ics/dist/utils/format-date.js +68 -0
  112. package/dist/node_modules/ics/dist/utils/format-duration.js +10 -0
  113. package/dist/node_modules/ics/dist/utils/format-text.js +9 -0
  114. package/dist/node_modules/ics/dist/utils/index.js +87 -0
  115. package/dist/node_modules/ics/dist/utils/set-alarm.js +49 -0
  116. package/dist/node_modules/ics/dist/utils/set-contact.js +18 -0
  117. package/dist/node_modules/ics/dist/utils/set-description.js +15 -0
  118. package/dist/node_modules/ics/dist/utils/set-geolocation.js +10 -0
  119. package/dist/node_modules/ics/dist/utils/set-location.js +15 -0
  120. package/dist/node_modules/ics/dist/utils/set-organizer.js +16 -0
  121. package/dist/node_modules/ics/dist/utils/set-summary.js +15 -0
  122. package/dist/node_modules/nanoid/index.browser.js +19 -0
  123. package/dist/node_modules/nanoid/url-alphabet/index.js +4 -0
  124. package/dist/node_modules/property-expr/index.js +77 -0
  125. package/dist/node_modules/runes2/dist/index.cjs.development.js +139 -0
  126. package/dist/node_modules/runes2/dist/index.cjs.production.min.js +86 -0
  127. package/dist/node_modules/runes2/dist/index.js +8 -0
  128. package/dist/node_modules/tiny-case/index.js +17 -0
  129. package/dist/node_modules/toposort/index.js +65 -0
  130. package/dist/node_modules/yup/index.esm.js +1899 -0
  131. package/dist/scss/_vars.scss +3 -0
  132. package/dist/scss/_vars.scss.js +3 -0
  133. package/dist/scss/componentStyles.scss +2 -0
  134. package/dist/scss/components/AddToCalendar/_addToCalendar.scss +64 -0
  135. package/dist/scss/components/ComboBox/_combobox.scss +149 -0
  136. package/package.json +8 -2
@@ -0,0 +1,218 @@
1
+ import * as s from "react";
2
+ import { useFloating as fe, offset as me, shift as he, flip as ge, size as ue, arrow as we, hide as Pe, limitShift as xe } from "../../../../../../@floating-ui/react-dom/dist/floating-ui.react-dom.js";
3
+ import { Root as ye } from "../../react-arrow/dist/index.js";
4
+ import { useComposedRefs as I } from "../../../../../react-compose-refs/dist/index.js";
5
+ import { createContextScope as Ae } from "../../../../../react-context/dist/index.js";
6
+ import { Primitive as Y } from "../../react-primitive/dist/index.js";
7
+ import { useCallbackRef as ve } from "../../../../../react-use-callback-ref/dist/index.js";
8
+ import { useLayoutEffect as z } from "../../../../../react-use-layout-effect/dist/index.js";
9
+ import { useSize as Ce } from "../../../../../react-use-size/dist/index.js";
10
+ import { jsx as f } from "react/jsx-runtime";
11
+ import { autoUpdate as Se } from "../../../../../../@floating-ui/dom/dist/floating-ui.dom.js";
12
+ var b = "Popper", [M, ke] = Ae(b), [be, X] = M(b), D = (e) => {
13
+ const { __scopePopper: a, children: o } = e, [i, n] = s.useState(null);
14
+ return /* @__PURE__ */ f(be, { scope: a, anchor: i, onAnchorChange: n, children: o });
15
+ };
16
+ D.displayName = b;
17
+ var F = "PopperAnchor", k = s.forwardRef(
18
+ (e, a) => {
19
+ const { __scopePopper: o, virtualRef: i, ...n } = e, t = X(F, o), r = s.useRef(null), g = I(a, r);
20
+ return s.useEffect(() => {
21
+ t.onAnchorChange(i?.current || r.current);
22
+ }), i ? null : /* @__PURE__ */ f(Y.div, { ...n, ref: g });
23
+ }
24
+ );
25
+ k.displayName = F;
26
+ var O = "PopperContent", [Oe, Re] = M(O), B = s.forwardRef(
27
+ (e, a) => {
28
+ const {
29
+ __scopePopper: o,
30
+ side: i = "bottom",
31
+ sideOffset: n = 0,
32
+ align: t = "center",
33
+ alignOffset: r = 0,
34
+ arrowPadding: g = 0,
35
+ avoidCollisions: p = !0,
36
+ collisionBoundary: c = [],
37
+ collisionPadding: u = 0,
38
+ sticky: m = "partial",
39
+ hideWhenDetached: P = !1,
40
+ updatePositionStrategy: x = "optimized",
41
+ onPlaced: l,
42
+ ...d
43
+ } = e, Z = X(O, o), [C, U] = s.useState(null), q = I(a, (w) => U(w)), [S, G] = s.useState(null), R = Ce(S), J = R?.width ?? 0, E = R?.height ?? 0, K = i + (t !== "center" ? "-" + t : ""), Q = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, N = Array.isArray(c) ? c : [c], V = N.length > 0, y = {
44
+ padding: Q,
45
+ boundary: N.filter(Ne),
46
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
47
+ altBoundary: V
48
+ }, { refs: ee, floatingStyles: _, placement: te, isPositioned: A, middlewareData: h } = fe({
49
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
50
+ strategy: "fixed",
51
+ placement: K,
52
+ whileElementsMounted: (...w) => Se(...w, {
53
+ animationFrame: x === "always"
54
+ }),
55
+ elements: {
56
+ reference: Z.anchor
57
+ },
58
+ middleware: [
59
+ me({ mainAxis: n + E, alignmentAxis: r }),
60
+ p && he({
61
+ mainAxis: !0,
62
+ crossAxis: !1,
63
+ limiter: m === "partial" ? xe() : void 0,
64
+ ...y
65
+ }),
66
+ p && ge({ ...y }),
67
+ ue({
68
+ ...y,
69
+ apply: ({ elements: w, rects: W, availableWidth: pe, availableHeight: ce }) => {
70
+ const { width: de, height: le } = W.reference, v = w.floating.style;
71
+ v.setProperty("--radix-popper-available-width", `${pe}px`), v.setProperty("--radix-popper-available-height", `${ce}px`), v.setProperty("--radix-popper-anchor-width", `${de}px`), v.setProperty("--radix-popper-anchor-height", `${le}px`);
72
+ }
73
+ }),
74
+ S && we({ element: S, padding: g }),
75
+ _e({ arrowWidth: J, arrowHeight: E }),
76
+ P && Pe({ strategy: "referenceHidden", ...y })
77
+ ]
78
+ }), [$, re] = L(te), H = ve(l);
79
+ z(() => {
80
+ A && H?.();
81
+ }, [A, H]);
82
+ const oe = h.arrow?.x, ne = h.arrow?.y, ae = h.arrow?.centerOffset !== 0, [ie, se] = s.useState();
83
+ return z(() => {
84
+ C && se(window.getComputedStyle(C).zIndex);
85
+ }, [C]), /* @__PURE__ */ f(
86
+ "div",
87
+ {
88
+ ref: ee.setFloating,
89
+ "data-radix-popper-content-wrapper": "",
90
+ style: {
91
+ ..._,
92
+ transform: A ? _.transform : "translate(0, -200%)",
93
+ // keep off the page when measuring
94
+ minWidth: "max-content",
95
+ zIndex: ie,
96
+ "--radix-popper-transform-origin": [
97
+ h.transformOrigin?.x,
98
+ h.transformOrigin?.y
99
+ ].join(" "),
100
+ // hide the content if using the hide middleware and should be hidden
101
+ // set visibility to hidden and disable pointer events so the UI behaves
102
+ // as if the PopperContent isn't there at all
103
+ ...h.hide?.referenceHidden && {
104
+ visibility: "hidden",
105
+ pointerEvents: "none"
106
+ }
107
+ },
108
+ dir: e.dir,
109
+ children: /* @__PURE__ */ f(
110
+ Oe,
111
+ {
112
+ scope: o,
113
+ placedSide: $,
114
+ onArrowChange: G,
115
+ arrowX: oe,
116
+ arrowY: ne,
117
+ shouldHideArrow: ae,
118
+ children: /* @__PURE__ */ f(
119
+ Y.div,
120
+ {
121
+ "data-side": $,
122
+ "data-align": re,
123
+ ...d,
124
+ ref: q,
125
+ style: {
126
+ ...d.style,
127
+ // if the PopperContent hasn't been placed yet (not all measurements done)
128
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
129
+ animation: A ? void 0 : "none"
130
+ }
131
+ }
132
+ )
133
+ }
134
+ )
135
+ }
136
+ );
137
+ }
138
+ );
139
+ B.displayName = O;
140
+ var T = "PopperArrow", Ee = {
141
+ top: "bottom",
142
+ right: "left",
143
+ bottom: "top",
144
+ left: "right"
145
+ }, j = s.forwardRef(function(a, o) {
146
+ const { __scopePopper: i, ...n } = a, t = Re(T, i), r = Ee[t.placedSide];
147
+ return (
148
+ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
149
+ // doesn't report size as we'd expect on SVG elements.
150
+ // it reports their bounding box which is effectively the largest path inside the SVG.
151
+ /* @__PURE__ */ f(
152
+ "span",
153
+ {
154
+ ref: t.onArrowChange,
155
+ style: {
156
+ position: "absolute",
157
+ left: t.arrowX,
158
+ top: t.arrowY,
159
+ [r]: 0,
160
+ transformOrigin: {
161
+ top: "",
162
+ right: "0 0",
163
+ bottom: "center 0",
164
+ left: "100% 0"
165
+ }[t.placedSide],
166
+ transform: {
167
+ top: "translateY(100%)",
168
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
169
+ bottom: "rotate(180deg)",
170
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
171
+ }[t.placedSide],
172
+ visibility: t.shouldHideArrow ? "hidden" : void 0
173
+ },
174
+ children: /* @__PURE__ */ f(
175
+ ye,
176
+ {
177
+ ...n,
178
+ ref: o,
179
+ style: {
180
+ ...n.style,
181
+ // ensures the element can be measured correctly (mostly for if SVG)
182
+ display: "block"
183
+ }
184
+ }
185
+ )
186
+ }
187
+ )
188
+ );
189
+ });
190
+ j.displayName = T;
191
+ function Ne(e) {
192
+ return e !== null;
193
+ }
194
+ var _e = (e) => ({
195
+ name: "transformOrigin",
196
+ options: e,
197
+ fn(a) {
198
+ const { placement: o, rects: i, middlewareData: n } = a, r = n.arrow?.centerOffset !== 0, g = r ? 0 : e.arrowWidth, p = r ? 0 : e.arrowHeight, [c, u] = L(o), m = { start: "0%", center: "50%", end: "100%" }[u], P = (n.arrow?.x ?? 0) + g / 2, x = (n.arrow?.y ?? 0) + p / 2;
199
+ let l = "", d = "";
200
+ return c === "bottom" ? (l = r ? m : `${P}px`, d = `${-p}px`) : c === "top" ? (l = r ? m : `${P}px`, d = `${i.floating.height + p}px`) : c === "right" ? (l = `${-p}px`, d = r ? m : `${x}px`) : c === "left" && (l = `${i.floating.width + p}px`, d = r ? m : `${x}px`), { data: { x: l, y: d } };
201
+ }
202
+ });
203
+ function L(e) {
204
+ const [a, o = "center"] = e.split("-");
205
+ return [a, o];
206
+ }
207
+ var Be = D, Te = k, je = B, Le = j;
208
+ export {
209
+ Te as Anchor,
210
+ Le as Arrow,
211
+ je as Content,
212
+ D as Popper,
213
+ k as PopperAnchor,
214
+ j as PopperArrow,
215
+ B as PopperContent,
216
+ Be as Root,
217
+ ke as createPopperScope
218
+ };
@@ -0,0 +1,15 @@
1
+ import * as o from "react";
2
+ import n from "react-dom";
3
+ import { Primitive as s } from "../../react-primitive/dist/index.js";
4
+ import { useLayoutEffect as c } from "../../../../../react-use-layout-effect/dist/index.js";
5
+ import { jsx as u } from "react/jsx-runtime";
6
+ var l = "Portal", p = o.forwardRef((r, e) => {
7
+ const { container: a, ...f } = r, [i, m] = o.useState(!1);
8
+ c(() => m(!0), []);
9
+ const t = a || i && globalThis?.document?.body;
10
+ return t ? n.createPortal(/* @__PURE__ */ u(s.div, { ...f, ref: e }), t) : null;
11
+ });
12
+ p.displayName = l;
13
+ export {
14
+ p as Portal
15
+ };
@@ -0,0 +1,70 @@
1
+ import * as i from "react";
2
+ import { useComposedRefs as O } from "../../../../../react-compose-refs/dist/index.js";
3
+ import { useLayoutEffect as A } from "../../../../../react-use-layout-effect/dist/index.js";
4
+ function E(n, e) {
5
+ return i.useReducer((t, r) => e[t][r] ?? t, n);
6
+ }
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;
10
+ };
11
+ T.displayName = "Presence";
12
+ function R(n) {
13
+ const [e, t] = i.useState(), r = i.useRef(null), a = i.useRef(n), c = i.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
14
+ mounted: {
15
+ UNMOUNT: "unmounted",
16
+ ANIMATION_OUT: "unmountSuspended"
17
+ },
18
+ unmountSuspended: {
19
+ MOUNT: "mounted",
20
+ ANIMATION_END: "unmounted"
21
+ },
22
+ unmounted: {
23
+ MOUNT: "mounted"
24
+ }
25
+ });
26
+ return i.useEffect(() => {
27
+ const o = l(r.current);
28
+ c.current = N === "mounted" ? o : "none";
29
+ }, [N]), A(() => {
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;
34
+ }
35
+ }, [n, s]), A(() => {
36
+ if (e) {
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));
48
+ };
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);
51
+ };
52
+ } else
53
+ s("ANIMATION_END");
54
+ }, [e, s]), {
55
+ isPresent: ["mounted", "unmountSuspended"].includes(N),
56
+ ref: i.useCallback((o) => {
57
+ r.current = o ? getComputedStyle(o) : null, t(o);
58
+ }, [])
59
+ };
60
+ }
61
+ function l(n) {
62
+ return n?.animationName || "none";
63
+ }
64
+ function v(n) {
65
+ let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
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);
67
+ }
68
+ export {
69
+ T as Presence
70
+ };
@@ -0,0 +1,36 @@
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
+ import { jsx as l } 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
+ ], h = u.reduce((t, i) => {
24
+ const o = c(`Primitive.${i}`), r = f.forwardRef((e, m) => {
25
+ const { asChild: s, ...a } = e, n = s ? o : i;
26
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(n, { ...a, ref: m });
27
+ });
28
+ return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
29
+ }, {});
30
+ function w(t, i) {
31
+ t && p.flushSync(() => t.dispatchEvent(i));
32
+ }
33
+ export {
34
+ h as Primitive,
35
+ w as dispatchDiscreteCustomEvent
36
+ };
@@ -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
+ };
@@ -0,0 +1,17 @@
1
+ var m = 1, j = 0.9, k = 0.8, B = 0.17, v = 0.1, w = 0.999, D = 0.9999, G = 0.99, H = /[\\\/_+.#"@\[\(\{&]/, J = /[\\\/_+.#"@\[\(\{&]/g, K = /[\s-]/, A = /[\s-]/g;
2
+ function $(t, o, e, i, n, h, u) {
3
+ if (h === o.length) return n === t.length ? m : G;
4
+ var s = `${n},${h}`;
5
+ if (u[s] !== void 0) return u[s];
6
+ for (var d = i.charAt(h), a = e.indexOf(d, n), l = 0, r, g, c, p; a >= 0; ) r = $(t, o, e, i, a + 1, h + 1, u), r > l && (a === n ? r *= m : H.test(t.charAt(a - 1)) ? (r *= k, c = t.slice(n, a - 1).match(J), c && n > 0 && (r *= Math.pow(w, c.length))) : K.test(t.charAt(a - 1)) ? (r *= j, p = t.slice(n, a - 1).match(A), p && n > 0 && (r *= Math.pow(w, p.length))) : (r *= B, n > 0 && (r *= Math.pow(w, a - n))), t.charAt(a) !== o.charAt(h) && (r *= D)), (r < v && e.charAt(a - 1) === i.charAt(h + 1) || i.charAt(h + 1) === i.charAt(h) && e.charAt(a - 1) !== i.charAt(h)) && (g = $(t, o, e, i, a + 1, h + 2, u), g * v > r && (r = g * v)), r > l && (l = r), a = e.indexOf(d, a + 1);
7
+ return u[s] = l, l;
8
+ }
9
+ function x(t) {
10
+ return t.toLowerCase().replace(A, " ");
11
+ }
12
+ function M(t, o, e) {
13
+ return t = e && e.length > 0 ? `${t + " " + e.join(" ")}` : t, $(t, o, x(t), x(o), 0, 0, {});
14
+ }
15
+ export {
16
+ M as a
17
+ };