@mikenotthepope/substrateui 0.1.3 → 0.2.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`af7c703`](https://github.com/MikeNotThePope/substrateui/commit/af7c703f53384e6252f9710c3e3762244189c496) Thanks [@MikeNotThePope](https://github.com/MikeNotThePope)! - Export `sidebarMenuButtonVariants` from the Sidebar component. Its JSDoc already documented "use with `cn(sidebarMenuButtonVariants({...}))` for non-button elements" (e.g. a Next.js `Link`), but the variant was never exported. This makes the documented usage possible, matching the existing `buttonVariants` export convention.
8
+
3
9
  All notable changes to SubstrateUI will be documented in this file.
4
10
 
5
11
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@@ -8,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
14
  ## [0.1.0] - 2026-04-04
9
15
 
10
16
  ### Added
17
+
11
18
  - Initial release
12
19
  - 75 UI components built on Radix UI primitives
13
20
  - 3-layer OKLCH color token system (raw palette → semantic → Tailwind utilities)
package/README.md CHANGED
@@ -139,7 +139,7 @@ Every component ships with accessible defaults. For guidance on specific compone
139
139
 
140
140
  ## Storybook
141
141
 
142
- Contributors can browse components in isolation, flip between light/dark themes, swap `ltr`/`rtl` direction, and switch the semantic palette (Plum / Forest) from the toolbar.
142
+ Contributors can browse components in isolation, flip between light/dark themes, swap `ltr`/`rtl` direction, and switch the semantic palette from the toolbar.
143
143
 
144
144
  ```bash
145
145
  bun run storybook # dev server on http://localhost:6006
@@ -3,6 +3,7 @@ import { __objRest, __spreadValues, cn } from './chunk-IQWAGBDM.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { Slot } from '@radix-ui/react-slot';
5
5
  import * as TabsPrimitive from '@radix-ui/react-tabs';
6
+ import * as React from 'react';
6
7
 
7
8
  function Card(_a) {
8
9
  var _b = _a, {
@@ -253,6 +254,16 @@ function TabsContent(_a) {
253
254
  );
254
255
  }
255
256
 
256
- export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Center, Stack, Tabs, TabsContent, TabsList, TabsTrigger };
257
- //# sourceMappingURL=chunk-IRBORST3.js.map
258
- //# sourceMappingURL=chunk-IRBORST3.js.map
257
+ // src/lib/resolve-labels.ts
258
+ function resolveLabels(defaults, context, prop) {
259
+ if (!context && !prop) return defaults;
260
+ return __spreadValues(__spreadValues(__spreadValues({}, defaults), context), prop);
261
+ }
262
+ var LabelsContext = React.createContext({});
263
+ function useLabels() {
264
+ return React.useContext(LabelsContext);
265
+ }
266
+
267
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Center, Stack, Tabs, TabsContent, TabsList, TabsTrigger, resolveLabels, useLabels };
268
+ //# sourceMappingURL=chunk-GK4MVBBR.js.map
269
+ //# sourceMappingURL=chunk-GK4MVBBR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/card.tsx","../src/components/ui/center.tsx","../src/components/ui/stack.tsx","../src/components/ui/tabs.tsx","../src/lib/resolve-labels.ts","../src/components/providers/labels-provider.tsx"],"names":["jsx","Slot"],"mappings":";;;;;;AAYA,SAAS,KAAK,EAAA,EAKqD;AALrD,EAAA,IAAA,EAAA,GAAA,EAAA,EACZ;AAAA,IAAA,SAAA;AAAA,IACA,WAAA,GAAc,KAAA;AAAA,IACd;AAAA,GAfF,GAYc,EAAA,EAIT,KAAA,GAAA,SAAA,CAJS,EAAA,EAIT;AAAA,IAHH,WAAA;AAAA,IACA,aAAA;AAAA,IACA;AAAA,GAAA,CAAA;AAGA,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA,cAAA,CAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAA,EAAU,MAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,4DAAA;AA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AA;AAAA,IAAe,aAAA,CAAA,OAAA;AAAA,IAAd,cAAA,CAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,qbAAA;AAAA,QACA;AAAA;AACF,KAAA,EACI,KAAA;AAAA,GACN;AAEJ;AAGA,SAAS,YAAY,EAAA,EAIyC;AAJzC,EAAA,IAAA,EAAA,GAAA,EAAA,EACnB;AAAA,IAAA,SAAA;AAAA,IACA;AAAA,GAvDF,GAqDqB,EAAA,EAGhB,KAAA,GAAA,SAAA,CAHgB,EAAA,EAGhB;AAAA,IAFH,WAAA;AAAA,IACA;AAAA,GAAA,CAAA;AAGA,EAAA,uBACEA,GAAAA;AAAA,IAAe,aAAA,CAAA,OAAA;AAAA,IAAd,cAAA,CAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,iIAAA;AAAA,QACA;AAAA;AACF,KAAA,EACI,KAAA;AAAA,GACN;AAEJ;;;AC9DO,SAAS,aAAA,CACd,QAAA,EACA,OAAA,EACA,IAAA,EACG;AACH,EAAA,IAAI,CAAC,OAAA,IAAW,CAAC,IAAA,EAAM,OAAO,QAAA;AAC9B,EAAA,OAAO,cAAA,CAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EAAK,WAAa,OAAA,CAAA,EAAY,IAAA,CAAA;AACvC;AC+BA,IAAM,aAAA,GAAsB,KAAA,CAAA,aAAA,CAAiC,EAAE,CAAA;AA2B/D,SAAS,SAAA,GAAY;AACnB,EAAA,OAAa,iBAAW,aAAa,CAAA;AACvC","file":"chunk-GK4MVBBR.js","sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n/**\n * Bordered container for grouping related content.\n *\n * @example\n * <Card><CardHeader><CardTitle>Title</CardTitle></CardHeader><CardContent>Body</CardContent></Card>\n *\n * @prop interactive - Adds hover and click styles when true\n */\nfunction Card({\n className,\n interactive = false,\n ref,\n ...props\n}: React.ComponentPropsWithRef<\"div\"> & { interactive?: boolean }) {\n return (\n <div\n ref={ref}\n data-slot=\"card\"\n className={cn(\n \"rounded-lg border-2 bg-card text-card-foreground shadow-sm\",\n interactive &&\n \"cursor-pointer hover:border-ring hover:shadow-md transition-all active:translate-y-[1.5px]\",\n className\n )}\n {...props}\n />\n )\n}\n\n/** Top section of a Card containing the title and description. */\nfunction CardHeader({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithRef<\"div\">) {\n return (\n <div\n ref={ref}\n data-slot=\"card-header\"\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n )\n}\n\n/** Primary heading inside a CardHeader. */\nfunction CardTitle({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithRef<\"div\">) {\n return (\n <div\n ref={ref}\n data-slot=\"card-title\"\n className={cn(\n \"text-2xl font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n )\n}\n\n/** Secondary description text inside a CardHeader. */\nfunction CardDescription({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithRef<\"div\">) {\n return (\n <div\n ref={ref}\n data-slot=\"card-description\"\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\n/** Main body area of a Card. */\nfunction CardContent({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithRef<\"div\">) {\n return (\n <div\n ref={ref}\n data-slot=\"card-content\"\n className={cn(\"p-6 pt-0\", className)}\n {...props}\n />\n )\n}\n\n/** Bottom section of a Card, typically for actions. */\nfunction CardFooter({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithRef<\"div\">) {\n return (\n <div\n ref={ref}\n data-slot=\"card-footer\"\n className={cn(\"flex items-center p-6 pt-0\", className)}\n {...props}\n />\n )\n}\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst maxMap = {\n sm: \"max-w-screen-sm\",\n md: \"max-w-screen-md\",\n lg: \"max-w-screen-lg\",\n xl: \"max-w-screen-xl\",\n \"2xl\": \"max-w-screen-2xl\",\n full: \"max-w-full\",\n} as const\n\ntype Max = keyof typeof maxMap\n\n/** Props accepted by the Center component. */\ninterface CenterProps extends React.ComponentPropsWithRef<\"div\"> {\n max?: Max\n padding?: boolean\n asChild?: boolean\n}\n\n/**\n * Horizontally centers its content with a configurable max-width and optional padding.\n *\n * @example\n * <Center max=\"lg\" padding>Content</Center>\n *\n * @prop max - Max-width breakpoint: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"full\"\n * @prop padding - Adds responsive horizontal padding when true\n * @prop asChild - Merge props onto child element instead of rendering a div\n */\nfunction Center({\n max = \"2xl\",\n padding = true,\n asChild = false,\n className,\n ref,\n ...props\n}: CenterProps) {\n const Comp = asChild ? Slot : \"div\"\n return (\n <Comp\n data-slot=\"center\"\n className={cn(\n \"mx-auto w-full\",\n maxMap[max],\n padding && \"px-4 sm:px-6 lg:px-8\",\n className,\n )}\n ref={ref}\n {...props}\n />\n )\n}\n\nexport { Center, type CenterProps }\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst gapMap = {\n none: \"gap-0\",\n xs: \"gap-1\",\n sm: \"gap-2\",\n md: \"gap-4\",\n lg: \"gap-6\",\n xl: \"gap-8\",\n \"2xl\": \"gap-12\",\n} as const\n\nconst alignMap = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\",\n} as const\n\ntype Gap = keyof typeof gapMap\ntype Align = keyof typeof alignMap\n\ninterface StackProps extends React.ComponentPropsWithRef<\"div\"> {\n gap?: Gap\n align?: Align\n asChild?: boolean\n}\n\n/**\n * A vertical flex container with configurable gap and alignment.\n *\n * @example\n * <Stack gap=\"lg\" align=\"center\">\n * <div>Item 1</div>\n * <div>Item 2</div>\n * </Stack>\n *\n * @prop gap - The spacing between children (none, xs, sm, md, lg, xl, 2xl).\n * @prop align - Cross-axis alignment of children.\n * @prop asChild - Merge props onto the child element instead of rendering a div.\n */\nfunction Stack({\n gap = \"md\",\n align = \"stretch\",\n asChild = false,\n className,\n ref,\n ...props\n}: StackProps) {\n const Comp = asChild ? Slot : \"div\"\n return (\n <Comp\n data-slot=\"stack\"\n className={cn(\"flex flex-col\", gapMap[gap], alignMap[align], className)}\n ref={ref}\n {...props}\n />\n )\n}\n\nexport { Stack, type StackProps }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\n\nimport { cn } from \"@/lib/utils\"\n\n/** Root container for a tabbed interface built on Radix Tabs.\n *\n * @example\n * <Tabs defaultValue=\"tab1\"><TabsList><TabsTrigger value=\"tab1\">Tab</TabsTrigger></TabsList><TabsContent value=\"tab1\">Content</TabsContent></Tabs>\n */\nconst Tabs = TabsPrimitive.Root\n\n/** Horizontal container for tab triggers with a sunken background. */\nfunction TabsList({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithRef<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n ref={ref}\n data-slot=\"tabs-list\"\n className={cn(\n \"inline-flex h-10 items-center justify-center rounded-lg bg-surface-sunken border-2 p-1 text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\n/** Individual tab button that activates its associated content panel. */\nfunction TabsTrigger({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithRef<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n data-slot=\"tabs-trigger\"\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all active:translate-y-[1.5px] transition-transform focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm\",\n className\n )}\n {...props}\n />\n )\n}\n\n/** Content panel displayed when its matching tab trigger is active. */\nfunction TabsContent({\n className,\n ref,\n ...props\n}: React.ComponentPropsWithRef<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n ref={ref}\n data-slot=\"tabs-content\"\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n","/**\n * Merges label overrides into a defaults object.\n *\n * Resolution order (last wins): defaults → context → prop.\n * All three layers share the same shape, but only `defaults` is required\n * to be complete — context and prop are partial overrides.\n */\nexport function resolveLabels<T extends object>(\n defaults: T,\n context?: Partial<NoInfer<T>>,\n prop?: Partial<NoInfer<T>>,\n): T {\n if (!context && !prop) return defaults\n return { ...defaults, ...context, ...prop } as T\n}\n","\"use client\"\n\nimport * as React from \"react\"\n\nimport type { BreadcrumbLabels } from \"@/components/ui/breadcrumb\"\nimport type { CarouselLabels } from \"@/components/ui/carousel\"\nimport type { ComboboxLabels } from \"@/components/ui/combobox\"\nimport type { DataTableLabels } from \"@/components/ui/data-table\"\nimport type { DatePickerLabels } from \"@/components/ui/date-picker\"\nimport type { DialogLabels } from \"@/components/ui/dialog\"\nimport type { PaginationLabels } from \"@/components/ui/pagination\"\nimport type { SearchFieldLabels } from \"@/components/ui/search-field\"\nimport type { SheetLabels } from \"@/components/ui/sheet\"\nimport type { SidebarLabels } from \"@/components/ui/sidebar\"\nimport type { SpinnerLabels } from \"@/components/ui/spinner\"\nimport type { DirectionToggleLabels } from \"@/components/direction-toggle\"\nimport type { SiteHeaderLabels } from \"@/components/site-header\"\nimport type { SiteHeaderNavLabels } from \"@/components/site-header-nav\"\nimport type { SitePreferencesLabels } from \"@/components/site-preferences\"\nimport type { StatCardLabels } from \"@/components/stat-card\"\nimport type { ThemePickerLabels } from \"@/components/theme-picker\"\nimport type { ThemeToggleLabels } from \"@/components/theme-toggle\"\n\n/** All translatable strings for SubstrateUI components, keyed by component. */\ninterface SubstrateUILabels {\n breadcrumb?: Partial<BreadcrumbLabels>\n carousel?: Partial<CarouselLabels>\n combobox?: Partial<ComboboxLabels>\n dataTable?: Partial<DataTableLabels>\n datePicker?: Partial<DatePickerLabels>\n dialog?: Partial<DialogLabels>\n pagination?: Partial<PaginationLabels>\n searchField?: Partial<SearchFieldLabels>\n sheet?: Partial<SheetLabels>\n sidebar?: Partial<SidebarLabels>\n spinner?: Partial<SpinnerLabels>\n directionToggle?: Partial<DirectionToggleLabels>\n siteHeader?: Partial<SiteHeaderLabels>\n siteHeaderNav?: Partial<SiteHeaderNavLabels>\n sitePreferences?: Partial<SitePreferencesLabels>\n statCard?: Partial<StatCardLabels>\n themePicker?: Partial<ThemePickerLabels>\n themeToggle?: Partial<ThemeToggleLabels>\n}\n\nconst LabelsContext = React.createContext<SubstrateUILabels>({})\n\n/**\n * Provides translated labels to all SubstrateUI components.\n *\n * Wrap your app (or a subtree) in this provider to set translations once\n * rather than passing `labels` to every component instance. Per-instance\n * `labels` props still override the provider value.\n *\n * @example\n * <LabelsProvider labels={{ dialog: { close: \"Fermer\" }, spinner: { loading: \"Chargement…\" } }}>\n * <App />\n * </LabelsProvider>\n */\nfunction LabelsProvider({\n labels,\n children,\n}: {\n labels: SubstrateUILabels\n children: React.ReactNode\n}) {\n return (\n <LabelsContext.Provider value={labels}>{children}</LabelsContext.Provider>\n )\n}\n\n/** Read the current labels context. Used internally by SubstrateUI components. */\nfunction useLabels() {\n return React.useContext(LabelsContext)\n}\n\nexport { LabelsProvider, useLabels, type SubstrateUILabels }\n"]}
package/dist/index.d.ts CHANGED
@@ -129,14 +129,20 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProp
129
129
  */
130
130
  declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
131
131
 
132
+ /** Translatable strings used by Breadcrumb. All keys have English defaults. */
133
+ interface BreadcrumbLabels {
134
+ breadcrumb?: string;
135
+ more?: string;
136
+ }
132
137
  /**
133
138
  * Navigation component showing the user's location in a page hierarchy.
134
139
  *
135
140
  * @example
136
141
  * <Breadcrumb><BreadcrumbList><BreadcrumbItem><BreadcrumbLink href="/">Home</BreadcrumbLink></BreadcrumbItem></BreadcrumbList></Breadcrumb>
137
142
  */
138
- declare function Breadcrumb({ ref, ...props }: React$1.ComponentPropsWithRef<"nav"> & {
143
+ declare function Breadcrumb({ ref, "aria-label": ariaLabel, labels: labelsProp, ...props }: React$1.ComponentPropsWithRef<"nav"> & {
139
144
  separator?: React$1.ReactNode;
145
+ labels?: BreadcrumbLabels;
140
146
  }): react_jsx_runtime.JSX.Element;
141
147
  /** Ordered list container for breadcrumb items. */
142
148
  declare function BreadcrumbList({ className, ref, ...props }: React$1.ComponentPropsWithRef<"ol">): react_jsx_runtime.JSX.Element;
@@ -151,7 +157,11 @@ declare function BreadcrumbPage({ className, ref, ...props }: React$1.ComponentP
151
157
  /** Visual divider between breadcrumb items; defaults to a chevron icon. */
152
158
  declare function BreadcrumbSeparator({ children, className, ...props }: React$1.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
153
159
  /** Ellipsis indicator used when breadcrumb items are collapsed. */
154
- declare function BreadcrumbEllipsis({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
160
+ declare function BreadcrumbEllipsis({ className, label, labels: labelsProp, ...props }: React$1.ComponentProps<"span"> & {
161
+ /** Screen-reader text for the ellipsis. @default "More" */
162
+ label?: string;
163
+ labels?: BreadcrumbLabels;
164
+ }): react_jsx_runtime.JSX.Element;
155
165
 
156
166
  /** Button style variants (variant + size). Use with cn(buttonVariants({...})) for non-button elements. */
157
167
  declare const buttonVariants: (props?: ({
@@ -218,6 +228,11 @@ declare function CardContent({ className, ref, ...props }: React$1.ComponentProp
218
228
  /** Bottom section of a Card, typically for actions. */
219
229
  declare function CardFooter({ className, ref, ...props }: React$1.ComponentPropsWithRef<"div">): react_jsx_runtime.JSX.Element;
220
230
 
231
+ /** Translatable strings used by Carousel navigation buttons. All keys have English defaults. */
232
+ interface CarouselLabels {
233
+ previousSlide?: string;
234
+ nextSlide?: string;
235
+ }
221
236
  /** Handle returned by Embla Carousel for programmatic control. */
222
237
  type CarouselApi = UseEmblaCarouselType[1];
223
238
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
@@ -243,9 +258,13 @@ declare function CarouselContent({ className, ref, ...props }: React$1.Component
243
258
  /** Individual slide within CarouselContent. */
244
259
  declare function CarouselItem({ className, ref, ...props }: React$1.ComponentPropsWithRef<"div">): react_jsx_runtime.JSX.Element;
245
260
  /** Button that scrolls the carousel to the previous slide. */
246
- declare function CarouselPrevious({ className, variant, size, ref, ...props }: React$1.ComponentPropsWithRef<typeof Button>): react_jsx_runtime.JSX.Element;
261
+ declare function CarouselPrevious({ className, variant, size, labels: labelsProp, ref, ...props }: React$1.ComponentPropsWithRef<typeof Button> & {
262
+ labels?: CarouselLabels;
263
+ }): react_jsx_runtime.JSX.Element;
247
264
  /** Button that scrolls the carousel to the next slide. */
248
- declare function CarouselNext({ className, variant, size, ref, ...props }: React$1.ComponentPropsWithRef<typeof Button>): react_jsx_runtime.JSX.Element;
265
+ declare function CarouselNext({ className, variant, size, labels: labelsProp, ref, ...props }: React$1.ComponentPropsWithRef<typeof Button> & {
266
+ labels?: CarouselLabels;
267
+ }): react_jsx_runtime.JSX.Element;
249
268
 
250
269
  declare const maxMap: {
251
270
  readonly sm: "max-w-screen-sm";
@@ -392,11 +411,21 @@ interface ComboboxOption {
392
411
  value: string;
393
412
  label: string;
394
413
  }
414
+ /** Translatable strings used by Combobox. All keys have English defaults. */
415
+ interface ComboboxLabels {
416
+ placeholder?: string;
417
+ searchPlaceholder?: string;
418
+ noResults?: string;
419
+ }
395
420
  interface ComboboxBaseProps {
396
421
  options: ComboboxOption[];
422
+ /** @deprecated Use `labels.placeholder` instead. */
397
423
  placeholder?: string;
424
+ /** @deprecated Use `labels.searchPlaceholder` instead. */
398
425
  searchPlaceholder?: string;
426
+ /** @deprecated Use `labels.noResults` instead. */
399
427
  emptyMessage?: string;
428
+ labels?: ComboboxLabels;
400
429
  className?: string;
401
430
  disabled?: boolean;
402
431
  }
@@ -421,7 +450,7 @@ type ComboboxProps = ComboboxSingleProps | ComboboxMultipleProps;
421
450
  * @prop multiple - Enable multi-select mode when true
422
451
  * @prop placeholder - Text shown when no value is selected
423
452
  */
424
- declare function Combobox({ options, placeholder, searchPlaceholder, emptyMessage, className, disabled, ...props }: ComboboxProps): react_jsx_runtime.JSX.Element;
453
+ declare function Combobox({ options, placeholder, searchPlaceholder, emptyMessage, labels: labelsProp, className, disabled, ...props }: ComboboxProps): react_jsx_runtime.JSX.Element;
425
454
 
426
455
  /**
427
456
  * Command palette container with built-in search and keyboard navigation.
@@ -484,9 +513,25 @@ declare function ContextMenuSeparator({ className, ref, ...props }: React$1.Comp
484
513
  /** Keyboard shortcut hint displayed alongside a context menu item. */
485
514
  declare function ContextMenuShortcut({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
486
515
 
516
+ /** Translatable strings used by DataTable sub-components. All keys have English defaults. */
517
+ interface DataTableLabels {
518
+ previous?: string;
519
+ next?: string;
520
+ noResults?: string;
521
+ view?: string;
522
+ toggleColumns?: string;
523
+ selectAll?: string;
524
+ selectRow?: string;
525
+ rowsSelected?: (selected: number, total: number) => string;
526
+ pageOf?: (page: number, total: number) => string;
527
+ sortedAscending?: (title: string) => string;
528
+ sortedDescending?: (title: string) => string;
529
+ notSorted?: (title: string) => string;
530
+ }
487
531
  interface DataTableColumnHeaderProps<TData, TValue> extends React$1.HTMLAttributes<HTMLDivElement> {
488
532
  column: _tanstack_react_table.Column<TData, TValue>;
489
533
  title: string;
534
+ labels?: DataTableLabels;
490
535
  }
491
536
  /**
492
537
  * Sortable column header button that toggles sort direction on click.
@@ -497,9 +542,10 @@ interface DataTableColumnHeaderProps<TData, TValue> extends React$1.HTMLAttribut
497
542
  * @prop column - TanStack Table column instance
498
543
  * @prop title - Display text for the header
499
544
  */
500
- declare function DataTableColumnHeader<TData, TValue>({ column, title, className, }: DataTableColumnHeaderProps<TData, TValue>): react_jsx_runtime.JSX.Element;
545
+ declare function DataTableColumnHeader<TData, TValue>({ column, title, className, labels: labelsProp, }: DataTableColumnHeaderProps<TData, TValue>): react_jsx_runtime.JSX.Element;
501
546
  interface DataTableViewOptionsProps<TData> {
502
547
  table: _tanstack_react_table.Table<TData>;
548
+ labels?: DataTableLabels;
503
549
  }
504
550
  /**
505
551
  * Dropdown menu for toggling column visibility in a data table.
@@ -509,9 +555,10 @@ interface DataTableViewOptionsProps<TData> {
509
555
  *
510
556
  * @prop table - TanStack Table instance
511
557
  */
512
- declare function DataTableViewOptions<TData>({ table, }: DataTableViewOptionsProps<TData>): react_jsx_runtime.JSX.Element;
558
+ declare function DataTableViewOptions<TData>({ table, labels: labelsProp, }: DataTableViewOptionsProps<TData>): react_jsx_runtime.JSX.Element;
513
559
  interface DataTablePaginationProps<TData> {
514
560
  table: _tanstack_react_table.Table<TData>;
561
+ labels?: DataTableLabels;
515
562
  }
516
563
  /**
517
564
  * Pagination controls displaying row selection count and page navigation.
@@ -521,7 +568,7 @@ interface DataTablePaginationProps<TData> {
521
568
  *
522
569
  * @prop table - TanStack Table instance
523
570
  */
524
- declare function DataTablePagination<TData>({ table, }: DataTablePaginationProps<TData>): react_jsx_runtime.JSX.Element;
571
+ declare function DataTablePagination<TData>({ table, labels: labelsProp, }: DataTablePaginationProps<TData>): react_jsx_runtime.JSX.Element;
525
572
  interface DataTableToolbarProps {
526
573
  children?: React$1.ReactNode;
527
574
  className?: string;
@@ -539,12 +586,14 @@ declare function DataTableToolbar({ children, className }: DataTableToolbarProps
539
586
  * @example
540
587
  * const columns = [createSelectColumn<MyData>(), ...otherColumns]
541
588
  */
542
- declare function createSelectColumn<TData>(): ColumnDef<TData>;
589
+ declare function createSelectColumn<TData>(labels?: DataTableLabels): ColumnDef<TData>;
543
590
  interface DataTableProps<TData, TValue> {
544
591
  columns: ColumnDef<TData, TValue>[];
545
592
  data: TData[];
546
593
  className?: string;
547
594
  toolbar?: React$1.ReactNode;
595
+ /** Translatable strings for all DataTable sub-components. */
596
+ labels?: DataTableLabels;
548
597
  }
549
598
  /**
550
599
  * Full-featured data table with sorting, filtering, pagination, and row selection.
@@ -556,12 +605,22 @@ interface DataTableProps<TData, TValue> {
556
605
  * @prop data - Array of row data
557
606
  * @prop toolbar - Optional toolbar rendered above the table
558
607
  */
559
- declare function DataTable<TData, TValue>({ columns, data, className, toolbar, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
608
+ declare function DataTable<TData, TValue>({ columns, data, className, toolbar, labels: labelsProp, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
560
609
 
610
+ /** Translatable strings used by DatePicker / DateRangePicker. All keys have English defaults. */
611
+ interface DatePickerLabels {
612
+ placeholder?: string;
613
+ rangePlaceholder?: string;
614
+ locale?: string;
615
+ formatDate?: (date: Date) => string;
616
+ formatDateShort?: (date: Date) => string;
617
+ }
561
618
  interface DatePickerProps {
562
619
  date?: Date;
563
620
  onDateChange?: (date: Date | undefined) => void;
621
+ /** @deprecated Use `labels.placeholder` instead. */
564
622
  placeholder?: string;
623
+ labels?: DatePickerLabels;
565
624
  className?: string;
566
625
  disabled?: boolean;
567
626
  }
@@ -575,11 +634,13 @@ interface DatePickerProps {
575
634
  * @prop onDateChange - Callback when a date is selected
576
635
  * @prop placeholder - Text shown when no date is selected
577
636
  */
578
- declare function DatePicker({ date, onDateChange, placeholder, className, disabled, }: DatePickerProps): react_jsx_runtime.JSX.Element;
637
+ declare function DatePicker({ date, onDateChange, placeholder, labels: labelsProp, className, disabled, }: DatePickerProps): react_jsx_runtime.JSX.Element;
579
638
  interface DateRangePickerProps {
580
639
  dateRange?: DateRange;
581
640
  onDateRangeChange?: (range: DateRange | undefined) => void;
641
+ /** @deprecated Use `labels.rangePlaceholder` instead. */
582
642
  placeholder?: string;
643
+ labels?: DatePickerLabels;
583
644
  className?: string;
584
645
  disabled?: boolean;
585
646
  }
@@ -593,8 +654,12 @@ interface DateRangePickerProps {
593
654
  * @prop onDateRangeChange - Callback when the range changes
594
655
  * @prop placeholder - Text shown when no range is selected
595
656
  */
596
- declare function DateRangePicker({ dateRange, onDateRangeChange, placeholder, className, disabled, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
657
+ declare function DateRangePicker({ dateRange, onDateRangeChange, placeholder, labels: labelsProp, className, disabled, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
597
658
 
659
+ /** Translatable strings used by Dialog. All keys have English defaults. */
660
+ interface DialogLabels {
661
+ close?: string;
662
+ }
598
663
  /** Root dialog component that manages open/close state. */
599
664
  declare const Dialog: React$1.FC<DialogPrimitive.DialogProps>;
600
665
  /** Button or element that opens the dialog when clicked. */
@@ -614,7 +679,9 @@ declare function DialogOverlay({ className, ref, ...props }: React$1.ComponentPr
614
679
  * <DialogContent><DialogHeader><DialogTitle>Title</DialogTitle></DialogHeader></DialogContent>
615
680
  * </Dialog>
616
681
  */
617
- declare function DialogContent({ className, children, ref, ...props }: React$1.ComponentPropsWithRef<typeof DialogPrimitive.Content>): react_jsx_runtime.JSX.Element;
682
+ declare function DialogContent({ className, children, labels: labelsProp, ref, ...props }: React$1.ComponentPropsWithRef<typeof DialogPrimitive.Content> & {
683
+ labels?: DialogLabels;
684
+ }): react_jsx_runtime.JSX.Element;
618
685
  /** Container for dialog title and description at the top of the dialog. */
619
686
  declare function DialogHeader({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
620
687
  /** Container for action buttons at the bottom of the dialog. */
@@ -1091,6 +1158,13 @@ declare function NavigationMenuViewport({ className, ref, ...props }: React$1.Co
1091
1158
  /** Animated arrow indicator that tracks the active navigation menu item. */
1092
1159
  declare function NavigationMenuIndicator({ className, ref, ...props }: React$1.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Indicator>): react_jsx_runtime.JSX.Element;
1093
1160
 
1161
+ /** Translatable strings used by Pagination. All keys have English defaults. */
1162
+ interface PaginationLabels {
1163
+ pagination?: string;
1164
+ previous?: string;
1165
+ next?: string;
1166
+ morePages?: string;
1167
+ }
1094
1168
  /**
1095
1169
  * Navigation container for paginated content.
1096
1170
  *
@@ -1103,7 +1177,9 @@ declare function NavigationMenuIndicator({ className, ref, ...props }: React$1.C
1103
1177
  * </PaginationContent>
1104
1178
  * </Pagination>
1105
1179
  */
1106
- declare function Pagination({ className, ...props }: React$1.ComponentProps<"nav">): react_jsx_runtime.JSX.Element;
1180
+ declare function Pagination({ className, "aria-label": ariaLabel, labels: labelsProp, ...props }: React$1.ComponentProps<"nav"> & {
1181
+ labels?: PaginationLabels;
1182
+ }): react_jsx_runtime.JSX.Element;
1107
1183
  /** Flex row container for pagination items. */
1108
1184
  declare function PaginationContent({ className, ref, ...props }: React$1.ComponentPropsWithRef<"ul">): react_jsx_runtime.JSX.Element;
1109
1185
  /** List item wrapper for a single pagination element. */
@@ -1119,11 +1195,23 @@ type PaginationLinkProps = {
1119
1195
  */
1120
1196
  declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): react_jsx_runtime.JSX.Element;
1121
1197
  /** "Previous" pagination link with a left chevron icon. */
1122
- declare function PaginationPrevious({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
1198
+ declare function PaginationPrevious({ className, label, labels: labelsProp, ...props }: React$1.ComponentProps<typeof PaginationLink> & {
1199
+ /** Visible text label. @default "Previous" */
1200
+ label?: string;
1201
+ labels?: PaginationLabels;
1202
+ }): react_jsx_runtime.JSX.Element;
1123
1203
  /** "Next" pagination link with a right chevron icon. */
1124
- declare function PaginationNext({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
1204
+ declare function PaginationNext({ className, label, labels: labelsProp, ...props }: React$1.ComponentProps<typeof PaginationLink> & {
1205
+ /** Visible text label. @default "Next" */
1206
+ label?: string;
1207
+ labels?: PaginationLabels;
1208
+ }): react_jsx_runtime.JSX.Element;
1125
1209
  /** Ellipsis indicator representing omitted page numbers. */
1126
- declare function PaginationEllipsis({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
1210
+ declare function PaginationEllipsis({ className, label, labels: labelsProp, ...props }: React$1.ComponentProps<"span"> & {
1211
+ /** Screen-reader text for the ellipsis. @default "More pages" */
1212
+ label?: string;
1213
+ labels?: PaginationLabels;
1214
+ }): react_jsx_runtime.JSX.Element;
1127
1215
 
1128
1216
  /** Root popover component that manages open/close state. */
1129
1217
  declare const Popover: React$1.FC<PopoverPrimitive.PopoverProps>;
@@ -1200,6 +1288,11 @@ declare function ScrollArea({ className, children, ref, ...props }: React$1.Comp
1200
1288
  /** A styled scrollbar track and thumb, used internally by ScrollArea. */
1201
1289
  declare function ScrollBar({ className, orientation, ref, ...props }: React$1.ComponentPropsWithRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): react_jsx_runtime.JSX.Element;
1202
1290
 
1291
+ /** Translatable strings used by SearchField. All keys have English defaults. */
1292
+ interface SearchFieldLabels {
1293
+ placeholder?: string;
1294
+ clearSearch?: string;
1295
+ }
1203
1296
  /** Props for the SearchField component. */
1204
1297
  interface SearchFieldProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> {
1205
1298
  placeholder?: string;
@@ -1207,6 +1300,9 @@ interface SearchFieldProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>,
1207
1300
  value: string;
1208
1301
  onChange: (value: string) => void;
1209
1302
  onClear?: () => void;
1303
+ /** Accessible label for the clear button. @default "Clear search" */
1304
+ clearLabel?: string;
1305
+ labels?: SearchFieldLabels;
1210
1306
  }
1211
1307
  /**
1212
1308
  * A search input with a search icon, clearable value, and optional keyboard shortcut hint.
@@ -1219,7 +1315,7 @@ interface SearchFieldProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>,
1219
1315
  * @prop shortcut - Optional keyboard shortcut label displayed when empty.
1220
1316
  * @prop onClear - Optional callback fired when the clear button is clicked.
1221
1317
  */
1222
- declare function SearchField({ placeholder, shortcut, value, onChange, onClear, className, ...props }: SearchFieldProps): react_jsx_runtime.JSX.Element;
1318
+ declare function SearchField({ placeholder, shortcut, value, onChange, onClear, clearLabel, labels: labelsProp, className, ...props }: SearchFieldProps): react_jsx_runtime.JSX.Element;
1223
1319
 
1224
1320
  /** Root component that manages select state and context. */
1225
1321
  declare const Select: React$1.FC<SelectPrimitive.SelectProps>;
@@ -1260,6 +1356,10 @@ declare function SelectSeparator({ className, ref, ...props }: React$1.Component
1260
1356
  */
1261
1357
  declare function Separator({ className, orientation, decorative, ref, ...props }: React$1.ComponentPropsWithRef<typeof SeparatorPrimitive.Root>): react_jsx_runtime.JSX.Element;
1262
1358
 
1359
+ /** Translatable strings used by Sheet. All keys have English defaults. */
1360
+ interface SheetLabels {
1361
+ close?: string;
1362
+ }
1263
1363
  /** Root component that manages sheet open/closed state. */
1264
1364
  declare const Sheet: React$1.FC<DialogPrimitive.DialogProps>;
1265
1365
  /** A button or element that opens the sheet when clicked. */
@@ -1287,7 +1387,9 @@ interface SheetContentProps extends React$1.ComponentPropsWithRef<typeof DialogP
1287
1387
  *
1288
1388
  * @prop side - Which edge the sheet slides in from (top, bottom, left, right).
1289
1389
  */
1290
- declare function SheetContent({ side, className, children, ref, ...props }: SheetContentProps): react_jsx_runtime.JSX.Element;
1390
+ declare function SheetContent({ side, className, children, labels: labelsProp, ref, ...props }: SheetContentProps & {
1391
+ labels?: SheetLabels;
1392
+ }): react_jsx_runtime.JSX.Element;
1291
1393
  /** A layout container for the sheet's title and description at the top. */
1292
1394
  declare function SheetHeader({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
1293
1395
  /** A layout container for action buttons at the bottom of the sheet. */
@@ -1310,6 +1412,12 @@ declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive
1310
1412
  */
1311
1413
  declare function TooltipContent({ className, sideOffset, ref, ...props }: React$1.ComponentPropsWithRef<typeof TooltipPrimitive.Content>): react_jsx_runtime.JSX.Element;
1312
1414
 
1415
+ /** Translatable strings used by Sidebar. All keys have English defaults. */
1416
+ interface SidebarLabels {
1417
+ toggleSidebar?: string;
1418
+ mobileTitle?: string;
1419
+ mobileDescription?: string;
1420
+ }
1313
1421
  type SidebarContextProps = {
1314
1422
  state: "expanded" | "collapsed";
1315
1423
  open: boolean;
@@ -1342,15 +1450,28 @@ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: se
1342
1450
  * @prop variant - Visual variant (sidebar, floating, inset).
1343
1451
  * @prop collapsible - Collapse behavior (offcanvas, icon, none).
1344
1452
  */
1345
- declare function Sidebar({ side, variant, collapsible, className, children, ref, ...props }: React$1.ComponentPropsWithRef<"div"> & {
1453
+ declare function Sidebar({ side, variant, collapsible, className, children, mobileTitle, mobileDescription, labels: labelsProp, ref, ...props }: React$1.ComponentPropsWithRef<"div"> & {
1346
1454
  side?: "left" | "right";
1347
1455
  variant?: "sidebar" | "floating" | "inset";
1348
1456
  collapsible?: "offcanvas" | "icon" | "none";
1457
+ /** Screen-reader title for the mobile sheet. @default "Sidebar" */
1458
+ mobileTitle?: string;
1459
+ /** Screen-reader description for the mobile sheet. @default "Displays the mobile sidebar." */
1460
+ mobileDescription?: string;
1461
+ labels?: SidebarLabels;
1349
1462
  }): react_jsx_runtime.JSX.Element;
1350
1463
  /** A button that toggles the sidebar open/closed state. */
1351
- declare function SidebarTrigger({ className, onClick, ref, ...props }: React$1.ComponentPropsWithRef<typeof Button>): react_jsx_runtime.JSX.Element;
1464
+ declare function SidebarTrigger({ className, onClick, label, labels: labelsProp, ref, ...props }: React$1.ComponentPropsWithRef<typeof Button> & {
1465
+ /** Screen-reader label for the trigger button. @default "Toggle Sidebar" */
1466
+ label?: string;
1467
+ labels?: SidebarLabels;
1468
+ }): react_jsx_runtime.JSX.Element;
1352
1469
  /** A thin interactive rail at the sidebar edge for toggling via click or drag. */
1353
- declare function SidebarRail({ className, ref, ...props }: React$1.ComponentPropsWithRef<"button">): react_jsx_runtime.JSX.Element;
1470
+ declare function SidebarRail({ className, label, labels: labelsProp, ref, ...props }: React$1.ComponentPropsWithRef<"button"> & {
1471
+ /** Accessible label for the rail. @default "Toggle Sidebar" */
1472
+ label?: string;
1473
+ labels?: SidebarLabels;
1474
+ }): react_jsx_runtime.JSX.Element;
1354
1475
  /** The main content area adjacent to the sidebar. */
1355
1476
  declare function SidebarInset({ className, ref, ...props }: React$1.ComponentPropsWithRef<"main">): react_jsx_runtime.JSX.Element;
1356
1477
  /** A styled text input for use within the sidebar. */
@@ -1469,6 +1590,10 @@ interface SpacerProps extends React$1.ComponentPropsWithRef<"div"> {
1469
1590
  */
1470
1591
  declare function Spacer({ size, axis, className, style, ...props }: SpacerProps): react_jsx_runtime.JSX.Element;
1471
1592
 
1593
+ /** Translatable strings used by Spinner. All keys have English defaults. */
1594
+ interface SpinnerLabels {
1595
+ loading?: string;
1596
+ }
1472
1597
  /** Spinner size variants. Use with cn(spinnerVariants({...})) for non-spinner elements. */
1473
1598
  declare const spinnerVariants: (props?: ({
1474
1599
  size?: "default" | "sm" | "lg" | null | undefined;
@@ -1481,7 +1606,9 @@ declare const spinnerVariants: (props?: ({
1481
1606
  *
1482
1607
  * @prop size - The spinner diameter (sm, default, lg).
1483
1608
  */
1484
- declare function Spinner({ className, size, ...props }: React$1.HTMLAttributes<HTMLDivElement> & VariantProps<typeof spinnerVariants>): react_jsx_runtime.JSX.Element;
1609
+ declare function Spinner({ className, size, labels: labelsProp, ...props }: React$1.HTMLAttributes<HTMLDivElement> & VariantProps<typeof spinnerVariants> & {
1610
+ labels?: SpinnerLabels;
1611
+ }): react_jsx_runtime.JSX.Element;
1485
1612
 
1486
1613
  declare const gapMap: {
1487
1614
  readonly none: "gap-0";
@@ -1606,4 +1733,4 @@ declare function Code({ className, ...props }: React$1.HTMLAttributes<HTMLElemen
1606
1733
  /** Inline monospace span without background styling. */
1607
1734
  declare function Mono({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
1608
1735
 
1609
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Center, type CenterProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Cluster, type ClusterProps, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, type ComboboxOption, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTableColumnHeader, DataTablePagination, DataTableToolbar, DataTableViewOptions, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type Direction, DirectionProvider, Divider, type DividerProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyAction, EmptyDescription, EmptyIcon, EmptyTitle, Field, FieldError, FieldHint, FieldLabel, Fieldset, Form, FormActions, FormActionsPrimary, FormActionsSecondary, FormSection, FormSectionContent, FormSectionDescription, FormSectionHeader, FormSectionTitle, Grid, type GridProps, H1, H2, H3, H4, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupPrefix, InputGroupSuffix, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemIcon, ItemLabel, Kbd, Label, Large, Lead, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Mono, Muted, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, P, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchField, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Small, Spacer, type SpacerProps, Spinner, Stack, type StackProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, createSelectColumn, nativeSelectVariants, navigationMenuTriggerStyle, spinnerVariants, toggleVariants, useDirection, useFieldContext, useSidebar };
1736
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, type BreadcrumbLabels, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, type CarouselLabels, CarouselNext, CarouselPrevious, Center, type CenterProps, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Cluster, type ClusterProps, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, type ComboboxLabels, type ComboboxOption, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DataTableColumnHeader, type DataTableLabels, DataTablePagination, DataTableToolbar, DataTableViewOptions, DatePicker, type DatePickerLabels, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, type DialogLabels, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type Direction, DirectionProvider, Divider, type DividerProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyAction, EmptyDescription, EmptyIcon, EmptyTitle, Field, FieldError, FieldHint, FieldLabel, Fieldset, Form, FormActions, FormActionsPrimary, FormActionsSecondary, FormSection, FormSectionContent, FormSectionDescription, FormSectionHeader, FormSectionTitle, Grid, type GridProps, H1, H2, H3, H4, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupPrefix, InputGroupSuffix, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemIcon, ItemLabel, Kbd, Label, Large, Lead, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Mono, Muted, NativeSelect, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, P, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, type PaginationLabels, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchField, type SearchFieldLabels, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, type SheetLabels, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, type SidebarLabels, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Small, Spacer, type SpacerProps, Spinner, type SpinnerLabels, Stack, type StackProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, createSelectColumn, nativeSelectVariants, navigationMenuTriggerStyle, sidebarMenuButtonVariants, spinnerVariants, toggleVariants, useDirection, useFieldContext, useSidebar };