@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.
- package/dist/components/ui/alert/alert.d.ts +1 -1
- package/dist/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/components/ui/badge/badge.d.ts +1 -1
- package/dist/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/components/ui/button/button.d.ts +1 -1
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.d.ts +31 -0
- package/dist/components/ui/combobox/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox/index.d.ts +3 -0
- package/dist/components/ui/combobox/index.d.ts.map +1 -0
- package/dist/components/ui/command/command.d.ts +85 -0
- package/dist/components/ui/command/command.d.ts.map +1 -0
- package/dist/components/ui/command/index.d.ts +2 -0
- package/dist/components/ui/command/index.d.ts.map +1 -0
- package/dist/components/ui/dithered-image/dithered-image.d.ts +6 -2
- package/dist/components/ui/dithered-image/dithered-image.d.ts.map +1 -1
- package/dist/components/ui/dithered-image/index.d.ts +1 -1
- package/dist/components/ui/dithered-image/index.d.ts.map +1 -1
- package/dist/components/ui/form/form.d.ts +24 -0
- package/dist/components/ui/form/form.d.ts.map +1 -0
- package/dist/components/ui/form/index.d.ts +2 -0
- package/dist/components/ui/form/index.d.ts.map +1 -0
- package/dist/components/ui/progress/progress.d.ts +0 -6
- package/dist/components/ui/progress/progress.d.ts.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/skeleton/skeleton.d.ts +4 -1
- package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/ui/statusline/statusline.d.ts.map +1 -1
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +0 -5
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +166 -143
- package/dist/index10.js +30 -30
- package/dist/index100.js +9 -30
- package/dist/index101.js +50 -15
- package/dist/index102.js +212 -128
- package/dist/index103.js +4 -50
- package/dist/index104.js +30 -9
- package/dist/index105.js +6 -4
- package/dist/index106.js +19 -179
- package/dist/index107.js +9 -650
- package/dist/index108.js +38 -107
- package/dist/index109.js +17 -90
- package/dist/index11.js +13 -13
- package/dist/index110.js +11 -66
- package/dist/index111.js +201 -154
- package/dist/index112.js +20 -395
- package/dist/index113.js +395 -1675
- package/dist/index114.js +2 -278
- package/dist/index115.js +49 -128
- package/dist/index116.js +65 -32
- package/dist/index117.js +2 -1611
- package/dist/index118.js +2 -298
- package/dist/index119.js +22 -632
- package/dist/index12.js +1 -1
- package/dist/index120.js +29 -144
- package/dist/index121.js +5 -21
- package/dist/index122.js +5 -9
- package/dist/index123.js +3 -38
- package/dist/index124.js +24 -18
- package/dist/index125.js +113 -6
- package/dist/index126.js +15 -11
- package/dist/index127.js +513 -194
- package/dist/index128.js +128 -22
- package/dist/index129.js +114 -380
- package/dist/index13.js +132 -93
- package/dist/index130.js +59 -1300
- package/dist/index131.js +63 -612
- package/dist/index132.js +9 -2
- package/dist/index133.js +13 -52
- package/dist/index134.js +64 -63
- package/dist/index135.js +3 -24
- package/dist/index136.js +23 -29
- package/dist/index137.js +23 -5
- package/dist/index138.js +13 -2
- package/dist/index139.js +28 -2
- package/dist/index14.js +106 -220
- package/dist/index140.js +5 -5
- package/dist/index15.js +79 -125
- package/dist/index16.js +280 -17
- package/dist/index17.js +139 -12
- package/dist/index18.js +92 -22
- package/dist/index19.js +18 -55
- package/dist/index2.js +2 -2
- package/dist/index20.js +14 -26
- package/dist/index21.js +19 -33
- package/dist/index22.js +38 -121
- package/dist/index23.js +29 -22
- package/dist/index24.js +31 -64
- package/dist/index25.js +121 -15
- package/dist/index26.js +19 -29
- package/dist/index27.js +68 -77
- package/dist/index28.js +20 -25
- package/dist/index29.js +32 -88
- package/dist/index3.js +11 -9
- package/dist/index30.js +138 -38
- package/dist/index31.js +20 -227
- package/dist/index32.js +88 -18
- package/dist/index33.js +37 -28
- package/dist/index34.js +86 -22
- package/dist/index35.js +17 -102
- package/dist/index36.js +34 -65
- package/dist/index37.js +23 -49
- package/dist/index38.js +38 -99
- package/dist/index39.js +65 -10
- package/dist/index4.js +6 -6
- package/dist/index40.js +49 -15
- package/dist/index41.js +93 -2256
- package/dist/index42.js +10 -32
- package/dist/index43.js +15 -18
- package/dist/index44.js +2251 -225
- package/dist/index45.js +33 -11
- package/dist/index46.js +116 -64
- package/dist/index47.js +207 -219
- package/dist/index48.js +5 -3
- package/dist/index49.js +54 -330
- package/dist/index5.js +23 -23
- package/dist/index50.js +244 -55
- package/dist/index51.js +9 -241
- package/dist/index52.js +60 -847
- package/dist/index53.js +236 -9
- package/dist/index54.js +11 -118
- package/dist/index55.js +300 -215
- package/dist/index56.js +4 -3
- package/dist/index57.js +225 -11
- package/dist/index58.js +11 -236
- package/dist/index59.js +27 -256
- package/dist/index6.js +12 -12
- package/dist/index60.js +260 -12
- package/dist/index61.js +12 -22
- package/dist/index62.js +94 -506
- package/dist/index63.js +12 -6155
- package/dist/index64.js +20 -2631
- package/dist/index65.js +16 -296
- package/dist/index66.js +232 -663
- package/dist/index67.js +125 -825
- package/dist/index68.js +159 -23
- package/dist/index69.js +241 -315
- package/dist/index7.js +22 -22
- package/dist/index70.js +72 -4889
- package/dist/index71.js +503 -802
- package/dist/index72.js +412 -1235
- package/dist/index73.js +323 -521
- package/dist/index74.js +839 -104
- package/dist/index75.js +9 -161
- package/dist/index76.js +67 -30
- package/dist/index77.js +22 -430
- package/dist/index78.js +6 -129
- package/dist/index79.js +48 -75
- package/dist/index8.js +17 -18
- package/dist/index80.js +42 -64
- package/dist/index81.js +50 -44
- package/dist/index82.js +32 -25
- package/dist/index83.js +10 -6
- package/dist/index84.js +7 -51
- package/dist/index85.js +5 -33
- package/dist/index86.js +24 -10
- package/dist/index87.js +68 -7
- package/dist/index88.js +55 -30
- package/dist/index89.js +10 -54
- package/dist/index9.js +23 -31
- package/dist/index90.js +4 -11
- package/dist/index91.js +30 -4
- package/dist/index92.js +1 -1
- package/dist/index93.js +180 -5
- package/dist/index94.js +14 -24
- package/dist/index95.js +643 -62
- package/dist/index96.js +5 -5
- package/dist/index97.js +128 -212
- package/dist/index98.js +2 -2
- package/dist/index99.js +13 -52
- package/dist/tokens/colors.d.ts +26 -86
- package/dist/tokens/colors.d.ts.map +1 -1
- package/dist/tokens/index.d.ts +12 -84
- package/dist/tokens/index.d.ts.map +1 -1
- package/package.json +26 -22
- package/dist/index141.js +0 -5
- package/dist/index142.js +0 -26
- package/dist/index143.js +0 -115
- package/dist/index144.js +0 -18
- package/dist/index145.js +0 -527
- package/dist/index146.js +0 -130
- package/dist/index147.js +0 -136
- package/dist/index148.js +0 -67
- package/dist/index149.js +0 -71
- package/dist/index150.js +0 -11
- package/dist/index151.js +0 -16
- package/dist/index152.js +0 -68
- package/dist/index153.js +0 -6
- package/dist/index154.js +0 -25
- package/dist/index155.js +0 -25
- package/dist/index156.js +0 -15
- package/dist/index157.js +0 -30
- package/dist/index158.js +0 -7
package/dist/index50.js
CHANGED
|
@@ -1,62 +1,251 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
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
|
|
54
|
-
|
|
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
|
-
|
|
60
|
-
V as
|
|
61
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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
|
};
|