@alexgorbatchev/shadcn 0.0.53 → 0.0.55

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.
Files changed (36) hide show
  1. package/README.md +6 -1
  2. package/THIRD_PARTY_NOTICES.md +2 -0
  3. package/dist/{chunk-rc99vk8d.js → chunk-06ky09dc.js} +1 -1
  4. package/dist/{chunk-yrp7xtb5.js → chunk-6j8ksqt9.js} +1 -1
  5. package/dist/{chunk-5rxjvjkq.js → chunk-98s6zk9v.js} +1 -1
  6. package/dist/{chunk-zs390b72.js → chunk-aye7r5mq.js} +12 -6
  7. package/dist/{chunk-k7cvfw0f.js → chunk-bmyw7q4w.js} +1 -1
  8. package/dist/{chunk-zs4h45d8.js → chunk-k45r2rz0.js} +1 -1
  9. package/dist/{chunk-xfryhw7e.js → chunk-p6z2m3zp.js} +3 -1
  10. package/dist/{chunk-tjn53x34.js → chunk-tmr0jqv8.js} +4 -2
  11. package/dist/{chunk-p894n7r6.js → chunk-x7emg3jx.js} +2 -2
  12. package/dist/components/OptionSelect.d.ts +3 -1
  13. package/dist/components/Table.d.ts +2 -1
  14. package/dist/components/ThemeProvider.d.ts +2 -1
  15. package/dist/components/assistant-ui/elements/DataTable.js +2 -2
  16. package/dist/components/assistant-ui/index.js +2 -2
  17. package/dist/components/assistant-ui/native/McpConfigDialog.js +2 -2
  18. package/dist/components/assistant-ui/native/index.js +2 -2
  19. package/dist/components/calendar/index.js +2 -2
  20. package/dist/components/data-grid/index.js +3 -3
  21. package/dist/components/gantt/index.js +3 -3
  22. package/dist/components/json-render/index.js +4 -4
  23. package/dist/components/persian-calendar/index.js +2 -2
  24. package/dist/components/virtual-data-grid/index.js +4 -4
  25. package/dist/components/virtual-table/index.js +2 -2
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.js +4 -4
  28. package/dist/prototype.js +1 -1
  29. package/dist/theme/types.d.ts +2 -0
  30. package/dist/theme.css +99 -6
  31. package/llms/components/data-display/TableResponsive.md +34 -0
  32. package/llms/components/forms/OptionSelect.md +15 -1
  33. package/llms/components/providers/ThemeProvider.md +8 -0
  34. package/llms/setup.md +6 -1
  35. package/llms.txt +1 -0
  36. package/package.json +1 -1
package/README.md CHANGED
@@ -198,10 +198,15 @@ An independent production Vite consumer installed from the archive verifies RTL
198
198
  | `ThemeProvider.defaultTheme` | `"light" \| "dark" \| "system"` | `"system"` | Initial preference when storage has no saved value. |
199
199
  | `ThemeProvider.storageKey` | `string` | `"shadcn-alexgorbatchev-theme"` | Local storage key for the preference. |
200
200
  | `ThemeProvider.forcedTheme` | `"light" \| "dark"` | unset | Overrides the displayed palette without changing the saved preference. |
201
+ | `ThemeProvider.preset` | `"devhost" \| "shadcn"` | `"devhost"` | Document-wide design preset, independent of color mode and density. |
201
202
  | `DensityProvider.density` | `"compact" \| "comfortable"` | `"comfortable"` | Density for descendants and their portals. |
202
203
  | Component `density` | `"compact" \| "comfortable"` | inherited | Local override on styled components that expose the prop. |
203
204
 
