@gears-frontx/ui-kit 0.4.0-alpha.4 → 0.4.0-alpha.5
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 +89 -83
- 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.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/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
|
package/dist/docs/chart.md
CHANGED
|
@@ -34,7 +34,7 @@ layout, spacing, text roles) or supplied per-instance by the consumer's own
|
|
|
34
34
|
`content` prop for themed rendering, or omit `content` for Recharts'
|
|
35
35
|
own default.
|
|
36
36
|
|
|
37
|
-
## Series colors: `ChartConfig`,
|
|
37
|
+
## Series colors: `ChartConfig`, with the `--chart-*` palette behind it
|
|
38
38
|
|
|
39
39
|
```ts
|
|
40
40
|
type ChartConfig = Record<
|
|
@@ -60,16 +60,21 @@ const chartConfig = {
|
|
|
60
60
|
} satisfies ChartConfig;
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
The kit publishes a five-step series palette, `--chart-1` through
|
|
64
|
+
`--chart-5`, with its own light and dark value per step, plus four
|
|
65
|
+
categorical hues (`--chart-category-blue|purple|brown|teal`) that carry one
|
|
66
|
+
value in both themes. A `ChartConfig` entry that names neither `color` nor
|
|
67
|
+
`theme` falls back to the palette step at its own position in the config,
|
|
68
|
+
wrapping to `--chart-1` after the fifth entry, so a chart is legible before
|
|
69
|
+
anyone brands it. An explicit `color` or `theme` always wins, and it wins
|
|
70
|
+
without shifting the fallback for the entries around it: each entry's step
|
|
71
|
+
follows its own index, not its position among the uncoloured ones.
|
|
72
|
+
|
|
73
|
+
A consumer can still reference any other kit token (`var(--primary)`,
|
|
74
|
+
`var(--info)`, ...), a literal colour, or their own palette.
|
|
75
|
+
`--color-<key>` is unchanged: it is the per-instance custom property
|
|
76
|
+
`ChartStyle` writes for each series, which the palette steps are one
|
|
77
|
+
possible value for.
|
|
73
78
|
|
|
74
79
|
### Dark mode
|
|
75
80
|
|
|
@@ -177,6 +182,7 @@ const data = [
|
|
|
177
182
|
- Do not hardcode a series color inline on the Recharts element and skip
|
|
178
183
|
`ChartConfig` — the config is also what the tooltip/legend read back to
|
|
179
184
|
resolve each series' label and (for the legend's fallback swatch) color.
|
|
180
|
-
- Do not
|
|
181
|
-
|
|
182
|
-
|
|
185
|
+
- Do not paint a series in `--muted-foreground`: it is the chart's own
|
|
186
|
+
chrome colour (grid, axis, legend), so a series wearing it disappears
|
|
187
|
+
into the chart's furniture. The published palette deliberately excludes
|
|
188
|
+
it (see "Series colors" above).
|
package/dist/docs/checkbox.md
CHANGED
|
@@ -4,6 +4,12 @@ An on/off tick box. Wraps the Base UI Checkbox primitive: renders a
|
|
|
4
4
|
`role="checkbox"` button with a hidden native input for forms, toggles via
|
|
5
5
|
mouse and keyboard, exposes state through `data-checked`/`data-unchecked`.
|
|
6
6
|
|
|
7
|
+
One drawn control box, 16 px on a 4 px corner, carrying a 14 px mark. There
|
|
8
|
+
is no size axis. The hit area is larger than the box on both axes: 12 px
|
|
9
|
+
past each inline edge and 8 px past each block edge, which is the drawn
|
|
10
|
+
32 px interaction row, so a checkbox in a dense row is no harder to hit
|
|
11
|
+
than one in a form.
|
|
12
|
+
|
|
7
13
|
## When to use
|
|
8
14
|
|
|
9
15
|
- Opting in/out of independent options (multiple can be on at once).
|
package/dist/docs/command.md
CHANGED
|
@@ -64,6 +64,10 @@ prop](https://github.com/pacocoursey/cmdk#command) (`label`, `filter`,
|
|
|
64
64
|
| `showCloseButton` | `boolean` — see below | `false` |
|
|
65
65
|
| `className` | `string` — merged onto the popup | — |
|
|
66
66
|
|
|
67
|
+
`CommandDialog` caps the popup at `40rem` (640px, the drawn search surface)
|
|
68
|
+
from the 640px breakpoint up, rather than `DialogContent`'s own cap. Its
|
|
69
|
+
height stays with the content.
|
|
70
|
+
|
|
67
71
|
`showCloseButton` defaults to `false` here (unlike `DialogContent`, which
|
|
68
72
|
defaults it to `true`) — a command palette already dismisses on Escape or
|
|
69
73
|
an outside click, the palette's one-line header has no spare room for an
|
package/dist/docs/data-table.md
CHANGED
|
@@ -37,7 +37,7 @@ shipped as reusable exports instead:
|
|
|
37
37
|
|
|
38
38
|
`Table` stays primitive markup with no chrome of its own; `DataTable` is
|
|
39
39
|
where the Studio Data Table frame's card lives. One element wraps the whole
|
|
40
|
-
widget: a 1px `--border` on `--surface` at `--radius-
|
|
40
|
+
widget: a 1px `--border` on `--surface` at `--radius-xl`, with the table's
|
|
41
41
|
rows above and the pagination bar **inside** it — the frame draws that bar
|
|
42
42
|
within the same bordered container, separated from the last row by the same
|
|
43
43
|
rule that separates any two rows, not floating below the card as the
|
|
@@ -57,12 +57,17 @@ beats ordinary inheritance.
|
|
|
57
57
|
|
|
58
58
|
Scope is deliberately narrower than the full guide: **column defs,
|
|
59
59
|
sorting, row selection, and pagination** only — no column filtering, no
|
|
60
|
-
column-visibility toggling, no row actions dropdown, no virtualization
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
column-visibility toggling, no row actions dropdown, no virtualization.
|
|
61
|
+
Each of those is itself a whole guide section the upstream doc treats as
|
|
62
|
+
separable; nothing here stops a consumer building any of them directly
|
|
63
|
+
against the `table` instance TanStack Table itself exposes (this component
|
|
64
|
+
doesn't hide it, see "Escape hatch" below), but `DataTable` doesn't wire
|
|
65
|
+
them up automatically.
|
|
66
|
+
|
|
67
|
+
Column resizing is the one that is no longer out of scope: the `table`
|
|
68
|
+
primitive resizes a column by pointer and by keyboard (`TableHead`'s
|
|
69
|
+
`resizable`, see table.md), and `DataTable` composes that primitive, so a
|
|
70
|
+
consumer passing `resizable` through their own header cell gets it.
|
|
66
71
|
|
|
67
72
|
**TanStack Table v9 API note:** the pinned `@tanstack/react-table@9.1.2` is
|
|
68
73
|
a from-scratch rewrite of v8's `useReactTable` — tree-shakeable features
|
package/dist/docs/dialog.md
CHANGED
|
@@ -41,8 +41,9 @@ default; `false`; `'trap-focus'`) — see Base UI Dialog.Root.
|
|
|
41
41
|
|
|
42
42
|
| Prop | Type | Default |
|
|
43
43
|
|------|------|---------|
|
|
44
|
+
| `size` | `'default' \| 'lg'` - the omitted size caps the popup at `24rem` (384px, the drawn modal width) from the 640px breakpoint up; `lg` widens that to `36rem` (576px) for content that needs more room | `'default'` |
|
|
44
45
|
| `showCloseButton` | `boolean` — renders a top-right close (X) button | `true` |
|
|
45
|
-
| `showBackdrop` | `boolean`
|
|
46
|
+
| `showBackdrop` | `boolean` - renders the dimming backdrop (`--overlay-modal`, the same dark scrim in both themes); set `false` together with `modal={false}` on the root for a genuinely non-modal dialog | `true` |
|
|
46
47
|
| `closeLabel` | `string` — accessible name for that button, the popup's only kit-authored text; same contract as `Toaster`'s `closeLabel` | `'Close'` |
|
|
47
48
|
| `container` | DOM node to portal the popup into | `<body>` |
|
|
48
49
|
| `initialFocus` / `finalFocus` | `boolean \| RefObject \| function` — see Base UI Dialog.Popup | default focus behavior |
|
|
@@ -99,7 +100,7 @@ import {
|
|
|
99
100
|
## Wide content
|
|
100
101
|
|
|
101
102
|
`DialogContent` lays its children out as a single-column grid capped at
|
|
102
|
-
`
|
|
103
|
+
`35rem` (`calc(100% - 2rem)` below 640px), and the column's minimum width
|
|
103
104
|
is floored at zero — so content wider than the popup overflows *inside*
|
|
104
105
|
it rather than stretching the dialog past its cap.
|
|
105
106
|
|
|
@@ -68,6 +68,12 @@ selection).
|
|
|
68
68
|
item — both leave `closeOnClick` at Base UI's default of `false` so the
|
|
69
69
|
menu stays open after a toggle.
|
|
70
70
|
|
|
71
|
+
`DropdownMenuRadioItem`:
|
|
72
|
+
|
|
73
|
+
| Prop | Type | Default |
|
|
74
|
+
|------|------|---------|
|
|
75
|
+
| `indicatorSide` | `'end'` \| `'start'` - start reserves a 32 px leading slot and fills the checked row | `'end'` |
|
|
76
|
+
|
|
71
77
|
`DropdownMenuTrigger` is an unstyled pass-through (native `<button>`
|
|
72
78
|
semantics) — compose it with `Button` via its `render` prop for a
|
|
73
79
|
styled trigger, same as `DialogTrigger`.
|