@alexgorbatchev/shadcn 0.0.31 → 0.0.33

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 (68) hide show
  1. package/README.md +8 -7
  2. package/THIRD_PARTY_NOTICES.md +4 -0
  3. package/dist/{chunk-0ewzb2ax.js → chunk-0kyfh857.js} +1 -1
  4. package/dist/{chunk-8wfy03bp.js → chunk-6kwf9644.js} +1 -1
  5. package/dist/{chunk-82e7fbmq.js → chunk-9vyg3854.js} +2 -1
  6. package/dist/chunk-c6g2rbhv.js +3940 -0
  7. package/dist/chunk-dzvsjw59.js +200 -0
  8. package/dist/chunk-tch86q2w.js +6050 -0
  9. package/dist/{chunk-53q730zs.js → chunk-zdt8xxzy.js} +3 -0
  10. package/dist/components/Alert.d.ts +1 -1
  11. package/dist/components/assistant-ui/elements/Chart.js +2 -2
  12. package/dist/components/assistant-ui/elements/GuardrailNotice.js +2 -2
  13. package/dist/components/assistant-ui/index.js +4 -4
  14. package/dist/components/assistant-ui/native/Sources.d.ts +1 -1
  15. package/dist/components/carousel/index.js +15 -204
  16. package/dist/components/chart/AnalyticsChart.d.ts +3 -2
  17. package/dist/components/chart/Chart.d.ts +1 -1
  18. package/dist/components/chart/index.js +24 -10
  19. package/dist/components/chart/types.d.ts +1 -0
  20. package/dist/components/json-render/JsonAccordion.d.ts +3 -0
  21. package/dist/components/json-render/JsonAlert.d.ts +3 -0
  22. package/dist/components/json-render/JsonAvatar.d.ts +3 -0
  23. package/dist/components/json-render/JsonBadge.d.ts +3 -0
  24. package/dist/components/json-render/JsonButton.d.ts +3 -0
  25. package/dist/components/json-render/JsonButtonGroup.d.ts +3 -0
  26. package/dist/components/json-render/JsonCard.d.ts +3 -0
  27. package/dist/components/json-render/JsonCarousel.d.ts +3 -0
  28. package/dist/components/json-render/JsonCheckbox.d.ts +3 -0
  29. package/dist/components/json-render/JsonCollapsible.d.ts +3 -0
  30. package/dist/components/json-render/JsonDialog.d.ts +3 -0
  31. package/dist/components/json-render/JsonDrawer.d.ts +3 -0
  32. package/dist/components/json-render/JsonDropdownMenu.d.ts +3 -0
  33. package/dist/components/json-render/JsonGrid.d.ts +3 -0
  34. package/dist/components/json-render/JsonHeading.d.ts +3 -0
  35. package/dist/components/json-render/JsonImage.d.ts +3 -0
  36. package/dist/components/json-render/JsonInput.d.ts +3 -0
  37. package/dist/components/json-render/JsonLink.d.ts +3 -0
  38. package/dist/components/json-render/JsonPagination.d.ts +3 -0
  39. package/dist/components/json-render/JsonPopover.d.ts +3 -0
  40. package/dist/components/json-render/JsonProgress.d.ts +3 -0
  41. package/dist/components/json-render/JsonRadio.d.ts +3 -0
  42. package/dist/components/json-render/JsonSelect.d.ts +3 -0
  43. package/dist/components/json-render/JsonSeparator.d.ts +3 -0
  44. package/dist/components/json-render/JsonSkeleton.d.ts +3 -0
  45. package/dist/components/json-render/JsonSlider.d.ts +3 -0
  46. package/dist/components/json-render/JsonSpinner.d.ts +3 -0
  47. package/dist/components/json-render/JsonStack.d.ts +3 -0
  48. package/dist/components/json-render/JsonSwitch.d.ts +3 -0
  49. package/dist/components/json-render/JsonTable.d.ts +3 -0
  50. package/dist/components/json-render/JsonTabs.d.ts +3 -0
  51. package/dist/components/json-render/JsonText.d.ts +3 -0
  52. package/dist/components/json-render/JsonTextarea.d.ts +3 -0
  53. package/dist/components/json-render/JsonToggle.d.ts +3 -0
  54. package/dist/components/json-render/JsonToggleGroup.d.ts +3 -0
  55. package/dist/components/json-render/JsonTooltip.d.ts +3 -0
  56. package/dist/components/json-render/catalog.d.ts +548 -0
  57. package/dist/components/json-render/catalog.js +6 -0
  58. package/dist/components/json-render/getPaginationRange.d.ts +1 -0
  59. package/dist/components/json-render/index.d.ts +39 -0
  60. package/dist/components/json-render/index.js +1254 -0
  61. package/dist/index.js +569 -4191
  62. package/licenses/json-render-APACHE-2.0.txt +201 -0
  63. package/llms/components/data-display/AnalyticsChart.md +34 -0
  64. package/llms/components/data-display/JsonRender.md +476 -0
  65. package/llms/components/feedback/Alert.md +20 -4
  66. package/llms/setup.md +8 -7
  67. package/llms.txt +1 -0
  68. package/package.json +75 -15
