jaci-ui 0.7.0 → 0.8.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.
Files changed (146) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +17 -0
  3. package/dist/components/alert-dialog/alert-dialog.cjs +4 -1
  4. package/dist/components/alert-dialog/alert-dialog.cjs.map +1 -1
  5. package/dist/components/alert-dialog/alert-dialog.d.cts +2 -2
  6. package/dist/components/alert-dialog/alert-dialog.d.ts +2 -2
  7. package/dist/components/alert-dialog/alert-dialog.js +4 -1
  8. package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
  9. package/dist/components/color-picker/color-picker.cjs +4 -1
  10. package/dist/components/color-picker/color-picker.cjs.map +1 -1
  11. package/dist/components/color-picker/color-picker.d.cts +2 -2
  12. package/dist/components/color-picker/color-picker.d.ts +2 -2
  13. package/dist/components/color-picker/color-picker.js +4 -1
  14. package/dist/components/color-picker/color-picker.js.map +1 -1
  15. package/dist/components/combobox/combobox.cjs +4 -1
  16. package/dist/components/combobox/combobox.cjs.map +1 -1
  17. package/dist/components/combobox/combobox.d.cts +2 -2
  18. package/dist/components/combobox/combobox.d.ts +2 -2
  19. package/dist/components/combobox/combobox.js +4 -1
  20. package/dist/components/combobox/combobox.js.map +1 -1
  21. package/dist/components/command/command.cjs +73 -12
  22. package/dist/components/command/command.cjs.map +1 -1
  23. package/dist/components/command/command.d.cts +7 -1
  24. package/dist/components/command/command.d.ts +7 -1
  25. package/dist/components/command/command.js +73 -12
  26. package/dist/components/command/command.js.map +1 -1
  27. package/dist/components/command/index.d.cts +2 -2
  28. package/dist/components/command/index.d.ts +2 -2
  29. package/dist/components/context-menu/context-menu.cjs +4 -1
  30. package/dist/components/context-menu/context-menu.cjs.map +1 -1
  31. package/dist/components/context-menu/context-menu.d.cts +2 -2
  32. package/dist/components/context-menu/context-menu.d.ts +2 -2
  33. package/dist/components/context-menu/context-menu.js +4 -1
  34. package/dist/components/context-menu/context-menu.js.map +1 -1
  35. package/dist/components/date-picker/date-picker.cjs +4 -1
  36. package/dist/components/date-picker/date-picker.cjs.map +1 -1
  37. package/dist/components/date-picker/date-picker.d.cts +2 -2
  38. package/dist/components/date-picker/date-picker.d.ts +2 -2
  39. package/dist/components/date-picker/date-picker.js +4 -1
  40. package/dist/components/date-picker/date-picker.js.map +1 -1
  41. package/dist/components/date-range-picker/date-range-picker.cjs +4 -1
  42. package/dist/components/date-range-picker/date-range-picker.cjs.map +1 -1
  43. package/dist/components/date-range-picker/date-range-picker.d.cts +2 -2
  44. package/dist/components/date-range-picker/date-range-picker.d.ts +2 -2
  45. package/dist/components/date-range-picker/date-range-picker.js +4 -1
  46. package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
  47. package/dist/components/dialog/dialog.cjs +4 -1
  48. package/dist/components/dialog/dialog.cjs.map +1 -1
  49. package/dist/components/dialog/dialog.d.cts +2 -2
  50. package/dist/components/dialog/dialog.d.ts +2 -2
  51. package/dist/components/dialog/dialog.js +4 -1
  52. package/dist/components/dialog/dialog.js.map +1 -1
  53. package/dist/components/drawer/drawer.cjs +4 -1
  54. package/dist/components/drawer/drawer.cjs.map +1 -1
  55. package/dist/components/drawer/drawer.d.cts +2 -2
  56. package/dist/components/drawer/drawer.d.ts +2 -2
  57. package/dist/components/drawer/drawer.js +4 -1
  58. package/dist/components/drawer/drawer.js.map +1 -1
  59. package/dist/components/figure/figure.cjs +45 -36
  60. package/dist/components/figure/figure.cjs.map +1 -1
  61. package/dist/components/figure/figure.js +45 -36
  62. package/dist/components/figure/figure.js.map +1 -1
  63. package/dist/components/image/image.cjs +41 -32
  64. package/dist/components/image/image.cjs.map +1 -1
  65. package/dist/components/image/image.js +41 -32
  66. package/dist/components/image/image.js.map +1 -1
  67. package/dist/components/menu/menu.cjs +4 -1
  68. package/dist/components/menu/menu.cjs.map +1 -1
  69. package/dist/components/menu/menu.d.cts +2 -2
  70. package/dist/components/menu/menu.d.ts +2 -2
  71. package/dist/components/menu/menu.js +4 -1
  72. package/dist/components/menu/menu.js.map +1 -1
  73. package/dist/components/menubar/menubar.cjs +4 -1
  74. package/dist/components/menubar/menubar.cjs.map +1 -1
  75. package/dist/components/menubar/menubar.d.cts +2 -2
  76. package/dist/components/menubar/menubar.d.ts +2 -2
  77. package/dist/components/menubar/menubar.js +4 -1
  78. package/dist/components/menubar/menubar.js.map +1 -1
  79. package/dist/components/navigation/navigation.cjs +3 -1
  80. package/dist/components/navigation/navigation.cjs.map +1 -1
  81. package/dist/components/navigation/navigation.js +3 -1
  82. package/dist/components/navigation/navigation.js.map +1 -1
  83. package/dist/components/navigation-menu/navigation-menu.cjs +4 -1
  84. package/dist/components/navigation-menu/navigation-menu.cjs.map +1 -1
  85. package/dist/components/navigation-menu/navigation-menu.d.cts +2 -2
  86. package/dist/components/navigation-menu/navigation-menu.d.ts +2 -2
  87. package/dist/components/navigation-menu/navigation-menu.js +4 -1
  88. package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
  89. package/dist/components/popover/popover.cjs +4 -1
  90. package/dist/components/popover/popover.cjs.map +1 -1
  91. package/dist/components/popover/popover.d.cts +2 -2
  92. package/dist/components/popover/popover.d.ts +2 -2
  93. package/dist/components/popover/popover.js +4 -1
  94. package/dist/components/popover/popover.js.map +1 -1
  95. package/dist/components/select/select.cjs +4 -1
  96. package/dist/components/select/select.cjs.map +1 -1
  97. package/dist/components/select/select.d.cts +2 -2
  98. package/dist/components/select/select.d.ts +2 -2
  99. package/dist/components/select/select.js +4 -1
  100. package/dist/components/select/select.js.map +1 -1
  101. package/dist/components/sidebar/sidebar.cjs +24 -17
  102. package/dist/components/sidebar/sidebar.cjs.map +1 -1
  103. package/dist/components/sidebar/sidebar.d.cts +4 -2
  104. package/dist/components/sidebar/sidebar.d.ts +4 -2
  105. package/dist/components/sidebar/sidebar.js +24 -17
  106. package/dist/components/sidebar/sidebar.js.map +1 -1
  107. package/dist/components/toast/toast.cjs +4 -1
  108. package/dist/components/toast/toast.cjs.map +1 -1
  109. package/dist/components/toast/toast.d.cts +1 -1
  110. package/dist/components/toast/toast.d.ts +1 -1
  111. package/dist/components/toast/toast.js +4 -1
  112. package/dist/components/toast/toast.js.map +1 -1
  113. package/dist/components/tooltip/tooltip.cjs +4 -1
  114. package/dist/components/tooltip/tooltip.cjs.map +1 -1
  115. package/dist/components/tooltip/tooltip.d.cts +2 -2
  116. package/dist/components/tooltip/tooltip.d.ts +2 -2
  117. package/dist/components/tooltip/tooltip.js +4 -1
  118. package/dist/components/tooltip/tooltip.js.map +1 -1
  119. package/dist/index.cjs +1 -0
  120. package/dist/index.cjs.map +1 -0
  121. package/dist/index.d.cts +2 -2
  122. package/dist/index.d.ts +2 -2
  123. package/dist/index.js +1 -0
  124. package/dist/index.js.map +1 -0
  125. package/dist/styled-system/recipes/command.cjs +3 -3
  126. package/dist/styled-system/recipes/command.cjs.map +1 -1
  127. package/dist/styled-system/recipes/command.js +3 -3
  128. package/dist/styled-system/recipes/command.js.map +1 -1
  129. package/dist/styled-system/recipes/figure.cjs +1 -0
  130. package/dist/styled-system/recipes/figure.cjs.map +1 -1
  131. package/dist/styled-system/recipes/figure.js +1 -0
  132. package/dist/styled-system/recipes/figure.js.map +1 -1
  133. package/dist/styled-system/recipes/image.cjs +1 -0
  134. package/dist/styled-system/recipes/image.cjs.map +1 -1
  135. package/dist/styled-system/recipes/image.js +1 -0
  136. package/dist/styled-system/recipes/image.js.map +1 -1
  137. package/dist/styles.css +70 -50
  138. package/dist/theme/theme-provider.cjs +18 -8
  139. package/dist/theme/theme-provider.cjs.map +1 -1
  140. package/dist/theme/theme-provider.js +18 -8
  141. package/dist/theme/theme-provider.js.map +1 -1
  142. package/dist/theme/theme-scope.cjs +21 -0
  143. package/dist/theme/theme-scope.cjs.map +1 -0
  144. package/dist/theme/theme-scope.js +19 -0
  145. package/dist/theme/theme-scope.js.map +1 -0
  146. package/package.json +7 -4
@@ -23,7 +23,7 @@ type NavigationMenuLinkProps = ComponentPropsWithoutRef<typeof NavigationMenu.Li
23
23
  declare const NavigationMenuLink: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
24
24
  type NavigationMenuIconProps = ComponentPropsWithoutRef<typeof NavigationMenu.Icon>;
25
25
  declare const NavigationMenuIcon: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuIconProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
26
- declare const NavigationMenuPortal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").NavigationMenuPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
26
+ declare function NavigationMenuPortal(props: ComponentPropsWithoutRef<typeof NavigationMenu.Portal>): import("react").JSX.Element;
27
27
  type NavigationMenuPositionerProps = ComponentPropsWithoutRef<typeof NavigationMenu.Positioner>;
28
28
  declare const NavigationMenuPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
29
29
  type NavigationMenuViewportProps = ComponentPropsWithoutRef<typeof NavigationMenu.Viewport>;