204
- `useTheme()` returns `theme`, `resolvedTheme`, and `setTheme`. Call `setTheme("light")`, `setTheme("dark")`, or `setTheme("system")` from a component inside the provider.
205
+ `useTheme()` returns `theme`, `resolvedTheme`, `setTheme`, and `preset`. Call `setTheme("light")`, `setTheme("dark")`, or `setTheme("system")` from a component inside the provider.
206
+
207
+ Use `<ThemeProvider preset="shadcn" defaultTheme="system">` for the [default shadcn Neutral palette](https://ui.shadcn.com/docs/theming), system sans-serif text, and its rounded corner scale. The default `devhost` preset uses the package's monospace design and sharp corners. Both presets support light, dark, and system modes, including portaled content. Code retains the monospace font. Density, component composition, and package-specific status colors remain independent of the preset.
208
+
209
+ The preset is controlled by the prop; changing it updates the document without changing the saved color-mode preference. Persist that prop in your application if needed. Storybook exposes the same choice in its **Design** toolbar. For a page styled before React mounts, set `data-theme-preset="shadcn"` and `data-theme="light"` or `"dark"` on `<html>` to match the provider. The existing `theme.css` import and `@source` setup cover both presets.
205
210
 
206
211
  Override tokens after the theme imports. This example uses the existing success palette as the primary accent:
207
212
 
@@ -14,6 +14,8 @@ Questionnaire adapts the official registry's fifteen styled parts around `@shadc
14
14
 
15
15
  ## shadcn/ui
16
16
 
17
+ The `shadcn` design preset in `src/theme.css` adapts the default Neutral light/dark palette and radius scale from https://ui.shadcn.com/docs/theming, retrieved on 2026-10-31. It preserves the package's independent density and status tokens and uses document data attributes for selection. The upstream MIT notice below covers these tokens.
18
+
17
19
  Questionnaire's NativeChoiceKeyboard and ItemArrowNavigation Storybook interactions adapt the native choice-navigation and contextual horizontal-arrow browser tests from `packages/react/src/questionnaire/questionnaire.browser.test.tsx` at upstream commit `3d98900e9b73c45f035f8109e9d41ba6a51685e7` (https://github.com/shadcn-ui/ui). Local changes use this package's styled compositions, Storybook's play context and accessible queries, and assert unanswered-item guards, focus, selection and submitted answers. The upstream MIT notice below covers these adaptations.
18
20
 
19
21
  Sidebar adapts the official provider and styled parts, preserving custom render/ref contracts, keyboard toggling within each provider, consumer-owned persistence, and native mobile Sheet behavior. Local changes support density, cancelled toggle events, observation without controlled state, inert offcanvas panels, configured mobile widths, and centered icons with accessible collapsed labels. Separator uses Base UI's current orientation attributes, and Tooltip preserves native state callbacks.
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-en44w1pn.js";
10
10
  import {
11
11
  OptionSelect2
12
- } from "./chunk-xfryhw7e.js";
12
+ } from "./chunk-p6z2m3zp.js";
13
13
  import {
14
14
  Badge2
15
15
  } from "./chunk-9t530p75.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-bd09gygt.js";
7
7
  import {
8
8
  OptionSelect2
9
- } from "./chunk-xfryhw7e.js";
9
+ } from "./chunk-p6z2m3zp.js";
10
10
  import {
11
11
  useAnalyticsCallback
12
12
  } from "./chunk-5mydsjp3.js";
@@ -24,7 +24,7 @@ import {
24
24
  TableHead2,
25
25
  TableCell2,
26
26
  TableCaption2
27
- } from "./chunk-tjn53x34.js";
27
+ } from "./chunk-tmr0jqv8.js";
28
28
  import {
29
29
  safeHref
30
30
  } from "./chunk-xhtsnwnb.js";
@@ -117,7 +117,7 @@ import {
117
117
  SelectContent2,
118
118
  SelectItem2,
119
119
  OptionSelect2
120
- } from "./chunk-xfryhw7e.js";
120
+ } from "./chunk-p6z2m3zp.js";
121
121
  import {
122
122
  ThemeContext
123
123
  } from "./chunk-1j2hz3w9.js";