package/README.md CHANGED
@@ -38,10 +38,10 @@ The package targets client-rendered Bun React applications.
38
38
 
39
39
  # Installation
40
40
 
41
- Install the package in a consuming project:
41
+ Install the package and the libraries its core components use. The package installs no third-party packages itself, so the consuming project owns every dependency version:
42
42
 
43
43
  ```sh
44
- bun add @alexgorbatchev/shadcn
44
+ bun add @alexgorbatchev/shadcn @base-ui/react@^1.9.0 @base-ui/utils@0.5.0 class-variance-authority@^0.7.1 clsx@^2.1.1 lucide-react@^1.53.0 tailwind-merge@^3.7.0 tw-animate-css@^1.4.0 usehooks-ts@^3.1.1
45
45
  ```
46
46
 
47
47
  Package preparation and contributor commands are documented in [AGENTS.md](./AGENTS.md#commands).
@@ -52,6 +52,7 @@ Import shared controls and providers from `@alexgorbatchev/shadcn`. Import the f
52
52
 
53
53
  | Import path suffix | Components | Install alongside the package |
54
54
  | -------------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
55
+ | `/json-render` | JSON Render component registry and catalog | `bun add @json-render/core@0.21.1 @json-render/react@0.21.1 embla-carousel-react@^8.6.0` |
55
56
  | `/chart` | Chart parts, AnalyticsChart, Sparkline, hooks and types | `bun add recharts@3.8.0 cssesc@3.0.0 es-toolkit@1.52.0` |
56
57
  | `/calendar` | Calendar, CalendarDayButton, DatePicker, DateRangePicker | `bun add @daypicker/react@^10.0.2` |
57
58
  | `/persian-calendar` | PersianCalendar | `bun add @daypicker/persian@^10.0.2 @daypicker/react@^10.0.2` |
@@ -59,11 +60,11 @@ Import shared controls and providers from `@alexgorbatchev/shadcn`. Import the f
59
60
  | `/command` | Command components, including CommandDialog | `bun add cmdk@^1.1.1` |
60
61
  | `/resizable` | Resizable components and SplitView | `bun add react-resizable-panels@^4.14.3` |
61
62
  | `/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 |
63
+ | `/sonner` | Sonner, SonnerToaster, Toaster, toast, useSonner | `bun add sonner@2.0.8`; the patched runtime is bundled |
64
+ | `/input-otp` | InputOTP components | `bun add input-otp@1.5.0`; the patched runtime is bundled |
64
65
  | `/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 |
66
+ | `/message-scroller` | MessageScroller components, hooks, and types | `bun add @shadcn/react@0.3.1`; the patched runtime is bundled |
67
+ | `/questionnaire` | Questionnaire components and types | `bun add @shadcn/react@0.3.1`; the patched runtime is bundled |
67
68
  | `/data-grid` | DataGrid, column picker, and native table helpers | `bun add @tanstack/react-table@9.2.8` |
68
69
  | `/virtual-data-grid` | VirtualDataGrid and row measurement props | `bun add @tanstack/react-table@9.2.8 @tanstack/react-virtual@3.14.13` |
69
70
  | `/file-upload` | FileUpload selection and validation | `bun add react-dropzone@^20.1.4` |
@@ -84,7 +85,7 @@ import { ChartContainer, type ChartConfig } from "@alexgorbatchev/shadcn/chart";
84
85
  import { Carousel, CarouselContent, CarouselItem } from "@alexgorbatchev/shadcn/carousel";
85
86
  ```
86
87
 
87
- 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.
88
+ 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`, and `@shadcn/react` 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; consumers of those three entry points still install the upstream packages for the types the declarations reference; the calendar runtime stays isolated behind `/event-calendar`. 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.
88
89
 
89
90
  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](./docs/internal/assistant-ui.md) for imports, dependency-bearing styles, source inventory, and the SelectionToolbar isolation limitation.
