silicaui-react 0.1.0 → 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/README.md CHANGED
@@ -6,6 +6,7 @@ interaction behavior (focus management, keyboard nav, positioning, a11y) to
6
6
  [Base UI](https://base-ui.com). No styling logic hides in JS: every visual
7
7
  variant is a class string, so the CSS and React layers never drift apart.
8
8
 
9
+ [![Website](https://img.shields.io/badge/website-silicaui.com-8b5cf6?style=flat-square)](https://silicaui.com)
9
10
  [![npm version](https://img.shields.io/npm/v/silicaui-react.svg?style=flat-square)](https://www.npmjs.com/package/silicaui-react)
10
11
  [![npm downloads](https://img.shields.io/npm/dm/silicaui-react.svg?style=flat-square)](https://www.npmjs.com/package/silicaui-react)
11
12
  [![bundle size](https://img.shields.io/bundlephobia/minzip/silicaui-react?style=flat-square)](https://bundlephobia.com/package/silicaui-react)
@@ -81,6 +82,8 @@ Plus all native `<button>` attributes and a forwarded `ref`.
81
82
 
82
83
  ## Links
83
84
 
85
+ - [silicaui.com](https://silicaui.com) — website & docs
86
+
84
87
  - [GitHub repo](https://github.com/silicaui/silicaui)
85
88
  - [Issues](https://github.com/silicaui/silicaui/issues)
86
89
  - [`silicaui`](https://www.npmjs.com/package/silicaui) — the CSS layer this package styles with
@@ -0,0 +1,31 @@
1
+ // src/lib/cx.ts
2
+ function cx(...parts) {
3
+ return parts.filter(Boolean).join(" ");
4
+ }
5
+
6
+ // src/lib/merge-props.ts
7
+ function mergeProps(ours, theirs) {
8
+ const merged = { ...ours, ...theirs };
9
+ merged.className = cx(ours.className, theirs.className);
10
+ if (ours.style || theirs.style) {
11
+ merged.style = { ...ours.style, ...theirs.style };
12
+ }
13
+ if (ours.children != null) {
14
+ merged.children = ours.children;
15
+ }
16
+ for (const key of Object.keys(theirs)) {
17
+ if (/^on[A-Z]/.test(key) && typeof theirs[key] === "function" && typeof ours[key] === "function") {
18
+ const a = ours[key];
19
+ const b = theirs[key];
20
+ merged[key] = (...args) => {
21
+ a(...args);
22
+ b(...args);
23
+ };
24
+ }
25
+ }
26
+ return merged;
27
+ }
28
+
29
+ export { cx, mergeProps };
30
+ //# sourceMappingURL=chunk-LZK2PYJD.js.map
31
+ //# sourceMappingURL=chunk-LZK2PYJD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/cx.ts","../src/lib/merge-props.ts"],"names":[],"mappings":";AACO,SAAS,MACX,KAAA,EACK;AACR,EAAA,OAAO,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACvC;;;ACWO,SAAS,UAAA,CAAW,MAAa,MAAA,EAAsB;AAC5D,EAAA,MAAM,MAAA,GAAgB,EAAE,GAAG,IAAA,EAAM,GAAG,MAAA,EAAO;AAE3C,EAAA,MAAA,CAAO,SAAA,GAAY,EAAA,CAAG,IAAA,CAAK,SAAA,EAAqB,OAAO,SAAmB,CAAA;AAE1E,EAAA,IAAI,IAAA,CAAK,KAAA,IAAS,MAAA,CAAO,KAAA,EAAO;AAC9B,IAAA,MAAA,CAAO,QAAQ,EAAE,GAAI,KAAK,KAAA,EAAkB,GAAI,OAAO,KAAA,EAAiB;AAAA,EAC1E;AAEA,EAAA,IAAI,IAAA,CAAK,YAAY,IAAA,EAAM;AACzB,IAAA,MAAA,CAAO,WAAW,IAAA,CAAK,QAAA;AAAA,EACzB;AAEA,EAAA,KAAA,MAAW,GAAA,IAAO,MAAA,CAAO,IAAA,CAAK,MAAM,CAAA,EAAG;AACrC,IAAA,IACE,UAAA,CAAW,IAAA,CAAK,GAAG,CAAA,IACnB,OAAO,MAAA,CAAO,GAAG,CAAA,KAAM,UAAA,IACvB,OAAO,IAAA,CAAK,GAAG,MAAM,UAAA,EACrB;AACA,MAAA,MAAM,CAAA,GAAI,KAAK,GAAG,CAAA;AAClB,MAAA,MAAM,CAAA,GAAI,OAAO,GAAG,CAAA;AACpB,MAAA,MAAA,CAAO,GAAG,CAAA,GAAI,CAAA,GAAI,IAAA,KAAoB;AACpC,QAAA,CAAA,CAAE,GAAG,IAAI,CAAA;AACT,QAAA,CAAA,CAAE,GAAG,IAAI,CAAA;AAAA,MACX,CAAA;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,MAAA;AACT","file":"chunk-LZK2PYJD.js","sourcesContent":["/** Tiny className joiner. Falsy parts are dropped. */\nexport function cx(\n ...parts: Array<string | false | null | undefined>\n): string {\n return parts.filter(Boolean).join(\" \");\n}\n","import { cx } from \"./cx\";\n\ntype Props = Record<string, unknown>;\n\n/**\n * Merge Silica's own props (`ours`) with the props of a user-supplied element\n * passed via `render` (`theirs`).\n *\n * Rules:\n * - `className` is concatenated (ours first).\n * - `style` is shallow-merged (theirs wins on conflict).\n * - `on*` event handlers present on both are composed (ours runs, then theirs).\n * - `children` defaults to ours (the button's label) unless we have none.\n * - Everything else: theirs wins, so `<Button render={<a href=\"…\" />}>` keeps\n * its own `href`, `target`, etc.\n */\nexport function mergeProps(ours: Props, theirs: Props): Props {\n const merged: Props = { ...ours, ...theirs };\n\n merged.className = cx(ours.className as string, theirs.className as string);\n\n if (ours.style || theirs.style) {\n merged.style = { ...(ours.style as object), ...(theirs.style as object) };\n }\n\n if (ours.children != null) {\n merged.children = ours.children;\n }\n\n for (const key of Object.keys(theirs)) {\n if (\n /^on[A-Z]/.test(key) &&\n typeof theirs[key] === \"function\" &&\n typeof ours[key] === \"function\"\n ) {\n const a = ours[key] as (...args: unknown[]) => void;\n const b = theirs[key] as (...args: unknown[]) => void;\n merged[key] = (...args: unknown[]) => {\n a(...args);\n b(...args);\n };\n }\n }\n\n return merged;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ /** Tiny className joiner. Falsy parts are dropped. */
2
+ declare function cx(...parts: Array<string | false | null | undefined>): string;
3
+
4
+ export { cx as c };
package/dist/index.d.ts CHANGED
@@ -32,6 +32,7 @@ import { Autocomplete as Autocomplete$1 } from '@base-ui-components/react/autoco
32
32
  import { Popover as Popover$1 } from '@base-ui-components/react/popover';
33
33
  import { Tooltip as Tooltip$1 } from '@base-ui-components/react/tooltip';
34
34
  import { Tabs as Tabs$1 } from '@base-ui-components/react/tabs';
35
+ export { c as cx } from './cx-BhkkXRZt.js';
35
36
 
36
37
  /**
37
38
  * Shared token unions used across Silica components.
@@ -2748,7 +2749,4 @@ declare function useSilicaConfig(): SilicaConfig;
2748
2749
  */
2749
2750
  declare function useSilicaClass(): (name: string | false | null | undefined) => string | false | null | undefined;
2750
2751
 
2751
- /** Tiny className joiner. Falsy parts are dropped. */
2752
- declare function cx(...parts: Array<string | false | null | undefined>): string;
2753
-
2754
- export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, type AccordionTriggerProps, Alert, AlertActions, type AlertColor, AlertContent, AlertDescription, AlertDialog, AlertDialogClose, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogProps, AlertDialogTitle, AlertDialogTrigger, type AlertProps, type AlertSize, AlertTitle, type AlertVariant, Autocomplete, type AutocompleteAlign, type AutocompleteColor, AutocompleteItem, type AutocompleteItemProps, type AutocompleteMode, type AutocompleteProps, type AutocompleteSide, type AutocompleteSize, Avatar, type AvatarColor, AvatarGroup, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeVariant, Breadcrumb, type BreadcrumbProps, Button, type ButtonColor, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarColor, type CalendarMode, type CalendarProps, type CalendarValue, Card, CardActions, CardBody, type CardProps, CardTitle, Carousel, CarouselItem, type CarouselItemProps, type CarouselOrientation, type CarouselProps, type CarouselSnap, Chat, ChatBubble, type ChatBubbleColor, type ChatBubbleProps, ChatFooter, type ChatFooterProps, ChatHeader, type ChatHeaderProps, ChatImage, type ChatImageProps, type ChatProps, type ChatSide, Checkbox, CheckboxGroup, type CheckboxGroupOrientation, type CheckboxGroupProps, CheckboxOption, type CheckboxOptionProps, type CheckboxProps, Collapse, CollapseContent, type CollapseProps, CollapseTitle, Collapsible, CollapsiblePanel, type CollapsiblePanelProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, ColorPicker, type ColorPickerFormat, type ColorPickerProps, Combobox, type ComboboxAlign, type ComboboxColor, ComboboxItem, type ComboboxItemProps, type ComboboxProps, type ComboboxSide, type ComboboxSize, type CommandItem, CommandPalette, type CommandPaletteProps, ContextMenu, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, type ContextMenuProps, ContextMenuSeparator, ContextMenuTrigger, type ContextMenuTriggerProps, Countdown, type CountdownProps, type CountdownUnit, DatePicker, type DatePickerAlign, type DatePickerColor, type DatePickerProps, type DatePickerSide, type DatePickerSize, type DateRange, DateRangePicker, type DateRangePickerProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogProps, DialogTitle, DialogTrigger, Diff, type DiffProps, Display, type DisplayProps, Divider, type DividerOrientation, type DividerProps, Dock, type DockColor, DockItem, type DockItemProps, DockLabel, type DockLabelProps, type DockProps, Drawer, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerProps, type DrawerSide, DrawerTitle, DrawerTrigger, DropdownMenu, type DropdownMenuAlign, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSide, DropdownMenuTrigger, Dropzone, type DropzoneProps, type DropzoneRejection, EmptyState, type EmptyStateProps, type EmptyStateSize, Field, FieldControl, type FieldControlProps, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorProps, FieldLabel, type FieldLabelProps, type FieldProps, Fieldset, FieldsetLabel, type FieldsetLabelProps, FieldsetLegend, type FieldsetLegendProps, type FieldsetProps, FileInput, type FileInputProps, type FileInputSize, Filter, FilterItem, type FilterItemProps, type FilterProps, FloatingLabel, type FloatingLabelProps, Footer, type FooterProps, FooterTitle, type FooterTitleProps, Form, type FormProps, Heading, type HeadingLevel, type HeadingProps, Hero, HeroContent, HeroOverlay, type HeroProps, Indicator, IndicatorItem, type IndicatorItemProps, type IndicatorPlacement, type IndicatorProps, Input, type InputColor, type InputProps, type InputSize, Join, type JoinOrientation, type JoinProps, Kbd, type KbdProps, type KbdSize, Label, type LabelProps, Link, type LinkColor, type LinkProps, List, ListColGrow, type ListColGrowProps, type ListProps, ListRow, type ListRowProps, ListTitle, type ListTitleProps, Loading, type LoadingProps, type LoadingSize, MAX_CHROMA, Mask, type MaskProps, type MaskVariant, Menu, MenuItem, type MenuProps, MenuTitle, Menubar, type MenubarAlign, MenubarContent, type MenubarContentProps, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, type MenubarProps, MenubarSeparator, type MenubarSide, MenubarTrigger, type MenubarTriggerProps, Meter, type MeterColor, type MeterProps, type MeterSize, MockupBrowser, type MockupBrowserProps, MockupCode, MockupCodeLine, type MockupCodeLineProps, type MockupCodeProps, MockupPhone, type MockupPhoneProps, MockupWindow, type MockupWindowProps, NativeSelect, type NativeSelectColor, type NativeSelectProps, type NativeSelectSize, Navbar, NavbarCenter, NavbarEnd, type NavbarProps, NavbarStart, NavigationMenu, type NavigationMenuAlign, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, type NavigationMenuProps, type NavigationMenuSide, NavigationMenuTrigger, type NavigationMenuTriggerProps, NumberField, type NumberFieldProps, type Oklch, Pagination, type PaginationColor, type PaginationProps, type PaginationSize, Popover, type PopoverAlign, PopoverClose, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverProps, type PopoverSide, PopoverTitle, PopoverTrigger, PreviewCard, type PreviewCardAlign, type PreviewCardProps, type PreviewCardSide, Progress, type ProgressColor, type ProgressProps, type ProgressSize, Prose, type ProseProps, type ProseSize, RadialProgress, type RadialProgressColor, type RadialProgressProps, Radio, RadioGroup, type RadioGroupOrientation, type RadioGroupProps, RadioOption, type RadioOptionProps, type RadioProps, Range, type RangeColor, type RangeProps, Rating, type RatingColor, type RatingProps, type RatingSize, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, Select, type SelectAlign, type SelectColor, SelectGroup, SelectGroupLabel, SelectItem, type SelectItemProps, type SelectItems, type SelectOptionData, type SelectProps, SelectSeparator, type SelectSide, type SelectSize, type SilicaColor, type SilicaConfig, SilicaProvider, type SilicaProviderProps, type SilicaSize, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderColor, type SliderProps, type SliderSize, Stack, type StackPeek, type StackProps, Stat, StatDesc, StatFigure, type StatProps, StatTitle, StatValue, Stats, type StatsProps, Status, type StatusColor, type StatusProps, type StatusSize, Step, type StepColor, type StepProps, Steps, type StepsProps, Swap, type SwapProps, type SwapVariant, Switch, type SwitchColor, type SwitchProps, type SwitchSize, type TabValue, Table, type TableProps, type TableSize, Tabs, type TabsColor, TabsList, type TabsListProps, TabsPanel, type TabsProps, TabsTab, type TabsVariant, TagInput, type TagInputProps, type TagInputSize, Text, type TextProps, type TextVariant, Textarea, type TextareaColor, type TextareaProps, type TextareaSize, ThemeController, type ThemeControllerProps, Timeline, TimelineEnd, type TimelineEndProps, TimelineItem, type TimelineItemProps, TimelineMiddle, type TimelineMiddleProps, type TimelineOrientation, type TimelineProps, TimelineStart, type TimelineStartProps, ToastProvider, type ToastProviderProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarGroup, type ToolbarGroupProps, ToolbarLink, type ToolbarLinkProps, type ToolbarProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, type TooltipAlign, type TooltipProps, TooltipProvider, type TooltipProviderProps, type TooltipSide, type TreeNode, TreeView, type TreeViewProps, Validator, ValidatorHint, type ValidatorHintProps, type ValidatorProps, type Weekday, Wizard, type WizardProps, type WizardStep, cx, formatOklch, hexToOklch, inGamut, oklchToHex, oklchToRgb, parseOklch, useSilicaClass, useSilicaConfig, useToast };
2752
+ export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, type AccordionTriggerProps, Alert, AlertActions, type AlertColor, AlertContent, AlertDescription, AlertDialog, AlertDialogClose, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogProps, AlertDialogTitle, AlertDialogTrigger, type AlertProps, type AlertSize, AlertTitle, type AlertVariant, Autocomplete, type AutocompleteAlign, type AutocompleteColor, AutocompleteItem, type AutocompleteItemProps, type AutocompleteMode, type AutocompleteProps, type AutocompleteSide, type AutocompleteSize, Avatar, type AvatarColor, AvatarGroup, type AvatarProps, type AvatarShape, type AvatarSize, type AvatarStatus, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeVariant, Breadcrumb, type BreadcrumbProps, Button, type ButtonColor, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarColor, type CalendarMode, type CalendarProps, type CalendarValue, Card, CardActions, CardBody, type CardProps, CardTitle, Carousel, CarouselItem, type CarouselItemProps, type CarouselOrientation, type CarouselProps, type CarouselSnap, Chat, ChatBubble, type ChatBubbleColor, type ChatBubbleProps, ChatFooter, type ChatFooterProps, ChatHeader, type ChatHeaderProps, ChatImage, type ChatImageProps, type ChatProps, type ChatSide, Checkbox, CheckboxGroup, type CheckboxGroupOrientation, type CheckboxGroupProps, CheckboxOption, type CheckboxOptionProps, type CheckboxProps, Collapse, CollapseContent, type CollapseProps, CollapseTitle, Collapsible, CollapsiblePanel, type CollapsiblePanelProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, ColorPicker, type ColorPickerFormat, type ColorPickerProps, Combobox, type ComboboxAlign, type ComboboxColor, ComboboxItem, type ComboboxItemProps, type ComboboxProps, type ComboboxSide, type ComboboxSize, type CommandItem, CommandPalette, type CommandPaletteProps, ContextMenu, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, type ContextMenuProps, ContextMenuSeparator, ContextMenuTrigger, type ContextMenuTriggerProps, Countdown, type CountdownProps, type CountdownUnit, DatePicker, type DatePickerAlign, type DatePickerColor, type DatePickerProps, type DatePickerSide, type DatePickerSize, type DateRange, DateRangePicker, type DateRangePickerProps, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogProps, DialogTitle, DialogTrigger, Diff, type DiffProps, Display, type DisplayProps, Divider, type DividerOrientation, type DividerProps, Dock, type DockColor, DockItem, type DockItemProps, DockLabel, type DockLabelProps, type DockProps, Drawer, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerProps, type DrawerSide, DrawerTitle, DrawerTrigger, DropdownMenu, type DropdownMenuAlign, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSide, DropdownMenuTrigger, Dropzone, type DropzoneProps, type DropzoneRejection, EmptyState, type EmptyStateProps, type EmptyStateSize, Field, FieldControl, type FieldControlProps, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorProps, FieldLabel, type FieldLabelProps, type FieldProps, Fieldset, FieldsetLabel, type FieldsetLabelProps, FieldsetLegend, type FieldsetLegendProps, type FieldsetProps, FileInput, type FileInputProps, type FileInputSize, Filter, FilterItem, type FilterItemProps, type FilterProps, FloatingLabel, type FloatingLabelProps, Footer, type FooterProps, FooterTitle, type FooterTitleProps, Form, type FormProps, Heading, type HeadingLevel, type HeadingProps, Hero, HeroContent, HeroOverlay, type HeroProps, Indicator, IndicatorItem, type IndicatorItemProps, type IndicatorPlacement, type IndicatorProps, Input, type InputColor, type InputProps, type InputSize, Join, type JoinOrientation, type JoinProps, Kbd, type KbdProps, type KbdSize, Label, type LabelProps, Link, type LinkColor, type LinkProps, List, ListColGrow, type ListColGrowProps, type ListProps, ListRow, type ListRowProps, ListTitle, type ListTitleProps, Loading, type LoadingProps, type LoadingSize, MAX_CHROMA, Mask, type MaskProps, type MaskVariant, Menu, MenuItem, type MenuProps, MenuTitle, Menubar, type MenubarAlign, MenubarContent, type MenubarContentProps, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, type MenubarProps, MenubarSeparator, type MenubarSide, MenubarTrigger, type MenubarTriggerProps, Meter, type MeterColor, type MeterProps, type MeterSize, MockupBrowser, type MockupBrowserProps, MockupCode, MockupCodeLine, type MockupCodeLineProps, type MockupCodeProps, MockupPhone, type MockupPhoneProps, MockupWindow, type MockupWindowProps, NativeSelect, type NativeSelectColor, type NativeSelectProps, type NativeSelectSize, Navbar, NavbarCenter, NavbarEnd, type NavbarProps, NavbarStart, NavigationMenu, type NavigationMenuAlign, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, type NavigationMenuProps, type NavigationMenuSide, NavigationMenuTrigger, type NavigationMenuTriggerProps, NumberField, type NumberFieldProps, type Oklch, Pagination, type PaginationColor, type PaginationProps, type PaginationSize, Popover, type PopoverAlign, PopoverClose, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverProps, type PopoverSide, PopoverTitle, PopoverTrigger, PreviewCard, type PreviewCardAlign, type PreviewCardProps, type PreviewCardSide, Progress, type ProgressColor, type ProgressProps, type ProgressSize, Prose, type ProseProps, type ProseSize, RadialProgress, type RadialProgressColor, type RadialProgressProps, Radio, RadioGroup, type RadioGroupOrientation, type RadioGroupProps, RadioOption, type RadioOptionProps, type RadioProps, Range, type RangeColor, type RangeProps, Rating, type RatingColor, type RatingProps, type RatingSize, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, Select, type SelectAlign, type SelectColor, SelectGroup, SelectGroupLabel, SelectItem, type SelectItemProps, type SelectItems, type SelectOptionData, type SelectProps, SelectSeparator, type SelectSide, type SelectSize, type SilicaColor, type SilicaConfig, SilicaProvider, type SilicaProviderProps, type SilicaSize, Skeleton, type SkeletonProps, type SkeletonShape, Slider, type SliderColor, type SliderProps, type SliderSize, Stack, type StackPeek, type StackProps, Stat, StatDesc, StatFigure, type StatProps, StatTitle, StatValue, Stats, type StatsProps, Status, type StatusColor, type StatusProps, type StatusSize, Step, type StepColor, type StepProps, Steps, type StepsProps, Swap, type SwapProps, type SwapVariant, Switch, type SwitchColor, type SwitchProps, type SwitchSize, type TabValue, Table, type TableProps, type TableSize, Tabs, type TabsColor, TabsList, type TabsListProps, TabsPanel, type TabsProps, TabsTab, type TabsVariant, TagInput, type TagInputProps, type TagInputSize, Text, type TextProps, type TextVariant, Textarea, type TextareaColor, type TextareaProps, type TextareaSize, ThemeController, type ThemeControllerProps, Timeline, TimelineEnd, type TimelineEndProps, TimelineItem, type TimelineItemProps, TimelineMiddle, type TimelineMiddleProps, type TimelineOrientation, type TimelineProps, TimelineStart, type TimelineStartProps, ToastProvider, type ToastProviderProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarGroup, type ToolbarGroupProps, ToolbarLink, type ToolbarLinkProps, type ToolbarProps, ToolbarSeparator, type ToolbarSeparatorProps, Tooltip, type TooltipAlign, type TooltipProps, TooltipProvider, type TooltipProviderProps, type TooltipSide, type TreeNode, TreeView, type TreeViewProps, Validator, ValidatorHint, type ValidatorHintProps, type ValidatorProps, type Weekday, Wizard, type WizardProps, type WizardStep, formatOklch, hexToOklch, inGamut, oklchToHex, oklchToRgb, parseOklch, useSilicaClass, useSilicaConfig, useToast };
package/dist/index.js CHANGED
@@ -1,3 +1,6 @@
1
+ 'use client';
2
+ import { cx, mergeProps } from './chunk-LZK2PYJD.js';
3
+ export { cx } from './chunk-LZK2PYJD.js';
1
4
  import * as React74 from 'react';
2
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
6
  import { Accordion as Accordion$1 } from '@base-ui-components/react/accordion';
@@ -27,35 +30,6 @@ import { Popover as Popover$1 } from '@base-ui-components/react/popover';
27
30
  import { Tooltip as Tooltip$1 } from '@base-ui-components/react/tooltip';
28
31
  import { Tabs as Tabs$1 } from '@base-ui-components/react/tabs';
29
32
 
30
- // src/button.tsx
31
-
32
- // src/lib/cx.ts
33
- function cx(...parts) {
34
- return parts.filter(Boolean).join(" ");
35
- }
36
-
37
- // src/lib/merge-props.ts
38
- function mergeProps(ours, theirs) {
39
- const merged = { ...ours, ...theirs };
40
- merged.className = cx(ours.className, theirs.className);
41
- if (ours.style || theirs.style) {
42
- merged.style = { ...ours.style, ...theirs.style };
43
- }
44
- if (ours.children != null) {
45
- merged.children = ours.children;
46
- }
47
- for (const key of Object.keys(theirs)) {
48
- if (/^on[A-Z]/.test(key) && typeof theirs[key] === "function" && typeof ours[key] === "function") {
49
- const a = ours[key];
50
- const b = theirs[key];
51
- merged[key] = (...args) => {
52
- a(...args);
53
- b(...args);
54
- };
55
- }
56
- }
57
- return merged;
58
- }
59
33
  var DEFAULT_CONFIG = { prefix: "" };
60
34
  var SilicaConfigContext = React74.createContext(DEFAULT_CONFIG);
61
35
  function SilicaProvider({ prefix = "", children }) {
@@ -4682,6 +4656,6 @@ var Wizard = React74.forwardRef(
4682
4656
  }
4683
4657
  );
4684
4658
 
4685
- export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, Alert, AlertActions, AlertContent, AlertDescription, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Autocomplete, AutocompleteItem, Avatar, AvatarGroup, Badge, Breadcrumb, Button, Calendar, Card, CardActions, CardBody, CardTitle, Carousel, CarouselItem, Chat, ChatBubble, ChatFooter, ChatHeader, ChatImage, Checkbox, CheckboxGroup, CheckboxOption, Collapse, CollapseContent, CollapseTitle, Collapsible, CollapsiblePanel, CollapsibleTrigger, ColorPicker, Combobox, ComboboxItem, CommandPalette, ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuTrigger, Countdown, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger, Diff, Display, Divider, Dock, DockItem, DockLabel, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Dropzone, EmptyState, Field, FieldControl, FieldDescription, FieldError, FieldLabel, Fieldset, FieldsetLabel, FieldsetLegend, FileInput, Filter, FilterItem, FloatingLabel, Footer, FooterTitle, Form, Heading, Hero, HeroContent, HeroOverlay, Indicator, IndicatorItem, Input, Join, Kbd, Label, Link, List, ListColGrow, ListRow, ListTitle, Loading, MAX_CHROMA, Mask, Menu, MenuItem, MenuTitle, Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarSeparator, MenubarTrigger, Meter, MockupBrowser, MockupCode, MockupCodeLine, MockupPhone, MockupWindow, NativeSelect, Navbar, NavbarCenter, NavbarEnd, NavbarStart, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuTrigger, NumberField, Pagination, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, PreviewCard, Progress, Prose, RadialProgress, Radio, RadioGroup, RadioOption, Range, Rating, ScrollArea, Select, SelectGroup, SelectGroupLabel, SelectItem, SelectSeparator, SilicaProvider, Skeleton, Slider, Stack, Stat, StatDesc, StatFigure, StatTitle, StatValue, Stats, Status, Step, Steps, Swap, Switch, Table, Tabs, TabsList, TabsPanel, TabsTab, TagInput, Text, Textarea, ThemeController, Timeline, TimelineEnd, TimelineItem, TimelineMiddle, TimelineStart, ToastProvider, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, ToolbarButton, ToolbarGroup, ToolbarLink, ToolbarSeparator, Tooltip, TooltipProvider, TreeView, Validator, ValidatorHint, Wizard, cx, formatOklch, hexToOklch, inGamut, oklchToHex, oklchToRgb, parseOklch, useSilicaClass, useSilicaConfig, useToast };
4659
+ export { Accordion, AccordionItem, AccordionPanel, AccordionTrigger, Alert, AlertActions, AlertContent, AlertDescription, AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Autocomplete, AutocompleteItem, Avatar, AvatarGroup, Badge, Breadcrumb, Button, Calendar, Card, CardActions, CardBody, CardTitle, Carousel, CarouselItem, Chat, ChatBubble, ChatFooter, ChatHeader, ChatImage, Checkbox, CheckboxGroup, CheckboxOption, Collapse, CollapseContent, CollapseTitle, Collapsible, CollapsiblePanel, CollapsibleTrigger, ColorPicker, Combobox, ComboboxItem, CommandPalette, ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuTrigger, Countdown, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger, Diff, Display, Divider, Dock, DockItem, DockLabel, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Dropzone, EmptyState, Field, FieldControl, FieldDescription, FieldError, FieldLabel, Fieldset, FieldsetLabel, FieldsetLegend, FileInput, Filter, FilterItem, FloatingLabel, Footer, FooterTitle, Form, Heading, Hero, HeroContent, HeroOverlay, Indicator, IndicatorItem, Input, Join, Kbd, Label, Link, List, ListColGrow, ListRow, ListTitle, Loading, MAX_CHROMA, Mask, Menu, MenuItem, MenuTitle, Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarSeparator, MenubarTrigger, Meter, MockupBrowser, MockupCode, MockupCodeLine, MockupPhone, MockupWindow, NativeSelect, Navbar, NavbarCenter, NavbarEnd, NavbarStart, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuTrigger, NumberField, Pagination, Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger, PreviewCard, Progress, Prose, RadialProgress, Radio, RadioGroup, RadioOption, Range, Rating, ScrollArea, Select, SelectGroup, SelectGroupLabel, SelectItem, SelectSeparator, SilicaProvider, Skeleton, Slider, Stack, Stat, StatDesc, StatFigure, StatTitle, StatValue, Stats, Status, Step, Steps, Swap, Switch, Table, Tabs, TabsList, TabsPanel, TabsTab, TagInput, Text, Textarea, ThemeController, Timeline, TimelineEnd, TimelineItem, TimelineMiddle, TimelineStart, ToastProvider, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, ToolbarButton, ToolbarGroup, ToolbarLink, ToolbarSeparator, Tooltip, TooltipProvider, TreeView, Validator, ValidatorHint, Wizard, formatOklch, hexToOklch, inGamut, oklchToHex, oklchToRgb, parseOklch, useSilicaClass, useSilicaConfig, useToast };
4686
4660
  //# sourceMappingURL=index.js.map
4687
4661
  //# sourceMappingURL=index.js.map