@alexgorbatchev/shadcn 0.0.183 → 0.0.184
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/{chunk-pb7kvbty.js → chunk-r7ewxac3.js} +3 -2
- package/dist/{chunk-qn4a3gg4.js → chunk-rf6x2h3k.js} +1 -1
- package/dist/{chunk-wnkxd9km.js → chunk-scd23ktw.js} +1 -1
- package/dist/{chunk-t1xan6pw.js → chunk-w868y7p1.js} +1 -1
- package/dist/components/assistant-ui/elements/DataTable.js +2 -2
- package/dist/components/assistant-ui/index.js +2 -2
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/gantt/index.js +1 -1
- package/dist/components/json-render/index.js +1 -1
- package/dist/components/virtual-data-grid/index.js +3 -3
- package/dist/components/virtual-table/index.js +2 -2
- package/dist/index.js +1 -1
- package/dist/prototype.js +1 -1
- package/llms/components/data-display/DataGrid.md +8 -0
- package/llms/components/forms/ControlBoundaries.md +2 -2
- package/llms/setup.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -296,7 +296,7 @@ Scrolling is intentional: cards, panels, dialogs, sheets, and floating surfaces
|
|
|
296
296
|
|
|
297
297
|
`ThemeProvider` mounts the development-only `ScrollGuard`. Without a theme provider, mount `<ScrollGuard />` once in your app. Add `data-scroll="none"` to any HTML element to apply the same check. The guard throws a browser error identifying the element, axis, and scroll range when computed `overflow: auto` or `scroll` permits overflowing content to scroll. It checks the marked element itself, including portaled elements in the same document, after content and size changes; nested scroll viewports remain independent. Hidden and clipped overflow do not trigger it. Duplicate mounts share one observer per document, and the final unmount disconnects it. Pass `ownerDocument` to check an iframe's document; shadow roots require their own layout validation. The guard installs no observers when the consuming application's `NODE_ENV` is `"production"`.
|
|
298
298
|
|
|
299
|
-
Every action shows a visible affordance at rest. Interactive control edges use the `input` token, which keeps 3:1 against the page in both themes; the `border` token is for decorative dividers and cards. A `ghost` Button is borderless only at the icon sizes (`icon`, `icon-xs`, `icon-sm`, `icon-lg`), where its icon identifies it; at the text sizes it keeps an `input` edge, and at `size="inline"` it takes the link colour. Use `variant="link"` for a borderless text action that should read as a link. `ToolbarButton` and `ToolbarLink` default to `variant="outline"`; pass `variant="ghost"` only for icon-only toolbar buttons. In a vertical `Toolbar`, each tool spans its group and starts its label at the shared leading edge, so a list of tools in a side panel lines up. Pressed toggles, toggle group items and toolbar buttons carry a primary edge. The Storybook test suites fail any story that renders a text-labelled Button or toolbar button with no border, no fill and no link styling.
|
|
299
|
+
Every action shows a visible affordance at rest. Interactive control edges use the `input` token, which keeps 3:1 against the page in both themes; the `border` token is for decorative dividers and cards. A `ghost` Button is borderless only at the icon sizes (`icon`, `icon-xs`, `icon-sm`, `icon-lg`), where its icon identifies it; at the text sizes it keeps an `input` edge, and at `size="inline"` it takes the link colour. A sortable `DataGridColumnHeader` is the exception: it keeps the header's colour and weight, and its sort icon identifies it as a control. Use `variant="link"` for a borderless text action that should read as a link. `ToolbarButton` and `ToolbarLink` default to `variant="outline"`; pass `variant="ghost"` only for icon-only toolbar buttons. In a vertical `Toolbar`, each tool spans its group and starts its label at the shared leading edge, so a list of tools in a side panel lines up. Pressed toggles, toggle group items and toolbar buttons carry a primary edge. The Storybook test suites fail any story that renders a text-labelled Button or toolbar button with no border, no fill and no link styling.
|
|
300
300
|
|
|
301
301
|
`PanelHeader` heads a side panel or drawer: one row with the `title` heading (`h2` by default, `headingLevel={3}` for nested panels), an optional muted `count` and icon-button `actions` such as close, then an optional `toolbar` row holding the panel's primary and secondary actions, which wraps as one group. Pass `headingProps` for a ref, `id` or `tabIndex` when focus moves to the panel.
|
|
302
302
|
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
TableCell2,
|
|
11
11
|
TableColumnGroup2,
|
|
12
12
|
TableColumn2
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-rf6x2h3k.js";
|
|
14
14
|
import {
|
|
15
15
|
OptionSelect2
|
|
16
16
|
} from "./chunk-h45mqwpq.js";
|
|
@@ -343,8 +343,9 @@ function DataGridColumnHeader2({
|
|
|
343
343
|
const sorted = column.getIsSorted();
|
|
344
344
|
return column.getCanSort() ? /* @__PURE__ */ jsxs(Button2, {
|
|
345
345
|
type: "button",
|
|
346
|
-
variant: "
|
|
346
|
+
variant: "plain",
|
|
347
347
|
size: "inline",
|
|
348
|
+
className: "underline-offset-4 hover:underline",
|
|
348
349
|
onClick: column.getToggleSortingHandler(),
|
|
349
350
|
children: [
|
|
350
351
|
children,
|
|
@@ -89,7 +89,7 @@ function TableHead2({
|
|
|
89
89
|
return /* @__PURE__ */ jsx("th", {
|
|
90
90
|
"data-density": density,
|
|
91
91
|
"data-slot": "table-head",
|
|
92
|
-
className: cn2("h-control-lg px-control-x align-middle leading-(--ag-cell-leading) font-
|
|
92
|
+
className: cn2("h-control-lg px-control-x align-middle leading-(--ag-cell-leading) font-semibold whitespace-nowrap text-foreground [&:has([role=checkbox])]:pe-0 [&_[data-slot=button]]:font-[weight:inherit]", alignmentClasses[textAlign], truncate && "truncate", visibleFrom && visibilityClasses[visibleFrom], className),
|
|
93
93
|
...props
|
|
94
94
|
});
|
|
95
95
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataTable2
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-w868y7p1.js";
|
|
4
4
|
import"../../../chunk-1wz92wgg.js";
|
|
5
|
-
import"../../../chunk-
|
|
5
|
+
import"../../../chunk-rf6x2h3k.js";
|
|
6
6
|
import"../../../chunk-jc3cbwyg.js";
|
|
7
7
|
import"../../../chunk-m4geb1s5.js";
|
|
8
8
|
import"../../../chunk-cgj3ade2.js";
|
|
@@ -203,8 +203,8 @@ import"../../chunk-1wz92wgg.js";
|
|
|
203
203
|
import"../../chunk-cgj3ade2.js";
|
|
204
204
|
import {
|
|
205
205
|
DataTable2
|
|
206
|
-
} from "../../chunk-
|
|
207
|
-
import"../../chunk-
|
|
206
|
+
} from "../../chunk-w868y7p1.js";
|
|
207
|
+
import"../../chunk-rf6x2h3k.js";
|
|
208
208
|
import {
|
|
209
209
|
DaySeparator2
|
|
210
210
|
} from "../../chunk-3j9enr2q.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
DataGridColumnHeader2,
|
|
8
8
|
DataGridFilter2,
|
|
9
9
|
DataGridPagination2
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-r7ewxac3.js";
|
|
11
11
|
import"../../chunk-7ny0vyek.js";
|
|
12
12
|
import"../../chunk-8ssktt4b.js";
|
|
13
13
|
import"../../chunk-en44w1pn.js";
|
|
@@ -17,7 +17,7 @@ import"../../chunk-jpvw9xqy.js";
|
|
|
17
17
|
import {
|
|
18
18
|
Button2
|
|
19
19
|
} from "../../chunk-n63meq6q.js";
|
|
20
|
-
import"../../chunk-
|
|
20
|
+
import"../../chunk-rf6x2h3k.js";
|
|
21
21
|
import"../../chunk-h45mqwpq.js";
|
|
22
22
|
import"../../chunk-7jpsybag.js";
|
|
23
23
|
import"../../chunk-t9ms87s9.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import"../../chunk-en44w1pn.js";
|
|
2
2
|
import {
|
|
3
3
|
TableRow2
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-rf6x2h3k.js";
|
|
5
5
|
import {
|
|
6
6
|
DataGridColumnFitContext,
|
|
7
7
|
getDataGridColumnFit,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
DataGridHeaderRows,
|
|
11
11
|
DataGridCells2,
|
|
12
12
|
DataGridColumns
|
|
13
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-r7ewxac3.js";
|
|
14
14
|
import"../../chunk-7ny0vyek.js";
|
|
15
15
|
import"../../chunk-8ssktt4b.js";
|
|
16
16
|
import"../../chunk-e6hk39ev.js";
|
|
@@ -22,7 +22,7 @@ import"../../chunk-7jpsybag.js";
|
|
|
22
22
|
import"../../chunk-t9ms87s9.js";
|
|
23
23
|
import {
|
|
24
24
|
VirtualTable2
|
|
25
|
-
} from "../../chunk-
|
|
25
|
+
} from "../../chunk-scd23ktw.js";
|
|
26
26
|
import"../../chunk-5mydsjp3.js";
|
|
27
27
|
|
|
28
28
|
// src/components/virtual-data-grid/VirtualDataGrid.tsx
|
package/dist/index.js
CHANGED
package/dist/prototype.js
CHANGED
|
@@ -2051,7 +2051,7 @@ var program = new Command;
|
|
|
2051
2051
|
// package.json
|
|
2052
2052
|
var package_default = {
|
|
2053
2053
|
name: "@alexgorbatchev/shadcn",
|
|
2054
|
-
version: "0.0.
|
|
2054
|
+
version: "0.0.184",
|
|
2055
2055
|
description: "Sharp, monospace React components with compact, comfortable, and touch densities.",
|
|
2056
2056
|
license: "MIT",
|
|
2057
2057
|
repository: {
|
|
@@ -50,6 +50,14 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
50
50
|
}
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
### SortableHeaderMatchesPlainHeader
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
{
|
|
57
|
+
render: () => <Example pagination={false}/>
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
53
61
|
### FilteredSelection
|
|
54
62
|
|
|
55
63
|
```tsx
|
|
@@ -10,7 +10,7 @@ Source: src/components/stories/forms/ControlBoundaries.stories.tsx
|
|
|
10
10
|
## Public imports
|
|
11
11
|
|
|
12
12
|
```tsx
|
|
13
|
-
import { Button, ButtonGroup, Checkbox, Input, OptionCard, OptionCardGroup, RadioGroup, RadioGroupItem, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, ToolbarButton, ToolbarGroup, ToolbarLink } from "@alexgorbatchev/shadcn";
|
|
13
|
+
import { Button, ButtonGroup, Checkbox, Input, OptionCard, OptionCardGroup, RadioGroup, RadioGroupItem, Table, TableHead, TableHeader, TableRow, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, ToolbarButton, ToolbarGroup, ToolbarLink } from "@alexgorbatchev/shadcn";
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Supporting imports
|
|
@@ -18,7 +18,7 @@ import { Button, ButtonGroup, Checkbox, Input, OptionCard, OptionCardGroup, Radi
|
|
|
18
18
|
```tsx
|
|
19
19
|
import { useState } from "react";
|
|
20
20
|
import type { ReactElement } from "react";
|
|
21
|
-
import { EllipsisIcon } from "lucide-react";
|
|
21
|
+
import { ChevronsUpDownIcon, EllipsisIcon } from "lucide-react";
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Default component
|
package/llms/setup.md
CHANGED
|
@@ -296,7 +296,7 @@ Scrolling is intentional: cards, panels, dialogs, sheets, and floating surfaces
|
|
|
296
296
|
|
|
297
297
|
`ThemeProvider` mounts the development-only `ScrollGuard`. Without a theme provider, mount `<ScrollGuard />` once in your app. Add `data-scroll="none"` to any HTML element to apply the same check. The guard throws a browser error identifying the element, axis, and scroll range when computed `overflow: auto` or `scroll` permits overflowing content to scroll. It checks the marked element itself, including portaled elements in the same document, after content and size changes; nested scroll viewports remain independent. Hidden and clipped overflow do not trigger it. Duplicate mounts share one observer per document, and the final unmount disconnects it. Pass `ownerDocument` to check an iframe's document; shadow roots require their own layout validation. The guard installs no observers when the consuming application's `NODE_ENV` is `"production"`.
|
|
298
298
|
|
|
299
|
-
Every action shows a visible affordance at rest. Interactive control edges use the `input` token, which keeps 3:1 against the page in both themes; the `border` token is for decorative dividers and cards. A `ghost` Button is borderless only at the icon sizes (`icon`, `icon-xs`, `icon-sm`, `icon-lg`), where its icon identifies it; at the text sizes it keeps an `input` edge, and at `size="inline"` it takes the link colour. Use `variant="link"` for a borderless text action that should read as a link. `ToolbarButton` and `ToolbarLink` default to `variant="outline"`; pass `variant="ghost"` only for icon-only toolbar buttons. In a vertical `Toolbar`, each tool spans its group and starts its label at the shared leading edge, so a list of tools in a side panel lines up. Pressed toggles, toggle group items and toolbar buttons carry a primary edge. The Storybook test suites fail any story that renders a text-labelled Button or toolbar button with no border, no fill and no link styling.
|
|
299
|
+
Every action shows a visible affordance at rest. Interactive control edges use the `input` token, which keeps 3:1 against the page in both themes; the `border` token is for decorative dividers and cards. A `ghost` Button is borderless only at the icon sizes (`icon`, `icon-xs`, `icon-sm`, `icon-lg`), where its icon identifies it; at the text sizes it keeps an `input` edge, and at `size="inline"` it takes the link colour. A sortable `DataGridColumnHeader` is the exception: it keeps the header's colour and weight, and its sort icon identifies it as a control. Use `variant="link"` for a borderless text action that should read as a link. `ToolbarButton` and `ToolbarLink` default to `variant="outline"`; pass `variant="ghost"` only for icon-only toolbar buttons. In a vertical `Toolbar`, each tool spans its group and starts its label at the shared leading edge, so a list of tools in a side panel lines up. Pressed toggles, toggle group items and toolbar buttons carry a primary edge. The Storybook test suites fail any story that renders a text-labelled Button or toolbar button with no border, no fill and no link styling.
|
|
300
300
|
|
|
301
301
|
`PanelHeader` heads a side panel or drawer: one row with the `title` heading (`h2` by default, `headingLevel={3}` for nested panels), an optional muted `count` and icon-button `actions` such as close, then an optional `toolbar` row holding the panel's primary and secondary actions, which wraps as one group. Pass `headingProps` for a ref, `id` or `tabIndex` when focus moves to the panel.
|
|
302
302
|
|