@@ -1111,13 +1111,15 @@ function StoredThemeProvider({
1111
1111
  children,
1112
1112
  defaultTheme = "system",
1113
1113
  storageKey = "shadcn-alexgorbatchev-theme",
1114
- forcedTheme
1114
+ forcedTheme,
1115
+ preset = "devhost"
1115
1116
  }) {
1116
1117
  const { isDarkMode, ternaryDarkMode, setTernaryDarkMode } = useTernaryDarkMode({
1117
1118
  defaultValue: defaultTheme,
1118
1119
  localStorageKey: storageKey
1119
1120
  });
1120
1121
  return /* @__PURE__ */ jsx12(ThemePalette, {
1122
+ preset,
1121
1123
  theme: forcedTheme ?? ternaryDarkMode,
1122
1124
  resolvedTheme: forcedTheme ?? (isDarkMode ? "dark" : "light"),
1123
1125
  setTheme: setTernaryDarkMode,
@@ -1128,13 +1130,15 @@ function ThemePalette({
1128
1130
  children,
1129
1131
  theme,
1130
1132
  resolvedTheme,
1131
- setTheme
1133
+ setTheme,
1134
+ preset
1132
1135
  }) {
1133
1136
  useIsomorphicLayoutEffect(() => {
1134
1137
  document.documentElement.dataset.theme = resolvedTheme;
1138
+ document.documentElement.dataset.themePreset = preset;
1135
1139
  document.documentElement.style.colorScheme = resolvedTheme;
1136
- }, [resolvedTheme]);
1137
- const value = useMemo(() => ({ theme, resolvedTheme, setTheme }), [theme, resolvedTheme, setTheme]);
1140
+ }, [resolvedTheme, preset]);
1141
+ const value = useMemo(() => ({ theme, resolvedTheme, setTheme, preset }), [theme, resolvedTheme, setTheme, preset]);
1138
1142
  return /* @__PURE__ */ jsxs8(ThemeContext.Provider, {
1139
1143
  value,
1140
1144
  children: [
@@ -1147,7 +1151,8 @@ function ThemePalette({
1147
1151
  function ControlledThemeProvider({
1148
1152
  children,
1149
1153
  controlledTheme,
1150
- forcedTheme
1154
+ forcedTheme,
1155
+ preset = "devhost"
1151
1156
  }) {
1152
1157
  const isDark = useMediaQuery("(prefers-color-scheme: dark)");
1153
1158
  const { theme, setTheme } = controlledTheme;
@@ -1156,6 +1161,7 @@ function ControlledThemeProvider({
1156
1161
  theme: forcedTheme ?? theme,
1157
1162
  resolvedTheme,
1158
1163
  setTheme,
1164
+ preset,
1159
1165
  children
1160
1166
  });
1161
1167
  }
@@ -2,7 +2,7 @@ import {
2
2
  Table2,
3
3
  TableHeader2,
4
4
  TableBody2
5
- } from "./chunk-tjn53x34.js";
5
+ } from "./chunk-tmr0jqv8.js";
6
6
 
7
7
  // src/components/virtual-table/VirtualTable.tsx
8
8
  import {
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-bd09gygt.js";
13
13
  import {
14
14
  OptionSelect2
15
- } from "./chunk-xfryhw7e.js";
15
+ } from "./chunk-p6z2m3zp.js";
16
16
  import {
17
17
  useAnalyticsCallback
18
18
  } from "./chunk-5mydsjp3.js";
@@ -183,7 +183,8 @@ function OptionSelect2({
183
183
  width = "fit",
184
184
  density,
185
185
  analytics,
186
- "aria-label": ariaLabel
186
+ "aria-label": ariaLabel,
187
+ "aria-describedby": ariaDescribedBy
187
188
  }) {
188
189
  return /* @__PURE__ */ jsxs2(Select2, {
189
190
  items: options,
@@ -201,6 +202,7 @@ function OptionSelect2({
201
202
  /* @__PURE__ */ jsx2(SelectTrigger2, {
202
203
  id,
203
204
  "aria-label": ariaLabel,
205
+ "aria-describedby": ariaDescribedBy,
204
206
  density,
205
207
  size,
206
208
  className: cn2(width === "full" && "w-full"),
@@ -59,13 +59,15 @@ var visibilityClasses = {
59
59
  sm: "hidden sm:table-cell",
60
60
  lg: "hidden lg:table-cell",
61
61
  "container-sm": "hidden @min-[400px]/table:table-cell",
62
- "container-md": "hidden @min-[480px]/table:table-cell"
62
+ "container-md": "hidden @min-[480px]/table:table-cell",
63
+ "container-lg": "hidden @min-[640px]/table:table-cell"
63
64
  };
64
65
  var columnVisibilityClasses = {
65
66
  sm: "hidden sm:table-column",
66
67
  lg: "hidden lg:table-column",
67
68
  "container-sm": "hidden @min-[400px]/table:table-column",
68
- "container-md": "hidden @min-[480px]/table:table-column"
69
+ "container-md": "hidden @min-[480px]/table:table-column",
70
+ "container-lg": "hidden @min-[640px]/table:table-column"
69
71
  };
70
72
  function TableHead2({
71
73
  density,
@@ -10,10 +10,10 @@ import {
10
10
  TableCell2,
11
11
  TableColumnGroup2,
12
12
  TableColumn2
13
- } from "./chunk-tjn53x34.js";
13
+ } from "./chunk-tmr0jqv8.js";
14
14
  import {
15
15
  OptionSelect2
16
- } from "./chunk-xfryhw7e.js";
16
+ } from "./chunk-p6z2m3zp.js";
17
17
  import {
18
18
  Input2
19
19
  } from "./chunk-7vg045gd.js";
@@ -22,8 +22,10 @@ type OptionSelectProps = IDensityProps & IAnalyticsProps & {
22
22
  /** `full` fills a form field; `fit` sits inline in a toolbar. */
23
23
  width?: "fit" | "full";
24
24
  "aria-label"?: string;
25
+ /** IDs of elements describing the select trigger. */
26
+ "aria-describedby"?: string;
25
27
  };
26
28
  /** A styled single-value `Select` for the common case of a flat list of options. */
27
- declare function OptionSelect({ options, value, defaultValue, onValueChange, placeholder, name, id, disabled, required, size, width, density, analytics, "aria-label": ariaLabel, }: OptionSelectProps): ReactElement;
29
+ declare function OptionSelect({ options, value, defaultValue, onValueChange, placeholder, name, id, disabled, required, size, width, density, analytics, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, }: OptionSelectProps): ReactElement;
28
30
  export { OptionSelect };
29
31
  export type { OptionSelectOption, OptionSelectProps };
@@ -14,7 +14,8 @@ declare function TableFooter({ density, className, ...props }: TableFooterProps)
14
14
  type TableRowProps = ComponentProps<"tr"> & IDensityProps;
15
15
  declare function TableRow({ density, className, ...props }: TableRowProps): ReactElement;
16
16
  type TableTextAlign = TextAlign;
17
- type TableVisibility = "sm" | "lg" | "container-sm" | "container-md";
17
+ /** Viewport breakpoints, or table-container breakpoints at 400, 480, and 640 pixels. */
18
+ type TableVisibility = "sm" | "lg" | "container-sm" | "container-md" | "container-lg";
18
19
  interface ITableCellOptions {
19
20
  truncate?: boolean;
20
21
  textAlign?: TableTextAlign;
@@ -1,7 +1,8 @@
1
1
  import { type ReactElement, type ReactNode } from "react";
2
- import type { IThemeContextValue, ResolvedTheme, ThemeMode } from "../theme/types.js";
2
+ import type { IThemeContextValue, ResolvedTheme, ThemeMode, ThemePreset } from "../theme/types.js";
3
3
  export interface IThemeProviderProps {
4
4
  children: ReactNode;
5
+ preset?: ThemePreset;
5
6
  defaultTheme?: ThemeMode;
6
7
  storageKey?: string;
7
8
  forcedTheme?: ResolvedTheme;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  DataTable2
3
- } from "../../../chunk-5rxjvjkq.js";
3
+ } from "../../../chunk-98s6zk9v.js";
4
4
  import"../../../chunk-1wz92wgg.js";
5
- import"../../../chunk-tjn53x34.js";
5
+ import"../../../chunk-tmr0jqv8.js";
6
6
  import"../../../chunk-k1f35j55.js";
7
7
  import"../../../chunk-m4geb1s5.js";
8
8
  import"../../../chunk-9t530p75.js";
@@ -203,8 +203,8 @@ import"../../chunk-1wz92wgg.js";
203
203
  import"../../chunk-9t530p75.js";
204
204
  import {
205
205
  DataTable2
206
- } from "../../chunk-5rxjvjkq.js";
207
- import"../../chunk-tjn53x34.js";
206
+ } from "../../chunk-98s6zk9v.js";
207
+ import"../../chunk-tmr0jqv8.js";
208
208
  import {
209
209
  DaySeparator2
210
210
  } from "../../chunk-3j9enr2q.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  McpConfigDialog2
3
- } from "../../../chunk-rc99vk8d.js";
3
+ } from "../../../chunk-06ky09dc.js";
4
4
  import"../../../chunk-m4geb1s5.js";
5
5
  import"../../../chunk-9t530p75.js";
6
6
  import"../../../chunk-m32ptxf3.js";
7
7
  import"../../../chunk-tcefvfr8.js";
8
- import"../../../chunk-xfryhw7e.js";
8
+ import"../../../chunk-p6z2m3zp.js";
9
9
  import"../../../chunk-4t23yhc0.js";
10
10
  import"../../../chunk-7vg045gd.js";
11
11
  import"../../../chunk-7jpsybag.js";
@@ -133,12 +133,12 @@ import"../../../chunk-dyg4pwcd.js";
133
133
  import {
134
134
  DirectiveText2
135
135
  } from "../../../chunk-n8n3gp71.js";
136
- import"../../../chunk-xfryhw7e.js";
136
+ import"../../../chunk-p6z2m3zp.js";
137
137
  import"../../../chunk-m32ptxf3.js";
138
138
  import"../../../chunk-52aadmkc.js";
139
139
  import {
140
140
  McpConfigDialog2
141
- } from "../../../chunk-rc99vk8d.js";
141
+ } from "../../../chunk-06ky09dc.js";
142
142
  import"../../../chunk-ptdr68cq.js";
143
143
  import"../../../chunk-65xd5we6.js";
144
144
  import {
@@ -10,8 +10,8 @@ import {
10
10
  import {
11
11
  Calendar2,
12
12
  CalendarDayButton2
13
- } from "../../chunk-yrp7xtb5.js";
14
- import"../../chunk-xfryhw7e.js";
13
+ } from "../../chunk-6j8ksqt9.js";
14
+ import"../../chunk-p6z2m3zp.js";
15
15
  import {
16
16
  Popover2,
17
17
  PopoverTrigger2,
@@ -7,8 +7,8 @@ import"../../chunk-jpvw9xqy.js";
7
7
  import {
8
8
  Button2
9
9
  } from "../../chunk-bd09gygt.js";
10
- import"../../chunk-tjn53x34.js";
11
- import"../../chunk-xfryhw7e.js";
10
+ import"../../chunk-tmr0jqv8.js";
11
+ import"../../chunk-p6z2m3zp.js";
12
12
  import"../../chunk-7jpsybag.js";
13
13
  import"../../chunk-7vg045gd.js";
14
14
  import {
@@ -19,7 +19,7 @@ import {
19
19
  DataGridColumnHeader2,
20
20
  DataGridFilter2,
21
21
  DataGridPagination2
22
- } from "../../chunk-p894n7r6.js";
22
+ } from "../../chunk-x7emg3jx.js";
23
23
  import {
24
24
  Checkbox2
25
25
  } from "../../chunk-b5s5y5wq.js";
@@ -7,7 +7,7 @@ import {
7
7
  DragSource2,
8
8
  DropTarget2,
9
9
  Kanban2
10
- } from "../../chunk-zs4h45d8.js";
10
+ } from "../../chunk-k45r2rz0.js";
11
11
  import"../../chunk-en44w1pn.js";
12
12
  import"../../chunk-9t530p75.js";
13
13
  import"../../chunk-7ny0vyek.js";
@@ -20,7 +20,7 @@ import {
20
20
  } from "../../chunk-bd09gygt.js";
21
21
  import {
22
22
  OptionSelect2
23
- } from "../../chunk-xfryhw7e.js";
23
+ } from "../../chunk-p6z2m3zp.js";
24
24
  import {
25
25
  Table2,
26
26
  TableHeader2,
@@ -28,7 +28,7 @@ import {
28
28
  TableRow2,
29
29
  TableHead2,
30
30
  TableCell2
31
- } from "../../chunk-tjn53x34.js";
31
+ } from "../../chunk-tmr0jqv8.js";
32
32
  import"../../chunk-5mydsjp3.js";
33
33
 
34
34
  // src/components/gantt/Gantt.tsx
@@ -31,7 +31,7 @@ import {
31
31
  DrawerHeader2,
32
32
  DrawerTitle2,
33
33
  DrawerDescription2
34
- } from "../../chunk-zs390b72.js";
34
+ } from "../../chunk-aye7r5mq.js";
35
35
  import {
36
36
  MenuPopup,
37
37
  MenuItem2,
@@ -99,7 +99,7 @@ import {
99
99
  Tabs2,
100
100
  TabsList2,
101
101
  TabsTrigger2
102
- } from "../../chunk-zs4h45d8.js";
102
+ } from "../../chunk-k45r2rz0.js";
103
103
  import {
104
104
  Badge2
105
105
  } from "../../chunk-9t530p75.js";
@@ -113,7 +113,7 @@ import {
113
113
  SelectTrigger2,
114
114
  SelectContent2,
115
115
  SelectItem2
116
- } from "../../chunk-xfryhw7e.js";
116
+ } from "../../chunk-p6z2m3zp.js";
117
117
  import"../../chunk-1j2hz3w9.js";
118
118
  import"../../chunk-k99h6evz.js";
119
119
  import {
@@ -145,7 +145,7 @@ import {
145
145
  TableHead2,
146
146
  TableCell2,
147
147
  TableCaption2
148
- } from "../../chunk-tjn53x34.js";
148
+ } from "../../chunk-tmr0jqv8.js";
149
149
  import"../../chunk-7vnpp3ya.js";
150
150
  import"../../chunk-m4geb1s5.js";
151
151
  import"../../chunk-9ecf92s6.js";
@@ -11,8 +11,8 @@ import {
11
11
  getCalendarClassNames,
12
12
  CalendarDayButton2,
13
13
  CalendarDropdown
14
- } from "../../chunk-yrp7xtb5.js";
15
- import"../../chunk-xfryhw7e.js";
14
+ } from "../../chunk-6j8ksqt9.js";
15
+ import"../../chunk-p6z2m3zp.js";
16
16
  import {
17
17
  useAnalyticsCallback
18
18
  } from "../../chunk-5mydsjp3.js";
@@ -1,14 +1,14 @@
1
1
  import"../../chunk-en44w1pn.js";
2
2
  import {
3
3
  TableRow2
4
- } from "../../chunk-tjn53x34.js";
4
+ } from "../../chunk-tmr0jqv8.js";
5
5
  import"../../chunk-7ny0vyek.js";
6
6
  import"../../chunk-8ssktt4b.js";
7
7
  import"../../chunk-e6hk39ev.js";
8
8
  import"../../chunk-x90xmrba.js";
9
9
  import"../../chunk-jpvw9xqy.js";
10
10
  import"../../chunk-bd09gygt.js";
11
- import"../../chunk-xfryhw7e.js";
11
+ import"../../chunk-p6z2m3zp.js";
12
12
  import"../../chunk-7jpsybag.js";
13
13
  import"../../chunk-7vg045gd.js";
14
14
  import {
@@ -16,10 +16,10 @@ import {
16
16
  DataGridHeaderRows,
17
17
  DataGridCells2,
18
18
  DataGridColumns
19
- } from "../../chunk-p894n7r6.js";
19
+ } from "../../chunk-x7emg3jx.js";
20
20
  import {
21
21
  VirtualTable2
22
- } from "../../chunk-k7cvfw0f.js";
22
+ } from "../../chunk-bmyw7q4w.js";
23
23
  import"../../chunk-5mydsjp3.js";
24
24
 
25
25
  // src/components/virtual-data-grid/VirtualDataGrid.tsx
@@ -1,8 +1,8 @@
1
1
  import"../../chunk-en44w1pn.js";
2
- import"../../chunk-tjn53x34.js";
2
+ import"../../chunk-tmr0jqv8.js";
3
3
  import {
4
4
  VirtualTable2
5
- } from "../../chunk-k7cvfw0f.js";
5
+ } from "../../chunk-bmyw7q4w.js";
6
6
  export {
7
7
  VirtualTable2 as VirtualTable
8
8
  };
package/dist/index.d.ts CHANGED
@@ -47,7 +47,7 @@ export { ScrollGuard } from "./components/ScrollGuard.js";
47
47
  export type { IScrollGuardProps } from "./components/ScrollGuard.js";
48
48
  export type { IThemeProviderProps } from "./components/ThemeProvider.js";
49
49
  export { useTheme } from "./hooks/useTheme.js";
50
- export type { ThemeMode, ResolvedTheme, IThemeContextValue } from "./theme/types.js";
50
+ export type { ThemeMode, ResolvedTheme, ThemePreset, IThemeContextValue } from "./theme/types.js";
51
51
  export { useComboboxAnchor } from "./hooks/useComboboxAnchor.js";
52
52
  export { cn } from "./utils/cn.js";
53
53
  export { Toggle, toggleVariants } from "./components/Toggle.js";
package/dist/index.js CHANGED
@@ -171,7 +171,7 @@ import {
171
171
  StatusTracker2,
172
172
  DashboardLayout2,
173
173
  BillingUsage2
174
- } from "./chunk-zs390b72.js";
174
+ } from "./chunk-aye7r5mq.js";
175
175
  import {
176
176
  Tabs2,
177
177
  tabsListVariants2,
@@ -186,7 +186,7 @@ import {
186
186
  useDropTarget2,
187
187
  DropTarget2,
188
188
  Kanban2
189
- } from "./chunk-zs4h45d8.js";
189
+ } from "./chunk-k45r2rz0.js";
190
190
  import {
191
191
  Toolbar2,
192
192
  ToolbarButton2,
@@ -260,7 +260,7 @@ import {
260
260
  TableColumnGroup2,
261
261
  TableColumn2,
262
262
  TableCaption2
263
- } from "./chunk-tjn53x34.js";
263
+ } from "./chunk-tmr0jqv8.js";
264
264
  import {
265
265
  ScrollArea2,
266
266
  ScrollBar2
@@ -406,7 +406,7 @@ import {
406
406
  SelectScrollUpButton2,
407
407
  SelectScrollDownButton2,
408
408
  OptionSelect2
409
- } from "./chunk-xfryhw7e.js";
409
+ } from "./chunk-p6z2m3zp.js";
410
410
  import {
411
411
  Dialog2,
412
412
  DialogTrigger2,
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.53",
2054
+ version: "0.0.55",
2055
2055
  description: "Sharp, monospace React components with compact and comfortable densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
@@ -1,7 +1,9 @@
1
1
  import type { TernaryDarkMode } from "usehooks-ts";
2
2
  export type ThemeMode = TernaryDarkMode;
3
3
  export type ResolvedTheme = "light" | "dark";
4
+ export type ThemePreset = "devhost" | "shadcn";
4
5
  export interface IThemeContextValue {
6
+ preset: ThemePreset;
5
7
  theme: ThemeMode;
6
8
  resolvedTheme: ResolvedTheme;
7
9
  setTheme: (theme: ThemeMode) => void;
package/dist/theme.css CHANGED
@@ -46,16 +46,16 @@
46
46
  --color-sidebar-border: var(--sidebar-border, var(--border));
47
47
  --color-sidebar-ring: var(--sidebar-ring, var(--ring));
48
48
  --font-sans: var(--ag-font);
49
- --font-mono: var(--ag-font);
49
+ --font-mono: var(--ag-font-mono);
50
50
  --text-xs: var(--ag-text-xs);
51
51
  --text-sm: var(--ag-control-text);
52
52
  --text-base: var(--ag-text);
53
53
  --text-lg: var(--ag-heading);
54
- --radius-xs: 2px;
55
- --radius-sm: 2px;
56
- --radius-md: 4px;
57
- --radius-lg: 4px;
58
- --radius-xl: 4px;
54
+ --radius-xs: var(--ag-radius-xs);
55
+ --radius-sm: var(--ag-radius-sm);
56
+ --radius-md: var(--ag-radius-md);
57
+ --radius-lg: var(--radius);
58
+ --radius-xl: var(--ag-radius-xl);
59
59
  --spacing-control: var(--ag-control-h);
60
60
  --spacing-control-xs: calc(var(--ag-control-h) - 4px);
61
61
  --spacing-control-sm: calc(var(--ag-control-h) - 2px);
@@ -74,7 +74,13 @@
74
74
  @layer base {
75
75
  :root {
76
76
  --ag-font: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
77
+ --ag-font-mono:
78
+ "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
77
79
  --radius: 4px;
80
+ --ag-radius-xs: 2px;
81
+ --ag-radius-sm: 2px;
82
+ --ag-radius-md: 4px;
83
+ --ag-radius-xl: 4px;
78
84
  --ag-text-xs: 11px;
79
85
  --ag-control-text: 12px;
80
86
  --ag-text: 14px;
@@ -205,6 +211,93 @@
205
211
  --ag-shadow: 0 6px 22px rgb(0 0 0 / 0.3);
206
212
  }
207
213
 
214
+ [data-theme-preset="shadcn"] {
215
+ --ag-font:
216
+ ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
217
+ --radius: 0.625rem;
218
+ --ag-radius-xs: calc(var(--radius) * 0.4);
219
+ --ag-radius-sm: calc(var(--radius) * 0.6);
220
+ --ag-radius-md: calc(var(--radius) * 0.8);
221
+ --ag-radius-xl: calc(var(--radius) * 1.4);
222
+ --faint-foreground: var(--muted-foreground);
223
+ --destructive-soft: color-mix(in oklab, var(--destructive) 15%, transparent);
224
+ --frame-edge: var(--border);
225
+ --frame-halo: transparent;
226
+ --terminal-background: var(--background);
227
+ --ag-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
228
+ }
229
+
230
+ [data-theme-preset="shadcn"],
231
+ [data-theme-preset="shadcn"][data-theme="dark"] {
232
+ --background: oklch(0.145 0 0);
233
+ --foreground: oklch(0.985 0 0);
234
+ --card: oklch(0.205 0 0);
235
+ --card-foreground: oklch(0.985 0 0);
236
+ --popover: oklch(0.205 0 0);
237
+ --popover-foreground: oklch(0.985 0 0);
238
+ --primary: oklch(0.922 0 0);
239
+ --primary-foreground: oklch(0.205 0 0);
240
+ --secondary: oklch(0.269 0 0);
241
+ --secondary-foreground: oklch(0.985 0 0);
242
+ --muted: oklch(0.269 0 0);
243
+ --muted-foreground: oklch(0.708 0 0);
244
+ --accent: oklch(0.269 0 0);
245
+ --accent-foreground: oklch(0.985 0 0);
246
+ --destructive: oklch(0.704 0.191 22.216);
247
+ --destructive-foreground: oklch(0.145 0 0);
248
+ --border: oklch(1 0 0 / 10%);
249
+ --input: oklch(1 0 0 / 15%);
250
+ --ring: oklch(0.556 0 0);
251
+ --chart-1: oklch(0.488 0.243 264.376);
252
+ --chart-2: oklch(0.696 0.17 162.48);
253
+ --chart-3: oklch(0.769 0.188 70.08);
254
+ --chart-4: oklch(0.627 0.265 303.9);
255
+ --chart-5: oklch(0.645 0.246 16.439);
256
+ --sidebar: oklch(0.205 0 0);
257
+ --sidebar-foreground: oklch(0.985 0 0);
258
+ --sidebar-primary: oklch(0.488 0.243 264.376);
259
+ --sidebar-primary-foreground: oklch(0.985 0 0);
260
+ --sidebar-accent: oklch(0.269 0 0);
261
+ --sidebar-accent-foreground: oklch(0.985 0 0);
262
+ --sidebar-border: oklch(1 0 0 / 10%);
263
+ --sidebar-ring: oklch(0.556 0 0);
264
+ }
265
+
266
+ [data-theme-preset="shadcn"][data-theme="light"] {
267
+ --background: oklch(1 0 0);
268
+ --foreground: oklch(0.145 0 0);
269
+ --card: oklch(1 0 0);
270
+ --card-foreground: oklch(0.145 0 0);
271
+ --popover: oklch(1 0 0);
272
+ --popover-foreground: oklch(0.145 0 0);
273
+ --primary: oklch(0.205 0 0);
274
+ --primary-foreground: oklch(0.985 0 0);
275
+ --secondary: oklch(0.97 0 0);
276
+ --secondary-foreground: oklch(0.205 0 0);
277
+ --muted: oklch(0.97 0 0);
278
+ --muted-foreground: oklch(0.556 0 0);
279
+ --accent: oklch(0.97 0 0);
280
+ --accent-foreground: oklch(0.205 0 0);
281
+ --destructive: oklch(0.577 0.245 27.325);
282
+ --destructive-foreground: oklch(1 0 0);
283
+ --border: oklch(0.922 0 0);
284
+ --input: oklch(0.922 0 0);
285
+ --ring: oklch(0.708 0 0);
286
+ --chart-1: oklch(0.646 0.222 41.116);
287
+ --chart-2: oklch(0.6 0.118 184.704);
288
+ --chart-3: oklch(0.398 0.07 227.392);
289
+ --chart-4: oklch(0.828 0.189 84.429);
290
+ --chart-5: oklch(0.769 0.188 70.08);
291
+ --sidebar: oklch(0.985 0 0);
292
+ --sidebar-foreground: oklch(0.145 0 0);
293
+ --sidebar-primary: oklch(0.205 0 0);
294
+ --sidebar-primary-foreground: oklch(0.985 0 0);
295
+ --sidebar-accent: oklch(0.97 0 0);
296
+ --sidebar-accent-foreground: oklch(0.205 0 0);
297
+ --sidebar-border: oklch(0.922 0 0);
298
+ --sidebar-ring: oklch(0.708 0 0);
299
+ }
300
+
208
301
  [data-density="comfortable"] {
209
302
  --ag-text-xs: 11px;
210
303
  --ag-control-text: 12px;
@@ -0,0 +1,34 @@
1
+ # TableResponsive
2
+
3
+ Story: @alexgorbatchev/shadcn/components/data-display/TableResponsive
4
+ Source: src/components/stories/data-display/TableResponsive.stories.tsx
5
+
6
+ [Full source and local helpers](https://github.com/alexgorbatchev/shadcn/blob/main/src/components/stories/data-display/TableResponsive.stories.tsx)
7
+
8
+ ## Public imports
9
+
10
+ ```tsx
11
+ import { Table } from "@alexgorbatchev/shadcn";
12
+ ```
13
+
14
+ ## Default component
15
+
16
+ ```tsx
17
+ Table
18
+ ```
19
+
20
+ ## Default render
21
+
22
+ ```tsx
23
+ () => <ResponsiveTablesExample />
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
+ ### ContainerBoundaries
31
+
32
+ ```tsx
33
+ {}
34
+ ```
@@ -14,7 +14,7 @@ import { Button, OptionSelect } from "@alexgorbatchev/shadcn";
14
14
  ## Supporting imports
15
15
 
16
16
  ```tsx
17
- import { useState } from "react";
17
+ import { useId, useState } from "react";
18
18
  ```
19
19
 
20
20
  ## Default component
@@ -63,6 +63,20 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
63
63
  }
64
64
  ```
65
65
 
66
+ ### DescribedTrigger
67
+
68
+ ```tsx
69
+ {
70
+ render: function DescribedTrigger(args) {
71
+ const descriptionId = useId();
72
+ return (<>
73
+ <OptionSelect {...args} aria-describedby={descriptionId}/>
74
+ <p id={descriptionId}>Choose the runtime used for this project.</p>
75
+ </>);
76
+ }
77
+ }
78
+ ```
79
+
66
80
  ### Controlled
67
81
 
68
82
  ```tsx
@@ -49,6 +49,14 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
49
49
  }
50
50
  ```
51
51
 
52
+ ### Shadcn
53
+
54
+ ```tsx
55
+ {
56
+ globals: { preset: "shadcn", theme: "system" }
57
+ }
58
+ ```
59
+
52
60
  ### ForcedLight
53
61
 
54
62
  ```tsx
package/llms/setup.md CHANGED
@@ -198,10 +198,15 @@ An independent production Vite consumer installed from the archive verifies RTL
198
198
  | `ThemeProvider.defaultTheme` | `"light" \| "dark" \| "system"` | `"system"` | Initial preference when storage has no saved value. |
199
199
  | `ThemeProvider.storageKey` | `string` | `"shadcn-alexgorbatchev-theme"` | Local storage key for the preference. |
200
200
  | `ThemeProvider.forcedTheme` | `"light" \| "dark"` | unset | Overrides the displayed palette without changing the saved preference. |
201
+ | `ThemeProvider.preset` | `"devhost" \| "shadcn"` | `"devhost"` | Document-wide design preset, independent of color mode and density. |
201
202
  | `DensityProvider.density` | `"compact" \| "comfortable"` | `"comfortable"` | Density for descendants and their portals. |
202
203
  | Component `density` | `"compact" \| "comfortable"` | inherited | Local override on styled components that expose the prop. |
203
204
 
204
- `useTheme()` returns `theme`, `resolvedTheme`, and `setTheme`. Call `setTheme("light")`, `setTheme("dark")`, or `setTheme("system")` from a component inside the provider.
205
+ `useTheme()` returns `theme`, `resolvedTheme`, `setTheme`, and `preset`. Call `setTheme("light")`, `setTheme("dark")`, or `setTheme("system")` from a component inside the provider.
206
+
207
+ Use `<ThemeProvider preset="shadcn" defaultTheme="system">` for the [default shadcn Neutral palette](https://ui.shadcn.com/docs/theming), system sans-serif text, and its rounded corner scale. The default `devhost` preset uses the package's monospace design and sharp corners. Both presets support light, dark, and system modes, including portaled content. Code retains the monospace font. Density, component composition, and package-specific status colors remain independent of the preset.
208
+
209
+ The preset is controlled by the prop; changing it updates the document without changing the saved color-mode preference. Persist that prop in your application if needed. Storybook exposes the same choice in its **Design** toolbar. For a page styled before React mounts, set `data-theme-preset="shadcn"` and `data-theme="light"` or `"dark"` on `<html>` to match the provider. The existing `theme.css` import and `@source` setup cover both presets.
205
210
 
206
211
  Override tokens after the theme imports. This example uses the existing success palette as the primary accent:
207
212
 
package/llms.txt CHANGED
@@ -349,6 +349,7 @@ Generated from the public package exports and Storybook sources.
349
349
  - [StatCard](./llms/components/data-display/StatCard.md)
350
350
  - [StatusTracker](./llms/components/data-display/StatusTracker.md)
351
351
  - [Table](./llms/components/data-display/Table.md)
352
+ - [TableResponsive](./llms/components/data-display/TableResponsive.md)
352
353
  - [Text](./llms/components/data-display/Text.md): Text renders body copy as a paragraph with semantic `size` (xs, sm, base, lg), `tone` (default, muted, faint, primary, success, warning, destructive), `weight`, and `align`. `truncate` keeps one line with an ellipsis; otherwise long words wrap. `tabular` aligns digits. Use `render={<span />}` for inline text, or another element such as `<li />` or `<time />`.
353
354
  - [VirtualDataGrid](./llms/components/data-display/VirtualDataGrid.md)
354
355
  - [VirtualTable](./llms/components/data-display/VirtualTable.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.53",
3
+ "version": "0.0.55",
4
4
  "description": "Sharp, monospace React components with compact and comfortable densities.",
5
5
  "license": "MIT",
6
6
  "repository": {