@alexgorbatchev/shadcn 0.0.45 → 0.0.47
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 +10 -2
- package/dist/{chunk-pp0qdx0f.js → chunk-0qgd06td.js} +6 -2
- package/dist/{chunk-9w9berq8.js → chunk-caz81rnv.js} +9 -2
- package/dist/{chunk-k455qwx2.js → chunk-dy4ghe9p.js} +1 -1
- package/dist/{chunk-55s7v2mw.js → chunk-mqea74ex.js} +1 -1
- package/dist/components/PageHeader.d.ts +3 -1
- package/dist/components/assistant-ui/elements/OptionList.js +2 -2
- package/dist/components/assistant-ui/elements/QuestionFlow.js +3 -3
- package/dist/components/assistant-ui/index.js +3 -3
- package/dist/components/data-grid/DataGridSelectCell.d.ts +12 -0
- package/dist/components/data-grid/DataGridSelectHeader.d.ts +8 -0
- package/dist/components/data-grid/index.d.ts +4 -0
- package/dist/components/data-grid/index.js +53 -1
- package/dist/components/event-calendar/index.js +1 -1
- package/dist/components/json-render/index.js +2 -2
- package/dist/components/tree/TreeItem.d.ts +9 -1
- package/dist/components/tree/index.js +2293 -37
- package/dist/index.js +2 -2
- package/dist/prototype.js +3 -2
- package/llms/components/data-display/DataGrid.md +10 -2
- package/llms/components/data-display/DataGridSelectCell.md +28 -0
- package/llms/components/data-display/DataGridSelectHeader.md +36 -0
- package/llms/components/forms/Checkbox.md +15 -0
- package/llms/components/layout/PageHeader.md +25 -0
- package/llms/components/navigation/Tree.md +16 -0
- package/llms/setup.md +10 -2
- package/llms.txt +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -178,7 +178,7 @@ import {
|
|
|
178
178
|
StatusTracker2,
|
|
179
179
|
DashboardLayout2,
|
|
180
180
|
BillingUsage2
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-0qgd06td.js";
|
|
182
182
|
import {
|
|
183
183
|
Tabs2,
|
|
184
184
|
tabsListVariants2,
|
|
@@ -307,7 +307,7 @@ import {
|
|
|
307
307
|
} from "./chunk-1xncv9gb.js";
|
|
308
308
|
import {
|
|
309
309
|
Checkbox2
|
|
310
|
-
} from "./chunk-
|
|
310
|
+
} from "./chunk-caz81rnv.js";
|
|
311
311
|
import {
|
|
312
312
|
Kbd2,
|
|
313
313
|
KbdGroup2
|
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.47",
|
|
2055
2055
|
description: "Sharp, monospace React components with compact and comfortable densities.",
|
|
2056
2056
|
license: "MIT",
|
|
2057
2057
|
repository: {
|
|
@@ -3462,7 +3462,8 @@ var package_default = {
|
|
|
3462
3462
|
"input-otp@1.5.0": "patches/input-otp@1.5.0.patch",
|
|
3463
3463
|
"@vitest/coverage-istanbul@4.1.11": "patches/@vitest%2Fcoverage-istanbul@4.1.11.patch",
|
|
3464
3464
|
"storybook@10.6.1": "patches/storybook@10.6.1.patch",
|
|
3465
|
-
"uncontrollable@7.2.1": "patches/uncontrollable@7.2.1.patch"
|
|
3465
|
+
"uncontrollable@7.2.1": "patches/uncontrollable@7.2.1.patch",
|
|
3466
|
+
"@headless-tree/core@1.8.0": "patches/@headless-tree%2Fcore@1.8.0.patch"
|
|
3466
3467
|
}
|
|
3467
3468
|
};
|
|
3468
3469
|
|
|
@@ -8,8 +8,8 @@ Source: src/components/stories/data-display/DataGrid.stories.tsx
|
|
|
8
8
|
## Public imports
|
|
9
9
|
|
|
10
10
|
```tsx
|
|
11
|
-
import { DataGrid, DataGridColumnHeader, DataGridFilter, dataGridFeatures } from "@alexgorbatchev/shadcn/data-grid";
|
|
12
|
-
import {
|
|
11
|
+
import { DataGrid, DataGridColumnHeader, DataGridFilter, DataGridSelectHeader, DataGridSelectCell, dataGridFeatures } from "@alexgorbatchev/shadcn/data-grid";
|
|
12
|
+
import { Button } from "@alexgorbatchev/shadcn";
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Supporting imports
|
|
@@ -50,6 +50,14 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
50
50
|
}
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
### FilteredSelection
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
{
|
|
57
|
+
render: () => <Example restricted/>
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
53
61
|
### CombinedSortHeader
|
|
54
62
|
|
|
55
63
|
```tsx
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# DataGridSelectCell
|
|
2
|
+
|
|
3
|
+
Story: @alexgorbatchev/shadcn/components/data-display/DataGridSelectCell
|
|
4
|
+
Source: src/components/stories/data-display/DataGridSelectCell.stories.tsx
|
|
5
|
+
|
|
6
|
+
[Full source and local helpers](https://github.com/alexgorbatchev/shadcn/blob/main/src/components/stories/data-display/DataGridSelectCell.stories.tsx)
|
|
7
|
+
|
|
8
|
+
## Public imports
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { DataGridSelectCell } from "@alexgorbatchev/shadcn/data-grid";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Default component
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
DataGridSelectCell
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Default render
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
() => <SelectionControls />
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
Storybook CSF excerpts. Default args and render apply unless overridden. Local helpers, fixtures, decorators, and providers may be required; these are reference excerpts, not standalone consumer modules. Interaction tests are omitted.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# DataGridSelectHeader
|
|
2
|
+
|
|
3
|
+
Story: @alexgorbatchev/shadcn/components/data-display/DataGridSelectHeader
|
|
4
|
+
Source: src/components/stories/data-display/DataGridSelectHeader.stories.tsx
|
|
5
|
+
|
|
6
|
+
[Full source and local helpers](https://github.com/alexgorbatchev/shadcn/blob/main/src/components/stories/data-display/DataGridSelectHeader.stories.tsx)
|
|
7
|
+
|
|
8
|
+
## Public imports
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { DataGridSelectHeader } from "@alexgorbatchev/shadcn/data-grid";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Default component
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
DataGridSelectHeader
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Default render
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
() => <SelectionControls selectChildren={false}/>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
Storybook CSF excerpts. Default args and render apply unless overridden. Local helpers, fixtures, decorators, and providers may be required; these are reference excerpts, not standalone consumer modules. Interaction tests are omitted.
|
|
29
|
+
|
|
30
|
+
### ChangedRows
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
{
|
|
34
|
+
render: () => <SelectionControls />
|
|
35
|
+
}
|
|
36
|
+
```
|
|
@@ -94,6 +94,21 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
94
94
|
}
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
+
### MixedToChecked
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
{
|
|
101
|
+
render: function Render() {
|
|
102
|
+
const [isMixed, setMixed] = useState(true);
|
|
103
|
+
const [isChecked, setChecked] = useState(false);
|
|
104
|
+
return (<Checkbox aria-label="Select visible items" indeterminate={isMixed} checked={isChecked} onCheckedChange={(checked) => {
|
|
105
|
+
setMixed(false);
|
|
106
|
+
setChecked(checked);
|
|
107
|
+
}}/>);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
97
112
|
### ReadOnly
|
|
98
113
|
|
|
99
114
|
```tsx
|
|
@@ -47,3 +47,28 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
47
47
|
args: { description: undefined, breadcrumbs: undefined, actions: undefined }
|
|
48
48
|
}
|
|
49
49
|
```
|
|
50
|
+
|
|
51
|
+
### WithEyebrow
|
|
52
|
+
|
|
53
|
+
```tsx
|
|
54
|
+
{
|
|
55
|
+
args: { eyebrow: "ENGINE LIBRARY" }
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### NarrowWithLongAddress
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
{
|
|
63
|
+
globals: { theme: "light", density: "compact" },
|
|
64
|
+
decorators: [
|
|
65
|
+
(Story) => (<div className="w-80 max-w-full">
|
|
66
|
+
<Story />
|
|
67
|
+
</div>),
|
|
68
|
+
],
|
|
69
|
+
args: {
|
|
70
|
+
eyebrow: <strong>ENGINE LIBRARY</strong>,
|
|
71
|
+
actions: "https://music.example.com/a-very-long-server-address-without-spaces-for-the-collection-endpoint",
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
@@ -28,6 +28,22 @@ import { useState } from "react";
|
|
|
28
28
|
|
|
29
29
|
Storybook CSF excerpts. Default args and render apply unless overridden. Local helpers, fixtures, decorators, and providers may be required; these are reference excerpts, not standalone consumer modules. Interaction tests are omitted.
|
|
30
30
|
|
|
31
|
+
### LinkRows
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
{
|
|
35
|
+
render: () => <LinkExample />
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### ControlledDropHint
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
{
|
|
43
|
+
render: () => <LinkExample />
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
31
47
|
### ConstrainedRows
|
|
32
48
|
|
|
33
49
|
```tsx
|
package/llms/setup.md
CHANGED
|
@@ -71,7 +71,7 @@ Import shared controls and providers from `@alexgorbatchev/shadcn`. Import the f
|
|
|
71
71
|
| `/file-upload` | FileUpload selection and validation | `bun add react-dropzone@^20.1.4` |
|
|
72
72
|
| `/color-picker` | ColorPicker | `bun add react-colorful@^5.8.1` |
|
|
73
73
|
| `/image-crop` | ImageCrop and native export helpers | `bun add react-image-crop@^11.1.2` |
|
|
74
|
-
| `/tree` | Tree, native hooks and features | `bun add @headless-tree/core@^1.8.0 @headless-tree/react@^1.8.0
|
|
74
|
+
| `/tree` | Tree, native hooks and features | `bun add @headless-tree/core@^1.8.0 @headless-tree/react@^1.8.0`; patched runtimes are bundled |
|
|
75
75
|
| `/editor` | RichTextEditor, native Tiptap hooks and StarterKit | `bun add @tiptap/core@^3.32.0 @tiptap/react@^3.32.0 @tiptap/pm@^3.32.0 @tiptap/starter-kit@^3.32.0` |
|
|
76
76
|
| `/event-calendar` | EventCalendar, EventForm and native calendar APIs | `bun add date-fns@^4.4.0`; TypeScript: `bun add -d @types/react-big-calendar@^1.16.3` |
|
|
77
77
|
| `/gantt` | Gantt and Roadmap | `bun add date-fns@^4.4.0 @date-fns/tz@^1.5.0` |
|
|
@@ -86,7 +86,7 @@ import { ChartContainer, type ChartConfig } from "@alexgorbatchev/shadcn/chart";
|
|
|
86
86
|
import { Carousel, CarouselContent, CarouselItem } from "@alexgorbatchev/shadcn/carousel";
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
A production install of this package adds no third-party packages: every library is an optional peer that consumers install themselves, or is bundled into the package. Core peers are listed under Installation; feature peers are listed per entry point above. The patched `sonner`, `input-otp`,
|
|
89
|
+
A production install of this package adds no third-party packages: every library is an optional peer that consumers install themselves, or is bundled into the package. Core peers are listed under Installation; feature peers are listed per entry point above. The patched `sonner`, `input-otp`, `@shadcn/react`, and Headless Tree runtimes, and the calendar with its patched `uncontrollable` wrapper, are bundled so consumers receive the fixes even when their package manager does not apply Bun patches. Install their upstream peers for the types the declarations reference; the tree runtime stays behind `/tree` and the calendar runtime behind `/event-calendar`. Import tree hooks and features from this package's `/tree` entry point so they use the bundled native implementation. Install `@base-ui/utils` at the exact version `@base-ui/react` requires, so the portal components share Base UI's own ref merging without a second copy. Shared providers work across entry points.
|
|
90
90
|
|
|
91
91
|
The optional assistant-ui catalog provides presentational families under `/assistant-ui/<family>` and runtime adapters under `/assistant-ui/native/<family>`. For example, import `ApprovalCard` from `@alexgorbatchev/shadcn/assistant-ui/approval-card`. Add `@alexgorbatchev/shadcn/assistant-ui.css` to your stylesheet. Native threads require an actual assistant-ui runtime and the selected family's optional peers. See the [assistant-ui reference](https://github.com/alexgorbatchev/shadcn/blob/main/docs/internal/assistant-ui.md) for imports, dependency-bearing styles, source inventory, and the SelectionToolbar isolation limitation.
|
|
92
92
|
|
|
@@ -368,6 +368,14 @@ Compose `QuestionnaireItem`, `QuestionnaireTitle`, and answer controls inside `Q
|
|
|
368
368
|
|
|
369
369
|
Column `meta.filter` offers a column in `DataGridFilters`, hidden columns included. A `range` filter edits `[min, max]` bounds, `null` for an open end, for `filterFn: "inNumberRange"`; its inputs suggest the range of the rows the other filters leave, formatted through the filter's `Intl.NumberFormatOptions`. An `options` filter chooses among labelled string values, one or several, listed in its `options` or, when they depend on runtime data, in the `options` prop of `DataGridFilters` and `DataGridFilterSummary` keyed by column ID, for `filterFn: "arrHas"` (one value per row), `"arrIncludesSome"` (an array per row), or a custom `filterFn`; each option counts the rows the other filters leave with that value, so a column whose rows hold several values or values in another form supplies them through `getUniqueValues`. Column filters combine with each other and with the global filter. `DataGridFilterSummary` lists the active filters with buttons that remove them, and both controls clear every column filter at once.
|
|
370
370
|
|
|
371
|
+
Import `DataGridSelectHeader` and `DataGridSelectCell` from `@alexgorbatchev/shadcn/data-grid`. Pass the current `useTable` result as `table` to both controls, and pass `row` and an accessible `label` to each cell. The header selects selectable filtered rows across all pages and preserves selections hidden by filters. It shows a mixed state when some of those rows are selected and disables itself when none are selectable. Its default label is "Select all filtered rows"; provide `label` to name the scope in your application. Cells follow native row selection rules, including disabled rows and partially selected parents. The controls observe selection changes without requiring the parent table selector to include selection state.
|
|
372
|
+
|
|
373
|
+
`TreeItem linkProps` places the registered tree item, roving focus, and native drag handlers on an anchor. Pass `href` and anchor events directly, or compose a router link through `linkProps.render`. The outer `render` and `ref` remain available for row overlays; disclosure and `endEnhancer` controls remain siblings of the link. Enter and modified clicks retain native link behavior, while tree arrows retain navigation and expansion behavior. Optional `dropHint={{ content, open, side }}` displays caller-controlled drag feedback without adding a focus target.
|
|
374
|
+
|
|
375
|
+
Embedded actions, links, menus, editable fields, and media controls retain their own keyboard behavior. Registered anchor and button rows still participate in tree navigation; rename and search inputs retain their completion and cancellation shortcuts.
|
|
376
|
+
|
|
377
|
+
`PageHeader` accepts an optional `eyebrow` above its single page title. It accepts any React content without introducing another heading. Breadcrumbs, description, actions, and density remain independent slots; long action content wraps within narrow layouts.
|
|
378
|
+
|
|
371
379
|
`StarRating` takes a controlled numeric `value` from 0 to 5, `onValueChange`, and an accessible `label`. Its native radio buttons support keyboard selection and an Unrated option to clear the rating. Set `disabled` while saving. `Avatar shape="square"` displays square artwork with matching image, fallback, and border corners.
|
|
372
380
|
|
|
373
381
|
`DialogContent size="wide"` uses a desktop maximum width of 576px; `size="narrow"` uses 192px, and the default uses 384px. Dialogs remain bounded by the viewport. `FieldGroup columns={2}` arranges fields in two columns on desktop and one on mobile.
|
package/llms.txt
CHANGED
|
@@ -336,6 +336,8 @@ Generated from the public package exports and Storybook sources.
|
|
|
336
336
|
- [DataGridColumnOptions](./llms/components/data-display/DataGridColumnOptions.md)
|
|
337
337
|
- [DataGridFilterSummary](./llms/components/data-display/DataGridFilterSummary.md)
|
|
338
338
|
- [DataGridFilters](./llms/components/data-display/DataGridFilters.md)
|
|
339
|
+
- [DataGridSelectCell](./llms/components/data-display/DataGridSelectCell.md)
|
|
340
|
+
- [DataGridSelectHeader](./llms/components/data-display/DataGridSelectHeader.md)
|
|
339
341
|
- [DataViewer](./llms/components/data-display/DataViewer.md)
|
|
340
342
|
- [Item](./llms/components/data-display/Item.md)
|
|
341
343
|
- [JsonRender](./llms/components/data-display/JsonRender.md)
|