@drjoshcsimmons/scl 0.1.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/LICENSE +21 -0
- package/README.md +73 -0
- package/dist/components/ui/accordion/accordion.d.ts +8 -0
- package/dist/components/ui/accordion/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion/index.d.ts +2 -0
- package/dist/components/ui/accordion/index.d.ts.map +1 -0
- package/dist/components/ui/alert/alert.d.ts +9 -0
- package/dist/components/ui/alert/alert.d.ts.map +1 -0
- package/dist/components/ui/alert/index.d.ts +2 -0
- package/dist/components/ui/alert/index.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts +21 -0
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog/index.d.ts +2 -0
- package/dist/components/ui/alert-dialog/index.d.ts.map +1 -0
- package/dist/components/ui/avatar/avatar.d.ts +7 -0
- package/dist/components/ui/avatar/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar/index.d.ts +2 -0
- package/dist/components/ui/avatar/index.d.ts.map +1 -0
- package/dist/components/ui/badge/badge.d.ts +10 -0
- package/dist/components/ui/badge/badge.d.ts.map +1 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.d.ts.map +1 -0
- package/dist/components/ui/button/button.d.ts +12 -0
- package/dist/components/ui/button/button.d.ts.map +1 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.d.ts.map +1 -0
- package/dist/components/ui/card/card.d.ts +9 -0
- package/dist/components/ui/card/card.d.ts.map +1 -0
- package/dist/components/ui/card/index.d.ts +2 -0
- package/dist/components/ui/card/index.d.ts.map +1 -0
- package/dist/components/ui/checkbox/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox/index.d.ts +2 -0
- package/dist/components/ui/checkbox/index.d.ts.map +1 -0
- package/dist/components/ui/collapsible/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible/index.d.ts +2 -0
- package/dist/components/ui/collapsible/index.d.ts.map +1 -0
- package/dist/components/ui/dialog/dialog.d.ts +20 -0
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog/index.d.ts +2 -0
- package/dist/components/ui/dialog/index.d.ts.map +1 -0
- package/dist/components/ui/dithered-image/dithered-image.d.ts +17 -0
- package/dist/components/ui/dithered-image/dithered-image.d.ts.map +1 -0
- package/dist/components/ui/dithered-image/index.d.ts +3 -0
- package/dist/components/ui/dithered-image/index.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +2 -0
- package/dist/components/ui/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.d.ts.map +1 -0
- package/dist/components/ui/input/input.d.ts +5 -0
- package/dist/components/ui/input/input.d.ts.map +1 -0
- package/dist/components/ui/label/index.d.ts +2 -0
- package/dist/components/ui/label/index.d.ts.map +1 -0
- package/dist/components/ui/label/label.d.ts +6 -0
- package/dist/components/ui/label/label.d.ts.map +1 -0
- package/dist/components/ui/popover/index.d.ts +2 -0
- package/dist/components/ui/popover/index.d.ts.map +1 -0
- package/dist/components/ui/popover/popover.d.ts +8 -0
- package/dist/components/ui/popover/popover.d.ts.map +1 -0
- package/dist/components/ui/progress/index.d.ts +2 -0
- package/dist/components/ui/progress/index.d.ts.map +1 -0
- package/dist/components/ui/progress/progress.d.ts +19 -0
- package/dist/components/ui/progress/progress.d.ts.map +1 -0
- package/dist/components/ui/radio-group/index.d.ts +2 -0
- package/dist/components/ui/radio-group/index.d.ts.map +1 -0
- package/dist/components/ui/radio-group/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/ui/scroll-area/index.d.ts +2 -0
- package/dist/components/ui/scroll-area/index.d.ts.map +1 -0
- package/dist/components/ui/scroll-area/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/select/index.d.ts +2 -0
- package/dist/components/ui/select/index.d.ts.map +1 -0
- package/dist/components/ui/select/select.d.ts +14 -0
- package/dist/components/ui/select/select.d.ts.map +1 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.d.ts.map +1 -0
- package/dist/components/ui/separator/separator.d.ts +5 -0
- package/dist/components/ui/separator/separator.d.ts.map +1 -0
- package/dist/components/ui/sheet/index.d.ts +2 -0
- package/dist/components/ui/sheet/index.d.ts.map +1 -0
- package/dist/components/ui/sheet/sheet.d.ts +26 -0
- package/dist/components/ui/sheet/sheet.d.ts.map +1 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.d.ts.map +1 -0
- package/dist/components/ui/skeleton/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/ui/slider/index.d.ts +2 -0
- package/dist/components/ui/slider/index.d.ts.map +1 -0
- package/dist/components/ui/slider/slider.d.ts +5 -0
- package/dist/components/ui/slider/slider.d.ts.map +1 -0
- package/dist/components/ui/statusline/index.d.ts +2 -0
- package/dist/components/ui/statusline/index.d.ts.map +1 -0
- package/dist/components/ui/statusline/statusline.d.ts +40 -0
- package/dist/components/ui/statusline/statusline.d.ts.map +1 -0
- package/dist/components/ui/switch/index.d.ts +2 -0
- package/dist/components/ui/switch/index.d.ts.map +1 -0
- package/dist/components/ui/switch/switch.d.ts +5 -0
- package/dist/components/ui/switch/switch.d.ts.map +1 -0
- package/dist/components/ui/table/index.d.ts +2 -0
- package/dist/components/ui/table/index.d.ts.map +1 -0
- package/dist/components/ui/table/table.d.ts +11 -0
- package/dist/components/ui/table/table.d.ts.map +1 -0
- package/dist/components/ui/tabs/index.d.ts +2 -0
- package/dist/components/ui/tabs/index.d.ts.map +1 -0
- package/dist/components/ui/tabs/tabs.d.ts +8 -0
- package/dist/components/ui/tabs/tabs.d.ts.map +1 -0
- package/dist/components/ui/terminal-textarea/index.d.ts +2 -0
- package/dist/components/ui/terminal-textarea/index.d.ts.map +1 -0
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +27 -0
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.d.ts.map +1 -0
- package/dist/components/ui/textarea/textarea.d.ts +5 -0
- package/dist/components/ui/textarea/textarea.d.ts.map +1 -0
- package/dist/components/ui/toggle/index.d.ts +2 -0
- package/dist/components/ui/toggle/index.d.ts.map +1 -0
- package/dist/components/ui/toggle/toggle.d.ts +13 -0
- package/dist/components/ui/toggle/toggle.d.ts.map +1 -0
- package/dist/components/ui/tooltip/index.d.ts +2 -0
- package/dist/components/ui/tooltip/index.d.ts.map +1 -0
- package/dist/components/ui/tooltip/tooltip.d.ts +11 -0
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +165 -0
- package/dist/index10.js +61 -0
- package/dist/index100.js +32 -0
- package/dist/index101.js +17 -0
- package/dist/index102.js +137 -0
- package/dist/index103.js +52 -0
- package/dist/index104.js +11 -0
- package/dist/index105.js +6 -0
- package/dist/index106.js +183 -0
- package/dist/index107.js +652 -0
- package/dist/index108.js +109 -0
- package/dist/index109.js +93 -0
- package/dist/index11.js +27 -0
- package/dist/index110.js +69 -0
- package/dist/index111.js +161 -0
- package/dist/index112.js +399 -0
- package/dist/index113.js +1682 -0
- package/dist/index114.js +280 -0
- package/dist/index115.js +134 -0
- package/dist/index116.js +34 -0
- package/dist/index117.js +1613 -0
- package/dist/index118.js +300 -0
- package/dist/index119.js +637 -0
- package/dist/index12.js +7 -0
- package/dist/index120.js +146 -0
- package/dist/index121.js +23 -0
- package/dist/index122.js +11 -0
- package/dist/index123.js +40 -0
- package/dist/index124.js +20 -0
- package/dist/index125.js +8 -0
- package/dist/index126.js +14 -0
- package/dist/index127.js +208 -0
- package/dist/index128.js +24 -0
- package/dist/index129.js +402 -0
- package/dist/index13.js +100 -0
- package/dist/index130.js +1308 -0
- package/dist/index131.js +620 -0
- package/dist/index132.js +4 -0
- package/dist/index133.js +55 -0
- package/dist/index134.js +67 -0
- package/dist/index135.js +27 -0
- package/dist/index136.js +31 -0
- package/dist/index137.js +7 -0
- package/dist/index138.js +4 -0
- package/dist/index139.js +4 -0
- package/dist/index14.js +226 -0
- package/dist/index140.js +7 -0
- package/dist/index141.js +5 -0
- package/dist/index142.js +26 -0
- package/dist/index143.js +115 -0
- package/dist/index144.js +18 -0
- package/dist/index145.js +527 -0
- package/dist/index146.js +130 -0
- package/dist/index147.js +136 -0
- package/dist/index148.js +67 -0
- package/dist/index149.js +71 -0
- package/dist/index15.js +146 -0
- package/dist/index150.js +11 -0
- package/dist/index151.js +16 -0
- package/dist/index152.js +68 -0
- package/dist/index153.js +6 -0
- package/dist/index154.js +25 -0
- package/dist/index155.js +25 -0
- package/dist/index156.js +15 -0
- package/dist/index157.js +30 -0
- package/dist/index158.js +7 -0
- package/dist/index16.js +21 -0
- package/dist/index17.js +19 -0
- package/dist/index18.js +24 -0
- package/dist/index19.js +58 -0
- package/dist/index2.js +8 -0
- package/dist/index20.js +31 -0
- package/dist/index21.js +38 -0
- package/dist/index22.js +123 -0
- package/dist/index23.js +24 -0
- package/dist/index24.js +72 -0
- package/dist/index25.js +17 -0
- package/dist/index26.js +34 -0
- package/dist/index27.js +81 -0
- package/dist/index28.js +27 -0
- package/dist/index29.js +90 -0
- package/dist/index3.js +22 -0
- package/dist/index30.js +46 -0
- package/dist/index31.js +234 -0
- package/dist/index32.js +20 -0
- package/dist/index33.js +37 -0
- package/dist/index34.js +25 -0
- package/dist/index35.js +105 -0
- package/dist/index36.js +68 -0
- package/dist/index37.js +51 -0
- package/dist/index38.js +102 -0
- package/dist/index39.js +13 -0
- package/dist/index4.js +46 -0
- package/dist/index40.js +17 -0
- package/dist/index41.js +2265 -0
- package/dist/index42.js +35 -0
- package/dist/index43.js +20 -0
- package/dist/index44.js +239 -0
- package/dist/index45.js +13 -0
- package/dist/index46.js +75 -0
- package/dist/index47.js +251 -0
- package/dist/index48.js +11 -0
- package/dist/index49.js +338 -0
- package/dist/index5.js +51 -0
- package/dist/index50.js +62 -0
- package/dist/index51.js +243 -0
- package/dist/index52.js +862 -0
- package/dist/index53.js +11 -0
- package/dist/index54.js +120 -0
- package/dist/index55.js +227 -0
- package/dist/index56.js +13 -0
- package/dist/index57.js +13 -0
- package/dist/index58.js +238 -0
- package/dist/index59.js +262 -0
- package/dist/index6.js +51 -0
- package/dist/index60.js +14 -0
- package/dist/index61.js +24 -0
- package/dist/index62.js +532 -0
- package/dist/index63.js +6157 -0
- package/dist/index64.js +2635 -0
- package/dist/index65.js +300 -0
- package/dist/index66.js +674 -0
- package/dist/index67.js +832 -0
- package/dist/index68.js +27 -0
- package/dist/index69.js +330 -0
- package/dist/index7.js +42 -0
- package/dist/index70.js +4901 -0
- package/dist/index71.js +831 -0
- package/dist/index72.js +1260 -0
- package/dist/index73.js +536 -0
- package/dist/index74.js +127 -0
- package/dist/index75.js +163 -0
- package/dist/index76.js +33 -0
- package/dist/index77.js +437 -0
- package/dist/index78.js +132 -0
- package/dist/index79.js +83 -0
- package/dist/index8.js +31 -0
- package/dist/index80.js +70 -0
- package/dist/index81.js +48 -0
- package/dist/index82.js +29 -0
- package/dist/index83.js +9 -0
- package/dist/index84.js +54 -0
- package/dist/index85.js +36 -0
- package/dist/index86.js +13 -0
- package/dist/index87.js +10 -0
- package/dist/index88.js +32 -0
- package/dist/index89.js +57 -0
- package/dist/index9.js +54 -0
- package/dist/index90.js +13 -0
- package/dist/index91.js +6 -0
- package/dist/index92.js +15 -0
- package/dist/index93.js +8 -0
- package/dist/index94.js +27 -0
- package/dist/index95.js +71 -0
- package/dist/index96.js +127 -0
- package/dist/index97.js +221 -0
- package/dist/index98.js +16 -0
- package/dist/index99.js +56 -0
- package/dist/lib/utils.d.ts +14 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/tokens/animations.d.ts +174 -0
- package/dist/tokens/animations.d.ts.map +1 -0
- package/dist/tokens/colors.d.ts +92 -0
- package/dist/tokens/colors.d.ts.map +1 -0
- package/dist/tokens/index.d.ts +403 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/shadows.d.ts +15 -0
- package/dist/tokens/shadows.d.ts.map +1 -0
- package/dist/tokens/spacing.d.ts +55 -0
- package/dist/tokens/spacing.d.ts.map +1 -0
- package/dist/tokens/typography.d.ts +80 -0
- package/dist/tokens/typography.d.ts.map +1 -0
- package/package.json +128 -0
package/dist/index78.js
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { composeEventHandlers as T } from "./index83.js";
|
|
3
|
+
import { useComposedRefs as P } from "./index82.js";
|
|
4
|
+
import { createContextScope as I } from "./index80.js";
|
|
5
|
+
import { useControllableState as M } from "./index84.js";
|
|
6
|
+
import { usePrevious as H } from "./index93.js";
|
|
7
|
+
import { useSize as j } from "./index94.js";
|
|
8
|
+
import { Primitive as y } from "./index85.js";
|
|
9
|
+
import { jsxs as A, jsx as m } from "react/jsx-runtime";
|
|
10
|
+
var h = "Switch", [U] = I(h), [q, z] = U(h), R = r.forwardRef(
|
|
11
|
+
(t, a) => {
|
|
12
|
+
const {
|
|
13
|
+
__scopeSwitch: e,
|
|
14
|
+
name: c,
|
|
15
|
+
checked: o,
|
|
16
|
+
defaultChecked: v,
|
|
17
|
+
required: i,
|
|
18
|
+
disabled: n,
|
|
19
|
+
value: p = "on",
|
|
20
|
+
onCheckedChange: w,
|
|
21
|
+
form: s,
|
|
22
|
+
...S
|
|
23
|
+
} = t, [d, u] = r.useState(null), b = P(a, (f) => u(f)), C = r.useRef(!1), k = d ? s || !!d.closest("form") : !0, [l, B] = M({
|
|
24
|
+
prop: o,
|
|
25
|
+
defaultProp: v ?? !1,
|
|
26
|
+
onChange: w,
|
|
27
|
+
caller: h
|
|
28
|
+
});
|
|
29
|
+
return /* @__PURE__ */ A(q, { scope: e, checked: l, disabled: n, children: [
|
|
30
|
+
/* @__PURE__ */ m(
|
|
31
|
+
y.button,
|
|
32
|
+
{
|
|
33
|
+
type: "button",
|
|
34
|
+
role: "switch",
|
|
35
|
+
"aria-checked": l,
|
|
36
|
+
"aria-required": i,
|
|
37
|
+
"data-state": g(l),
|
|
38
|
+
"data-disabled": n ? "" : void 0,
|
|
39
|
+
disabled: n,
|
|
40
|
+
value: p,
|
|
41
|
+
...S,
|
|
42
|
+
ref: b,
|
|
43
|
+
onClick: T(t.onClick, (f) => {
|
|
44
|
+
B((N) => !N), k && (C.current = f.isPropagationStopped(), C.current || f.stopPropagation());
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
k && /* @__PURE__ */ m(
|
|
49
|
+
x,
|
|
50
|
+
{
|
|
51
|
+
control: d,
|
|
52
|
+
bubbles: !C.current,
|
|
53
|
+
name: c,
|
|
54
|
+
value: p,
|
|
55
|
+
checked: l,
|
|
56
|
+
required: i,
|
|
57
|
+
disabled: n,
|
|
58
|
+
form: s,
|
|
59
|
+
style: { transform: "translateX(-100%)" }
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
R.displayName = h;
|
|
66
|
+
var E = "SwitchThumb", _ = r.forwardRef(
|
|
67
|
+
(t, a) => {
|
|
68
|
+
const { __scopeSwitch: e, ...c } = t, o = z(E, e);
|
|
69
|
+
return /* @__PURE__ */ m(
|
|
70
|
+
y.span,
|
|
71
|
+
{
|
|
72
|
+
"data-state": g(o.checked),
|
|
73
|
+
"data-disabled": o.disabled ? "" : void 0,
|
|
74
|
+
...c,
|
|
75
|
+
ref: a
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
_.displayName = E;
|
|
81
|
+
var L = "SwitchBubbleInput", x = r.forwardRef(
|
|
82
|
+
({
|
|
83
|
+
__scopeSwitch: t,
|
|
84
|
+
control: a,
|
|
85
|
+
checked: e,
|
|
86
|
+
bubbles: c = !0,
|
|
87
|
+
...o
|
|
88
|
+
}, v) => {
|
|
89
|
+
const i = r.useRef(null), n = P(i, v), p = H(e), w = j(a);
|
|
90
|
+
return r.useEffect(() => {
|
|
91
|
+
const s = i.current;
|
|
92
|
+
if (!s) return;
|
|
93
|
+
const S = window.HTMLInputElement.prototype, u = Object.getOwnPropertyDescriptor(
|
|
94
|
+
S,
|
|
95
|
+
"checked"
|
|
96
|
+
).set;
|
|
97
|
+
if (p !== e && u) {
|
|
98
|
+
const b = new Event("click", { bubbles: c });
|
|
99
|
+
u.call(s, e), s.dispatchEvent(b);
|
|
100
|
+
}
|
|
101
|
+
}, [p, e, c]), /* @__PURE__ */ m(
|
|
102
|
+
"input",
|
|
103
|
+
{
|
|
104
|
+
type: "checkbox",
|
|
105
|
+
"aria-hidden": !0,
|
|
106
|
+
defaultChecked: e,
|
|
107
|
+
...o,
|
|
108
|
+
tabIndex: -1,
|
|
109
|
+
ref: n,
|
|
110
|
+
style: {
|
|
111
|
+
...o.style,
|
|
112
|
+
...w,
|
|
113
|
+
position: "absolute",
|
|
114
|
+
pointerEvents: "none",
|
|
115
|
+
opacity: 0,
|
|
116
|
+
margin: 0
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
x.displayName = L;
|
|
123
|
+
function g(t) {
|
|
124
|
+
return t ? "checked" : "unchecked";
|
|
125
|
+
}
|
|
126
|
+
var Q = R, V = _;
|
|
127
|
+
export {
|
|
128
|
+
Q as Root,
|
|
129
|
+
R as Switch,
|
|
130
|
+
_ as SwitchThumb,
|
|
131
|
+
V as Thumb
|
|
132
|
+
};
|
package/dist/index79.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as m from "react";
|
|
2
|
+
import { createContextScope as $ } from "./index89.js";
|
|
3
|
+
import { Primitive as c } from "./index88.js";
|
|
4
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
var u = "Progress", d = 100, [I] = $(u), [h, R] = I(u), f = m.forwardRef(
|
|
6
|
+
(r, e) => {
|
|
7
|
+
const {
|
|
8
|
+
__scopeProgress: i,
|
|
9
|
+
value: o = null,
|
|
10
|
+
max: a,
|
|
11
|
+
getValueLabel: P = E,
|
|
12
|
+
...N
|
|
13
|
+
} = r;
|
|
14
|
+
(a || a === 0) && !v(a) && console.error(M(`${a}`, "Progress"));
|
|
15
|
+
const t = v(a) ? a : d;
|
|
16
|
+
o !== null && !p(o, t) && console.error(V(`${o}`, "Progress"));
|
|
17
|
+
const n = p(o, t) ? o : null, b = s(n) ? P(n, t) : void 0;
|
|
18
|
+
return /* @__PURE__ */ l(h, { scope: i, value: n, max: t, children: /* @__PURE__ */ l(
|
|
19
|
+
c.div,
|
|
20
|
+
{
|
|
21
|
+
"aria-valuemax": t,
|
|
22
|
+
"aria-valuemin": 0,
|
|
23
|
+
"aria-valuenow": s(n) ? n : void 0,
|
|
24
|
+
"aria-valuetext": b,
|
|
25
|
+
role: "progressbar",
|
|
26
|
+
"data-state": x(n, t),
|
|
27
|
+
"data-value": n ?? void 0,
|
|
28
|
+
"data-max": t,
|
|
29
|
+
...N,
|
|
30
|
+
ref: e
|
|
31
|
+
}
|
|
32
|
+
) });
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
f.displayName = u;
|
|
36
|
+
var g = "ProgressIndicator", _ = m.forwardRef(
|
|
37
|
+
(r, e) => {
|
|
38
|
+
const { __scopeProgress: i, ...o } = r, a = R(g, i);
|
|
39
|
+
return /* @__PURE__ */ l(
|
|
40
|
+
c.div,
|
|
41
|
+
{
|
|
42
|
+
"data-state": x(a.value, a.max),
|
|
43
|
+
"data-value": a.value ?? void 0,
|
|
44
|
+
"data-max": a.max,
|
|
45
|
+
...o,
|
|
46
|
+
ref: e
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
_.displayName = g;
|
|
52
|
+
function E(r, e) {
|
|
53
|
+
return `${Math.round(r / e * 100)}%`;
|
|
54
|
+
}
|
|
55
|
+
function x(r, e) {
|
|
56
|
+
return r == null ? "indeterminate" : r === e ? "complete" : "loading";
|
|
57
|
+
}
|
|
58
|
+
function s(r) {
|
|
59
|
+
return typeof r == "number";
|
|
60
|
+
}
|
|
61
|
+
function v(r) {
|
|
62
|
+
return s(r) && !isNaN(r) && r > 0;
|
|
63
|
+
}
|
|
64
|
+
function p(r, e) {
|
|
65
|
+
return s(r) && !isNaN(r) && r <= e && r >= 0;
|
|
66
|
+
}
|
|
67
|
+
function M(r, e) {
|
|
68
|
+
return `Invalid prop \`max\` of value \`${r}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${d}\`.`;
|
|
69
|
+
}
|
|
70
|
+
function V(r, e) {
|
|
71
|
+
return `Invalid prop \`value\` of value \`${r}\` supplied to \`${e}\`. The \`value\` prop must be:
|
|
72
|
+
- a positive number
|
|
73
|
+
- less than the value passed to \`max\` (or ${d} if no \`max\` prop is set)
|
|
74
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
75
|
+
|
|
76
|
+
Defaulting to \`null\`.`;
|
|
77
|
+
}
|
|
78
|
+
var D = f;
|
|
79
|
+
export {
|
|
80
|
+
f as Progress,
|
|
81
|
+
_ as ProgressIndicator,
|
|
82
|
+
D as Root
|
|
83
|
+
};
|
package/dist/index8.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cva as o } from "./index42.js";
|
|
3
|
+
import { cn as b } from "./index2.js";
|
|
4
|
+
const a = o(
|
|
5
|
+
"inline-flex items-center border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "border-[#00ff00] bg-[#00ff00] text-black shadow hover:bg-black hover:text-[#00ff00]",
|
|
10
|
+
secondary: "border-[#ff00ff] bg-[#ff00ff] text-black hover:bg-black hover:text-[#ff00ff]",
|
|
11
|
+
destructive: "border-[#ff0000] bg-[#ff0000] text-black shadow hover:bg-black hover:text-[#ff0000]",
|
|
12
|
+
outline: "text-foreground",
|
|
13
|
+
green: "border-[#00ff00] bg-[#00ff00] text-black hover:bg-black hover:text-[#00ff00]",
|
|
14
|
+
white: "border-white bg-white text-black hover:bg-black hover:text-white",
|
|
15
|
+
yellow: "border-[#ffff00] bg-[#ffff00] text-black hover:bg-black hover:text-[#ffff00]",
|
|
16
|
+
hotpink: "border-[#ff00ff] bg-[#ff00ff] text-black hover:bg-black hover:text-[#ff00ff]",
|
|
17
|
+
blue: "border-[#0000ff] bg-[#0000ff] text-white hover:bg-black hover:text-[#0000ff] hover:border-[#0000ff]"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
function n({ className: f, variant: e, ...t }) {
|
|
26
|
+
return /* @__PURE__ */ r("div", { className: b(a({ variant: e }), f), ...t });
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
n as Badge,
|
|
30
|
+
a as badgeVariants
|
|
31
|
+
};
|
package/dist/index80.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
3
|
+
function w(e, c) {
|
|
4
|
+
const o = u.createContext(c), a = (r) => {
|
|
5
|
+
const { children: t, ...n } = r, s = u.useMemo(() => n, Object.values(n));
|
|
6
|
+
return /* @__PURE__ */ h(o.Provider, { value: s, children: t });
|
|
7
|
+
};
|
|
8
|
+
a.displayName = e + "Provider";
|
|
9
|
+
function i(r) {
|
|
10
|
+
const t = u.useContext(o);
|
|
11
|
+
if (t) return t;
|
|
12
|
+
if (c !== void 0) return c;
|
|
13
|
+
throw new Error(`\`${r}\` must be used within \`${e}\``);
|
|
14
|
+
}
|
|
15
|
+
return [a, i];
|
|
16
|
+
}
|
|
17
|
+
function _(e, c = []) {
|
|
18
|
+
let o = [];
|
|
19
|
+
function a(r, t) {
|
|
20
|
+
const n = u.createContext(t), s = o.length;
|
|
21
|
+
o = [...o, t];
|
|
22
|
+
const p = (d) => {
|
|
23
|
+
var S;
|
|
24
|
+
const { scope: x, children: C, ...m } = d, v = ((S = x == null ? void 0 : x[e]) == null ? void 0 : S[s]) || n, P = u.useMemo(() => m, Object.values(m));
|
|
25
|
+
return /* @__PURE__ */ h(v.Provider, { value: P, children: C });
|
|
26
|
+
};
|
|
27
|
+
p.displayName = r + "Provider";
|
|
28
|
+
function f(d, x) {
|
|
29
|
+
var v;
|
|
30
|
+
const C = ((v = x == null ? void 0 : x[e]) == null ? void 0 : v[s]) || n, m = u.useContext(C);
|
|
31
|
+
if (m) return m;
|
|
32
|
+
if (t !== void 0) return t;
|
|
33
|
+
throw new Error(`\`${d}\` must be used within \`${r}\``);
|
|
34
|
+
}
|
|
35
|
+
return [p, f];
|
|
36
|
+
}
|
|
37
|
+
const i = () => {
|
|
38
|
+
const r = o.map((t) => u.createContext(t));
|
|
39
|
+
return function(n) {
|
|
40
|
+
const s = (n == null ? void 0 : n[e]) || r;
|
|
41
|
+
return u.useMemo(
|
|
42
|
+
() => ({ [`__scope${e}`]: { ...n, [e]: s } }),
|
|
43
|
+
[n, s]
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
return i.scopeName = e, [a, l(i, ...c)];
|
|
48
|
+
}
|
|
49
|
+
function l(...e) {
|
|
50
|
+
const c = e[0];
|
|
51
|
+
if (e.length === 1) return c;
|
|
52
|
+
const o = () => {
|
|
53
|
+
const a = e.map((i) => ({
|
|
54
|
+
useScope: i(),
|
|
55
|
+
scopeName: i.scopeName
|
|
56
|
+
}));
|
|
57
|
+
return function(r) {
|
|
58
|
+
const t = a.reduce((n, { useScope: s, scopeName: p }) => {
|
|
59
|
+
const d = s(r)[`__scope${p}`];
|
|
60
|
+
return { ...n, ...d };
|
|
61
|
+
}, {});
|
|
62
|
+
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: t }), [t]);
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
return o.scopeName = c.scopeName, o;
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
w as createContext,
|
|
69
|
+
_ as createContextScope
|
|
70
|
+
};
|
package/dist/index81.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import r from "react";
|
|
2
|
+
import { createContextScope as y } from "./index80.js";
|
|
3
|
+
import { useComposedRefs as M } from "./index82.js";
|
|
4
|
+
import { createSlot as x } from "./index99.js";
|
|
5
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
6
|
+
function g(s) {
|
|
7
|
+
const m = s + "CollectionProvider", [A, N] = y(m), [_, f] = A(
|
|
8
|
+
m,
|
|
9
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
10
|
+
), p = (c) => {
|
|
11
|
+
const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
|
|
12
|
+
return /* @__PURE__ */ u(_, { scope: e, itemMap: t, collectionRef: o, children: l });
|
|
13
|
+
};
|
|
14
|
+
p.displayName = m;
|
|
15
|
+
const a = s + "CollectionSlot", E = x(a), C = r.forwardRef(
|
|
16
|
+
(c, e) => {
|
|
17
|
+
const { scope: l, children: o } = c, t = f(a, l), n = M(e, t.collectionRef);
|
|
18
|
+
return /* @__PURE__ */ u(E, { ref: n, children: o });
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
C.displayName = a;
|
|
22
|
+
const d = s + "CollectionItemSlot", R = "data-radix-collection-item", T = x(d), I = r.forwardRef(
|
|
23
|
+
(c, e) => {
|
|
24
|
+
const { scope: l, children: o, ...t } = c, n = r.useRef(null), S = M(e, n), i = f(d, l);
|
|
25
|
+
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ u(T, { [R]: "", ref: S, children: o });
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
I.displayName = d;
|
|
29
|
+
function O(c) {
|
|
30
|
+
const e = f(s + "CollectionConsumer", c);
|
|
31
|
+
return r.useCallback(() => {
|
|
32
|
+
const o = e.collectionRef.current;
|
|
33
|
+
if (!o) return [];
|
|
34
|
+
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
|
35
|
+
return Array.from(e.itemMap.values()).sort(
|
|
36
|
+
(i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
|
|
37
|
+
);
|
|
38
|
+
}, [e.collectionRef, e.itemMap]);
|
|
39
|
+
}
|
|
40
|
+
return [
|
|
41
|
+
{ Provider: p, Slot: C, ItemSlot: I },
|
|
42
|
+
O,
|
|
43
|
+
N
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
g as createCollection
|
|
48
|
+
};
|
package/dist/index82.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
function l(n, o) {
|
|
3
|
+
if (typeof n == "function")
|
|
4
|
+
return n(o);
|
|
5
|
+
n != null && (n.current = o);
|
|
6
|
+
}
|
|
7
|
+
function i(...n) {
|
|
8
|
+
return (o) => {
|
|
9
|
+
let u = !1;
|
|
10
|
+
const c = n.map((t) => {
|
|
11
|
+
const e = l(t, o);
|
|
12
|
+
return !u && typeof e == "function" && (u = !0), e;
|
|
13
|
+
});
|
|
14
|
+
if (u)
|
|
15
|
+
return () => {
|
|
16
|
+
for (let t = 0; t < c.length; t++) {
|
|
17
|
+
const e = c[t];
|
|
18
|
+
typeof e == "function" ? e() : l(n[t], null);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function s(...n) {
|
|
24
|
+
return f.useCallback(i(...n), n);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
i as composeRefs,
|
|
28
|
+
s as useComposedRefs
|
|
29
|
+
};
|
package/dist/index83.js
ADDED
package/dist/index84.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { useLayoutEffect as v } from "./index91.js";
|
|
3
|
+
var E = n[" useInsertionEffect ".trim().toString()] || v;
|
|
4
|
+
function y({
|
|
5
|
+
prop: t,
|
|
6
|
+
defaultProp: u,
|
|
7
|
+
onChange: o = () => {
|
|
8
|
+
},
|
|
9
|
+
caller: i
|
|
10
|
+
}) {
|
|
11
|
+
const [l, e, r] = w({
|
|
12
|
+
defaultProp: u,
|
|
13
|
+
onChange: o
|
|
14
|
+
}), c = t !== void 0, a = c ? t : l;
|
|
15
|
+
{
|
|
16
|
+
const s = n.useRef(t !== void 0);
|
|
17
|
+
n.useEffect(() => {
|
|
18
|
+
const f = s.current;
|
|
19
|
+
f !== c && console.warn(
|
|
20
|
+
`${i} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "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
|
+
), s.current = c;
|
|
22
|
+
}, [c, i]);
|
|
23
|
+
}
|
|
24
|
+
const m = n.useCallback(
|
|
25
|
+
(s) => {
|
|
26
|
+
var f;
|
|
27
|
+
if (c) {
|
|
28
|
+
const d = R(s) ? s(t) : s;
|
|
29
|
+
d !== t && ((f = r.current) == null || f.call(r, d));
|
|
30
|
+
} else
|
|
31
|
+
e(s);
|
|
32
|
+
},
|
|
33
|
+
[c, t, e, r]
|
|
34
|
+
);
|
|
35
|
+
return [a, m];
|
|
36
|
+
}
|
|
37
|
+
function w({
|
|
38
|
+
defaultProp: t,
|
|
39
|
+
onChange: u
|
|
40
|
+
}) {
|
|
41
|
+
const [o, i] = n.useState(t), l = n.useRef(o), e = n.useRef(u);
|
|
42
|
+
return E(() => {
|
|
43
|
+
e.current = u;
|
|
44
|
+
}, [u]), n.useEffect(() => {
|
|
45
|
+
var r;
|
|
46
|
+
l.current !== o && ((r = e.current) == null || r.call(e, o), l.current = o);
|
|
47
|
+
}, [o, l]), [o, i, e];
|
|
48
|
+
}
|
|
49
|
+
function R(t) {
|
|
50
|
+
return typeof t == "function";
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
y as useControllableState
|
|
54
|
+
};
|
package/dist/index85.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import * as p from "react-dom";
|
|
3
|
+
import { createSlot as c } from "./index99.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
|
+
};
|
package/dist/index86.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { useLayoutEffect as a } from "./index91.js";
|
|
3
|
+
var s = o[" useId ".trim().toString()] || (() => {
|
|
4
|
+
}), f = 0;
|
|
5
|
+
function i(t) {
|
|
6
|
+
const [e, r] = o.useState(s());
|
|
7
|
+
return a(() => {
|
|
8
|
+
r((u) => u ?? String(f++));
|
|
9
|
+
}, [t]), t || (e ? `radix-${e}` : "");
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
i as useId
|
|
13
|
+
};
|
package/dist/index87.js
ADDED
package/dist/index88.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import "react-dom";
|
|
3
|
+
import { createSlot as l } from "./index50.js";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
var u = [
|
|
6
|
+
"a",
|
|
7
|
+
"button",
|
|
8
|
+
"div",
|
|
9
|
+
"form",
|
|
10
|
+
"h2",
|
|
11
|
+
"h3",
|
|
12
|
+
"img",
|
|
13
|
+
"input",
|
|
14
|
+
"label",
|
|
15
|
+
"li",
|
|
16
|
+
"nav",
|
|
17
|
+
"ol",
|
|
18
|
+
"p",
|
|
19
|
+
"select",
|
|
20
|
+
"span",
|
|
21
|
+
"svg",
|
|
22
|
+
"ul"
|
|
23
|
+
], w = u.reduce((t, i) => {
|
|
24
|
+
const o = l(`Primitive.${i}`), r = f.forwardRef((e, m) => {
|
|
25
|
+
const { asChild: a, ...p } = e, s = a ? o : i;
|
|
26
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(s, { ...p, ref: m });
|
|
27
|
+
});
|
|
28
|
+
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
29
|
+
}, {});
|
|
30
|
+
export {
|
|
31
|
+
w as Primitive
|
|
32
|
+
};
|
package/dist/index89.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
3
|
+
function $(e, x = []) {
|
|
4
|
+
let o = [];
|
|
5
|
+
function f(r, n) {
|
|
6
|
+
const t = i.createContext(n);
|
|
7
|
+
t.displayName = r + "Context";
|
|
8
|
+
const c = o.length;
|
|
9
|
+
o = [...o, n];
|
|
10
|
+
const m = (a) => {
|
|
11
|
+
var l;
|
|
12
|
+
const { scope: s, children: C, ...p } = a, d = ((l = s == null ? void 0 : s[e]) == null ? void 0 : l[c]) || t, v = i.useMemo(() => p, Object.values(p));
|
|
13
|
+
return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
|
|
14
|
+
};
|
|
15
|
+
m.displayName = r + "Provider";
|
|
16
|
+
function S(a, s) {
|
|
17
|
+
var d;
|
|
18
|
+
const C = ((d = s == null ? void 0 : s[e]) == null ? void 0 : d[c]) || t, p = i.useContext(C);
|
|
19
|
+
if (p) return p;
|
|
20
|
+
if (n !== void 0) return n;
|
|
21
|
+
throw new Error(`\`${a}\` must be used within \`${r}\``);
|
|
22
|
+
}
|
|
23
|
+
return [m, S];
|
|
24
|
+
}
|
|
25
|
+
const u = () => {
|
|
26
|
+
const r = o.map((n) => i.createContext(n));
|
|
27
|
+
return function(t) {
|
|
28
|
+
const c = (t == null ? void 0 : t[e]) || r;
|
|
29
|
+
return i.useMemo(
|
|
30
|
+
() => ({ [`__scope${e}`]: { ...t, [e]: c } }),
|
|
31
|
+
[t, c]
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
return u.scopeName = e, [f, h(u, ...x)];
|
|
36
|
+
}
|
|
37
|
+
function h(...e) {
|
|
38
|
+
const x = e[0];
|
|
39
|
+
if (e.length === 1) return x;
|
|
40
|
+
const o = () => {
|
|
41
|
+
const f = e.map((u) => ({
|
|
42
|
+
useScope: u(),
|
|
43
|
+
scopeName: u.scopeName
|
|
44
|
+
}));
|
|
45
|
+
return function(r) {
|
|
46
|
+
const n = f.reduce((t, { useScope: c, scopeName: m }) => {
|
|
47
|
+
const a = c(r)[`__scope${m}`];
|
|
48
|
+
return { ...t, ...a };
|
|
49
|
+
}, {});
|
|
50
|
+
return i.useMemo(() => ({ [`__scope${x.scopeName}`]: n }), [n]);
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
return o.scopeName = x.scopeName, o;
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
$ as createContextScope
|
|
57
|
+
};
|
package/dist/index9.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import * as b from "react";
|
|
3
|
+
import { Root as i } from "./index50.js";
|
|
4
|
+
import { cva as l } from "./index42.js";
|
|
5
|
+
import { cn as g } from "./index2.js";
|
|
6
|
+
const s = l(
|
|
7
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap font-mono font-bold uppercase tracking-wider transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-terminal-green focus-visible:ring-offset-2 focus-visible:ring-offset-black disabled:pointer-events-none disabled:opacity-30 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-terminal-green text-black border-2 border-terminal-green hover:bg-terminal-green/90 active:bg-terminal-green/80",
|
|
12
|
+
secondary: "bg-transparent text-terminal-magenta border-2 border-terminal-magenta hover:bg-terminal-magenta/10 active:bg-terminal-magenta/20",
|
|
13
|
+
destructive: "bg-transparent text-terminal-red border-2 border-terminal-red hover:bg-terminal-red/10 active:bg-terminal-red/20",
|
|
14
|
+
outline: "bg-transparent text-terminal-green border-2 border-terminal-green hover:bg-terminal-green/10 active:bg-terminal-green/20",
|
|
15
|
+
ghost: "bg-transparent text-terminal-green border-2 border-transparent hover:border-terminal-green/50 active:bg-terminal-green/10",
|
|
16
|
+
link: "bg-transparent text-terminal-green underline-offset-4 hover:underline border-none",
|
|
17
|
+
green: "bg-[#00ff00] text-black border-2 border-[#00ff00] hover:bg-black hover:text-[#00ff00]",
|
|
18
|
+
"green-outline": "bg-transparent text-[#00ff00] border-2 border-[#00ff00] hover:bg-[#00ff00] hover:text-black",
|
|
19
|
+
white: "bg-white text-black border-2 border-white hover:bg-black hover:text-white",
|
|
20
|
+
"white-outline": "bg-transparent text-white border-2 border-white hover:bg-white hover:text-black",
|
|
21
|
+
yellow: "bg-[#ffff00] text-black border-2 border-[#ffff00] hover:bg-black hover:text-[#ffff00]",
|
|
22
|
+
"yellow-outline": "bg-transparent text-[#ffff00] border-2 border-[#ffff00] hover:bg-[#ffff00] hover:text-black",
|
|
23
|
+
hotpink: "bg-[#ff00ff] text-black border-2 border-[#ff00ff] hover:bg-black hover:text-[#ff00ff]",
|
|
24
|
+
"hotpink-outline": "bg-transparent text-[#ff00ff] border-2 border-[#ff00ff] hover:bg-[#ff00ff] hover:text-black",
|
|
25
|
+
blue: "bg-[#0000ff] text-white border-2 border-[#0000ff] hover:bg-black hover:text-[#0000ff]",
|
|
26
|
+
"blue-outline": "bg-transparent text-[#0000ff] border-2 border-[#0000ff] hover:bg-[#0000ff] hover:text-white"
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
default: "h-11 px-6 py-3 text-sm",
|
|
30
|
+
sm: "h-9 px-4 py-2 text-xs",
|
|
31
|
+
lg: "h-14 px-10 py-4 text-base",
|
|
32
|
+
icon: "h-11 w-11"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
variant: "default",
|
|
37
|
+
size: "default"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
), d = b.forwardRef(
|
|
41
|
+
({ className: e, variant: r, size: t, asChild: n = !1, ...o }, a) => /* @__PURE__ */ f(
|
|
42
|
+
n ? i : "button",
|
|
43
|
+
{
|
|
44
|
+
className: g(s({ variant: r, size: t, className: e })),
|
|
45
|
+
ref: a,
|
|
46
|
+
...o
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
);
|
|
50
|
+
d.displayName = "Button";
|
|
51
|
+
export {
|
|
52
|
+
d as Button,
|
|
53
|
+
s as buttonVariants
|
|
54
|
+
};
|
package/dist/index90.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
function o(t) {
|
|
3
|
+
const e = r.useRef(t);
|
|
4
|
+
return r.useEffect(() => {
|
|
5
|
+
e.current = t;
|
|
6
|
+
}), r.useMemo(() => (...n) => {
|
|
7
|
+
var u;
|
|
8
|
+
return (u = e.current) == null ? void 0 : u.call(e, ...n);
|
|
9
|
+
}, []);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
o as useCallbackRef
|
|
13
|
+
};
|