@kushagradhawan/kookie-ui 0.1.124 → 0.1.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.css +93 -0
- package/dist/cjs/components/_internal/base-menu.props.d.ts +52 -1
- package/dist/cjs/components/_internal/base-menu.props.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-menu.props.js +1 -1
- package/dist/cjs/components/_internal/base-menu.props.js.map +3 -3
- package/dist/cjs/components/_internal/dropdown-menu-drill-down.d.ts +60 -0
- package/dist/cjs/components/_internal/dropdown-menu-drill-down.d.ts.map +1 -0
- package/dist/cjs/components/_internal/dropdown-menu-drill-down.js +2 -0
- package/dist/cjs/components/_internal/dropdown-menu-drill-down.js.map +7 -0
- package/dist/cjs/components/combobox.d.ts.map +1 -1
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +3 -3
- package/dist/cjs/components/dropdown-menu.d.ts +28 -7
- package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +3 -3
- package/dist/cjs/components/dropdown-menu.props.d.ts +1 -1
- package/dist/cjs/components/dropdown-menu.props.d.ts.map +1 -1
- package/dist/cjs/components/dropdown-menu.props.js +1 -1
- package/dist/cjs/components/dropdown-menu.props.js.map +2 -2
- package/dist/cjs/components/icons.d.ts +2 -1
- package/dist/cjs/components/icons.d.ts.map +1 -1
- package/dist/cjs/components/icons.js +1 -1
- package/dist/cjs/components/icons.js.map +3 -3
- package/dist/cjs/components/schemas/shell.schema.d.ts +2 -2
- package/dist/esm/components/_internal/base-menu.props.d.ts +52 -1
- package/dist/esm/components/_internal/base-menu.props.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-menu.props.js +1 -1
- package/dist/esm/components/_internal/base-menu.props.js.map +3 -3
- package/dist/esm/components/_internal/dropdown-menu-drill-down.d.ts +60 -0
- package/dist/esm/components/_internal/dropdown-menu-drill-down.d.ts.map +1 -0
- package/dist/esm/components/_internal/dropdown-menu-drill-down.js +2 -0
- package/dist/esm/components/_internal/dropdown-menu-drill-down.js.map +7 -0
- package/dist/esm/components/combobox.d.ts.map +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/combobox.js.map +3 -3
- package/dist/esm/components/dropdown-menu.d.ts +28 -7
- package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/dropdown-menu.js.map +3 -3
- package/dist/esm/components/dropdown-menu.props.d.ts +1 -1
- package/dist/esm/components/dropdown-menu.props.d.ts.map +1 -1
- package/dist/esm/components/dropdown-menu.props.js +1 -1
- package/dist/esm/components/dropdown-menu.props.js.map +3 -3
- package/dist/esm/components/icons.d.ts +2 -1
- package/dist/esm/components/icons.d.ts.map +1 -1
- package/dist/esm/components/icons.js +1 -1
- package/dist/esm/components/icons.js.map +3 -3
- package/dist/esm/components/schemas/shell.schema.d.ts +2 -2
- package/package.json +1 -1
- package/schemas/base-button.json +1 -1
- package/schemas/button.json +1 -1
- package/schemas/icon-button.json +1 -1
- package/schemas/index.json +6 -6
- package/schemas/toggle-button.json +1 -1
- package/schemas/toggle-icon-button.json +1 -1
- package/src/components/_internal/base-menu.props.ts +31 -1
- package/src/components/_internal/dropdown-menu-drill-down.tsx +242 -0
- package/src/components/combobox.tsx +176 -80
- package/src/components/dropdown-menu.css +119 -0
- package/src/components/dropdown-menu.props.tsx +2 -0
- package/src/components/dropdown-menu.tsx +217 -27
- package/src/components/icons.tsx +14 -1
- package/styles.css +93 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/combobox.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\n/**\n * Combobox is a compound component built on top of Popover and cmdk's Command list.\n * It mirrors the Select API while adding search-first behaviors including filtering,\n * async-friendly state management, and design token support for trigger, content,\n * and input variants.\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useControllableState } from 'radix-ui/internal';\nimport { Command as CommandPrimitive } from 'cmdk';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs } from './combobox.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport * as Popover from './popover.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Slottable } from './slot.js';\nimport { textFieldRootPropDefs } from './text-field.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextFieldVariant = (typeof textFieldRootPropDefs.variant.values)[number];\ntype ComboboxValue = string | null;\n/**\n * Custom filter function for Combobox search.\n * @param value - The item's value being tested\n * @param search - The current search string\n * @param keywords - Optional keywords associated with the item\n * @returns A number between 0 and 1 where 0 means no match and 1 means exact match.\n * Fractional values indicate relevance for sorting.\n */\ntype CommandFilter = (value: string, search: string, keywords?: string[]) => number;\n\n/**\n * Additional props supported by Combobox.Root beyond the Radix Popover surface.\n */\ntype ComboboxRootOwnProps = GetPropDefTypes<typeof comboboxRootPropDefs> & {\n value?: ComboboxValue;\n defaultValue?: ComboboxValue;\n onValueChange?: (value: ComboboxValue) => void;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n searchValue?: string;\n defaultSearchValue?: string;\n onSearchValueChange?: (value: string) => void;\n filter?: CommandFilter;\n shouldFilter?: boolean;\n loop?: boolean;\n disabled?: boolean;\n /**\n * Whether to reset the search value when an option is selected.\n * @default true\n */\n resetSearchOnSelect?: boolean;\n /**\n * Accent color for the combobox trigger and content.\n */\n color?: (typeof comboboxTriggerPropDefs.color.values)[number];\n /**\n * Display value shown in the trigger. This is the recommended approach for\n * best performance as it avoids needing to mount items to register labels.\n * \n * Can be either:\n * - A string: Static display value\n * - A function: `(value: string | null) => string | undefined` - Called with current value\n * \n * Use this when:\n * - You have the selected item's label available (e.g., from your data source)\n * - Items haven't mounted yet (e.g., on initial render with a defaultValue)\n * - You want optimal performance with forceMount={false} (default)\n * \n * @example\n * // Static string\n * <Combobox.Root value=\"usa\" displayValue=\"United States\">\n * \n * // Function (recommended for dynamic data)\n * <Combobox.Root \n * value={selectedCountry}\n * displayValue={(value) => countries.find(c => c.code === value)?.name}\n * >\n * \n * If not provided, falls back to the label registered by the selected item\n * (requires forceMount={true}), then to the raw value.\n */\n displayValue?: string | ((value: ComboboxValue) => string | undefined);\n};\n\n/**\n * Internal context shared by all sub-components to avoid prop drilling.\n */\ninterface ComboboxContextValue extends ComboboxRootOwnProps {\n open: boolean;\n setOpen: (open: boolean) => void;\n value: ComboboxValue;\n setValue: (value: ComboboxValue) => void;\n searchValue: string;\n setSearchValue: (value: string) => void;\n /** Label registered by the selected item */\n selectedLabel?: string;\n /** Resolved display value (already computed from string or function) */\n resolvedDisplayValue?: string;\n registerItemLabel: (value: string, label: string) => void;\n unregisterItemLabel: (value: string) => void;\n handleSelect: (value: string) => void;\n listboxId: string;\n activeDescendantId: string | undefined;\n setActiveDescendantId: (id: string | undefined) => void;\n}\n\nconst ComboboxContext = React.createContext<ComboboxContextValue | null>(null);\n\n/**\n * Utility hook that ensures consumers are wrapped in Combobox.Root.\n */\nconst useComboboxContext = (caller: string) => {\n const ctx = React.useContext(ComboboxContext);\n if (!ctx) {\n throw new Error(`${caller} must be used within Combobox.Root`);\n }\n return ctx;\n};\n\n/**\n * Context for values that are only available inside Content (e.g., variant, color)\n * so that Input/Item can style themselves consistently.\n */\nconst ComboboxContentContext = React.createContext<{ variant: 'solid' | 'soft'; size?: string; color?: string; material?: string; highContrast?: boolean } | null>(null);\nconst useComboboxContentContext = () => {\n const ctx = React.useContext(ComboboxContentContext);\n return ctx; // Optional - Input might not always be in Content\n};\n\ntype PopoverRootProps = React.ComponentPropsWithoutRef<typeof Popover.Root>;\ninterface ComboboxRootProps extends PopoverRootProps, ComboboxRootOwnProps {}\n/**\n * Root component that wires up Popover behavior, controllable state,\n * and shared context for trigger/content/input sub-components.\n */\nconst ComboboxRoot: React.FC<ComboboxRootProps> = (props) => {\n const {\n children,\n size = comboboxRootPropDefs.size.default,\n highContrast = comboboxRootPropDefs.highContrast.default,\n value: valueProp,\n defaultValue = null,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n placeholder = 'Select an option',\n searchPlaceholder = 'Search options...',\n searchValue: searchValueProp,\n defaultSearchValue = '',\n onSearchValueChange,\n filter,\n shouldFilter = true,\n loop = true,\n disabled,\n resetSearchOnSelect = true,\n color,\n displayValue: displayValueProp,\n ...rootProps\n } = props;\n\n // Generate stable IDs for accessibility\n const generatedId = React.useId();\n const listboxId = `combobox-listbox-${generatedId}`;\n const [activeDescendantId, setActiveDescendantId] = React.useState<string | undefined>(undefined);\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n const [value, setValue] = useControllableState<ComboboxValue>({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const [searchValue, setSearchValue] = useControllableState<string>({\n prop: searchValueProp,\n defaultProp: defaultSearchValue,\n onChange: onSearchValueChange,\n });\n\n const labelMapRef = React.useRef(new Map<string, string>());\n // Track the selected label in state so it triggers re-renders when items register\n const [selectedLabel, setSelectedLabel] = React.useState<string | undefined>(undefined);\n\n const registerItemLabel = React.useCallback((itemValue: string, label: string) => {\n labelMapRef.current.set(itemValue, label);\n // If this item matches the current value, update the selected label\n if (itemValue === value) {\n setSelectedLabel(label);\n }\n }, [value]);\n\n const unregisterItemLabel = React.useCallback((itemValue: string) => {\n labelMapRef.current.delete(itemValue);\n }, []);\n\n // Update selected label when value changes\n React.useEffect(() => {\n if (value != null) {\n const label = labelMapRef.current.get(value);\n setSelectedLabel(label);\n } else {\n setSelectedLabel(undefined);\n }\n }, [value]);\n\n const handleSelect = React.useCallback(\n (nextValue: string) => {\n setValue(nextValue);\n setOpen(false);\n if (resetSearchOnSelect) {\n setSearchValue('');\n }\n },\n [setOpen, setSearchValue, setValue, resetSearchOnSelect],\n );\n\n // Development mode warning for value not matching any registered item\n React.useEffect(() => {\n if (process.env.NODE_ENV !== 'production' && value != null && !labelMapRef.current.has(value)) {\n // Defer the check to allow items to register first\n const timeoutId = setTimeout(() => {\n if (value != null && !labelMapRef.current.has(value)) {\n console.warn(\n `[Combobox] The value \"${value}\" does not match any Combobox.Item. ` +\n `Make sure each Item has a matching value prop.`,\n );\n }\n }, 0);\n return () => clearTimeout(timeoutId);\n }\n }, [value]);\n\n // Resolve displayValue: compute if function, use directly if string\n const resolvedDisplayValue = React.useMemo(() => {\n if (displayValueProp == null) return undefined;\n if (typeof displayValueProp === 'function') {\n return displayValueProp(value);\n }\n return displayValueProp;\n }, [displayValueProp, value]);\n\n const contextValue = React.useMemo<ComboboxContextValue>(\n () => ({\n size,\n highContrast,\n placeholder,\n searchPlaceholder,\n filter,\n shouldFilter,\n loop,\n disabled,\n resetSearchOnSelect,\n color,\n resolvedDisplayValue,\n open,\n setOpen,\n value,\n setValue,\n searchValue,\n setSearchValue,\n selectedLabel,\n registerItemLabel,\n unregisterItemLabel,\n handleSelect,\n listboxId,\n activeDescendantId,\n setActiveDescendantId,\n }),\n [\n size,\n highContrast,\n placeholder,\n searchPlaceholder,\n filter,\n shouldFilter,\n loop,\n disabled,\n resetSearchOnSelect,\n color,\n resolvedDisplayValue,\n open,\n setOpen,\n value,\n setValue,\n searchValue,\n setSearchValue,\n selectedLabel,\n registerItemLabel,\n unregisterItemLabel,\n handleSelect,\n listboxId,\n activeDescendantId,\n setActiveDescendantId,\n ],\n );\n\n return (\n <ComboboxContext.Provider value={contextValue}>\n <Popover.Root open={open} onOpenChange={setOpen} {...rootProps}>\n {children}\n </Popover.Root>\n </ComboboxContext.Provider>\n );\n};\nComboboxRoot.displayName = 'Combobox.Root';\n\ntype ComboboxTriggerElement = HTMLButtonElement;\ntype ComboboxTriggerOwnProps = GetPropDefTypes<typeof comboboxTriggerPropDefs>;\ntype NativeTriggerProps = Omit<React.ComponentPropsWithoutRef<'button'>, 'color'>;\ninterface ComboboxTriggerProps extends NativeTriggerProps, MarginProps, ComboboxTriggerOwnProps {}\n/**\n * Trigger behaves like a styled button that opens the Popover,\n * syncing size/highContrast from Root while exposing select-like states.\n */\nconst ComboboxTrigger = React.forwardRef<ComboboxTriggerElement, ComboboxTriggerProps>((props, forwardedRef) => {\n const context = useComboboxContext('Combobox.Trigger');\n const { children, className, placeholder, disabled, readOnly, error, loading, color, radius, ...triggerProps } = extractProps(\n { size: context.size, highContrast: context.highContrast, ...props },\n { size: comboboxRootPropDefs.size, highContrast: comboboxRootPropDefs.highContrast },\n comboboxTriggerPropDefs,\n marginPropDefs,\n );\n\n // Extract material and panelBackground separately since they need to be passed as data attributes\n const { material, panelBackground } = props;\n\n const isDisabled = disabled ?? context.disabled;\n\n // Use color from props or fall back to context color\n const resolvedColor = color ?? context.color;\n\n // Comprehensive ARIA attributes for combobox pattern (WAI-ARIA 1.2)\n const ariaProps = React.useMemo(\n () => ({\n role: 'combobox' as const,\n 'aria-expanded': context.open,\n 'aria-disabled': isDisabled || undefined,\n 'aria-haspopup': 'listbox' as const,\n 'aria-controls': context.open ? context.listboxId : undefined,\n 'aria-activedescendant': context.open ? context.activeDescendantId : undefined,\n 'aria-autocomplete': 'list' as const,\n }),\n [context.open, context.listboxId, context.activeDescendantId, isDisabled],\n );\n\n const defaultContent = (\n <>\n <span className=\"rt-SelectTriggerInner\">\n <ComboboxValue placeholder={placeholder ?? context.placeholder} />\n </span>\n {loading ? (\n <div className=\"rt-SelectIcon rt-SelectLoadingIcon\" aria-hidden=\"true\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle cx=\"8\" cy=\"8\" r=\"6.5\" stroke=\"currentColor\" strokeWidth=\"1\" strokeLinecap=\"round\" strokeDasharray=\"6 34\" strokeDashoffset=\"0\" className=\"rt-SelectLoadingSpinner\" />\n </svg>\n </div>\n ) : (\n <ChevronDownIcon className=\"rt-SelectIcon\" />\n )}\n </>\n );\n\n const { type: buttonType, ...restTriggerProps } = triggerProps;\n const resolvedButtonType = buttonType ?? 'button';\n\n const triggerChild = (\n <button\n data-accent-color={resolvedColor}\n data-radius={radius}\n data-panel-background={panelBackground}\n data-material={material}\n data-error={error}\n data-loading={loading}\n data-disabled={isDisabled || undefined}\n data-read-only={readOnly || undefined}\n {...restTriggerProps}\n {...ariaProps}\n type={resolvedButtonType}\n disabled={isDisabled}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-SelectTrigger', 'rt-ComboboxTrigger', className)}\n >\n {children ? requireReactElement(children) : defaultContent}\n </button>\n );\n\n return <Popover.Trigger disabled={isDisabled}>{triggerChild}</Popover.Trigger>;\n});\nComboboxTrigger.displayName = 'Combobox.Trigger';\n\ntype ComboboxValueElement = HTMLSpanElement;\ninterface ComboboxValueProps extends React.ComponentPropsWithoutRef<'span'> {\n placeholder?: string;\n}\n/**\n * Value mirrors Select.Value by showing the selected item's label\n * or falling back to placeholder text supplied by the consumer or context.\n * \n * Priority: resolvedDisplayValue (explicit) > selectedLabel (from items) > raw value > children > placeholder\n */\nconst ComboboxValue = React.forwardRef<ComboboxValueElement, ComboboxValueProps>(({ placeholder, children, className, ...valueProps }, forwardedRef) => {\n const context = useComboboxContext('Combobox.Value');\n // Priority: explicit displayValue (resolved) > registered label > raw value\n const displayValue = context.resolvedDisplayValue ?? context.selectedLabel ?? context.value ?? undefined;\n const fallback = placeholder ?? context.placeholder;\n return (\n <span {...valueProps} ref={forwardedRef} className={classNames('rt-ComboboxValue', className)}>\n {displayValue ?? children ?? fallback}\n </span>\n );\n});\nComboboxValue.displayName = 'Combobox.Value';\n\ntype ComboboxContentElement = React.ElementRef<typeof Popover.Content>;\ntype ComboboxContentOwnProps = GetPropDefTypes<typeof comboboxContentPropDefs> & {\n container?: React.ComponentPropsWithoutRef<typeof Popover.Content>['container'];\n};\ninterface ComboboxContentProps extends Omit<ComponentPropsWithout<typeof Popover.Content, RemovedProps>, 'size'>, ComboboxContentOwnProps {}\n/**\n * Content renders the dropdown surface, syncing tokens from the current Theme\n * and instantiating cmdk's Command list for roving focus + filtering.\n */\nconst ComboboxContent = React.forwardRef<ComboboxContentElement, ComboboxContentProps>((props, forwardedRef) => {\n const context = useComboboxContext('Combobox.Content');\n const themeContext = useThemeContext();\n const effectiveMaterial = themeContext.panelBackground;\n\n const sizeProp = props.size ?? context.size ?? comboboxContentPropDefs.size.default;\n const variantProp = props.variant ?? comboboxContentPropDefs.variant.default;\n const highContrastProp = props.highContrast ?? context.highContrast ?? comboboxContentPropDefs.highContrast.default;\n\n const { className, children, color, forceMount, container, ...contentProps } = extractProps(\n { ...props, size: sizeProp, variant: variantProp, highContrast: highContrastProp },\n comboboxContentPropDefs,\n );\n const resolvedColor = color || context.color || themeContext.accentColor;\n \n // Memoize className sanitization to avoid string operations on every render\n const sanitizedClassName = React.useMemo(() => {\n if (typeof sizeProp !== 'string') return className;\n return className\n ?.split(/\\s+/)\n .filter(Boolean)\n .filter((token) => !/^rt-r-size-\\d$/.test(token))\n .join(' ') || undefined;\n }, [className, sizeProp]);\n\n /**\n * forceMount behavior:\n * - When true: Content stays mounted when closed, allowing items to register labels\n * for display in the trigger. Use this if you need dynamic label resolution.\n * - When false/undefined (default): Content unmounts when closed for better performance.\n * Use the `displayValue` prop on Root to show the selected label instead.\n * \n * For best performance with large lists, keep forceMount=undefined and provide displayValue.\n */\n const shouldForceMount = forceMount === true ? true : undefined;\n\n return (\n <Popover.Content\n size={sizeProp}\n data-accent-color={resolvedColor}\n data-material={effectiveMaterial}\n data-panel-background={effectiveMaterial}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n {...contentProps}\n forceMount={shouldForceMount}\n container={container}\n ref={forwardedRef}\n className={classNames('rt-PopperContent', 'rt-BaseMenuContent', 'rt-ComboboxContent', sanitizedClassName)}\n >\n <Theme asChild>\n <ComboboxContentContext.Provider value={{ variant: variantProp, size: String(sizeProp), color: resolvedColor, material: effectiveMaterial, highContrast: highContrastProp }}>\n <CommandPrimitive\n loop={context.loop}\n shouldFilter={context.shouldFilter}\n filter={context.filter}\n className=\"rt-ComboboxCommand\"\n >\n {children}\n </CommandPrimitive>\n </ComboboxContentContext.Provider>\n </Theme>\n </Popover.Content>\n );\n});\nComboboxContent.displayName = 'Combobox.Content';\n\ntype ComboboxInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ninterface ComboboxInputProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'onValueChange'> {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n variant?: TextFieldVariant;\n /** Controlled search value. Falls back to Root's searchValue if not provided. */\n value?: string;\n /** Callback when search value changes. Falls back to Root's onSearchValueChange if not provided. */\n onValueChange?: (value: string) => void;\n}\n/**\n * Input composes TextField tokens with cmdk's Command.Input to provide\n * automatic focus management and optional adornments.\n */\nconst ComboboxInput = React.forwardRef<ComboboxInputElement, ComboboxInputProps>(({ className, startAdornment, endAdornment, placeholder, variant: inputVariant, value, onValueChange, ...inputProps }, forwardedRef) => {\n const context = useComboboxContext('Combobox.Input');\n const contentContext = useComboboxContentContext();\n const contentVariant = contentContext?.variant ?? 'solid';\n const color = contentContext?.color;\n const material = contentContext?.material;\n\n /**\n * Map combobox content variant to TextField variant:\n * - Content 'solid' \u2192 Input 'surface' (elevated input on solid background)\n * - Content 'soft' \u2192 Input 'soft' (subtle input on soft background)\n * This ensures visual harmony between the input and surrounding content.\n */\n const textFieldVariant = inputVariant ?? (contentVariant === 'solid' ? 'surface' : 'soft');\n\n // Use controlled search value from context, allow override via props\n const searchValue = value ?? context.searchValue;\n const handleSearchChange = onValueChange ?? context.setSearchValue;\n\n const inputField = (\n <div\n className={classNames('rt-TextFieldRoot', 'rt-ComboboxInputRoot', `rt-r-size-${context.size}`, `rt-variant-${textFieldVariant}`)}\n data-accent-color={color}\n data-material={material}\n data-panel-background={material}\n >\n {startAdornment ? <div className=\"rt-TextFieldSlot\">{startAdornment}</div> : null}\n <CommandPrimitive.Input\n {...inputProps}\n ref={forwardedRef}\n value={searchValue}\n onValueChange={handleSearchChange}\n placeholder={placeholder ?? context.searchPlaceholder}\n className={classNames('rt-reset', 'rt-TextFieldInput', className)}\n />\n {endAdornment ? (\n <div className=\"rt-TextFieldSlot\" data-side=\"right\">\n {endAdornment}\n </div>\n ) : null}\n </div>\n );\n\n if (contentContext) {\n return <div className=\"rt-ComboboxSearch\">{inputField}</div>;\n }\n\n return inputField;\n});\nComboboxInput.displayName = 'Combobox.Input';\n\ntype ComboboxListElement = React.ElementRef<typeof CommandPrimitive.List>;\ninterface ComboboxListProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> {}\n/**\n * List wraps cmdk's Command.List to inherit base menu styles and provides ScrollArea for the items.\n * Also handles aria-activedescendant tracking via a single MutationObserver for all items.\n */\nconst ComboboxList = React.forwardRef<ComboboxListElement, ComboboxListProps>(({ className, ...listProps }, forwardedRef) => {\n const context = useComboboxContext('Combobox.List');\n const listRef = React.useRef<HTMLDivElement | null>(null);\n\n // Combined ref handling\n const combinedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n listRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [forwardedRef],\n );\n\n /**\n * Single MutationObserver at List level to track aria-activedescendant.\n * This replaces per-item observers for better performance with large lists.\n */\n React.useEffect(() => {\n const listNode = listRef.current;\n if (!listNode) return;\n\n const updateActiveDescendant = () => {\n const selectedItem = listNode.querySelector('[data-selected=\"true\"], [aria-selected=\"true\"]');\n const itemId = selectedItem?.id;\n context.setActiveDescendantId(itemId || undefined);\n };\n\n // Initial check\n updateActiveDescendant();\n\n // Watch for attribute changes on any descendant\n const observer = new MutationObserver(updateActiveDescendant);\n observer.observe(listNode, {\n attributes: true,\n attributeFilter: ['data-selected', 'aria-selected'],\n subtree: true,\n });\n\n return () => observer.disconnect();\n }, [context.setActiveDescendantId]);\n\n return (\n <ScrollArea type=\"auto\" className=\"rt-ComboboxScrollArea\" scrollbars=\"vertical\" size=\"1\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-ComboboxViewport')}>\n <CommandPrimitive.List\n {...listProps}\n ref={combinedRef}\n id={context.listboxId}\n role=\"listbox\"\n aria-label=\"Options\"\n className={classNames('rt-ComboboxList', className)}\n />\n </div>\n </ScrollArea>\n );\n});\nComboboxList.displayName = 'Combobox.List';\n\ntype ComboboxEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ninterface ComboboxEmptyProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> {}\n/**\n * Empty renders when no options match the search query.\n */\nconst ComboboxEmpty = React.forwardRef<ComboboxEmptyElement, ComboboxEmptyProps>(({ className, ...emptyProps }, forwardedRef) => (\n <CommandPrimitive.Empty {...emptyProps} ref={forwardedRef} className={classNames('rt-ComboboxEmpty', className)} />\n));\nComboboxEmpty.displayName = 'Combobox.Empty';\n\ntype ComboboxGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ninterface ComboboxGroupProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> {}\n/**\n * Group and Label mirror menu semantics for subheadings inside the list.\n */\nconst ComboboxGroup = React.forwardRef<ComboboxGroupElement, ComboboxGroupProps>(({ className, ...groupProps }, forwardedRef) => (\n <CommandPrimitive.Group {...groupProps} ref={forwardedRef} className={classNames('rt-BaseMenuGroup', 'rt-ComboboxGroup', className)} />\n));\nComboboxGroup.displayName = 'Combobox.Group';\n\ntype ComboboxLabelElement = React.ElementRef<'div'>;\ninterface ComboboxLabelProps extends React.ComponentPropsWithoutRef<'div'> {}\nconst ComboboxLabel = React.forwardRef<ComboboxLabelElement, ComboboxLabelProps>(({ className, ...labelProps }, forwardedRef) => (\n <div {...labelProps} ref={forwardedRef} className={classNames('rt-BaseMenuLabel', 'rt-ComboboxLabel', className)} />\n));\nComboboxLabel.displayName = 'Combobox.Label';\n\ntype ComboboxSeparatorElement = React.ElementRef<typeof CommandPrimitive.Separator>;\ninterface ComboboxSeparatorProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> {}\n/**\n * Separator visually divides logical sections of the option list.\n */\nconst ComboboxSeparator = React.forwardRef<ComboboxSeparatorElement, ComboboxSeparatorProps>(({ className, ...separatorProps }, forwardedRef) => (\n <CommandPrimitive.Separator {...separatorProps} ref={forwardedRef} className={classNames('rt-BaseMenuSeparator', 'rt-ComboboxSeparator', className)} />\n));\nComboboxSeparator.displayName = 'Combobox.Separator';\n\ntype ComboboxItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ninterface ComboboxItemProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, 'keywords'> {\n /** Display label for the item. Also used for search unless keywords are provided. */\n label?: string;\n /** Additional keywords for search filtering (overrides automatic label-based search). */\n keywords?: string[];\n}\n/**\n * Item wires cmdk's selection handling with Kookie UI tokens and\n * ensures labels are registered for displaying the current value.\n */\n/**\n * Extracts text content from React children recursively.\n * Used to derive searchable labels from JSX children.\n */\nfunction extractTextFromChildren(children: React.ReactNode): string {\n if (typeof children === 'string') return children;\n if (typeof children === 'number') return String(children);\n if (children == null || typeof children === 'boolean') return '';\n if (Array.isArray(children)) {\n return children.map(extractTextFromChildren).filter(Boolean).join(' ');\n }\n if (React.isValidElement(children)) {\n const props = children.props as { children?: React.ReactNode };\n if (props.children) {\n return extractTextFromChildren(props.children);\n }\n }\n return '';\n}\n\nconst ComboboxItem = React.forwardRef<ComboboxItemElement, ComboboxItemProps>(({ className, children, label, value, disabled, onSelect, keywords, ...itemProps }, forwardedRef) => {\n const context = useComboboxContext('Combobox.Item');\n const contentContext = useComboboxContentContext();\n \n // Memoize label extraction to avoid recursive traversal on every render\n const extractedLabel = React.useMemo(() => extractTextFromChildren(children), [children]);\n const itemLabel = label ?? (extractedLabel || String(value));\n const isSelected = value != null && context.value === value;\n const sizeClass = contentContext?.size ? `rt-r-size-${contentContext.size}` : undefined;\n\n // Use provided keywords, or default to the item label for search\n // This allows searching by display text even when value is different (e.g., \"usa\" vs \"United States\")\n const searchKeywords = keywords ?? [itemLabel];\n\n // Generate stable ID for this item for aria-activedescendant\n const generatedId = React.useId();\n const itemId = `combobox-item-${generatedId}`;\n\n // Destructure stable references to avoid effect re-runs when unrelated context values change\n const { registerItemLabel, unregisterItemLabel, handleSelect: contextHandleSelect } = context;\n\n // Register/unregister label for display in trigger\n React.useEffect(() => {\n if (value) {\n registerItemLabel(value, itemLabel);\n return () => unregisterItemLabel(value);\n }\n }, [registerItemLabel, unregisterItemLabel, value, itemLabel]);\n\n const handleSelect = React.useCallback(\n (selectedValue: string) => {\n contextHandleSelect(selectedValue);\n onSelect?.(selectedValue);\n },\n [contextHandleSelect, onSelect],\n );\n\n const isDisabled = disabled ?? context.disabled ?? false;\n\n /**\n * Performance notes:\n * - data-disabled workaround: Handled via CSS selectors in combobox.css\n * rather than per-item MutationObservers.\n * - aria-activedescendant: Tracked by a single observer in ComboboxList\n * rather than per-item observers.\n */\n\n return (\n <CommandPrimitive.Item\n {...itemProps}\n id={itemId}\n value={value}\n keywords={searchKeywords}\n role=\"option\"\n aria-selected={isSelected}\n {...(isDisabled ? { disabled: true, 'aria-disabled': true } : {})}\n ref={forwardedRef}\n onSelect={handleSelect}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-ComboboxItem', className)}\n >\n {isSelected ? (\n <span className={classNames('rt-BaseMenuItemIndicator', 'rt-ComboboxItemIndicator', sizeClass)}>\n <ThickCheckIcon className={classNames('rt-BaseMenuItemIndicatorIcon', 'rt-ComboboxItemIndicatorIcon', sizeClass)} />\n </span>\n ) : null}\n <Slottable>{children}</Slottable>\n </CommandPrimitive.Item>\n );\n});\nComboboxItem.displayName = 'Combobox.Item';\n\nexport {\n ComboboxRoot as Root,\n ComboboxTrigger as Trigger,\n ComboboxValue as Value,\n ComboboxContent as Content,\n ComboboxInput as Input,\n ComboboxList as List,\n ComboboxEmpty as Empty,\n ComboboxGroup as Group,\n ComboboxLabel as Label,\n ComboboxSeparator as Separator,\n ComboboxItem as Item,\n};\nexport type {\n ComboboxRootProps as RootProps,\n ComboboxTriggerProps as TriggerProps,\n ComboboxValueProps as ValueProps,\n ComboboxContentProps as ContentProps,\n ComboboxInputProps as InputProps,\n ComboboxListProps as ListProps,\n ComboboxEmptyProps as EmptyProps,\n ComboboxGroupProps as GroupProps,\n ComboboxLabelProps as LabelProps,\n ComboboxSeparatorProps as SeparatorProps,\n ComboboxItemProps as ItemProps,\n};\n"],
|
|
5
|
-
"mappings": "slBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,EAAA,UAAAC,EAAA,UAAAC,EAAA,UAAAC,EAAA,SAAAC,GAAA,UAAAC,EAAA,SAAAC,EAAA,SAAAC,EAAA,cAAAC,GAAA,YAAAC,EAAA,UAAAC,IAAA,eAAAC,GAAAb,IASA,IAAAc,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAqC,6BACrCC,EAA4C,gBAE5CC,EAA6B,uCAC7BC,EAAuF,+BACvFC,GAA+B,oCAC/BC,EAAgD,sBAChDC,EAAuC,sBACvCC,GAAoC,+CACpCC,EAAyB,2BACzBC,GAA2B,4BAC3BC,GAA0B,qBAC1BC,GAAsC,iCAiGtC,MAAMC,GAAkBd,EAAM,cAA2C,IAAI,EAKvEe,EAAsBC,GAAmB,CAC7C,MAAMC,EAAMjB,EAAM,WAAWc,EAAe,EAC5C,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,GAAGD,CAAM,oCAAoC,EAE/D,OAAOC,CACT,EAM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OzE,CAAK,GACpD2E,EAAa3E,GAAS,MAAQgB,EAAQ,QAAUhB,EAChD4E,EAAYxB,GAAgB,KAAO,aAAaA,EAAe,IAAI,GAAK,OAIxEyB,EAAiBN,GAAY,CAACG,CAAS,EAIvCX,EAAS,iBADK/G,EAAM,MAAM,CACW,GAGrC,CAAE,kBAAAuD,EAAmB,oBAAAG,EAAqB,aAAcoE,CAAoB,EAAI9D,EAGtFhE,EAAM,UAAU,IAAM,CACpB,GAAIgD,EACF,OAAAO,EAAkBP,EAAO0E,CAAS,EAC3B,IAAMhE,EAAoBV,CAAK,CAE1C,EAAG,CAACO,EAAmBG,EAAqBV,EAAO0E,CAAS,CAAC,EAE7D,MAAM/D,EAAe3D,EAAM,YACxB+H,GAA0B,CACzBD,EAAoBC,CAAa,EACjCT,IAAWS,CAAa,CAC1B,EACA,CAACD,EAAqBR,CAAQ,CAChC,EAEM7C,EAAanC,GAAY0B,EAAQ,UAAY,GAUnD,OACEhE,EAAA,cAAC,EAAA+F,QAAiB,KAAjB,CACE,GAAGyB,EACJ,GAAIT,EACJ,MAAO/D,EACP,SAAU6E,EACV,KAAK,SACL,gBAAeF,EACd,GAAIlD,EAAa,CAAE,SAAU,GAAM,gBAAiB,EAAK,EAAI,CAAC,EAC/D,IAAKV,EACL,SAAUJ,EACV,aAAW,EAAAqB,SAAW,WAAY,kBAAmB,kBAAmBf,CAAS,GAEhF0D,EACC3H,EAAA,cAAC,QAAK,aAAW,EAAAgF,SAAW,2BAA4B,2BAA4B4C,CAAS,GAC3F5H,EAAA,cAAC,kBAAe,aAAW,EAAAgF,SAAW,+BAAgC,+BAAgC4C,CAAS,EAAG,CACpH,EACE,KACJ5H,EAAA,cAAC,kBAAWqB,CAAS,CACvB,CAEJ,CAAC,EACD7B,GAAa,YAAc",
|
|
6
|
-
"names": ["combobox_exports", "__export", "ComboboxContent", "ComboboxEmpty", "ComboboxGroup", "ComboboxInput", "ComboboxItem", "ComboboxLabel", "ComboboxList", "ComboboxRoot", "ComboboxSeparator", "ComboboxTrigger", "ComboboxValue", "__toCommonJS", "React", "import_classnames", "import_internal", "import_cmdk", "import_extract_props", "import_combobox_props", "import_margin_props", "import_icons", "import_theme", "import_require_react_element", "Popover", "import_scroll_area", "import_slot", "import_text_field_props", "
|
|
4
|
+
"sourcesContent": ["'use client';\n\n/**\n * Combobox is a compound component built on top of Popover and cmdk's Command list.\n * It mirrors the Select API while adding search-first behaviors including filtering,\n * async-friendly state management, and design token support for trigger, content,\n * and input variants.\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useControllableState } from 'radix-ui/internal';\nimport { Command as CommandPrimitive } from 'cmdk';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs } from './combobox.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport * as Popover from './popover.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Slottable } from './slot.js';\nimport { textFieldRootPropDefs } from './text-field.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\n/**\n * Pre-compiled regex for className sanitization.\n * Matches size classes like \"rt-r-size-1\", \"rt-r-size-2\", etc.\n * Pre-compiling avoids regex compilation on every render.\n */\nconst SIZE_CLASS_REGEX = /^rt-r-size-\\d$/;\n\ntype TextFieldVariant = (typeof textFieldRootPropDefs.variant.values)[number];\ntype ComboboxValue = string | null;\n/**\n * Custom filter function for Combobox search.\n * @param value - The item's value being tested\n * @param search - The current search string\n * @param keywords - Optional keywords associated with the item\n * @returns A number between 0 and 1 where 0 means no match and 1 means exact match.\n * Fractional values indicate relevance for sorting.\n */\ntype CommandFilter = (value: string, search: string, keywords?: string[]) => number;\n\n/**\n * Additional props supported by Combobox.Root beyond the Radix Popover surface.\n */\ntype ComboboxRootOwnProps = GetPropDefTypes<typeof comboboxRootPropDefs> & {\n value?: ComboboxValue;\n defaultValue?: ComboboxValue;\n onValueChange?: (value: ComboboxValue) => void;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n searchValue?: string;\n defaultSearchValue?: string;\n onSearchValueChange?: (value: string) => void;\n filter?: CommandFilter;\n shouldFilter?: boolean;\n loop?: boolean;\n disabled?: boolean;\n /**\n * Whether to reset the search value when an option is selected.\n * @default true\n */\n resetSearchOnSelect?: boolean;\n /**\n * Accent color for the combobox trigger and content.\n */\n color?: (typeof comboboxTriggerPropDefs.color.values)[number];\n /**\n * Display value shown in the trigger. This is the recommended approach for\n * best performance as it avoids needing to mount items to register labels.\n * \n * Can be either:\n * - A string: Static display value\n * - A function: `(value: string | null) => string | undefined` - Called with current value\n * \n * Use this when:\n * - You have the selected item's label available (e.g., from your data source)\n * - Items haven't mounted yet (e.g., on initial render with a defaultValue)\n * - You want optimal performance with forceMount={false} (default)\n * \n * @example\n * // Static string\n * <Combobox.Root value=\"usa\" displayValue=\"United States\">\n * \n * // Function (recommended for dynamic data)\n * <Combobox.Root \n * value={selectedCountry}\n * displayValue={(value) => countries.find(c => c.code === value)?.name}\n * >\n * \n * If not provided, falls back to the label registered by the selected item\n * (requires forceMount={true}), then to the raw value.\n */\n displayValue?: string | ((value: ComboboxValue) => string | undefined);\n};\n\n/**\n * Split contexts to minimize re-renders. Each context changes independently:\n * - ConfigContext: Static config that rarely changes (size, color, placeholders, etc.)\n * - SelectionContext: Changes when user selects an item\n * - SearchContext: Changes on every keystroke in the search input\n * - NavigationContext: Changes during keyboard navigation\n */\n\n/** Static configuration - rarely changes after mount */\ninterface ComboboxConfigContextValue {\n size?: ComboboxRootOwnProps['size'];\n highContrast?: boolean;\n placeholder?: string;\n searchPlaceholder?: string;\n filter?: CommandFilter;\n shouldFilter?: boolean;\n loop?: boolean;\n disabled?: boolean;\n resetSearchOnSelect?: boolean;\n color?: ComboboxRootOwnProps['color'];\n listboxId: string;\n}\n\n/** Selection state - changes when user picks an option */\ninterface ComboboxSelectionContextValue {\n open: boolean;\n setOpen: (open: boolean) => void;\n value: ComboboxValue;\n /** Label registered by the selected item */\n selectedLabel?: string;\n /** Resolved display value (already computed from string or function) */\n resolvedDisplayValue?: string;\n registerItemLabel: (value: string, label: string) => void;\n unregisterItemLabel: (value: string) => void;\n handleSelect: (value: string) => void;\n}\n\n/** Search state - changes on every keystroke */\ninterface ComboboxSearchContextValue {\n searchValue: string;\n setSearchValue: (value: string) => void;\n}\n\n/** Navigation state - changes during keyboard navigation */\ninterface ComboboxNavigationContextValue {\n activeDescendantId: string | undefined;\n setActiveDescendantId: (id: string | undefined) => void;\n}\n\nconst ComboboxConfigContext = React.createContext<ComboboxConfigContextValue | null>(null);\nconst ComboboxSelectionContext = React.createContext<ComboboxSelectionContextValue | null>(null);\nconst ComboboxSearchContext = React.createContext<ComboboxSearchContextValue | null>(null);\nconst ComboboxNavigationContext = React.createContext<ComboboxNavigationContextValue | null>(null);\n\n/**\n * Utility hooks that ensure consumers are wrapped in Combobox.Root.\n * Components should use only the contexts they need to minimize re-renders.\n */\nconst useComboboxConfigContext = (caller: string) => {\n const ctx = React.useContext(ComboboxConfigContext);\n if (!ctx) {\n throw new Error(`${caller} must be used within Combobox.Root`);\n }\n return ctx;\n};\n\nconst useComboboxSelectionContext = (caller: string) => {\n const ctx = React.useContext(ComboboxSelectionContext);\n if (!ctx) {\n throw new Error(`${caller} must be used within Combobox.Root`);\n }\n return ctx;\n};\n\nconst useComboboxSearchContext = (caller: string) => {\n const ctx = React.useContext(ComboboxSearchContext);\n if (!ctx) {\n throw new Error(`${caller} must be used within Combobox.Root`);\n }\n return ctx;\n};\n\nconst useComboboxNavigationContext = (caller: string) => {\n const ctx = React.useContext(ComboboxNavigationContext);\n if (!ctx) {\n throw new Error(`${caller} must be used within Combobox.Root`);\n }\n return ctx;\n};\n\n/**\n * Combined context hook for components that need multiple contexts.\n * Use sparingly - prefer individual context hooks when possible.\n */\nconst useComboboxContext = (caller: string) => {\n const config = useComboboxConfigContext(caller);\n const selection = useComboboxSelectionContext(caller);\n const search = useComboboxSearchContext(caller);\n const navigation = useComboboxNavigationContext(caller);\n return { ...config, ...selection, ...search, ...navigation };\n};\n\n/**\n * Context for values that are only available inside Content (e.g., variant, color)\n * so that Input/Item can style themselves consistently.\n */\nconst ComboboxContentContext = React.createContext<{ variant: 'solid' | 'soft'; size?: string; color?: string; material?: string; highContrast?: boolean } | null>(null);\nconst useComboboxContentContext = () => {\n const ctx = React.useContext(ComboboxContentContext);\n return ctx; // Optional - Input might not always be in Content\n};\n\ntype PopoverRootProps = React.ComponentPropsWithoutRef<typeof Popover.Root>;\ninterface ComboboxRootProps extends PopoverRootProps, ComboboxRootOwnProps {}\n/**\n * Root component that wires up Popover behavior, controllable state,\n * and shared context for trigger/content/input sub-components.\n */\nconst ComboboxRoot: React.FC<ComboboxRootProps> = (props) => {\n const {\n children,\n size = comboboxRootPropDefs.size.default,\n highContrast = comboboxRootPropDefs.highContrast.default,\n value: valueProp,\n defaultValue = null,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n placeholder = 'Select an option',\n searchPlaceholder = 'Search options...',\n searchValue: searchValueProp,\n defaultSearchValue = '',\n onSearchValueChange,\n filter,\n shouldFilter = true,\n loop = true,\n disabled,\n resetSearchOnSelect = true,\n color,\n displayValue: displayValueProp,\n ...rootProps\n } = props;\n\n // Generate stable IDs for accessibility\n const generatedId = React.useId();\n const listboxId = `combobox-listbox-${generatedId}`;\n const [activeDescendantId, setActiveDescendantId] = React.useState<string | undefined>(undefined);\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n const [value, setValue] = useControllableState<ComboboxValue>({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const [searchValue, setSearchValue] = useControllableState<string>({\n prop: searchValueProp,\n defaultProp: defaultSearchValue,\n onChange: onSearchValueChange,\n });\n\n const labelMapRef = React.useRef(new Map<string, string>());\n // Track the selected label in state so it triggers re-renders when items register\n const [selectedLabel, setSelectedLabel] = React.useState<string | undefined>(undefined);\n\n const registerItemLabel = React.useCallback((itemValue: string, label: string) => {\n labelMapRef.current.set(itemValue, label);\n // If this item matches the current value, update the selected label\n if (itemValue === value) {\n setSelectedLabel(label);\n }\n }, [value]);\n\n const unregisterItemLabel = React.useCallback((itemValue: string) => {\n labelMapRef.current.delete(itemValue);\n }, []);\n\n // Update selected label when value changes\n React.useEffect(() => {\n if (value != null) {\n const label = labelMapRef.current.get(value);\n setSelectedLabel(label);\n } else {\n setSelectedLabel(undefined);\n }\n }, [value]);\n\n const handleSelect = React.useCallback(\n (nextValue: string) => {\n // Batch state updates to minimize re-renders\n // React 18+ automatically batches these, but we use flushSync-free pattern\n // to ensure predictable update order\n setValue(nextValue);\n setOpen(false);\n if (resetSearchOnSelect) {\n setSearchValue('');\n }\n },\n [setOpen, setSearchValue, setValue, resetSearchOnSelect],\n );\n\n // Development mode warning for value not matching any registered item\n React.useEffect(() => {\n if (process.env.NODE_ENV !== 'production' && value != null && !labelMapRef.current.has(value)) {\n // Defer the check to allow items to register first\n const timeoutId = setTimeout(() => {\n if (value != null && !labelMapRef.current.has(value)) {\n console.warn(\n `[Combobox] The value \"${value}\" does not match any Combobox.Item. ` +\n `Make sure each Item has a matching value prop.`,\n );\n }\n }, 0);\n return () => clearTimeout(timeoutId);\n }\n }, [value]);\n\n // Resolve displayValue: compute if function, use directly if string\n const resolvedDisplayValue = React.useMemo(() => {\n if (displayValueProp == null) return undefined;\n if (typeof displayValueProp === 'function') {\n return displayValueProp(value);\n }\n return displayValueProp;\n }, [displayValueProp, value]);\n\n // Split context values for optimal re-render performance\n // Each context only triggers re-renders for components that use it\n\n const configContextValue = React.useMemo<ComboboxConfigContextValue>(\n () => ({\n size,\n highContrast,\n placeholder,\n searchPlaceholder,\n filter,\n shouldFilter,\n loop,\n disabled,\n resetSearchOnSelect,\n color,\n listboxId,\n }),\n [size, highContrast, placeholder, searchPlaceholder, filter, shouldFilter, loop, disabled, resetSearchOnSelect, color, listboxId],\n );\n\n const selectionContextValue = React.useMemo<ComboboxSelectionContextValue>(\n () => ({\n open,\n setOpen,\n value,\n selectedLabel,\n resolvedDisplayValue,\n registerItemLabel,\n unregisterItemLabel,\n handleSelect,\n }),\n [open, setOpen, value, selectedLabel, resolvedDisplayValue, registerItemLabel, unregisterItemLabel, handleSelect],\n );\n\n const searchContextValue = React.useMemo<ComboboxSearchContextValue>(\n () => ({\n searchValue,\n setSearchValue,\n }),\n [searchValue, setSearchValue],\n );\n\n const navigationContextValue = React.useMemo<ComboboxNavigationContextValue>(\n () => ({\n activeDescendantId,\n setActiveDescendantId,\n }),\n [activeDescendantId, setActiveDescendantId],\n );\n\n return (\n <ComboboxConfigContext.Provider value={configContextValue}>\n <ComboboxSelectionContext.Provider value={selectionContextValue}>\n <ComboboxSearchContext.Provider value={searchContextValue}>\n <ComboboxNavigationContext.Provider value={navigationContextValue}>\n <Popover.Root open={open} onOpenChange={setOpen} {...rootProps}>\n {children}\n </Popover.Root>\n </ComboboxNavigationContext.Provider>\n </ComboboxSearchContext.Provider>\n </ComboboxSelectionContext.Provider>\n </ComboboxConfigContext.Provider>\n );\n};\nComboboxRoot.displayName = 'Combobox.Root';\n\ntype ComboboxTriggerElement = HTMLButtonElement;\ntype ComboboxTriggerOwnProps = GetPropDefTypes<typeof comboboxTriggerPropDefs>;\ntype NativeTriggerProps = Omit<React.ComponentPropsWithoutRef<'button'>, 'color'>;\ninterface ComboboxTriggerProps extends NativeTriggerProps, MarginProps, ComboboxTriggerOwnProps {}\n/**\n * Trigger behaves like a styled button that opens the Popover,\n * syncing size/highContrast from Root while exposing select-like states.\n */\nconst ComboboxTrigger = React.forwardRef<ComboboxTriggerElement, ComboboxTriggerProps>((props, forwardedRef) => {\n // Use specific contexts to minimize re-renders\n const configContext = useComboboxConfigContext('Combobox.Trigger');\n const selectionContext = useComboboxSelectionContext('Combobox.Trigger');\n const navigationContext = useComboboxNavigationContext('Combobox.Trigger');\n\n const { children, className, placeholder, disabled, readOnly, error, loading, color, radius, ...triggerProps } = extractProps(\n { size: configContext.size, highContrast: configContext.highContrast, ...props },\n { size: comboboxRootPropDefs.size, highContrast: comboboxRootPropDefs.highContrast },\n comboboxTriggerPropDefs,\n marginPropDefs,\n );\n\n // Extract material and panelBackground separately since they need to be passed as data attributes\n const { material, panelBackground } = props;\n\n const isDisabled = disabled ?? configContext.disabled;\n\n // Use color from props or fall back to context color\n const resolvedColor = color ?? configContext.color;\n\n // Comprehensive ARIA attributes for combobox pattern (WAI-ARIA 1.2)\n const ariaProps = React.useMemo(\n () => ({\n role: 'combobox' as const,\n 'aria-expanded': selectionContext.open,\n 'aria-disabled': isDisabled || undefined,\n 'aria-haspopup': 'listbox' as const,\n 'aria-controls': selectionContext.open ? configContext.listboxId : undefined,\n 'aria-activedescendant': selectionContext.open ? navigationContext.activeDescendantId : undefined,\n 'aria-autocomplete': 'list' as const,\n }),\n [selectionContext.open, configContext.listboxId, navigationContext.activeDescendantId, isDisabled],\n );\n\n const defaultContent = (\n <>\n <span className=\"rt-SelectTriggerInner\">\n <ComboboxValue placeholder={placeholder ?? configContext.placeholder} />\n </span>\n {loading ? (\n <div className=\"rt-SelectIcon rt-SelectLoadingIcon\" aria-hidden=\"true\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle cx=\"8\" cy=\"8\" r=\"6.5\" stroke=\"currentColor\" strokeWidth=\"1\" strokeLinecap=\"round\" strokeDasharray=\"6 34\" strokeDashoffset=\"0\" className=\"rt-SelectLoadingSpinner\" />\n </svg>\n </div>\n ) : (\n <ChevronDownIcon className=\"rt-SelectIcon\" />\n )}\n </>\n );\n\n const { type: buttonType, ...restTriggerProps } = triggerProps;\n const resolvedButtonType = buttonType ?? 'button';\n\n const triggerChild = (\n <button\n data-accent-color={resolvedColor}\n data-radius={radius}\n data-panel-background={panelBackground}\n data-material={material}\n data-error={error}\n data-loading={loading}\n data-disabled={isDisabled || undefined}\n data-read-only={readOnly || undefined}\n {...restTriggerProps}\n {...ariaProps}\n type={resolvedButtonType}\n disabled={isDisabled}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-SelectTrigger', 'rt-ComboboxTrigger', className)}\n >\n {children ? requireReactElement(children) : defaultContent}\n </button>\n );\n\n return <Popover.Trigger disabled={isDisabled}>{triggerChild}</Popover.Trigger>;\n});\nComboboxTrigger.displayName = 'Combobox.Trigger';\n\ntype ComboboxValueElement = HTMLSpanElement;\ninterface ComboboxValueProps extends React.ComponentPropsWithoutRef<'span'> {\n placeholder?: string;\n}\n/**\n * Value mirrors Select.Value by showing the selected item's label\n * or falling back to placeholder text supplied by the consumer or context.\n *\n * Priority: resolvedDisplayValue (explicit) > selectedLabel (from items) > raw value > children > placeholder\n */\nconst ComboboxValue = React.forwardRef<ComboboxValueElement, ComboboxValueProps>(({ placeholder, children, className, ...valueProps }, forwardedRef) => {\n // Only use the contexts we need - config for placeholder, selection for value display\n const configContext = useComboboxConfigContext('Combobox.Value');\n const selectionContext = useComboboxSelectionContext('Combobox.Value');\n // Priority: explicit displayValue (resolved) > registered label > raw value\n const displayValue = selectionContext.resolvedDisplayValue ?? selectionContext.selectedLabel ?? selectionContext.value ?? undefined;\n const fallback = placeholder ?? configContext.placeholder;\n return (\n <span {...valueProps} ref={forwardedRef} className={classNames('rt-ComboboxValue', className)}>\n {displayValue ?? children ?? fallback}\n </span>\n );\n});\nComboboxValue.displayName = 'Combobox.Value';\n\ntype ComboboxContentElement = React.ElementRef<typeof Popover.Content>;\ntype ComboboxContentOwnProps = GetPropDefTypes<typeof comboboxContentPropDefs> & {\n container?: React.ComponentPropsWithoutRef<typeof Popover.Content>['container'];\n};\ninterface ComboboxContentProps extends Omit<ComponentPropsWithout<typeof Popover.Content, RemovedProps>, 'size'>, ComboboxContentOwnProps {}\n/**\n * Content renders the dropdown surface, syncing tokens from the current Theme\n * and instantiating cmdk's Command list for roving focus + filtering.\n */\nconst ComboboxContent = React.forwardRef<ComboboxContentElement, ComboboxContentProps>((props, forwardedRef) => {\n // Only use config context - Content doesn't need selection/search/navigation state\n const configContext = useComboboxConfigContext('Combobox.Content');\n const themeContext = useThemeContext();\n const effectiveMaterial = themeContext.panelBackground;\n\n const sizeProp = props.size ?? configContext.size ?? comboboxContentPropDefs.size.default;\n const variantProp = props.variant ?? comboboxContentPropDefs.variant.default;\n const highContrastProp = props.highContrast ?? configContext.highContrast ?? comboboxContentPropDefs.highContrast.default;\n\n const { className, children, color, forceMount, container, ...contentProps } = extractProps(\n { ...props, size: sizeProp, variant: variantProp, highContrast: highContrastProp },\n comboboxContentPropDefs,\n );\n const resolvedColor = color || configContext.color || themeContext.accentColor;\n \n // Memoize className sanitization to avoid string operations on every render\n // Uses pre-compiled SIZE_CLASS_REGEX for better performance\n const sanitizedClassName = React.useMemo(() => {\n if (typeof sizeProp !== 'string') return className;\n return className\n ?.split(/\\s+/)\n .filter(Boolean)\n .filter((token) => !SIZE_CLASS_REGEX.test(token))\n .join(' ') || undefined;\n }, [className, sizeProp]);\n\n /**\n * forceMount behavior:\n * - When true: Content stays mounted when closed, allowing items to register labels\n * for display in the trigger. Use this if you need dynamic label resolution.\n * - When false/undefined (default): Content unmounts when closed for better performance.\n * Use the `displayValue` prop on Root to show the selected label instead.\n * \n * For best performance with large lists, keep forceMount=undefined and provide displayValue.\n */\n const shouldForceMount = forceMount === true ? true : undefined;\n\n return (\n <Popover.Content\n size={sizeProp}\n data-accent-color={resolvedColor}\n data-material={effectiveMaterial}\n data-panel-background={effectiveMaterial}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n {...contentProps}\n forceMount={shouldForceMount}\n container={container}\n ref={forwardedRef}\n className={classNames('rt-PopperContent', 'rt-BaseMenuContent', 'rt-ComboboxContent', sanitizedClassName)}\n >\n <Theme asChild>\n <ComboboxContentContext.Provider value={{ variant: variantProp, size: String(sizeProp), color: resolvedColor, material: effectiveMaterial, highContrast: highContrastProp }}>\n <CommandPrimitive\n loop={configContext.loop}\n shouldFilter={configContext.shouldFilter}\n filter={configContext.filter}\n className=\"rt-ComboboxCommand\"\n >\n {children}\n </CommandPrimitive>\n </ComboboxContentContext.Provider>\n </Theme>\n </Popover.Content>\n );\n});\nComboboxContent.displayName = 'Combobox.Content';\n\ntype ComboboxInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ninterface ComboboxInputProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'onValueChange'> {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n variant?: TextFieldVariant;\n /** Controlled search value. Falls back to Root's searchValue if not provided. */\n value?: string;\n /** Callback when search value changes. Falls back to Root's onSearchValueChange if not provided. */\n onValueChange?: (value: string) => void;\n}\n/**\n * Input composes TextField tokens with cmdk's Command.Input to provide\n * automatic focus management and optional adornments.\n */\nconst ComboboxInput = React.forwardRef<ComboboxInputElement, ComboboxInputProps>(({ className, startAdornment, endAdornment, placeholder, variant: inputVariant, value, onValueChange, ...inputProps }, forwardedRef) => {\n // Use specific contexts - config for size/placeholder, search for search state\n const configContext = useComboboxConfigContext('Combobox.Input');\n const searchContext = useComboboxSearchContext('Combobox.Input');\n const contentContext = useComboboxContentContext();\n const contentVariant = contentContext?.variant ?? 'solid';\n const color = contentContext?.color;\n const material = contentContext?.material;\n\n /**\n * Map combobox content variant to TextField variant:\n * - Content 'solid' \u2192 Input 'surface' (elevated input on solid background)\n * - Content 'soft' \u2192 Input 'soft' (subtle input on soft background)\n * This ensures visual harmony between the input and surrounding content.\n */\n const textFieldVariant = inputVariant ?? (contentVariant === 'solid' ? 'surface' : 'soft');\n\n // Use controlled search value from context, allow override via props\n const searchValue = value ?? searchContext.searchValue;\n const handleSearchChange = onValueChange ?? searchContext.setSearchValue;\n\n const inputField = (\n <div\n className={classNames('rt-TextFieldRoot', 'rt-ComboboxInputRoot', `rt-r-size-${configContext.size}`, `rt-variant-${textFieldVariant}`)}\n data-accent-color={color}\n data-material={material}\n data-panel-background={material}\n >\n {startAdornment ? <div className=\"rt-TextFieldSlot\">{startAdornment}</div> : null}\n <CommandPrimitive.Input\n {...inputProps}\n ref={forwardedRef}\n value={searchValue}\n onValueChange={handleSearchChange}\n placeholder={placeholder ?? configContext.searchPlaceholder}\n className={classNames('rt-reset', 'rt-TextFieldInput', className)}\n />\n {endAdornment ? (\n <div className=\"rt-TextFieldSlot\" data-side=\"right\">\n {endAdornment}\n </div>\n ) : null}\n </div>\n );\n\n if (contentContext) {\n return <div className=\"rt-ComboboxSearch\">{inputField}</div>;\n }\n\n return inputField;\n});\nComboboxInput.displayName = 'Combobox.Input';\n\ntype ComboboxListElement = React.ElementRef<typeof CommandPrimitive.List>;\ninterface ComboboxListProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> {}\n/**\n * List wraps cmdk's Command.List to inherit base menu styles and provides ScrollArea for the items.\n * Also handles aria-activedescendant tracking via a single MutationObserver for all items.\n */\nconst ComboboxList = React.forwardRef<ComboboxListElement, ComboboxListProps>(({ className, ...listProps }, forwardedRef) => {\n // Use specific contexts - config for listboxId, navigation for active descendant\n const configContext = useComboboxConfigContext('Combobox.List');\n const navigationContext = useComboboxNavigationContext('Combobox.List');\n const listRef = React.useRef<HTMLDivElement | null>(null);\n\n // Combined ref handling\n const combinedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n listRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [forwardedRef],\n );\n\n // Destructure to get stable reference for effect dependency\n const { setActiveDescendantId } = navigationContext;\n\n /**\n * Single MutationObserver at List level to track aria-activedescendant.\n * This replaces per-item observers for better performance with large lists.\n */\n React.useEffect(() => {\n const listNode = listRef.current;\n if (!listNode) return;\n\n const updateActiveDescendant = () => {\n const selectedItem = listNode.querySelector('[data-selected=\"true\"], [aria-selected=\"true\"]');\n const itemId = selectedItem?.id;\n setActiveDescendantId(itemId || undefined);\n };\n\n // Initial check\n updateActiveDescendant();\n\n // Watch for attribute changes on any descendant\n const observer = new MutationObserver(updateActiveDescendant);\n observer.observe(listNode, {\n attributes: true,\n attributeFilter: ['data-selected', 'aria-selected'],\n subtree: true,\n });\n\n return () => observer.disconnect();\n }, [setActiveDescendantId]);\n\n return (\n <ScrollArea type=\"auto\" className=\"rt-ComboboxScrollArea\" scrollbars=\"vertical\" size=\"1\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-ComboboxViewport')}>\n <CommandPrimitive.List\n {...listProps}\n ref={combinedRef}\n id={configContext.listboxId}\n role=\"listbox\"\n aria-label=\"Options\"\n className={classNames('rt-ComboboxList', className)}\n />\n </div>\n </ScrollArea>\n );\n});\nComboboxList.displayName = 'Combobox.List';\n\ntype ComboboxEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ninterface ComboboxEmptyProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> {}\n/**\n * Empty renders when no options match the search query.\n */\nconst ComboboxEmpty = React.forwardRef<ComboboxEmptyElement, ComboboxEmptyProps>(({ className, ...emptyProps }, forwardedRef) => (\n <CommandPrimitive.Empty {...emptyProps} ref={forwardedRef} className={classNames('rt-ComboboxEmpty', className)} />\n));\nComboboxEmpty.displayName = 'Combobox.Empty';\n\ntype ComboboxGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ninterface ComboboxGroupProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> {}\n/**\n * Group and Label mirror menu semantics for subheadings inside the list.\n */\nconst ComboboxGroup = React.forwardRef<ComboboxGroupElement, ComboboxGroupProps>(({ className, ...groupProps }, forwardedRef) => (\n <CommandPrimitive.Group {...groupProps} ref={forwardedRef} className={classNames('rt-BaseMenuGroup', 'rt-ComboboxGroup', className)} />\n));\nComboboxGroup.displayName = 'Combobox.Group';\n\ntype ComboboxLabelElement = React.ElementRef<'div'>;\ninterface ComboboxLabelProps extends React.ComponentPropsWithoutRef<'div'> {}\nconst ComboboxLabel = React.forwardRef<ComboboxLabelElement, ComboboxLabelProps>(({ className, ...labelProps }, forwardedRef) => (\n <div {...labelProps} ref={forwardedRef} className={classNames('rt-BaseMenuLabel', 'rt-ComboboxLabel', className)} />\n));\nComboboxLabel.displayName = 'Combobox.Label';\n\ntype ComboboxSeparatorElement = React.ElementRef<typeof CommandPrimitive.Separator>;\ninterface ComboboxSeparatorProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> {}\n/**\n * Separator visually divides logical sections of the option list.\n */\nconst ComboboxSeparator = React.forwardRef<ComboboxSeparatorElement, ComboboxSeparatorProps>(({ className, ...separatorProps }, forwardedRef) => (\n <CommandPrimitive.Separator {...separatorProps} ref={forwardedRef} className={classNames('rt-BaseMenuSeparator', 'rt-ComboboxSeparator', className)} />\n));\nComboboxSeparator.displayName = 'Combobox.Separator';\n\ntype ComboboxItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ninterface ComboboxItemProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, 'keywords'> {\n /** Display label for the item. Also used for search unless keywords are provided. */\n label?: string;\n /** Additional keywords for search filtering (overrides automatic label-based search). */\n keywords?: string[];\n}\n/**\n * Item wires cmdk's selection handling with Kookie UI tokens and\n * ensures labels are registered for displaying the current value.\n */\n/**\n * Extracts text content from React children recursively.\n * Used to derive searchable labels from JSX children.\n */\nfunction extractTextFromChildren(children: React.ReactNode): string {\n if (typeof children === 'string') return children;\n if (typeof children === 'number') return String(children);\n if (children == null || typeof children === 'boolean') return '';\n if (Array.isArray(children)) {\n return children.map(extractTextFromChildren).filter(Boolean).join(' ');\n }\n if (React.isValidElement(children)) {\n const props = children.props as { children?: React.ReactNode };\n if (props.children) {\n return extractTextFromChildren(props.children);\n }\n }\n return '';\n}\n\nconst ComboboxItem = React.forwardRef<ComboboxItemElement, ComboboxItemProps>(({ className, children, label, value, disabled, onSelect, keywords, ...itemProps }, forwardedRef) => {\n // Use specific contexts - config for disabled, selection for value/registration\n // This means items only re-render when selection changes, not on search or navigation\n const configContext = useComboboxConfigContext('Combobox.Item');\n const selectionContext = useComboboxSelectionContext('Combobox.Item');\n const contentContext = useComboboxContentContext();\n\n // Memoize label extraction to avoid recursive traversal on every render\n const extractedLabel = React.useMemo(() => extractTextFromChildren(children), [children]);\n const itemLabel = label ?? (extractedLabel || String(value));\n const isSelected = value != null && selectionContext.value === value;\n const sizeClass = contentContext?.size ? `rt-r-size-${contentContext.size}` : undefined;\n\n // Use provided keywords, or default to the item label for search\n // This allows searching by display text even when value is different (e.g., \"usa\" vs \"United States\")\n const searchKeywords = keywords ?? [itemLabel];\n\n // Generate stable ID for this item for aria-activedescendant\n const generatedId = React.useId();\n const itemId = `combobox-item-${generatedId}`;\n\n // Destructure stable references to avoid effect re-runs when unrelated context values change\n const { registerItemLabel, unregisterItemLabel, handleSelect: contextHandleSelect } = selectionContext;\n\n // Register/unregister label for display in trigger\n React.useEffect(() => {\n if (value) {\n registerItemLabel(value, itemLabel);\n return () => unregisterItemLabel(value);\n }\n }, [registerItemLabel, unregisterItemLabel, value, itemLabel]);\n\n const handleSelect = React.useCallback(\n (selectedValue: string) => {\n contextHandleSelect(selectedValue);\n onSelect?.(selectedValue);\n },\n [contextHandleSelect, onSelect],\n );\n\n const isDisabled = disabled ?? configContext.disabled ?? false;\n\n /**\n * Performance notes:\n * - data-disabled workaround: Handled via CSS selectors in combobox.css\n * rather than per-item MutationObservers.\n * - aria-activedescendant: Tracked by a single observer in ComboboxList\n * rather than per-item observers.\n */\n\n return (\n <CommandPrimitive.Item\n {...itemProps}\n id={itemId}\n value={value}\n keywords={searchKeywords}\n role=\"option\"\n aria-selected={isSelected}\n {...(isDisabled ? { disabled: true, 'aria-disabled': true } : {})}\n ref={forwardedRef}\n onSelect={handleSelect}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-ComboboxItem', className)}\n >\n {isSelected ? (\n <span className={classNames('rt-BaseMenuItemIndicator', 'rt-ComboboxItemIndicator', sizeClass)}>\n <ThickCheckIcon className={classNames('rt-BaseMenuItemIndicatorIcon', 'rt-ComboboxItemIndicatorIcon', sizeClass)} />\n </span>\n ) : null}\n <Slottable>{children}</Slottable>\n </CommandPrimitive.Item>\n );\n});\nComboboxItem.displayName = 'Combobox.Item';\n\nexport {\n ComboboxRoot as Root,\n ComboboxTrigger as Trigger,\n ComboboxValue as Value,\n ComboboxContent as Content,\n ComboboxInput as Input,\n ComboboxList as List,\n ComboboxEmpty as Empty,\n ComboboxGroup as Group,\n ComboboxLabel as Label,\n ComboboxSeparator as Separator,\n ComboboxItem as Item,\n};\nexport type {\n ComboboxRootProps as RootProps,\n ComboboxTriggerProps as TriggerProps,\n ComboboxValueProps as ValueProps,\n ComboboxContentProps as ContentProps,\n ComboboxInputProps as InputProps,\n ComboboxListProps as ListProps,\n ComboboxEmptyProps as EmptyProps,\n ComboboxGroupProps as GroupProps,\n ComboboxLabelProps as LabelProps,\n ComboboxSeparatorProps as SeparatorProps,\n ComboboxItemProps as ItemProps,\n};\n"],
|
|
5
|
+
"mappings": "slBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,EAAA,UAAAC,EAAA,UAAAC,GAAA,UAAAC,EAAA,SAAAC,GAAA,UAAAC,GAAA,SAAAC,EAAA,SAAAC,EAAA,cAAAC,GAAA,YAAAC,EAAA,UAAAC,IAAA,eAAAC,GAAAb,IASA,IAAAc,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAqC,6BACrCC,EAA4C,gBAE5CC,EAA6B,uCAC7BC,EAAuF,+BACvFC,GAA+B,oCAC/BC,EAAgD,sBAChDC,EAAuC,sBACvCC,GAAoC,+CACpCC,EAAyB,2BACzBC,GAA2B,4BAC3BC,GAA0B,qBAC1B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AAA,cAAC,QAAK,aAAW,EAAAiG,SAAW,2BAA4B,2BAA4B6C,CAAS,GAC3F9I,EAAA,cAAC,kBAAe,aAAW,EAAAiG,SAAW,+BAAgC,+BAAgC6C,CAAS,EAAG,CACpH,EACE,KACJ9I,EAAA,cAAC,kBAAWiC,CAAS,CACvB,CAEJ,CAAC,EACDzC,GAAa,YAAc",
|
|
6
|
+
"names": ["combobox_exports", "__export", "ComboboxContent", "ComboboxEmpty", "ComboboxGroup", "ComboboxInput", "ComboboxItem", "ComboboxLabel", "ComboboxList", "ComboboxRoot", "ComboboxSeparator", "ComboboxTrigger", "ComboboxValue", "__toCommonJS", "React", "import_classnames", "import_internal", "import_cmdk", "import_extract_props", "import_combobox_props", "import_margin_props", "import_icons", "import_theme", "import_require_react_element", "Popover", "import_scroll_area", "import_slot", "import_text_field_props", "SIZE_CLASS_REGEX", "ComboboxConfigContext", "ComboboxSelectionContext", "ComboboxSearchContext", "ComboboxNavigationContext", "useComboboxConfigContext", "caller", "ctx", "useComboboxSelectionContext", "useComboboxSearchContext", "useComboboxNavigationContext", "useComboboxContext", "config", "selection", "search", "navigation", "ComboboxContentContext", "useComboboxContentContext", "props", "children", "size", "highContrast", "valueProp", "defaultValue", "onValueChange", "openProp", "defaultOpen", "onOpenChange", "placeholder", "searchPlaceholder", "searchValueProp", "defaultSearchValue", "onSearchValueChange", "filter", "shouldFilter", "loop", "disabled", "resetSearchOnSelect", "color", "displayValueProp", "rootProps", "listboxId", "activeDescendantId", "setActiveDescendantId", "open", "setOpen", "value", "setValue", "searchValue", "setSearchValue", "labelMapRef", "selectedLabel", "setSelectedLabel", "registerItemLabel", "itemValue", "label", "unregisterItemLabel", "handleSelect", "nextValue", "resolvedDisplayValue", "configContextValue", "selectionContextValue", "searchContextValue", "navigationContextValue", "forwardedRef", "configContext", "selectionContext", "navigationContext", "className", "readOnly", "error", "loading", "radius", "triggerProps", "material", "panelBackground", "isDisabled", "resolvedColor", "ariaProps", "defaultContent", "buttonType", "restTriggerProps", "triggerChild", "classNames", "valueProps", "displayValue", "fallback", "themeContext", "effectiveMaterial", "sizeProp", "variantProp", "highContrastProp", "forceMount", "container", "contentProps", "sanitizedClassName", "token", "shouldForceMount", "CommandPrimitive", "startAdornment", "endAdornment", "inputVariant", "inputProps", "searchContext", "contentContext", "contentVariant", "textFieldVariant", "handleSearchChange", "inputField", "listProps", "listRef", "combinedRef", "node", "listNode", "updateActiveDescendant", "itemId", "observer", "emptyProps", "groupProps", "labelProps", "separatorProps", "extractTextFromChildren", "onSelect", "keywords", "itemProps", "extractedLabel", "itemLabel", "isSelected", "sizeClass", "searchKeywords", "contextHandleSelect", "selectedValue"]
|
|
7
7
|
}
|
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';
|
|
3
3
|
import { dropdownMenuContentPropDefs, dropdownMenuItemPropDefs, dropdownMenuCheckboxItemPropDefs, dropdownMenuRadioItemPropDefs } from './dropdown-menu.props.js';
|
|
4
|
+
import type { SubmenuBehavior } from './_internal/dropdown-menu-drill-down.js';
|
|
4
5
|
import type { IconProps } from './icons.js';
|
|
5
6
|
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
6
|
-
import type { GetPropDefTypes } from '../props/prop-def.js';
|
|
7
|
+
import type { GetPropDefTypes, Responsive } from '../props/prop-def.js';
|
|
7
8
|
interface DropdownMenuRootProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {
|
|
8
9
|
}
|
|
9
10
|
declare const DropdownMenuRoot: React.FC<DropdownMenuRootProps>;
|
|
10
11
|
interface DropdownMenuTriggerProps extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Trigger, RemovedProps> {
|
|
11
12
|
}
|
|
12
13
|
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
-
type DropdownMenuContentOwnProps = GetPropDefTypes<typeof dropdownMenuContentPropDefs
|
|
14
|
-
|
|
14
|
+
type DropdownMenuContentOwnProps = GetPropDefTypes<typeof dropdownMenuContentPropDefs> & {
|
|
15
|
+
/**
|
|
16
|
+
* Controls how submenus behave.
|
|
17
|
+
* - `cascade`: Default cascading behavior where submenus open to the side (portal-based)
|
|
18
|
+
* - `drill-down`: Mobile-friendly behavior where submenus replace the content inline
|
|
19
|
+
* Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`
|
|
20
|
+
*/
|
|
21
|
+
submenuBehavior?: Responsive<SubmenuBehavior>;
|
|
22
|
+
};
|
|
23
|
+
type DropdownMenuContentContextValue = Omit<DropdownMenuContentOwnProps, 'submenuBehavior'>;
|
|
15
24
|
interface DropdownMenuContentProps extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Content, RemovedProps>, DropdownMenuContentContextValue {
|
|
16
25
|
container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];
|
|
26
|
+
/**
|
|
27
|
+
* Controls how submenus behave.
|
|
28
|
+
* - `cascade`: Default cascading behavior where submenus open to the side (portal-based)
|
|
29
|
+
* - `drill-down`: Mobile-friendly behavior where submenus replace the content inline
|
|
30
|
+
* Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`
|
|
31
|
+
*/
|
|
32
|
+
submenuBehavior?: Responsive<SubmenuBehavior>;
|
|
17
33
|
}
|
|
18
34
|
declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
35
|
interface DropdownMenuLabelProps extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Label, RemovedProps> {
|
|
@@ -38,21 +54,26 @@ interface DropdownMenuCheckboxItemProps extends ComponentPropsWithout<typeof Dro
|
|
|
38
54
|
}
|
|
39
55
|
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
56
|
interface DropdownMenuSubProps extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub> {
|
|
57
|
+
/**
|
|
58
|
+
* Label displayed in the back button when using drill-down mode.
|
|
59
|
+
* If not provided, defaults to "Back".
|
|
60
|
+
*/
|
|
61
|
+
label?: React.ReactNode;
|
|
41
62
|
}
|
|
42
63
|
declare const DropdownMenuSub: React.FC<DropdownMenuSubProps>;
|
|
43
64
|
interface DropdownMenuSubTriggerProps extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubTrigger, RemovedProps> {
|
|
44
65
|
}
|
|
45
66
|
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
interface DropdownMenuSeparatorProps extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Separator, RemovedProps> {
|
|
68
|
+
}
|
|
69
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
70
|
interface DropdownMenuSubContentProps extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubContent, RemovedProps>, DropdownMenuContentContextValue {
|
|
47
71
|
container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];
|
|
48
72
|
}
|
|
49
73
|
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
-
interface DropdownMenuSeparatorProps extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Separator, RemovedProps> {
|
|
51
|
-
}
|
|
52
|
-
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
74
|
interface DropdownMenuTriggerIconProps extends IconProps {
|
|
54
75
|
}
|
|
55
76
|
declare const DropdownMenuTriggerIcon: React.ForwardRefExoticComponent<DropdownMenuTriggerIconProps & React.RefAttributes<SVGSVGElement>>;
|
|
56
77
|
export { DropdownMenuRoot as Root, DropdownMenuTrigger as Trigger, DropdownMenuTriggerIcon as TriggerIcon, DropdownMenuContent as Content, DropdownMenuLabel as Label, DropdownMenuItem as Item, DropdownMenuGroup as Group, DropdownMenuRadioGroup as RadioGroup, DropdownMenuRadioItem as RadioItem, DropdownMenuCheckboxItem as CheckboxItem, DropdownMenuSub as Sub, DropdownMenuSubTrigger as SubTrigger, DropdownMenuSubContent as SubContent, DropdownMenuSeparator as Separator, };
|
|
57
|
-
export type { DropdownMenuRootProps as RootProps, DropdownMenuTriggerProps as TriggerProps, DropdownMenuTriggerIconProps as TriggerIconProps, DropdownMenuContentProps as ContentProps, DropdownMenuLabelProps as LabelProps, DropdownMenuItemProps as ItemProps, DropdownMenuGroupProps as GroupProps, DropdownMenuRadioGroupProps as RadioGroupProps, DropdownMenuRadioItemProps as RadioItemProps, DropdownMenuCheckboxItemProps as CheckboxItemProps, DropdownMenuSubProps as SubProps, DropdownMenuSubTriggerProps as SubTriggerProps, DropdownMenuSubContentProps as SubContentProps, DropdownMenuSeparatorProps as SeparatorProps, };
|
|
78
|
+
export type { DropdownMenuRootProps as RootProps, DropdownMenuTriggerProps as TriggerProps, DropdownMenuTriggerIconProps as TriggerIconProps, DropdownMenuContentProps as ContentProps, DropdownMenuLabelProps as LabelProps, DropdownMenuItemProps as ItemProps, DropdownMenuGroupProps as GroupProps, DropdownMenuRadioGroupProps as RadioGroupProps, DropdownMenuRadioItemProps as RadioItemProps, DropdownMenuCheckboxItemProps as CheckboxItemProps, DropdownMenuSubProps as SubProps, DropdownMenuSubTriggerProps as SubTriggerProps, DropdownMenuSubContentProps as SubContentProps, DropdownMenuSeparatorProps as SeparatorProps, SubmenuBehavior, };
|
|
58
79
|
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu.tsx"],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e,IAAI,GAAG,EACtB,sBAAsB,IAAI,UAAU,EACpC,sBAAsB,IAAI,UAAU,EACpC,qBAAqB,IAAI,SAAS,GACnC,CAAC;AAEF,YAAY,EACV,qBAAqB,IAAI,SAAS,EAClC,wBAAwB,IAAI,YAAY,EACxC,4BAA4B,IAAI,gBAAgB,EAChD,wBAAwB,IAAI,YAAY,EACxC,sBAAsB,IAAI,UAAU,EACpC,qBAAqB,IAAI,SAAS,EAClC,sBAAsB,IAAI,UAAU,EACpC,2BAA2B,IAAI,eAAe,EAC9C,0BAA0B,IAAI,cAAc,EAC5C,6BAA6B,IAAI,iBAAiB,EAClD,oBAAoB,IAAI,QAAQ,EAChC,2BAA2B,IAAI,eAAe,EAC9C,2BAA2B,IAAI,eAAe,EAC9C,0BAA0B,IAAI,cAAc,EAC5C,eAAe,GAChB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var Q=Object.create;var v=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var ee=(o,n)=>{for(var r in n)v(o,r,{get:n[r],enumerable:!0})},K=(o,n,r,p)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of Y(n))!$.call(o,t)&&t!==r&&v(o,t,{get:()=>n[t],enumerable:!(p=X(n,t))||p.enumerable});return o};var j=(o,n,r)=>(r=o!=null?Q(Z(o)):{},K(n||!o||!o.__esModule?v(r,"default",{value:o,enumerable:!0}):r,o)),oe=o=>K(v({},"__esModule",{value:!0}),o);var pe={};ee(pe,{CheckboxItem:()=>L,Content:()=>x,Group:()=>k,Item:()=>B,Label:()=>N,RadioGroup:()=>E,RadioItem:()=>G,Root:()=>R,Separator:()=>b,Sub:()=>W,SubContent:()=>V,SubTrigger:()=>O,Trigger:()=>T,TriggerIcon:()=>_});module.exports=oe(pe);var e=j(require("react")),a=j(require("classnames")),i=require("radix-ui"),h=require("./scroll-area.js"),m=require("./dropdown-menu.props.js"),M=require("./theme.js"),w=require("./icons.js"),S=require("../helpers/extract-props.js"),u=require("./_internal/dropdown-menu-drill-down.js"),q=require("../helpers/require-react-element.js"),y=require("./kbd.js");const R=o=>e.createElement(i.DropdownMenu.Root,{...o});R.displayName="DropdownMenu.Root";const T=e.forwardRef(({children:o,...n},r)=>e.createElement(i.DropdownMenu.Trigger,{...n,ref:r,asChild:!0},(0,q.requireReactElement)(o)));T.displayName="DropdownMenu.Trigger";function ne({children:o}){const n=(0,u.useDrillDownOptional)();return!n||n.behavior==="cascade"?e.createElement(e.Fragment,null,o):e.createElement("div",{className:"rt-DropdownMenuDrillDownRoot","data-drill-down-active":n.isRoot?void 0:!0},o)}const F=e.createContext({}),x=e.forwardRef((o,n)=>{const r=(0,M.useThemeContext)();e.useEffect(()=>{o.panelBackground!==void 0&&console.warn("Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.")},[o.panelBackground]);const p=o.material??o.panelBackground??r.panelBackground,t=e.useMemo(()=>({material:p,accentColor:r.accentColor}),[p,r.accentColor]),{size:d=m.dropdownMenuContentPropDefs.size.default,variant:l=m.dropdownMenuContentPropDefs.variant.default,highContrast:c=m.dropdownMenuContentPropDefs.highContrast.default,material:D=t.material,submenuBehavior:s}=o,{className:f,children:P,color:C,container:I,forceMount:H,material:U,panelBackground:z,submenuBehavior:A,...J}=(0,S.extractProps)(o,m.dropdownMenuContentPropDefs),g=e.useMemo(()=>C||t.accentColor,[C,t.accentColor]);return e.createElement(i.DropdownMenu.Portal,{container:I,forceMount:H},e.createElement(M.Theme,{asChild:!0},e.createElement(i.DropdownMenu.Content,{"data-accent-color":g,"data-material":D,"data-panel-background":D,align:"start",sideOffset:4,collisionPadding:10,...J,asChild:!1,ref:n,className:(0,a.default)("rt-PopperContent","rt-BaseMenuContent","rt-DropdownMenuContent",f)},e.createElement(h.ScrollArea,{type:"auto"},e.createElement("div",{className:(0,a.default)("rt-BaseMenuViewport","rt-DropdownMenuViewport")},e.createElement(F.Provider,{value:e.useMemo(()=>({size:d,variant:l,color:g,highContrast:c,material:D}),[d,l,g,c,D])},e.createElement(u.DrillDownProvider,{submenuBehavior:s},e.createElement(ne,null,P))))))))});x.displayName="DropdownMenu.Content";const N=e.forwardRef(({className:o,...n},r)=>e.createElement(i.DropdownMenu.Label,{...n,asChild:!1,ref:r,className:(0,a.default)("rt-BaseMenuLabel","rt-DropdownMenuLabel",o)}));N.displayName="DropdownMenu.Label";const B=e.forwardRef((o,n)=>{const{className:r,children:p,color:t=m.dropdownMenuItemPropDefs.color.default,shortcut:d,...l}=o;return e.createElement(i.DropdownMenu.Item,{"data-accent-color":t,...l,ref:n,className:(0,a.default)("rt-reset","rt-BaseMenuItem","rt-DropdownMenuItem",r)},e.createElement(i.Slot.Slottable,null,p),d&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},e.createElement(y.Kbd,{size:"1"},d)))});B.displayName="DropdownMenu.Item";const k=e.forwardRef(({className:o,...n},r)=>e.createElement(i.DropdownMenu.Group,{...n,asChild:!1,ref:r,className:(0,a.default)("rt-BaseMenuGroup","rt-DropdownMenuGroup",o)}));k.displayName="DropdownMenu.Group";const E=e.forwardRef(({className:o,...n},r)=>e.createElement(i.DropdownMenu.RadioGroup,{...n,asChild:!1,ref:r,className:(0,a.default)("rt-BaseMenuRadioGroup","rt-DropdownMenuRadioGroup",o)}));E.displayName="DropdownMenu.RadioGroup";const G=e.forwardRef((o,n)=>{const{children:r,className:p,color:t=m.dropdownMenuRadioItemPropDefs.color.default,...d}=o;return e.createElement(i.DropdownMenu.RadioItem,{...d,asChild:!1,ref:n,"data-accent-color":t,className:(0,a.default)("rt-BaseMenuItem","rt-BaseMenuRadioItem","rt-DropdownMenuItem","rt-DropdownMenuRadioItem",p)},r,e.createElement(i.DropdownMenu.ItemIndicator,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},e.createElement(w.ThickDotIcon,{className:"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon"})))});G.displayName="DropdownMenu.RadioItem";const L=e.forwardRef((o,n)=>{const{children:r,className:p,shortcut:t,color:d=m.dropdownMenuCheckboxItemPropDefs.color.default,...l}=o;return e.createElement(i.DropdownMenu.CheckboxItem,{...l,asChild:!1,ref:n,"data-accent-color":d,className:(0,a.default)("rt-BaseMenuItem","rt-BaseMenuCheckboxItem","rt-DropdownMenuItem","rt-DropdownMenuCheckboxItem",p)},r,e.createElement(i.DropdownMenu.ItemIndicator,{className:"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator"},e.createElement(w.ThickCheckIcon,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})),t&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},e.createElement(y.Kbd,{size:"1"},t)))});L.displayName="DropdownMenu.CheckboxItem";function re(){return e.useId()}const W=({label:o="Back",...n})=>{const r=(0,u.useDrillDownOptional)(),p=re(),t=e.useMemo(()=>({id:p,label:o}),[p,o]);return r?.behavior==="drill-down"?e.createElement(u.SubContext.Provider,{value:t},n.children):e.createElement(u.SubContext.Provider,{value:t},e.createElement(i.DropdownMenu.Sub,{...n}))};W.displayName="DropdownMenu.Sub";const O=e.forwardRef((o,n)=>{const{className:r,children:p,onClick:t,...d}=o,l=(0,u.useDrillDownOptional)(),c=(0,u.useSubContext)();return l?.behavior==="drill-down"&&c?e.createElement("div",{role:"menuitem",tabIndex:0,ref:n,onClick:s=>{s.preventDefault(),l.push(c.id),t?.(s)},onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),l.push(c.id))},className:(0,a.default)("rt-reset","rt-BaseMenuItem","rt-BaseMenuSubTrigger","rt-DropdownMenuItem","rt-DropdownMenuSubTrigger","rt-DropdownMenuDrillDownSubTrigger",r)},p,e.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},e.createElement(w.ThickChevronRightIcon,{className:"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon"}))):e.createElement(i.DropdownMenu.SubTrigger,{...d,onClick:t,asChild:!1,ref:n,className:(0,a.default)("rt-BaseMenuItem","rt-BaseMenuSubTrigger","rt-DropdownMenuItem","rt-DropdownMenuSubTrigger",r)},p,e.createElement("div",{className:"rt-BaseMenuShortcut rt-DropdownMenuShortcut"},e.createElement(w.ThickChevronRightIcon,{className:"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon"})))});O.displayName="DropdownMenu.SubTrigger";const b=e.forwardRef(({className:o,...n},r)=>e.createElement(i.DropdownMenu.Separator,{...n,asChild:!1,ref:r,className:(0,a.default)("rt-BaseMenuSeparator","rt-DropdownMenuSeparator",o)}));b.displayName="DropdownMenu.Separator";function te({label:o}){const n=(0,u.useDrillDown)();return e.createElement("div",{role:"menuitem",tabIndex:0,onClick:r=>{r.preventDefault(),n.pop()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),n.pop())},className:(0,a.default)("rt-reset","rt-BaseMenuItem","rt-DropdownMenuItem","rt-DropdownMenuDrillDownBackItem")},e.createElement(w.ThickChevronLeftIcon,{className:"rt-DropdownMenuDrillDownBackIcon"}),e.createElement("span",{className:"rt-DropdownMenuDrillDownBackLabel"},o))}const V=e.forwardRef((o,n)=>{const r=e.useContext(F),{size:p,variant:t,color:d,highContrast:l,material:c}=e.useMemo(()=>r,[r]),D=(0,u.useDrillDownOptional)(),s=(0,u.useSubContext)(),{className:f,children:P,container:C,forceMount:I,material:H,panelBackground:U,...z}=(0,S.extractProps)({size:p,variant:t,color:d,highContrast:l,material:c,...o},m.dropdownMenuSubContentPropDefs);if(D?.behavior==="drill-down"&&s){const A=D.isActive(s.id);return e.createElement("div",{ref:n,role:"menu","aria-label":typeof s.label=="string"?s.label:void 0,"data-drill-down-active":A?!0:void 0,className:(0,a.default)("rt-DropdownMenuDrillDownPanel",f)},e.createElement(te,{label:s.label}),e.createElement(b,null),P)}return e.createElement(i.DropdownMenu.Portal,{container:C,forceMount:I},e.createElement(M.Theme,{asChild:!0},e.createElement(i.DropdownMenu.SubContent,{"data-accent-color":d,"data-material":c,"data-panel-background":c,alignOffset:-Number(p)*4,sideOffset:1,collisionPadding:10,...z,asChild:!1,ref:n,className:(0,a.default)("rt-PopperContent","rt-BaseMenuContent","rt-BaseMenuSubContent","rt-DropdownMenuContent","rt-DropdownMenuSubContent",f)},e.createElement(h.ScrollArea,{type:"auto"},e.createElement("div",{className:(0,a.default)("rt-BaseMenuViewport","rt-DropdownMenuViewport")},P)))))});V.displayName="DropdownMenu.SubContent";const _=e.forwardRef((o,n)=>e.createElement(w.ChevronDownIcon,{...o,ref:n,className:"rt-DropdownMenuTriggerIcon"}));_.displayName="DropdownMenu.TriggerIcon";
|
|
2
2
|
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/dropdown-menu.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { DropdownMenu as DropdownMenuPrimitive, Slot } from 'radix-ui';\n\nimport { ScrollArea } from './scroll-area.js';\nimport {\n dropdownMenuContentPropDefs,\n dropdownMenuItemPropDefs,\n dropdownMenuCheckboxItemPropDefs,\n dropdownMenuRadioItemPropDefs,\n} from './dropdown-menu.props.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { ChevronDownIcon, ThickCheckIcon, ThickChevronRightIcon, ThickDotIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { Kbd } from './kbd.js';\n\nimport type { IconProps } from './icons.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ninterface DropdownMenuRootProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\nconst DropdownMenuRoot: React.FC<DropdownMenuRootProps> = (props) => (\n <DropdownMenuPrimitive.Root {...props} />\n);\nDropdownMenuRoot.displayName = 'DropdownMenu.Root';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.Trigger>;\ninterface DropdownMenuTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Trigger, RemovedProps> {}\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DropdownMenuPrimitive.Trigger>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenu.Trigger';\n\ntype DropdownMenuContentOwnProps = GetPropDefTypes<typeof dropdownMenuContentPropDefs>;\ntype DropdownMenuContentContextValue = DropdownMenuContentOwnProps;\nconst DropdownMenuContentContext = React.createContext<DropdownMenuContentContextValue>({});\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ninterface DropdownMenuContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Content, RemovedProps>,\n DropdownMenuContentContextValue {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n}\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n\n // Show deprecation warning for panelBackground when used\n React.useEffect(() => {\n if (props.panelBackground !== undefined) {\n console.warn(\n 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.',\n );\n }\n }, [props.panelBackground]);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n props.material ?? props.panelBackground ?? themeContext.panelBackground;\n\n // Memoize theme context values to prevent unnecessary re-renders\n const memoizedThemeContext = React.useMemo(\n () => ({\n material: effectiveMaterial,\n accentColor: themeContext.accentColor,\n }),\n [effectiveMaterial, themeContext.accentColor],\n );\n\n const {\n size = dropdownMenuContentPropDefs.size.default,\n variant = dropdownMenuContentPropDefs.variant.default,\n highContrast = dropdownMenuContentPropDefs.highContrast.default,\n material = memoizedThemeContext.material,\n } = props;\n const {\n className,\n children,\n color,\n container,\n forceMount,\n material: _,\n panelBackground: __,\n ...contentProps\n } = extractProps(props, dropdownMenuContentPropDefs);\n\n // Memoize color resolution to prevent unnecessary re-renders\n const resolvedColor = React.useMemo(\n () => color || memoizedThemeContext.accentColor,\n [color, memoizedThemeContext.accentColor],\n );\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.Content\n data-accent-color={resolvedColor}\n data-material={material}\n data-panel-background={material}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-DropdownMenuContent',\n className,\n )}\n >\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n <DropdownMenuContentContext.Provider\n value={React.useMemo(\n () => ({ size, variant, color: resolvedColor, highContrast, material }),\n [size, variant, resolvedColor, highContrast, material],\n )}\n >\n {children}\n </DropdownMenuContentContext.Provider>\n </div>\n </ScrollArea>\n </DropdownMenuPrimitive.Content>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\nDropdownMenuContent.displayName = 'DropdownMenu.Content';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\ninterface DropdownMenuLabelProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Label, RemovedProps> {}\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Label\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuLabel', 'rt-DropdownMenuLabel', className)}\n />\n ),\n);\nDropdownMenuLabel.displayName = 'DropdownMenu.Label';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\ntype DropdownMenuItemOwnProps = GetPropDefTypes<typeof dropdownMenuItemPropDefs>;\ninterface DropdownMenuItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Item, RemovedProps>,\n DropdownMenuItemOwnProps {}\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n color = dropdownMenuItemPropDefs.color.default,\n shortcut,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.Item\n data-accent-color={color}\n {...itemProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-DropdownMenuItem', className)}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n )}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = 'DropdownMenu.Item';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.Group>;\ninterface DropdownMenuGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Group, RemovedProps> {}\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Group\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuGroup', 'rt-DropdownMenuGroup', className)}\n />\n ),\n);\nDropdownMenuGroup.displayName = 'DropdownMenu.Group';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioGroup, RemovedProps> {}\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.RadioGroup\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuRadioGroup', 'rt-DropdownMenuRadioGroup', className)}\n />\n));\nDropdownMenuRadioGroup.displayName = 'DropdownMenu.RadioGroup';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemOwnProps = GetPropDefTypes<typeof dropdownMenuRadioItemPropDefs>;\ninterface DropdownMenuRadioItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioItem, RemovedProps>,\n DropdownMenuRadioItemOwnProps {}\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n color = dropdownMenuRadioItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.RadioItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuRadioItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuRadioItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickDotIcon className=\"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.RadioItem>\n );\n});\nDropdownMenuRadioItem.displayName = 'DropdownMenu.RadioItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemOwnProps = GetPropDefTypes<typeof dropdownMenuCheckboxItemPropDefs>;\ninterface DropdownMenuCheckboxItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.CheckboxItem, RemovedProps>,\n DropdownMenuCheckboxItemOwnProps {}\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n shortcut,\n color = dropdownMenuCheckboxItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.CheckboxItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuCheckboxItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuCheckboxItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickCheckIcon className=\"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n )}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n});\nDropdownMenuCheckboxItem.displayName = 'DropdownMenu.CheckboxItem';\n\ninterface DropdownMenuSubProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub> {}\nconst DropdownMenuSub: React.FC<DropdownMenuSubProps> = (props) => (\n <DropdownMenuPrimitive.Sub {...props} />\n);\nDropdownMenuSub.displayName = 'DropdownMenu.Sub';\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubTrigger, RemovedProps> {}\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props, forwardedRef) => {\n const { className, children, ...subTriggerProps } = props;\n return (\n <DropdownMenuPrimitive.SubTrigger\n {...subTriggerProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuSubTrigger',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon\" />\n </div>\n </DropdownMenuPrimitive.SubTrigger>\n );\n});\nDropdownMenuSubTrigger.displayName = 'DropdownMenu.SubTrigger';\n\ntype DropdownMenuSubContentElement = React.ElementRef<typeof DropdownMenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubContent, RemovedProps>,\n DropdownMenuContentContextValue {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n}\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props, forwardedRef) => {\n // Memoize context consumption to prevent unnecessary re-renders\n const contextValue = React.useContext(DropdownMenuContentContext);\n const { size, variant, color, highContrast, material } = React.useMemo(\n () => contextValue,\n [contextValue],\n );\n\n const {\n className,\n children,\n container,\n forceMount,\n material: _,\n panelBackground: __,\n ...subContentProps\n } = extractProps(\n { size, variant, color, highContrast, material, ...props },\n dropdownMenuContentPropDefs,\n );\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.SubContent\n data-accent-color={color}\n data-material={material}\n data-panel-background={material}\n alignOffset={-Number(size) * 4}\n // Side offset accounts for the outer solid box-shadow\n sideOffset={1}\n collisionPadding={10}\n {...subContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-BaseMenuSubContent',\n 'rt-DropdownMenuContent',\n 'rt-DropdownMenuSubContent',\n className,\n )}\n >\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n {children}\n </div>\n </ScrollArea>\n </DropdownMenuPrimitive.SubContent>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n});\nDropdownMenuSubContent.displayName = 'DropdownMenu.SubContent';\n\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Separator, RemovedProps> {}\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuSeparator', 'rt-DropdownMenuSeparator', className)}\n />\n));\nDropdownMenuSeparator.displayName = 'DropdownMenu.Separator';\n\ntype DropdownMenuTriggerIconElement = React.ElementRef<'svg'>;\ninterface DropdownMenuTriggerIconProps extends IconProps {}\nconst DropdownMenuTriggerIcon = React.forwardRef<\n DropdownMenuTriggerIconElement,\n DropdownMenuTriggerIconProps\n>((props, forwardedRef) => (\n <ChevronDownIcon {...props} ref={forwardedRef} className=\"rt-DropdownMenuTriggerIcon\" />\n));\nDropdownMenuTriggerIcon.displayName = 'DropdownMenu.TriggerIcon';\n\nexport {\n DropdownMenuRoot as Root,\n DropdownMenuTrigger as Trigger,\n DropdownMenuTriggerIcon as TriggerIcon,\n DropdownMenuContent as Content,\n DropdownMenuLabel as Label,\n DropdownMenuItem as Item,\n DropdownMenuGroup as Group,\n DropdownMenuRadioGroup as RadioGroup,\n DropdownMenuRadioItem as RadioItem,\n DropdownMenuCheckboxItem as CheckboxItem,\n DropdownMenuSub as Sub,\n DropdownMenuSubTrigger as SubTrigger,\n DropdownMenuSubContent as SubContent,\n DropdownMenuSeparator as Separator,\n};\n\nexport type {\n DropdownMenuRootProps as RootProps,\n DropdownMenuTriggerProps as TriggerProps,\n DropdownMenuTriggerIconProps as TriggerIconProps,\n DropdownMenuContentProps as ContentProps,\n DropdownMenuLabelProps as LabelProps,\n DropdownMenuItemProps as ItemProps,\n DropdownMenuGroupProps as GroupProps,\n DropdownMenuRadioGroupProps as RadioGroupProps,\n DropdownMenuRadioItemProps as RadioItemProps,\n DropdownMenuCheckboxItemProps as CheckboxItemProps,\n DropdownMenuSubProps as SubProps,\n DropdownMenuSubTriggerProps as SubTriggerProps,\n DropdownMenuSubContentProps as SubContentProps,\n DropdownMenuSeparatorProps as SeparatorProps,\n};\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["dropdown_menu_exports", "__export", "DropdownMenuCheckboxItem", "DropdownMenuContent", "DropdownMenuGroup", "DropdownMenuItem", "DropdownMenuLabel", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "DropdownMenuRoot", "DropdownMenuSeparator", "DropdownMenuSub", "DropdownMenuSubContent", "DropdownMenuSubTrigger", "DropdownMenuTrigger", "DropdownMenuTriggerIcon", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "import_scroll_area", "import_dropdown_menu_props", "import_theme", "import_icons", "import_extract_props", "import_require_react_element", "import_kbd", "props", "DropdownMenuPrimitive", "children", "forwardedRef", "DropdownMenuContentContext", "themeContext", "effectiveMaterial", "memoizedThemeContext", "size", "variant", "highContrast", "material", "className", "color", "container", "forceMount", "_", "__", "contentProps", "resolvedColor", "classNames", "shortcut", "itemProps", "subTriggerProps", "contextValue", "subContentProps"]
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { DropdownMenu as DropdownMenuPrimitive, Slot } from 'radix-ui';\n\nimport { ScrollArea } from './scroll-area.js';\nimport {\n dropdownMenuContentPropDefs,\n dropdownMenuSubContentPropDefs,\n dropdownMenuItemPropDefs,\n dropdownMenuCheckboxItemPropDefs,\n dropdownMenuRadioItemPropDefs,\n} from './dropdown-menu.props.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDotIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport {\n DrillDownProvider,\n SubContext,\n useDrillDown,\n useDrillDownOptional,\n useSubContext,\n} from './_internal/dropdown-menu-drill-down.js';\nimport type { SubmenuBehavior } from './_internal/dropdown-menu-drill-down.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { Kbd } from './kbd.js';\n\nimport type { IconProps } from './icons.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes, Responsive } from '../props/prop-def.js';\n\ninterface DropdownMenuRootProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\nconst DropdownMenuRoot: React.FC<DropdownMenuRootProps> = (props) => (\n <DropdownMenuPrimitive.Root {...props} />\n);\nDropdownMenuRoot.displayName = 'DropdownMenu.Root';\n\ntype DropdownMenuTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.Trigger>;\ninterface DropdownMenuTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Trigger, RemovedProps> {}\nconst DropdownMenuTrigger = React.forwardRef<DropdownMenuTriggerElement, DropdownMenuTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </DropdownMenuPrimitive.Trigger>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenu.Trigger';\n\n/**\n * Internal component that wraps root menu items and handles visibility in drill-down mode.\n * In drill-down mode, this hides when a submenu is active.\n */\nfunction DrillDownRoot({ children }: { children: React.ReactNode }) {\n const drillDown = useDrillDownOptional();\n\n // In cascade mode or when no drill-down context, always show\n if (!drillDown || drillDown.behavior === 'cascade') {\n return <>{children}</>;\n }\n\n // In drill-down mode, hide root when a submenu is active\n return (\n <div\n className=\"rt-DropdownMenuDrillDownRoot\"\n data-drill-down-active={drillDown.isRoot ? undefined : true}\n >\n {children}\n </div>\n );\n}\n\ntype DropdownMenuContentOwnProps = GetPropDefTypes<typeof dropdownMenuContentPropDefs> & {\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior?: Responsive<SubmenuBehavior>;\n};\ntype DropdownMenuContentContextValue = Omit<DropdownMenuContentOwnProps, 'submenuBehavior'>;\nconst DropdownMenuContentContext = React.createContext<DropdownMenuContentContextValue>({});\ntype DropdownMenuContentElement = React.ElementRef<typeof DropdownMenuPrimitive.Content>;\ninterface DropdownMenuContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Content, RemovedProps>,\n DropdownMenuContentContextValue {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior?: Responsive<SubmenuBehavior>;\n}\nconst DropdownMenuContent = React.forwardRef<DropdownMenuContentElement, DropdownMenuContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n\n // Show deprecation warning for panelBackground when used\n React.useEffect(() => {\n if (props.panelBackground !== undefined) {\n console.warn(\n 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.',\n );\n }\n }, [props.panelBackground]);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n props.material ?? props.panelBackground ?? themeContext.panelBackground;\n\n // Memoize theme context values to prevent unnecessary re-renders\n const memoizedThemeContext = React.useMemo(\n () => ({\n material: effectiveMaterial,\n accentColor: themeContext.accentColor,\n }),\n [effectiveMaterial, themeContext.accentColor],\n );\n\n const {\n size = dropdownMenuContentPropDefs.size.default,\n variant = dropdownMenuContentPropDefs.variant.default,\n highContrast = dropdownMenuContentPropDefs.highContrast.default,\n material = memoizedThemeContext.material,\n submenuBehavior,\n } = props;\n const {\n className,\n children,\n color,\n container,\n forceMount,\n material: _,\n panelBackground: __,\n submenuBehavior: ___,\n ...contentProps\n } = extractProps(props, dropdownMenuContentPropDefs);\n\n // Memoize color resolution to prevent unnecessary re-renders\n const resolvedColor = React.useMemo(\n () => color || memoizedThemeContext.accentColor,\n [color, memoizedThemeContext.accentColor],\n );\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.Content\n data-accent-color={resolvedColor}\n data-material={material}\n data-panel-background={material}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n {...contentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-DropdownMenuContent',\n className,\n )}\n >\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n <DropdownMenuContentContext.Provider\n value={React.useMemo(\n () => ({ size, variant, color: resolvedColor, highContrast, material }),\n [size, variant, resolvedColor, highContrast, material],\n )}\n >\n <DrillDownProvider submenuBehavior={submenuBehavior}>\n <DrillDownRoot>{children}</DrillDownRoot>\n </DrillDownProvider>\n </DropdownMenuContentContext.Provider>\n </div>\n </ScrollArea>\n </DropdownMenuPrimitive.Content>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\nDropdownMenuContent.displayName = 'DropdownMenu.Content';\n\ntype DropdownMenuLabelElement = React.ElementRef<typeof DropdownMenuPrimitive.Label>;\ninterface DropdownMenuLabelProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Label, RemovedProps> {}\nconst DropdownMenuLabel = React.forwardRef<DropdownMenuLabelElement, DropdownMenuLabelProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Label\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuLabel', 'rt-DropdownMenuLabel', className)}\n />\n ),\n);\nDropdownMenuLabel.displayName = 'DropdownMenu.Label';\n\ntype DropdownMenuItemElement = React.ElementRef<typeof DropdownMenuPrimitive.Item>;\ntype DropdownMenuItemOwnProps = GetPropDefTypes<typeof dropdownMenuItemPropDefs>;\ninterface DropdownMenuItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Item, RemovedProps>,\n DropdownMenuItemOwnProps {}\nconst DropdownMenuItem = React.forwardRef<DropdownMenuItemElement, DropdownMenuItemProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n color = dropdownMenuItemPropDefs.color.default,\n shortcut,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.Item\n data-accent-color={color}\n {...itemProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-DropdownMenuItem', className)}\n >\n <Slot.Slottable>{children}</Slot.Slottable>\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n )}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = 'DropdownMenu.Item';\n\ntype DropdownMenuGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.Group>;\ninterface DropdownMenuGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Group, RemovedProps> {}\nconst DropdownMenuGroup = React.forwardRef<DropdownMenuGroupElement, DropdownMenuGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Group\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuGroup', 'rt-DropdownMenuGroup', className)}\n />\n ),\n);\nDropdownMenuGroup.displayName = 'DropdownMenu.Group';\n\ntype DropdownMenuRadioGroupElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioGroup>;\ninterface DropdownMenuRadioGroupProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioGroup, RemovedProps> {}\nconst DropdownMenuRadioGroup = React.forwardRef<\n DropdownMenuRadioGroupElement,\n DropdownMenuRadioGroupProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.RadioGroup\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuRadioGroup', 'rt-DropdownMenuRadioGroup', className)}\n />\n));\nDropdownMenuRadioGroup.displayName = 'DropdownMenu.RadioGroup';\n\ntype DropdownMenuRadioItemElement = React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>;\ntype DropdownMenuRadioItemOwnProps = GetPropDefTypes<typeof dropdownMenuRadioItemPropDefs>;\ninterface DropdownMenuRadioItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.RadioItem, RemovedProps>,\n DropdownMenuRadioItemOwnProps {}\nconst DropdownMenuRadioItem = React.forwardRef<\n DropdownMenuRadioItemElement,\n DropdownMenuRadioItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n color = dropdownMenuRadioItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.RadioItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuRadioItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuRadioItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickDotIcon className=\"rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </DropdownMenuPrimitive.RadioItem>\n );\n});\nDropdownMenuRadioItem.displayName = 'DropdownMenu.RadioItem';\n\ntype DropdownMenuCheckboxItemElement = React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>;\ntype DropdownMenuCheckboxItemOwnProps = GetPropDefTypes<typeof dropdownMenuCheckboxItemPropDefs>;\ninterface DropdownMenuCheckboxItemProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.CheckboxItem, RemovedProps>,\n DropdownMenuCheckboxItemOwnProps {}\nconst DropdownMenuCheckboxItem = React.forwardRef<\n DropdownMenuCheckboxItemElement,\n DropdownMenuCheckboxItemProps\n>((props, forwardedRef) => {\n const {\n children,\n className,\n shortcut,\n color = dropdownMenuCheckboxItemPropDefs.color.default,\n ...itemProps\n } = props;\n return (\n <DropdownMenuPrimitive.CheckboxItem\n {...itemProps}\n asChild={false}\n ref={forwardedRef}\n data-accent-color={color}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuCheckboxItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuCheckboxItem',\n className,\n )}\n >\n {children}\n <DropdownMenuPrimitive.ItemIndicator className=\"rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator\">\n <ThickCheckIcon className=\"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <Kbd size=\"1\">{shortcut}</Kbd>\n </div>\n )}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n});\nDropdownMenuCheckboxItem.displayName = 'DropdownMenu.CheckboxItem';\n\n// Generate unique submenu IDs using React 18's useId for SSR safety\nfunction useSubId() {\n return React.useId();\n}\n\ninterface DropdownMenuSubProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Sub> {\n /**\n * Label displayed in the back button when using drill-down mode.\n * If not provided, defaults to \"Back\".\n */\n label?: React.ReactNode;\n}\nconst DropdownMenuSub: React.FC<DropdownMenuSubProps> = ({ label = 'Back', ...props }) => {\n const drillDown = useDrillDownOptional();\n const subId = useSubId();\n\n // Create context value for SubContent and SubTrigger\n const subContextValue = React.useMemo(\n () => ({ id: subId, label }),\n [subId, label]\n );\n\n // In drill-down mode, we don't use Radix's Sub component\n // We just provide the SubContext and render children\n if (drillDown?.behavior === 'drill-down') {\n return (\n <SubContext.Provider value={subContextValue}>\n {props.children}\n </SubContext.Provider>\n );\n }\n\n // In cascade mode, use Radix's Sub component normally\n return (\n <SubContext.Provider value={subContextValue}>\n <DropdownMenuPrimitive.Sub {...props} />\n </SubContext.Provider>\n );\n};\nDropdownMenuSub.displayName = 'DropdownMenu.Sub';\n\ntype DropdownMenuSubTriggerElement = React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>;\ninterface DropdownMenuSubTriggerProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubTrigger, RemovedProps> {}\nconst DropdownMenuSubTrigger = React.forwardRef<\n DropdownMenuSubTriggerElement,\n DropdownMenuSubTriggerProps\n>((props, forwardedRef) => {\n const { className, children, onClick, ...subTriggerProps } = props;\n const drillDown = useDrillDownOptional();\n const subContext = useSubContext();\n\n // In drill-down mode, render a button that navigates to the submenu\n if (drillDown?.behavior === 'drill-down' && subContext) {\n const handleClick = (e: React.MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n drillDown.push(subContext.id);\n (onClick as React.MouseEventHandler<HTMLDivElement> | undefined)?.(e);\n };\n\n return (\n <div\n role=\"menuitem\"\n tabIndex={0}\n ref={forwardedRef as React.Ref<HTMLDivElement>}\n onClick={handleClick}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n drillDown.push(subContext.id);\n }\n }}\n className={classNames(\n 'rt-reset',\n 'rt-BaseMenuItem',\n 'rt-BaseMenuSubTrigger',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuSubTrigger',\n 'rt-DropdownMenuDrillDownSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon\" />\n </div>\n </div>\n );\n }\n\n // In cascade mode, use Radix's SubTrigger\n return (\n <DropdownMenuPrimitive.SubTrigger\n {...subTriggerProps}\n onClick={onClick as React.MouseEventHandler<HTMLDivElement> | undefined}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-BaseMenuItem',\n 'rt-BaseMenuSubTrigger',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuSubTrigger',\n className,\n )}\n >\n {children}\n <div className=\"rt-BaseMenuShortcut rt-DropdownMenuShortcut\">\n <ThickChevronRightIcon className=\"rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon\" />\n </div>\n </DropdownMenuPrimitive.SubTrigger>\n );\n});\nDropdownMenuSubTrigger.displayName = 'DropdownMenu.SubTrigger';\n\n// Separator is defined here (before SubContent) because it's used in drill-down mode\ntype DropdownMenuSeparatorElement = React.ElementRef<typeof DropdownMenuPrimitive.Separator>;\ninterface DropdownMenuSeparatorProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.Separator, RemovedProps> {}\nconst DropdownMenuSeparator = React.forwardRef<\n DropdownMenuSeparatorElement,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <DropdownMenuPrimitive.Separator\n {...props}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuSeparator', 'rt-DropdownMenuSeparator', className)}\n />\n));\nDropdownMenuSeparator.displayName = 'DropdownMenu.Separator';\n\n/**\n * Internal component for the drill-down back button.\n */\nfunction DrillDownBackItem({ label }: { label: React.ReactNode }) {\n const drillDown = useDrillDown();\n\n return (\n <div\n role=\"menuitem\"\n tabIndex={0}\n onClick={(e) => {\n e.preventDefault();\n drillDown.pop();\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n drillDown.pop();\n }\n }}\n className={classNames(\n 'rt-reset',\n 'rt-BaseMenuItem',\n 'rt-DropdownMenuItem',\n 'rt-DropdownMenuDrillDownBackItem',\n )}\n >\n <ThickChevronLeftIcon className=\"rt-DropdownMenuDrillDownBackIcon\" />\n <span className=\"rt-DropdownMenuDrillDownBackLabel\">{label}</span>\n </div>\n );\n}\n\ntype DropdownMenuSubContentElement = React.ElementRef<typeof DropdownMenuPrimitive.SubContent>;\ninterface DropdownMenuSubContentProps\n extends ComponentPropsWithout<typeof DropdownMenuPrimitive.SubContent, RemovedProps>,\n DropdownMenuContentContextValue {\n container?: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Portal>['container'];\n}\nconst DropdownMenuSubContent = React.forwardRef<\n DropdownMenuSubContentElement,\n DropdownMenuSubContentProps\n>((props, forwardedRef) => {\n // Memoize context consumption to prevent unnecessary re-renders\n const contextValue = React.useContext(DropdownMenuContentContext);\n const { size, variant, color, highContrast, material } = React.useMemo(\n () => contextValue,\n [contextValue],\n );\n const drillDown = useDrillDownOptional();\n const subContext = useSubContext();\n\n const {\n className,\n children,\n container,\n forceMount,\n material: _,\n panelBackground: __,\n ...subContentProps\n } = extractProps(\n { size, variant, color, highContrast, material, ...props },\n dropdownMenuSubContentPropDefs,\n );\n\n // In drill-down mode, render inline instead of in a portal\n if (drillDown?.behavior === 'drill-down' && subContext) {\n const isActive = drillDown.isActive(subContext.id);\n\n return (\n <div\n ref={forwardedRef as React.Ref<HTMLDivElement>}\n role=\"menu\"\n aria-label={typeof subContext.label === 'string' ? subContext.label : undefined}\n data-drill-down-active={isActive ? true : undefined}\n className={classNames(\n 'rt-DropdownMenuDrillDownPanel',\n className,\n )}\n >\n <DrillDownBackItem label={subContext.label} />\n <DropdownMenuSeparator />\n {children}\n </div>\n );\n }\n\n // In cascade mode, use Portal and Radix's SubContent\n return (\n <DropdownMenuPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <DropdownMenuPrimitive.SubContent\n data-accent-color={color}\n data-material={material}\n data-panel-background={material}\n alignOffset={-Number(size) * 4}\n // Side offset accounts for the outer solid box-shadow\n sideOffset={1}\n collisionPadding={10}\n {...subContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames(\n 'rt-PopperContent',\n 'rt-BaseMenuContent',\n 'rt-BaseMenuSubContent',\n 'rt-DropdownMenuContent',\n 'rt-DropdownMenuSubContent',\n className,\n )}\n >\n <ScrollArea type=\"auto\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-DropdownMenuViewport')}>\n {children}\n </div>\n </ScrollArea>\n </DropdownMenuPrimitive.SubContent>\n </Theme>\n </DropdownMenuPrimitive.Portal>\n );\n});\nDropdownMenuSubContent.displayName = 'DropdownMenu.SubContent';\n\ntype DropdownMenuTriggerIconElement = React.ElementRef<'svg'>;\ninterface DropdownMenuTriggerIconProps extends IconProps {}\nconst DropdownMenuTriggerIcon = React.forwardRef<\n DropdownMenuTriggerIconElement,\n DropdownMenuTriggerIconProps\n>((props, forwardedRef) => (\n <ChevronDownIcon {...props} ref={forwardedRef} className=\"rt-DropdownMenuTriggerIcon\" />\n));\nDropdownMenuTriggerIcon.displayName = 'DropdownMenu.TriggerIcon';\n\nexport {\n DropdownMenuRoot as Root,\n DropdownMenuTrigger as Trigger,\n DropdownMenuTriggerIcon as TriggerIcon,\n DropdownMenuContent as Content,\n DropdownMenuLabel as Label,\n DropdownMenuItem as Item,\n DropdownMenuGroup as Group,\n DropdownMenuRadioGroup as RadioGroup,\n DropdownMenuRadioItem as RadioItem,\n DropdownMenuCheckboxItem as CheckboxItem,\n DropdownMenuSub as Sub,\n DropdownMenuSubTrigger as SubTrigger,\n DropdownMenuSubContent as SubContent,\n DropdownMenuSeparator as Separator,\n};\n\nexport type {\n DropdownMenuRootProps as RootProps,\n DropdownMenuTriggerProps as TriggerProps,\n DropdownMenuTriggerIconProps as TriggerIconProps,\n DropdownMenuContentProps as ContentProps,\n DropdownMenuLabelProps as LabelProps,\n DropdownMenuItemProps as ItemProps,\n DropdownMenuGroupProps as GroupProps,\n DropdownMenuRadioGroupProps as RadioGroupProps,\n DropdownMenuRadioItemProps as RadioItemProps,\n DropdownMenuCheckboxItemProps as CheckboxItemProps,\n DropdownMenuSubProps as SubProps,\n DropdownMenuSubTriggerProps as SubTriggerProps,\n DropdownMenuSubContentProps as SubContentProps,\n DropdownMenuSeparatorProps as SeparatorProps,\n SubmenuBehavior,\n};\n"],
|
|
5
|
+
"mappings": "ykBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,EAAA,YAAAC,EAAA,UAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,eAAAC,EAAA,cAAAC,EAAA,SAAAC,EAAA,cAAAC,EAAA,QAAAC,EAAA,eAAAC,EAAA,eAAAC,EAAA,YAAAC,EAAA,gBAAAC,IAAA,eAAAC,GAAAhB,IAEA,IAAAiB,EAAuB,oBACvBC,EAAuB,yBACvBC,EAA4D,oBAE5DC,EAA2B,4BAC3BC,EAMO,oCACPC,EAAuC,sBACvCC,EAA2G,sBAC3GC,EAA6B,uCAC7BC,EAMO,mDAEPC,EAAoC,+CACpCC,EAAoB,oBAQpB,MAAMlB,EAAqDmB,GACzDX,EAAA,cAAC,EAAAY,aAAsB,KAAtB,CAA4B,GAAGD,EAAO,EAEzCnB,EAAiB,YAAc,oBAK/B,MAAMK,EAAsBG,EAAM,WAChC,CAAC,CAAE,SAAAa,EAAU,GAAGF,CAAM,EAAGG,IACvBd,EAAA,cAAC,EAAAY,aAAsB,QAAtB,CAA+B,GAAGD,EAAO,IAAKG,EAAc,QAAO,OACjE,uBAAoBD,CAAQ,CAC/B,CAEJ,EACAhB,EAAoB,YAAc,uBAMlC,SAASkB,GAAc,CAAE,SAAAF,CAAS,EAAkC,CAClE,MAAMG,KAAY,wBAAqB,EAGvC,MAAI,CAACA,GAAaA,EAAU,WAAa,UAChChB,EAAA,cAAAA,EAAA,cAAGa,CAA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,EACDlB,EAAuB,YAAc,0BAIrC,MAAMG,EAA0BE,EAAM,WAGpC,CAACW,EAAOG,IACRd,EAAA,cAAC,mBAAiB,GAAGW,EAAO,IAAKG,EAAc,UAAU,6BAA6B,CACvF,EACDhB,EAAwB,YAAc",
|
|
6
|
+
"names": ["dropdown_menu_exports", "__export", "DropdownMenuCheckboxItem", "DropdownMenuContent", "DropdownMenuGroup", "DropdownMenuItem", "DropdownMenuLabel", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "DropdownMenuRoot", "DropdownMenuSeparator", "DropdownMenuSub", "DropdownMenuSubContent", "DropdownMenuSubTrigger", "DropdownMenuTrigger", "DropdownMenuTriggerIcon", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "import_scroll_area", "import_dropdown_menu_props", "import_theme", "import_icons", "import_extract_props", "import_dropdown_menu_drill_down", "import_require_react_element", "import_kbd", "props", "DropdownMenuPrimitive", "children", "forwardedRef", "DrillDownRoot", "drillDown", "DropdownMenuContentContext", "themeContext", "effectiveMaterial", "memoizedThemeContext", "size", "variant", "highContrast", "material", "submenuBehavior", "className", "color", "container", "forceMount", "_", "__", "___", "contentProps", "resolvedColor", "classNames", "shortcut", "itemProps", "useSubId", "label", "subId", "subContextValue", "onClick", "subTriggerProps", "subContext", "e", "DrillDownBackItem", "contextValue", "subContentProps", "isActive"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { baseMenuContentPropDefs as dropdownMenuContentPropDefs, baseMenuItemPropDefs as dropdownMenuItemPropDefs, baseMenuCheckboxItemPropDefs as dropdownMenuCheckboxItemPropDefs, baseMenuRadioItemPropDefs as dropdownMenuRadioItemPropDefs, } from './_internal/base-menu.props.js';
|
|
1
|
+
export { baseMenuContentPropDefs as dropdownMenuContentPropDefs, baseMenuSubContentPropDefs as dropdownMenuSubContentPropDefs, baseMenuItemPropDefs as dropdownMenuItemPropDefs, baseMenuCheckboxItemPropDefs as dropdownMenuCheckboxItemPropDefs, baseMenuRadioItemPropDefs as dropdownMenuRadioItemPropDefs, submenuBehaviors, } from './_internal/base-menu.props.js';
|
|
2
2
|
//# sourceMappingURL=dropdown-menu.props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.props.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu.props.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,IAAI,2BAA2B,EACtD,oBAAoB,IAAI,wBAAwB,EAChD,4BAA4B,IAAI,gCAAgC,EAChE,yBAAyB,IAAI,6BAA6B,
|
|
1
|
+
{"version":3,"file":"dropdown-menu.props.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu.props.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,IAAI,2BAA2B,EACtD,0BAA0B,IAAI,8BAA8B,EAC5D,oBAAoB,IAAI,wBAAwB,EAChD,4BAA4B,IAAI,gCAAgC,EAChE,yBAAyB,IAAI,6BAA6B,EAC1D,gBAAgB,GACjB,MAAM,gCAAgC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var
|
|
1
|
+
"use strict";var p=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var f=(n,o)=>{for(var r in o)p(n,r,{get:o[r],enumerable:!0})},b=(n,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of a(o))!d.call(n,s)&&s!==r&&p(n,s,{get:()=>o[s],enumerable:!(t=u(o,s))||t.enumerable});return n};var D=n=>b(p({},"__esModule",{value:!0}),n);var M={};f(M,{dropdownMenuCheckboxItemPropDefs:()=>e.baseMenuCheckboxItemPropDefs,dropdownMenuContentPropDefs:()=>e.baseMenuContentPropDefs,dropdownMenuItemPropDefs:()=>e.baseMenuItemPropDefs,dropdownMenuRadioItemPropDefs:()=>e.baseMenuRadioItemPropDefs,dropdownMenuSubContentPropDefs:()=>e.baseMenuSubContentPropDefs,submenuBehaviors:()=>e.submenuBehaviors});module.exports=D(M);var e=require("./_internal/base-menu.props.js");
|
|
2
2
|
//# sourceMappingURL=dropdown-menu.props.js.map
|