@drjoshcsimmons/scl 0.1.0 → 0.1.1

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 (195) hide show
  1. package/dist/components/ui/alert/alert.d.ts +1 -1
  2. package/dist/components/ui/alert/alert.d.ts.map +1 -1
  3. package/dist/components/ui/badge/badge.d.ts +1 -1
  4. package/dist/components/ui/badge/badge.d.ts.map +1 -1
  5. package/dist/components/ui/button/button.d.ts +1 -1
  6. package/dist/components/ui/button/button.d.ts.map +1 -1
  7. package/dist/components/ui/combobox/combobox.d.ts +31 -0
  8. package/dist/components/ui/combobox/combobox.d.ts.map +1 -0
  9. package/dist/components/ui/combobox/index.d.ts +3 -0
  10. package/dist/components/ui/combobox/index.d.ts.map +1 -0
  11. package/dist/components/ui/command/command.d.ts +85 -0
  12. package/dist/components/ui/command/command.d.ts.map +1 -0
  13. package/dist/components/ui/command/index.d.ts +2 -0
  14. package/dist/components/ui/command/index.d.ts.map +1 -0
  15. package/dist/components/ui/dithered-image/dithered-image.d.ts +6 -2
  16. package/dist/components/ui/dithered-image/dithered-image.d.ts.map +1 -1
  17. package/dist/components/ui/dithered-image/index.d.ts +1 -1
  18. package/dist/components/ui/dithered-image/index.d.ts.map +1 -1
  19. package/dist/components/ui/form/form.d.ts +24 -0
  20. package/dist/components/ui/form/form.d.ts.map +1 -0
  21. package/dist/components/ui/form/index.d.ts +2 -0
  22. package/dist/components/ui/form/index.d.ts.map +1 -0
  23. package/dist/components/ui/progress/progress.d.ts +0 -6
  24. package/dist/components/ui/progress/progress.d.ts.map +1 -1
  25. package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -1
  26. package/dist/components/ui/skeleton/skeleton.d.ts +4 -1
  27. package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
  28. package/dist/components/ui/statusline/statusline.d.ts.map +1 -1
  29. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +0 -5
  30. package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -1
  31. package/dist/index.d.ts +3 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +166 -143
  34. package/dist/index10.js +30 -30
  35. package/dist/index100.js +9 -30
  36. package/dist/index101.js +50 -15
  37. package/dist/index102.js +212 -128
  38. package/dist/index103.js +4 -50
  39. package/dist/index104.js +30 -9
  40. package/dist/index105.js +6 -4
  41. package/dist/index106.js +19 -179
  42. package/dist/index107.js +9 -650
  43. package/dist/index108.js +38 -107
  44. package/dist/index109.js +17 -90
  45. package/dist/index11.js +13 -13
  46. package/dist/index110.js +11 -66
  47. package/dist/index111.js +201 -154
  48. package/dist/index112.js +20 -395
  49. package/dist/index113.js +395 -1675
  50. package/dist/index114.js +2 -278
  51. package/dist/index115.js +49 -128
  52. package/dist/index116.js +65 -32
  53. package/dist/index117.js +2 -1611
  54. package/dist/index118.js +2 -298
  55. package/dist/index119.js +22 -632
  56. package/dist/index12.js +1 -1
  57. package/dist/index120.js +29 -144
  58. package/dist/index121.js +5 -21
  59. package/dist/index122.js +5 -9
  60. package/dist/index123.js +3 -38
  61. package/dist/index124.js +24 -18
  62. package/dist/index125.js +113 -6
  63. package/dist/index126.js +15 -11
  64. package/dist/index127.js +513 -194
  65. package/dist/index128.js +128 -22
  66. package/dist/index129.js +114 -380
  67. package/dist/index13.js +132 -93
  68. package/dist/index130.js +59 -1300
  69. package/dist/index131.js +63 -612
  70. package/dist/index132.js +9 -2
  71. package/dist/index133.js +13 -52
  72. package/dist/index134.js +64 -63
  73. package/dist/index135.js +3 -24
  74. package/dist/index136.js +23 -29
  75. package/dist/index137.js +23 -5
  76. package/dist/index138.js +13 -2
  77. package/dist/index139.js +28 -2
  78. package/dist/index14.js +106 -220
  79. package/dist/index140.js +5 -5
  80. package/dist/index15.js +79 -125
  81. package/dist/index16.js +280 -17
  82. package/dist/index17.js +139 -12
  83. package/dist/index18.js +92 -22
  84. package/dist/index19.js +18 -55
  85. package/dist/index2.js +2 -2
  86. package/dist/index20.js +14 -26
  87. package/dist/index21.js +19 -33
  88. package/dist/index22.js +38 -121
  89. package/dist/index23.js +29 -22
  90. package/dist/index24.js +31 -64
  91. package/dist/index25.js +121 -15
  92. package/dist/index26.js +19 -29
  93. package/dist/index27.js +68 -77
  94. package/dist/index28.js +20 -25
  95. package/dist/index29.js +32 -88
  96. package/dist/index3.js +11 -9
  97. package/dist/index30.js +138 -38
  98. package/dist/index31.js +20 -227
  99. package/dist/index32.js +88 -18
  100. package/dist/index33.js +37 -28
  101. package/dist/index34.js +86 -22
  102. package/dist/index35.js +17 -102
  103. package/dist/index36.js +34 -65
  104. package/dist/index37.js +23 -49
  105. package/dist/index38.js +38 -99
  106. package/dist/index39.js +65 -10
  107. package/dist/index4.js +6 -6
  108. package/dist/index40.js +49 -15
  109. package/dist/index41.js +93 -2256
  110. package/dist/index42.js +10 -32
  111. package/dist/index43.js +15 -18
  112. package/dist/index44.js +2251 -225
  113. package/dist/index45.js +33 -11
  114. package/dist/index46.js +116 -64
  115. package/dist/index47.js +207 -219
  116. package/dist/index48.js +5 -3
  117. package/dist/index49.js +54 -330
  118. package/dist/index5.js +23 -23
  119. package/dist/index50.js +244 -55
  120. package/dist/index51.js +9 -241
  121. package/dist/index52.js +60 -847
  122. package/dist/index53.js +236 -9
  123. package/dist/index54.js +11 -118
  124. package/dist/index55.js +300 -215
  125. package/dist/index56.js +4 -3
  126. package/dist/index57.js +225 -11
  127. package/dist/index58.js +11 -236
  128. package/dist/index59.js +27 -256
  129. package/dist/index6.js +12 -12
  130. package/dist/index60.js +260 -12
  131. package/dist/index61.js +12 -22
  132. package/dist/index62.js +94 -506
  133. package/dist/index63.js +12 -6155
  134. package/dist/index64.js +20 -2631
  135. package/dist/index65.js +16 -296
  136. package/dist/index66.js +232 -663
  137. package/dist/index67.js +125 -825
  138. package/dist/index68.js +159 -23
  139. package/dist/index69.js +241 -315
  140. package/dist/index7.js +22 -22
  141. package/dist/index70.js +72 -4889
  142. package/dist/index71.js +503 -802
  143. package/dist/index72.js +412 -1235
  144. package/dist/index73.js +323 -521
  145. package/dist/index74.js +839 -104
  146. package/dist/index75.js +9 -161
  147. package/dist/index76.js +67 -30
  148. package/dist/index77.js +22 -430
  149. package/dist/index78.js +6 -129
  150. package/dist/index79.js +48 -75
  151. package/dist/index8.js +17 -18
  152. package/dist/index80.js +42 -64
  153. package/dist/index81.js +50 -44
  154. package/dist/index82.js +32 -25
  155. package/dist/index83.js +10 -6
  156. package/dist/index84.js +7 -51
  157. package/dist/index85.js +5 -33
  158. package/dist/index86.js +24 -10
  159. package/dist/index87.js +68 -7
  160. package/dist/index88.js +55 -30
  161. package/dist/index89.js +10 -54
  162. package/dist/index9.js +23 -31
  163. package/dist/index90.js +4 -11
  164. package/dist/index91.js +30 -4
  165. package/dist/index92.js +1 -1
  166. package/dist/index93.js +180 -5
  167. package/dist/index94.js +14 -24
  168. package/dist/index95.js +643 -62
  169. package/dist/index96.js +5 -5
  170. package/dist/index97.js +128 -212
  171. package/dist/index98.js +2 -2
  172. package/dist/index99.js +13 -52
  173. package/dist/tokens/colors.d.ts +26 -86
  174. package/dist/tokens/colors.d.ts.map +1 -1
  175. package/dist/tokens/index.d.ts +12 -84
  176. package/dist/tokens/index.d.ts.map +1 -1
  177. package/package.json +26 -22
  178. package/dist/index141.js +0 -5
  179. package/dist/index142.js +0 -26
  180. package/dist/index143.js +0 -115
  181. package/dist/index144.js +0 -18
  182. package/dist/index145.js +0 -527
  183. package/dist/index146.js +0 -130
  184. package/dist/index147.js +0 -136
  185. package/dist/index148.js +0 -67
  186. package/dist/index149.js +0 -71
  187. package/dist/index150.js +0 -11
  188. package/dist/index151.js +0 -16
  189. package/dist/index152.js +0 -68
  190. package/dist/index153.js +0 -6
  191. package/dist/index154.js +0 -25
  192. package/dist/index155.js +0 -25
  193. package/dist/index156.js +0 -15
  194. package/dist/index157.js +0 -30
  195. package/dist/index158.js +0 -7