90
91
 
@@ -225,3 +225,7 @@ The optional feature imports use external, separately installed react-dropzone 2
225
225
  ## React Big Calendar and uncontrollable
226
226
 
227
227
  The `/event-calendar` entry point bundles React Big Calendar 1.20.0 (https://github.com/bigcalendar/react-big-calendar), uncontrollable 7.2.1 (https://github.com/jquense/uncontrollable), and their runtime dependencies. The version-pinned patch replaces uncontrollable’s obsolete compiled JSX calls with React’s JSX runtime in its ESM and CommonJS builds. Native state ownership, callbacks and ref forwarding are retained. React and declared peers remain external. Complete bundled dependency notices are included in [licenses/event-calendar.txt](./licenses/event-calendar.txt).
228
+
229
+ ## JSON Render
230
+
231
+ The optional `/json-render` catalog adapts component schemas and renderers from `@json-render/shadcn` 0.21.1, https://github.com/vercel-labs/json-render. Local modifications use this package’s Base UI components, native composition APIs, semantic variants, accessible labels, and explicit feature exports. JSON Render remains an external optional peer. The Apache License 2.0 is included in [licenses/json-render-APACHE-2.0.txt](./licenses/json-render-APACHE-2.0.txt).
@@ -12,7 +12,7 @@ import {
12
12
  Chart3,
13
13
  ChartTooltipContent2,
14
14
  ChartTooltip2
15
- } from "./chunk-82e7fbmq.js";
15
+ } from "./chunk-9vyg3854.js";
16
16
  import {
17
17
  take
18
18
  } from "./chunk-v8ks0cfq.js";
@@ -8,7 +8,7 @@ import {
8
8
  Alert2,
9
9
  AlertTitle2,
10
10
  AlertDescription2
11
- } from "./chunk-53q730zs.js";
11
+ } from "./chunk-zdt8xxzy.js";
12
12
  import {
13
13
  mono
14
14
  } from "./chunk-fgmcbtyt.js";
@@ -111,6 +111,7 @@ function ChartTooltipContent2({
111
111
  hideIndicator = false,
112
112
  label,
113
113
  labelFormatter,
114
+ valueFormatter,
114
115
  labelClassName,
115
116
  formatter,
116
117
  color,
@@ -202,7 +203,7 @@ function ChartTooltipContent2({
202
203
  }),
203
204
  item.value != null && /* @__PURE__ */ jsx2("span", {
204
205
  className: "font-mono font-medium tabular-nums",
205
- children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value)
206
+ children: typeof item.value === "number" ? valueFormatter?.(item.value) ?? item.value.toLocaleString() : String(item.value)
206
207
  })
207
208
  ]
208
209
  })