@@ -42,7 +42,7 @@ declare const NavigationMenu$1: {
42
42
  Content: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
43
43
  Link: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
44
44
  Icon: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuIconProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
45
- Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").NavigationMenuPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
45
+ Portal: typeof NavigationMenuPortal;
46
46
  Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
47
47
  Viewport: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
48
48
  Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuPopupProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
@@ -23,7 +23,7 @@ type NavigationMenuLinkProps = ComponentPropsWithoutRef<typeof NavigationMenu.Li
23
23
  declare const NavigationMenuLink: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
24
24
  type NavigationMenuIconProps = ComponentPropsWithoutRef<typeof NavigationMenu.Icon>;
25
25
  declare const NavigationMenuIcon: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuIconProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
26
- declare const NavigationMenuPortal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").NavigationMenuPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
26
+ declare function NavigationMenuPortal(props: ComponentPropsWithoutRef<typeof NavigationMenu.Portal>): import("react").JSX.Element;
27
27
  type NavigationMenuPositionerProps = ComponentPropsWithoutRef<typeof NavigationMenu.Positioner>;
28
28
  declare const NavigationMenuPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
29
29
  type NavigationMenuViewportProps = ComponentPropsWithoutRef<typeof NavigationMenu.Viewport>;
@@ -42,7 +42,7 @@ declare const NavigationMenu$1: {
42
42
  Content: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
43
43
  Link: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
44
44
  Icon: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuIconProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
45
- Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").NavigationMenuPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
45
+ Portal: typeof NavigationMenuPortal;
46
46
  Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
47
47
  Viewport: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
48
48
  Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").NavigationMenuPopupProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { withRecipeClassName } from "../base-ui.js";
3
3
  import { navigationMenu } from "../../styled-system/recipes/navigation-menu.js";
4
+ import { useThemePortalProps } from "../../theme/theme-scope.js";
4
5
  import { createContext, forwardRef, useCallback, useContext, useEffect, useId, useRef, useState } from "react";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
  import { NavigationMenu } from "@base-ui/react/navigation-menu";
@@ -133,7 +134,9 @@ const NavigationMenuIcon = forwardRef(function NavigationMenuIcon({ children = "
133
134
  children
134
135
  });
135
136
  });
136
- const NavigationMenuPortal = NavigationMenu.Portal;
137
+ function NavigationMenuPortal(props) {
138
+ return /* @__PURE__ */ jsx(NavigationMenu.Portal, { ...useThemePortalProps(props) });
139
+ }
137
140
  const NavigationMenuPositioner = forwardRef(function NavigationMenuPositioner({ className, ...props }, ref) {
138
141
  const { styles } = useNavigationMenuContext();
139
142
  return /* @__PURE__ */ jsx(NavigationMenu.Positioner, {
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-menu.js","names":["NavigationMenuRoot","BaseNavigationMenu","NavigationMenu"],"sources":["../../../src/components/navigation-menu/navigation-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport { NavigationMenu as BaseNavigationMenu } from \"@base-ui/react/navigation-menu\";\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useRef,\n useState,\n} from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport type { NavigationMenuRoot as BaseNavigationMenuRoot } from \"@base-ui/react/navigation-menu\";\n\nimport { navigationMenu } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\nexport type NavigationMenuOrientation = \"horizontal\" | \"vertical\";\n\ninterface NavigationMenuContextValue {\n close: () => void;\n orientation: NavigationMenuOrientation;\n styles: ReturnType<typeof navigationMenu>;\n value: string | null;\n}\n\nconst NavigationMenuContext = createContext<NavigationMenuContextValue | null>(null);\nconst NavigationMenuItemContext = createContext<{ value?: string } | null>(null);\n\nfunction useNavigationMenuContext() {\n const context = useContext(NavigationMenuContext);\n if (!context) {\n throw new Error(\"NavigationMenu parts must be rendered inside NavigationMenu.Root.\");\n }\n\n return context;\n}\n\nexport interface NavigationMenuRootProps\n extends Omit<\n BaseNavigationMenuRoot.Props<string>,\n \"children\" | \"className\" | \"onValueChange\" | \"value\" | \"defaultValue\"\n > {\n value?: string | null;\n defaultValue?: string | null;\n onValueChange?: (value: string | null) => void;\n orientation?: NavigationMenuOrientation;\n children?: ReactNode;\n className?: string;\n}\n\nexport const NavigationMenuRoot = forwardRef<HTMLElement, NavigationMenuRootProps>(\n function NavigationMenuRoot(\n {\n children,\n className,\n defaultValue,\n onValueChange,\n orientation = \"horizontal\",\n value,\n ...props\n },\n ref,\n ) {\n const [uncontrolledValue, setUncontrolledValue] = useState<string | null>(defaultValue ?? null);\n const rootElementRef = useRef<HTMLElement | null>(null);\n // Keep the Base UI primitive controlled by the wrapper state even when the\n // consumer uses the uncontrolled API. This keeps the viewport and the\n // primitive in sync when Base UI dismisses a menu (pointer leave, outside\n // press, Escape or pressing the trigger again).\n const resolvedValue = value === undefined ? uncontrolledValue : value;\n const styles = navigationMenu({ orientation });\n const close = useCallback(() => {\n if (value === undefined) setUncontrolledValue(null);\n else onValueChange?.(null);\n }, [onValueChange, value]);\n\n useEffect(() => {\n if (resolvedValue === null) return;\n const handleOutsidePress = (event: MouseEvent) => {\n const target = event.target;\n if (!(target instanceof Element)) return;\n if (rootElementRef.current?.contains(target)) return;\n if (\n target.closest(\n '[data-slot=\"navigation-menu-content\"], [data-slot=\"navigation-menu-positioner\"], [data-slot=\"navigation-menu-popup\"], [data-slot=\"navigation-menu-viewport\"]',\n )\n ) {\n return;\n }\n close();\n };\n document.addEventListener(\"click\", handleOutsidePress);\n return () => document.removeEventListener(\"click\", handleOutsidePress);\n }, [close, resolvedValue]);\n\n const setRootRef = (element: HTMLElement | null) => {\n rootElementRef.current = element;\n if (typeof ref === \"function\") ref(element);\n else if (ref) ref.current = element;\n };\n\n return (\n <NavigationMenuContext.Provider value={{ close, orientation, styles, value: resolvedValue }}>\n <BaseNavigationMenu.Root\n {...props}\n onValueChange={(next) => {\n if (value === undefined) setUncontrolledValue(next);\n onValueChange?.(next);\n }}\n orientation={orientation}\n ref={setRootRef}\n value={resolvedValue}\n className={withRecipeClassName(styles.root, className)}\n data-jaci-component=\"navigation-menu\"\n data-orientation={orientation}\n data-slot=\"navigation-menu\"\n >\n {children}\n </BaseNavigationMenu.Root>\n </NavigationMenuContext.Provider>\n );\n },\n);\n\nexport type NavigationMenuListProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.List>;\nexport const NavigationMenuList = forwardRef<HTMLUListElement, NavigationMenuListProps>(\n function NavigationMenuList({ className, ...props }, ref) {\n const { styles, orientation } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.List\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.list, className)}\n data-orientation={orientation}\n data-slot=\"navigation-menu-list\"\n />\n );\n },\n);\n\nexport type NavigationMenuItemProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.Item>;\nexport const NavigationMenuItem = forwardRef<HTMLLIElement, NavigationMenuItemProps>(\n function NavigationMenuItem({ children, className, value, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n const generatedValue = useId();\n const itemValue = value ?? generatedValue;\n return (\n <NavigationMenuItemContext.Provider value={{ value: itemValue }}>\n <BaseNavigationMenu.Item\n {...props}\n ref={ref}\n value={itemValue}\n className={withRecipeClassName(styles.item, className)}\n data-slot=\"navigation-menu-item\"\n >\n {children}\n </BaseNavigationMenu.Item>\n </NavigationMenuItemContext.Provider>\n );\n },\n);\n\nexport type NavigationMenuTriggerProps = ComponentPropsWithoutRef<\n typeof BaseNavigationMenu.Trigger\n>;\nexport const NavigationMenuTrigger = forwardRef<HTMLButtonElement, NavigationMenuTriggerProps>(\n function NavigationMenuTrigger({ className, onClick, ...props }, ref) {\n const { close, styles, value } = useNavigationMenuContext();\n const item = useContext(NavigationMenuItemContext);\n return (\n <BaseNavigationMenu.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.trigger, className)}\n data-slot=\"navigation-menu-trigger\"\n onClick={(event) => {\n // Base UI intentionally keeps a hover-opened menu open for a brief\n // patient-click window. For a component library trigger, a second\n // click should always be an explicit close action.\n if (item?.value !== undefined && value === item.value) {\n event.preventDefault();\n close();\n }\n onClick?.(event);\n }}\n />\n );\n },\n);\n\nexport type NavigationMenuContentProps = ComponentPropsWithoutRef<\n typeof BaseNavigationMenu.Content\n>;\nexport const NavigationMenuContent = forwardRef<HTMLDivElement, NavigationMenuContentProps>(\n function NavigationMenuContent({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Content\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.content, className)}\n data-slot=\"navigation-menu-content\"\n />\n );\n },\n);\n\nexport type NavigationMenuLinkProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.Link>;\nexport const NavigationMenuLink = forwardRef<HTMLAnchorElement, NavigationMenuLinkProps>(\n function NavigationMenuLink({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Link\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.link, className)}\n data-slot=\"navigation-menu-link\"\n />\n );\n },\n);\n\nexport type NavigationMenuIconProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.Icon>;\nexport const NavigationMenuIcon = forwardRef<HTMLSpanElement, NavigationMenuIconProps>(\n function NavigationMenuIcon({ children = \"⌄\", className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Icon\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.icon, className)}\n data-slot=\"navigation-menu-icon\"\n >\n {children}\n </BaseNavigationMenu.Icon>\n );\n },\n);\n\nexport const NavigationMenuPortal = BaseNavigationMenu.Portal;\n\nexport type NavigationMenuPositionerProps = ComponentPropsWithoutRef<\n typeof BaseNavigationMenu.Positioner\n>;\nexport const NavigationMenuPositioner = forwardRef<HTMLDivElement, NavigationMenuPositionerProps>(\n function NavigationMenuPositioner({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.positioner, className)}\n data-slot=\"navigation-menu-positioner\"\n />\n );\n },\n);\n\nexport type NavigationMenuViewportProps = ComponentPropsWithoutRef<\n typeof BaseNavigationMenu.Viewport\n>;\nexport const NavigationMenuViewport = forwardRef<HTMLDivElement, NavigationMenuViewportProps>(\n function NavigationMenuViewport({ className, ...props }, ref) {\n const { styles, value } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Viewport\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.viewport, className)}\n data-open={value !== null ? \"true\" : \"false\"}\n data-slot=\"navigation-menu-viewport\"\n />\n );\n },\n);\n\nexport type NavigationMenuPopupProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.Popup>;\nexport const NavigationMenuPopup = forwardRef<HTMLElement, NavigationMenuPopupProps>(\n function NavigationMenuPopup({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.popup, className)}\n data-slot=\"navigation-menu-popup\"\n />\n );\n },\n);\n\nexport type NavigationMenuBackdropProps = ComponentPropsWithoutRef<\n typeof BaseNavigationMenu.Backdrop\n>;\nexport const NavigationMenuBackdrop = forwardRef<HTMLDivElement, NavigationMenuBackdropProps>(\n function NavigationMenuBackdrop({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Backdrop\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.backdrop, className)}\n data-slot=\"navigation-menu-backdrop\"\n />\n );\n },\n);\n\nexport type NavigationMenuArrowProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.Arrow>;\nexport const NavigationMenuArrow = forwardRef<HTMLDivElement, NavigationMenuArrowProps>(\n function NavigationMenuArrow({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Arrow\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.arrow, className)}\n data-slot=\"navigation-menu-arrow\"\n />\n );\n },\n);\n\nexport const NavigationMenu = {\n Root: NavigationMenuRoot,\n List: NavigationMenuList,\n Item: NavigationMenuItem,\n Trigger: NavigationMenuTrigger,\n Content: NavigationMenuContent,\n Link: NavigationMenuLink,\n Icon: NavigationMenuIcon,\n Portal: NavigationMenuPortal,\n Positioner: NavigationMenuPositioner,\n Viewport: NavigationMenuViewport,\n Popup: NavigationMenuPopup,\n Backdrop: NavigationMenuBackdrop,\n Arrow: NavigationMenuArrow,\n};\n"],"mappings":";;;;;;;AA4BA,MAAM,wBAAwB,cAAiD,IAAI;AACnF,MAAM,4BAA4B,cAAyC,IAAI;AAE/E,SAAS,2BAA2B;CAClC,MAAM,UAAU,WAAW,qBAAqB;CAChD,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,mEAAmE;CAGrF,OAAO;AACT;AAeA,MAAaA,uBAAqB,WAChC,SAAS,mBACP,EACE,UACA,WACA,cACA,eACA,cAAc,cACd,OACA,GAAG,SAEL,KACA;CACA,MAAM,CAAC,mBAAmB,wBAAwB,SAAwB,gBAAgB,IAAI;CAC9F,MAAM,iBAAiB,OAA2B,IAAI;CAKtD,MAAM,gBAAgB,UAAU,KAAA,IAAY,oBAAoB;CAChE,MAAM,SAAS,eAAe,EAAE,YAAY,CAAC;CAC7C,MAAM,QAAQ,kBAAkB;EAC9B,IAAI,UAAU,KAAA,GAAW,qBAAqB,IAAI;OAC7C,gBAAgB,IAAI;CAC3B,GAAG,CAAC,eAAe,KAAK,CAAC;CAEzB,gBAAgB;EACd,IAAI,kBAAkB,MAAM;EAC5B,MAAM,sBAAsB,UAAsB;GAChD,MAAM,SAAS,MAAM;GACrB,IAAI,EAAE,kBAAkB,UAAU;GAClC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R,YAAY;CACZ,UAAU;CACV,OAAO;CACP,UAAU;CACV,OAAO;AACT"}
1
+ {"version":3,"file":"navigation-menu.js","names":["NavigationMenuRoot","BaseNavigationMenu","NavigationMenu"],"sources":["../../../src/components/navigation-menu/navigation-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport { NavigationMenu as BaseNavigationMenu } from \"@base-ui/react/navigation-menu\";\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useRef,\n useState,\n} from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport type { NavigationMenuRoot as BaseNavigationMenuRoot } from \"@base-ui/react/navigation-menu\";\n\nimport { navigationMenu } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\nexport type NavigationMenuOrientation = \"horizontal\" | \"vertical\";\n\ninterface NavigationMenuContextValue {\n close: () => void;\n orientation: NavigationMenuOrientation;\n styles: ReturnType<typeof navigationMenu>;\n value: string | null;\n}\n\nconst NavigationMenuContext = createContext<NavigationMenuContextValue | null>(null);\nconst NavigationMenuItemContext = createContext<{ value?: string } | null>(null);\n\nfunction useNavigationMenuContext() {\n const context = useContext(NavigationMenuContext);\n if (!context) {\n throw new Error(\"NavigationMenu parts must be rendered inside NavigationMenu.Root.\");\n }\n\n return context;\n}\n\nexport interface NavigationMenuRootProps\n extends Omit<\n BaseNavigationMenuRoot.Props<string>,\n \"children\" | \"className\" | \"onValueChange\" | \"value\" | \"defaultValue\"\n > {\n value?: string | null;\n defaultValue?: string | null;\n onValueChange?: (value: string | null) => void;\n orientation?: NavigationMenuOrientation;\n children?: ReactNode;\n className?: string;\n}\n\nexport const NavigationMenuRoot = forwardRef<HTMLElement, NavigationMenuRootProps>(\n function NavigationMenuRoot(\n {\n children,\n className,\n defaultValue,\n onValueChange,\n orientation = \"horizontal\",\n value,\n ...props\n },\n ref,\n ) {\n const [uncontrolledValue, setUncontrolledValue] = useState<string | null>(defaultValue ?? null);\n const rootElementRef = useRef<HTMLElement | null>(null);\n // Keep the Base UI primitive controlled by the wrapper state even when the\n // consumer uses the uncontrolled API. This keeps the viewport and the\n // primitive in sync when Base UI dismisses a menu (pointer leave, outside\n // press, Escape or pressing the trigger again).\n const resolvedValue = value === undefined ? uncontrolledValue : value;\n const styles = navigationMenu({ orientation });\n const close = useCallback(() => {\n if (value === undefined) setUncontrolledValue(null);\n else onValueChange?.(null);\n }, [onValueChange, value]);\n\n useEffect(() => {\n if (resolvedValue === null) return;\n const handleOutsidePress = (event: MouseEvent) => {\n const target = event.target;\n if (!(target instanceof Element)) return;\n if (rootElementRef.current?.contains(target)) return;\n if (\n target.closest(\n '[data-slot=\"navigation-menu-content\"], [data-slot=\"navigation-menu-positioner\"], [data-slot=\"navigation-menu-popup\"], [data-slot=\"navigation-menu-viewport\"]',\n )\n ) {\n return;\n }\n close();\n };\n document.addEventListener(\"click\", handleOutsidePress);\n return () => document.removeEventListener(\"click\", handleOutsidePress);\n }, [close, resolvedValue]);\n\n const setRootRef = (element: HTMLElement | null) => {\n rootElementRef.current = element;\n if (typeof ref === \"function\") ref(element);\n else if (ref) ref.current = element;\n };\n\n return (\n <NavigationMenuContext.Provider value={{ close, orientation, styles, value: resolvedValue }}>\n <BaseNavigationMenu.Root\n {...props}\n onValueChange={(next) => {\n if (value === undefined) setUncontrolledValue(next);\n onValueChange?.(next);\n }}\n orientation={orientation}\n ref={setRootRef}\n value={resolvedValue}\n className={withRecipeClassName(styles.root, className)}\n data-jaci-component=\"navigation-menu\"\n data-orientation={orientation}\n data-slot=\"navigation-menu\"\n >\n {children}\n </BaseNavigationMenu.Root>\n </NavigationMenuContext.Provider>\n );\n },\n);\n\nexport type NavigationMenuListProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.List>;\nexport const NavigationMenuList = forwardRef<HTMLUListElement, NavigationMenuListProps>(\n function NavigationMenuList({ className, ...props }, ref) {\n const { styles, orientation } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.List\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.list, className)}\n data-orientation={orientation}\n data-slot=\"navigation-menu-list\"\n />\n );\n },\n);\n\nexport type NavigationMenuItemProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.Item>;\nexport const NavigationMenuItem = forwardRef<HTMLLIElement, NavigationMenuItemProps>(\n function NavigationMenuItem({ children, className, value, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n const generatedValue = useId();\n const itemValue = value ?? generatedValue;\n return (\n <NavigationMenuItemContext.Provider value={{ value: itemValue }}>\n <BaseNavigationMenu.Item\n {...props}\n ref={ref}\n value={itemValue}\n className={withRecipeClassName(styles.item, className)}\n data-slot=\"navigation-menu-item\"\n >\n {children}\n </BaseNavigationMenu.Item>\n </NavigationMenuItemContext.Provider>\n );\n },\n);\n\nexport type NavigationMenuTriggerProps = ComponentPropsWithoutRef<\n typeof BaseNavigationMenu.Trigger\n>;\nexport const NavigationMenuTrigger = forwardRef<HTMLButtonElement, NavigationMenuTriggerProps>(\n function NavigationMenuTrigger({ className, onClick, ...props }, ref) {\n const { close, styles, value } = useNavigationMenuContext();\n const item = useContext(NavigationMenuItemContext);\n return (\n <BaseNavigationMenu.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.trigger, className)}\n data-slot=\"navigation-menu-trigger\"\n onClick={(event) => {\n // Base UI intentionally keeps a hover-opened menu open for a brief\n // patient-click window. For a component library trigger, a second\n // click should always be an explicit close action.\n if (item?.value !== undefined && value === item.value) {\n event.preventDefault();\n close();\n }\n onClick?.(event);\n }}\n />\n );\n },\n);\n\nexport type NavigationMenuContentProps = ComponentPropsWithoutRef<\n typeof BaseNavigationMenu.Content\n>;\nexport const NavigationMenuContent = forwardRef<HTMLDivElement, NavigationMenuContentProps>(\n function NavigationMenuContent({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Content\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.content, className)}\n data-slot=\"navigation-menu-content\"\n />\n );\n },\n);\n\nexport type NavigationMenuLinkProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.Link>;\nexport const NavigationMenuLink = forwardRef<HTMLAnchorElement, NavigationMenuLinkProps>(\n function NavigationMenuLink({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Link\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.link, className)}\n data-slot=\"navigation-menu-link\"\n />\n );\n },\n);\n\nexport type NavigationMenuIconProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.Icon>;\nexport const NavigationMenuIcon = forwardRef<HTMLSpanElement, NavigationMenuIconProps>(\n function NavigationMenuIcon({ children = \"⌄\", className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Icon\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.icon, className)}\n data-slot=\"navigation-menu-icon\"\n >\n {children}\n </BaseNavigationMenu.Icon>\n );\n },\n);\n\nexport function NavigationMenuPortal(\n props: ComponentPropsWithoutRef<typeof BaseNavigationMenu.Portal>,\n) {\n return <BaseNavigationMenu.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type NavigationMenuPositionerProps = ComponentPropsWithoutRef<\n typeof BaseNavigationMenu.Positioner\n>;\nexport const NavigationMenuPositioner = forwardRef<HTMLDivElement, NavigationMenuPositionerProps>(\n function NavigationMenuPositioner({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.positioner, className)}\n data-slot=\"navigation-menu-positioner\"\n />\n );\n },\n);\n\nexport type NavigationMenuViewportProps = ComponentPropsWithoutRef<\n typeof BaseNavigationMenu.Viewport\n>;\nexport const NavigationMenuViewport = forwardRef<HTMLDivElement, NavigationMenuViewportProps>(\n function NavigationMenuViewport({ className, ...props }, ref) {\n const { styles, value } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Viewport\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.viewport, className)}\n data-open={value !== null ? \"true\" : \"false\"}\n data-slot=\"navigation-menu-viewport\"\n />\n );\n },\n);\n\nexport type NavigationMenuPopupProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.Popup>;\nexport const NavigationMenuPopup = forwardRef<HTMLElement, NavigationMenuPopupProps>(\n function NavigationMenuPopup({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.popup, className)}\n data-slot=\"navigation-menu-popup\"\n />\n );\n },\n);\n\nexport type NavigationMenuBackdropProps = ComponentPropsWithoutRef<\n typeof BaseNavigationMenu.Backdrop\n>;\nexport const NavigationMenuBackdrop = forwardRef<HTMLDivElement, NavigationMenuBackdropProps>(\n function NavigationMenuBackdrop({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Backdrop\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.backdrop, className)}\n data-slot=\"navigation-menu-backdrop\"\n />\n );\n },\n);\n\nexport type NavigationMenuArrowProps = ComponentPropsWithoutRef<typeof BaseNavigationMenu.Arrow>;\nexport const NavigationMenuArrow = forwardRef<HTMLDivElement, NavigationMenuArrowProps>(\n function NavigationMenuArrow({ className, ...props }, ref) {\n const { styles } = useNavigationMenuContext();\n return (\n <BaseNavigationMenu.Arrow\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.arrow, className)}\n data-slot=\"navigation-menu-arrow\"\n />\n );\n },\n);\n\nexport const NavigationMenu = {\n Root: NavigationMenuRoot,\n List: NavigationMenuList,\n Item: NavigationMenuItem,\n Trigger: NavigationMenuTrigger,\n Content: NavigationMenuContent,\n Link: NavigationMenuLink,\n Icon: NavigationMenuIcon,\n Portal: NavigationMenuPortal,\n Positioner: NavigationMenuPositioner,\n Viewport: NavigationMenuViewport,\n Popup: NavigationMenuPopup,\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AAoB,OAAO,UAAU,SAAS;EACzD,aAAW,UAAU,OAAO,SAAS;EACrC,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,sBAAsB,WACjC,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAS,KAAK;CACzD,MAAM,EAAE,WAAW,yBAAyB;CAC5C,OACE,oBAACA,eAAmB,OAApB;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CACF;AAKA,MAAa,yBAAyB,WACpC,SAAS,uBAAuB,EAAE,WAAW,GAAG,SAAS,KAAK;CAC5D,MAAM,EAAE,WAAW,yBAAyB;CAC5C,OACE,oBAACA,eAAmB,UAApB;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,UAAU,SAAS;EACzD,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,sBAAsB,WACjC,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAS,KAAK;CACzD,MAAM,EAAE,WAAW,yBAAyB;CAC5C,OACE,oBAACA,eAAmB,OAApB;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAaC,mBAAiB;CAC5B,MAAMF;CACN,MAAM;CACN,MAAM;CACN,SAAS;CACT,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,UAAU;CACV,OAAO;CACP,UAAU;CACV,OAAO;AACT"}
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  const require_base_ui = require("../base-ui.cjs");
3
3
  const require_popover = require("../../styled-system/recipes/popover.cjs");
4
+ const require_theme_scope = require("../../theme/theme-scope.cjs");
4
5
  let react = require("react");
5
6
  let react_jsx_runtime = require("react/jsx-runtime");
6
7
  let _base_ui_react_popover = require("@base-ui/react/popover");
@@ -18,7 +19,9 @@ const PopoverTrigger = (0, react.forwardRef)(function PopoverTrigger({ className
18
19
  });
19
20
  });
20
21
  /** Preserves Base UI's optional portal container and mount controls. */
21
- const PopoverPortal = _base_ui_react_popover.Popover.Portal;
22
+ function PopoverPortal(props) {
23
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Portal, { ...require_theme_scope.useThemePortalProps(props) });
24
+ }
22
25
  const PopoverPositioner = (0, react.forwardRef)(function PopoverPositioner({ className, ...props }, ref) {
23
26
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Positioner, {
24
27
  ...props,
@@ -1 +1 @@
1
- {"version":3,"file":"popover.cjs","names":["BasePopover","withRecipeClassName","popover"],"sources":["../../../src/components/popover/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport { Popover as BasePopover } from \"@base-ui/react/popover\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { PopoverRoot as BasePopoverRoot } from \"@base-ui/react/popover\";\n\nimport { popover } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\n/** Preserves Base UI's controlled `open` API and uncontrolled `defaultOpen` API. */\nexport type PopoverRootProps<Payload = unknown> = BasePopoverRoot.Props<Payload>;\n\nexport function PopoverRoot<Payload = unknown>(props: PopoverRootProps<Payload>) {\n return <BasePopover.Root {...props} />;\n}\n\nexport type PopoverTriggerProps = ComponentPropsWithoutRef<typeof BasePopover.Trigger>;\n\nexport const PopoverTrigger = forwardRef<HTMLButtonElement, PopoverTriggerProps>(\n function PopoverTrigger({ className, ...props }, ref) {\n return (\n <BasePopover.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().trigger, className)}\n data-jaci-component=\"popover\"\n data-slot=\"popover-trigger\"\n />\n );\n },\n);\n\n/** Preserves Base UI's optional portal container and mount controls. */\nexport const PopoverPortal: typeof BasePopover.Portal = BasePopover.Portal;\n\nexport type PopoverPositionerProps = ComponentPropsWithoutRef<typeof BasePopover.Positioner>;\n\nexport const PopoverPositioner = forwardRef<HTMLDivElement, PopoverPositionerProps>(\n function PopoverPositioner({ className, ...props }, ref) {\n return (\n <BasePopover.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().positioner, className)}\n data-slot=\"popover-positioner\"\n />\n );\n },\n);\n\nexport type PopoverPopupProps = ComponentPropsWithoutRef<typeof BasePopover.Popup>;\n\nexport const PopoverPopup = forwardRef<HTMLDivElement, PopoverPopupProps>(function PopoverPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().popup, className)}\n data-jaci-component=\"popover\"\n data-slot=\"popover-popup\"\n />\n );\n});\n\nexport type PopoverTitleProps = ComponentPropsWithoutRef<typeof BasePopover.Title>;\n\nexport const PopoverTitle = forwardRef<HTMLHeadingElement, PopoverTitleProps>(function PopoverTitle(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Title\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().title, className)}\n data-slot=\"popover-title\"\n />\n );\n});\n\nexport type PopoverDescriptionProps = ComponentPropsWithoutRef<typeof BasePopover.Description>;\n\nexport const PopoverDescription = forwardRef<HTMLParagraphElement, PopoverDescriptionProps>(\n function PopoverDescription({ className, ...props }, ref) {\n return (\n <BasePopover.Description\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().description, className)}\n data-slot=\"popover-description\"\n />\n );\n },\n);\n\nexport type PopoverCloseProps = ComponentPropsWithoutRef<typeof BasePopover.Close>;\n\nexport const PopoverClose = forwardRef<HTMLButtonElement, PopoverCloseProps>(function PopoverClose(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BasePopover.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close popover\")}\n ref={ref}\n className={withRecipeClassName(popover().close, className)}\n data-slot=\"popover-close\"\n >\n {children ?? \"×\"}\n </BasePopover.Close>\n );\n});\n\nexport type PopoverArrowProps = ComponentPropsWithoutRef<typeof BasePopover.Arrow>;\n\nexport const PopoverArrow = forwardRef<HTMLDivElement, PopoverArrowProps>(function PopoverArrow(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Arrow\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().arrow, className)}\n data-slot=\"popover-arrow\"\n />\n );\n});\n\nexport const Popover = {\n Root: PopoverRoot,\n Trigger: PopoverTrigger,\n Portal: PopoverPortal,\n Positioner: PopoverPositioner,\n Popup: PopoverPopup,\n Title: PopoverTitle,\n Description: PopoverDescription,\n Close: PopoverClose,\n Arrow: PopoverArrow,\n createHandle: BasePopover.createHandle,\n};\n"],"mappings":";;;;;;;AAaA,SAAgB,YAA+B,OAAkC;CAC/E,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAY,MAAb,EAAkB,GAAI,MAAQ,CAAA;AACvC;AAIA,MAAa,kBAAA,GAAA,MAAA,WAAA,CACX,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAY,SAAb;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,gBAAAA,QAAQ,CAAC,CAAC,SAAS,SAAS;EAC3D,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CACF;;AAGA,MAAa,gBAA2CF,uBAAAA,QAAY;AAIpE,MAAa,qBAAA,GAAA,MAAA,WAAA,CACX,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAS,KAAK;CACvD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAY,YAAb;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,gBAAAA,QAAQ,CAAC,CAAC,YAAY,SAAS;EAC9D,aAAU;CACX,CAAA;AAEL,CACF;AAIA,MAAa,gBAAA,GAAA,MAAA,WAAA,CAA6D,SAAS,aACjF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,i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Ab;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,gBAAAA,QAAQ,CAAC,CAAC,OAAO,SAAS;EACzD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,UAAU;CACrB,MAAM;CACN,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,aAAa;CACb,OAAO;CACP,OAAO;CACP,cAAcF,uBAAAA,QAAY;AAC5B"}
1
+ {"version":3,"file":"popover.cjs","names":["BasePopover","withRecipeClassName","popover","useThemePortalProps"],"sources":["../../../src/components/popover/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport { Popover as BasePopover } from \"@base-ui/react/popover\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { PopoverRoot as BasePopoverRoot } from \"@base-ui/react/popover\";\n\nimport { popover } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\n/** Preserves Base UI's controlled `open` API and uncontrolled `defaultOpen` API. */\nexport type PopoverRootProps<Payload = unknown> = BasePopoverRoot.Props<Payload>;\n\nexport function PopoverRoot<Payload = unknown>(props: PopoverRootProps<Payload>) {\n return <BasePopover.Root {...props} />;\n}\n\nexport type PopoverTriggerProps = ComponentPropsWithoutRef<typeof BasePopover.Trigger>;\n\nexport const PopoverTrigger = forwardRef<HTMLButtonElement, PopoverTriggerProps>(\n function PopoverTrigger({ className, ...props }, ref) {\n return (\n <BasePopover.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().trigger, className)}\n data-jaci-component=\"popover\"\n data-slot=\"popover-trigger\"\n />\n );\n },\n);\n\n/** Preserves Base UI's optional portal container and mount controls. */\nexport function PopoverPortal(props: ComponentPropsWithoutRef<typeof BasePopover.Portal>) {\n return <BasePopover.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type PopoverPositionerProps = ComponentPropsWithoutRef<typeof BasePopover.Positioner>;\n\nexport const PopoverPositioner = forwardRef<HTMLDivElement, PopoverPositionerProps>(\n function PopoverPositioner({ className, ...props }, ref) {\n return (\n <BasePopover.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().positioner, className)}\n data-slot=\"popover-positioner\"\n />\n );\n },\n);\n\nexport type PopoverPopupProps = ComponentPropsWithoutRef<typeof BasePopover.Popup>;\n\nexport const PopoverPopup = forwardRef<HTMLDivElement, PopoverPopupProps>(function PopoverPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().popup, className)}\n data-jaci-component=\"popover\"\n data-slot=\"popover-popup\"\n />\n );\n});\n\nexport type PopoverTitleProps = ComponentPropsWithoutRef<typeof BasePopover.Title>;\n\nexport const PopoverTitle = forwardRef<HTMLHeadingElement, PopoverTitleProps>(function PopoverTitle(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Title\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().title, className)}\n data-slot=\"popover-title\"\n />\n );\n});\n\nexport type PopoverDescriptionProps = ComponentPropsWithoutRef<typeof BasePopover.Description>;\n\nexport const PopoverDescription = forwardRef<HTMLParagraphElement, PopoverDescriptionProps>(\n function PopoverDescription({ className, ...props }, ref) {\n return (\n <BasePopover.Description\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().description, className)}\n data-slot=\"popover-description\"\n />\n );\n },\n);\n\nexport type PopoverCloseProps = ComponentPropsWithoutRef<typeof BasePopover.Close>;\n\nexport const PopoverClose = forwardRef<HTMLButtonElement, PopoverCloseProps>(function PopoverClose(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BasePopover.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close popover\")}\n ref={ref}\n className={withRecipeClassName(popover().close, className)}\n data-slot=\"popover-close\"\n >\n {children ?? \"×\"}\n </BasePopover.Close>\n );\n});\n\nexport type PopoverArrowProps = ComponentPropsWithoutRef<typeof BasePopover.Arrow>;\n\nexport const PopoverArrow = forwardRef<HTMLDivElement, PopoverArrowProps>(function PopoverArrow(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Arrow\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().arrow, className)}\n data-slot=\"popover-arrow\"\n />\n );\n});\n\nexport const Popover = {\n Root: PopoverRoot,\n Trigger: PopoverTrigger,\n Portal: PopoverPortal,\n Positioner: PopoverPositioner,\n Popup: PopoverPopup,\n Title: PopoverTitle,\n Description: PopoverDescription,\n Close: PopoverClose,\n Arrow: PopoverArrow,\n createHandle: BasePopover.createHandle,\n};\n"],"mappings":";;;;;;;;AAcA,SAAgB,YAA+B,OAAkC;CAC/E,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAY,MAAb,EAAkB,GAAI,MAAQ,CAAA;AACvC;AAIA,MAAa,kBAAA,GAAA,MAAA,WAAA,CACX,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAY,SAAb;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,gBAAAA,QAAQ,CAAC,CAAC,SAAS,SAAS;EAC3D,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CACF;;AAGA,SAAgB,cAAc,OAA4D;CACxF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACF,uBAAAA,QAAY,QAAb,EAAoB,GAAIG,oBAAAA,oBAAoB,KAAK,EAAI,CAAA;AAC9D;AAIA,MAAa,qBAAA,GAAA,MAAA,WAAA,CACX,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAS,KAAK;CACvD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACH,uBAAAA,QAAY,YAAb;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,gBAAAA,QAAQ,CAAC,CAAC,YAAY,SAAS;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BAAA,GAAA,MAAA,WAAA,CAA6D,SAAS,aACjF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACF,uBAAAA,QAAY,OAAb;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,gBAAAA,QAAQ,CAAC,CAAC,OAAO,SAAS;EACzD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,UAAU;CACrB,MAAM;CACN,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,aAAa;CACb,OAAO;CACP,OAAO;CACP,cAAcF,uBAAAA,QAAY;AAC5B"}
@@ -19,7 +19,7 @@ declare const PopoverTrigger: import("react").ForwardRefExoticComponent<Omit<imp
19
19
  closeDelay?: number | undefined;
20
20
  } & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
21
21
  /** Preserves Base UI's optional portal container and mount controls. */
22
- declare const PopoverPortal: typeof Popover.Portal;
22
+ declare function PopoverPortal(props: ComponentPropsWithoutRef<typeof Popover.Portal>): import("react").JSX.Element;
23
23
  type PopoverPositionerProps = ComponentPropsWithoutRef<typeof Popover.Positioner>;
24
24
  declare const PopoverPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
25
25
  type PopoverPopupProps = ComponentPropsWithoutRef<typeof Popover.Popup>;
@@ -47,7 +47,7 @@ declare const Popover$1: {
47
47
  delay?: number | undefined;
48
48
  closeDelay?: number | undefined;
49
49
  } & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
50
- Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").PopoverPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
50
+ Portal: typeof PopoverPortal;
51
51
  Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
52
52
  Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
53
53
  Title: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverTitleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
@@ -19,7 +19,7 @@ declare const PopoverTrigger: import("react").ForwardRefExoticComponent<Omit<imp
19
19
  closeDelay?: number | undefined;
20
20
  } & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
21
21
  /** Preserves Base UI's optional portal container and mount controls. */
22
- declare const PopoverPortal: typeof Popover.Portal;
22
+ declare function PopoverPortal(props: ComponentPropsWithoutRef<typeof Popover.Portal>): import("react").JSX.Element;
23
23
  type PopoverPositionerProps = ComponentPropsWithoutRef<typeof Popover.Positioner>;
24
24
  declare const PopoverPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
25
25
  type PopoverPopupProps = ComponentPropsWithoutRef<typeof Popover.Popup>;
@@ -47,7 +47,7 @@ declare const Popover$1: {
47
47
  delay?: number | undefined;
48
48
  closeDelay?: number | undefined;
49
49
  } & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
50
- Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").PopoverPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
50
+ Portal: typeof PopoverPortal;
51
51
  Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
52
52
  Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
53
53
  Title: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").PopoverTitleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { withRecipeClassName } from "../base-ui.js";
3
3
  import { popover } from "../../styled-system/recipes/popover.js";
4
+ import { useThemePortalProps } from "../../theme/theme-scope.js";
4
5
  import { forwardRef } from "react";
5
6
  import { jsx } from "react/jsx-runtime";
6
7
  import { Popover } from "@base-ui/react/popover";
@@ -18,7 +19,9 @@ const PopoverTrigger = forwardRef(function PopoverTrigger({ className, ...props
18
19
  });
19
20
  });
20
21
  /** Preserves Base UI's optional portal container and mount controls. */
21
- const PopoverPortal = Popover.Portal;
22
+ function PopoverPortal(props) {
23
+ return /* @__PURE__ */ jsx(Popover.Portal, { ...useThemePortalProps(props) });
24
+ }
22
25
  const PopoverPositioner = forwardRef(function PopoverPositioner({ className, ...props }, ref) {
23
26
  return /* @__PURE__ */ jsx(Popover.Positioner, {
24
27
  ...props,
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","names":["PopoverRoot","BasePopover","Popover"],"sources":["../../../src/components/popover/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport { Popover as BasePopover } from \"@base-ui/react/popover\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { PopoverRoot as BasePopoverRoot } from \"@base-ui/react/popover\";\n\nimport { popover } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\n/** Preserves Base UI's controlled `open` API and uncontrolled `defaultOpen` API. */\nexport type PopoverRootProps<Payload = unknown> = BasePopoverRoot.Props<Payload>;\n\nexport function PopoverRoot<Payload = unknown>(props: PopoverRootProps<Payload>) {\n return <BasePopover.Root {...props} />;\n}\n\nexport type PopoverTriggerProps = ComponentPropsWithoutRef<typeof BasePopover.Trigger>;\n\nexport const PopoverTrigger = forwardRef<HTMLButtonElement, PopoverTriggerProps>(\n function PopoverTrigger({ className, ...props }, ref) {\n return (\n <BasePopover.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().trigger, className)}\n data-jaci-component=\"popover\"\n data-slot=\"popover-trigger\"\n />\n );\n },\n);\n\n/** Preserves Base UI's optional portal container and mount controls. */\nexport const PopoverPortal: typeof BasePopover.Portal = BasePopover.Portal;\n\nexport type PopoverPositionerProps = ComponentPropsWithoutRef<typeof BasePopover.Positioner>;\n\nexport const PopoverPositioner = forwardRef<HTMLDivElement, PopoverPositionerProps>(\n function PopoverPositioner({ className, ...props }, ref) {\n return (\n <BasePopover.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().positioner, className)}\n data-slot=\"popover-positioner\"\n />\n );\n },\n);\n\nexport type PopoverPopupProps = ComponentPropsWithoutRef<typeof BasePopover.Popup>;\n\nexport const PopoverPopup = forwardRef<HTMLDivElement, PopoverPopupProps>(function PopoverPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().popup, className)}\n data-jaci-component=\"popover\"\n data-slot=\"popover-popup\"\n />\n );\n});\n\nexport type PopoverTitleProps = ComponentPropsWithoutRef<typeof BasePopover.Title>;\n\nexport const PopoverTitle = forwardRef<HTMLHeadingElement, PopoverTitleProps>(function PopoverTitle(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Title\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().title, className)}\n data-slot=\"popover-title\"\n />\n );\n});\n\nexport type PopoverDescriptionProps = ComponentPropsWithoutRef<typeof BasePopover.Description>;\n\nexport const PopoverDescription = forwardRef<HTMLParagraphElement, PopoverDescriptionProps>(\n function PopoverDescription({ className, ...props }, ref) {\n return (\n <BasePopover.Description\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().description, className)}\n data-slot=\"popover-description\"\n />\n );\n },\n);\n\nexport type PopoverCloseProps = ComponentPropsWithoutRef<typeof BasePopover.Close>;\n\nexport const PopoverClose = forwardRef<HTMLButtonElement, PopoverCloseProps>(function PopoverClose(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BasePopover.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close popover\")}\n ref={ref}\n className={withRecipeClassName(popover().close, className)}\n data-slot=\"popover-close\"\n >\n {children ?? \"×\"}\n </BasePopover.Close>\n );\n});\n\nexport type PopoverArrowProps = ComponentPropsWithoutRef<typeof BasePopover.Arrow>;\n\nexport const PopoverArrow = forwardRef<HTMLDivElement, PopoverArrowProps>(function PopoverArrow(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Arrow\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().arrow, className)}\n data-slot=\"popover-arrow\"\n />\n );\n});\n\nexport const Popover = {\n Root: PopoverRoot,\n Trigger: PopoverTrigger,\n Portal: PopoverPortal,\n Positioner: PopoverPositioner,\n Popup: PopoverPopup,\n Title: PopoverTitle,\n Description: PopoverDescription,\n Close: PopoverClose,\n Arrow: PopoverArrow,\n createHandle: BasePopover.createHandle,\n};\n"],"mappings":";;;;;;;AAaA,SAAgBA,cAA+B,OAAkC;CAC/E,OAAO,oBAACC,QAAY,MAAb,EAAkB,GAAI,MAAQ,CAAA;AACvC;AAIA,MAAa,iBAAiB,WAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,oBAACA,QAAY,SAAb;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,QAAQ,CAAC,CAAC,SAAS,SAAS;EAC3D,uBAAoB;EACpB,a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E,oBAACA,QAAY,OAAb;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,QAAQ,CAAC,CAAC,OAAO,SAAS;EACzD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAaC,YAAU;CACrB,MAAMF;CACN,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,aAAa;CACb,OAAO;CACP,OAAO;CACP,cAAcC,QAAY;AAC5B"}
1
+ {"version":3,"file":"popover.js","names":["PopoverRoot","BasePopover","Popover"],"sources":["../../../src/components/popover/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport { Popover as BasePopover } from \"@base-ui/react/popover\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { PopoverRoot as BasePopoverRoot } from \"@base-ui/react/popover\";\n\nimport { popover } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\n/** Preserves Base UI's controlled `open` API and uncontrolled `defaultOpen` API. */\nexport type PopoverRootProps<Payload = unknown> = BasePopoverRoot.Props<Payload>;\n\nexport function PopoverRoot<Payload = unknown>(props: PopoverRootProps<Payload>) {\n return <BasePopover.Root {...props} />;\n}\n\nexport type PopoverTriggerProps = ComponentPropsWithoutRef<typeof BasePopover.Trigger>;\n\nexport const PopoverTrigger = forwardRef<HTMLButtonElement, PopoverTriggerProps>(\n function PopoverTrigger({ className, ...props }, ref) {\n return (\n <BasePopover.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().trigger, className)}\n data-jaci-component=\"popover\"\n data-slot=\"popover-trigger\"\n />\n );\n },\n);\n\n/** Preserves Base UI's optional portal container and mount controls. */\nexport function PopoverPortal(props: ComponentPropsWithoutRef<typeof BasePopover.Portal>) {\n return <BasePopover.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type PopoverPositionerProps = ComponentPropsWithoutRef<typeof BasePopover.Positioner>;\n\nexport const PopoverPositioner = forwardRef<HTMLDivElement, PopoverPositionerProps>(\n function PopoverPositioner({ className, ...props }, ref) {\n return (\n <BasePopover.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().positioner, className)}\n data-slot=\"popover-positioner\"\n />\n );\n },\n);\n\nexport type PopoverPopupProps = ComponentPropsWithoutRef<typeof BasePopover.Popup>;\n\nexport const PopoverPopup = forwardRef<HTMLDivElement, PopoverPopupProps>(function PopoverPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().popup, className)}\n data-jaci-component=\"popover\"\n data-slot=\"popover-popup\"\n />\n );\n});\n\nexport type PopoverTitleProps = ComponentPropsWithoutRef<typeof BasePopover.Title>;\n\nexport const PopoverTitle = forwardRef<HTMLHeadingElement, PopoverTitleProps>(function PopoverTitle(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Title\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().title, className)}\n data-slot=\"popover-title\"\n />\n );\n});\n\nexport type PopoverDescriptionProps = ComponentPropsWithoutRef<typeof BasePopover.Description>;\n\nexport const PopoverDescription = forwardRef<HTMLParagraphElement, PopoverDescriptionProps>(\n function PopoverDescription({ className, ...props }, ref) {\n return (\n <BasePopover.Description\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().description, className)}\n data-slot=\"popover-description\"\n />\n );\n },\n);\n\nexport type PopoverCloseProps = ComponentPropsWithoutRef<typeof BasePopover.Close>;\n\nexport const PopoverClose = forwardRef<HTMLButtonElement, PopoverCloseProps>(function PopoverClose(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BasePopover.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close popover\")}\n ref={ref}\n className={withRecipeClassName(popover().close, className)}\n data-slot=\"popover-close\"\n >\n {children ?? \"×\"}\n </BasePopover.Close>\n );\n});\n\nexport type PopoverArrowProps = ComponentPropsWithoutRef<typeof BasePopover.Arrow>;\n\nexport const PopoverArrow = forwardRef<HTMLDivElement, PopoverArrowProps>(function PopoverArrow(\n { className, ...props },\n ref,\n) {\n return (\n <BasePopover.Arrow\n {...props}\n ref={ref}\n className={withRecipeClassName(popover().arrow, className)}\n data-slot=\"popover-arrow\"\n />\n );\n});\n\nexport const Popover = {\n Root: PopoverRoot,\n Trigger: PopoverTrigger,\n Portal: PopoverPortal,\n Positioner: PopoverPositioner,\n Popup: PopoverPopup,\n Title: PopoverTitle,\n Description: PopoverDescription,\n Close: PopoverClose,\n Arrow: PopoverArrow,\n createHandle: BasePopover.createHandle,\n};\n"],"mappings":";;;;;;;;AAcA,SAAgBA,cAA+B,OAAkC;CAC/E,OAAO,oBAACC,QAAY,MAAb,EAAkB,GAAI,MAAQ,CAAA;AACvC;AAIA,MAAa,iBAAiB,WAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,oBAACA,QAAY,SAAb;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,QAAQ,CAAC,CAAC,SAAS,SAAS;EAC3D,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CACF;;AAGA,SAAgB,cAAc,OAA4D;CACxF,OAAO,oBAACA,QAAY,QAAb,EAAoB,GAAI,oBAAoB,KAAK,EAAI,CAAA;AAC9D;AAIA,MAAa,oBAAoB,WAC/B,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAS,KAAK;CACvD,OACE,oBAACA,QAAY,YAAb;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,QAAQ,CAAC,CAAC,YAAY,SAAS;EAC9D,aAAU;CACX,CAAA;AAEL,CACF;AAIA,MAAa,eAAe,WAA8C,SAAS,aACjF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAACA,QAAY,OAAb;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,QAAQ,CAAC,CAAC,OAAO,SAAS;EACzD,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,eAAe,WAAkD,SAAS,aACrF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAACA,QAAY,OAAb;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,QAAQ,CAAC,CAAC,OAAO,SAAS;EACzD,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,qBAAqB,WAChC,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAS,KAAK;CACxD,OACE,oBAACA,QAAY,aAAb;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,QAAQ,CAAC,CAAC,aAAa,SAAS;EAC/D,aAAU;CACX,CAAA;AAEL,CACF;AAIA,MAAa,eAAe,WAAiD,SAAS,aACpF,EAAE,cAAc,WAAW,UAAU,WAAW,GAAG,SACnD,KACA;CACA,MAAM,kBAAkB,YAAY;CAEpC,OACE,oBAACA,QAAY,OAAb;EACE,GAAI;EACJ,cAAY,cAAc,kBAAkB,KAAA,IAAY;EACnD;EACL,WAAW,oBAAoB,QAAQ,CAAC,CAAC,OAAO,SAAS;EACzD,aAAU;YAET,YAAY;CACI,CAAA;AAEvB,CAAC;AAID,MAAa,eAAe,WAA8C,SAAS,aACjF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAACA,QAAY,OAAb;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,QAAQ,CAAC,CAAC,OAAO,SAAS;EACzD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAaC,YAAU;CACrB,MAAMF;CACN,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,aAAa;CACb,OAAO;CACP,OAAO;CACP,cAAcC,QAAY;AAC5B"}
@@ -2,6 +2,7 @@
2
2
  const require_cx = require("../../styled-system/css/cx.cjs");
3
3
  const require_base_ui = require("../base-ui.cjs");
4
4
  const require_select = require("../../styled-system/recipes/select.cjs");
5
+ const require_theme_scope = require("../../theme/theme-scope.cjs");
5
6
  let react = require("react");
6
7
  let react_jsx_runtime = require("react/jsx-runtime");
7
8
  let _base_ui_react_select = require("@base-ui/react/select");
@@ -80,7 +81,9 @@ const SelectIcon = (0, react.forwardRef)(function SelectIcon({ children = "⌄",
80
81
  });
81
82
  });
82
83
  /** Preserves Base UI's optional portal container and mount controls. */
83
- const SelectPortal = _base_ui_react_select.Select.Portal;
84
+ function SelectPortal(props) {
85
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Portal, { ...require_theme_scope.useThemePortalProps(props) });
86
+ }
84
87
  const SelectPositioner = (0, react.forwardRef)(function SelectPositioner({ className, ...props }, ref) {
85
88
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_select.Select.Positioner, {
86
89
  ...props,
@@ -1 +1 @@
1
- {"version":3,"file":"select.cjs","names":["select","BaseSelect","withRecipeClassName","cx"],"sources":["../../../src/components/select/select.tsx"],"sourcesContent":["\"use client\";\n\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { createContext, forwardRef, useContext, useState } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport type { SelectRoot as BaseSelectRoot } from \"@base-ui/react/select\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { select } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\nexport type SelectSize = \"sm\" | \"md\" | \"lg\";\n\nconst SelectSizeContext = createContext<SelectSize>(\"md\");\nconst SelectAuxContext = createContext<{ clear: () => void; disabled: boolean } | null>(null);\n\nfunction useSelectStyles() {\n return select({ size: useContext(SelectSizeContext) });\n}\n\n/**\n * Groups an accessible listbox select. Use `value`/`onValueChange` for a\n * controlled selection, or `defaultValue` for an uncontrolled selection.\n *\n * `size` is shared by all visual parts so the trigger stays aligned with the\n * library's `Input` component.\n */\nexport interface SelectRootProps<Value, Multiple extends boolean | undefined = false>\n extends BaseSelectRoot.Props<Value, Multiple> {\n size?: SelectSize;\n loading?: boolean;\n}\n\nexport function SelectRoot<Value = unknown, Multiple extends boolean | undefined = false>({\n defaultValue,\n disabled = false,\n loading: _loading,\n multiple,\n onValueChange,\n size = \"md\",\n value: controlledValue,\n ...props\n}: SelectRootProps<Value, Multiple>) {\n const [uncontrolledValue, setUncontrolledValue] = useState<unknown>(\n defaultValue ?? (multiple ? [] : null),\n );\n const value = controlledValue === undefined ? uncontrolledValue : controlledValue;\n const clear = () => {\n const nextValue = multiple ? [] : null;\n if (controlledValue === undefined) setUncontrolledValue(nextValue);\n onValueChange?.(nextValue as never, undefined as never);\n };\n return (\n <SelectSizeContext.Provider value={size}>\n <SelectAuxContext.Provider value={{ clear, disabled }}>\n <BaseSelect.Root\n {...props}\n disabled={disabled}\n defaultValue={undefined}\n multiple={multiple}\n onValueChange={(nextValue, details) => {\n if (controlledValue === undefined) setUncontrolledValue(nextValue);\n onValueChange?.(nextValue, details);\n }}\n value={value as SelectRootProps<Value, Multiple>[\"value\"]}\n />\n </SelectAuxContext.Provider>\n </SelectSizeContext.Provider>\n );\n}\n\nexport type SelectLabelProps = ComponentPropsWithoutRef<typeof BaseSelect.Label>;\n\n/** An accessible label that Base UI associates with the trigger automatically. */\nexport const SelectLabel = forwardRef<HTMLDivElement, SelectLabelProps>(function SelectLabel(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Label\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().label, className)}\n data-slot=\"select-label\"\n />\n );\n});\n\nexport type SelectTriggerProps = ComponentPropsWithoutRef<typeof BaseSelect.Trigger>;\n\n/** The button-shaped control that opens the select popup. */\nexport const SelectTrigger = forwardRef<HTMLButtonElement, SelectTriggerProps>(\n function SelectTrigger({ className, ...props }, ref) {\n return (\n <BaseSelect.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().trigger, className)}\n data-jaci-component=\"select\"\n data-slot=\"select-trigger\"\n />\n );\n },\n);\n\nexport type SelectValueProps = ComponentPropsWithoutRef<typeof BaseSelect.Value>;\n\n/** Renders the selected item's label, or its placeholder when empty. */\nexport const SelectValue = forwardRef<HTMLSpanElement, SelectValueProps>(function SelectValue(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Value\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().value, className)}\n data-slot=\"select-value\"\n />\n );\n});\n\nexport type SelectIconProps = ComponentPropsWithoutRef<typeof BaseSelect.Icon>;\n\n/** A small chevron that rotates while the popup is open. */\nexport const SelectIcon = forwardRef<HTMLSpanElement, SelectIconProps>(function SelectIcon(\n { children = \"⌄\", className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Icon\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={withRecipeClassName(useSelectStyles().icon, className)}\n data-slot=\"select-icon\"\n >\n {children}\n </BaseSelect.Icon>\n );\n});\n\n/** Preserves Base UI's optional portal container and mount controls. */\nexport const SelectPortal = BaseSelect.Portal;\n\nexport type SelectPositionerProps = ComponentPropsWithoutRef<typeof BaseSelect.Positioner>;\n\nexport const SelectPositioner = forwardRef<HTMLDivElement, SelectPositionerProps>(\n function SelectPositioner({ className, ...props }, ref) {\n return (\n <BaseSelect.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().positioner, className)}\n data-slot=\"select-positioner\"\n />\n );\n },\n);\n\nexport type SelectPopupProps = ComponentPropsWithoutRef<typeof BaseSelect.Popup>;\n\nexport const SelectPopup = forwardRef<HTMLDivElement, SelectPopupProps>(function SelectPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().popup, className)}\n data-slot=\"select-popup\"\n />\n );\n});\n\nexport type SelectListProps = ComponentPropsWithoutRef<typeof BaseSelect.List>;\n\nexport const SelectList = forwardRef<HTMLDivElement, SelectListProps>(function SelectList(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.List\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().list, className)}\n data-slot=\"select-list\"\n />\n );\n});\n\nexport type SelectItemProps = ComponentPropsWithoutRef<typeof BaseSelect.Item>;\n\nexport const SelectItem = forwardRef<HTMLElement, SelectItemProps>(function SelectItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Item\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().item, className)}\n data-slot=\"select-item\"\n />\n );\n});\n\nexport type SelectItemTextProps = ComponentPropsWithoutRef<typeof BaseSelect.ItemText>;\n\nexport const SelectItemText = forwardRef<HTMLDivElement, SelectItemTextProps>(\n function SelectItemText({ className, ...props }, ref) {\n return (\n <BaseSelect.ItemText\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().itemText, className)}\n data-slot=\"select-item-text\"\n />\n );\n },\n);\n\nexport type SelectItemIndicatorProps = ComponentPropsWithoutRef<typeof BaseSelect.ItemIndicator>;\n\nexport const SelectItemIndicator = forwardRef<HTMLSpanElement, SelectItemIndicatorProps>(\n function SelectItemIndicator({ children = \"✓\", className, ...props }, ref) {\n return (\n <BaseSelect.ItemIndicator\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={withRecipeClassName(useSelectStyles().itemIndicator, className)}\n data-slot=\"select-item-indicator\"\n >\n {children}\n </BaseSelect.ItemIndicator>\n );\n },\n);\n\nexport type SelectGroupProps = ComponentPropsWithoutRef<typeof BaseSelect.Group>;\n\nexport const SelectGroup = forwardRef<HTMLDivElement, SelectGroupProps>(function SelectGroup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Group\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().group, className)}\n data-slot=\"select-group\"\n />\n );\n});\n\nexport type SelectGroupLabelProps = ComponentPropsWithoutRef<typeof BaseSelect.GroupLabel>;\n\nexport const SelectGroupLabel = forwardRef<HTMLDivElement, SelectGroupLabelProps>(\n function SelectGroupLabel({ className, ...props }, ref) {\n return (\n <BaseSelect.GroupLabel\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().groupLabel, className)}\n data-slot=\"select-group-label\"\n />\n );\n },\n);\n\n/**\n * A visual separator for groups in a listbox. It is intentionally hidden from\n * assistive technology because ARIA listboxes may only contain options or\n * option groups, not semantic separators.\n */\nexport interface SelectSeparatorProps extends ComponentPropsWithoutRef<\"div\"> {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nexport const SelectSeparator = forwardRef<HTMLDivElement, SelectSeparatorProps>(\n function SelectSeparator({ className, orientation = \"horizontal\", ...props }, ref) {\n return (\n <div\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useSelectStyles().separator, className)}\n data-orientation={orientation}\n data-slot=\"select-separator\"\n />\n );\n },\n);\n\nexport interface SelectClearProps extends ComponentPropsWithoutRef<\"button\"> {\n children?: ReactNode;\n}\nexport const SelectClear = forwardRef<HTMLButtonElement, SelectClearProps>(function SelectClear(\n { children = \"×\", className, ...props },\n ref,\n) {\n const context = useContext(SelectAuxContext);\n const styles = useSelectStyles();\n return (\n <button\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Clear selection\"}\n className={cx(styles.clear, className)}\n data-slot=\"select-clear\"\n disabled={props.disabled || context?.disabled}\n onClick={(event) => {\n context?.clear();\n props.onClick?.(event);\n }}\n ref={ref}\n type=\"button\"\n >\n {children}\n </button>\n );\n});\n\nexport type SelectEmptyProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectEmpty = forwardRef<HTMLDivElement, SelectEmptyProps>(function SelectEmpty(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n className={cx(useSelectStyles().empty, className)}\n data-slot=\"select-empty\"\n ref={ref}\n />\n );\n});\nexport type SelectLoadingProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectLoading = forwardRef<HTMLDivElement, SelectLoadingProps>(function SelectLoading(\n { children = \"Loading…\", className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n aria-live=\"polite\"\n className={cx(useSelectStyles().loading, className)}\n data-slot=\"select-loading\"\n ref={ref}\n >\n {children}\n </div>\n );\n});\nexport type SelectStatusProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectStatus = forwardRef<HTMLDivElement, SelectStatusProps>(function SelectStatus(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n aria-live=\"polite\"\n className={cx(useSelectStyles().status, className)}\n data-slot=\"select-status\"\n ref={ref}\n />\n );\n});\n\nexport const Select = {\n Root: SelectRoot,\n Label: SelectLabel,\n Trigger: SelectTrigger,\n Value: SelectValue,\n Icon: SelectIcon,\n Portal: SelectPortal,\n Positioner: SelectPositioner,\n Popup: SelectPopup,\n List: SelectList,\n Item: SelectItem,\n ItemText: SelectItemText,\n ItemIndicator: SelectItemIndicator,\n Group: SelectGroup,\n GroupLabel: SelectGroupLabel,\n Separator: SelectSeparator,\n Clear: SelectClear,\n Empty: SelectEmpty,\n Loading: SelectLoading,\n Status: SelectStatus,\n};\n"],"mappings":";;;;;;;;AAaA,MAAM,qBAAA,GAAA,MAAA,cAAA,CAA8C,IAAI;AACxD,MAAM,oBAAA,GAAA,MAAA,cAAA,CAAkF,IAAI;AAE5F,SAAS,kBAAkB;CACzB,OAAOA,eAAAA,OAAO,EAAE,OAAA,GAAA,MAAA,WAAA,CAAiB,iBAAiB,EAAE,CAAC;AACvD;AAeA,SAAgB,WAA0E,EACxF,cACA,WAAW,OACX,SAAS,UACT,UACA,eACA,OAAO,MACP,OAAO,iBACP,GAAG,SACgC;CACnC,MAAM,CAAC,mBAAmB,yBAAA,GAAA,MAAA,SAAA,CACxB,iBAAiB,WAAW,CAAC,IAAI,KACnC;CACA,MAAM,QAAQ,oBAAoB,KAAA,IAAY,oBAAoB;CAClE,MAAM,cAAc;EAClB,MAAM,YAAY,WAAW,CAAC,IAAI;EAClC,IAAI,oBAAoB,KAAA,GAAW,qBAAqB,SAAS;EACjE,gBAAgB,WAAoB,KAAA,CAAkB;CACxD;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAkB,UAAnB;EAA4B,OAAO;YACjC,iBAAA,GAAA,k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AAA,CAAC,OAAD;EACE,GAAI;EACJ,aAAU;EACV,WAAWA,WAAAA,GAAG,gBAAgB,CAAC,CAAC,QAAQ,SAAS;EACjD,aAAU;EACL;CACN,CAAA;AAEL,CAAC;AAED,MAAa,SAAS;CACpB,MAAM;CACN,OAAO;CACP,SAAS;CACT,OAAO;CACP,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,MAAM;CACN,MAAM;CACN,UAAU;CACV,eAAe;CACf,OAAO;CACP,YAAY;CACZ,WAAW;CACX,OAAO;CACP,OAAO;CACP,SAAS;CACT,QAAQ;AACV"}
1
+ {"version":3,"file":"select.cjs","names":["select","BaseSelect","withRecipeClassName","useThemePortalProps","cx"],"sources":["../../../src/components/select/select.tsx"],"sourcesContent":["\"use client\";\n\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { createContext, forwardRef, useContext, useState } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport type { SelectRoot as BaseSelectRoot } from \"@base-ui/react/select\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { select } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\nexport type SelectSize = \"sm\" | \"md\" | \"lg\";\n\nconst SelectSizeContext = createContext<SelectSize>(\"md\");\nconst SelectAuxContext = createContext<{ clear: () => void; disabled: boolean } | null>(null);\n\nfunction useSelectStyles() {\n return select({ size: useContext(SelectSizeContext) });\n}\n\n/**\n * Groups an accessible listbox select. Use `value`/`onValueChange` for a\n * controlled selection, or `defaultValue` for an uncontrolled selection.\n *\n * `size` is shared by all visual parts so the trigger stays aligned with the\n * library's `Input` component.\n */\nexport interface SelectRootProps<Value, Multiple extends boolean | undefined = false>\n extends BaseSelectRoot.Props<Value, Multiple> {\n size?: SelectSize;\n loading?: boolean;\n}\n\nexport function SelectRoot<Value = unknown, Multiple extends boolean | undefined = false>({\n defaultValue,\n disabled = false,\n loading: _loading,\n multiple,\n onValueChange,\n size = \"md\",\n value: controlledValue,\n ...props\n}: SelectRootProps<Value, Multiple>) {\n const [uncontrolledValue, setUncontrolledValue] = useState<unknown>(\n defaultValue ?? (multiple ? [] : null),\n );\n const value = controlledValue === undefined ? uncontrolledValue : controlledValue;\n const clear = () => {\n const nextValue = multiple ? [] : null;\n if (controlledValue === undefined) setUncontrolledValue(nextValue);\n onValueChange?.(nextValue as never, undefined as never);\n };\n return (\n <SelectSizeContext.Provider value={size}>\n <SelectAuxContext.Provider value={{ clear, disabled }}>\n <BaseSelect.Root\n {...props}\n disabled={disabled}\n defaultValue={undefined}\n multiple={multiple}\n onValueChange={(nextValue, details) => {\n if (controlledValue === undefined) setUncontrolledValue(nextValue);\n onValueChange?.(nextValue, details);\n }}\n value={value as SelectRootProps<Value, Multiple>[\"value\"]}\n />\n </SelectAuxContext.Provider>\n </SelectSizeContext.Provider>\n );\n}\n\nexport type SelectLabelProps = ComponentPropsWithoutRef<typeof BaseSelect.Label>;\n\n/** An accessible label that Base UI associates with the trigger automatically. */\nexport const SelectLabel = forwardRef<HTMLDivElement, SelectLabelProps>(function SelectLabel(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Label\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().label, className)}\n data-slot=\"select-label\"\n />\n );\n});\n\nexport type SelectTriggerProps = ComponentPropsWithoutRef<typeof BaseSelect.Trigger>;\n\n/** The button-shaped control that opens the select popup. */\nexport const SelectTrigger = forwardRef<HTMLButtonElement, SelectTriggerProps>(\n function SelectTrigger({ className, ...props }, ref) {\n return (\n <BaseSelect.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().trigger, className)}\n data-jaci-component=\"select\"\n data-slot=\"select-trigger\"\n />\n );\n },\n);\n\nexport type SelectValueProps = ComponentPropsWithoutRef<typeof BaseSelect.Value>;\n\n/** Renders the selected item's label, or its placeholder when empty. */\nexport const SelectValue = forwardRef<HTMLSpanElement, SelectValueProps>(function SelectValue(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Value\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().value, className)}\n data-slot=\"select-value\"\n />\n );\n});\n\nexport type SelectIconProps = ComponentPropsWithoutRef<typeof BaseSelect.Icon>;\n\n/** A small chevron that rotates while the popup is open. */\nexport const SelectIcon = forwardRef<HTMLSpanElement, SelectIconProps>(function SelectIcon(\n { children = \"⌄\", className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Icon\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={withRecipeClassName(useSelectStyles().icon, className)}\n data-slot=\"select-icon\"\n >\n {children}\n </BaseSelect.Icon>\n );\n});\n\n/** Preserves Base UI's optional portal container and mount controls. */\nexport function SelectPortal(props: ComponentPropsWithoutRef<typeof BaseSelect.Portal>) {\n return <BaseSelect.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type SelectPositionerProps = ComponentPropsWithoutRef<typeof BaseSelect.Positioner>;\n\nexport const SelectPositioner = forwardRef<HTMLDivElement, SelectPositionerProps>(\n function SelectPositioner({ className, ...props }, ref) {\n return (\n <BaseSelect.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().positioner, className)}\n data-slot=\"select-positioner\"\n />\n );\n },\n);\n\nexport type SelectPopupProps = ComponentPropsWithoutRef<typeof BaseSelect.Popup>;\n\nexport const SelectPopup = forwardRef<HTMLDivElement, SelectPopupProps>(function SelectPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().popup, className)}\n data-slot=\"select-popup\"\n />\n );\n});\n\nexport type SelectListProps = ComponentPropsWithoutRef<typeof BaseSelect.List>;\n\nexport const SelectList = forwardRef<HTMLDivElement, SelectListProps>(function SelectList(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.List\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().list, className)}\n data-slot=\"select-list\"\n />\n );\n});\n\nexport type SelectItemProps = ComponentPropsWithoutRef<typeof BaseSelect.Item>;\n\nexport const SelectItem = forwardRef<HTMLElement, SelectItemProps>(function SelectItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Item\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().item, className)}\n data-slot=\"select-item\"\n />\n );\n});\n\nexport type SelectItemTextProps = ComponentPropsWithoutRef<typeof BaseSelect.ItemText>;\n\nexport const SelectItemText = forwardRef<HTMLDivElement, SelectItemTextProps>(\n function SelectItemText({ className, ...props }, ref) {\n return (\n <BaseSelect.ItemText\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().itemText, className)}\n data-slot=\"select-item-text\"\n />\n );\n },\n);\n\nexport type SelectItemIndicatorProps = ComponentPropsWithoutRef<typeof BaseSelect.ItemIndicator>;\n\nexport const SelectItemIndicator = forwardRef<HTMLSpanElement, SelectItemIndicatorProps>(\n function SelectItemIndicator({ children = \"✓\", className, ...props }, ref) {\n return (\n <BaseSelect.ItemIndicator\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={withRecipeClassName(useSelectStyles().itemIndicator, className)}\n data-slot=\"select-item-indicator\"\n >\n {children}\n </BaseSelect.ItemIndicator>\n );\n },\n);\n\nexport type SelectGroupProps = ComponentPropsWithoutRef<typeof BaseSelect.Group>;\n\nexport const SelectGroup = forwardRef<HTMLDivElement, SelectGroupProps>(function SelectGroup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Group\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().group, className)}\n data-slot=\"select-group\"\n />\n );\n});\n\nexport type SelectGroupLabelProps = ComponentPropsWithoutRef<typeof BaseSelect.GroupLabel>;\n\nexport const SelectGroupLabel = forwardRef<HTMLDivElement, SelectGroupLabelProps>(\n function SelectGroupLabel({ className, ...props }, ref) {\n return (\n <BaseSelect.GroupLabel\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().groupLabel, className)}\n data-slot=\"select-group-label\"\n />\n );\n },\n);\n\n/**\n * A visual separator for groups in a listbox. It is intentionally hidden from\n * assistive technology because ARIA listboxes may only contain options or\n * option groups, not semantic separators.\n */\nexport interface SelectSeparatorProps extends ComponentPropsWithoutRef<\"div\"> {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nexport const SelectSeparator = forwardRef<HTMLDivElement, SelectSeparatorProps>(\n function SelectSeparator({ className, orientation = \"horizontal\", ...props }, ref) {\n return (\n <div\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useSelectStyles().separator, className)}\n data-orientation={orientation}\n data-slot=\"select-separator\"\n />\n );\n },\n);\n\nexport interface SelectClearProps extends ComponentPropsWithoutRef<\"button\"> {\n children?: ReactNode;\n}\nexport const SelectClear = forwardRef<HTMLButtonElement, SelectClearProps>(function SelectClear(\n { children = \"×\", className, ...props },\n ref,\n) {\n const context = useContext(SelectAuxContext);\n const styles = useSelectStyles();\n return (\n <button\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Clear selection\"}\n className={cx(styles.clear, className)}\n data-slot=\"select-clear\"\n disabled={props.disabled || context?.disabled}\n onClick={(event) => {\n context?.clear();\n props.onClick?.(event);\n }}\n ref={ref}\n type=\"button\"\n >\n {children}\n </button>\n );\n});\n\nexport type SelectEmptyProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectEmpty = forwardRef<HTMLDivElement, SelectEmptyProps>(function SelectEmpty(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n className={cx(useSelectStyles().empty, className)}\n data-slot=\"select-empty\"\n ref={ref}\n />\n );\n});\nexport type SelectLoadingProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectLoading = forwardRef<HTMLDivElement, SelectLoadingProps>(function SelectLoading(\n { children = \"Loading…\", className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n aria-live=\"polite\"\n className={cx(useSelectStyles().loading, className)}\n data-slot=\"select-loading\"\n ref={ref}\n >\n {children}\n </div>\n );\n});\nexport type SelectStatusProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectStatus = forwardRef<HTMLDivElement, SelectStatusProps>(function SelectStatus(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n aria-live=\"polite\"\n className={cx(useSelectStyles().status, className)}\n data-slot=\"select-status\"\n ref={ref}\n />\n );\n});\n\nexport const Select = {\n Root: SelectRoot,\n Label: SelectLabel,\n Trigger: SelectTrigger,\n Value: SelectValue,\n Icon: SelectIcon,\n Portal: SelectPortal,\n Positioner: SelectPositioner,\n Popup: SelectPopup,\n List: SelectList,\n Item: SelectItem,\n ItemText: SelectItemText,\n ItemIndicator: SelectItemIndicator,\n Group: SelectGroup,\n GroupLabel: SelectGroupLabel,\n Separator: SelectSeparator,\n Clear: SelectClear,\n Empty: SelectEmpty,\n Loading: SelectLoading,\n Status: SelectStatus,\n};\n"],"mappings":";;;;;;;;;AAcA,MAAM,qBAAA,GAAA,MAAA,cAAA,CAA8C,IAAI;AACxD,MAAM,oBAAA,GAAA,MAAA,cAAA,CAAkF,IAAI;AAE5F,SAAS,kBAAkB;CACzB,OAAOA,eAAAA,OAAO,EAAE,OAAA,GAAA,MAAA,WAAA,CAAiB,iBAAiB,EAAE,CAAC;AACvD;AAeA,SAAgB,WAA0E,EACxF,cACA,WAAW,OACX,SAAS,UACT,UACA,eACA,OAAO,MACP,OAAO,iBACP,GAAG,SACgC;CACnC,MAAM,CAAC,mBAAmB,yBAAA,GAAA,MAAA,SAAA,CACxB,iBAAiB,WAAW,CAAC,IAAI,KACnC;CACA,MAAM,QAAQ,oBAAoB,KAAA,IAAY,oBAAoB;CAClE,MAAM,cAAc;EAClB,MAAM,YAAY,WAAW,CAAC,IAAI;EAClC,IAAI,oBAAoB,KAAA,GAAW,qBAAqB,SAAS;EACjE,gBAAgB,WAAoB,KAAA,CAAkB;CACxD;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAkB,UAAnB;EAA4B,OAAO;YACjC,iBAA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ET,CAAC;AAED,MAAa,gBAAA,GAAA,MAAA,WAAA,CAA6D,SAAS,aACjF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACJ,aAAU;EACV,WAAWA,WAAAA,GAAG,gBAAgB,CAAC,CAAC,QAAQ,SAAS;EACjD,aAAU;EACL;CACN,CAAA;AAEL,CAAC;AAED,MAAa,SAAS;CACpB,MAAM;CACN,OAAO;CACP,SAAS;CACT,OAAO;CACP,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,MAAM;CACN,MAAM;CACN,UAAU;CACV,eAAe;CACf,OAAO;CACP,YAAY;CACZ,WAAW;CACX,OAAO;CACP,OAAO;CACP,SAAS;CACT,QAAQ;AACV"}
@@ -27,7 +27,7 @@ type SelectIconProps = ComponentPropsWithoutRef<typeof Select.Icon>;
27
27
  /** A small chevron that rotates while the popup is open. */
28
28
  declare const SelectIcon: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectIconProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
29
29
  /** Preserves Base UI's optional portal container and mount controls. */
30
- declare const SelectPortal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
30
+ declare function SelectPortal(props: ComponentPropsWithoutRef<typeof Select.Portal>): import("react").JSX.Element;
31
31
  type SelectPositionerProps = ComponentPropsWithoutRef<typeof Select.Positioner>;
32
32
  declare const SelectPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
33
33
  type SelectPopupProps = ComponentPropsWithoutRef<typeof Select.Popup>;
@@ -69,7 +69,7 @@ declare const Select$1: {
69
69
  Trigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
70
70
  Value: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectValueProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
71
71
  Icon: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectIconProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
72
- Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
72
+ Portal: typeof SelectPortal;
73
73
  Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
74
74
  Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
75
75
  List: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectListProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -27,7 +27,7 @@ type SelectIconProps = ComponentPropsWithoutRef<typeof Select.Icon>;
27
27
  /** A small chevron that rotates while the popup is open. */
28
28
  declare const SelectIcon: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectIconProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
29
29
  /** Preserves Base UI's optional portal container and mount controls. */
30
- declare const SelectPortal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
30
+ declare function SelectPortal(props: ComponentPropsWithoutRef<typeof Select.Portal>): import("react").JSX.Element;
31
31
  type SelectPositionerProps = ComponentPropsWithoutRef<typeof Select.Positioner>;
32
32
  declare const SelectPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
33
33
  type SelectPopupProps = ComponentPropsWithoutRef<typeof Select.Popup>;
@@ -69,7 +69,7 @@ declare const Select$1: {
69
69
  Trigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
70
70
  Value: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectValueProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
71
71
  Icon: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectIconProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
72
- Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
72
+ Portal: typeof SelectPortal;
73
73
  Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
74
74
  Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
75
75
  List: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectListProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -2,6 +2,7 @@
2
2
  import { cx } from "../../styled-system/css/cx.js";
3
3
  import { withRecipeClassName } from "../base-ui.js";
4
4
  import { select } from "../../styled-system/recipes/select.js";
5
+ import { useThemePortalProps } from "../../theme/theme-scope.js";
5
6
  import { createContext, forwardRef, useContext, useState } from "react";
6
7
  import { jsx } from "react/jsx-runtime";
7
8
  import { Select } from "@base-ui/react/select";
@@ -80,7 +81,9 @@ const SelectIcon = forwardRef(function SelectIcon({ children = "⌄", className,
80
81
  });
81
82
  });
82
83
  /** Preserves Base UI's optional portal container and mount controls. */
83
- const SelectPortal = Select.Portal;
84
+ function SelectPortal(props) {
85
+ return /* @__PURE__ */ jsx(Select.Portal, { ...useThemePortalProps(props) });
86
+ }
84
87
  const SelectPositioner = forwardRef(function SelectPositioner({ className, ...props }, ref) {
85
88
  return /* @__PURE__ */ jsx(Select.Positioner, {
86
89
  ...props,
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","names":["SelectRoot","BaseSelect","Select"],"sources":["../../../src/components/select/select.tsx"],"sourcesContent":["\"use client\";\n\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { createContext, forwardRef, useContext, useState } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport type { SelectRoot as BaseSelectRoot } from \"@base-ui/react/select\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { select } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\nexport type SelectSize = \"sm\" | \"md\" | \"lg\";\n\nconst SelectSizeContext = createContext<SelectSize>(\"md\");\nconst SelectAuxContext = createContext<{ clear: () => void; disabled: boolean } | null>(null);\n\nfunction useSelectStyles() {\n return select({ size: useContext(SelectSizeContext) });\n}\n\n/**\n * Groups an accessible listbox select. Use `value`/`onValueChange` for a\n * controlled selection, or `defaultValue` for an uncontrolled selection.\n *\n * `size` is shared by all visual parts so the trigger stays aligned with the\n * library's `Input` component.\n */\nexport interface SelectRootProps<Value, Multiple extends boolean | undefined = false>\n extends BaseSelectRoot.Props<Value, Multiple> {\n size?: SelectSize;\n loading?: boolean;\n}\n\nexport function SelectRoot<Value = unknown, Multiple extends boolean | undefined = false>({\n defaultValue,\n disabled = false,\n loading: _loading,\n multiple,\n onValueChange,\n size = \"md\",\n value: controlledValue,\n ...props\n}: SelectRootProps<Value, Multiple>) {\n const [uncontrolledValue, setUncontrolledValue] = useState<unknown>(\n defaultValue ?? (multiple ? [] : null),\n );\n const value = controlledValue === undefined ? uncontrolledValue : controlledValue;\n const clear = () => {\n const nextValue = multiple ? [] : null;\n if (controlledValue === undefined) setUncontrolledValue(nextValue);\n onValueChange?.(nextValue as never, undefined as never);\n };\n return (\n <SelectSizeContext.Provider value={size}>\n <SelectAuxContext.Provider value={{ clear, disabled }}>\n <BaseSelect.Root\n {...props}\n disabled={disabled}\n defaultValue={undefined}\n multiple={multiple}\n onValueChange={(nextValue, details) => {\n if (controlledValue === undefined) setUncontrolledValue(nextValue);\n onValueChange?.(nextValue, details);\n }}\n value={value as SelectRootProps<Value, Multiple>[\"value\"]}\n />\n </SelectAuxContext.Provider>\n </SelectSizeContext.Provider>\n );\n}\n\nexport type SelectLabelProps = ComponentPropsWithoutRef<typeof BaseSelect.Label>;\n\n/** An accessible label that Base UI associates with the trigger automatically. */\nexport const SelectLabel = forwardRef<HTMLDivElement, SelectLabelProps>(function SelectLabel(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Label\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().label, className)}\n data-slot=\"select-label\"\n />\n );\n});\n\nexport type SelectTriggerProps = ComponentPropsWithoutRef<typeof BaseSelect.Trigger>;\n\n/** The button-shaped control that opens the select popup. */\nexport const SelectTrigger = forwardRef<HTMLButtonElement, SelectTriggerProps>(\n function SelectTrigger({ className, ...props }, ref) {\n return (\n <BaseSelect.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().trigger, className)}\n data-jaci-component=\"select\"\n data-slot=\"select-trigger\"\n />\n );\n },\n);\n\nexport type SelectValueProps = ComponentPropsWithoutRef<typeof BaseSelect.Value>;\n\n/** Renders the selected item's label, or its placeholder when empty. */\nexport const SelectValue = forwardRef<HTMLSpanElement, SelectValueProps>(function SelectValue(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Value\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().value, className)}\n data-slot=\"select-value\"\n />\n );\n});\n\nexport type SelectIconProps = ComponentPropsWithoutRef<typeof BaseSelect.Icon>;\n\n/** A small chevron that rotates while the popup is open. */\nexport const SelectIcon = forwardRef<HTMLSpanElement, SelectIconProps>(function SelectIcon(\n { children = \"⌄\", className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Icon\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={withRecipeClassName(useSelectStyles().icon, className)}\n data-slot=\"select-icon\"\n >\n {children}\n </BaseSelect.Icon>\n );\n});\n\n/** Preserves Base UI's optional portal container and mount controls. */\nexport const SelectPortal = BaseSelect.Portal;\n\nexport type SelectPositionerProps = ComponentPropsWithoutRef<typeof BaseSelect.Positioner>;\n\nexport const SelectPositioner = forwardRef<HTMLDivElement, SelectPositionerProps>(\n function SelectPositioner({ className, ...props }, ref) {\n return (\n <BaseSelect.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().positioner, className)}\n data-slot=\"select-positioner\"\n />\n );\n },\n);\n\nexport type SelectPopupProps = ComponentPropsWithoutRef<typeof BaseSelect.Popup>;\n\nexport const SelectPopup = forwardRef<HTMLDivElement, SelectPopupProps>(function SelectPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().popup, className)}\n data-slot=\"select-popup\"\n />\n );\n});\n\nexport type SelectListProps = ComponentPropsWithoutRef<typeof BaseSelect.List>;\n\nexport const SelectList = forwardRef<HTMLDivElement, SelectListProps>(function SelectList(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.List\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().list, className)}\n data-slot=\"select-list\"\n />\n );\n});\n\nexport type SelectItemProps = ComponentPropsWithoutRef<typeof BaseSelect.Item>;\n\nexport const SelectItem = forwardRef<HTMLElement, SelectItemProps>(function SelectItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Item\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().item, className)}\n data-slot=\"select-item\"\n />\n );\n});\n\nexport type SelectItemTextProps = ComponentPropsWithoutRef<typeof BaseSelect.ItemText>;\n\nexport const SelectItemText = forwardRef<HTMLDivElement, SelectItemTextProps>(\n function SelectItemText({ className, ...props }, ref) {\n return (\n <BaseSelect.ItemText\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().itemText, className)}\n data-slot=\"select-item-text\"\n />\n );\n },\n);\n\nexport type SelectItemIndicatorProps = ComponentPropsWithoutRef<typeof BaseSelect.ItemIndicator>;\n\nexport const SelectItemIndicator = forwardRef<HTMLSpanElement, SelectItemIndicatorProps>(\n function SelectItemIndicator({ children = \"✓\", className, ...props }, ref) {\n return (\n <BaseSelect.ItemIndicator\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={withRecipeClassName(useSelectStyles().itemIndicator, className)}\n data-slot=\"select-item-indicator\"\n >\n {children}\n </BaseSelect.ItemIndicator>\n );\n },\n);\n\nexport type SelectGroupProps = ComponentPropsWithoutRef<typeof BaseSelect.Group>;\n\nexport const SelectGroup = forwardRef<HTMLDivElement, SelectGroupProps>(function SelectGroup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Group\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().group, className)}\n data-slot=\"select-group\"\n />\n );\n});\n\nexport type SelectGroupLabelProps = ComponentPropsWithoutRef<typeof BaseSelect.GroupLabel>;\n\nexport const SelectGroupLabel = forwardRef<HTMLDivElement, SelectGroupLabelProps>(\n function SelectGroupLabel({ className, ...props }, ref) {\n return (\n <BaseSelect.GroupLabel\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().groupLabel, className)}\n data-slot=\"select-group-label\"\n />\n );\n },\n);\n\n/**\n * A visual separator for groups in a listbox. It is intentionally hidden from\n * assistive technology because ARIA listboxes may only contain options or\n * option groups, not semantic separators.\n */\nexport interface SelectSeparatorProps extends ComponentPropsWithoutRef<\"div\"> {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nexport const SelectSeparator = forwardRef<HTMLDivElement, SelectSeparatorProps>(\n function SelectSeparator({ className, orientation = \"horizontal\", ...props }, ref) {\n return (\n <div\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useSelectStyles().separator, className)}\n data-orientation={orientation}\n data-slot=\"select-separator\"\n />\n );\n },\n);\n\nexport interface SelectClearProps extends ComponentPropsWithoutRef<\"button\"> {\n children?: ReactNode;\n}\nexport const SelectClear = forwardRef<HTMLButtonElement, SelectClearProps>(function SelectClear(\n { children = \"×\", className, ...props },\n ref,\n) {\n const context = useContext(SelectAuxContext);\n const styles = useSelectStyles();\n return (\n <button\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Clear selection\"}\n className={cx(styles.clear, className)}\n data-slot=\"select-clear\"\n disabled={props.disabled || context?.disabled}\n onClick={(event) => {\n context?.clear();\n props.onClick?.(event);\n }}\n ref={ref}\n type=\"button\"\n >\n {children}\n </button>\n );\n});\n\nexport type SelectEmptyProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectEmpty = forwardRef<HTMLDivElement, SelectEmptyProps>(function SelectEmpty(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n className={cx(useSelectStyles().empty, className)}\n data-slot=\"select-empty\"\n ref={ref}\n />\n );\n});\nexport type SelectLoadingProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectLoading = forwardRef<HTMLDivElement, SelectLoadingProps>(function SelectLoading(\n { children = \"Loading…\", className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n aria-live=\"polite\"\n className={cx(useSelectStyles().loading, className)}\n data-slot=\"select-loading\"\n ref={ref}\n >\n {children}\n </div>\n );\n});\nexport type SelectStatusProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectStatus = forwardRef<HTMLDivElement, SelectStatusProps>(function SelectStatus(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n aria-live=\"polite\"\n className={cx(useSelectStyles().status, className)}\n data-slot=\"select-status\"\n ref={ref}\n />\n );\n});\n\nexport const Select = {\n Root: SelectRoot,\n Label: SelectLabel,\n Trigger: SelectTrigger,\n Value: SelectValue,\n Icon: SelectIcon,\n Portal: SelectPortal,\n Positioner: SelectPositioner,\n Popup: SelectPopup,\n List: SelectList,\n Item: SelectItem,\n ItemText: SelectItemText,\n ItemIndicator: SelectItemIndicator,\n Group: SelectGroup,\n GroupLabel: SelectGroupLabel,\n Separator: SelectSeparator,\n Clear: SelectClear,\n Empty: SelectEmpty,\n Loading: SelectLoading,\n Status: SelectStatus,\n};\n"],"mappings":";;;;;;;;AAaA,MAAM,oBAAoB,cAA0B,IAAI;AACxD,MAAM,mBAAmB,cAA+D,IAAI;AAE5F,SAAS,kBAAkB;CACzB,OAAO,OAAO,EAAE,MAAM,WAAW,iBAAiB,EAAE,CAAC;AACvD;AAeA,SAAgBA,aAA0E,EACxF,cACA,WAAW,OACX,SAAS,UACT,UACA,eACA,OAAO,MACP,OAAO,iBACP,GAAG,SACgC;CACnC,MAAM,CAAC,mBAAmB,wBAAwB,SAChD,iBAAiB,WAAW,CAAC,IAAI,KACnC;CACA,MAAM,QAAQ,oBAAoB,KAAA,IAAY,oBAAoB;CAClE,MAAM,cAAc;EAClB,MAAM,YAAY,WAAW,CAAC,IAAI;EAClC,IAAI,oBAAoB,KAAA,GAAW,qBAAqB,SAAS;EACjE,gBAAgB,WAAoB,KAAA,CAAkB;CACxD;CACA,OACE,oBAAC,kBAAkB,UAAnB;EAA4B,OAAO;YACjC,oBAAC,iBAAiB,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EACJ,aAAU;EACV,WAAW,GAAG,gBAAgB,CAAC,CAAC,SAAS,SAAS;EAClD,aAAU;EACL;EAEJ;CACE,CAAA;AAET,CAAC;AAED,MAAa,eAAe,WAA8C,SAAS,aACjF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACJ,aAAU;EACV,WAAW,GAAG,gBAAgB,CAAC,CAAC,QAAQ,SAAS;EACjD,aAAU;EACL;CACN,CAAA;AAEL,CAAC;AAED,MAAaC,WAAS;CACpB,MAAMF;CACN,OAAO;CACP,SAAS;CACT,OAAO;CACP,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,MAAM;CACN,MAAM;CACN,UAAU;CACV,eAAe;CACf,OAAO;CACP,YAAY;CACZ,WAAW;CACX,OAAO;CACP,OAAO;CACP,SAAS;CACT,QAAQ;AACV"}
1
+ {"version":3,"file":"select.js","names":["SelectRoot","BaseSelect","Select"],"sources":["../../../src/components/select/select.tsx"],"sourcesContent":["\"use client\";\n\nimport { Select as BaseSelect } from \"@base-ui/react/select\";\nimport { createContext, forwardRef, useContext, useState } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport type { SelectRoot as BaseSelectRoot } from \"@base-ui/react/select\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { select } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\nexport type SelectSize = \"sm\" | \"md\" | \"lg\";\n\nconst SelectSizeContext = createContext<SelectSize>(\"md\");\nconst SelectAuxContext = createContext<{ clear: () => void; disabled: boolean } | null>(null);\n\nfunction useSelectStyles() {\n return select({ size: useContext(SelectSizeContext) });\n}\n\n/**\n * Groups an accessible listbox select. Use `value`/`onValueChange` for a\n * controlled selection, or `defaultValue` for an uncontrolled selection.\n *\n * `size` is shared by all visual parts so the trigger stays aligned with the\n * library's `Input` component.\n */\nexport interface SelectRootProps<Value, Multiple extends boolean | undefined = false>\n extends BaseSelectRoot.Props<Value, Multiple> {\n size?: SelectSize;\n loading?: boolean;\n}\n\nexport function SelectRoot<Value = unknown, Multiple extends boolean | undefined = false>({\n defaultValue,\n disabled = false,\n loading: _loading,\n multiple,\n onValueChange,\n size = \"md\",\n value: controlledValue,\n ...props\n}: SelectRootProps<Value, Multiple>) {\n const [uncontrolledValue, setUncontrolledValue] = useState<unknown>(\n defaultValue ?? (multiple ? [] : null),\n );\n const value = controlledValue === undefined ? uncontrolledValue : controlledValue;\n const clear = () => {\n const nextValue = multiple ? [] : null;\n if (controlledValue === undefined) setUncontrolledValue(nextValue);\n onValueChange?.(nextValue as never, undefined as never);\n };\n return (\n <SelectSizeContext.Provider value={size}>\n <SelectAuxContext.Provider value={{ clear, disabled }}>\n <BaseSelect.Root\n {...props}\n disabled={disabled}\n defaultValue={undefined}\n multiple={multiple}\n onValueChange={(nextValue, details) => {\n if (controlledValue === undefined) setUncontrolledValue(nextValue);\n onValueChange?.(nextValue, details);\n }}\n value={value as SelectRootProps<Value, Multiple>[\"value\"]}\n />\n </SelectAuxContext.Provider>\n </SelectSizeContext.Provider>\n );\n}\n\nexport type SelectLabelProps = ComponentPropsWithoutRef<typeof BaseSelect.Label>;\n\n/** An accessible label that Base UI associates with the trigger automatically. */\nexport const SelectLabel = forwardRef<HTMLDivElement, SelectLabelProps>(function SelectLabel(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Label\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().label, className)}\n data-slot=\"select-label\"\n />\n );\n});\n\nexport type SelectTriggerProps = ComponentPropsWithoutRef<typeof BaseSelect.Trigger>;\n\n/** The button-shaped control that opens the select popup. */\nexport const SelectTrigger = forwardRef<HTMLButtonElement, SelectTriggerProps>(\n function SelectTrigger({ className, ...props }, ref) {\n return (\n <BaseSelect.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().trigger, className)}\n data-jaci-component=\"select\"\n data-slot=\"select-trigger\"\n />\n );\n },\n);\n\nexport type SelectValueProps = ComponentPropsWithoutRef<typeof BaseSelect.Value>;\n\n/** Renders the selected item's label, or its placeholder when empty. */\nexport const SelectValue = forwardRef<HTMLSpanElement, SelectValueProps>(function SelectValue(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Value\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().value, className)}\n data-slot=\"select-value\"\n />\n );\n});\n\nexport type SelectIconProps = ComponentPropsWithoutRef<typeof BaseSelect.Icon>;\n\n/** A small chevron that rotates while the popup is open. */\nexport const SelectIcon = forwardRef<HTMLSpanElement, SelectIconProps>(function SelectIcon(\n { children = \"⌄\", className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Icon\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={withRecipeClassName(useSelectStyles().icon, className)}\n data-slot=\"select-icon\"\n >\n {children}\n </BaseSelect.Icon>\n );\n});\n\n/** Preserves Base UI's optional portal container and mount controls. */\nexport function SelectPortal(props: ComponentPropsWithoutRef<typeof BaseSelect.Portal>) {\n return <BaseSelect.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type SelectPositionerProps = ComponentPropsWithoutRef<typeof BaseSelect.Positioner>;\n\nexport const SelectPositioner = forwardRef<HTMLDivElement, SelectPositionerProps>(\n function SelectPositioner({ className, ...props }, ref) {\n return (\n <BaseSelect.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().positioner, className)}\n data-slot=\"select-positioner\"\n />\n );\n },\n);\n\nexport type SelectPopupProps = ComponentPropsWithoutRef<typeof BaseSelect.Popup>;\n\nexport const SelectPopup = forwardRef<HTMLDivElement, SelectPopupProps>(function SelectPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().popup, className)}\n data-slot=\"select-popup\"\n />\n );\n});\n\nexport type SelectListProps = ComponentPropsWithoutRef<typeof BaseSelect.List>;\n\nexport const SelectList = forwardRef<HTMLDivElement, SelectListProps>(function SelectList(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.List\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().list, className)}\n data-slot=\"select-list\"\n />\n );\n});\n\nexport type SelectItemProps = ComponentPropsWithoutRef<typeof BaseSelect.Item>;\n\nexport const SelectItem = forwardRef<HTMLElement, SelectItemProps>(function SelectItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Item\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().item, className)}\n data-slot=\"select-item\"\n />\n );\n});\n\nexport type SelectItemTextProps = ComponentPropsWithoutRef<typeof BaseSelect.ItemText>;\n\nexport const SelectItemText = forwardRef<HTMLDivElement, SelectItemTextProps>(\n function SelectItemText({ className, ...props }, ref) {\n return (\n <BaseSelect.ItemText\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().itemText, className)}\n data-slot=\"select-item-text\"\n />\n );\n },\n);\n\nexport type SelectItemIndicatorProps = ComponentPropsWithoutRef<typeof BaseSelect.ItemIndicator>;\n\nexport const SelectItemIndicator = forwardRef<HTMLSpanElement, SelectItemIndicatorProps>(\n function SelectItemIndicator({ children = \"✓\", className, ...props }, ref) {\n return (\n <BaseSelect.ItemIndicator\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={withRecipeClassName(useSelectStyles().itemIndicator, className)}\n data-slot=\"select-item-indicator\"\n >\n {children}\n </BaseSelect.ItemIndicator>\n );\n },\n);\n\nexport type SelectGroupProps = ComponentPropsWithoutRef<typeof BaseSelect.Group>;\n\nexport const SelectGroup = forwardRef<HTMLDivElement, SelectGroupProps>(function SelectGroup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseSelect.Group\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().group, className)}\n data-slot=\"select-group\"\n />\n );\n});\n\nexport type SelectGroupLabelProps = ComponentPropsWithoutRef<typeof BaseSelect.GroupLabel>;\n\nexport const SelectGroupLabel = forwardRef<HTMLDivElement, SelectGroupLabelProps>(\n function SelectGroupLabel({ className, ...props }, ref) {\n return (\n <BaseSelect.GroupLabel\n {...props}\n ref={ref}\n className={withRecipeClassName(useSelectStyles().groupLabel, className)}\n data-slot=\"select-group-label\"\n />\n );\n },\n);\n\n/**\n * A visual separator for groups in a listbox. It is intentionally hidden from\n * assistive technology because ARIA listboxes may only contain options or\n * option groups, not semantic separators.\n */\nexport interface SelectSeparatorProps extends ComponentPropsWithoutRef<\"div\"> {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nexport const SelectSeparator = forwardRef<HTMLDivElement, SelectSeparatorProps>(\n function SelectSeparator({ className, orientation = \"horizontal\", ...props }, ref) {\n return (\n <div\n {...props}\n aria-hidden=\"true\"\n ref={ref}\n className={cx(useSelectStyles().separator, className)}\n data-orientation={orientation}\n data-slot=\"select-separator\"\n />\n );\n },\n);\n\nexport interface SelectClearProps extends ComponentPropsWithoutRef<\"button\"> {\n children?: ReactNode;\n}\nexport const SelectClear = forwardRef<HTMLButtonElement, SelectClearProps>(function SelectClear(\n { children = \"×\", className, ...props },\n ref,\n) {\n const context = useContext(SelectAuxContext);\n const styles = useSelectStyles();\n return (\n <button\n {...props}\n aria-label={props[\"aria-label\"] ?? \"Clear selection\"}\n className={cx(styles.clear, className)}\n data-slot=\"select-clear\"\n disabled={props.disabled || context?.disabled}\n onClick={(event) => {\n context?.clear();\n props.onClick?.(event);\n }}\n ref={ref}\n type=\"button\"\n >\n {children}\n </button>\n );\n});\n\nexport type SelectEmptyProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectEmpty = forwardRef<HTMLDivElement, SelectEmptyProps>(function SelectEmpty(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n className={cx(useSelectStyles().empty, className)}\n data-slot=\"select-empty\"\n ref={ref}\n />\n );\n});\nexport type SelectLoadingProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectLoading = forwardRef<HTMLDivElement, SelectLoadingProps>(function SelectLoading(\n { children = \"Loading…\", className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n aria-live=\"polite\"\n className={cx(useSelectStyles().loading, className)}\n data-slot=\"select-loading\"\n ref={ref}\n >\n {children}\n </div>\n );\n});\nexport type SelectStatusProps = ComponentPropsWithoutRef<\"div\">;\nexport const SelectStatus = forwardRef<HTMLDivElement, SelectStatusProps>(function SelectStatus(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n aria-live=\"polite\"\n className={cx(useSelectStyles().status, className)}\n data-slot=\"select-status\"\n ref={ref}\n />\n );\n});\n\nexport const Select = {\n Root: SelectRoot,\n Label: SelectLabel,\n Trigger: SelectTrigger,\n Value: SelectValue,\n Icon: SelectIcon,\n Portal: SelectPortal,\n Positioner: SelectPositioner,\n Popup: SelectPopup,\n List: SelectList,\n Item: SelectItem,\n ItemText: SelectItemText,\n ItemIndicator: SelectItemIndicator,\n Group: SelectGroup,\n GroupLabel: SelectGroupLabel,\n Separator: SelectSeparator,\n Clear: SelectClear,\n Empty: SelectEmpty,\n Loading: SelectLoading,\n Status: SelectStatus,\n};\n"],"mappings":";;;;;;;;;AAcA,MAAM,oBAAoB,cAA0B,IAAI;AACxD,MAAM,mBAAmB,cAA+D,IAAI;AAE5F,SAAS,kBAAkB;CACzB,OAAO,OAAO,EAAE,MAAM,WAAW,iBAAiB,EAAE,CAAC;AACvD;AAeA,SAAgBA,aAA0E,EACxF,cACA,WAAW,OACX,SAAS,UACT,UACA,eACA,OAAO,MACP,OAAO,iBACP,GAAG,SACgC;CACnC,MAAM,CAAC,mBAAmB,wBAAwB,SAChD,iBAAiB,WAAW,CAAC,IAAI,KACnC;CACA,MAAM,QAAQ,oBAAoB,KAAA,IAAY,oBAAoB;CAClE,MAAM,cAAc;EAClB,MAAM,YAAY,WAAW,CAAC,IAAI;EAClC,IAAI,oBAAoB,KAAA,GAAW,qBAAqB,SAAS;EACjE,gBAAgB,WAAoB,KAAA,CAAkB;CACxD;CACA,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