package/dist/index50.js CHANGED
@@ -1,62 +1,251 @@
1
- import * as o from "react";
2
- import { composeRefs as S } from "./index82.js";
3
- import { jsx as y } from "react/jsx-runtime";
4
- var E = Symbol.for("react.lazy"), p = o[" use ".trim().toString()];
5
- function g(t) {
6
- return typeof t == "object" && t !== null && "then" in t;
7
- }
8
- function d(t) {
9
- return t != null && typeof t == "object" && "$$typeof" in t && t.$$typeof === E && "_payload" in t && g(t._payload);
10
- }
11
- // @__NO_SIDE_EFFECTS__
12
- function C(t) {
13
- const n = /* @__PURE__ */ R(t), i = o.forwardRef((e, r) => {
14
- let { children: l, ...a } = e;
15
- d(l) && typeof p == "function" && (l = p(l._payload));
16
- const s = o.Children.toArray(l), f = s.find(b);
17
- if (f) {
18
- const c = f.props.children, m = s.map((u) => u === f ? o.Children.count(c) > 1 ? o.Children.only(null) : o.isValidElement(c) ? c.props.children : null : u);
19
- return /* @__PURE__ */ y(n, { ...a, ref: r, children: o.isValidElement(c) ? o.cloneElement(c, void 0, m) : null });
1
+ import * as s from "react";
2
+ import { useComposedRefs as B } from "./index77.js";
3
+ import { createContextScope as L } from "./index76.js";
4
+ import { composeEventHandlers as S } from "./index78.js";
5
+ import { useControllableState as O } from "./index81.js";
6
+ import { usePrevious as j } from "./index85.js";
7
+ import { useSize as H } from "./index86.js";
8
+ import { Presence as z } from "./index87.js";
9
+ import { Primitive as P } from "./index82.js";
10
+ import { jsx as b, jsxs as G, Fragment as K } from "react/jsx-runtime";
11
+ var g = "Checkbox", [U] = L(g), [X, E] = U(g);
12
+ function J(t) {
13
+ const {
14
+ __scopeCheckbox: a,
15
+ checked: c,
16
+ children: u,
17
+ defaultChecked: r,
18
+ disabled: e,
19
+ form: p,
20
+ name: f,
21
+ onCheckedChange: i,
22
+ required: m,
23
+ value: C = "on",
24
+ // @ts-expect-error
25
+ internal_do_not_use_render: d
26
+ } = t, [l, v] = O({
27
+ prop: c,
28
+ defaultProp: r ?? !1,
29
+ onChange: i,
30
+ caller: g
31
+ }), [k, x] = s.useState(null), [_, o] = s.useState(null), n = s.useRef(!1), I = k ? !!p || !!k.closest("form") : (
32
+ // We set this to true by default so that events bubble to forms without JS (SSR)
33
+ !0
34
+ ), R = {
35
+ checked: l,
36
+ disabled: e,
37
+ setChecked: v,
38
+ control: k,
39
+ setControl: x,
40
+ name: f,
41
+ form: p,
42
+ value: C,
43
+ hasConsumerStoppedPropagationRef: n,
44
+ required: m,
45
+ defaultChecked: h(r) ? !1 : r,
46
+ isFormControl: I,
47
+ bubbleInput: _,
48
+ setBubbleInput: o
49
+ };
50
+ return /* @__PURE__ */ b(
51
+ X,
52
+ {
53
+ scope: a,
54
+ ...R,
55
+ children: W(d) ? d(R) : u
20
56
  }
21
- return /* @__PURE__ */ y(n, { ...a, ref: r, children: l });
22
- });
23
- return i.displayName = `${t}.Slot`, i;
24
- }
25
- var V = /* @__PURE__ */ C("Slot");
26
- // @__NO_SIDE_EFFECTS__
27
- function R(t) {
28
- const n = o.forwardRef((i, e) => {
29
- let { children: r, ...l } = i;
30
- if (d(r) && typeof p == "function" && (r = p(r._payload)), o.isValidElement(r)) {
31
- const a = P(r), s = h(l, r.props);
32
- return r.type !== o.Fragment && (s.ref = e ? S(e, a) : a), o.cloneElement(r, s);
33
- }
34
- return o.Children.count(r) > 1 ? o.Children.only(null) : null;
35
- });
36
- return n.displayName = `${t}.SlotClone`, n;
37
- }
38
- var _ = Symbol("radix.slottable");
39
- function b(t) {
40
- return o.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === _;
57
+ );
41
58
  }
42
- function h(t, n) {
43
- const i = { ...n };
44
- for (const e in n) {
45
- const r = t[e], l = n[e];
46
- /^on[A-Z]/.test(e) ? r && l ? i[e] = (...s) => {
47
- const f = l(...s);
48
- return r(...s), f;
49
- } : r && (i[e] = r) : e === "style" ? i[e] = { ...r, ...l } : e === "className" && (i[e] = [r, l].filter(Boolean).join(" "));
59
+ var N = "CheckboxTrigger", w = s.forwardRef(
60
+ ({ __scopeCheckbox: t, onKeyDown: a, onClick: c, ...u }, r) => {
61
+ const {
62
+ control: e,
63
+ value: p,
64
+ disabled: f,
65
+ checked: i,
66
+ required: m,
67
+ setControl: C,
68
+ setChecked: d,
69
+ hasConsumerStoppedPropagationRef: l,
70
+ isFormControl: v,
71
+ bubbleInput: k
72
+ } = E(N, t), x = B(r, C), _ = s.useRef(i);
73
+ return s.useEffect(() => {
74
+ const o = e == null ? void 0 : e.form;
75
+ if (o) {
76
+ const n = () => d(_.current);
77
+ return o.addEventListener("reset", n), () => o.removeEventListener("reset", n);
78
+ }
79
+ }, [e, d]), /* @__PURE__ */ b(
80
+ P.button,
81
+ {
82
+ type: "button",
83
+ role: "checkbox",
84
+ "aria-checked": h(i) ? "mixed" : i,
85
+ "aria-required": m,
86
+ "data-state": A(i),
87
+ "data-disabled": f ? "" : void 0,
88
+ disabled: f,
89
+ value: p,
90
+ ...u,
91
+ ref: x,
92
+ onKeyDown: S(a, (o) => {
93
+ o.key === "Enter" && o.preventDefault();
94
+ }),
95
+ onClick: S(c, (o) => {
96
+ d((n) => h(n) ? !0 : !n), k && v && (l.current = o.isPropagationStopped(), l.current || o.stopPropagation());
97
+ })
98
+ }
99
+ );
50
100
  }
51
- return { ...t, ...i };
101
+ );
102
+ w.displayName = N;
103
+ var Q = s.forwardRef(
104
+ (t, a) => {
105
+ const {
106
+ __scopeCheckbox: c,
107
+ name: u,
108
+ checked: r,
109
+ defaultChecked: e,
110
+ required: p,
111
+ disabled: f,
112
+ value: i,
113
+ onCheckedChange: m,
114
+ form: C,
115
+ ...d
116
+ } = t;
117
+ return /* @__PURE__ */ b(
118
+ J,
119
+ {
120
+ __scopeCheckbox: c,
121
+ checked: r,
122
+ defaultChecked: e,
123
+ disabled: f,
124
+ required: p,
125
+ onCheckedChange: m,
126
+ name: u,
127
+ form: C,
128
+ value: i,
129
+ internal_do_not_use_render: ({ isFormControl: l }) => /* @__PURE__ */ G(K, { children: [
130
+ /* @__PURE__ */ b(
131
+ w,
132
+ {
133
+ ...d,
134
+ ref: a,
135
+ __scopeCheckbox: c
136
+ }
137
+ ),
138
+ l && /* @__PURE__ */ b(
139
+ q,
140
+ {
141
+ __scopeCheckbox: c
142
+ }
143
+ )
144
+ ] })
145
+ }
146
+ );
147
+ }
148
+ );
149
+ Q.displayName = g;
150
+ var T = "CheckboxIndicator", V = s.forwardRef(
151
+ (t, a) => {
152
+ const { __scopeCheckbox: c, forceMount: u, ...r } = t, e = E(T, c);
153
+ return /* @__PURE__ */ b(
154
+ z,
155
+ {
156
+ present: u || h(e.checked) || e.checked === !0,
157
+ children: /* @__PURE__ */ b(
158
+ P.span,
159
+ {
160
+ "data-state": A(e.checked),
161
+ "data-disabled": e.disabled ? "" : void 0,
162
+ ...r,
163
+ ref: a,
164
+ style: { pointerEvents: "none", ...t.style }
165
+ }
166
+ )
167
+ }
168
+ );
169
+ }
170
+ );
171
+ V.displayName = T;
172
+ var M = "CheckboxBubbleInput", q = s.forwardRef(
173
+ ({ __scopeCheckbox: t, ...a }, c) => {
174
+ const {
175
+ control: u,
176
+ hasConsumerStoppedPropagationRef: r,
177
+ checked: e,
178
+ defaultChecked: p,
179
+ required: f,
180
+ disabled: i,
181
+ name: m,
182
+ value: C,
183
+ form: d,
184
+ bubbleInput: l,
185
+ setBubbleInput: v
186
+ } = E(M, t), k = B(c, v), x = j(e), _ = H(u);
187
+ s.useEffect(() => {
188
+ const n = l;
189
+ if (!n) return;
190
+ const I = window.HTMLInputElement.prototype, y = Object.getOwnPropertyDescriptor(
191
+ I,
192
+ "checked"
193
+ ).set, D = !r.current;
194
+ if (x !== e && y) {
195
+ const F = new Event("click", { bubbles: D });
196
+ n.indeterminate = h(e), y.call(n, h(e) ? !1 : e), n.dispatchEvent(F);
197
+ }
198
+ }, [l, x, e, r]);
199
+ const o = s.useRef(h(e) ? !1 : e);
200
+ return /* @__PURE__ */ b(
201
+ P.input,
202
+ {
203
+ type: "checkbox",
204
+ "aria-hidden": !0,
205
+ defaultChecked: p ?? o.current,
206
+ required: f,
207
+ disabled: i,
208
+ name: m,
209
+ value: C,
210
+ form: d,
211
+ ...a,
212
+ tabIndex: -1,
213
+ ref: k,
214
+ style: {
215
+ ...a.style,
216
+ ..._,
217
+ position: "absolute",
218
+ pointerEvents: "none",
219
+ opacity: 0,
220
+ margin: 0,
221
+ // We transform because the input is absolutely positioned but we have
222
+ // rendered it **after** the button. This pulls it back to sit on top
223
+ // of the button.
224
+ transform: "translateX(-100%)"
225
+ }
226
+ }
227
+ );
228
+ }
229
+ );
230
+ q.displayName = M;
231
+ function W(t) {
232
+ return typeof t == "function";
233
+ }
234
+ function h(t) {
235
+ return t === "indeterminate";
52
236
  }
53
- function P(t) {
54
- var e, r;
55
- let n = (e = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : e.get, i = n && "isReactWarning" in n && n.isReactWarning;
56
- return i ? t.ref : (n = (r = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : r.get, i = n && "isReactWarning" in n && n.isReactWarning, i ? t.props.ref : t.props.ref || t.ref);
237
+ function A(t) {
238
+ return h(t) ? "indeterminate" : t ? "checked" : "unchecked";
57
239
  }
58
240
  export {
59
- V as Root,
60
- V as Slot,
61
- C as createSlot
241
+ Q as Checkbox,
242
+ V as CheckboxIndicator,
243
+ V as Indicator,
244
+ Q as Root,
245
+ q as unstable_BubbleInput,
246
+ q as unstable_CheckboxBubbleInput,
247
+ J as unstable_CheckboxProvider,
248
+ w as unstable_CheckboxTrigger,
249
+ J as unstable_Provider,
250
+ w as unstable_Trigger
62
251
  };
package/dist/index51.js CHANGED
@@ -1,243 +1,11 @@
1
- import * as i from "react";
2
- import { composeEventHandlers as P } from "./index83.js";
3
- import { useComposedRefs as O } from "./index82.js";
4
- import { createContextScope as G } from "./index80.js";
5
- import { DismissableLayer as H } from "./index96.js";
6
- import { useFocusGuards as K } from "./index101.js";
7
- import { FocusScope as $ } from "./index102.js";
8
- import { useId as j } from "./index86.js";
9
- import { createPopperScope as _, Root as U, Anchor as x, Content as V, Arrow as W } from "./index97.js";
10
- import { Portal as Z } from "./index98.js";
11
- import { Presence as w } from "./index95.js";
12
- import { Primitive as E } from "./index85.js";
13
- import { createSlot as q } from "./index99.js";
14
- import { useControllableState as z } from "./index84.js";
15
- import { hideOthers as B } from "./index103.js";
16
- import J from "./index104.js";
17
- import { jsx as p } from "react/jsx-runtime";
18
- var C = "Popover", [b] = G(C, [
19
- _
20
- ]), m = _(), [Q, f] = b(C), 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, c = m(n), u = i.useRef(null), [l, g] = i.useState(!1), [h, d] = z({
29
- prop: a,
30
- defaultProp: e ?? !1,
31
- onChange: r,
32
- caller: C
33
- });
34
- return /* @__PURE__ */ p(U, { ...c, children: /* @__PURE__ */ p(
35
- Q,
36
- {
37
- scope: n,
38
- contentId: j(),
39
- triggerRef: u,
40
- open: h,
41
- onOpenChange: d,
42
- onOpenToggle: i.useCallback(() => d((R) => !R), [d]),
43
- hasCustomAnchor: l,
44
- onCustomAnchorAdd: i.useCallback(() => g(!0), []),
45
- onCustomAnchorRemove: i.useCallback(() => g(!1), []),
46
- modal: s,
47
- children: t
48
- }
49
- ) });
50
- };
51
- F.displayName = C;
52
- var N = "PopoverAnchor", S = i.forwardRef(
53
- (o, n) => {
54
- const { __scopePopover: t, ...a } = o, e = f(N, t), r = m(t), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = e;
55
- return i.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ p(x, { ...r, ...a, ref: n });
56
- }
57
- );
58
- S.displayName = N;
59
- var y = "PopoverTrigger", D = i.forwardRef(
60
- (o, n) => {
61
- const { __scopePopover: t, ...a } = o, e = f(y, t), r = m(t), s = O(n, e.triggerRef), c = /* @__PURE__ */ p(
62
- E.button,
63
- {
64
- type: "button",
65
- "aria-haspopup": "dialog",
66
- "aria-expanded": e.open,
67
- "aria-controls": e.contentId,
68
- "data-state": L(e.open),
69
- ...a,
70
- ref: s,
71
- onClick: P(o.onClick, e.onOpenToggle)
72
- }
73
- );
74
- return e.hasCustomAnchor ? c : /* @__PURE__ */ p(x, { asChild: !0, ...r, children: c });
75
- }
76
- );
77
- D.displayName = y;
78
- var A = "PopoverPortal", [X, Y] = b(A, {
79
- forceMount: void 0
80
- }), M = (o) => {
81
- const { __scopePopover: n, forceMount: t, children: a, container: e } = o, r = f(A, n);
82
- return /* @__PURE__ */ p(X, { scope: n, forceMount: t, children: /* @__PURE__ */ p(w, { present: t || r.open, children: /* @__PURE__ */ p(Z, { asChild: !0, container: e, children: a }) }) });
83
- };
84
- M.displayName = A;
85
- var v = "PopoverContent", k = i.forwardRef(
86
- (o, n) => {
87
- const t = Y(v, o.__scopePopover), { forceMount: a = t.forceMount, ...e } = o, r = f(v, o.__scopePopover);
88
- return /* @__PURE__ */ p(w, { present: a || r.open, children: r.modal ? /* @__PURE__ */ p(eo, { ...e, ref: n }) : /* @__PURE__ */ p(ro, { ...e, ref: n }) });
89
- }
90
- );
91
- k.displayName = v;
92
- var oo = q("PopoverContent.RemoveScroll"), eo = i.forwardRef(
93
- (o, n) => {
94
- const t = f(v, o.__scopePopover), a = i.useRef(null), e = O(n, a), r = i.useRef(!1);
95
- return i.useEffect(() => {
96
- const s = a.current;
97
- if (s) return B(s);
98
- }, []), /* @__PURE__ */ p(J, { as: oo, allowPinchZoom: !0, children: /* @__PURE__ */ p(
99
- I,
100
- {
101
- ...o,
102
- ref: e,
103
- trapFocus: t.open,
104
- disableOutsidePointerEvents: !0,
105
- onCloseAutoFocus: P(o.onCloseAutoFocus, (s) => {
106
- var c;
107
- s.preventDefault(), r.current || (c = t.triggerRef.current) == null || c.focus();
108
- }),
109
- onPointerDownOutside: P(
110
- o.onPointerDownOutside,
111
- (s) => {
112
- const c = s.detail.originalEvent, u = c.button === 0 && c.ctrlKey === !0, l = c.button === 2 || u;
113
- r.current = l;
114
- },
115
- { checkForDefaultPrevented: !1 }
116
- ),
117
- onFocusOutside: P(
118
- o.onFocusOutside,
119
- (s) => s.preventDefault(),
120
- { checkForDefaultPrevented: !1 }
121
- )
122
- }
123
- ) });
124
- }
125
- ), ro = i.forwardRef(
126
- (o, n) => {
127
- const t = f(v, o.__scopePopover), a = i.useRef(!1), e = i.useRef(!1);
128
- return /* @__PURE__ */ p(
129
- I,
130
- {
131
- ...o,
132
- ref: n,
133
- trapFocus: !1,
134
- disableOutsidePointerEvents: !1,
135
- onCloseAutoFocus: (r) => {
136
- var s, c;
137
- (s = o.onCloseAutoFocus) == null || s.call(o, r), r.defaultPrevented || (a.current || (c = t.triggerRef.current) == null || c.focus(), r.preventDefault()), a.current = !1, e.current = !1;
138
- },
139
- onInteractOutside: (r) => {
140
- var u, l;
141
- (u = o.onInteractOutside) == null || u.call(o, r), r.defaultPrevented || (a.current = !0, r.detail.originalEvent.type === "pointerdown" && (e.current = !0));
142
- const s = r.target;
143
- ((l = t.triggerRef.current) == null ? void 0 : l.contains(s)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && e.current && r.preventDefault();
144
- }
145
- }
146
- );
147
- }
148
- ), I = i.forwardRef(
149
- (o, n) => {
150
- const {
151
- __scopePopover: t,
152
- trapFocus: a,
153
- onOpenAutoFocus: e,
154
- onCloseAutoFocus: r,
155
- disableOutsidePointerEvents: s,
156
- onEscapeKeyDown: c,
157
- onPointerDownOutside: u,
158
- onFocusOutside: l,
159
- onInteractOutside: g,
160
- ...h
161
- } = o, d = f(v, t), R = m(t);
162
- return K(), /* @__PURE__ */ p(
163
- $,
164
- {
165
- asChild: !0,
166
- loop: !0,
167
- trapped: a,
168
- onMountAutoFocus: e,
169
- onUnmountAutoFocus: r,
170
- children: /* @__PURE__ */ p(
171
- H,
172
- {
173
- asChild: !0,
174
- disableOutsidePointerEvents: s,
175
- onInteractOutside: g,
176
- onEscapeKeyDown: c,
177
- onPointerDownOutside: u,
178
- onFocusOutside: l,
179
- onDismiss: () => d.onOpenChange(!1),
180
- children: /* @__PURE__ */ p(
181
- V,
182
- {
183
- "data-state": L(d.open),
184
- role: "dialog",
185
- id: d.contentId,
186
- ...R,
187
- ...h,
188
- ref: n,
189
- style: {
190
- ...h.style,
191
- "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
192
- "--radix-popover-content-available-width": "var(--radix-popper-available-width)",
193
- "--radix-popover-content-available-height": "var(--radix-popper-available-height)",
194
- "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
195
- "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
196
- }
197
- }
198
- )
199
- }
200
- )
201
- }
202
- );
203
- }
204
- ), T = "PopoverClose", to = i.forwardRef(
205
- (o, n) => {
206
- const { __scopePopover: t, ...a } = o, e = f(T, t);
207
- return /* @__PURE__ */ p(
208
- E.button,
209
- {
210
- type: "button",
211
- ...a,
212
- ref: n,
213
- onClick: P(o.onClick, () => e.onOpenChange(!1))
214
- }
215
- );
216
- }
217
- );
218
- to.displayName = T;
219
- var no = "PopoverArrow", ao = i.forwardRef(
220
- (o, n) => {
221
- const { __scopePopover: t, ...a } = o, e = m(t);
222
- return /* @__PURE__ */ p(W, { ...e, ...a, ref: n });
223
- }
224
- );
225
- ao.displayName = no;
226
- function L(o) {
227
- return o ? "open" : "closed";
228
- }
229
- var _o = F, xo = S, wo = D, Eo = M, bo = k;
1
+ import e from "./index106.js";
2
+ /**
3
+ * @license lucide-react v0.460.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const t = e("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
230
9
  export {
231
- xo as Anchor,
232
- bo as Content,
233
- F as Popover,
234
- S as PopoverAnchor,
235
- ao as PopoverArrow,
236
- to as PopoverClose,
237
- k as PopoverContent,
238
- M as PopoverPortal,
239
- D as PopoverTrigger,
240
- Eo as Portal,
241
- _o as Root,
242
- wo as Trigger
10
+ t as default
243
11
  };