@umami/react-zen 0.231.0 → 0.233.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
@@ -1,6 +1,6 @@
1
1
  # zen
2
2
 
3
- **zen** is a props-driven React component library built for speed. Build polished interfaces without writing HTML, CSS, or thinking about Tailwind classes.
3
+ **Zen** is a props-driven React component library built for speed. Build polished interfaces without writing HTML, CSS, or thinking about Tailwind classes.
4
4
 
5
5
  - **Props over classes** - Style through component props, not utility classes
6
6
  - **Design included** - Complete design system out of the box with dark mode
@@ -43,11 +43,11 @@ export default function Welcome() {
43
43
 
44
44
  No `className`. No CSS files. Just components and props.
45
45
 
46
- ## Why zen?
46
+ ## Why Zen?
47
47
 
48
48
  Building UI is slow. You have to think about markup, CSS organization, responsive breakpoints, accessibility, and design consistency.
49
49
 
50
- zen eliminates that friction:
50
+ Zen eliminates that friction:
51
51
 
52
52
  | Traditional approach | zen approach |
53
53
  |---------------------|--------------|
package/dist/index.d.mts CHANGED
@@ -117,6 +117,12 @@ type MinWidth = Spacing | Fraction | SizingSpecial | WidthViewport;
117
117
  type MaxWidth = Spacing | Fraction | MaxWidthSpecial | WidthViewport;
118
118
  type MinHeight = Spacing | Fraction | SizingSpecial | HeightViewport;
119
119
  type MaxHeight = Spacing | Fraction | SizingSpecial | HeightViewport;
120
+ interface StateStyles {
121
+ color?: FontColor;
122
+ backgroundColor?: BackgroundColor;
123
+ borderColor?: BorderColor;
124
+ opacity?: Opacity;
125
+ }
120
126
 
121
127
  type RenderProp<P = Record<string, unknown>> = ReactElement | ((props: P) => ReactElement);
122
128
  /**
@@ -224,6 +230,9 @@ interface BoxProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
224
230
  order?: number;
225
231
  zIndex?: number;
226
232
  theme?: string;
233
+ hover?: StateStyles;
234
+ focus?: StateStyles;
235
+ active?: StateStyles;
227
236
  as?: string;
228
237
  render?: RenderProp<BoxRenderProps>;
229
238
  }
@@ -619,7 +628,7 @@ declare function Image({ src, alt, objectFit, isCentered, borderRadius, shadow,
619
628
  interface LabelProps extends Omit<TextProps, 'as' | 'render'> {
620
629
  htmlFor?: string;
621
630
  }
622
- declare function Label({ size, weight, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
631
+ declare function Label({ size, weight, lineHeight, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
623
632
 
624
633
  interface LoadingProps extends BoxProps {
625
634
  size?: 'sm' | 'md' | 'lg';
@@ -747,6 +756,7 @@ interface SelectProps extends SelectProps$1<HTMLSelectElement> {
747
756
  searchValue?: string;
748
757
  searchDelay?: number;
749
758
  isFullscreen?: boolean;
759
+ maxHeight?: string | number;
750
760
  onSearch?: (value: string) => void;
751
761
  onChange?: (e: any) => void;
752
762
  buttonProps?: ButtonProps;
@@ -756,7 +766,7 @@ interface SelectProps extends SelectProps$1<HTMLSelectElement> {
756
766
  defaultChildren: ReactNode;
757
767
  }) => ReactNode);
758
768
  }
759
- declare function Select({ items, value, defaultValue, label, isLoading, allowSearch, searchValue, searchDelay, isFullscreen, onSearch, onChange, buttonProps, listProps, popoverProps, renderValue, className, children, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
769
+ declare function Select({ items, value, defaultValue, label, isLoading, allowSearch, searchValue, searchDelay, isFullscreen, maxHeight, onSearch, onChange, buttonProps, listProps, popoverProps, renderValue, className, children, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
760
770
 
761
771
  interface SidebarProps extends ColumnProps {
762
772
  isCollapsed?: boolean;
@@ -845,6 +855,12 @@ interface ThemeButtonProps extends ButtonProps {
845
855
  }
846
856
  declare function ThemeButton({ className, variant, target, onPress, ...props }: ThemeButtonProps): react_jsx_runtime.JSX.Element;
847
857
 
858
+ type ThemeMode = 'light' | 'dark' | 'system';
859
+ interface ThemeSwitcherProps {
860
+ className?: string;
861
+ }
862
+ declare function ThemeSwitcher({ className }: ThemeSwitcherProps): react_jsx_runtime.JSX.Element;
863
+
848
864
  interface ToggleProps extends ToggleButtonProps {
849
865
  label?: string;
850
866
  value?: string;
@@ -896,4 +912,4 @@ interface ZenProviderProps {
896
912
  }
897
913
  declare function ZenProvider({ children, theme, colorScheme, toast, }: ZenProviderProps): react_jsx_runtime.JSX.Element;
898
914
 
899
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, AlertBanner, type AlertBannerProps, AlertDialog, type AlertDialogProps, Blockquote, type BlockquoteProps, Box, type BoxProps, type BoxRenderProps, Breadcrumb, Breadcrumbs, type BreakpointKey, Button, type ButtonProps, type ButtonRenderProps, Calendar, type CalendarProps, Checkbox, type CheckboxProps, Code, type CodeProps, Column, type ColumnProps, ComboBox, type ComboBoxProps, ConfirmationDialog, type ConfirmationDialogProps, Container, type ContainerProps, CopyButton, type CopyButtonProps, DataCard, type DataCardProps, DataColumn, type DataColumnProps, DataTable, type DataTableProps, Dialog, type DialogProps, Dots, type DotsProps, Flexbox, type FlexboxProps, FloatingTooltip, type FloatingTooltipProps, Form, FormButtons, type FormButtonsProps, FormController, type FormControllerProps, FormField, FormFieldArray, type FormFieldArrayProps, type FormFieldProps, type FormProps, FormResetButton, type FormResetButtonProps, FormSubmitButton, Grid, type GridProps, Heading, type HeadingProps, type HoverButtonProps, HoverTrigger, Icon, IconLabel, type IconLabelProps, type IconProps, Image, type ImageProps, Label, type LabelProps, List, ListItem, type ListItemProps, type ListProps, ListSection, type ListSectionProps, ListSeparator, Loading, LoadingButton, type LoadingButtonProps, type LoadingProps, Menu, MenuItem, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, Modal, type ModalProps, NavMenu, NavMenuGroup, type NavMenuGroupProps, NavMenuItem, type NavMenuItemProps, type NavMenuProps, Navbar, NavbarContext, NavbarItem, type NavbarItemProps, type NavbarProps, type NavigationContext, PasswordField, type PasswordFieldProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, ProgressCircle, type ProgressCircleProps, Radio, RadioGroup, type RadioGroupProps, type RenderProp, Row, type RowProps, SearchField, type SearchFieldProps, Select, type SelectProps, Sidebar, SidebarHeader, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, Slider, type SliderProps, Spinner, type SpinnerProps, StatusLight, type StatusLightProps, type StrokeWidth, SubMenuTrigger, type SubmenuTriggerProps, Switch, type SwitchProps, Tab, TabList, TabPanel, Table, TableBody, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableHeader, TableRow, Tabs, Text, TextField, type TextFieldProps, type TextProps, type TextRenderProps, type Theme, ThemeButton, type ThemeButtonProps, Toast, ToastContext, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastState, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipBubble, type TooltipBubbleProps, type TooltipProps, ZenProvider, type ZenProviderProps, removeToast, resolveRender, useBreakpoint, useDebounce, useInitTheme, useNavigationContext, useTheme, useToast };
915
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, AlertBanner, type AlertBannerProps, AlertDialog, type AlertDialogProps, Blockquote, type BlockquoteProps, Box, type BoxProps, type BoxRenderProps, Breadcrumb, Breadcrumbs, type BreakpointKey, Button, type ButtonProps, type ButtonRenderProps, Calendar, type CalendarProps, Checkbox, type CheckboxProps, Code, type CodeProps, Column, type ColumnProps, ComboBox, type ComboBoxProps, ConfirmationDialog, type ConfirmationDialogProps, Container, type ContainerProps, CopyButton, type CopyButtonProps, DataCard, type DataCardProps, DataColumn, type DataColumnProps, DataTable, type DataTableProps, Dialog, type DialogProps, Dots, type DotsProps, Flexbox, type FlexboxProps, FloatingTooltip, type FloatingTooltipProps, Form, FormButtons, type FormButtonsProps, FormController, type FormControllerProps, FormField, FormFieldArray, type FormFieldArrayProps, type FormFieldProps, type FormProps, FormResetButton, type FormResetButtonProps, FormSubmitButton, Grid, type GridProps, Heading, type HeadingProps, type HoverButtonProps, HoverTrigger, Icon, IconLabel, type IconLabelProps, type IconProps, Image, type ImageProps, Label, type LabelProps, List, ListItem, type ListItemProps, type ListProps, ListSection, type ListSectionProps, ListSeparator, Loading, LoadingButton, type LoadingButtonProps, type LoadingProps, Menu, MenuItem, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, Modal, type ModalProps, NavMenu, NavMenuGroup, type NavMenuGroupProps, NavMenuItem, type NavMenuItemProps, type NavMenuProps, Navbar, NavbarContext, NavbarItem, type NavbarItemProps, type NavbarProps, type NavigationContext, PasswordField, type PasswordFieldProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, ProgressCircle, type ProgressCircleProps, Radio, RadioGroup, type RadioGroupProps, type RenderProp, Row, type RowProps, SearchField, type SearchFieldProps, Select, type SelectProps, Sidebar, SidebarHeader, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, Slider, type SliderProps, Spinner, type SpinnerProps, StatusLight, type StatusLightProps, type StrokeWidth, SubMenuTrigger, type SubmenuTriggerProps, Switch, type SwitchProps, Tab, TabList, TabPanel, Table, TableBody, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableHeader, TableRow, Tabs, Text, TextField, type TextFieldProps, type TextProps, type TextRenderProps, type Theme, ThemeButton, type ThemeButtonProps, type ThemeMode, ThemeSwitcher, type ThemeSwitcherProps, Toast, ToastContext, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastState, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipBubble, type TooltipBubbleProps, type TooltipProps, ZenProvider, type ZenProviderProps, removeToast, resolveRender, useBreakpoint, useDebounce, useInitTheme, useNavigationContext, useTheme, useToast };
package/dist/index.d.ts CHANGED
@@ -117,6 +117,12 @@ type MinWidth = Spacing | Fraction | SizingSpecial | WidthViewport;
117
117
  type MaxWidth = Spacing | Fraction | MaxWidthSpecial | WidthViewport;
118
118
  type MinHeight = Spacing | Fraction | SizingSpecial | HeightViewport;
119
119
  type MaxHeight = Spacing | Fraction | SizingSpecial | HeightViewport;
120
+ interface StateStyles {
121
+ color?: FontColor;
122
+ backgroundColor?: BackgroundColor;
123
+ borderColor?: BorderColor;
124
+ opacity?: Opacity;
125
+ }
120
126
 
121
127
  type RenderProp<P = Record<string, unknown>> = ReactElement | ((props: P) => ReactElement);
122
128
  /**
@@ -224,6 +230,9 @@ interface BoxProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
224
230
  order?: number;
225
231
  zIndex?: number;
226
232
  theme?: string;
233
+ hover?: StateStyles;
234
+ focus?: StateStyles;
235
+ active?: StateStyles;
227
236
  as?: string;
228
237
  render?: RenderProp<BoxRenderProps>;
229
238
  }
@@ -619,7 +628,7 @@ declare function Image({ src, alt, objectFit, isCentered, borderRadius, shadow,
619
628
  interface LabelProps extends Omit<TextProps, 'as' | 'render'> {
620
629
  htmlFor?: string;
621
630
  }
622
- declare function Label({ size, weight, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
631
+ declare function Label({ size, weight, lineHeight, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
623
632
 
624
633
  interface LoadingProps extends BoxProps {
625
634
  size?: 'sm' | 'md' | 'lg';
@@ -747,6 +756,7 @@ interface SelectProps extends SelectProps$1<HTMLSelectElement> {
747
756
  searchValue?: string;
748
757
  searchDelay?: number;
749
758
  isFullscreen?: boolean;
759
+ maxHeight?: string | number;
750
760
  onSearch?: (value: string) => void;
751
761
  onChange?: (e: any) => void;
752
762
  buttonProps?: ButtonProps;
@@ -756,7 +766,7 @@ interface SelectProps extends SelectProps$1<HTMLSelectElement> {
756
766
  defaultChildren: ReactNode;
757
767
  }) => ReactNode);
758
768
  }
759
- declare function Select({ items, value, defaultValue, label, isLoading, allowSearch, searchValue, searchDelay, isFullscreen, onSearch, onChange, buttonProps, listProps, popoverProps, renderValue, className, children, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
769
+ declare function Select({ items, value, defaultValue, label, isLoading, allowSearch, searchValue, searchDelay, isFullscreen, maxHeight, onSearch, onChange, buttonProps, listProps, popoverProps, renderValue, className, children, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
760
770
 
761
771
  interface SidebarProps extends ColumnProps {
762
772
  isCollapsed?: boolean;
@@ -845,6 +855,12 @@ interface ThemeButtonProps extends ButtonProps {
845
855
  }
846
856
  declare function ThemeButton({ className, variant, target, onPress, ...props }: ThemeButtonProps): react_jsx_runtime.JSX.Element;
847
857
 
858
+ type ThemeMode = 'light' | 'dark' | 'system';
859
+ interface ThemeSwitcherProps {
860
+ className?: string;
861
+ }
862
+ declare function ThemeSwitcher({ className }: ThemeSwitcherProps): react_jsx_runtime.JSX.Element;
863
+
848
864
  interface ToggleProps extends ToggleButtonProps {
849
865
  label?: string;
850
866
  value?: string;
@@ -896,4 +912,4 @@ interface ZenProviderProps {
896
912
  }
897
913
  declare function ZenProvider({ children, theme, colorScheme, toast, }: ZenProviderProps): react_jsx_runtime.JSX.Element;
898
914
 
899
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, AlertBanner, type AlertBannerProps, AlertDialog, type AlertDialogProps, Blockquote, type BlockquoteProps, Box, type BoxProps, type BoxRenderProps, Breadcrumb, Breadcrumbs, type BreakpointKey, Button, type ButtonProps, type ButtonRenderProps, Calendar, type CalendarProps, Checkbox, type CheckboxProps, Code, type CodeProps, Column, type ColumnProps, ComboBox, type ComboBoxProps, ConfirmationDialog, type ConfirmationDialogProps, Container, type ContainerProps, CopyButton, type CopyButtonProps, DataCard, type DataCardProps, DataColumn, type DataColumnProps, DataTable, type DataTableProps, Dialog, type DialogProps, Dots, type DotsProps, Flexbox, type FlexboxProps, FloatingTooltip, type FloatingTooltipProps, Form, FormButtons, type FormButtonsProps, FormController, type FormControllerProps, FormField, FormFieldArray, type FormFieldArrayProps, type FormFieldProps, type FormProps, FormResetButton, type FormResetButtonProps, FormSubmitButton, Grid, type GridProps, Heading, type HeadingProps, type HoverButtonProps, HoverTrigger, Icon, IconLabel, type IconLabelProps, type IconProps, Image, type ImageProps, Label, type LabelProps, List, ListItem, type ListItemProps, type ListProps, ListSection, type ListSectionProps, ListSeparator, Loading, LoadingButton, type LoadingButtonProps, type LoadingProps, Menu, MenuItem, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, Modal, type ModalProps, NavMenu, NavMenuGroup, type NavMenuGroupProps, NavMenuItem, type NavMenuItemProps, type NavMenuProps, Navbar, NavbarContext, NavbarItem, type NavbarItemProps, type NavbarProps, type NavigationContext, PasswordField, type PasswordFieldProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, ProgressCircle, type ProgressCircleProps, Radio, RadioGroup, type RadioGroupProps, type RenderProp, Row, type RowProps, SearchField, type SearchFieldProps, Select, type SelectProps, Sidebar, SidebarHeader, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, Slider, type SliderProps, Spinner, type SpinnerProps, StatusLight, type StatusLightProps, type StrokeWidth, SubMenuTrigger, type SubmenuTriggerProps, Switch, type SwitchProps, Tab, TabList, TabPanel, Table, TableBody, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableHeader, TableRow, Tabs, Text, TextField, type TextFieldProps, type TextProps, type TextRenderProps, type Theme, ThemeButton, type ThemeButtonProps, Toast, ToastContext, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastState, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipBubble, type TooltipBubbleProps, type TooltipProps, ZenProvider, type ZenProviderProps, removeToast, resolveRender, useBreakpoint, useDebounce, useInitTheme, useNavigationContext, useTheme, useToast };
915
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, AlertBanner, type AlertBannerProps, AlertDialog, type AlertDialogProps, Blockquote, type BlockquoteProps, Box, type BoxProps, type BoxRenderProps, Breadcrumb, Breadcrumbs, type BreakpointKey, Button, type ButtonProps, type ButtonRenderProps, Calendar, type CalendarProps, Checkbox, type CheckboxProps, Code, type CodeProps, Column, type ColumnProps, ComboBox, type ComboBoxProps, ConfirmationDialog, type ConfirmationDialogProps, Container, type ContainerProps, CopyButton, type CopyButtonProps, DataCard, type DataCardProps, DataColumn, type DataColumnProps, DataTable, type DataTableProps, Dialog, type DialogProps, Dots, type DotsProps, Flexbox, type FlexboxProps, FloatingTooltip, type FloatingTooltipProps, Form, FormButtons, type FormButtonsProps, FormController, type FormControllerProps, FormField, FormFieldArray, type FormFieldArrayProps, type FormFieldProps, type FormProps, FormResetButton, type FormResetButtonProps, FormSubmitButton, Grid, type GridProps, Heading, type HeadingProps, type HoverButtonProps, HoverTrigger, Icon, IconLabel, type IconLabelProps, type IconProps, Image, type ImageProps, Label, type LabelProps, List, ListItem, type ListItemProps, type ListProps, ListSection, type ListSectionProps, ListSeparator, Loading, LoadingButton, type LoadingButtonProps, type LoadingProps, Menu, MenuItem, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, Modal, type ModalProps, NavMenu, NavMenuGroup, type NavMenuGroupProps, NavMenuItem, type NavMenuItemProps, type NavMenuProps, Navbar, NavbarContext, NavbarItem, type NavbarItemProps, type NavbarProps, type NavigationContext, PasswordField, type PasswordFieldProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, ProgressCircle, type ProgressCircleProps, Radio, RadioGroup, type RadioGroupProps, type RenderProp, Row, type RowProps, SearchField, type SearchFieldProps, Select, type SelectProps, Sidebar, SidebarHeader, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, Slider, type SliderProps, Spinner, type SpinnerProps, StatusLight, type StatusLightProps, type StrokeWidth, SubMenuTrigger, type SubmenuTriggerProps, Switch, type SwitchProps, Tab, TabList, TabPanel, Table, TableBody, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableHeader, TableRow, Tabs, Text, TextField, type TextFieldProps, type TextProps, type TextRenderProps, type Theme, ThemeButton, type ThemeButtonProps, type ThemeMode, ThemeSwitcher, type ThemeSwitcherProps, Toast, ToastContext, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastState, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipBubble, type TooltipBubbleProps, type TooltipProps, ZenProvider, type ZenProviderProps, removeToast, resolveRender, useBreakpoint, useDebounce, useInitTheme, useNavigationContext, useTheme, useToast };
package/dist/index.js CHANGED
@@ -215,7 +215,7 @@ tailwindVariants.tv({
215
215
  });
216
216
  var tooltip = tailwindVariants.tv({
217
217
  base: [
218
- "bg-surface-inverted text-foreground-inverted text-xs px-2 py-1 rounded",
218
+ "bg-surface-inverted text-foreground-inverted text-base px-2 py-1 rounded",
219
219
  "entering:animate-popover-in",
220
220
  "exiting:animate-popover-out"
221
221
  ]
@@ -2284,6 +2284,37 @@ function isMinHeightPreset(value) {
2284
2284
  function isMaxHeightPreset(value) {
2285
2285
  return value in maxHeightMap;
2286
2286
  }
2287
+ function addStatePrefix(prefix, className) {
2288
+ if (!className) return "";
2289
+ return className.split(" ").filter(Boolean).map((cls) => `${prefix}:${cls}`).join(" ");
2290
+ }
2291
+ function mapStateStyles(prefix, styles) {
2292
+ if (!styles) return "";
2293
+ const classes = [];
2294
+ if (styles.color !== void 0) {
2295
+ const colorClass = mapTextColor(
2296
+ typeof styles.color === "boolean" ? "true" : String(styles.color)
2297
+ );
2298
+ if (colorClass) classes.push(addStatePrefix(prefix, colorClass));
2299
+ }
2300
+ if (styles.backgroundColor !== void 0) {
2301
+ const bgClass = mapBackgroundColor(
2302
+ typeof styles.backgroundColor === "boolean" ? "true" : String(styles.backgroundColor)
2303
+ );
2304
+ if (bgClass) classes.push(addStatePrefix(prefix, bgClass));
2305
+ }
2306
+ if (styles.borderColor !== void 0) {
2307
+ const borderClass = mapBorderColor(
2308
+ typeof styles.borderColor === "boolean" ? "true" : String(styles.borderColor)
2309
+ );
2310
+ if (borderClass) classes.push(addStatePrefix(prefix, borderClass));
2311
+ }
2312
+ if (styles.opacity !== void 0) {
2313
+ const opacityClass = mapOpacity(styles.opacity);
2314
+ if (opacityClass) classes.push(addStatePrefix(prefix, opacityClass));
2315
+ }
2316
+ return classes.join(" ");
2317
+ }
2287
2318
  var sizeMap = {
2288
2319
  xs: "w-3 h-3",
2289
2320
  sm: "w-4 h-4",
@@ -2499,6 +2530,9 @@ var Box = react.forwardRef(function Box2({
2499
2530
  order,
2500
2531
  zIndex,
2501
2532
  theme,
2533
+ hover,
2534
+ focus,
2535
+ active,
2502
2536
  as = "div",
2503
2537
  render,
2504
2538
  className,
@@ -2553,6 +2587,9 @@ var Box = react.forwardRef(function Box2({
2553
2587
  mapPointerEvents(pointerEvents),
2554
2588
  mapAlignSelf(alignSelf),
2555
2589
  theme && `${theme}-theme`,
2590
+ mapStateStyles("hover", hover),
2591
+ mapStateStyles("focus", focus),
2592
+ mapStateStyles("active", active),
2556
2593
  className
2557
2594
  );
2558
2595
  const widthStyle = getSizingStyle(width, isWidthPreset);
@@ -2880,13 +2917,14 @@ function useFieldId(id) {
2880
2917
  const generatedId = react.useId();
2881
2918
  return id ?? generatedId;
2882
2919
  }
2883
- function Label({ size = "sm", weight = "medium", ...props }) {
2920
+ function Label({ size = "base", weight = "semibold", lineHeight = "loose", ...props }) {
2884
2921
  return /* @__PURE__ */ jsxRuntime.jsx(
2885
2922
  Text,
2886
2923
  {
2887
2924
  ...props,
2888
2925
  size,
2889
2926
  weight,
2927
+ lineHeight,
2890
2928
  render: (renderProps) => /* @__PURE__ */ jsxRuntime.jsx(reactAriaComponents.Label, { ...renderProps })
2891
2929
  }
2892
2930
  );
@@ -4643,6 +4681,7 @@ function Select({
4643
4681
  searchValue,
4644
4682
  searchDelay,
4645
4683
  isFullscreen,
4684
+ maxHeight,
4646
4685
  onSearch,
4647
4686
  onChange,
4648
4687
  buttonProps,
@@ -4713,8 +4752,8 @@ function Select({
4713
4752
  shouldFocusOnHover: false,
4714
4753
  autoFocus: "first"
4715
4754
  },
4716
- className: cn("max-h-60 overflow-auto", listProps?.className),
4717
- style: { ...listProps?.style, display: isLoading ? "none" : void 0 },
4755
+ className: cn("overflow-auto", listProps?.className),
4756
+ style: { ...listProps?.style, maxHeight, display: isLoading ? "none" : void 0 },
4718
4757
  children
4719
4758
  }
4720
4759
  )
@@ -4984,6 +5023,70 @@ function ThemeButton({
4984
5023
  }
4985
5024
  );
4986
5025
  }
5026
+ var STORAGE_KEY2 = "theme-mode";
5027
+ function getSystemTheme() {
5028
+ if (typeof window === "undefined") return "light";
5029
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
5030
+ }
5031
+ function ThemeSwitcher({ className }) {
5032
+ const { setTheme } = useTheme();
5033
+ const [mode, setMode] = react.useState("system");
5034
+ react.useEffect(() => {
5035
+ const stored = localStorage.getItem(STORAGE_KEY2);
5036
+ if (stored && ["light", "dark", "system"].includes(stored)) {
5037
+ setMode(stored);
5038
+ }
5039
+ }, []);
5040
+ react.useEffect(() => {
5041
+ if (mode === "system") {
5042
+ setTheme(getSystemTheme());
5043
+ } else {
5044
+ setTheme(mode);
5045
+ }
5046
+ localStorage.setItem(STORAGE_KEY2, mode);
5047
+ }, [mode, setTheme]);
5048
+ react.useEffect(() => {
5049
+ if (mode !== "system") return;
5050
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
5051
+ const handleChange = () => {
5052
+ setTheme(getSystemTheme());
5053
+ };
5054
+ mediaQuery.addEventListener("change", handleChange);
5055
+ return () => mediaQuery.removeEventListener("change", handleChange);
5056
+ }, [mode, setTheme]);
5057
+ const options = [
5058
+ { value: "light", icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Sun, {}), label: "Light" },
5059
+ { value: "dark", icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Moon, {}), label: "Dark" },
5060
+ { value: "system", icon: /* @__PURE__ */ jsxRuntime.jsx(icons_exports.Monitor, {}), label: "System" }
5061
+ ];
5062
+ return /* @__PURE__ */ jsxRuntime.jsx(
5063
+ "div",
5064
+ {
5065
+ className: cn(
5066
+ "inline-flex items-center bg-surface-base border border-edge rounded-md overflow-hidden",
5067
+ className
5068
+ ),
5069
+ children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
5070
+ "button",
5071
+ {
5072
+ type: "button",
5073
+ onClick: () => setMode(option.value),
5074
+ "aria-label": option.label,
5075
+ "aria-pressed": mode === option.value,
5076
+ className: cn(
5077
+ "size-9 flex items-center justify-center cursor-pointer outline-none transition-colors",
5078
+ "[&:not(:first-child)]:border-l [&:not(:first-child)]:border-edge",
5079
+ "hover:bg-interactive",
5080
+ "focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-inset",
5081
+ mode === option.value ? "bg-interactive text-foreground-primary" : "text-foreground-muted"
5082
+ ),
5083
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "sm", children: option.icon })
5084
+ },
5085
+ option.value
5086
+ ))
5087
+ }
5088
+ );
5089
+ }
4987
5090
  function Toggle({ label, children, className, ...props }) {
4988
5091
  const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
4989
5092
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -5190,6 +5293,7 @@ exports.Tabs = Tabs;
5190
5293
  exports.Text = Text;
5191
5294
  exports.TextField = TextField;
5192
5295
  exports.ThemeButton = ThemeButton;
5296
+ exports.ThemeSwitcher = ThemeSwitcher;
5193
5297
  exports.Toast = Toast;
5194
5298
  exports.ToastContext = ToastContext;
5195
5299
  exports.ToastProvider = ToastProvider;