@still-forest/canopy 0.34.1 → 0.35.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/chunks/{Textarea-CBsXqwyy.js → Textarea-BpQRN4Xn.js} +136 -124
- package/dist/forms.d.ts +3 -2
- package/dist/forms.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -141,7 +141,7 @@ function zr(e) {
|
|
|
141
141
|
value: f = "on",
|
|
142
142
|
// @ts-expect-error
|
|
143
143
|
internal_do_not_use_render: m
|
|
144
|
-
} = e, [
|
|
144
|
+
} = e, [x, g] = ye({
|
|
145
145
|
prop: n,
|
|
146
146
|
defaultProp: r ?? !1,
|
|
147
147
|
onChange: u,
|
|
@@ -150,9 +150,9 @@ function zr(e) {
|
|
|
150
150
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
151
151
|
!0
|
|
152
152
|
), A = {
|
|
153
|
-
checked:
|
|
153
|
+
checked: x,
|
|
154
154
|
disabled: s,
|
|
155
|
-
setChecked:
|
|
155
|
+
setChecked: g,
|
|
156
156
|
control: w,
|
|
157
157
|
setControl: h,
|
|
158
158
|
name: d,
|
|
@@ -184,8 +184,8 @@ var Ut = "CheckboxTrigger", Gt = a.forwardRef(
|
|
|
184
184
|
required: l,
|
|
185
185
|
setControl: f,
|
|
186
186
|
setChecked: m,
|
|
187
|
-
hasConsumerStoppedPropagationRef:
|
|
188
|
-
isFormControl:
|
|
187
|
+
hasConsumerStoppedPropagationRef: x,
|
|
188
|
+
isFormControl: g,
|
|
189
189
|
bubbleInput: w
|
|
190
190
|
} = pt(Ut, e), h = V(r, f), v = a.useRef(u);
|
|
191
191
|
return a.useEffect(() => {
|
|
@@ -211,7 +211,7 @@ var Ut = "CheckboxTrigger", Gt = a.forwardRef(
|
|
|
211
211
|
S.key === "Enter" && S.preventDefault();
|
|
212
212
|
}),
|
|
213
213
|
onClick: L(n, (S) => {
|
|
214
|
-
m((y) => oe(y) ? !0 : !y), w &&
|
|
214
|
+
m((y) => oe(y) ? !0 : !y), w && g && (x.current = S.isPropagationStopped(), x.current || S.stopPropagation());
|
|
215
215
|
})
|
|
216
216
|
}
|
|
217
217
|
);
|
|
@@ -244,7 +244,7 @@ var Wt = a.forwardRef(
|
|
|
244
244
|
name: o,
|
|
245
245
|
form: f,
|
|
246
246
|
value: u,
|
|
247
|
-
internal_do_not_use_render: ({ isFormControl:
|
|
247
|
+
internal_do_not_use_render: ({ isFormControl: x }) => /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
248
248
|
/* @__PURE__ */ i.jsx(
|
|
249
249
|
Gt,
|
|
250
250
|
{
|
|
@@ -253,7 +253,7 @@ var Wt = a.forwardRef(
|
|
|
253
253
|
__scopeCheckbox: n
|
|
254
254
|
}
|
|
255
255
|
),
|
|
256
|
-
|
|
256
|
+
x && /* @__PURE__ */ i.jsx(
|
|
257
257
|
qt,
|
|
258
258
|
{
|
|
259
259
|
__scopeCheckbox: n
|
|
@@ -299,11 +299,11 @@ var zt = "CheckboxBubbleInput", qt = a.forwardRef(
|
|
|
299
299
|
name: l,
|
|
300
300
|
value: f,
|
|
301
301
|
form: m,
|
|
302
|
-
bubbleInput:
|
|
303
|
-
setBubbleInput:
|
|
304
|
-
} = pt(zt, e), w = V(n,
|
|
302
|
+
bubbleInput: x,
|
|
303
|
+
setBubbleInput: g
|
|
304
|
+
} = pt(zt, e), w = V(n, g), h = ft(s), v = Pt(o);
|
|
305
305
|
a.useEffect(() => {
|
|
306
|
-
const y =
|
|
306
|
+
const y = x;
|
|
307
307
|
if (!y) return;
|
|
308
308
|
const I = window.HTMLInputElement.prototype, M = Object.getOwnPropertyDescriptor(
|
|
309
309
|
I,
|
|
@@ -313,7 +313,7 @@ var zt = "CheckboxBubbleInput", qt = a.forwardRef(
|
|
|
313
313
|
const E = new Event("click", { bubbles: j });
|
|
314
314
|
y.indeterminate = oe(s), M.call(y, oe(s) ? !1 : s), y.dispatchEvent(E);
|
|
315
315
|
}
|
|
316
|
-
}, [
|
|
316
|
+
}, [x, h, s, r]);
|
|
317
317
|
const S = a.useRef(oe(s) ? !1 : s);
|
|
318
318
|
return /* @__PURE__ */ i.jsx(
|
|
319
319
|
k.input,
|
|
@@ -374,14 +374,14 @@ var eo = a.forwardRef((e, t) => {
|
|
|
374
374
|
onEntryFocus: l,
|
|
375
375
|
preventScrollOnEntryFocus: f = !1,
|
|
376
376
|
...m
|
|
377
|
-
} = e,
|
|
377
|
+
} = e, x = a.useRef(null), g = V(t, x), w = dt(s), [h, v] = ye({
|
|
378
378
|
prop: c,
|
|
379
379
|
defaultProp: d ?? null,
|
|
380
380
|
onChange: u,
|
|
381
381
|
caller: ke
|
|
382
382
|
}), [S, y] = a.useState(!1), I = Me(l), A = Xt(n), M = a.useRef(!1), [j, E] = a.useState(0);
|
|
383
383
|
return a.useEffect(() => {
|
|
384
|
-
const P =
|
|
384
|
+
const P = x.current;
|
|
385
385
|
if (P)
|
|
386
386
|
return P.addEventListener(qe, I), () => P.removeEventListener(qe, I);
|
|
387
387
|
}, [I]), /* @__PURE__ */ i.jsx(
|
|
@@ -411,7 +411,7 @@ var eo = a.forwardRef((e, t) => {
|
|
|
411
411
|
tabIndex: S || j === 0 ? -1 : 0,
|
|
412
412
|
"data-orientation": o,
|
|
413
413
|
...m,
|
|
414
|
-
ref:
|
|
414
|
+
ref: g,
|
|
415
415
|
style: { outline: "none", ...e.style },
|
|
416
416
|
onMouseDown: L(e.onMouseDown, () => {
|
|
417
417
|
M.current = !0;
|
|
@@ -443,11 +443,11 @@ var eo = a.forwardRef((e, t) => {
|
|
|
443
443
|
tabStopId: s,
|
|
444
444
|
children: c,
|
|
445
445
|
...d
|
|
446
|
-
} = e, u = Z(), l = s || u, f = Qr(Qt, n), m = f.currentTabStopId === l,
|
|
446
|
+
} = e, u = Z(), l = s || u, f = Qr(Qt, n), m = f.currentTabStopId === l, x = Xt(n), { onFocusableItemAdd: g, onFocusableItemRemove: w, currentTabStopId: h } = f;
|
|
447
447
|
return a.useEffect(() => {
|
|
448
448
|
if (o)
|
|
449
|
-
return
|
|
450
|
-
}, [o,
|
|
449
|
+
return g(), () => w();
|
|
450
|
+
}, [o, g, w]), /* @__PURE__ */ i.jsx(
|
|
451
451
|
Qe.ItemSlot,
|
|
452
452
|
{
|
|
453
453
|
scope: n,
|
|
@@ -475,7 +475,7 @@ var eo = a.forwardRef((e, t) => {
|
|
|
475
475
|
if (S !== void 0) {
|
|
476
476
|
if (v.metaKey || v.ctrlKey || v.altKey || v.shiftKey) return;
|
|
477
477
|
v.preventDefault();
|
|
478
|
-
let I =
|
|
478
|
+
let I = x().filter((A) => A.focusable).map((A) => A.ref.current);
|
|
479
479
|
if (S === "last") I.reverse();
|
|
480
480
|
else if (S === "prev" || S === "next") {
|
|
481
481
|
S === "prev" && I.reverse();
|
|
@@ -546,7 +546,7 @@ var mt = "Radio", [lo, rn] = we(mt), [uo, fo] = lo(mt), on = a.forwardRef(
|
|
|
546
546
|
onCheck: u,
|
|
547
547
|
form: l,
|
|
548
548
|
...f
|
|
549
|
-
} = e, [m,
|
|
549
|
+
} = e, [m, x] = a.useState(null), g = V(t, (v) => x(v)), w = a.useRef(!1), h = m ? l || !!m.closest("form") : !0;
|
|
550
550
|
return /* @__PURE__ */ i.jsxs(uo, { scope: n, checked: r, disabled: c, children: [
|
|
551
551
|
/* @__PURE__ */ i.jsx(
|
|
552
552
|
k.button,
|
|
@@ -559,7 +559,7 @@ var mt = "Radio", [lo, rn] = we(mt), [uo, fo] = lo(mt), on = a.forwardRef(
|
|
|
559
559
|
disabled: c,
|
|
560
560
|
value: d,
|
|
561
561
|
...f,
|
|
562
|
-
ref:
|
|
562
|
+
ref: g,
|
|
563
563
|
onClick: L(e.onClick, (v) => {
|
|
564
564
|
r || u?.(), h && (w.current = v.isPropagationStopped(), w.current || v.stopPropagation());
|
|
565
565
|
})
|
|
@@ -610,13 +610,13 @@ var po = "RadioBubbleInput", cn = a.forwardRef(
|
|
|
610
610
|
return a.useEffect(() => {
|
|
611
611
|
const f = c.current;
|
|
612
612
|
if (!f) return;
|
|
613
|
-
const m = window.HTMLInputElement.prototype,
|
|
613
|
+
const m = window.HTMLInputElement.prototype, g = Object.getOwnPropertyDescriptor(
|
|
614
614
|
m,
|
|
615
615
|
"checked"
|
|
616
616
|
).set;
|
|
617
|
-
if (u !== n &&
|
|
617
|
+
if (u !== n && g) {
|
|
618
618
|
const w = new Event("click", { bubbles: o });
|
|
619
|
-
|
|
619
|
+
g.call(f, n), f.dispatchEvent(w);
|
|
620
620
|
}
|
|
621
621
|
}, [u, n, o]), /* @__PURE__ */ i.jsx(
|
|
622
622
|
k.input,
|
|
@@ -659,8 +659,8 @@ var mo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Le = "RadioGroup",
|
|
|
659
659
|
dir: l,
|
|
660
660
|
loop: f = !0,
|
|
661
661
|
onValueChange: m,
|
|
662
|
-
...
|
|
663
|
-
} = e,
|
|
662
|
+
...x
|
|
663
|
+
} = e, g = dn(n), w = dt(l), [h, v] = ye({
|
|
664
664
|
prop: s,
|
|
665
665
|
defaultProp: r ?? null,
|
|
666
666
|
onChange: m,
|
|
@@ -679,7 +679,7 @@ var mo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Le = "RadioGroup",
|
|
|
679
679
|
so,
|
|
680
680
|
{
|
|
681
681
|
asChild: !0,
|
|
682
|
-
...
|
|
682
|
+
...g,
|
|
683
683
|
orientation: u,
|
|
684
684
|
dir: w,
|
|
685
685
|
loop: f,
|
|
@@ -691,7 +691,7 @@ var mo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Le = "RadioGroup",
|
|
|
691
691
|
"aria-orientation": u,
|
|
692
692
|
"data-disabled": d ? "" : void 0,
|
|
693
693
|
dir: w,
|
|
694
|
-
...
|
|
694
|
+
...x,
|
|
695
695
|
ref: t
|
|
696
696
|
}
|
|
697
697
|
)
|
|
@@ -704,13 +704,13 @@ var mo = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Le = "RadioGroup",
|
|
|
704
704
|
fn.displayName = Le;
|
|
705
705
|
var pn = "RadioGroupItem", mn = a.forwardRef(
|
|
706
706
|
(e, t) => {
|
|
707
|
-
const { __scopeRadioGroup: n, disabled: o, ...r } = e, s = go(pn, n), c = s.disabled || o, d = dn(n), u = un(n), l = a.useRef(null), f = V(t, l), m = s.value === r.value,
|
|
707
|
+
const { __scopeRadioGroup: n, disabled: o, ...r } = e, s = go(pn, n), c = s.disabled || o, d = dn(n), u = un(n), l = a.useRef(null), f = V(t, l), m = s.value === r.value, x = a.useRef(!1);
|
|
708
708
|
return a.useEffect(() => {
|
|
709
|
-
const
|
|
710
|
-
mo.includes(h.key) && (
|
|
711
|
-
}, w = () =>
|
|
712
|
-
return document.addEventListener("keydown",
|
|
713
|
-
document.removeEventListener("keydown",
|
|
709
|
+
const g = (h) => {
|
|
710
|
+
mo.includes(h.key) && (x.current = !0);
|
|
711
|
+
}, w = () => x.current = !1;
|
|
712
|
+
return document.addEventListener("keydown", g), document.addEventListener("keyup", w), () => {
|
|
713
|
+
document.removeEventListener("keydown", g), document.removeEventListener("keyup", w);
|
|
714
714
|
};
|
|
715
715
|
}, []), /* @__PURE__ */ i.jsx(
|
|
716
716
|
ao,
|
|
@@ -730,11 +730,11 @@ var pn = "RadioGroupItem", mn = a.forwardRef(
|
|
|
730
730
|
name: s.name,
|
|
731
731
|
ref: f,
|
|
732
732
|
onCheck: () => s.onValueChange(r.value),
|
|
733
|
-
onKeyDown: L((
|
|
734
|
-
|
|
733
|
+
onKeyDown: L((g) => {
|
|
734
|
+
g.key === "Enter" && g.preventDefault();
|
|
735
735
|
}),
|
|
736
736
|
onFocus: L(r.onFocus, () => {
|
|
737
|
-
|
|
737
|
+
x.current && l.current?.click();
|
|
738
738
|
})
|
|
739
739
|
}
|
|
740
740
|
)
|
|
@@ -766,8 +766,8 @@ var bo = fn, yo = mn, wo = hn, Co = [" ", "Enter", "ArrowUp", "ArrowDown"], So =
|
|
|
766
766
|
dir: l,
|
|
767
767
|
name: f,
|
|
768
768
|
autoComplete: m,
|
|
769
|
-
disabled:
|
|
770
|
-
required:
|
|
769
|
+
disabled: x,
|
|
770
|
+
required: g,
|
|
771
771
|
form: w
|
|
772
772
|
} = e, h = $e(t), [v, S] = a.useState(null), [y, I] = a.useState(null), [A, M] = a.useState(!1), j = dt(l), [E, P] = ye({
|
|
773
773
|
prop: o,
|
|
@@ -783,7 +783,7 @@ var bo = fn, yo = mn, wo = hn, Co = [" ", "Enter", "ArrowUp", "ArrowDown"], So =
|
|
|
783
783
|
return /* @__PURE__ */ i.jsx(gr, { ...h, children: /* @__PURE__ */ i.jsxs(
|
|
784
784
|
Io,
|
|
785
785
|
{
|
|
786
|
-
required:
|
|
786
|
+
required: g,
|
|
787
787
|
scope: t,
|
|
788
788
|
trigger: v,
|
|
789
789
|
onTriggerChange: S,
|
|
@@ -798,7 +798,7 @@ var bo = fn, yo = mn, wo = hn, Co = [" ", "Enter", "ArrowUp", "ArrowDown"], So =
|
|
|
798
798
|
onOpenChange: P,
|
|
799
799
|
dir: j,
|
|
800
800
|
triggerPointerDownPosRef: W,
|
|
801
|
-
disabled:
|
|
801
|
+
disabled: x,
|
|
802
802
|
children: [
|
|
803
803
|
/* @__PURE__ */ i.jsx(Fe.Provider, { scope: t, children: /* @__PURE__ */ i.jsx(
|
|
804
804
|
Ro,
|
|
@@ -820,13 +820,13 @@ var bo = fn, yo = mn, wo = hn, Co = [" ", "Enter", "ArrowUp", "ArrowDown"], So =
|
|
|
820
820
|
Fn,
|
|
821
821
|
{
|
|
822
822
|
"aria-hidden": !0,
|
|
823
|
-
required:
|
|
823
|
+
required: g,
|
|
824
824
|
tabIndex: -1,
|
|
825
825
|
name: f,
|
|
826
826
|
autoComplete: m,
|
|
827
827
|
value: z,
|
|
828
828
|
onChange: (F) => U(F.target.value),
|
|
829
|
-
disabled:
|
|
829
|
+
disabled: x,
|
|
830
830
|
form: w,
|
|
831
831
|
children: [
|
|
832
832
|
z === void 0 ? /* @__PURE__ */ i.jsx("option", { value: "" }) : null,
|
|
@@ -842,11 +842,11 @@ var bo = fn, yo = mn, wo = hn, Co = [" ", "Enter", "ArrowUp", "ArrowDown"], So =
|
|
|
842
842
|
vn.displayName = pe;
|
|
843
843
|
var gn = "SelectTrigger", xn = a.forwardRef(
|
|
844
844
|
(e, t) => {
|
|
845
|
-
const { __scopeSelect: n, disabled: o = !1, ...r } = e, s = $e(n), c = ce(gn, n), d = c.disabled || o, u = V(t, c.onTriggerChange), l = Be(n), f = a.useRef("touch"), [m,
|
|
845
|
+
const { __scopeSelect: n, disabled: o = !1, ...r } = e, s = $e(n), c = ce(gn, n), d = c.disabled || o, u = V(t, c.onTriggerChange), l = Be(n), f = a.useRef("touch"), [m, x, g] = $n((h) => {
|
|
846
846
|
const v = l().filter((I) => !I.disabled), S = v.find((I) => I.value === c.value), y = Vn(v, h, S);
|
|
847
847
|
y !== void 0 && c.onValueChange(y.value);
|
|
848
848
|
}), w = (h) => {
|
|
849
|
-
d || (c.onOpenChange(!0),
|
|
849
|
+
d || (c.onOpenChange(!0), g()), h && (c.triggerPointerDownPosRef.current = {
|
|
850
850
|
x: Math.round(h.pageX),
|
|
851
851
|
y: Math.round(h.pageY)
|
|
852
852
|
});
|
|
@@ -877,7 +877,7 @@ var gn = "SelectTrigger", xn = a.forwardRef(
|
|
|
877
877
|
}),
|
|
878
878
|
onKeyDown: L(r.onKeyDown, (h) => {
|
|
879
879
|
const v = m.current !== "";
|
|
880
|
-
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 &&
|
|
880
|
+
!(h.ctrlKey || h.altKey || h.metaKey) && h.key.length === 1 && x(h.key), !(v && h.key === " ") && Co.includes(h.key) && (w(), h.preventDefault());
|
|
881
881
|
})
|
|
882
882
|
}
|
|
883
883
|
) });
|
|
@@ -941,8 +941,8 @@ var ee = 10, [En, le] = Ce(me), Po = "SelectContentImpl", _o = kt("SelectContent
|
|
|
941
941
|
align: l,
|
|
942
942
|
alignOffset: f,
|
|
943
943
|
arrowPadding: m,
|
|
944
|
-
collisionBoundary:
|
|
945
|
-
collisionPadding:
|
|
944
|
+
collisionBoundary: x,
|
|
945
|
+
collisionPadding: g,
|
|
946
946
|
sticky: w,
|
|
947
947
|
hideWhenDetached: h,
|
|
948
948
|
avoidCollisions: v,
|
|
@@ -1011,8 +1011,8 @@ var ee = 10, [En, le] = Ce(me), Po = "SelectContentImpl", _o = kt("SelectContent
|
|
|
1011
1011
|
align: l,
|
|
1012
1012
|
alignOffset: f,
|
|
1013
1013
|
arrowPadding: m,
|
|
1014
|
-
collisionBoundary:
|
|
1015
|
-
collisionPadding:
|
|
1014
|
+
collisionBoundary: x,
|
|
1015
|
+
collisionPadding: g,
|
|
1016
1016
|
sticky: w,
|
|
1017
1017
|
hideWhenDetached: h,
|
|
1018
1018
|
avoidCollisions: v
|
|
@@ -1096,7 +1096,7 @@ var ee = 10, [En, le] = Ce(me), Po = "SelectContentImpl", _o = kt("SelectContent
|
|
|
1096
1096
|
);
|
|
1097
1097
|
In.displayName = Po;
|
|
1098
1098
|
var To = "SelectItemAlignedPosition", Rn = a.forwardRef((e, t) => {
|
|
1099
|
-
const { __scopeSelect: n, onPlaced: o, ...r } = e, s = ce(me, n), c = le(me, n), [d, u] = a.useState(null), [l, f] = a.useState(null), m = V(t, (E) => f(E)),
|
|
1099
|
+
const { __scopeSelect: n, onPlaced: o, ...r } = e, s = ce(me, n), c = le(me, n), [d, u] = a.useState(null), [l, f] = a.useState(null), m = V(t, (E) => f(E)), x = Be(n), g = a.useRef(!1), w = a.useRef(!0), { viewport: h, selectedItem: v, selectedItemText: S, focusSelectedItem: y } = c, I = a.useCallback(() => {
|
|
1100
1100
|
if (s.trigger && s.valueNode && d && l && h && v && S) {
|
|
1101
1101
|
const E = s.trigger.getBoundingClientRect(), P = l.getBoundingClientRect(), z = s.valueNode.getBoundingClientRect(), U = S.getBoundingClientRect();
|
|
1102
1102
|
if (s.dir !== "rtl") {
|
|
@@ -1117,7 +1117,7 @@ var To = "SelectItemAlignedPosition", Rn = a.forwardRef((e, t) => {
|
|
|
1117
1117
|
]);
|
|
1118
1118
|
d.style.minWidth = fe + "px", d.style.right = Ke + "px";
|
|
1119
1119
|
}
|
|
1120
|
-
const W =
|
|
1120
|
+
const W = x(), q = window.innerHeight - ee * 2, X = h.scrollHeight, H = window.getComputedStyle(l), K = parseInt(H.borderTopWidth, 10), F = parseInt(H.paddingTop, 10), Y = parseInt(H.borderBottomWidth, 10), J = parseInt(H.paddingBottom, 10), Q = K + F + X + J + Y, ge = Math.min(v.offsetHeight * 5, Q), de = window.getComputedStyle(h), p = parseInt(de.paddingTop, 10), R = parseInt(de.paddingBottom, 10), N = E.top + E.height / 2 - ee, C = q - N, _ = v.offsetHeight / 2, b = v.offsetTop + _, T = K + F + b, D = Q - T;
|
|
1121
1121
|
if (T <= N) {
|
|
1122
1122
|
const B = W.length > 0 && v === W[W.length - 1].ref.current;
|
|
1123
1123
|
d.style.bottom = "0px";
|
|
@@ -1137,10 +1137,10 @@ var To = "SelectItemAlignedPosition", Rn = a.forwardRef((e, t) => {
|
|
|
1137
1137
|
) + D;
|
|
1138
1138
|
d.style.height = ue + "px", h.scrollTop = T - N + h.offsetTop;
|
|
1139
1139
|
}
|
|
1140
|
-
d.style.margin = `${ee}px 0`, d.style.minHeight = ge + "px", d.style.maxHeight = q + "px", o?.(), requestAnimationFrame(() =>
|
|
1140
|
+
d.style.margin = `${ee}px 0`, d.style.minHeight = ge + "px", d.style.maxHeight = q + "px", o?.(), requestAnimationFrame(() => g.current = !0);
|
|
1141
1141
|
}
|
|
1142
1142
|
}, [
|
|
1143
|
-
|
|
1143
|
+
x,
|
|
1144
1144
|
s.trigger,
|
|
1145
1145
|
s.valueNode,
|
|
1146
1146
|
d,
|
|
@@ -1167,7 +1167,7 @@ var To = "SelectItemAlignedPosition", Rn = a.forwardRef((e, t) => {
|
|
|
1167
1167
|
{
|
|
1168
1168
|
scope: n,
|
|
1169
1169
|
contentWrapper: d,
|
|
1170
|
-
shouldExpandOnScrollRef:
|
|
1170
|
+
shouldExpandOnScrollRef: g,
|
|
1171
1171
|
onScrollButtonChange: j,
|
|
1172
1172
|
children: /* @__PURE__ */ i.jsx(
|
|
1173
1173
|
"div",
|
|
@@ -1263,13 +1263,13 @@ var [Ao, ht] = Ce(me, {}), tt = "SelectViewport", Nn = a.forwardRef(
|
|
|
1263
1263
|
...r.style
|
|
1264
1264
|
},
|
|
1265
1265
|
onScroll: L(r.onScroll, (l) => {
|
|
1266
|
-
const f = l.currentTarget, { contentWrapper: m, shouldExpandOnScrollRef:
|
|
1267
|
-
if (
|
|
1268
|
-
const
|
|
1269
|
-
if (
|
|
1266
|
+
const f = l.currentTarget, { contentWrapper: m, shouldExpandOnScrollRef: x } = c;
|
|
1267
|
+
if (x?.current && m) {
|
|
1268
|
+
const g = Math.abs(u.current - f.scrollTop);
|
|
1269
|
+
if (g > 0) {
|
|
1270
1270
|
const w = window.innerHeight - ee * 2, h = parseFloat(m.style.minHeight), v = parseFloat(m.style.height), S = Math.max(h, v);
|
|
1271
1271
|
if (S < w) {
|
|
1272
|
-
const y = S +
|
|
1272
|
+
const y = S + g, I = Math.min(w, y), A = y - I;
|
|
1273
1273
|
m.style.height = I + "px", m.style.bottom === "0px" && (f.scrollTop = A > 0 ? A : 0, m.style.justifyContent = "flex-end");
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
@@ -1304,7 +1304,7 @@ var Te = "SelectItem", [Bo, Pn] = Ce(Te), _n = a.forwardRef(
|
|
|
1304
1304
|
disabled: r = !1,
|
|
1305
1305
|
textValue: s,
|
|
1306
1306
|
...c
|
|
1307
|
-
} = e, d = ce(Te, n), u = le(Te, n), l = d.value === o, [f, m] = a.useState(s ?? ""), [
|
|
1307
|
+
} = e, d = ce(Te, n), u = le(Te, n), l = d.value === o, [f, m] = a.useState(s ?? ""), [x, g] = a.useState(!1), w = V(
|
|
1308
1308
|
t,
|
|
1309
1309
|
(y) => u.itemRefCallback?.(y, o, r)
|
|
1310
1310
|
), h = Z(), v = a.useRef("touch"), S = () => {
|
|
@@ -1337,16 +1337,16 @@ var Te = "SelectItem", [Bo, Pn] = Ce(Te), _n = a.forwardRef(
|
|
|
1337
1337
|
{
|
|
1338
1338
|
role: "option",
|
|
1339
1339
|
"aria-labelledby": h,
|
|
1340
|
-
"data-highlighted":
|
|
1341
|
-
"aria-selected": l &&
|
|
1340
|
+
"data-highlighted": x ? "" : void 0,
|
|
1341
|
+
"aria-selected": l && x,
|
|
1342
1342
|
"data-state": l ? "checked" : "unchecked",
|
|
1343
1343
|
"aria-disabled": r || void 0,
|
|
1344
1344
|
"data-disabled": r ? "" : void 0,
|
|
1345
1345
|
tabIndex: r ? void 0 : -1,
|
|
1346
1346
|
...c,
|
|
1347
1347
|
ref: w,
|
|
1348
|
-
onFocus: L(c.onFocus, () =>
|
|
1349
|
-
onBlur: L(c.onBlur, () =>
|
|
1348
|
+
onFocus: L(c.onFocus, () => g(!0)),
|
|
1349
|
+
onBlur: L(c.onBlur, () => g(!1)),
|
|
1350
1350
|
onClick: L(c.onClick, () => {
|
|
1351
1351
|
v.current !== "mouse" && S();
|
|
1352
1352
|
}),
|
|
@@ -1376,17 +1376,17 @@ var Te = "SelectItem", [Bo, Pn] = Ce(Te), _n = a.forwardRef(
|
|
|
1376
1376
|
_n.displayName = Te;
|
|
1377
1377
|
var Re = "SelectItemText", Tn = a.forwardRef(
|
|
1378
1378
|
(e, t) => {
|
|
1379
|
-
const { __scopeSelect: n, className: o, style: r, ...s } = e, c = ce(Re, n), d = le(Re, n), u = Pn(Re, n), l = No(Re, n), [f, m] = a.useState(null),
|
|
1379
|
+
const { __scopeSelect: n, className: o, style: r, ...s } = e, c = ce(Re, n), d = le(Re, n), u = Pn(Re, n), l = No(Re, n), [f, m] = a.useState(null), x = V(
|
|
1380
1380
|
t,
|
|
1381
1381
|
(S) => m(S),
|
|
1382
1382
|
u.onItemTextChange,
|
|
1383
1383
|
(S) => d.itemTextRefCallback?.(S, u.value, u.disabled)
|
|
1384
|
-
),
|
|
1385
|
-
() => /* @__PURE__ */ i.jsx("option", { value: u.value, disabled: u.disabled, children:
|
|
1386
|
-
[u.disabled, u.value,
|
|
1384
|
+
), g = f?.textContent, w = a.useMemo(
|
|
1385
|
+
() => /* @__PURE__ */ i.jsx("option", { value: u.value, disabled: u.disabled, children: g }, u.value),
|
|
1386
|
+
[u.disabled, u.value, g]
|
|
1387
1387
|
), { onNativeOptionAdd: h, onNativeOptionRemove: v } = l;
|
|
1388
1388
|
return ne(() => (h(w), () => v(w)), [h, v, w]), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
1389
|
-
/* @__PURE__ */ i.jsx(k.span, { id: u.textId, ...s, ref:
|
|
1389
|
+
/* @__PURE__ */ i.jsx(k.span, { id: u.textId, ...s, ref: x }),
|
|
1390
1390
|
u.isSelected && c.valueNode && !c.valueNodeHasChildren ? Vt.createPortal(s.children, c.valueNode) : null
|
|
1391
1391
|
] });
|
|
1392
1392
|
}
|
|
@@ -1571,7 +1571,7 @@ const _a = ({ disabled: e = !1, handleDelete: t, ...n }) => /* @__PURE__ */ i.js
|
|
|
1571
1571
|
const l = n || Lr;
|
|
1572
1572
|
if (!wt[o])
|
|
1573
1573
|
throw new Error(`Invalid action: ${o}`);
|
|
1574
|
-
const f = wt[o], m = r || f.label,
|
|
1574
|
+
const f = wt[o], m = r || f.label, x = s || f.submittingLabel, g = c || f.IconComponent, w = e ? /* @__PURE__ */ i.jsx(l, { className: "animate-spin" }) : /* @__PURE__ */ i.jsx(g, {});
|
|
1575
1575
|
return /* @__PURE__ */ i.jsx(
|
|
1576
1576
|
ct,
|
|
1577
1577
|
{
|
|
@@ -1580,7 +1580,7 @@ const _a = ({ disabled: e = !1, handleDelete: t, ...n }) => /* @__PURE__ */ i.js
|
|
|
1580
1580
|
type: "submit",
|
|
1581
1581
|
variant: "primary",
|
|
1582
1582
|
...u,
|
|
1583
|
-
children: e ?
|
|
1583
|
+
children: e ? x : m
|
|
1584
1584
|
}
|
|
1585
1585
|
);
|
|
1586
1586
|
};
|
|
@@ -1908,32 +1908,44 @@ const Fa = ({
|
|
|
1908
1908
|
value: d,
|
|
1909
1909
|
onValueChange: u,
|
|
1910
1910
|
error: l,
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1911
|
+
size: f = "md",
|
|
1912
|
+
...m
|
|
1913
|
+
}) => {
|
|
1914
|
+
const x = $(
|
|
1915
|
+
"min-w-[180px]",
|
|
1916
|
+
f === "xs" && "h-7 text-xs md:text-xs",
|
|
1917
|
+
f === "sm" && "h-8 text-sm md:text-xs",
|
|
1918
|
+
f === "md" && "h-9 text-base md:text-sm",
|
|
1919
|
+
f === "lg" && "h-10 text-lg md:text-base",
|
|
1920
|
+
f === "xl" && "h-11 text-xl md:text-lg",
|
|
1921
|
+
c
|
|
1922
|
+
), g = f === "xs" || f === "sm" ? "sm" : "default";
|
|
1923
|
+
return /* @__PURE__ */ i.jsxs(ae, { className: "w-full", direction: "col", gap: "2", children: [
|
|
1924
|
+
o && /* @__PURE__ */ i.jsx(Se, { htmlFor: e, children: o }),
|
|
1925
|
+
/* @__PURE__ */ i.jsxs(
|
|
1926
|
+
cs,
|
|
1927
|
+
{
|
|
1928
|
+
defaultValue: t,
|
|
1929
|
+
name: e,
|
|
1930
|
+
onValueChange: u,
|
|
1931
|
+
value: d,
|
|
1932
|
+
...m,
|
|
1933
|
+
children: [
|
|
1934
|
+
/* @__PURE__ */ i.jsx(ds, { className: x, "data-testid": `select-input-${e}`, size: g, children: /* @__PURE__ */ i.jsx(ls, { placeholder: r }) }),
|
|
1935
|
+
/* @__PURE__ */ i.jsx(us, { children: n.map(({ value: w, label: h }) => /* @__PURE__ */ i.jsx(fs, { value: w, children: h }, `option-${w}`)) })
|
|
1936
|
+
]
|
|
1937
|
+
}
|
|
1938
|
+
),
|
|
1939
|
+
s && /* @__PURE__ */ i.jsx(Ae, { size: "sm", variant: "muted", children: s }),
|
|
1940
|
+
l && /* @__PURE__ */ i.jsx(je, { message: l })
|
|
1941
|
+
] });
|
|
1942
|
+
};
|
|
1931
1943
|
var Ct = 1, hs = 0.9, vs = 0.8, gs = 0.17, Ye = 0.1, Xe = 0.999, xs = 0.9999, bs = 0.99, ys = /[\\\/_+.#"@\[\(\{&]/, ws = /[\\\/_+.#"@\[\(\{&]/g, Cs = /[\s-]/, Gn = /[\s-]/g;
|
|
1932
1944
|
function st(e, t, n, o, r, s, c) {
|
|
1933
1945
|
if (s === t.length) return r === e.length ? Ct : bs;
|
|
1934
1946
|
var d = `${r},${s}`;
|
|
1935
1947
|
if (c[d] !== void 0) return c[d];
|
|
1936
|
-
for (var u = o.charAt(s), l = n.indexOf(u, r), f = 0, m,
|
|
1948
|
+
for (var u = o.charAt(s), l = n.indexOf(u, r), f = 0, m, x, g, w; l >= 0; ) m = st(e, t, n, o, l + 1, s + 1, c), m > f && (l === r ? m *= Ct : ys.test(e.charAt(l - 1)) ? (m *= vs, g = e.slice(r, l - 1).match(ws), g && r > 0 && (m *= Math.pow(Xe, g.length))) : Cs.test(e.charAt(l - 1)) ? (m *= hs, w = e.slice(r, l - 1).match(Gn), w && r > 0 && (m *= Math.pow(Xe, w.length))) : (m *= gs, r > 0 && (m *= Math.pow(Xe, l - r))), e.charAt(l) !== t.charAt(s) && (m *= xs)), (m < Ye && n.charAt(l - 1) === o.charAt(s + 1) || o.charAt(s + 1) === o.charAt(s) && n.charAt(l - 1) !== o.charAt(s)) && (x = st(e, t, n, o, l + 1, s + 2, c), x * Ye > m && (m = x * Ye)), m > f && (f = m), l = n.indexOf(u, l + 1);
|
|
1937
1949
|
return c[d] = f, f;
|
|
1938
1950
|
}
|
|
1939
1951
|
function St(e) {
|
|
@@ -1962,24 +1974,24 @@ var Es = "DismissableLayer", at = "dismissableLayer.update", Is = "dismissableLa
|
|
|
1962
1974
|
onInteractOutside: c,
|
|
1963
1975
|
onDismiss: d,
|
|
1964
1976
|
...u
|
|
1965
|
-
} = e, l = a.useContext(Wn), [f, m] = a.useState(null),
|
|
1977
|
+
} = e, l = a.useContext(Wn), [f, m] = a.useState(null), x = f?.ownerDocument ?? globalThis?.document, [, g] = a.useState({}), w = V(t, (E) => m(E)), h = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), S = h.indexOf(v), y = f ? h.indexOf(f) : -1, I = l.layersWithOutsidePointerEventsDisabled.size > 0, A = y >= S, M = js((E) => {
|
|
1966
1978
|
const P = E.target, z = [...l.branches].some((U) => U.contains(P));
|
|
1967
1979
|
!A || z || (r?.(E), c?.(E), E.defaultPrevented || d?.());
|
|
1968
|
-
},
|
|
1980
|
+
}, x), j = Ps((E) => {
|
|
1969
1981
|
const P = E.target;
|
|
1970
1982
|
[...l.branches].some((U) => U.contains(P)) || (s?.(E), c?.(E), E.defaultPrevented || d?.());
|
|
1971
|
-
},
|
|
1983
|
+
}, x);
|
|
1972
1984
|
return Er((E) => {
|
|
1973
1985
|
y === l.layers.size - 1 && (o?.(E), !E.defaultPrevented && d && (E.preventDefault(), d()));
|
|
1974
|
-
},
|
|
1986
|
+
}, x), a.useEffect(() => {
|
|
1975
1987
|
if (f)
|
|
1976
|
-
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Et =
|
|
1977
|
-
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (
|
|
1988
|
+
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Et = x.body.style.pointerEvents, x.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), It(), () => {
|
|
1989
|
+
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (x.body.style.pointerEvents = Et);
|
|
1978
1990
|
};
|
|
1979
|
-
}, [f,
|
|
1991
|
+
}, [f, x, n, l]), a.useEffect(() => () => {
|
|
1980
1992
|
f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), It());
|
|
1981
1993
|
}, [f, l]), a.useEffect(() => {
|
|
1982
|
-
const E = () =>
|
|
1994
|
+
const E = () => g({});
|
|
1983
1995
|
return document.addEventListener(at, E), () => document.removeEventListener(at, E);
|
|
1984
1996
|
}, []), /* @__PURE__ */ i.jsx(
|
|
1985
1997
|
k.div,
|
|
@@ -2092,25 +2104,25 @@ function Ts(e) {
|
|
|
2092
2104
|
}, [d]), ne(() => {
|
|
2093
2105
|
const l = o.current, f = r.current;
|
|
2094
2106
|
if (f !== e) {
|
|
2095
|
-
const
|
|
2096
|
-
e ? u("MOUNT") :
|
|
2107
|
+
const x = s.current, g = _e(l);
|
|
2108
|
+
e ? u("MOUNT") : g === "none" || l?.display === "none" ? u("UNMOUNT") : u(f && x !== g ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
2097
2109
|
}
|
|
2098
2110
|
}, [e, u]), ne(() => {
|
|
2099
2111
|
if (t) {
|
|
2100
2112
|
let l;
|
|
2101
|
-
const f = t.ownerDocument.defaultView ?? window, m = (
|
|
2102
|
-
const h = _e(o.current).includes(
|
|
2103
|
-
if (
|
|
2113
|
+
const f = t.ownerDocument.defaultView ?? window, m = (g) => {
|
|
2114
|
+
const h = _e(o.current).includes(g.animationName);
|
|
2115
|
+
if (g.target === t && h && (u("ANIMATION_END"), !r.current)) {
|
|
2104
2116
|
const v = t.style.animationFillMode;
|
|
2105
2117
|
t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
|
|
2106
2118
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
|
|
2107
2119
|
});
|
|
2108
2120
|
}
|
|
2109
|
-
},
|
|
2110
|
-
|
|
2121
|
+
}, x = (g) => {
|
|
2122
|
+
g.target === t && (s.current = _e(o.current));
|
|
2111
2123
|
};
|
|
2112
|
-
return t.addEventListener("animationstart",
|
|
2113
|
-
f.clearTimeout(l), t.removeEventListener("animationstart",
|
|
2124
|
+
return t.addEventListener("animationstart", x), t.addEventListener("animationcancel", m), t.addEventListener("animationend", m), () => {
|
|
2125
|
+
f.clearTimeout(l), t.removeEventListener("animationstart", x), t.removeEventListener("animationcancel", m), t.removeEventListener("animationend", m);
|
|
2114
2126
|
};
|
|
2115
2127
|
} else
|
|
2116
2128
|
u("ANIMATION_END");
|
|
@@ -2366,7 +2378,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2366
2378
|
let n = be(() => {
|
|
2367
2379
|
var p, R;
|
|
2368
2380
|
return { search: "", value: (R = (p = e.value) != null ? p : e.defaultValue) != null ? R : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
2369
|
-
}), o = be(() => /* @__PURE__ */ new Set()), r = be(() => /* @__PURE__ */ new Map()), s = be(() => /* @__PURE__ */ new Map()), c = be(() => /* @__PURE__ */ new Set()), d = dr(e), { label: u, children: l, value: f, onValueChange: m, filter:
|
|
2381
|
+
}), o = be(() => /* @__PURE__ */ new Set()), r = be(() => /* @__PURE__ */ new Map()), s = be(() => /* @__PURE__ */ new Map()), c = be(() => /* @__PURE__ */ new Set()), d = dr(e), { label: u, children: l, value: f, onValueChange: m, filter: x, shouldFilter: g, loop: w, disablePointerSelection: h = !1, vimBindings: v = !0, ...S } = e, y = Z(), I = Z(), A = Z(), M = a.useRef(null), j = da();
|
|
2370
2382
|
ve(() => {
|
|
2371
2383
|
if (f !== void 0) {
|
|
2372
2384
|
let p = f.trim();
|
|
@@ -2543,11 +2555,11 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2543
2555
|
ve(() => {
|
|
2544
2556
|
if (!l) return d.item(r, c?.id);
|
|
2545
2557
|
}, [l]);
|
|
2546
|
-
let f = ur(r, s, [e.value, e.children, s], e.keywords), m = bt(),
|
|
2558
|
+
let f = ur(r, s, [e.value, e.children, s], e.keywords), m = bt(), x = ie((j) => j.value && j.value === f.current), g = ie((j) => l || d.filter() === !1 ? !0 : j.search ? j.filtered.items.get(r) > 0 : !0);
|
|
2547
2559
|
a.useEffect(() => {
|
|
2548
2560
|
let j = s.current;
|
|
2549
2561
|
if (!(!j || e.disabled)) return j.addEventListener(it, w), () => j.removeEventListener(it, w);
|
|
2550
|
-
}, [
|
|
2562
|
+
}, [g, e.onSelect, e.disabled]);
|
|
2551
2563
|
function w() {
|
|
2552
2564
|
var j, E;
|
|
2553
2565
|
h(), (E = (j = u.current).onSelect) == null || E.call(j, f.current);
|
|
@@ -2555,14 +2567,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2555
2567
|
function h() {
|
|
2556
2568
|
m.setState("value", f.current, !0);
|
|
2557
2569
|
}
|
|
2558
|
-
if (!
|
|
2570
|
+
if (!g) return null;
|
|
2559
2571
|
let { disabled: v, value: S, onSelect: y, forceMount: I, keywords: A, ...M } = e;
|
|
2560
|
-
return a.createElement(k.div, { ref: Ne(s, t), ...M, id: r, "cmdk-item": "", role: "option", "aria-disabled": !!v, "aria-selected": !!
|
|
2572
|
+
return a.createElement(k.div, { ref: Ne(s, t), ...M, id: r, "cmdk-item": "", role: "option", "aria-disabled": !!v, "aria-selected": !!x, "data-disabled": !!v, "data-selected": !!x, onPointerMove: v || d.getDisablePointerSelection() ? void 0 : h, onClick: v ? void 0 : w }, e.children);
|
|
2561
2573
|
}), ta = a.forwardRef((e, t) => {
|
|
2562
|
-
let { heading: n, children: o, forceMount: r, ...s } = e, c = Z(), d = a.useRef(null), u = a.useRef(null), l = Z(), f = Pe(), m = ie((
|
|
2574
|
+
let { heading: n, children: o, forceMount: r, ...s } = e, c = Z(), d = a.useRef(null), u = a.useRef(null), l = Z(), f = Pe(), m = ie((g) => r || f.filter() === !1 ? !0 : g.search ? g.filtered.groups.has(c) : !0);
|
|
2563
2575
|
ve(() => f.group(c), []), ur(c, d, [e.value, e.heading, u]);
|
|
2564
|
-
let
|
|
2565
|
-
return a.createElement(k.div, { ref: Ne(d, t), ...s, "cmdk-group": "", role: "presentation", hidden: m ? void 0 : !0 }, n && a.createElement("div", { ref: u, "cmdk-group-heading": "", "aria-hidden": !0, id: l }, n), Ge(e, (
|
|
2576
|
+
let x = a.useMemo(() => ({ id: c, forceMount: r }), [r]);
|
|
2577
|
+
return a.createElement(k.div, { ref: Ne(d, t), ...s, "cmdk-group": "", role: "presentation", hidden: m ? void 0 : !0 }, n && a.createElement("div", { ref: u, "cmdk-group-heading": "", "aria-hidden": !0, id: l }, n), Ge(e, (g) => a.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? l : void 0 }, a.createElement(cr.Provider, { value: x }, g))));
|
|
2566
2578
|
}), na = a.forwardRef((e, t) => {
|
|
2567
2579
|
let { alwaysRender: n, ...o } = e, r = a.useRef(null), s = ie((c) => !c.search);
|
|
2568
2580
|
return !n && !s ? null : a.createElement(k.div, { ref: Ne(r, t), ...o, "cmdk-separator": "", role: "separator" });
|
|
@@ -2577,14 +2589,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2577
2589
|
let { children: n, label: o = "Suggestions", ...r } = e, s = a.useRef(null), c = a.useRef(null), d = ie((l) => l.selectedItemId), u = Pe();
|
|
2578
2590
|
return a.useEffect(() => {
|
|
2579
2591
|
if (c.current && s.current) {
|
|
2580
|
-
let l = c.current, f = s.current, m,
|
|
2592
|
+
let l = c.current, f = s.current, m, x = new ResizeObserver(() => {
|
|
2581
2593
|
m = requestAnimationFrame(() => {
|
|
2582
|
-
let
|
|
2583
|
-
f.style.setProperty("--cmdk-list-height",
|
|
2594
|
+
let g = l.offsetHeight;
|
|
2595
|
+
f.style.setProperty("--cmdk-list-height", g.toFixed(1) + "px");
|
|
2584
2596
|
});
|
|
2585
2597
|
});
|
|
2586
|
-
return
|
|
2587
|
-
cancelAnimationFrame(m),
|
|
2598
|
+
return x.observe(l), () => {
|
|
2599
|
+
cancelAnimationFrame(m), x.unobserve(l);
|
|
2588
2600
|
};
|
|
2589
2601
|
}
|
|
2590
2602
|
}, []), a.createElement(k.div, { ref: Ne(s, t), ...r, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": d, "aria-label": o, id: u.listId }, Ge(e, (l) => a.createElement("div", { ref: Ne(c, u.listInnerRef), "cmdk-list-sizer": "" }, l)));
|
package/dist/forms.d.ts
CHANGED
|
@@ -120,9 +120,9 @@ declare interface RadioSelectProps {
|
|
|
120
120
|
error?: string;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
export declare const SelectInput: ({ name, defaultValue, options, label, placeholder, note, className, value, onValueChange, error, ...props }: SelectInputProps) => JSX.Element;
|
|
123
|
+
export declare const SelectInput: ({ name, defaultValue, options, label, placeholder, note, className, value, onValueChange, error, size, ...props }: SelectInputProps) => JSX.Element;
|
|
124
124
|
|
|
125
|
-
export declare interface SelectInputProps extends Omit<React.ComponentProps<"select">, "dir"> {
|
|
125
|
+
export declare interface SelectInputProps extends Omit<React.ComponentProps<"select">, "dir" | "size"> {
|
|
126
126
|
name: string;
|
|
127
127
|
value?: string;
|
|
128
128
|
onValueChange: (value: string) => void;
|
|
@@ -132,6 +132,7 @@ export declare interface SelectInputProps extends Omit<React.ComponentProps<"sel
|
|
|
132
132
|
note?: string;
|
|
133
133
|
className?: string;
|
|
134
134
|
error?: string;
|
|
135
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
export declare const SelectPicker: ({ options, value, placeholder, className, onSelect, renderSelected, }: SelectPickerProps) => JSX.Element;
|
package/dist/forms.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as e, a as s } from "./chunks/calendar-DKwGFkIw.js";
|
|
2
|
-
import { C as o, a as r, b as n, D as p, I as c, c as I, L as b, N as l, R as x, d as B, e as S, S as i, f as m, T as D } from "./chunks/Textarea-
|
|
2
|
+
import { C as o, a as r, b as n, D as p, I as c, c as I, L as b, N as l, R as x, d as B, e as S, S as i, f as m, T as D } from "./chunks/Textarea-BpQRN4Xn.js";
|
|
3
3
|
export {
|
|
4
4
|
e as Button,
|
|
5
5
|
s as ButtonGroup,
|
package/dist/index.d.ts
CHANGED
|
@@ -546,9 +546,9 @@ declare const ROUNDED_SIZES: readonly ["none", "xs", "sm", "md", "lg", "xl", "2x
|
|
|
546
546
|
|
|
547
547
|
declare type RoundedSize = (typeof ROUNDED_SIZES)[number];
|
|
548
548
|
|
|
549
|
-
export declare const SelectInput: ({ name, defaultValue, options, label, placeholder, note, className, value, onValueChange, error, ...props }: SelectInputProps) => JSX.Element;
|
|
549
|
+
export declare const SelectInput: ({ name, defaultValue, options, label, placeholder, note, className, value, onValueChange, error, size, ...props }: SelectInputProps) => JSX.Element;
|
|
550
550
|
|
|
551
|
-
export declare interface SelectInputProps extends Omit<React.ComponentProps<"select">, "dir"> {
|
|
551
|
+
export declare interface SelectInputProps extends Omit<React.ComponentProps<"select">, "dir" | "size"> {
|
|
552
552
|
name: string;
|
|
553
553
|
value?: string;
|
|
554
554
|
onValueChange: (value: string) => void;
|
|
@@ -558,6 +558,7 @@ export declare interface SelectInputProps extends Omit<React.ComponentProps<"sel
|
|
|
558
558
|
note?: string;
|
|
559
559
|
className?: string;
|
|
560
560
|
error?: string;
|
|
561
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
561
562
|
}
|
|
562
563
|
|
|
563
564
|
export declare const SelectPicker: ({ options, value, placeholder, className, onSelect, renderSelected, }: SelectPickerProps) => JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -7,8 +7,8 @@ import { c as i } from "./chunks/index-CRiPKpXj.js";
|
|
|
7
7
|
import * as x from "react";
|
|
8
8
|
import { Fragment as W, useState as Y, useEffect as Z, useMemo as ee } from "react";
|
|
9
9
|
import { u as ae, a as te, c as re, b as se, P as h, d as ne, e as j } from "./chunks/popover-ByOImpZC.js";
|
|
10
|
-
import { g as _, h as oe, i as ie } from "./chunks/Textarea-
|
|
11
|
-
import { C as Ha, a as qa, b as Ka, D as Xa, I as Ja, c as Qa, L as Ua, N as Wa, R as Ya, d as Za, e as et, S as at, f as tt, T as rt } from "./chunks/Textarea-
|
|
10
|
+
import { g as _, h as oe, i as ie } from "./chunks/Textarea-BpQRN4Xn.js";
|
|
11
|
+
import { C as Ha, a as qa, b as Ka, D as Xa, I as Ja, c as Qa, L as Ua, N as Wa, R as Ya, d as Za, e as et, S as at, f as tt, T as rt } from "./chunks/Textarea-BpQRN4Xn.js";
|
|
12
12
|
import { E as nt, a as ot, I as it, P as lt, b as ct } from "./chunks/PageNotFound-p3jnz0na.js";
|
|
13
13
|
import { B as ut, C as bt, F as mt, a as gt, G as pt, H as xt, L as ft } from "./chunks/Layout-CvVv48kM.js";
|
|
14
14
|
import { C as ht } from "./chunks/Code-zUdzRHTD.js";
|