@alexgorbatchev/shadcn 0.0.27 → 0.0.29
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 +24 -24
- package/THIRD_PARTY_NOTICES.md +5 -1
- package/dist/{chunk-g73meny4.js → chunk-3z5gpbh0.js} +1 -1
- package/dist/{chunk-0y0kqaqj.js → chunk-v0k5jnk5.js} +20 -1
- package/dist/components/Table.d.ts +6 -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 +1 -1
- package/dist/components/event-calendar/index.js +12614 -11
- package/dist/components/gantt/index.js +1 -1
- package/dist/components/virtual-table/VirtualTable.d.ts +1 -2
- package/dist/components/virtual-table/index.js +1 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -1
- package/licenses/event-calendar.txt +497 -0
- package/llms/components/data-display/Table.md +35 -1
- package/llms/components/data-display/VirtualTable.md +30 -2
- package/llms/setup.md +24 -24
- package/package.json +4 -7
|
@@ -9,7 +9,7 @@ Source: src/components/stories/data-display/VirtualTable.stories.tsx
|
|
|
9
9
|
|
|
10
10
|
```tsx
|
|
11
11
|
import { VirtualTable } from "@alexgorbatchev/shadcn/virtual-table";
|
|
12
|
-
import { TableCell, TableHead, TableRow, Button } from "@alexgorbatchev/shadcn";
|
|
12
|
+
import { TableCell, TableColumn, TableColumnGroup, TableHead, TableRow, Button } from "@alexgorbatchev/shadcn";
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Default component
|
|
@@ -26,7 +26,6 @@ VirtualTable
|
|
|
26
26
|
getItemKey: (item) => item,
|
|
27
27
|
label: "Items",
|
|
28
28
|
maxHeight: 300,
|
|
29
|
-
columnCount: 1,
|
|
30
29
|
header: (<TableRow>
|
|
31
30
|
<TableHead scope="col">Name</TableHead>
|
|
32
31
|
</TableRow>),
|
|
@@ -55,3 +54,32 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
|
|
|
55
54
|
args: { retainedKeys: ["Item 500"] }
|
|
56
55
|
}
|
|
57
56
|
```
|
|
57
|
+
|
|
58
|
+
### ResponsiveColumns
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
{
|
|
62
|
+
args: {
|
|
63
|
+
columns: (<TableColumnGroup>
|
|
64
|
+
<TableColumn />
|
|
65
|
+
<TableColumn visibleFrom="container-sm" style={{ width: 80 }}/>
|
|
66
|
+
<TableColumn style={{ width: 60 }}/>
|
|
67
|
+
</TableColumnGroup>),
|
|
68
|
+
header: (<TableRow>
|
|
69
|
+
<TableHead scope="col">Name</TableHead>
|
|
70
|
+
<TableHead scope="col" visibleFrom="container-sm">
|
|
71
|
+
Kind
|
|
72
|
+
</TableHead>
|
|
73
|
+
<TableHead scope="col">Size</TableHead>
|
|
74
|
+
</TableRow>),
|
|
75
|
+
renderRow: (item, props) => (<TableRow {...props}>
|
|
76
|
+
<TableCell>{item}</TableCell>
|
|
77
|
+
<TableCell visibleFrom="container-sm">File</TableCell>
|
|
78
|
+
<TableCell>1 KB</TableCell>
|
|
79
|
+
</TableRow>),
|
|
80
|
+
},
|
|
81
|
+
render: (args) => (<div style={{ width: 350 }}>
|
|
82
|
+
<VirtualTable {...args}/>
|
|
83
|
+
</div>)
|
|
84
|
+
}
|
|
85
|
+
```
|
package/llms/setup.md
CHANGED
|
@@ -50,28 +50,28 @@ Package preparation and contributor commands are documented in [AGENTS.md](https
|
|
|
50
50
|
|
|
51
51
|
Import shared controls and providers from `@alexgorbatchev/shadcn`. Import the following features from their dedicated entry points and install only the peers you use. These features, their hooks, and their types are not exported from the package root.
|
|
52
52
|
|
|
53
|
-
| Import path suffix | Components | Install alongside the package
|
|
54
|
-
| ------------------- | -------------------------------------------------------- |
|
|
55
|
-
| `/chart` | Chart parts, AnalyticsChart, Sparkline, hooks and types | `bun add recharts@3.8.0 cssesc@3.0.0 es-toolkit@1.52.0`
|
|
56
|
-
| `/calendar` | Calendar, CalendarDayButton, DatePicker, DateRangePicker | `bun add @daypicker/react@^10.0.2`
|
|
57
|
-
| `/persian-calendar` | PersianCalendar | `bun add @daypicker/persian@^10.0.2 @daypicker/react@^10.0.2`
|
|
58
|
-
| `/carousel` | Carousel components, useCarousel, and carousel types | `bun add embla-carousel-react@^8.6.0`
|
|
59
|
-
| `/command` | Command components, including CommandDialog | `bun add cmdk@^1.1.1`
|
|
60
|
-
| `/resizable` | Resizable components and SplitView | `bun add react-resizable-panels@^4.14.3`
|
|
61
|
-
| `/fonts.css` | JetBrains Mono font stylesheet | `bun add @fontsource-variable/jetbrains-mono@^5.3.0`
|
|
62
|
-
| `/sonner` | Sonner, SonnerToaster, Toaster, toast, useSonner | No additional install; patched implementation is bundled
|
|
63
|
-
| `/input-otp` | InputOTP components | No additional install; patched implementation is bundled
|
|
64
|
-
| `/virtual-table` | VirtualTable and row measurement props | `@tanstack/react-virtual@3.14.13`
|
|
65
|
-
| `/message-scroller` | MessageScroller components, hooks, and types | No additional install; patched implementation is bundled
|
|
66
|
-
| `/questionnaire` | Questionnaire components and types | No additional install; patched implementation is bundled
|
|
67
|
-
| `/data-grid` | DataGrid and native table helpers | `bun add @tanstack/react-table@9.2.8`
|
|
68
|
-
| `/file-upload` | FileUpload selection and validation | `bun add react-dropzone@^20.1.4`
|
|
69
|
-
| `/color-picker` | ColorPicker | `bun add react-colorful@^5.8.1`
|
|
70
|
-
| `/image-crop` | ImageCrop and native export helpers | `bun add react-image-crop@^11.1.2`
|
|
71
|
-
| `/tree` | Tree, native hooks and features | `bun add @headless-tree/core@^1.8.0 @headless-tree/react@^1.8.0`
|
|
72
|
-
| `/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`
|
|
73
|
-
| `/event-calendar` | EventCalendar, EventForm and native calendar APIs | `bun add
|
|
74
|
-
| `/gantt` | Gantt and Roadmap | `bun add date-fns@^4.4.0 @date-fns/tz@^1.5.0`
|
|
53
|
+
| Import path suffix | Components | Install alongside the package |
|
|
54
|
+
| ------------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
55
|
+
| `/chart` | Chart parts, AnalyticsChart, Sparkline, hooks and types | `bun add recharts@3.8.0 cssesc@3.0.0 es-toolkit@1.52.0` |
|
|
56
|
+
| `/calendar` | Calendar, CalendarDayButton, DatePicker, DateRangePicker | `bun add @daypicker/react@^10.0.2` |
|
|
57
|
+
| `/persian-calendar` | PersianCalendar | `bun add @daypicker/persian@^10.0.2 @daypicker/react@^10.0.2` |
|
|
58
|
+
| `/carousel` | Carousel components, useCarousel, and carousel types | `bun add embla-carousel-react@^8.6.0` |
|
|
59
|
+
| `/command` | Command components, including CommandDialog | `bun add cmdk@^1.1.1` |
|
|
60
|
+
| `/resizable` | Resizable components and SplitView | `bun add react-resizable-panels@^4.14.3` |
|
|
61
|
+
| `/fonts.css` | JetBrains Mono font stylesheet | `bun add @fontsource-variable/jetbrains-mono@^5.3.0` |
|
|
62
|
+
| `/sonner` | Sonner, SonnerToaster, Toaster, toast, useSonner | No additional install; patched implementation is bundled |
|
|
63
|
+
| `/input-otp` | InputOTP components | No additional install; patched implementation is bundled |
|
|
64
|
+
| `/virtual-table` | VirtualTable and row measurement props | `@tanstack/react-virtual@3.14.13` |
|
|
65
|
+
| `/message-scroller` | MessageScroller components, hooks, and types | No additional install; patched implementation is bundled |
|
|
66
|
+
| `/questionnaire` | Questionnaire components and types | No additional install; patched implementation is bundled |
|
|
67
|
+
| `/data-grid` | DataGrid and native table helpers | `bun add @tanstack/react-table@9.2.8` |
|
|
68
|
+
| `/file-upload` | FileUpload selection and validation | `bun add react-dropzone@^20.1.4` |
|
|
69
|
+
| `/color-picker` | ColorPicker | `bun add react-colorful@^5.8.1` |
|
|
70
|
+
| `/image-crop` | ImageCrop and native export helpers | `bun add react-image-crop@^11.1.2` |
|
|
71
|
+
| `/tree` | Tree, native hooks and features | `bun add @headless-tree/core@^1.8.0 @headless-tree/react@^1.8.0` |
|
|
72
|
+
| `/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` |
|
|
73
|
+
| `/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` |
|
|
74
|
+
| `/gantt` | Gantt and Roadmap | `bun add date-fns@^4.4.0 @date-fns/tz@^1.5.0` |
|
|
75
75
|
|
|
76
76
|
Import `@alexgorbatchev/shadcn/event-calendar.css` for EventCalendar, and `react-image-crop/dist/ReactCrop.css` for ImageCrop. The root also provides application shells, dashboard and billing layouts, authentication/settings forms, account/workspace controls, Kanban, facets, tags, number fields, toolbars, meters, stat cards and status displays. See the [component catalog reference](https://github.com/alexgorbatchev/shadcn/blob/main/docs/internal/component-catalog.md) for source groups, native APIs, dependency costs and consumer responsibilities.
|
|
77
77
|
|
|
@@ -83,7 +83,7 @@ import { ChartContainer, type ChartConfig } from "@alexgorbatchev/shadcn/chart";
|
|
|
83
83
|
import { Carousel, CarouselContent, CarouselItem } from "@alexgorbatchev/shadcn/carousel";
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
The patched `sonner`, `input-otp`, and `@shadcn/react` packages remain regular dependencies pending upstream fixes. `@base-ui/utils` is a regular dependency at the exact version `@base-ui/react` requires, so the portal components share Base UI's own ref merging without installing a second copy. Other feature dependencies are optional peers, so a core-only installation does not request them. Shared providers work across entry points.
|
|
86
|
+
The patched `sonner`, `input-otp`, and `@shadcn/react` packages remain regular dependencies pending upstream fixes. `react-big-calendar` is also a regular dependency: the calendar and its patched `uncontrollable` wrapper are bundled so React 19 consumers receive the JSX-runtime fix even when their package manager does not apply Bun patches. The corrected calendar runtime is isolated behind `/event-calendar`; React and declared peers remain external. This exception increases the installed dependency size even for core-only consumers. `@base-ui/utils` is a regular dependency at the exact version `@base-ui/react` requires, so the portal components share Base UI's own ref merging without installing a second copy. Other feature dependencies are optional peers, so a core-only installation does not request them. Shared providers work across entry points.
|
|
87
87
|
|
|
88
88
|
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.
|
|
89
89
|
|
|
@@ -300,7 +300,7 @@ Compose `QuestionnaireItem`, `QuestionnaireTitle`, and answer controls inside `Q
|
|
|
300
300
|
|
|
301
301
|
`InlineEdit` mounts an edit session with a controlled `value`, `onValueChange`, `onCommit`, and `onCancel`. Mount it in place of the displayed label. Its input focuses and selects its text by default; `shouldSelectOnMount={false}` preserves the initial caret. Enter or blur commits once, Escape cancels without committing, and asynchronous saves disable the input until completion. Rejected saves display an error and allow retry.
|
|
302
302
|
|
|
303
|
-
`VirtualTable` renders a bounded, dynamically measured set of native table rows using TanStack Virtual. Supply `items`, stable `getItemKey`, `header`, `
|
|
303
|
+
`VirtualTable` renders a bounded, dynamically measured set of native table rows using TanStack Virtual. Supply `items`, stable `getItemKey`, `header`, `label`, and `renderRow`; spread the supplied measurement props onto each native row. Optional `columns` accepts a `TableColumnGroup`; responsive columns keep their widths aligned with cells that share their `visibleFrom`. `maxHeight` defaults to `65vh`, `estimateRowHeight` to 80 pixels, and `overscan` to five rows. `retainedKeys` keeps editing rows mounted; the focused row is retained automatically. Filtering and selection belong to the consumer.
|
|
304
304
|
|
|
305
305
|
`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.
|
|
306
306
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexgorbatchev/shadcn",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"description": "Sharp, monospace React components with compact and comfortable densities.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"patches",
|
|
15
15
|
"LICENSE",
|
|
16
16
|
"THIRD_PARTY_NOTICES.md",
|
|
17
|
-
"assistant-ui-catalog.json"
|
|
17
|
+
"assistant-ui-catalog.json",
|
|
18
|
+
"licenses"
|
|
18
19
|
],
|
|
19
20
|
"type": "module",
|
|
20
21
|
"sideEffects": [
|
|
@@ -1059,6 +1060,7 @@
|
|
|
1059
1060
|
"clsx": "^2.1.1",
|
|
1060
1061
|
"input-otp": "1.5.0",
|
|
1061
1062
|
"lucide-react": "^1.53.0",
|
|
1063
|
+
"react-big-calendar": "1.20.0",
|
|
1062
1064
|
"sonner": "2.0.8",
|
|
1063
1065
|
"tailwind-merge": "^3.7.0",
|
|
1064
1066
|
"tw-animate-css": "^1.4.0",
|
|
@@ -1124,7 +1126,6 @@
|
|
|
1124
1126
|
"oxlint": "^1.87.0",
|
|
1125
1127
|
"parse-diff": "0.12.0",
|
|
1126
1128
|
"playwright": "^1.64.0",
|
|
1127
|
-
"react-big-calendar": "1.20.0",
|
|
1128
1129
|
"react-colorful": "5.8.1",
|
|
1129
1130
|
"react-dropzone": "20.1.4",
|
|
1130
1131
|
"react-hook-form": "7.89.0",
|
|
@@ -1181,7 +1182,6 @@
|
|
|
1181
1182
|
"leaflet": "^1.9.4",
|
|
1182
1183
|
"parse-diff": "0.12.0",
|
|
1183
1184
|
"react": "^19.3.0",
|
|
1184
|
-
"react-big-calendar": "^1.20.0",
|
|
1185
1185
|
"react-colorful": "^5.8.1",
|
|
1186
1186
|
"react-dom": "^19.3.0",
|
|
1187
1187
|
"react-dropzone": "^20.1.4",
|
|
@@ -1326,9 +1326,6 @@
|
|
|
1326
1326
|
"@tanstack/react-table": {
|
|
1327
1327
|
"optional": true
|
|
1328
1328
|
},
|
|
1329
|
-
"react-big-calendar": {
|
|
1330
|
-
"optional": true
|
|
1331
|
-
},
|
|
1332
1329
|
"@types/react-big-calendar": {
|
|
1333
1330
|
"optional": true
|
|
1334
1331
|
}
|