@gears-frontx/ui-kit 0.4.0-alpha.4 → 0.4.0-alpha.6
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/README.md +1 -1
- package/dist/accordion.js +7 -7
- package/dist/alert-dialog.js +21 -21
- package/dist/alert.js +19 -19
- package/dist/attachment.js +11 -11
- package/dist/avatar.js +33 -33
- package/dist/badge.js +48 -25
- package/dist/badge.js.map +1 -1
- package/dist/bubble.js +38 -38
- package/dist/button-group.js +8 -8
- package/dist/button.js +40 -34
- package/dist/button.js.map +1 -1
- package/dist/calendar.js +30 -30
- package/dist/card.js +56 -33
- package/dist/card.js.map +1 -1
- package/dist/chart.js +183 -115
- package/dist/chart.js.map +1 -1
- package/dist/checkbox.js +12 -12
- package/dist/checkbox.js.map +1 -1
- package/dist/chunks/accordion.CXlSdkrc.css +1 -0
- package/dist/chunks/alert-dialog.C4aLtUC8.css +1 -0
- package/dist/chunks/alert.DsgRIXLn.css +1 -0
- package/dist/chunks/attachment.CZuZdlXC.css +1 -0
- package/dist/chunks/avatar.BMm-Z9l5.css +1 -0
- package/dist/chunks/badge.BCreEn3O.css +1 -0
- package/dist/chunks/bubble.Ccu0e3lY.css +1 -0
- package/dist/chunks/button-group.BB-_2uav.css +1 -0
- package/dist/chunks/button.DgUTlW0_.css +1 -0
- package/dist/chunks/calendar.Dtndav4F.css +1 -0
- package/dist/chunks/card.DdBl-usf.css +1 -0
- package/dist/chunks/checkbox.CrdIZhi1.css +1 -0
- package/dist/chunks/collapsible.BkLeBug_.css +1 -0
- package/dist/chunks/combobox.DZZ3tHP_.css +1 -0
- package/dist/chunks/command.BBW1Cy-M.css +1 -0
- package/dist/chunks/context-menu.D_HuTgqL.css +1 -0
- package/dist/chunks/data-table.DJJaM7bh.css +1 -0
- package/dist/chunks/dialog.Cpo8vChK.css +1 -0
- package/dist/chunks/drawer.D8l6-G8t.css +1 -0
- package/dist/chunks/dropdown-menu.TU3FHXbJ.css +1 -0
- package/dist/chunks/empty.DnAKlw2g.css +1 -0
- package/dist/chunks/field.CDoJmJUe.css +1 -0
- package/dist/chunks/hover-card.D00tbys5.css +1 -0
- package/dist/chunks/input-group.C7XgalVn.css +1 -0
- package/dist/chunks/input-otp.Dvxlngb4.css +1 -0
- package/dist/chunks/input.DORly3Cx.css +1 -0
- package/dist/chunks/{label.jrB9zD_G.css → label.s0Wrm1i-.css} +1 -1
- package/dist/chunks/{menubar.CxRNI9o4.css → menubar.CJcVQhPq.css} +1 -1
- package/dist/chunks/message.B9Rexp_f.css +1 -0
- package/dist/chunks/native-select.BosBdRAx.css +1 -0
- package/dist/chunks/navigation-menu.CuXMCPRN.css +1 -0
- package/dist/chunks/pagination.bFb5us_w.css +1 -0
- package/dist/chunks/popover.BYhwNKnZ.css +1 -0
- package/dist/chunks/progress.DjSEXfxh.css +1 -0
- package/dist/chunks/questionnaire.C-YTRjPE.css +1 -0
- package/dist/chunks/radio-group.CisvBT6g.css +1 -0
- package/dist/chunks/scroll-area.B0OVmDRX.css +1 -0
- package/dist/chunks/select.BFwI5rhI.css +1 -0
- package/dist/chunks/sheet.BWvXXyXk.css +1 -0
- package/dist/chunks/sidebar.DdEvMURX.css +1 -0
- package/dist/chunks/slider.inyNxx4y.css +1 -0
- package/dist/chunks/spinner.sH6x_1Uf.css +1 -0
- package/dist/chunks/status-dot.DWa2qGKe.css +1 -0
- package/dist/chunks/switch.D3_ZyuVP.css +1 -0
- package/dist/chunks/table.DR2nFT0x.css +1 -0
- package/dist/chunks/tabs.DFa0OYMo.css +1 -0
- package/dist/chunks/{textarea.ORRSI69B.css → textarea.DMphp0qh.css} +1 -1
- package/dist/chunks/toast.Dw-jW4YY.css +1 -0
- package/dist/chunks/toggle-group.BpWF6enM.css +1 -0
- package/dist/chunks/toggle.B82Id2zR.css +1 -0
- package/dist/chunks/tooltip.CFJyyz-O.css +1 -0
- package/dist/collapsible.js +7 -7
- package/dist/combobox.js +87 -87
- package/dist/command.js +28 -28
- package/dist/components/badge/badge.d.ts +5 -2
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/card/card.d.ts +10 -4
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/chart/chart.d.ts +7 -6
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +9 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/empty/empty.d.ts +11 -0
- package/dist/components/empty/empty.d.ts.map +1 -1
- package/dist/components/empty/public.d.ts +1 -1
- package/dist/components/empty/public.d.ts.map +1 -1
- package/dist/components/input-group/input-group.d.ts +5 -2
- package/dist/components/input-group/input-group.d.ts.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.d.ts +7 -2
- package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
- package/dist/components/pagination/pagination.d.ts +4 -6
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/spinner/spinner.d.ts +19 -3
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/status-dot/public.d.ts +2 -0
- package/dist/components/status-dot/public.d.ts.map +1 -0
- package/dist/components/status-dot/status-dot.d.ts +25 -0
- package/dist/components/status-dot/status-dot.d.ts.map +1 -0
- package/dist/components/table/table.d.ts +31 -5
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/tabs/tabs.d.ts +10 -2
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/toggle/toggle.d.ts +12 -2
- package/dist/components/toggle/toggle.d.ts.map +1 -1
- package/dist/components/toggle-group/toggle-group.d.ts +33 -4
- package/dist/components/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.d.ts +5 -8
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/context-menu.js +54 -54
- package/dist/data-table.js +41 -41
- package/dist/dialog.js +39 -39
- package/dist/docs/alert-dialog.md +1 -1
- package/dist/docs/avatar.md +3 -1
- package/dist/docs/badge.md +42 -14
- package/dist/docs/button.md +3 -2
- package/dist/docs/card.md +6 -0
- package/dist/docs/chart.md +20 -14
- package/dist/docs/checkbox.md +6 -0
- package/dist/docs/command.md +4 -0
- package/dist/docs/data-table.md +12 -7
- package/dist/docs/dialog.md +3 -2
- package/dist/docs/dropdown-menu.md +6 -0
- package/dist/docs/empty.md +44 -9
- package/dist/docs/input-group.md +23 -3
- package/dist/docs/navigation-menu.md +14 -5
- package/dist/docs/pagination.md +18 -15
- package/dist/docs/popover.md +6 -0
- package/dist/docs/progress.md +6 -0
- package/dist/docs/questionnaire.md +4 -2
- package/dist/docs/select.md +8 -4
- package/dist/docs/sheet.md +8 -7
- package/dist/docs/spinner.md +35 -5
- package/dist/docs/status-dot.md +77 -0
- package/dist/docs/table.md +69 -25
- package/dist/docs/tabs.md +22 -7
- package/dist/docs/toggle-group.md +68 -9
- package/dist/docs/toggle.md +7 -1
- package/dist/docs/tooltip.md +5 -9
- package/dist/drawer.js +53 -53
- package/dist/dropdown-menu.js +102 -89
- package/dist/dropdown-menu.js.map +1 -1
- package/dist/empty.js +31 -21
- package/dist/empty.js.map +1 -1
- package/dist/field.js +24 -24
- package/dist/hover-card.js +14 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +266 -261
- package/dist/index.js.map +1 -1
- package/dist/input-group.js +73 -50
- package/dist/input-group.js.map +1 -1
- package/dist/input-otp.js +3 -3
- package/dist/input.js +19 -19
- package/dist/label.js +1 -1
- package/dist/menubar.js +18 -18
- package/dist/message.js +11 -11
- package/dist/native-select.js +20 -20
- package/dist/navigation-menu.js +83 -64
- package/dist/navigation-menu.js.map +1 -1
- package/dist/pagination.js +39 -52
- package/dist/pagination.js.map +1 -1
- package/dist/popover.js +33 -31
- package/dist/popover.js.map +1 -1
- package/dist/progress.js +15 -15
- package/dist/questionnaire.js +72 -72
- package/dist/radio-group.js +7 -7
- package/dist/scroll-area.js +8 -8
- package/dist/select.js +82 -80
- package/dist/select.js.map +1 -1
- package/dist/sheet.js +46 -46
- package/dist/sidebar.js +130 -130
- package/dist/slider.js +14 -14
- package/dist/spinner.js +45 -13
- package/dist/spinner.js.map +1 -1
- package/dist/status-dot.d.ts +1 -0
- package/dist/status-dot.js +76 -0
- package/dist/status-dot.js.map +1 -0
- package/dist/switch.js +14 -14
- package/dist/table.js +221 -43
- package/dist/table.js.map +1 -1
- package/dist/tabs.js +44 -26
- package/dist/tabs.js.map +1 -1
- package/dist/textarea.js +5 -5
- package/dist/theme.css +222 -135
- package/dist/toast.js +26 -26
- package/dist/toggle-group.js +40 -25
- package/dist/toggle-group.js.map +1 -1
- package/dist/toggle.js +21 -11
- package/dist/toggle.js.map +1 -1
- package/dist/tooltip.js +37 -34
- package/dist/tooltip.js.map +1 -1
- package/llms.txt +26 -10
- package/package.json +1 -1
- package/dist/chunks/accordion.X_AK08Iv.css +0 -1
- package/dist/chunks/alert-dialog.B50f-Gsz.css +0 -1
- package/dist/chunks/alert.C5BedF7l.css +0 -1
- package/dist/chunks/attachment.GAZbWSyB.css +0 -1
- package/dist/chunks/avatar.DZUXl1ev.css +0 -1
- package/dist/chunks/badge.Bi22h20j.css +0 -1
- package/dist/chunks/bubble.DvN6QyQ1.css +0 -1
- package/dist/chunks/button-group.D0Ir-jbL.css +0 -1
- package/dist/chunks/button.DvAxXxKj.css +0 -1
- package/dist/chunks/calendar.Cnbv4EzY.css +0 -1
- package/dist/chunks/card.D3Ct_dza.css +0 -1
- package/dist/chunks/checkbox.CZfE_PkU.css +0 -1
- package/dist/chunks/collapsible.BQ-sU5sQ.css +0 -1
- package/dist/chunks/combobox.CtYpZAKB.css +0 -1
- package/dist/chunks/command.Km60IuqD.css +0 -1
- package/dist/chunks/context-menu.DwGCD0vN.css +0 -1
- package/dist/chunks/data-table.CtZdVSAU.css +0 -1
- package/dist/chunks/dialog.BxcZ12Gb.css +0 -1
- package/dist/chunks/drawer.BkS_qEHj.css +0 -1
- package/dist/chunks/dropdown-menu.C5TLD9JO.css +0 -1
- package/dist/chunks/empty.BlhsHrOz.css +0 -1
- package/dist/chunks/field.Ccqt897k.css +0 -1
- package/dist/chunks/hover-card.DmwvigMp.css +0 -1
- package/dist/chunks/input-group.CFIUP-Oh.css +0 -1
- package/dist/chunks/input-otp.XSpqyVij.css +0 -1
- package/dist/chunks/input.DvA_mTq8.css +0 -1
- package/dist/chunks/message.BhD5JDJK.css +0 -1
- package/dist/chunks/native-select.DF1QrNz4.css +0 -1
- package/dist/chunks/navigation-menu.C2JGHAKD.css +0 -1
- package/dist/chunks/pagination.DUiQuWla.css +0 -1
- package/dist/chunks/popover.fOvPrnsr.css +0 -1
- package/dist/chunks/progress.Bp13t8iw.css +0 -1
- package/dist/chunks/questionnaire.D-u_K3Co.css +0 -1
- package/dist/chunks/radio-group.CV3MBCsI.css +0 -1
- package/dist/chunks/scroll-area.C4kWMAsU.css +0 -1
- package/dist/chunks/select.iEwV-sfJ.css +0 -1
- package/dist/chunks/sheet.DALPg9vf.css +0 -1
- package/dist/chunks/sidebar.CGTQhfWG.css +0 -1
- package/dist/chunks/slider.B5nouD7J.css +0 -1
- package/dist/chunks/spinner.UKK4f1tu.css +0 -1
- package/dist/chunks/switch.CIW9Jr1x.css +0 -1
- package/dist/chunks/table.BpnQ6j85.css +0 -1
- package/dist/chunks/tabs.4MEFBvw-.css +0 -1
- package/dist/chunks/toast.uUtCEAiv.css +0 -1
- package/dist/chunks/toggle-group.Bd0cCCnV.css +0 -1
- package/dist/chunks/toggle.B9tvfl1n.css +0 -1
- package/dist/chunks/tooltip.apA3VWHJ.css +0 -1
package/dist/context-menu.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { ContextMenu as
|
|
4
|
-
import { cx as s, cva as
|
|
5
|
-
import { CheckIcon as
|
|
6
|
-
import { useContext as h, createContext as
|
|
7
|
-
import './chunks/context-menu.
|
|
8
|
-
trigger:
|
|
9
|
-
positioner:
|
|
10
|
-
popup:
|
|
11
|
-
subPopup:
|
|
12
|
-
label:
|
|
13
|
-
item:
|
|
14
|
-
checkboxItem:
|
|
15
|
-
radioItem:
|
|
16
|
-
subTrigger:
|
|
2
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { ContextMenu as o } from "@base-ui/react/context-menu";
|
|
4
|
+
import { cx as s, cva as C } from "class-variance-authority";
|
|
5
|
+
import { CheckIcon as x, ChevronRightIcon as f } from "lucide-react";
|
|
6
|
+
import { useContext as h, createContext as M } from "react";
|
|
7
|
+
import './chunks/context-menu.D_HuTgqL.css';const N = "_trigger_trvxp_7", T = "_positioner_trvxp_27", k = "_popup_trvxp_7", D = "_subPopup_trvxp_12", P = "_label_trvxp_134", R = "_item_trvxp_131", S = "_checkboxItem_trvxp_131", G = "_radioItem_trvxp_131", j = "_subTrigger_trvxp_132", L = "_variantDefault_trvxp_194", V = "_variantDestructive_trvxp_206", y = "_itemIndicator_trvxp_248", $ = "_separator_trvxp_259", q = "_shortcut_trvxp_266", w = "_subTriggerIcon_trvxp_324", z = "_svgIcon_trvxp_331", n = {
|
|
8
|
+
trigger: N,
|
|
9
|
+
positioner: T,
|
|
10
|
+
popup: k,
|
|
11
|
+
subPopup: D,
|
|
12
|
+
label: P,
|
|
13
|
+
item: R,
|
|
14
|
+
checkboxItem: S,
|
|
15
|
+
radioItem: G,
|
|
16
|
+
subTrigger: j,
|
|
17
17
|
variantDefault: L,
|
|
18
18
|
variantDestructive: V,
|
|
19
19
|
itemIndicator: y,
|
|
@@ -21,11 +21,11 @@ import './chunks/context-menu.DwGCD0vN.css';const j = "_trigger_1klej_7", M = "_
|
|
|
21
21
|
shortcut: q,
|
|
22
22
|
subTriggerIcon: w,
|
|
23
23
|
svgIcon: z
|
|
24
|
-
}, _ =
|
|
24
|
+
}, _ = M(
|
|
25
25
|
void 0
|
|
26
|
-
), O =
|
|
26
|
+
), O = o.Root;
|
|
27
27
|
function Q({ className: t, ...e }) {
|
|
28
|
-
return /* @__PURE__ */ o
|
|
28
|
+
return /* @__PURE__ */ r(o.Trigger, { className: s(n.trigger, t), ...e });
|
|
29
29
|
}
|
|
30
30
|
function A({
|
|
31
31
|
className: t,
|
|
@@ -34,34 +34,34 @@ function A({
|
|
|
34
34
|
side: i = "right",
|
|
35
35
|
sideOffset: c = 0,
|
|
36
36
|
align: u = "start",
|
|
37
|
-
alignOffset:
|
|
38
|
-
positionMethod:
|
|
39
|
-
collisionBoundary:
|
|
40
|
-
collisionPadding:
|
|
41
|
-
...
|
|
37
|
+
alignOffset: l = 4,
|
|
38
|
+
positionMethod: v,
|
|
39
|
+
collisionBoundary: g,
|
|
40
|
+
collisionPadding: d,
|
|
41
|
+
...I
|
|
42
42
|
}) {
|
|
43
|
-
const
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
|
|
43
|
+
const b = h(_), m = a ?? b;
|
|
44
|
+
return /* @__PURE__ */ r(_.Provider, { value: m, children: /* @__PURE__ */ r(o.Portal, { container: m, children: /* @__PURE__ */ r(
|
|
45
|
+
o.Positioner,
|
|
46
46
|
{
|
|
47
47
|
side: i,
|
|
48
48
|
sideOffset: c,
|
|
49
49
|
align: u,
|
|
50
|
-
alignOffset:
|
|
51
|
-
positionMethod:
|
|
52
|
-
collisionBoundary:
|
|
53
|
-
collisionPadding:
|
|
50
|
+
alignOffset: l,
|
|
51
|
+
positionMethod: v,
|
|
52
|
+
collisionBoundary: g,
|
|
53
|
+
collisionPadding: d,
|
|
54
54
|
className: n.positioner,
|
|
55
|
-
children: /* @__PURE__ */ o
|
|
55
|
+
children: /* @__PURE__ */ r(o.Popup, { className: s(n.popup, t), ...I, children: e })
|
|
56
56
|
}
|
|
57
57
|
) }) });
|
|
58
58
|
}
|
|
59
59
|
function U({ className: t, ...e }) {
|
|
60
|
-
return /* @__PURE__ */ o
|
|
60
|
+
return /* @__PURE__ */ r(o.Group, { className: t, ...e });
|
|
61
61
|
}
|
|
62
62
|
function W({ className: t, inset: e, ...a }) {
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
|
|
63
|
+
return /* @__PURE__ */ r(
|
|
64
|
+
o.GroupLabel,
|
|
65
65
|
{
|
|
66
66
|
"data-inset": e,
|
|
67
67
|
className: s(n.label, t),
|
|
@@ -69,7 +69,7 @@ function W({ className: t, inset: e, ...a }) {
|
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
|
-
const B =
|
|
72
|
+
const B = C(n.item, {
|
|
73
73
|
variants: {
|
|
74
74
|
variant: {
|
|
75
75
|
default: n.variantDefault,
|
|
@@ -81,8 +81,8 @@ const B = v(n.item, {
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
function X({ className: t, variant: e, inset: a, ...i }) {
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
|
|
84
|
+
return /* @__PURE__ */ r(
|
|
85
|
+
o.Item,
|
|
86
86
|
{
|
|
87
87
|
"data-inset": a,
|
|
88
88
|
className: B({ variant: e, className: t }),
|
|
@@ -96,21 +96,21 @@ function Y({
|
|
|
96
96
|
inset: a,
|
|
97
97
|
...i
|
|
98
98
|
}) {
|
|
99
|
-
return /* @__PURE__ */
|
|
100
|
-
|
|
99
|
+
return /* @__PURE__ */ p(
|
|
100
|
+
o.CheckboxItem,
|
|
101
101
|
{
|
|
102
102
|
"data-inset": a,
|
|
103
103
|
className: s(n.checkboxItem, t),
|
|
104
104
|
...i,
|
|
105
105
|
children: [
|
|
106
|
-
/* @__PURE__ */ o
|
|
106
|
+
/* @__PURE__ */ r(o.CheckboxItemIndicator, { className: n.itemIndicator, children: /* @__PURE__ */ r(x, { className: n.svgIcon }) }),
|
|
107
107
|
e
|
|
108
108
|
]
|
|
109
109
|
}
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
112
|
function Z({ className: t, ...e }) {
|
|
113
|
-
return /* @__PURE__ */ o
|
|
113
|
+
return /* @__PURE__ */ r(o.RadioGroup, { className: t, ...e });
|
|
114
114
|
}
|
|
115
115
|
function tt({
|
|
116
116
|
className: t,
|
|
@@ -118,41 +118,41 @@ function tt({
|
|
|
118
118
|
inset: a,
|
|
119
119
|
...i
|
|
120
120
|
}) {
|
|
121
|
-
return /* @__PURE__ */
|
|
122
|
-
|
|
121
|
+
return /* @__PURE__ */ p(
|
|
122
|
+
o.RadioItem,
|
|
123
123
|
{
|
|
124
124
|
"data-inset": a,
|
|
125
125
|
className: s(n.radioItem, t),
|
|
126
126
|
...i,
|
|
127
127
|
children: [
|
|
128
|
-
/* @__PURE__ */ o
|
|
128
|
+
/* @__PURE__ */ r(o.RadioItemIndicator, { className: n.itemIndicator, children: /* @__PURE__ */ r(x, { className: n.svgIcon }) }),
|
|
129
129
|
e
|
|
130
130
|
]
|
|
131
131
|
}
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
134
|
function et({ className: t, ...e }) {
|
|
135
|
-
return /* @__PURE__ */ o
|
|
135
|
+
return /* @__PURE__ */ r(o.Separator, { className: s(n.separator, t), ...e });
|
|
136
136
|
}
|
|
137
137
|
function nt({ className: t, ...e }) {
|
|
138
|
-
return /* @__PURE__ */
|
|
138
|
+
return /* @__PURE__ */ r("span", { className: s(n.shortcut, t), ...e });
|
|
139
139
|
}
|
|
140
|
-
const
|
|
141
|
-
function
|
|
140
|
+
const rt = o.SubmenuRoot;
|
|
141
|
+
function ot({
|
|
142
142
|
className: t,
|
|
143
143
|
inset: e,
|
|
144
144
|
children: a,
|
|
145
145
|
...i
|
|
146
146
|
}) {
|
|
147
|
-
return /* @__PURE__ */
|
|
148
|
-
|
|
147
|
+
return /* @__PURE__ */ p(
|
|
148
|
+
o.SubmenuTrigger,
|
|
149
149
|
{
|
|
150
150
|
"data-inset": e,
|
|
151
151
|
className: s(n.subTrigger, t),
|
|
152
152
|
...i,
|
|
153
153
|
children: [
|
|
154
154
|
a,
|
|
155
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ r(f, { className: s(n.svgIcon, n.subTriggerIcon) })
|
|
156
156
|
]
|
|
157
157
|
}
|
|
158
158
|
);
|
|
@@ -170,7 +170,7 @@ function at({
|
|
|
170
170
|
alignOffset: c = 4,
|
|
171
171
|
...u
|
|
172
172
|
}) {
|
|
173
|
-
return /* @__PURE__ */
|
|
173
|
+
return /* @__PURE__ */ r(
|
|
174
174
|
A,
|
|
175
175
|
{
|
|
176
176
|
className: s(n.subPopup, t),
|
|
@@ -193,9 +193,9 @@ export {
|
|
|
193
193
|
tt as ContextMenuRadioItem,
|
|
194
194
|
et as ContextMenuSeparator,
|
|
195
195
|
nt as ContextMenuShortcut,
|
|
196
|
-
|
|
196
|
+
rt as ContextMenuSub,
|
|
197
197
|
at as ContextMenuSubContent,
|
|
198
|
-
|
|
198
|
+
ot as ContextMenuSubTrigger,
|
|
199
199
|
Q as ContextMenuTrigger
|
|
200
200
|
};
|
|
201
201
|
//# sourceMappingURL=context-menu.js.map
|
package/dist/data-table.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useTable as N, createColumnHelper as
|
|
4
|
-
import { cx as
|
|
5
|
-
import { ArrowUpDownIcon as
|
|
2
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useTable as N, createColumnHelper as F, tableFeatures as M, rowPaginationFeature as k, rowSortingFeature as A, rowSelectionFeature as H, createPaginatedRowModel as D, createSortedRowModel as j } from "@tanstack/react-table";
|
|
4
|
+
import { cx as w } from "class-variance-authority";
|
|
5
|
+
import { ArrowUpDownIcon as $ } from "lucide-react";
|
|
6
6
|
import { useState as d } from "react";
|
|
7
|
-
import { Table as
|
|
7
|
+
import { Table as z, TableHeader as U, TableRow as g, TableHead as q, TableBody as E, TableCell as p } from "./table.js";
|
|
8
8
|
import { Button as u } from "./button.js";
|
|
9
9
|
import { Checkbox as C } from "./checkbox.js";
|
|
10
|
-
import './chunks/data-table.
|
|
10
|
+
import './chunks/data-table.DJJaM7bh.css';const G = "_wrapper_c72nh_34", J = "_sortButton_c72nh_62", K = "_sortButtonInner_c72nh_85", L = "_sortIcon_c72nh_100", O = "_emptyCell_c72nh_108", Q = "_footer_c72nh_124", V = "_selectedCount_c72nh_136", W = "_paginationControls_c72nh_143", a = {
|
|
11
11
|
wrapper: G,
|
|
12
12
|
sortButton: J,
|
|
13
13
|
sortButtonInner: K,
|
|
@@ -16,17 +16,17 @@ import './chunks/data-table.CtZdVSAU.css';const G = "_wrapper_1xzb3_35", J = "_s
|
|
|
16
16
|
footer: Q,
|
|
17
17
|
selectedCount: V,
|
|
18
18
|
paginationControls: W
|
|
19
|
-
}, X =
|
|
20
|
-
rowSelectionFeature:
|
|
21
|
-
rowSortingFeature:
|
|
22
|
-
rowPaginationFeature:
|
|
23
|
-
sortedRowModel:
|
|
24
|
-
paginatedRowModel:
|
|
19
|
+
}, X = M({
|
|
20
|
+
rowSelectionFeature: H,
|
|
21
|
+
rowSortingFeature: A,
|
|
22
|
+
rowPaginationFeature: k,
|
|
23
|
+
sortedRowModel: j(),
|
|
24
|
+
paginatedRowModel: D()
|
|
25
25
|
});
|
|
26
26
|
function Y() {
|
|
27
|
-
return
|
|
27
|
+
return F();
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function ce({
|
|
30
30
|
selectAllLabel: n = "Select all",
|
|
31
31
|
selectRowLabel: r = "Select row"
|
|
32
32
|
} = {}) {
|
|
@@ -52,7 +52,7 @@ function ie({
|
|
|
52
52
|
enableSorting: !1
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function ie({
|
|
56
56
|
column: n,
|
|
57
57
|
children: r,
|
|
58
58
|
className: t
|
|
@@ -63,11 +63,11 @@ function ce({
|
|
|
63
63
|
type: "button",
|
|
64
64
|
variant: "ghost",
|
|
65
65
|
size: "sm",
|
|
66
|
-
className:
|
|
66
|
+
className: w(a.sortButton, t),
|
|
67
67
|
onClick: () => n.toggleSorting(n.getIsSorted() === "asc"),
|
|
68
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ i("span", { className: a.sortButtonInner, children: [
|
|
69
69
|
r,
|
|
70
|
-
/* @__PURE__ */ e(
|
|
70
|
+
/* @__PURE__ */ e($, { className: a.sortIcon })
|
|
71
71
|
] })
|
|
72
72
|
}
|
|
73
73
|
);
|
|
@@ -80,14 +80,14 @@ function de({
|
|
|
80
80
|
data: r,
|
|
81
81
|
pageSize: t = 10,
|
|
82
82
|
enableRowSelection: s = !1,
|
|
83
|
-
emptyMessage:
|
|
84
|
-
previousLabel:
|
|
85
|
-
nextLabel:
|
|
86
|
-
selectionSummary:
|
|
87
|
-
className:
|
|
83
|
+
emptyMessage: S = "No results.",
|
|
84
|
+
previousLabel: f = "Previous",
|
|
85
|
+
nextLabel: _ = "Next",
|
|
86
|
+
selectionSummary: b = Z,
|
|
87
|
+
className: I
|
|
88
88
|
}) {
|
|
89
|
-
const [
|
|
90
|
-
t !== v && (B(t),
|
|
89
|
+
const [P, R] = d([]), [x, y] = d({}), [T, h] = d({ pageIndex: 0, pageSize: t }), [v, B] = d(t);
|
|
90
|
+
t !== v && (B(t), h((l) => ({
|
|
91
91
|
pageSize: t,
|
|
92
92
|
pageIndex: Math.max(0, Math.floor(l.pageIndex * l.pageSize / t))
|
|
93
93
|
})));
|
|
@@ -96,15 +96,15 @@ function de({
|
|
|
96
96
|
data: r,
|
|
97
97
|
columns: n,
|
|
98
98
|
enableRowSelection: s,
|
|
99
|
-
onSortingChange:
|
|
99
|
+
onSortingChange: R,
|
|
100
100
|
onRowSelectionChange: y,
|
|
101
|
-
onPaginationChange:
|
|
101
|
+
onPaginationChange: h,
|
|
102
102
|
state: {
|
|
103
|
-
sorting:
|
|
104
|
-
rowSelection:
|
|
103
|
+
sorting: P,
|
|
104
|
+
rowSelection: x,
|
|
105
105
|
pagination: T
|
|
106
106
|
}
|
|
107
|
-
}),
|
|
107
|
+
}), m = o.getRowModel().rows;
|
|
108
108
|
return (
|
|
109
109
|
/*
|
|
110
110
|
* One card, not the recipe's card-plus-detached-footer: the Studio Data
|
|
@@ -114,17 +114,17 @@ function de({
|
|
|
114
114
|
* — it was the outer div's before, and the outer div only existed to
|
|
115
115
|
* hold the footer outside.
|
|
116
116
|
*/
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
/* @__PURE__ */ e(U, { children: o.getHeaderGroups().map((l) => /* @__PURE__ */ e(g, { children: l.headers.map((
|
|
120
|
-
/* @__PURE__ */ e(E, { children:
|
|
117
|
+
/* @__PURE__ */ i("div", { className: w(a.wrapper, I), children: [
|
|
118
|
+
/* @__PURE__ */ i(z, { children: [
|
|
119
|
+
/* @__PURE__ */ e(U, { children: o.getHeaderGroups().map((l) => /* @__PURE__ */ e(g, { children: l.headers.map((c) => /* @__PURE__ */ e(q, { children: c.isPlaceholder ? null : /* @__PURE__ */ e(o.FlexRender, { header: c }) }, c.id)) }, l.id)) }),
|
|
120
|
+
/* @__PURE__ */ e(E, { children: m.length ? m.map((l) => /* @__PURE__ */ e(g, { "data-state": l.getIsSelected() ? "selected" : void 0, children: l.getAllCells().map((c) => /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(o.FlexRender, { cell: c }) }, c.id)) }, l.id)) : /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(p, { colSpan: n.length, className: a.emptyCell, children: S }) }) })
|
|
121
121
|
] }),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
s && /* @__PURE__ */ e("div", { className: a.selectedCount, children:
|
|
122
|
+
/* @__PURE__ */ i("div", { className: a.footer, children: [
|
|
123
|
+
s && /* @__PURE__ */ e("div", { className: a.selectedCount, children: b(
|
|
124
124
|
o.getFilteredSelectedRowModel().rows.length,
|
|
125
125
|
o.getFilteredRowModel().rows.length
|
|
126
126
|
) }),
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ i("div", { className: a.paginationControls, children: [
|
|
128
128
|
/* @__PURE__ */ e(
|
|
129
129
|
u,
|
|
130
130
|
{
|
|
@@ -133,7 +133,7 @@ function de({
|
|
|
133
133
|
size: "sm",
|
|
134
134
|
onClick: () => o.previousPage(),
|
|
135
135
|
disabled: !o.getCanPreviousPage(),
|
|
136
|
-
children:
|
|
136
|
+
children: f
|
|
137
137
|
}
|
|
138
138
|
),
|
|
139
139
|
/* @__PURE__ */ e(
|
|
@@ -144,7 +144,7 @@ function de({
|
|
|
144
144
|
size: "sm",
|
|
145
145
|
onClick: () => o.nextPage(),
|
|
146
146
|
disabled: !o.getCanNextPage(),
|
|
147
|
-
children:
|
|
147
|
+
children: _
|
|
148
148
|
}
|
|
149
149
|
)
|
|
150
150
|
] })
|
|
@@ -154,9 +154,9 @@ function de({
|
|
|
154
154
|
}
|
|
155
155
|
export {
|
|
156
156
|
de as DataTable,
|
|
157
|
-
|
|
157
|
+
ie as DataTableSortButton,
|
|
158
158
|
Y as dataTableColumnHelper,
|
|
159
159
|
X as dataTableFeatures,
|
|
160
|
-
|
|
160
|
+
ce as dataTableSelectionColumn
|
|
161
161
|
};
|
|
162
162
|
//# sourceMappingURL=data-table.js.map
|
package/dist/dialog.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { Dialog as
|
|
2
|
+
import { Dialog as r } from "@base-ui/react/dialog";
|
|
3
3
|
import { cx as s } from "class-variance-authority";
|
|
4
|
-
import { XIcon as
|
|
5
|
-
import { Button as
|
|
6
|
-
import './chunks/dialog.
|
|
7
|
-
backdrop:
|
|
8
|
-
popup:
|
|
9
|
-
closeButton:
|
|
10
|
-
header:
|
|
11
|
-
footer:
|
|
12
|
-
title:
|
|
13
|
-
description:
|
|
14
|
-
svgIcon:
|
|
15
|
-
},
|
|
16
|
-
function T({ className: o, ...t }) {
|
|
17
|
-
return /* @__PURE__ */ e(n.Trigger, { className: o, ...t });
|
|
18
|
-
}
|
|
4
|
+
import { XIcon as d } from "lucide-react";
|
|
5
|
+
import { Button as g } from "./button.js";
|
|
6
|
+
import './chunks/dialog.Cpo8vChK.css';const m = "_backdrop_135ow_6", f = "_popup_135ow_22", D = "_closeButton_135ow_164", w = "_header_135ow_152", N = "_footer_135ow_152", h = "_title_135ow_274", v = "_description_135ow_282", B = "_svgIcon_135ow_289", n = {
|
|
7
|
+
backdrop: m,
|
|
8
|
+
popup: f,
|
|
9
|
+
closeButton: D,
|
|
10
|
+
header: w,
|
|
11
|
+
footer: N,
|
|
12
|
+
title: h,
|
|
13
|
+
description: v,
|
|
14
|
+
svgIcon: B
|
|
15
|
+
}, T = r.Root;
|
|
19
16
|
function j({ className: o, ...t }) {
|
|
20
|
-
return /* @__PURE__ */ e(
|
|
17
|
+
return /* @__PURE__ */ e(r.Trigger, { className: o, ...t });
|
|
18
|
+
}
|
|
19
|
+
function P({ className: o, ...t }) {
|
|
20
|
+
return /* @__PURE__ */ e(r.Close, { className: o, ...t });
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function y({
|
|
23
23
|
className: o,
|
|
24
24
|
children: t,
|
|
25
25
|
container: c,
|
|
@@ -27,43 +27,43 @@ function P({
|
|
|
27
27
|
showBackdrop: l = !0,
|
|
28
28
|
closeLabel: p = "Close",
|
|
29
29
|
size: u = "default",
|
|
30
|
-
...
|
|
30
|
+
..._
|
|
31
31
|
}) {
|
|
32
|
-
return /* @__PURE__ */ i(
|
|
33
|
-
l && /* @__PURE__ */ e(
|
|
34
|
-
/* @__PURE__ */ i(
|
|
32
|
+
return /* @__PURE__ */ i(r.Portal, { container: c, children: [
|
|
33
|
+
l && /* @__PURE__ */ e(r.Backdrop, { className: n.backdrop }),
|
|
34
|
+
/* @__PURE__ */ i(r.Popup, { "data-size": u, className: s(n.popup, o), ..._, children: [
|
|
35
35
|
t,
|
|
36
36
|
a && /* @__PURE__ */ e(
|
|
37
|
-
|
|
37
|
+
r.Close,
|
|
38
38
|
{
|
|
39
39
|
"aria-label": p,
|
|
40
|
-
className:
|
|
41
|
-
render: /* @__PURE__ */ e(
|
|
40
|
+
className: n.closeButton,
|
|
41
|
+
render: /* @__PURE__ */ e(g, { variant: "ghost", icon: /* @__PURE__ */ e(d, { className: n.svgIcon }) })
|
|
42
42
|
}
|
|
43
43
|
)
|
|
44
44
|
] })
|
|
45
45
|
] });
|
|
46
46
|
}
|
|
47
|
+
function z({ className: o, ...t }) {
|
|
48
|
+
return /* @__PURE__ */ e("div", { className: s(n.header, o), ...t });
|
|
49
|
+
}
|
|
47
50
|
function F({ className: o, ...t }) {
|
|
48
|
-
return /* @__PURE__ */ e("div", { className: s(
|
|
51
|
+
return /* @__PURE__ */ e("div", { className: s(n.footer, o), ...t });
|
|
49
52
|
}
|
|
50
53
|
function H({ className: o, ...t }) {
|
|
51
|
-
return /* @__PURE__ */ e(
|
|
54
|
+
return /* @__PURE__ */ e(r.Title, { className: s(n.title, o), ...t });
|
|
52
55
|
}
|
|
53
56
|
function R({ className: o, ...t }) {
|
|
54
|
-
return /* @__PURE__ */ e(
|
|
55
|
-
}
|
|
56
|
-
function X({ className: o, ...t }) {
|
|
57
|
-
return /* @__PURE__ */ e(n.Description, { className: s(r.description, o), ...t });
|
|
57
|
+
return /* @__PURE__ */ e(r.Description, { className: s(n.description, o), ...t });
|
|
58
58
|
}
|
|
59
59
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
T as Dialog,
|
|
61
|
+
P as DialogClose,
|
|
62
|
+
y as DialogContent,
|
|
63
|
+
R as DialogDescription,
|
|
64
|
+
F as DialogFooter,
|
|
65
|
+
z as DialogHeader,
|
|
66
|
+
H as DialogTitle,
|
|
67
|
+
j as DialogTrigger
|
|
68
68
|
};
|
|
69
69
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -37,7 +37,7 @@ is no `modal={false}` escape hatch (unlike `Dialog`).
|
|
|
37
37
|
| Prop | Type | Default |
|
|
38
38
|
|------|------|---------|
|
|
39
39
|
| `size` | `'default' \| 'sm'` — `sm` narrows the max width and stacks `AlertDialogCancel`/`AlertDialogAction` into two equal columns instead of a row | `'default'` |
|
|
40
|
-
| `showBackdrop` | `boolean`
|
|
40
|
+
| `showBackdrop` | `boolean` - renders the dimming backdrop (`--overlay-modal`, the same dark scrim in both themes) | `true` |
|
|
41
41
|
| `container` | DOM node to portal the popup into | `<body>` |
|
|
42
42
|
| `initialFocus` / `finalFocus` | `boolean \| RefObject \| function` — see Base UI Dialog.Popup | default focus behavior |
|
|
43
43
|
| `className` | `string` — merged after the kit class | — |
|
package/dist/docs/avatar.md
CHANGED
|
@@ -92,7 +92,9 @@ Plus all native `<div>` props. It takes the same fill matrix as
|
|
|
92
92
|
`AvatarFallback` so a "+3" chip can match the toned members it caps off.
|
|
93
93
|
It takes no `size` prop — it sizes itself off its sibling `Avatar`s' `size`
|
|
94
94
|
inside the same `AvatarGroup` (via a CSS `:has()` selector), because size
|
|
95
|
-
is a property of the group while tone is a choice about this one chip.
|
|
95
|
+
is a property of the group while tone is a choice about this one chip. The
|
|
96
|
+
circle matches the group (24 / 32 / 40) and the icon steps with it (16 at
|
|
97
|
+
the two smaller sizes, 20 at `lg`); the label stays at 14 throughout.
|
|
96
98
|
|
|
97
99
|
## Examples
|
|
98
100
|
|
package/dist/docs/badge.md
CHANGED
|
@@ -6,20 +6,28 @@ Base UI primitive — it's a styled `span`, plus a `render` prop (via Base
|
|
|
6
6
|
UI's `useRender`/`mergeProps` utilities) for the one case that needs it:
|
|
7
7
|
rendering as a link.
|
|
8
8
|
|
|
9
|
-
Badge
|
|
9
|
+
Badge has two axes and one flag. `variant` is **paint only**, `size` is
|
|
10
|
+
**geometry only** (18 or 20 px tall), and `dot` adds the drawn 6px status
|
|
11
|
+
dot ahead of the label, in whatever tone the variant already paints the
|
|
12
|
+
label.
|
|
13
|
+
|
|
14
|
+
The `variant` axis carries two groups on one axis:
|
|
10
15
|
|
|
11
16
|
- **Upstream paint** — `default`, `secondary`, `destructive`, `outline`,
|
|
12
17
|
`ghost`, `link`: the same six names and the same meaning as
|
|
13
|
-
[Button](button.md)'s.
|
|
18
|
+
[Button](button.md)'s. `destructive` is a tint of `--destructive` under
|
|
19
|
+
a `--destructive` label, the identical recipe Button carries.
|
|
20
|
+
- **Category** - `category`: a 1px ring and label in `--primary` over a
|
|
21
|
+
tint of the same blue, the drawn chip for a category tag.
|
|
14
22
|
- **Tone** — `success`, `warning`, `danger`, `info`, `accent`: a soft
|
|
15
23
|
tinted fill with the tone's own color as the label, matching the Studio
|
|
16
24
|
design's Badge row. Its sixth specimen, Neutral, is `secondary` — that
|
|
17
25
|
variant already paints the drawn pair exactly, so there is no separate
|
|
18
26
|
`neutral` name.
|
|
19
27
|
|
|
20
|
-
Note that `destructive` and `danger` are both present on purpose:
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
Note that `destructive` and `danger` are both present on purpose: a tint
|
|
29
|
+
of `--destructive` under a `--destructive` label, and a `--danger-soft`
|
|
30
|
+
fill under a `--danger` label. Two names for one red, one per role.
|
|
23
31
|
|
|
24
32
|
A tone is still paint, not state: it colors a label, it does not track
|
|
25
33
|
one. Badge's five tones (`success`, `warning`, `danger`, `info`, `accent`)
|
|
@@ -27,13 +35,14 @@ are the semantic-ish colors available — pick the one that best matches the
|
|
|
27
35
|
status, but keep the label text itself explicit; color alone is not a
|
|
28
36
|
substitute for a state machine.
|
|
29
37
|
|
|
30
|
-
> **Accessibility of tones.** At Badge's
|
|
31
|
-
> 4.5:1, and
|
|
32
|
-
>
|
|
33
|
-
>
|
|
34
|
-
>
|
|
35
|
-
>
|
|
36
|
-
>
|
|
38
|
+
> **Accessibility of tones.** At Badge's label size WCAG 1.4.3 asks
|
|
39
|
+
> 4.5:1, and on the drawn status values three pairs do not reach it: light
|
|
40
|
+
> `success` (3.43:1), light `warning` (2.00:1) and dark `danger` (3.63:1),
|
|
41
|
+
> with light `danger` at 4.28:1. The kit ships the drawn values; the
|
|
42
|
+
> finding belongs with the designer, and `tokens.test.ts` pins the hexes so
|
|
43
|
+
> a correction has to happen in the design first. Where that matters,
|
|
44
|
+
> `secondary`, `info` and `accent` clear the floor in both themes. Color is
|
|
45
|
+
> not a substitute for text either way: keep the label itself explicit.
|
|
37
46
|
|
|
38
47
|
## When to use
|
|
39
48
|
|
|
@@ -59,13 +68,22 @@ substitute for a state machine.
|
|
|
59
68
|
|
|
60
69
|
| Prop | Type | Default |
|
|
61
70
|
|------|------|---------|
|
|
62
|
-
| `variant` | `default` \| `secondary` \| `destructive` \| `outline` \| `ghost` \| `link` \| `success` \| `warning` \| `danger` \| `info` \| `accent` | `default` |
|
|
71
|
+
| `variant` | `default` \| `secondary` \| `destructive` \| `outline` \| `ghost` \| `link` \| `category` \| `success` \| `warning` \| `danger` \| `info` \| `accent` | `default` |
|
|
72
|
+
| `size` | `xs` \| `default` - 18 or 20 px tall; `xs` holds a count and keeps a 20 px minimum width (10/14 label), `default` is the drawn box (12/16 label) | `default` |
|
|
73
|
+
| `dot` | `boolean` - renders a 6px round status dot ahead of the label, in the label's own tone | `false` |
|
|
63
74
|
| `render` | `ReactElement` — replaces the root `span`, e.g. with an `<a>` | — |
|
|
64
75
|
| `className` | `string` — merged after the variant class | — |
|
|
65
76
|
|
|
66
77
|
All other props are native `<span>` props (or the target element's props
|
|
67
78
|
when using `render`) and are forwarded as-is, including `aria-invalid`
|
|
68
|
-
(shows a destructive-tinted
|
|
79
|
+
(shows a destructive-tinted ring, independent of `variant`).
|
|
80
|
+
|
|
81
|
+
The ring, the invalid state and `outline`'s hairline are all drawn as inset
|
|
82
|
+
shadows rather than borders, so none of them changes the badge's height.
|
|
83
|
+
|
|
84
|
+
`xs` carries geometry only, like every other `size` value. The drawn compact
|
|
85
|
+
count badge is the neutral paint at that size, which is
|
|
86
|
+
`<Badge size="xs" variant="secondary">`.
|
|
69
87
|
|
|
70
88
|
`badgeVariants` (the underlying `cva` recipe) is also exported, for a
|
|
71
89
|
consumer that needs the class string without the component — e.g. styling
|
|
@@ -91,6 +109,16 @@ import { Badge } from '@gears-frontx/ui-kit';
|
|
|
91
109
|
<Badge variant="info">info</Badge>
|
|
92
110
|
<Badge variant="accent">accent</Badge>
|
|
93
111
|
|
|
112
|
+
// Category chip
|
|
113
|
+
<Badge variant="category">Infrastructure</Badge>
|
|
114
|
+
|
|
115
|
+
// Size - geometry only, any variant
|
|
116
|
+
<Badge size="xs" variant="secondary">9</Badge>
|
|
117
|
+
<Badge size="default">20px</Badge>
|
|
118
|
+
|
|
119
|
+
// The drawn status dot, in the variant's own label tone
|
|
120
|
+
<Badge dot variant="success">Running</Badge>
|
|
121
|
+
|
|
94
122
|
// A badge that is actually a link — hover feedback only applies here
|
|
95
123
|
<Badge variant="outline" render={<a href="/plans/pro" />}>
|
|
96
124
|
Pro plan
|
package/dist/docs/button.md
CHANGED
|
@@ -24,7 +24,7 @@ polymorphism, correct disabled/focus behavior, `type="button"` by default
|
|
|
24
24
|
|
|
25
25
|
| Prop | Type | Default |
|
|
26
26
|
|------|------|---------|
|
|
27
|
-
| `variant` | `default` \| `destructive` \| `outline` \| `secondary` \| `ghost` \| `link` | `default` |
|
|
27
|
+
| `variant` | `default` \| `destructive` \| `outline` \| `secondary` \| `ghost` \| `link` \| `navigation` \| `avatar` \| `utility` - `destructive` is a tint of `--destructive` under a `--destructive` label; `navigation` is a card-filled row with a hairline whose current location is marked by a `data-current` attribute; `avatar` has no box of its own and wears a `--primary` ring while hovered or while it owns an open popup; `utility` is a borderless action with an 18px glyph | `default` |
|
|
28
28
|
| `size` | `default` \| `sm` \| `lg` (the F-mockups' md/sm/lg scale; `default` is md) | `default` |
|
|
29
29
|
| `icon` | `ReactNode` — leading icon slot, marked decorative (`aria-hidden`); the ONLY right place for a button icon | — |
|
|
30
30
|
| `loading` | `boolean` — centered spinner, disables the button, sets `aria-busy`; content keeps its space and the button keeps its accessible name | `false` |
|
|
@@ -34,7 +34,8 @@ polymorphism, correct disabled/focus behavior, `type="button"` by default
|
|
|
34
34
|
| `className` | `string` — merged after variant classes | — |
|
|
35
35
|
|
|
36
36
|
All other props are native `<button>` props (`onClick`, `disabled`, `type`,
|
|
37
|
-
`aria-*`, ...) and are forwarded as-is
|
|
37
|
+
`aria-*`, ...) and are forwarded as-is, including `data-current`, which the
|
|
38
|
+
`navigation` variant reads for its current-location state.
|
|
38
39
|
|
|
39
40
|
## Custom colors
|
|
40
41
|
|
package/dist/docs/card.md
CHANGED
|
@@ -38,6 +38,12 @@ Every part except `Card` itself is a passthrough over
|
|
|
38
38
|
| `size` | `'default' \| 'sm'` — scales the card's internal padding and gap, and `CardTitle`'s font size | `'default'` |
|
|
39
39
|
| `className` | `string` — merged after the kit class | — |
|
|
40
40
|
|
|
41
|
+
`CardTitle` and `CardDescription`:
|
|
42
|
+
|
|
43
|
+
| Prop | Type | Default |
|
|
44
|
+
|------|------|---------|
|
|
45
|
+
| `typography` | `'default' \| 'panel'` - panel is the 14/20 semibold title and 12/16 description a dense panel uses | `'default'` |
|
|
46
|
+
|
|
41
47
|
`CardHeader` becomes a two-column grid (content, then `CardAction`) when
|
|
42
48
|
it contains a `CardAction`, and a two-row grid (title, then
|
|
43
49
|
`CardDescription`) when it contains a `CardDescription` — both detected
|