@proyecto-viviana/solidaria-components 0.2.2 → 0.2.4
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/dist/Color.d.ts +2 -6
- package/dist/Color.d.ts.map +1 -1
- package/dist/ComboBox.d.ts +3 -3
- package/dist/ComboBox.d.ts.map +1 -1
- package/dist/GridList.d.ts +2 -2
- package/dist/GridList.d.ts.map +1 -1
- package/dist/ListBox.d.ts +5 -5
- package/dist/ListBox.d.ts.map +1 -1
- package/dist/Menu.d.ts +3 -3
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Select.d.ts +3 -3
- package/dist/Select.d.ts.map +1 -1
- package/dist/Table.d.ts +2 -2
- package/dist/Table.d.ts.map +1 -1
- package/dist/Tabs.d.ts +1 -1
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/index.js +56 -56
- package/dist/index.js.map +2 -2
- package/dist/index.ssr.js +56 -56
- package/dist/index.ssr.js.map +2 -2
- package/package.json +10 -8
- package/src/Autocomplete.tsx +174 -0
- package/src/Breadcrumbs.tsx +264 -0
- package/src/Button.tsx +238 -0
- package/src/Calendar.tsx +471 -0
- package/src/Checkbox.tsx +387 -0
- package/src/Color.tsx +1370 -0
- package/src/ComboBox.tsx +824 -0
- package/src/DateField.tsx +337 -0
- package/src/DatePicker.tsx +367 -0
- package/src/Dialog.tsx +262 -0
- package/src/Disclosure.tsx +439 -0
- package/src/GridList.tsx +511 -0
- package/src/Landmark.tsx +203 -0
- package/src/Link.tsx +201 -0
- package/src/ListBox.tsx +346 -0
- package/src/Menu.tsx +544 -0
- package/src/Meter.tsx +157 -0
- package/src/Modal.tsx +433 -0
- package/src/NumberField.tsx +542 -0
- package/src/Popover.tsx +540 -0
- package/src/ProgressBar.tsx +162 -0
- package/src/RadioGroup.tsx +356 -0
- package/src/RangeCalendar.tsx +462 -0
- package/src/SearchField.tsx +479 -0
- package/src/Select.tsx +734 -0
- package/src/Separator.tsx +130 -0
- package/src/Slider.tsx +500 -0
- package/src/Switch.tsx +213 -0
- package/src/Table.tsx +857 -0
- package/src/Tabs.tsx +552 -0
- package/src/TagGroup.tsx +421 -0
- package/src/TextField.tsx +271 -0
- package/src/TimeField.tsx +455 -0
- package/src/Toast.tsx +503 -0
- package/src/Toolbar.tsx +160 -0
- package/src/Tooltip.tsx +423 -0
- package/src/Tree.tsx +551 -0
- package/src/VisuallyHidden.tsx +60 -0
- package/src/contexts.ts +74 -0
- package/src/index.ts +620 -0
- package/src/utils.tsx +329 -0
- package/dist/index.jsx +0 -9056
- package/dist/index.jsx.map +0 -7
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/utils.tsx", "../src/VisuallyHidden.tsx", "../src/Button.tsx", "../src/contexts.ts", "../src/Switch.tsx", "../src/Checkbox.tsx", "../src/RadioGroup.tsx", "../src/TextField.tsx", "../src/Link.tsx", "../src/ProgressBar.tsx", "../src/Separator.tsx", "../src/Toolbar.tsx", "../src/Autocomplete.tsx", "../src/ListBox.tsx", "../src/Menu.tsx", "../src/Select.tsx", "../src/Tabs.tsx", "../src/Breadcrumbs.tsx", "../src/NumberField.tsx", "../src/SearchField.tsx", "../src/Slider.tsx", "../src/Tooltip.tsx", "../src/ComboBox.tsx", "../src/Dialog.tsx", "../src/Modal.tsx", "../src/Popover.tsx", "../src/Toast.tsx", "../src/Disclosure.tsx", "../src/Meter.tsx", "../src/TagGroup.tsx", "../src/Calendar.tsx", "../src/RangeCalendar.tsx", "../src/DateField.tsx", "../src/TimeField.tsx", "../src/DatePicker.tsx", "../src/Table.tsx", "../src/GridList.tsx", "../src/Tree.tsx", "../src/Color.tsx", "../src/Landmark.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * Utility functions for solidaria-components\n * Port of react-aria-components/src/utils.tsx\n */\n\nimport {\n type JSX,\n type Accessor,\n type FlowComponent,\n createContext,\n useContext,\n createMemo,\n createSignal,\n onMount,\n Show,\n} from 'solid-js';\nimport { isServer } from 'solid-js/web';\n\n// ============================================\n// TYPES\n// ============================================\n\n/**\n * Render props pattern - children can be a function that receives state\n */\nexport type RenderChildren<T> = JSX.Element | ((renderProps: T) => JSX.Element);\n\n/**\n * Class name can be a string or a function that computes based on state\n */\nexport type ClassNameOrFunction<T> = string | ((renderProps: T) => string);\n\n/**\n * Style can be an object or a function that computes based on state\n */\nexport type StyleOrFunction<T> = JSX.CSSProperties | ((renderProps: T) => JSX.CSSProperties);\n\n/**\n * Common render props interface\n */\nexport interface RenderPropsBase<T> {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<T>;\n /** The CSS className for the element. A function may be provided to compute the class based on state. */\n class?: ClassNameOrFunction<T>;\n /** The inline style for the element. A function may be provided to compute the style based on state. */\n style?: StyleOrFunction<T>;\n}\n\n/**\n * Slot props for named slots\n */\nexport interface SlotProps {\n /** A slot name for the component. */\n slot?: string;\n}\n\n// ============================================\n// RENDER PROPS\n// ============================================\n\n/**\n * Return type for useRenderProps\n */\nexport interface RenderPropsResult<T> {\n /** Accessor for class - safe to call anytime */\n class: Accessor<string>;\n /** Accessor for style - safe to call anytime */\n style: Accessor<JSX.CSSProperties | undefined>;\n /**\n * Render the children. This is a function that returns JSX, NOT a getter.\n * For SSR compatibility, this should be called within the JSX tree.\n *\n * Usage in components:\n * {renderProps.renderChildren()}\n *\n * Or if you need the raw children/function:\n * {renderProps.renderChildren()}\n */\n renderChildren: () => JSX.Element;\n /** The raw children prop (function or JSX) - use renderChildren() in most cases */\n children: RenderChildren<T> | undefined;\n /** The render props values accessor */\n values: Accessor<T>;\n}\n\n/**\n * Resolves render props (children, class, style) based on component state.\n *\n * For SSR compatibility, children are NOT evaluated eagerly. Instead:\n * - Use `renderChildren()` to render children with current values\n * - Or access `children` directly if you need the raw prop\n *\n * This avoids the getter pattern that causes SSR hydration mismatches.\n */\nexport function useRenderProps<T extends object>(\n props: RenderPropsBase<T> & { defaultClassName?: string },\n values: Accessor<T>\n): RenderPropsResult<T> {\n const { children, class: className, style, defaultClassName = '' } = props;\n\n // Compute class and style eagerly (they don't depend on context)\n const computedClass = createMemo(() => {\n const currentValues = values();\n return typeof className === 'function'\n ? className(currentValues)\n : className ?? defaultClassName;\n });\n\n const computedStyle = createMemo(() => {\n const currentValues = values();\n return typeof style === 'function'\n ? style(currentValues)\n : style;\n });\n\n // Return object with explicit function for rendering children\n // This avoids the getter pattern that causes SSR issues\n return {\n class: computedClass,\n style: computedStyle,\n renderChildren: () => {\n const currentValues = values();\n return typeof children === 'function'\n ? children(currentValues)\n : children;\n },\n children,\n values,\n };\n}\n\n// ============================================\n// CONTEXT UTILITIES\n// ============================================\n\n/**\n * Context value that can be null or the actual value\n */\nexport type ContextValue<T> = T | null;\n\n/**\n * Creates a context with props and ref merging support\n */\nexport function createSlottedContext<T>() {\n return createContext<T | null>(null);\n}\n\n/**\n * Use context with null check\n */\nexport function useSlottedContext<T>(context: ReturnType<typeof createContext<T | null>>): T | null {\n return useContext(context);\n}\n\n// ============================================\n// DATA ATTRIBUTES\n// ============================================\n\n/**\n * Converts boolean state values to data attributes\n */\nexport function dataAttr(value: boolean | undefined): '' | undefined {\n return value ? '' : undefined;\n}\n\n/**\n * Creates data attributes from render props\n */\nexport function createDataAttributes<T extends Record<string, boolean | string | undefined>>(\n values: T\n): Record<string, string | undefined> {\n const result: Record<string, string | undefined> = {};\n\n for (const [key, value] of Object.entries(values)) {\n if (typeof value === 'boolean') {\n result[`data-${camelToKebab(key)}`] = value ? '' : undefined;\n } else if (value !== undefined) {\n result[`data-${camelToKebab(key)}`] = value;\n }\n }\n\n return result;\n}\n\nfunction camelToKebab(str: string): string {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\n// ============================================\n// PROPS UTILITIES\n// ============================================\n\n/**\n * Remove data attributes from props (for internal use)\n */\nexport function removeDataAttributes<T extends Record<string, unknown>>(props: T): T {\n const result: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(props)) {\n if (!key.startsWith('data-')) {\n result[key] = value;\n }\n }\n\n return result as T;\n}\n\n/**\n * Filter DOM props - keep only valid DOM attributes.\n *\n * @param props - Component props to filter\n * @param options - Options for filtering (global: include global attrs)\n * @returns Object containing only valid DOM props. Use type parameter R to specify return type.\n */\nexport function filterDOMProps<R extends object = Record<string, unknown>>(\n props: object,\n options: { global?: boolean } = {}\n): R {\n const { global = false } = options;\n const result: Record<string, unknown> = {};\n\n const globalAttrs = new Set([\n 'id', 'class', 'style', 'tabIndex', 'role', 'title', 'lang', 'dir',\n 'hidden', 'draggable', 'accessKey', 'contentEditable', 'spellcheck',\n ]);\n\n const ariaAttrs = /^aria-/;\n const dataAttrs = /^data-/;\n const eventHandlers = /^on[A-Z]/;\n\n for (const key in props) {\n if (\n Object.prototype.hasOwnProperty.call(props, key) &&\n (\n (global && globalAttrs.has(key)) ||\n ariaAttrs.test(key) ||\n dataAttrs.test(key) ||\n eventHandlers.test(key)\n )\n ) {\n result[key] = (props as Record<string, unknown>)[key];\n }\n }\n\n return result as R;\n}\n\n// ============================================\n// CLIENT-ONLY UTILITIES\n// ============================================\n\nexport interface ClientOnlyProps {\n /** The children to render only on the client */\n children: JSX.Element;\n /** Optional fallback to render during SSR and initial hydration */\n fallback?: JSX.Element;\n}\n\n/**\n * ClientOnly component - renders children only on the client side.\n *\n * During SSR, renders the fallback (or nothing).\n * During hydration, renders the same fallback to match SSR.\n * After hydration completes, switches to render children.\n *\n * This is useful for components that rely on browser APIs or\n * have different server/client output.\n *\n * @example\n * ```tsx\n * <ClientOnly fallback={<div>Loading...</div>}>\n * <Calendar />\n * </ClientOnly>\n * ```\n */\nexport const ClientOnly: FlowComponent<ClientOnlyProps> = (props) => {\n // On server, always render fallback\n if (isServer) {\n return <>{props.fallback}</>;\n }\n\n // On client, track if we've hydrated\n const [isHydrated, setIsHydrated] = createSignal(false);\n\n // onMount runs after hydration is complete\n onMount(() => {\n setIsHydrated(true);\n });\n\n return (\n <Show when={isHydrated()} fallback={props.fallback}>\n {props.children}\n </Show>\n );\n};\n\n/**\n * Returns true only on the client after hydration is complete.\n * Can be used to conditionally render client-only content.\n *\n * @example\n * ```tsx\n * const hydrated = useIsHydrated();\n * return (\n * <Show when={hydrated()} fallback={<Placeholder />}>\n * <ClientOnlyComponent />\n * </Show>\n * );\n * ```\n */\nexport function useIsHydrated(): Accessor<boolean> {\n // On server, always return false\n if (isServer) {\n return () => false;\n }\n\n // On client, start false and switch to true after animation frame\n // This ensures we're past the hydration phase\n const [isHydrated, setIsHydrated] = createSignal(false);\n\n // Use requestAnimationFrame to ensure we're past hydration\n // onMount may not fire during hydration for matching DOM\n requestAnimationFrame(() => {\n setIsHydrated(true);\n });\n\n return isHydrated;\n}\n", "/**\n * VisuallyHidden component for solidaria-components\n *\n * Hides content visually but keeps it accessible to screen readers.\n * Port of react-aria's VisuallyHidden.\n */\n\nimport { type JSX, type ParentProps, splitProps } from 'solid-js';\nimport { Dynamic } from 'solid-js/web';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface VisuallyHiddenProps extends ParentProps {\n /** The element type to render. @default 'span' */\n elementType?: keyof JSX.IntrinsicElements;\n /** Whether the element should be focusable when focused. */\n isFocusable?: boolean;\n}\n\n// ============================================\n// STYLES\n// ============================================\n\nconst visuallyHiddenStyles: JSX.CSSProperties = {\n border: '0',\n clip: 'rect(0 0 0 0)',\n 'clip-path': 'inset(50%)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n width: '1px',\n 'white-space': 'nowrap',\n};\n\n// ============================================\n// COMPONENT\n// ============================================\n\n/**\n * VisuallyHidden hides its children visually, while keeping content visible to screen readers.\n */\nexport function VisuallyHidden(props: VisuallyHiddenProps): JSX.Element {\n const [local, others] = splitProps(props, ['elementType', 'isFocusable']);\n\n const elementType = () => local.elementType ?? 'span';\n\n return (\n <Dynamic\n component={elementType()}\n style={visuallyHiddenStyles}\n {...others}\n >\n {props.children}\n </Dynamic>\n );\n}\n", "/**\n * Button component for solidaria-components\n *\n * A pre-wired headless button that combines state + aria hooks.\n * Port of react-aria-components/src/Button.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n} from 'solid-js';\nimport {\n createButton,\n createFocusRing,\n createHover,\n type AriaButtonProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\nimport { DialogTriggerContext, PopoverTriggerContext } from './contexts';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ButtonRenderProps {\n /** Whether the button is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the button is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the button is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the button is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the button is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ButtonProps\n extends Omit<AriaButtonProps, 'children'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<ButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ButtonRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const ButtonContext = createContext<ButtonProps | null>(null);\n\n// ============================================\n// COMPONENT\n// ============================================\n\n/**\n * A button allows a user to perform an action.\n *\n * This is a headless component that provides accessibility and state management.\n * Style it using the render props pattern or data attributes.\n *\n * @example\n * ```tsx\n * <Button onPress={() => alert('Pressed!')}>\n * {({ isPressed, isHovered }) => (\n * <span class={isPressed ? 'bg-blue-700' : isHovered ? 'bg-blue-600' : 'bg-blue-500'}>\n * Click me\n * </span>\n * )}\n * </Button>\n * ```\n */\nexport function Button(props: ButtonProps): JSX.Element {\n // Split props\n const [local, ariaProps] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Check if inside a DialogTrigger or PopoverTrigger - if so, toggle on press\n // NOTE: Context is captured at component creation time. For Buttons inside a Modal,\n // the Modal provides OverlayTriggerStateContext, but due to SolidJS's eager JSX evaluation,\n // components inside Modal children are created before the Modal's Show renders.\n // So we can't reliably use context here to determine if we're inside a Modal.\n const dialogTriggerContext = useContext(DialogTriggerContext);\n const popoverTriggerContext = useContext(PopoverTriggerContext);\n\n // Helper to resolve isDisabled (handles both boolean and Accessor<boolean>)\n const resolveDisabled = (): boolean => {\n const disabled = ariaProps.isDisabled;\n if (typeof disabled === 'function') {\n return disabled();\n }\n return !!disabled;\n };\n\n // Determine if this button should act as a dialog/popover trigger\n // We only toggle if:\n // 1. We have DialogTriggerContext or PopoverTriggerContext (we're inside a trigger)\n // 2. AND there is NO onPress handler (the trigger button typically has no onPress,\n // while close buttons inside dialogs have onPress={close})\n // This heuristic works because:\n // - Trigger buttons: don't have onPress, should toggle\n // - Close buttons: have onPress={close}, should NOT toggle (just call onPress)\n const isDialogTrigger = () => dialogTriggerContext && !ariaProps.onPress;\n const isPopoverTrigger = () => popoverTriggerContext && !ariaProps.onPress;\n\n // Wrap onPress to also toggle dialog/popover if this is a trigger button\n const handlePress = (e: any) => {\n // Call original onPress if provided\n if (typeof ariaProps.onPress === 'function') {\n ariaProps.onPress(e);\n }\n // Toggle dialog only if this is a trigger button (has no onPress handler)\n if (isDialogTrigger()) {\n dialogTriggerContext!.state.toggle();\n }\n // Toggle popover only if this is a trigger button (has no onPress handler)\n if (isPopoverTrigger()) {\n popoverTriggerContext!.state.toggle();\n }\n };\n\n // Create button aria props\n const buttonAria = createButton({\n ...ariaProps,\n onPress: handlePress,\n get isDisabled() {\n return resolveDisabled();\n },\n });\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return resolveDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<ButtonRenderProps>(() => ({\n isHovered: isHovered(),\n isPressed: buttonAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: resolveDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Button',\n },\n renderValues\n );\n\n // Filter DOM props\n // Remove onClick from DOM props - it's already handled by createPress\n // This matches React Aria Components behavior (Button.tsx line 144: delete DOMProps.onClick)\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n // onClick is handled by createPress, not passed directly to DOM\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n // Extract refs from props to combine them manually\n const buttonPropsRef = (buttonAria.buttonProps as Record<string, unknown>).ref as ((el: HTMLElement) => void) | undefined;\n const focusPropsRef = (focusProps as Record<string, unknown>).ref as ((el: HTMLElement) => void) | undefined;\n const hoverPropsRef = (hoverProps as Record<string, unknown>).ref as ((el: HTMLElement) => void) | undefined;\n\n // Remove ref from spread props to avoid type conflicts\n const cleanButtonProps = () => {\n const { ref: _ref1, ...rest } = buttonAria.buttonProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref3, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Ref callback that combines all refs\n const handleRef = (el: HTMLButtonElement) => {\n // Call the focusable ref for autoFocus support\n buttonPropsRef?.(el);\n focusPropsRef?.(el);\n hoverPropsRef?.(el);\n\n // If this button is a popover trigger, register it\n if (isPopoverTrigger() && popoverTriggerContext?.setTriggerRef) {\n popoverTriggerContext.setTriggerRef(el);\n }\n };\n\n return (\n <button\n ref={handleRef}\n {...domProps()}\n {...cleanButtonProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={buttonAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={resolveDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n", "/**\n * Shared contexts for overlay components.\n *\n * These are separated to avoid circular dependencies between\n * Dialog, Modal, Popover, and Button components.\n */\n\nimport { createContext, useContext } from 'solid-js'\nimport type { OverlayTriggerState as StatelyOverlayTriggerState } from '@proyecto-viviana/solid-stately'\n\n// ============================================\n// OVERLAY TRIGGER STATE CONTEXT\n// ============================================\n\nexport interface OverlayTriggerState {\n isOpen: boolean\n open: () => void\n close: () => void\n toggle: () => void\n}\n\nexport const OverlayTriggerStateContext = createContext<OverlayTriggerState | null>(null)\n\n/**\n * Hook to access the overlay trigger state from context.\n */\nexport function useOverlayTriggerState(): OverlayTriggerState | null {\n return useContext(OverlayTriggerStateContext)\n}\n\n// ============================================\n// DIALOG TRIGGER CONTEXT\n// ============================================\n\nexport interface DialogTriggerContextValue {\n state: StatelyOverlayTriggerState\n triggerRef: () => HTMLElement | null\n triggerId: string\n}\n\nexport const DialogTriggerContext = createContext<DialogTriggerContextValue | null>(null)\n\n/**\n * Hook to access the dialog trigger state from context.\n */\nexport function useDialogTrigger(): DialogTriggerContextValue | null {\n return useContext(DialogTriggerContext)\n}\n\n// ============================================\n// POPOVER TRIGGER CONTEXT\n// ============================================\n\nexport interface PopoverTriggerContextValue {\n state: {\n isOpen: () => boolean\n open: () => void\n close: () => void\n toggle: () => void\n }\n triggerRef: () => HTMLElement | null\n setTriggerRef: (el: HTMLElement | null) => void\n triggerId: string\n trigger: string\n}\n\nexport const PopoverTriggerContext = createContext<PopoverTriggerContextValue | null>(null)\n\n/**\n * Hook to access the popover trigger state from context.\n */\nexport function usePopoverTrigger(): PopoverTriggerContextValue | null {\n return useContext(PopoverTriggerContext)\n}\n", "/**\n * ToggleSwitch component for solidaria-components\n *\n * A pre-wired headless switch that combines state + aria hooks.\n * Port of react-aria-components/src/Switch.tsx\n *\n * Named \"ToggleSwitch\" to avoid conflict with SolidJS's built-in Switch component.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport {\n createSwitch,\n createFocusRing,\n createHover,\n type AriaSwitchProps,\n} from '@proyecto-viviana/solidaria';\nimport { createToggleState, type ToggleState } from '@proyecto-viviana/solid-stately';\nimport { VisuallyHidden } from './VisuallyHidden';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ToggleSwitchRenderProps {\n /** Whether the switch is selected. */\n isSelected: boolean;\n /** Whether the switch is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the switch is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the switch is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the switch is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the switch is disabled. */\n isDisabled: boolean;\n /** Whether the switch is read only. */\n isReadOnly: boolean;\n /** State of the switch. */\n state: ToggleState;\n}\n\nexport interface ToggleSwitchProps\n extends Omit<AriaSwitchProps, 'children'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<ToggleSwitchRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ToggleSwitchRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ToggleSwitchRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const ToggleSwitchContext = createContext<ToggleSwitchProps | null>(null);\n\n// ============================================\n// COMPONENT\n// ============================================\n\n/**\n * A switch allows a user to turn a setting on or off.\n *\n * This is a headless component that provides accessibility and state management.\n * Style it using the render props pattern or data attributes.\n *\n * Named \"ToggleSwitch\" to avoid conflict with SolidJS's built-in Switch component.\n *\n * @example\n * ```tsx\n * <ToggleSwitch>\n * {({ isSelected }) => (\n * <>\n * <span class={`switch-track ${isSelected ? 'bg-blue-500' : 'bg-gray-300'}`}>\n * <span class={`switch-thumb ${isSelected ? 'translate-x-5' : 'translate-x-0'}`} />\n * </span>\n * <span>Enable notifications</span>\n * </>\n * )}\n * </ToggleSwitch>\n * ```\n */\nexport function ToggleSwitch(props: ToggleSwitchProps): JSX.Element {\n let inputRef: HTMLInputElement | null = null;\n\n // Split props\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Create toggle state\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createToggleState({\n get isSelected() { return ariaProps.isSelected; },\n get defaultSelected() { return ariaProps.defaultSelected; },\n get onChange() { return ariaProps.onChange; },\n get isReadOnly() { return ariaProps.isReadOnly; },\n });\n\n // Create switch aria props\n const switchAria = createSwitch(\n () => ({\n ...ariaProps,\n children: typeof props.children === 'function' ? true : props.children,\n }),\n state,\n () => inputRef\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled || ariaProps.isReadOnly;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ToggleSwitchRenderProps>(() => ({\n isSelected: switchAria.isSelected(),\n isHovered: isHovered(),\n isPressed: switchAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: switchAria.isDisabled,\n isReadOnly: switchAria.isReadOnly,\n state,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ToggleSwitch',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n // Remove ref from spread props to avoid type conflicts\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = switchAria.labelProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanInputProps = () => {\n const { ref: _ref3, ...rest } = switchAria.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref4, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <label\n {...domProps()}\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={switchAria.isSelected() || undefined}\n data-pressed={switchAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={switchAria.isDisabled || undefined}\n data-readonly={switchAria.isReadOnly || undefined}\n >\n <VisuallyHidden>\n <input\n ref={(el) => (inputRef = el)}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n />\n </VisuallyHidden>\n {renderProps.renderChildren()}\n </label>\n );\n}\n\n", "/**\n * Checkbox and CheckboxGroup components for solidaria-components\n *\n * Pre-wired headless checkbox components that combine state + aria hooks.\n * Port of react-aria-components/src/Checkbox.tsx\n */\n\nimport {\n type JSX,\n type Accessor,\n type ParentProps,\n createContext,\n useContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport {\n createCheckbox,\n createCheckboxGroup,\n createCheckboxGroupItem,\n createFocusRing,\n createHover,\n type AriaCheckboxProps,\n type AriaCheckboxGroupProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createToggleState,\n createCheckboxGroupState,\n type CheckboxGroupState,\n} from '@proyecto-viviana/solid-stately';\nimport { VisuallyHidden } from './VisuallyHidden';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface CheckboxGroupRenderProps {\n /** Whether the checkbox group is disabled. */\n isDisabled: boolean;\n /** Whether the checkbox group is read only. */\n isReadOnly: boolean;\n /** Whether the checkbox group is required. */\n isRequired: boolean;\n /** Whether the checkbox group is invalid. */\n isInvalid: boolean;\n /** State of the checkbox group. */\n state: CheckboxGroupState;\n}\n\nexport interface CheckboxRenderProps {\n /** Whether the checkbox is selected. */\n isSelected: boolean;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate: boolean;\n /** Whether the checkbox is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the checkbox is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the checkbox is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the checkbox is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the checkbox is disabled. */\n isDisabled: boolean;\n /** Whether the checkbox is read only. */\n isReadOnly: boolean;\n /** Whether the checkbox is invalid. */\n isInvalid: boolean;\n /** Whether the checkbox is required. */\n isRequired: boolean;\n}\n\nexport interface CheckboxGroupProps\n extends Omit<AriaCheckboxGroupProps, 'children' | 'label' | 'description' | 'errorMessage'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CheckboxGroupRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxGroupRenderProps>;\n}\n\nexport interface CheckboxProps\n extends Omit<AriaCheckboxProps, 'children'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CheckboxRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxRenderProps>;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate?: boolean;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const CheckboxGroupContext = createContext<CheckboxGroupProps | null>(null);\nexport const CheckboxGroupStateContext = createContext<CheckboxGroupState | null>(null);\nexport const CheckboxContext = createContext<CheckboxProps | null>(null);\n\n// ============================================\n// CHECKBOX GROUP COMPONENT\n// ============================================\n\n/**\n * A checkbox group allows a user to select multiple items from a list of options.\n *\n * @example\n * ```tsx\n * <CheckboxGroup>\n * <Checkbox value=\"one\">Option 1</Checkbox>\n * <Checkbox value=\"two\">Option 2</Checkbox>\n * </CheckboxGroup>\n * ```\n */\nexport function CheckboxGroup(props: ParentProps<CheckboxGroupProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Create checkbox group state\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createCheckboxGroupState({\n get value() { return ariaProps.value; },\n get defaultValue() { return ariaProps.defaultValue; },\n get onChange() { return ariaProps.onChange; },\n get isDisabled() { return ariaProps.isDisabled; },\n get isReadOnly() { return ariaProps.isReadOnly; },\n get isRequired() { return ariaProps.isRequired; },\n get isInvalid() { return ariaProps.isInvalid; },\n });\n\n // Create checkbox group aria props\n const groupAria = createCheckboxGroup(() => ariaProps, state);\n\n // Render props values\n const renderValues = createMemo<CheckboxGroupRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: ariaProps.isRequired ?? false,\n isInvalid: groupAria.isInvalid,\n state,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-CheckboxGroup',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n // Remove ref from spread props to avoid type conflicts\n const cleanGroupProps = () => {\n const { ref: _ref, ...rest } = groupAria.groupProps as Record<string, unknown>;\n return rest;\n };\n\n // Resolve children - we need to pass render props if children is a function\n // but we use props.children directly (not renderProps.renderChildren())\n // to preserve SolidJS context propagation for nested components like Checkbox\n const resolvedChildren = () => {\n const children = props.children;\n if (typeof children === 'function') {\n return children(renderValues());\n }\n return children;\n };\n\n return (\n <CheckboxGroupStateContext.Provider value={state}>\n <div\n {...domProps()}\n {...cleanGroupProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-invalid={groupAria.isInvalid || undefined}\n >\n {resolvedChildren()}\n </div>\n </CheckboxGroupStateContext.Provider>\n );\n}\n\n// ============================================\n// CHECKBOX COMPONENT\n// ============================================\n\n/**\n * A checkbox allows a user to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n *\n * @example\n * ```tsx\n * <Checkbox>\n * {({ isSelected }) => (\n * <>\n * <span class={`checkbox ${isSelected ? 'checked' : ''}`}>\n * {isSelected && '✓'}\n * </span>\n * <span>Accept terms</span>\n * </>\n * )}\n * </Checkbox>\n * ```\n */\nexport function Checkbox(props: CheckboxProps): JSX.Element {\n let inputRef: HTMLInputElement | null = null;\n\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'isIndeterminate',\n ]);\n\n // Check if we're inside a CheckboxGroup\n const groupState = useContext(CheckboxGroupStateContext);\n\n // Create appropriate state/aria hooks based on context\n let isSelected: Accessor<boolean>;\n let isPressed: Accessor<boolean>;\n let isDisabled: boolean;\n let isReadOnly: boolean;\n let isInvalid: boolean;\n let labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n let inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n\n if (groupState) {\n // Inside a CheckboxGroup - use group item\n const itemAria = createCheckboxGroupItem(\n () => ({\n ...ariaProps,\n value: ariaProps.value ?? '',\n children: typeof props.children === 'function' ? true : props.children,\n }),\n groupState,\n () => inputRef\n );\n isSelected = itemAria.isSelected;\n isPressed = itemAria.isPressed;\n isDisabled = itemAria.isDisabled;\n isReadOnly = itemAria.isReadOnly;\n isInvalid = itemAria.isInvalid;\n labelProps = itemAria.labelProps;\n inputProps = itemAria.inputProps;\n } else {\n // Standalone checkbox\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createToggleState({\n get isSelected() { return ariaProps.isSelected; },\n get defaultSelected() { return ariaProps.defaultSelected; },\n get onChange() { return ariaProps.onChange; },\n get isReadOnly() { return ariaProps.isReadOnly; },\n });\n\n const checkboxAria = createCheckbox(\n () => ({\n ...ariaProps,\n isIndeterminate: local.isIndeterminate,\n children: typeof props.children === 'function' ? true : props.children,\n }),\n state,\n () => inputRef\n );\n isSelected = checkboxAria.isSelected;\n isPressed = checkboxAria.isPressed;\n isDisabled = checkboxAria.isDisabled;\n isReadOnly = checkboxAria.isReadOnly;\n isInvalid = checkboxAria.isInvalid;\n labelProps = checkboxAria.labelProps;\n inputProps = checkboxAria.inputProps;\n }\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled || isReadOnly;\n },\n });\n\n // Render props values\n const renderValues = createMemo<CheckboxRenderProps>(() => ({\n isSelected: isSelected(),\n isIndeterminate: local.isIndeterminate ?? false,\n isHovered: isHovered(),\n isPressed: isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled,\n isReadOnly,\n isInvalid,\n isRequired: ariaProps.isRequired ?? false,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Checkbox',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n // Remove ref from spread props to avoid type conflicts\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = labelProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanInputProps = () => {\n const { ref: _ref3, ...rest } = inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref4, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <label\n {...domProps()}\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={isSelected() || undefined}\n data-indeterminate={local.isIndeterminate || undefined}\n data-pressed={isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={isReadOnly || undefined}\n data-invalid={isInvalid || undefined}\n data-required={ariaProps.isRequired || undefined}\n >\n <VisuallyHidden>\n <input\n ref={(el) => (inputRef = el)}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n />\n </VisuallyHidden>\n {renderProps.renderChildren()}\n </label>\n );\n}\n", "/**\n * RadioGroup and Radio components for solidaria-components\n *\n * Pre-wired headless radio components that combine state + aria hooks.\n * Port of react-aria-components/src/RadioGroup.tsx\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n useContext,\n createMemo,\n splitProps,\n Show,\n} from 'solid-js';\nimport {\n createRadio,\n createRadioGroup,\n createFocusRing,\n createHover,\n type AriaRadioProps,\n type AriaRadioGroupProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createRadioGroupState,\n type RadioGroupState,\n type RadioGroupProps as RadioGroupStateProps,\n} from '@proyecto-viviana/solid-stately';\nimport { VisuallyHidden } from './VisuallyHidden';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport type Orientation = 'horizontal' | 'vertical';\n\nexport interface RadioGroupRenderProps {\n /** The orientation of the radio group. */\n orientation: Orientation;\n /** Whether the radio group is disabled. */\n isDisabled: boolean;\n /** Whether the radio group is read only. */\n isReadOnly: boolean;\n /** Whether the radio group is required. */\n isRequired: boolean;\n /** Whether the radio group is invalid. */\n isInvalid: boolean;\n /** State of the radio group. */\n state: RadioGroupState;\n}\n\nexport interface RadioRenderProps {\n /** Whether the radio is selected. */\n isSelected: boolean;\n /** Whether the radio is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the radio is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the radio is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the radio is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the radio is disabled. */\n isDisabled: boolean;\n /** Whether the radio is read only. */\n isReadOnly: boolean;\n /** Whether the radio is invalid. */\n isInvalid: boolean;\n /** Whether the radio is required. */\n isRequired: boolean;\n}\n\nexport interface RadioGroupProps\n extends Omit<AriaRadioGroupProps, 'children' | 'label' | 'description' | 'errorMessage'>,\n Pick<RadioGroupStateProps, 'value' | 'defaultValue' | 'onChange'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<RadioGroupRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<RadioGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<RadioGroupRenderProps>;\n}\n\nexport interface RadioProps\n extends Omit<AriaRadioProps, 'children'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<RadioRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<RadioRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<RadioRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const RadioGroupContext = createContext<RadioGroupProps | null>(null);\nexport const RadioGroupStateContext = createContext<RadioGroupState | null>(null);\nexport const RadioContext = createContext<RadioProps | null>(null);\n\n// ============================================\n// RADIO GROUP COMPONENT\n// ============================================\n\n/**\n * A radio group allows a user to select a single item from a list of mutually exclusive options.\n *\n * @example\n * ```tsx\n * <RadioGroup>\n * <Radio value=\"one\">Option 1</Radio>\n * <Radio value=\"two\">Option 2</Radio>\n * </RadioGroup>\n * ```\n */\nexport function RadioGroup(props: ParentProps<RadioGroupProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Create radio group state\n // We pass a function that returns props so that createRadioGroupState\n // can access props reactively. The props object itself is a proxy in SolidJS,\n // so accessing props.value inside a reactive context will track changes.\n const state = createRadioGroupState({\n get value() { return props.value; },\n get defaultValue() { return props.defaultValue; },\n get onChange() { return props.onChange; },\n get isDisabled() { return props.isDisabled; },\n get isReadOnly() { return props.isReadOnly; },\n get isRequired() { return props.isRequired; },\n get isInvalid() { return props.isInvalid; },\n });\n\n // Create radio group aria props\n const groupAria = createRadioGroup(() => ariaProps, state);\n\n // Render props values\n const renderValues = createMemo<RadioGroupRenderProps>(() => ({\n orientation: (ariaProps.orientation as Orientation) ?? 'vertical',\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: state.isRequired,\n isInvalid: groupAria.isInvalid,\n state,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-RadioGroup',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n // Remove ref from spread props to avoid type conflicts\n const cleanGroupProps = () => {\n const { ref: _ref, ...rest } = groupAria.radioGroupProps as Record<string, unknown>;\n return rest;\n };\n\n // Resolve children - we need to pass render props if children is a function\n // but we use props.children directly (not renderProps.renderChildren())\n // to preserve SolidJS context propagation for nested components like Radio\n const resolvedChildren = () => {\n const children = props.children;\n if (typeof children === 'function') {\n return children(renderValues());\n }\n return children;\n };\n\n return (\n <RadioGroupStateContext.Provider value={state}>\n <div\n {...domProps()}\n {...cleanGroupProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-orientation={ariaProps.orientation ?? 'vertical'}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={state.isRequired || undefined}\n data-invalid={groupAria.isInvalid || undefined}\n >\n {resolvedChildren()}\n </div>\n </RadioGroupStateContext.Provider>\n );\n}\n\n// ============================================\n// RADIO COMPONENT\n// ============================================\n\n/**\n * Internal Radio implementation that has access to RadioGroupStateContext.\n * This is rendered inside the RadioGroup's context provider.\n */\nfunction RadioImpl(props: { radioProps: RadioProps; state: RadioGroupState }): JSX.Element {\n let inputRef: HTMLInputElement | null = null;\n const { radioProps, state } = props;\n\n const [local, ariaProps] = splitProps(radioProps, ['class', 'style', 'slot']);\n\n // Create radio aria props\n const radioAria = createRadio(\n () => ({\n ...ariaProps,\n children: typeof radioProps.children === 'function' ? true : radioProps.children,\n }),\n state,\n () => inputRef\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return radioAria.isDisabled || state.isReadOnly;\n },\n });\n\n // Render props values\n const renderValues = createMemo<RadioRenderProps>(() => ({\n isSelected: radioAria.isSelected(),\n isHovered: isHovered(),\n isPressed: radioAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: radioAria.isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: radioProps.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Radio',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n // Remove ref from spread props to avoid type conflicts\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = radioAria.labelProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanInputProps = () => {\n const { ref: _ref3, ...rest } = radioAria.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref4, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <label\n {...domProps()}\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={radioAria.isSelected() || undefined}\n data-pressed={radioAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={radioAria.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-required={state.isRequired || undefined}\n >\n <VisuallyHidden>\n <input\n ref={(el) => (inputRef = el)}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n />\n </VisuallyHidden>\n {renderProps.renderChildren()}\n </label>\n );\n}\n\n/**\n * A radio represents an individual option within a radio group.\n *\n * @example\n * ```tsx\n * <Radio value=\"option1\">\n * {({ isSelected }) => (\n * <>\n * <span class={`radio ${isSelected ? 'selected' : ''}`}>\n * {isSelected && '●'}\n * </span>\n * <span>Option 1</span>\n * </>\n * )}\n * </Radio>\n * ```\n */\nexport function Radio(props: RadioProps): JSX.Element {\n // Get context - will be null if not inside RadioGroup\n // The context is accessed reactively to work with solid-refresh HMR\n const getState = createMemo(() => useContext(RadioGroupStateContext));\n\n return (\n <Show\n when={getState()}\n fallback={null}\n keyed\n >\n {(state) => <RadioImpl radioProps={props} state={state} />}\n </Show>\n );\n}\n", "/**\n * TextField component for solidaria-components\n *\n * A pre-wired headless text field that combines state + aria hooks.\n * Port of react-aria-components/src/TextField.tsx\n */\n\nimport {\n type JSX,\n createContext,\n useContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport {\n createTextField,\n createFocusRing,\n createHover,\n type AriaTextFieldProps,\n} from '@proyecto-viviana/solidaria';\nimport { createTextFieldState } from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TextFieldRenderProps {\n /** Whether the text field is disabled. */\n isDisabled: boolean;\n /** Whether the value is invalid. */\n isInvalid: boolean;\n /** Whether the text field is read only. */\n isReadOnly: boolean;\n /** Whether the text field is required. */\n isRequired: boolean;\n /** Whether the text field is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the text field is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the text field is keyboard focused. */\n isFocusVisible: boolean;\n}\n\nexport interface TextFieldProps\n extends Omit<AriaTextFieldProps, 'children'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<TextFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TextFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TextFieldRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport interface TextFieldContextValue {\n labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n descriptionProps: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps: JSX.HTMLAttributes<HTMLElement>;\n isInvalid: boolean;\n}\n\nexport const TextFieldContext = createContext<TextFieldContextValue | null>(null);\n\n// ============================================\n// SUB-COMPONENTS\n// ============================================\n\nexport interface LabelProps extends JSX.LabelHTMLAttributes<HTMLLabelElement> {\n children?: JSX.Element;\n}\n\n/**\n * A label element that automatically wires up to the parent TextField context.\n * This enables the proper htmlFor/id relationship between label and input.\n */\nexport function Label(props: LabelProps): JSX.Element {\n const context = useContext(TextFieldContext);\n\n // Merge context labelProps with local props (local props take precedence)\n const mergedProps = () => {\n if (context) {\n const { ref: _ref, ...contextLabelProps } = context.labelProps as Record<string, unknown>;\n return { ...contextLabelProps, ...props };\n }\n return props;\n };\n\n return <label {...mergedProps()}>{props.children}</label>;\n}\n\nexport interface InputProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, 'children'> {}\n\n/**\n * An input element that automatically wires up to the parent TextField context.\n * This enables focus tracking, validation, and accessibility props to flow from\n * the TextField to the actual input element.\n */\nexport function Input(props: InputProps): JSX.Element {\n const context = useContext(TextFieldContext);\n\n // Merge context inputProps with local props (local props take precedence)\n const mergedProps = () => {\n if (context) {\n // Remove ref from context props to avoid conflicts\n const { ref: _ref, ...contextInputProps } = context.inputProps as Record<string, unknown>;\n return { ...contextInputProps, ...props };\n }\n return props;\n };\n\n return <input {...mergedProps()} />;\n}\n\nexport interface TextAreaProps extends Omit<JSX.TextareaHTMLAttributes<HTMLTextAreaElement>, 'children'> {}\n\n/**\n * A textarea element that automatically wires up to the parent TextField context.\n * This enables focus tracking, validation, and accessibility props to flow from\n * the TextField to the actual textarea element.\n */\nexport function TextArea(props: TextAreaProps): JSX.Element {\n const context = useContext(TextFieldContext);\n\n // Merge context inputProps with local props (local props take precedence)\n // Note: TextArea uses inputProps from context since it's an input variant\n const mergedProps = () => {\n if (context) {\n const { ref: _ref, type: _type, ...contextInputProps } = context.inputProps as Record<string, unknown>;\n return { ...contextInputProps, ...props };\n }\n return props;\n };\n\n return <textarea {...mergedProps()} />;\n}\n\n// ============================================\n// COMPONENT\n// ============================================\n\n/**\n * A text field allows a user to enter a plain text value with a keyboard.\n *\n * This is a headless component that provides accessibility and state management.\n * Style it using the render props pattern or data attributes.\n *\n * @example\n * ```tsx\n * <TextField>\n * {({ isInvalid }) => (\n * <>\n * <Label>Email</Label>\n * <Input class={isInvalid ? 'border-red-500' : 'border-gray-300'} />\n * </>\n * )}\n * </TextField>\n * ```\n */\nexport function TextField(props: TextFieldProps): JSX.Element {\n // Split props\n const [local, ariaProps] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Create text field state\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createTextFieldState({\n get value() { return ariaProps.value; },\n get defaultValue() { return ariaProps.defaultValue; },\n get onChange() { return ariaProps.onChange; },\n });\n\n // Create text field aria props\n const textFieldAria = createTextField(() => ({\n ...ariaProps,\n value: state.value(),\n onChange: state.setValue,\n }));\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<TextFieldRenderProps>(() => ({\n isDisabled: ariaProps.isDisabled || false,\n isInvalid: textFieldAria.isInvalid,\n isReadOnly: ariaProps.isReadOnly || false,\n isRequired: ariaProps.isRequired || false,\n isHovered: isHovered(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-TextField',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n return filtered;\n });\n\n // Remove ref from spread props to avoid type conflicts\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Context value for sub-components\n // Note: We create the value object directly (not in a memo) so it's available\n // immediately when children access the context\n const contextValue: TextFieldContextValue = {\n labelProps: textFieldAria.labelProps as JSX.LabelHTMLAttributes<HTMLLabelElement>,\n inputProps: { ...textFieldAria.inputProps, ...focusProps } as JSX.InputHTMLAttributes<HTMLInputElement>,\n descriptionProps: textFieldAria.descriptionProps as JSX.HTMLAttributes<HTMLElement>,\n errorMessageProps: textFieldAria.errorMessageProps as JSX.HTMLAttributes<HTMLElement>,\n isInvalid: textFieldAria.isInvalid,\n };\n\n return (\n <TextFieldContext.Provider value={contextValue}>\n <div\n {...domProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={ariaProps.isDisabled || undefined}\n data-invalid={textFieldAria.isInvalid || undefined}\n data-readonly={ariaProps.isReadOnly || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n </TextFieldContext.Provider>\n );\n}\n", "/**\n * Link component for solidaria-components\n *\n * Pre-wired headless link component that combines aria hooks.\n * Port of react-aria-components/src/Link.tsx\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport { Dynamic } from 'solid-js/web';\nimport {\n createLink,\n createFocusRing,\n createHover,\n type AriaLinkProps,\n type HoverEvents,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface LinkRenderProps {\n /** Whether the link is the current item within a list. */\n isCurrent: boolean;\n /** Whether the link is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the link is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the link is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the link is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the link is disabled. */\n isDisabled: boolean;\n}\n\nexport interface LinkProps\n extends Omit<AriaLinkProps, 'elementType'>,\n HoverEvents,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<LinkRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<LinkRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<LinkRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const LinkContext = createContext<LinkProps | null>(null);\n\n// ============================================\n// LINK COMPONENT\n// ============================================\n\n/**\n * A link allows a user to navigate to another page or resource within a web page\n * or application.\n *\n * @example\n * ```tsx\n * <Link href=\"https://example.com\">Visit Example</Link>\n *\n * // With render props\n * <Link href=\"/about\">\n * {({ isHovered, isFocusVisible }) => (\n * <span class={isHovered ? 'underline' : ''}>\n * About Us\n * </span>\n * )}\n * </Link>\n * ```\n */\nexport function Link(props: ParentProps<LinkProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'slot',\n 'onHoverStart',\n 'onHoverEnd',\n 'onHoverChange',\n ]);\n\n // Determine element type - use 'a' if href is provided and not disabled\n const elementType = () => {\n if (ariaProps.href && !ariaProps.isDisabled) {\n return 'a';\n }\n return 'span';\n };\n\n // Create link aria props\n const linkAria = createLink({\n get elementType() { return elementType(); },\n get isDisabled() { return ariaProps.isDisabled; },\n get href() { return ariaProps.href; },\n get target() { return ariaProps.target; },\n get rel() { return ariaProps.rel; },\n get onPress() { return ariaProps.onPress; },\n get onPressStart() { return ariaProps.onPressStart; },\n get onPressEnd() { return ariaProps.onPressEnd; },\n get onClick() { return ariaProps.onClick; },\n get onFocus() { return ariaProps.onFocus; },\n get onBlur() { return ariaProps.onBlur; },\n get onFocusChange() { return ariaProps.onFocusChange; },\n get onKeyDown() { return ariaProps.onKeyDown; },\n get onKeyUp() { return ariaProps.onKeyUp; },\n get autoFocus() { return ariaProps.autoFocus; },\n get 'aria-current'() { return ariaProps['aria-current']; },\n get 'aria-label'() { return ariaProps['aria-label']; },\n get 'aria-labelledby'() { return ariaProps['aria-labelledby']; },\n get 'aria-describedby'() { return ariaProps['aria-describedby']; },\n });\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() { return ariaProps.isDisabled ?? false; },\n get onHoverStart() { return local.onHoverStart; },\n get onHoverEnd() { return local.onHoverEnd; },\n get onHoverChange() { return local.onHoverChange; },\n });\n\n // Render props values\n const renderValues = createMemo<LinkRenderProps>(() => ({\n isCurrent: !!ariaProps['aria-current'],\n isHovered: isHovered(),\n isPressed: linkAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Link',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n // Remove ref from spread props to avoid type conflicts\n const cleanLinkProps = () => {\n const { ref: _ref1, ...rest } = linkAria.linkProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <Dynamic\n component={elementType()}\n {...domProps()}\n {...cleanLinkProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-hovered={isHovered() || undefined}\n data-pressed={linkAria.isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-current={!!ariaProps['aria-current'] || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </Dynamic>\n );\n}\n", "/**\n * ProgressBar component for solidaria-components\n *\n * Pre-wired headless progress bar component that combines aria hooks.\n * Port of react-aria-components/src/ProgressBar.tsx\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport {\n createProgressBar,\n type AriaProgressBarProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ProgressBarRenderProps {\n /** The value as a percentage between the minimum and maximum (0-100). */\n percentage: number | undefined;\n /** A formatted version of the value. */\n valueText: string | undefined;\n /** Whether the progress bar is indeterminate. */\n isIndeterminate: boolean;\n}\n\nexport interface ProgressBarProps\n extends AriaProgressBarProps,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<ProgressBarRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ProgressBarRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ProgressBarRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const ProgressBarContext = createContext<ProgressBarProps | null>(null);\n\n// ============================================\n// UTILITIES\n// ============================================\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\n// ============================================\n// PROGRESSBAR COMPONENT\n// ============================================\n\n/**\n * Progress bars show either determinate or indeterminate progress of an operation\n * over time.\n *\n * @example\n * ```tsx\n * <ProgressBar value={50}>\n * {({ percentage, valueText }) => (\n * <>\n * <Label>Loading...</Label>\n * <span>{valueText}</span>\n * <div class=\"bar\" style={{ width: `${percentage}%` }} />\n * </>\n * )}\n * </ProgressBar>\n * ```\n */\nexport function ProgressBar(props: ParentProps<ProgressBarProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Get values for calculations\n const value = () => ariaProps.value ?? 0;\n const minValue = () => ariaProps.minValue ?? 0;\n const maxValue = () => ariaProps.maxValue ?? 100;\n const isIndeterminate = () => ariaProps.isIndeterminate ?? false;\n\n // Create progress bar aria props\n const progressAria = createProgressBar({\n get value() { return ariaProps.value; },\n get minValue() { return ariaProps.minValue; },\n get maxValue() { return ariaProps.maxValue; },\n get valueLabel() { return ariaProps.valueLabel; },\n get isIndeterminate() { return ariaProps.isIndeterminate; },\n get formatOptions() { return ariaProps.formatOptions; },\n get label() { return ariaProps.label; },\n get 'aria-label'() { return ariaProps['aria-label']; },\n get 'aria-labelledby'() { return ariaProps['aria-labelledby']; },\n get 'aria-describedby'() { return ariaProps['aria-describedby']; },\n get 'aria-details'() { return ariaProps['aria-details']; },\n });\n\n // Calculate percentage\n const percentage = createMemo(() => {\n if (isIndeterminate()) {\n return undefined;\n }\n const clampedValue = clamp(value(), minValue(), maxValue());\n return ((clampedValue - minValue()) / (maxValue() - minValue())) * 100;\n });\n\n // Get value text from aria props\n const valueText = createMemo(() => {\n return progressAria.progressBarProps['aria-valuetext'] as string | undefined;\n });\n\n // Render props values\n const renderValues = createMemo<ProgressBarRenderProps>(() => ({\n percentage: percentage(),\n valueText: valueText(),\n isIndeterminate: isIndeterminate(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ProgressBar',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <div\n {...domProps()}\n {...progressAria.progressBarProps}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n", "/**\n * Separator component for solidaria-components\n *\n * Pre-wired headless separator component that combines aria hooks.\n * Port of react-aria-components/src/Separator.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport { Dynamic } from 'solid-js/web';\nimport {\n createSeparator,\n type AriaSeparatorProps,\n type Orientation,\n} from '@proyecto-viviana/solidaria';\nimport {\n type SlotProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface SeparatorRenderProps {\n /** The orientation of the separator. */\n orientation: Orientation;\n}\n\nexport interface SeparatorProps\n extends AriaSeparatorProps,\n SlotProps {\n /** The CSS className for the element. A function may be provided to receive render props. */\n class?: string | ((renderProps: SeparatorRenderProps) => string);\n /** The inline style for the element. A function may be provided to receive render props. */\n style?: JSX.CSSProperties | ((renderProps: SeparatorRenderProps) => JSX.CSSProperties);\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const SeparatorContext = createContext<SeparatorProps | null>(null);\n\n// ============================================\n// SEPARATOR COMPONENT\n// ============================================\n\n/**\n * A separator is a visual divider between two groups of content,\n * e.g. groups of menu items or sections of a page.\n *\n * @example\n * ```tsx\n * <Separator />\n *\n * // Vertical separator\n * <Separator orientation=\"vertical\" />\n *\n * // Custom element type\n * <Separator elementType=\"div\" />\n * ```\n */\nexport function Separator(props: SeparatorProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Determine the element type\n const elementType = createMemo(() => {\n let element = ariaProps.elementType || 'hr';\n // If vertical and using hr, switch to div since hr is inherently horizontal\n if (element === 'hr' && ariaProps.orientation === 'vertical') {\n element = 'div';\n }\n return element;\n });\n\n // Create separator aria props\n const separatorAria = createSeparator({\n get orientation() { return ariaProps.orientation; },\n get elementType() { return elementType(); },\n get 'aria-label'() { return ariaProps['aria-label']; },\n get 'aria-labelledby'() { return ariaProps['aria-labelledby']; },\n get id() { return ariaProps.id; },\n });\n\n // Render props values\n const renderValues = createMemo<SeparatorRenderProps>(() => ({\n orientation: ariaProps.orientation ?? 'horizontal',\n }));\n\n // Resolve class\n const resolvedClass = createMemo(() => {\n const cls = local.class;\n if (typeof cls === 'function') {\n return cls(renderValues());\n }\n return cls ?? 'solidaria-Separator';\n });\n\n // Resolve style\n const resolvedStyle = createMemo(() => {\n const style = local.style;\n if (typeof style === 'function') {\n return style(renderValues());\n }\n return style;\n });\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <Dynamic\n component={elementType()}\n {...domProps()}\n {...separatorAria.separatorProps}\n class={resolvedClass()}\n style={resolvedStyle()}\n slot={local.slot}\n />\n );\n}\n", "/**\n * Toolbar component for solidaria-components\n *\n * Pre-wired headless toolbar component that combines aria hooks.\n * Port of react-aria-components/src/Toolbar.tsx\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n createMemo,\n splitProps,\n useContext,\n} from 'solid-js'\nimport {\n createToolbar,\n type AriaToolbarProps,\n type Orientation,\n} from '@proyecto-viviana/solidaria'\nimport {\n type SlotProps,\n filterDOMProps,\n} from './utils'\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ToolbarRenderProps {\n /** The orientation of the toolbar. */\n orientation: Orientation\n}\n\nexport interface ToolbarProps\n extends AriaToolbarProps,\n ParentProps,\n SlotProps {\n /** The CSS className for the element. A function may be provided to receive render props. */\n class?: string | ((renderProps: ToolbarRenderProps) => string)\n /** The inline style for the element. A function may be provided to receive render props. */\n style?: JSX.CSSProperties | ((renderProps: ToolbarRenderProps) => JSX.CSSProperties)\n /** Additional data-* attributes. */\n [key: `data-${string}`]: string | undefined\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport interface ToolbarContextValue {\n slots?: {\n [name: string]: Record<string, unknown>\n }\n}\n\nexport const ToolbarContext = createContext<ToolbarContextValue | null>(null)\n\n// ============================================\n// TOOLBAR COMPONENT\n// ============================================\n\n/**\n * A toolbar is a container for a set of interactive controls,\n * such as buttons, checkboxes, or links, with arrow key navigation.\n *\n * @example\n * ```tsx\n * <Toolbar aria-label=\"Text formatting\">\n * <Button>Bold</Button>\n * <Button>Italic</Button>\n * <Button>Underline</Button>\n * </Toolbar>\n *\n * // With render props\n * <Toolbar orientation=\"vertical\">\n * {({ orientation }) => (\n * <div data-orientation={orientation}>\n * <Button>Cut</Button>\n * <Button>Copy</Button>\n * <Button>Paste</Button>\n * </div>\n * )}\n * </Toolbar>\n * ```\n */\nexport function Toolbar(props: ToolbarProps): JSX.Element {\n const [local, ariaProps, domProps] = splitProps(\n props,\n ['class', 'style', 'slot', 'children'],\n ['orientation', 'aria-label', 'aria-labelledby']\n )\n\n // Get slot props from context if available\n const ctx = useContext(ToolbarContext)\n const slotProps = () => {\n if (ctx?.slots && local.slot) {\n return ctx.slots[local.slot] || {}\n }\n return {}\n }\n\n // Merge slot props with explicit props\n const mergedAriaProps = createMemo(() => ({\n orientation: ariaProps.orientation,\n 'aria-label': ariaProps['aria-label'] ?? slotProps()['aria-label'] as string | undefined,\n 'aria-labelledby': ariaProps['aria-labelledby'],\n }))\n\n // Create toolbar aria props\n const { toolbarProps, orientation } = createToolbar(mergedAriaProps())\n\n // Render props values\n const renderValues = createMemo<ToolbarRenderProps>(() => ({\n orientation: orientation(),\n }))\n\n // Resolve class\n const resolvedClass = createMemo(() => {\n const cls = local.class\n if (typeof cls === 'function') {\n return cls(renderValues())\n }\n return cls ?? 'solidaria-Toolbar'\n })\n\n // Resolve style\n const resolvedStyle = createMemo(() => {\n const style = local.style\n if (typeof style === 'function') {\n return style(renderValues())\n }\n return style\n })\n\n // Resolve children (support render props)\n const resolvedChildren = createMemo(() => {\n const children = props.children\n if (typeof children === 'function') {\n return (children as (props: ToolbarRenderProps) => JSX.Element)(renderValues())\n }\n return children\n })\n\n // Filter remaining DOM props\n const filteredDOMProps = createMemo(() => filterDOMProps(domProps, { global: true }))\n\n return (\n <div\n {...filteredDOMProps()}\n {...toolbarProps}\n class={resolvedClass()}\n style={resolvedStyle()}\n slot={local.slot}\n data-orientation={orientation()}\n >\n {resolvedChildren()}\n </div>\n )\n}\n", "/**\n * Autocomplete component for solidaria-components\n *\n * Provides autocomplete functionality by wrapping a text input\n * with a filterable collection (ListBox/Menu).\n *\n * Port of react-aria-components/src/Autocomplete.tsx\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n useContext,\n createMemo,\n splitProps,\n createSignal,\n} from 'solid-js'\nimport {\n createAutocomplete,\n type AriaAutocompleteOptions,\n type AutocompleteInputProps,\n type CollectionOptions,\n} from '@proyecto-viviana/solidaria'\nimport {\n createAutocompleteState,\n type AutocompleteState,\n type AutocompleteStateOptions,\n} from '@proyecto-viviana/solid-stately'\nimport { type SlotProps } from './utils'\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface AutocompleteProps<T = unknown>\n extends Omit<AutocompleteStateOptions, 'children'>,\n Omit<AriaAutocompleteOptions<T>, 'inputRef' | 'collectionRef'>,\n ParentProps,\n SlotProps {}\n\n// ============================================\n// CONTEXTS\n// ============================================\n\nexport interface AutocompleteContextValue {\n inputProps: AutocompleteInputProps\n inputRef: (el: HTMLInputElement) => void\n}\n\nexport interface AutocompleteCollectionContextValue {\n collectionProps: CollectionOptions\n collectionRef: (el: HTMLElement) => void\n filter?: (textValue: string) => boolean\n}\n\nexport const AutocompleteContext = createContext<AutocompleteContextValue | null>(null)\nexport const AutocompleteStateContext = createContext<AutocompleteState | null>(null)\nexport const AutocompleteCollectionContext = createContext<AutocompleteCollectionContextValue | null>(null)\n\n/**\n * Hook to consume autocomplete input context.\n * Use this in your input component (TextField/SearchField) to get the autocomplete props.\n */\nexport function useAutocompleteInput() {\n return useContext(AutocompleteContext)\n}\n\n/**\n * Hook to consume autocomplete state context.\n */\nexport function useAutocompleteState() {\n return useContext(AutocompleteStateContext)\n}\n\n/**\n * Hook to consume autocomplete collection context.\n * Use this in your collection component (ListBox/Menu) to get the autocomplete props.\n */\nexport function useAutocompleteCollection() {\n return useContext(AutocompleteCollectionContext)\n}\n\n// ============================================\n// AUTOCOMPLETE COMPONENT\n// ============================================\n\n/**\n * An autocomplete allows users to search or filter a list of suggestions.\n * It wraps a text input and a collection component (ListBox or Menu),\n * providing keyboard navigation and filtering capabilities.\n *\n * @example\n * ```tsx\n * // Basic usage with SearchField and ListBox\n * <Autocomplete\n * filter={(textValue, inputValue) =>\n * textValue.toLowerCase().includes(inputValue.toLowerCase())\n * }\n * >\n * <SearchField aria-label=\"Search\">\n * <Input />\n * </SearchField>\n * <ListBox aria-label=\"Suggestions\">\n * <ListBoxItem>Option 1</ListBoxItem>\n * <ListBoxItem>Option 2</ListBoxItem>\n * <ListBoxItem>Option 3</ListBoxItem>\n * </ListBox>\n * </Autocomplete>\n *\n * // Controlled input value\n * const [value, setValue] = createSignal('');\n * <Autocomplete\n * inputValue={value()}\n * onInputChange={setValue}\n * filter={(textValue, inputValue) =>\n * textValue.toLowerCase().includes(inputValue.toLowerCase())\n * }\n * >\n * {/* ... *\\/}\n * </Autocomplete>\n * ```\n */\nexport function Autocomplete<T = unknown>(props: AutocompleteProps<T>): JSX.Element {\n const [stateProps, ariaProps, local] = splitProps(\n props,\n ['inputValue', 'defaultInputValue', 'onInputChange'],\n ['filter', 'disableAutoFocusFirst', 'disableVirtualFocus']\n )\n\n // Create state\n const state = createAutocompleteState(stateProps)\n\n // Create refs\n let inputRef: HTMLInputElement | undefined\n let collectionRef: HTMLElement | undefined\n\n // Create autocomplete aria\n const autocomplete = createAutocomplete<T>(\n {\n ...ariaProps,\n inputRef: () => inputRef,\n collectionRef: () => collectionRef,\n },\n state\n )\n\n // Input context value\n const inputContextValue = createMemo<AutocompleteContextValue>(() => ({\n inputProps: autocomplete.inputProps,\n inputRef: (el: HTMLInputElement) => {\n inputRef = el\n },\n }))\n\n // Collection context value\n const collectionContextValue = createMemo<AutocompleteCollectionContextValue>(() => ({\n collectionProps: autocomplete.collectionProps,\n collectionRef: (el: HTMLElement) => {\n collectionRef = el\n },\n filter: autocomplete.filter,\n }))\n\n return (\n <AutocompleteStateContext.Provider value={state}>\n <AutocompleteContext.Provider value={inputContextValue()}>\n <AutocompleteCollectionContext.Provider value={collectionContextValue()}>\n {props.children}\n </AutocompleteCollectionContext.Provider>\n </AutocompleteContext.Provider>\n </AutocompleteStateContext.Provider>\n )\n}\n", "/**\n * ListBox component for solidaria-components\n *\n * A pre-wired headless listbox that combines state + aria hooks.\n * Port of react-aria-components/src/ListBox.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n} from 'solid-js';\nimport {\n createListBox,\n createOption,\n createFocusRing,\n createHover,\n type AriaListBoxProps,\n type AriaOptionProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createListState,\n type ListState,\n type Key,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ListBoxRenderProps {\n /** Whether the listbox has focus. */\n isFocused: boolean;\n /** Whether the listbox has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the listbox is disabled. */\n isDisabled: boolean;\n /** Whether the listbox is empty. */\n isEmpty: boolean;\n}\n\nexport interface ListBoxProps<T>\n extends Omit<AriaListBoxProps, 'children'>,\n SlotProps {\n /** The items to render in the listbox. Optional for static children pattern. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** The selection mode. */\n selectionMode?: 'none' | 'single' | 'multiple';\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Currently selected keys (controlled). */\n selectedKeys?: 'all' | Iterable<Key>;\n /** Default selected keys (uncontrolled). */\n defaultSelectedKeys?: 'all' | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: 'all' | Set<Key>) => void;\n /** The children of the component. A function may be provided to render each item. */\n children?: ((item: T) => JSX.Element) | JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ListBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ListBoxRenderProps>;\n /** A function to render when the listbox is empty. */\n renderEmptyState?: () => JSX.Element;\n}\n\nexport interface ListBoxOptionRenderProps {\n /** Whether the option is selected. */\n isSelected: boolean;\n /** Whether the option is focused. */\n isFocused: boolean;\n /** Whether the option has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the option is pressed. */\n isPressed: boolean;\n /** Whether the option is hovered. */\n isHovered: boolean;\n /** Whether the option is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ListBoxOptionProps<T>\n extends Omit<AriaOptionProps, 'children' | 'key'>,\n SlotProps {\n /** The unique key for the option. Optional when used as static child. */\n id?: Key;\n /** The item value. */\n item?: T;\n /** The children of the option. A function may be provided to receive render props. */\n children?: RenderChildren<ListBoxOptionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ListBoxOptionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ListBoxOptionRenderProps>;\n /** The text value of the option (for typeahead). */\n textValue?: string;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface ListBoxContextValue<T> {\n state: ListState<T>;\n}\n\nexport const ListBoxContext = createContext<ListBoxContextValue<unknown> | null>(null);\nexport const ListBoxStateContext = createContext<ListState<unknown> | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A listbox displays a list of options and allows a user to select one or more of them.\n */\nexport function ListBox<T>(props: ListBoxProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'renderEmptyState'],\n ['items', 'getKey', 'getTextValue', 'getDisabled', 'disabledKeys', 'selectionMode', 'selectedKeys', 'defaultSelectedKeys', 'onSelectionChange']\n );\n\n // Create list state\n const state = createListState<T>({\n get items() {\n return stateProps.items;\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectionMode() {\n return stateProps.selectionMode;\n },\n get selectedKeys() {\n return stateProps.selectedKeys;\n },\n get defaultSelectedKeys() {\n return stateProps.defaultSelectedKeys;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n });\n\n // Helper to resolve isDisabled\n const resolveDisabled = (): boolean => {\n const disabled = ariaProps.isDisabled;\n if (typeof disabled === 'function') {\n return (disabled as () => boolean)();\n }\n return !!disabled;\n };\n\n // Create listbox aria props\n const { listBoxProps } = createListBox(\n {\n ...ariaProps,\n get isDisabled() {\n return resolveDisabled();\n },\n },\n state\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<ListBoxRenderProps>(() => ({\n isFocused: state.isFocused() || isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: resolveDisabled(),\n isEmpty: state.collection().size === 0,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ListBox',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from spread props\n const cleanListBoxProps = () => {\n const { ref: _ref1, ...rest } = listBoxProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n const isEmpty = () => (stateProps.items?.length ?? 0) === 0;\n\n return (\n <ListBoxContext.Provider value={{ state }}>\n <ListBoxStateContext.Provider value={state}>\n <ul\n {...domProps()}\n {...cleanListBoxProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={resolveDisabled() || undefined}\n data-empty={isEmpty() || undefined}\n >\n {isEmpty() && local.renderEmptyState\n ? local.renderEmptyState()\n : <For each={stateProps.items ?? []}>{(item) => typeof props.children === 'function' ? props.children(item) : null}</For>\n }\n </ul>\n </ListBoxStateContext.Provider>\n </ListBoxContext.Provider>\n );\n}\n\n/**\n * An option in a listbox.\n */\nexport function ListBoxOption<T>(props: ListBoxOptionProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n ]);\n\n // Get state from context\n const context = useContext(ListBoxStateContext);\n if (!context) {\n throw new Error('ListBoxOption must be used within a ListBox');\n }\n const state = context as ListState<T>;\n\n // Create option aria props\n const optionAria = createOption<T>(\n {\n key: local.id!,\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n },\n state\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return optionAria.isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<ListBoxOptionRenderProps>(() => ({\n isSelected: optionAria.isSelected(),\n isFocused: optionAria.isFocused(),\n isFocusVisible: optionAria.isFocusVisible(),\n isPressed: optionAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: optionAria.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ListBox-option',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanOptionProps = () => {\n const { ref: _ref1, ...rest } = optionAria.optionProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <li\n {...cleanOptionProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={optionAria.isSelected() || undefined}\n data-focused={optionAria.isFocused() || undefined}\n data-focus-visible={optionAria.isFocusVisible() || undefined}\n data-pressed={optionAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={optionAria.isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </li>\n );\n}\n\n// Attach Option as a static property\nListBox.Option = ListBoxOption;\n", "/**\n * Menu component for solidaria-components\n *\n * A pre-wired headless menu that combines state + aria hooks.\n * Port of react-aria-components/src/Menu.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createMenu,\n createMenuItem,\n createMenuTrigger,\n createFocusRing,\n createHover,\n createButton,\n createInteractOutside,\n FocusScope,\n type AriaMenuProps,\n type AriaMenuItemProps,\n type AriaMenuTriggerProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createMenuState,\n createMenuTriggerState,\n type MenuState,\n type OverlayTriggerState,\n type Key,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface MenuRenderProps {\n /** Whether the menu is focused. */\n isFocused: boolean;\n /** Whether the menu is open. */\n isOpen: boolean;\n}\n\nexport interface MenuProps<T>\n extends Omit<AriaMenuProps, 'children'>,\n SlotProps {\n /** The items to render in the menu. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Handler called when an item is activated. */\n onAction?: (key: Key) => void;\n /** Handler called when the menu should close. */\n onClose?: () => void;\n /** The children of the component. A function may be provided to render each item. */\n children?: ((item: T) => JSX.Element) | JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<MenuRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<MenuRenderProps>;\n}\n\nexport interface MenuItemRenderProps {\n /** Whether the item is selected. */\n isSelected: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n}\n\nexport interface MenuItemProps<T>\n extends Omit<AriaMenuItemProps, 'children' | 'key'>,\n SlotProps {\n /** The unique key for the item. */\n id?: Key;\n /** The item value. */\n item?: T;\n /** The children of the item. A function may be provided to receive render props. */\n children?: RenderChildren<MenuItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<MenuItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<MenuItemRenderProps>;\n /** The text value of the item (for typeahead). */\n textValue?: string;\n /** Handler called when the item is activated. */\n onAction?: () => void;\n}\n\nexport interface MenuTriggerRenderProps {\n /** Whether the menu is open. */\n isOpen: boolean;\n /** Whether the trigger is focused. */\n isFocused: boolean;\n /** Whether the trigger has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the trigger is pressed. */\n isPressed: boolean;\n /** Whether the trigger is hovered. */\n isHovered: boolean;\n /** Whether the trigger is disabled. */\n isDisabled: boolean;\n}\n\nexport interface MenuTriggerProps extends Omit<AriaMenuTriggerProps, 'children'>, SlotProps {\n /** The children of the trigger (typically a Button and Menu). */\n children: JSX.Element;\n /** Whether the menu trigger is disabled. */\n isDisabled?: boolean;\n /** Whether the menu is open by default. */\n defaultOpen?: boolean;\n /** Whether the menu is open (controlled). */\n isOpen?: boolean;\n /** Handler called when the open state changes. */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface MenuContextValue<T> {\n state: MenuState<T>;\n}\n\ninterface MenuTriggerContextValue {\n state: OverlayTriggerState;\n triggerProps: JSX.HTMLAttributes<HTMLElement>;\n menuProps: JSX.HTMLAttributes<HTMLElement>;\n}\n\nexport const MenuContext = createContext<MenuContextValue<unknown> | null>(null);\nexport const MenuStateContext = createContext<MenuState<unknown> | null>(null);\nexport const MenuTriggerContext = createContext<MenuTriggerContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A menu trigger wraps a button and menu, handling the open/close state.\n */\nexport function MenuTrigger(props: MenuTriggerProps): JSX.Element {\n const [local, stateProps] = splitProps(props, ['slot']);\n\n // Create trigger state\n const state = createMenuTriggerState({\n get isOpen() {\n return stateProps.isOpen;\n },\n get defaultOpen() {\n return stateProps.defaultOpen;\n },\n get onOpenChange() {\n return stateProps.onOpenChange;\n },\n });\n\n // Create trigger aria props\n const { menuTriggerProps, menuProps } = createMenuTrigger(\n {\n get isDisabled() {\n return stateProps.isDisabled;\n },\n },\n state\n );\n\n return (\n <MenuTriggerContext.Provider\n value={{\n state,\n triggerProps: menuTriggerProps,\n menuProps,\n }}\n >\n {props.children}\n </MenuTriggerContext.Provider>\n );\n}\n\n/**\n * A button that opens a menu.\n */\nexport interface MenuButtonProps extends SlotProps {\n /** The children of the button. A function may be provided to receive render props. */\n children?: RenderChildren<MenuTriggerRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<MenuTriggerRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<MenuTriggerRenderProps>;\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n}\n\nexport function MenuButton(props: MenuButtonProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot', 'isDisabled']);\n\n // Get trigger context\n const context = useContext(MenuTriggerContext);\n if (!context) {\n throw new Error('MenuButton must be used within a MenuTrigger');\n }\n const { state, triggerProps } = context;\n\n // Create button aria props for proper press handling\n const buttonAria = createButton({\n get isDisabled() {\n return local.isDisabled;\n },\n onPress() {\n state.toggle();\n },\n });\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return local.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<MenuTriggerRenderProps>(() => ({\n isOpen: state.isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isPressed: buttonAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: !!local.isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-MenuButton',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanTriggerProps = () => {\n const { ref: _ref1, ...rest } = triggerProps as Record<string, unknown>;\n return rest;\n };\n const cleanButtonProps = () => {\n const { ref: _ref2, ...rest } = buttonAria.buttonProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref4, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n {...cleanTriggerProps()}\n {...cleanButtonProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n type=\"button\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={state.isOpen() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-pressed={buttonAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={local.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n/**\n * A menu displays a list of actions or options for the user to choose from.\n */\nexport function Menu<T>(props: MenuProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n ['items', 'getKey', 'getTextValue', 'getDisabled', 'disabledKeys', 'onAction', 'onClose']\n );\n\n // Get trigger context if available\n const triggerContext = useContext(MenuTriggerContext);\n\n // Ref for the menu element (for click outside detection)\n let menuRef: HTMLUListElement | undefined;\n\n // Create menu state\n const state = createMenuState<T>({\n get items() {\n return stateProps.items;\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get onAction() {\n return stateProps.onAction;\n },\n get onClose() {\n return stateProps.onClose ?? (() => triggerContext?.state.close());\n },\n });\n\n // Create menu aria props\n const { menuProps } = createMenu(\n {\n get onClose() {\n return stateProps.onClose ?? (() => triggerContext?.state.close());\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n get 'aria-labelledby'() {\n return ariaProps['aria-labelledby'];\n },\n },\n state\n );\n\n // Create focus ring\n const { isFocused, focusProps } = createFocusRing();\n\n // Handle click outside to close menu\n createInteractOutside({\n ref: () => menuRef ?? null,\n onInteractOutside: () => {\n if (triggerContext?.state.isOpen()) {\n triggerContext.state.close();\n }\n },\n get isDisabled() {\n return !triggerContext?.state.isOpen();\n },\n });\n\n // Render props values\n const renderValues = createMemo<MenuRenderProps>(() => ({\n isFocused: state.isFocused() || isFocused(),\n isOpen: triggerContext?.state.isOpen() ?? true,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Menu',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanMenuProps = () => {\n const { ref: _ref1, ...rest } = menuProps as Record<string, unknown>;\n return rest;\n };\n const cleanTriggerMenuProps = () => {\n if (!triggerContext) return {};\n const { ref: _ref2, ...rest } = triggerContext.menuProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n // If inside a MenuTrigger, only render when open\n // If standalone (no trigger context), always render\n const shouldRender = () => triggerContext ? triggerContext.state.isOpen() : true;\n\n // Only use FocusScope when inside a MenuTrigger (for popover behavior)\n // Standalone menus don't need focus restoration\n const menuContent = () => (\n <MenuContext.Provider value={{ state }}>\n <MenuStateContext.Provider value={state}>\n <ul\n ref={(el) => (menuRef = el)}\n {...cleanMenuProps()}\n {...cleanTriggerMenuProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused() || undefined}\n >\n <For each={stateProps.items ?? []}>{(item) => typeof props.children === 'function' ? props.children(item) : null}</For>\n </ul>\n </MenuStateContext.Provider>\n </MenuContext.Provider>\n );\n\n return (\n <Show when={shouldRender()}>\n <Show when={triggerContext} fallback={menuContent()}>\n <FocusScope restoreFocus autoFocus>\n {menuContent()}\n </FocusScope>\n </Show>\n </Show>\n );\n}\n\n/**\n * An item in a menu.\n */\nexport function MenuItem<T>(props: MenuItemProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n 'onAction',\n ]);\n\n // Get state from context\n const context = useContext(MenuStateContext);\n if (!context) {\n throw new Error('MenuItem must be used within a Menu');\n }\n const state = context as MenuState<T>;\n\n // Create menu item aria props\n const itemAria = createMenuItem<T>(\n {\n key: local.id!,\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n get onAction() {\n return local.onAction;\n },\n },\n state\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return itemAria.isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<MenuItemRenderProps>(() => ({\n isSelected: false, // Menu items don't have selection state\n isFocused: itemAria.isFocused(),\n isFocusVisible: itemAria.isFocusVisible(),\n isPressed: itemAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: itemAria.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Menu-item',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanItemProps = () => {\n const { ref: _ref1, ...rest } = itemAria.menuItemProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <li\n {...cleanItemProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={itemAria.isFocused() || undefined}\n data-focus-visible={itemAria.isFocusVisible() || undefined}\n data-pressed={itemAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={itemAria.isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </li>\n );\n}\n\n// Attach Item as a static property\nMenu.Item = MenuItem;\n", "/**\n * Select component for solidaria-components\n *\n * A pre-wired headless select that combines state + aria hooks.\n * Port of react-aria-components/src/Select.tsx\n */\n\nimport {\n type JSX,\n type Accessor,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createSelect,\n createHiddenSelect,\n createListBox,\n createOption,\n createHover,\n createInteractOutside,\n FocusScope,\n type AriaSelectProps,\n type AriaOptionProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createSelectState,\n type SelectState,\n type Key,\n type CollectionNode,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface SelectRenderProps {\n /** Whether the select is open. */\n isOpen: boolean;\n /** Whether the select is focused. */\n isFocused: boolean;\n /** Whether the select has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the select is disabled. */\n isDisabled: boolean;\n /** Whether the select is required. */\n isRequired: boolean;\n /** Whether a value is selected. */\n isSelected: boolean;\n}\n\nexport interface SelectProps<T>\n extends Omit<AriaSelectProps, 'children'>,\n SlotProps {\n /** The items to render in the select. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** The currently selected key (controlled). */\n selectedKey?: Key | null;\n /** The default selected key (uncontrolled). */\n defaultSelectedKey?: Key | null;\n /** Handler called when selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n /** Whether the select is open (controlled). */\n isOpen?: boolean;\n /** Whether the select is open by default (uncontrolled). */\n defaultOpen?: boolean;\n /** Handler called when the open state changes. */\n onOpenChange?: (isOpen: boolean) => void;\n /** Placeholder text when no option is selected. */\n placeholder?: string;\n /** The name of the select, used when submitting an HTML form. */\n name?: string;\n /** The children of the component (compound components: SelectTrigger, SelectListBox). */\n children: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectRenderProps>;\n}\n\nexport interface SelectValueRenderProps<T> {\n /** The selected item. */\n selectedItem: CollectionNode<T> | null;\n /** The text value of the selected item. */\n selectedText: string | null;\n /** Whether a value is selected. */\n isSelected: boolean;\n /** The placeholder text. */\n placeholder: string | undefined;\n}\n\nexport interface SelectValueProps<T> extends SlotProps {\n /** The children of the value. A function may be provided to receive render props. */\n children?: RenderChildren<SelectValueRenderProps<T>>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectValueRenderProps<T>>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectValueRenderProps<T>>;\n /** Placeholder text when no option is selected. Overrides the placeholder from Select. */\n placeholder?: string;\n}\n\nexport interface SelectTriggerRenderProps {\n /** Whether the select is open. */\n isOpen: boolean;\n /** Whether the trigger is focused. */\n isFocused: boolean;\n /** Whether the trigger has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the trigger is hovered. */\n isHovered: boolean;\n /** Whether the trigger is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SelectTriggerProps extends SlotProps {\n /** The children of the trigger. A function may be provided to receive render props. */\n children?: RenderChildren<SelectTriggerRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectTriggerRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectTriggerRenderProps>;\n}\n\nexport interface SelectListBoxRenderProps {\n /** Whether the listbox is focused. */\n isFocused: boolean;\n}\n\nexport interface SelectListBoxProps<T> extends SlotProps {\n /** The children of the listbox. A function may be provided to render each item. */\n children?: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectListBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectListBoxRenderProps>;\n}\n\nexport interface SelectOptionRenderProps {\n /** Whether the option is selected. */\n isSelected: boolean;\n /** Whether the option is focused. */\n isFocused: boolean;\n /** Whether the option has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the option is pressed. */\n isPressed: boolean;\n /** Whether the option is hovered. */\n isHovered: boolean;\n /** Whether the option is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SelectOptionProps<T>\n extends Omit<AriaOptionProps, 'children' | 'key'>,\n SlotProps {\n /** The unique key for the option. */\n id?: Key;\n /** The item value. */\n item?: T;\n /** The children of the option. A function may be provided to receive render props. */\n children?: RenderChildren<SelectOptionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectOptionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectOptionRenderProps>;\n /** The text value of the option (for typeahead). */\n textValue?: string;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface SelectContextValue<T> {\n state: SelectState<T>;\n triggerProps: JSX.HTMLAttributes<HTMLElement>;\n valueProps: JSX.HTMLAttributes<HTMLElement>;\n menuProps: JSX.HTMLAttributes<HTMLElement>;\n isOpen: Accessor<boolean>;\n isFocused: Accessor<boolean>;\n isFocusVisible: Accessor<boolean>;\n placeholder?: string;\n items?: T[];\n renderItem?: (item: T) => JSX.Element;\n}\n\nexport const SelectContext = createContext<SelectContextValue<unknown> | null>(null);\nexport const SelectStateContext = createContext<SelectState<unknown> | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A select displays a collapsible list of options and allows a user to select one of them.\n */\nexport function Select<T>(props: SelectProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['class', 'style', 'slot'],\n ['items', 'getKey', 'getTextValue', 'getDisabled', 'disabledKeys', 'selectedKey', 'defaultSelectedKey', 'onSelectionChange', 'isOpen', 'defaultOpen', 'onOpenChange', 'name']\n );\n\n // Create select state\n const state = createSelectState<T>({\n get items() {\n return stateProps.items ?? [];\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectedKey() {\n return stateProps.selectedKey;\n },\n get defaultSelectedKey() {\n return stateProps.defaultSelectedKey;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n get isOpen() {\n return stateProps.isOpen;\n },\n get defaultOpen() {\n return stateProps.defaultOpen;\n },\n get onOpenChange() {\n return stateProps.onOpenChange;\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isRequired() {\n return ariaProps.isRequired;\n },\n });\n\n // Create select aria props\n const { triggerProps, valueProps, menuProps, isFocused, isFocusVisible, isOpen } = createSelect<T>(\n ariaProps,\n state\n );\n\n // Create hover for wrapper\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<SelectRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: !!ariaProps.isDisabled,\n isRequired: !!ariaProps.isRequired,\n isSelected: state.selectedKey() != null,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Select',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from hover props\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Create hidden select for form submission\n const { containerProps, selectProps: hiddenSelectProps } = createHiddenSelect({\n state,\n name: stateProps.name,\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n });\n\n return (\n <SelectContext.Provider\n value={{\n state,\n triggerProps,\n valueProps,\n menuProps,\n isOpen,\n isFocused,\n isFocusVisible,\n placeholder: ariaProps.placeholder,\n items: stateProps.items,\n }}\n >\n <SelectStateContext.Provider value={state}>\n <div\n {...domProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={isOpen() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-hovered={isHovered() || undefined}\n >\n {/* Hidden select for form submission */}\n <div {...containerProps}>\n <select {...hiddenSelectProps}>\n <option />\n <For each={stateProps.items}>\n {(item) => {\n const key = stateProps.getKey?.(item) ?? (item as any).key ?? (item as any).id;\n const textValue = stateProps.getTextValue?.(item) ?? (item as any).textValue ?? (item as any).label ?? String(item);\n return (\n <option value={String(key)} selected={key === state.selectedKey()}>\n {textValue}\n </option>\n );\n }}\n </For>\n </select>\n </div>\n {props.children}\n </div>\n </SelectStateContext.Provider>\n </SelectContext.Provider>\n );\n}\n\n/**\n * The trigger button for a select.\n */\nexport function SelectTrigger(props: SelectTriggerProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error('SelectTrigger must be used within a Select');\n }\n const { triggerProps, isOpen, isFocused, isFocusVisible, state } = context;\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<SelectTriggerRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isDisabled: state.isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Select-trigger',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanTriggerProps = () => {\n const { ref: _ref1, ...rest } = triggerProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n {...cleanTriggerProps()}\n {...cleanHoverProps()}\n type=\"button\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={isOpen() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={state.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n// Default children function for SelectValue - defined at module level for SSR stability\nfunction defaultSelectValueChildren<T>(values: SelectValueRenderProps<T>) {\n return values.selectedText ?? values.placeholder ?? '';\n}\n\n/**\n * Displays the selected value in a select.\n */\nexport function SelectValue<T>(props: SelectValueProps<T>): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot', 'placeholder']);\n\n // Get context\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error('SelectValue must be used within a Select');\n }\n const { valueProps, placeholder: contextPlaceholder } = context;\n const state = context.state as SelectState<T>;\n\n // Use local placeholder if provided, otherwise fall back to context\n const placeholder = () => local.placeholder ?? contextPlaceholder;\n\n // Render props values\n const renderValues = createMemo<SelectValueRenderProps<T>>(() => {\n const selectedItem = state.selectedItem();\n return {\n selectedItem,\n selectedText: selectedItem?.textValue ?? null,\n isSelected: selectedItem != null,\n placeholder: placeholder(),\n };\n });\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children ?? defaultSelectValueChildren,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Select-value',\n },\n renderValues\n );\n\n return (\n <span\n {...valueProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-placeholder={!renderValues().isSelected || undefined}\n >\n {renderProps.renderChildren()}\n </span>\n );\n}\n\n/**\n * The listbox popup for a select.\n */\nexport function SelectListBox<T>(props: SelectListBoxProps<T>): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error('SelectListBox must be used within a Select');\n }\n const { menuProps, state: selectState, isOpen } = context;\n const state = selectState as SelectState<T>;\n\n // Ref for the listbox element (for click outside detection)\n let listBoxRef: HTMLUListElement | undefined;\n\n // Handle click outside to close select\n createInteractOutside({\n ref: () => listBoxRef ?? null,\n onInteractOutside: () => {\n if (isOpen()) {\n state.close();\n }\n },\n get isDisabled() {\n return !isOpen();\n },\n });\n\n // Create listbox aria props - reuse select's internal list state via collection\n const { listBoxProps } = createListBox(\n {},\n {\n collection: state.collection,\n focusedKey: state.focusedKey,\n setFocusedKey: state.setFocusedKey,\n isFocused: state.isFocused,\n setFocused: state.setFocused,\n selectedKeys: () => {\n const key = state.selectedKey();\n return key != null ? new Set([key]) : new Set();\n },\n isSelected: (key: Key) => state.selectedKey() === key,\n isDisabled: state.isKeyDisabled,\n selectionMode: () => 'single' as const,\n disallowEmptySelection: () => true,\n select: (key: Key) => state.setSelectedKey(key),\n toggleSelection: (key: Key) => state.setSelectedKey(key),\n replaceSelection: (key: Key) => state.setSelectedKey(key),\n extendSelection: () => {},\n selectAll: () => {},\n clearSelection: () => state.setSelectedKey(null),\n childFocusStrategy: () => null,\n } as any\n );\n\n // Render props values\n const renderValues = createMemo<SelectListBoxRenderProps>(() => ({\n isFocused: state.isFocused(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Select-listbox',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanMenuProps = () => {\n const { ref: _ref1, ...rest } = menuProps as Record<string, unknown>;\n return rest;\n };\n const cleanListBoxProps = () => {\n const { ref: _ref2, ...rest } = listBoxProps as Record<string, unknown>;\n return rest;\n };\n\n const items = () => Array.from(state.collection());\n\n return (\n <Show when={isOpen()}>\n <FocusScope restoreFocus autoFocus>\n <ul\n ref={(el) => (listBoxRef = el)}\n {...cleanMenuProps()}\n {...cleanListBoxProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused() || undefined}\n >\n <Show when={props.children} fallback={\n <For each={items()}>\n {(node) => (\n <SelectOption id={node.key}>\n {node.textValue}\n </SelectOption>\n )}\n </For>\n }>\n <For each={items()}>\n {(node) => node.value != null ? props.children!(node.value) : null}\n </For>\n </Show>\n </ul>\n </FocusScope>\n </Show>\n );\n}\n\n/**\n * An option in a select listbox.\n */\nexport function SelectOption<T>(props: SelectOptionProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n ]);\n\n // Get state from context\n const context = useContext(SelectStateContext);\n if (!context) {\n throw new Error('SelectOption must be used within a Select');\n }\n const state = context as SelectState<T>;\n\n // Create option aria props - adapt select state to list state interface\n const optionAria = createOption<T>(\n {\n key: local.id!,\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n },\n {\n collection: state.collection,\n focusedKey: state.focusedKey,\n setFocusedKey: state.setFocusedKey,\n isFocused: state.isFocused,\n setFocused: state.setFocused,\n selectedKeys: () => {\n const key = state.selectedKey();\n return key != null ? new Set([key]) : new Set();\n },\n isSelected: (key: Key) => state.selectedKey() === key,\n isDisabled: state.isKeyDisabled,\n selectionMode: () => 'single' as const,\n disallowEmptySelection: () => true,\n select: (key: Key) => {\n state.setSelectedKey(key);\n state.close();\n },\n toggleSelection: (key: Key) => {\n state.setSelectedKey(key);\n state.close();\n },\n replaceSelection: (key: Key) => {\n state.setSelectedKey(key);\n state.close();\n },\n extendSelection: () => {},\n selectAll: () => {},\n clearSelection: () => state.setSelectedKey(null),\n childFocusStrategy: () => null,\n } as any\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return optionAria.isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<SelectOptionRenderProps>(() => ({\n isSelected: optionAria.isSelected(),\n isFocused: optionAria.isFocused(),\n isFocusVisible: optionAria.isFocusVisible(),\n isPressed: optionAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: optionAria.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Select-option',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanOptionProps = () => {\n const { ref: _ref1, ...rest } = optionAria.optionProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <li\n {...cleanOptionProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={optionAria.isSelected() || undefined}\n data-focused={optionAria.isFocused() || undefined}\n data-focus-visible={optionAria.isFocusVisible() || undefined}\n data-pressed={optionAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={optionAria.isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </li>\n );\n}\n\n// Attach sub-components\nSelect.Trigger = SelectTrigger;\nSelect.Value = SelectValue;\nSelect.ListBox = SelectListBox;\nSelect.Option = SelectOption;\n", "/**\n * Tabs component for solidaria-components\n *\n * A pre-wired headless tabs component that combines state + aria hooks.\n * Port of react-aria-components/src/Tabs.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createTabList,\n createTab,\n createTabPanel,\n createFocusRing,\n createHover,\n type AriaTabListProps,\n type AriaTabProps,\n type AriaTabPanelProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createTabListState,\n type TabListState,\n type Key,\n type TabOrientation,\n type KeyboardActivation,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TabsRenderProps {\n /** The orientation of the tabs. */\n orientation: TabOrientation;\n /** Whether the tabs are disabled. */\n isDisabled: boolean;\n}\n\nexport interface TabsProps<T> extends SlotProps {\n /** The items to render in the tab list. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** Keys of disabled tabs. */\n disabledKeys?: Iterable<Key>;\n /** The currently selected tab key (controlled). */\n selectedKey?: Key | null;\n /** The default selected tab key (uncontrolled). */\n defaultSelectedKey?: Key;\n /** Handler for tab selection changes. */\n onSelectionChange?: (key: Key) => void;\n /** Whether the tabs are disabled. */\n isDisabled?: boolean;\n /** The keyboard activation mode. */\n keyboardActivation?: KeyboardActivation;\n /** The orientation of the tabs. */\n orientation?: TabOrientation;\n /** The children of the component. */\n children?: RenderChildren<TabsRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TabsRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TabsRenderProps>;\n}\n\nexport interface TabListRenderProps {\n /** The orientation of the tab list. */\n orientation: TabOrientation;\n /** Whether the tab list is disabled. */\n isDisabled: boolean;\n /** Whether the tab list has focus. */\n isFocused: boolean;\n /** Whether the tab list has visible focus. */\n isFocusVisible: boolean;\n}\n\nexport interface TabListProps<T> extends Omit<AriaTabListProps, 'children'>, SlotProps {\n /** The children of the tab list - render function for each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TabListRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TabListRenderProps>;\n}\n\nexport interface TabRenderProps {\n /** Whether the tab is selected. */\n isSelected: boolean;\n /** Whether the tab is focused. */\n isFocused: boolean;\n /** Whether the tab has visible focus ring. */\n isFocusVisible: boolean;\n /** Whether the tab is pressed. */\n isPressed: boolean;\n /** Whether the tab is hovered. */\n isHovered: boolean;\n /** Whether the tab is disabled. */\n isDisabled: boolean;\n}\n\nexport interface TabProps extends Omit<AriaTabProps, 'key'>, SlotProps {\n /** The unique key for the tab. */\n id?: Key;\n /** The children of the tab. */\n children?: RenderChildren<TabRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TabRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TabRenderProps>;\n}\n\nexport interface TabPanelRenderProps {\n /** Whether the panel is the selected one. */\n isSelected: boolean;\n /** Whether the panel is focused. */\n isFocused: boolean;\n /** Whether the panel has visible focus ring. */\n isFocusVisible: boolean;\n}\n\nexport interface TabPanelProps extends AriaTabPanelProps, SlotProps {\n /** The children of the tab panel. */\n children?: RenderChildren<TabPanelRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TabPanelRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TabPanelRenderProps>;\n /** Whether to keep the panel mounted when not selected. */\n shouldForceMount?: boolean;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface TabsContextValue<T> {\n state: TabListState<T>;\n items: T[];\n}\n\nexport const TabsContext = createContext<TabsContextValue<unknown> | null>(null);\nexport const TabsStateContext = createContext<TabListState<unknown> | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * Tabs provide a way to organize content into multiple sections, with only one section visible at a time.\n */\nexport function Tabs<T>(props: TabsProps<T>): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['class', 'style', 'slot'],\n ['items', 'getKey', 'getTextValue', 'getDisabled', 'disabledKeys', 'selectedKey', 'defaultSelectedKey', 'onSelectionChange', 'isDisabled', 'keyboardActivation', 'orientation']\n );\n\n // Create tab list state\n const state = createTabListState<T>({\n get items() {\n return stateProps.items;\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectedKey() {\n return stateProps.selectedKey;\n },\n get defaultSelectedKey() {\n return stateProps.defaultSelectedKey;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n get isDisabled() {\n return stateProps.isDisabled;\n },\n get keyboardActivation() {\n return stateProps.keyboardActivation;\n },\n get orientation() {\n return stateProps.orientation;\n },\n });\n\n // Render props values\n const renderValues = createMemo<TabsRenderProps>(() => ({\n orientation: state.orientation(),\n isDisabled: state.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n children: props.children,\n defaultClassName: 'solidaria-Tabs',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <TabsContext.Provider value={{ state, items: stateProps.items ?? [] }}>\n <TabsStateContext.Provider value={state}>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-orientation={state.orientation()}\n data-disabled={state.isDisabled() || undefined}\n >\n {props.children as JSX.Element}\n </div>\n </TabsStateContext.Provider>\n </TabsContext.Provider>\n );\n}\n\n/**\n * A TabList contains Tab elements that represent the available tabs.\n */\nexport function TabList<T>(props: TabListProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Get state from context\n const context = useContext(TabsContext);\n\n return (\n <Show\n when={context}\n fallback={<div class=\"solidaria-TabList\" role=\"tablist\" />}\n >\n {(ctx) => (\n <TabListInner\n context={ctx()}\n local={local}\n ariaProps={ariaProps}\n children={props.children}\n />\n )}\n </Show>\n );\n}\n\n/** Inner TabList component that has access to context */\nfunction TabListInner<T>(props: {\n context: TabsContextValue<unknown>;\n local: { class?: ClassNameOrFunction<TabListRenderProps>; style?: StyleOrFunction<TabListRenderProps>; slot?: string };\n ariaProps: Omit<TabListProps<T>, 'children' | 'class' | 'style' | 'slot'>;\n children?: (item: T) => JSX.Element;\n}): JSX.Element {\n const state = props.context.state as TabListState<T>;\n const items = props.context.items as T[];\n\n // Create tab list aria props\n const { tabListProps } = createTabList<T>(props.ariaProps as AriaTabListProps, state);\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<TabListRenderProps>(() => ({\n orientation: state.orientation(),\n isDisabled: state.isDisabled(),\n isFocused: state.isFocused() || isFocused(),\n isFocusVisible: isFocusVisible(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: props.local.class,\n style: props.local.style,\n defaultClassName: 'solidaria-TabList',\n },\n renderValues\n );\n\n // Helper to safely call event handlers that may be bound tuples\n const callHandler = <E extends Event>(\n handler: ((e: E) => void) | [object, (e: E) => void] | undefined,\n event: E\n ) => {\n if (!handler) return;\n if (Array.isArray(handler)) {\n handler[1].call(handler[0], event);\n } else {\n handler(event);\n }\n };\n\n // Combine event handlers\n const handleKeyDown = (e: KeyboardEvent) => {\n tabListProps.onKeyDown(e);\n };\n\n const handleFocus = (e: FocusEvent) => {\n tabListProps.onFocus(e);\n callHandler(focusProps.onFocus as any, e);\n };\n\n const handleBlur = (e: FocusEvent) => {\n tabListProps.onBlur(e);\n callHandler(focusProps.onBlur as any, e);\n };\n\n return (\n <div\n role={tabListProps.role}\n aria-orientation={tabListProps['aria-orientation']}\n aria-label={tabListProps['aria-label']}\n aria-labelledby={tabListProps['aria-labelledby']}\n aria-describedby={tabListProps['aria-describedby']}\n class={renderProps.class()}\n style={renderProps.style()}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n data-focused={state.isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-orientation={state.orientation()}\n data-disabled={state.isDisabled() || undefined}\n >\n <For each={items}>{(item) => props.children?.(item)}</For>\n </div>\n );\n}\n\n/**\n * A Tab represents an individual tab in a TabList.\n */\nexport function Tab(props: TabProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n ]);\n\n // Get state from context\n const context = useContext(TabsStateContext);\n\n return (\n <Show\n when={context}\n fallback={<div class=\"solidaria-Tab\" role=\"tab\" />}\n >\n {(state) => (\n <TabInner\n state={state()}\n local={local}\n ariaProps={ariaProps}\n children={props.children}\n />\n )}\n </Show>\n );\n}\n\n/** Inner Tab component that has access to context */\nfunction TabInner(props: {\n state: TabListState<unknown>;\n local: { class?: ClassNameOrFunction<TabRenderProps>; style?: StyleOrFunction<TabRenderProps>; slot?: string; id?: Key };\n ariaProps: Omit<TabProps, 'children' | 'class' | 'style' | 'slot' | 'id'>;\n children?: RenderChildren<TabRenderProps>;\n}): JSX.Element {\n // Create tab aria props\n const tabAria = createTab<unknown>(\n {\n key: props.local.id!,\n get isDisabled() {\n return props.ariaProps.isDisabled;\n },\n get 'aria-label'() {\n return props.ariaProps['aria-label'];\n },\n },\n props.state\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return tabAria.isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<TabRenderProps>(() => ({\n isSelected: tabAria.isSelected(),\n isFocused: tabAria.isFocused(),\n isFocusVisible: tabAria.isFocusVisible(),\n isPressed: tabAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: tabAria.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.local.class,\n style: props.local.style,\n defaultClassName: 'solidaria-Tab',\n },\n renderValues\n );\n\n return (\n <div\n id={tabAria.tabProps.id}\n role={tabAria.tabProps.role}\n aria-selected={tabAria.isSelected()}\n aria-disabled={tabAria.isDisabled() || undefined}\n aria-controls={tabAria.isSelected() ? tabAria.tabProps['aria-controls'] : undefined}\n aria-label={tabAria.tabProps['aria-label']}\n tabIndex={tabAria.isSelected() && !tabAria.isDisabled() ? 0 : -1}\n class={renderProps.class()}\n style={renderProps.style()}\n onKeyDown={tabAria.tabProps.onKeyDown}\n onMouseDown={tabAria.tabProps.onMouseDown}\n onPointerDown={tabAria.tabProps.onPointerDown}\n onClick={tabAria.tabProps.onClick}\n onFocus={tabAria.tabProps.onFocus}\n {...hoverProps}\n data-selected={tabAria.isSelected() || undefined}\n data-focused={tabAria.isFocused() || undefined}\n data-focus-visible={tabAria.isFocusVisible() || undefined}\n data-pressed={tabAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={tabAria.isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * A TabPanel displays the content for a selected Tab.\n */\nexport function TabPanel(props: TabPanelProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'shouldForceMount',\n ]);\n\n // Get state from context (may be null for SSR scenarios)\n const state = useContext(TabsStateContext);\n\n // Create tab panel aria props\n const { tabPanelProps, isSelected } = createTabPanel<unknown>(ariaProps, state);\n\n // Create focus ring for the panel\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<TabPanelRenderProps>(() => ({\n isSelected: isSelected(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-TabPanel',\n },\n renderValues\n );\n\n // Determine if we should render the panel\n // If no id is provided, render when any tab is selected (shared panel pattern)\n // If id is provided, render when that specific tab is selected\n const shouldRender = () => {\n if (local.shouldForceMount) return true;\n if (ariaProps.id === undefined) {\n // Shared panel pattern - render when any tab is selected\n return state ? state.selectedKey() !== null : true;\n }\n return isSelected();\n };\n\n return (\n <Show when={shouldRender()}>\n <div\n id={tabPanelProps.id}\n role={tabPanelProps.role}\n aria-labelledby={tabPanelProps['aria-labelledby']}\n aria-label={tabPanelProps['aria-label']}\n aria-describedby={tabPanelProps['aria-describedby']}\n tabIndex={tabPanelProps.tabIndex}\n class={renderProps.class()}\n style={renderProps.style()}\n onFocus={focusProps.onFocus}\n onBlur={focusProps.onBlur}\n data-selected={isSelected() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n inert={ariaProps.id !== undefined && !isSelected() ? true : undefined}\n hidden={ariaProps.id !== undefined && !isSelected() && !local.shouldForceMount ? true : undefined}\n >\n {renderProps.renderChildren()}\n </div>\n </Show>\n );\n}\n\n// Attach sub-components\nTabs.List = TabList;\nTabs.Tab = Tab;\nTabs.Panel = TabPanel;\n", "/**\n * Breadcrumbs component for solidaria-components\n *\n * A pre-wired headless breadcrumbs component that combines aria hooks.\n * Port of react-aria-components Breadcrumbs.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n} from 'solid-js';\nimport {\n createBreadcrumbs,\n createBreadcrumbItem,\n type AriaBreadcrumbsProps,\n type AriaBreadcrumbItemProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface BreadcrumbsRenderProps {\n /** Whether the breadcrumbs are disabled. */\n isDisabled: boolean;\n}\n\nexport interface BreadcrumbsProps<T> extends Omit<AriaBreadcrumbsProps, 'isDisabled'>, SlotProps {\n /** The items to render in the breadcrumbs. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => string | number;\n /** Whether the breadcrumbs are disabled. */\n isDisabled?: boolean;\n /** The children of the component - render function for each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbsRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbsRenderProps>;\n}\n\nexport interface BreadcrumbItemRenderProps {\n /** Whether this is the current/last item. */\n isCurrent: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has visible focus ring. */\n isFocusVisible: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n}\n\nexport interface BreadcrumbItemProps extends Omit<AriaBreadcrumbItemProps, 'isDisabled'>, SlotProps {\n /** The children of the breadcrumb item. */\n children?: RenderChildren<BreadcrumbItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbItemRenderProps>;\n /** Whether this item is disabled. */\n isDisabled?: boolean;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface BreadcrumbsContextValue {\n isDisabled: boolean;\n}\n\nexport const BreadcrumbsContext = createContext<BreadcrumbsContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * Breadcrumbs show hierarchy and navigational context for a user's location within an application.\n */\nexport function Breadcrumbs<T>(props: BreadcrumbsProps<T>): JSX.Element {\n const [local, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'items', 'getKey', 'isDisabled'],\n ['aria-label', 'aria-labelledby', 'aria-describedby']\n );\n\n const isDisabled = () => local.isDisabled ?? false;\n const items = () => local.items ?? [];\n\n // Create breadcrumbs aria props\n const { navProps } = createBreadcrumbs({\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n get 'aria-labelledby'() {\n return ariaProps['aria-labelledby'];\n },\n get 'aria-describedby'() {\n return ariaProps['aria-describedby'];\n },\n get isDisabled() {\n return isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<BreadcrumbsRenderProps>(() => ({\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Breadcrumbs',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <BreadcrumbsContext.Provider value={{ isDisabled: isDisabled() }}>\n <nav\n {...navProps}\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={isDisabled() || undefined}\n >\n <ol style={{ display: 'flex', 'align-items': 'center', 'list-style': 'none', margin: 0, padding: 0 }}>\n <For each={items()}>\n {(item) => (\n <li style={{ display: 'flex', 'align-items': 'center' }}>\n {props.children(item)}\n </li>\n )}\n </For>\n </ol>\n </nav>\n </BreadcrumbsContext.Provider>\n );\n}\n\n/**\n * A BreadcrumbItem represents an individual breadcrumb in the navigation trail.\n */\nexport function BreadcrumbItem(props: BreadcrumbItemProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'isDisabled',\n ]);\n\n // Get context\n const context = useContext(BreadcrumbsContext);\n const isDisabled = () => local.isDisabled ?? context?.isDisabled ?? false;\n const isCurrent = () => ariaProps.isCurrent ?? false;\n\n // Create breadcrumb item aria props\n const { itemProps, isPressed } = createBreadcrumbItem({\n get isCurrent() {\n return isCurrent();\n },\n get isDisabled() {\n return isDisabled();\n },\n get href() {\n return ariaProps.href;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get elementType() {\n return ariaProps.elementType;\n },\n get onPress() {\n return ariaProps.onPress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onClick() {\n return ariaProps.onClick;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n get 'aria-current'() {\n return ariaProps['aria-current'];\n },\n });\n\n // Render props values\n const renderValues = createMemo<BreadcrumbItemRenderProps>(() => ({\n isCurrent: isCurrent(),\n isDisabled: isDisabled(),\n isPressed: isPressed(),\n isFocused: false, // Would need focus tracking\n isFocusVisible: false, // Would need focus visible tracking\n isHovered: false, // Would need hover tracking\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-BreadcrumbItem',\n },\n renderValues\n );\n\n // Merge inline flex styles with user styles\n const mergedStyle = () => {\n const userStyle = renderProps.style();\n const baseStyle = { display: 'inline-flex', 'align-items': 'center' };\n return userStyle ? { ...baseStyle, ...userStyle } : baseStyle;\n };\n\n return (\n <a\n {...(itemProps as Record<string, unknown>)}\n class={renderProps.class()}\n style={mergedStyle()}\n data-current={isCurrent() || undefined}\n data-disabled={isDisabled() || undefined}\n data-pressed={isPressed() || undefined}\n >\n {renderProps.renderChildren()}\n </a>\n );\n}\n\n// Attach sub-components\nBreadcrumbs.Item = BreadcrumbItem;\n", "/**\n * NumberField component for solidaria-components\n *\n * A pre-wired headless number field that combines state + aria hooks.\n * Port of react-aria-components/src/NumberField.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n} from 'solid-js';\nimport {\n createNumberField,\n createFocusRing,\n createHover,\n createPress,\n type AriaNumberFieldProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createNumberFieldState,\n type NumberFieldState,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface NumberFieldRenderProps {\n /** Whether the number field is disabled. */\n isDisabled: boolean;\n /** Whether the number field is invalid. */\n isInvalid: boolean;\n /** Whether the number field is required. */\n isRequired: boolean;\n /** Whether the number field is read-only. */\n isReadOnly: boolean;\n /** The current numeric value. */\n value: number;\n}\n\nexport interface NumberFieldProps extends Omit<AriaNumberFieldProps, 'label'>, SlotProps {\n /** The current value (controlled). */\n value?: number;\n /** The default value (uncontrolled). */\n defaultValue?: number;\n /** Handler called when the value changes. */\n onChange?: (value: number) => void;\n /** The minimum value. */\n minValue?: number;\n /** The maximum value. */\n maxValue?: number;\n /** The step value for increment/decrement. */\n step?: number;\n /** The locale for number formatting. */\n locale?: string;\n /** Number format options. */\n formatOptions?: Intl.NumberFormatOptions;\n /** A visible label for the number field. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<NumberFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldRenderProps>;\n}\n\nexport interface NumberFieldInputRenderProps {\n /** Whether the input is focused. */\n isFocused: boolean;\n /** Whether the input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the input is hovered. */\n isHovered: boolean;\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is invalid. */\n isInvalid: boolean;\n}\n\nexport interface NumberFieldInputProps extends SlotProps {\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldInputRenderProps>;\n}\n\nexport interface NumberFieldButtonRenderProps {\n /** Whether the button is pressed. */\n isPressed: boolean;\n /** Whether the button is hovered. */\n isHovered: boolean;\n /** Whether the button is disabled. */\n isDisabled: boolean;\n}\n\nexport interface NumberFieldIncrementButtonProps extends SlotProps {\n /** The children of the button. */\n children?: RenderChildren<NumberFieldButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldButtonRenderProps>;\n}\n\nexport interface NumberFieldDecrementButtonProps extends SlotProps {\n /** The children of the button. */\n children?: RenderChildren<NumberFieldButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldButtonRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface NumberFieldContextValue {\n state: NumberFieldState;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n incrementButtonProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;\n decrementButtonProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;\n labelProps: JSX.HTMLAttributes<HTMLElement>;\n groupProps: JSX.HTMLAttributes<HTMLElement>;\n descriptionProps: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps: JSX.HTMLAttributes<HTMLElement>;\n isDisabled: boolean;\n isInvalid: boolean;\n isRequired: boolean;\n isReadOnly: boolean;\n}\n\nexport const NumberFieldContext = createContext<NumberFieldContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A number field allows a user to enter a number and increment/decrement the value.\n */\nexport function NumberField(props: NumberFieldProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n ['value', 'defaultValue', 'onChange', 'minValue', 'maxValue', 'step', 'locale', 'formatOptions'],\n ['label', 'aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled', 'isReadOnly', 'isRequired', 'isInvalid', 'description', 'errorMessage', 'id', 'autoFocus', 'name']\n );\n\n // Create number field state\n const state = createNumberFieldState({\n get value() {\n return stateProps.value;\n },\n get defaultValue() {\n return stateProps.defaultValue;\n },\n get onChange() {\n return stateProps.onChange;\n },\n get minValue() {\n return stateProps.minValue;\n },\n get maxValue() {\n return stateProps.maxValue;\n },\n get step() {\n return stateProps.step;\n },\n get locale() {\n return stateProps.locale;\n },\n get formatOptions() {\n return stateProps.formatOptions;\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly;\n },\n });\n\n // Ref for the input\n let inputRef: HTMLInputElement | undefined;\n\n // Create number field aria props\n const {\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n descriptionProps,\n errorMessageProps,\n } = createNumberField(ariaProps, state, () => inputRef ?? null);\n\n // Render props values\n const renderValues = createMemo<NumberFieldRenderProps>(() => ({\n isDisabled: ariaProps.isDisabled ?? false,\n isInvalid: ariaProps.isInvalid ?? false,\n isRequired: ariaProps.isRequired ?? false,\n isReadOnly: ariaProps.isReadOnly ?? false,\n value: state.numberValue(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-NumberField',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <NumberFieldContext.Provider\n value={{\n state,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n labelProps,\n groupProps,\n descriptionProps,\n errorMessageProps,\n isDisabled: ariaProps.isDisabled ?? false,\n isInvalid: ariaProps.isInvalid ?? false,\n isRequired: ariaProps.isRequired ?? false,\n isReadOnly: ariaProps.isReadOnly ?? false,\n }}\n >\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={ariaProps.isDisabled || undefined}\n data-invalid={ariaProps.isInvalid || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-readonly={ariaProps.isReadOnly || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n </NumberFieldContext.Provider>\n );\n}\n\n/**\n * The label for a number field.\n */\nexport function NumberFieldLabel(props: { children?: JSX.Element; class?: string; style?: JSX.CSSProperties }): JSX.Element {\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error('NumberFieldLabel must be used within a NumberField');\n }\n\n return (\n <span\n {...context.labelProps}\n class={props.class ?? 'solidaria-NumberField-label'}\n style={props.style}\n >\n {props.children}\n </span>\n );\n}\n\n/**\n * The input group for a number field (contains input and buttons).\n */\nexport function NumberFieldGroup(props: { children?: JSX.Element; class?: string; style?: JSX.CSSProperties }): JSX.Element {\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error('NumberFieldGroup must be used within a NumberField');\n }\n\n // Extract ref to avoid type issues\n const cleanGroupProps = () => {\n const { ref: _ref, ...rest } = context.groupProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <div\n {...cleanGroupProps()}\n class={props.class ?? 'solidaria-NumberField-group'}\n style={props.style}\n >\n {props.children}\n </div>\n );\n}\n\n/**\n * The input element for a number field.\n */\nexport function NumberFieldInput(props: NumberFieldInputProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error('NumberFieldInput must be used within a NumberField');\n }\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<NumberFieldInputRenderProps>(() => ({\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isDisabled: context.isDisabled,\n isInvalid: context.isInvalid,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-NumberField-input',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanInputProps = () => {\n const { ref: _ref, ...rest } = context.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <input\n {...cleanInputProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={context.isDisabled || undefined}\n data-invalid={context.isInvalid || undefined}\n />\n );\n}\n\n/**\n * The increment button for a number field.\n */\nexport function NumberFieldIncrementButton(props: NumberFieldIncrementButtonProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error('NumberFieldIncrementButton must be used within a NumberField');\n }\n\n // Create press\n const { isPressed, pressProps } = createPress({\n get isDisabled() {\n return context.isDisabled || !context.state.canIncrement();\n },\n onPress: () => {\n context.state.increment();\n },\n });\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled || !context.state.canIncrement();\n },\n });\n\n const isDisabled = () => context.isDisabled || !context.state.canIncrement();\n\n // Render props values\n const renderValues = createMemo<NumberFieldButtonRenderProps>(() => ({\n isPressed: isPressed(),\n isHovered: isHovered(),\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-NumberField-increment',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanButtonProps = () => {\n const { ref: _ref, ...rest } = context.incrementButtonProps as Record<string, unknown>;\n return rest;\n };\n const cleanPressProps = () => {\n const { ref: _ref, ...rest } = pressProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n {...cleanButtonProps()}\n {...cleanPressProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n/**\n * The decrement button for a number field.\n */\nexport function NumberFieldDecrementButton(props: NumberFieldDecrementButtonProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error('NumberFieldDecrementButton must be used within a NumberField');\n }\n\n // Create press\n const { isPressed, pressProps } = createPress({\n get isDisabled() {\n return context.isDisabled || !context.state.canDecrement();\n },\n onPress: () => {\n context.state.decrement();\n },\n });\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled || !context.state.canDecrement();\n },\n });\n\n const isDisabled = () => context.isDisabled || !context.state.canDecrement();\n\n // Render props values\n const renderValues = createMemo<NumberFieldButtonRenderProps>(() => ({\n isPressed: isPressed(),\n isHovered: isHovered(),\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-NumberField-decrement',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanButtonProps = () => {\n const { ref: _ref, ...rest } = context.decrementButtonProps as Record<string, unknown>;\n return rest;\n };\n const cleanPressProps = () => {\n const { ref: _ref, ...rest } = pressProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n {...cleanButtonProps()}\n {...cleanPressProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n// Attach sub-components\nNumberField.Label = NumberFieldLabel;\nNumberField.Group = NumberFieldGroup;\nNumberField.Input = NumberFieldInput;\nNumberField.IncrementButton = NumberFieldIncrementButton;\nNumberField.DecrementButton = NumberFieldDecrementButton;\n", "/**\n * SearchField component for solidaria-components\n *\n * A pre-wired headless search field that combines state + aria hooks.\n * Port of react-aria-components/src/SearchField.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n Show,\n} from 'solid-js';\nimport {\n createSearchField,\n createFocusRing,\n createHover,\n createPress,\n type AriaSearchFieldProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createSearchFieldState,\n type SearchFieldState,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface SearchFieldRenderProps {\n /** Whether the search field is empty. */\n isEmpty: boolean;\n /** Whether the search field is disabled. */\n isDisabled: boolean;\n /** Whether the search field is invalid. */\n isInvalid: boolean;\n /** Whether the search field is read-only. */\n isReadOnly: boolean;\n /** Whether the search field is required. */\n isRequired: boolean;\n /** The current value. */\n value: string;\n}\n\nexport interface SearchFieldProps extends Omit<AriaSearchFieldProps, 'label'>, SlotProps {\n /** The current value (controlled). */\n value?: string;\n /** The default value (uncontrolled). */\n defaultValue?: string;\n /** Handler called when the value changes. */\n onChange?: (value: string) => void;\n /** Handler called when the user submits the search. */\n onSubmit?: (value: string) => void;\n /** Handler called when the field is cleared. */\n onClear?: () => void;\n /** A visible label for the search field. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<SearchFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldRenderProps>;\n}\n\nexport interface SearchFieldInputRenderProps {\n /** Whether the input is focused. */\n isFocused: boolean;\n /** Whether the input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the input is hovered. */\n isHovered: boolean;\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is invalid. */\n isInvalid: boolean;\n}\n\nexport interface SearchFieldInputProps extends SlotProps {\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldInputRenderProps>;\n}\n\nexport interface SearchFieldClearButtonRenderProps {\n /** Whether the button is pressed. */\n isPressed: boolean;\n /** Whether the button is hovered. */\n isHovered: boolean;\n /** Whether the button is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SearchFieldClearButtonProps extends SlotProps {\n /** The children of the button. */\n children?: RenderChildren<SearchFieldClearButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldClearButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldClearButtonRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface SearchFieldContextValue {\n state: SearchFieldState;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n clearButtonProps: {\n 'aria-label': string;\n tabIndex: number;\n disabled?: boolean;\n onMouseDown: (e: MouseEvent) => void;\n onClick: () => void;\n };\n labelProps: JSX.HTMLAttributes<HTMLElement>;\n descriptionProps: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps: JSX.HTMLAttributes<HTMLElement>;\n isDisabled: boolean;\n isInvalid: boolean;\n isRequired: boolean;\n isReadOnly: boolean;\n inputRef: HTMLInputElement | undefined;\n setInputRef: (el: HTMLInputElement) => void;\n}\n\nexport const SearchFieldContext = createContext<SearchFieldContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A search field allows a user to enter and clear a search query.\n */\nexport function SearchField(props: SearchFieldProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n ['value', 'defaultValue', 'onChange', 'onSubmit', 'onClear'],\n ['label', 'aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled', 'isReadOnly', 'isRequired', 'isInvalid', 'description', 'errorMessage', 'id', 'autoFocus', 'name', 'placeholder', 'autoComplete', 'maxLength', 'minLength', 'pattern']\n );\n\n // Create search field state\n const state = createSearchFieldState({\n get value() {\n return stateProps.value;\n },\n get defaultValue() {\n return stateProps.defaultValue;\n },\n get onChange() {\n return stateProps.onChange;\n },\n });\n\n // Ref for the input\n let inputRef: HTMLInputElement | undefined;\n const setInputRef = (el: HTMLInputElement) => {\n inputRef = el;\n };\n\n // Create search field aria props\n const {\n labelProps,\n inputProps,\n clearButtonProps,\n descriptionProps,\n errorMessageProps,\n } = createSearchField(\n {\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly;\n },\n get isRequired() {\n return ariaProps.isRequired;\n },\n get isInvalid() {\n return ariaProps.isInvalid;\n },\n get label() {\n return ariaProps.label;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n get 'aria-labelledby'() {\n return ariaProps['aria-labelledby'];\n },\n get 'aria-describedby'() {\n return ariaProps['aria-describedby'];\n },\n get description() {\n return ariaProps.description;\n },\n get errorMessage() {\n return ariaProps.errorMessage;\n },\n get placeholder() {\n return ariaProps.placeholder;\n },\n get name() {\n return ariaProps.name;\n },\n get autoFocus() {\n return ariaProps.autoFocus;\n },\n get autoComplete() {\n return ariaProps.autoComplete;\n },\n get maxLength() {\n return ariaProps.maxLength;\n },\n get minLength() {\n return ariaProps.minLength;\n },\n get pattern() {\n return ariaProps.pattern;\n },\n get onSubmit() {\n return stateProps.onSubmit;\n },\n get onClear() {\n return stateProps.onClear;\n },\n },\n state,\n () => inputRef ?? null\n );\n\n // Render props values\n const renderValues = createMemo<SearchFieldRenderProps>(() => ({\n isEmpty: state.value() === '',\n isDisabled: ariaProps.isDisabled ?? false,\n isInvalid: ariaProps.isInvalid ?? false,\n isRequired: ariaProps.isRequired ?? false,\n isReadOnly: ariaProps.isReadOnly ?? false,\n value: state.value(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-SearchField',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <SearchFieldContext.Provider\n value={{\n state,\n inputProps,\n clearButtonProps,\n labelProps: labelProps as JSX.HTMLAttributes<HTMLElement>,\n descriptionProps,\n errorMessageProps,\n isDisabled: ariaProps.isDisabled ?? false,\n isInvalid: ariaProps.isInvalid ?? false,\n isRequired: ariaProps.isRequired ?? false,\n isReadOnly: ariaProps.isReadOnly ?? false,\n inputRef,\n setInputRef,\n }}\n >\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-empty={state.value() === '' || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n data-invalid={ariaProps.isInvalid || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-readonly={ariaProps.isReadOnly || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n </SearchFieldContext.Provider>\n );\n}\n\n/**\n * The label for a search field.\n */\nexport function SearchFieldLabel(props: { children?: JSX.Element; class?: string; style?: JSX.CSSProperties }): JSX.Element {\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error('SearchFieldLabel must be used within a SearchField');\n }\n\n return (\n <span\n {...context.labelProps}\n class={props.class ?? 'solidaria-SearchField-label'}\n style={props.style}\n >\n {props.children}\n </span>\n );\n}\n\n/**\n * The input element for a search field.\n */\nexport function SearchFieldInput(props: SearchFieldInputProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error('SearchFieldInput must be used within a SearchField');\n }\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<SearchFieldInputRenderProps>(() => ({\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isDisabled: context.isDisabled,\n isInvalid: context.isInvalid,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-SearchField-input',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanInputProps = () => {\n const { ref: _ref, ...rest } = context.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <input\n ref={context.setInputRef}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={context.isDisabled || undefined}\n data-invalid={context.isInvalid || undefined}\n />\n );\n}\n\n/**\n * The clear button for a search field.\n */\nexport function SearchFieldClearButton(props: SearchFieldClearButtonProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error('SearchFieldClearButton must be used within a SearchField');\n }\n\n // Create press\n const { isPressed, pressProps } = createPress({\n get isDisabled() {\n return context.isDisabled || context.isReadOnly;\n },\n onPress: () => {\n context.clearButtonProps.onClick();\n },\n });\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled || context.isReadOnly;\n },\n });\n\n const isDisabled = () => context.isDisabled || context.isReadOnly;\n const isEmpty = () => context.state.value() === '';\n\n // Render props values\n const renderValues = createMemo<SearchFieldClearButtonRenderProps>(() => ({\n isPressed: isPressed(),\n isHovered: isHovered(),\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-SearchField-clear',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanPressProps = () => {\n const { ref: _ref, ...rest } = pressProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Only show clear button when there's a value\n return (\n <Show when={!isEmpty()}>\n <button\n type=\"button\"\n aria-label={context.clearButtonProps['aria-label']}\n tabIndex={context.clearButtonProps.tabIndex}\n disabled={context.clearButtonProps.disabled}\n onMouseDown={context.clearButtonProps.onMouseDown}\n {...cleanPressProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n </Show>\n );\n}\n\n// Attach sub-components\nSearchField.Label = SearchFieldLabel;\nSearchField.Input = SearchFieldInput;\nSearchField.ClearButton = SearchFieldClearButton;\n", "/**\n * Slider component for solidaria-components\n *\n * A pre-wired headless slider that combines state + aria hooks.\n * Port of react-aria-components/src/Slider.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n Show,\n} from 'solid-js';\nimport {\n createSlider,\n createFocusRing,\n createHover,\n type AriaSliderProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createSliderState,\n type SliderState,\n type SliderOrientation,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface SliderRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the slider is being dragged. */\n isDragging: boolean;\n /** Whether the slider is focused. */\n isFocused: boolean;\n /** The current value. */\n value: number;\n /** The value as a percent (0-1). */\n valuePercent: number;\n /** The orientation. */\n orientation: SliderOrientation;\n}\n\nexport interface SliderProps extends Omit<AriaSliderProps, 'label'>, SlotProps {\n /** The current value (controlled). */\n value?: number;\n /** The default value (uncontrolled). */\n defaultValue?: number;\n /** Handler called when the value changes. */\n onChange?: (value: number) => void;\n /** Handler called when dragging ends. */\n onChangeEnd?: (value: number) => void;\n /** The minimum value. */\n minValue?: number;\n /** The maximum value. */\n maxValue?: number;\n /** The step value. */\n step?: number;\n /** The orientation of the slider. */\n orientation?: SliderOrientation;\n /** The locale for number formatting. */\n locale?: string;\n /** Number format options. */\n formatOptions?: Intl.NumberFormatOptions;\n /** A visible label for the slider. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<SliderRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SliderRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SliderRenderProps>;\n}\n\nexport interface SliderTrackRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the slider is being dragged. */\n isDragging: boolean;\n /** The value as a percent (0-1). */\n valuePercent: number;\n /** The orientation. */\n orientation: SliderOrientation;\n}\n\nexport interface SliderTrackProps extends SlotProps {\n /** The children of the track. */\n children?: RenderChildren<SliderTrackRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SliderTrackRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SliderTrackRenderProps>;\n}\n\nexport interface SliderThumbRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the thumb is being dragged. */\n isDragging: boolean;\n /** Whether the thumb is focused. */\n isFocused: boolean;\n /** Whether the thumb has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the thumb is hovered. */\n isHovered: boolean;\n /** The current value. */\n value: number;\n /** The value as a percent (0-1). */\n valuePercent: number;\n}\n\nexport interface SliderThumbProps extends SlotProps {\n /** The children of the thumb. */\n children?: RenderChildren<SliderThumbRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SliderThumbRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SliderThumbRenderProps>;\n}\n\nexport interface SliderOutputRenderProps {\n /** The current value. */\n value: number;\n /** The formatted value string. */\n formattedValue: string;\n}\n\nexport interface SliderOutputProps extends SlotProps {\n /** The children of the output. */\n children?: RenderChildren<SliderOutputRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SliderOutputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SliderOutputRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface SliderContextValue {\n state: SliderState;\n trackProps: JSX.HTMLAttributes<HTMLElement>;\n thumbProps: JSX.HTMLAttributes<HTMLElement>;\n outputProps: JSX.HTMLAttributes<HTMLElement>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n trackRef: HTMLElement | undefined;\n setTrackRef: (el: HTMLElement) => void;\n}\n\nexport const SliderContext = createContext<SliderContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A slider allows users to select a value from a range.\n */\nexport function Slider(props: SliderProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['class', 'style', 'slot'],\n ['value', 'defaultValue', 'onChange', 'onChangeEnd', 'minValue', 'maxValue', 'step', 'orientation', 'locale', 'formatOptions'],\n ['label', 'aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled', 'id']\n );\n\n // Create slider state\n const state = createSliderState({\n get value() {\n return stateProps.value;\n },\n get defaultValue() {\n return stateProps.defaultValue;\n },\n get onChange() {\n return stateProps.onChange;\n },\n get onChangeEnd() {\n return stateProps.onChangeEnd;\n },\n get minValue() {\n return stateProps.minValue;\n },\n get maxValue() {\n return stateProps.maxValue;\n },\n get step() {\n return stateProps.step;\n },\n get orientation() {\n return stateProps.orientation;\n },\n get locale() {\n return stateProps.locale;\n },\n get formatOptions() {\n return stateProps.formatOptions;\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n });\n\n // Track ref for pointer handling\n let trackRef: HTMLElement | undefined;\n const setTrackRef = (el: HTMLElement) => {\n trackRef = el;\n };\n\n // Create slider aria props\n const {\n labelProps,\n groupProps,\n trackProps,\n thumbProps,\n inputProps,\n outputProps,\n } = createSlider(ariaProps, state, () => trackRef ?? null);\n\n // Render props values\n const renderValues = createMemo<SliderRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging(),\n isFocused: state.isFocused(),\n value: state.value(),\n valuePercent: state.getValuePercent(),\n orientation: state.orientation,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Slider',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Clean props helpers\n const cleanGroupProps = () => {\n const { ref: _ref, ...rest } = groupProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <SliderContext.Provider\n value={{\n state,\n trackProps,\n thumbProps,\n outputProps,\n inputProps,\n trackRef,\n setTrackRef,\n }}\n >\n <div\n {...domProps()}\n {...cleanGroupProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-orientation={state.orientation}\n data-dragging={state.isDragging() || undefined}\n >\n {/* Label */}\n <Show when={ariaProps.label}>\n <span {...labelProps}>{ariaProps.label}</span>\n </Show>\n\n {renderProps.renderChildren()}\n\n {/* Hidden input for form submission */}\n <input {...inputProps} />\n </div>\n </SliderContext.Provider>\n );\n}\n\n/**\n * The track element of a slider.\n */\nexport function SliderTrack(props: SliderTrackProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(SliderContext);\n if (!context) {\n throw new Error('SliderTrack must be used within a Slider');\n }\n\n const { state, trackProps, setTrackRef } = context;\n\n // Render props values\n const renderValues = createMemo<SliderTrackRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging(),\n valuePercent: state.getValuePercent(),\n orientation: state.orientation,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Slider-track',\n },\n renderValues\n );\n\n // Clean props\n const cleanTrackProps = () => {\n const { ref: _ref, style: trackStyle, ...rest } = trackProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const trackStyle = (trackProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...trackStyle, ...renderStyle };\n };\n\n return (\n <div\n ref={setTrackRef}\n {...cleanTrackProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-orientation={state.orientation}\n data-dragging={state.isDragging() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The thumb element of a slider.\n */\nexport function SliderThumb(props: SliderThumbProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(SliderContext);\n if (!context) {\n throw new Error('SliderFill must be used within a Slider');\n }\n\n const { state, thumbProps } = context;\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<SliderThumbRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging(),\n isFocused: isFocused() || state.isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n value: state.value(),\n valuePercent: state.getValuePercent(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Slider-thumb',\n },\n renderValues\n );\n\n // Clean props\n const cleanThumbProps = () => {\n const { ref: _ref, style: thumbStyle, ...rest } = thumbProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const thumbStyle = (thumbProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...thumbStyle, ...renderStyle };\n };\n\n return (\n <div\n {...cleanThumbProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The output element of a slider, displaying the current value.\n */\nexport function SliderOutput(props: SliderOutputProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(SliderContext);\n if (!context) {\n throw new Error('SliderThumb must be used within a Slider');\n }\n\n const { state, outputProps } = context;\n\n // Render props values\n const renderValues = createMemo<SliderOutputRenderProps>(() => ({\n value: state.value(),\n formattedValue: state.getFormattedValue(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Slider-output',\n },\n renderValues\n );\n\n // Clean props\n const cleanOutputProps = () => {\n const { ref: _ref, ...rest } = outputProps as Record<string, unknown>;\n return rest;\n };\n\n // Default children shows formatted value\n const renderedChildren = () => {\n // Check if raw children prop exists before calling renderChildren\n if (renderProps.children === undefined || renderProps.children === null) {\n return state.getFormattedValue();\n }\n return renderProps.renderChildren();\n };\n\n return (\n <output\n {...cleanOutputProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n >\n {renderedChildren()}\n </output>\n );\n}\n\n// Attach sub-components\nSlider.Track = SliderTrack;\nSlider.Thumb = SliderThumb;\nSlider.Output = SliderOutput;\n", "/**\n * Tooltip component for solidaria-components\n *\n * A tooltip displays a description of an element on hover or focus.\n * Port of react-aria-components/src/Tooltip.tsx\n */\n\nimport {\n type JSX,\n type ParentComponent,\n createContext,\n useContext,\n createMemo,\n createSignal,\n createEffect,\n onCleanup,\n Show,\n} from 'solid-js';\nimport { isServer } from 'solid-js/web';\nimport {\n createTooltipTriggerState,\n type TooltipTriggerState,\n type TooltipTriggerProps as StateProps,\n} from '@proyecto-viviana/solid-stately';\nimport {\n createTooltip,\n createTooltipTrigger,\n type TooltipTriggerProps as AriaProps,\n OverlayContainer,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TooltipRenderProps {\n /** Whether the tooltip is currently entering (for animations). */\n isEntering: boolean;\n /** Whether the tooltip is currently exiting (for animations). */\n isExiting: boolean;\n /** The placement of the tooltip relative to the trigger. */\n placement: 'top' | 'bottom' | 'left' | 'right' | null;\n}\n\nexport interface TooltipTriggerComponentProps extends StateProps, AriaProps {\n /** The children of the tooltip trigger (trigger element and tooltip). */\n children: JSX.Element;\n}\n\nexport interface TooltipProps extends SlotProps {\n /** The children of the tooltip. A function may be provided to receive render props. */\n children?: RenderChildren<TooltipRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TooltipRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TooltipRenderProps>;\n /** Whether the tooltip is open (controlled). */\n isOpen?: boolean;\n /** Whether the tooltip is open by default (uncontrolled). */\n defaultOpen?: boolean;\n /** The placement of the tooltip relative to the trigger. */\n placement?: 'top' | 'bottom' | 'left' | 'right';\n /** Whether to render the tooltip in a portal. */\n shouldFlip?: boolean;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface TooltipTriggerContextValue {\n state: TooltipTriggerState;\n tooltipProps: { id: string };\n triggerRef: () => HTMLElement | null | undefined;\n}\n\nconst TooltipTriggerContext = createContext<TooltipTriggerContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * TooltipTrigger wraps around a trigger element and a Tooltip.\n * It handles opening and closing the Tooltip when the user hovers\n * over or focuses the trigger.\n *\n * @example\n * ```tsx\n * <TooltipTrigger>\n * <Button>Hover me</Button>\n * <Tooltip>This is a tooltip</Tooltip>\n * </TooltipTrigger>\n * ```\n */\nexport const TooltipTrigger: ParentComponent<TooltipTriggerComponentProps> = (props) => {\n let triggerRef: HTMLElement | null = null;\n\n const state = createTooltipTriggerState({\n get delay() { return props.delay; },\n get closeDelay() { return props.closeDelay; },\n get isOpen() { return props.isOpen; },\n get defaultOpen() { return props.defaultOpen; },\n get onOpenChange() { return props.onOpenChange; },\n });\n\n const { triggerProps, tooltipProps } = createTooltipTrigger(\n {\n get isDisabled() { return props.isDisabled; },\n get trigger() { return props.trigger; },\n get shouldCloseOnPress() { return props.shouldCloseOnPress; },\n },\n state,\n () => triggerRef\n );\n\n const context: TooltipTriggerContextValue = {\n state,\n tooltipProps,\n triggerRef: () => triggerRef,\n };\n\n // Clone children and inject trigger props into the first child\n const processChildren = () => {\n const children = props.children;\n if (Array.isArray(children)) {\n // First child is the trigger, rest are tooltip(s)\n const [trigger, ...rest] = children;\n return (\n <>\n <TriggerWrapper\n triggerProps={triggerProps}\n ref={(el) => { triggerRef = el; }}\n >\n {trigger}\n </TriggerWrapper>\n {rest}\n </>\n );\n }\n return children;\n };\n\n return (\n <TooltipTriggerContext.Provider value={context}>\n {processChildren()}\n </TooltipTriggerContext.Provider>\n );\n};\n\n/**\n * Wrapper component that spreads trigger props onto its child\n */\nconst TriggerWrapper: ParentComponent<{\n triggerProps: JSX.HTMLAttributes<HTMLElement>;\n ref: (el: HTMLElement) => void;\n}> = (props) => {\n // Get the child element and clone it with trigger props\n const child = () => props.children as JSX.Element;\n\n // We wrap in a span with display:contents to not affect layout.\n // However, display:contents makes getBoundingClientRect return zeros,\n // so we pass a ref callback that finds the first actual element child.\n const handleRef = (span: HTMLSpanElement) => {\n // Find the first element child that has dimensions (not display:contents)\n const findVisibleChild = (el: Element): HTMLElement | null => {\n if (el instanceof HTMLElement) {\n const rect = el.getBoundingClientRect();\n if (rect.width > 0 && rect.height > 0) {\n return el;\n }\n // Check children\n for (const child of el.children) {\n const found = findVisibleChild(child);\n if (found) return found;\n }\n }\n return null;\n };\n\n // Use requestAnimationFrame to ensure children are rendered and have dimensions\n // This is necessary because SolidJS may not have computed child layout yet\n const resolveRef = () => {\n const visibleChild = findVisibleChild(span);\n if (visibleChild) {\n props.ref(visibleChild);\n } else {\n // Fallback to span itself\n props.ref(span);\n }\n };\n\n // Try immediately first (in case layout is already computed)\n const immediateChild = findVisibleChild(span);\n if (immediateChild) {\n props.ref(immediateChild);\n } else {\n // Defer to next frame when layout should be computed\n requestAnimationFrame(resolveRef);\n }\n };\n\n return (\n <span\n {...props.triggerProps}\n ref={handleRef}\n style={{ display: 'contents' }}\n >\n {child()}\n </span>\n );\n};\n\n/**\n * A tooltip displays a description of an element on hover or focus.\n *\n * @example\n * ```tsx\n * <TooltipTrigger>\n * <Button>Hover me</Button>\n * <Tooltip>This is helpful information</Tooltip>\n * </TooltipTrigger>\n * ```\n */\nexport function Tooltip(props: TooltipProps): JSX.Element {\n const context = useContext(TooltipTriggerContext);\n\n // Support standalone usage\n const localState = createTooltipTriggerState({\n get isOpen() { return props.isOpen; },\n get defaultOpen() { return props.defaultOpen; },\n });\n\n const state = () => context?.state ?? localState;\n const placement = () => props.placement ?? 'top';\n\n // Only render when open\n const isOpen = () => state().isOpen();\n\n return (\n <Show when={isOpen()}>\n <TooltipContent\n {...props}\n state={state()}\n contextTooltipProps={context?.tooltipProps ?? {}}\n placement={placement()}\n triggerRef={context?.triggerRef ?? (() => null)}\n />\n </Show>\n );\n}\n\n/**\n * Internal component that renders the tooltip content\n */\nfunction TooltipContent(\n props: TooltipProps & {\n state: TooltipTriggerState;\n contextTooltipProps: { id?: string };\n placement: 'top' | 'bottom' | 'left' | 'right';\n triggerRef: () => HTMLElement | null | undefined;\n }\n): JSX.Element {\n if (isServer) {\n return null as unknown as JSX.Element;\n }\n\n let tooltipRef!: HTMLDivElement;\n const { tooltipProps: ariaTooltipProps } = createTooltip({}, props.state);\n\n // Signal to track position styles\n // Start visible at 0,0 and update position asynchronously\n // This ensures the tooltip is immediately accessible (for screen readers and tests)\n // while the visual position gets calculated\n const [positionStyles, setPositionStyles] = createSignal({\n top: '0px',\n left: '0px',\n visibility: 'visible' as 'hidden' | 'visible',\n });\n\n const values = createMemo<TooltipRenderProps>(() => ({\n isEntering: false, // TODO: animation support\n isExiting: false,\n placement: props.placement,\n }));\n\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n children: props.children,\n defaultClassName: 'solidaria-Tooltip',\n },\n values\n );\n\n // Calculate position based on trigger element\n // Using position: fixed so we use viewport coordinates directly from getBoundingClientRect\n // Returns true if position was successfully updated, false if we need to retry\n const updatePosition = (): boolean => {\n const triggerEl = props.triggerRef();\n if (!triggerEl || !tooltipRef) return false;\n\n const triggerRect = triggerEl.getBoundingClientRect();\n\n // Check if the trigger has valid dimensions (not display:contents or not rendered yet)\n if (triggerRect.width === 0 || triggerRect.height === 0) {\n return false; // Need to retry\n }\n\n // Use offsetWidth/offsetHeight which are more reliable than getBoundingClientRect\n // when the element might be positioned off-screen initially\n const tooltipWidth = tooltipRef.offsetWidth;\n const tooltipHeight = tooltipRef.offsetHeight;\n const offset = 8; // Gap between trigger and tooltip\n\n let top = 0;\n let left = 0;\n\n // Using viewport coordinates for position: fixed\n switch (props.placement) {\n case 'top':\n top = triggerRect.top - tooltipHeight - offset;\n left = triggerRect.left + (triggerRect.width - tooltipWidth) / 2;\n break;\n case 'bottom':\n top = triggerRect.bottom + offset;\n left = triggerRect.left + (triggerRect.width - tooltipWidth) / 2;\n break;\n case 'left':\n top = triggerRect.top + (triggerRect.height - tooltipHeight) / 2;\n left = triggerRect.left - tooltipWidth - offset;\n break;\n case 'right':\n top = triggerRect.top + (triggerRect.height - tooltipHeight) / 2;\n left = triggerRect.right + offset;\n break;\n }\n\n setPositionStyles({\n top: `${top}px`,\n left: `${left}px`,\n visibility: 'visible',\n });\n\n return true;\n };\n\n // Set up positioning effect - runs when trigger ref is available\n createEffect(() => {\n const trigger = props.triggerRef();\n if (!trigger) return;\n\n // Initial position calculation - use requestAnimationFrame to ensure\n // the element is rendered and has proper dimensions\n // We may need multiple frames if the trigger ref hasn't resolved yet\n let retryCount = 0;\n const maxRetries = 5;\n\n const tryUpdatePosition = () => {\n const success = updatePosition();\n if (!success && retryCount < maxRetries) {\n retryCount++;\n // In JSDOM, requestAnimationFrame may not trigger layout properly\n // Use setTimeout for more reliable deferral across environments\n setTimeout(tryUpdatePosition, 16); // ~60fps\n }\n // If all retries fail, tooltip stays at 0,0 (test environments)\n // The tooltip is visible by default, so it remains accessible\n };\n\n // Initial attempt - use rAF for real browsers, then fall back to timeout retries\n requestAnimationFrame(tryUpdatePosition);\n\n // Update on scroll/resize\n window.addEventListener('scroll', updatePosition, true);\n window.addEventListener('resize', updatePosition);\n\n onCleanup(() => {\n window.removeEventListener('scroll', updatePosition, true);\n window.removeEventListener('resize', updatePosition);\n });\n });\n\n // Filter to only valid DOM props (aria-*, data-*, events)\n const domProps = filterDOMProps(props);\n\n // Extract ref from ariaTooltipProps to avoid type conflicts (SolidJS ref types are element-specific)\n const { ref: _ariaRef, ...cleanAriaProps } = ariaTooltipProps as Record<string, unknown>;\n\n return (\n <OverlayContainer>\n <div\n {...domProps}\n {...props.contextTooltipProps}\n {...cleanAriaProps}\n role=\"tooltip\"\n ref={tooltipRef}\n class={renderProps.class()}\n style={{\n position: 'fixed',\n 'z-index': 100000,\n ...positionStyles(),\n ...renderProps.style(),\n }}\n data-placement={props.placement}\n >\n {renderProps.renderChildren()}\n </div>\n </OverlayContainer>\n );\n}\n\n// Re-export types\nexport type { TooltipTriggerState };\n", "/**\n * ComboBox component for solidaria-components\n *\n * A pre-wired headless combobox that combines state + aria hooks.\n * Port of react-aria-components/src/ComboBox.tsx\n */\n\nimport {\n type JSX,\n type Accessor,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createComboBox,\n createListBox,\n createOption,\n createHover,\n createInteractOutside,\n type AriaComboBoxProps,\n type AriaOptionProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createComboBoxState,\n defaultContainsFilter,\n type ComboBoxState,\n type Key,\n type FilterFn,\n type MenuTriggerAction,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ComboBoxRenderProps {\n /** Whether the combobox listbox is open. */\n isOpen: boolean;\n /** Whether the combobox input is focused. */\n isFocused: boolean;\n /** Whether the combobox input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the combobox is disabled. */\n isDisabled: boolean;\n /** Whether the combobox is required. */\n isRequired: boolean;\n /** Whether a value is selected. */\n isSelected: boolean;\n /** The current input value. */\n inputValue: string;\n}\n\nexport interface ComboBoxProps<T>\n extends Omit<AriaComboBoxProps, 'children'>,\n SlotProps {\n /** The items to render in the combobox. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** The currently selected key (controlled). */\n selectedKey?: Key | null;\n /** The default selected key (uncontrolled). */\n defaultSelectedKey?: Key | null;\n /** Handler called when selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n /** The current input value (controlled). */\n inputValue?: string;\n /** The default input value (uncontrolled). */\n defaultInputValue?: string;\n /** Handler called when input value changes. */\n onInputChange?: (value: string) => void;\n /** Whether the combobox is open (controlled). */\n isOpen?: boolean;\n /** Whether the combobox is open by default (uncontrolled). */\n defaultOpen?: boolean;\n /** Handler called when the open state changes. */\n onOpenChange?: (isOpen: boolean, trigger?: MenuTriggerAction) => void;\n /** The filter function to use for filtering items. */\n defaultFilter?: FilterFn;\n /** Whether to allow custom values that don't match any item. */\n allowsCustomValue?: boolean;\n /** Whether to allow an empty collection (show listbox even with no matches). */\n allowsEmptyCollection?: boolean;\n /** The trigger mechanism for the combobox menu. */\n menuTrigger?: 'focus' | 'input' | 'manual';\n /** The name of the combobox, used when submitting an HTML form. */\n name?: string;\n /** The children of the component (compound components: ComboBoxInput, ComboBoxButton, ComboBoxListBox). */\n children: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ComboBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ComboBoxRenderProps>;\n}\n\nexport interface ComboBoxInputRenderProps {\n /** Whether the combobox is open. */\n isOpen: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n /** Whether the input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the input is hovered. */\n isHovered: boolean;\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** The current input value. */\n inputValue: string;\n}\n\nexport interface ComboBoxInputProps extends SlotProps {\n /** The children of the input. */\n children?: RenderChildren<ComboBoxInputRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ComboBoxInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ComboBoxInputRenderProps>;\n}\n\nexport interface ComboBoxButtonRenderProps {\n /** Whether the combobox is open. */\n isOpen: boolean;\n /** Whether the button is focused. */\n isFocused: boolean;\n /** Whether the button is hovered. */\n isHovered: boolean;\n /** Whether the button is pressed. */\n isPressed: boolean;\n /** Whether the button is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ComboBoxButtonProps extends SlotProps {\n /** The children of the button. */\n children?: RenderChildren<ComboBoxButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ComboBoxButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ComboBoxButtonRenderProps>;\n}\n\nexport interface ComboBoxListBoxRenderProps {\n /** Whether the listbox is focused. */\n isFocused: boolean;\n}\n\nexport interface ComboBoxListBoxProps<T> extends SlotProps {\n /** The children of the listbox. A function may be provided to render each item. */\n children?: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ComboBoxListBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ComboBoxListBoxRenderProps>;\n}\n\nexport interface ComboBoxOptionRenderProps {\n /** Whether the option is selected. */\n isSelected: boolean;\n /** Whether the option is focused. */\n isFocused: boolean;\n /** Whether the option has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the option is pressed. */\n isPressed: boolean;\n /** Whether the option is hovered. */\n isHovered: boolean;\n /** Whether the option is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ComboBoxOptionProps<T>\n extends Omit<AriaOptionProps, 'children' | 'key'>,\n SlotProps {\n /** The unique key for the option. */\n id?: Key;\n /** The item value. */\n item?: T;\n /** The children of the option. A function may be provided to receive render props. */\n children?: RenderChildren<ComboBoxOptionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ComboBoxOptionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ComboBoxOptionRenderProps>;\n /** The text value of the option (for typeahead). */\n textValue?: string;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface ComboBoxContextValue<T> {\n state: ComboBoxState<T>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n buttonProps: JSX.HTMLAttributes<HTMLElement>;\n listBoxProps: JSX.HTMLAttributes<HTMLElement>;\n labelProps: JSX.HTMLAttributes<HTMLElement>;\n isOpen: Accessor<boolean>;\n isFocused: Accessor<boolean>;\n isFocusVisible: Accessor<boolean>;\n items?: T[];\n inputRef: () => HTMLInputElement | null;\n setInputRef: (el: HTMLInputElement | null) => void;\n buttonRef: () => HTMLElement | null;\n setButtonRef: (el: HTMLElement | null) => void;\n}\n\nexport const ComboBoxContext = createContext<ComboBoxContextValue<unknown> | null>(null);\nexport const ComboBoxStateContext = createContext<ComboBoxState<unknown> | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A combobox combines a text input with a listbox, allowing users to filter a list of options.\n */\nexport function ComboBox<T>(props: ComboBoxProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['class', 'style', 'slot'],\n [\n 'items',\n 'getKey',\n 'getTextValue',\n 'getDisabled',\n 'disabledKeys',\n 'selectedKey',\n 'defaultSelectedKey',\n 'onSelectionChange',\n 'inputValue',\n 'defaultInputValue',\n 'onInputChange',\n 'isOpen',\n 'defaultOpen',\n 'onOpenChange',\n 'defaultFilter',\n 'allowsCustomValue',\n 'allowsEmptyCollection',\n 'menuTrigger',\n 'name',\n ]\n );\n\n // Refs\n let inputRef: HTMLInputElement | null = null;\n let buttonRef: HTMLElement | null = null;\n\n // Create combobox state\n const state = createComboBoxState<T>({\n get items() {\n return stateProps.items ?? [];\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectedKey() {\n return stateProps.selectedKey;\n },\n get defaultSelectedKey() {\n return stateProps.defaultSelectedKey;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n get inputValue() {\n return stateProps.inputValue;\n },\n get defaultInputValue() {\n return stateProps.defaultInputValue;\n },\n get onInputChange() {\n return stateProps.onInputChange;\n },\n get isOpen() {\n return stateProps.isOpen;\n },\n get defaultOpen() {\n return stateProps.defaultOpen;\n },\n get onOpenChange() {\n return stateProps.onOpenChange;\n },\n get defaultFilter() {\n return stateProps.defaultFilter;\n },\n get allowsCustomValue() {\n return stateProps.allowsCustomValue;\n },\n get allowsEmptyCollection() {\n return stateProps.allowsEmptyCollection;\n },\n get menuTrigger() {\n return stateProps.menuTrigger;\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly;\n },\n get isRequired() {\n return ariaProps.isRequired;\n },\n });\n\n // Create combobox aria props\n const comboBoxAria = createComboBox<T>(\n ariaProps,\n state,\n () => inputRef,\n () => buttonRef\n );\n\n // Create hover for wrapper\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ComboBoxRenderProps>(() => ({\n isOpen: comboBoxAria.isOpen(),\n isFocused: comboBoxAria.isFocused(),\n isFocusVisible: comboBoxAria.isFocusVisible(),\n isDisabled: !!ariaProps.isDisabled,\n isRequired: !!ariaProps.isRequired,\n isSelected: state.selectedKey() != null,\n inputValue: state.inputValue(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ComboBox',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from hover props\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <ComboBoxContext.Provider\n value={{\n state,\n inputProps: comboBoxAria.inputProps,\n buttonProps: comboBoxAria.buttonProps,\n listBoxProps: comboBoxAria.listBoxProps,\n labelProps: comboBoxAria.labelProps,\n isOpen: comboBoxAria.isOpen,\n isFocused: comboBoxAria.isFocused,\n isFocusVisible: comboBoxAria.isFocusVisible,\n items: stateProps.items,\n inputRef: () => inputRef,\n setInputRef: (el) => { inputRef = el; },\n buttonRef: () => buttonRef,\n setButtonRef: (el) => { buttonRef = el; },\n }}\n >\n <ComboBoxStateContext.Provider value={state}>\n <div\n {...domProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={comboBoxAria.isOpen() || undefined}\n data-focused={comboBoxAria.isFocused() || undefined}\n data-focus-visible={comboBoxAria.isFocusVisible() || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-hovered={isHovered() || undefined}\n >\n {/* Hidden input for form submission */}\n <Show when={stateProps.name}>\n <input\n type=\"hidden\"\n name={stateProps.name}\n value={state.selectedKey()?.toString() ?? ''}\n />\n </Show>\n {props.children}\n </div>\n </ComboBoxStateContext.Provider>\n </ComboBoxContext.Provider>\n );\n}\n\n/**\n * The text input for a combobox.\n */\nexport function ComboBoxInput(props: ComboBoxInputProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(ComboBoxContext);\n if (!context) {\n throw new Error('ComboBoxInput must be used within a ComboBox');\n }\n const { inputProps, isOpen, isFocused, isFocusVisible, state, setInputRef } = context;\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ComboBoxInputRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isDisabled: state.isDisabled,\n inputValue: state.inputValue(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ComboBox-input',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanInputProps = () => {\n const { ref: _ref1, value: _value, ...rest } = inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <input\n ref={(el) => setInputRef(el)}\n {...cleanInputProps()}\n {...cleanHoverProps()}\n value={state.inputValue()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={isOpen() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={state.isDisabled || undefined}\n />\n );\n}\n\n/**\n * The trigger button for a combobox.\n */\nexport function ComboBoxButton(props: ComboBoxButtonProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(ComboBoxContext);\n if (!context) {\n throw new Error('ComboBoxButton must be used within a ComboBox');\n }\n const { buttonProps, isOpen, isFocused, state, setButtonRef } = context;\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Track pressed state\n let isPressed = false;\n\n // Render props values\n const renderValues = createMemo<ComboBoxButtonRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isHovered: isHovered(),\n isPressed,\n isDisabled: state.isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ComboBox-button',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanButtonProps = () => {\n const { ref: _ref1, ...rest } = buttonProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n ref={(el) => setButtonRef(el)}\n {...cleanButtonProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={isOpen() || undefined}\n data-focused={isFocused() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={state.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n/**\n * The listbox popup for a combobox.\n */\nexport function ComboBoxListBox<T>(props: ComboBoxListBoxProps<T>): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(ComboBoxContext);\n if (!context) {\n throw new Error('ComboBoxListBox must be used within a ComboBox');\n }\n const { listBoxProps: contextListBoxProps, state: comboBoxState, isOpen, inputRef } = context;\n const state = comboBoxState as ComboBoxState<T>;\n\n // Ref for the listbox element (for click outside detection)\n let listBoxRef: HTMLUListElement | undefined;\n\n // Handle click outside to close combobox\n createInteractOutside({\n ref: () => listBoxRef ?? null,\n onInteractOutside: (e) => {\n // Don't close if clicking the input or button\n const target = e.target as HTMLElement;\n const input = inputRef();\n if (input?.contains(target)) {\n return;\n }\n if (isOpen()) {\n state.close();\n }\n },\n get isDisabled() {\n return !isOpen();\n },\n });\n\n // Create listbox aria props using ComboBoxState's ListState-compatible interface\n const { listBoxProps } = createListBox(\n {},\n {\n collection: state.collection,\n focusedKey: state.focusedKey,\n setFocusedKey: state.setFocusedKey,\n isFocused: state.isFocused,\n setFocused: state.setFocused,\n // Use state's built-in methods\n selectionMode: state.selectionMode,\n select: state.select,\n isSelected: state.isSelected,\n isDisabled: state.isKeyDisabled,\n // Additional ListState interface requirements\n selectedKeys: () => {\n const key = state.selectedKey();\n return key != null ? new Set([key]) : new Set();\n },\n disallowEmptySelection: () => true,\n toggleSelection: state.select,\n replaceSelection: state.select,\n extendSelection: () => {},\n selectAll: () => {},\n clearSelection: () => state.setSelectedKey(null),\n childFocusStrategy: () => null,\n } as any\n );\n\n // Render props values\n const renderValues = createMemo<ComboBoxListBoxRenderProps>(() => ({\n isFocused: state.isFocused(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ComboBox-listbox',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanContextProps = () => {\n const { ref: _ref1, ...rest } = contextListBoxProps as Record<string, unknown>;\n return rest;\n };\n const cleanListBoxProps = () => {\n const { ref: _ref2, ...rest } = listBoxProps as Record<string, unknown>;\n return rest;\n };\n\n const items = () => Array.from(state.collection());\n\n // Prevent focus from being lost when clicking in the listbox\n // This is critical - if we don't prevent default, the input loses focus\n // and the blur handler closes the menu before the click can be processed\n // We need to attach this in the ref callback to use capture phase\n const setupMouseDownHandler = (el: HTMLUListElement) => {\n listBoxRef = el;\n if (el) {\n const mouseHandler = (e: MouseEvent) => {\n e.preventDefault();\n };\n const pointerHandler = (e: PointerEvent) => {\n e.preventDefault();\n };\n el.addEventListener('mousedown', mouseHandler, true); // capture phase\n el.addEventListener('pointerdown', pointerHandler, true); // capture phase\n }\n };\n\n return (\n <Show when={isOpen()}>\n <ul\n ref={setupMouseDownHandler}\n {...cleanContextProps()}\n {...cleanListBoxProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused() || undefined}\n >\n <Show when={props.children} fallback={\n <For each={items()}>\n {(node) => (\n <ComboBoxOption id={node.key}>\n {node.textValue}\n </ComboBoxOption>\n )}\n </For>\n }>\n <For each={items()}>\n {(node) => node.value != null ? props.children!(node.value) : null}\n </For>\n </Show>\n </ul>\n </Show>\n );\n}\n\n/**\n * An option in a combobox listbox.\n */\nexport function ComboBoxOption<T>(props: ComboBoxOptionProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n ]);\n\n // Get state from context\n const context = useContext(ComboBoxStateContext);\n if (!context) {\n throw new Error('ComboBoxOption must be used within a ComboBox');\n }\n const state = context as ComboBoxState<T>;\n\n // Create option aria props using ComboBoxState's ListState-compatible interface\n const optionAria = createOption<T>(\n {\n key: local.id!,\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n },\n {\n collection: state.collection,\n focusedKey: state.focusedKey,\n setFocusedKey: state.setFocusedKey,\n isFocused: state.isFocused,\n setFocused: state.setFocused,\n // Use state's built-in methods\n selectionMode: state.selectionMode,\n select: state.select,\n isSelected: state.isSelected,\n isDisabled: state.isKeyDisabled,\n // Additional ListState interface requirements\n selectedKeys: () => {\n const key = state.selectedKey();\n return key != null ? new Set([key]) : new Set();\n },\n disallowEmptySelection: () => true,\n toggleSelection: state.select,\n replaceSelection: state.select,\n extendSelection: () => {},\n selectAll: () => {},\n clearSelection: () => state.setSelectedKey(null),\n childFocusStrategy: () => null,\n } as any\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return optionAria.isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<ComboBoxOptionRenderProps>(() => ({\n isSelected: optionAria.isSelected(),\n isFocused: optionAria.isFocused(),\n isFocusVisible: optionAria.isFocusVisible(),\n isPressed: optionAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: optionAria.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ComboBox-option',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanOptionProps = () => {\n const { ref: _ref1, ...rest } = optionAria.optionProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <li\n {...cleanOptionProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={optionAria.isSelected() || undefined}\n data-focused={optionAria.isFocused() || undefined}\n data-focus-visible={optionAria.isFocusVisible() || undefined}\n data-pressed={optionAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={optionAria.isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </li>\n );\n}\n\n// Attach sub-components\nComboBox.Input = ComboBoxInput;\nComboBox.Button = ComboBoxButton;\nComboBox.ListBox = ComboBoxListBox;\nComboBox.Option = ComboBoxOption;\n\n// Re-export filter function for convenience\nexport { defaultContainsFilter };\n", "/**\n * Dialog component for solidaria-components\n *\n * A headless dialog component that combines ARIA hooks.\n * Port of react-aria-components Dialog.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createUniqueId,\n splitProps,\n useContext,\n Switch,\n Match,\n} from 'solid-js'\nimport {\n createDialog,\n createOverlayTrigger,\n type AriaDialogProps,\n} from '@proyecto-viviana/solidaria'\nimport { createOverlayTriggerState } from '@proyecto-viviana/solid-stately'\nimport { DialogTriggerContext, useOverlayTriggerState } from './contexts'\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils'\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface DialogRenderProps {\n /** Function to close the dialog */\n close: () => void\n}\n\nexport interface DialogProps extends Omit<AriaDialogProps, 'class' | 'style'>, SlotProps {\n /** The children of the component - can be JSX or render function. */\n children?: RenderChildren<DialogRenderProps>\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DialogRenderProps>\n /** The inline style for the element. */\n style?: StyleOrFunction<DialogRenderProps>\n /** Callback when dialog should close */\n onClose?: () => void\n}\n\nexport interface DialogTriggerProps {\n /** The children - should include a trigger and modal/popover content. */\n children: JSX.Element\n /** Whether the dialog is open (controlled). */\n isOpen?: boolean\n /** Whether the dialog is open by default (uncontrolled). */\n defaultOpen?: boolean\n /** Callback when open state changes. */\n onOpenChange?: (isOpen: boolean) => void\n}\n\n// ============================================\n// CONTEXTS\n// ============================================\n\ninterface DialogContextValue {\n close: () => void\n titleId?: string\n}\n\nexport const DialogContext = createContext<DialogContextValue | null>(null)\n\n// Re-export DialogTriggerContext from shared contexts (also imported above for local use)\nexport { DialogTriggerContext, useDialogTrigger } from './contexts'\n\n// ============================================\n// DIALOG TRIGGER COMPONENT\n// ============================================\n\n/**\n * A DialogTrigger opens a dialog when a trigger element is pressed.\n * Children should include a trigger element (e.g. Button) and the dialog content.\n */\nexport function DialogTrigger(props: DialogTriggerProps): JSX.Element {\n const [local] = splitProps(props, ['isOpen', 'defaultOpen', 'onOpenChange'])\n\n // Create overlay trigger state\n const state = createOverlayTriggerState({\n get isOpen() {\n return local.isOpen\n },\n get defaultOpen() {\n return local.defaultOpen\n },\n onOpenChange: local.onOpenChange,\n })\n\n // Ref for the trigger element\n let triggerRef: HTMLElement | null = null\n const triggerId = createUniqueId()\n\n // Create overlay trigger props (used via context, not directly applied)\n createOverlayTrigger(\n { type: 'dialog' },\n state,\n () => triggerRef\n )\n\n // Context value - memoized to avoid unnecessary re-renders\n const contextValue = createMemo(() => ({\n state,\n triggerRef: () => triggerRef,\n triggerId,\n }))\n\n // In SolidJS, we simply render children directly within the provider\n // The children will have access to the context\n return (\n <DialogTriggerContext.Provider value={contextValue()}>\n {props.children}\n </DialogTriggerContext.Provider>\n )\n}\n\n// ============================================\n// DIALOG COMPONENT\n// ============================================\n\n/**\n * A dialog is an overlay shown above other content in an application.\n */\nexport function Dialog(props: DialogProps): JSX.Element {\n const [local, ariaProps, rest] = splitProps(\n props,\n ['class', 'style', 'slot', 'onClose'],\n ['role', 'aria-label', 'aria-labelledby', 'aria-describedby']\n )\n\n let dialogRef!: HTMLDivElement\n\n // Get trigger context for aria-labelledby fallback\n const triggerContext = useContext(DialogTriggerContext)\n\n // createDialog returns dialogProps AND titleProps (with the id for the Heading)\n const { dialogProps, titleProps } = createDialog(\n {\n get role() {\n return ariaProps.role\n },\n get 'aria-label'() {\n return ariaProps['aria-label']\n },\n get 'aria-labelledby'() {\n // Use provided labelledby, or fall back to trigger id if no title\n return ariaProps['aria-labelledby'] ?? triggerContext?.triggerId\n },\n get 'aria-describedby'() {\n return ariaProps['aria-describedby']\n },\n },\n () => dialogRef\n )\n\n // Get titleId from titleProps - this links Dialog's aria-labelledby to Heading's id\n const titleId = () => titleProps()?.id\n\n // Get close function from OverlayTriggerState context or onClose prop\n const overlayState = useOverlayTriggerState()\n\n const close = () => {\n local.onClose?.()\n overlayState?.close()\n triggerContext?.state.close()\n }\n\n // Render props values\n const renderValues = createMemo<DialogRenderProps>(() => ({\n close,\n }))\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Dialog',\n },\n renderValues\n )\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }))\n\n return (\n <DialogContext.Provider value={{ close, titleId: titleId() }}>\n <div\n {...dialogProps()}\n {...domProps()}\n ref={dialogRef}\n class={renderProps.class()}\n style={renderProps.style()}\n >\n {renderProps.renderChildren()}\n </div>\n </DialogContext.Provider>\n )\n}\n\n// ============================================\n// HEADING COMPONENT\n// ============================================\n\nexport interface HeadingProps {\n /** The children of the heading. */\n children: JSX.Element\n /** The CSS className. */\n class?: string\n /** The heading level (1-6). Defaults to 2. */\n level?: 1 | 2 | 3 | 4 | 5 | 6\n /** The slot to render into. */\n slot?: string\n}\n\n/**\n * Heading element for dialog title.\n * When rendered inside a Dialog, automatically gets the titleProps.\n */\nexport function Heading(props: HeadingProps): JSX.Element {\n const dialogContext = useContext(DialogContext)\n const level = () => props.level ?? 2\n const id = () => dialogContext?.titleId\n\n return (\n <Switch>\n <Match when={level() === 1}>\n <h1 id={id()} class={props.class}>{props.children}</h1>\n </Match>\n <Match when={level() === 2}>\n <h2 id={id()} class={props.class}>{props.children}</h2>\n </Match>\n <Match when={level() === 3}>\n <h3 id={id()} class={props.class}>{props.children}</h3>\n </Match>\n <Match when={level() === 4}>\n <h4 id={id()} class={props.class}>{props.children}</h4>\n </Match>\n <Match when={level() === 5}>\n <h5 id={id()} class={props.class}>{props.children}</h5>\n </Match>\n <Match when={level() === 6}>\n <h6 id={id()} class={props.class}>{props.children}</h6>\n </Match>\n </Switch>\n )\n}\n\n// Keep backward compatibility\nexport { Heading as DialogHeading }\n", "/**\n * Modal and ModalOverlay components for solidaria-components\n *\n * Headless modal components with overlay, focus trapping, and dismissal handling.\n * Port of react-aria-components Modal.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n createEffect,\n onCleanup,\n splitProps,\n Show,\n useContext,\n} from 'solid-js'\nimport { Portal, isServer } from 'solid-js/web'\nimport {\n createInteractOutside,\n ariaHideOutside,\n FocusScope,\n} from '@proyecto-viviana/solidaria'\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n} from './utils'\nimport {\n DialogTriggerContext,\n OverlayTriggerStateContext,\n type OverlayTriggerState,\n} from './contexts'\n\n// ============================================\n// INTERNAL CONTEXT\n// ============================================\n\n/**\n * Internal context to signal that Modal is wrapped in ModalOverlay.\n * When present, Modal should not create its own Portal.\n */\ninterface InternalModalContextValue {\n isDismissable?: boolean\n isKeyboardDismissDisabled?: boolean\n}\n\nconst InternalModalContext = createContext<InternalModalContextValue | null>(null)\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ModalRenderProps {\n /** Whether the modal is currently entering (for animations). */\n isEntering: boolean\n /** Whether the modal is currently exiting (for animations). */\n isExiting: boolean\n}\n\nexport interface ModalOverlayProps {\n /** The children of the component - can be JSX or render function. */\n children?: RenderChildren<ModalRenderProps>\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ModalRenderProps>\n /** The inline style for the element. */\n style?: StyleOrFunction<ModalRenderProps>\n /** Whether the modal is open (controlled). */\n isOpen?: boolean\n /** Whether the modal opens by default (uncontrolled). */\n defaultOpen?: boolean\n /** Handler called when the modal's open state changes. */\n onOpenChange?: (isOpen: boolean) => void\n /** Whether clicking outside the modal closes it. */\n isDismissable?: boolean\n /** Whether pressing Escape closes the modal. */\n isKeyboardDismissDisabled?: boolean\n /** Whether the modal is entering (for animations). */\n isEntering?: boolean\n /** Whether the modal is exiting (for animations). */\n isExiting?: boolean\n}\n\nexport interface ModalProps extends ModalOverlayProps {}\n\n// Re-export from contexts for backwards compatibility\nexport { OverlayTriggerStateContext, type OverlayTriggerState } from './contexts'\nexport { useOverlayTriggerState } from './contexts'\n\n// ============================================\n// MODAL OVERLAY COMPONENT\n// ============================================\n\n/**\n * ModalOverlay is the backdrop/underlay behind a modal.\n * It handles click-outside dismissal and provides styling hooks.\n */\nexport function ModalOverlay(props: ModalOverlayProps): JSX.Element {\n if (isServer) {\n return <>{props.children}</>\n }\n\n // IMPORTANT: Don't destructure or access props.children early!\n // In SolidJS, children are lazily evaluated. Accessing them before\n // the context provider renders causes them to evaluate outside the context.\n // See: https://github.com/solidjs/solid/issues/182\n const [local, rest] = splitProps(props, [\n 'class',\n 'style',\n 'isOpen',\n 'defaultOpen',\n 'onOpenChange',\n 'isDismissable',\n 'isKeyboardDismissDisabled',\n 'isEntering',\n 'isExiting',\n ])\n\n // Get state from DialogTrigger context if available\n const dialogTriggerContext = useContext(DialogTriggerContext)\n\n // Internal state for uncontrolled mode\n const [internalOpen, setInternalOpen] = createSignal(local.defaultOpen ?? false)\n\n // Determine if open (controlled > DialogTrigger context > uncontrolled)\n const isOpen = (): boolean => {\n if (local.isOpen !== undefined) return local.isOpen\n if (dialogTriggerContext) return dialogTriggerContext.state.isOpen()\n return internalOpen()\n }\n\n const close = () => {\n if (local.isOpen !== undefined) {\n local.onOpenChange?.(false)\n } else if (dialogTriggerContext) {\n dialogTriggerContext.state.close()\n local.onOpenChange?.(false)\n } else {\n setInternalOpen(false)\n local.onOpenChange?.(false)\n }\n }\n\n const open = () => {\n if (local.isOpen !== undefined) {\n local.onOpenChange?.(true)\n } else if (dialogTriggerContext) {\n dialogTriggerContext.state.open()\n local.onOpenChange?.(true)\n } else {\n setInternalOpen(true)\n local.onOpenChange?.(true)\n }\n }\n\n const toggle = () => {\n if (isOpen()) {\n close()\n } else {\n open()\n }\n }\n\n // Create overlay trigger state for context\n const state: OverlayTriggerState = {\n get isOpen() { return isOpen() },\n open,\n close,\n toggle,\n }\n\n // Render props values\n const renderValues = createMemo<ModalRenderProps>(() => ({\n isEntering: local.isEntering ?? false,\n isExiting: local.isExiting ?? false,\n }))\n\n // Resolve render props - don't pass children, we'll render props.children directly\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ModalOverlay',\n },\n renderValues\n )\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }))\n\n // Internal context value to signal Modal that it's wrapped\n const internalModalContext: InternalModalContextValue = {\n isDismissable: local.isDismissable,\n isKeyboardDismissDisabled: local.isKeyboardDismissDisabled,\n }\n\n // Resolve children - handle both static JSX and render functions\n // IMPORTANT: We access props.children directly (not local.children) to preserve\n // lazy evaluation inside context providers\n const resolveChildren = () => {\n const children = props.children\n if (typeof children === 'function') {\n return (children as (props: ModalRenderProps) => JSX.Element)(renderValues())\n }\n return children\n }\n\n return (\n <Show when={isOpen() || local.isExiting}>\n <Portal>\n <OverlayTriggerStateContext.Provider value={state}>\n <InternalModalContext.Provider value={internalModalContext}>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-entering={dataAttr(local.isEntering)}\n data-exiting={dataAttr(local.isExiting)}\n >\n {resolveChildren()}\n </div>\n </InternalModalContext.Provider>\n </OverlayTriggerStateContext.Provider>\n </Portal>\n </Show>\n )\n}\n\n// ============================================\n// MODAL COMPONENT\n// ============================================\n\n/**\n * Modal is a dialog container that manages focus trapping, scroll prevention,\n * aria-hiding of content outside, and dismissal.\n *\n * Usage patterns:\n * 1. Standalone: `<Modal isOpen>...</Modal>` - Creates its own overlay\n * 2. With custom overlay: `<ModalOverlay><Modal>...</Modal></ModalOverlay>`\n *\n * Note: Due to SolidJS's eager JSX evaluation, we cannot detect at render time\n * whether Modal is wrapped in ModalOverlay. So standalone Modal always creates\n * an overlay, and wrapped Modal renders directly (relying on InternalModalContext).\n */\nexport function Modal(props: ModalProps): JSX.Element {\n // Check for InternalModalContext which signals we're inside a rendered ModalOverlay\n // This works because ModalContent is rendered INSIDE ModalOverlay's Show/Portal\n return <ModalContentWithAutoOverlay {...props} />\n}\n\n/**\n * Helper component that handles the overlay detection.\n * By being a separate component, we can use Show to defer rendering until\n * the parent context is available.\n */\nfunction ModalContentWithAutoOverlay(props: ModalProps): JSX.Element {\n const [overlayProps, modalProps] = splitProps(props, [\n 'isOpen',\n 'defaultOpen',\n 'onOpenChange',\n 'isDismissable',\n 'isKeyboardDismissDisabled',\n 'isEntering',\n 'isExiting',\n ])\n\n // Check for InternalModalContext - if present, we're inside a ModalOverlay\n const internalContext = useContext(InternalModalContext)\n\n // If wrapped in ModalOverlay, just render the content\n if (internalContext) {\n return (\n <ModalContent {...modalProps} internalContext={internalContext}>\n {props.children}\n </ModalContent>\n )\n }\n\n // For standalone usage, wrap in ModalOverlay\n const standaloneContext: InternalModalContextValue = {\n isDismissable: overlayProps.isDismissable,\n isKeyboardDismissDisabled: overlayProps.isKeyboardDismissDisabled,\n }\n\n return (\n <ModalOverlay {...overlayProps}>\n <ModalContent {...modalProps} internalContext={standaloneContext}>\n {props.children}\n </ModalContent>\n </ModalOverlay>\n )\n}\n\n/**\n * Internal component that renders the actual modal content.\n * Used by both standalone Modal and Modal wrapped in ModalOverlay.\n */\nfunction ModalContent(props: ModalProps & { internalContext: InternalModalContextValue }): JSX.Element {\n if (isServer) {\n return <>{props.children}</>\n }\n\n const [local, rest] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'isOpen',\n 'defaultOpen',\n 'onOpenChange',\n 'isDismissable',\n 'isKeyboardDismissDisabled',\n 'isEntering',\n 'isExiting',\n 'internalContext',\n ])\n\n let modalRef!: HTMLDivElement\n\n // Get state from parent OverlayTriggerStateContext (provided by ModalOverlay)\n const parentState = useContext(OverlayTriggerStateContext)\n\n // Get dismissable settings from internal context (set by ModalOverlay)\n const isDismissable = () => local.internalContext?.isDismissable ?? local.isDismissable\n const isKeyboardDismissDisabled = () => local.internalContext?.isKeyboardDismissDisabled ?? local.isKeyboardDismissDisabled\n\n // Determine if open from parent state\n const isOpen = (): boolean => {\n if (local.isOpen !== undefined) return local.isOpen\n return parentState?.isOpen ?? false\n }\n\n const close = () => {\n if (local.isOpen !== undefined) {\n local.onOpenChange?.(false)\n } else {\n parentState?.close()\n }\n }\n\n // Prevent scroll when modal is open\n createEffect(() => {\n if (!isOpen()) return\n\n // Set overflow hidden on html element\n const html = document.documentElement\n const prevOverflow = html.style.overflow\n html.style.overflow = 'hidden'\n\n onCleanup(() => {\n html.style.overflow = prevOverflow\n })\n })\n\n // Click outside to close (if dismissable)\n createEffect(() => {\n if (!isOpen() || !isDismissable()) return\n\n createInteractOutside({\n ref: () => modalRef ?? null,\n onInteractOutside: () => {\n close()\n },\n isDisabled: false,\n })\n })\n\n // Escape key to close\n createEffect(() => {\n if (!isOpen() || isKeyboardDismissDisabled()) return\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault()\n e.stopPropagation()\n close()\n }\n }\n\n document.addEventListener('keydown', handleKeyDown, true)\n onCleanup(() => {\n document.removeEventListener('keydown', handleKeyDown, true)\n })\n })\n\n // Aria-hide outside content\n createEffect(() => {\n if (!isOpen() || !modalRef) return\n\n const cleanup = ariaHideOutside([modalRef])\n onCleanup(cleanup)\n })\n\n // Render props values\n const renderValues = createMemo<ModalRenderProps>(() => ({\n isEntering: local.isEntering ?? false,\n isExiting: local.isExiting ?? false,\n }))\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Modal',\n },\n renderValues\n )\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }))\n\n return (\n <FocusScope contain restoreFocus autoFocus>\n <div\n {...domProps()}\n ref={modalRef}\n class={renderProps.class()}\n style={renderProps.style()}\n data-entering={dataAttr(local.isEntering)}\n data-exiting={dataAttr(local.isExiting)}\n >\n {renderProps.renderChildren()}\n </div>\n </FocusScope>\n )\n}\n\nexport default Modal\n", "/**\n * Popover component for solidaria-components\n *\n * A headless popover component that positions relative to a trigger element.\n * Port of react-aria-components Popover.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n createUniqueId,\n splitProps,\n useContext,\n Show,\n createEffect,\n onCleanup,\n} from 'solid-js'\nimport { Portal, isServer } from 'solid-js/web'\nimport {\n createOverlayTrigger,\n FocusScope,\n type Placement,\n type PlacementAxis,\n} from '@proyecto-viviana/solidaria'\nimport { createOverlayTriggerState } from '@proyecto-viviana/solid-stately'\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n} from './utils'\nimport { PopoverTriggerContext } from './contexts'\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface PopoverRenderProps {\n /**\n * The name of the component that triggered the popover.\n */\n trigger: string | null\n /**\n * The placement of the popover relative to the trigger.\n */\n placement: PlacementAxis | null\n /**\n * Whether the popover is currently entering (for animations).\n */\n isEntering: boolean\n /**\n * Whether the popover is currently exiting (for animations).\n */\n isExiting: boolean\n}\n\nexport interface PopoverProps extends SlotProps {\n /** The children of the component - can be JSX or render function. */\n children?: RenderChildren<PopoverRenderProps>\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<PopoverRenderProps>\n /** The inline style for the element. */\n style?: StyleOrFunction<PopoverRenderProps>\n /**\n * The name of the component that triggered the popover.\n */\n trigger?: string\n /**\n * The ref for the element which the popover positions itself with respect to.\n * Required when used standalone (not within a trigger component).\n */\n triggerRef?: () => Element | null\n /**\n * The placement of the element with respect to its anchor element.\n * @default 'bottom'\n */\n placement?: Placement\n /**\n * The placement padding that should be applied between the element and its\n * surrounding container.\n * @default 12\n */\n containerPadding?: number\n /**\n * The additional offset applied along the main axis between the element and its\n * anchor element.\n * @default 8\n */\n offset?: number\n /**\n * The additional offset applied along the cross axis between the element and its\n * anchor element.\n * @default 0\n */\n crossOffset?: number\n /**\n * Whether the element should flip its orientation when there is insufficient room.\n * @default true\n */\n shouldFlip?: boolean\n /**\n * Whether the popover is non-modal (allows interaction outside).\n */\n isNonModal?: boolean\n /**\n * Whether pressing Escape to close should be disabled.\n */\n isKeyboardDismissDisabled?: boolean\n /**\n * Filter for which outside interactions should close the popover.\n */\n shouldCloseOnInteractOutside?: (element: Element) => boolean\n /** Whether the popover is open (controlled). */\n isOpen?: boolean\n /** Whether the popover opens by default (uncontrolled). */\n defaultOpen?: boolean\n /** Handler called when the popover's open state changes. */\n onOpenChange?: (isOpen: boolean) => void\n /** Whether the popover is entering (for animations). */\n isEntering?: boolean\n /** Whether the popover is exiting (for animations). */\n isExiting?: boolean\n}\n\nexport interface PopoverTriggerProps {\n /** The children - should include a trigger and popover content. */\n children: JSX.Element\n /** Whether the popover is open (controlled). */\n isOpen?: boolean\n /** Whether the popover is open by default (uncontrolled). */\n defaultOpen?: boolean\n /** Callback when open state changes. */\n onOpenChange?: (isOpen: boolean) => void\n}\n\n// ============================================\n// CONTEXTS\n// ============================================\n\n// Re-export from shared contexts\nexport { PopoverTriggerContext, usePopoverTrigger, type PopoverTriggerContextValue } from './contexts'\n\n// Internal context for placement\nexport const PopoverContext = createContext<{ placement: () => PlacementAxis | null } | null>(null)\n\n// ============================================\n// POPOVER TRIGGER COMPONENT\n// ============================================\n\n/**\n * A PopoverTrigger opens a popover when a trigger element is pressed.\n * Children should include a trigger element (e.g. Button) and the Popover.\n */\nexport function PopoverTrigger(props: PopoverTriggerProps): JSX.Element {\n const [local] = splitProps(props, ['isOpen', 'defaultOpen', 'onOpenChange'])\n\n // Create overlay trigger state\n const state = createOverlayTriggerState({\n get isOpen() {\n return local.isOpen\n },\n get defaultOpen() {\n return local.defaultOpen\n },\n onOpenChange: local.onOpenChange,\n })\n\n // Ref for the trigger element\n let triggerRef: HTMLElement | null = null\n const triggerId = createUniqueId()\n\n // Create overlay trigger (for side effects like scroll close)\n createOverlayTrigger(\n { type: 'dialog' },\n state,\n () => triggerRef\n )\n\n // Track if triggerRef has been set (to prevent buttons inside Popover from overwriting it)\n let triggerRefSet = false\n\n // Context value\n const contextValue = createMemo(() => ({\n state: {\n isOpen: () => state.isOpen(),\n open: () => state.open(),\n close: () => state.close(),\n toggle: () => state.toggle(),\n },\n triggerRef: () => {\n return triggerRef\n },\n setTriggerRef: (el: HTMLElement | null) => {\n // Only set the trigger ref once - the first button to register is the actual trigger\n // This prevents buttons inside the Popover content from overwriting the trigger ref\n if (!triggerRefSet && el) {\n triggerRef = el\n triggerRefSet = true\n }\n },\n triggerId,\n trigger: 'PopoverTrigger',\n }))\n\n // Just render children inside the provider - the Button component will detect\n // the PopoverTriggerContext and handle toggling. The Popover component will\n // detect the context and use it for open state.\n //\n // IMPORTANT: In SolidJS, JSX children are lazily evaluated when they're part\n // of JSX expression. So {props.children} here means the children (Button, Popover)\n // will be evaluated inside the Provider context.\n return (\n <PopoverTriggerContext.Provider value={contextValue()}>\n {props.children}\n </PopoverTriggerContext.Provider>\n )\n}\n\n// ============================================\n// POPOVER COMPONENT\n// ============================================\n\n/**\n * A popover is an overlay element positioned relative to a trigger.\n */\nexport function Popover(props: PopoverProps): JSX.Element {\n if (isServer) {\n // On the server, return null - popovers should not render during SSR\n return null as unknown as JSX.Element\n }\n\n const [local, rest] = splitProps(props, [\n 'class',\n 'style',\n 'trigger',\n 'triggerRef',\n 'placement',\n 'containerPadding',\n 'offset',\n 'crossOffset',\n 'shouldFlip',\n 'isNonModal',\n 'isKeyboardDismissDisabled',\n 'shouldCloseOnInteractOutside',\n 'isOpen',\n 'defaultOpen',\n 'onOpenChange',\n 'isEntering',\n 'isExiting',\n ])\n\n let popoverRef!: HTMLDivElement\n\n // Get trigger context if available\n const triggerContext = useContext(PopoverTriggerContext)\n\n // Internal state for uncontrolled mode\n const [internalOpen, setInternalOpen] = createSignal(local.defaultOpen ?? false)\n\n // Determine if open\n const isOpen = (): boolean => {\n if (local.isOpen !== undefined) return local.isOpen\n if (triggerContext) {\n return triggerContext.state.isOpen()\n }\n return internalOpen()\n }\n\n const close = () => {\n if (local.isOpen !== undefined) {\n local.onOpenChange?.(false)\n } else if (triggerContext) {\n triggerContext.state.close()\n local.onOpenChange?.(false)\n } else {\n setInternalOpen(false)\n local.onOpenChange?.(false)\n }\n }\n\n // Get trigger ref\n const getTriggerRef = () => {\n if (local.triggerRef) return local.triggerRef()\n if (triggerContext) return triggerContext.triggerRef()\n return null\n }\n\n // Signal to track placement after positioning\n const [placement, setPlacement] = createSignal<PlacementAxis | null>(null)\n // Signal to track position styles\n // Start with visibility hidden, then show after positioning\n const [positionStyles, setPositionStyles] = createSignal({\n top: '0px',\n left: '0px',\n visibility: 'hidden' as 'hidden' | 'visible',\n })\n\n // Handle keyboard dismiss (Escape key)\n createEffect(() => {\n if (!isOpen()) return\n if (local.isKeyboardDismissDisabled) return\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault()\n e.stopPropagation()\n close()\n }\n }\n\n document.addEventListener('keydown', handleKeyDown)\n onCleanup(() => document.removeEventListener('keydown', handleKeyDown))\n })\n\n // Handle click outside to dismiss popover\n createEffect(() => {\n if (!isOpen()) return\n if (local.isNonModal) return // Non-modal popovers don't auto-dismiss on outside click\n\n const handleClickOutside = (e: MouseEvent) => {\n const target = e.target as Element\n const trigger = getTriggerRef()\n\n // Don't close if clicking inside the popover\n if (popoverRef && popoverRef.contains(target)) {\n return\n }\n\n // Don't close if clicking the trigger (it will toggle)\n if (trigger && trigger.contains(target)) {\n return\n }\n\n // Check custom filter\n if (local.shouldCloseOnInteractOutside && !local.shouldCloseOnInteractOutside(target)) {\n return\n }\n\n close()\n }\n\n // Use capture phase to catch clicks before they bubble\n // Small delay to avoid closing on the same click that opened it\n const timeoutId = setTimeout(() => {\n document.addEventListener('mousedown', handleClickOutside, true)\n }, 0)\n\n onCleanup(() => {\n clearTimeout(timeoutId)\n document.removeEventListener('mousedown', handleClickOutside, true)\n })\n })\n\n // Calculate position based on trigger element\n // Using position: fixed so we use viewport coordinates directly from getBoundingClientRect\n const updatePosition = () => {\n const trigger = getTriggerRef()\n const popover = popoverRef\n if (!trigger || !popover) return\n\n const triggerRect = trigger.getBoundingClientRect()\n // Use offsetWidth/offsetHeight which are more reliable than getBoundingClientRect\n // when the element might be positioned off-screen initially\n const popoverWidth = popover.offsetWidth\n const popoverHeight = popover.offsetHeight\n const offset = local.offset ?? 8\n\n let top = 0\n let left = 0\n const placementValue = local.placement ?? 'bottom'\n\n // Using viewport coordinates for position: fixed\n switch (placementValue) {\n case 'top':\n case 'top start':\n case 'top end':\n top = triggerRect.top - popoverHeight - offset\n left = triggerRect.left + (triggerRect.width - popoverWidth) / 2\n setPlacement('top')\n break\n case 'bottom':\n case 'bottom start':\n case 'bottom end':\n top = triggerRect.bottom + offset\n left = triggerRect.left + (triggerRect.width - popoverWidth) / 2\n setPlacement('bottom')\n break\n case 'left':\n case 'left top':\n case 'left bottom':\n top = triggerRect.top + (triggerRect.height - popoverHeight) / 2\n left = triggerRect.left - popoverWidth - offset\n setPlacement('left')\n break\n case 'right':\n case 'right top':\n case 'right bottom':\n top = triggerRect.top + (triggerRect.height - popoverHeight) / 2\n left = triggerRect.right + offset\n setPlacement('right')\n break\n default:\n top = triggerRect.bottom + offset\n left = triggerRect.left + (triggerRect.width - popoverWidth) / 2\n setPlacement('bottom')\n }\n\n setPositionStyles({\n top: `${top}px`,\n left: `${left}px`,\n visibility: 'visible',\n })\n }\n\n // Set up positioning effect - runs when open and trigger ref is available\n createEffect(() => {\n if (!isOpen()) return\n\n const triggerElement = getTriggerRef()\n if (!triggerElement) return\n\n // Initial position calculation - use requestAnimationFrame to ensure\n // the element is rendered and has proper dimensions\n requestAnimationFrame(() => {\n updatePosition()\n })\n\n // Update on scroll/resize\n window.addEventListener('scroll', updatePosition, true)\n window.addEventListener('resize', updatePosition)\n\n onCleanup(() => {\n window.removeEventListener('scroll', updatePosition, true)\n window.removeEventListener('resize', updatePosition)\n })\n })\n\n // Render props values\n const renderValues = createMemo<PopoverRenderProps>(() => ({\n trigger: local.trigger ?? triggerContext?.trigger ?? null,\n placement: placement(),\n isEntering: local.isEntering ?? false,\n isExiting: local.isExiting ?? false,\n }))\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Popover',\n },\n renderValues\n )\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }))\n\n // Check if we should render with dialog role\n const shouldBeDialog = () => !local.isNonModal\n\n return (\n <Show when={isOpen() || local.isExiting}>\n <Portal>\n <PopoverContext.Provider value={{ placement: () => placement() }}>\n <FocusScope contain={shouldBeDialog()} restoreFocus autoFocus>\n <div\n {...domProps()}\n ref={popoverRef}\n role={shouldBeDialog() ? 'dialog' : undefined}\n tabIndex={shouldBeDialog() ? -1 : undefined}\n class={renderProps.class()}\n style={{\n position: 'fixed',\n 'z-index': 100000,\n ...positionStyles(),\n ...renderProps.style(),\n }}\n data-trigger={local.trigger ?? triggerContext?.trigger}\n data-placement={placement()}\n data-entering={dataAttr(local.isEntering)}\n data-exiting={dataAttr(local.isExiting)}\n >\n {renderProps.renderChildren()}\n </div>\n </FocusScope>\n </PopoverContext.Provider>\n </Portal>\n </Show>\n )\n}\n\n// ============================================\n// OVERLAY ARROW COMPONENT\n// ============================================\n\nexport interface OverlayArrowProps {\n /** The children - should be an SVG or element for the arrow. */\n children?: JSX.Element | ((placement: PlacementAxis | null) => JSX.Element)\n /** The CSS className. */\n class?: string\n /** The inline style. */\n style?: JSX.CSSProperties\n}\n\n/**\n * An arrow element that points towards the trigger.\n */\nexport function OverlayArrow(props: OverlayArrowProps): JSX.Element {\n const popoverContext = useContext(PopoverContext)\n const placement = () => popoverContext?.placement() ?? null\n\n const resolveChildren = () => {\n const children = props.children\n if (typeof children === 'function') {\n return children(placement())\n }\n return children\n }\n\n return (\n <div\n class={props.class}\n style={props.style}\n data-placement={placement()}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {resolveChildren()}\n </div>\n )\n}\n\nexport default Popover\n", "/**\n * Toast components for solidaria-components\n *\n * Toast notifications with auto-dismiss, pause on hover/focus, and accessibility.\n * Port of react-aria-components Toast.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n Show,\n useContext,\n} from 'solid-js';\nimport { Portal, isServer } from 'solid-js/web';\nimport {\n type ToastState,\n type QueuedToast,\n type ToastQueueOptions,\n ToastQueue,\n createToastState,\n} from '@proyecto-viviana/solid-stately';\nimport {\n createToast,\n createToastRegion,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ToastContent {\n /** The title of the toast. */\n title?: string;\n /** The description/body of the toast. */\n description?: string;\n /** The type/variant of the toast (info, success, warning, error). */\n type?: 'info' | 'success' | 'warning' | 'error';\n /** Custom action button. */\n action?: {\n label: string;\n onAction: () => void;\n };\n}\n\nexport interface ToastRenderProps {\n /** Whether the toast is currently animating in. */\n isEntering: boolean;\n /** Whether the toast is currently animating out. */\n isExiting: boolean;\n /** The animation state (entering, exiting, queued). */\n animation: 'entering' | 'exiting' | 'queued' | undefined;\n /** The toast data. */\n toast: QueuedToast<ToastContent>;\n}\n\nexport interface ToastRegionRenderProps {\n /** The visible toasts. */\n visibleToasts: QueuedToast<ToastContent>[];\n}\n\nexport interface ToastRegionProps {\n /** The children of the component - can be JSX or render function. */\n children?: RenderChildren<ToastRegionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ToastRegionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ToastRegionRenderProps>;\n /** The toast state to display. If not provided, uses ToastContext. */\n state?: ToastState<ToastContent>;\n /** Accessible label for the region. */\n 'aria-label'?: string;\n /** Whether to render in a portal. */\n portal?: boolean;\n /** Placement of the toast region. */\n placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';\n}\n\nexport interface ToastProps {\n /** The toast data. */\n toast: QueuedToast<ToastContent>;\n /** The children of the component - can be JSX or render function. */\n children?: RenderChildren<ToastRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ToastRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ToastRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const ToastContext = createContext<ToastState<ToastContent> | null>(null);\n\nexport function useToastContext(): ToastState<ToastContent> {\n const context = useContext(ToastContext);\n if (!context) {\n throw new Error('Toast components must be used within a ToastProvider');\n }\n return context;\n}\n\n// ============================================\n// GLOBAL TOAST QUEUE\n// ============================================\n\n/** Default global toast queue that can be used for app-wide toasts. */\nexport const globalToastQueue = new ToastQueue<ToastContent>({\n maxVisibleToasts: 5,\n hasExitAnimation: false, // TODO: Enable once exit animation handling is implemented\n});\n\n/**\n * Add a toast to the global queue.\n * Convenience function for adding toasts from anywhere in the app.\n */\nexport function addToast(\n content: ToastContent,\n options?: { timeout?: number; priority?: number }\n): string {\n return globalToastQueue.add(content, options);\n}\n\n// ============================================\n// TOAST PROVIDER\n// ============================================\n\nexport interface ToastProviderProps {\n /** The children of the provider. */\n children: JSX.Element;\n /** Custom toast queue options. */\n queueOptions?: ToastQueueOptions;\n /** Use global queue instead of creating a new one. */\n useGlobalQueue?: boolean;\n}\n\n/**\n * ToastProvider creates a toast queue context for descendant components.\n * Use this to wrap your app or a section that needs toast notifications.\n *\n * @example\n * ```tsx\n * <ToastProvider>\n * <App />\n * <ToastRegion />\n * </ToastProvider>\n * ```\n */\nexport function ToastProvider(props: ToastProviderProps): JSX.Element {\n const queue = props.useGlobalQueue\n ? globalToastQueue\n : new ToastQueue<ToastContent>(props.queueOptions);\n\n const state = createToastState({ queue });\n\n return (\n <ToastContext.Provider value={state}>\n {props.children}\n </ToastContext.Provider>\n );\n}\n\n// ============================================\n// TOAST REGION COMPONENT\n// ============================================\n\n/**\n * ToastRegion is a container that displays all visible toasts.\n * It handles pause on hover/focus and provides the landmark region.\n *\n * @example\n * ```tsx\n * <ToastRegion placement=\"bottom-end\">\n * {(renderProps) => (\n * <For each={renderProps.visibleToasts}>\n * {(toast) => <Toast toast={toast} />}\n * </For>\n * )}\n * </ToastRegion>\n * ```\n */\nexport function ToastRegion(props: ToastRegionProps): JSX.Element {\n if (isServer) {\n return null as unknown as JSX.Element;\n }\n\n const [local, rest] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'state',\n 'aria-label',\n 'portal',\n 'placement',\n ]);\n\n // Get state from context if not provided\n const contextState = useContext(ToastContext);\n const state = () => local.state ?? contextState;\n\n // Create region accessibility props\n const getRegionAria = () => {\n const s = state();\n if (!s) return null;\n return createToastRegion({\n state: s,\n 'aria-label': local['aria-label'],\n });\n };\n\n // Render props values\n const renderValues = createMemo<ToastRegionRenderProps>(() => ({\n visibleToasts: state()?.visibleToasts() ?? [],\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ToastRegion',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Placement styles\n const placementStyles = createMemo<JSX.CSSProperties>(() => {\n const placement = local.placement ?? 'bottom-end';\n const base: JSX.CSSProperties = {\n position: 'fixed',\n 'z-index': 100001,\n display: 'flex',\n 'flex-direction': 'column',\n gap: '8px',\n padding: '16px',\n 'pointer-events': 'none',\n };\n\n switch (placement) {\n case 'top':\n return { ...base, top: 0, left: '50%', transform: 'translateX(-50%)' } as JSX.CSSProperties;\n case 'top-start':\n return { ...base, top: 0, left: 0 } as JSX.CSSProperties;\n case 'top-end':\n return { ...base, top: 0, right: 0 } as JSX.CSSProperties;\n case 'bottom':\n return { ...base, bottom: 0, left: '50%', transform: 'translateX(-50%)' } as JSX.CSSProperties;\n case 'bottom-start':\n return { ...base, bottom: 0, left: 0 } as JSX.CSSProperties;\n case 'bottom-end':\n default:\n return { ...base, bottom: 0, right: 0 } as JSX.CSSProperties;\n }\n });\n\n const visibleToasts = () => state()?.visibleToasts() ?? [];\n const hasToasts = () => visibleToasts().length > 0;\n\n const regionContent = () => {\n const regionAria = getRegionAria();\n if (!regionAria || !state()) return null;\n\n // Merge styles - placement styles are base, renderProps.style() overrides\n const mergedStyle = () => {\n const placement = placementStyles();\n const custom = renderProps.style();\n if (!custom) return placement;\n return { ...placement, ...custom } as JSX.CSSProperties;\n };\n\n // Extract ref from regionProps to avoid type conflicts\n const { ref: _ref, ...cleanRegionProps } = regionAria.regionProps as Record<string, unknown>;\n\n return (\n <div\n {...domProps()}\n {...cleanRegionProps}\n class={renderProps.class()}\n style={mergedStyle()}\n data-placement={local.placement ?? 'bottom-end'}\n >\n {renderProps.renderChildren()}\n </div>\n );\n };\n\n // Only render when there are toasts\n return (\n <Show when={hasToasts()}>\n <Show when={local.portal !== false} fallback={regionContent()}>\n <Portal>{regionContent()}</Portal>\n </Show>\n </Show>\n );\n}\n\n// ============================================\n// TOAST COMPONENT\n// ============================================\n\n/**\n * Toast is an individual notification component.\n *\n * @example\n * ```tsx\n * <Toast toast={toast}>\n * {(renderProps) => (\n * <div class={renderProps.isExiting ? 'fade-out' : 'fade-in'}>\n * <h3>{renderProps.toast.content.title}</h3>\n * <p>{renderProps.toast.content.description}</p>\n * </div>\n * )}\n * </Toast>\n * ```\n */\nexport function Toast(props: ToastProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n 'toast',\n 'children',\n 'class',\n 'style',\n ]);\n\n // Get state from context\n const state = useToastContext();\n\n // Create toast accessibility props\n const toastAria = createToast({\n toast: local.toast,\n state,\n });\n\n // Render props values\n const renderValues = createMemo<ToastRenderProps>(() => ({\n isEntering: local.toast.animation === 'entering',\n isExiting: local.toast.animation === 'exiting',\n animation: local.toast.animation,\n toast: local.toast,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Toast',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Merge styles\n const mergedStyle = () => {\n const custom = renderProps.style();\n if (!custom) return { 'pointer-events': 'auto' as const };\n return { 'pointer-events': 'auto' as const, ...custom } as JSX.CSSProperties;\n };\n\n // Extract ref from toastProps to avoid type conflicts\n const { ref: _ref, ...cleanToastProps } = toastAria.toastProps as Record<string, unknown>;\n\n return (\n <div\n {...domProps()}\n {...cleanToastProps}\n class={renderProps.class()}\n style={mergedStyle()}\n data-animation={local.toast.animation}\n data-type={local.toast.content.type}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n// ============================================\n// TOAST SUB-COMPONENTS\n// ============================================\n\nexport interface ToastTitleProps {\n children: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}\n\n/**\n * ToastTitle renders the toast title with proper accessibility attributes.\n */\nexport function ToastTitle(props: ToastTitleProps): JSX.Element {\n return (\n <div class={props.class} style={props.style}>\n {props.children}\n </div>\n );\n}\n\nexport interface ToastDescriptionProps {\n children: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}\n\n/**\n * ToastDescription renders the toast description with proper accessibility attributes.\n */\nexport function ToastDescription(props: ToastDescriptionProps): JSX.Element {\n return (\n <div class={props.class} style={props.style}>\n {props.children}\n </div>\n );\n}\n\nexport interface ToastCloseButtonProps {\n /** The toast to close. */\n toast: QueuedToast<ToastContent>;\n children?: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n 'aria-label'?: string;\n}\n\n/**\n * ToastCloseButton is a button that closes the toast.\n */\nexport function ToastCloseButton(props: ToastCloseButtonProps): JSX.Element {\n const state = useToastContext();\n\n const handleClose = () => {\n state.close(props.toast.key);\n };\n\n return (\n <button\n type=\"button\"\n class={props.class}\n style={props.style}\n aria-label={props['aria-label'] ?? 'Close'}\n onClick={handleClose}\n >\n {props.children ?? '×'}\n </button>\n );\n}\n\n// ============================================\n// DEFAULT TOAST RENDERING\n// ============================================\n\nexport interface DefaultToastProps {\n toast: QueuedToast<ToastContent>;\n}\n\n/**\n * DefaultToast provides a basic toast layout with title, description, and close button.\n * Use this as a starting point or as-is for simple toast needs.\n */\nexport function DefaultToast(props: DefaultToastProps): JSX.Element {\n const content = () => props.toast.content;\n\n return (\n <Toast toast={props.toast}>\n <div style={{ display: 'flex', 'align-items': 'flex-start', gap: '12px' }}>\n <div style={{ flex: 1 }}>\n <Show when={content().title}>\n <ToastTitle style={{ 'font-weight': 'bold', 'margin-bottom': '4px' }}>\n {content().title}\n </ToastTitle>\n </Show>\n <Show when={content().description}>\n <ToastDescription>{content().description}</ToastDescription>\n </Show>\n <Show when={content().action}>\n <button\n type=\"button\"\n style={{ 'margin-top': '8px' }}\n onClick={content().action?.onAction}\n >\n {content().action?.label}\n </button>\n </Show>\n </div>\n <ToastCloseButton toast={props.toast} />\n </div>\n </Toast>\n );\n}\n", "/**\n * Disclosure and Accordion components for solidaria-components\n *\n * Disclosure is a widget that can be toggled to show or hide content.\n * Accordion (DisclosureGroup) manages multiple disclosures with optional single-expand.\n *\n * Port of react-aria-components Disclosure.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n} from 'solid-js';\nimport {\n createDisclosureState,\n createDisclosureGroupState,\n type DisclosureState,\n type DisclosureGroupState,\n type DisclosureStateProps,\n type DisclosureGroupStateProps,\n} from '@proyecto-viviana/solid-stately';\nimport {\n createDisclosure,\n createDisclosureGroup,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface DisclosureRenderProps {\n /** Whether the disclosure is expanded. */\n isExpanded: boolean;\n /** Whether the disclosure is disabled. */\n isDisabled: boolean;\n}\n\nexport interface DisclosureGroupRenderProps {\n /** Whether all items are disabled. */\n isDisabled: boolean;\n}\n\nexport interface DisclosureProps extends DisclosureStateProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DisclosureRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DisclosureRenderProps>;\n /** Whether the disclosure is disabled. */\n isDisabled?: boolean;\n /** A unique identifier for the disclosure (used in groups). */\n id?: string;\n}\n\nexport interface DisclosureGroupProps extends DisclosureGroupStateProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DisclosureGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DisclosureGroupRenderProps>;\n}\n\nexport interface DisclosureTriggerProps {\n /** The children of the trigger. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\nexport interface DisclosurePanelProps {\n /** The children of the panel. */\n children?: RenderChildren<DisclosureRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DisclosureRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DisclosureRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface DisclosureContextValue {\n state: DisclosureState;\n isDisabled: () => boolean;\n /** The disclosure ARIA result object - access .buttonProps and .panelProps as getters */\n disclosureAria: {\n readonly buttonProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;\n readonly panelProps: JSX.HTMLAttributes<HTMLElement>;\n };\n}\n\nexport const DisclosureContext = createContext<DisclosureContextValue | null>(null);\n\nexport function useDisclosureContext(): DisclosureContextValue | null {\n return useContext(DisclosureContext);\n}\n\ninterface DisclosureGroupContextValue {\n state: DisclosureGroupState;\n}\n\nexport const DisclosureGroupContext = createContext<DisclosureGroupContextValue | null>(null);\n\nexport function useDisclosureGroupContext(): DisclosureGroupContextValue | null {\n return useContext(DisclosureGroupContext);\n}\n\n// ============================================\n// DISCLOSURE GROUP (Accordion)\n// ============================================\n\n/**\n * DisclosureGroup manages a group of Disclosure components.\n * Use this to create an accordion where only one item can be expanded at a time.\n *\n * @example\n * ```tsx\n * <DisclosureGroup>\n * <Disclosure id=\"item1\">\n * <DisclosureTrigger>Item 1</DisclosureTrigger>\n * <DisclosurePanel>Content 1</DisclosurePanel>\n * </Disclosure>\n * <Disclosure id=\"item2\">\n * <DisclosureTrigger>Item 2</DisclosureTrigger>\n * <DisclosurePanel>Content 2</DisclosurePanel>\n * </Disclosure>\n * </DisclosureGroup>\n * ```\n */\nexport function DisclosureGroup(props: DisclosureGroupProps): JSX.Element {\n // IMPORTANT: Don't destructure or access props.children early!\n // In SolidJS, children are lazily evaluated. Accessing them before\n // the context provider renders causes them to evaluate outside the context.\n // See: https://github.com/solidjs/solid/issues/182\n const [local, rest] = splitProps(props, [\n 'class',\n 'style',\n 'allowsMultipleExpanded',\n 'isDisabled',\n 'expandedKeys',\n 'defaultExpandedKeys',\n 'onExpandedChange',\n ]);\n\n // Create group state\n const state = createDisclosureGroupState({\n allowsMultipleExpanded: local.allowsMultipleExpanded,\n isDisabled: local.isDisabled,\n expandedKeys: local.expandedKeys,\n defaultExpandedKeys: local.defaultExpandedKeys,\n onExpandedChange: local.onExpandedChange,\n });\n\n // Create group accessibility props\n const { groupProps } = createDisclosureGroup(\n { isDisabled: local.isDisabled },\n state\n );\n\n // Render props values\n const renderValues = createMemo<DisclosureGroupRenderProps>(() => ({\n isDisabled: state.isDisabled,\n }));\n\n // Resolve render props - don't pass children, we'll render props.children directly\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-DisclosureGroup',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Context value\n const contextValue: DisclosureGroupContextValue = { state };\n\n // Extract ref from groupProps to avoid type conflicts\n const { ref: _ref, ...cleanGroupProps } = groupProps as Record<string, unknown>;\n\n return (\n <DisclosureGroupContext.Provider value={contextValue}>\n <div\n {...domProps()}\n {...cleanGroupProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled)}\n >\n {props.children}\n </div>\n </DisclosureGroupContext.Provider>\n );\n}\n\n// ============================================\n// DISCLOSURE\n// ============================================\n\n/**\n * Disclosure is a widget that can be toggled to show or hide content.\n *\n * @example\n * ```tsx\n * <Disclosure>\n * <DisclosureTrigger>Show more</DisclosureTrigger>\n * <DisclosurePanel>Hidden content here...</DisclosurePanel>\n * </Disclosure>\n * ```\n */\nexport function Disclosure(props: DisclosureProps): JSX.Element {\n // IMPORTANT: Don't destructure or access props.children early!\n // In SolidJS, children are lazily evaluated. Accessing them before\n // the context provider renders causes them to evaluate outside the context.\n // See: https://github.com/solidjs/solid/issues/182\n const [local, rest] = splitProps(props, [\n 'class',\n 'style',\n 'isDisabled',\n 'isExpanded',\n 'defaultExpanded',\n 'onExpandedChange',\n 'id',\n ]);\n\n // Check if we're inside a DisclosureGroup\n const groupContext = useDisclosureGroupContext();\n\n // Create disclosure state\n // If in a group, sync with group state\n const state = createDisclosureState(() => {\n const id = local.id;\n if (groupContext && id) {\n return {\n isExpanded: groupContext.state.isExpanded(id),\n onExpandedChange: (expanded: boolean) => {\n if (expanded !== groupContext.state.isExpanded(id)) {\n groupContext.state.toggleKey(id);\n }\n local.onExpandedChange?.(expanded);\n },\n };\n }\n return {\n isExpanded: local.isExpanded,\n defaultExpanded: local.defaultExpanded,\n onExpandedChange: local.onExpandedChange,\n };\n });\n\n // Panel ref as a signal so the createEffect in createDisclosure can track it\n const [panelRef, setPanelRefSignal] = createSignal<HTMLElement | null>(null);\n\n // Determine if disabled (used in multiple places)\n const isDisabled = () => local.isDisabled || groupContext?.state.isDisabled || false;\n\n // Create disclosure accessibility props\n // Pass props as accessor function for reactivity\n // IMPORTANT: Don't destructure! The getters must be called fresh each render\n const disclosureAria = createDisclosure(\n () => ({ isDisabled: isDisabled() }),\n state,\n panelRef // Pass the accessor directly\n );\n\n // Render props values\n const renderValues = createMemo<DisclosureRenderProps>(() => ({\n isExpanded: state.isExpanded(),\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props - don't pass children, we'll render props.children directly\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Disclosure',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Context value - pass the disclosureAria object with getters intact\n const contextValue: DisclosureContextValue = {\n state,\n isDisabled, // Pass the accessor function, not the value\n disclosureAria,\n };\n\n // Setter for panel ref\n const setPanelRef = (el: HTMLElement | null) => {\n setPanelRefSignal(el);\n };\n\n return (\n <DisclosureContext.Provider value={contextValue}>\n <DisclosurePanelRefContext.Provider value={setPanelRef}>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-expanded={dataAttr(state.isExpanded())}\n data-disabled={dataAttr(isDisabled())}\n >\n {props.children}\n </div>\n </DisclosurePanelRefContext.Provider>\n </DisclosureContext.Provider>\n );\n}\n\n// Internal context to pass panel ref setter\nconst DisclosurePanelRefContext = createContext<((el: HTMLElement | null) => void) | null>(null);\n\n// ============================================\n// DISCLOSURE TRIGGER\n// ============================================\n\n/**\n * DisclosureTrigger is the button that toggles the disclosure.\n * Pattern matches SelectTrigger for consistency.\n */\nexport function DisclosureTrigger(props: DisclosureTriggerProps): JSX.Element {\n // Get context - now safe because parent uses lazy children evaluation\n const context = useContext(DisclosureContext);\n if (!context) {\n throw new Error('DisclosureTrigger must be used within a Disclosure');\n }\n\n const { state, disclosureAria, isDisabled } = context;\n\n // Reactive accessors\n const isExpanded = () => state.isExpanded();\n\n // Get buttonProps from the getter each time - this ensures reactivity\n // IMPORTANT: Call the getter fresh each render to get updated aria-expanded, etc.\n const getButtonProps = () => {\n const { ref: _ref, ...rest } = disclosureAria.buttonProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n {...getButtonProps()}\n type=\"button\"\n class={props.class}\n style={props.style}\n data-expanded={dataAttr(isExpanded())}\n data-disabled={dataAttr(isDisabled())}\n >\n {props.children}\n </button>\n );\n}\n\n// ============================================\n// DISCLOSURE PANEL\n// ============================================\n\n/**\n * DisclosurePanel contains the content that is shown/hidden.\n */\nexport function DisclosurePanel(props: DisclosurePanelProps): JSX.Element {\n // Get context - now safe because parent uses lazy children evaluation\n const context = useContext(DisclosureContext);\n const panelRefSetter = useContext(DisclosurePanelRefContext);\n\n const [local, rest] = splitProps(props, ['class', 'style']);\n\n // Reactive accessors\n const isExpanded = () => context?.state.isExpanded() ?? false;\n const isDisabled = () => context?.isDisabled() ?? false;\n\n // Render props values\n const renderValues = createMemo<DisclosureRenderProps>(() => ({\n isExpanded: isExpanded(),\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-DisclosurePanel',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Get panelProps from the getter each time - this ensures reactivity\n // IMPORTANT: Call the getter fresh each render to get updated hidden attribute, etc.\n const getPanelProps = () => {\n if (!context) return { id: undefined, role: 'region', 'aria-labelledby': undefined, hidden: true };\n const { ref: _ref, ...rest } = context.disclosureAria.panelProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <div\n {...domProps()}\n {...getPanelProps()}\n ref={(el) => panelRefSetter?.(el)}\n class={renderProps.class()}\n style={renderProps.style()}\n data-expanded={dataAttr(isExpanded())}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n// Re-export state types for convenience\nexport type { DisclosureState, DisclosureGroupState };\n", "/**\n * Meter component for solidaria-components\n *\n * Pre-wired headless meter component that combines aria hooks.\n * Port of react-aria-components/src/Meter.tsx\n *\n * Meters represent a quantity within a known range, or a fractional value.\n * Unlike progress bars, meters represent a current value rather than progress toward a goal.\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport {\n createMeter,\n type AriaMeterProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface MeterRenderProps {\n /** The value as a percentage between the minimum and maximum (0-100). */\n percentage: number;\n /** A formatted version of the value. */\n valueText: string | undefined;\n}\n\nexport interface MeterProps\n extends AriaMeterProps,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<MeterRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<MeterRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<MeterRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const MeterContext = createContext<MeterProps | null>(null);\n\n// ============================================\n// UTILITIES\n// ============================================\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\n// ============================================\n// METER COMPONENT\n// ============================================\n\n/**\n * A meter represents a quantity within a known range, or a fractional value.\n * Unlike progress bars, meters represent a current value rather than progress toward a goal.\n *\n * @example\n * ```tsx\n * <Meter value={75}>\n * {({ percentage, valueText }) => (\n * <>\n * <Label>Storage space</Label>\n * <span>{valueText}</span>\n * <div class=\"bar\" style={{ width: `${percentage}%` }} />\n * </>\n * )}\n * </Meter>\n * ```\n */\nexport function Meter(props: ParentProps<MeterProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Get values for calculations\n const value = () => ariaProps.value ?? 0;\n const minValue = () => ariaProps.minValue ?? 0;\n const maxValue = () => ariaProps.maxValue ?? 100;\n\n // Create meter aria props\n const meterAria = createMeter({\n get value() { return ariaProps.value; },\n get minValue() { return ariaProps.minValue; },\n get maxValue() { return ariaProps.maxValue; },\n get valueLabel() { return ariaProps.valueLabel; },\n get formatOptions() { return ariaProps.formatOptions; },\n get label() { return ariaProps.label; },\n get 'aria-label'() { return ariaProps['aria-label']; },\n get 'aria-labelledby'() { return ariaProps['aria-labelledby']; },\n get 'aria-describedby'() { return ariaProps['aria-describedby']; },\n get 'aria-details'() { return ariaProps['aria-details']; },\n });\n\n // Calculate percentage\n const percentage = createMemo(() => {\n const clampedValue = clamp(value(), minValue(), maxValue());\n return ((clampedValue - minValue()) / (maxValue() - minValue())) * 100;\n });\n\n // Get value text from aria props\n const valueText = createMemo(() => {\n return meterAria.meterProps['aria-valuetext'] as string | undefined;\n });\n\n // Render props values\n const renderValues = createMemo<MeterRenderProps>(() => ({\n percentage: percentage(),\n valueText: valueText(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Meter',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <div\n {...domProps()}\n {...meterAria.meterProps}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n", "/**\n * TagGroup component for solidaria-components\n *\n * Pre-wired headless tag group component that combines aria hooks.\n * Port of react-aria-components/src/TagGroup.tsx\n *\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items,\n * with support for keyboard navigation, selection, and removal.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createTagGroup,\n createTag,\n type AriaTagGroupProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createListState,\n type ListState,\n type Key,\n type SelectionMode,\n type SelectionBehavior,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TagGroupRenderProps {\n /** Whether the tag group is disabled. */\n isDisabled: boolean;\n /** Whether the tag list is empty. */\n isEmpty: boolean;\n}\n\nexport interface TagGroupProps\n extends Omit<AriaTagGroupProps, 'id'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagGroupRenderProps>;\n}\n\nexport interface TagListRenderProps {\n /** Whether the tag list is empty. */\n isEmpty: boolean;\n /** Whether the tag list is focused. */\n isFocused: boolean;\n}\n\nexport interface TagListProps<T> extends SlotProps {\n /** The items to display in the tag list. */\n items: T[];\n /** Function to render each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagListRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagListRenderProps>;\n /** Content to render when the list is empty. */\n renderEmptyState?: () => JSX.Element;\n /** The selection mode for the tag list. */\n selectionMode?: SelectionMode;\n /** How selection behaves in the collection. */\n selectionBehavior?: SelectionBehavior;\n /** The currently selected keys (controlled). */\n selectedKeys?: Iterable<Key>;\n /** The default selected keys (uncontrolled). */\n defaultSelectedKeys?: Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: 'all' | Set<Key>) => void;\n /** Keys that are disabled. */\n disabledKeys?: Iterable<Key>;\n /** Function to get a unique key from an item. */\n getKey?: (item: T) => Key;\n /** Accessibility label. */\n label?: string;\n /** Custom aria-label. */\n 'aria-label'?: string;\n /** Reference to external label element. */\n 'aria-labelledby'?: string;\n /** Reference to description element. */\n 'aria-describedby'?: string;\n /** Whether the tag list is disabled. */\n isDisabled?: boolean;\n /** Handler called when tags are removed. */\n onRemove?: (keys: Set<Key>) => void;\n}\n\nexport interface TagRenderProps {\n /** Whether the tag is selected. */\n isSelected: boolean;\n /** Whether the tag is disabled. */\n isDisabled: boolean;\n /** Whether the tag is focused. */\n isFocused: boolean;\n /** Whether the tag is pressed. */\n isPressed: boolean;\n /** Whether the tag allows removal. */\n allowsRemoving: boolean;\n /** The selection mode. */\n selectionMode: SelectionMode;\n}\n\nexport interface TagProps extends SlotProps {\n /** A unique key for this tag. */\n id: Key;\n /** Whether the tag is disabled. */\n isDisabled?: boolean;\n /** A text value for accessibility. */\n textValue?: string;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<TagRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface TagGroupContextValue {\n state: ListState;\n onRemove?: (keys: Set<Key>) => void;\n}\n\nexport const TagGroupContext = createContext<TagGroupContextValue | null>(null);\nexport const TagListStateContext = createContext<ListState | null>(null);\n\nexport function useTagGroupContext(): TagGroupContextValue | null {\n return useContext(TagGroupContext);\n}\n\n// ============================================\n// TAG GROUP COMPONENT\n// ============================================\n\n/**\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items,\n * with support for keyboard navigation, selection, and removal.\n *\n * @example\n * ```tsx\n * <TagGroup label=\"Categories\" onRemove={(keys) => removeItems(keys)}>\n * <TagList items={items}>\n * {(item) => <Tag id={item.id}>{item.name}</Tag>}\n * </TagList>\n * </TagGroup>\n * ```\n */\nexport function TagGroup(props: TagGroupProps): JSX.Element {\n const [local] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // We need TagList to provide the state, so TagGroup just provides context\n return (\n <div\n class={typeof local.class === 'string' ? local.class : 'solidaria-TagGroup'}\n style={typeof local.style === 'object' ? local.style : undefined}\n slot={local.slot}\n >\n {props.children}\n </div>\n );\n}\n\n// ============================================\n// TAG LIST COMPONENT\n// ============================================\n\n/**\n * TagList contains the list of tags within a TagGroup.\n */\nexport function TagList<T extends { id?: Key; key?: Key }>(props: TagListProps<T>): JSX.Element {\n const [local] = splitProps(props, [\n 'items',\n 'class',\n 'style',\n 'slot',\n 'renderEmptyState',\n 'selectionMode',\n 'selectionBehavior',\n 'selectedKeys',\n 'defaultSelectedKeys',\n 'onSelectionChange',\n 'disabledKeys',\n 'getKey',\n 'label',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'isDisabled',\n 'onRemove',\n ]);\n\n // Create a ref for the grid\n const [gridRef, setGridRef] = createSignal<HTMLDivElement | null>(null);\n\n // Default getKey function\n const getKey = (item: T): Key => {\n if (local.getKey) return local.getKey(item);\n if (item.id !== undefined) return item.id;\n if (item.key !== undefined) return item.key;\n return String(item);\n };\n\n // Create list state\n const state = createListState({\n get items() { return local.items; },\n getKey,\n get selectionMode() { return local.selectionMode ?? 'none'; },\n get selectionBehavior() { return local.selectionBehavior ?? 'toggle'; },\n get selectedKeys() { return local.selectedKeys; },\n get defaultSelectedKeys() { return local.defaultSelectedKeys; },\n get onSelectionChange() { return local.onSelectionChange; },\n get disabledKeys() { return local.disabledKeys; },\n });\n\n // Create tag group accessibility props\n const tagGroupAria = createTagGroup(\n {\n get label() { return local.label; },\n get 'aria-label'() { return local['aria-label']; },\n get 'aria-labelledby'() { return local['aria-labelledby']; },\n get 'aria-describedby'() { return local['aria-describedby']; },\n get isDisabled() { return local.isDisabled; },\n get onRemove() { return local.onRemove; },\n },\n state,\n gridRef\n );\n\n // Track focus\n const [isFocused, setIsFocused] = createSignal(false);\n\n // Render props values\n const renderValues = createMemo<TagListRenderProps>(() => ({\n isEmpty: local.items.length === 0,\n isFocused: isFocused(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-TagList',\n },\n renderValues\n );\n\n // Context value\n const contextValue: TagGroupContextValue = {\n state,\n get onRemove() { return local.onRemove; },\n };\n\n return (\n <TagGroupContext.Provider value={contextValue}>\n <TagListStateContext.Provider value={state}>\n <div\n ref={setGridRef}\n {...tagGroupAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n data-empty={dataAttr(local.items.length === 0)}\n data-focused={dataAttr(isFocused())}\n >\n <Show\n when={local.items.length > 0}\n fallback={local.renderEmptyState?.()}\n >\n <For each={local.items}>\n {(item) => props.children(item)}\n </For>\n </Show>\n </div>\n </TagListStateContext.Provider>\n </TagGroupContext.Provider>\n );\n}\n\n// ============================================\n// TAG COMPONENT\n// ============================================\n\n/**\n * A Tag is an individual item within a TagList.\n */\nexport function Tag(props: TagProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n 'id',\n 'class',\n 'style',\n 'slot',\n 'isDisabled',\n 'textValue',\n ]);\n\n const state = useContext(TagListStateContext);\n\n // Create a ref for the tag\n const [tagRef, setTagRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create tag accessibility props\n const tagAria = createTag(\n {\n get key() { return local.id; },\n get isDisabled() { return local.isDisabled; },\n get textValue() { return local.textValue; },\n },\n state!,\n tagRef\n );\n\n // Render props values\n const renderValues = createMemo<TagRenderProps>(() => ({\n isSelected: tagAria.isSelected,\n isDisabled: tagAria.isDisabled,\n isFocused: tagAria.isFocused,\n isPressed: tagAria.isPressed,\n allowsRemoving: tagAria.allowsRemoving,\n selectionMode: state?.selectionMode() ?? 'none',\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Tag',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest, { global: true }));\n\n return (\n <div\n ref={setTagRef}\n {...domProps()}\n {...tagAria.rowProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(tagAria.isSelected)}\n data-disabled={dataAttr(tagAria.isDisabled)}\n data-focused={dataAttr(tagAria.isFocused)}\n data-pressed={dataAttr(tagAria.isPressed)}\n data-allows-removing={dataAttr(tagAria.allowsRemoving)}\n >\n <div {...tagAria.gridCellProps} style={{ display: 'contents' }}>\n {renderProps.renderChildren()}\n </div>\n </div>\n );\n}\n\n// ============================================\n// TAG REMOVE BUTTON COMPONENT\n// ============================================\n\nexport interface TagRemoveButtonProps {\n /** The children of the button (usually an X icon). */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n/**\n * TagRemoveButton is the button used to remove a tag.\n * It should be placed inside a Tag component.\n */\nexport function TagRemoveButton(props: TagRemoveButtonProps): JSX.Element {\n // This is a simplified version - in a full implementation,\n // we'd get the remove button props from the Tag context\n return (\n <button\n type=\"button\"\n class={props.class ?? 'solidaria-TagRemoveButton'}\n style={props.style}\n aria-label=\"Remove\"\n >\n {props.children ?? '×'}\n </button>\n );\n}\n\n// Re-export types\nexport type { Key, SelectionMode, SelectionBehavior };\n", "/**\n * Calendar component for solidaria-components\n *\n * Pre-wired headless calendar component that combines aria hooks.\n * Port of react-aria-components/src/Calendar.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Index,\n Show,\n} from 'solid-js';\n\nimport {\n createCalendar,\n createCalendarGrid,\n createCalendarCell,\n type AriaCalendarProps,\n type AriaCalendarGridProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createCalendarState,\n type CalendarState,\n type CalendarStateProps,\n type CalendarDate,\n type DateValue,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface CalendarRenderProps {\n /** Whether the calendar is disabled. */\n isDisabled: boolean;\n /** Whether the calendar is read-only. */\n isReadOnly: boolean;\n}\n\nexport interface CalendarProps<T extends DateValue = DateValue>\n extends Omit<AriaCalendarProps, 'id' | 'isDisabled' | 'isReadOnly'>,\n Omit<CalendarStateProps<T>, 'locale'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface CalendarGridRenderProps {\n /** Whether the grid is disabled. */\n isDisabled: boolean;\n}\n\nexport interface CalendarGridProps extends Omit<AriaCalendarGridProps, 'startDate' | 'endDate'>, SlotProps {\n /** The children of the component (render function receiving weeks). */\n children?: (date: CalendarDate) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarGridRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarGridRenderProps>;\n /** Number of weeks to offset from the start. */\n offset?: { months?: number };\n}\n\nexport interface CalendarCellRenderProps {\n /** Whether the cell is selected. */\n isSelected: boolean;\n /** Whether the cell is focused. */\n isFocused: boolean;\n /** Whether the cell is disabled. */\n isDisabled: boolean;\n /** Whether the cell is unavailable. */\n isUnavailable: boolean;\n /** Whether the cell is outside the visible month. */\n isOutsideMonth: boolean;\n /** Whether the cell represents today. */\n isToday: boolean;\n /** Whether the cell is pressed. */\n isPressed: boolean;\n /** The formatted date string. */\n formattedDate: string;\n}\n\nexport interface CalendarCellProps extends SlotProps {\n /** The date for this cell. */\n date: CalendarDate;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CalendarCellRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarCellRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarCellRenderProps>;\n}\n\nexport interface CalendarHeaderCellProps extends SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const CalendarContext = createContext<CalendarState<DateValue> | null>(null);\n\nexport function useCalendarContext(): CalendarState<DateValue> {\n const context = useContext(CalendarContext);\n if (!context) {\n throw new Error('Calendar components must be used within a Calendar');\n }\n return context;\n}\n\n// ============================================\n// CALENDAR COMPONENT\n// ============================================\n\n/**\n * A calendar displays a grid of days in a month and allows users to select a single date.\n *\n * @example\n * ```tsx\n * <Calendar aria-label=\"Event date\">\n * <header>\n * <CalendarButton slot=\"previous\">◀</CalendarButton>\n * <CalendarHeading />\n * <CalendarButton slot=\"next\">▶</CalendarButton>\n * </header>\n * <CalendarGrid>\n * {(date) => <CalendarCell date={date} />}\n * </CalendarGrid>\n * </Calendar>\n * ```\n */\nexport function Calendar<T extends DateValue = CalendarDate>(\n props: CalendarProps<T>\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={<div class=\"solidaria-Calendar solidaria-Calendar--placeholder\" aria-hidden=\"true\" />}\n >\n <CalendarInner {...props} />\n </Show>\n );\n}\n\n/**\n * Internal Calendar component that renders after client mount.\n */\nfunction CalendarInner<T extends DateValue = CalendarDate>(\n props: CalendarProps<T>\n): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n [\n 'value',\n 'defaultValue',\n 'onChange',\n 'minValue',\n 'maxValue',\n 'isDisabled',\n 'isReadOnly',\n 'autoFocus',\n 'focusedValue',\n 'defaultFocusedValue',\n 'onFocusChange',\n 'locale',\n 'isDateUnavailable',\n 'visibleMonths',\n 'isDateDisabled',\n 'validationState',\n 'errorMessage',\n 'firstDayOfWeek',\n ]\n );\n\n // Create calendar state\n const state = createCalendarState(stateProps);\n\n // Create calendar ARIA props\n const calendarAria = createCalendar(rest, state as unknown as CalendarState<DateValue>);\n\n // Render props values\n const renderValues = createMemo<CalendarRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Calendar',\n },\n renderValues\n );\n\n return (\n <CalendarContext.Provider value={state as unknown as CalendarState<DateValue>}>\n <div\n {...calendarAria.calendarProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n >\n {props.children}\n </div>\n </CalendarContext.Provider>\n );\n}\n\n// ============================================\n// CALENDAR HEADING COMPONENT\n// ============================================\n\nexport interface CalendarHeadingProps extends SlotProps {\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n/**\n * Displays the current month and year in the calendar.\n */\nexport function CalendarHeading(props: CalendarHeadingProps): JSX.Element {\n const state = useCalendarContext();\n\n return (\n <h2\n class={props.class ?? 'solidaria-CalendarHeading'}\n style={props.style}\n aria-live=\"polite\"\n >\n {state.title()}\n </h2>\n );\n}\n\n// ============================================\n// CALENDAR BUTTON COMPONENT\n// ============================================\n\nexport interface CalendarButtonProps extends SlotProps {\n /** The slot for this button (previous or next). */\n slot?: 'previous' | 'next';\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n}\n\n/**\n * A button for navigating the calendar.\n */\nexport function CalendarButton(props: CalendarButtonProps): JSX.Element {\n const state = useCalendarContext();\n const calendarAria = createCalendar({}, state);\n\n const buttonProps = createMemo(() => {\n if (props.slot === 'previous') {\n return calendarAria.prevButtonProps;\n }\n return calendarAria.nextButtonProps;\n });\n\n return (\n <button\n {...buttonProps()}\n class={props.class ?? 'solidaria-CalendarButton'}\n style={props.style}\n disabled={props.isDisabled || state.isDisabled()}\n >\n {props.children}\n </button>\n );\n}\n\n// ============================================\n// CALENDAR GRID COMPONENT\n// ============================================\n\n/**\n * Displays a grid of calendar cells.\n */\nexport function CalendarGrid(props: CalendarGridProps): JSX.Element {\n const state = useCalendarContext();\n const [gridRef, setGridRef] = createSignal<HTMLTableElement | null>(null);\n\n // Create grid ARIA props\n const gridAria = createCalendarGrid(\n {\n weekdayStyle: props.weekdayStyle,\n },\n state,\n gridRef\n );\n\n // Render props values\n const renderValues = createMemo<CalendarGridRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-CalendarGrid',\n },\n renderValues\n );\n\n // Memoize ALL dates for the grid at once to avoid reactive loops.\n // This breaks the cycle where accessing visibleRange() inside For loop\n // would cause infinite re-renders.\n const allDates = createMemo(() => {\n const numWeeks = state.getWeeksInMonth();\n const weekDates: (CalendarDate | null)[][] = [];\n\n for (let weekIndex = 0; weekIndex < numWeeks; weekIndex++) {\n weekDates.push(state.getDatesInWeek(weekIndex));\n }\n\n return weekDates;\n });\n\n return (\n <table\n ref={setGridRef}\n {...gridAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n >\n <thead {...gridAria.headerProps}>\n <tr>\n <For each={gridAria.weekDays}>\n {(day) => (\n <th scope=\"col\" class=\"solidaria-CalendarHeaderCell\">\n {day}\n </th>\n )}\n </For>\n </tr>\n </thead>\n <tbody>\n <Index each={allDates()}>\n {(weekDates) => (\n <tr>\n <Index each={weekDates()}>\n {(date) => (\n <Show when={date()}>\n <td role=\"gridcell\">\n {props.children?.(date()!)}\n </td>\n </Show>\n )}\n </Index>\n </tr>\n )}\n </Index>\n </tbody>\n </table>\n );\n}\n\n// ============================================\n// CALENDAR CELL COMPONENT\n// ============================================\n\n/**\n * A cell in the calendar grid representing a single day.\n */\nexport function CalendarCell(props: CalendarCellProps): JSX.Element {\n const state = useCalendarContext();\n const [cellRef, setCellRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create cell ARIA props\n const cellAria = createCalendarCell(\n { date: props.date },\n state,\n cellRef\n );\n\n // Render props values\n const renderValues = createMemo<CalendarCellRenderProps>(() => ({\n isSelected: cellAria.isSelected,\n isFocused: cellAria.isFocused,\n isDisabled: cellAria.isDisabled,\n isUnavailable: cellAria.isUnavailable,\n isOutsideMonth: cellAria.isOutsideMonth,\n isToday: cellAria.isToday,\n isPressed: cellAria.isPressed,\n formattedDate: cellAria.formattedDate,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-CalendarCell',\n },\n renderValues\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === 'function') {\n return renderProps.renderChildren();\n }\n return cellAria.formattedDate;\n };\n\n return (\n <div\n ref={setCellRef}\n {...cellAria.buttonProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(cellAria.isSelected)}\n data-focused={dataAttr(cellAria.isFocused)}\n data-disabled={dataAttr(cellAria.isDisabled)}\n data-unavailable={dataAttr(cellAria.isUnavailable)}\n data-outside-month={dataAttr(cellAria.isOutsideMonth)}\n data-today={dataAttr(cellAria.isToday)}\n data-pressed={dataAttr(cellAria.isPressed)}\n >\n {getChildren()}\n </div>\n );\n}\n\n// Re-export types\nexport type { CalendarState, CalendarDate, DateValue };\n", "/**\n * RangeCalendar component for solidaria-components\n *\n * Pre-wired headless range calendar component that combines aria hooks.\n * Port of react-aria-components/src/RangeCalendar.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createRangeCalendar,\n createCalendarGrid,\n createRangeCalendarCell,\n type AriaRangeCalendarProps,\n type AriaCalendarGridProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createRangeCalendarState,\n type RangeCalendarState,\n type RangeCalendarStateProps,\n type CalendarDate,\n type DateValue,\n type RangeValue,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface RangeCalendarRenderProps {\n /** Whether the calendar is disabled. */\n isDisabled: boolean;\n /** Whether the calendar is read-only. */\n isReadOnly: boolean;\n /** Whether the user is currently selecting a range. */\n isDragging: boolean;\n}\n\nexport interface RangeCalendarProps<T extends DateValue = DateValue>\n extends Omit<AriaRangeCalendarProps, 'id' | 'isDisabled' | 'isReadOnly'>,\n Omit<RangeCalendarStateProps<T>, 'locale'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<RangeCalendarRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<RangeCalendarRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface RangeCalendarGridRenderProps {\n /** Whether the grid is disabled. */\n isDisabled: boolean;\n}\n\nexport interface RangeCalendarGridProps extends Omit<AriaCalendarGridProps, 'startDate' | 'endDate'>, SlotProps {\n /** The children of the component (render function receiving dates). */\n children?: (date: CalendarDate) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<RangeCalendarGridRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<RangeCalendarGridRenderProps>;\n}\n\nexport interface RangeCalendarCellRenderProps {\n /** Whether the cell is within the selected range. */\n isSelected: boolean;\n /** Whether the cell is the start of the selection. */\n isSelectionStart: boolean;\n /** Whether the cell is the end of the selection. */\n isSelectionEnd: boolean;\n /** Whether the cell is focused. */\n isFocused: boolean;\n /** Whether the cell is disabled. */\n isDisabled: boolean;\n /** Whether the cell is unavailable. */\n isUnavailable: boolean;\n /** Whether the cell is outside the visible month. */\n isOutsideMonth: boolean;\n /** Whether the cell represents today. */\n isToday: boolean;\n /** Whether the cell is pressed. */\n isPressed: boolean;\n /** The formatted date string. */\n formattedDate: string;\n}\n\nexport interface RangeCalendarCellProps extends SlotProps {\n /** The date for this cell. */\n date: CalendarDate;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<RangeCalendarCellRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<RangeCalendarCellRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<RangeCalendarCellRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const RangeCalendarContext = createContext<RangeCalendarState<DateValue> | null>(null);\n\nexport function useRangeCalendarContext(): RangeCalendarState<DateValue> {\n const context = useContext(RangeCalendarContext);\n if (!context) {\n throw new Error('RangeCalendar components must be used within a RangeCalendar');\n }\n return context;\n}\n\n// ============================================\n// RANGE CALENDAR COMPONENT\n// ============================================\n\n/**\n * A range calendar displays a grid of days and allows users to select a contiguous range of dates.\n *\n * @example\n * ```tsx\n * <RangeCalendar aria-label=\"Date range\">\n * <header>\n * <RangeCalendarButton slot=\"previous\">◀</RangeCalendarButton>\n * <RangeCalendarHeading />\n * <RangeCalendarButton slot=\"next\">▶</RangeCalendarButton>\n * </header>\n * <RangeCalendarGrid>\n * {(date) => <RangeCalendarCell date={date} />}\n * </RangeCalendarGrid>\n * </RangeCalendar>\n * ```\n */\nexport function RangeCalendar<T extends DateValue = CalendarDate>(\n props: RangeCalendarProps<T>\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={<div class=\"solidaria-RangeCalendar solidaria-RangeCalendar--placeholder\" aria-hidden=\"true\" />}\n >\n <RangeCalendarInner {...props} />\n </Show>\n );\n}\n\n/**\n * Internal RangeCalendar component that renders after client mount.\n */\nfunction RangeCalendarInner<T extends DateValue = CalendarDate>(\n props: RangeCalendarProps<T>\n): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n [\n 'value',\n 'defaultValue',\n 'onChange',\n 'minValue',\n 'maxValue',\n 'isDisabled',\n 'isReadOnly',\n 'focusedValue',\n 'defaultFocusedValue',\n 'onFocusChange',\n 'locale',\n 'isDateUnavailable',\n 'visibleMonths',\n 'isDateDisabled',\n 'validationState',\n 'allowsNonContiguousRanges',\n 'firstDayOfWeek',\n ]\n );\n\n // Create range calendar state\n const state = createRangeCalendarState(stateProps);\n\n // Create range calendar ARIA props\n const calendarAria = createRangeCalendar(rest, state as unknown as RangeCalendarState<DateValue>);\n\n // Render props values\n const renderValues = createMemo<RangeCalendarRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isDragging: state.isDragging(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-RangeCalendar',\n },\n renderValues\n );\n\n return (\n <RangeCalendarContext.Provider value={state as unknown as RangeCalendarState<DateValue>}>\n <div\n {...calendarAria.calendarProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-dragging={dataAttr(state.isDragging())}\n >\n {props.children}\n </div>\n </RangeCalendarContext.Provider>\n );\n}\n\n// ============================================\n// RANGE CALENDAR HEADING COMPONENT\n// ============================================\n\nexport interface RangeCalendarHeadingProps extends SlotProps {\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n/**\n * Displays the current month and year in the range calendar.\n */\nexport function RangeCalendarHeading(props: RangeCalendarHeadingProps): JSX.Element {\n const state = useRangeCalendarContext();\n\n return (\n <h2\n class={props.class ?? 'solidaria-RangeCalendarHeading'}\n style={props.style}\n aria-live=\"polite\"\n >\n {state.title()}\n </h2>\n );\n}\n\n// ============================================\n// RANGE CALENDAR BUTTON COMPONENT\n// ============================================\n\nexport interface RangeCalendarButtonProps extends SlotProps {\n /** The slot for this button (previous or next). */\n slot?: 'previous' | 'next';\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n}\n\n/**\n * A button for navigating the range calendar.\n */\nexport function RangeCalendarButton(props: RangeCalendarButtonProps): JSX.Element {\n const state = useRangeCalendarContext();\n const calendarAria = createRangeCalendar({}, state);\n\n const buttonProps = createMemo(() => {\n if (props.slot === 'previous') {\n return calendarAria.prevButtonProps;\n }\n return calendarAria.nextButtonProps;\n });\n\n return (\n <button\n {...buttonProps()}\n class={props.class ?? 'solidaria-RangeCalendarButton'}\n style={props.style}\n disabled={props.isDisabled || state.isDisabled()}\n >\n {props.children}\n </button>\n );\n}\n\n// ============================================\n// RANGE CALENDAR GRID COMPONENT\n// ============================================\n\n/**\n * Displays a grid of range calendar cells.\n */\nexport function RangeCalendarGrid(props: RangeCalendarGridProps): JSX.Element {\n const state = useRangeCalendarContext();\n const [gridRef, setGridRef] = createSignal<HTMLTableElement | null>(null);\n\n // Create grid ARIA props\n const gridAria = createCalendarGrid(\n {\n weekdayStyle: props.weekdayStyle,\n },\n state as unknown as Parameters<typeof createCalendarGrid>[1],\n gridRef\n );\n\n // Render props values\n const renderValues = createMemo<RangeCalendarGridRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-RangeCalendarGrid',\n },\n renderValues\n );\n\n // Get weeks to render\n const weeks = createMemo(() => {\n const numWeeks = state.getWeeksInMonth();\n return Array.from({ length: numWeeks }, (_, i) => i);\n });\n\n return (\n <table\n ref={setGridRef}\n {...gridAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n >\n <thead {...gridAria.headerProps}>\n <tr>\n <For each={gridAria.weekDays}>\n {(day) => (\n <th scope=\"col\" class=\"solidaria-RangeCalendarHeaderCell\">\n {day}\n </th>\n )}\n </For>\n </tr>\n </thead>\n <tbody>\n <For each={weeks()}>\n {(weekIndex) => (\n <tr>\n <For each={state.getDatesInWeek(weekIndex)}>\n {(date) => (\n <Show when={date}>\n <td>\n {props.children?.(date!)}\n </td>\n </Show>\n )}\n </For>\n </tr>\n )}\n </For>\n </tbody>\n </table>\n );\n}\n\n// ============================================\n// RANGE CALENDAR CELL COMPONENT\n// ============================================\n\n/**\n * A cell in the range calendar grid representing a single day.\n */\nexport function RangeCalendarCell(props: RangeCalendarCellProps): JSX.Element {\n const state = useRangeCalendarContext();\n const [cellRef, setCellRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create cell ARIA props\n const cellAria = createRangeCalendarCell(\n { date: props.date },\n state,\n cellRef\n );\n\n // Render props values\n const renderValues = createMemo<RangeCalendarCellRenderProps>(() => ({\n isSelected: cellAria.isSelected,\n isSelectionStart: cellAria.isSelectionStart,\n isSelectionEnd: cellAria.isSelectionEnd,\n isFocused: cellAria.isFocused,\n isDisabled: cellAria.isDisabled,\n isUnavailable: cellAria.isUnavailable,\n isOutsideMonth: cellAria.isOutsideMonth,\n isToday: cellAria.isToday,\n isPressed: cellAria.isPressed,\n formattedDate: cellAria.formattedDate,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-RangeCalendarCell',\n },\n renderValues\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === 'function') {\n return renderProps.renderChildren();\n }\n return cellAria.formattedDate;\n };\n\n return (\n <div\n ref={setCellRef}\n {...cellAria.buttonProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(cellAria.isSelected)}\n data-selection-start={dataAttr(cellAria.isSelectionStart)}\n data-selection-end={dataAttr(cellAria.isSelectionEnd)}\n data-focused={dataAttr(cellAria.isFocused)}\n data-disabled={dataAttr(cellAria.isDisabled)}\n data-unavailable={dataAttr(cellAria.isUnavailable)}\n data-outside-month={dataAttr(cellAria.isOutsideMonth)}\n data-today={dataAttr(cellAria.isToday)}\n data-pressed={dataAttr(cellAria.isPressed)}\n >\n {getChildren()}\n </div>\n );\n}\n\n// Re-export types\nexport type { RangeCalendarState, RangeValue };\n", "/**\n * DateField component for solidaria-components\n *\n * Pre-wired headless date field component with segment-based editing.\n * Port of react-aria-components/src/DateField.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createDateField,\n createDateSegment,\n type AriaDateFieldProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createDateFieldState,\n type DateFieldState,\n type DateFieldStateProps,\n type DateSegment as DateSegmentType,\n type CalendarDate,\n type DateValue,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface DateFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the field is required. */\n isRequired: boolean;\n /** Whether the field is invalid. */\n isInvalid: boolean;\n}\n\nexport interface DateFieldProps<T extends DateValue = DateValue>\n extends Omit<AriaDateFieldProps, 'id' | 'isDisabled' | 'isReadOnly' | 'isRequired'>,\n Omit<DateFieldStateProps<T>, 'locale'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element | ((segment: DateSegmentType) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateFieldRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface DateInputRenderProps {\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n}\n\nexport interface DateInputProps extends SlotProps {\n /** The children of the component (render function receiving segments). */\n children?: (segment: DateSegmentType) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateInputRenderProps>;\n}\n\nexport interface DateSegmentRenderProps {\n /** Whether the segment is focused. */\n isFocused: boolean;\n /** Whether the segment is editable. */\n isEditable: boolean;\n /** Whether the segment is a placeholder. */\n isPlaceholder: boolean;\n /** The segment type. */\n type: DateSegmentType['type'];\n /** The text to display. */\n text: string;\n}\n\nexport interface DateSegmentProps extends SlotProps {\n /** The segment data. */\n segment: DateSegmentType;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<DateSegmentRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateSegmentRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateSegmentRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const DateFieldContext = createContext<DateFieldState<DateValue> | null>(null);\n\nexport function useDateFieldContext(): DateFieldState<DateValue> {\n const context = useContext(DateFieldContext);\n if (!context) {\n throw new Error('DateField components must be used within a DateField');\n }\n return context;\n}\n\n// ============================================\n// DATE FIELD COMPONENT\n// ============================================\n\n/**\n * A date field allows users to enter and edit date values using a keyboard.\n *\n * @example\n * ```tsx\n * <DateField label=\"Date\">\n * <Label>Date</Label>\n * <DateInput>\n * {(segment) => <DateSegment segment={segment} />}\n * </DateInput>\n * </DateField>\n * ```\n */\nexport function DateField<T extends DateValue = CalendarDate>(\n props: DateFieldProps<T>\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={<div class=\"solidaria-DateField solidaria-DateField--placeholder\" aria-hidden=\"true\" />}\n >\n <DateFieldInner {...props} />\n </Show>\n );\n}\n\n/**\n * Internal DateField component that renders after client mount.\n */\nfunction DateFieldInner<T extends DateValue = CalendarDate>(\n props: DateFieldProps<T>\n): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n [\n 'value',\n 'defaultValue',\n 'onChange',\n 'minValue',\n 'maxValue',\n 'isDisabled',\n 'isReadOnly',\n 'isRequired',\n 'locale',\n 'granularity',\n 'hourCycle',\n 'hideTimeZone',\n 'placeholderValue',\n 'validationState',\n 'description',\n 'errorMessage',\n ]\n );\n\n const [fieldRef, setFieldRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create date field state\n const state = createDateFieldState(stateProps);\n\n // Create date field ARIA props\n const fieldAria = createDateField(rest, state as unknown as DateFieldState<DateValue>, fieldRef);\n\n // Render props values\n const renderValues = createMemo<DateFieldRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isRequired: state.isRequired(),\n isInvalid: state.isInvalid(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-DateField',\n },\n renderValues\n );\n\n return (\n <DateFieldContext.Provider value={state as unknown as DateFieldState<DateValue>}>\n <div\n ref={setFieldRef}\n {...fieldAria.fieldProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-required={dataAttr(state.isRequired())}\n data-invalid={dataAttr(state.isInvalid())}\n >\n {props.children as JSX.Element}\n </div>\n </DateFieldContext.Provider>\n );\n}\n\n// ============================================\n// DATE INPUT COMPONENT\n// ============================================\n\n/**\n * The input area containing date segments.\n */\nexport function DateInput(props: DateInputProps): JSX.Element {\n const state = useDateFieldContext();\n const [isFocused, setIsFocused] = createSignal(false);\n\n // Render props values\n const renderValues = createMemo<DateInputRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isFocused: isFocused(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-DateInput',\n },\n renderValues\n );\n\n return (\n <div\n role=\"presentation\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-focused={dataAttr(isFocused())}\n onFocusIn={() => setIsFocused(true)}\n onFocusOut={() => setIsFocused(false)}\n >\n <For each={state.segments()}>\n {(segment) => props.children?.(segment)}\n </For>\n </div>\n );\n}\n\n// ============================================\n// DATE SEGMENT COMPONENT\n// ============================================\n\n/**\n * A segment of a date field (year, month, day, etc.).\n */\nexport function DateSegment(props: DateSegmentProps): JSX.Element {\n const state = useDateFieldContext();\n const [segmentRef, setSegmentRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create segment ARIA props\n const segmentAria = createDateSegment(\n { segment: props.segment },\n state,\n segmentRef\n );\n\n // Render props values\n const renderValues = createMemo<DateSegmentRenderProps>(() => ({\n isFocused: segmentAria.isFocused,\n isEditable: segmentAria.isEditable,\n isPlaceholder: segmentAria.isPlaceholder,\n type: props.segment.type,\n text: segmentAria.text,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-DateSegment',\n },\n renderValues\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === 'function') {\n return renderProps.renderChildren();\n }\n return segmentAria.text;\n };\n\n return (\n <div\n ref={setSegmentRef}\n {...segmentAria.segmentProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={dataAttr(segmentAria.isFocused)}\n data-editable={dataAttr(segmentAria.isEditable)}\n data-placeholder={dataAttr(segmentAria.isPlaceholder)}\n data-type={props.segment.type}\n >\n {getChildren()}\n </div>\n );\n}\n\n// Re-export types\nexport type { DateFieldState, DateSegmentType };\n", "/**\n * TimeField component for solidaria-components\n *\n * Pre-wired headless time field component with segment-based editing.\n * Port of react-aria-components/src/TimeField.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createTimeField,\n type AriaTimeFieldProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createTimeFieldState,\n type TimeFieldState,\n type TimeFieldStateProps,\n type TimeSegment as TimeSegmentType,\n type TimeValue,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TimeFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the field is required. */\n isRequired: boolean;\n /** Whether the field is invalid. */\n isInvalid: boolean;\n}\n\nexport interface TimeFieldProps<T extends TimeValue = TimeValue>\n extends Omit<AriaTimeFieldProps, 'id' | 'isDisabled' | 'isReadOnly' | 'isRequired'>,\n Omit<TimeFieldStateProps<T>, 'locale'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element | ((segment: TimeSegmentType) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TimeFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TimeFieldRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface TimeInputRenderProps {\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n}\n\nexport interface TimeInputProps extends SlotProps {\n /** The children of the component (render function receiving segments). */\n children?: (segment: TimeSegmentType) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TimeInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TimeInputRenderProps>;\n}\n\nexport interface TimeSegmentRenderProps {\n /** Whether the segment is focused. */\n isFocused: boolean;\n /** Whether the segment is editable. */\n isEditable: boolean;\n /** Whether the segment is a placeholder. */\n isPlaceholder: boolean;\n /** The segment type. */\n type: TimeSegmentType['type'];\n /** The text to display. */\n text: string;\n}\n\nexport interface TimeSegmentProps extends SlotProps {\n /** The segment data. */\n segment: TimeSegmentType;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<TimeSegmentRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TimeSegmentRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TimeSegmentRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const TimeFieldContext = createContext<TimeFieldState<TimeValue> | null>(null);\n\nexport function useTimeFieldContext(): TimeFieldState<TimeValue> {\n const context = useContext(TimeFieldContext);\n if (!context) {\n throw new Error('TimeField components must be used within a TimeField');\n }\n return context;\n}\n\n// ============================================\n// TIME FIELD COMPONENT\n// ============================================\n\n/**\n * A time field allows users to enter and edit time values using a keyboard.\n *\n * @example\n * ```tsx\n * <TimeField label=\"Time\">\n * <Label>Time</Label>\n * <TimeInput>\n * {(segment) => <TimeSegment segment={segment} />}\n * </TimeInput>\n * </TimeField>\n * ```\n */\nexport function TimeField<T extends TimeValue = TimeValue>(\n props: TimeFieldProps<T>\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={<div class=\"solidaria-TimeField solidaria-TimeField--placeholder\" aria-hidden=\"true\" />}\n >\n <TimeFieldInner {...props} />\n </Show>\n );\n}\n\n/**\n * Internal TimeField component that renders after client mount.\n */\nfunction TimeFieldInner<T extends TimeValue = TimeValue>(\n props: TimeFieldProps<T>\n): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n [\n 'value',\n 'defaultValue',\n 'onChange',\n 'minValue',\n 'maxValue',\n 'isDisabled',\n 'isReadOnly',\n 'isRequired',\n 'locale',\n 'granularity',\n 'hourCycle',\n 'validationState',\n 'placeholderValue',\n ]\n );\n\n const [fieldRef, setFieldRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create time field state\n const state = createTimeFieldState(stateProps);\n\n // Create time field ARIA props\n const fieldAria = createTimeField(rest, state as unknown as TimeFieldState<TimeValue>, fieldRef);\n\n // Render props values\n const renderValues = createMemo<TimeFieldRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isRequired: state.isRequired(),\n isInvalid: state.isInvalid(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-TimeField',\n },\n renderValues\n );\n\n return (\n <TimeFieldContext.Provider value={state as unknown as TimeFieldState<TimeValue>}>\n <div\n ref={setFieldRef}\n {...fieldAria.fieldProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-required={dataAttr(state.isRequired())}\n data-invalid={dataAttr(state.isInvalid())}\n >\n {props.children as JSX.Element}\n </div>\n </TimeFieldContext.Provider>\n );\n}\n\n// ============================================\n// TIME INPUT COMPONENT\n// ============================================\n\n/**\n * The input area containing time segments.\n */\nexport function TimeInput(props: TimeInputProps): JSX.Element {\n const state = useTimeFieldContext();\n const [isFocused, setIsFocused] = createSignal(false);\n\n // Render props values\n const renderValues = createMemo<TimeInputRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isFocused: isFocused(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-TimeInput',\n },\n renderValues\n );\n\n return (\n <div\n role=\"presentation\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-focused={dataAttr(isFocused())}\n onFocusIn={() => setIsFocused(true)}\n onFocusOut={() => setIsFocused(false)}\n >\n <For each={state.segments()}>\n {(segment) => props.children?.(segment)}\n </For>\n </div>\n );\n}\n\n// ============================================\n// TIME SEGMENT COMPONENT\n// ============================================\n\n/**\n * A segment of a time field (hour, minute, second, AM/PM).\n */\nexport function TimeSegment(props: TimeSegmentProps): JSX.Element {\n const state = useTimeFieldContext();\n const [_segmentRef, setSegmentRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create segment ARIA props\n // We use a simplified version for time segments\n const [isFocused, setIsFocused] = createSignal(false);\n const [enteredKeys, setEnteredKeys] = createSignal('');\n\n const isEditable = createMemo(() => {\n const seg = props.segment;\n return seg.isEditable && !state.isDisabled() && !state.isReadOnly();\n });\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (!isEditable()) return;\n\n const seg = props.segment;\n const type = seg.type;\n\n if (type === 'literal') return;\n\n switch (e.key) {\n case 'ArrowUp':\n e.preventDefault();\n state.incrementSegment(type);\n break;\n case 'ArrowDown':\n e.preventDefault();\n state.decrementSegment(type);\n break;\n case 'Backspace':\n case 'Delete':\n e.preventDefault();\n state.clearSegment(type);\n setEnteredKeys('');\n break;\n default:\n if (/^\\d$/.test(e.key)) {\n e.preventDefault();\n const newKeys = enteredKeys() + e.key;\n const numValue = parseInt(newKeys, 10);\n const maxValue = seg.maxValue ?? 59;\n const minValue = seg.minValue ?? 0;\n\n if (numValue <= maxValue) {\n state.setSegment(type, numValue);\n if (numValue * 10 > maxValue || newKeys.length >= 2) {\n setEnteredKeys('');\n } else {\n setEnteredKeys(newKeys);\n }\n } else {\n const singleValue = parseInt(e.key, 10);\n if (singleValue >= minValue && singleValue <= maxValue) {\n state.setSegment(type, singleValue);\n }\n setEnteredKeys(e.key);\n }\n }\n break;\n }\n };\n\n const handleFocus = () => {\n setIsFocused(true);\n setEnteredKeys('');\n };\n\n const handleBlur = () => {\n setIsFocused(false);\n setEnteredKeys('');\n };\n\n // Segment props\n const segmentProps = createMemo(() => {\n const seg = props.segment;\n const type = seg.type;\n\n if (type === 'literal') {\n return {\n 'aria-hidden': true,\n };\n }\n\n return {\n role: 'spinbutton' as const,\n tabIndex: isEditable() ? 0 : -1,\n 'aria-label': getTimeSegmentLabel(type),\n 'aria-valuenow': seg.value,\n 'aria-valuemin': seg.minValue,\n 'aria-valuemax': seg.maxValue,\n 'aria-valuetext': seg.isPlaceholder ? seg.placeholder : seg.text,\n 'aria-readonly': state.isReadOnly() || undefined,\n 'aria-disabled': state.isDisabled() || undefined,\n 'aria-invalid': state.isInvalid() || undefined,\n contentEditable: isEditable(),\n inputMode: 'numeric' as const,\n autoCorrect: 'off',\n enterKeyHint: 'next' as const,\n spellCheck: false,\n onKeyDown: handleKeyDown,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onMouseDown: (e: MouseEvent) => {\n e.preventDefault();\n },\n };\n });\n\n const text = createMemo(() => {\n const seg = props.segment;\n return seg.isPlaceholder ? seg.placeholder : seg.text;\n });\n\n // Render props values\n const renderValues = createMemo<TimeSegmentRenderProps>(() => ({\n isFocused: isFocused(),\n isEditable: isEditable(),\n isPlaceholder: props.segment.isPlaceholder,\n type: props.segment.type,\n text: text(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-TimeSegment',\n },\n renderValues\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === 'function') {\n return renderProps.renderChildren();\n }\n return text();\n };\n\n return (\n <div\n ref={setSegmentRef}\n {...segmentProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={dataAttr(isFocused())}\n data-editable={dataAttr(isEditable())}\n data-placeholder={dataAttr(props.segment.isPlaceholder)}\n data-type={props.segment.type}\n >\n {getChildren()}\n </div>\n );\n}\n\n// ============================================\n// HELPER FUNCTIONS\n// ============================================\n\nfunction getTimeSegmentLabel(type: TimeSegmentType['type']): string {\n switch (type) {\n case 'hour':\n return 'Hour';\n case 'minute':\n return 'Minute';\n case 'second':\n return 'Second';\n case 'dayPeriod':\n return 'AM/PM';\n default:\n return '';\n }\n}\n\n// Re-export types\nexport type { TimeFieldState, TimeSegmentType, TimeValue };\n", "/**\n * DatePicker component for solidaria-components\n *\n * Pre-wired headless date picker component that combines a date field with a calendar popup.\n * Port of react-aria-components/src/DatePicker.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n Show,\n} from 'solid-js';\nimport {\n createDatePicker,\n type AriaDatePickerProps,\n type DatePickerState as AriaDatePickerState,\n} from '@proyecto-viviana/solidaria';\nimport {\n createDateFieldState,\n createCalendarState,\n type DateFieldState,\n type CalendarState,\n type DateFieldStateProps,\n type CalendarDate,\n type DateValue,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from './utils';\nimport { DateFieldContext } from './DateField';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface DatePickerRenderProps {\n /** Whether the picker is disabled. */\n isDisabled: boolean;\n /** Whether the picker is read-only. */\n isReadOnly: boolean;\n /** Whether the picker is required. */\n isRequired: boolean;\n /** Whether the picker is invalid. */\n isInvalid: boolean;\n /** Whether the calendar is open. */\n isOpen: boolean;\n}\n\nexport interface DatePickerContextValue {\n fieldState: DateFieldState<DateValue>;\n calendarState: CalendarState<DateValue>;\n overlayState: {\n isOpen: boolean;\n open: () => void;\n close: () => void;\n toggle: () => void;\n };\n pickerAria: ReturnType<typeof createDatePicker>;\n}\n\nexport interface DatePickerProps<T extends DateValue = DateValue>\n extends Omit<AriaDatePickerProps, 'id' | 'isDisabled' | 'isReadOnly' | 'isRequired'>,\n Omit<DateFieldStateProps<T>, 'locale'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DatePickerRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DatePickerRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n /** Whether the calendar should close when a date is selected. */\n shouldCloseOnSelect?: boolean;\n}\n\nexport interface DatePickerButtonRenderProps {\n /** Whether the button is disabled. */\n isDisabled: boolean;\n /** Whether the calendar is open. */\n isOpen: boolean;\n}\n\nexport interface DatePickerButtonProps extends SlotProps {\n /** The children of the component. */\n children?: RenderChildren<DatePickerButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DatePickerButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DatePickerButtonRenderProps>;\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const DatePickerContext = createContext<DatePickerContextValue | null>(null);\n\nexport function useDatePickerContext(): DatePickerContextValue {\n const context = useContext(DatePickerContext);\n if (!context) {\n throw new Error('DatePicker components must be used within a DatePicker');\n }\n return context;\n}\n\n// ============================================\n// DATE PICKER COMPONENT\n// ============================================\n\n/**\n * A date picker combines a DateField and a Calendar popover.\n *\n * @example\n * ```tsx\n * <DatePicker label=\"Event date\">\n * <Label>Event date</Label>\n * <Group>\n * <DateInput>\n * {(segment) => <DateSegment segment={segment} />}\n * </DateInput>\n * <DatePickerButton>📅</DatePickerButton>\n * </Group>\n * <Popover>\n * <Dialog>\n * <Calendar>\n * <CalendarGrid>\n * {(date) => <CalendarCell date={date} />}\n * </CalendarGrid>\n * </Calendar>\n * </Dialog>\n * </Popover>\n * </DatePicker>\n * ```\n */\nexport function DatePicker<T extends DateValue = CalendarDate>(\n props: DatePickerProps<T>\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={<div class=\"solidaria-DatePicker solidaria-DatePicker--placeholder\" aria-hidden=\"true\" />}\n >\n <DatePickerInner {...props} />\n </Show>\n );\n}\n\n/**\n * Internal DatePicker component that renders after client mount.\n */\nfunction DatePickerInner<T extends DateValue = CalendarDate>(\n props: DatePickerProps<T>\n): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'shouldCloseOnSelect'],\n [\n 'value',\n 'defaultValue',\n 'onChange',\n 'minValue',\n 'maxValue',\n 'isDisabled',\n 'isReadOnly',\n 'isRequired',\n 'locale',\n 'granularity',\n 'hourCycle',\n 'hideTimeZone',\n 'placeholderValue',\n 'validationState',\n 'description',\n 'errorMessage',\n ]\n );\n\n // Create overlay trigger state\n const [isOpen, setIsOpen] = createSignal(false);\n\n const overlayState = {\n get isOpen() { return isOpen(); },\n open: () => setIsOpen(true),\n close: () => setIsOpen(false),\n toggle: () => setIsOpen((prev) => !prev),\n };\n\n // Create date field state\n const fieldState = createDateFieldState({\n ...stateProps,\n onChange: (value) => {\n stateProps.onChange?.(value);\n if (local.shouldCloseOnSelect !== false && value) {\n overlayState.close();\n }\n },\n });\n\n // Create calendar state that syncs with field\n const calendarState = createCalendarState({\n value: () => fieldState.value(),\n onChange: (value) => {\n fieldState.setValue(value as T | null);\n if (local.shouldCloseOnSelect !== false) {\n overlayState.close();\n }\n },\n minValue: stateProps.minValue,\n maxValue: stateProps.maxValue,\n isDisabled: stateProps.isDisabled,\n isReadOnly: stateProps.isReadOnly,\n locale: stateProps.locale,\n });\n\n // Create date picker ARIA props\n const pickerAria = createDatePicker(\n rest,\n fieldState as unknown as DateFieldState<DateValue>,\n overlayState as AriaDatePickerState,\n calendarState as unknown as CalendarState<DateValue>\n );\n\n // Context value\n const contextValue: DatePickerContextValue = {\n fieldState: fieldState as unknown as DateFieldState<DateValue>,\n calendarState: calendarState as unknown as CalendarState<DateValue>,\n overlayState,\n pickerAria,\n };\n\n // Render props values\n const renderValues = createMemo<DatePickerRenderProps>(() => ({\n isDisabled: fieldState.isDisabled(),\n isReadOnly: fieldState.isReadOnly(),\n isRequired: fieldState.isRequired(),\n isInvalid: fieldState.isInvalid(),\n isOpen: overlayState.isOpen,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-DatePicker',\n },\n renderValues\n );\n\n return (\n <DatePickerContext.Provider value={contextValue}>\n {/* Also provide DateFieldContext so DateInput/DateSegment work inside DatePicker */}\n <DateFieldContext.Provider value={fieldState as unknown as DateFieldState<DateValue>}>\n <div\n {...pickerAria.groupProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(fieldState.isDisabled())}\n data-readonly={dataAttr(fieldState.isReadOnly())}\n data-required={dataAttr(fieldState.isRequired())}\n data-invalid={dataAttr(fieldState.isInvalid())}\n data-open={dataAttr(overlayState.isOpen)}\n >\n {props.children}\n </div>\n </DateFieldContext.Provider>\n </DatePickerContext.Provider>\n );\n}\n\n// ============================================\n// DATE PICKER BUTTON COMPONENT\n// ============================================\n\n/**\n * A button that opens the date picker calendar.\n */\nexport function DatePickerButton(props: DatePickerButtonProps): JSX.Element {\n const context = useDatePickerContext();\n\n // Render props values\n const renderValues = createMemo<DatePickerButtonRenderProps>(() => ({\n isDisabled: context.fieldState.isDisabled() || (props.isDisabled ?? false),\n isOpen: context.overlayState.isOpen,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-DatePickerButton',\n },\n renderValues\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === 'function') {\n return renderProps.renderChildren();\n }\n return props.children ?? '📅';\n };\n\n return (\n <button\n {...context.pickerAria.buttonProps}\n class={renderProps.class()}\n style={renderProps.style()}\n disabled={context.fieldState.isDisabled() || props.isDisabled}\n data-disabled={dataAttr(context.fieldState.isDisabled() || props.isDisabled)}\n data-open={dataAttr(context.overlayState.isOpen)}\n >\n {getChildren()}\n </button>\n );\n}\n\n// ============================================\n// DATE PICKER CONTENT COMPONENT\n// ============================================\n\nexport interface DatePickerContentProps extends SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n/**\n * The content area of the date picker (typically contains a Calendar).\n */\nexport function DatePickerContent(props: DatePickerContentProps): JSX.Element {\n const context = useDatePickerContext();\n\n return (\n <Show when={context.overlayState.isOpen}>\n <div\n {...context.pickerAria.dialogProps}\n class={props.class ?? 'solidaria-DatePickerContent'}\n style={props.style}\n >\n {props.children}\n </div>\n </Show>\n );\n}\n\n// DatePickerContextValue is already exported at declaration\n", "/**\n * Table component for solidaria-components\n *\n * A pre-wired headless table that combines state + aria hooks.\n * Based on react-aria-components/src/Table.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createTable,\n createTableColumnHeader,\n createTableRow,\n createTableCell,\n createTableRowGroup,\n createTableSelectionCheckbox,\n createTableSelectAllCheckbox,\n createFocusRing,\n createHover,\n type AriaTableProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createTableState,\n createTableCollection,\n type TableState,\n type TableCollection,\n type Key,\n type SortDescriptor,\n type ColumnDefinition,\n type GridNode,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TableRenderProps {\n /** Whether the table has focus. */\n isFocused: boolean;\n /** Whether the table has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the table is disabled. */\n isDisabled: boolean;\n /** Whether the table is empty. */\n isEmpty: boolean;\n}\n\nexport interface TableProps<T extends object> extends Omit<AriaTableProps, 'children'>, SlotProps {\n /** The data items to render in the table. */\n items?: T[];\n /** The column definitions. */\n columns: ColumnDefinition<T>[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item for a column. */\n getTextValue?: (item: T, column: ColumnDefinition<T>) => string;\n /** The selection mode. */\n selectionMode?: 'none' | 'single' | 'multiple';\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Currently selected keys (controlled). */\n selectedKeys?: 'all' | Iterable<Key>;\n /** Default selected keys (uncontrolled). */\n defaultSelectedKeys?: 'all' | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: 'all' | Set<Key>) => void;\n /** The current sort descriptor. */\n sortDescriptor?: SortDescriptor;\n /** Handler called when sort changes. */\n onSortChange?: (descriptor: SortDescriptor) => void;\n /** Whether to show selection checkboxes. */\n showSelectionCheckboxes?: boolean;\n /** The children of the component. */\n children?: JSX.Element | RenderChildren<TableRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableRenderProps>;\n /** A function to render when the table is empty. */\n renderEmptyState?: () => JSX.Element;\n}\n\nexport interface TableHeaderRenderProps {\n /** Whether the header has focus. */\n isFocused: boolean;\n}\n\nexport interface TableHeaderProps extends SlotProps {\n /** The children (usually TableColumn components). */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableHeaderRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableHeaderRenderProps>;\n}\n\nexport interface TableColumnRenderProps {\n /** Whether the column is focused. */\n isFocused: boolean;\n /** Whether the column has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the column is sortable. */\n isSortable: boolean;\n /** The current sort direction ('ascending', 'descending', or undefined). */\n sortDirection: 'ascending' | 'descending' | undefined;\n /** Whether the column is being hovered. */\n isHovered: boolean;\n}\n\nexport interface TableColumnProps extends SlotProps {\n /** The unique key for the column. */\n id: Key;\n /** Whether the column allows sorting. */\n allowsSorting?: boolean;\n /** The children of the column. */\n children?: RenderChildren<TableColumnRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableColumnRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableColumnRenderProps>;\n}\n\nexport interface TableBodyRenderProps {\n /** Whether the body is empty. */\n isEmpty: boolean;\n}\n\nexport interface TableBodyProps<T> extends SlotProps {\n /** The items to render. If not provided, uses items from Table. */\n items?: T[];\n /** The children (usually a render function for TableRow). */\n children?: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableBodyRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableBodyRenderProps>;\n /** A function to render when the body is empty. */\n renderEmptyState?: () => JSX.Element;\n}\n\nexport interface TableRowRenderProps {\n /** Whether the row is selected. */\n isSelected: boolean;\n /** Whether the row is focused. */\n isFocused: boolean;\n /** Whether the row has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the row is pressed. */\n isPressed: boolean;\n /** Whether the row is hovered. */\n isHovered: boolean;\n /** Whether the row is disabled. */\n isDisabled: boolean;\n}\n\nexport interface TableRowProps<T> extends SlotProps {\n /** The unique key for the row. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the row (usually TableCell components). */\n children?: JSX.Element | RenderChildren<TableRowRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableRowRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableRowRenderProps>;\n /** Handler called when the row is activated (double-click or Enter). */\n onAction?: () => void;\n}\n\nexport interface TableCellRenderProps {\n /** Whether the cell is focused. */\n isFocused: boolean;\n /** Whether the cell has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the cell is pressed. */\n isPressed: boolean;\n /** Whether the cell is hovered. */\n isHovered: boolean;\n}\n\nexport interface TableCellProps extends SlotProps {\n /** The unique key for the cell. */\n id?: Key;\n /** The children of the cell. */\n children?: RenderChildren<TableCellRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableCellRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableCellRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface TableContextValue<T extends object> {\n state: TableState<T, TableCollection<T>>;\n collection: TableCollection<T>;\n items?: T[];\n columns: ColumnDefinition<T>[];\n isDisabled: boolean;\n showSelectionCheckboxes: boolean;\n}\n\nexport const TableContext = createContext<TableContextValue<object> | null>(null);\nexport const TableStateContext = createContext<TableState<object, TableCollection<object>> | null>(null);\n\n// Row-level context for cells\ninterface TableRowContextValue {\n rowKey: Key;\n rowNode: GridNode<unknown>;\n}\n\nexport const TableRowContext = createContext<TableRowContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A table displays data in rows and columns and enables a user to navigate its contents via directional navigation keys,\n * and optionally supports row selection and sorting.\n */\nexport function Table<T extends object>(props: TableProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['class', 'style', 'slot', 'renderEmptyState'],\n [\n 'items',\n 'columns',\n 'getKey',\n 'getTextValue',\n 'disabledKeys',\n 'selectionMode',\n 'selectedKeys',\n 'defaultSelectedKeys',\n 'onSelectionChange',\n 'sortDescriptor',\n 'onSortChange',\n 'showSelectionCheckboxes',\n ]\n );\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLTableElement | null>(null);\n\n // Create collection\n const collection = createMemo(() =>\n createTableCollection<T>({\n columns: stateProps.columns,\n rows: stateProps.items ?? [],\n getKey: stateProps.getKey,\n getTextValue: stateProps.getTextValue,\n showSelectionCheckboxes: stateProps.showSelectionCheckboxes ?? false,\n })\n );\n\n // Create table state\n const state = createTableState<T, TableCollection<T>>(() => ({\n collection: collection(),\n disabledKeys: stateProps.disabledKeys,\n selectionMode: stateProps.selectionMode,\n selectedKeys: stateProps.selectedKeys,\n defaultSelectedKeys: stateProps.defaultSelectedKeys,\n onSelectionChange: stateProps.onSelectionChange,\n sortDescriptor: stateProps.sortDescriptor,\n onSortChange: stateProps.onSortChange,\n showSelectionCheckboxes: stateProps.showSelectionCheckboxes,\n }));\n\n // Create table aria props\n const { gridProps } = createTable<T>(\n () => ({\n id: ariaProps.id,\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isVirtualized: ariaProps.isVirtualized,\n onRowAction: ariaProps.onRowAction,\n onCellAction: ariaProps.onCellAction,\n focusMode: ariaProps.focusMode,\n }),\n () => state,\n ref\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<TableRenderProps>(() => ({\n isFocused: state.isFocused || isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: false, // Tables don't have a global disabled state\n isEmpty: (stateProps.items?.length ?? 0) === 0,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from spread props\n const cleanGridProps = () => {\n const { ref: _ref1, ...rest } = gridProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n const contextValue = createMemo<TableContextValue<T>>(() => ({\n state,\n collection: collection(),\n items: stateProps.items,\n columns: stateProps.columns,\n isDisabled: false,\n showSelectionCheckboxes: stateProps.showSelectionCheckboxes ?? false,\n }));\n\n return (\n <TableContext.Provider value={contextValue() as TableContextValue<object>}>\n <TableStateContext.Provider value={state as unknown as TableState<object, TableCollection<object>>}>\n <table\n ref={setRef}\n {...domProps()}\n {...cleanGridProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-empty={(stateProps.items?.length ?? 0) === 0 || undefined}\n >\n {renderProps.renderChildren()}\n </table>\n </TableStateContext.Provider>\n </TableContext.Provider>\n );\n}\n\n/**\n * A header row in a table containing column headers.\n */\nexport function TableHeader(props: TableHeaderProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableHeader must be used within a Table');\n }\n\n const { rowGroupProps } = createTableRowGroup(() => ({ type: 'thead' }));\n\n // Render props values\n const renderValues = createMemo<TableHeaderRenderProps>(() => ({\n isFocused: false,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table-header',\n },\n renderValues\n );\n\n const cleanRowGroupProps = () => {\n const { ref: _ref, ...rest } = rowGroupProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <thead {...cleanRowGroupProps()} class={renderProps.class()} style={renderProps.style()}>\n <tr role=\"row\">{props.children}</tr>\n </thead>\n );\n}\n\n/**\n * A column header in a table.\n */\nexport function TableColumn(props: TableColumnProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot', 'id', 'allowsSorting']);\n\n // Get context\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableColumn must be used within a Table');\n }\n const { state, collection } = context;\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLTableCellElement | null>(null);\n\n // Find the column node\n const columnNode = createMemo(() => {\n const node = collection.getItem(local.id);\n if (!node) {\n // Create a simple node for the column\n return {\n type: 'column' as const,\n key: local.id,\n value: null,\n textValue: String(local.id),\n level: 0,\n index: 0,\n hasChildNodes: false,\n childNodes: [],\n } as GridNode<unknown>;\n }\n return node;\n });\n\n // Create column header aria props\n const { columnHeaderProps } = createTableColumnHeader<object>(\n () => ({\n node: columnNode(),\n allowsSorting: local.allowsSorting,\n }),\n () => state as TableState<object, TableCollection<object>>,\n ref\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n isDisabled: false,\n });\n\n // Create focus ring\n const { isFocusVisible, focusProps } = createFocusRing();\n\n // Get sort direction\n const sortDirection = createMemo(() => {\n const sortDescriptor = state.sortDescriptor;\n if (sortDescriptor?.column === local.id) {\n return sortDescriptor.direction;\n }\n return undefined;\n });\n\n // Render props values\n const renderValues = createMemo<TableColumnRenderProps>(() => ({\n isFocused: state.focusedKey === local.id,\n isFocusVisible: isFocusVisible() && state.focusedKey === local.id,\n isSortable: local.allowsSorting ?? false,\n sortDirection: sortDirection(),\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table-column',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanColumnHeaderProps = () => {\n const { ref: _ref1, ...rest } = columnHeaderProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <th\n ref={setRef}\n {...cleanColumnHeaderProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-sortable={local.allowsSorting || undefined}\n data-sort-direction={sortDirection() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={state.focusedKey === local.id || undefined}\n data-focus-visible={(isFocusVisible() && state.focusedKey === local.id) || undefined}\n >\n {renderProps.renderChildren()}\n </th>\n );\n}\n\n/**\n * The body of a table containing data rows.\n */\nexport function TableBody<T extends object>(props: TableBodyProps<T>): JSX.Element {\n const [local] = splitProps(props, ['items', 'class', 'style', 'slot', 'renderEmptyState']);\n\n // Get context\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableBody must be used within a Table');\n }\n\n const { rowGroupProps } = createTableRowGroup(() => ({ type: 'tbody' }));\n\n // Use provided items or context items\n const items = createMemo(() => (local.items ?? context.items) as T[]);\n\n // Render props values\n const renderValues = createMemo<TableBodyRenderProps>(() => ({\n isEmpty: items().length === 0,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table-body',\n },\n renderValues\n );\n\n const cleanRowGroupProps = () => {\n const { ref: _ref, ...rest } = rowGroupProps as Record<string, unknown>;\n return rest;\n };\n\n const isEmpty = () => items().length === 0;\n\n return (\n <tbody {...cleanRowGroupProps()} class={renderProps.class()} style={renderProps.style()}>\n <Show when={isEmpty() && local.renderEmptyState} fallback={<For each={items()}>{(item) => props.children?.(item)}</For>}>\n {local.renderEmptyState?.()}\n </Show>\n </tbody>\n );\n}\n\n/**\n * A row in a table.\n */\nexport function TableRow<T extends object>(props: TableRowProps<T>): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot', 'id', 'item', 'onAction']);\n\n // Get context\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableRow must be used within a Table');\n }\n const { state, collection } = context;\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLTableRowElement | null>(null);\n\n // Find the row node\n const rowNode = createMemo(() => {\n const node = collection.getItem(local.id);\n if (!node) {\n // Create a simple node for the row\n return {\n type: 'item' as const,\n key: local.id,\n value: local.item ?? null,\n textValue: String(local.id),\n level: 0,\n index: 0,\n hasChildNodes: true,\n childNodes: [],\n } as GridNode<unknown>;\n }\n return node;\n });\n\n // Create row aria props\n const { rowProps, isSelected, isDisabled, isPressed } = createTableRow<object>(\n () => ({\n node: rowNode(),\n onAction: local.onAction,\n }),\n () => state as TableState<object, TableCollection<object>>,\n ref\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled;\n },\n });\n\n // Create focus ring\n const { isFocusVisible, focusProps } = createFocusRing();\n\n // Check if focused\n const isFocused = createMemo(() => state.focusedKey === local.id);\n\n // Render props values\n const renderValues = createMemo<TableRowRenderProps>(() => ({\n isSelected,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible() && isFocused(),\n isPressed,\n isHovered: isHovered(),\n isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table-row',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanRowProps = () => {\n const { ref: _ref1, ...rest } = rowProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n const rowContextValue: TableRowContextValue = {\n rowKey: local.id,\n rowNode: rowNode(),\n };\n\n return (\n <TableRowContext.Provider value={rowContextValue}>\n <tr\n ref={setRef}\n {...cleanRowProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={isSelected || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={(isFocusVisible() && isFocused()) || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </tr>\n </TableRowContext.Provider>\n );\n}\n\n/**\n * A cell in a table row.\n */\nexport function TableCell(props: TableCellProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot', 'id']);\n\n // Get context\n const tableContext = useContext(TableContext);\n const rowContext = useContext(TableRowContext);\n\n if (!tableContext) {\n throw new Error('TableCell must be used within a Table');\n }\n if (!rowContext) {\n throw new Error('TableCell must be used within a Table');\n }\n\n const { state, collection } = tableContext;\n const { rowKey, rowNode } = rowContext;\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLTableCellElement | null>(null);\n\n // Find the cell node\n const cellNode = createMemo(() => {\n // If id is provided, look for that specific cell\n if (local.id != null) {\n const cellKey = `${rowKey}-${local.id}`;\n const node = collection.getItem(cellKey);\n if (node) return node;\n }\n\n // Otherwise create a simple node\n return {\n type: 'cell' as const,\n key: local.id ?? `${rowKey}-cell`,\n value: rowNode.value,\n textValue: '',\n level: 1,\n index: 0,\n parentKey: rowKey,\n hasChildNodes: false,\n childNodes: [],\n } as GridNode<unknown>;\n });\n\n // Create cell aria props\n const { gridCellProps, isPressed } = createTableCell<object>(\n () => ({\n node: cellNode(),\n }),\n () => state as TableState<object, TableCollection<object>>,\n ref\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n isDisabled: false,\n });\n\n // Create focus ring\n const { isFocusVisible, focusProps } = createFocusRing();\n\n // Check if focused\n const isFocused = createMemo(() => state.focusedKey === cellNode().key);\n\n // Render props values\n const renderValues = createMemo<TableCellRenderProps>(() => ({\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible() && isFocused(),\n isPressed,\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table-cell',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanCellProps = () => {\n const { ref: _ref1, ...rest } = gridCellProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <td\n ref={setRef}\n {...cleanCellProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={isFocused() || undefined}\n data-focus-visible={(isFocusVisible() && isFocused()) || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </td>\n );\n}\n\n/**\n * A checkbox cell for row selection.\n */\nexport function TableSelectionCheckbox(props: { rowKey: Key }): JSX.Element {\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableSelectionCheckbox must be used within a Table');\n }\n\n const { state } = context;\n\n const { checkboxProps } = createTableSelectionCheckbox<object>(\n () => ({ key: props.rowKey }),\n () => state as TableState<object, TableCollection<object>>\n );\n\n return <input {...checkboxProps} />;\n}\n\n/**\n * A checkbox for select-all functionality.\n */\nexport function TableSelectAllCheckbox(): JSX.Element {\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableSelectAllCheckbox must be used within a Table');\n }\n\n const { state } = context;\n\n const { checkboxProps } = createTableSelectAllCheckbox<object>(\n () => state as TableState<object, TableCollection<object>>\n );\n\n return <input {...checkboxProps} />;\n}\n\n// Attach components as static properties\nTable.Header = TableHeader;\nTable.Column = TableColumn;\nTable.Body = TableBody;\nTable.Row = TableRow;\nTable.Cell = TableCell;\nTable.SelectionCheckbox = TableSelectionCheckbox;\nTable.SelectAllCheckbox = TableSelectAllCheckbox;\n", "/**\n * GridList component for solidaria-components\n *\n * A pre-wired headless grid list that combines state + aria hooks.\n * Based on react-aria-components/src/GridList.tsx\n *\n * GridList is similar to ListBox but supports interactive elements within items\n * and uses grid keyboard navigation.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n} from 'solid-js';\nimport {\n createGridList,\n createGridListItem,\n createGridListSelectionCheckbox,\n createFocusRing,\n createHover,\n type AriaGridListProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createGridState,\n type GridState,\n type GridCollection,\n type GridNode,\n type Key,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface GridListRenderProps {\n /** Whether the grid list has focus. */\n isFocused: boolean;\n /** Whether the grid list has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the grid list is disabled. */\n isDisabled: boolean;\n /** Whether the grid list is empty. */\n isEmpty: boolean;\n}\n\nexport interface GridListProps<T extends object> extends Omit<AriaGridListProps, 'children'>, SlotProps {\n /** The items to render in the grid list. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** The selection mode. */\n selectionMode?: 'none' | 'single' | 'multiple';\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Currently selected keys (controlled). */\n selectedKeys?: 'all' | Iterable<Key>;\n /** Default selected keys (uncontrolled). */\n defaultSelectedKeys?: 'all' | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: 'all' | Set<Key>) => void;\n /** The children of the component. A function may be provided to render each item. */\n children?: ((item: T) => JSX.Element) | JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<GridListRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<GridListRenderProps>;\n /** A function to render when the grid list is empty. */\n renderEmptyState?: () => JSX.Element;\n}\n\nexport interface GridListItemRenderProps {\n /** Whether the item is selected. */\n isSelected: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n}\n\nexport interface GridListItemProps<T extends object> extends SlotProps {\n /** The unique key for the item. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the item. A function may be provided to receive render props. */\n children?: RenderChildren<GridListItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<GridListItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<GridListItemRenderProps>;\n /** The text value of the item (for accessibility). */\n textValue?: string;\n /** Handler called when the item is activated. */\n onAction?: () => void;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface GridListContextValue<T extends object> {\n state: GridState<T, GridCollection<T>>;\n collection: GridCollection<T>;\n isDisabled: boolean;\n}\n\nexport const GridListContext = createContext<GridListContextValue<object> | null>(null);\nexport const GridListStateContext = createContext<GridState<object, GridCollection<object>> | null>(null);\n\n// ============================================\n// HELPER: Build GridCollection from items\n// ============================================\n\nfunction buildGridCollection<T extends object>(\n items: T[],\n getKey?: (item: T) => Key,\n getTextValue?: (item: T) => string,\n getDisabled?: (item: T) => boolean\n): GridCollection<T> {\n const nodes: GridNode<T>[] = items.map((item, index) => {\n const key = getKey?.(item) ?? index;\n return {\n type: 'item' as const,\n key,\n value: item,\n textValue: getTextValue?.(item) ?? String(key),\n level: 0,\n index,\n hasChildNodes: false,\n childNodes: [],\n isDisabled: getDisabled?.(item),\n };\n });\n\n const keyMap = new Map<Key, GridNode<T>>();\n nodes.forEach((node) => keyMap.set(node.key, node));\n\n return {\n rows: nodes,\n columns: [],\n headerRows: [],\n get rowCount() {\n return nodes.length;\n },\n get columnCount() {\n return 1;\n },\n get size() {\n return nodes.length;\n },\n getKeys() {\n return nodes.map((n) => n.key);\n },\n getItem(key: Key) {\n return keyMap.get(key) ?? null;\n },\n at(index: number) {\n return nodes[index] ?? null;\n },\n getKeyBefore(key: Key) {\n const node = keyMap.get(key);\n if (!node) return null;\n return node.index > 0 ? nodes[node.index - 1].key : null;\n },\n getKeyAfter(key: Key) {\n const node = keyMap.get(key);\n if (!node) return null;\n return node.index < nodes.length - 1 ? nodes[node.index + 1].key : null;\n },\n getFirstKey() {\n return nodes[0]?.key ?? null;\n },\n getLastKey() {\n return nodes[nodes.length - 1]?.key ?? null;\n },\n getChildren(_key: Key) {\n return [];\n },\n getTextValue(key: Key) {\n return keyMap.get(key)?.textValue ?? '';\n },\n getCell(_rowKey: Key, _columnKey: Key) {\n return null;\n },\n [Symbol.iterator]() {\n return nodes[Symbol.iterator]();\n },\n };\n}\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A grid list displays a list of interactive items, with support for\n * keyboard navigation, single or multiple selection, and row actions.\n */\nexport function GridList<T extends object>(props: GridListProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'renderEmptyState'],\n [\n 'items',\n 'getKey',\n 'getTextValue',\n 'getDisabled',\n 'disabledKeys',\n 'selectionMode',\n 'selectedKeys',\n 'defaultSelectedKeys',\n 'onSelectionChange',\n ]\n );\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLUListElement | null>(null);\n\n // Build collection\n const collection = createMemo(() =>\n buildGridCollection(\n stateProps.items ?? [],\n stateProps.getKey,\n stateProps.getTextValue,\n stateProps.getDisabled\n )\n );\n\n // Get disabled keys from items + explicit disabledKeys\n const allDisabledKeys = createMemo(() => {\n const keys = new Set<Key>();\n\n // Add explicitly disabled keys\n if (stateProps.disabledKeys) {\n for (const key of stateProps.disabledKeys) {\n keys.add(key);\n }\n }\n\n // Add keys from items marked as disabled\n for (const node of collection().rows) {\n if (node.isDisabled) {\n keys.add(node.key);\n }\n }\n\n return keys;\n });\n\n // Create grid state\n const state = createGridState<T, GridCollection<T>>(() => ({\n collection: collection(),\n disabledKeys: allDisabledKeys(),\n selectionMode: stateProps.selectionMode,\n selectedKeys: stateProps.selectedKeys,\n defaultSelectedKeys: stateProps.defaultSelectedKeys,\n onSelectionChange: stateProps.onSelectionChange,\n }));\n\n // Create grid list aria props\n const { gridProps } = createGridList<T, GridCollection<T>>(\n () => ({\n id: ariaProps.id,\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isVirtualized: ariaProps.isVirtualized,\n onAction: ariaProps.onAction,\n isDisabled: ariaProps.isDisabled,\n }),\n () => state,\n ref\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<GridListRenderProps>(() => ({\n isFocused: state.isFocused || isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\n isEmpty: (stateProps.items?.length ?? 0) === 0,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-GridList',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from spread props\n const cleanGridProps = () => {\n const { ref: _ref1, ...rest } = gridProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n const isEmpty = () => (stateProps.items?.length ?? 0) === 0;\n\n const contextValue = createMemo<GridListContextValue<T>>(() => ({\n state,\n collection: collection(),\n isDisabled: ariaProps.isDisabled ?? false,\n }));\n\n return (\n <GridListContext.Provider value={contextValue() as GridListContextValue<object>}>\n <GridListStateContext.Provider value={state as unknown as GridState<object, GridCollection<object>>}>\n <ul\n ref={setRef}\n {...domProps()}\n {...cleanGridProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n data-empty={isEmpty() || undefined}\n >\n {isEmpty() && local.renderEmptyState ? (\n local.renderEmptyState()\n ) : (\n <For each={stateProps.items ?? []}>{(item) => typeof props.children === 'function' ? props.children(item) : null}</For>\n )}\n </ul>\n </GridListStateContext.Provider>\n </GridListContext.Provider>\n );\n}\n\n/**\n * An item in a grid list.\n */\nexport function GridListItem<T extends object>(props: GridListItemProps<T>): JSX.Element {\n const [local] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n 'onAction',\n ]);\n\n // Get state from context\n const context = useContext(GridListStateContext);\n if (!context) {\n throw new Error('GridListItem must be used within a GridList');\n }\n const state = context as GridState<T, GridCollection<T>>;\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLLIElement | null>(null);\n\n // Find or create the item node\n const itemNode = createMemo(() => {\n const node = state.collection.getItem(local.id);\n if (!node) {\n // Create a simple node for the item\n return {\n type: 'item' as const,\n key: local.id,\n value: local.item ?? null,\n textValue: local.textValue ?? String(local.id),\n level: 0,\n index: 0,\n hasChildNodes: false,\n childNodes: [],\n } as GridNode<T>;\n }\n return node as GridNode<T>;\n });\n\n // Create item aria props\n const { rowProps, gridCellProps, isSelected, isDisabled, isPressed } = createGridListItem<T, GridCollection<T>>(\n () => ({\n node: itemNode(),\n onAction: local.onAction,\n }),\n () => state,\n ref\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled;\n },\n });\n\n // Create focus ring\n const { isFocusVisible, focusProps } = createFocusRing();\n\n // Check if focused\n const isFocused = createMemo(() => state.focusedKey === local.id);\n\n // Render props values\n const renderValues = createMemo<GridListItemRenderProps>(() => ({\n isSelected,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible() && isFocused(),\n isPressed,\n isHovered: isHovered(),\n isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-GridList-item',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanRowProps = () => {\n const { ref: _ref1, ...rest } = rowProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <li\n ref={setRef}\n {...cleanRowProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={isSelected || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={(isFocusVisible() && isFocused()) || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled || undefined}\n >\n <div {...gridCellProps}>{renderProps.renderChildren()}</div>\n </li>\n );\n}\n\n/**\n * A checkbox for item selection in a grid list.\n */\nexport function GridListSelectionCheckbox(props: { itemKey: Key }): JSX.Element {\n const context = useContext(GridListStateContext);\n if (!context) {\n throw new Error('GridListSelectionCheckbox must be used within a GridList');\n }\n\n const state = context as GridState<object, GridCollection<object>>;\n\n const { checkboxProps } = createGridListSelectionCheckbox<object, GridCollection<object>>(\n () => ({ key: props.itemKey }),\n () => state\n );\n\n return <input {...checkboxProps} />;\n}\n\n// Attach Item and SelectionCheckbox as static properties\nGridList.Item = GridListItem;\nGridList.SelectionCheckbox = GridListSelectionCheckbox;\n", "/**\n * Tree component for solidaria-components\n *\n * A pre-wired headless tree that combines state + aria hooks.\n * Based on react-aria-components/src/Tree.tsx\n *\n * Tree displays hierarchical data with expandable/collapsible nodes,\n * supporting keyboard navigation and selection.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createTree,\n createTreeItem,\n createTreeSelectionCheckbox,\n createFocusRing,\n createHover,\n type AriaTreeProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createTreeState,\n createTreeCollection,\n type TreeState,\n type TreeCollection,\n type TreeNode,\n type TreeItemData,\n type Key,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TreeRenderProps {\n /** Whether the tree has focus. */\n isFocused: boolean;\n /** Whether the tree has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the tree is disabled. */\n isDisabled: boolean;\n /** Whether the tree is empty. */\n isEmpty: boolean;\n}\n\nexport interface TreeProps<T extends object> extends Omit<AriaTreeProps, 'children'>, SlotProps {\n /** The hierarchical items to render in the tree. */\n items: TreeItemData<T>[];\n /** The selection mode. */\n selectionMode?: 'none' | 'single' | 'multiple';\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Currently selected keys (controlled). */\n selectedKeys?: 'all' | Iterable<Key>;\n /** Default selected keys (uncontrolled). */\n defaultSelectedKeys?: 'all' | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: 'all' | Set<Key>) => void;\n /** Currently expanded keys (controlled). */\n expandedKeys?: Iterable<Key>;\n /** Default expanded keys (uncontrolled). */\n defaultExpandedKeys?: Iterable<Key>;\n /** Handler called when expansion changes. */\n onExpandedChange?: (keys: Set<Key>) => void;\n /** The children of the component. A function provided to render each item. */\n children: (item: TreeItemData<T>, state: TreeRenderItemState) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TreeRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TreeRenderProps>;\n /** A function to render when the tree is empty. */\n renderEmptyState?: () => JSX.Element;\n}\n\nexport interface TreeRenderItemState {\n /** Whether the item is expanded. */\n isExpanded: boolean;\n /** Whether the item is expandable (has children). */\n isExpandable: boolean;\n /** The nesting level (0 = root). */\n level: number;\n}\n\nexport interface TreeItemRenderProps {\n /** Whether the item is selected. */\n isSelected: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n /** Whether the item is expanded. */\n isExpanded: boolean;\n /** Whether the item is expandable (has children). */\n isExpandable: boolean;\n /** The nesting level (0 = root). */\n level: number;\n}\n\nexport interface TreeItemProps<T extends object> extends SlotProps {\n /** The unique key for the item. */\n id: Key;\n /** The item value. */\n item?: TreeItemData<T>;\n /** The children of the item. A function may be provided to receive render props. */\n children?: RenderChildren<TreeItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TreeItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TreeItemRenderProps>;\n /** The text value of the item (for accessibility). */\n textValue?: string;\n /** Handler called when the item is activated. */\n onAction?: () => void;\n}\n\nexport interface TreeExpandButtonProps {\n /** CSS class name for the button. */\n class?: string;\n /** CSS style for the button. */\n style?: JSX.CSSProperties;\n /** Children to render inside the button. */\n children?: JSX.Element | ((props: { isExpanded: boolean }) => JSX.Element);\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface TreeContextValue<T extends object> {\n state: TreeState<T, TreeCollection<T>>;\n collection: TreeCollection<T>;\n isDisabled: boolean;\n renderItem: (item: TreeItemData<T>, state: TreeRenderItemState) => JSX.Element;\n}\n\ninterface TreeItemContextValue<T extends object> {\n node: TreeNode<T>;\n isExpanded: boolean;\n isExpandable: boolean;\n level: number;\n}\n\nexport const TreeContext = createContext<TreeContextValue<object> | null>(null);\nexport const TreeStateContext = createContext<TreeState<object, TreeCollection<object>> | null>(null);\nexport const TreeItemContext = createContext<TreeItemContextValue<object> | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A tree displays hierarchical data with expandable/collapsible nodes,\n * supporting keyboard navigation and selection.\n */\nexport function Tree<T extends object>(props: TreeProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['class', 'style', 'slot', 'renderEmptyState'],\n [\n 'items',\n 'disabledKeys',\n 'selectionMode',\n 'selectedKeys',\n 'defaultSelectedKeys',\n 'onSelectionChange',\n 'expandedKeys',\n 'defaultExpandedKeys',\n 'onExpandedChange',\n ]\n );\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create tree state\n const state = createTreeState<T, TreeCollection<T>>(() => ({\n collectionFactory: (expandedKeys) =>\n createTreeCollection(stateProps.items, expandedKeys) as TreeCollection<T>,\n disabledKeys: stateProps.disabledKeys,\n selectionMode: stateProps.selectionMode,\n selectedKeys: stateProps.selectedKeys,\n defaultSelectedKeys: stateProps.defaultSelectedKeys,\n onSelectionChange: stateProps.onSelectionChange,\n expandedKeys: stateProps.expandedKeys,\n defaultExpandedKeys: stateProps.defaultExpandedKeys,\n onExpandedChange: stateProps.onExpandedChange,\n }));\n\n // Create tree aria props\n const { treeProps } = createTree<T, TreeCollection<T>>(\n () => ({\n id: ariaProps.id,\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isVirtualized: ariaProps.isVirtualized,\n onAction: ariaProps.onAction,\n isDisabled: ariaProps.isDisabled,\n }),\n () => state,\n ref\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<TreeRenderProps>(() => ({\n isFocused: state.isFocused || isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\n isEmpty: stateProps.items.length === 0,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Tree',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from spread props\n const cleanTreeProps = () => {\n const { ref: _ref1, ...rest } = treeProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n const isEmpty = () => stateProps.items.length === 0;\n\n const contextValue = createMemo<TreeContextValue<T>>(() => ({\n state,\n collection: state.collection,\n isDisabled: ariaProps.isDisabled ?? false,\n renderItem: props.children,\n }));\n\n // Render visible rows (flat list based on expansion state)\n const visibleRows = createMemo(() => state.collection.rows);\n\n return (\n <TreeContext.Provider value={contextValue() as unknown as TreeContextValue<object>}>\n <TreeStateContext.Provider value={state as unknown as TreeState<object, TreeCollection<object>>}>\n <div\n ref={setRef}\n {...domProps()}\n {...cleanTreeProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n data-empty={isEmpty() || undefined}\n >\n {isEmpty() && local.renderEmptyState ? (\n local.renderEmptyState()\n ) : (\n <For each={visibleRows()}>\n {(node) => {\n // Find the original item data to pass to render function\n const itemData: TreeItemData<T> = {\n key: node.key,\n value: node.value as T,\n textValue: node.textValue,\n children: node.hasChildNodes\n ? node.childNodes.map((child) => ({\n key: child.key,\n value: child.value as T,\n textValue: child.textValue,\n }))\n : undefined,\n };\n const itemState: TreeRenderItemState = {\n isExpanded: node.isExpanded ?? false,\n isExpandable: node.isExpandable ?? false,\n level: node.level,\n };\n return props.children(itemData, itemState);\n }}\n </For>\n )}\n </div>\n </TreeStateContext.Provider>\n </TreeContext.Provider>\n );\n}\n\n/**\n * An item in a tree.\n */\nexport function TreeItem<T extends object>(props: TreeItemProps<T>): JSX.Element {\n const [local] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n 'onAction',\n ]);\n\n // Get state from context\n const context = useContext(TreeStateContext);\n if (!context) {\n throw new Error('TreeItem must be used within a Tree');\n }\n const state = context as TreeState<T, TreeCollection<T>>;\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLDivElement | null>(null);\n\n // Find the item node\n const itemNode = createMemo(() => {\n const node = state.collection.getItem(local.id);\n if (!node) {\n // Create a simple node for the item\n return {\n type: 'item' as const,\n key: local.id,\n value: local.item?.value ?? null,\n textValue: local.textValue ?? String(local.id),\n level: 0,\n index: 0,\n hasChildNodes: false,\n childNodes: [],\n isExpandable: false,\n isExpanded: false,\n } as TreeNode<T>;\n }\n return node;\n });\n\n // Create item aria props\n const {\n rowProps,\n gridCellProps,\n expandButtonProps: _expandButtonProps,\n isSelected,\n isDisabled,\n isPressed,\n isExpanded,\n isExpandable,\n level,\n } = createTreeItem<T, TreeCollection<T>>(\n () => ({\n node: itemNode(),\n onAction: local.onAction,\n }),\n () => state,\n ref\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled;\n },\n });\n\n // Create focus ring\n const { isFocusVisible, focusProps } = createFocusRing();\n\n // Check if focused\n const isFocused = createMemo(() => state.focusedKey === local.id);\n\n // Render props values\n const renderValues = createMemo<TreeItemRenderProps>(() => ({\n isSelected,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible() && isFocused(),\n isPressed,\n isHovered: isHovered(),\n isDisabled,\n isExpanded,\n isExpandable,\n level,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Tree-item',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanRowProps = () => {\n const { ref: _ref1, ...rest } = rowProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n // Item context for nested components\n const itemContextValue = createMemo<TreeItemContextValue<T>>(() => ({\n node: itemNode(),\n isExpanded,\n isExpandable,\n level,\n }));\n\n return (\n <TreeItemContext.Provider value={itemContextValue() as TreeItemContextValue<object>}>\n <div\n ref={setRef}\n {...cleanRowProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={isSelected || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={(isFocusVisible() && isFocused()) || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled || undefined}\n data-expanded={isExpanded || undefined}\n data-expandable={isExpandable || undefined}\n data-level={level}\n >\n <div {...gridCellProps} class=\"solidaria-Tree-item-content\">\n {renderProps.renderChildren()}\n </div>\n </div>\n </TreeItemContext.Provider>\n );\n}\n\n/**\n * A button to expand/collapse a tree item.\n */\nexport function TreeExpandButton(props: TreeExpandButtonProps): JSX.Element {\n // Get item context\n const itemContext = useContext(TreeItemContext);\n if (!itemContext) {\n throw new Error('TreeExpandButton must be used within a Tree');\n }\n\n // Get state context\n const stateContext = useContext(TreeStateContext);\n if (!stateContext) {\n throw new Error('TreeExpandButton must be used within a Tree');\n }\n\n const state = stateContext as TreeState<object, TreeCollection<object>>;\n\n // Create expand button props\n const { expandButtonProps } = createTreeItem(\n () => ({ node: itemContext.node }),\n () => state,\n () => null\n );\n\n // Remove ref and add custom handling\n const cleanExpandProps = () => {\n const { ref: _ref, ...rest } = expandButtonProps as Record<string, unknown>;\n return rest;\n };\n\n const isExpanded = createMemo(() => state.isExpanded(itemContext.node.key));\n\n // Render children\n const renderChildren = () => {\n if (typeof props.children === 'function') {\n return props.children({ isExpanded: isExpanded() });\n }\n return props.children;\n };\n\n return (\n <Show when={itemContext.isExpandable}>\n <button\n {...cleanExpandProps()}\n class={props.class ?? 'solidaria-Tree-expand-button'}\n style={props.style}\n data-expanded={isExpanded() || undefined}\n >\n {renderChildren()}\n </button>\n </Show>\n );\n}\n\n/**\n * A checkbox for item selection in a tree.\n */\nexport function TreeSelectionCheckbox(props: { itemKey: Key }): JSX.Element {\n const context = useContext(TreeStateContext);\n if (!context) {\n throw new Error('TreeSelectionCheckbox must be used within a Tree');\n }\n\n const state = context as TreeState<object, TreeCollection<object>>;\n\n const { checkboxProps } = createTreeSelectionCheckbox<object, TreeCollection<object>>(\n () => ({ key: props.itemKey }),\n () => state\n );\n\n return <input {...checkboxProps} class=\"solidaria-Tree-checkbox\" />;\n}\n\n// Attach static properties\nTree.Item = TreeItem;\nTree.ExpandButton = TreeExpandButton;\nTree.SelectionCheckbox = TreeSelectionCheckbox;\n", "/**\n * Color components for solidaria-components\n *\n * Pre-wired headless color picker components that combine state + aria hooks.\n * Port of react-aria-components color components.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n Show,\n} from 'solid-js';\nimport {\n createColorSlider,\n createColorArea,\n createColorWheel,\n createColorField,\n createColorSwatch,\n createFocusRing,\n createHover,\n type AriaColorSliderOptions,\n type AriaColorAreaOptions,\n type AriaColorWheelOptions,\n type AriaColorFieldOptions,\n} from '@proyecto-viviana/solidaria';\nimport {\n createColorSliderState,\n createColorAreaState,\n createColorWheelState,\n createColorFieldState,\n normalizeColor,\n type Color,\n type ColorChannel,\n type ColorFormat,\n type ColorSliderState,\n type ColorAreaState,\n type ColorWheelState,\n type ColorFieldState,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// COLOR SLIDER\n// ============================================\n\nexport interface ColorSliderRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the slider is being dragged. */\n isDragging: boolean;\n /** The color channel being controlled. */\n channel?: ColorChannel;\n /** The current value. */\n value: number;\n /** The current color. */\n color: Color;\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderOptions, 'channel'>, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color) => void;\n /** Handler called when dragging ends. */\n onChangeEnd?: (color: Color) => void;\n /** The color channel to control. */\n channel?: ColorChannel;\n /** A visible label for the slider. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<ColorSliderRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSliderRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSliderRenderProps>;\n}\n\nexport interface ColorSliderTrackRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the slider is being dragged. */\n isDragging: boolean;\n}\n\nexport interface ColorSliderTrackProps extends SlotProps {\n /** The children of the track. */\n children?: RenderChildren<ColorSliderTrackRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSliderTrackRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSliderTrackRenderProps>;\n}\n\nexport interface ColorSliderThumbRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the thumb is being dragged. */\n isDragging: boolean;\n /** Whether the thumb is focused. */\n isFocused: boolean;\n /** Whether the thumb has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the thumb is hovered. */\n isHovered: boolean;\n}\n\nexport interface ColorSliderThumbProps extends SlotProps {\n /** The children of the thumb. */\n children?: RenderChildren<ColorSliderThumbRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSliderThumbRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSliderThumbRenderProps>;\n}\n\n// Context\ninterface ColorSliderContextValue {\n state: ColorSliderState;\n trackProps: JSX.HTMLAttributes<HTMLDivElement>;\n thumbProps: JSX.HTMLAttributes<HTMLDivElement>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n trackRef: HTMLDivElement | undefined;\n setTrackRef: (el: HTMLDivElement) => void;\n}\n\nexport const ColorSliderContext = createContext<ColorSliderContextValue | null>(null);\n\n/**\n * A color slider allows users to adjust a single color channel.\n */\nexport function ColorSlider(props: ColorSliderProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'label'],\n ['value', 'defaultValue', 'onChange', 'onChangeEnd', 'channel'],\n ['aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled', 'channelName']\n );\n\n // Create color slider state\n const state = createColorSliderState(() => ({\n value: stateProps.value,\n defaultValue: stateProps.defaultValue,\n onChange: stateProps.onChange,\n onChangeEnd: stateProps.onChangeEnd,\n channel: stateProps.channel!,\n isDisabled: ariaProps.isDisabled,\n }));\n\n // Track ref\n let trackRef: HTMLDivElement | undefined;\n const setTrackRef = (el: HTMLDivElement) => {\n trackRef = el;\n };\n\n // Create color slider aria props\n const {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n } = createColorSlider(\n () => ({\n channel: stateProps.channel!,\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isDisabled: ariaProps.isDisabled,\n channelName: ariaProps.channelName,\n }),\n () => state,\n () => trackRef ?? null\n );\n\n // Render props values\n const renderValues = createMemo<ColorSliderRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n channel: state.channel,\n value: state.getThumbValue(),\n color: state.value,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorSlider',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <ColorSliderContext.Provider\n value={{\n state,\n trackProps,\n thumbProps,\n inputProps,\n trackRef,\n setTrackRef,\n }}\n >\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-channel={state.channel}\n >\n {/* Label */}\n <Show when={local.label}>\n <label {...labelProps}>{local.label}</label>\n </Show>\n\n {renderProps.renderChildren()}\n\n {/* Hidden input for accessibility */}\n <input {...inputProps} />\n </div>\n </ColorSliderContext.Provider>\n );\n}\n\n/**\n * The track element of a color slider.\n */\nexport function ColorSliderTrack(props: ColorSliderTrackProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorSliderContext);\n if (!context) {\n throw new Error('ColorSliderTrack must be used within a ColorSlider');\n }\n\n const { state, trackProps, setTrackRef } = context;\n\n // Render props values\n const renderValues = createMemo<ColorSliderTrackRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorSlider-track',\n },\n renderValues\n );\n\n // Clean props\n const cleanTrackProps = () => {\n const { ref: _ref, style: _trackStyle, ...rest } = trackProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const trackStyle = (trackProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...trackStyle, ...renderStyle };\n };\n\n return (\n <div\n ref={setTrackRef}\n {...cleanTrackProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The thumb element of a color slider.\n */\nexport function ColorSliderThumb(props: ColorSliderThumbProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorSliderContext);\n if (!context) {\n throw new Error('ColorSliderThumb must be used within a ColorSlider');\n }\n\n const { state, thumbProps } = context;\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ColorSliderThumbRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorSlider-thumb',\n },\n renderValues\n );\n\n // Clean props\n const cleanThumbProps = () => {\n const { ref: _ref, style: _thumbStyle, ...rest } = thumbProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const thumbStyle = (thumbProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...thumbStyle, ...renderStyle };\n };\n\n return (\n <div\n {...cleanThumbProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n// Attach sub-components\nColorSlider.Track = ColorSliderTrack;\nColorSlider.Thumb = ColorSliderThumb;\n\n// ============================================\n// COLOR AREA\n// ============================================\n\nexport interface ColorAreaRenderProps {\n /** Whether the area is disabled. */\n isDisabled: boolean;\n /** Whether the area is being dragged. */\n isDragging: boolean;\n /** The X channel. */\n xChannel: ColorChannel;\n /** The Y channel. */\n yChannel: ColorChannel;\n /** The current color. */\n color: Color;\n}\n\nexport interface ColorAreaProps extends AriaColorAreaOptions, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color) => void;\n /** Handler called when dragging ends. */\n onChangeEnd?: (color: Color) => void;\n /** The X channel to control. */\n xChannel?: ColorChannel;\n /** The Y channel to control. */\n yChannel?: ColorChannel;\n /** Whether the color area is disabled. */\n isDisabled?: boolean;\n /** The children of the component. */\n children?: RenderChildren<ColorAreaRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorAreaRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorAreaRenderProps>;\n}\n\nexport interface ColorAreaGradientRenderProps {\n /** Whether the area is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ColorAreaGradientProps extends SlotProps {\n /** The children of the gradient. */\n children?: RenderChildren<ColorAreaGradientRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorAreaGradientRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorAreaGradientRenderProps>;\n}\n\nexport interface ColorAreaThumbRenderProps {\n /** Whether the area is disabled. */\n isDisabled: boolean;\n /** Whether the thumb is being dragged. */\n isDragging: boolean;\n /** Whether the thumb is focused. */\n isFocused: boolean;\n /** Whether the thumb has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the thumb is hovered. */\n isHovered: boolean;\n}\n\nexport interface ColorAreaThumbProps extends SlotProps {\n /** The children of the thumb. */\n children?: RenderChildren<ColorAreaThumbRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorAreaThumbRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorAreaThumbRenderProps>;\n}\n\n// Context\ninterface ColorAreaContextValue {\n state: ColorAreaState;\n colorAreaProps: JSX.HTMLAttributes<HTMLDivElement>;\n gradientProps: JSX.HTMLAttributes<HTMLDivElement>;\n thumbProps: JSX.HTMLAttributes<HTMLDivElement>;\n xInputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n yInputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n areaRef: HTMLDivElement | undefined;\n setAreaRef: (el: HTMLDivElement) => void;\n}\n\nexport const ColorAreaContext = createContext<ColorAreaContextValue | null>(null);\n\n/**\n * A color area allows users to select a color using a 2D gradient.\n */\nexport function ColorArea(props: ColorAreaProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n ['value', 'defaultValue', 'onChange', 'onChangeEnd', 'xChannel', 'yChannel'],\n ['aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled']\n );\n\n // Create color area state\n const state = createColorAreaState(() => ({\n value: stateProps.value,\n defaultValue: stateProps.defaultValue,\n onChange: stateProps.onChange,\n onChangeEnd: stateProps.onChangeEnd,\n xChannel: stateProps.xChannel,\n yChannel: stateProps.yChannel,\n isDisabled: ariaProps.isDisabled,\n }));\n\n // Area ref\n let areaRef: HTMLDivElement | undefined;\n const setAreaRef = (el: HTMLDivElement) => {\n areaRef = el;\n };\n\n // Create color area aria props\n const {\n colorAreaProps,\n gradientProps,\n thumbProps,\n xInputProps,\n yInputProps,\n } = createColorArea(\n () => ({\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isDisabled: ariaProps.isDisabled,\n }),\n () => state,\n () => areaRef ?? null\n );\n\n // Render props values\n const renderValues = createMemo<ColorAreaRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n xChannel: state.xChannel,\n yChannel: state.yChannel,\n color: state.value,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorArea',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Clean props\n const cleanColorAreaProps = () => {\n const { ref: _ref, style: _areaStyle, ...rest } = colorAreaProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const areaStyle = (colorAreaProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...areaStyle, ...renderStyle };\n };\n\n return (\n <ColorAreaContext.Provider\n value={{\n state,\n colorAreaProps,\n gradientProps,\n thumbProps,\n xInputProps,\n yInputProps,\n areaRef,\n setAreaRef,\n }}\n >\n <div\n ref={setAreaRef}\n {...domProps()}\n {...cleanColorAreaProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n >\n {renderProps.renderChildren()}\n\n {/* Hidden inputs for accessibility */}\n <input {...xInputProps} />\n <input {...yInputProps} />\n </div>\n </ColorAreaContext.Provider>\n );\n}\n\n/**\n * The gradient background of a color area.\n */\nexport function ColorAreaGradient(props: ColorAreaGradientProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorAreaContext);\n if (!context) {\n throw new Error('ColorAreaGradient must be used within a ColorArea');\n }\n\n const { state, gradientProps } = context;\n\n // Render props values\n const renderValues = createMemo<ColorAreaGradientRenderProps>(() => ({\n isDisabled: state.isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorArea-gradient',\n },\n renderValues\n );\n\n // Clean props\n const cleanGradientProps = () => {\n const { ref: _ref, style: _gradStyle, ...rest } = gradientProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const gradStyle = (gradientProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...gradStyle, ...renderStyle };\n };\n\n return (\n <div\n {...cleanGradientProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The thumb element of a color area.\n */\nexport function ColorAreaThumb(props: ColorAreaThumbProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorAreaContext);\n if (!context) {\n throw new Error('ColorAreaThumb must be used within a ColorArea');\n }\n\n const { state, thumbProps } = context;\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ColorAreaThumbRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorArea-thumb',\n },\n renderValues\n );\n\n // Clean props\n const cleanThumbProps = () => {\n const { ref: _ref, style: _thumbStyle, ...rest } = thumbProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const thumbStyle = (thumbProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...thumbStyle, ...renderStyle };\n };\n\n return (\n <div\n {...cleanThumbProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n// Attach sub-components\nColorArea.Gradient = ColorAreaGradient;\nColorArea.Thumb = ColorAreaThumb;\n\n// ============================================\n// COLOR WHEEL\n// ============================================\n\nexport interface ColorWheelRenderProps {\n /** Whether the wheel is disabled. */\n isDisabled: boolean;\n /** Whether the wheel is being dragged. */\n isDragging: boolean;\n /** The current hue value (0-360). */\n hue: number;\n /** The current color. */\n color: Color;\n}\n\nexport interface ColorWheelProps extends AriaColorWheelOptions, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color) => void;\n /** Handler called when dragging ends. */\n onChangeEnd?: (color: Color) => void;\n /** The children of the component. */\n children?: RenderChildren<ColorWheelRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorWheelRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorWheelRenderProps>;\n}\n\nexport interface ColorWheelTrackRenderProps {\n /** Whether the wheel is disabled. */\n isDisabled: boolean;\n /** Whether the wheel is being dragged. */\n isDragging: boolean;\n}\n\nexport interface ColorWheelTrackProps extends SlotProps {\n /** The children of the track. */\n children?: RenderChildren<ColorWheelTrackRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorWheelTrackRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorWheelTrackRenderProps>;\n}\n\nexport interface ColorWheelThumbRenderProps {\n /** Whether the wheel is disabled. */\n isDisabled: boolean;\n /** Whether the thumb is being dragged. */\n isDragging: boolean;\n /** Whether the thumb is focused. */\n isFocused: boolean;\n /** Whether the thumb has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the thumb is hovered. */\n isHovered: boolean;\n}\n\nexport interface ColorWheelThumbProps extends SlotProps {\n /** The children of the thumb. */\n children?: RenderChildren<ColorWheelThumbRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorWheelThumbRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorWheelThumbRenderProps>;\n}\n\n// Context\ninterface ColorWheelContextValue {\n state: ColorWheelState;\n trackProps: JSX.HTMLAttributes<HTMLDivElement>;\n thumbProps: JSX.HTMLAttributes<HTMLDivElement>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n wheelRef: HTMLDivElement | undefined;\n setWheelRef: (el: HTMLDivElement) => void;\n}\n\nexport const ColorWheelContext = createContext<ColorWheelContextValue | null>(null);\n\n/**\n * A color wheel allows users to select a hue using a circular control.\n */\nexport function ColorWheel(props: ColorWheelProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n ['value', 'defaultValue', 'onChange', 'onChangeEnd'],\n ['aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled']\n );\n\n // Create color wheel state\n const state = createColorWheelState(() => ({\n value: stateProps.value,\n defaultValue: stateProps.defaultValue,\n onChange: stateProps.onChange,\n onChangeEnd: stateProps.onChangeEnd,\n isDisabled: ariaProps.isDisabled,\n }));\n\n // Wheel ref\n let wheelRef: HTMLDivElement | undefined;\n const setWheelRef = (el: HTMLDivElement) => {\n wheelRef = el;\n };\n\n // Create color wheel aria props\n const {\n trackProps,\n thumbProps,\n inputProps,\n } = createColorWheel(\n () => ({\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isDisabled: ariaProps.isDisabled,\n }),\n () => state,\n () => wheelRef ?? null\n );\n\n // Render props values\n const renderValues = createMemo<ColorWheelRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n hue: state.getHue(),\n color: state.value,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorWheel',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <ColorWheelContext.Provider\n value={{\n state,\n trackProps,\n thumbProps,\n inputProps,\n wheelRef,\n setWheelRef,\n }}\n >\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n >\n {renderProps.renderChildren()}\n\n {/* Hidden input for accessibility */}\n <input {...inputProps} />\n </div>\n </ColorWheelContext.Provider>\n );\n}\n\n/**\n * The track element of a color wheel.\n */\nexport function ColorWheelTrack(props: ColorWheelTrackProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorWheelContext);\n if (!context) {\n throw new Error('ColorWheelTrack must be used within a ColorWheel');\n }\n\n const { state, trackProps, setWheelRef } = context;\n\n // Render props values\n const renderValues = createMemo<ColorWheelTrackRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorWheel-track',\n },\n renderValues\n );\n\n // Clean props\n const cleanTrackProps = () => {\n const { ref: _ref, style: _trackStyle, ...rest } = trackProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const trackStyle = (trackProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...trackStyle, ...renderStyle };\n };\n\n return (\n <div\n ref={setWheelRef}\n {...cleanTrackProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The thumb element of a color wheel.\n */\nexport function ColorWheelThumb(props: ColorWheelThumbProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorWheelContext);\n if (!context) {\n throw new Error('ColorWheelThumb must be used within a ColorWheel');\n }\n\n const { state, thumbProps } = context;\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ColorWheelThumbRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorWheel-thumb',\n },\n renderValues\n );\n\n // Clean props\n const cleanThumbProps = () => {\n const { ref: _ref, style: _thumbStyle, ...rest } = thumbProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const thumbStyle = (thumbProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...thumbStyle, ...renderStyle };\n };\n\n return (\n <div\n {...cleanThumbProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n// Attach sub-components\nColorWheel.Track = ColorWheelTrack;\nColorWheel.Thumb = ColorWheelThumb;\n\n// ============================================\n// COLOR FIELD\n// ============================================\n\nexport interface ColorFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the input value is invalid. */\n isInvalid: boolean;\n /** The current color value (null if invalid). */\n color: Color | null;\n /** The color channel being edited (if single channel mode). */\n channel: ColorChannel | undefined;\n}\n\nexport interface ColorFieldProps extends AriaColorFieldOptions, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string | null;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color | null) => void;\n /** The color channel to edit (for single channel mode). */\n channel?: ColorChannel;\n /** The color format for parsing/displaying. */\n colorFormat?: ColorFormat;\n /** Whether the color field is disabled. */\n isDisabled?: boolean;\n /** A visible label for the field. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<ColorFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorFieldRenderProps>;\n}\n\nexport interface ColorFieldInputRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the input value is invalid. */\n isInvalid: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n /** Whether the input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the input is hovered. */\n isHovered: boolean;\n}\n\nexport interface ColorFieldInputProps extends SlotProps {\n /** The children of the input (usually not used). */\n children?: RenderChildren<ColorFieldInputRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorFieldInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorFieldInputRenderProps>;\n}\n\n// Context\ninterface ColorFieldContextValue {\n state: ColorFieldState;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n}\n\nexport const ColorFieldContext = createContext<ColorFieldContextValue | null>(null);\n\n/**\n * A color field allows users to enter a color value as text.\n */\nexport function ColorField(props: ColorFieldProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'label'],\n ['value', 'defaultValue', 'onChange', 'channel', 'colorFormat'],\n ['aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled', 'isReadOnly']\n );\n\n // Create color field state\n const state = createColorFieldState(() => ({\n value: stateProps.value,\n defaultValue: stateProps.defaultValue,\n onChange: stateProps.onChange,\n channel: stateProps.channel,\n colorFormat: stateProps.colorFormat,\n isDisabled: ariaProps.isDisabled,\n isReadOnly: ariaProps.isReadOnly,\n }));\n\n // Input ref\n let inputRef: HTMLInputElement | undefined;\n\n // Create color field aria props\n const {\n inputProps,\n labelProps,\n } = createColorField(\n () => ({\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isDisabled: ariaProps.isDisabled,\n isReadOnly: ariaProps.isReadOnly,\n channel: stateProps.channel,\n }),\n () => state,\n () => inputRef ?? null\n );\n\n // Render props values\n const renderValues = createMemo<ColorFieldRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n color: state.value,\n channel: state.channel,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorField',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <ColorFieldContext.Provider\n value={{\n state,\n inputProps,\n labelProps,\n }}\n >\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n >\n {/* Label */}\n <Show when={local.label}>\n <label {...labelProps}>{local.label}</label>\n </Show>\n\n {renderProps.renderChildren()}\n </div>\n </ColorFieldContext.Provider>\n );\n}\n\n/**\n * The input element of a color field.\n */\nexport function ColorFieldInput(props: ColorFieldInputProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorFieldContext);\n if (!context) {\n throw new Error('ColorFieldInput must be used within a ColorField');\n }\n\n const { state, inputProps } = context;\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ColorFieldInputRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorField-input',\n },\n renderValues\n );\n\n // Clean props\n const cleanInputProps = () => {\n const { ref: _ref, style: _inputStyle, ...rest } = inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <input\n {...cleanInputProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n />\n );\n}\n\n// Attach sub-components\nColorField.Input = ColorFieldInput;\n\n// ============================================\n// COLOR SWATCH\n// ============================================\n\nexport interface ColorSwatchRenderProps {\n /** The color being displayed. */\n color: Color;\n /** The color as a CSS string. */\n colorValue: string;\n}\n\nexport interface ColorSwatchProps extends SlotProps {\n /** The color to display. */\n color: Color | string;\n /** Accessible label for the swatch. */\n 'aria-label'?: string;\n /** The children of the component. */\n children?: RenderChildren<ColorSwatchRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSwatchRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSwatchRenderProps>;\n}\n\n/**\n * A color swatch displays a preview of a color.\n */\nexport function ColorSwatch(props: ColorSwatchProps): JSX.Element {\n const [local, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'color'],\n ['aria-label']\n );\n\n // Create color swatch aria props\n const { swatchProps } = createColorSwatch(() => ({\n color: local.color,\n 'aria-label': ariaProps['aria-label'],\n }));\n\n // Normalize color\n const color = createMemo(() => normalizeColor(local.color));\n\n // Render props values\n const renderValues = createMemo<ColorSwatchRenderProps>(() => ({\n color: color(),\n colorValue: color().toString('css'),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorSwatch',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Clean props\n const cleanSwatchProps = () => {\n const { ref: _ref, style: _swatchStyle, ...rest } = swatchProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const swatchStyle = (swatchProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...swatchStyle, ...renderStyle };\n };\n\n return (\n <div\n {...domProps()}\n {...cleanSwatchProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n", "/**\n * Landmark component for solidaria-components\n *\n * Pre-wired headless landmark component that combines aria hooks.\n * Enables F6 keyboard navigation between major page sections.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n} from 'solid-js';\nimport { Dynamic } from 'solid-js/web';\nimport {\n createLandmark,\n getLandmarkController,\n type AriaLandmarkProps,\n type AriaLandmarkRole,\n type LandmarkController,\n} from '@proyecto-viviana/solidaria';\nimport {\n type SlotProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface LandmarkRenderProps {\n /** The ARIA landmark role. */\n role: AriaLandmarkRole;\n}\n\nexport interface LandmarkProps\n extends AriaLandmarkProps,\n SlotProps {\n /**\n * The HTML element type to render.\n * @default 'div' (or semantic element based on role)\n */\n elementType?: keyof JSX.IntrinsicElements;\n /** The CSS className for the element. A function may be provided to receive render props. */\n class?: string | ((renderProps: LandmarkRenderProps) => string);\n /** The inline style for the element. A function may be provided to receive render props. */\n style?: JSX.CSSProperties | ((renderProps: LandmarkRenderProps) => JSX.CSSProperties);\n /** Children content. */\n children?: JSX.Element;\n}\n\n// Re-export types\nexport type { AriaLandmarkRole, LandmarkController };\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const LandmarkContext = createContext<LandmarkProps | null>(null);\n\n// ============================================\n// SEMANTIC ELEMENT MAPPING\n// ============================================\n\n/**\n * Maps ARIA landmark roles to their semantic HTML elements.\n * Using semantic elements is preferred when possible.\n */\nconst roleToSemanticElement: Partial<Record<AriaLandmarkRole, keyof JSX.IntrinsicElements>> = {\n main: 'main',\n navigation: 'nav',\n search: 'search', // HTML5.3 <search> element\n banner: 'header',\n contentinfo: 'footer',\n complementary: 'aside',\n form: 'form',\n region: 'section',\n};\n\n// ============================================\n// LANDMARK COMPONENT\n// ============================================\n\n/**\n * A landmark is a region of the page that helps screen reader users navigate.\n * Press F6 to cycle through landmarks, or Shift+F6 to go backwards.\n *\n * @example\n * ```tsx\n * // Main content area\n * <Landmark role=\"main\" aria-label=\"Main content\">\n * <h1>Welcome</h1>\n * <p>Page content here...</p>\n * </Landmark>\n *\n * // Navigation\n * <Landmark role=\"navigation\" aria-label=\"Primary navigation\">\n * <nav>...</nav>\n * </Landmark>\n *\n * // Search\n * <Landmark role=\"search\" aria-label=\"Site search\">\n * <form>...</form>\n * </Landmark>\n *\n * // Custom element type\n * <Landmark role=\"region\" aria-label=\"Featured content\" elementType=\"div\">\n * ...\n * </Landmark>\n * ```\n */\nexport function Landmark(props: LandmarkProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'children',\n 'elementType',\n ]);\n\n // Element ref\n const [ref, setRef] = createSignal<HTMLElement>();\n\n // Determine the element type - use semantic element for the role if not specified\n const elementType = createMemo(() => {\n if (local.elementType) {\n return local.elementType;\n }\n return roleToSemanticElement[ariaProps.role] ?? 'div';\n });\n\n // Create landmark aria props\n const landmarkAria = createLandmark(\n {\n get role() { return ariaProps.role; },\n get 'aria-label'() { return ariaProps['aria-label']; },\n get 'aria-labelledby'() { return ariaProps['aria-labelledby']; },\n get id() { return ariaProps.id; },\n get focus() { return ariaProps.focus; },\n },\n ref\n );\n\n // Render props values\n const renderValues = createMemo<LandmarkRenderProps>(() => ({\n role: ariaProps.role,\n }));\n\n // Resolve class\n const resolvedClass = createMemo(() => {\n const cls = local.class;\n if (typeof cls === 'function') {\n return cls(renderValues());\n }\n return cls ?? `solidaria-Landmark solidaria-Landmark--${ariaProps.role}`;\n });\n\n // Resolve style\n const resolvedStyle = createMemo(() => {\n const style = local.style;\n if (typeof style === 'function') {\n return style(renderValues());\n }\n return style;\n });\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <Dynamic\n component={elementType()}\n ref={setRef}\n {...domProps()}\n {...landmarkAria.landmarkProps}\n class={resolvedClass()}\n style={resolvedStyle()}\n slot={local.slot}\n >\n {props.children}\n </Dynamic>\n );\n}\n\n// ============================================\n// LANDMARK CONTROLLER EXPORT\n// ============================================\n\n/**\n * Returns a controller for programmatic landmark navigation.\n *\n * @example\n * ```tsx\n * const controller = useLandmarkController();\n *\n * <button onClick={() => controller.focusMain()}>Skip to main content</button>\n * <button onClick={() => controller.focusNext()}>Next landmark</button>\n * ```\n */\nexport function useLandmarkController(): LandmarkController {\n return getLandmarkController();\n}\n"],
|
|
5
|
-
"mappings": ";;;AAKA,SAIEA,eACAC,YACAC,YACAC,cACAC,SACAC,YACK;AACP,SAASC,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utility functions for solidaria-components\n * Port of react-aria-components/src/utils.tsx\n */\n\nimport {\n type JSX,\n type Accessor,\n type FlowComponent,\n createContext,\n useContext,\n createMemo,\n createSignal,\n onMount,\n Show,\n} from 'solid-js';\nimport { isServer } from 'solid-js/web';\n\n// ============================================\n// TYPES\n// ============================================\n\n/**\n * Render props pattern - children can be a function that receives state\n */\nexport type RenderChildren<T> = JSX.Element | ((renderProps: T) => JSX.Element);\n\n/**\n * Class name can be a string or a function that computes based on state\n */\nexport type ClassNameOrFunction<T> = string | ((renderProps: T) => string);\n\n/**\n * Style can be an object or a function that computes based on state\n */\nexport type StyleOrFunction<T> = JSX.CSSProperties | ((renderProps: T) => JSX.CSSProperties);\n\n/**\n * Common render props interface\n */\nexport interface RenderPropsBase<T> {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<T>;\n /** The CSS className for the element. A function may be provided to compute the class based on state. */\n class?: ClassNameOrFunction<T>;\n /** The inline style for the element. A function may be provided to compute the style based on state. */\n style?: StyleOrFunction<T>;\n}\n\n/**\n * Slot props for named slots\n */\nexport interface SlotProps {\n /** A slot name for the component. */\n slot?: string;\n}\n\n// ============================================\n// RENDER PROPS\n// ============================================\n\n/**\n * Return type for useRenderProps\n */\nexport interface RenderPropsResult<T> {\n /** Accessor for class - safe to call anytime */\n class: Accessor<string>;\n /** Accessor for style - safe to call anytime */\n style: Accessor<JSX.CSSProperties | undefined>;\n /**\n * Render the children. This is a function that returns JSX, NOT a getter.\n * For SSR compatibility, this should be called within the JSX tree.\n *\n * Usage in components:\n * {renderProps.renderChildren()}\n *\n * Or if you need the raw children/function:\n * {renderProps.renderChildren()}\n */\n renderChildren: () => JSX.Element;\n /** The raw children prop (function or JSX) - use renderChildren() in most cases */\n children: RenderChildren<T> | undefined;\n /** The render props values accessor */\n values: Accessor<T>;\n}\n\n/**\n * Resolves render props (children, class, style) based on component state.\n *\n * For SSR compatibility, children are NOT evaluated eagerly. Instead:\n * - Use `renderChildren()` to render children with current values\n * - Or access `children` directly if you need the raw prop\n *\n * This avoids the getter pattern that causes SSR hydration mismatches.\n */\nexport function useRenderProps<T extends object>(\n props: RenderPropsBase<T> & { defaultClassName?: string },\n values: Accessor<T>\n): RenderPropsResult<T> {\n const { children, class: className, style, defaultClassName = '' } = props;\n\n // Compute class and style eagerly (they don't depend on context)\n const computedClass = createMemo(() => {\n const currentValues = values();\n return typeof className === 'function'\n ? className(currentValues)\n : className ?? defaultClassName;\n });\n\n const computedStyle = createMemo(() => {\n const currentValues = values();\n return typeof style === 'function'\n ? style(currentValues)\n : style;\n });\n\n // Return object with explicit function for rendering children\n // This avoids the getter pattern that causes SSR issues\n return {\n class: computedClass,\n style: computedStyle,\n renderChildren: () => {\n const currentValues = values();\n return typeof children === 'function'\n ? children(currentValues)\n : children;\n },\n children,\n values,\n };\n}\n\n// ============================================\n// CONTEXT UTILITIES\n// ============================================\n\n/**\n * Context value that can be null or the actual value\n */\nexport type ContextValue<T> = T | null;\n\n/**\n * Creates a context with props and ref merging support\n */\nexport function createSlottedContext<T>() {\n return createContext<T | null>(null);\n}\n\n/**\n * Use context with null check\n */\nexport function useSlottedContext<T>(context: ReturnType<typeof createContext<T | null>>): T | null {\n return useContext(context);\n}\n\n// ============================================\n// DATA ATTRIBUTES\n// ============================================\n\n/**\n * Converts boolean state values to data attributes\n */\nexport function dataAttr(value: boolean | undefined): '' | undefined {\n return value ? '' : undefined;\n}\n\n/**\n * Creates data attributes from render props\n */\nexport function createDataAttributes<T extends Record<string, boolean | string | undefined>>(\n values: T\n): Record<string, string | undefined> {\n const result: Record<string, string | undefined> = {};\n\n for (const [key, value] of Object.entries(values)) {\n if (typeof value === 'boolean') {\n result[`data-${camelToKebab(key)}`] = value ? '' : undefined;\n } else if (value !== undefined) {\n result[`data-${camelToKebab(key)}`] = value;\n }\n }\n\n return result;\n}\n\nfunction camelToKebab(str: string): string {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\n// ============================================\n// PROPS UTILITIES\n// ============================================\n\n/**\n * Remove data attributes from props (for internal use)\n */\nexport function removeDataAttributes<T extends Record<string, unknown>>(props: T): T {\n const result: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(props)) {\n if (!key.startsWith('data-')) {\n result[key] = value;\n }\n }\n\n return result as T;\n}\n\n/**\n * Filter DOM props - keep only valid DOM attributes.\n *\n * @param props - Component props to filter\n * @param options - Options for filtering (global: include global attrs)\n * @returns Object containing only valid DOM props. Use type parameter R to specify return type.\n */\nexport function filterDOMProps<R extends object = Record<string, unknown>>(\n props: object,\n options: { global?: boolean } = {}\n): R {\n const { global = false } = options;\n const result: Record<string, unknown> = {};\n\n const globalAttrs = new Set([\n 'id', 'class', 'style', 'tabIndex', 'role', 'title', 'lang', 'dir',\n 'hidden', 'draggable', 'accessKey', 'contentEditable', 'spellcheck',\n ]);\n\n const ariaAttrs = /^aria-/;\n const dataAttrs = /^data-/;\n const eventHandlers = /^on[A-Z]/;\n\n for (const key in props) {\n if (\n Object.prototype.hasOwnProperty.call(props, key) &&\n (\n (global && globalAttrs.has(key)) ||\n ariaAttrs.test(key) ||\n dataAttrs.test(key) ||\n eventHandlers.test(key)\n )\n ) {\n result[key] = (props as Record<string, unknown>)[key];\n }\n }\n\n return result as R;\n}\n\n// ============================================\n// CLIENT-ONLY UTILITIES\n// ============================================\n\nexport interface ClientOnlyProps {\n /** The children to render only on the client */\n children: JSX.Element;\n /** Optional fallback to render during SSR and initial hydration */\n fallback?: JSX.Element;\n}\n\n/**\n * ClientOnly component - renders children only on the client side.\n *\n * During SSR, renders the fallback (or nothing).\n * During hydration, renders the same fallback to match SSR.\n * After hydration completes, switches to render children.\n *\n * This is useful for components that rely on browser APIs or\n * have different server/client output.\n *\n * @example\n * ```tsx\n * <ClientOnly fallback={<div>Loading...</div>}>\n * <Calendar />\n * </ClientOnly>\n * ```\n */\nexport const ClientOnly: FlowComponent<ClientOnlyProps> = (props) => {\n // On server, always render fallback\n if (isServer) {\n return <>{props.fallback}</>;\n }\n\n // On client, track if we've hydrated\n const [isHydrated, setIsHydrated] = createSignal(false);\n\n // onMount runs after hydration is complete\n onMount(() => {\n setIsHydrated(true);\n });\n\n return (\n <Show when={isHydrated()} fallback={props.fallback}>\n {props.children}\n </Show>\n );\n};\n\n/**\n * Returns true only on the client after hydration is complete.\n * Can be used to conditionally render client-only content.\n *\n * @example\n * ```tsx\n * const hydrated = useIsHydrated();\n * return (\n * <Show when={hydrated()} fallback={<Placeholder />}>\n * <ClientOnlyComponent />\n * </Show>\n * );\n * ```\n */\nexport function useIsHydrated(): Accessor<boolean> {\n // On server, always return false\n if (isServer) {\n return () => false;\n }\n\n // On client, start false and switch to true after animation frame\n // This ensures we're past the hydration phase\n const [isHydrated, setIsHydrated] = createSignal(false);\n\n // Use requestAnimationFrame to ensure we're past hydration\n // onMount may not fire during hydration for matching DOM\n requestAnimationFrame(() => {\n setIsHydrated(true);\n });\n\n return isHydrated;\n}\n", "/**\n * VisuallyHidden component for solidaria-components\n *\n * Hides content visually but keeps it accessible to screen readers.\n * Port of react-aria's VisuallyHidden.\n */\n\nimport { type JSX, type ParentProps, splitProps } from 'solid-js';\nimport { Dynamic } from 'solid-js/web';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface VisuallyHiddenProps extends ParentProps {\n /** The element type to render. @default 'span' */\n elementType?: keyof JSX.IntrinsicElements;\n /** Whether the element should be focusable when focused. */\n isFocusable?: boolean;\n}\n\n// ============================================\n// STYLES\n// ============================================\n\nconst visuallyHiddenStyles: JSX.CSSProperties = {\n border: '0',\n clip: 'rect(0 0 0 0)',\n 'clip-path': 'inset(50%)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n width: '1px',\n 'white-space': 'nowrap',\n};\n\n// ============================================\n// COMPONENT\n// ============================================\n\n/**\n * VisuallyHidden hides its children visually, while keeping content visible to screen readers.\n */\nexport function VisuallyHidden(props: VisuallyHiddenProps): JSX.Element {\n const [local, others] = splitProps(props, ['elementType', 'isFocusable']);\n\n const elementType = () => local.elementType ?? 'span';\n\n return (\n <Dynamic\n component={elementType()}\n style={visuallyHiddenStyles}\n {...others}\n >\n {props.children}\n </Dynamic>\n );\n}\n", "/**\n * Button component for solidaria-components\n *\n * A pre-wired headless button that combines state + aria hooks.\n * Port of react-aria-components/src/Button.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n} from 'solid-js';\nimport {\n createButton,\n createFocusRing,\n createHover,\n type AriaButtonProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\nimport { DialogTriggerContext, PopoverTriggerContext } from './contexts';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ButtonRenderProps {\n /** Whether the button is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the button is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the button is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the button is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the button is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ButtonProps\n extends Omit<AriaButtonProps, 'children'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<ButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ButtonRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const ButtonContext = createContext<ButtonProps | null>(null);\n\n// ============================================\n// COMPONENT\n// ============================================\n\n/**\n * A button allows a user to perform an action.\n *\n * This is a headless component that provides accessibility and state management.\n * Style it using the render props pattern or data attributes.\n *\n * @example\n * ```tsx\n * <Button onPress={() => alert('Pressed!')}>\n * {({ isPressed, isHovered }) => (\n * <span class={isPressed ? 'bg-blue-700' : isHovered ? 'bg-blue-600' : 'bg-blue-500'}>\n * Click me\n * </span>\n * )}\n * </Button>\n * ```\n */\nexport function Button(props: ButtonProps): JSX.Element {\n // Split props\n const [local, ariaProps] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Check if inside a DialogTrigger or PopoverTrigger - if so, toggle on press\n // NOTE: Context is captured at component creation time. For Buttons inside a Modal,\n // the Modal provides OverlayTriggerStateContext, but due to SolidJS's eager JSX evaluation,\n // components inside Modal children are created before the Modal's Show renders.\n // So we can't reliably use context here to determine if we're inside a Modal.\n const dialogTriggerContext = useContext(DialogTriggerContext);\n const popoverTriggerContext = useContext(PopoverTriggerContext);\n\n // Helper to resolve isDisabled (handles both boolean and Accessor<boolean>)\n const resolveDisabled = (): boolean => {\n const disabled = ariaProps.isDisabled;\n if (typeof disabled === 'function') {\n return disabled();\n }\n return !!disabled;\n };\n\n // Determine if this button should act as a dialog/popover trigger\n // We only toggle if:\n // 1. We have DialogTriggerContext or PopoverTriggerContext (we're inside a trigger)\n // 2. AND there is NO onPress handler (the trigger button typically has no onPress,\n // while close buttons inside dialogs have onPress={close})\n // This heuristic works because:\n // - Trigger buttons: don't have onPress, should toggle\n // - Close buttons: have onPress={close}, should NOT toggle (just call onPress)\n const isDialogTrigger = () => dialogTriggerContext && !ariaProps.onPress;\n const isPopoverTrigger = () => popoverTriggerContext && !ariaProps.onPress;\n\n // Wrap onPress to also toggle dialog/popover if this is a trigger button\n const handlePress = (e: any) => {\n // Call original onPress if provided\n if (typeof ariaProps.onPress === 'function') {\n ariaProps.onPress(e);\n }\n // Toggle dialog only if this is a trigger button (has no onPress handler)\n if (isDialogTrigger()) {\n dialogTriggerContext!.state.toggle();\n }\n // Toggle popover only if this is a trigger button (has no onPress handler)\n if (isPopoverTrigger()) {\n popoverTriggerContext!.state.toggle();\n }\n };\n\n // Create button aria props\n const buttonAria = createButton({\n ...ariaProps,\n onPress: handlePress,\n get isDisabled() {\n return resolveDisabled();\n },\n });\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return resolveDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<ButtonRenderProps>(() => ({\n isHovered: isHovered(),\n isPressed: buttonAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: resolveDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Button',\n },\n renderValues\n );\n\n // Filter DOM props\n // Remove onClick from DOM props - it's already handled by createPress\n // This matches React Aria Components behavior (Button.tsx line 144: delete DOMProps.onClick)\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n // onClick is handled by createPress, not passed directly to DOM\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n // Extract refs from props to combine them manually\n const buttonPropsRef = (buttonAria.buttonProps as Record<string, unknown>).ref as ((el: HTMLElement) => void) | undefined;\n const focusPropsRef = (focusProps as Record<string, unknown>).ref as ((el: HTMLElement) => void) | undefined;\n const hoverPropsRef = (hoverProps as Record<string, unknown>).ref as ((el: HTMLElement) => void) | undefined;\n\n // Remove ref from spread props to avoid type conflicts\n const cleanButtonProps = () => {\n const { ref: _ref1, ...rest } = buttonAria.buttonProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref3, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Ref callback that combines all refs\n const handleRef = (el: HTMLButtonElement) => {\n // Call the focusable ref for autoFocus support\n buttonPropsRef?.(el);\n focusPropsRef?.(el);\n hoverPropsRef?.(el);\n\n // If this button is a popover trigger, register it\n if (isPopoverTrigger() && popoverTriggerContext?.setTriggerRef) {\n popoverTriggerContext.setTriggerRef(el);\n }\n };\n\n return (\n <button\n ref={handleRef}\n {...domProps()}\n {...cleanButtonProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={buttonAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={resolveDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n", "/**\n * Shared contexts for overlay components.\n *\n * These are separated to avoid circular dependencies between\n * Dialog, Modal, Popover, and Button components.\n */\n\nimport { createContext, useContext } from 'solid-js'\nimport type { OverlayTriggerState as StatelyOverlayTriggerState } from '@proyecto-viviana/solid-stately'\n\n// ============================================\n// OVERLAY TRIGGER STATE CONTEXT\n// ============================================\n\nexport interface OverlayTriggerState {\n isOpen: boolean\n open: () => void\n close: () => void\n toggle: () => void\n}\n\nexport const OverlayTriggerStateContext = createContext<OverlayTriggerState | null>(null)\n\n/**\n * Hook to access the overlay trigger state from context.\n */\nexport function useOverlayTriggerState(): OverlayTriggerState | null {\n return useContext(OverlayTriggerStateContext)\n}\n\n// ============================================\n// DIALOG TRIGGER CONTEXT\n// ============================================\n\nexport interface DialogTriggerContextValue {\n state: StatelyOverlayTriggerState\n triggerRef: () => HTMLElement | null\n triggerId: string\n}\n\nexport const DialogTriggerContext = createContext<DialogTriggerContextValue | null>(null)\n\n/**\n * Hook to access the dialog trigger state from context.\n */\nexport function useDialogTrigger(): DialogTriggerContextValue | null {\n return useContext(DialogTriggerContext)\n}\n\n// ============================================\n// POPOVER TRIGGER CONTEXT\n// ============================================\n\nexport interface PopoverTriggerContextValue {\n state: {\n isOpen: () => boolean\n open: () => void\n close: () => void\n toggle: () => void\n }\n triggerRef: () => HTMLElement | null\n setTriggerRef: (el: HTMLElement | null) => void\n triggerId: string\n trigger: string\n}\n\nexport const PopoverTriggerContext = createContext<PopoverTriggerContextValue | null>(null)\n\n/**\n * Hook to access the popover trigger state from context.\n */\nexport function usePopoverTrigger(): PopoverTriggerContextValue | null {\n return useContext(PopoverTriggerContext)\n}\n", "/**\n * ToggleSwitch component for solidaria-components\n *\n * A pre-wired headless switch that combines state + aria hooks.\n * Port of react-aria-components/src/Switch.tsx\n *\n * Named \"ToggleSwitch\" to avoid conflict with SolidJS's built-in Switch component.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport {\n createSwitch,\n createFocusRing,\n createHover,\n type AriaSwitchProps,\n} from '@proyecto-viviana/solidaria';\nimport { createToggleState, type ToggleState } from '@proyecto-viviana/solid-stately';\nimport { VisuallyHidden } from './VisuallyHidden';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ToggleSwitchRenderProps {\n /** Whether the switch is selected. */\n isSelected: boolean;\n /** Whether the switch is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the switch is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the switch is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the switch is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the switch is disabled. */\n isDisabled: boolean;\n /** Whether the switch is read only. */\n isReadOnly: boolean;\n /** State of the switch. */\n state: ToggleState;\n}\n\nexport interface ToggleSwitchProps\n extends Omit<AriaSwitchProps, 'children'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<ToggleSwitchRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ToggleSwitchRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ToggleSwitchRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const ToggleSwitchContext = createContext<ToggleSwitchProps | null>(null);\n\n// ============================================\n// COMPONENT\n// ============================================\n\n/**\n * A switch allows a user to turn a setting on or off.\n *\n * This is a headless component that provides accessibility and state management.\n * Style it using the render props pattern or data attributes.\n *\n * Named \"ToggleSwitch\" to avoid conflict with SolidJS's built-in Switch component.\n *\n * @example\n * ```tsx\n * <ToggleSwitch>\n * {({ isSelected }) => (\n * <>\n * <span class={`switch-track ${isSelected ? 'bg-blue-500' : 'bg-gray-300'}`}>\n * <span class={`switch-thumb ${isSelected ? 'translate-x-5' : 'translate-x-0'}`} />\n * </span>\n * <span>Enable notifications</span>\n * </>\n * )}\n * </ToggleSwitch>\n * ```\n */\nexport function ToggleSwitch(props: ToggleSwitchProps): JSX.Element {\n let inputRef: HTMLInputElement | null = null;\n\n // Split props\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Create toggle state\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createToggleState({\n get isSelected() { return ariaProps.isSelected; },\n get defaultSelected() { return ariaProps.defaultSelected; },\n get onChange() { return ariaProps.onChange; },\n get isReadOnly() { return ariaProps.isReadOnly; },\n });\n\n // Create switch aria props\n const switchAria = createSwitch(\n () => ({\n ...ariaProps,\n children: typeof props.children === 'function' ? true : props.children,\n }),\n state,\n () => inputRef\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled || ariaProps.isReadOnly;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ToggleSwitchRenderProps>(() => ({\n isSelected: switchAria.isSelected(),\n isHovered: isHovered(),\n isPressed: switchAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: switchAria.isDisabled,\n isReadOnly: switchAria.isReadOnly,\n state,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ToggleSwitch',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n // Remove ref from spread props to avoid type conflicts\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = switchAria.labelProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanInputProps = () => {\n const { ref: _ref3, ...rest } = switchAria.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref4, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <label\n {...domProps()}\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={switchAria.isSelected() || undefined}\n data-pressed={switchAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={switchAria.isDisabled || undefined}\n data-readonly={switchAria.isReadOnly || undefined}\n >\n <VisuallyHidden>\n <input\n ref={(el) => (inputRef = el)}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n />\n </VisuallyHidden>\n {renderProps.renderChildren()}\n </label>\n );\n}\n\n", "/**\n * Checkbox and CheckboxGroup components for solidaria-components\n *\n * Pre-wired headless checkbox components that combine state + aria hooks.\n * Port of react-aria-components/src/Checkbox.tsx\n */\n\nimport {\n type JSX,\n type Accessor,\n type ParentProps,\n createContext,\n useContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport {\n createCheckbox,\n createCheckboxGroup,\n createCheckboxGroupItem,\n createFocusRing,\n createHover,\n type AriaCheckboxProps,\n type AriaCheckboxGroupProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createToggleState,\n createCheckboxGroupState,\n type CheckboxGroupState,\n} from '@proyecto-viviana/solid-stately';\nimport { VisuallyHidden } from './VisuallyHidden';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface CheckboxGroupRenderProps {\n /** Whether the checkbox group is disabled. */\n isDisabled: boolean;\n /** Whether the checkbox group is read only. */\n isReadOnly: boolean;\n /** Whether the checkbox group is required. */\n isRequired: boolean;\n /** Whether the checkbox group is invalid. */\n isInvalid: boolean;\n /** State of the checkbox group. */\n state: CheckboxGroupState;\n}\n\nexport interface CheckboxRenderProps {\n /** Whether the checkbox is selected. */\n isSelected: boolean;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate: boolean;\n /** Whether the checkbox is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the checkbox is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the checkbox is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the checkbox is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the checkbox is disabled. */\n isDisabled: boolean;\n /** Whether the checkbox is read only. */\n isReadOnly: boolean;\n /** Whether the checkbox is invalid. */\n isInvalid: boolean;\n /** Whether the checkbox is required. */\n isRequired: boolean;\n}\n\nexport interface CheckboxGroupProps\n extends Omit<AriaCheckboxGroupProps, 'children' | 'label' | 'description' | 'errorMessage'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CheckboxGroupRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxGroupRenderProps>;\n}\n\nexport interface CheckboxProps\n extends Omit<AriaCheckboxProps, 'children'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CheckboxRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CheckboxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CheckboxRenderProps>;\n /** Whether the checkbox is indeterminate. */\n isIndeterminate?: boolean;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const CheckboxGroupContext = createContext<CheckboxGroupProps | null>(null);\nexport const CheckboxGroupStateContext = createContext<CheckboxGroupState | null>(null);\nexport const CheckboxContext = createContext<CheckboxProps | null>(null);\n\n// ============================================\n// CHECKBOX GROUP COMPONENT\n// ============================================\n\n/**\n * A checkbox group allows a user to select multiple items from a list of options.\n *\n * @example\n * ```tsx\n * <CheckboxGroup>\n * <Checkbox value=\"one\">Option 1</Checkbox>\n * <Checkbox value=\"two\">Option 2</Checkbox>\n * </CheckboxGroup>\n * ```\n */\nexport function CheckboxGroup(props: ParentProps<CheckboxGroupProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Create checkbox group state\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createCheckboxGroupState({\n get value() { return ariaProps.value; },\n get defaultValue() { return ariaProps.defaultValue; },\n get onChange() { return ariaProps.onChange; },\n get isDisabled() { return ariaProps.isDisabled; },\n get isReadOnly() { return ariaProps.isReadOnly; },\n get isRequired() { return ariaProps.isRequired; },\n get isInvalid() { return ariaProps.isInvalid; },\n });\n\n // Create checkbox group aria props\n const groupAria = createCheckboxGroup(() => ariaProps, state);\n\n // Render props values\n const renderValues = createMemo<CheckboxGroupRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: ariaProps.isRequired ?? false,\n isInvalid: groupAria.isInvalid,\n state,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-CheckboxGroup',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n // Remove ref from spread props to avoid type conflicts\n const cleanGroupProps = () => {\n const { ref: _ref, ...rest } = groupAria.groupProps as Record<string, unknown>;\n return rest;\n };\n\n // Resolve children - we need to pass render props if children is a function\n // but we use props.children directly (not renderProps.renderChildren())\n // to preserve SolidJS context propagation for nested components like Checkbox\n const resolvedChildren = () => {\n const children = props.children;\n if (typeof children === 'function') {\n return children(renderValues());\n }\n return children;\n };\n\n return (\n <CheckboxGroupStateContext.Provider value={state}>\n <div\n {...domProps()}\n {...cleanGroupProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-invalid={groupAria.isInvalid || undefined}\n >\n {resolvedChildren()}\n </div>\n </CheckboxGroupStateContext.Provider>\n );\n}\n\n// ============================================\n// CHECKBOX COMPONENT\n// ============================================\n\n/**\n * A checkbox allows a user to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n *\n * @example\n * ```tsx\n * <Checkbox>\n * {({ isSelected }) => (\n * <>\n * <span class={`checkbox ${isSelected ? 'checked' : ''}`}>\n * {isSelected && '✓'}\n * </span>\n * <span>Accept terms</span>\n * </>\n * )}\n * </Checkbox>\n * ```\n */\nexport function Checkbox(props: CheckboxProps): JSX.Element {\n let inputRef: HTMLInputElement | null = null;\n\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'isIndeterminate',\n ]);\n\n // Check if we're inside a CheckboxGroup\n const groupState = useContext(CheckboxGroupStateContext);\n\n // Create appropriate state/aria hooks based on context\n let isSelected: Accessor<boolean>;\n let isPressed: Accessor<boolean>;\n let isDisabled: boolean;\n let isReadOnly: boolean;\n let isInvalid: boolean;\n let labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n let inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n\n if (groupState) {\n // Inside a CheckboxGroup - use group item\n const itemAria = createCheckboxGroupItem(\n () => ({\n ...ariaProps,\n value: ariaProps.value ?? '',\n children: typeof props.children === 'function' ? true : props.children,\n }),\n groupState,\n () => inputRef\n );\n isSelected = itemAria.isSelected;\n isPressed = itemAria.isPressed;\n isDisabled = itemAria.isDisabled;\n isReadOnly = itemAria.isReadOnly;\n isInvalid = itemAria.isInvalid;\n labelProps = itemAria.labelProps;\n inputProps = itemAria.inputProps;\n } else {\n // Standalone checkbox\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createToggleState({\n get isSelected() { return ariaProps.isSelected; },\n get defaultSelected() { return ariaProps.defaultSelected; },\n get onChange() { return ariaProps.onChange; },\n get isReadOnly() { return ariaProps.isReadOnly; },\n });\n\n const checkboxAria = createCheckbox(\n () => ({\n ...ariaProps,\n isIndeterminate: local.isIndeterminate,\n children: typeof props.children === 'function' ? true : props.children,\n }),\n state,\n () => inputRef\n );\n isSelected = checkboxAria.isSelected;\n isPressed = checkboxAria.isPressed;\n isDisabled = checkboxAria.isDisabled;\n isReadOnly = checkboxAria.isReadOnly;\n isInvalid = checkboxAria.isInvalid;\n labelProps = checkboxAria.labelProps;\n inputProps = checkboxAria.inputProps;\n }\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled || isReadOnly;\n },\n });\n\n // Render props values\n const renderValues = createMemo<CheckboxRenderProps>(() => ({\n isSelected: isSelected(),\n isIndeterminate: local.isIndeterminate ?? false,\n isHovered: isHovered(),\n isPressed: isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled,\n isReadOnly,\n isInvalid,\n isRequired: ariaProps.isRequired ?? false,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Checkbox',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n // Remove ref from spread props to avoid type conflicts\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = labelProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanInputProps = () => {\n const { ref: _ref3, ...rest } = inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref4, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <label\n {...domProps()}\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={isSelected() || undefined}\n data-indeterminate={local.isIndeterminate || undefined}\n data-pressed={isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={isDisabled || undefined}\n data-readonly={isReadOnly || undefined}\n data-invalid={isInvalid || undefined}\n data-required={ariaProps.isRequired || undefined}\n >\n <VisuallyHidden>\n <input\n ref={(el) => (inputRef = el)}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n />\n </VisuallyHidden>\n {renderProps.renderChildren()}\n </label>\n );\n}\n", "/**\n * RadioGroup and Radio components for solidaria-components\n *\n * Pre-wired headless radio components that combine state + aria hooks.\n * Port of react-aria-components/src/RadioGroup.tsx\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n useContext,\n createMemo,\n splitProps,\n Show,\n} from 'solid-js';\nimport {\n createRadio,\n createRadioGroup,\n createFocusRing,\n createHover,\n type AriaRadioProps,\n type AriaRadioGroupProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createRadioGroupState,\n type RadioGroupState,\n type RadioGroupProps as RadioGroupStateProps,\n} from '@proyecto-viviana/solid-stately';\nimport { VisuallyHidden } from './VisuallyHidden';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport type Orientation = 'horizontal' | 'vertical';\n\nexport interface RadioGroupRenderProps {\n /** The orientation of the radio group. */\n orientation: Orientation;\n /** Whether the radio group is disabled. */\n isDisabled: boolean;\n /** Whether the radio group is read only. */\n isReadOnly: boolean;\n /** Whether the radio group is required. */\n isRequired: boolean;\n /** Whether the radio group is invalid. */\n isInvalid: boolean;\n /** State of the radio group. */\n state: RadioGroupState;\n}\n\nexport interface RadioRenderProps {\n /** Whether the radio is selected. */\n isSelected: boolean;\n /** Whether the radio is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the radio is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the radio is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the radio is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the radio is disabled. */\n isDisabled: boolean;\n /** Whether the radio is read only. */\n isReadOnly: boolean;\n /** Whether the radio is invalid. */\n isInvalid: boolean;\n /** Whether the radio is required. */\n isRequired: boolean;\n}\n\nexport interface RadioGroupProps\n extends Omit<AriaRadioGroupProps, 'children' | 'label' | 'description' | 'errorMessage'>,\n Pick<RadioGroupStateProps, 'value' | 'defaultValue' | 'onChange'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<RadioGroupRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<RadioGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<RadioGroupRenderProps>;\n}\n\nexport interface RadioProps\n extends Omit<AriaRadioProps, 'children'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<RadioRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<RadioRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<RadioRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const RadioGroupContext = createContext<RadioGroupProps | null>(null);\nexport const RadioGroupStateContext = createContext<RadioGroupState | null>(null);\nexport const RadioContext = createContext<RadioProps | null>(null);\n\n// ============================================\n// RADIO GROUP COMPONENT\n// ============================================\n\n/**\n * A radio group allows a user to select a single item from a list of mutually exclusive options.\n *\n * @example\n * ```tsx\n * <RadioGroup>\n * <Radio value=\"one\">Option 1</Radio>\n * <Radio value=\"two\">Option 2</Radio>\n * </RadioGroup>\n * ```\n */\nexport function RadioGroup(props: ParentProps<RadioGroupProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Create radio group state\n // We pass a function that returns props so that createRadioGroupState\n // can access props reactively. The props object itself is a proxy in SolidJS,\n // so accessing props.value inside a reactive context will track changes.\n const state = createRadioGroupState({\n get value() { return props.value; },\n get defaultValue() { return props.defaultValue; },\n get onChange() { return props.onChange; },\n get isDisabled() { return props.isDisabled; },\n get isReadOnly() { return props.isReadOnly; },\n get isRequired() { return props.isRequired; },\n get isInvalid() { return props.isInvalid; },\n });\n\n // Create radio group aria props\n const groupAria = createRadioGroup(() => ariaProps, state);\n\n // Render props values\n const renderValues = createMemo<RadioGroupRenderProps>(() => ({\n orientation: (ariaProps.orientation as Orientation) ?? 'vertical',\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: state.isRequired,\n isInvalid: groupAria.isInvalid,\n state,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-RadioGroup',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n // Remove ref from spread props to avoid type conflicts\n const cleanGroupProps = () => {\n const { ref: _ref, ...rest } = groupAria.radioGroupProps as Record<string, unknown>;\n return rest;\n };\n\n // Resolve children - we need to pass render props if children is a function\n // but we use props.children directly (not renderProps.renderChildren())\n // to preserve SolidJS context propagation for nested components like Radio\n const resolvedChildren = () => {\n const children = props.children;\n if (typeof children === 'function') {\n return children(renderValues());\n }\n return children;\n };\n\n return (\n <RadioGroupStateContext.Provider value={state}>\n <div\n {...domProps()}\n {...cleanGroupProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-orientation={ariaProps.orientation ?? 'vertical'}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-required={state.isRequired || undefined}\n data-invalid={groupAria.isInvalid || undefined}\n >\n {resolvedChildren()}\n </div>\n </RadioGroupStateContext.Provider>\n );\n}\n\n// ============================================\n// RADIO COMPONENT\n// ============================================\n\n/**\n * Internal Radio implementation that has access to RadioGroupStateContext.\n * This is rendered inside the RadioGroup's context provider.\n */\nfunction RadioImpl(props: { radioProps: RadioProps; state: RadioGroupState }): JSX.Element {\n let inputRef: HTMLInputElement | null = null;\n const { radioProps, state } = props;\n\n const [local, ariaProps] = splitProps(radioProps, ['class', 'style', 'slot']);\n\n // Create radio aria props\n const radioAria = createRadio(\n () => ({\n ...ariaProps,\n children: typeof radioProps.children === 'function' ? true : radioProps.children,\n }),\n state,\n () => inputRef\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return radioAria.isDisabled || state.isReadOnly;\n },\n });\n\n // Render props values\n const renderValues = createMemo<RadioRenderProps>(() => ({\n isSelected: radioAria.isSelected(),\n isHovered: isHovered(),\n isPressed: radioAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: radioAria.isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: radioProps.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Radio',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n delete (filtered as Record<string, unknown>).onClick;\n return filtered;\n });\n\n // Remove ref from spread props to avoid type conflicts\n const cleanLabelProps = () => {\n const { ref: _ref1, ...rest } = radioAria.labelProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanInputProps = () => {\n const { ref: _ref3, ...rest } = radioAria.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref4, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <label\n {...domProps()}\n {...cleanLabelProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={radioAria.isSelected() || undefined}\n data-pressed={radioAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={radioAria.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-required={state.isRequired || undefined}\n >\n <VisuallyHidden>\n <input\n ref={(el) => (inputRef = el)}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n />\n </VisuallyHidden>\n {renderProps.renderChildren()}\n </label>\n );\n}\n\n/**\n * A radio represents an individual option within a radio group.\n *\n * @example\n * ```tsx\n * <Radio value=\"option1\">\n * {({ isSelected }) => (\n * <>\n * <span class={`radio ${isSelected ? 'selected' : ''}`}>\n * {isSelected && '●'}\n * </span>\n * <span>Option 1</span>\n * </>\n * )}\n * </Radio>\n * ```\n */\nexport function Radio(props: RadioProps): JSX.Element {\n // Get context - will be null if not inside RadioGroup\n // The context is accessed reactively to work with solid-refresh HMR\n const getState = createMemo(() => useContext(RadioGroupStateContext));\n\n return (\n <Show\n when={getState()}\n fallback={null}\n keyed\n >\n {(state) => <RadioImpl radioProps={props} state={state} />}\n </Show>\n );\n}\n", "/**\n * TextField component for solidaria-components\n *\n * A pre-wired headless text field that combines state + aria hooks.\n * Port of react-aria-components/src/TextField.tsx\n */\n\nimport {\n type JSX,\n createContext,\n useContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport {\n createTextField,\n createFocusRing,\n createHover,\n type AriaTextFieldProps,\n} from '@proyecto-viviana/solidaria';\nimport { createTextFieldState } from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TextFieldRenderProps {\n /** Whether the text field is disabled. */\n isDisabled: boolean;\n /** Whether the value is invalid. */\n isInvalid: boolean;\n /** Whether the text field is read only. */\n isReadOnly: boolean;\n /** Whether the text field is required. */\n isRequired: boolean;\n /** Whether the text field is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the text field is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the text field is keyboard focused. */\n isFocusVisible: boolean;\n}\n\nexport interface TextFieldProps\n extends Omit<AriaTextFieldProps, 'children'>,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<TextFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TextFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TextFieldRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport interface TextFieldContextValue {\n labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n descriptionProps: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps: JSX.HTMLAttributes<HTMLElement>;\n isInvalid: boolean;\n}\n\nexport const TextFieldContext = createContext<TextFieldContextValue | null>(null);\n\n// ============================================\n// SUB-COMPONENTS\n// ============================================\n\nexport interface LabelProps extends JSX.LabelHTMLAttributes<HTMLLabelElement> {\n children?: JSX.Element;\n}\n\n/**\n * A label element that automatically wires up to the parent TextField context.\n * This enables the proper htmlFor/id relationship between label and input.\n */\nexport function Label(props: LabelProps): JSX.Element {\n const context = useContext(TextFieldContext);\n\n // Merge context labelProps with local props (local props take precedence)\n const mergedProps = () => {\n if (context) {\n const { ref: _ref, ...contextLabelProps } = context.labelProps as Record<string, unknown>;\n return { ...contextLabelProps, ...props };\n }\n return props;\n };\n\n return <label {...mergedProps()}>{props.children}</label>;\n}\n\nexport interface InputProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, 'children'> {}\n\n/**\n * An input element that automatically wires up to the parent TextField context.\n * This enables focus tracking, validation, and accessibility props to flow from\n * the TextField to the actual input element.\n */\nexport function Input(props: InputProps): JSX.Element {\n const context = useContext(TextFieldContext);\n\n // Merge context inputProps with local props (local props take precedence)\n const mergedProps = () => {\n if (context) {\n // Remove ref from context props to avoid conflicts\n const { ref: _ref, ...contextInputProps } = context.inputProps as Record<string, unknown>;\n return { ...contextInputProps, ...props };\n }\n return props;\n };\n\n return <input {...mergedProps()} />;\n}\n\nexport interface TextAreaProps extends Omit<JSX.TextareaHTMLAttributes<HTMLTextAreaElement>, 'children'> {}\n\n/**\n * A textarea element that automatically wires up to the parent TextField context.\n * This enables focus tracking, validation, and accessibility props to flow from\n * the TextField to the actual textarea element.\n */\nexport function TextArea(props: TextAreaProps): JSX.Element {\n const context = useContext(TextFieldContext);\n\n // Merge context inputProps with local props (local props take precedence)\n // Note: TextArea uses inputProps from context since it's an input variant\n const mergedProps = () => {\n if (context) {\n const { ref: _ref, type: _type, ...contextInputProps } = context.inputProps as Record<string, unknown>;\n return { ...contextInputProps, ...props };\n }\n return props;\n };\n\n return <textarea {...mergedProps()} />;\n}\n\n// ============================================\n// COMPONENT\n// ============================================\n\n/**\n * A text field allows a user to enter a plain text value with a keyboard.\n *\n * This is a headless component that provides accessibility and state management.\n * Style it using the render props pattern or data attributes.\n *\n * @example\n * ```tsx\n * <TextField>\n * {({ isInvalid }) => (\n * <>\n * <Label>Email</Label>\n * <Input class={isInvalid ? 'border-red-500' : 'border-gray-300'} />\n * </>\n * )}\n * </TextField>\n * ```\n */\nexport function TextField(props: TextFieldProps): JSX.Element {\n // Split props\n const [local, ariaProps] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Create text field state\n // Use getters to ensure props are read lazily inside reactive contexts\n const state = createTextFieldState({\n get value() { return ariaProps.value; },\n get defaultValue() { return ariaProps.defaultValue; },\n get onChange() { return ariaProps.onChange; },\n });\n\n // Create text field aria props\n const textFieldAria = createTextField(() => ({\n ...ariaProps,\n value: state.value(),\n onChange: state.setValue,\n }));\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<TextFieldRenderProps>(() => ({\n isDisabled: ariaProps.isDisabled || false,\n isInvalid: textFieldAria.isInvalid,\n isReadOnly: ariaProps.isReadOnly || false,\n isRequired: ariaProps.isRequired || false,\n isHovered: isHovered(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-TextField',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps, { global: true });\n delete (filtered as Record<string, unknown>).id;\n return filtered;\n });\n\n // Remove ref from spread props to avoid type conflicts\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Context value for sub-components\n // Note: We create the value object directly (not in a memo) so it's available\n // immediately when children access the context\n const contextValue: TextFieldContextValue = {\n labelProps: textFieldAria.labelProps as JSX.LabelHTMLAttributes<HTMLLabelElement>,\n inputProps: { ...textFieldAria.inputProps, ...focusProps } as JSX.InputHTMLAttributes<HTMLInputElement>,\n descriptionProps: textFieldAria.descriptionProps as JSX.HTMLAttributes<HTMLElement>,\n errorMessageProps: textFieldAria.errorMessageProps as JSX.HTMLAttributes<HTMLElement>,\n isInvalid: textFieldAria.isInvalid,\n };\n\n return (\n <TextFieldContext.Provider value={contextValue}>\n <div\n {...domProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={ariaProps.isDisabled || undefined}\n data-invalid={textFieldAria.isInvalid || undefined}\n data-readonly={ariaProps.isReadOnly || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n </TextFieldContext.Provider>\n );\n}\n", "/**\n * Link component for solidaria-components\n *\n * Pre-wired headless link component that combines aria hooks.\n * Port of react-aria-components/src/Link.tsx\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport { Dynamic } from 'solid-js/web';\nimport {\n createLink,\n createFocusRing,\n createHover,\n type AriaLinkProps,\n type HoverEvents,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface LinkRenderProps {\n /** Whether the link is the current item within a list. */\n isCurrent: boolean;\n /** Whether the link is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the link is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the link is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the link is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the link is disabled. */\n isDisabled: boolean;\n}\n\nexport interface LinkProps\n extends Omit<AriaLinkProps, 'elementType'>,\n HoverEvents,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<LinkRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<LinkRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<LinkRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const LinkContext = createContext<LinkProps | null>(null);\n\n// ============================================\n// LINK COMPONENT\n// ============================================\n\n/**\n * A link allows a user to navigate to another page or resource within a web page\n * or application.\n *\n * @example\n * ```tsx\n * <Link href=\"https://example.com\">Visit Example</Link>\n *\n * // With render props\n * <Link href=\"/about\">\n * {({ isHovered, isFocusVisible }) => (\n * <span class={isHovered ? 'underline' : ''}>\n * About Us\n * </span>\n * )}\n * </Link>\n * ```\n */\nexport function Link(props: ParentProps<LinkProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'slot',\n 'onHoverStart',\n 'onHoverEnd',\n 'onHoverChange',\n ]);\n\n // Determine element type - use 'a' if href is provided and not disabled\n const elementType = () => {\n if (ariaProps.href && !ariaProps.isDisabled) {\n return 'a';\n }\n return 'span';\n };\n\n // Create link aria props\n const linkAria = createLink({\n get elementType() { return elementType(); },\n get isDisabled() { return ariaProps.isDisabled; },\n get href() { return ariaProps.href; },\n get target() { return ariaProps.target; },\n get rel() { return ariaProps.rel; },\n get onPress() { return ariaProps.onPress; },\n get onPressStart() { return ariaProps.onPressStart; },\n get onPressEnd() { return ariaProps.onPressEnd; },\n get onClick() { return ariaProps.onClick; },\n get onFocus() { return ariaProps.onFocus; },\n get onBlur() { return ariaProps.onBlur; },\n get onFocusChange() { return ariaProps.onFocusChange; },\n get onKeyDown() { return ariaProps.onKeyDown; },\n get onKeyUp() { return ariaProps.onKeyUp; },\n get autoFocus() { return ariaProps.autoFocus; },\n get 'aria-current'() { return ariaProps['aria-current']; },\n get 'aria-label'() { return ariaProps['aria-label']; },\n get 'aria-labelledby'() { return ariaProps['aria-labelledby']; },\n get 'aria-describedby'() { return ariaProps['aria-describedby']; },\n });\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() { return ariaProps.isDisabled ?? false; },\n get onHoverStart() { return local.onHoverStart; },\n get onHoverEnd() { return local.onHoverEnd; },\n get onHoverChange() { return local.onHoverChange; },\n });\n\n // Render props values\n const renderValues = createMemo<LinkRenderProps>(() => ({\n isCurrent: !!ariaProps['aria-current'],\n isHovered: isHovered(),\n isPressed: linkAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Link',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n // Remove ref from spread props to avoid type conflicts\n const cleanLinkProps = () => {\n const { ref: _ref1, ...rest } = linkAria.linkProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <Dynamic\n component={elementType()}\n {...domProps()}\n {...cleanLinkProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-hovered={isHovered() || undefined}\n data-pressed={linkAria.isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-current={!!ariaProps['aria-current'] || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </Dynamic>\n );\n}\n", "/**\n * ProgressBar component for solidaria-components\n *\n * Pre-wired headless progress bar component that combines aria hooks.\n * Port of react-aria-components/src/ProgressBar.tsx\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport {\n createProgressBar,\n type AriaProgressBarProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ProgressBarRenderProps {\n /** The value as a percentage between the minimum and maximum (0-100). */\n percentage: number | undefined;\n /** A formatted version of the value. */\n valueText: string | undefined;\n /** Whether the progress bar is indeterminate. */\n isIndeterminate: boolean;\n}\n\nexport interface ProgressBarProps\n extends AriaProgressBarProps,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<ProgressBarRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ProgressBarRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ProgressBarRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const ProgressBarContext = createContext<ProgressBarProps | null>(null);\n\n// ============================================\n// UTILITIES\n// ============================================\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\n// ============================================\n// PROGRESSBAR COMPONENT\n// ============================================\n\n/**\n * Progress bars show either determinate or indeterminate progress of an operation\n * over time.\n *\n * @example\n * ```tsx\n * <ProgressBar value={50}>\n * {({ percentage, valueText }) => (\n * <>\n * <Label>Loading...</Label>\n * <span>{valueText}</span>\n * <div class=\"bar\" style={{ width: `${percentage}%` }} />\n * </>\n * )}\n * </ProgressBar>\n * ```\n */\nexport function ProgressBar(props: ParentProps<ProgressBarProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Get values for calculations\n const value = () => ariaProps.value ?? 0;\n const minValue = () => ariaProps.minValue ?? 0;\n const maxValue = () => ariaProps.maxValue ?? 100;\n const isIndeterminate = () => ariaProps.isIndeterminate ?? false;\n\n // Create progress bar aria props\n const progressAria = createProgressBar({\n get value() { return ariaProps.value; },\n get minValue() { return ariaProps.minValue; },\n get maxValue() { return ariaProps.maxValue; },\n get valueLabel() { return ariaProps.valueLabel; },\n get isIndeterminate() { return ariaProps.isIndeterminate; },\n get formatOptions() { return ariaProps.formatOptions; },\n get label() { return ariaProps.label; },\n get 'aria-label'() { return ariaProps['aria-label']; },\n get 'aria-labelledby'() { return ariaProps['aria-labelledby']; },\n get 'aria-describedby'() { return ariaProps['aria-describedby']; },\n get 'aria-details'() { return ariaProps['aria-details']; },\n });\n\n // Calculate percentage\n const percentage = createMemo(() => {\n if (isIndeterminate()) {\n return undefined;\n }\n const clampedValue = clamp(value(), minValue(), maxValue());\n return ((clampedValue - minValue()) / (maxValue() - minValue())) * 100;\n });\n\n // Get value text from aria props\n const valueText = createMemo(() => {\n return progressAria.progressBarProps['aria-valuetext'] as string | undefined;\n });\n\n // Render props values\n const renderValues = createMemo<ProgressBarRenderProps>(() => ({\n percentage: percentage(),\n valueText: valueText(),\n isIndeterminate: isIndeterminate(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ProgressBar',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <div\n {...domProps()}\n {...progressAria.progressBarProps}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n", "/**\n * Separator component for solidaria-components\n *\n * Pre-wired headless separator component that combines aria hooks.\n * Port of react-aria-components/src/Separator.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport { Dynamic } from 'solid-js/web';\nimport {\n createSeparator,\n type AriaSeparatorProps,\n type Orientation,\n} from '@proyecto-viviana/solidaria';\nimport {\n type SlotProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface SeparatorRenderProps {\n /** The orientation of the separator. */\n orientation: Orientation;\n}\n\nexport interface SeparatorProps\n extends AriaSeparatorProps,\n SlotProps {\n /** The CSS className for the element. A function may be provided to receive render props. */\n class?: string | ((renderProps: SeparatorRenderProps) => string);\n /** The inline style for the element. A function may be provided to receive render props. */\n style?: JSX.CSSProperties | ((renderProps: SeparatorRenderProps) => JSX.CSSProperties);\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const SeparatorContext = createContext<SeparatorProps | null>(null);\n\n// ============================================\n// SEPARATOR COMPONENT\n// ============================================\n\n/**\n * A separator is a visual divider between two groups of content,\n * e.g. groups of menu items or sections of a page.\n *\n * @example\n * ```tsx\n * <Separator />\n *\n * // Vertical separator\n * <Separator orientation=\"vertical\" />\n *\n * // Custom element type\n * <Separator elementType=\"div\" />\n * ```\n */\nexport function Separator(props: SeparatorProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Determine the element type\n const elementType = createMemo(() => {\n let element = ariaProps.elementType || 'hr';\n // If vertical and using hr, switch to div since hr is inherently horizontal\n if (element === 'hr' && ariaProps.orientation === 'vertical') {\n element = 'div';\n }\n return element;\n });\n\n // Create separator aria props\n const separatorAria = createSeparator({\n get orientation() { return ariaProps.orientation; },\n get elementType() { return elementType(); },\n get 'aria-label'() { return ariaProps['aria-label']; },\n get 'aria-labelledby'() { return ariaProps['aria-labelledby']; },\n get id() { return ariaProps.id; },\n });\n\n // Render props values\n const renderValues = createMemo<SeparatorRenderProps>(() => ({\n orientation: ariaProps.orientation ?? 'horizontal',\n }));\n\n // Resolve class\n const resolvedClass = createMemo(() => {\n const cls = local.class;\n if (typeof cls === 'function') {\n return cls(renderValues());\n }\n return cls ?? 'solidaria-Separator';\n });\n\n // Resolve style\n const resolvedStyle = createMemo(() => {\n const style = local.style;\n if (typeof style === 'function') {\n return style(renderValues());\n }\n return style;\n });\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <Dynamic\n component={elementType()}\n {...domProps()}\n {...separatorAria.separatorProps}\n class={resolvedClass()}\n style={resolvedStyle()}\n slot={local.slot}\n />\n );\n}\n", "/**\n * Toolbar component for solidaria-components\n *\n * Pre-wired headless toolbar component that combines aria hooks.\n * Port of react-aria-components/src/Toolbar.tsx\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n createMemo,\n splitProps,\n useContext,\n} from 'solid-js'\nimport {\n createToolbar,\n type AriaToolbarProps,\n type Orientation,\n} from '@proyecto-viviana/solidaria'\nimport {\n type SlotProps,\n filterDOMProps,\n} from './utils'\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ToolbarRenderProps {\n /** The orientation of the toolbar. */\n orientation: Orientation\n}\n\nexport interface ToolbarProps\n extends AriaToolbarProps,\n ParentProps,\n SlotProps {\n /** The CSS className for the element. A function may be provided to receive render props. */\n class?: string | ((renderProps: ToolbarRenderProps) => string)\n /** The inline style for the element. A function may be provided to receive render props. */\n style?: JSX.CSSProperties | ((renderProps: ToolbarRenderProps) => JSX.CSSProperties)\n /** Additional data-* attributes. */\n [key: `data-${string}`]: string | undefined\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport interface ToolbarContextValue {\n slots?: {\n [name: string]: Record<string, unknown>\n }\n}\n\nexport const ToolbarContext = createContext<ToolbarContextValue | null>(null)\n\n// ============================================\n// TOOLBAR COMPONENT\n// ============================================\n\n/**\n * A toolbar is a container for a set of interactive controls,\n * such as buttons, checkboxes, or links, with arrow key navigation.\n *\n * @example\n * ```tsx\n * <Toolbar aria-label=\"Text formatting\">\n * <Button>Bold</Button>\n * <Button>Italic</Button>\n * <Button>Underline</Button>\n * </Toolbar>\n *\n * // With render props\n * <Toolbar orientation=\"vertical\">\n * {({ orientation }) => (\n * <div data-orientation={orientation}>\n * <Button>Cut</Button>\n * <Button>Copy</Button>\n * <Button>Paste</Button>\n * </div>\n * )}\n * </Toolbar>\n * ```\n */\nexport function Toolbar(props: ToolbarProps): JSX.Element {\n const [local, ariaProps, domProps] = splitProps(\n props,\n ['class', 'style', 'slot', 'children'],\n ['orientation', 'aria-label', 'aria-labelledby']\n )\n\n // Get slot props from context if available\n const ctx = useContext(ToolbarContext)\n const slotProps = () => {\n if (ctx?.slots && local.slot) {\n return ctx.slots[local.slot] || {}\n }\n return {}\n }\n\n // Merge slot props with explicit props\n const mergedAriaProps = createMemo(() => ({\n orientation: ariaProps.orientation,\n 'aria-label': ariaProps['aria-label'] ?? slotProps()['aria-label'] as string | undefined,\n 'aria-labelledby': ariaProps['aria-labelledby'],\n }))\n\n // Create toolbar aria props\n const { toolbarProps, orientation } = createToolbar(mergedAriaProps())\n\n // Render props values\n const renderValues = createMemo<ToolbarRenderProps>(() => ({\n orientation: orientation(),\n }))\n\n // Resolve class\n const resolvedClass = createMemo(() => {\n const cls = local.class\n if (typeof cls === 'function') {\n return cls(renderValues())\n }\n return cls ?? 'solidaria-Toolbar'\n })\n\n // Resolve style\n const resolvedStyle = createMemo(() => {\n const style = local.style\n if (typeof style === 'function') {\n return style(renderValues())\n }\n return style\n })\n\n // Resolve children (support render props)\n const resolvedChildren = createMemo(() => {\n const children = props.children\n if (typeof children === 'function') {\n return (children as (props: ToolbarRenderProps) => JSX.Element)(renderValues())\n }\n return children\n })\n\n // Filter remaining DOM props\n const filteredDOMProps = createMemo(() => filterDOMProps(domProps, { global: true }))\n\n return (\n <div\n {...filteredDOMProps()}\n {...toolbarProps}\n class={resolvedClass()}\n style={resolvedStyle()}\n slot={local.slot}\n data-orientation={orientation()}\n >\n {resolvedChildren()}\n </div>\n )\n}\n", "/**\n * Autocomplete component for solidaria-components\n *\n * Provides autocomplete functionality by wrapping a text input\n * with a filterable collection (ListBox/Menu).\n *\n * Port of react-aria-components/src/Autocomplete.tsx\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n useContext,\n createMemo,\n splitProps,\n createSignal,\n} from 'solid-js'\nimport {\n createAutocomplete,\n type AriaAutocompleteOptions,\n type AutocompleteInputProps,\n type CollectionOptions,\n} from '@proyecto-viviana/solidaria'\nimport {\n createAutocompleteState,\n type AutocompleteState,\n type AutocompleteStateOptions,\n} from '@proyecto-viviana/solid-stately'\nimport { type SlotProps } from './utils'\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface AutocompleteProps<T = unknown>\n extends Omit<AutocompleteStateOptions, 'children'>,\n Omit<AriaAutocompleteOptions<T>, 'inputRef' | 'collectionRef'>,\n ParentProps,\n SlotProps {}\n\n// ============================================\n// CONTEXTS\n// ============================================\n\nexport interface AutocompleteContextValue {\n inputProps: AutocompleteInputProps\n inputRef: (el: HTMLInputElement) => void\n}\n\nexport interface AutocompleteCollectionContextValue {\n collectionProps: CollectionOptions\n collectionRef: (el: HTMLElement) => void\n filter?: (textValue: string) => boolean\n}\n\nexport const AutocompleteContext = createContext<AutocompleteContextValue | null>(null)\nexport const AutocompleteStateContext = createContext<AutocompleteState | null>(null)\nexport const AutocompleteCollectionContext = createContext<AutocompleteCollectionContextValue | null>(null)\n\n/**\n * Hook to consume autocomplete input context.\n * Use this in your input component (TextField/SearchField) to get the autocomplete props.\n */\nexport function useAutocompleteInput() {\n return useContext(AutocompleteContext)\n}\n\n/**\n * Hook to consume autocomplete state context.\n */\nexport function useAutocompleteState() {\n return useContext(AutocompleteStateContext)\n}\n\n/**\n * Hook to consume autocomplete collection context.\n * Use this in your collection component (ListBox/Menu) to get the autocomplete props.\n */\nexport function useAutocompleteCollection() {\n return useContext(AutocompleteCollectionContext)\n}\n\n// ============================================\n// AUTOCOMPLETE COMPONENT\n// ============================================\n\n/**\n * An autocomplete allows users to search or filter a list of suggestions.\n * It wraps a text input and a collection component (ListBox or Menu),\n * providing keyboard navigation and filtering capabilities.\n *\n * @example\n * ```tsx\n * // Basic usage with SearchField and ListBox\n * <Autocomplete\n * filter={(textValue, inputValue) =>\n * textValue.toLowerCase().includes(inputValue.toLowerCase())\n * }\n * >\n * <SearchField aria-label=\"Search\">\n * <Input />\n * </SearchField>\n * <ListBox aria-label=\"Suggestions\">\n * <ListBoxItem>Option 1</ListBoxItem>\n * <ListBoxItem>Option 2</ListBoxItem>\n * <ListBoxItem>Option 3</ListBoxItem>\n * </ListBox>\n * </Autocomplete>\n *\n * // Controlled input value\n * const [value, setValue] = createSignal('');\n * <Autocomplete\n * inputValue={value()}\n * onInputChange={setValue}\n * filter={(textValue, inputValue) =>\n * textValue.toLowerCase().includes(inputValue.toLowerCase())\n * }\n * >\n * {/* ... *\\/}\n * </Autocomplete>\n * ```\n */\nexport function Autocomplete<T = unknown>(props: AutocompleteProps<T>): JSX.Element {\n const [stateProps, ariaProps, local] = splitProps(\n props,\n ['inputValue', 'defaultInputValue', 'onInputChange'],\n ['filter', 'disableAutoFocusFirst', 'disableVirtualFocus']\n )\n\n // Create state\n const state = createAutocompleteState(stateProps)\n\n // Create refs\n let inputRef: HTMLInputElement | undefined\n let collectionRef: HTMLElement | undefined\n\n // Create autocomplete aria\n const autocomplete = createAutocomplete<T>(\n {\n ...ariaProps,\n inputRef: () => inputRef,\n collectionRef: () => collectionRef,\n },\n state\n )\n\n // Input context value\n const inputContextValue = createMemo<AutocompleteContextValue>(() => ({\n inputProps: autocomplete.inputProps,\n inputRef: (el: HTMLInputElement) => {\n inputRef = el\n },\n }))\n\n // Collection context value\n const collectionContextValue = createMemo<AutocompleteCollectionContextValue>(() => ({\n collectionProps: autocomplete.collectionProps,\n collectionRef: (el: HTMLElement) => {\n collectionRef = el\n },\n filter: autocomplete.filter,\n }))\n\n return (\n <AutocompleteStateContext.Provider value={state}>\n <AutocompleteContext.Provider value={inputContextValue()}>\n <AutocompleteCollectionContext.Provider value={collectionContextValue()}>\n {props.children}\n </AutocompleteCollectionContext.Provider>\n </AutocompleteContext.Provider>\n </AutocompleteStateContext.Provider>\n )\n}\n", "/**\n * ListBox component for solidaria-components\n *\n * A pre-wired headless listbox that combines state + aria hooks.\n * Port of react-aria-components/src/ListBox.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n} from 'solid-js';\nimport {\n createListBox,\n createOption,\n createFocusRing,\n createHover,\n type AriaListBoxProps,\n type AriaOptionProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createListState,\n type ListState,\n type Key,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ListBoxRenderProps {\n /** Whether the listbox has focus. */\n isFocused: boolean;\n /** Whether the listbox has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the listbox is disabled. */\n isDisabled: boolean;\n /** Whether the listbox is empty. */\n isEmpty: boolean;\n}\n\nexport interface ListBoxProps<T>\n extends Omit<AriaListBoxProps, 'children'>,\n SlotProps {\n /** The items to render in the listbox. */\n items: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** The selection mode. */\n selectionMode?: 'none' | 'single' | 'multiple';\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Currently selected keys (controlled). */\n selectedKeys?: 'all' | Iterable<Key>;\n /** Default selected keys (uncontrolled). */\n defaultSelectedKeys?: 'all' | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: 'all' | Set<Key>) => void;\n /** The children of the component. A function may be provided to render each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ListBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ListBoxRenderProps>;\n /** A function to render when the listbox is empty. */\n renderEmptyState?: () => JSX.Element;\n}\n\nexport interface ListBoxOptionRenderProps {\n /** Whether the option is selected. */\n isSelected: boolean;\n /** Whether the option is focused. */\n isFocused: boolean;\n /** Whether the option has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the option is pressed. */\n isPressed: boolean;\n /** Whether the option is hovered. */\n isHovered: boolean;\n /** Whether the option is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ListBoxOptionProps<T>\n extends Omit<AriaOptionProps, 'children' | 'key'>,\n SlotProps {\n /** The unique key for the option. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the option. A function may be provided to receive render props. */\n children?: RenderChildren<ListBoxOptionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ListBoxOptionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ListBoxOptionRenderProps>;\n /** The text value of the option (for typeahead). */\n textValue?: string;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface ListBoxContextValue<T> {\n state: ListState<T>;\n}\n\nexport const ListBoxContext = createContext<ListBoxContextValue<unknown> | null>(null);\nexport const ListBoxStateContext = createContext<ListState<unknown> | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A listbox displays a list of options and allows a user to select one or more of them.\n */\nexport function ListBox<T>(props: ListBoxProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'renderEmptyState'],\n ['items', 'getKey', 'getTextValue', 'getDisabled', 'disabledKeys', 'selectionMode', 'selectedKeys', 'defaultSelectedKeys', 'onSelectionChange']\n );\n\n // Create list state\n const state = createListState<T>({\n get items() {\n return stateProps.items;\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectionMode() {\n return stateProps.selectionMode;\n },\n get selectedKeys() {\n return stateProps.selectedKeys;\n },\n get defaultSelectedKeys() {\n return stateProps.defaultSelectedKeys;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n });\n\n // Helper to resolve isDisabled\n const resolveDisabled = (): boolean => {\n const disabled = ariaProps.isDisabled;\n if (typeof disabled === 'function') {\n return (disabled as () => boolean)();\n }\n return !!disabled;\n };\n\n // Create listbox aria props\n const { listBoxProps } = createListBox(\n {\n ...ariaProps,\n get isDisabled() {\n return resolveDisabled();\n },\n },\n state\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<ListBoxRenderProps>(() => ({\n isFocused: state.isFocused() || isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: resolveDisabled(),\n isEmpty: state.collection().size === 0,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ListBox',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from spread props\n const cleanListBoxProps = () => {\n const { ref: _ref1, ...rest } = listBoxProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n const isEmpty = () => stateProps.items.length === 0;\n\n return (\n <ListBoxContext.Provider value={{ state }}>\n <ListBoxStateContext.Provider value={state}>\n <ul\n {...domProps()}\n {...cleanListBoxProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={resolveDisabled() || undefined}\n data-empty={isEmpty() || undefined}\n >\n {isEmpty() && local.renderEmptyState\n ? local.renderEmptyState()\n : <For each={stateProps.items}>{(item) => props.children(item)}</For>\n }\n </ul>\n </ListBoxStateContext.Provider>\n </ListBoxContext.Provider>\n );\n}\n\n/**\n * An option in a listbox.\n */\nexport function ListBoxOption<T>(props: ListBoxOptionProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n ]);\n\n // Get state from context\n const context = useContext(ListBoxStateContext);\n if (!context) {\n throw new Error('ListBoxOption must be used within a ListBox');\n }\n const state = context as ListState<T>;\n\n // Create option aria props\n const optionAria = createOption<T>(\n {\n key: local.id,\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n },\n state\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return optionAria.isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<ListBoxOptionRenderProps>(() => ({\n isSelected: optionAria.isSelected(),\n isFocused: optionAria.isFocused(),\n isFocusVisible: optionAria.isFocusVisible(),\n isPressed: optionAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: optionAria.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ListBox-option',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanOptionProps = () => {\n const { ref: _ref1, ...rest } = optionAria.optionProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <li\n {...cleanOptionProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={optionAria.isSelected() || undefined}\n data-focused={optionAria.isFocused() || undefined}\n data-focus-visible={optionAria.isFocusVisible() || undefined}\n data-pressed={optionAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={optionAria.isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </li>\n );\n}\n\n// Attach Option as a static property\nListBox.Option = ListBoxOption;\n", "/**\n * Menu component for solidaria-components\n *\n * A pre-wired headless menu that combines state + aria hooks.\n * Port of react-aria-components/src/Menu.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createMenu,\n createMenuItem,\n createMenuTrigger,\n createFocusRing,\n createHover,\n createButton,\n createInteractOutside,\n FocusScope,\n type AriaMenuProps,\n type AriaMenuItemProps,\n type AriaMenuTriggerProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createMenuState,\n createMenuTriggerState,\n type MenuState,\n type OverlayTriggerState,\n type Key,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface MenuRenderProps {\n /** Whether the menu is focused. */\n isFocused: boolean;\n /** Whether the menu is open. */\n isOpen: boolean;\n}\n\nexport interface MenuProps<T>\n extends Omit<AriaMenuProps, 'children'>,\n SlotProps {\n /** The items to render in the menu. */\n items: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Handler called when an item is activated. */\n onAction?: (key: Key) => void;\n /** Handler called when the menu should close. */\n onClose?: () => void;\n /** The children of the component. A function may be provided to render each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<MenuRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<MenuRenderProps>;\n}\n\nexport interface MenuItemRenderProps {\n /** Whether the item is selected. */\n isSelected: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n}\n\nexport interface MenuItemProps<T>\n extends Omit<AriaMenuItemProps, 'children' | 'key'>,\n SlotProps {\n /** The unique key for the item. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the item. A function may be provided to receive render props. */\n children?: RenderChildren<MenuItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<MenuItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<MenuItemRenderProps>;\n /** The text value of the item (for typeahead). */\n textValue?: string;\n /** Handler called when the item is activated. */\n onAction?: () => void;\n}\n\nexport interface MenuTriggerRenderProps {\n /** Whether the menu is open. */\n isOpen: boolean;\n /** Whether the trigger is focused. */\n isFocused: boolean;\n /** Whether the trigger has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the trigger is pressed. */\n isPressed: boolean;\n /** Whether the trigger is hovered. */\n isHovered: boolean;\n /** Whether the trigger is disabled. */\n isDisabled: boolean;\n}\n\nexport interface MenuTriggerProps extends Omit<AriaMenuTriggerProps, 'children'>, SlotProps {\n /** The children of the trigger (typically a Button and Menu). */\n children: JSX.Element;\n /** Whether the menu trigger is disabled. */\n isDisabled?: boolean;\n /** Whether the menu is open by default. */\n defaultOpen?: boolean;\n /** Whether the menu is open (controlled). */\n isOpen?: boolean;\n /** Handler called when the open state changes. */\n onOpenChange?: (isOpen: boolean) => void;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface MenuContextValue<T> {\n state: MenuState<T>;\n}\n\ninterface MenuTriggerContextValue {\n state: OverlayTriggerState;\n triggerProps: JSX.HTMLAttributes<HTMLElement>;\n menuProps: JSX.HTMLAttributes<HTMLElement>;\n}\n\nexport const MenuContext = createContext<MenuContextValue<unknown> | null>(null);\nexport const MenuStateContext = createContext<MenuState<unknown> | null>(null);\nexport const MenuTriggerContext = createContext<MenuTriggerContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A menu trigger wraps a button and menu, handling the open/close state.\n */\nexport function MenuTrigger(props: MenuTriggerProps): JSX.Element {\n const [local, stateProps] = splitProps(props, ['slot']);\n\n // Create trigger state\n const state = createMenuTriggerState({\n get isOpen() {\n return stateProps.isOpen;\n },\n get defaultOpen() {\n return stateProps.defaultOpen;\n },\n get onOpenChange() {\n return stateProps.onOpenChange;\n },\n });\n\n // Create trigger aria props\n const { menuTriggerProps, menuProps } = createMenuTrigger(\n {\n get isDisabled() {\n return stateProps.isDisabled;\n },\n },\n state\n );\n\n return (\n <MenuTriggerContext.Provider\n value={{\n state,\n triggerProps: menuTriggerProps,\n menuProps,\n }}\n >\n {props.children}\n </MenuTriggerContext.Provider>\n );\n}\n\n/**\n * A button that opens a menu.\n */\nexport interface MenuButtonProps extends SlotProps {\n /** The children of the button. A function may be provided to receive render props. */\n children?: RenderChildren<MenuTriggerRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<MenuTriggerRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<MenuTriggerRenderProps>;\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n}\n\nexport function MenuButton(props: MenuButtonProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot', 'isDisabled']);\n\n // Get trigger context\n const context = useContext(MenuTriggerContext);\n if (!context) {\n throw new Error('MenuButton must be used within a MenuTrigger');\n }\n const { state, triggerProps } = context;\n\n // Create button aria props for proper press handling\n const buttonAria = createButton({\n get isDisabled() {\n return local.isDisabled;\n },\n onPress() {\n state.toggle();\n },\n });\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return local.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<MenuTriggerRenderProps>(() => ({\n isOpen: state.isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isPressed: buttonAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: !!local.isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-MenuButton',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanTriggerProps = () => {\n const { ref: _ref1, ...rest } = triggerProps as Record<string, unknown>;\n return rest;\n };\n const cleanButtonProps = () => {\n const { ref: _ref2, ...rest } = buttonAria.buttonProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref4, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n {...cleanTriggerProps()}\n {...cleanButtonProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n type=\"button\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={state.isOpen() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-pressed={buttonAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={local.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n/**\n * A menu displays a list of actions or options for the user to choose from.\n */\nexport function Menu<T>(props: MenuProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n ['items', 'getKey', 'getTextValue', 'getDisabled', 'disabledKeys', 'onAction', 'onClose']\n );\n\n // Get trigger context if available\n const triggerContext = useContext(MenuTriggerContext);\n\n // Ref for the menu element (for click outside detection)\n let menuRef: HTMLUListElement | undefined;\n\n // Create menu state\n const state = createMenuState<T>({\n get items() {\n return stateProps.items;\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get onAction() {\n return stateProps.onAction;\n },\n get onClose() {\n return stateProps.onClose ?? (() => triggerContext?.state.close());\n },\n });\n\n // Create menu aria props\n const { menuProps } = createMenu(\n {\n get onClose() {\n return stateProps.onClose ?? (() => triggerContext?.state.close());\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n get 'aria-labelledby'() {\n return ariaProps['aria-labelledby'];\n },\n },\n state\n );\n\n // Create focus ring\n const { isFocused, focusProps } = createFocusRing();\n\n // Handle click outside to close menu\n createInteractOutside({\n ref: () => menuRef ?? null,\n onInteractOutside: () => {\n if (triggerContext?.state.isOpen()) {\n triggerContext.state.close();\n }\n },\n get isDisabled() {\n return !triggerContext?.state.isOpen();\n },\n });\n\n // Render props values\n const renderValues = createMemo<MenuRenderProps>(() => ({\n isFocused: state.isFocused() || isFocused(),\n isOpen: triggerContext?.state.isOpen() ?? true,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Menu',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanMenuProps = () => {\n const { ref: _ref1, ...rest } = menuProps as Record<string, unknown>;\n return rest;\n };\n const cleanTriggerMenuProps = () => {\n if (!triggerContext) return {};\n const { ref: _ref2, ...rest } = triggerContext.menuProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n // If inside a MenuTrigger, only render when open\n // If standalone (no trigger context), always render\n const shouldRender = () => triggerContext ? triggerContext.state.isOpen() : true;\n\n // Only use FocusScope when inside a MenuTrigger (for popover behavior)\n // Standalone menus don't need focus restoration\n const menuContent = () => (\n <MenuContext.Provider value={{ state }}>\n <MenuStateContext.Provider value={state}>\n <ul\n ref={(el) => (menuRef = el)}\n {...cleanMenuProps()}\n {...cleanTriggerMenuProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused() || undefined}\n >\n <For each={stateProps.items}>{(item) => props.children?.(item)}</For>\n </ul>\n </MenuStateContext.Provider>\n </MenuContext.Provider>\n );\n\n return (\n <Show when={shouldRender()}>\n <Show when={triggerContext} fallback={menuContent()}>\n <FocusScope restoreFocus autoFocus>\n {menuContent()}\n </FocusScope>\n </Show>\n </Show>\n );\n}\n\n/**\n * An item in a menu.\n */\nexport function MenuItem<T>(props: MenuItemProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n 'onAction',\n ]);\n\n // Get state from context\n const context = useContext(MenuStateContext);\n if (!context) {\n throw new Error('MenuItem must be used within a Menu');\n }\n const state = context as MenuState<T>;\n\n // Create menu item aria props\n const itemAria = createMenuItem<T>(\n {\n key: local.id,\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n get onAction() {\n return local.onAction;\n },\n },\n state\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return itemAria.isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<MenuItemRenderProps>(() => ({\n isSelected: false, // Menu items don't have selection state\n isFocused: itemAria.isFocused(),\n isFocusVisible: itemAria.isFocusVisible(),\n isPressed: itemAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: itemAria.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Menu-item',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanItemProps = () => {\n const { ref: _ref1, ...rest } = itemAria.menuItemProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <li\n {...cleanItemProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={itemAria.isFocused() || undefined}\n data-focus-visible={itemAria.isFocusVisible() || undefined}\n data-pressed={itemAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={itemAria.isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </li>\n );\n}\n\n// Attach Item as a static property\nMenu.Item = MenuItem;\n", "/**\n * Select component for solidaria-components\n *\n * A pre-wired headless select that combines state + aria hooks.\n * Port of react-aria-components/src/Select.tsx\n */\n\nimport {\n type JSX,\n type Accessor,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createSelect,\n createHiddenSelect,\n createListBox,\n createOption,\n createHover,\n createInteractOutside,\n FocusScope,\n type AriaSelectProps,\n type AriaOptionProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createSelectState,\n type SelectState,\n type Key,\n type CollectionNode,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface SelectRenderProps {\n /** Whether the select is open. */\n isOpen: boolean;\n /** Whether the select is focused. */\n isFocused: boolean;\n /** Whether the select has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the select is disabled. */\n isDisabled: boolean;\n /** Whether the select is required. */\n isRequired: boolean;\n /** Whether a value is selected. */\n isSelected: boolean;\n}\n\nexport interface SelectProps<T>\n extends Omit<AriaSelectProps, 'children'>,\n SlotProps {\n /** The items to render in the select. */\n items: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** The currently selected key (controlled). */\n selectedKey?: Key | null;\n /** The default selected key (uncontrolled). */\n defaultSelectedKey?: Key | null;\n /** Handler called when selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n /** Whether the select is open (controlled). */\n isOpen?: boolean;\n /** Whether the select is open by default (uncontrolled). */\n defaultOpen?: boolean;\n /** Handler called when the open state changes. */\n onOpenChange?: (isOpen: boolean) => void;\n /** Placeholder text when no option is selected. */\n placeholder?: string;\n /** The name of the select, used when submitting an HTML form. */\n name?: string;\n /** The children of the component (compound components: SelectTrigger, SelectListBox). */\n children: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectRenderProps>;\n}\n\nexport interface SelectValueRenderProps<T> {\n /** The selected item. */\n selectedItem: CollectionNode<T> | null;\n /** The text value of the selected item. */\n selectedText: string | null;\n /** Whether a value is selected. */\n isSelected: boolean;\n /** The placeholder text. */\n placeholder: string | undefined;\n}\n\nexport interface SelectValueProps<T> extends SlotProps {\n /** The children of the value. A function may be provided to receive render props. */\n children?: RenderChildren<SelectValueRenderProps<T>>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectValueRenderProps<T>>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectValueRenderProps<T>>;\n /** Placeholder text when no option is selected. Overrides the placeholder from Select. */\n placeholder?: string;\n}\n\nexport interface SelectTriggerRenderProps {\n /** Whether the select is open. */\n isOpen: boolean;\n /** Whether the trigger is focused. */\n isFocused: boolean;\n /** Whether the trigger has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the trigger is hovered. */\n isHovered: boolean;\n /** Whether the trigger is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SelectTriggerProps extends SlotProps {\n /** The children of the trigger. A function may be provided to receive render props. */\n children?: RenderChildren<SelectTriggerRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectTriggerRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectTriggerRenderProps>;\n}\n\nexport interface SelectListBoxRenderProps {\n /** Whether the listbox is focused. */\n isFocused: boolean;\n}\n\nexport interface SelectListBoxProps<T> extends SlotProps {\n /** The children of the listbox. A function may be provided to render each item. */\n children?: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectListBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectListBoxRenderProps>;\n}\n\nexport interface SelectOptionRenderProps {\n /** Whether the option is selected. */\n isSelected: boolean;\n /** Whether the option is focused. */\n isFocused: boolean;\n /** Whether the option has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the option is pressed. */\n isPressed: boolean;\n /** Whether the option is hovered. */\n isHovered: boolean;\n /** Whether the option is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SelectOptionProps<T>\n extends Omit<AriaOptionProps, 'children' | 'key'>,\n SlotProps {\n /** The unique key for the option. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the option. A function may be provided to receive render props. */\n children?: RenderChildren<SelectOptionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SelectOptionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SelectOptionRenderProps>;\n /** The text value of the option (for typeahead). */\n textValue?: string;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface SelectContextValue<T> {\n state: SelectState<T>;\n triggerProps: JSX.HTMLAttributes<HTMLElement>;\n valueProps: JSX.HTMLAttributes<HTMLElement>;\n menuProps: JSX.HTMLAttributes<HTMLElement>;\n isOpen: Accessor<boolean>;\n isFocused: Accessor<boolean>;\n isFocusVisible: Accessor<boolean>;\n placeholder?: string;\n items: T[];\n renderItem?: (item: T) => JSX.Element;\n}\n\nexport const SelectContext = createContext<SelectContextValue<unknown> | null>(null);\nexport const SelectStateContext = createContext<SelectState<unknown> | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A select displays a collapsible list of options and allows a user to select one of them.\n */\nexport function Select<T>(props: SelectProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['class', 'style', 'slot'],\n ['items', 'getKey', 'getTextValue', 'getDisabled', 'disabledKeys', 'selectedKey', 'defaultSelectedKey', 'onSelectionChange', 'isOpen', 'defaultOpen', 'onOpenChange', 'name']\n );\n\n // Create select state\n const state = createSelectState<T>({\n get items() {\n return stateProps.items;\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectedKey() {\n return stateProps.selectedKey;\n },\n get defaultSelectedKey() {\n return stateProps.defaultSelectedKey;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n get isOpen() {\n return stateProps.isOpen;\n },\n get defaultOpen() {\n return stateProps.defaultOpen;\n },\n get onOpenChange() {\n return stateProps.onOpenChange;\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isRequired() {\n return ariaProps.isRequired;\n },\n });\n\n // Create select aria props\n const { triggerProps, valueProps, menuProps, isFocused, isFocusVisible, isOpen } = createSelect<T>(\n ariaProps,\n state\n );\n\n // Create hover for wrapper\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<SelectRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: !!ariaProps.isDisabled,\n isRequired: !!ariaProps.isRequired,\n isSelected: state.selectedKey() != null,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Select',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from hover props\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Create hidden select for form submission\n const { containerProps, selectProps: hiddenSelectProps } = createHiddenSelect({\n state,\n name: stateProps.name,\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n });\n\n return (\n <SelectContext.Provider\n value={{\n state,\n triggerProps,\n valueProps,\n menuProps,\n isOpen,\n isFocused,\n isFocusVisible,\n placeholder: ariaProps.placeholder,\n items: stateProps.items,\n }}\n >\n <SelectStateContext.Provider value={state}>\n <div\n {...domProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={isOpen() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-hovered={isHovered() || undefined}\n >\n {/* Hidden select for form submission */}\n <div {...containerProps}>\n <select {...hiddenSelectProps}>\n <option />\n <For each={stateProps.items}>\n {(item) => {\n const key = stateProps.getKey?.(item) ?? (item as any).key ?? (item as any).id;\n const textValue = stateProps.getTextValue?.(item) ?? (item as any).textValue ?? (item as any).label ?? String(item);\n return (\n <option value={String(key)} selected={key === state.selectedKey()}>\n {textValue}\n </option>\n );\n }}\n </For>\n </select>\n </div>\n {props.children}\n </div>\n </SelectStateContext.Provider>\n </SelectContext.Provider>\n );\n}\n\n/**\n * The trigger button for a select.\n */\nexport function SelectTrigger(props: SelectTriggerProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error('SelectTrigger must be used within a Select');\n }\n const { triggerProps, isOpen, isFocused, isFocusVisible, state } = context;\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<SelectTriggerRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isDisabled: state.isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Select-trigger',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanTriggerProps = () => {\n const { ref: _ref1, ...rest } = triggerProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n {...cleanTriggerProps()}\n {...cleanHoverProps()}\n type=\"button\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={isOpen() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={state.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n// Default children function for SelectValue - defined at module level for SSR stability\nfunction defaultSelectValueChildren<T>(values: SelectValueRenderProps<T>) {\n return values.selectedText ?? values.placeholder ?? '';\n}\n\n/**\n * Displays the selected value in a select.\n */\nexport function SelectValue<T>(props: SelectValueProps<T>): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot', 'placeholder']);\n\n // Get context\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error('SelectValue must be used within a Select');\n }\n const { valueProps, placeholder: contextPlaceholder } = context;\n const state = context.state as SelectState<T>;\n\n // Use local placeholder if provided, otherwise fall back to context\n const placeholder = () => local.placeholder ?? contextPlaceholder;\n\n // Render props values\n const renderValues = createMemo<SelectValueRenderProps<T>>(() => {\n const selectedItem = state.selectedItem();\n return {\n selectedItem,\n selectedText: selectedItem?.textValue ?? null,\n isSelected: selectedItem != null,\n placeholder: placeholder(),\n };\n });\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children ?? defaultSelectValueChildren,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Select-value',\n },\n renderValues\n );\n\n return (\n <span\n {...valueProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-placeholder={!renderValues().isSelected || undefined}\n >\n {renderProps.renderChildren()}\n </span>\n );\n}\n\n/**\n * The listbox popup for a select.\n */\nexport function SelectListBox<T>(props: SelectListBoxProps<T>): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(SelectContext);\n if (!context) {\n throw new Error('SelectListBox must be used within a Select');\n }\n const { menuProps, state: selectState, isOpen } = context;\n const state = selectState as SelectState<T>;\n\n // Ref for the listbox element (for click outside detection)\n let listBoxRef: HTMLUListElement | undefined;\n\n // Handle click outside to close select\n createInteractOutside({\n ref: () => listBoxRef ?? null,\n onInteractOutside: () => {\n if (isOpen()) {\n state.close();\n }\n },\n get isDisabled() {\n return !isOpen();\n },\n });\n\n // Create listbox aria props - reuse select's internal list state via collection\n const { listBoxProps } = createListBox(\n {},\n {\n collection: state.collection,\n focusedKey: state.focusedKey,\n setFocusedKey: state.setFocusedKey,\n isFocused: state.isFocused,\n setFocused: state.setFocused,\n selectedKeys: () => {\n const key = state.selectedKey();\n return key != null ? new Set([key]) : new Set();\n },\n isSelected: (key: Key) => state.selectedKey() === key,\n isDisabled: state.isKeyDisabled,\n selectionMode: () => 'single' as const,\n disallowEmptySelection: () => true,\n select: (key: Key) => state.setSelectedKey(key),\n toggleSelection: (key: Key) => state.setSelectedKey(key),\n replaceSelection: (key: Key) => state.setSelectedKey(key),\n extendSelection: () => {},\n selectAll: () => {},\n clearSelection: () => state.setSelectedKey(null),\n childFocusStrategy: () => null,\n } as any\n );\n\n // Render props values\n const renderValues = createMemo<SelectListBoxRenderProps>(() => ({\n isFocused: state.isFocused(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Select-listbox',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanMenuProps = () => {\n const { ref: _ref1, ...rest } = menuProps as Record<string, unknown>;\n return rest;\n };\n const cleanListBoxProps = () => {\n const { ref: _ref2, ...rest } = listBoxProps as Record<string, unknown>;\n return rest;\n };\n\n const items = () => Array.from(state.collection());\n\n return (\n <Show when={isOpen()}>\n <FocusScope restoreFocus autoFocus>\n <ul\n ref={(el) => (listBoxRef = el)}\n {...cleanMenuProps()}\n {...cleanListBoxProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused() || undefined}\n >\n <Show when={props.children} fallback={\n <For each={items()}>\n {(node) => (\n <SelectOption id={node.key}>\n {node.textValue}\n </SelectOption>\n )}\n </For>\n }>\n <For each={items()}>\n {(node) => node.value != null ? props.children!(node.value) : null}\n </For>\n </Show>\n </ul>\n </FocusScope>\n </Show>\n );\n}\n\n/**\n * An option in a select listbox.\n */\nexport function SelectOption<T>(props: SelectOptionProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n ]);\n\n // Get state from context\n const context = useContext(SelectStateContext);\n if (!context) {\n throw new Error('SelectOption must be used within a Select');\n }\n const state = context as SelectState<T>;\n\n // Create option aria props - adapt select state to list state interface\n const optionAria = createOption<T>(\n {\n key: local.id,\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n },\n {\n collection: state.collection,\n focusedKey: state.focusedKey,\n setFocusedKey: state.setFocusedKey,\n isFocused: state.isFocused,\n setFocused: state.setFocused,\n selectedKeys: () => {\n const key = state.selectedKey();\n return key != null ? new Set([key]) : new Set();\n },\n isSelected: (key: Key) => state.selectedKey() === key,\n isDisabled: state.isKeyDisabled,\n selectionMode: () => 'single' as const,\n disallowEmptySelection: () => true,\n select: (key: Key) => {\n state.setSelectedKey(key);\n state.close();\n },\n toggleSelection: (key: Key) => {\n state.setSelectedKey(key);\n state.close();\n },\n replaceSelection: (key: Key) => {\n state.setSelectedKey(key);\n state.close();\n },\n extendSelection: () => {},\n selectAll: () => {},\n clearSelection: () => state.setSelectedKey(null),\n childFocusStrategy: () => null,\n } as any\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return optionAria.isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<SelectOptionRenderProps>(() => ({\n isSelected: optionAria.isSelected(),\n isFocused: optionAria.isFocused(),\n isFocusVisible: optionAria.isFocusVisible(),\n isPressed: optionAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: optionAria.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Select-option',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanOptionProps = () => {\n const { ref: _ref1, ...rest } = optionAria.optionProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <li\n {...cleanOptionProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={optionAria.isSelected() || undefined}\n data-focused={optionAria.isFocused() || undefined}\n data-focus-visible={optionAria.isFocusVisible() || undefined}\n data-pressed={optionAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={optionAria.isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </li>\n );\n}\n\n// Attach sub-components\nSelect.Trigger = SelectTrigger;\nSelect.Value = SelectValue;\nSelect.ListBox = SelectListBox;\nSelect.Option = SelectOption;\n", "/**\n * Tabs component for solidaria-components\n *\n * A pre-wired headless tabs component that combines state + aria hooks.\n * Port of react-aria-components/src/Tabs.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createTabList,\n createTab,\n createTabPanel,\n createFocusRing,\n createHover,\n type AriaTabListProps,\n type AriaTabProps,\n type AriaTabPanelProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createTabListState,\n type TabListState,\n type Key,\n type TabOrientation,\n type KeyboardActivation,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TabsRenderProps {\n /** The orientation of the tabs. */\n orientation: TabOrientation;\n /** Whether the tabs are disabled. */\n isDisabled: boolean;\n}\n\nexport interface TabsProps<T> extends SlotProps {\n /** The items to render in the tab list. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** Keys of disabled tabs. */\n disabledKeys?: Iterable<Key>;\n /** The currently selected tab key (controlled). */\n selectedKey?: Key | null;\n /** The default selected tab key (uncontrolled). */\n defaultSelectedKey?: Key;\n /** Handler for tab selection changes. */\n onSelectionChange?: (key: Key) => void;\n /** Whether the tabs are disabled. */\n isDisabled?: boolean;\n /** The keyboard activation mode. */\n keyboardActivation?: KeyboardActivation;\n /** The orientation of the tabs. */\n orientation?: TabOrientation;\n /** The children of the component. */\n children?: RenderChildren<TabsRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TabsRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TabsRenderProps>;\n}\n\nexport interface TabListRenderProps {\n /** The orientation of the tab list. */\n orientation: TabOrientation;\n /** Whether the tab list is disabled. */\n isDisabled: boolean;\n /** Whether the tab list has focus. */\n isFocused: boolean;\n /** Whether the tab list has visible focus. */\n isFocusVisible: boolean;\n}\n\nexport interface TabListProps<T> extends Omit<AriaTabListProps, 'children'>, SlotProps {\n /** The children of the tab list - render function for each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TabListRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TabListRenderProps>;\n}\n\nexport interface TabRenderProps {\n /** Whether the tab is selected. */\n isSelected: boolean;\n /** Whether the tab is focused. */\n isFocused: boolean;\n /** Whether the tab has visible focus ring. */\n isFocusVisible: boolean;\n /** Whether the tab is pressed. */\n isPressed: boolean;\n /** Whether the tab is hovered. */\n isHovered: boolean;\n /** Whether the tab is disabled. */\n isDisabled: boolean;\n}\n\nexport interface TabProps extends Omit<AriaTabProps, 'key'>, SlotProps {\n /** The unique key for the tab. */\n id: Key;\n /** The children of the tab. */\n children?: RenderChildren<TabRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TabRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TabRenderProps>;\n}\n\nexport interface TabPanelRenderProps {\n /** Whether the panel is the selected one. */\n isSelected: boolean;\n /** Whether the panel is focused. */\n isFocused: boolean;\n /** Whether the panel has visible focus ring. */\n isFocusVisible: boolean;\n}\n\nexport interface TabPanelProps extends AriaTabPanelProps, SlotProps {\n /** The children of the tab panel. */\n children?: RenderChildren<TabPanelRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TabPanelRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TabPanelRenderProps>;\n /** Whether to keep the panel mounted when not selected. */\n shouldForceMount?: boolean;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface TabsContextValue<T> {\n state: TabListState<T>;\n items: T[];\n}\n\nexport const TabsContext = createContext<TabsContextValue<unknown> | null>(null);\nexport const TabsStateContext = createContext<TabListState<unknown> | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * Tabs provide a way to organize content into multiple sections, with only one section visible at a time.\n */\nexport function Tabs<T>(props: TabsProps<T>): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['class', 'style', 'slot'],\n ['items', 'getKey', 'getTextValue', 'getDisabled', 'disabledKeys', 'selectedKey', 'defaultSelectedKey', 'onSelectionChange', 'isDisabled', 'keyboardActivation', 'orientation']\n );\n\n // Create tab list state\n const state = createTabListState<T>({\n get items() {\n return stateProps.items;\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectedKey() {\n return stateProps.selectedKey;\n },\n get defaultSelectedKey() {\n return stateProps.defaultSelectedKey;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n get isDisabled() {\n return stateProps.isDisabled;\n },\n get keyboardActivation() {\n return stateProps.keyboardActivation;\n },\n get orientation() {\n return stateProps.orientation;\n },\n });\n\n // Render props values\n const renderValues = createMemo<TabsRenderProps>(() => ({\n orientation: state.orientation(),\n isDisabled: state.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n children: props.children,\n defaultClassName: 'solidaria-Tabs',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <TabsContext.Provider value={{ state, items: stateProps.items ?? [] }}>\n <TabsStateContext.Provider value={state}>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-orientation={state.orientation()}\n data-disabled={state.isDisabled() || undefined}\n >\n {props.children as JSX.Element}\n </div>\n </TabsStateContext.Provider>\n </TabsContext.Provider>\n );\n}\n\n/**\n * A TabList contains Tab elements that represent the available tabs.\n */\nexport function TabList<T>(props: TabListProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Get state from context\n const context = useContext(TabsContext);\n\n return (\n <Show\n when={context}\n fallback={<div class=\"solidaria-TabList\" role=\"tablist\" />}\n >\n {(ctx) => (\n <TabListInner\n context={ctx()}\n local={local}\n ariaProps={ariaProps}\n children={props.children}\n />\n )}\n </Show>\n );\n}\n\n/** Inner TabList component that has access to context */\nfunction TabListInner<T>(props: {\n context: TabsContextValue<unknown>;\n local: { class?: ClassNameOrFunction<TabListRenderProps>; style?: StyleOrFunction<TabListRenderProps>; slot?: string };\n ariaProps: Omit<TabListProps<T>, 'children' | 'class' | 'style' | 'slot'>;\n children?: (item: T) => JSX.Element;\n}): JSX.Element {\n const state = props.context.state as TabListState<T>;\n const items = props.context.items as T[];\n\n // Create tab list aria props\n const { tabListProps } = createTabList<T>(props.ariaProps as AriaTabListProps, state);\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<TabListRenderProps>(() => ({\n orientation: state.orientation(),\n isDisabled: state.isDisabled(),\n isFocused: state.isFocused() || isFocused(),\n isFocusVisible: isFocusVisible(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: props.local.class,\n style: props.local.style,\n defaultClassName: 'solidaria-TabList',\n },\n renderValues\n );\n\n // Helper to safely call event handlers that may be bound tuples\n const callHandler = <E extends Event>(\n handler: ((e: E) => void) | [object, (e: E) => void] | undefined,\n event: E\n ) => {\n if (!handler) return;\n if (Array.isArray(handler)) {\n handler[1].call(handler[0], event);\n } else {\n handler(event);\n }\n };\n\n // Combine event handlers\n const handleKeyDown = (e: KeyboardEvent) => {\n tabListProps.onKeyDown(e);\n };\n\n const handleFocus = (e: FocusEvent) => {\n tabListProps.onFocus(e);\n callHandler(focusProps.onFocus as any, e);\n };\n\n const handleBlur = (e: FocusEvent) => {\n tabListProps.onBlur(e);\n callHandler(focusProps.onBlur as any, e);\n };\n\n return (\n <div\n role={tabListProps.role}\n aria-orientation={tabListProps['aria-orientation']}\n aria-label={tabListProps['aria-label']}\n aria-labelledby={tabListProps['aria-labelledby']}\n aria-describedby={tabListProps['aria-describedby']}\n class={renderProps.class()}\n style={renderProps.style()}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n data-focused={state.isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-orientation={state.orientation()}\n data-disabled={state.isDisabled() || undefined}\n >\n <For each={items}>{(item) => props.children?.(item)}</For>\n </div>\n );\n}\n\n/**\n * A Tab represents an individual tab in a TabList.\n */\nexport function Tab(props: TabProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n ]);\n\n // Get state from context\n const context = useContext(TabsStateContext);\n\n return (\n <Show\n when={context}\n fallback={<div class=\"solidaria-Tab\" role=\"tab\" />}\n >\n {(state) => (\n <TabInner\n state={state()}\n local={local}\n ariaProps={ariaProps}\n children={props.children}\n />\n )}\n </Show>\n );\n}\n\n/** Inner Tab component that has access to context */\nfunction TabInner(props: {\n state: TabListState<unknown>;\n local: { class?: ClassNameOrFunction<TabRenderProps>; style?: StyleOrFunction<TabRenderProps>; slot?: string; id: Key };\n ariaProps: Omit<TabProps, 'children' | 'class' | 'style' | 'slot' | 'id'>;\n children?: RenderChildren<TabRenderProps>;\n}): JSX.Element {\n // Create tab aria props\n const tabAria = createTab<unknown>(\n {\n key: props.local.id,\n get isDisabled() {\n return props.ariaProps.isDisabled;\n },\n get 'aria-label'() {\n return props.ariaProps['aria-label'];\n },\n },\n props.state\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return tabAria.isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<TabRenderProps>(() => ({\n isSelected: tabAria.isSelected(),\n isFocused: tabAria.isFocused(),\n isFocusVisible: tabAria.isFocusVisible(),\n isPressed: tabAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: tabAria.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.local.class,\n style: props.local.style,\n defaultClassName: 'solidaria-Tab',\n },\n renderValues\n );\n\n return (\n <div\n id={tabAria.tabProps.id}\n role={tabAria.tabProps.role}\n aria-selected={tabAria.isSelected()}\n aria-disabled={tabAria.isDisabled() || undefined}\n aria-controls={tabAria.isSelected() ? tabAria.tabProps['aria-controls'] : undefined}\n aria-label={tabAria.tabProps['aria-label']}\n tabIndex={tabAria.isSelected() && !tabAria.isDisabled() ? 0 : -1}\n class={renderProps.class()}\n style={renderProps.style()}\n onKeyDown={tabAria.tabProps.onKeyDown}\n onMouseDown={tabAria.tabProps.onMouseDown}\n onPointerDown={tabAria.tabProps.onPointerDown}\n onClick={tabAria.tabProps.onClick}\n onFocus={tabAria.tabProps.onFocus}\n {...hoverProps}\n data-selected={tabAria.isSelected() || undefined}\n data-focused={tabAria.isFocused() || undefined}\n data-focus-visible={tabAria.isFocusVisible() || undefined}\n data-pressed={tabAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={tabAria.isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * A TabPanel displays the content for a selected Tab.\n */\nexport function TabPanel(props: TabPanelProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'shouldForceMount',\n ]);\n\n // Get state from context (may be null for SSR scenarios)\n const state = useContext(TabsStateContext);\n\n // Create tab panel aria props\n const { tabPanelProps, isSelected } = createTabPanel<unknown>(ariaProps, state);\n\n // Create focus ring for the panel\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<TabPanelRenderProps>(() => ({\n isSelected: isSelected(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-TabPanel',\n },\n renderValues\n );\n\n // Determine if we should render the panel\n // If no id is provided, render when any tab is selected (shared panel pattern)\n // If id is provided, render when that specific tab is selected\n const shouldRender = () => {\n if (local.shouldForceMount) return true;\n if (ariaProps.id === undefined) {\n // Shared panel pattern - render when any tab is selected\n return state ? state.selectedKey() !== null : true;\n }\n return isSelected();\n };\n\n return (\n <Show when={shouldRender()}>\n <div\n id={tabPanelProps.id}\n role={tabPanelProps.role}\n aria-labelledby={tabPanelProps['aria-labelledby']}\n aria-label={tabPanelProps['aria-label']}\n aria-describedby={tabPanelProps['aria-describedby']}\n tabIndex={tabPanelProps.tabIndex}\n class={renderProps.class()}\n style={renderProps.style()}\n onFocus={focusProps.onFocus}\n onBlur={focusProps.onBlur}\n data-selected={isSelected() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n inert={ariaProps.id !== undefined && !isSelected() ? true : undefined}\n hidden={ariaProps.id !== undefined && !isSelected() && !local.shouldForceMount ? true : undefined}\n >\n {renderProps.renderChildren()}\n </div>\n </Show>\n );\n}\n\n// Attach sub-components\nTabs.List = TabList;\nTabs.Tab = Tab;\nTabs.Panel = TabPanel;\n", "/**\n * Breadcrumbs component for solidaria-components\n *\n * A pre-wired headless breadcrumbs component that combines aria hooks.\n * Port of react-aria-components Breadcrumbs.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n} from 'solid-js';\nimport {\n createBreadcrumbs,\n createBreadcrumbItem,\n type AriaBreadcrumbsProps,\n type AriaBreadcrumbItemProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface BreadcrumbsRenderProps {\n /** Whether the breadcrumbs are disabled. */\n isDisabled: boolean;\n}\n\nexport interface BreadcrumbsProps<T> extends Omit<AriaBreadcrumbsProps, 'isDisabled'>, SlotProps {\n /** The items to render in the breadcrumbs. */\n items?: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => string | number;\n /** Whether the breadcrumbs are disabled. */\n isDisabled?: boolean;\n /** The children of the component - render function for each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbsRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbsRenderProps>;\n}\n\nexport interface BreadcrumbItemRenderProps {\n /** Whether this is the current/last item. */\n isCurrent: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has visible focus ring. */\n isFocusVisible: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n}\n\nexport interface BreadcrumbItemProps extends Omit<AriaBreadcrumbItemProps, 'isDisabled'>, SlotProps {\n /** The children of the breadcrumb item. */\n children?: RenderChildren<BreadcrumbItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<BreadcrumbItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<BreadcrumbItemRenderProps>;\n /** Whether this item is disabled. */\n isDisabled?: boolean;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface BreadcrumbsContextValue {\n isDisabled: boolean;\n}\n\nexport const BreadcrumbsContext = createContext<BreadcrumbsContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * Breadcrumbs show hierarchy and navigational context for a user's location within an application.\n */\nexport function Breadcrumbs<T>(props: BreadcrumbsProps<T>): JSX.Element {\n const [local, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'items', 'getKey', 'isDisabled'],\n ['aria-label', 'aria-labelledby', 'aria-describedby']\n );\n\n const isDisabled = () => local.isDisabled ?? false;\n const items = () => local.items ?? [];\n\n // Create breadcrumbs aria props\n const { navProps } = createBreadcrumbs({\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n get 'aria-labelledby'() {\n return ariaProps['aria-labelledby'];\n },\n get 'aria-describedby'() {\n return ariaProps['aria-describedby'];\n },\n get isDisabled() {\n return isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<BreadcrumbsRenderProps>(() => ({\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Breadcrumbs',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <BreadcrumbsContext.Provider value={{ isDisabled: isDisabled() }}>\n <nav\n {...navProps}\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={isDisabled() || undefined}\n >\n <ol style={{ display: 'flex', 'align-items': 'center', 'list-style': 'none', margin: 0, padding: 0 }}>\n <For each={items()}>\n {(item) => (\n <li style={{ display: 'flex', 'align-items': 'center' }}>\n {props.children(item)}\n </li>\n )}\n </For>\n </ol>\n </nav>\n </BreadcrumbsContext.Provider>\n );\n}\n\n/**\n * A BreadcrumbItem represents an individual breadcrumb in the navigation trail.\n */\nexport function BreadcrumbItem(props: BreadcrumbItemProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'isDisabled',\n ]);\n\n // Get context\n const context = useContext(BreadcrumbsContext);\n const isDisabled = () => local.isDisabled ?? context?.isDisabled ?? false;\n const isCurrent = () => ariaProps.isCurrent ?? false;\n\n // Create breadcrumb item aria props\n const { itemProps, isPressed } = createBreadcrumbItem({\n get isCurrent() {\n return isCurrent();\n },\n get isDisabled() {\n return isDisabled();\n },\n get href() {\n return ariaProps.href;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get elementType() {\n return ariaProps.elementType;\n },\n get onPress() {\n return ariaProps.onPress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onClick() {\n return ariaProps.onClick;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n get 'aria-current'() {\n return ariaProps['aria-current'];\n },\n });\n\n // Render props values\n const renderValues = createMemo<BreadcrumbItemRenderProps>(() => ({\n isCurrent: isCurrent(),\n isDisabled: isDisabled(),\n isPressed: isPressed(),\n isFocused: false, // Would need focus tracking\n isFocusVisible: false, // Would need focus visible tracking\n isHovered: false, // Would need hover tracking\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-BreadcrumbItem',\n },\n renderValues\n );\n\n // Merge inline flex styles with user styles\n const mergedStyle = () => {\n const userStyle = renderProps.style();\n const baseStyle = { display: 'inline-flex', 'align-items': 'center' };\n return userStyle ? { ...baseStyle, ...userStyle } : baseStyle;\n };\n\n return (\n <a\n {...(itemProps as Record<string, unknown>)}\n class={renderProps.class()}\n style={mergedStyle()}\n data-current={isCurrent() || undefined}\n data-disabled={isDisabled() || undefined}\n data-pressed={isPressed() || undefined}\n >\n {renderProps.renderChildren()}\n </a>\n );\n}\n\n// Attach sub-components\nBreadcrumbs.Item = BreadcrumbItem;\n", "/**\n * NumberField component for solidaria-components\n *\n * A pre-wired headless number field that combines state + aria hooks.\n * Port of react-aria-components/src/NumberField.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n} from 'solid-js';\nimport {\n createNumberField,\n createFocusRing,\n createHover,\n createPress,\n type AriaNumberFieldProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createNumberFieldState,\n type NumberFieldState,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface NumberFieldRenderProps {\n /** Whether the number field is disabled. */\n isDisabled: boolean;\n /** Whether the number field is invalid. */\n isInvalid: boolean;\n /** Whether the number field is required. */\n isRequired: boolean;\n /** Whether the number field is read-only. */\n isReadOnly: boolean;\n /** The current numeric value. */\n value: number;\n}\n\nexport interface NumberFieldProps extends Omit<AriaNumberFieldProps, 'label'>, SlotProps {\n /** The current value (controlled). */\n value?: number;\n /** The default value (uncontrolled). */\n defaultValue?: number;\n /** Handler called when the value changes. */\n onChange?: (value: number) => void;\n /** The minimum value. */\n minValue?: number;\n /** The maximum value. */\n maxValue?: number;\n /** The step value for increment/decrement. */\n step?: number;\n /** The locale for number formatting. */\n locale?: string;\n /** Number format options. */\n formatOptions?: Intl.NumberFormatOptions;\n /** A visible label for the number field. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<NumberFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldRenderProps>;\n}\n\nexport interface NumberFieldInputRenderProps {\n /** Whether the input is focused. */\n isFocused: boolean;\n /** Whether the input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the input is hovered. */\n isHovered: boolean;\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is invalid. */\n isInvalid: boolean;\n}\n\nexport interface NumberFieldInputProps extends SlotProps {\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldInputRenderProps>;\n}\n\nexport interface NumberFieldButtonRenderProps {\n /** Whether the button is pressed. */\n isPressed: boolean;\n /** Whether the button is hovered. */\n isHovered: boolean;\n /** Whether the button is disabled. */\n isDisabled: boolean;\n}\n\nexport interface NumberFieldIncrementButtonProps extends SlotProps {\n /** The children of the button. */\n children?: RenderChildren<NumberFieldButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldButtonRenderProps>;\n}\n\nexport interface NumberFieldDecrementButtonProps extends SlotProps {\n /** The children of the button. */\n children?: RenderChildren<NumberFieldButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<NumberFieldButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<NumberFieldButtonRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface NumberFieldContextValue {\n state: NumberFieldState;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n incrementButtonProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;\n decrementButtonProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;\n labelProps: JSX.HTMLAttributes<HTMLElement>;\n groupProps: JSX.HTMLAttributes<HTMLElement>;\n descriptionProps: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps: JSX.HTMLAttributes<HTMLElement>;\n isDisabled: boolean;\n isInvalid: boolean;\n isRequired: boolean;\n isReadOnly: boolean;\n}\n\nexport const NumberFieldContext = createContext<NumberFieldContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A number field allows a user to enter a number and increment/decrement the value.\n */\nexport function NumberField(props: NumberFieldProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n ['value', 'defaultValue', 'onChange', 'minValue', 'maxValue', 'step', 'locale', 'formatOptions'],\n ['label', 'aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled', 'isReadOnly', 'isRequired', 'isInvalid', 'description', 'errorMessage', 'id', 'autoFocus', 'name']\n );\n\n // Create number field state\n const state = createNumberFieldState({\n get value() {\n return stateProps.value;\n },\n get defaultValue() {\n return stateProps.defaultValue;\n },\n get onChange() {\n return stateProps.onChange;\n },\n get minValue() {\n return stateProps.minValue;\n },\n get maxValue() {\n return stateProps.maxValue;\n },\n get step() {\n return stateProps.step;\n },\n get locale() {\n return stateProps.locale;\n },\n get formatOptions() {\n return stateProps.formatOptions;\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly;\n },\n });\n\n // Ref for the input\n let inputRef: HTMLInputElement | undefined;\n\n // Create number field aria props\n const {\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n descriptionProps,\n errorMessageProps,\n } = createNumberField(ariaProps, state, () => inputRef ?? null);\n\n // Render props values\n const renderValues = createMemo<NumberFieldRenderProps>(() => ({\n isDisabled: ariaProps.isDisabled ?? false,\n isInvalid: ariaProps.isInvalid ?? false,\n isRequired: ariaProps.isRequired ?? false,\n isReadOnly: ariaProps.isReadOnly ?? false,\n value: state.numberValue(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-NumberField',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <NumberFieldContext.Provider\n value={{\n state,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n labelProps,\n groupProps,\n descriptionProps,\n errorMessageProps,\n isDisabled: ariaProps.isDisabled ?? false,\n isInvalid: ariaProps.isInvalid ?? false,\n isRequired: ariaProps.isRequired ?? false,\n isReadOnly: ariaProps.isReadOnly ?? false,\n }}\n >\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={ariaProps.isDisabled || undefined}\n data-invalid={ariaProps.isInvalid || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-readonly={ariaProps.isReadOnly || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n </NumberFieldContext.Provider>\n );\n}\n\n/**\n * The label for a number field.\n */\nexport function NumberFieldLabel(props: { children?: JSX.Element; class?: string; style?: JSX.CSSProperties }): JSX.Element {\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error('NumberFieldLabel must be used within a NumberField');\n }\n\n return (\n <span\n {...context.labelProps}\n class={props.class ?? 'solidaria-NumberField-label'}\n style={props.style}\n >\n {props.children}\n </span>\n );\n}\n\n/**\n * The input group for a number field (contains input and buttons).\n */\nexport function NumberFieldGroup(props: { children?: JSX.Element; class?: string; style?: JSX.CSSProperties }): JSX.Element {\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error('NumberFieldGroup must be used within a NumberField');\n }\n\n // Extract ref to avoid type issues\n const cleanGroupProps = () => {\n const { ref: _ref, ...rest } = context.groupProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <div\n {...cleanGroupProps()}\n class={props.class ?? 'solidaria-NumberField-group'}\n style={props.style}\n >\n {props.children}\n </div>\n );\n}\n\n/**\n * The input element for a number field.\n */\nexport function NumberFieldInput(props: NumberFieldInputProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error('NumberFieldInput must be used within a NumberField');\n }\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<NumberFieldInputRenderProps>(() => ({\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isDisabled: context.isDisabled,\n isInvalid: context.isInvalid,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-NumberField-input',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanInputProps = () => {\n const { ref: _ref, ...rest } = context.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <input\n {...cleanInputProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={context.isDisabled || undefined}\n data-invalid={context.isInvalid || undefined}\n />\n );\n}\n\n/**\n * The increment button for a number field.\n */\nexport function NumberFieldIncrementButton(props: NumberFieldIncrementButtonProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error('NumberFieldIncrementButton must be used within a NumberField');\n }\n\n // Create press\n const { isPressed, pressProps } = createPress({\n get isDisabled() {\n return context.isDisabled || !context.state.canIncrement();\n },\n onPress: () => {\n context.state.increment();\n },\n });\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled || !context.state.canIncrement();\n },\n });\n\n const isDisabled = () => context.isDisabled || !context.state.canIncrement();\n\n // Render props values\n const renderValues = createMemo<NumberFieldButtonRenderProps>(() => ({\n isPressed: isPressed(),\n isHovered: isHovered(),\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-NumberField-increment',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanButtonProps = () => {\n const { ref: _ref, ...rest } = context.incrementButtonProps as Record<string, unknown>;\n return rest;\n };\n const cleanPressProps = () => {\n const { ref: _ref, ...rest } = pressProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n {...cleanButtonProps()}\n {...cleanPressProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n/**\n * The decrement button for a number field.\n */\nexport function NumberFieldDecrementButton(props: NumberFieldDecrementButtonProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(NumberFieldContext);\n if (!context) {\n throw new Error('NumberFieldDecrementButton must be used within a NumberField');\n }\n\n // Create press\n const { isPressed, pressProps } = createPress({\n get isDisabled() {\n return context.isDisabled || !context.state.canDecrement();\n },\n onPress: () => {\n context.state.decrement();\n },\n });\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled || !context.state.canDecrement();\n },\n });\n\n const isDisabled = () => context.isDisabled || !context.state.canDecrement();\n\n // Render props values\n const renderValues = createMemo<NumberFieldButtonRenderProps>(() => ({\n isPressed: isPressed(),\n isHovered: isHovered(),\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-NumberField-decrement',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanButtonProps = () => {\n const { ref: _ref, ...rest } = context.decrementButtonProps as Record<string, unknown>;\n return rest;\n };\n const cleanPressProps = () => {\n const { ref: _ref, ...rest } = pressProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n {...cleanButtonProps()}\n {...cleanPressProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n// Attach sub-components\nNumberField.Label = NumberFieldLabel;\nNumberField.Group = NumberFieldGroup;\nNumberField.Input = NumberFieldInput;\nNumberField.IncrementButton = NumberFieldIncrementButton;\nNumberField.DecrementButton = NumberFieldDecrementButton;\n", "/**\n * SearchField component for solidaria-components\n *\n * A pre-wired headless search field that combines state + aria hooks.\n * Port of react-aria-components/src/SearchField.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n Show,\n} from 'solid-js';\nimport {\n createSearchField,\n createFocusRing,\n createHover,\n createPress,\n type AriaSearchFieldProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createSearchFieldState,\n type SearchFieldState,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface SearchFieldRenderProps {\n /** Whether the search field is empty. */\n isEmpty: boolean;\n /** Whether the search field is disabled. */\n isDisabled: boolean;\n /** Whether the search field is invalid. */\n isInvalid: boolean;\n /** Whether the search field is read-only. */\n isReadOnly: boolean;\n /** Whether the search field is required. */\n isRequired: boolean;\n /** The current value. */\n value: string;\n}\n\nexport interface SearchFieldProps extends Omit<AriaSearchFieldProps, 'label'>, SlotProps {\n /** The current value (controlled). */\n value?: string;\n /** The default value (uncontrolled). */\n defaultValue?: string;\n /** Handler called when the value changes. */\n onChange?: (value: string) => void;\n /** Handler called when the user submits the search. */\n onSubmit?: (value: string) => void;\n /** Handler called when the field is cleared. */\n onClear?: () => void;\n /** A visible label for the search field. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<SearchFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldRenderProps>;\n}\n\nexport interface SearchFieldInputRenderProps {\n /** Whether the input is focused. */\n isFocused: boolean;\n /** Whether the input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the input is hovered. */\n isHovered: boolean;\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is invalid. */\n isInvalid: boolean;\n}\n\nexport interface SearchFieldInputProps extends SlotProps {\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldInputRenderProps>;\n}\n\nexport interface SearchFieldClearButtonRenderProps {\n /** Whether the button is pressed. */\n isPressed: boolean;\n /** Whether the button is hovered. */\n isHovered: boolean;\n /** Whether the button is disabled. */\n isDisabled: boolean;\n}\n\nexport interface SearchFieldClearButtonProps extends SlotProps {\n /** The children of the button. */\n children?: RenderChildren<SearchFieldClearButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SearchFieldClearButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SearchFieldClearButtonRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface SearchFieldContextValue {\n state: SearchFieldState;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n clearButtonProps: {\n 'aria-label': string;\n tabIndex: number;\n disabled?: boolean;\n onMouseDown: (e: MouseEvent) => void;\n onClick: () => void;\n };\n labelProps: JSX.HTMLAttributes<HTMLElement>;\n descriptionProps: JSX.HTMLAttributes<HTMLElement>;\n errorMessageProps: JSX.HTMLAttributes<HTMLElement>;\n isDisabled: boolean;\n isInvalid: boolean;\n isRequired: boolean;\n isReadOnly: boolean;\n inputRef: HTMLInputElement | undefined;\n setInputRef: (el: HTMLInputElement) => void;\n}\n\nexport const SearchFieldContext = createContext<SearchFieldContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A search field allows a user to enter and clear a search query.\n */\nexport function SearchField(props: SearchFieldProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n ['value', 'defaultValue', 'onChange', 'onSubmit', 'onClear'],\n ['label', 'aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled', 'isReadOnly', 'isRequired', 'isInvalid', 'description', 'errorMessage', 'id', 'autoFocus', 'name', 'placeholder', 'autoComplete', 'maxLength', 'minLength', 'pattern']\n );\n\n // Create search field state\n const state = createSearchFieldState({\n get value() {\n return stateProps.value;\n },\n get defaultValue() {\n return stateProps.defaultValue;\n },\n get onChange() {\n return stateProps.onChange;\n },\n });\n\n // Ref for the input\n let inputRef: HTMLInputElement | undefined;\n const setInputRef = (el: HTMLInputElement) => {\n inputRef = el;\n };\n\n // Create search field aria props\n const {\n labelProps,\n inputProps,\n clearButtonProps,\n descriptionProps,\n errorMessageProps,\n } = createSearchField(\n {\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly;\n },\n get isRequired() {\n return ariaProps.isRequired;\n },\n get isInvalid() {\n return ariaProps.isInvalid;\n },\n get label() {\n return ariaProps.label;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n get 'aria-labelledby'() {\n return ariaProps['aria-labelledby'];\n },\n get 'aria-describedby'() {\n return ariaProps['aria-describedby'];\n },\n get description() {\n return ariaProps.description;\n },\n get errorMessage() {\n return ariaProps.errorMessage;\n },\n get placeholder() {\n return ariaProps.placeholder;\n },\n get name() {\n return ariaProps.name;\n },\n get autoFocus() {\n return ariaProps.autoFocus;\n },\n get autoComplete() {\n return ariaProps.autoComplete;\n },\n get maxLength() {\n return ariaProps.maxLength;\n },\n get minLength() {\n return ariaProps.minLength;\n },\n get pattern() {\n return ariaProps.pattern;\n },\n get onSubmit() {\n return stateProps.onSubmit;\n },\n get onClear() {\n return stateProps.onClear;\n },\n },\n state,\n () => inputRef ?? null\n );\n\n // Render props values\n const renderValues = createMemo<SearchFieldRenderProps>(() => ({\n isEmpty: state.value() === '',\n isDisabled: ariaProps.isDisabled ?? false,\n isInvalid: ariaProps.isInvalid ?? false,\n isRequired: ariaProps.isRequired ?? false,\n isReadOnly: ariaProps.isReadOnly ?? false,\n value: state.value(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-SearchField',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <SearchFieldContext.Provider\n value={{\n state,\n inputProps,\n clearButtonProps,\n labelProps: labelProps as JSX.HTMLAttributes<HTMLElement>,\n descriptionProps,\n errorMessageProps,\n isDisabled: ariaProps.isDisabled ?? false,\n isInvalid: ariaProps.isInvalid ?? false,\n isRequired: ariaProps.isRequired ?? false,\n isReadOnly: ariaProps.isReadOnly ?? false,\n inputRef,\n setInputRef,\n }}\n >\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-empty={state.value() === '' || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n data-invalid={ariaProps.isInvalid || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-readonly={ariaProps.isReadOnly || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n </SearchFieldContext.Provider>\n );\n}\n\n/**\n * The label for a search field.\n */\nexport function SearchFieldLabel(props: { children?: JSX.Element; class?: string; style?: JSX.CSSProperties }): JSX.Element {\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error('SearchFieldLabel must be used within a SearchField');\n }\n\n return (\n <span\n {...context.labelProps}\n class={props.class ?? 'solidaria-SearchField-label'}\n style={props.style}\n >\n {props.children}\n </span>\n );\n}\n\n/**\n * The input element for a search field.\n */\nexport function SearchFieldInput(props: SearchFieldInputProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error('SearchFieldInput must be used within a SearchField');\n }\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<SearchFieldInputRenderProps>(() => ({\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isDisabled: context.isDisabled,\n isInvalid: context.isInvalid,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-SearchField-input',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanInputProps = () => {\n const { ref: _ref, ...rest } = context.inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <input\n ref={context.setInputRef}\n {...cleanInputProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={context.isDisabled || undefined}\n data-invalid={context.isInvalid || undefined}\n />\n );\n}\n\n/**\n * The clear button for a search field.\n */\nexport function SearchFieldClearButton(props: SearchFieldClearButtonProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(SearchFieldContext);\n if (!context) {\n throw new Error('SearchFieldClearButton must be used within a SearchField');\n }\n\n // Create press\n const { isPressed, pressProps } = createPress({\n get isDisabled() {\n return context.isDisabled || context.isReadOnly;\n },\n onPress: () => {\n context.clearButtonProps.onClick();\n },\n });\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return context.isDisabled || context.isReadOnly;\n },\n });\n\n const isDisabled = () => context.isDisabled || context.isReadOnly;\n const isEmpty = () => context.state.value() === '';\n\n // Render props values\n const renderValues = createMemo<SearchFieldClearButtonRenderProps>(() => ({\n isPressed: isPressed(),\n isHovered: isHovered(),\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-SearchField-clear',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanPressProps = () => {\n const { ref: _ref, ...rest } = pressProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Only show clear button when there's a value\n return (\n <Show when={!isEmpty()}>\n <button\n type=\"button\"\n aria-label={context.clearButtonProps['aria-label']}\n tabIndex={context.clearButtonProps.tabIndex}\n disabled={context.clearButtonProps.disabled}\n onMouseDown={context.clearButtonProps.onMouseDown}\n {...cleanPressProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-pressed={isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n </Show>\n );\n}\n\n// Attach sub-components\nSearchField.Label = SearchFieldLabel;\nSearchField.Input = SearchFieldInput;\nSearchField.ClearButton = SearchFieldClearButton;\n", "/**\n * Slider component for solidaria-components\n *\n * A pre-wired headless slider that combines state + aria hooks.\n * Port of react-aria-components/src/Slider.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n Show,\n} from 'solid-js';\nimport {\n createSlider,\n createFocusRing,\n createHover,\n type AriaSliderProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createSliderState,\n type SliderState,\n type SliderOrientation,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface SliderRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the slider is being dragged. */\n isDragging: boolean;\n /** Whether the slider is focused. */\n isFocused: boolean;\n /** The current value. */\n value: number;\n /** The value as a percent (0-1). */\n valuePercent: number;\n /** The orientation. */\n orientation: SliderOrientation;\n}\n\nexport interface SliderProps extends Omit<AriaSliderProps, 'label'>, SlotProps {\n /** The current value (controlled). */\n value?: number;\n /** The default value (uncontrolled). */\n defaultValue?: number;\n /** Handler called when the value changes. */\n onChange?: (value: number) => void;\n /** Handler called when dragging ends. */\n onChangeEnd?: (value: number) => void;\n /** The minimum value. */\n minValue?: number;\n /** The maximum value. */\n maxValue?: number;\n /** The step value. */\n step?: number;\n /** The orientation of the slider. */\n orientation?: SliderOrientation;\n /** The locale for number formatting. */\n locale?: string;\n /** Number format options. */\n formatOptions?: Intl.NumberFormatOptions;\n /** A visible label for the slider. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<SliderRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SliderRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SliderRenderProps>;\n}\n\nexport interface SliderTrackRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the slider is being dragged. */\n isDragging: boolean;\n /** The value as a percent (0-1). */\n valuePercent: number;\n /** The orientation. */\n orientation: SliderOrientation;\n}\n\nexport interface SliderTrackProps extends SlotProps {\n /** The children of the track. */\n children?: RenderChildren<SliderTrackRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SliderTrackRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SliderTrackRenderProps>;\n}\n\nexport interface SliderThumbRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the thumb is being dragged. */\n isDragging: boolean;\n /** Whether the thumb is focused. */\n isFocused: boolean;\n /** Whether the thumb has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the thumb is hovered. */\n isHovered: boolean;\n /** The current value. */\n value: number;\n /** The value as a percent (0-1). */\n valuePercent: number;\n}\n\nexport interface SliderThumbProps extends SlotProps {\n /** The children of the thumb. */\n children?: RenderChildren<SliderThumbRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SliderThumbRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SliderThumbRenderProps>;\n}\n\nexport interface SliderOutputRenderProps {\n /** The current value. */\n value: number;\n /** The formatted value string. */\n formattedValue: string;\n}\n\nexport interface SliderOutputProps extends SlotProps {\n /** The children of the output. */\n children?: RenderChildren<SliderOutputRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<SliderOutputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<SliderOutputRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface SliderContextValue {\n state: SliderState;\n trackProps: JSX.HTMLAttributes<HTMLElement>;\n thumbProps: JSX.HTMLAttributes<HTMLElement>;\n outputProps: JSX.HTMLAttributes<HTMLElement>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n trackRef: HTMLElement | undefined;\n setTrackRef: (el: HTMLElement) => void;\n}\n\nexport const SliderContext = createContext<SliderContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A slider allows users to select a value from a range.\n */\nexport function Slider(props: SliderProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['class', 'style', 'slot'],\n ['value', 'defaultValue', 'onChange', 'onChangeEnd', 'minValue', 'maxValue', 'step', 'orientation', 'locale', 'formatOptions'],\n ['label', 'aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled', 'id']\n );\n\n // Create slider state\n const state = createSliderState({\n get value() {\n return stateProps.value;\n },\n get defaultValue() {\n return stateProps.defaultValue;\n },\n get onChange() {\n return stateProps.onChange;\n },\n get onChangeEnd() {\n return stateProps.onChangeEnd;\n },\n get minValue() {\n return stateProps.minValue;\n },\n get maxValue() {\n return stateProps.maxValue;\n },\n get step() {\n return stateProps.step;\n },\n get orientation() {\n return stateProps.orientation;\n },\n get locale() {\n return stateProps.locale;\n },\n get formatOptions() {\n return stateProps.formatOptions;\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n });\n\n // Track ref for pointer handling\n let trackRef: HTMLElement | undefined;\n const setTrackRef = (el: HTMLElement) => {\n trackRef = el;\n };\n\n // Create slider aria props\n const {\n labelProps,\n groupProps,\n trackProps,\n thumbProps,\n inputProps,\n outputProps,\n } = createSlider(ariaProps, state, () => trackRef ?? null);\n\n // Render props values\n const renderValues = createMemo<SliderRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging(),\n isFocused: state.isFocused(),\n value: state.value(),\n valuePercent: state.getValuePercent(),\n orientation: state.orientation,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Slider',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Clean props helpers\n const cleanGroupProps = () => {\n const { ref: _ref, ...rest } = groupProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <SliderContext.Provider\n value={{\n state,\n trackProps,\n thumbProps,\n outputProps,\n inputProps,\n trackRef,\n setTrackRef,\n }}\n >\n <div\n {...domProps()}\n {...cleanGroupProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-orientation={state.orientation}\n data-dragging={state.isDragging() || undefined}\n >\n {/* Label */}\n <Show when={ariaProps.label}>\n <span {...labelProps}>{ariaProps.label}</span>\n </Show>\n\n {renderProps.renderChildren()}\n\n {/* Hidden input for form submission */}\n <input {...inputProps} />\n </div>\n </SliderContext.Provider>\n );\n}\n\n/**\n * The track element of a slider.\n */\nexport function SliderTrack(props: SliderTrackProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(SliderContext);\n if (!context) {\n throw new Error('SliderTrack must be used within a Slider');\n }\n\n const { state, trackProps, setTrackRef } = context;\n\n // Render props values\n const renderValues = createMemo<SliderTrackRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging(),\n valuePercent: state.getValuePercent(),\n orientation: state.orientation,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Slider-track',\n },\n renderValues\n );\n\n // Clean props\n const cleanTrackProps = () => {\n const { ref: _ref, style: trackStyle, ...rest } = trackProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const trackStyle = (trackProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...trackStyle, ...renderStyle };\n };\n\n return (\n <div\n ref={setTrackRef}\n {...cleanTrackProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-orientation={state.orientation}\n data-dragging={state.isDragging() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The thumb element of a slider.\n */\nexport function SliderThumb(props: SliderThumbProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(SliderContext);\n if (!context) {\n throw new Error('SliderFill must be used within a Slider');\n }\n\n const { state, thumbProps } = context;\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<SliderThumbRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging(),\n isFocused: isFocused() || state.isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n value: state.value(),\n valuePercent: state.getValuePercent(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Slider-thumb',\n },\n renderValues\n );\n\n // Clean props\n const cleanThumbProps = () => {\n const { ref: _ref, style: thumbStyle, ...rest } = thumbProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const thumbStyle = (thumbProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...thumbStyle, ...renderStyle };\n };\n\n return (\n <div\n {...cleanThumbProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The output element of a slider, displaying the current value.\n */\nexport function SliderOutput(props: SliderOutputProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(SliderContext);\n if (!context) {\n throw new Error('SliderThumb must be used within a Slider');\n }\n\n const { state, outputProps } = context;\n\n // Render props values\n const renderValues = createMemo<SliderOutputRenderProps>(() => ({\n value: state.value(),\n formattedValue: state.getFormattedValue(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Slider-output',\n },\n renderValues\n );\n\n // Clean props\n const cleanOutputProps = () => {\n const { ref: _ref, ...rest } = outputProps as Record<string, unknown>;\n return rest;\n };\n\n // Default children shows formatted value\n const renderedChildren = () => {\n // Check if raw children prop exists before calling renderChildren\n if (renderProps.children === undefined || renderProps.children === null) {\n return state.getFormattedValue();\n }\n return renderProps.renderChildren();\n };\n\n return (\n <output\n {...cleanOutputProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n >\n {renderedChildren()}\n </output>\n );\n}\n\n// Attach sub-components\nSlider.Track = SliderTrack;\nSlider.Thumb = SliderThumb;\nSlider.Output = SliderOutput;\n", "/**\n * Tooltip component for solidaria-components\n *\n * A tooltip displays a description of an element on hover or focus.\n * Port of react-aria-components/src/Tooltip.tsx\n */\n\nimport {\n type JSX,\n type ParentComponent,\n createContext,\n useContext,\n createMemo,\n createSignal,\n createEffect,\n onCleanup,\n Show,\n} from 'solid-js';\nimport { isServer } from 'solid-js/web';\nimport {\n createTooltipTriggerState,\n type TooltipTriggerState,\n type TooltipTriggerProps as StateProps,\n} from '@proyecto-viviana/solid-stately';\nimport {\n createTooltip,\n createTooltipTrigger,\n type TooltipTriggerProps as AriaProps,\n OverlayContainer,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TooltipRenderProps {\n /** Whether the tooltip is currently entering (for animations). */\n isEntering: boolean;\n /** Whether the tooltip is currently exiting (for animations). */\n isExiting: boolean;\n /** The placement of the tooltip relative to the trigger. */\n placement: 'top' | 'bottom' | 'left' | 'right' | null;\n}\n\nexport interface TooltipTriggerComponentProps extends StateProps, AriaProps {\n /** The children of the tooltip trigger (trigger element and tooltip). */\n children: JSX.Element;\n}\n\nexport interface TooltipProps extends SlotProps {\n /** The children of the tooltip. A function may be provided to receive render props. */\n children?: RenderChildren<TooltipRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TooltipRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TooltipRenderProps>;\n /** Whether the tooltip is open (controlled). */\n isOpen?: boolean;\n /** Whether the tooltip is open by default (uncontrolled). */\n defaultOpen?: boolean;\n /** The placement of the tooltip relative to the trigger. */\n placement?: 'top' | 'bottom' | 'left' | 'right';\n /** Whether to render the tooltip in a portal. */\n shouldFlip?: boolean;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface TooltipTriggerContextValue {\n state: TooltipTriggerState;\n tooltipProps: { id: string };\n triggerRef: () => HTMLElement | null | undefined;\n}\n\nconst TooltipTriggerContext = createContext<TooltipTriggerContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * TooltipTrigger wraps around a trigger element and a Tooltip.\n * It handles opening and closing the Tooltip when the user hovers\n * over or focuses the trigger.\n *\n * @example\n * ```tsx\n * <TooltipTrigger>\n * <Button>Hover me</Button>\n * <Tooltip>This is a tooltip</Tooltip>\n * </TooltipTrigger>\n * ```\n */\nexport const TooltipTrigger: ParentComponent<TooltipTriggerComponentProps> = (props) => {\n let triggerRef: HTMLElement | null = null;\n\n const state = createTooltipTriggerState({\n get delay() { return props.delay; },\n get closeDelay() { return props.closeDelay; },\n get isOpen() { return props.isOpen; },\n get defaultOpen() { return props.defaultOpen; },\n get onOpenChange() { return props.onOpenChange; },\n });\n\n const { triggerProps, tooltipProps } = createTooltipTrigger(\n {\n get isDisabled() { return props.isDisabled; },\n get trigger() { return props.trigger; },\n get shouldCloseOnPress() { return props.shouldCloseOnPress; },\n },\n state,\n () => triggerRef\n );\n\n const context: TooltipTriggerContextValue = {\n state,\n tooltipProps,\n triggerRef: () => triggerRef,\n };\n\n // Clone children and inject trigger props into the first child\n const processChildren = () => {\n const children = props.children;\n if (Array.isArray(children)) {\n // First child is the trigger, rest are tooltip(s)\n const [trigger, ...rest] = children;\n return (\n <>\n <TriggerWrapper\n triggerProps={triggerProps}\n ref={(el) => { triggerRef = el; }}\n >\n {trigger}\n </TriggerWrapper>\n {rest}\n </>\n );\n }\n return children;\n };\n\n return (\n <TooltipTriggerContext.Provider value={context}>\n {processChildren()}\n </TooltipTriggerContext.Provider>\n );\n};\n\n/**\n * Wrapper component that spreads trigger props onto its child\n */\nconst TriggerWrapper: ParentComponent<{\n triggerProps: JSX.HTMLAttributes<HTMLElement>;\n ref: (el: HTMLElement) => void;\n}> = (props) => {\n // Get the child element and clone it with trigger props\n const child = () => props.children as JSX.Element;\n\n // We wrap in a span with display:contents to not affect layout.\n // However, display:contents makes getBoundingClientRect return zeros,\n // so we pass a ref callback that finds the first actual element child.\n const handleRef = (span: HTMLSpanElement) => {\n // Find the first element child that has dimensions (not display:contents)\n const findVisibleChild = (el: Element): HTMLElement | null => {\n if (el instanceof HTMLElement) {\n const rect = el.getBoundingClientRect();\n if (rect.width > 0 && rect.height > 0) {\n return el;\n }\n // Check children\n for (const child of el.children) {\n const found = findVisibleChild(child);\n if (found) return found;\n }\n }\n return null;\n };\n\n // Use requestAnimationFrame to ensure children are rendered and have dimensions\n // This is necessary because SolidJS may not have computed child layout yet\n const resolveRef = () => {\n const visibleChild = findVisibleChild(span);\n if (visibleChild) {\n props.ref(visibleChild);\n } else {\n // Fallback to span itself\n props.ref(span);\n }\n };\n\n // Try immediately first (in case layout is already computed)\n const immediateChild = findVisibleChild(span);\n if (immediateChild) {\n props.ref(immediateChild);\n } else {\n // Defer to next frame when layout should be computed\n requestAnimationFrame(resolveRef);\n }\n };\n\n return (\n <span\n {...props.triggerProps}\n ref={handleRef}\n style={{ display: 'contents' }}\n >\n {child()}\n </span>\n );\n};\n\n/**\n * A tooltip displays a description of an element on hover or focus.\n *\n * @example\n * ```tsx\n * <TooltipTrigger>\n * <Button>Hover me</Button>\n * <Tooltip>This is helpful information</Tooltip>\n * </TooltipTrigger>\n * ```\n */\nexport function Tooltip(props: TooltipProps): JSX.Element {\n const context = useContext(TooltipTriggerContext);\n\n // Support standalone usage\n const localState = createTooltipTriggerState({\n get isOpen() { return props.isOpen; },\n get defaultOpen() { return props.defaultOpen; },\n });\n\n const state = () => context?.state ?? localState;\n const placement = () => props.placement ?? 'top';\n\n // Only render when open\n const isOpen = () => state().isOpen();\n\n return (\n <Show when={isOpen()}>\n <TooltipContent\n {...props}\n state={state()}\n contextTooltipProps={context?.tooltipProps ?? {}}\n placement={placement()}\n triggerRef={context?.triggerRef ?? (() => null)}\n />\n </Show>\n );\n}\n\n/**\n * Internal component that renders the tooltip content\n */\nfunction TooltipContent(\n props: TooltipProps & {\n state: TooltipTriggerState;\n contextTooltipProps: { id?: string };\n placement: 'top' | 'bottom' | 'left' | 'right';\n triggerRef: () => HTMLElement | null | undefined;\n }\n): JSX.Element {\n if (isServer) {\n return null as unknown as JSX.Element;\n }\n\n let tooltipRef!: HTMLDivElement;\n const { tooltipProps: ariaTooltipProps } = createTooltip({}, props.state);\n\n // Signal to track position styles\n // Start visible at 0,0 and update position asynchronously\n // This ensures the tooltip is immediately accessible (for screen readers and tests)\n // while the visual position gets calculated\n const [positionStyles, setPositionStyles] = createSignal({\n top: '0px',\n left: '0px',\n visibility: 'visible' as 'hidden' | 'visible',\n });\n\n const values = createMemo<TooltipRenderProps>(() => ({\n isEntering: false, // TODO: animation support\n isExiting: false,\n placement: props.placement,\n }));\n\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n children: props.children,\n defaultClassName: 'solidaria-Tooltip',\n },\n values\n );\n\n // Calculate position based on trigger element\n // Using position: fixed so we use viewport coordinates directly from getBoundingClientRect\n // Returns true if position was successfully updated, false if we need to retry\n const updatePosition = (): boolean => {\n const triggerEl = props.triggerRef();\n if (!triggerEl || !tooltipRef) return false;\n\n const triggerRect = triggerEl.getBoundingClientRect();\n\n // Check if the trigger has valid dimensions (not display:contents or not rendered yet)\n if (triggerRect.width === 0 || triggerRect.height === 0) {\n return false; // Need to retry\n }\n\n // Use offsetWidth/offsetHeight which are more reliable than getBoundingClientRect\n // when the element might be positioned off-screen initially\n const tooltipWidth = tooltipRef.offsetWidth;\n const tooltipHeight = tooltipRef.offsetHeight;\n const offset = 8; // Gap between trigger and tooltip\n\n let top = 0;\n let left = 0;\n\n // Using viewport coordinates for position: fixed\n switch (props.placement) {\n case 'top':\n top = triggerRect.top - tooltipHeight - offset;\n left = triggerRect.left + (triggerRect.width - tooltipWidth) / 2;\n break;\n case 'bottom':\n top = triggerRect.bottom + offset;\n left = triggerRect.left + (triggerRect.width - tooltipWidth) / 2;\n break;\n case 'left':\n top = triggerRect.top + (triggerRect.height - tooltipHeight) / 2;\n left = triggerRect.left - tooltipWidth - offset;\n break;\n case 'right':\n top = triggerRect.top + (triggerRect.height - tooltipHeight) / 2;\n left = triggerRect.right + offset;\n break;\n }\n\n setPositionStyles({\n top: `${top}px`,\n left: `${left}px`,\n visibility: 'visible',\n });\n\n return true;\n };\n\n // Set up positioning effect - runs when trigger ref is available\n createEffect(() => {\n const trigger = props.triggerRef();\n if (!trigger) return;\n\n // Initial position calculation - use requestAnimationFrame to ensure\n // the element is rendered and has proper dimensions\n // We may need multiple frames if the trigger ref hasn't resolved yet\n let retryCount = 0;\n const maxRetries = 5;\n\n const tryUpdatePosition = () => {\n const success = updatePosition();\n if (!success && retryCount < maxRetries) {\n retryCount++;\n // In JSDOM, requestAnimationFrame may not trigger layout properly\n // Use setTimeout for more reliable deferral across environments\n setTimeout(tryUpdatePosition, 16); // ~60fps\n }\n // If all retries fail, tooltip stays at 0,0 (test environments)\n // The tooltip is visible by default, so it remains accessible\n };\n\n // Initial attempt - use rAF for real browsers, then fall back to timeout retries\n requestAnimationFrame(tryUpdatePosition);\n\n // Update on scroll/resize\n window.addEventListener('scroll', updatePosition, true);\n window.addEventListener('resize', updatePosition);\n\n onCleanup(() => {\n window.removeEventListener('scroll', updatePosition, true);\n window.removeEventListener('resize', updatePosition);\n });\n });\n\n // Filter to only valid DOM props (aria-*, data-*, events)\n const domProps = filterDOMProps(props);\n\n // Extract ref from ariaTooltipProps to avoid type conflicts (SolidJS ref types are element-specific)\n const { ref: _ariaRef, ...cleanAriaProps } = ariaTooltipProps as Record<string, unknown>;\n\n return (\n <OverlayContainer>\n <div\n {...domProps}\n {...props.contextTooltipProps}\n {...cleanAriaProps}\n role=\"tooltip\"\n ref={tooltipRef}\n class={renderProps.class()}\n style={{\n position: 'fixed',\n 'z-index': 100000,\n ...positionStyles(),\n ...renderProps.style(),\n }}\n data-placement={props.placement}\n >\n {renderProps.renderChildren()}\n </div>\n </OverlayContainer>\n );\n}\n\n// Re-export types\nexport type { TooltipTriggerState };\n", "/**\n * ComboBox component for solidaria-components\n *\n * A pre-wired headless combobox that combines state + aria hooks.\n * Port of react-aria-components/src/ComboBox.tsx\n */\n\nimport {\n type JSX,\n type Accessor,\n createContext,\n createMemo,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createComboBox,\n createListBox,\n createOption,\n createHover,\n createInteractOutside,\n type AriaComboBoxProps,\n type AriaOptionProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createComboBoxState,\n defaultContainsFilter,\n type ComboBoxState,\n type Key,\n type FilterFn,\n type MenuTriggerAction,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ComboBoxRenderProps {\n /** Whether the combobox listbox is open. */\n isOpen: boolean;\n /** Whether the combobox input is focused. */\n isFocused: boolean;\n /** Whether the combobox input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the combobox is disabled. */\n isDisabled: boolean;\n /** Whether the combobox is required. */\n isRequired: boolean;\n /** Whether a value is selected. */\n isSelected: boolean;\n /** The current input value. */\n inputValue: string;\n}\n\nexport interface ComboBoxProps<T>\n extends Omit<AriaComboBoxProps, 'children'>,\n SlotProps {\n /** The items to render in the combobox. */\n items: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** The currently selected key (controlled). */\n selectedKey?: Key | null;\n /** The default selected key (uncontrolled). */\n defaultSelectedKey?: Key | null;\n /** Handler called when selection changes. */\n onSelectionChange?: (key: Key | null) => void;\n /** The current input value (controlled). */\n inputValue?: string;\n /** The default input value (uncontrolled). */\n defaultInputValue?: string;\n /** Handler called when input value changes. */\n onInputChange?: (value: string) => void;\n /** Whether the combobox is open (controlled). */\n isOpen?: boolean;\n /** Whether the combobox is open by default (uncontrolled). */\n defaultOpen?: boolean;\n /** Handler called when the open state changes. */\n onOpenChange?: (isOpen: boolean, trigger?: MenuTriggerAction) => void;\n /** The filter function to use for filtering items. */\n defaultFilter?: FilterFn;\n /** Whether to allow custom values that don't match any item. */\n allowsCustomValue?: boolean;\n /** Whether to allow an empty collection (show listbox even with no matches). */\n allowsEmptyCollection?: boolean;\n /** The trigger mechanism for the combobox menu. */\n menuTrigger?: 'focus' | 'input' | 'manual';\n /** The name of the combobox, used when submitting an HTML form. */\n name?: string;\n /** The children of the component (compound components: ComboBoxInput, ComboBoxButton, ComboBoxListBox). */\n children: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ComboBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ComboBoxRenderProps>;\n}\n\nexport interface ComboBoxInputRenderProps {\n /** Whether the combobox is open. */\n isOpen: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n /** Whether the input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the input is hovered. */\n isHovered: boolean;\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** The current input value. */\n inputValue: string;\n}\n\nexport interface ComboBoxInputProps extends SlotProps {\n /** The children of the input. */\n children?: RenderChildren<ComboBoxInputRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ComboBoxInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ComboBoxInputRenderProps>;\n}\n\nexport interface ComboBoxButtonRenderProps {\n /** Whether the combobox is open. */\n isOpen: boolean;\n /** Whether the button is focused. */\n isFocused: boolean;\n /** Whether the button is hovered. */\n isHovered: boolean;\n /** Whether the button is pressed. */\n isPressed: boolean;\n /** Whether the button is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ComboBoxButtonProps extends SlotProps {\n /** The children of the button. */\n children?: RenderChildren<ComboBoxButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ComboBoxButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ComboBoxButtonRenderProps>;\n}\n\nexport interface ComboBoxListBoxRenderProps {\n /** Whether the listbox is focused. */\n isFocused: boolean;\n}\n\nexport interface ComboBoxListBoxProps<T> extends SlotProps {\n /** The children of the listbox. A function may be provided to render each item. */\n children?: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ComboBoxListBoxRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ComboBoxListBoxRenderProps>;\n}\n\nexport interface ComboBoxOptionRenderProps {\n /** Whether the option is selected. */\n isSelected: boolean;\n /** Whether the option is focused. */\n isFocused: boolean;\n /** Whether the option has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the option is pressed. */\n isPressed: boolean;\n /** Whether the option is hovered. */\n isHovered: boolean;\n /** Whether the option is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ComboBoxOptionProps<T>\n extends Omit<AriaOptionProps, 'children' | 'key'>,\n SlotProps {\n /** The unique key for the option. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the option. A function may be provided to receive render props. */\n children?: RenderChildren<ComboBoxOptionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ComboBoxOptionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ComboBoxOptionRenderProps>;\n /** The text value of the option (for typeahead). */\n textValue?: string;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface ComboBoxContextValue<T> {\n state: ComboBoxState<T>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n buttonProps: JSX.HTMLAttributes<HTMLElement>;\n listBoxProps: JSX.HTMLAttributes<HTMLElement>;\n labelProps: JSX.HTMLAttributes<HTMLElement>;\n isOpen: Accessor<boolean>;\n isFocused: Accessor<boolean>;\n isFocusVisible: Accessor<boolean>;\n items: T[];\n inputRef: () => HTMLInputElement | null;\n setInputRef: (el: HTMLInputElement | null) => void;\n buttonRef: () => HTMLElement | null;\n setButtonRef: (el: HTMLElement | null) => void;\n}\n\nexport const ComboBoxContext = createContext<ComboBoxContextValue<unknown> | null>(null);\nexport const ComboBoxStateContext = createContext<ComboBoxState<unknown> | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A combobox combines a text input with a listbox, allowing users to filter a list of options.\n */\nexport function ComboBox<T>(props: ComboBoxProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['class', 'style', 'slot'],\n [\n 'items',\n 'getKey',\n 'getTextValue',\n 'getDisabled',\n 'disabledKeys',\n 'selectedKey',\n 'defaultSelectedKey',\n 'onSelectionChange',\n 'inputValue',\n 'defaultInputValue',\n 'onInputChange',\n 'isOpen',\n 'defaultOpen',\n 'onOpenChange',\n 'defaultFilter',\n 'allowsCustomValue',\n 'allowsEmptyCollection',\n 'menuTrigger',\n 'name',\n ]\n );\n\n // Refs\n let inputRef: HTMLInputElement | null = null;\n let buttonRef: HTMLElement | null = null;\n\n // Create combobox state\n const state = createComboBoxState<T>({\n get items() {\n return stateProps.items;\n },\n get getKey() {\n return stateProps.getKey;\n },\n get getTextValue() {\n return stateProps.getTextValue;\n },\n get getDisabled() {\n return stateProps.getDisabled;\n },\n get disabledKeys() {\n return stateProps.disabledKeys;\n },\n get selectedKey() {\n return stateProps.selectedKey;\n },\n get defaultSelectedKey() {\n return stateProps.defaultSelectedKey;\n },\n get onSelectionChange() {\n return stateProps.onSelectionChange;\n },\n get inputValue() {\n return stateProps.inputValue;\n },\n get defaultInputValue() {\n return stateProps.defaultInputValue;\n },\n get onInputChange() {\n return stateProps.onInputChange;\n },\n get isOpen() {\n return stateProps.isOpen;\n },\n get defaultOpen() {\n return stateProps.defaultOpen;\n },\n get onOpenChange() {\n return stateProps.onOpenChange;\n },\n get defaultFilter() {\n return stateProps.defaultFilter;\n },\n get allowsCustomValue() {\n return stateProps.allowsCustomValue;\n },\n get allowsEmptyCollection() {\n return stateProps.allowsEmptyCollection;\n },\n get menuTrigger() {\n return stateProps.menuTrigger;\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get isReadOnly() {\n return ariaProps.isReadOnly;\n },\n get isRequired() {\n return ariaProps.isRequired;\n },\n });\n\n // Create combobox aria props\n const comboBoxAria = createComboBox<T>(\n ariaProps,\n state,\n () => inputRef,\n () => buttonRef\n );\n\n // Create hover for wrapper\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ComboBoxRenderProps>(() => ({\n isOpen: comboBoxAria.isOpen(),\n isFocused: comboBoxAria.isFocused(),\n isFocusVisible: comboBoxAria.isFocusVisible(),\n isDisabled: !!ariaProps.isDisabled,\n isRequired: !!ariaProps.isRequired,\n isSelected: state.selectedKey() != null,\n inputValue: state.inputValue(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ComboBox',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from hover props\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <ComboBoxContext.Provider\n value={{\n state,\n inputProps: comboBoxAria.inputProps,\n buttonProps: comboBoxAria.buttonProps,\n listBoxProps: comboBoxAria.listBoxProps,\n labelProps: comboBoxAria.labelProps,\n isOpen: comboBoxAria.isOpen,\n isFocused: comboBoxAria.isFocused,\n isFocusVisible: comboBoxAria.isFocusVisible,\n items: stateProps.items,\n inputRef: () => inputRef,\n setInputRef: (el) => { inputRef = el; },\n buttonRef: () => buttonRef,\n setButtonRef: (el) => { buttonRef = el; },\n }}\n >\n <ComboBoxStateContext.Provider value={state}>\n <div\n {...domProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={comboBoxAria.isOpen() || undefined}\n data-focused={comboBoxAria.isFocused() || undefined}\n data-focus-visible={comboBoxAria.isFocusVisible() || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n data-required={ariaProps.isRequired || undefined}\n data-hovered={isHovered() || undefined}\n >\n {/* Hidden input for form submission */}\n <Show when={stateProps.name}>\n <input\n type=\"hidden\"\n name={stateProps.name}\n value={state.selectedKey()?.toString() ?? ''}\n />\n </Show>\n {props.children}\n </div>\n </ComboBoxStateContext.Provider>\n </ComboBoxContext.Provider>\n );\n}\n\n/**\n * The text input for a combobox.\n */\nexport function ComboBoxInput(props: ComboBoxInputProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(ComboBoxContext);\n if (!context) {\n throw new Error('ComboBoxInput must be used within a ComboBox');\n }\n const { inputProps, isOpen, isFocused, isFocusVisible, state, setInputRef } = context;\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ComboBoxInputRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n isDisabled: state.isDisabled,\n inputValue: state.inputValue(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ComboBox-input',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanInputProps = () => {\n const { ref: _ref1, value: _value, ...rest } = inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <input\n ref={(el) => setInputRef(el)}\n {...cleanInputProps()}\n {...cleanHoverProps()}\n value={state.inputValue()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={isOpen() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={state.isDisabled || undefined}\n />\n );\n}\n\n/**\n * The trigger button for a combobox.\n */\nexport function ComboBoxButton(props: ComboBoxButtonProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(ComboBoxContext);\n if (!context) {\n throw new Error('ComboBoxButton must be used within a ComboBox');\n }\n const { buttonProps, isOpen, isFocused, state, setButtonRef } = context;\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Track pressed state\n let isPressed = false;\n\n // Render props values\n const renderValues = createMemo<ComboBoxButtonRenderProps>(() => ({\n isOpen: isOpen(),\n isFocused: isFocused(),\n isHovered: isHovered(),\n isPressed,\n isDisabled: state.isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ComboBox-button',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanButtonProps = () => {\n const { ref: _ref1, ...rest } = buttonProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n ref={(el) => setButtonRef(el)}\n {...cleanButtonProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-open={isOpen() || undefined}\n data-focused={isFocused() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={state.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </button>\n );\n}\n\n/**\n * The listbox popup for a combobox.\n */\nexport function ComboBoxListBox<T>(props: ComboBoxListBoxProps<T>): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(ComboBoxContext);\n if (!context) {\n throw new Error('ComboBoxListBox must be used within a ComboBox');\n }\n const { listBoxProps: contextListBoxProps, state: comboBoxState, isOpen, inputRef } = context;\n const state = comboBoxState as ComboBoxState<T>;\n\n // Ref for the listbox element (for click outside detection)\n let listBoxRef: HTMLUListElement | undefined;\n\n // Handle click outside to close combobox\n createInteractOutside({\n ref: () => listBoxRef ?? null,\n onInteractOutside: (e) => {\n // Don't close if clicking the input or button\n const target = e.target as HTMLElement;\n const input = inputRef();\n if (input?.contains(target)) {\n return;\n }\n if (isOpen()) {\n state.close();\n }\n },\n get isDisabled() {\n return !isOpen();\n },\n });\n\n // Create listbox aria props using ComboBoxState's ListState-compatible interface\n const { listBoxProps } = createListBox(\n {},\n {\n collection: state.collection,\n focusedKey: state.focusedKey,\n setFocusedKey: state.setFocusedKey,\n isFocused: state.isFocused,\n setFocused: state.setFocused,\n // Use state's built-in methods\n selectionMode: state.selectionMode,\n select: state.select,\n isSelected: state.isSelected,\n isDisabled: state.isKeyDisabled,\n // Additional ListState interface requirements\n selectedKeys: () => {\n const key = state.selectedKey();\n return key != null ? new Set([key]) : new Set();\n },\n disallowEmptySelection: () => true,\n toggleSelection: state.select,\n replaceSelection: state.select,\n extendSelection: () => {},\n selectAll: () => {},\n clearSelection: () => state.setSelectedKey(null),\n childFocusStrategy: () => null,\n } as any\n );\n\n // Render props values\n const renderValues = createMemo<ComboBoxListBoxRenderProps>(() => ({\n isFocused: state.isFocused(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ComboBox-listbox',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanContextProps = () => {\n const { ref: _ref1, ...rest } = contextListBoxProps as Record<string, unknown>;\n return rest;\n };\n const cleanListBoxProps = () => {\n const { ref: _ref2, ...rest } = listBoxProps as Record<string, unknown>;\n return rest;\n };\n\n const items = () => Array.from(state.collection());\n\n // Prevent focus from being lost when clicking in the listbox\n // This is critical - if we don't prevent default, the input loses focus\n // and the blur handler closes the menu before the click can be processed\n // We need to attach this in the ref callback to use capture phase\n const setupMouseDownHandler = (el: HTMLUListElement) => {\n listBoxRef = el;\n if (el) {\n const mouseHandler = (e: MouseEvent) => {\n e.preventDefault();\n };\n const pointerHandler = (e: PointerEvent) => {\n e.preventDefault();\n };\n el.addEventListener('mousedown', mouseHandler, true); // capture phase\n el.addEventListener('pointerdown', pointerHandler, true); // capture phase\n }\n };\n\n return (\n <Show when={isOpen()}>\n <ul\n ref={setupMouseDownHandler}\n {...cleanContextProps()}\n {...cleanListBoxProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused() || undefined}\n >\n <Show when={props.children} fallback={\n <For each={items()}>\n {(node) => (\n <ComboBoxOption id={node.key}>\n {node.textValue}\n </ComboBoxOption>\n )}\n </For>\n }>\n <For each={items()}>\n {(node) => node.value != null ? props.children!(node.value) : null}\n </For>\n </Show>\n </ul>\n </Show>\n );\n}\n\n/**\n * An option in a combobox listbox.\n */\nexport function ComboBoxOption<T>(props: ComboBoxOptionProps<T>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n ]);\n\n // Get state from context\n const context = useContext(ComboBoxStateContext);\n if (!context) {\n throw new Error('ComboBoxOption must be used within a ComboBox');\n }\n const state = context as ComboBoxState<T>;\n\n // Create option aria props using ComboBoxState's ListState-compatible interface\n const optionAria = createOption<T>(\n {\n key: local.id,\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get 'aria-label'() {\n return ariaProps['aria-label'];\n },\n },\n {\n collection: state.collection,\n focusedKey: state.focusedKey,\n setFocusedKey: state.setFocusedKey,\n isFocused: state.isFocused,\n setFocused: state.setFocused,\n // Use state's built-in methods\n selectionMode: state.selectionMode,\n select: state.select,\n isSelected: state.isSelected,\n isDisabled: state.isKeyDisabled,\n // Additional ListState interface requirements\n selectedKeys: () => {\n const key = state.selectedKey();\n return key != null ? new Set([key]) : new Set();\n },\n disallowEmptySelection: () => true,\n toggleSelection: state.select,\n replaceSelection: state.select,\n extendSelection: () => {},\n selectAll: () => {},\n clearSelection: () => state.setSelectedKey(null),\n childFocusStrategy: () => null,\n } as any\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return optionAria.isDisabled();\n },\n });\n\n // Render props values\n const renderValues = createMemo<ComboBoxOptionRenderProps>(() => ({\n isSelected: optionAria.isSelected(),\n isFocused: optionAria.isFocused(),\n isFocusVisible: optionAria.isFocusVisible(),\n isPressed: optionAria.isPressed(),\n isHovered: isHovered(),\n isDisabled: optionAria.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ComboBox-option',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanOptionProps = () => {\n const { ref: _ref1, ...rest } = optionAria.optionProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <li\n {...cleanOptionProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={optionAria.isSelected() || undefined}\n data-focused={optionAria.isFocused() || undefined}\n data-focus-visible={optionAria.isFocusVisible() || undefined}\n data-pressed={optionAria.isPressed() || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={optionAria.isDisabled() || undefined}\n >\n {renderProps.renderChildren()}\n </li>\n );\n}\n\n// Attach sub-components\nComboBox.Input = ComboBoxInput;\nComboBox.Button = ComboBoxButton;\nComboBox.ListBox = ComboBoxListBox;\nComboBox.Option = ComboBoxOption;\n\n// Re-export filter function for convenience\nexport { defaultContainsFilter };\n", "/**\n * Dialog component for solidaria-components\n *\n * A headless dialog component that combines ARIA hooks.\n * Port of react-aria-components Dialog.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createUniqueId,\n splitProps,\n useContext,\n Switch,\n Match,\n} from 'solid-js'\nimport {\n createDialog,\n createOverlayTrigger,\n type AriaDialogProps,\n} from '@proyecto-viviana/solidaria'\nimport { createOverlayTriggerState } from '@proyecto-viviana/solid-stately'\nimport { DialogTriggerContext, useOverlayTriggerState } from './contexts'\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils'\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface DialogRenderProps {\n /** Function to close the dialog */\n close: () => void\n}\n\nexport interface DialogProps extends Omit<AriaDialogProps, 'class' | 'style'>, SlotProps {\n /** The children of the component - can be JSX or render function. */\n children?: RenderChildren<DialogRenderProps>\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DialogRenderProps>\n /** The inline style for the element. */\n style?: StyleOrFunction<DialogRenderProps>\n /** Callback when dialog should close */\n onClose?: () => void\n}\n\nexport interface DialogTriggerProps {\n /** The children - should include a trigger and modal/popover content. */\n children: JSX.Element\n /** Whether the dialog is open (controlled). */\n isOpen?: boolean\n /** Whether the dialog is open by default (uncontrolled). */\n defaultOpen?: boolean\n /** Callback when open state changes. */\n onOpenChange?: (isOpen: boolean) => void\n}\n\n// ============================================\n// CONTEXTS\n// ============================================\n\ninterface DialogContextValue {\n close: () => void\n titleId?: string\n}\n\nexport const DialogContext = createContext<DialogContextValue | null>(null)\n\n// Re-export DialogTriggerContext from shared contexts (also imported above for local use)\nexport { DialogTriggerContext, useDialogTrigger } from './contexts'\n\n// ============================================\n// DIALOG TRIGGER COMPONENT\n// ============================================\n\n/**\n * A DialogTrigger opens a dialog when a trigger element is pressed.\n * Children should include a trigger element (e.g. Button) and the dialog content.\n */\nexport function DialogTrigger(props: DialogTriggerProps): JSX.Element {\n const [local] = splitProps(props, ['isOpen', 'defaultOpen', 'onOpenChange'])\n\n // Create overlay trigger state\n const state = createOverlayTriggerState({\n get isOpen() {\n return local.isOpen\n },\n get defaultOpen() {\n return local.defaultOpen\n },\n onOpenChange: local.onOpenChange,\n })\n\n // Ref for the trigger element\n let triggerRef: HTMLElement | null = null\n const triggerId = createUniqueId()\n\n // Create overlay trigger props (used via context, not directly applied)\n createOverlayTrigger(\n { type: 'dialog' },\n state,\n () => triggerRef\n )\n\n // Context value - memoized to avoid unnecessary re-renders\n const contextValue = createMemo(() => ({\n state,\n triggerRef: () => triggerRef,\n triggerId,\n }))\n\n // In SolidJS, we simply render children directly within the provider\n // The children will have access to the context\n return (\n <DialogTriggerContext.Provider value={contextValue()}>\n {props.children}\n </DialogTriggerContext.Provider>\n )\n}\n\n// ============================================\n// DIALOG COMPONENT\n// ============================================\n\n/**\n * A dialog is an overlay shown above other content in an application.\n */\nexport function Dialog(props: DialogProps): JSX.Element {\n const [local, ariaProps, rest] = splitProps(\n props,\n ['class', 'style', 'slot', 'onClose'],\n ['role', 'aria-label', 'aria-labelledby', 'aria-describedby']\n )\n\n let dialogRef!: HTMLDivElement\n\n // Get trigger context for aria-labelledby fallback\n const triggerContext = useContext(DialogTriggerContext)\n\n // createDialog returns dialogProps AND titleProps (with the id for the Heading)\n const { dialogProps, titleProps } = createDialog(\n {\n get role() {\n return ariaProps.role\n },\n get 'aria-label'() {\n return ariaProps['aria-label']\n },\n get 'aria-labelledby'() {\n // Use provided labelledby, or fall back to trigger id if no title\n return ariaProps['aria-labelledby'] ?? triggerContext?.triggerId\n },\n get 'aria-describedby'() {\n return ariaProps['aria-describedby']\n },\n },\n () => dialogRef\n )\n\n // Get titleId from titleProps - this links Dialog's aria-labelledby to Heading's id\n const titleId = () => titleProps()?.id\n\n // Get close function from OverlayTriggerState context or onClose prop\n const overlayState = useOverlayTriggerState()\n\n const close = () => {\n local.onClose?.()\n overlayState?.close()\n triggerContext?.state.close()\n }\n\n // Render props values\n const renderValues = createMemo<DialogRenderProps>(() => ({\n close,\n }))\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Dialog',\n },\n renderValues\n )\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }))\n\n return (\n <DialogContext.Provider value={{ close, titleId: titleId() }}>\n <div\n {...dialogProps()}\n {...domProps()}\n ref={dialogRef}\n class={renderProps.class()}\n style={renderProps.style()}\n >\n {renderProps.renderChildren()}\n </div>\n </DialogContext.Provider>\n )\n}\n\n// ============================================\n// HEADING COMPONENT\n// ============================================\n\nexport interface HeadingProps {\n /** The children of the heading. */\n children: JSX.Element\n /** The CSS className. */\n class?: string\n /** The heading level (1-6). Defaults to 2. */\n level?: 1 | 2 | 3 | 4 | 5 | 6\n /** The slot to render into. */\n slot?: string\n}\n\n/**\n * Heading element for dialog title.\n * When rendered inside a Dialog, automatically gets the titleProps.\n */\nexport function Heading(props: HeadingProps): JSX.Element {\n const dialogContext = useContext(DialogContext)\n const level = () => props.level ?? 2\n const id = () => dialogContext?.titleId\n\n return (\n <Switch>\n <Match when={level() === 1}>\n <h1 id={id()} class={props.class}>{props.children}</h1>\n </Match>\n <Match when={level() === 2}>\n <h2 id={id()} class={props.class}>{props.children}</h2>\n </Match>\n <Match when={level() === 3}>\n <h3 id={id()} class={props.class}>{props.children}</h3>\n </Match>\n <Match when={level() === 4}>\n <h4 id={id()} class={props.class}>{props.children}</h4>\n </Match>\n <Match when={level() === 5}>\n <h5 id={id()} class={props.class}>{props.children}</h5>\n </Match>\n <Match when={level() === 6}>\n <h6 id={id()} class={props.class}>{props.children}</h6>\n </Match>\n </Switch>\n )\n}\n\n// Keep backward compatibility\nexport { Heading as DialogHeading }\n", "/**\n * Modal and ModalOverlay components for solidaria-components\n *\n * Headless modal components with overlay, focus trapping, and dismissal handling.\n * Port of react-aria-components Modal.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n createEffect,\n onCleanup,\n splitProps,\n Show,\n useContext,\n} from 'solid-js'\nimport { Portal, isServer } from 'solid-js/web'\nimport {\n createInteractOutside,\n ariaHideOutside,\n FocusScope,\n} from '@proyecto-viviana/solidaria'\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n} from './utils'\nimport {\n DialogTriggerContext,\n OverlayTriggerStateContext,\n type OverlayTriggerState,\n} from './contexts'\n\n// ============================================\n// INTERNAL CONTEXT\n// ============================================\n\n/**\n * Internal context to signal that Modal is wrapped in ModalOverlay.\n * When present, Modal should not create its own Portal.\n */\ninterface InternalModalContextValue {\n isDismissable?: boolean\n isKeyboardDismissDisabled?: boolean\n}\n\nconst InternalModalContext = createContext<InternalModalContextValue | null>(null)\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ModalRenderProps {\n /** Whether the modal is currently entering (for animations). */\n isEntering: boolean\n /** Whether the modal is currently exiting (for animations). */\n isExiting: boolean\n}\n\nexport interface ModalOverlayProps {\n /** The children of the component - can be JSX or render function. */\n children?: RenderChildren<ModalRenderProps>\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ModalRenderProps>\n /** The inline style for the element. */\n style?: StyleOrFunction<ModalRenderProps>\n /** Whether the modal is open (controlled). */\n isOpen?: boolean\n /** Whether the modal opens by default (uncontrolled). */\n defaultOpen?: boolean\n /** Handler called when the modal's open state changes. */\n onOpenChange?: (isOpen: boolean) => void\n /** Whether clicking outside the modal closes it. */\n isDismissable?: boolean\n /** Whether pressing Escape closes the modal. */\n isKeyboardDismissDisabled?: boolean\n /** Whether the modal is entering (for animations). */\n isEntering?: boolean\n /** Whether the modal is exiting (for animations). */\n isExiting?: boolean\n}\n\nexport interface ModalProps extends ModalOverlayProps {}\n\n// Re-export from contexts for backwards compatibility\nexport { OverlayTriggerStateContext, type OverlayTriggerState } from './contexts'\nexport { useOverlayTriggerState } from './contexts'\n\n// ============================================\n// MODAL OVERLAY COMPONENT\n// ============================================\n\n/**\n * ModalOverlay is the backdrop/underlay behind a modal.\n * It handles click-outside dismissal and provides styling hooks.\n */\nexport function ModalOverlay(props: ModalOverlayProps): JSX.Element {\n if (isServer) {\n return <>{props.children}</>\n }\n\n // IMPORTANT: Don't destructure or access props.children early!\n // In SolidJS, children are lazily evaluated. Accessing them before\n // the context provider renders causes them to evaluate outside the context.\n // See: https://github.com/solidjs/solid/issues/182\n const [local, rest] = splitProps(props, [\n 'class',\n 'style',\n 'isOpen',\n 'defaultOpen',\n 'onOpenChange',\n 'isDismissable',\n 'isKeyboardDismissDisabled',\n 'isEntering',\n 'isExiting',\n ])\n\n // Get state from DialogTrigger context if available\n const dialogTriggerContext = useContext(DialogTriggerContext)\n\n // Internal state for uncontrolled mode\n const [internalOpen, setInternalOpen] = createSignal(local.defaultOpen ?? false)\n\n // Determine if open (controlled > DialogTrigger context > uncontrolled)\n const isOpen = (): boolean => {\n if (local.isOpen !== undefined) return local.isOpen\n if (dialogTriggerContext) return dialogTriggerContext.state.isOpen()\n return internalOpen()\n }\n\n const close = () => {\n if (local.isOpen !== undefined) {\n local.onOpenChange?.(false)\n } else if (dialogTriggerContext) {\n dialogTriggerContext.state.close()\n local.onOpenChange?.(false)\n } else {\n setInternalOpen(false)\n local.onOpenChange?.(false)\n }\n }\n\n const open = () => {\n if (local.isOpen !== undefined) {\n local.onOpenChange?.(true)\n } else if (dialogTriggerContext) {\n dialogTriggerContext.state.open()\n local.onOpenChange?.(true)\n } else {\n setInternalOpen(true)\n local.onOpenChange?.(true)\n }\n }\n\n const toggle = () => {\n if (isOpen()) {\n close()\n } else {\n open()\n }\n }\n\n // Create overlay trigger state for context\n const state: OverlayTriggerState = {\n get isOpen() { return isOpen() },\n open,\n close,\n toggle,\n }\n\n // Render props values\n const renderValues = createMemo<ModalRenderProps>(() => ({\n isEntering: local.isEntering ?? false,\n isExiting: local.isExiting ?? false,\n }))\n\n // Resolve render props - don't pass children, we'll render props.children directly\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ModalOverlay',\n },\n renderValues\n )\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }))\n\n // Internal context value to signal Modal that it's wrapped\n const internalModalContext: InternalModalContextValue = {\n isDismissable: local.isDismissable,\n isKeyboardDismissDisabled: local.isKeyboardDismissDisabled,\n }\n\n // Resolve children - handle both static JSX and render functions\n // IMPORTANT: We access props.children directly (not local.children) to preserve\n // lazy evaluation inside context providers\n const resolveChildren = () => {\n const children = props.children\n if (typeof children === 'function') {\n return (children as (props: ModalRenderProps) => JSX.Element)(renderValues())\n }\n return children\n }\n\n return (\n <Show when={isOpen() || local.isExiting}>\n <Portal>\n <OverlayTriggerStateContext.Provider value={state}>\n <InternalModalContext.Provider value={internalModalContext}>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-entering={dataAttr(local.isEntering)}\n data-exiting={dataAttr(local.isExiting)}\n >\n {resolveChildren()}\n </div>\n </InternalModalContext.Provider>\n </OverlayTriggerStateContext.Provider>\n </Portal>\n </Show>\n )\n}\n\n// ============================================\n// MODAL COMPONENT\n// ============================================\n\n/**\n * Modal is a dialog container that manages focus trapping, scroll prevention,\n * aria-hiding of content outside, and dismissal.\n *\n * Usage patterns:\n * 1. Standalone: `<Modal isOpen>...</Modal>` - Creates its own overlay\n * 2. With custom overlay: `<ModalOverlay><Modal>...</Modal></ModalOverlay>`\n *\n * Note: Due to SolidJS's eager JSX evaluation, we cannot detect at render time\n * whether Modal is wrapped in ModalOverlay. So standalone Modal always creates\n * an overlay, and wrapped Modal renders directly (relying on InternalModalContext).\n */\nexport function Modal(props: ModalProps): JSX.Element {\n // Check for InternalModalContext which signals we're inside a rendered ModalOverlay\n // This works because ModalContent is rendered INSIDE ModalOverlay's Show/Portal\n return <ModalContentWithAutoOverlay {...props} />\n}\n\n/**\n * Helper component that handles the overlay detection.\n * By being a separate component, we can use Show to defer rendering until\n * the parent context is available.\n */\nfunction ModalContentWithAutoOverlay(props: ModalProps): JSX.Element {\n const [overlayProps, modalProps] = splitProps(props, [\n 'isOpen',\n 'defaultOpen',\n 'onOpenChange',\n 'isDismissable',\n 'isKeyboardDismissDisabled',\n 'isEntering',\n 'isExiting',\n ])\n\n // Check for InternalModalContext - if present, we're inside a ModalOverlay\n const internalContext = useContext(InternalModalContext)\n\n // If wrapped in ModalOverlay, just render the content\n if (internalContext) {\n return (\n <ModalContent {...modalProps} internalContext={internalContext}>\n {props.children}\n </ModalContent>\n )\n }\n\n // For standalone usage, wrap in ModalOverlay\n const standaloneContext: InternalModalContextValue = {\n isDismissable: overlayProps.isDismissable,\n isKeyboardDismissDisabled: overlayProps.isKeyboardDismissDisabled,\n }\n\n return (\n <ModalOverlay {...overlayProps}>\n <ModalContent {...modalProps} internalContext={standaloneContext}>\n {props.children}\n </ModalContent>\n </ModalOverlay>\n )\n}\n\n/**\n * Internal component that renders the actual modal content.\n * Used by both standalone Modal and Modal wrapped in ModalOverlay.\n */\nfunction ModalContent(props: ModalProps & { internalContext: InternalModalContextValue }): JSX.Element {\n if (isServer) {\n return <>{props.children}</>\n }\n\n const [local, rest] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'isOpen',\n 'defaultOpen',\n 'onOpenChange',\n 'isDismissable',\n 'isKeyboardDismissDisabled',\n 'isEntering',\n 'isExiting',\n 'internalContext',\n ])\n\n let modalRef!: HTMLDivElement\n\n // Get state from parent OverlayTriggerStateContext (provided by ModalOverlay)\n const parentState = useContext(OverlayTriggerStateContext)\n\n // Get dismissable settings from internal context (set by ModalOverlay)\n const isDismissable = () => local.internalContext?.isDismissable ?? local.isDismissable\n const isKeyboardDismissDisabled = () => local.internalContext?.isKeyboardDismissDisabled ?? local.isKeyboardDismissDisabled\n\n // Determine if open from parent state\n const isOpen = (): boolean => {\n if (local.isOpen !== undefined) return local.isOpen\n return parentState?.isOpen ?? false\n }\n\n const close = () => {\n if (local.isOpen !== undefined) {\n local.onOpenChange?.(false)\n } else {\n parentState?.close()\n }\n }\n\n // Prevent scroll when modal is open\n createEffect(() => {\n if (!isOpen()) return\n\n // Set overflow hidden on html element\n const html = document.documentElement\n const prevOverflow = html.style.overflow\n html.style.overflow = 'hidden'\n\n onCleanup(() => {\n html.style.overflow = prevOverflow\n })\n })\n\n // Click outside to close (if dismissable)\n createEffect(() => {\n if (!isOpen() || !isDismissable()) return\n\n createInteractOutside({\n ref: () => modalRef ?? null,\n onInteractOutside: () => {\n close()\n },\n isDisabled: false,\n })\n })\n\n // Escape key to close\n createEffect(() => {\n if (!isOpen() || isKeyboardDismissDisabled()) return\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault()\n e.stopPropagation()\n close()\n }\n }\n\n document.addEventListener('keydown', handleKeyDown, true)\n onCleanup(() => {\n document.removeEventListener('keydown', handleKeyDown, true)\n })\n })\n\n // Aria-hide outside content\n createEffect(() => {\n if (!isOpen() || !modalRef) return\n\n const cleanup = ariaHideOutside([modalRef])\n onCleanup(cleanup)\n })\n\n // Render props values\n const renderValues = createMemo<ModalRenderProps>(() => ({\n isEntering: local.isEntering ?? false,\n isExiting: local.isExiting ?? false,\n }))\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Modal',\n },\n renderValues\n )\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }))\n\n return (\n <FocusScope contain restoreFocus autoFocus>\n <div\n {...domProps()}\n ref={modalRef}\n class={renderProps.class()}\n style={renderProps.style()}\n data-entering={dataAttr(local.isEntering)}\n data-exiting={dataAttr(local.isExiting)}\n >\n {renderProps.renderChildren()}\n </div>\n </FocusScope>\n )\n}\n\nexport default Modal\n", "/**\n * Popover component for solidaria-components\n *\n * A headless popover component that positions relative to a trigger element.\n * Port of react-aria-components Popover.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n createUniqueId,\n splitProps,\n useContext,\n Show,\n createEffect,\n onCleanup,\n} from 'solid-js'\nimport { Portal, isServer } from 'solid-js/web'\nimport {\n createOverlayTrigger,\n FocusScope,\n type Placement,\n type PlacementAxis,\n} from '@proyecto-viviana/solidaria'\nimport { createOverlayTriggerState } from '@proyecto-viviana/solid-stately'\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n} from './utils'\nimport { PopoverTriggerContext } from './contexts'\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface PopoverRenderProps {\n /**\n * The name of the component that triggered the popover.\n */\n trigger: string | null\n /**\n * The placement of the popover relative to the trigger.\n */\n placement: PlacementAxis | null\n /**\n * Whether the popover is currently entering (for animations).\n */\n isEntering: boolean\n /**\n * Whether the popover is currently exiting (for animations).\n */\n isExiting: boolean\n}\n\nexport interface PopoverProps extends SlotProps {\n /** The children of the component - can be JSX or render function. */\n children?: RenderChildren<PopoverRenderProps>\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<PopoverRenderProps>\n /** The inline style for the element. */\n style?: StyleOrFunction<PopoverRenderProps>\n /**\n * The name of the component that triggered the popover.\n */\n trigger?: string\n /**\n * The ref for the element which the popover positions itself with respect to.\n * Required when used standalone (not within a trigger component).\n */\n triggerRef?: () => Element | null\n /**\n * The placement of the element with respect to its anchor element.\n * @default 'bottom'\n */\n placement?: Placement\n /**\n * The placement padding that should be applied between the element and its\n * surrounding container.\n * @default 12\n */\n containerPadding?: number\n /**\n * The additional offset applied along the main axis between the element and its\n * anchor element.\n * @default 8\n */\n offset?: number\n /**\n * The additional offset applied along the cross axis between the element and its\n * anchor element.\n * @default 0\n */\n crossOffset?: number\n /**\n * Whether the element should flip its orientation when there is insufficient room.\n * @default true\n */\n shouldFlip?: boolean\n /**\n * Whether the popover is non-modal (allows interaction outside).\n */\n isNonModal?: boolean\n /**\n * Whether pressing Escape to close should be disabled.\n */\n isKeyboardDismissDisabled?: boolean\n /**\n * Filter for which outside interactions should close the popover.\n */\n shouldCloseOnInteractOutside?: (element: Element) => boolean\n /** Whether the popover is open (controlled). */\n isOpen?: boolean\n /** Whether the popover opens by default (uncontrolled). */\n defaultOpen?: boolean\n /** Handler called when the popover's open state changes. */\n onOpenChange?: (isOpen: boolean) => void\n /** Whether the popover is entering (for animations). */\n isEntering?: boolean\n /** Whether the popover is exiting (for animations). */\n isExiting?: boolean\n}\n\nexport interface PopoverTriggerProps {\n /** The children - should include a trigger and popover content. */\n children: JSX.Element\n /** Whether the popover is open (controlled). */\n isOpen?: boolean\n /** Whether the popover is open by default (uncontrolled). */\n defaultOpen?: boolean\n /** Callback when open state changes. */\n onOpenChange?: (isOpen: boolean) => void\n}\n\n// ============================================\n// CONTEXTS\n// ============================================\n\n// Re-export from shared contexts\nexport { PopoverTriggerContext, usePopoverTrigger, type PopoverTriggerContextValue } from './contexts'\n\n// Internal context for placement\nexport const PopoverContext = createContext<{ placement: () => PlacementAxis | null } | null>(null)\n\n// ============================================\n// POPOVER TRIGGER COMPONENT\n// ============================================\n\n/**\n * A PopoverTrigger opens a popover when a trigger element is pressed.\n * Children should include a trigger element (e.g. Button) and the Popover.\n */\nexport function PopoverTrigger(props: PopoverTriggerProps): JSX.Element {\n const [local] = splitProps(props, ['isOpen', 'defaultOpen', 'onOpenChange'])\n\n // Create overlay trigger state\n const state = createOverlayTriggerState({\n get isOpen() {\n return local.isOpen\n },\n get defaultOpen() {\n return local.defaultOpen\n },\n onOpenChange: local.onOpenChange,\n })\n\n // Ref for the trigger element\n let triggerRef: HTMLElement | null = null\n const triggerId = createUniqueId()\n\n // Create overlay trigger (for side effects like scroll close)\n createOverlayTrigger(\n { type: 'dialog' },\n state,\n () => triggerRef\n )\n\n // Track if triggerRef has been set (to prevent buttons inside Popover from overwriting it)\n let triggerRefSet = false\n\n // Context value\n const contextValue = createMemo(() => ({\n state: {\n isOpen: () => state.isOpen(),\n open: () => state.open(),\n close: () => state.close(),\n toggle: () => state.toggle(),\n },\n triggerRef: () => {\n return triggerRef\n },\n setTriggerRef: (el: HTMLElement | null) => {\n // Only set the trigger ref once - the first button to register is the actual trigger\n // This prevents buttons inside the Popover content from overwriting the trigger ref\n if (!triggerRefSet && el) {\n triggerRef = el\n triggerRefSet = true\n }\n },\n triggerId,\n trigger: 'PopoverTrigger',\n }))\n\n // Just render children inside the provider - the Button component will detect\n // the PopoverTriggerContext and handle toggling. The Popover component will\n // detect the context and use it for open state.\n //\n // IMPORTANT: In SolidJS, JSX children are lazily evaluated when they're part\n // of JSX expression. So {props.children} here means the children (Button, Popover)\n // will be evaluated inside the Provider context.\n return (\n <PopoverTriggerContext.Provider value={contextValue()}>\n {props.children}\n </PopoverTriggerContext.Provider>\n )\n}\n\n// ============================================\n// POPOVER COMPONENT\n// ============================================\n\n/**\n * A popover is an overlay element positioned relative to a trigger.\n */\nexport function Popover(props: PopoverProps): JSX.Element {\n if (isServer) {\n // On the server, return null - popovers should not render during SSR\n return null as unknown as JSX.Element\n }\n\n const [local, rest] = splitProps(props, [\n 'class',\n 'style',\n 'trigger',\n 'triggerRef',\n 'placement',\n 'containerPadding',\n 'offset',\n 'crossOffset',\n 'shouldFlip',\n 'isNonModal',\n 'isKeyboardDismissDisabled',\n 'shouldCloseOnInteractOutside',\n 'isOpen',\n 'defaultOpen',\n 'onOpenChange',\n 'isEntering',\n 'isExiting',\n ])\n\n let popoverRef!: HTMLDivElement\n\n // Get trigger context if available\n const triggerContext = useContext(PopoverTriggerContext)\n\n // Internal state for uncontrolled mode\n const [internalOpen, setInternalOpen] = createSignal(local.defaultOpen ?? false)\n\n // Determine if open\n const isOpen = (): boolean => {\n if (local.isOpen !== undefined) return local.isOpen\n if (triggerContext) {\n return triggerContext.state.isOpen()\n }\n return internalOpen()\n }\n\n const close = () => {\n if (local.isOpen !== undefined) {\n local.onOpenChange?.(false)\n } else if (triggerContext) {\n triggerContext.state.close()\n local.onOpenChange?.(false)\n } else {\n setInternalOpen(false)\n local.onOpenChange?.(false)\n }\n }\n\n // Get trigger ref\n const getTriggerRef = () => {\n if (local.triggerRef) return local.triggerRef()\n if (triggerContext) return triggerContext.triggerRef()\n return null\n }\n\n // Signal to track placement after positioning\n const [placement, setPlacement] = createSignal<PlacementAxis | null>(null)\n // Signal to track position styles\n // Start with visibility hidden, then show after positioning\n const [positionStyles, setPositionStyles] = createSignal({\n top: '0px',\n left: '0px',\n visibility: 'hidden' as 'hidden' | 'visible',\n })\n\n // Handle keyboard dismiss (Escape key)\n createEffect(() => {\n if (!isOpen()) return\n if (local.isKeyboardDismissDisabled) return\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault()\n e.stopPropagation()\n close()\n }\n }\n\n document.addEventListener('keydown', handleKeyDown)\n onCleanup(() => document.removeEventListener('keydown', handleKeyDown))\n })\n\n // Handle click outside to dismiss popover\n createEffect(() => {\n if (!isOpen()) return\n if (local.isNonModal) return // Non-modal popovers don't auto-dismiss on outside click\n\n const handleClickOutside = (e: MouseEvent) => {\n const target = e.target as Element\n const trigger = getTriggerRef()\n\n // Don't close if clicking inside the popover\n if (popoverRef && popoverRef.contains(target)) {\n return\n }\n\n // Don't close if clicking the trigger (it will toggle)\n if (trigger && trigger.contains(target)) {\n return\n }\n\n // Check custom filter\n if (local.shouldCloseOnInteractOutside && !local.shouldCloseOnInteractOutside(target)) {\n return\n }\n\n close()\n }\n\n // Use capture phase to catch clicks before they bubble\n // Small delay to avoid closing on the same click that opened it\n const timeoutId = setTimeout(() => {\n document.addEventListener('mousedown', handleClickOutside, true)\n }, 0)\n\n onCleanup(() => {\n clearTimeout(timeoutId)\n document.removeEventListener('mousedown', handleClickOutside, true)\n })\n })\n\n // Calculate position based on trigger element\n // Using position: fixed so we use viewport coordinates directly from getBoundingClientRect\n const updatePosition = () => {\n const trigger = getTriggerRef()\n const popover = popoverRef\n if (!trigger || !popover) return\n\n const triggerRect = trigger.getBoundingClientRect()\n // Use offsetWidth/offsetHeight which are more reliable than getBoundingClientRect\n // when the element might be positioned off-screen initially\n const popoverWidth = popover.offsetWidth\n const popoverHeight = popover.offsetHeight\n const offset = local.offset ?? 8\n\n let top = 0\n let left = 0\n const placementValue = local.placement ?? 'bottom'\n\n // Using viewport coordinates for position: fixed\n switch (placementValue) {\n case 'top':\n case 'top start':\n case 'top end':\n top = triggerRect.top - popoverHeight - offset\n left = triggerRect.left + (triggerRect.width - popoverWidth) / 2\n setPlacement('top')\n break\n case 'bottom':\n case 'bottom start':\n case 'bottom end':\n top = triggerRect.bottom + offset\n left = triggerRect.left + (triggerRect.width - popoverWidth) / 2\n setPlacement('bottom')\n break\n case 'left':\n case 'left top':\n case 'left bottom':\n top = triggerRect.top + (triggerRect.height - popoverHeight) / 2\n left = triggerRect.left - popoverWidth - offset\n setPlacement('left')\n break\n case 'right':\n case 'right top':\n case 'right bottom':\n top = triggerRect.top + (triggerRect.height - popoverHeight) / 2\n left = triggerRect.right + offset\n setPlacement('right')\n break\n default:\n top = triggerRect.bottom + offset\n left = triggerRect.left + (triggerRect.width - popoverWidth) / 2\n setPlacement('bottom')\n }\n\n setPositionStyles({\n top: `${top}px`,\n left: `${left}px`,\n visibility: 'visible',\n })\n }\n\n // Set up positioning effect - runs when open and trigger ref is available\n createEffect(() => {\n if (!isOpen()) return\n\n const triggerElement = getTriggerRef()\n if (!triggerElement) return\n\n // Initial position calculation - use requestAnimationFrame to ensure\n // the element is rendered and has proper dimensions\n requestAnimationFrame(() => {\n updatePosition()\n })\n\n // Update on scroll/resize\n window.addEventListener('scroll', updatePosition, true)\n window.addEventListener('resize', updatePosition)\n\n onCleanup(() => {\n window.removeEventListener('scroll', updatePosition, true)\n window.removeEventListener('resize', updatePosition)\n })\n })\n\n // Render props values\n const renderValues = createMemo<PopoverRenderProps>(() => ({\n trigger: local.trigger ?? triggerContext?.trigger ?? null,\n placement: placement(),\n isEntering: local.isEntering ?? false,\n isExiting: local.isExiting ?? false,\n }))\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Popover',\n },\n renderValues\n )\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }))\n\n // Check if we should render with dialog role\n const shouldBeDialog = () => !local.isNonModal\n\n return (\n <Show when={isOpen() || local.isExiting}>\n <Portal>\n <PopoverContext.Provider value={{ placement: () => placement() }}>\n <FocusScope contain={shouldBeDialog()} restoreFocus autoFocus>\n <div\n {...domProps()}\n ref={popoverRef}\n role={shouldBeDialog() ? 'dialog' : undefined}\n tabIndex={shouldBeDialog() ? -1 : undefined}\n class={renderProps.class()}\n style={{\n position: 'fixed',\n 'z-index': 100000,\n ...positionStyles(),\n ...renderProps.style(),\n }}\n data-trigger={local.trigger ?? triggerContext?.trigger}\n data-placement={placement()}\n data-entering={dataAttr(local.isEntering)}\n data-exiting={dataAttr(local.isExiting)}\n >\n {renderProps.renderChildren()}\n </div>\n </FocusScope>\n </PopoverContext.Provider>\n </Portal>\n </Show>\n )\n}\n\n// ============================================\n// OVERLAY ARROW COMPONENT\n// ============================================\n\nexport interface OverlayArrowProps {\n /** The children - should be an SVG or element for the arrow. */\n children?: JSX.Element | ((placement: PlacementAxis | null) => JSX.Element)\n /** The CSS className. */\n class?: string\n /** The inline style. */\n style?: JSX.CSSProperties\n}\n\n/**\n * An arrow element that points towards the trigger.\n */\nexport function OverlayArrow(props: OverlayArrowProps): JSX.Element {\n const popoverContext = useContext(PopoverContext)\n const placement = () => popoverContext?.placement() ?? null\n\n const resolveChildren = () => {\n const children = props.children\n if (typeof children === 'function') {\n return children(placement())\n }\n return children\n }\n\n return (\n <div\n class={props.class}\n style={props.style}\n data-placement={placement()}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {resolveChildren()}\n </div>\n )\n}\n\nexport default Popover\n", "/**\n * Toast components for solidaria-components\n *\n * Toast notifications with auto-dismiss, pause on hover/focus, and accessibility.\n * Port of react-aria-components Toast.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n Show,\n useContext,\n} from 'solid-js';\nimport { Portal, isServer } from 'solid-js/web';\nimport {\n type ToastState,\n type QueuedToast,\n type ToastQueueOptions,\n ToastQueue,\n createToastState,\n} from '@proyecto-viviana/solid-stately';\nimport {\n createToast,\n createToastRegion,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface ToastContent {\n /** The title of the toast. */\n title?: string;\n /** The description/body of the toast. */\n description?: string;\n /** The type/variant of the toast (info, success, warning, error). */\n type?: 'info' | 'success' | 'warning' | 'error';\n /** Custom action button. */\n action?: {\n label: string;\n onAction: () => void;\n };\n}\n\nexport interface ToastRenderProps {\n /** Whether the toast is currently animating in. */\n isEntering: boolean;\n /** Whether the toast is currently animating out. */\n isExiting: boolean;\n /** The animation state (entering, exiting, queued). */\n animation: 'entering' | 'exiting' | 'queued' | undefined;\n /** The toast data. */\n toast: QueuedToast<ToastContent>;\n}\n\nexport interface ToastRegionRenderProps {\n /** The visible toasts. */\n visibleToasts: QueuedToast<ToastContent>[];\n}\n\nexport interface ToastRegionProps {\n /** The children of the component - can be JSX or render function. */\n children?: RenderChildren<ToastRegionRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ToastRegionRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ToastRegionRenderProps>;\n /** The toast state to display. If not provided, uses ToastContext. */\n state?: ToastState<ToastContent>;\n /** Accessible label for the region. */\n 'aria-label'?: string;\n /** Whether to render in a portal. */\n portal?: boolean;\n /** Placement of the toast region. */\n placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';\n}\n\nexport interface ToastProps {\n /** The toast data. */\n toast: QueuedToast<ToastContent>;\n /** The children of the component - can be JSX or render function. */\n children?: RenderChildren<ToastRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ToastRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ToastRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const ToastContext = createContext<ToastState<ToastContent> | null>(null);\n\nexport function useToastContext(): ToastState<ToastContent> {\n const context = useContext(ToastContext);\n if (!context) {\n throw new Error('Toast components must be used within a ToastProvider');\n }\n return context;\n}\n\n// ============================================\n// GLOBAL TOAST QUEUE\n// ============================================\n\n/** Default global toast queue that can be used for app-wide toasts. */\nexport const globalToastQueue = new ToastQueue<ToastContent>({\n maxVisibleToasts: 5,\n hasExitAnimation: false, // TODO: Enable once exit animation handling is implemented\n});\n\n/**\n * Add a toast to the global queue.\n * Convenience function for adding toasts from anywhere in the app.\n */\nexport function addToast(\n content: ToastContent,\n options?: { timeout?: number; priority?: number }\n): string {\n return globalToastQueue.add(content, options);\n}\n\n// ============================================\n// TOAST PROVIDER\n// ============================================\n\nexport interface ToastProviderProps {\n /** The children of the provider. */\n children: JSX.Element;\n /** Custom toast queue options. */\n queueOptions?: ToastQueueOptions;\n /** Use global queue instead of creating a new one. */\n useGlobalQueue?: boolean;\n}\n\n/**\n * ToastProvider creates a toast queue context for descendant components.\n * Use this to wrap your app or a section that needs toast notifications.\n *\n * @example\n * ```tsx\n * <ToastProvider>\n * <App />\n * <ToastRegion />\n * </ToastProvider>\n * ```\n */\nexport function ToastProvider(props: ToastProviderProps): JSX.Element {\n const queue = props.useGlobalQueue\n ? globalToastQueue\n : new ToastQueue<ToastContent>(props.queueOptions);\n\n const state = createToastState({ queue });\n\n return (\n <ToastContext.Provider value={state}>\n {props.children}\n </ToastContext.Provider>\n );\n}\n\n// ============================================\n// TOAST REGION COMPONENT\n// ============================================\n\n/**\n * ToastRegion is a container that displays all visible toasts.\n * It handles pause on hover/focus and provides the landmark region.\n *\n * @example\n * ```tsx\n * <ToastRegion placement=\"bottom-end\">\n * {(renderProps) => (\n * <For each={renderProps.visibleToasts}>\n * {(toast) => <Toast toast={toast} />}\n * </For>\n * )}\n * </ToastRegion>\n * ```\n */\nexport function ToastRegion(props: ToastRegionProps): JSX.Element {\n if (isServer) {\n return null as unknown as JSX.Element;\n }\n\n const [local, rest] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'state',\n 'aria-label',\n 'portal',\n 'placement',\n ]);\n\n // Get state from context if not provided\n const contextState = useContext(ToastContext);\n const state = () => local.state ?? contextState;\n\n // Create region accessibility props\n const getRegionAria = () => {\n const s = state();\n if (!s) return null;\n return createToastRegion({\n state: s,\n 'aria-label': local['aria-label'],\n });\n };\n\n // Render props values\n const renderValues = createMemo<ToastRegionRenderProps>(() => ({\n visibleToasts: state()?.visibleToasts() ?? [],\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ToastRegion',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Placement styles\n const placementStyles = createMemo<JSX.CSSProperties>(() => {\n const placement = local.placement ?? 'bottom-end';\n const base: JSX.CSSProperties = {\n position: 'fixed',\n 'z-index': 100001,\n display: 'flex',\n 'flex-direction': 'column',\n gap: '8px',\n padding: '16px',\n 'pointer-events': 'none',\n };\n\n switch (placement) {\n case 'top':\n return { ...base, top: 0, left: '50%', transform: 'translateX(-50%)' } as JSX.CSSProperties;\n case 'top-start':\n return { ...base, top: 0, left: 0 } as JSX.CSSProperties;\n case 'top-end':\n return { ...base, top: 0, right: 0 } as JSX.CSSProperties;\n case 'bottom':\n return { ...base, bottom: 0, left: '50%', transform: 'translateX(-50%)' } as JSX.CSSProperties;\n case 'bottom-start':\n return { ...base, bottom: 0, left: 0 } as JSX.CSSProperties;\n case 'bottom-end':\n default:\n return { ...base, bottom: 0, right: 0 } as JSX.CSSProperties;\n }\n });\n\n const visibleToasts = () => state()?.visibleToasts() ?? [];\n const hasToasts = () => visibleToasts().length > 0;\n\n const regionContent = () => {\n const regionAria = getRegionAria();\n if (!regionAria || !state()) return null;\n\n // Merge styles - placement styles are base, renderProps.style() overrides\n const mergedStyle = () => {\n const placement = placementStyles();\n const custom = renderProps.style();\n if (!custom) return placement;\n return { ...placement, ...custom } as JSX.CSSProperties;\n };\n\n // Extract ref from regionProps to avoid type conflicts\n const { ref: _ref, ...cleanRegionProps } = regionAria.regionProps as Record<string, unknown>;\n\n return (\n <div\n {...domProps()}\n {...cleanRegionProps}\n class={renderProps.class()}\n style={mergedStyle()}\n data-placement={local.placement ?? 'bottom-end'}\n >\n {renderProps.renderChildren()}\n </div>\n );\n };\n\n // Only render when there are toasts\n return (\n <Show when={hasToasts()}>\n <Show when={local.portal !== false} fallback={regionContent()}>\n <Portal>{regionContent()}</Portal>\n </Show>\n </Show>\n );\n}\n\n// ============================================\n// TOAST COMPONENT\n// ============================================\n\n/**\n * Toast is an individual notification component.\n *\n * @example\n * ```tsx\n * <Toast toast={toast}>\n * {(renderProps) => (\n * <div class={renderProps.isExiting ? 'fade-out' : 'fade-in'}>\n * <h3>{renderProps.toast.content.title}</h3>\n * <p>{renderProps.toast.content.description}</p>\n * </div>\n * )}\n * </Toast>\n * ```\n */\nexport function Toast(props: ToastProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n 'toast',\n 'children',\n 'class',\n 'style',\n ]);\n\n // Get state from context\n const state = useToastContext();\n\n // Create toast accessibility props\n const toastAria = createToast({\n toast: local.toast,\n state,\n });\n\n // Render props values\n const renderValues = createMemo<ToastRenderProps>(() => ({\n isEntering: local.toast.animation === 'entering',\n isExiting: local.toast.animation === 'exiting',\n animation: local.toast.animation,\n toast: local.toast,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Toast',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Merge styles\n const mergedStyle = () => {\n const custom = renderProps.style();\n if (!custom) return { 'pointer-events': 'auto' as const };\n return { 'pointer-events': 'auto' as const, ...custom } as JSX.CSSProperties;\n };\n\n // Extract ref from toastProps to avoid type conflicts\n const { ref: _ref, ...cleanToastProps } = toastAria.toastProps as Record<string, unknown>;\n\n return (\n <div\n {...domProps()}\n {...cleanToastProps}\n class={renderProps.class()}\n style={mergedStyle()}\n data-animation={local.toast.animation}\n data-type={local.toast.content.type}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n// ============================================\n// TOAST SUB-COMPONENTS\n// ============================================\n\nexport interface ToastTitleProps {\n children: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}\n\n/**\n * ToastTitle renders the toast title with proper accessibility attributes.\n */\nexport function ToastTitle(props: ToastTitleProps): JSX.Element {\n return (\n <div class={props.class} style={props.style}>\n {props.children}\n </div>\n );\n}\n\nexport interface ToastDescriptionProps {\n children: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}\n\n/**\n * ToastDescription renders the toast description with proper accessibility attributes.\n */\nexport function ToastDescription(props: ToastDescriptionProps): JSX.Element {\n return (\n <div class={props.class} style={props.style}>\n {props.children}\n </div>\n );\n}\n\nexport interface ToastCloseButtonProps {\n /** The toast to close. */\n toast: QueuedToast<ToastContent>;\n children?: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n 'aria-label'?: string;\n}\n\n/**\n * ToastCloseButton is a button that closes the toast.\n */\nexport function ToastCloseButton(props: ToastCloseButtonProps): JSX.Element {\n const state = useToastContext();\n\n const handleClose = () => {\n state.close(props.toast.key);\n };\n\n return (\n <button\n type=\"button\"\n class={props.class}\n style={props.style}\n aria-label={props['aria-label'] ?? 'Close'}\n onClick={handleClose}\n >\n {props.children ?? '×'}\n </button>\n );\n}\n\n// ============================================\n// DEFAULT TOAST RENDERING\n// ============================================\n\nexport interface DefaultToastProps {\n toast: QueuedToast<ToastContent>;\n}\n\n/**\n * DefaultToast provides a basic toast layout with title, description, and close button.\n * Use this as a starting point or as-is for simple toast needs.\n */\nexport function DefaultToast(props: DefaultToastProps): JSX.Element {\n const content = () => props.toast.content;\n\n return (\n <Toast toast={props.toast}>\n <div style={{ display: 'flex', 'align-items': 'flex-start', gap: '12px' }}>\n <div style={{ flex: 1 }}>\n <Show when={content().title}>\n <ToastTitle style={{ 'font-weight': 'bold', 'margin-bottom': '4px' }}>\n {content().title}\n </ToastTitle>\n </Show>\n <Show when={content().description}>\n <ToastDescription>{content().description}</ToastDescription>\n </Show>\n <Show when={content().action}>\n <button\n type=\"button\"\n style={{ 'margin-top': '8px' }}\n onClick={content().action?.onAction}\n >\n {content().action?.label}\n </button>\n </Show>\n </div>\n <ToastCloseButton toast={props.toast} />\n </div>\n </Toast>\n );\n}\n", "/**\n * Disclosure and Accordion components for solidaria-components\n *\n * Disclosure is a widget that can be toggled to show or hide content.\n * Accordion (DisclosureGroup) manages multiple disclosures with optional single-expand.\n *\n * Port of react-aria-components Disclosure.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n} from 'solid-js';\nimport {\n createDisclosureState,\n createDisclosureGroupState,\n type DisclosureState,\n type DisclosureGroupState,\n type DisclosureStateProps,\n type DisclosureGroupStateProps,\n} from '@proyecto-viviana/solid-stately';\nimport {\n createDisclosure,\n createDisclosureGroup,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface DisclosureRenderProps {\n /** Whether the disclosure is expanded. */\n isExpanded: boolean;\n /** Whether the disclosure is disabled. */\n isDisabled: boolean;\n}\n\nexport interface DisclosureGroupRenderProps {\n /** Whether all items are disabled. */\n isDisabled: boolean;\n}\n\nexport interface DisclosureProps extends DisclosureStateProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DisclosureRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DisclosureRenderProps>;\n /** Whether the disclosure is disabled. */\n isDisabled?: boolean;\n /** A unique identifier for the disclosure (used in groups). */\n id?: string;\n}\n\nexport interface DisclosureGroupProps extends DisclosureGroupStateProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DisclosureGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DisclosureGroupRenderProps>;\n}\n\nexport interface DisclosureTriggerProps {\n /** The children of the trigger. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\nexport interface DisclosurePanelProps {\n /** The children of the panel. */\n children?: RenderChildren<DisclosureRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DisclosureRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DisclosureRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface DisclosureContextValue {\n state: DisclosureState;\n isDisabled: () => boolean;\n /** The disclosure ARIA result object - access .buttonProps and .panelProps as getters */\n disclosureAria: {\n readonly buttonProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;\n readonly panelProps: JSX.HTMLAttributes<HTMLElement>;\n };\n}\n\nexport const DisclosureContext = createContext<DisclosureContextValue | null>(null);\n\nexport function useDisclosureContext(): DisclosureContextValue | null {\n return useContext(DisclosureContext);\n}\n\ninterface DisclosureGroupContextValue {\n state: DisclosureGroupState;\n}\n\nexport const DisclosureGroupContext = createContext<DisclosureGroupContextValue | null>(null);\n\nexport function useDisclosureGroupContext(): DisclosureGroupContextValue | null {\n return useContext(DisclosureGroupContext);\n}\n\n// ============================================\n// DISCLOSURE GROUP (Accordion)\n// ============================================\n\n/**\n * DisclosureGroup manages a group of Disclosure components.\n * Use this to create an accordion where only one item can be expanded at a time.\n *\n * @example\n * ```tsx\n * <DisclosureGroup>\n * <Disclosure id=\"item1\">\n * <DisclosureTrigger>Item 1</DisclosureTrigger>\n * <DisclosurePanel>Content 1</DisclosurePanel>\n * </Disclosure>\n * <Disclosure id=\"item2\">\n * <DisclosureTrigger>Item 2</DisclosureTrigger>\n * <DisclosurePanel>Content 2</DisclosurePanel>\n * </Disclosure>\n * </DisclosureGroup>\n * ```\n */\nexport function DisclosureGroup(props: DisclosureGroupProps): JSX.Element {\n // IMPORTANT: Don't destructure or access props.children early!\n // In SolidJS, children are lazily evaluated. Accessing them before\n // the context provider renders causes them to evaluate outside the context.\n // See: https://github.com/solidjs/solid/issues/182\n const [local, rest] = splitProps(props, [\n 'class',\n 'style',\n 'allowsMultipleExpanded',\n 'isDisabled',\n 'expandedKeys',\n 'defaultExpandedKeys',\n 'onExpandedChange',\n ]);\n\n // Create group state\n const state = createDisclosureGroupState({\n allowsMultipleExpanded: local.allowsMultipleExpanded,\n isDisabled: local.isDisabled,\n expandedKeys: local.expandedKeys,\n defaultExpandedKeys: local.defaultExpandedKeys,\n onExpandedChange: local.onExpandedChange,\n });\n\n // Create group accessibility props\n const { groupProps } = createDisclosureGroup(\n { isDisabled: local.isDisabled },\n state\n );\n\n // Render props values\n const renderValues = createMemo<DisclosureGroupRenderProps>(() => ({\n isDisabled: state.isDisabled,\n }));\n\n // Resolve render props - don't pass children, we'll render props.children directly\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-DisclosureGroup',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Context value\n const contextValue: DisclosureGroupContextValue = { state };\n\n // Extract ref from groupProps to avoid type conflicts\n const { ref: _ref, ...cleanGroupProps } = groupProps as Record<string, unknown>;\n\n return (\n <DisclosureGroupContext.Provider value={contextValue}>\n <div\n {...domProps()}\n {...cleanGroupProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled)}\n >\n {props.children}\n </div>\n </DisclosureGroupContext.Provider>\n );\n}\n\n// ============================================\n// DISCLOSURE\n// ============================================\n\n/**\n * Disclosure is a widget that can be toggled to show or hide content.\n *\n * @example\n * ```tsx\n * <Disclosure>\n * <DisclosureTrigger>Show more</DisclosureTrigger>\n * <DisclosurePanel>Hidden content here...</DisclosurePanel>\n * </Disclosure>\n * ```\n */\nexport function Disclosure(props: DisclosureProps): JSX.Element {\n // IMPORTANT: Don't destructure or access props.children early!\n // In SolidJS, children are lazily evaluated. Accessing them before\n // the context provider renders causes them to evaluate outside the context.\n // See: https://github.com/solidjs/solid/issues/182\n const [local, rest] = splitProps(props, [\n 'class',\n 'style',\n 'isDisabled',\n 'isExpanded',\n 'defaultExpanded',\n 'onExpandedChange',\n 'id',\n ]);\n\n // Check if we're inside a DisclosureGroup\n const groupContext = useDisclosureGroupContext();\n\n // Create disclosure state\n // If in a group, sync with group state\n const state = createDisclosureState(() => {\n const id = local.id;\n if (groupContext && id) {\n return {\n isExpanded: groupContext.state.isExpanded(id),\n onExpandedChange: (expanded: boolean) => {\n if (expanded !== groupContext.state.isExpanded(id)) {\n groupContext.state.toggleKey(id);\n }\n local.onExpandedChange?.(expanded);\n },\n };\n }\n return {\n isExpanded: local.isExpanded,\n defaultExpanded: local.defaultExpanded,\n onExpandedChange: local.onExpandedChange,\n };\n });\n\n // Panel ref as a signal so the createEffect in createDisclosure can track it\n const [panelRef, setPanelRefSignal] = createSignal<HTMLElement | null>(null);\n\n // Determine if disabled (used in multiple places)\n const isDisabled = () => local.isDisabled || groupContext?.state.isDisabled || false;\n\n // Create disclosure accessibility props\n // Pass props as accessor function for reactivity\n // IMPORTANT: Don't destructure! The getters must be called fresh each render\n const disclosureAria = createDisclosure(\n () => ({ isDisabled: isDisabled() }),\n state,\n panelRef // Pass the accessor directly\n );\n\n // Render props values\n const renderValues = createMemo<DisclosureRenderProps>(() => ({\n isExpanded: state.isExpanded(),\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props - don't pass children, we'll render props.children directly\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Disclosure',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Context value - pass the disclosureAria object with getters intact\n const contextValue: DisclosureContextValue = {\n state,\n isDisabled, // Pass the accessor function, not the value\n disclosureAria,\n };\n\n // Setter for panel ref\n const setPanelRef = (el: HTMLElement | null) => {\n setPanelRefSignal(el);\n };\n\n return (\n <DisclosureContext.Provider value={contextValue}>\n <DisclosurePanelRefContext.Provider value={setPanelRef}>\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-expanded={dataAttr(state.isExpanded())}\n data-disabled={dataAttr(isDisabled())}\n >\n {props.children}\n </div>\n </DisclosurePanelRefContext.Provider>\n </DisclosureContext.Provider>\n );\n}\n\n// Internal context to pass panel ref setter\nconst DisclosurePanelRefContext = createContext<((el: HTMLElement | null) => void) | null>(null);\n\n// ============================================\n// DISCLOSURE TRIGGER\n// ============================================\n\n/**\n * DisclosureTrigger is the button that toggles the disclosure.\n * Pattern matches SelectTrigger for consistency.\n */\nexport function DisclosureTrigger(props: DisclosureTriggerProps): JSX.Element {\n // Get context - now safe because parent uses lazy children evaluation\n const context = useContext(DisclosureContext);\n if (!context) {\n throw new Error('DisclosureTrigger must be used within a Disclosure');\n }\n\n const { state, disclosureAria, isDisabled } = context;\n\n // Reactive accessors\n const isExpanded = () => state.isExpanded();\n\n // Get buttonProps from the getter each time - this ensures reactivity\n // IMPORTANT: Call the getter fresh each render to get updated aria-expanded, etc.\n const getButtonProps = () => {\n const { ref: _ref, ...rest } = disclosureAria.buttonProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <button\n {...getButtonProps()}\n type=\"button\"\n class={props.class}\n style={props.style}\n data-expanded={dataAttr(isExpanded())}\n data-disabled={dataAttr(isDisabled())}\n >\n {props.children}\n </button>\n );\n}\n\n// ============================================\n// DISCLOSURE PANEL\n// ============================================\n\n/**\n * DisclosurePanel contains the content that is shown/hidden.\n */\nexport function DisclosurePanel(props: DisclosurePanelProps): JSX.Element {\n // Get context - now safe because parent uses lazy children evaluation\n const context = useContext(DisclosureContext);\n const panelRefSetter = useContext(DisclosurePanelRefContext);\n\n const [local, rest] = splitProps(props, ['class', 'style']);\n\n // Reactive accessors\n const isExpanded = () => context?.state.isExpanded() ?? false;\n const isDisabled = () => context?.isDisabled() ?? false;\n\n // Render props values\n const renderValues = createMemo<DisclosureRenderProps>(() => ({\n isExpanded: isExpanded(),\n isDisabled: isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-DisclosurePanel',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Get panelProps from the getter each time - this ensures reactivity\n // IMPORTANT: Call the getter fresh each render to get updated hidden attribute, etc.\n const getPanelProps = () => {\n if (!context) return { id: undefined, role: 'region', 'aria-labelledby': undefined, hidden: true };\n const { ref: _ref, ...rest } = context.disclosureAria.panelProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <div\n {...domProps()}\n {...getPanelProps()}\n ref={(el) => panelRefSetter?.(el)}\n class={renderProps.class()}\n style={renderProps.style()}\n data-expanded={dataAttr(isExpanded())}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n// Re-export state types for convenience\nexport type { DisclosureState, DisclosureGroupState };\n", "/**\n * Meter component for solidaria-components\n *\n * Pre-wired headless meter component that combines aria hooks.\n * Port of react-aria-components/src/Meter.tsx\n *\n * Meters represent a quantity within a known range, or a fractional value.\n * Unlike progress bars, meters represent a current value rather than progress toward a goal.\n */\n\nimport {\n type JSX,\n type ParentProps,\n createContext,\n createMemo,\n splitProps,\n} from 'solid-js';\nimport {\n createMeter,\n type AriaMeterProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface MeterRenderProps {\n /** The value as a percentage between the minimum and maximum (0-100). */\n percentage: number;\n /** A formatted version of the value. */\n valueText: string | undefined;\n}\n\nexport interface MeterProps\n extends AriaMeterProps,\n SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<MeterRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<MeterRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<MeterRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const MeterContext = createContext<MeterProps | null>(null);\n\n// ============================================\n// UTILITIES\n// ============================================\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\n// ============================================\n// METER COMPONENT\n// ============================================\n\n/**\n * A meter represents a quantity within a known range, or a fractional value.\n * Unlike progress bars, meters represent a current value rather than progress toward a goal.\n *\n * @example\n * ```tsx\n * <Meter value={75}>\n * {({ percentage, valueText }) => (\n * <>\n * <Label>Storage space</Label>\n * <span>{valueText}</span>\n * <div class=\"bar\" style={{ width: `${percentage}%` }} />\n * </>\n * )}\n * </Meter>\n * ```\n */\nexport function Meter(props: ParentProps<MeterProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'children',\n 'class',\n 'style',\n 'slot',\n ]);\n\n // Get values for calculations\n const value = () => ariaProps.value ?? 0;\n const minValue = () => ariaProps.minValue ?? 0;\n const maxValue = () => ariaProps.maxValue ?? 100;\n\n // Create meter aria props\n const meterAria = createMeter({\n get value() { return ariaProps.value; },\n get minValue() { return ariaProps.minValue; },\n get maxValue() { return ariaProps.maxValue; },\n get valueLabel() { return ariaProps.valueLabel; },\n get formatOptions() { return ariaProps.formatOptions; },\n get label() { return ariaProps.label; },\n get 'aria-label'() { return ariaProps['aria-label']; },\n get 'aria-labelledby'() { return ariaProps['aria-labelledby']; },\n get 'aria-describedby'() { return ariaProps['aria-describedby']; },\n get 'aria-details'() { return ariaProps['aria-details']; },\n });\n\n // Calculate percentage\n const percentage = createMemo(() => {\n const clampedValue = clamp(value(), minValue(), maxValue());\n return ((clampedValue - minValue()) / (maxValue() - minValue())) * 100;\n });\n\n // Get value text from aria props\n const valueText = createMemo(() => {\n return meterAria.meterProps['aria-valuetext'] as string | undefined;\n });\n\n // Render props values\n const renderValues = createMemo<MeterRenderProps>(() => ({\n percentage: percentage(),\n valueText: valueText(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Meter',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <div\n {...domProps()}\n {...meterAria.meterProps}\n class={renderProps.class()}\n style={renderProps.style()}\n slot={local.slot}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n", "/**\n * TagGroup component for solidaria-components\n *\n * Pre-wired headless tag group component that combines aria hooks.\n * Port of react-aria-components/src/TagGroup.tsx\n *\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items,\n * with support for keyboard navigation, selection, and removal.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createTagGroup,\n createTag,\n type AriaTagGroupProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createListState,\n type ListState,\n type Key,\n type SelectionMode,\n type SelectionBehavior,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n dataAttr,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TagGroupRenderProps {\n /** Whether the tag group is disabled. */\n isDisabled: boolean;\n /** Whether the tag list is empty. */\n isEmpty: boolean;\n}\n\nexport interface TagGroupProps\n extends Omit<AriaTagGroupProps, 'id'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagGroupRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagGroupRenderProps>;\n}\n\nexport interface TagListRenderProps {\n /** Whether the tag list is empty. */\n isEmpty: boolean;\n /** Whether the tag list is focused. */\n isFocused: boolean;\n}\n\nexport interface TagListProps<T> extends SlotProps {\n /** The items to display in the tag list. */\n items: T[];\n /** Function to render each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagListRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagListRenderProps>;\n /** Content to render when the list is empty. */\n renderEmptyState?: () => JSX.Element;\n /** The selection mode for the tag list. */\n selectionMode?: SelectionMode;\n /** How selection behaves in the collection. */\n selectionBehavior?: SelectionBehavior;\n /** The currently selected keys (controlled). */\n selectedKeys?: Iterable<Key>;\n /** The default selected keys (uncontrolled). */\n defaultSelectedKeys?: Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: 'all' | Set<Key>) => void;\n /** Keys that are disabled. */\n disabledKeys?: Iterable<Key>;\n /** Function to get a unique key from an item. */\n getKey?: (item: T) => Key;\n /** Accessibility label. */\n label?: string;\n /** Custom aria-label. */\n 'aria-label'?: string;\n /** Reference to external label element. */\n 'aria-labelledby'?: string;\n /** Reference to description element. */\n 'aria-describedby'?: string;\n /** Whether the tag list is disabled. */\n isDisabled?: boolean;\n /** Handler called when tags are removed. */\n onRemove?: (keys: Set<Key>) => void;\n}\n\nexport interface TagRenderProps {\n /** Whether the tag is selected. */\n isSelected: boolean;\n /** Whether the tag is disabled. */\n isDisabled: boolean;\n /** Whether the tag is focused. */\n isFocused: boolean;\n /** Whether the tag is pressed. */\n isPressed: boolean;\n /** Whether the tag allows removal. */\n allowsRemoving: boolean;\n /** The selection mode. */\n selectionMode: SelectionMode;\n}\n\nexport interface TagProps extends SlotProps {\n /** A unique key for this tag. */\n id: Key;\n /** Whether the tag is disabled. */\n isDisabled?: boolean;\n /** A text value for accessibility. */\n textValue?: string;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<TagRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TagRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TagRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface TagGroupContextValue {\n state: ListState;\n onRemove?: (keys: Set<Key>) => void;\n}\n\nexport const TagGroupContext = createContext<TagGroupContextValue | null>(null);\nexport const TagListStateContext = createContext<ListState | null>(null);\n\nexport function useTagGroupContext(): TagGroupContextValue | null {\n return useContext(TagGroupContext);\n}\n\n// ============================================\n// TAG GROUP COMPONENT\n// ============================================\n\n/**\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items,\n * with support for keyboard navigation, selection, and removal.\n *\n * @example\n * ```tsx\n * <TagGroup label=\"Categories\" onRemove={(keys) => removeItems(keys)}>\n * <TagList items={items}>\n * {(item) => <Tag id={item.id}>{item.name}</Tag>}\n * </TagList>\n * </TagGroup>\n * ```\n */\nexport function TagGroup(props: TagGroupProps): JSX.Element {\n const [local] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n ]);\n\n // We need TagList to provide the state, so TagGroup just provides context\n return (\n <div\n class={typeof local.class === 'string' ? local.class : 'solidaria-TagGroup'}\n style={typeof local.style === 'object' ? local.style : undefined}\n slot={local.slot}\n >\n {props.children}\n </div>\n );\n}\n\n// ============================================\n// TAG LIST COMPONENT\n// ============================================\n\n/**\n * TagList contains the list of tags within a TagGroup.\n */\nexport function TagList<T extends { id?: Key; key?: Key }>(props: TagListProps<T>): JSX.Element {\n const [local] = splitProps(props, [\n 'items',\n 'class',\n 'style',\n 'slot',\n 'renderEmptyState',\n 'selectionMode',\n 'selectionBehavior',\n 'selectedKeys',\n 'defaultSelectedKeys',\n 'onSelectionChange',\n 'disabledKeys',\n 'getKey',\n 'label',\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'isDisabled',\n 'onRemove',\n ]);\n\n // Create a ref for the grid\n const [gridRef, setGridRef] = createSignal<HTMLDivElement | null>(null);\n\n // Default getKey function\n const getKey = (item: T): Key => {\n if (local.getKey) return local.getKey(item);\n if (item.id !== undefined) return item.id;\n if (item.key !== undefined) return item.key;\n return String(item);\n };\n\n // Create list state\n const state = createListState({\n get items() { return local.items; },\n getKey,\n get selectionMode() { return local.selectionMode ?? 'none'; },\n get selectionBehavior() { return local.selectionBehavior ?? 'toggle'; },\n get selectedKeys() { return local.selectedKeys; },\n get defaultSelectedKeys() { return local.defaultSelectedKeys; },\n get onSelectionChange() { return local.onSelectionChange; },\n get disabledKeys() { return local.disabledKeys; },\n });\n\n // Create tag group accessibility props\n const tagGroupAria = createTagGroup(\n {\n get label() { return local.label; },\n get 'aria-label'() { return local['aria-label']; },\n get 'aria-labelledby'() { return local['aria-labelledby']; },\n get 'aria-describedby'() { return local['aria-describedby']; },\n get isDisabled() { return local.isDisabled; },\n get onRemove() { return local.onRemove; },\n },\n state,\n gridRef\n );\n\n // Track focus\n const [isFocused, setIsFocused] = createSignal(false);\n\n // Render props values\n const renderValues = createMemo<TagListRenderProps>(() => ({\n isEmpty: local.items.length === 0,\n isFocused: isFocused(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-TagList',\n },\n renderValues\n );\n\n // Context value\n const contextValue: TagGroupContextValue = {\n state,\n get onRemove() { return local.onRemove; },\n };\n\n return (\n <TagGroupContext.Provider value={contextValue}>\n <TagListStateContext.Provider value={state}>\n <div\n ref={setGridRef}\n {...tagGroupAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n data-empty={dataAttr(local.items.length === 0)}\n data-focused={dataAttr(isFocused())}\n >\n <Show\n when={local.items.length > 0}\n fallback={local.renderEmptyState?.()}\n >\n <For each={local.items}>\n {(item) => props.children(item)}\n </For>\n </Show>\n </div>\n </TagListStateContext.Provider>\n </TagGroupContext.Provider>\n );\n}\n\n// ============================================\n// TAG COMPONENT\n// ============================================\n\n/**\n * A Tag is an individual item within a TagList.\n */\nexport function Tag(props: TagProps): JSX.Element {\n const [local, rest] = splitProps(props, [\n 'id',\n 'class',\n 'style',\n 'slot',\n 'isDisabled',\n 'textValue',\n ]);\n\n const state = useContext(TagListStateContext);\n\n // Create a ref for the tag\n const [tagRef, setTagRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create tag accessibility props\n const tagAria = createTag(\n {\n get key() { return local.id; },\n get isDisabled() { return local.isDisabled; },\n get textValue() { return local.textValue; },\n },\n state!,\n tagRef\n );\n\n // Render props values\n const renderValues = createMemo<TagRenderProps>(() => ({\n isSelected: tagAria.isSelected,\n isDisabled: tagAria.isDisabled,\n isFocused: tagAria.isFocused,\n isPressed: tagAria.isPressed,\n allowsRemoving: tagAria.allowsRemoving,\n selectionMode: state?.selectionMode() ?? 'none',\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Tag',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest, { global: true }));\n\n return (\n <div\n ref={setTagRef}\n {...domProps()}\n {...tagAria.rowProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(tagAria.isSelected)}\n data-disabled={dataAttr(tagAria.isDisabled)}\n data-focused={dataAttr(tagAria.isFocused)}\n data-pressed={dataAttr(tagAria.isPressed)}\n data-allows-removing={dataAttr(tagAria.allowsRemoving)}\n >\n <div {...tagAria.gridCellProps} style={{ display: 'contents' }}>\n {renderProps.renderChildren()}\n </div>\n </div>\n );\n}\n\n// ============================================\n// TAG REMOVE BUTTON COMPONENT\n// ============================================\n\nexport interface TagRemoveButtonProps {\n /** The children of the button (usually an X icon). */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n/**\n * TagRemoveButton is the button used to remove a tag.\n * It should be placed inside a Tag component.\n */\nexport function TagRemoveButton(props: TagRemoveButtonProps): JSX.Element {\n // This is a simplified version - in a full implementation,\n // we'd get the remove button props from the Tag context\n return (\n <button\n type=\"button\"\n class={props.class ?? 'solidaria-TagRemoveButton'}\n style={props.style}\n aria-label=\"Remove\"\n >\n {props.children ?? '×'}\n </button>\n );\n}\n\n// Re-export types\nexport type { Key, SelectionMode, SelectionBehavior };\n", "/**\n * Calendar component for solidaria-components\n *\n * Pre-wired headless calendar component that combines aria hooks.\n * Port of react-aria-components/src/Calendar.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Index,\n Show,\n} from 'solid-js';\n\nimport {\n createCalendar,\n createCalendarGrid,\n createCalendarCell,\n type AriaCalendarProps,\n type AriaCalendarGridProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createCalendarState,\n type CalendarState,\n type CalendarStateProps,\n type CalendarDate,\n type DateValue,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface CalendarRenderProps {\n /** Whether the calendar is disabled. */\n isDisabled: boolean;\n /** Whether the calendar is read-only. */\n isReadOnly: boolean;\n}\n\nexport interface CalendarProps<T extends DateValue = DateValue>\n extends Omit<AriaCalendarProps, 'id' | 'isDisabled' | 'isReadOnly'>,\n Omit<CalendarStateProps<T>, 'locale'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface CalendarGridRenderProps {\n /** Whether the grid is disabled. */\n isDisabled: boolean;\n}\n\nexport interface CalendarGridProps extends Omit<AriaCalendarGridProps, 'startDate' | 'endDate'>, SlotProps {\n /** The children of the component (render function receiving weeks). */\n children?: (date: CalendarDate) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarGridRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarGridRenderProps>;\n /** Number of weeks to offset from the start. */\n offset?: { months?: number };\n}\n\nexport interface CalendarCellRenderProps {\n /** Whether the cell is selected. */\n isSelected: boolean;\n /** Whether the cell is focused. */\n isFocused: boolean;\n /** Whether the cell is disabled. */\n isDisabled: boolean;\n /** Whether the cell is unavailable. */\n isUnavailable: boolean;\n /** Whether the cell is outside the visible month. */\n isOutsideMonth: boolean;\n /** Whether the cell represents today. */\n isToday: boolean;\n /** Whether the cell is pressed. */\n isPressed: boolean;\n /** The formatted date string. */\n formattedDate: string;\n}\n\nexport interface CalendarCellProps extends SlotProps {\n /** The date for this cell. */\n date: CalendarDate;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CalendarCellRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarCellRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarCellRenderProps>;\n}\n\nexport interface CalendarHeaderCellProps extends SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const CalendarContext = createContext<CalendarState<DateValue> | null>(null);\n\nexport function useCalendarContext(): CalendarState<DateValue> {\n const context = useContext(CalendarContext);\n if (!context) {\n throw new Error('Calendar components must be used within a Calendar');\n }\n return context;\n}\n\n// ============================================\n// CALENDAR COMPONENT\n// ============================================\n\n/**\n * A calendar displays a grid of days in a month and allows users to select a single date.\n *\n * @example\n * ```tsx\n * <Calendar aria-label=\"Event date\">\n * <header>\n * <CalendarButton slot=\"previous\">◀</CalendarButton>\n * <CalendarHeading />\n * <CalendarButton slot=\"next\">▶</CalendarButton>\n * </header>\n * <CalendarGrid>\n * {(date) => <CalendarCell date={date} />}\n * </CalendarGrid>\n * </Calendar>\n * ```\n */\nexport function Calendar<T extends DateValue = CalendarDate>(\n props: CalendarProps<T>\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={<div class=\"solidaria-Calendar solidaria-Calendar--placeholder\" aria-hidden=\"true\" />}\n >\n <CalendarInner {...props} />\n </Show>\n );\n}\n\n/**\n * Internal Calendar component that renders after client mount.\n */\nfunction CalendarInner<T extends DateValue = CalendarDate>(\n props: CalendarProps<T>\n): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n [\n 'value',\n 'defaultValue',\n 'onChange',\n 'minValue',\n 'maxValue',\n 'isDisabled',\n 'isReadOnly',\n 'autoFocus',\n 'focusedValue',\n 'defaultFocusedValue',\n 'onFocusChange',\n 'locale',\n 'isDateUnavailable',\n 'visibleMonths',\n 'isDateDisabled',\n 'validationState',\n 'errorMessage',\n 'firstDayOfWeek',\n ]\n );\n\n // Create calendar state\n const state = createCalendarState(stateProps);\n\n // Create calendar ARIA props\n const calendarAria = createCalendar(rest, state as unknown as CalendarState<DateValue>);\n\n // Render props values\n const renderValues = createMemo<CalendarRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Calendar',\n },\n renderValues\n );\n\n return (\n <CalendarContext.Provider value={state as unknown as CalendarState<DateValue>}>\n <div\n {...calendarAria.calendarProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n >\n {props.children}\n </div>\n </CalendarContext.Provider>\n );\n}\n\n// ============================================\n// CALENDAR HEADING COMPONENT\n// ============================================\n\nexport interface CalendarHeadingProps extends SlotProps {\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n/**\n * Displays the current month and year in the calendar.\n */\nexport function CalendarHeading(props: CalendarHeadingProps): JSX.Element {\n const state = useCalendarContext();\n\n return (\n <h2\n class={props.class ?? 'solidaria-CalendarHeading'}\n style={props.style}\n aria-live=\"polite\"\n >\n {state.title()}\n </h2>\n );\n}\n\n// ============================================\n// CALENDAR BUTTON COMPONENT\n// ============================================\n\nexport interface CalendarButtonProps extends SlotProps {\n /** The slot for this button (previous or next). */\n slot?: 'previous' | 'next';\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n}\n\n/**\n * A button for navigating the calendar.\n */\nexport function CalendarButton(props: CalendarButtonProps): JSX.Element {\n const state = useCalendarContext();\n const calendarAria = createCalendar({}, state);\n\n const buttonProps = createMemo(() => {\n if (props.slot === 'previous') {\n return calendarAria.prevButtonProps;\n }\n return calendarAria.nextButtonProps;\n });\n\n return (\n <button\n {...buttonProps()}\n class={props.class ?? 'solidaria-CalendarButton'}\n style={props.style}\n disabled={props.isDisabled || state.isDisabled()}\n >\n {props.children}\n </button>\n );\n}\n\n// ============================================\n// CALENDAR GRID COMPONENT\n// ============================================\n\n/**\n * Displays a grid of calendar cells.\n */\nexport function CalendarGrid(props: CalendarGridProps): JSX.Element {\n const state = useCalendarContext();\n const [gridRef, setGridRef] = createSignal<HTMLTableElement | null>(null);\n\n // Create grid ARIA props\n const gridAria = createCalendarGrid(\n {\n weekdayStyle: props.weekdayStyle,\n },\n state,\n gridRef\n );\n\n // Render props values\n const renderValues = createMemo<CalendarGridRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-CalendarGrid',\n },\n renderValues\n );\n\n // Memoize ALL dates for the grid at once to avoid reactive loops.\n // This breaks the cycle where accessing visibleRange() inside For loop\n // would cause infinite re-renders.\n const allDates = createMemo(() => {\n const numWeeks = state.getWeeksInMonth();\n const weekDates: (CalendarDate | null)[][] = [];\n\n for (let weekIndex = 0; weekIndex < numWeeks; weekIndex++) {\n weekDates.push(state.getDatesInWeek(weekIndex));\n }\n\n return weekDates;\n });\n\n return (\n <table\n ref={setGridRef}\n {...gridAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n >\n <thead {...gridAria.headerProps}>\n <tr>\n <For each={gridAria.weekDays}>\n {(day) => (\n <th scope=\"col\" class=\"solidaria-CalendarHeaderCell\">\n {day}\n </th>\n )}\n </For>\n </tr>\n </thead>\n <tbody>\n <Index each={allDates()}>\n {(weekDates) => (\n <tr>\n <Index each={weekDates()}>\n {(date) => (\n <Show when={date()}>\n <td role=\"gridcell\">\n {props.children?.(date()!)}\n </td>\n </Show>\n )}\n </Index>\n </tr>\n )}\n </Index>\n </tbody>\n </table>\n );\n}\n\n// ============================================\n// CALENDAR CELL COMPONENT\n// ============================================\n\n/**\n * A cell in the calendar grid representing a single day.\n */\nexport function CalendarCell(props: CalendarCellProps): JSX.Element {\n const state = useCalendarContext();\n const [cellRef, setCellRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create cell ARIA props\n const cellAria = createCalendarCell(\n { date: props.date },\n state,\n cellRef\n );\n\n // Render props values\n const renderValues = createMemo<CalendarCellRenderProps>(() => ({\n isSelected: cellAria.isSelected,\n isFocused: cellAria.isFocused,\n isDisabled: cellAria.isDisabled,\n isUnavailable: cellAria.isUnavailable,\n isOutsideMonth: cellAria.isOutsideMonth,\n isToday: cellAria.isToday,\n isPressed: cellAria.isPressed,\n formattedDate: cellAria.formattedDate,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-CalendarCell',\n },\n renderValues\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === 'function') {\n return renderProps.renderChildren();\n }\n return cellAria.formattedDate;\n };\n\n return (\n <div\n ref={setCellRef}\n {...cellAria.buttonProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(cellAria.isSelected)}\n data-focused={dataAttr(cellAria.isFocused)}\n data-disabled={dataAttr(cellAria.isDisabled)}\n data-unavailable={dataAttr(cellAria.isUnavailable)}\n data-outside-month={dataAttr(cellAria.isOutsideMonth)}\n data-today={dataAttr(cellAria.isToday)}\n data-pressed={dataAttr(cellAria.isPressed)}\n >\n {getChildren()}\n </div>\n );\n}\n\n// Re-export types\nexport type { CalendarState, CalendarDate, DateValue };\n", "/**\n * RangeCalendar component for solidaria-components\n *\n * Pre-wired headless range calendar component that combines aria hooks.\n * Port of react-aria-components/src/RangeCalendar.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createRangeCalendar,\n createCalendarGrid,\n createRangeCalendarCell,\n type AriaRangeCalendarProps,\n type AriaCalendarGridProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createRangeCalendarState,\n type RangeCalendarState,\n type RangeCalendarStateProps,\n type CalendarDate,\n type DateValue,\n type RangeValue,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface RangeCalendarRenderProps {\n /** Whether the calendar is disabled. */\n isDisabled: boolean;\n /** Whether the calendar is read-only. */\n isReadOnly: boolean;\n /** Whether the user is currently selecting a range. */\n isDragging: boolean;\n}\n\nexport interface RangeCalendarProps<T extends DateValue = DateValue>\n extends Omit<AriaRangeCalendarProps, 'id' | 'isDisabled' | 'isReadOnly'>,\n Omit<RangeCalendarStateProps<T>, 'locale'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<RangeCalendarRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<RangeCalendarRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface RangeCalendarGridRenderProps {\n /** Whether the grid is disabled. */\n isDisabled: boolean;\n}\n\nexport interface RangeCalendarGridProps extends Omit<AriaCalendarGridProps, 'startDate' | 'endDate'>, SlotProps {\n /** The children of the component (render function receiving dates). */\n children?: (date: CalendarDate) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<RangeCalendarGridRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<RangeCalendarGridRenderProps>;\n}\n\nexport interface RangeCalendarCellRenderProps {\n /** Whether the cell is within the selected range. */\n isSelected: boolean;\n /** Whether the cell is the start of the selection. */\n isSelectionStart: boolean;\n /** Whether the cell is the end of the selection. */\n isSelectionEnd: boolean;\n /** Whether the cell is focused. */\n isFocused: boolean;\n /** Whether the cell is disabled. */\n isDisabled: boolean;\n /** Whether the cell is unavailable. */\n isUnavailable: boolean;\n /** Whether the cell is outside the visible month. */\n isOutsideMonth: boolean;\n /** Whether the cell represents today. */\n isToday: boolean;\n /** Whether the cell is pressed. */\n isPressed: boolean;\n /** The formatted date string. */\n formattedDate: string;\n}\n\nexport interface RangeCalendarCellProps extends SlotProps {\n /** The date for this cell. */\n date: CalendarDate;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<RangeCalendarCellRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<RangeCalendarCellRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<RangeCalendarCellRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const RangeCalendarContext = createContext<RangeCalendarState<DateValue> | null>(null);\n\nexport function useRangeCalendarContext(): RangeCalendarState<DateValue> {\n const context = useContext(RangeCalendarContext);\n if (!context) {\n throw new Error('RangeCalendar components must be used within a RangeCalendar');\n }\n return context;\n}\n\n// ============================================\n// RANGE CALENDAR COMPONENT\n// ============================================\n\n/**\n * A range calendar displays a grid of days and allows users to select a contiguous range of dates.\n *\n * @example\n * ```tsx\n * <RangeCalendar aria-label=\"Date range\">\n * <header>\n * <RangeCalendarButton slot=\"previous\">◀</RangeCalendarButton>\n * <RangeCalendarHeading />\n * <RangeCalendarButton slot=\"next\">▶</RangeCalendarButton>\n * </header>\n * <RangeCalendarGrid>\n * {(date) => <RangeCalendarCell date={date} />}\n * </RangeCalendarGrid>\n * </RangeCalendar>\n * ```\n */\nexport function RangeCalendar<T extends DateValue = CalendarDate>(\n props: RangeCalendarProps<T>\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={<div class=\"solidaria-RangeCalendar solidaria-RangeCalendar--placeholder\" aria-hidden=\"true\" />}\n >\n <RangeCalendarInner {...props} />\n </Show>\n );\n}\n\n/**\n * Internal RangeCalendar component that renders after client mount.\n */\nfunction RangeCalendarInner<T extends DateValue = CalendarDate>(\n props: RangeCalendarProps<T>\n): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n [\n 'value',\n 'defaultValue',\n 'onChange',\n 'minValue',\n 'maxValue',\n 'isDisabled',\n 'isReadOnly',\n 'focusedValue',\n 'defaultFocusedValue',\n 'onFocusChange',\n 'locale',\n 'isDateUnavailable',\n 'visibleMonths',\n 'isDateDisabled',\n 'validationState',\n 'allowsNonContiguousRanges',\n 'firstDayOfWeek',\n ]\n );\n\n // Create range calendar state\n const state = createRangeCalendarState(stateProps);\n\n // Create range calendar ARIA props\n const calendarAria = createRangeCalendar(rest, state as unknown as RangeCalendarState<DateValue>);\n\n // Render props values\n const renderValues = createMemo<RangeCalendarRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isDragging: state.isDragging(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-RangeCalendar',\n },\n renderValues\n );\n\n return (\n <RangeCalendarContext.Provider value={state as unknown as RangeCalendarState<DateValue>}>\n <div\n {...calendarAria.calendarProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-dragging={dataAttr(state.isDragging())}\n >\n {props.children}\n </div>\n </RangeCalendarContext.Provider>\n );\n}\n\n// ============================================\n// RANGE CALENDAR HEADING COMPONENT\n// ============================================\n\nexport interface RangeCalendarHeadingProps extends SlotProps {\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n/**\n * Displays the current month and year in the range calendar.\n */\nexport function RangeCalendarHeading(props: RangeCalendarHeadingProps): JSX.Element {\n const state = useRangeCalendarContext();\n\n return (\n <h2\n class={props.class ?? 'solidaria-RangeCalendarHeading'}\n style={props.style}\n aria-live=\"polite\"\n >\n {state.title()}\n </h2>\n );\n}\n\n// ============================================\n// RANGE CALENDAR BUTTON COMPONENT\n// ============================================\n\nexport interface RangeCalendarButtonProps extends SlotProps {\n /** The slot for this button (previous or next). */\n slot?: 'previous' | 'next';\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n}\n\n/**\n * A button for navigating the range calendar.\n */\nexport function RangeCalendarButton(props: RangeCalendarButtonProps): JSX.Element {\n const state = useRangeCalendarContext();\n const calendarAria = createRangeCalendar({}, state);\n\n const buttonProps = createMemo(() => {\n if (props.slot === 'previous') {\n return calendarAria.prevButtonProps;\n }\n return calendarAria.nextButtonProps;\n });\n\n return (\n <button\n {...buttonProps()}\n class={props.class ?? 'solidaria-RangeCalendarButton'}\n style={props.style}\n disabled={props.isDisabled || state.isDisabled()}\n >\n {props.children}\n </button>\n );\n}\n\n// ============================================\n// RANGE CALENDAR GRID COMPONENT\n// ============================================\n\n/**\n * Displays a grid of range calendar cells.\n */\nexport function RangeCalendarGrid(props: RangeCalendarGridProps): JSX.Element {\n const state = useRangeCalendarContext();\n const [gridRef, setGridRef] = createSignal<HTMLTableElement | null>(null);\n\n // Create grid ARIA props\n const gridAria = createCalendarGrid(\n {\n weekdayStyle: props.weekdayStyle,\n },\n state as unknown as Parameters<typeof createCalendarGrid>[1],\n gridRef\n );\n\n // Render props values\n const renderValues = createMemo<RangeCalendarGridRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-RangeCalendarGrid',\n },\n renderValues\n );\n\n // Get weeks to render\n const weeks = createMemo(() => {\n const numWeeks = state.getWeeksInMonth();\n return Array.from({ length: numWeeks }, (_, i) => i);\n });\n\n return (\n <table\n ref={setGridRef}\n {...gridAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n >\n <thead {...gridAria.headerProps}>\n <tr>\n <For each={gridAria.weekDays}>\n {(day) => (\n <th scope=\"col\" class=\"solidaria-RangeCalendarHeaderCell\">\n {day}\n </th>\n )}\n </For>\n </tr>\n </thead>\n <tbody>\n <For each={weeks()}>\n {(weekIndex) => (\n <tr>\n <For each={state.getDatesInWeek(weekIndex)}>\n {(date) => (\n <Show when={date}>\n <td>\n {props.children?.(date!)}\n </td>\n </Show>\n )}\n </For>\n </tr>\n )}\n </For>\n </tbody>\n </table>\n );\n}\n\n// ============================================\n// RANGE CALENDAR CELL COMPONENT\n// ============================================\n\n/**\n * A cell in the range calendar grid representing a single day.\n */\nexport function RangeCalendarCell(props: RangeCalendarCellProps): JSX.Element {\n const state = useRangeCalendarContext();\n const [cellRef, setCellRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create cell ARIA props\n const cellAria = createRangeCalendarCell(\n { date: props.date },\n state,\n cellRef\n );\n\n // Render props values\n const renderValues = createMemo<RangeCalendarCellRenderProps>(() => ({\n isSelected: cellAria.isSelected,\n isSelectionStart: cellAria.isSelectionStart,\n isSelectionEnd: cellAria.isSelectionEnd,\n isFocused: cellAria.isFocused,\n isDisabled: cellAria.isDisabled,\n isUnavailable: cellAria.isUnavailable,\n isOutsideMonth: cellAria.isOutsideMonth,\n isToday: cellAria.isToday,\n isPressed: cellAria.isPressed,\n formattedDate: cellAria.formattedDate,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-RangeCalendarCell',\n },\n renderValues\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === 'function') {\n return renderProps.renderChildren();\n }\n return cellAria.formattedDate;\n };\n\n return (\n <div\n ref={setCellRef}\n {...cellAria.buttonProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(cellAria.isSelected)}\n data-selection-start={dataAttr(cellAria.isSelectionStart)}\n data-selection-end={dataAttr(cellAria.isSelectionEnd)}\n data-focused={dataAttr(cellAria.isFocused)}\n data-disabled={dataAttr(cellAria.isDisabled)}\n data-unavailable={dataAttr(cellAria.isUnavailable)}\n data-outside-month={dataAttr(cellAria.isOutsideMonth)}\n data-today={dataAttr(cellAria.isToday)}\n data-pressed={dataAttr(cellAria.isPressed)}\n >\n {getChildren()}\n </div>\n );\n}\n\n// Re-export types\nexport type { RangeCalendarState, RangeValue };\n", "/**\n * DateField component for solidaria-components\n *\n * Pre-wired headless date field component with segment-based editing.\n * Port of react-aria-components/src/DateField.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createDateField,\n createDateSegment,\n type AriaDateFieldProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createDateFieldState,\n type DateFieldState,\n type DateFieldStateProps,\n type DateSegment as DateSegmentType,\n type CalendarDate,\n type DateValue,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface DateFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the field is required. */\n isRequired: boolean;\n /** Whether the field is invalid. */\n isInvalid: boolean;\n}\n\nexport interface DateFieldProps<T extends DateValue = DateValue>\n extends Omit<AriaDateFieldProps, 'id' | 'isDisabled' | 'isReadOnly' | 'isRequired'>,\n Omit<DateFieldStateProps<T>, 'locale'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element | ((segment: DateSegmentType) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateFieldRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface DateInputRenderProps {\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n}\n\nexport interface DateInputProps extends SlotProps {\n /** The children of the component (render function receiving segments). */\n children?: (segment: DateSegmentType) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateInputRenderProps>;\n}\n\nexport interface DateSegmentRenderProps {\n /** Whether the segment is focused. */\n isFocused: boolean;\n /** Whether the segment is editable. */\n isEditable: boolean;\n /** Whether the segment is a placeholder. */\n isPlaceholder: boolean;\n /** The segment type. */\n type: DateSegmentType['type'];\n /** The text to display. */\n text: string;\n}\n\nexport interface DateSegmentProps extends SlotProps {\n /** The segment data. */\n segment: DateSegmentType;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<DateSegmentRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DateSegmentRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DateSegmentRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const DateFieldContext = createContext<DateFieldState<DateValue> | null>(null);\n\nexport function useDateFieldContext(): DateFieldState<DateValue> {\n const context = useContext(DateFieldContext);\n if (!context) {\n throw new Error('DateField components must be used within a DateField');\n }\n return context;\n}\n\n// ============================================\n// DATE FIELD COMPONENT\n// ============================================\n\n/**\n * A date field allows users to enter and edit date values using a keyboard.\n *\n * @example\n * ```tsx\n * <DateField label=\"Date\">\n * <Label>Date</Label>\n * <DateInput>\n * {(segment) => <DateSegment segment={segment} />}\n * </DateInput>\n * </DateField>\n * ```\n */\nexport function DateField<T extends DateValue = CalendarDate>(\n props: DateFieldProps<T>\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={<div class=\"solidaria-DateField solidaria-DateField--placeholder\" aria-hidden=\"true\" />}\n >\n <DateFieldInner {...props} />\n </Show>\n );\n}\n\n/**\n * Internal DateField component that renders after client mount.\n */\nfunction DateFieldInner<T extends DateValue = CalendarDate>(\n props: DateFieldProps<T>\n): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n [\n 'value',\n 'defaultValue',\n 'onChange',\n 'minValue',\n 'maxValue',\n 'isDisabled',\n 'isReadOnly',\n 'isRequired',\n 'locale',\n 'granularity',\n 'hourCycle',\n 'hideTimeZone',\n 'placeholderValue',\n 'validationState',\n 'description',\n 'errorMessage',\n ]\n );\n\n const [fieldRef, setFieldRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create date field state\n const state = createDateFieldState(stateProps);\n\n // Create date field ARIA props\n const fieldAria = createDateField(rest, state as unknown as DateFieldState<DateValue>, fieldRef);\n\n // Render props values\n const renderValues = createMemo<DateFieldRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isRequired: state.isRequired(),\n isInvalid: state.isInvalid(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-DateField',\n },\n renderValues\n );\n\n return (\n <DateFieldContext.Provider value={state as unknown as DateFieldState<DateValue>}>\n <div\n ref={setFieldRef}\n {...fieldAria.fieldProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-required={dataAttr(state.isRequired())}\n data-invalid={dataAttr(state.isInvalid())}\n >\n {props.children as JSX.Element}\n </div>\n </DateFieldContext.Provider>\n );\n}\n\n// ============================================\n// DATE INPUT COMPONENT\n// ============================================\n\n/**\n * The input area containing date segments.\n */\nexport function DateInput(props: DateInputProps): JSX.Element {\n const state = useDateFieldContext();\n const [isFocused, setIsFocused] = createSignal(false);\n\n // Render props values\n const renderValues = createMemo<DateInputRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isFocused: isFocused(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-DateInput',\n },\n renderValues\n );\n\n return (\n <div\n role=\"presentation\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-focused={dataAttr(isFocused())}\n onFocusIn={() => setIsFocused(true)}\n onFocusOut={() => setIsFocused(false)}\n >\n <For each={state.segments()}>\n {(segment) => props.children?.(segment)}\n </For>\n </div>\n );\n}\n\n// ============================================\n// DATE SEGMENT COMPONENT\n// ============================================\n\n/**\n * A segment of a date field (year, month, day, etc.).\n */\nexport function DateSegment(props: DateSegmentProps): JSX.Element {\n const state = useDateFieldContext();\n const [segmentRef, setSegmentRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create segment ARIA props\n const segmentAria = createDateSegment(\n { segment: props.segment },\n state,\n segmentRef\n );\n\n // Render props values\n const renderValues = createMemo<DateSegmentRenderProps>(() => ({\n isFocused: segmentAria.isFocused,\n isEditable: segmentAria.isEditable,\n isPlaceholder: segmentAria.isPlaceholder,\n type: props.segment.type,\n text: segmentAria.text,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-DateSegment',\n },\n renderValues\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === 'function') {\n return renderProps.renderChildren();\n }\n return segmentAria.text;\n };\n\n return (\n <div\n ref={setSegmentRef}\n {...segmentAria.segmentProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={dataAttr(segmentAria.isFocused)}\n data-editable={dataAttr(segmentAria.isEditable)}\n data-placeholder={dataAttr(segmentAria.isPlaceholder)}\n data-type={props.segment.type}\n >\n {getChildren()}\n </div>\n );\n}\n\n// Re-export types\nexport type { DateFieldState, DateSegmentType };\n", "/**\n * TimeField component for solidaria-components\n *\n * Pre-wired headless time field component with segment-based editing.\n * Port of react-aria-components/src/TimeField.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createTimeField,\n type AriaTimeFieldProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createTimeFieldState,\n type TimeFieldState,\n type TimeFieldStateProps,\n type TimeSegment as TimeSegmentType,\n type TimeValue,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TimeFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the field is required. */\n isRequired: boolean;\n /** Whether the field is invalid. */\n isInvalid: boolean;\n}\n\nexport interface TimeFieldProps<T extends TimeValue = TimeValue>\n extends Omit<AriaTimeFieldProps, 'id' | 'isDisabled' | 'isReadOnly' | 'isRequired'>,\n Omit<TimeFieldStateProps<T>, 'locale'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element | ((segment: TimeSegmentType) => JSX.Element);\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TimeFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TimeFieldRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n}\n\nexport interface TimeInputRenderProps {\n /** Whether the input is disabled. */\n isDisabled: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n}\n\nexport interface TimeInputProps extends SlotProps {\n /** The children of the component (render function receiving segments). */\n children?: (segment: TimeSegmentType) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TimeInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TimeInputRenderProps>;\n}\n\nexport interface TimeSegmentRenderProps {\n /** Whether the segment is focused. */\n isFocused: boolean;\n /** Whether the segment is editable. */\n isEditable: boolean;\n /** Whether the segment is a placeholder. */\n isPlaceholder: boolean;\n /** The segment type. */\n type: TimeSegmentType['type'];\n /** The text to display. */\n text: string;\n}\n\nexport interface TimeSegmentProps extends SlotProps {\n /** The segment data. */\n segment: TimeSegmentType;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<TimeSegmentRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TimeSegmentRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TimeSegmentRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const TimeFieldContext = createContext<TimeFieldState<TimeValue> | null>(null);\n\nexport function useTimeFieldContext(): TimeFieldState<TimeValue> {\n const context = useContext(TimeFieldContext);\n if (!context) {\n throw new Error('TimeField components must be used within a TimeField');\n }\n return context;\n}\n\n// ============================================\n// TIME FIELD COMPONENT\n// ============================================\n\n/**\n * A time field allows users to enter and edit time values using a keyboard.\n *\n * @example\n * ```tsx\n * <TimeField label=\"Time\">\n * <Label>Time</Label>\n * <TimeInput>\n * {(segment) => <TimeSegment segment={segment} />}\n * </TimeInput>\n * </TimeField>\n * ```\n */\nexport function TimeField<T extends TimeValue = TimeValue>(\n props: TimeFieldProps<T>\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={<div class=\"solidaria-TimeField solidaria-TimeField--placeholder\" aria-hidden=\"true\" />}\n >\n <TimeFieldInner {...props} />\n </Show>\n );\n}\n\n/**\n * Internal TimeField component that renders after client mount.\n */\nfunction TimeFieldInner<T extends TimeValue = TimeValue>(\n props: TimeFieldProps<T>\n): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n [\n 'value',\n 'defaultValue',\n 'onChange',\n 'minValue',\n 'maxValue',\n 'isDisabled',\n 'isReadOnly',\n 'isRequired',\n 'locale',\n 'granularity',\n 'hourCycle',\n 'validationState',\n 'placeholderValue',\n ]\n );\n\n const [fieldRef, setFieldRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create time field state\n const state = createTimeFieldState(stateProps);\n\n // Create time field ARIA props\n const fieldAria = createTimeField(rest, state as unknown as TimeFieldState<TimeValue>, fieldRef);\n\n // Render props values\n const renderValues = createMemo<TimeFieldRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isRequired: state.isRequired(),\n isInvalid: state.isInvalid(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-TimeField',\n },\n renderValues\n );\n\n return (\n <TimeFieldContext.Provider value={state as unknown as TimeFieldState<TimeValue>}>\n <div\n ref={setFieldRef}\n {...fieldAria.fieldProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-required={dataAttr(state.isRequired())}\n data-invalid={dataAttr(state.isInvalid())}\n >\n {props.children as JSX.Element}\n </div>\n </TimeFieldContext.Provider>\n );\n}\n\n// ============================================\n// TIME INPUT COMPONENT\n// ============================================\n\n/**\n * The input area containing time segments.\n */\nexport function TimeInput(props: TimeInputProps): JSX.Element {\n const state = useTimeFieldContext();\n const [isFocused, setIsFocused] = createSignal(false);\n\n // Render props values\n const renderValues = createMemo<TimeInputRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isFocused: isFocused(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-TimeInput',\n },\n renderValues\n );\n\n return (\n <div\n role=\"presentation\"\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-focused={dataAttr(isFocused())}\n onFocusIn={() => setIsFocused(true)}\n onFocusOut={() => setIsFocused(false)}\n >\n <For each={state.segments()}>\n {(segment) => props.children?.(segment)}\n </For>\n </div>\n );\n}\n\n// ============================================\n// TIME SEGMENT COMPONENT\n// ============================================\n\n/**\n * A segment of a time field (hour, minute, second, AM/PM).\n */\nexport function TimeSegment(props: TimeSegmentProps): JSX.Element {\n const state = useTimeFieldContext();\n const [_segmentRef, setSegmentRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create segment ARIA props\n // We use a simplified version for time segments\n const [isFocused, setIsFocused] = createSignal(false);\n const [enteredKeys, setEnteredKeys] = createSignal('');\n\n const isEditable = createMemo(() => {\n const seg = props.segment;\n return seg.isEditable && !state.isDisabled() && !state.isReadOnly();\n });\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (!isEditable()) return;\n\n const seg = props.segment;\n const type = seg.type;\n\n if (type === 'literal') return;\n\n switch (e.key) {\n case 'ArrowUp':\n e.preventDefault();\n state.incrementSegment(type);\n break;\n case 'ArrowDown':\n e.preventDefault();\n state.decrementSegment(type);\n break;\n case 'Backspace':\n case 'Delete':\n e.preventDefault();\n state.clearSegment(type);\n setEnteredKeys('');\n break;\n default:\n if (/^\\d$/.test(e.key)) {\n e.preventDefault();\n const newKeys = enteredKeys() + e.key;\n const numValue = parseInt(newKeys, 10);\n const maxValue = seg.maxValue ?? 59;\n const minValue = seg.minValue ?? 0;\n\n if (numValue <= maxValue) {\n state.setSegment(type, numValue);\n if (numValue * 10 > maxValue || newKeys.length >= 2) {\n setEnteredKeys('');\n } else {\n setEnteredKeys(newKeys);\n }\n } else {\n const singleValue = parseInt(e.key, 10);\n if (singleValue >= minValue && singleValue <= maxValue) {\n state.setSegment(type, singleValue);\n }\n setEnteredKeys(e.key);\n }\n }\n break;\n }\n };\n\n const handleFocus = () => {\n setIsFocused(true);\n setEnteredKeys('');\n };\n\n const handleBlur = () => {\n setIsFocused(false);\n setEnteredKeys('');\n };\n\n // Segment props\n const segmentProps = createMemo(() => {\n const seg = props.segment;\n const type = seg.type;\n\n if (type === 'literal') {\n return {\n 'aria-hidden': true,\n };\n }\n\n return {\n role: 'spinbutton' as const,\n tabIndex: isEditable() ? 0 : -1,\n 'aria-label': getTimeSegmentLabel(type),\n 'aria-valuenow': seg.value,\n 'aria-valuemin': seg.minValue,\n 'aria-valuemax': seg.maxValue,\n 'aria-valuetext': seg.isPlaceholder ? seg.placeholder : seg.text,\n 'aria-readonly': state.isReadOnly() || undefined,\n 'aria-disabled': state.isDisabled() || undefined,\n 'aria-invalid': state.isInvalid() || undefined,\n contentEditable: isEditable(),\n inputMode: 'numeric' as const,\n autoCorrect: 'off',\n enterKeyHint: 'next' as const,\n spellCheck: false,\n onKeyDown: handleKeyDown,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onMouseDown: (e: MouseEvent) => {\n e.preventDefault();\n },\n };\n });\n\n const text = createMemo(() => {\n const seg = props.segment;\n return seg.isPlaceholder ? seg.placeholder : seg.text;\n });\n\n // Render props values\n const renderValues = createMemo<TimeSegmentRenderProps>(() => ({\n isFocused: isFocused(),\n isEditable: isEditable(),\n isPlaceholder: props.segment.isPlaceholder,\n type: props.segment.type,\n text: text(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-TimeSegment',\n },\n renderValues\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === 'function') {\n return renderProps.renderChildren();\n }\n return text();\n };\n\n return (\n <div\n ref={setSegmentRef}\n {...segmentProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={dataAttr(isFocused())}\n data-editable={dataAttr(isEditable())}\n data-placeholder={dataAttr(props.segment.isPlaceholder)}\n data-type={props.segment.type}\n >\n {getChildren()}\n </div>\n );\n}\n\n// ============================================\n// HELPER FUNCTIONS\n// ============================================\n\nfunction getTimeSegmentLabel(type: TimeSegmentType['type']): string {\n switch (type) {\n case 'hour':\n return 'Hour';\n case 'minute':\n return 'Minute';\n case 'second':\n return 'Second';\n case 'dayPeriod':\n return 'AM/PM';\n default:\n return '';\n }\n}\n\n// Re-export types\nexport type { TimeFieldState, TimeSegmentType, TimeValue };\n", "/**\n * DatePicker component for solidaria-components\n *\n * Pre-wired headless date picker component that combines a date field with a calendar popup.\n * Port of react-aria-components/src/DatePicker.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n Show,\n} from 'solid-js';\nimport {\n createDatePicker,\n type AriaDatePickerProps,\n type DatePickerState as AriaDatePickerState,\n} from '@proyecto-viviana/solidaria';\nimport {\n createDateFieldState,\n createCalendarState,\n type DateFieldState,\n type CalendarState,\n type DateFieldStateProps,\n type CalendarDate,\n type DateValue,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from './utils';\nimport { DateFieldContext } from './DateField';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface DatePickerRenderProps {\n /** Whether the picker is disabled. */\n isDisabled: boolean;\n /** Whether the picker is read-only. */\n isReadOnly: boolean;\n /** Whether the picker is required. */\n isRequired: boolean;\n /** Whether the picker is invalid. */\n isInvalid: boolean;\n /** Whether the calendar is open. */\n isOpen: boolean;\n}\n\nexport interface DatePickerContextValue {\n fieldState: DateFieldState<DateValue>;\n calendarState: CalendarState<DateValue>;\n overlayState: {\n isOpen: boolean;\n open: () => void;\n close: () => void;\n toggle: () => void;\n };\n pickerAria: ReturnType<typeof createDatePicker>;\n}\n\nexport interface DatePickerProps<T extends DateValue = DateValue>\n extends Omit<AriaDatePickerProps, 'id' | 'isDisabled' | 'isReadOnly' | 'isRequired'>,\n Omit<DateFieldStateProps<T>, 'locale'>,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DatePickerRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DatePickerRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n /** Whether the calendar should close when a date is selected. */\n shouldCloseOnSelect?: boolean;\n}\n\nexport interface DatePickerButtonRenderProps {\n /** Whether the button is disabled. */\n isDisabled: boolean;\n /** Whether the calendar is open. */\n isOpen: boolean;\n}\n\nexport interface DatePickerButtonProps extends SlotProps {\n /** The children of the component. */\n children?: RenderChildren<DatePickerButtonRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<DatePickerButtonRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<DatePickerButtonRenderProps>;\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const DatePickerContext = createContext<DatePickerContextValue | null>(null);\n\nexport function useDatePickerContext(): DatePickerContextValue {\n const context = useContext(DatePickerContext);\n if (!context) {\n throw new Error('DatePicker components must be used within a DatePicker');\n }\n return context;\n}\n\n// ============================================\n// DATE PICKER COMPONENT\n// ============================================\n\n/**\n * A date picker combines a DateField and a Calendar popover.\n *\n * @example\n * ```tsx\n * <DatePicker label=\"Event date\">\n * <Label>Event date</Label>\n * <Group>\n * <DateInput>\n * {(segment) => <DateSegment segment={segment} />}\n * </DateInput>\n * <DatePickerButton>📅</DatePickerButton>\n * </Group>\n * <Popover>\n * <Dialog>\n * <Calendar>\n * <CalendarGrid>\n * {(date) => <CalendarCell date={date} />}\n * </CalendarGrid>\n * </Calendar>\n * </Dialog>\n * </Popover>\n * </DatePicker>\n * ```\n */\nexport function DatePicker<T extends DateValue = CalendarDate>(\n props: DatePickerProps<T>\n): JSX.Element {\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={<div class=\"solidaria-DatePicker solidaria-DatePicker--placeholder\" aria-hidden=\"true\" />}\n >\n <DatePickerInner {...props} />\n </Show>\n );\n}\n\n/**\n * Internal DatePicker component that renders after client mount.\n */\nfunction DatePickerInner<T extends DateValue = CalendarDate>(\n props: DatePickerProps<T>\n): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'shouldCloseOnSelect'],\n [\n 'value',\n 'defaultValue',\n 'onChange',\n 'minValue',\n 'maxValue',\n 'isDisabled',\n 'isReadOnly',\n 'isRequired',\n 'locale',\n 'granularity',\n 'hourCycle',\n 'hideTimeZone',\n 'placeholderValue',\n 'validationState',\n 'description',\n 'errorMessage',\n ]\n );\n\n // Create overlay trigger state\n const [isOpen, setIsOpen] = createSignal(false);\n\n const overlayState = {\n get isOpen() { return isOpen(); },\n open: () => setIsOpen(true),\n close: () => setIsOpen(false),\n toggle: () => setIsOpen((prev) => !prev),\n };\n\n // Create date field state\n const fieldState = createDateFieldState({\n ...stateProps,\n onChange: (value) => {\n stateProps.onChange?.(value);\n if (local.shouldCloseOnSelect !== false && value) {\n overlayState.close();\n }\n },\n });\n\n // Create calendar state that syncs with field\n const calendarState = createCalendarState({\n value: () => fieldState.value(),\n onChange: (value) => {\n fieldState.setValue(value as T | null);\n if (local.shouldCloseOnSelect !== false) {\n overlayState.close();\n }\n },\n minValue: stateProps.minValue,\n maxValue: stateProps.maxValue,\n isDisabled: stateProps.isDisabled,\n isReadOnly: stateProps.isReadOnly,\n locale: stateProps.locale,\n });\n\n // Create date picker ARIA props\n const pickerAria = createDatePicker(\n rest,\n fieldState as unknown as DateFieldState<DateValue>,\n overlayState as AriaDatePickerState,\n calendarState as unknown as CalendarState<DateValue>\n );\n\n // Context value\n const contextValue: DatePickerContextValue = {\n fieldState: fieldState as unknown as DateFieldState<DateValue>,\n calendarState: calendarState as unknown as CalendarState<DateValue>,\n overlayState,\n pickerAria,\n };\n\n // Render props values\n const renderValues = createMemo<DatePickerRenderProps>(() => ({\n isDisabled: fieldState.isDisabled(),\n isReadOnly: fieldState.isReadOnly(),\n isRequired: fieldState.isRequired(),\n isInvalid: fieldState.isInvalid(),\n isOpen: overlayState.isOpen,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-DatePicker',\n },\n renderValues\n );\n\n return (\n <DatePickerContext.Provider value={contextValue}>\n {/* Also provide DateFieldContext so DateInput/DateSegment work inside DatePicker */}\n <DateFieldContext.Provider value={fieldState as unknown as DateFieldState<DateValue>}>\n <div\n {...pickerAria.groupProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(fieldState.isDisabled())}\n data-readonly={dataAttr(fieldState.isReadOnly())}\n data-required={dataAttr(fieldState.isRequired())}\n data-invalid={dataAttr(fieldState.isInvalid())}\n data-open={dataAttr(overlayState.isOpen)}\n >\n {props.children}\n </div>\n </DateFieldContext.Provider>\n </DatePickerContext.Provider>\n );\n}\n\n// ============================================\n// DATE PICKER BUTTON COMPONENT\n// ============================================\n\n/**\n * A button that opens the date picker calendar.\n */\nexport function DatePickerButton(props: DatePickerButtonProps): JSX.Element {\n const context = useDatePickerContext();\n\n // Render props values\n const renderValues = createMemo<DatePickerButtonRenderProps>(() => ({\n isDisabled: context.fieldState.isDisabled() || (props.isDisabled ?? false),\n isOpen: context.overlayState.isOpen,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: props.class,\n style: props.style,\n defaultClassName: 'solidaria-DatePickerButton',\n },\n renderValues\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === 'function') {\n return renderProps.renderChildren();\n }\n return props.children ?? '📅';\n };\n\n return (\n <button\n {...context.pickerAria.buttonProps}\n class={renderProps.class()}\n style={renderProps.style()}\n disabled={context.fieldState.isDisabled() || props.isDisabled}\n data-disabled={dataAttr(context.fieldState.isDisabled() || props.isDisabled)}\n data-open={dataAttr(context.overlayState.isOpen)}\n >\n {getChildren()}\n </button>\n );\n}\n\n// ============================================\n// DATE PICKER CONTENT COMPONENT\n// ============================================\n\nexport interface DatePickerContentProps extends SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n/**\n * The content area of the date picker (typically contains a Calendar).\n */\nexport function DatePickerContent(props: DatePickerContentProps): JSX.Element {\n const context = useDatePickerContext();\n\n return (\n <Show when={context.overlayState.isOpen}>\n <div\n {...context.pickerAria.dialogProps}\n class={props.class ?? 'solidaria-DatePickerContent'}\n style={props.style}\n >\n {props.children}\n </div>\n </Show>\n );\n}\n\n// DatePickerContextValue is already exported at declaration\n", "/**\n * Table component for solidaria-components\n *\n * A pre-wired headless table that combines state + aria hooks.\n * Based on react-aria-components/src/Table.tsx\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createTable,\n createTableColumnHeader,\n createTableRow,\n createTableCell,\n createTableRowGroup,\n createTableSelectionCheckbox,\n createTableSelectAllCheckbox,\n createFocusRing,\n createHover,\n type AriaTableProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createTableState,\n createTableCollection,\n type TableState,\n type TableCollection,\n type Key,\n type SortDescriptor,\n type ColumnDefinition,\n type GridNode,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TableRenderProps {\n /** Whether the table has focus. */\n isFocused: boolean;\n /** Whether the table has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the table is disabled. */\n isDisabled: boolean;\n /** Whether the table is empty. */\n isEmpty: boolean;\n}\n\nexport interface TableProps<T extends object> extends Omit<AriaTableProps, 'children'>, SlotProps {\n /** The data items to render in the table. */\n items: T[];\n /** The column definitions. */\n columns: ColumnDefinition<T>[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item for a column. */\n getTextValue?: (item: T, column: ColumnDefinition<T>) => string;\n /** The selection mode. */\n selectionMode?: 'none' | 'single' | 'multiple';\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Currently selected keys (controlled). */\n selectedKeys?: 'all' | Iterable<Key>;\n /** Default selected keys (uncontrolled). */\n defaultSelectedKeys?: 'all' | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: 'all' | Set<Key>) => void;\n /** The current sort descriptor. */\n sortDescriptor?: SortDescriptor;\n /** Handler called when sort changes. */\n onSortChange?: (descriptor: SortDescriptor) => void;\n /** Whether to show selection checkboxes. */\n showSelectionCheckboxes?: boolean;\n /** The children of the component. */\n children?: JSX.Element | RenderChildren<TableRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableRenderProps>;\n /** A function to render when the table is empty. */\n renderEmptyState?: () => JSX.Element;\n}\n\nexport interface TableHeaderRenderProps {\n /** Whether the header has focus. */\n isFocused: boolean;\n}\n\nexport interface TableHeaderProps extends SlotProps {\n /** The children (usually TableColumn components). */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableHeaderRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableHeaderRenderProps>;\n}\n\nexport interface TableColumnRenderProps {\n /** Whether the column is focused. */\n isFocused: boolean;\n /** Whether the column has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the column is sortable. */\n isSortable: boolean;\n /** The current sort direction ('ascending', 'descending', or undefined). */\n sortDirection: 'ascending' | 'descending' | undefined;\n /** Whether the column is being hovered. */\n isHovered: boolean;\n}\n\nexport interface TableColumnProps extends SlotProps {\n /** The unique key for the column. */\n id: Key;\n /** Whether the column allows sorting. */\n allowsSorting?: boolean;\n /** The children of the column. */\n children?: RenderChildren<TableColumnRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableColumnRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableColumnRenderProps>;\n}\n\nexport interface TableBodyRenderProps {\n /** Whether the body is empty. */\n isEmpty: boolean;\n}\n\nexport interface TableBodyProps<T> extends SlotProps {\n /** The items to render. If not provided, uses items from Table. */\n items?: T[];\n /** The children (usually a render function for TableRow). */\n children?: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableBodyRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableBodyRenderProps>;\n /** A function to render when the body is empty. */\n renderEmptyState?: () => JSX.Element;\n}\n\nexport interface TableRowRenderProps {\n /** Whether the row is selected. */\n isSelected: boolean;\n /** Whether the row is focused. */\n isFocused: boolean;\n /** Whether the row has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the row is pressed. */\n isPressed: boolean;\n /** Whether the row is hovered. */\n isHovered: boolean;\n /** Whether the row is disabled. */\n isDisabled: boolean;\n}\n\nexport interface TableRowProps<T> extends SlotProps {\n /** The unique key for the row. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the row (usually TableCell components). */\n children?: JSX.Element | RenderChildren<TableRowRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableRowRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableRowRenderProps>;\n /** Handler called when the row is activated (double-click or Enter). */\n onAction?: () => void;\n}\n\nexport interface TableCellRenderProps {\n /** Whether the cell is focused. */\n isFocused: boolean;\n /** Whether the cell has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the cell is pressed. */\n isPressed: boolean;\n /** Whether the cell is hovered. */\n isHovered: boolean;\n}\n\nexport interface TableCellProps extends SlotProps {\n /** The unique key for the cell. */\n id?: Key;\n /** The children of the cell. */\n children?: RenderChildren<TableCellRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TableCellRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TableCellRenderProps>;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface TableContextValue<T extends object> {\n state: TableState<T, TableCollection<T>>;\n collection: TableCollection<T>;\n items: T[];\n columns: ColumnDefinition<T>[];\n isDisabled: boolean;\n showSelectionCheckboxes: boolean;\n}\n\nexport const TableContext = createContext<TableContextValue<object> | null>(null);\nexport const TableStateContext = createContext<TableState<object, TableCollection<object>> | null>(null);\n\n// Row-level context for cells\ninterface TableRowContextValue {\n rowKey: Key;\n rowNode: GridNode<unknown>;\n}\n\nexport const TableRowContext = createContext<TableRowContextValue | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A table displays data in rows and columns and enables a user to navigate its contents via directional navigation keys,\n * and optionally supports row selection and sorting.\n */\nexport function Table<T extends object>(props: TableProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['class', 'style', 'slot', 'renderEmptyState'],\n [\n 'items',\n 'columns',\n 'getKey',\n 'getTextValue',\n 'disabledKeys',\n 'selectionMode',\n 'selectedKeys',\n 'defaultSelectedKeys',\n 'onSelectionChange',\n 'sortDescriptor',\n 'onSortChange',\n 'showSelectionCheckboxes',\n ]\n );\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLTableElement | null>(null);\n\n // Create collection\n const collection = createMemo(() =>\n createTableCollection<T>({\n columns: stateProps.columns,\n rows: stateProps.items,\n getKey: stateProps.getKey,\n getTextValue: stateProps.getTextValue,\n showSelectionCheckboxes: stateProps.showSelectionCheckboxes ?? false,\n })\n );\n\n // Create table state\n const state = createTableState<T, TableCollection<T>>(() => ({\n collection: collection(),\n disabledKeys: stateProps.disabledKeys,\n selectionMode: stateProps.selectionMode,\n selectedKeys: stateProps.selectedKeys,\n defaultSelectedKeys: stateProps.defaultSelectedKeys,\n onSelectionChange: stateProps.onSelectionChange,\n sortDescriptor: stateProps.sortDescriptor,\n onSortChange: stateProps.onSortChange,\n showSelectionCheckboxes: stateProps.showSelectionCheckboxes,\n }));\n\n // Create table aria props\n const { gridProps } = createTable<T>(\n () => ({\n id: ariaProps.id,\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isVirtualized: ariaProps.isVirtualized,\n onRowAction: ariaProps.onRowAction,\n onCellAction: ariaProps.onCellAction,\n focusMode: ariaProps.focusMode,\n }),\n () => state,\n ref\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<TableRenderProps>(() => ({\n isFocused: state.isFocused || isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: false, // Tables don't have a global disabled state\n isEmpty: stateProps.items.length === 0,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from spread props\n const cleanGridProps = () => {\n const { ref: _ref1, ...rest } = gridProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n const contextValue = createMemo<TableContextValue<T>>(() => ({\n state,\n collection: collection(),\n items: stateProps.items,\n columns: stateProps.columns,\n isDisabled: false,\n showSelectionCheckboxes: stateProps.showSelectionCheckboxes ?? false,\n }));\n\n return (\n <TableContext.Provider value={contextValue() as TableContextValue<object>}>\n <TableStateContext.Provider value={state as unknown as TableState<object, TableCollection<object>>}>\n <table\n ref={setRef}\n {...domProps()}\n {...cleanGridProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-empty={stateProps.items.length === 0 || undefined}\n >\n {renderProps.renderChildren()}\n </table>\n </TableStateContext.Provider>\n </TableContext.Provider>\n );\n}\n\n/**\n * A header row in a table containing column headers.\n */\nexport function TableHeader(props: TableHeaderProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n // Get context\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableHeader must be used within a Table');\n }\n\n const { rowGroupProps } = createTableRowGroup(() => ({ type: 'thead' }));\n\n // Render props values\n const renderValues = createMemo<TableHeaderRenderProps>(() => ({\n isFocused: false,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table-header',\n },\n renderValues\n );\n\n const cleanRowGroupProps = () => {\n const { ref: _ref, ...rest } = rowGroupProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <thead {...cleanRowGroupProps()} class={renderProps.class()} style={renderProps.style()}>\n <tr role=\"row\">{props.children}</tr>\n </thead>\n );\n}\n\n/**\n * A column header in a table.\n */\nexport function TableColumn(props: TableColumnProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot', 'id', 'allowsSorting']);\n\n // Get context\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableColumn must be used within a Table');\n }\n const { state, collection } = context;\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLTableCellElement | null>(null);\n\n // Find the column node\n const columnNode = createMemo(() => {\n const node = collection.getItem(local.id);\n if (!node) {\n // Create a simple node for the column\n return {\n type: 'column' as const,\n key: local.id,\n value: null,\n textValue: String(local.id),\n level: 0,\n index: 0,\n hasChildNodes: false,\n childNodes: [],\n } as GridNode<unknown>;\n }\n return node;\n });\n\n // Create column header aria props\n const { columnHeaderProps } = createTableColumnHeader<object>(\n () => ({\n node: columnNode(),\n allowsSorting: local.allowsSorting,\n }),\n () => state as TableState<object, TableCollection<object>>,\n ref\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n isDisabled: false,\n });\n\n // Create focus ring\n const { isFocusVisible, focusProps } = createFocusRing();\n\n // Get sort direction\n const sortDirection = createMemo(() => {\n const sortDescriptor = state.sortDescriptor;\n if (sortDescriptor?.column === local.id) {\n return sortDescriptor.direction;\n }\n return undefined;\n });\n\n // Render props values\n const renderValues = createMemo<TableColumnRenderProps>(() => ({\n isFocused: state.focusedKey === local.id,\n isFocusVisible: isFocusVisible() && state.focusedKey === local.id,\n isSortable: local.allowsSorting ?? false,\n sortDirection: sortDirection(),\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table-column',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanColumnHeaderProps = () => {\n const { ref: _ref1, ...rest } = columnHeaderProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <th\n ref={setRef}\n {...cleanColumnHeaderProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-sortable={local.allowsSorting || undefined}\n data-sort-direction={sortDirection() || undefined}\n data-hovered={isHovered() || undefined}\n data-focused={state.focusedKey === local.id || undefined}\n data-focus-visible={(isFocusVisible() && state.focusedKey === local.id) || undefined}\n >\n {renderProps.renderChildren()}\n </th>\n );\n}\n\n/**\n * The body of a table containing data rows.\n */\nexport function TableBody<T extends object>(props: TableBodyProps<T>): JSX.Element {\n const [local] = splitProps(props, ['items', 'class', 'style', 'slot', 'renderEmptyState']);\n\n // Get context\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableBody must be used within a Table');\n }\n\n const { rowGroupProps } = createTableRowGroup(() => ({ type: 'tbody' }));\n\n // Use provided items or context items\n const items = createMemo(() => (local.items ?? context.items) as T[]);\n\n // Render props values\n const renderValues = createMemo<TableBodyRenderProps>(() => ({\n isEmpty: items().length === 0,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table-body',\n },\n renderValues\n );\n\n const cleanRowGroupProps = () => {\n const { ref: _ref, ...rest } = rowGroupProps as Record<string, unknown>;\n return rest;\n };\n\n const isEmpty = () => items().length === 0;\n\n return (\n <tbody {...cleanRowGroupProps()} class={renderProps.class()} style={renderProps.style()}>\n <Show when={isEmpty() && local.renderEmptyState} fallback={<For each={items()}>{(item) => props.children?.(item)}</For>}>\n {local.renderEmptyState?.()}\n </Show>\n </tbody>\n );\n}\n\n/**\n * A row in a table.\n */\nexport function TableRow<T extends object>(props: TableRowProps<T>): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot', 'id', 'item', 'onAction']);\n\n // Get context\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableRow must be used within a Table');\n }\n const { state, collection } = context;\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLTableRowElement | null>(null);\n\n // Find the row node\n const rowNode = createMemo(() => {\n const node = collection.getItem(local.id);\n if (!node) {\n // Create a simple node for the row\n return {\n type: 'item' as const,\n key: local.id,\n value: local.item ?? null,\n textValue: String(local.id),\n level: 0,\n index: 0,\n hasChildNodes: true,\n childNodes: [],\n } as GridNode<unknown>;\n }\n return node;\n });\n\n // Create row aria props\n const { rowProps, isSelected, isDisabled, isPressed } = createTableRow<object>(\n () => ({\n node: rowNode(),\n onAction: local.onAction,\n }),\n () => state as TableState<object, TableCollection<object>>,\n ref\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled;\n },\n });\n\n // Create focus ring\n const { isFocusVisible, focusProps } = createFocusRing();\n\n // Check if focused\n const isFocused = createMemo(() => state.focusedKey === local.id);\n\n // Render props values\n const renderValues = createMemo<TableRowRenderProps>(() => ({\n isSelected,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible() && isFocused(),\n isPressed,\n isHovered: isHovered(),\n isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table-row',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanRowProps = () => {\n const { ref: _ref1, ...rest } = rowProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n const rowContextValue: TableRowContextValue = {\n rowKey: local.id,\n rowNode: rowNode(),\n };\n\n return (\n <TableRowContext.Provider value={rowContextValue}>\n <tr\n ref={setRef}\n {...cleanRowProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={isSelected || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={(isFocusVisible() && isFocused()) || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </tr>\n </TableRowContext.Provider>\n );\n}\n\n/**\n * A cell in a table row.\n */\nexport function TableCell(props: TableCellProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot', 'id']);\n\n // Get context\n const tableContext = useContext(TableContext);\n const rowContext = useContext(TableRowContext);\n\n if (!tableContext) {\n throw new Error('TableCell must be used within a Table');\n }\n if (!rowContext) {\n throw new Error('TableCell must be used within a Table');\n }\n\n const { state, collection } = tableContext;\n const { rowKey, rowNode } = rowContext;\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLTableCellElement | null>(null);\n\n // Find the cell node\n const cellNode = createMemo(() => {\n // If id is provided, look for that specific cell\n if (local.id != null) {\n const cellKey = `${rowKey}-${local.id}`;\n const node = collection.getItem(cellKey);\n if (node) return node;\n }\n\n // Otherwise create a simple node\n return {\n type: 'cell' as const,\n key: local.id ?? `${rowKey}-cell`,\n value: rowNode.value,\n textValue: '',\n level: 1,\n index: 0,\n parentKey: rowKey,\n hasChildNodes: false,\n childNodes: [],\n } as GridNode<unknown>;\n });\n\n // Create cell aria props\n const { gridCellProps, isPressed } = createTableCell<object>(\n () => ({\n node: cellNode(),\n }),\n () => state as TableState<object, TableCollection<object>>,\n ref\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n isDisabled: false,\n });\n\n // Create focus ring\n const { isFocusVisible, focusProps } = createFocusRing();\n\n // Check if focused\n const isFocused = createMemo(() => state.focusedKey === cellNode().key);\n\n // Render props values\n const renderValues = createMemo<TableCellRenderProps>(() => ({\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible() && isFocused(),\n isPressed,\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Table-cell',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanCellProps = () => {\n const { ref: _ref1, ...rest } = gridCellProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <td\n ref={setRef}\n {...cleanCellProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={isFocused() || undefined}\n data-focus-visible={(isFocusVisible() && isFocused()) || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </td>\n );\n}\n\n/**\n * A checkbox cell for row selection.\n */\nexport function TableSelectionCheckbox(props: { rowKey: Key }): JSX.Element {\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableSelectionCheckbox must be used within a Table');\n }\n\n const { state } = context;\n\n const { checkboxProps } = createTableSelectionCheckbox<object>(\n () => ({ key: props.rowKey }),\n () => state as TableState<object, TableCollection<object>>\n );\n\n return <input {...checkboxProps} />;\n}\n\n/**\n * A checkbox for select-all functionality.\n */\nexport function TableSelectAllCheckbox(): JSX.Element {\n const context = useContext(TableContext);\n if (!context) {\n throw new Error('TableSelectAllCheckbox must be used within a Table');\n }\n\n const { state } = context;\n\n const { checkboxProps } = createTableSelectAllCheckbox<object>(\n () => state as TableState<object, TableCollection<object>>\n );\n\n return <input {...checkboxProps} />;\n}\n\n// Attach components as static properties\nTable.Header = TableHeader;\nTable.Column = TableColumn;\nTable.Body = TableBody;\nTable.Row = TableRow;\nTable.Cell = TableCell;\nTable.SelectionCheckbox = TableSelectionCheckbox;\nTable.SelectAllCheckbox = TableSelectAllCheckbox;\n", "/**\n * GridList component for solidaria-components\n *\n * A pre-wired headless grid list that combines state + aria hooks.\n * Based on react-aria-components/src/GridList.tsx\n *\n * GridList is similar to ListBox but supports interactive elements within items\n * and uses grid keyboard navigation.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n} from 'solid-js';\nimport {\n createGridList,\n createGridListItem,\n createGridListSelectionCheckbox,\n createFocusRing,\n createHover,\n type AriaGridListProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createGridState,\n type GridState,\n type GridCollection,\n type GridNode,\n type Key,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface GridListRenderProps {\n /** Whether the grid list has focus. */\n isFocused: boolean;\n /** Whether the grid list has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the grid list is disabled. */\n isDisabled: boolean;\n /** Whether the grid list is empty. */\n isEmpty: boolean;\n}\n\nexport interface GridListProps<T extends object> extends Omit<AriaGridListProps, 'children'>, SlotProps {\n /** The items to render in the grid list. */\n items: T[];\n /** Function to get the key from an item. */\n getKey?: (item: T) => Key;\n /** Function to get the text value from an item. */\n getTextValue?: (item: T) => string;\n /** Function to check if an item is disabled. */\n getDisabled?: (item: T) => boolean;\n /** The selection mode. */\n selectionMode?: 'none' | 'single' | 'multiple';\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Currently selected keys (controlled). */\n selectedKeys?: 'all' | Iterable<Key>;\n /** Default selected keys (uncontrolled). */\n defaultSelectedKeys?: 'all' | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: 'all' | Set<Key>) => void;\n /** The children of the component. A function may be provided to render each item. */\n children: (item: T) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<GridListRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<GridListRenderProps>;\n /** A function to render when the grid list is empty. */\n renderEmptyState?: () => JSX.Element;\n}\n\nexport interface GridListItemRenderProps {\n /** Whether the item is selected. */\n isSelected: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n}\n\nexport interface GridListItemProps<T extends object> extends SlotProps {\n /** The unique key for the item. */\n id: Key;\n /** The item value. */\n item?: T;\n /** The children of the item. A function may be provided to receive render props. */\n children?: RenderChildren<GridListItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<GridListItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<GridListItemRenderProps>;\n /** The text value of the item (for accessibility). */\n textValue?: string;\n /** Handler called when the item is activated. */\n onAction?: () => void;\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface GridListContextValue<T extends object> {\n state: GridState<T, GridCollection<T>>;\n collection: GridCollection<T>;\n isDisabled: boolean;\n}\n\nexport const GridListContext = createContext<GridListContextValue<object> | null>(null);\nexport const GridListStateContext = createContext<GridState<object, GridCollection<object>> | null>(null);\n\n// ============================================\n// HELPER: Build GridCollection from items\n// ============================================\n\nfunction buildGridCollection<T extends object>(\n items: T[],\n getKey?: (item: T) => Key,\n getTextValue?: (item: T) => string,\n getDisabled?: (item: T) => boolean\n): GridCollection<T> {\n const nodes: GridNode<T>[] = items.map((item, index) => {\n const key = getKey?.(item) ?? index;\n return {\n type: 'item' as const,\n key,\n value: item,\n textValue: getTextValue?.(item) ?? String(key),\n level: 0,\n index,\n hasChildNodes: false,\n childNodes: [],\n isDisabled: getDisabled?.(item),\n };\n });\n\n const keyMap = new Map<Key, GridNode<T>>();\n nodes.forEach((node) => keyMap.set(node.key, node));\n\n return {\n rows: nodes,\n columns: [],\n headerRows: [],\n get rowCount() {\n return nodes.length;\n },\n get columnCount() {\n return 1;\n },\n get size() {\n return nodes.length;\n },\n getKeys() {\n return nodes.map((n) => n.key);\n },\n getItem(key: Key) {\n return keyMap.get(key) ?? null;\n },\n at(index: number) {\n return nodes[index] ?? null;\n },\n getKeyBefore(key: Key) {\n const node = keyMap.get(key);\n if (!node) return null;\n return node.index > 0 ? nodes[node.index - 1].key : null;\n },\n getKeyAfter(key: Key) {\n const node = keyMap.get(key);\n if (!node) return null;\n return node.index < nodes.length - 1 ? nodes[node.index + 1].key : null;\n },\n getFirstKey() {\n return nodes[0]?.key ?? null;\n },\n getLastKey() {\n return nodes[nodes.length - 1]?.key ?? null;\n },\n getChildren(_key: Key) {\n return [];\n },\n getTextValue(key: Key) {\n return keyMap.get(key)?.textValue ?? '';\n },\n getCell(_rowKey: Key, _columnKey: Key) {\n return null;\n },\n [Symbol.iterator]() {\n return nodes[Symbol.iterator]();\n },\n };\n}\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A grid list displays a list of interactive items, with support for\n * keyboard navigation, single or multiple selection, and row actions.\n */\nexport function GridList<T extends object>(props: GridListProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'renderEmptyState'],\n [\n 'items',\n 'getKey',\n 'getTextValue',\n 'getDisabled',\n 'disabledKeys',\n 'selectionMode',\n 'selectedKeys',\n 'defaultSelectedKeys',\n 'onSelectionChange',\n ]\n );\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLUListElement | null>(null);\n\n // Build collection\n const collection = createMemo(() =>\n buildGridCollection(\n stateProps.items,\n stateProps.getKey,\n stateProps.getTextValue,\n stateProps.getDisabled\n )\n );\n\n // Get disabled keys from items + explicit disabledKeys\n const allDisabledKeys = createMemo(() => {\n const keys = new Set<Key>();\n\n // Add explicitly disabled keys\n if (stateProps.disabledKeys) {\n for (const key of stateProps.disabledKeys) {\n keys.add(key);\n }\n }\n\n // Add keys from items marked as disabled\n for (const node of collection().rows) {\n if (node.isDisabled) {\n keys.add(node.key);\n }\n }\n\n return keys;\n });\n\n // Create grid state\n const state = createGridState<T, GridCollection<T>>(() => ({\n collection: collection(),\n disabledKeys: allDisabledKeys(),\n selectionMode: stateProps.selectionMode,\n selectedKeys: stateProps.selectedKeys,\n defaultSelectedKeys: stateProps.defaultSelectedKeys,\n onSelectionChange: stateProps.onSelectionChange,\n }));\n\n // Create grid list aria props\n const { gridProps } = createGridList<T, GridCollection<T>>(\n () => ({\n id: ariaProps.id,\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isVirtualized: ariaProps.isVirtualized,\n onAction: ariaProps.onAction,\n isDisabled: ariaProps.isDisabled,\n }),\n () => state,\n ref\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<GridListRenderProps>(() => ({\n isFocused: state.isFocused || isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\n isEmpty: stateProps.items.length === 0,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-GridList',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from spread props\n const cleanGridProps = () => {\n const { ref: _ref1, ...rest } = gridProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n const isEmpty = () => stateProps.items.length === 0;\n\n const contextValue = createMemo<GridListContextValue<T>>(() => ({\n state,\n collection: collection(),\n isDisabled: ariaProps.isDisabled ?? false,\n }));\n\n return (\n <GridListContext.Provider value={contextValue() as GridListContextValue<object>}>\n <GridListStateContext.Provider value={state as unknown as GridState<object, GridCollection<object>>}>\n <ul\n ref={setRef}\n {...domProps()}\n {...cleanGridProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n data-empty={isEmpty() || undefined}\n >\n {isEmpty() && local.renderEmptyState ? (\n local.renderEmptyState()\n ) : (\n <For each={stateProps.items}>{(item) => props.children(item)}</For>\n )}\n </ul>\n </GridListStateContext.Provider>\n </GridListContext.Provider>\n );\n}\n\n/**\n * An item in a grid list.\n */\nexport function GridListItem<T extends object>(props: GridListItemProps<T>): JSX.Element {\n const [local] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n 'onAction',\n ]);\n\n // Get state from context\n const context = useContext(GridListStateContext);\n if (!context) {\n throw new Error('GridListItem must be used within a GridList');\n }\n const state = context as GridState<T, GridCollection<T>>;\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLLIElement | null>(null);\n\n // Find or create the item node\n const itemNode = createMemo(() => {\n const node = state.collection.getItem(local.id);\n if (!node) {\n // Create a simple node for the item\n return {\n type: 'item' as const,\n key: local.id,\n value: local.item ?? null,\n textValue: local.textValue ?? String(local.id),\n level: 0,\n index: 0,\n hasChildNodes: false,\n childNodes: [],\n } as GridNode<T>;\n }\n return node as GridNode<T>;\n });\n\n // Create item aria props\n const { rowProps, gridCellProps, isSelected, isDisabled, isPressed } = createGridListItem<T, GridCollection<T>>(\n () => ({\n node: itemNode(),\n onAction: local.onAction,\n }),\n () => state,\n ref\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled;\n },\n });\n\n // Create focus ring\n const { isFocusVisible, focusProps } = createFocusRing();\n\n // Check if focused\n const isFocused = createMemo(() => state.focusedKey === local.id);\n\n // Render props values\n const renderValues = createMemo<GridListItemRenderProps>(() => ({\n isSelected,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible() && isFocused(),\n isPressed,\n isHovered: isHovered(),\n isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-GridList-item',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanRowProps = () => {\n const { ref: _ref1, ...rest } = rowProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <li\n ref={setRef}\n {...cleanRowProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={isSelected || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={(isFocusVisible() && isFocused()) || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled || undefined}\n >\n <div {...gridCellProps}>{renderProps.renderChildren()}</div>\n </li>\n );\n}\n\n/**\n * A checkbox for item selection in a grid list.\n */\nexport function GridListSelectionCheckbox(props: { itemKey: Key }): JSX.Element {\n const context = useContext(GridListStateContext);\n if (!context) {\n throw new Error('GridListSelectionCheckbox must be used within a GridList');\n }\n\n const state = context as GridState<object, GridCollection<object>>;\n\n const { checkboxProps } = createGridListSelectionCheckbox<object, GridCollection<object>>(\n () => ({ key: props.itemKey }),\n () => state\n );\n\n return <input {...checkboxProps} />;\n}\n\n// Attach Item and SelectionCheckbox as static properties\nGridList.Item = GridListItem;\nGridList.SelectionCheckbox = GridListSelectionCheckbox;\n", "/**\n * Tree component for solidaria-components\n *\n * A pre-wired headless tree that combines state + aria hooks.\n * Based on react-aria-components/src/Tree.tsx\n *\n * Tree displays hierarchical data with expandable/collapsible nodes,\n * supporting keyboard navigation and selection.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Show,\n} from 'solid-js';\nimport {\n createTree,\n createTreeItem,\n createTreeSelectionCheckbox,\n createFocusRing,\n createHover,\n type AriaTreeProps,\n} from '@proyecto-viviana/solidaria';\nimport {\n createTreeState,\n createTreeCollection,\n type TreeState,\n type TreeCollection,\n type TreeNode,\n type TreeItemData,\n type Key,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface TreeRenderProps {\n /** Whether the tree has focus. */\n isFocused: boolean;\n /** Whether the tree has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the tree is disabled. */\n isDisabled: boolean;\n /** Whether the tree is empty. */\n isEmpty: boolean;\n}\n\nexport interface TreeProps<T extends object> extends Omit<AriaTreeProps, 'children'>, SlotProps {\n /** The hierarchical items to render in the tree. */\n items: TreeItemData<T>[];\n /** The selection mode. */\n selectionMode?: 'none' | 'single' | 'multiple';\n /** Keys of disabled items. */\n disabledKeys?: Iterable<Key>;\n /** Currently selected keys (controlled). */\n selectedKeys?: 'all' | Iterable<Key>;\n /** Default selected keys (uncontrolled). */\n defaultSelectedKeys?: 'all' | Iterable<Key>;\n /** Handler called when selection changes. */\n onSelectionChange?: (keys: 'all' | Set<Key>) => void;\n /** Currently expanded keys (controlled). */\n expandedKeys?: Iterable<Key>;\n /** Default expanded keys (uncontrolled). */\n defaultExpandedKeys?: Iterable<Key>;\n /** Handler called when expansion changes. */\n onExpandedChange?: (keys: Set<Key>) => void;\n /** The children of the component. A function provided to render each item. */\n children: (item: TreeItemData<T>, state: TreeRenderItemState) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TreeRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TreeRenderProps>;\n /** A function to render when the tree is empty. */\n renderEmptyState?: () => JSX.Element;\n}\n\nexport interface TreeRenderItemState {\n /** Whether the item is expanded. */\n isExpanded: boolean;\n /** Whether the item is expandable (has children). */\n isExpandable: boolean;\n /** The nesting level (0 = root). */\n level: number;\n}\n\nexport interface TreeItemRenderProps {\n /** Whether the item is selected. */\n isSelected: boolean;\n /** Whether the item is focused. */\n isFocused: boolean;\n /** Whether the item has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the item is pressed. */\n isPressed: boolean;\n /** Whether the item is hovered. */\n isHovered: boolean;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n /** Whether the item is expanded. */\n isExpanded: boolean;\n /** Whether the item is expandable (has children). */\n isExpandable: boolean;\n /** The nesting level (0 = root). */\n level: number;\n}\n\nexport interface TreeItemProps<T extends object> extends SlotProps {\n /** The unique key for the item. */\n id: Key;\n /** The item value. */\n item?: TreeItemData<T>;\n /** The children of the item. A function may be provided to receive render props. */\n children?: RenderChildren<TreeItemRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<TreeItemRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<TreeItemRenderProps>;\n /** The text value of the item (for accessibility). */\n textValue?: string;\n /** Handler called when the item is activated. */\n onAction?: () => void;\n}\n\nexport interface TreeExpandButtonProps {\n /** CSS class name for the button. */\n class?: string;\n /** CSS style for the button. */\n style?: JSX.CSSProperties;\n /** Children to render inside the button. */\n children?: JSX.Element | ((props: { isExpanded: boolean }) => JSX.Element);\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\ninterface TreeContextValue<T extends object> {\n state: TreeState<T, TreeCollection<T>>;\n collection: TreeCollection<T>;\n isDisabled: boolean;\n renderItem: (item: TreeItemData<T>, state: TreeRenderItemState) => JSX.Element;\n}\n\ninterface TreeItemContextValue<T extends object> {\n node: TreeNode<T>;\n isExpanded: boolean;\n isExpandable: boolean;\n level: number;\n}\n\nexport const TreeContext = createContext<TreeContextValue<object> | null>(null);\nexport const TreeStateContext = createContext<TreeState<object, TreeCollection<object>> | null>(null);\nexport const TreeItemContext = createContext<TreeItemContextValue<object> | null>(null);\n\n// ============================================\n// COMPONENTS\n// ============================================\n\n/**\n * A tree displays hierarchical data with expandable/collapsible nodes,\n * supporting keyboard navigation and selection.\n */\nexport function Tree<T extends object>(props: TreeProps<T>): JSX.Element {\n const [local, stateProps, ariaProps] = splitProps(\n props,\n ['class', 'style', 'slot', 'renderEmptyState'],\n [\n 'items',\n 'disabledKeys',\n 'selectionMode',\n 'selectedKeys',\n 'defaultSelectedKeys',\n 'onSelectionChange',\n 'expandedKeys',\n 'defaultExpandedKeys',\n 'onExpandedChange',\n ]\n );\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLDivElement | null>(null);\n\n // Create tree state\n const state = createTreeState<T, TreeCollection<T>>(() => ({\n collectionFactory: (expandedKeys) =>\n createTreeCollection(stateProps.items, expandedKeys) as TreeCollection<T>,\n disabledKeys: stateProps.disabledKeys,\n selectionMode: stateProps.selectionMode,\n selectedKeys: stateProps.selectedKeys,\n defaultSelectedKeys: stateProps.defaultSelectedKeys,\n onSelectionChange: stateProps.onSelectionChange,\n expandedKeys: stateProps.expandedKeys,\n defaultExpandedKeys: stateProps.defaultExpandedKeys,\n onExpandedChange: stateProps.onExpandedChange,\n }));\n\n // Create tree aria props\n const { treeProps } = createTree<T, TreeCollection<T>>(\n () => ({\n id: ariaProps.id,\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isVirtualized: ariaProps.isVirtualized,\n onAction: ariaProps.onAction,\n isDisabled: ariaProps.isDisabled,\n }),\n () => state,\n ref\n );\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Render props values\n const renderValues = createMemo<TreeRenderProps>(() => ({\n isFocused: state.isFocused || isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\n isEmpty: stateProps.items.length === 0,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Tree',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => {\n const filtered = filterDOMProps(ariaProps as Record<string, unknown>, { global: true });\n return filtered;\n });\n\n // Remove ref from spread props\n const cleanTreeProps = () => {\n const { ref: _ref1, ...rest } = treeProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref2, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n const isEmpty = () => stateProps.items.length === 0;\n\n const contextValue = createMemo<TreeContextValue<T>>(() => ({\n state,\n collection: state.collection,\n isDisabled: ariaProps.isDisabled ?? false,\n renderItem: props.children,\n }));\n\n // Render visible rows (flat list based on expansion state)\n const visibleRows = createMemo(() => state.collection.rows);\n\n return (\n <TreeContext.Provider value={contextValue() as unknown as TreeContextValue<object>}>\n <TreeStateContext.Provider value={state as unknown as TreeState<object, TreeCollection<object>>}>\n <div\n ref={setRef}\n {...domProps()}\n {...cleanTreeProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-focused={state.isFocused || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n data-empty={isEmpty() || undefined}\n >\n {isEmpty() && local.renderEmptyState ? (\n local.renderEmptyState()\n ) : (\n <For each={visibleRows()}>\n {(node) => {\n // Find the original item data to pass to render function\n const itemData: TreeItemData<T> = {\n key: node.key,\n value: node.value as T,\n textValue: node.textValue,\n children: node.hasChildNodes\n ? node.childNodes.map((child) => ({\n key: child.key,\n value: child.value as T,\n textValue: child.textValue,\n }))\n : undefined,\n };\n const itemState: TreeRenderItemState = {\n isExpanded: node.isExpanded ?? false,\n isExpandable: node.isExpandable ?? false,\n level: node.level,\n };\n return props.children(itemData, itemState);\n }}\n </For>\n )}\n </div>\n </TreeStateContext.Provider>\n </TreeContext.Provider>\n );\n}\n\n/**\n * An item in a tree.\n */\nexport function TreeItem<T extends object>(props: TreeItemProps<T>): JSX.Element {\n const [local] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'id',\n 'item',\n 'textValue',\n 'onAction',\n ]);\n\n // Get state from context\n const context = useContext(TreeStateContext);\n if (!context) {\n throw new Error('TreeItem must be used within a Tree');\n }\n const state = context as TreeState<T, TreeCollection<T>>;\n\n // Create ref signal\n const [ref, setRef] = createSignal<HTMLDivElement | null>(null);\n\n // Find the item node\n const itemNode = createMemo(() => {\n const node = state.collection.getItem(local.id);\n if (!node) {\n // Create a simple node for the item\n return {\n type: 'item' as const,\n key: local.id,\n value: local.item?.value ?? null,\n textValue: local.textValue ?? String(local.id),\n level: 0,\n index: 0,\n hasChildNodes: false,\n childNodes: [],\n isExpandable: false,\n isExpanded: false,\n } as TreeNode<T>;\n }\n return node;\n });\n\n // Create item aria props\n const {\n rowProps,\n gridCellProps,\n expandButtonProps: _expandButtonProps,\n isSelected,\n isDisabled,\n isPressed,\n isExpanded,\n isExpandable,\n level,\n } = createTreeItem<T, TreeCollection<T>>(\n () => ({\n node: itemNode(),\n onAction: local.onAction,\n }),\n () => state,\n ref\n );\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return isDisabled;\n },\n });\n\n // Create focus ring\n const { isFocusVisible, focusProps } = createFocusRing();\n\n // Check if focused\n const isFocused = createMemo(() => state.focusedKey === local.id);\n\n // Render props values\n const renderValues = createMemo<TreeItemRenderProps>(() => ({\n isSelected,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible() && isFocused(),\n isPressed,\n isHovered: isHovered(),\n isDisabled,\n isExpanded,\n isExpandable,\n level,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-Tree-item',\n },\n renderValues\n );\n\n // Remove ref from spread props\n const cleanRowProps = () => {\n const { ref: _ref1, ...rest } = rowProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n\n // Item context for nested components\n const itemContextValue = createMemo<TreeItemContextValue<T>>(() => ({\n node: itemNode(),\n isExpanded,\n isExpandable,\n level,\n }));\n\n return (\n <TreeItemContext.Provider value={itemContextValue() as TreeItemContextValue<object>}>\n <div\n ref={setRef}\n {...cleanRowProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={isSelected || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={(isFocusVisible() && isFocused()) || undefined}\n data-pressed={isPressed || undefined}\n data-hovered={isHovered() || undefined}\n data-disabled={isDisabled || undefined}\n data-expanded={isExpanded || undefined}\n data-expandable={isExpandable || undefined}\n data-level={level}\n >\n <div {...gridCellProps} class=\"solidaria-Tree-item-content\">\n {renderProps.renderChildren()}\n </div>\n </div>\n </TreeItemContext.Provider>\n );\n}\n\n/**\n * A button to expand/collapse a tree item.\n */\nexport function TreeExpandButton(props: TreeExpandButtonProps): JSX.Element {\n // Get item context\n const itemContext = useContext(TreeItemContext);\n if (!itemContext) {\n throw new Error('TreeExpandButton must be used within a Tree');\n }\n\n // Get state context\n const stateContext = useContext(TreeStateContext);\n if (!stateContext) {\n throw new Error('TreeExpandButton must be used within a Tree');\n }\n\n const state = stateContext as TreeState<object, TreeCollection<object>>;\n\n // Create expand button props\n const { expandButtonProps } = createTreeItem(\n () => ({ node: itemContext.node }),\n () => state,\n () => null\n );\n\n // Remove ref and add custom handling\n const cleanExpandProps = () => {\n const { ref: _ref, ...rest } = expandButtonProps as Record<string, unknown>;\n return rest;\n };\n\n const isExpanded = createMemo(() => state.isExpanded(itemContext.node.key));\n\n // Render children\n const renderChildren = () => {\n if (typeof props.children === 'function') {\n return props.children({ isExpanded: isExpanded() });\n }\n return props.children;\n };\n\n return (\n <Show when={itemContext.isExpandable}>\n <button\n {...cleanExpandProps()}\n class={props.class ?? 'solidaria-Tree-expand-button'}\n style={props.style}\n data-expanded={isExpanded() || undefined}\n >\n {renderChildren()}\n </button>\n </Show>\n );\n}\n\n/**\n * A checkbox for item selection in a tree.\n */\nexport function TreeSelectionCheckbox(props: { itemKey: Key }): JSX.Element {\n const context = useContext(TreeStateContext);\n if (!context) {\n throw new Error('TreeSelectionCheckbox must be used within a Tree');\n }\n\n const state = context as TreeState<object, TreeCollection<object>>;\n\n const { checkboxProps } = createTreeSelectionCheckbox<object, TreeCollection<object>>(\n () => ({ key: props.itemKey }),\n () => state\n );\n\n return <input {...checkboxProps} class=\"solidaria-Tree-checkbox\" />;\n}\n\n// Attach static properties\nTree.Item = TreeItem;\nTree.ExpandButton = TreeExpandButton;\nTree.SelectionCheckbox = TreeSelectionCheckbox;\n", "/**\n * Color components for solidaria-components\n *\n * Pre-wired headless color picker components that combine state + aria hooks.\n * Port of react-aria-components color components.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n splitProps,\n useContext,\n Show,\n} from 'solid-js';\nimport {\n createColorSlider,\n createColorArea,\n createColorWheel,\n createColorField,\n createColorSwatch,\n createFocusRing,\n createHover,\n type AriaColorSliderOptions,\n type AriaColorAreaOptions,\n type AriaColorWheelOptions,\n type AriaColorFieldOptions,\n} from '@proyecto-viviana/solidaria';\nimport {\n createColorSliderState,\n createColorAreaState,\n createColorWheelState,\n createColorFieldState,\n normalizeColor,\n type Color,\n type ColorChannel,\n type ColorFormat,\n type ColorSliderState,\n type ColorAreaState,\n type ColorWheelState,\n type ColorFieldState,\n} from '@proyecto-viviana/solid-stately';\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// COLOR SLIDER\n// ============================================\n\nexport interface ColorSliderRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the slider is being dragged. */\n isDragging: boolean;\n /** The color channel being controlled. */\n channel: ColorChannel;\n /** The current value. */\n value: number;\n /** The current color. */\n color: Color;\n}\n\nexport interface ColorSliderProps extends Omit<AriaColorSliderOptions, 'channel'>, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color) => void;\n /** Handler called when dragging ends. */\n onChangeEnd?: (color: Color) => void;\n /** The color channel to control. */\n channel: ColorChannel;\n /** A visible label for the slider. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<ColorSliderRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSliderRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSliderRenderProps>;\n}\n\nexport interface ColorSliderTrackRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the slider is being dragged. */\n isDragging: boolean;\n}\n\nexport interface ColorSliderTrackProps extends SlotProps {\n /** The children of the track. */\n children?: RenderChildren<ColorSliderTrackRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSliderTrackRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSliderTrackRenderProps>;\n}\n\nexport interface ColorSliderThumbRenderProps {\n /** Whether the slider is disabled. */\n isDisabled: boolean;\n /** Whether the thumb is being dragged. */\n isDragging: boolean;\n /** Whether the thumb is focused. */\n isFocused: boolean;\n /** Whether the thumb has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the thumb is hovered. */\n isHovered: boolean;\n}\n\nexport interface ColorSliderThumbProps extends SlotProps {\n /** The children of the thumb. */\n children?: RenderChildren<ColorSliderThumbRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSliderThumbRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSliderThumbRenderProps>;\n}\n\n// Context\ninterface ColorSliderContextValue {\n state: ColorSliderState;\n trackProps: JSX.HTMLAttributes<HTMLDivElement>;\n thumbProps: JSX.HTMLAttributes<HTMLDivElement>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n trackRef: HTMLDivElement | undefined;\n setTrackRef: (el: HTMLDivElement) => void;\n}\n\nexport const ColorSliderContext = createContext<ColorSliderContextValue | null>(null);\n\n/**\n * A color slider allows users to adjust a single color channel.\n */\nexport function ColorSlider(props: ColorSliderProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'label'],\n ['value', 'defaultValue', 'onChange', 'onChangeEnd', 'channel'],\n ['aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled', 'channelName']\n );\n\n // Create color slider state\n const state = createColorSliderState(() => ({\n value: stateProps.value,\n defaultValue: stateProps.defaultValue,\n onChange: stateProps.onChange,\n onChangeEnd: stateProps.onChangeEnd,\n channel: stateProps.channel,\n isDisabled: ariaProps.isDisabled,\n }));\n\n // Track ref\n let trackRef: HTMLDivElement | undefined;\n const setTrackRef = (el: HTMLDivElement) => {\n trackRef = el;\n };\n\n // Create color slider aria props\n const {\n trackProps,\n thumbProps,\n inputProps,\n labelProps,\n } = createColorSlider(\n () => ({\n channel: stateProps.channel,\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isDisabled: ariaProps.isDisabled,\n channelName: ariaProps.channelName,\n }),\n () => state,\n () => trackRef ?? null\n );\n\n // Render props values\n const renderValues = createMemo<ColorSliderRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n channel: state.channel,\n value: state.getThumbValue(),\n color: state.value,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorSlider',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <ColorSliderContext.Provider\n value={{\n state,\n trackProps,\n thumbProps,\n inputProps,\n trackRef,\n setTrackRef,\n }}\n >\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-channel={state.channel}\n >\n {/* Label */}\n <Show when={local.label}>\n <label {...labelProps}>{local.label}</label>\n </Show>\n\n {renderProps.renderChildren()}\n\n {/* Hidden input for accessibility */}\n <input {...inputProps} />\n </div>\n </ColorSliderContext.Provider>\n );\n}\n\n/**\n * The track element of a color slider.\n */\nexport function ColorSliderTrack(props: ColorSliderTrackProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorSliderContext);\n if (!context) {\n throw new Error('ColorSliderTrack must be used within a ColorSlider');\n }\n\n const { state, trackProps, setTrackRef } = context;\n\n // Render props values\n const renderValues = createMemo<ColorSliderTrackRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorSlider-track',\n },\n renderValues\n );\n\n // Clean props\n const cleanTrackProps = () => {\n const { ref: _ref, style: _trackStyle, ...rest } = trackProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const trackStyle = (trackProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...trackStyle, ...renderStyle };\n };\n\n return (\n <div\n ref={setTrackRef}\n {...cleanTrackProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The thumb element of a color slider.\n */\nexport function ColorSliderThumb(props: ColorSliderThumbProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorSliderContext);\n if (!context) {\n throw new Error('ColorSliderThumb must be used within a ColorSlider');\n }\n\n const { state, thumbProps } = context;\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ColorSliderThumbRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorSlider-thumb',\n },\n renderValues\n );\n\n // Clean props\n const cleanThumbProps = () => {\n const { ref: _ref, style: _thumbStyle, ...rest } = thumbProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const thumbStyle = (thumbProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...thumbStyle, ...renderStyle };\n };\n\n return (\n <div\n {...cleanThumbProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n// Attach sub-components\nColorSlider.Track = ColorSliderTrack;\nColorSlider.Thumb = ColorSliderThumb;\n\n// ============================================\n// COLOR AREA\n// ============================================\n\nexport interface ColorAreaRenderProps {\n /** Whether the area is disabled. */\n isDisabled: boolean;\n /** Whether the area is being dragged. */\n isDragging: boolean;\n /** The X channel. */\n xChannel: ColorChannel;\n /** The Y channel. */\n yChannel: ColorChannel;\n /** The current color. */\n color: Color;\n}\n\nexport interface ColorAreaProps extends AriaColorAreaOptions, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color) => void;\n /** Handler called when dragging ends. */\n onChangeEnd?: (color: Color) => void;\n /** The X channel to control. */\n xChannel?: ColorChannel;\n /** The Y channel to control. */\n yChannel?: ColorChannel;\n /** The children of the component. */\n children?: RenderChildren<ColorAreaRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorAreaRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorAreaRenderProps>;\n}\n\nexport interface ColorAreaGradientRenderProps {\n /** Whether the area is disabled. */\n isDisabled: boolean;\n}\n\nexport interface ColorAreaGradientProps extends SlotProps {\n /** The children of the gradient. */\n children?: RenderChildren<ColorAreaGradientRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorAreaGradientRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorAreaGradientRenderProps>;\n}\n\nexport interface ColorAreaThumbRenderProps {\n /** Whether the area is disabled. */\n isDisabled: boolean;\n /** Whether the thumb is being dragged. */\n isDragging: boolean;\n /** Whether the thumb is focused. */\n isFocused: boolean;\n /** Whether the thumb has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the thumb is hovered. */\n isHovered: boolean;\n}\n\nexport interface ColorAreaThumbProps extends SlotProps {\n /** The children of the thumb. */\n children?: RenderChildren<ColorAreaThumbRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorAreaThumbRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorAreaThumbRenderProps>;\n}\n\n// Context\ninterface ColorAreaContextValue {\n state: ColorAreaState;\n colorAreaProps: JSX.HTMLAttributes<HTMLDivElement>;\n gradientProps: JSX.HTMLAttributes<HTMLDivElement>;\n thumbProps: JSX.HTMLAttributes<HTMLDivElement>;\n xInputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n yInputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n areaRef: HTMLDivElement | undefined;\n setAreaRef: (el: HTMLDivElement) => void;\n}\n\nexport const ColorAreaContext = createContext<ColorAreaContextValue | null>(null);\n\n/**\n * A color area allows users to select a color using a 2D gradient.\n */\nexport function ColorArea(props: ColorAreaProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n ['value', 'defaultValue', 'onChange', 'onChangeEnd', 'xChannel', 'yChannel'],\n ['aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled']\n );\n\n // Create color area state\n const state = createColorAreaState(() => ({\n value: stateProps.value,\n defaultValue: stateProps.defaultValue,\n onChange: stateProps.onChange,\n onChangeEnd: stateProps.onChangeEnd,\n xChannel: stateProps.xChannel,\n yChannel: stateProps.yChannel,\n isDisabled: ariaProps.isDisabled,\n }));\n\n // Area ref\n let areaRef: HTMLDivElement | undefined;\n const setAreaRef = (el: HTMLDivElement) => {\n areaRef = el;\n };\n\n // Create color area aria props\n const {\n colorAreaProps,\n gradientProps,\n thumbProps,\n xInputProps,\n yInputProps,\n } = createColorArea(\n () => ({\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isDisabled: ariaProps.isDisabled,\n }),\n () => state,\n () => areaRef ?? null\n );\n\n // Render props values\n const renderValues = createMemo<ColorAreaRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n xChannel: state.xChannel,\n yChannel: state.yChannel,\n color: state.value,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorArea',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Clean props\n const cleanColorAreaProps = () => {\n const { ref: _ref, style: _areaStyle, ...rest } = colorAreaProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const areaStyle = (colorAreaProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...areaStyle, ...renderStyle };\n };\n\n return (\n <ColorAreaContext.Provider\n value={{\n state,\n colorAreaProps,\n gradientProps,\n thumbProps,\n xInputProps,\n yInputProps,\n areaRef,\n setAreaRef,\n }}\n >\n <div\n ref={setAreaRef}\n {...domProps()}\n {...cleanColorAreaProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n >\n {renderProps.renderChildren()}\n\n {/* Hidden inputs for accessibility */}\n <input {...xInputProps} />\n <input {...yInputProps} />\n </div>\n </ColorAreaContext.Provider>\n );\n}\n\n/**\n * The gradient background of a color area.\n */\nexport function ColorAreaGradient(props: ColorAreaGradientProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorAreaContext);\n if (!context) {\n throw new Error('ColorAreaGradient must be used within a ColorArea');\n }\n\n const { state, gradientProps } = context;\n\n // Render props values\n const renderValues = createMemo<ColorAreaGradientRenderProps>(() => ({\n isDisabled: state.isDisabled,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorArea-gradient',\n },\n renderValues\n );\n\n // Clean props\n const cleanGradientProps = () => {\n const { ref: _ref, style: _gradStyle, ...rest } = gradientProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const gradStyle = (gradientProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...gradStyle, ...renderStyle };\n };\n\n return (\n <div\n {...cleanGradientProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The thumb element of a color area.\n */\nexport function ColorAreaThumb(props: ColorAreaThumbProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorAreaContext);\n if (!context) {\n throw new Error('ColorAreaThumb must be used within a ColorArea');\n }\n\n const { state, thumbProps } = context;\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ColorAreaThumbRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorArea-thumb',\n },\n renderValues\n );\n\n // Clean props\n const cleanThumbProps = () => {\n const { ref: _ref, style: _thumbStyle, ...rest } = thumbProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const thumbStyle = (thumbProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...thumbStyle, ...renderStyle };\n };\n\n return (\n <div\n {...cleanThumbProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n// Attach sub-components\nColorArea.Gradient = ColorAreaGradient;\nColorArea.Thumb = ColorAreaThumb;\n\n// ============================================\n// COLOR WHEEL\n// ============================================\n\nexport interface ColorWheelRenderProps {\n /** Whether the wheel is disabled. */\n isDisabled: boolean;\n /** Whether the wheel is being dragged. */\n isDragging: boolean;\n /** The current hue value (0-360). */\n hue: number;\n /** The current color. */\n color: Color;\n}\n\nexport interface ColorWheelProps extends AriaColorWheelOptions, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color) => void;\n /** Handler called when dragging ends. */\n onChangeEnd?: (color: Color) => void;\n /** The children of the component. */\n children?: RenderChildren<ColorWheelRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorWheelRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorWheelRenderProps>;\n}\n\nexport interface ColorWheelTrackRenderProps {\n /** Whether the wheel is disabled. */\n isDisabled: boolean;\n /** Whether the wheel is being dragged. */\n isDragging: boolean;\n}\n\nexport interface ColorWheelTrackProps extends SlotProps {\n /** The children of the track. */\n children?: RenderChildren<ColorWheelTrackRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorWheelTrackRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorWheelTrackRenderProps>;\n}\n\nexport interface ColorWheelThumbRenderProps {\n /** Whether the wheel is disabled. */\n isDisabled: boolean;\n /** Whether the thumb is being dragged. */\n isDragging: boolean;\n /** Whether the thumb is focused. */\n isFocused: boolean;\n /** Whether the thumb has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the thumb is hovered. */\n isHovered: boolean;\n}\n\nexport interface ColorWheelThumbProps extends SlotProps {\n /** The children of the thumb. */\n children?: RenderChildren<ColorWheelThumbRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorWheelThumbRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorWheelThumbRenderProps>;\n}\n\n// Context\ninterface ColorWheelContextValue {\n state: ColorWheelState;\n trackProps: JSX.HTMLAttributes<HTMLDivElement>;\n thumbProps: JSX.HTMLAttributes<HTMLDivElement>;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n wheelRef: HTMLDivElement | undefined;\n setWheelRef: (el: HTMLDivElement) => void;\n}\n\nexport const ColorWheelContext = createContext<ColorWheelContextValue | null>(null);\n\n/**\n * A color wheel allows users to select a hue using a circular control.\n */\nexport function ColorWheel(props: ColorWheelProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot'],\n ['value', 'defaultValue', 'onChange', 'onChangeEnd'],\n ['aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled']\n );\n\n // Create color wheel state\n const state = createColorWheelState(() => ({\n value: stateProps.value,\n defaultValue: stateProps.defaultValue,\n onChange: stateProps.onChange,\n onChangeEnd: stateProps.onChangeEnd,\n isDisabled: ariaProps.isDisabled,\n }));\n\n // Wheel ref\n let wheelRef: HTMLDivElement | undefined;\n const setWheelRef = (el: HTMLDivElement) => {\n wheelRef = el;\n };\n\n // Create color wheel aria props\n const {\n trackProps,\n thumbProps,\n inputProps,\n } = createColorWheel(\n () => ({\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isDisabled: ariaProps.isDisabled,\n }),\n () => state,\n () => wheelRef ?? null\n );\n\n // Render props values\n const renderValues = createMemo<ColorWheelRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n hue: state.getHue(),\n color: state.value,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorWheel',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <ColorWheelContext.Provider\n value={{\n state,\n trackProps,\n thumbProps,\n inputProps,\n wheelRef,\n setWheelRef,\n }}\n >\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n >\n {renderProps.renderChildren()}\n\n {/* Hidden input for accessibility */}\n <input {...inputProps} />\n </div>\n </ColorWheelContext.Provider>\n );\n}\n\n/**\n * The track element of a color wheel.\n */\nexport function ColorWheelTrack(props: ColorWheelTrackProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorWheelContext);\n if (!context) {\n throw new Error('ColorWheelTrack must be used within a ColorWheel');\n }\n\n const { state, trackProps, setWheelRef } = context;\n\n // Render props values\n const renderValues = createMemo<ColorWheelTrackRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorWheel-track',\n },\n renderValues\n );\n\n // Clean props\n const cleanTrackProps = () => {\n const { ref: _ref, style: _trackStyle, ...rest } = trackProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const trackStyle = (trackProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...trackStyle, ...renderStyle };\n };\n\n return (\n <div\n ref={setWheelRef}\n {...cleanTrackProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n/**\n * The thumb element of a color wheel.\n */\nexport function ColorWheelThumb(props: ColorWheelThumbProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorWheelContext);\n if (!context) {\n throw new Error('ColorWheelThumb must be used within a ColorWheel');\n }\n\n const { state, thumbProps } = context;\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ColorWheelThumbRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isDragging: state.isDragging,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorWheel-thumb',\n },\n renderValues\n );\n\n // Clean props\n const cleanThumbProps = () => {\n const { ref: _ref, style: _thumbStyle, ...rest } = thumbProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const thumbStyle = (thumbProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...thumbStyle, ...renderStyle };\n };\n\n return (\n <div\n {...cleanThumbProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n data-disabled={state.isDisabled || undefined}\n data-dragging={state.isDragging || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n\n// Attach sub-components\nColorWheel.Track = ColorWheelTrack;\nColorWheel.Thumb = ColorWheelThumb;\n\n// ============================================\n// COLOR FIELD\n// ============================================\n\nexport interface ColorFieldRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the input value is invalid. */\n isInvalid: boolean;\n /** The current color value (null if invalid). */\n color: Color | null;\n /** The color channel being edited (if single channel mode). */\n channel: ColorChannel | undefined;\n}\n\nexport interface ColorFieldProps extends AriaColorFieldOptions, SlotProps {\n /** The current color value (controlled). */\n value?: Color | string | null;\n /** The default color value (uncontrolled). */\n defaultValue?: Color | string;\n /** Handler called when the color changes. */\n onChange?: (color: Color | null) => void;\n /** The color channel to edit (for single channel mode). */\n channel?: ColorChannel;\n /** The color format for parsing/displaying. */\n colorFormat?: ColorFormat;\n /** A visible label for the field. */\n label?: JSX.Element;\n /** The children of the component. */\n children?: RenderChildren<ColorFieldRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorFieldRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorFieldRenderProps>;\n}\n\nexport interface ColorFieldInputRenderProps {\n /** Whether the field is disabled. */\n isDisabled: boolean;\n /** Whether the field is read-only. */\n isReadOnly: boolean;\n /** Whether the input value is invalid. */\n isInvalid: boolean;\n /** Whether the input is focused. */\n isFocused: boolean;\n /** Whether the input has keyboard focus. */\n isFocusVisible: boolean;\n /** Whether the input is hovered. */\n isHovered: boolean;\n}\n\nexport interface ColorFieldInputProps extends SlotProps {\n /** The children of the input (usually not used). */\n children?: RenderChildren<ColorFieldInputRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorFieldInputRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorFieldInputRenderProps>;\n}\n\n// Context\ninterface ColorFieldContextValue {\n state: ColorFieldState;\n inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;\n labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;\n}\n\nexport const ColorFieldContext = createContext<ColorFieldContextValue | null>(null);\n\n/**\n * A color field allows users to enter a color value as text.\n */\nexport function ColorField(props: ColorFieldProps): JSX.Element {\n const [local, stateProps, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'label'],\n ['value', 'defaultValue', 'onChange', 'channel', 'colorFormat'],\n ['aria-label', 'aria-labelledby', 'aria-describedby', 'isDisabled', 'isReadOnly']\n );\n\n // Create color field state\n const state = createColorFieldState(() => ({\n value: stateProps.value,\n defaultValue: stateProps.defaultValue,\n onChange: stateProps.onChange,\n channel: stateProps.channel,\n colorFormat: stateProps.colorFormat,\n isDisabled: ariaProps.isDisabled,\n isReadOnly: ariaProps.isReadOnly,\n }));\n\n // Input ref\n let inputRef: HTMLInputElement | undefined;\n\n // Create color field aria props\n const {\n inputProps,\n labelProps,\n } = createColorField(\n () => ({\n 'aria-label': ariaProps['aria-label'],\n 'aria-labelledby': ariaProps['aria-labelledby'],\n 'aria-describedby': ariaProps['aria-describedby'],\n isDisabled: ariaProps.isDisabled,\n isReadOnly: ariaProps.isReadOnly,\n channel: stateProps.channel,\n }),\n () => state,\n () => inputRef ?? null\n );\n\n // Render props values\n const renderValues = createMemo<ColorFieldRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n color: state.value,\n channel: state.channel,\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorField',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n return (\n <ColorFieldContext.Provider\n value={{\n state,\n inputProps,\n labelProps,\n }}\n >\n <div\n {...domProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n >\n {/* Label */}\n <Show when={local.label}>\n <label {...labelProps}>{local.label}</label>\n </Show>\n\n {renderProps.renderChildren()}\n </div>\n </ColorFieldContext.Provider>\n );\n}\n\n/**\n * The input element of a color field.\n */\nexport function ColorFieldInput(props: ColorFieldInputProps): JSX.Element {\n const [local] = splitProps(props, ['class', 'style', 'slot']);\n\n const context = useContext(ColorFieldContext);\n if (!context) {\n throw new Error('ColorFieldInput must be used within a ColorField');\n }\n\n const { state, inputProps } = context;\n\n // Create focus ring\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n // Create hover\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return state.isDisabled;\n },\n });\n\n // Render props values\n const renderValues = createMemo<ColorFieldInputRenderProps>(() => ({\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isHovered: isHovered(),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorField-input',\n },\n renderValues\n );\n\n // Clean props\n const cleanInputProps = () => {\n const { ref: _ref, style: _inputStyle, ...rest } = inputProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n\n return (\n <input\n {...cleanInputProps()}\n {...cleanFocusProps()}\n {...cleanHoverProps()}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={state.isDisabled || undefined}\n data-readonly={state.isReadOnly || undefined}\n data-invalid={state.isInvalid || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-hovered={isHovered() || undefined}\n />\n );\n}\n\n// Attach sub-components\nColorField.Input = ColorFieldInput;\n\n// ============================================\n// COLOR SWATCH\n// ============================================\n\nexport interface ColorSwatchRenderProps {\n /** The color being displayed. */\n color: Color;\n /** The color as a CSS string. */\n colorValue: string;\n}\n\nexport interface ColorSwatchProps extends SlotProps {\n /** The color to display. */\n color: Color | string;\n /** Accessible label for the swatch. */\n 'aria-label'?: string;\n /** The children of the component. */\n children?: RenderChildren<ColorSwatchRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<ColorSwatchRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<ColorSwatchRenderProps>;\n}\n\n/**\n * A color swatch displays a preview of a color.\n */\nexport function ColorSwatch(props: ColorSwatchProps): JSX.Element {\n const [local, ariaProps, rest] = splitProps(\n props,\n ['children', 'class', 'style', 'slot', 'color'],\n ['aria-label']\n );\n\n // Create color swatch aria props\n const { swatchProps } = createColorSwatch(() => ({\n color: local.color,\n 'aria-label': ariaProps['aria-label'],\n }));\n\n // Normalize color\n const color = createMemo(() => normalizeColor(local.color));\n\n // Render props values\n const renderValues = createMemo<ColorSwatchRenderProps>(() => ({\n color: color(),\n colorValue: color().toString('css'),\n }));\n\n // Resolve render props\n const renderProps = useRenderProps(\n {\n children: props.children,\n class: local.class,\n style: local.style,\n defaultClassName: 'solidaria-ColorSwatch',\n },\n renderValues\n );\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(rest as Record<string, unknown>, { global: true }));\n\n // Clean props\n const cleanSwatchProps = () => {\n const { ref: _ref, style: _swatchStyle, ...rest } = swatchProps as Record<string, unknown>;\n return rest;\n };\n\n // Merge styles\n const mergedStyle = () => {\n const swatchStyle = (swatchProps as { style?: Record<string, string> }).style || {};\n const renderStyle = renderProps.style() || {};\n return { ...swatchStyle, ...renderStyle };\n };\n\n return (\n <div\n {...domProps()}\n {...cleanSwatchProps()}\n class={renderProps.class()}\n style={mergedStyle()}\n >\n {renderProps.renderChildren()}\n </div>\n );\n}\n", "/**\n * Landmark component for solidaria-components\n *\n * Pre-wired headless landmark component that combines aria hooks.\n * Enables F6 keyboard navigation between major page sections.\n */\n\nimport {\n type JSX,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n} from 'solid-js';\nimport { Dynamic } from 'solid-js/web';\nimport {\n createLandmark,\n getLandmarkController,\n type AriaLandmarkProps,\n type AriaLandmarkRole,\n type LandmarkController,\n} from '@proyecto-viviana/solidaria';\nimport {\n type SlotProps,\n filterDOMProps,\n} from './utils';\n\n// ============================================\n// TYPES\n// ============================================\n\nexport interface LandmarkRenderProps {\n /** The ARIA landmark role. */\n role: AriaLandmarkRole;\n}\n\nexport interface LandmarkProps\n extends AriaLandmarkProps,\n SlotProps {\n /**\n * The HTML element type to render.\n * @default 'div' (or semantic element based on role)\n */\n elementType?: keyof JSX.IntrinsicElements;\n /** The CSS className for the element. A function may be provided to receive render props. */\n class?: string | ((renderProps: LandmarkRenderProps) => string);\n /** The inline style for the element. A function may be provided to receive render props. */\n style?: JSX.CSSProperties | ((renderProps: LandmarkRenderProps) => JSX.CSSProperties);\n /** Children content. */\n children?: JSX.Element;\n}\n\n// Re-export types\nexport type { AriaLandmarkRole, LandmarkController };\n\n// ============================================\n// CONTEXT\n// ============================================\n\nexport const LandmarkContext = createContext<LandmarkProps | null>(null);\n\n// ============================================\n// SEMANTIC ELEMENT MAPPING\n// ============================================\n\n/**\n * Maps ARIA landmark roles to their semantic HTML elements.\n * Using semantic elements is preferred when possible.\n */\nconst roleToSemanticElement: Partial<Record<AriaLandmarkRole, keyof JSX.IntrinsicElements>> = {\n main: 'main',\n navigation: 'nav',\n search: 'search', // HTML5.3 <search> element\n banner: 'header',\n contentinfo: 'footer',\n complementary: 'aside',\n form: 'form',\n region: 'section',\n};\n\n// ============================================\n// LANDMARK COMPONENT\n// ============================================\n\n/**\n * A landmark is a region of the page that helps screen reader users navigate.\n * Press F6 to cycle through landmarks, or Shift+F6 to go backwards.\n *\n * @example\n * ```tsx\n * // Main content area\n * <Landmark role=\"main\" aria-label=\"Main content\">\n * <h1>Welcome</h1>\n * <p>Page content here...</p>\n * </Landmark>\n *\n * // Navigation\n * <Landmark role=\"navigation\" aria-label=\"Primary navigation\">\n * <nav>...</nav>\n * </Landmark>\n *\n * // Search\n * <Landmark role=\"search\" aria-label=\"Site search\">\n * <form>...</form>\n * </Landmark>\n *\n * // Custom element type\n * <Landmark role=\"region\" aria-label=\"Featured content\" elementType=\"div\">\n * ...\n * </Landmark>\n * ```\n */\nexport function Landmark(props: LandmarkProps): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n 'class',\n 'style',\n 'slot',\n 'children',\n 'elementType',\n ]);\n\n // Element ref\n const [ref, setRef] = createSignal<HTMLElement>();\n\n // Determine the element type - use semantic element for the role if not specified\n const elementType = createMemo(() => {\n if (local.elementType) {\n return local.elementType;\n }\n return roleToSemanticElement[ariaProps.role] ?? 'div';\n });\n\n // Create landmark aria props\n const landmarkAria = createLandmark(\n {\n get role() { return ariaProps.role; },\n get 'aria-label'() { return ariaProps['aria-label']; },\n get 'aria-labelledby'() { return ariaProps['aria-labelledby']; },\n get id() { return ariaProps.id; },\n get focus() { return ariaProps.focus; },\n },\n ref\n );\n\n // Render props values\n const renderValues = createMemo<LandmarkRenderProps>(() => ({\n role: ariaProps.role,\n }));\n\n // Resolve class\n const resolvedClass = createMemo(() => {\n const cls = local.class;\n if (typeof cls === 'function') {\n return cls(renderValues());\n }\n return cls ?? `solidaria-Landmark solidaria-Landmark--${ariaProps.role}`;\n });\n\n // Resolve style\n const resolvedStyle = createMemo(() => {\n const style = local.style;\n if (typeof style === 'function') {\n return style(renderValues());\n }\n return style;\n });\n\n // Filter DOM props\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n return (\n <Dynamic\n component={elementType()}\n ref={setRef}\n {...domProps()}\n {...landmarkAria.landmarkProps}\n class={resolvedClass()}\n style={resolvedStyle()}\n slot={local.slot}\n >\n {props.children}\n </Dynamic>\n );\n}\n\n// ============================================\n// LANDMARK CONTROLLER EXPORT\n// ============================================\n\n/**\n * Returns a controller for programmatic landmark navigation.\n *\n * @example\n * ```tsx\n * const controller = useLandmarkController();\n *\n * <button onClick={() => controller.focusMain()}>Skip to main content</button>\n * <button onClick={() => controller.focusNext()}>Next landmark</button>\n * ```\n */\nexport function useLandmarkController(): LandmarkController {\n return getLandmarkController();\n}\n"],
|
|
5
|
+
"mappings": ";;;AAKA,SAIEA,eACAC,YACAC,YACAC,cACAC,SACAC,YACK;AACP,SAASC,gBAAgB;AA+ElB,SAASC,eACdC,OACAC,QACsB;AACtB,QAAM;IAAEC;IAAUC,OAAOC;IAAWC;IAAOC,mBAAmB;EAAG,IAAIN;AAGrE,QAAMO,gBAAgBb,WAAW,MAAM;AACrC,UAAMc,gBAAgBP,OAAO;AAC7B,WA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AAMf,MAAMgB;AAClB,QAAI,OAAOD,QAAQ,YAAY;AAC7B,aAAOA,IAAIF,aAAa,CAAC;IAC3B;AACA,WAAOE,OAAO,0CAA0Cd,UAAUO,IAAI;EACxE,CAAC;AAGD,QAAMS,gBAAgBV,aAAW,MAAM;AACrC,UAAMW,QAAQlB,MAAMkB;AACpB,QAAI,OAAOA,UAAU,YAAY;AAC/B,aAAOA,MAAML,aAAa,CAAC;IAC7B;AACA,WAAOK;EACT,CAAC;AAGD,QAAMC,WAAWZ,aAAW,MAAMa,eAAenB,WAAW;IAAEoB,QAAQ;EAAK,CAAC,CAAC;AAE7E,SAAAC,oBACGC,UAAOC,eAAA;IAAA,IACNC,YAAS;AAAA,aAAEnB,YAAY;IAAC;IAAAH,KACnBC;EAAM,GACPe,UAAQ,MACRV,aAAaiB,eAAa;IAAA,KAAA,OAAA,IAAA;AAAA,aACvBZ,cAAc;IAAC;IAAA,IACtBI,QAAK;AAAA,aAAED,cAAc;IAAC;IAAA,IACtBU,OAAI;AAAA,aAAE3B,MAAM2B;IAAI;IAAA,IAAAC,WAAA;AAAA,aAEf7B,MAAM6B;IAAQ;EAAA,CAAA,CAAA;AAGrB;AAiBO,SAASC,wBAA4C;AAC1D,SAAOC,sBAAsB;AAC/B;",
|
|
6
6
|
"names": ["createContext", "useContext", "createMemo", "createSignal", "onMount", "Show", "isServer", "useRenderProps", "props", "values", "children", "class", "className", "style", "defaultClassName", "computedClass", "currentValues", "computedStyle", "renderChildren", "dataAttr", "value", "undefined", "createDataAttributes", "values", "result", "key", "Object", "entries", "camelToKebab", "str", "replace", "toLowerCase", "removeDataAttributes", "props", "startsWith", "filterDOMProps", "options", "global", "globalAttrs", "Set", "ariaAttrs", "dataAttrs", "eventHandlers", "prototype", "hasOwnProperty", "call", "has", "test", "useIsHydrated", "isServer", "isHydrated", "setIsHydrated", "createSignal", "requestAnimationFrame", "splitProps", "Dynamic", "visuallyHiddenStyles", "border", "clip", "height", "margin", "overflow", "padding", "position", "width", "VisuallyHidden", "props", "local", "others", "elementType", "_$createComponent", "_$mergeProps", "component", "style", "children", "createContext", "createMemo", "splitProps", "useContext", "createButton", "createFocusRing", "createHover", "createContext", "useContext", "ButtonContext", "createContext", "Button", "props", "local", "ariaProps", "splitProps", "dialogTriggerContext", "useContext", "DialogTriggerContext", "popoverTriggerContext", "PopoverTriggerContext", "resolveDisabled", "disabled", "isDisabled", "isDialogTrigger", "onPress", "isPopoverTrigger", "handlePress", "e", "state", "toggle", "buttonAria", "createButton", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "isHovered", "hoverProps", "createHover", "renderValues", "createMemo", "isPressed", "renderProps", "useRenderProps", "children", "class", "style", "defaultClassName", "domProps", "filtered", "filterDOMProps", "global", "onClick", "buttonPropsRef", "buttonProps", "ref", "focusPropsRef", "hoverPropsRef", "cleanButtonProps", "_ref1", "rest", "cleanFocusProps", "_ref2", "cleanHoverProps", "_ref3", "handleRef", "el", "setTriggerRef", "_el$", "_$getNextElement", "_tmpl$", "_$use", "_$spread", "_$mergeProps", "undefined", "_$insert", "renderChildren", "_$runHydrationEvents", "createContext", "createMemo", "splitProps", "createSwitch", "createFocusRing", "createHover", "createToggleState", "ToggleSwitchContext", "createContext", "ToggleSwitch", "props", "inputRef", "local", "ariaProps", "splitProps", "state", "createToggleState", "isSelected", "defaultSelected", "onChange", "isReadOnly", "switchAria", "createSwitch", "children", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "isHovered", "hoverProps", "createHover", "isDisabled", "renderValues", "createMemo", "isPressed", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filtered", "filterDOMProps", "global", "id", "onClick", "cleanLabelProps", "ref", "_ref1", "rest", "labelProps", "cleanHoverProps", "_ref2", "cleanInputProps", "_ref3", "inputProps", "cleanFocusProps", "_ref4", "_el$", "_$getNextElement", "_tmpl$2", "_el$3", "firstChild", "_el$4", "_co$", "_$getNextMarker", "nextSibling", "_el$5", "_el$6", "_co$2", "_$spread", "_$mergeProps", "undefined", "_$insert", "_$createComponent", "VisuallyHidden", "_el$2", "_tmpl$", "_$use", "el", "_$runHydrationEvents", "renderChildren", "createContext", "useContext", "createMemo", "splitProps", "createCheckbox", "createCheckboxGroup", "createCheckboxGroupItem", "createFocusRing", "createHover", "createToggleState", "createCheckboxGroupState", "CheckboxGroupContext", "createContext", "CheckboxGroupStateContext", "CheckboxContext", "CheckboxGroup", "props", "local", "ariaProps", "splitProps", "state", "createCheckboxGroupState", "value", "defaultValue", "onChange", "isDisabled", "isReadOnly", "isRequired", "isInvalid", "groupAria", "createCheckboxGroup", "renderValues", "createMemo", "renderProps", "useRenderProps", "children", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "cleanGroupProps", "ref", "_ref", "rest", "groupProps", "resolvedChildren", "_$createComponent", "Provider", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "undefined", "_$insert", "_$runHydrationEvents", "Checkbox", "inputRef", "groupState", "useContext", "isSelected", "isPressed", "labelProps", "inputProps", "itemAria", "createCheckboxGroupItem", "createToggleState", "defaultSelected", "checkboxAria", "createCheckbox", "isIndeterminate", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "isHovered", "hoverProps", "createHover", "filtered", "id", "onClick", "cleanLabelProps", "_ref1", "cleanHoverProps", "_ref2", "cleanInputProps", "_ref3", "cleanFocusProps", "_ref4", "_el$2", "_tmpl$3", "_el$4", "firstChild", "_el$5", "_co$", "_$getNextMarker", "nextSibling", "_el$6", "_el$7", "_co$2", "VisuallyHidden", "_el$3", "_tmpl$2", "_$use", "el", "renderChildren", "createContext", "useContext", "createMemo", "splitProps", "Show", "createRadio", "createRadioGroup", "createFocusRing", "createHover", "createRadioGroupState", "RadioGroupContext", "createContext", "RadioGroupStateContext", "RadioContext", "RadioGroup", "props", "local", "ariaProps", "splitProps", "state", "createRadioGroupState", "value", "defaultValue", "onChange", "isDisabled", "isReadOnly", "isRequired", "isInvalid", "groupAria", "createRadioGroup", "renderValues", "createMemo", "orientation", "renderProps", "useRenderProps", "children", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "cleanGroupProps", "ref", "_ref", "rest", "radioGroupProps", "resolvedChildren", "_$createComponent", "Provider", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "undefined", "_$insert", "_$runHydrationEvents", "RadioImpl", "inputRef", "radioProps", "radioAria", "createRadio", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "isHovered", "hoverProps", "createHover", "isSelected", "isPressed", "filtered", "id", "onClick", "cleanLabelProps", "_ref1", "labelProps", "cleanHoverProps", "_ref2", "cleanInputProps", "_ref3", "inputProps", "cleanFocusProps", "_ref4", "_el$2", "_tmpl$3", "_el$4", "firstChild", "_el$5", "_co$", "_$getNextMarker", "nextSibling", "_el$6", "_el$7", "_co$2", "VisuallyHidden", "_el$3", "_tmpl$2", "_$use", "el", "renderChildren", "Radio", "getState", "useContext", "Show", "when", "fallback", "keyed", "createContext", "useContext", "createMemo", "splitProps", "createTextField", "createFocusRing", "createHover", "createTextFieldState", "TextFieldContext", "createContext", "Label", "props", "context", "useContext", "mergedProps", "ref", "_ref", "contextLabelProps", "labelProps", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "_$insert", "children", "_$runHydrationEvents", "Input", "contextInputProps", "inputProps", "_el$2", "_tmpl$2", "TextArea", "type", "_type", "_el$3", "_tmpl$3", "TextField", "local", "ariaProps", "splitProps", "state", "createTextFieldState", "value", "defaultValue", "onChange", "textFieldAria", "createTextField", "setValue", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "isHovered", "hoverProps", "createHover", "isDisabled", "renderValues", "createMemo", "isInvalid", "isReadOnly", "isRequired", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filtered", "filterDOMProps", "global", "id", "cleanHoverProps", "rest", "contextValue", "descriptionProps", "errorMessageProps", "_$createComponent", "Provider", "_el$4", "_tmpl$4", "undefined", "renderChildren", "createContext", "createMemo", "splitProps", "Dynamic", "createLink", "createFocusRing", "createHover", "LinkContext", "createContext", "Link", "props", "local", "ariaProps", "splitProps", "elementType", "href", "isDisabled", "linkAria", "createLink", "target", "rel", "onPress", "onPressStart", "onPressEnd", "onClick", "onFocus", "onBlur", "onFocusChange", "onKeyDown", "onKeyUp", "autoFocus", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "isHovered", "hoverProps", "createHover", "onHoverStart", "onHoverEnd", "onHoverChange", "renderValues", "createMemo", "isCurrent", "isPressed", "renderProps", "useRenderProps", "children", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "cleanLinkProps", "ref", "_ref1", "rest", "linkProps", "cleanHoverProps", "_ref2", "cleanFocusProps", "_ref3", "_$createComponent", "Dynamic", "_$mergeProps", "component", "undefined", "renderChildren", "createContext", "createMemo", "splitProps", "createProgressBar", "ProgressBarContext", "createContext", "clamp", "value", "min", "max", "Math", "ProgressBar", "props", "local", "ariaProps", "splitProps", "minValue", "maxValue", "isIndeterminate", "progressAria", "createProgressBar", "valueLabel", "formatOptions", "label", "percentage", "createMemo", "undefined", "clampedValue", "valueText", "progressBarProps", "renderValues", "renderProps", "useRenderProps", "children", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "slot", "_$insert", "renderChildren", "_$runHydrationEvents", "createContext", "createMemo", "splitProps", "Dynamic", "createSeparator", "SeparatorContext", "createContext", "Separator", "props", "local", "ariaProps", "splitProps", "elementType", "createMemo", "element", "orientation", "separatorAria", "createSeparator", "id", "renderValues", "resolvedClass", "cls", "class", "resolvedStyle", "style", "domProps", "filterDOMProps", "global", "_$createComponent", "Dynamic", "_$mergeProps", "component", "separatorProps", "slot", "createContext", "createMemo", "splitProps", "useContext", "createToolbar", "ToolbarContext", "createContext", "Toolbar", "props", "local", "ariaProps", "domProps", "splitProps", "ctx", "useContext", "slotProps", "slots", "slot", "mergedAriaProps", "createMemo", "orientation", "toolbarProps", "createToolbar", "renderValues", "resolvedClass", "cls", "class", "resolvedStyle", "style", "resolvedChildren", "children", "filteredDOMProps", "filterDOMProps", "global", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "_$insert", "_$runHydrationEvents", "createContext", "useContext", "createMemo", "splitProps", "createAutocomplete", "createAutocompleteState", "AutocompleteContext", "AutocompleteStateContext", "AutocompleteCollectionContext", "useAutocompleteInput", "useAutocompleteState", "useAutocompleteCollection", "Autocomplete", "props", "stateProps", "ariaProps", "local", "state", "inputRef", "collectionRef", "autocomplete", "inputContextValue", "inputProps", "el", "collectionContextValue", "collectionProps", "filter", "_$createComponent", "Provider", "value", "children", "createContext", "createMemo", "splitProps", "useContext", "For", "createListBox", "createOption", "createFocusRing", "createHover", "createListState", "ListBoxContext", "createContext", "ListBoxStateContext", "ListBox", "props", "local", "stateProps", "ariaProps", "splitProps", "state", "createListState", "items", "getKey", "getTextValue", "getDisabled", "disabledKeys", "selectionMode", "selectedKeys", "defaultSelectedKeys", "onSelectionChange", "resolveDisabled", "disabled", "isDisabled", "listBoxProps", "createListBox", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "renderValues", "createMemo", "isEmpty", "collection", "size", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filtered", "filterDOMProps", "global", "cleanListBoxProps", "ref", "_ref1", "rest", "cleanFocusProps", "_ref2", "length", "_$createComponent", "Provider", "value", "children", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "undefined", "_$insert", "_c$", "_$memo", "renderEmptyState", "For", "each", "item", "_$runHydrationEvents", "ListBoxOption", "context", "useContext", "Error", "optionAria", "createOption", "key", "id", "isHovered", "hoverProps", "createHover", "isSelected", "isPressed", "cleanOptionProps", "optionProps", "cleanHoverProps", "_el$2", "_tmpl$2", "renderChildren", "Option", "createContext", "createMemo", "splitProps", "useContext", "For", "Show", "createMenu", "createMenuItem", "createMenuTrigger", "createFocusRing", "createHover", "createButton", "createInteractOutside", "FocusScope", "createMenuState", "createMenuTriggerState", "MenuContext", "createContext", "MenuStateContext", "MenuTriggerContext", "MenuTrigger", "props", "local", "stateProps", "splitProps", "state", "createMenuTriggerState", "isOpen", "defaultOpen", "onOpenChange", "menuTriggerProps", "menuProps", "createMenuTrigger", "isDisabled", "_$createComponent", "Provider", "value", "triggerProps", "children", "MenuButton", "context", "useContext", "Error", "buttonAria", "createButton", "onPress", "toggle", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "isHovered", "hoverProps", "createHover", "renderValues", "createMemo", "isPressed", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "cleanTriggerProps", "ref", "_ref1", "rest", "cleanButtonProps", "_ref2", "buttonProps", "cleanFocusProps", "_ref3", "cleanHoverProps", "_ref4", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "undefined", "_$insert", "renderChildren", "_$runHydrationEvents", "Menu", "ariaProps", "triggerContext", "menuRef", "createMenuState", "items", "getKey", "getTextValue", "getDisabled", "disabledKeys", "onAction", "onClose", "close", "createMenu", "createInteractOutside", "onInteractOutside", "cleanMenuProps", "cleanTriggerMenuProps", "shouldRender", "menuContent", "_el$2", "_tmpl$2", "_$use", "el", "For", "each", "item", "Show", "when", "fallback", "FocusScope", "restoreFocus", "autoFocus", "MenuItem", "itemAria", "createMenuItem", "key", "id", "isSelected", "cleanItemProps", "menuItemProps", "_el$3", "_tmpl$3", "Item", "createContext", "createMemo", "splitProps", "useContext", "For", "Show", "createSelect", "createHiddenSelect", "createListBox", "createOption", "createHover", "createInteractOutside", "FocusScope", "createSelectState", "SelectContext", "createContext", "SelectStateContext", "Select", "props", "local", "stateProps", "ariaProps", "splitProps", "state", "createSelectState", "items", "getKey", "getTextValue", "getDisabled", "disabledKeys", "selectedKey", "defaultSelectedKey", "onSelectionChange", "isOpen", "defaultOpen", "onOpenChange", "isDisabled", "isRequired", "triggerProps", "valueProps", "menuProps", "isFocused", "isFocusVisible", "createSelect", "isHovered", "hoverProps", "createHover", "renderValues", "createMemo", "isSelected", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filtered", "filterDOMProps", "global", "cleanHoverProps", "ref", "_ref", "rest", "containerProps", "selectProps", "hiddenSelectProps", "createHiddenSelect", "name", "_$createComponent", "Provider", "value", "placeholder", "children", "_el$", "_$getNextElement", "_tmpl$", "_el$2", "firstChild", "_el$3", "_el$4", "_el$5", "nextSibling", "_el$6", "_co$", "_$getNextMarker", "_el$7", "_el$8", "_co$2", "_$spread", "_$mergeProps", "undefined", "_$insert", "For", "each", "item", "key", "id", "textValue", "label", "String", "_el$9", "_tmpl$2", "_$effect", "_$setProperty", "_$runHydrationEvents", "SelectTrigger", "context", "useContext", "Error", "cleanTriggerProps", "_ref1", "_ref2", "_el$0", "_tmpl$3", "renderChildren", "defaultSelectValueChildren", "values", "selectedText", "SelectValue", "contextPlaceholder", "selectedItem", "_el$1", "_tmpl$4", "SelectListBox", "selectState", "listBoxRef", "createInteractOutside", "onInteractOutside", "close", "listBoxProps", "createListBox", "collection", "focusedKey", "setFocusedKey", "setFocused", "selectedKeys", "Set", "isKeyDisabled", "selectionMode", "disallowEmptySelection", "select", "setSelectedKey", "toggleSelection", "replaceSelection", "extendSelection", "selectAll", "clearSelection", "childFocusStrategy", "cleanMenuProps", "cleanListBoxProps", "Array", "from", "Show", "when", "FocusScope", "restoreFocus", "autoFocus", "_el$10", "_tmpl$5", "_$use", "el", "fallback", "node", "SelectOption", "optionAria", "createOption", "isPressed", "cleanOptionProps", "optionProps", "_el$11", "_tmpl$6", "Trigger", "Value", "ListBox", "Option", "createContext", "createMemo", "splitProps", "useContext", "For", "Show", "createTabList", "createTab", "createTabPanel", "createFocusRing", "createHover", "createTabListState", "TabsContext", "createContext", "TabsStateContext", "Tabs", "props", "local", "stateProps", "rest", "splitProps", "state", "createTabListState", "items", "getKey", "getTextValue", "getDisabled", "disabledKeys", "selectedKey", "defaultSelectedKey", "onSelectionChange", "isDisabled", "keyboardActivation", "orientation", "renderValues", "createMemo", "renderProps", "useRenderProps", "class", "style", "children", "defaultClassName", "domProps", "filterDOMProps", "global", "_$createComponent", "Provider", "value", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "undefined", "_$insert", "_$runHydrationEvents", "TabList", "ariaProps", "context", "useContext", "Show", "when", "fallback", "_tmpl$2", "ctx", "TabListInner", "tabListProps", "createTabList", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "callHandler", "handler", "event", "Array", "isArray", "call", "handleKeyDown", "e", "onKeyDown", "handleFocus", "onFocus", "handleBlur", "onBlur", "_el$3", "addEventListener", "$$keydown", "For", "each", "item", "_$effect", "_p$", "_v$", "role", "_v$2", "_v$3", "_v$4", "_v$5", "_v$6", "_v$7", "_v$8", "_v$9", "_v$0", "_v$1", "_$setAttribute", "t", "a", "o", "i", "n", "_$className", "s", "_$style", "h", "r", "d", "l", "Tab", "_tmpl$3", "TabInner", "tabAria", "createTab", "key", "id", "isHovered", "hoverProps", "createHover", "isSelected", "isPressed", "_el$5", "tabProps", "_$memo", "tabIndex", "onMouseDown", "onPointerDown", "onClick", "renderChildren", "TabPanel", "tabPanelProps", "createTabPanel", "shouldRender", "shouldForceMount", "_el$6", "_$addEventListener", "_v$10", "_v$11", "_v$12", "_v$13", "_v$14", "_v$15", "_v$16", "_v$17", "_v$18", "_v$19", "_v$20", "_v$21", "_v$22", "u", "_$setProperty", "c", "List", "Panel", "_$delegateEvents", "createContext", "createMemo", "splitProps", "useContext", "For", "createBreadcrumbs", "createBreadcrumbItem", "BreadcrumbsContext", "createContext", "Breadcrumbs", "props", "local", "ariaProps", "rest", "splitProps", "isDisabled", "items", "navProps", "createBreadcrumbs", "renderValues", "createMemo", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "_$createComponent", "Provider", "value", "children", "_el$", "_$getNextElement", "_tmpl$", "_el$2", "firstChild", "_$spread", "_$mergeProps", "undefined", "_$insert", "For", "each", "item", "_el$3", "_tmpl$2", "_$runHydrationEvents", "BreadcrumbItem", "context", "useContext", "isCurrent", "itemProps", "isPressed", "createBreadcrumbItem", "href", "target", "rel", "elementType", "onPress", "onPressStart", "onPressEnd", "onClick", "isFocused", "isFocusVisible", "isHovered", "mergedStyle", "userStyle", "baseStyle", "display", "_el$4", "_tmpl$3", "renderChildren", "Item", "createContext", "createMemo", "splitProps", "useContext", "createNumberField", "createFocusRing", "createHover", "createPress", "createNumberFieldState", "NumberFieldContext", "createContext", "NumberField", "props", "local", "stateProps", "ariaProps", "rest", "splitProps", "state", "createNumberFieldState", "value", "defaultValue", "onChange", "minValue", "maxValue", "step", "locale", "formatOptions", "isDisabled", "isReadOnly", "inputRef", "labelProps", "groupProps", "inputProps", "incrementButtonProps", "decrementButtonProps", "descriptionProps", "errorMessageProps", "createNumberField", "renderValues", "createMemo", "isInvalid", "isRequired", "numberValue", "renderProps", "useRenderProps", "children", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "_$createComponent", "Provider", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "undefined", "_$insert", "renderChildren", "_$runHydrationEvents", "NumberFieldLabel", "context", "useContext", "Error", "_el$2", "_tmpl$2", "NumberFieldGroup", "cleanGroupProps", "ref", "_ref", "_el$3", "NumberFieldInput", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "isHovered", "hoverProps", "createHover", "cleanInputProps", "cleanFocusProps", "cleanHoverProps", "_el$4", "_tmpl$3", "NumberFieldIncrementButton", "isPressed", "pressProps", "createPress", "canIncrement", "onPress", "increment", "cleanButtonProps", "cleanPressProps", "_el$5", "_tmpl$4", "NumberFieldDecrementButton", "canDecrement", "decrement", "_el$6", "Label", "Group", "Input", "IncrementButton", "DecrementButton", "createContext", "createMemo", "splitProps", "useContext", "Show", "createSearchField", "createFocusRing", "createHover", "createPress", "createSearchFieldState", "SearchFieldContext", "createContext", "SearchField", "props", "local", "stateProps", "ariaProps", "rest", "splitProps", "state", "createSearchFieldState", "value", "defaultValue", "onChange", "inputRef", "setInputRef", "el", "labelProps", "inputProps", "clearButtonProps", "descriptionProps", "errorMessageProps", "createSearchField", "isDisabled", "isReadOnly", "isRequired", "isInvalid", "label", "description", "errorMessage", "placeholder", "name", "autoFocus", "autoComplete", "maxLength", "minLength", "pattern", "onSubmit", "onClear", "renderValues", "createMemo", "isEmpty", "renderProps", "useRenderProps", "children", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "_$createComponent", "Provider", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "undefined", "_$insert", "renderChildren", "_$runHydrationEvents", "SearchFieldLabel", "context", "useContext", "Error", "_el$2", "_tmpl$2", "SearchFieldInput", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "isHovered", "hoverProps", "createHover", "cleanInputProps", "ref", "_ref", "cleanFocusProps", "cleanHoverProps", "_el$3", "_tmpl$3", "_ref$", "_$use", "SearchFieldClearButton", "isPressed", "pressProps", "createPress", "onPress", "onClick", "cleanPressProps", "Show", "when", "_el$4", "_tmpl$4", "tabIndex", "disabled", "onMouseDown", "Label", "Input", "ClearButton", "createContext", "createMemo", "splitProps", "useContext", "Show", "createSlider", "createFocusRing", "createHover", "createSliderState", "SliderContext", "createContext", "Slider", "props", "local", "stateProps", "ariaProps", "rest", "splitProps", "state", "createSliderState", "value", "defaultValue", "onChange", "onChangeEnd", "minValue", "maxValue", "step", "orientation", "locale", "formatOptions", "isDisabled", "trackRef", "setTrackRef", "el", "labelProps", "groupProps", "trackProps", "thumbProps", "inputProps", "outputProps", "createSlider", "renderValues", "createMemo", "isDragging", "isFocused", "valuePercent", "getValuePercent", "renderProps", "useRenderProps", "children", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "cleanGroupProps", "ref", "_ref", "_$createComponent", "Provider", "_el$", "_$getNextElement", "_tmpl$2", "_el$4", "firstChild", "_el$5", "_co$", "_$getNextMarker", "nextSibling", "_el$6", "_el$7", "_co$2", "_el$3", "_$spread", "_$mergeProps", "undefined", "_$insert", "Show", "when", "label", "_el$2", "_tmpl$", "_$runHydrationEvents", "renderChildren", "SliderTrack", "context", "useContext", "Error", "cleanTrackProps", "trackStyle", "mergedStyle", "renderStyle", "_el$8", "_tmpl$3", "_$use", "SliderThumb", "isFocusVisible", "focusProps", "createFocusRing", "isHovered", "hoverProps", "createHover", "cleanThumbProps", "thumbStyle", "cleanFocusProps", "cleanHoverProps", "_el$9", "SliderOutput", "formattedValue", "getFormattedValue", "cleanOutputProps", "renderedChildren", "_el$0", "_tmpl$4", "Track", "Thumb", "Output", "createContext", "useContext", "createMemo", "createSignal", "createEffect", "onCleanup", "Show", "isServer", "createTooltipTriggerState", "createTooltip", "createTooltipTrigger", "OverlayContainer", "TooltipTriggerContext", "createContext", "TooltipTrigger", "props", "triggerRef", "state", "createTooltipTriggerState", "delay", "closeDelay", "isOpen", "defaultOpen", "onOpenChange", "triggerProps", "tooltipProps", "createTooltipTrigger", "isDisabled", "trigger", "shouldCloseOnPress", "context", "processChildren", "children", "Array", "isArray", "rest", "_$createComponent", "TriggerWrapper", "ref", "el", "Provider", "value", "child", "handleRef", "span", "findVisibleChild", "HTMLElement", "rect", "getBoundingClientRect", "width", "height", "found", "resolveRef", "visibleChild", "immediateChild", "requestAnimationFrame", "_el$", "_$getNextElement", "_tmpl$", "_$use", "_$spread", "_$mergeProps", "display", "_$insert", "_$runHydrationEvents", "Tooltip", "useContext", "localState", "placement", "Show", "when", "TooltipContent", "contextTooltipProps", "isServer", "tooltipRef", "ariaTooltipProps", "createTooltip", "positionStyles", "setPositionStyles", "createSignal", "top", "left", "visibility", "values", "createMemo", "isEntering", "isExiting", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "updatePosition", "triggerEl", "triggerRect", "tooltipWidth", "offsetWidth", "tooltipHeight", "offsetHeight", "offset", "bottom", "right", "createEffect", "retryCount", "maxRetries", "tryUpdatePosition", "success", "setTimeout", "window", "addEventListener", "onCleanup", "removeEventListener", "domProps", "filterDOMProps", "_ariaRef", "cleanAriaProps", "OverlayContainer", "_el$2", "_tmpl$2", "_ref$", "position", "renderChildren", "createContext", "createMemo", "splitProps", "useContext", "For", "Show", "createComboBox", "createListBox", "createOption", "createHover", "createInteractOutside", "createComboBoxState", "defaultContainsFilter", "ComboBoxContext", "createContext", "ComboBoxStateContext", "ComboBox", "props", "local", "stateProps", "ariaProps", "splitProps", "inputRef", "buttonRef", "state", "createComboBoxState", "items", "getKey", "getTextValue", "getDisabled", "disabledKeys", "selectedKey", "defaultSelectedKey", "onSelectionChange", "inputValue", "defaultInputValue", "onInputChange", "isOpen", "defaultOpen", "onOpenChange", "defaultFilter", "allowsCustomValue", "allowsEmptyCollection", "menuTrigger", "isDisabled", "isReadOnly", "isRequired", "comboBoxAria", "createComboBox", "isHovered", "hoverProps", "createHover", "renderValues", "createMemo", "isFocused", "isFocusVisible", "isSelected", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filtered", "filterDOMProps", "global", "cleanHoverProps", "ref", "_ref", "rest", "_$createComponent", "Provider", "value", "inputProps", "buttonProps", "listBoxProps", "labelProps", "setInputRef", "el", "setButtonRef", "children", "_el$", "_$getNextElement", "_tmpl$2", "_el$3", "firstChild", "_el$4", "_co$", "_$getNextMarker", "nextSibling", "_el$5", "_el$6", "_co$2", "_$spread", "_$mergeProps", "undefined", "_$insert", "Show", "when", "name", "_el$2", "_tmpl$", "_$effect", "_$setAttribute", "_$setProperty", "toString", "_$runHydrationEvents", "ComboBoxInput", "context", "useContext", "Error", "cleanInputProps", "_ref1", "_value", "_ref2", "_el$7", "_tmpl$3", "_$use", "ComboBoxButton", "isPressed", "cleanButtonProps", "_el$8", "_tmpl$4", "renderChildren", "ComboBoxListBox", "contextListBoxProps", "comboBoxState", "listBoxRef", "createInteractOutside", "onInteractOutside", "e", "target", "input", "contains", "close", "createListBox", "collection", "focusedKey", "setFocusedKey", "setFocused", "selectionMode", "select", "isKeyDisabled", "selectedKeys", "key", "Set", "disallowEmptySelection", "toggleSelection", "replaceSelection", "extendSelection", "selectAll", "clearSelection", "setSelectedKey", "childFocusStrategy", "cleanContextProps", "cleanListBoxProps", "Array", "from", "setupMouseDownHandler", "mouseHandler", "preventDefault", "pointerHandler", "addEventListener", "_el$9", "_tmpl$5", "fallback", "For", "each", "node", "ComboBoxOption", "id", "textValue", "optionAria", "createOption", "cleanOptionProps", "optionProps", "_el$0", "_tmpl$6", "Input", "Button", "ListBox", "Option", "createContext", "createMemo", "createUniqueId", "splitProps", "useContext", "Switch", "Match", "createDialog", "createOverlayTrigger", "createOverlayTriggerState", "DialogContext", "createContext", "DialogTrigger", "props", "local", "splitProps", "state", "createOverlayTriggerState", "isOpen", "defaultOpen", "onOpenChange", "triggerRef", "triggerId", "createUniqueId", "createOverlayTrigger", "type", "contextValue", "createMemo", "_$createComponent", "DialogTriggerContext", "Provider", "value", "children", "Dialog", "ariaProps", "rest", "dialogRef", "triggerContext", "useContext", "dialogProps", "titleProps", "createDialog", "role", "titleId", "id", "overlayState", "useOverlayTriggerState", "close", "onClose", "renderValues", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "_el$", "_$getNextElement", "_tmpl$", "_ref$", "_$use", "_$spread", "_$mergeProps", "_$insert", "renderChildren", "_$runHydrationEvents", "Heading", "dialogContext", "level", "Switch", "Match", "when", "_el$2", "_tmpl$2", "_$effect", "_p$", "_v$", "_v$2", "e", "_$setAttribute", "t", "_$className", "undefined", "_el$3", "_tmpl$3", "_v$3", "_v$4", "_el$4", "_tmpl$4", "_v$5", "_v$6", "_el$5", "_tmpl$5", "_v$7", "_v$8", "_el$6", "_tmpl$6", "_v$9", "_v$0", "_el$7", "_tmpl$7", "_v$1", "_v$10", "createContext", "createMemo", "createSignal", "createEffect", "onCleanup", "splitProps", "Show", "useContext", "Portal", "isServer", "createInteractOutside", "ariaHideOutside", "FocusScope", "InternalModalContext", "createContext", "ModalOverlay", "props", "isServer", "_$memo", "children", "local", "rest", "splitProps", "dialogTriggerContext", "useContext", "DialogTriggerContext", "internalOpen", "setInternalOpen", "createSignal", "defaultOpen", "isOpen", "undefined", "state", "close", "onOpenChange", "open", "toggle", "renderValues", "createMemo", "isEntering", "isExiting", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "internalModalContext", "isDismissable", "isKeyboardDismissDisabled", "resolveChildren", "_$createComponent", "Show", "when", "Portal", "OverlayTriggerStateContext", "Provider", "value", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "dataAttr", "_$insert", "_$runHydrationEvents", "Modal", "ModalContentWithAutoOverlay", "overlayProps", "modalProps", "internalContext", "ModalContent", "standaloneContext", "modalRef", "parentState", "createEffect", "html", "document", "documentElement", "prevOverflow", "overflow", "onCleanup", "createInteractOutside", "ref", "onInteractOutside", "isDisabled", "handleKeyDown", "e", "key", "preventDefault", "stopPropagation", "addEventListener", "removeEventListener", "cleanup", "ariaHideOutside", "FocusScope", "contain", "restoreFocus", "autoFocus", "_el$2", "_ref$", "_$use", "renderChildren", "createContext", "createMemo", "createSignal", "createUniqueId", "splitProps", "useContext", "Show", "createEffect", "onCleanup", "Portal", "isServer", "createOverlayTrigger", "FocusScope", "createOverlayTriggerState", "PopoverContext", "createContext", "PopoverTrigger", "props", "local", "splitProps", "state", "createOverlayTriggerState", "isOpen", "defaultOpen", "onOpenChange", "triggerRef", "triggerId", "createUniqueId", "createOverlayTrigger", "type", "triggerRefSet", "contextValue", "createMemo", "open", "close", "toggle", "setTriggerRef", "el", "trigger", "_$createComponent", "PopoverTriggerContext", "Provider", "value", "children", "Popover", "isServer", "rest", "popoverRef", "triggerContext", "useContext", "internalOpen", "setInternalOpen", "createSignal", "undefined", "getTriggerRef", "placement", "setPlacement", "positionStyles", "setPositionStyles", "top", "left", "visibility", "createEffect", "isKeyboardDismissDisabled", "handleKeyDown", "e", "key", "preventDefault", "stopPropagation", "document", "addEventListener", "onCleanup", "removeEventListener", "isNonModal", "handleClickOutside", "target", "contains", "shouldCloseOnInteractOutside", "timeoutId", "setTimeout", "clearTimeout", "updatePosition", "popover", "triggerRect", "getBoundingClientRect", "popoverWidth", "offsetWidth", "popoverHeight", "offsetHeight", "offset", "placementValue", "width", "bottom", "height", "right", "triggerElement", "requestAnimationFrame", "window", "renderValues", "isEntering", "isExiting", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "shouldBeDialog", "Show", "when", "Portal", "FocusScope", "contain", "restoreFocus", "autoFocus", "_el$", "_$getNextElement", "_tmpl$", "_ref$", "_$use", "_$spread", "_$mergeProps", "role", "tabIndex", "position", "dataAttr", "_$insert", "renderChildren", "_$runHydrationEvents", "OverlayArrow", "popoverContext", "resolveChildren", "_el$2", "_tmpl$2", "_$effect", "_p$", "_v$", "_v$2", "_v$3", "_$className", "t", "_$style", "a", "_$setAttribute", "createContext", "createMemo", "splitProps", "Show", "useContext", "Portal", "isServer", "ToastQueue", "createToastState", "createToast", "createToastRegion", "ToastContext", "createContext", "useToastContext", "context", "useContext", "Error", "globalToastQueue", "ToastQueue", "maxVisibleToasts", "hasExitAnimation", "addToast", "content", "options", "add", "ToastProvider", "props", "queue", "useGlobalQueue", "queueOptions", "state", "createToastState", "_$createComponent", "Provider", "value", "children", "ToastRegion", "isServer", "local", "rest", "splitProps", "contextState", "getRegionAria", "s", "createToastRegion", "renderValues", "createMemo", "visibleToasts", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "placementStyles", "placement", "base", "position", "display", "gap", "padding", "top", "left", "transform", "right", "bottom", "hasToasts", "length", "regionContent", "regionAria", "mergedStyle", "custom", "ref", "_ref", "cleanRegionProps", "regionProps", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "_$insert", "renderChildren", "_$runHydrationEvents", "Show", "when", "portal", "fallback", "Portal", "Toast", "toastAria", "createToast", "toast", "isEntering", "animation", "isExiting", "cleanToastProps", "toastProps", "_el$2", "type", "ToastTitle", "_el$3", "_$effect", "_p$", "_v$", "_v$2", "e", "_$className", "t", "_$style", "undefined", "ToastDescription", "_el$4", "_v$3", "_v$4", "ToastCloseButton", "handleClose", "close", "key", "_el$5", "_tmpl$2", "$$click", "_v$5", "_v$6", "_v$7", "a", "_$setAttribute", "DefaultToast", "_el$6", "_tmpl$4", "_el$7", "firstChild", "_el$9", "_el$0", "_co$", "_$getNextMarker", "nextSibling", "_el$1", "_el$10", "_co$2", "_el$11", "_el$12", "_co$3", "_el$13", "_el$14", "_co$4", "title", "description", "action", "_el$8", "_tmpl$3", "_$addEventListener", "onAction", "label", "_$delegateEvents", "createContext", "createMemo", "createSignal", "splitProps", "useContext", "createDisclosureState", "createDisclosureGroupState", "createDisclosure", "createDisclosureGroup", "DisclosureContext", "createContext", "useDisclosureContext", "useContext", "DisclosureGroupContext", "useDisclosureGroupContext", "DisclosureGroup", "props", "local", "rest", "splitProps", "state", "createDisclosureGroupState", "allowsMultipleExpanded", "isDisabled", "expandedKeys", "defaultExpandedKeys", "onExpandedChange", "groupProps", "createDisclosureGroup", "renderValues", "createMemo", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "contextValue", "ref", "_ref", "cleanGroupProps", "_$createComponent", "Provider", "value", "children", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "dataAttr", "_$insert", "_$runHydrationEvents", "Disclosure", "groupContext", "createDisclosureState", "id", "isExpanded", "expanded", "toggleKey", "defaultExpanded", "panelRef", "setPanelRefSignal", "createSignal", "disclosureAria", "createDisclosure", "setPanelRef", "el", "DisclosurePanelRefContext", "_el$2", "DisclosureTrigger", "context", "Error", "getButtonProps", "buttonProps", "_el$3", "_tmpl$2", "DisclosurePanel", "panelRefSetter", "getPanelProps", "undefined", "role", "hidden", "panelProps", "_el$4", "_$use", "renderChildren", "createContext", "createMemo", "splitProps", "createMeter", "MeterContext", "createContext", "clamp", "value", "min", "max", "Math", "Meter", "props", "local", "ariaProps", "splitProps", "minValue", "maxValue", "meterAria", "createMeter", "valueLabel", "formatOptions", "label", "percentage", "createMemo", "clampedValue", "valueText", "meterProps", "renderValues", "renderProps", "useRenderProps", "children", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "_el$", "_$getNextElement", "_tmpl$", "_$spread", "_$mergeProps", "slot", "_$insert", "renderChildren", "_$runHydrationEvents", "createContext", "createMemo", "createSignal", "splitProps", "useContext", "For", "Show", "createTagGroup", "createTag", "createListState", "TagGroupContext", "createContext", "TagListStateContext", "useTagGroupContext", "useContext", "TagGroup", "props", "local", "splitProps", "_el$", "_$getNextElement", "_tmpl$", "_$insert", "children", "_$effect", "_p$", "_v$", "class", "_v$2", "style", "undefined", "_v$3", "slot", "e", "_$className", "t", "_$style", "a", "_$setAttribute", "TagList", "gridRef", "setGridRef", "createSignal", "getKey", "item", "id", "key", "String", "state", "createListState", "items", "selectionMode", "selectionBehavior", "selectedKeys", "defaultSelectedKeys", "onSelectionChange", "disabledKeys", "tagGroupAria", "createTagGroup", "label", "isDisabled", "onRemove", "isFocused", "setIsFocused", "renderValues", "createMemo", "isEmpty", "length", "renderProps", "useRenderProps", "defaultClassName", "contextValue", "_$createComponent", "Provider", "value", "_el$2", "_$use", "_$spread", "_$mergeProps", "gridProps", "onFocus", "onBlur", "dataAttr", "Show", "when", "fallback", "renderEmptyState", "For", "each", "_$runHydrationEvents", "Tag", "rest", "tagRef", "setTagRef", "tagAria", "createTag", "textValue", "isSelected", "isPressed", "allowsRemoving", "domProps", "filterDOMProps", "global", "_el$3", "_tmpl$2", "_el$4", "firstChild", "rowProps", "gridCellProps", "display", "renderChildren", "TagRemoveButton", "_el$5", "_tmpl$3", "_v$4", "_v$5", "createContext", "createMemo", "createSignal", "splitProps", "useContext", "For", "Index", "Show", "createCalendar", "createCalendarGrid", "createCalendarCell", "createCalendarState", "CalendarContext", "createContext", "useCalendarContext", "context", "useContext", "Error", "Calendar", "props", "isHydrated", "useIsHydrated", "_$createComponent", "Show", "when", "fallback", "_$getNextElement", "_tmpl$", "children", "CalendarInner", "local", "stateProps", "rest", "splitProps", "state", "createCalendarState", "calendarAria", "createCalendar", "renderValues", "createMemo", "isDisabled", "isReadOnly", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "Provider", "value", "_el$2", "_tmpl$2", "_$spread", "_$mergeProps", "calendarProps", "dataAttr", "_$insert", "_$runHydrationEvents", "CalendarHeading", "_el$3", "_tmpl$3", "title", "_$effect", "_p$", "_v$", "_v$2", "e", "_$className", "t", "_$style", "undefined", "CalendarButton", "buttonProps", "slot", "prevButtonProps", "nextButtonProps", "_el$4", "_tmpl$4", "disabled", "CalendarGrid", "gridRef", "setGridRef", "createSignal", "gridAria", "createCalendarGrid", "weekdayStyle", "allDates", "numWeeks", "getWeeksInMonth", "weekDates", "weekIndex", "push", "getDatesInWeek", "_el$5", "_tmpl$5", "_el$6", "firstChild", "_el$7", "_el$8", "nextSibling", "_$use", "gridProps", "headerProps", "For", "each", "weekDays", "day", "_el$9", "_tmpl$6", "Index", "_el$0", "_tmpl$7", "date", "_el$1", "_tmpl$8", "CalendarCell", "cellRef", "setCellRef", "cellAria", "createCalendarCell", "isSelected", "isFocused", "isUnavailable", "isOutsideMonth", "isToday", "isPressed", "formattedDate", "getChildren", "renderChildren", "_el$10", "createContext", "createMemo", "createSignal", "splitProps", "useContext", "For", "Show", "createRangeCalendar", "createCalendarGrid", "createRangeCalendarCell", "createRangeCalendarState", "RangeCalendarContext", "createContext", "useRangeCalendarContext", "context", "useContext", "Error", "RangeCalendar", "props", "isHydrated", "useIsHydrated", "_$createComponent", "Show", "when", "fallback", "_$getNextElement", "_tmpl$", "children", "RangeCalendarInner", "local", "stateProps", "rest", "splitProps", "state", "createRangeCalendarState", "calendarAria", "createRangeCalendar", "renderValues", "createMemo", "isDisabled", "isReadOnly", "isDragging", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "Provider", "value", "_el$2", "_tmpl$2", "_$spread", "_$mergeProps", "calendarProps", "dataAttr", "_$insert", "_$runHydrationEvents", "RangeCalendarHeading", "_el$3", "_tmpl$3", "title", "_$effect", "_p$", "_v$", "_v$2", "e", "_$className", "t", "_$style", "undefined", "RangeCalendarButton", "buttonProps", "slot", "prevButtonProps", "nextButtonProps", "_el$4", "_tmpl$4", "disabled", "RangeCalendarGrid", "gridRef", "setGridRef", "createSignal", "gridAria", "createCalendarGrid", "weekdayStyle", "weeks", "numWeeks", "getWeeksInMonth", "Array", "from", "length", "_", "i", "_el$5", "_tmpl$5", "_el$6", "firstChild", "_el$7", "_el$8", "nextSibling", "_$use", "gridProps", "headerProps", "For", "each", "weekDays", "day", "_el$9", "_tmpl$6", "weekIndex", "_el$0", "_tmpl$7", "getDatesInWeek", "date", "_el$1", "_tmpl$8", "RangeCalendarCell", "cellRef", "setCellRef", "cellAria", "createRangeCalendarCell", "isSelected", "isSelectionStart", "isSelectionEnd", "isFocused", "isUnavailable", "isOutsideMonth", "isToday", "isPressed", "formattedDate", "getChildren", "renderChildren", "_el$10", "createContext", "createMemo", "createSignal", "splitProps", "useContext", "For", "Show", "createDateField", "createDateSegment", "createDateFieldState", "DateFieldContext", "createContext", "useDateFieldContext", "context", "useContext", "Error", "DateField", "props", "isHydrated", "useIsHydrated", "_$createComponent", "Show", "when", "fallback", "_$getNextElement", "_tmpl$", "children", "DateFieldInner", "local", "stateProps", "rest", "splitProps", "fieldRef", "setFieldRef", "createSignal", "state", "createDateFieldState", "fieldAria", "createDateField", "renderValues", "createMemo", "isDisabled", "isReadOnly", "isRequired", "isInvalid", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "Provider", "value", "_el$2", "_tmpl$2", "_$use", "_$spread", "_$mergeProps", "fieldProps", "dataAttr", "_$insert", "_$runHydrationEvents", "DateInput", "isFocused", "setIsFocused", "_el$3", "_tmpl$3", "$$focusout", "$$focusin", "For", "each", "segments", "segment", "_$effect", "_p$", "_v$", "_v$2", "_v$3", "_v$4", "e", "_$className", "t", "_$style", "a", "_$setAttribute", "o", "undefined", "DateSegment", "segmentRef", "setSegmentRef", "segmentAria", "createDateSegment", "isEditable", "isPlaceholder", "type", "text", "getChildren", "renderChildren", "_el$4", "segmentProps", "_$delegateEvents", "createContext", "createMemo", "createSignal", "splitProps", "useContext", "For", "Show", "createTimeField", "createTimeFieldState", "TimeFieldContext", "createContext", "useTimeFieldContext", "context", "useContext", "Error", "TimeField", "props", "isHydrated", "useIsHydrated", "_$createComponent", "Show", "when", "fallback", "_$getNextElement", "_tmpl$", "children", "TimeFieldInner", "local", "stateProps", "rest", "splitProps", "fieldRef", "setFieldRef", "createSignal", "state", "createTimeFieldState", "fieldAria", "createTimeField", "renderValues", "createMemo", "isDisabled", "isReadOnly", "isRequired", "isInvalid", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "Provider", "value", "_el$2", "_tmpl$2", "_$use", "_$spread", "_$mergeProps", "fieldProps", "dataAttr", "_$insert", "_$runHydrationEvents", "TimeInput", "isFocused", "setIsFocused", "_el$3", "_tmpl$3", "$$focusout", "$$focusin", "For", "each", "segments", "segment", "_$effect", "_p$", "_v$", "_v$2", "_v$3", "_v$4", "e", "_$className", "t", "_$style", "a", "_$setAttribute", "o", "undefined", "TimeSegment", "_segmentRef", "setSegmentRef", "enteredKeys", "setEnteredKeys", "isEditable", "seg", "handleKeyDown", "type", "key", "preventDefault", "incrementSegment", "decrementSegment", "clearSegment", "test", "newKeys", "numValue", "parseInt", "maxValue", "minValue", "setSegment", "length", "singleValue", "handleFocus", "handleBlur", "segmentProps", "role", "tabIndex", "getTimeSegmentLabel", "isPlaceholder", "placeholder", "text", "contentEditable", "inputMode", "autoCorrect", "enterKeyHint", "spellCheck", "onKeyDown", "onFocus", "onBlur", "onMouseDown", "getChildren", "renderChildren", "_el$4", "_$delegateEvents", "createContext", "createMemo", "createSignal", "splitProps", "useContext", "Show", "createDatePicker", "createDateFieldState", "createCalendarState", "DatePickerContext", "createContext", "useDatePickerContext", "context", "useContext", "Error", "DatePicker", "props", "isHydrated", "useIsHydrated", "_$createComponent", "Show", "when", "fallback", "_$getNextElement", "_tmpl$", "children", "DatePickerInner", "local", "stateProps", "rest", "splitProps", "isOpen", "setIsOpen", "createSignal", "overlayState", "open", "close", "toggle", "prev", "fieldState", "createDateFieldState", "onChange", "value", "shouldCloseOnSelect", "calendarState", "createCalendarState", "setValue", "minValue", "maxValue", "isDisabled", "isReadOnly", "locale", "pickerAria", "createDatePicker", "contextValue", "renderValues", "createMemo", "isRequired", "isInvalid", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "Provider", "DateFieldContext", "_el$2", "_tmpl$2", "_$spread", "_$mergeProps", "groupProps", "dataAttr", "_$insert", "_$runHydrationEvents", "DatePickerButton", "getChildren", "renderChildren", "_el$3", "_tmpl$3", "buttonProps", "disabled", "DatePickerContent", "_el$4", "dialogProps", "createContext", "createMemo", "createSignal", "splitProps", "useContext", "For", "Show", "createTable", "createTableColumnHeader", "createTableRow", "createTableCell", "createTableRowGroup", "createTableSelectionCheckbox", "createTableSelectAllCheckbox", "createFocusRing", "createHover", "createTableState", "createTableCollection", "TableContext", "createContext", "TableStateContext", "TableRowContext", "Table", "props", "local", "stateProps", "ariaProps", "splitProps", "ref", "setRef", "createSignal", "collection", "createMemo", "createTableCollection", "columns", "rows", "items", "getKey", "getTextValue", "showSelectionCheckboxes", "state", "createTableState", "disabledKeys", "selectionMode", "selectedKeys", "defaultSelectedKeys", "onSelectionChange", "sortDescriptor", "onSortChange", "gridProps", "createTable", "id", "isVirtualized", "onRowAction", "onCellAction", "focusMode", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "renderValues", "isDisabled", "isEmpty", "length", "renderProps", "useRenderProps", "children", "class", "style", "defaultClassName", "domProps", "filtered", "filterDOMProps", "global", "cleanGridProps", "_ref1", "rest", "cleanFocusProps", "_ref2", "contextValue", "_$createComponent", "Provider", "value", "_el$", "_$getNextElement", "_tmpl$", "_$use", "_$spread", "_$mergeProps", "undefined", "_$insert", "renderChildren", "_$runHydrationEvents", "TableHeader", "context", "useContext", "Error", "rowGroupProps", "createTableRowGroup", "type", "cleanRowGroupProps", "_ref", "_el$2", "_tmpl$2", "_el$3", "firstChild", "TableColumn", "columnNode", "node", "getItem", "key", "textValue", "String", "level", "index", "hasChildNodes", "childNodes", "columnHeaderProps", "createTableColumnHeader", "allowsSorting", "isHovered", "hoverProps", "createHover", "sortDirection", "column", "direction", "focusedKey", "isSortable", "cleanColumnHeaderProps", "cleanHoverProps", "_ref3", "_el$4", "_tmpl$3", "_$memo", "TableBody", "_el$5", "_tmpl$4", "Show", "when", "renderEmptyState", "fallback", "For", "each", "item", "TableRow", "rowNode", "rowProps", "isSelected", "isPressed", "createTableRow", "onAction", "cleanRowProps", "rowContextValue", "rowKey", "_el$6", "_tmpl$5", "TableCell", "tableContext", "rowContext", "cellNode", "cellKey", "parentKey", "gridCellProps", "createTableCell", "cleanCellProps", "_el$7", "_tmpl$6", "TableSelectionCheckbox", "checkboxProps", "createTableSelectionCheckbox", "_el$8", "_tmpl$7", "TableSelectAllCheckbox", "createTableSelectAllCheckbox", "_el$9", "Header", "Column", "Body", "Row", "Cell", "SelectionCheckbox", "SelectAllCheckbox", "createContext", "createMemo", "createSignal", "splitProps", "useContext", "For", "createGridList", "createGridListItem", "createGridListSelectionCheckbox", "createFocusRing", "createHover", "createGridState", "GridListContext", "createContext", "GridListStateContext", "buildGridCollection", "items", "getKey", "getTextValue", "getDisabled", "nodes", "map", "item", "index", "key", "type", "value", "textValue", "String", "level", "hasChildNodes", "childNodes", "isDisabled", "keyMap", "Map", "forEach", "node", "set", "rows", "columns", "headerRows", "rowCount", "length", "columnCount", "size", "getKeys", "n", "getItem", "get", "at", "getKeyBefore", "getKeyAfter", "getFirstKey", "getLastKey", "getChildren", "_key", "getCell", "_rowKey", "_columnKey", "Symbol", "iterator", "GridList", "props", "local", "stateProps", "ariaProps", "splitProps", "ref", "setRef", "createSignal", "collection", "createMemo", "allDisabledKeys", "keys", "Set", "disabledKeys", "add", "state", "createGridState", "selectionMode", "selectedKeys", "defaultSelectedKeys", "onSelectionChange", "gridProps", "createGridList", "id", "isVirtualized", "onAction", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "renderValues", "isEmpty", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filtered", "filterDOMProps", "global", "cleanGridProps", "_ref1", "rest", "cleanFocusProps", "_ref2", "contextValue", "_$createComponent", "Provider", "children", "_el$", "_$getNextElement", "_tmpl$", "_$use", "_$spread", "_$mergeProps", "undefined", "_$insert", "_c$", "_$memo", "renderEmptyState", "For", "each", "_$runHydrationEvents", "GridListItem", "context", "useContext", "Error", "itemNode", "rowProps", "gridCellProps", "isSelected", "isPressed", "createGridListItem", "isHovered", "hoverProps", "createHover", "focusedKey", "cleanRowProps", "cleanHoverProps", "_ref3", "_el$2", "_tmpl$2", "_el$3", "firstChild", "renderChildren", "GridListSelectionCheckbox", "checkboxProps", "createGridListSelectionCheckbox", "itemKey", "_el$4", "_tmpl$3", "Item", "SelectionCheckbox", "createContext", "createMemo", "createSignal", "splitProps", "useContext", "For", "Show", "createTree", "createTreeItem", "createTreeSelectionCheckbox", "createFocusRing", "createHover", "createTreeState", "createTreeCollection", "TreeContext", "createContext", "TreeStateContext", "TreeItemContext", "Tree", "props", "local", "stateProps", "ariaProps", "splitProps", "ref", "setRef", "createSignal", "state", "createTreeState", "collectionFactory", "expandedKeys", "createTreeCollection", "items", "disabledKeys", "selectionMode", "selectedKeys", "defaultSelectedKeys", "onSelectionChange", "defaultExpandedKeys", "onExpandedChange", "treeProps", "createTree", "id", "isVirtualized", "onAction", "isDisabled", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "renderValues", "createMemo", "isEmpty", "length", "renderProps", "useRenderProps", "class", "style", "defaultClassName", "domProps", "filtered", "filterDOMProps", "global", "cleanTreeProps", "_ref1", "rest", "cleanFocusProps", "_ref2", "contextValue", "collection", "renderItem", "children", "visibleRows", "rows", "_$createComponent", "Provider", "value", "_el$", "_$getNextElement", "_tmpl$", "_$use", "_$spread", "_$mergeProps", "undefined", "_$insert", "_c$", "_$memo", "renderEmptyState", "For", "each", "node", "itemData", "key", "textValue", "hasChildNodes", "childNodes", "map", "child", "itemState", "isExpanded", "isExpandable", "level", "_$runHydrationEvents", "TreeItem", "context", "useContext", "Error", "itemNode", "getItem", "type", "item", "String", "index", "rowProps", "gridCellProps", "expandButtonProps", "_expandButtonProps", "isSelected", "isPressed", "createTreeItem", "isHovered", "hoverProps", "createHover", "focusedKey", "cleanRowProps", "cleanHoverProps", "_ref3", "itemContextValue", "_el$2", "_tmpl$2", "_el$3", "firstChild", "renderChildren", "TreeExpandButton", "itemContext", "stateContext", "cleanExpandProps", "_ref", "Show", "when", "_el$4", "_tmpl$3", "TreeSelectionCheckbox", "checkboxProps", "createTreeSelectionCheckbox", "itemKey", "_el$5", "_tmpl$4", "Item", "ExpandButton", "SelectionCheckbox", "createContext", "createMemo", "splitProps", "useContext", "Show", "createColorSlider", "createColorArea", "createColorWheel", "createColorField", "createColorSwatch", "createFocusRing", "createHover", "createColorSliderState", "createColorAreaState", "createColorWheelState", "createColorFieldState", "normalizeColor", "ColorSliderContext", "createContext", "ColorSlider", "props", "local", "stateProps", "ariaProps", "rest", "splitProps", "state", "createColorSliderState", "value", "defaultValue", "onChange", "onChangeEnd", "channel", "isDisabled", "trackRef", "setTrackRef", "el", "trackProps", "thumbProps", "inputProps", "labelProps", "createColorSlider", "channelName", "renderValues", "createMemo", "isDragging", "getThumbValue", "color", "renderProps", "useRenderProps", "children", "class", "style", "defaultClassName", "domProps", "filterDOMProps", "global", "_$createComponent", "Provider", "_el$", "_$getNextElement", "_tmpl$2", "_el$4", "firstChild", "_el$5", "_co$", "_$getNextMarker", "nextSibling", "_el$6", "_el$7", "_co$2", "_el$3", "_$spread", "_$mergeProps", "undefined", "_$insert", "Show", "when", "label", "_el$2", "_tmpl$", "_$runHydrationEvents", "renderChildren", "ColorSliderTrack", "context", "useContext", "Error", "cleanTrackProps", "ref", "_ref", "_trackStyle", "mergedStyle", "trackStyle", "renderStyle", "_el$8", "_tmpl$3", "_$use", "ColorSliderThumb", "isFocused", "isFocusVisible", "focusProps", "createFocusRing", "isHovered", "hoverProps", "createHover", "cleanThumbProps", "_thumbStyle", "cleanFocusProps", "cleanHoverProps", "thumbStyle", "_el$9", "Track", "Thumb", "ColorAreaContext", "ColorArea", "createColorAreaState", "xChannel", "yChannel", "areaRef", "setAreaRef", "colorAreaProps", "gradientProps", "xInputProps", "yInputProps", "createColorArea", "cleanColorAreaProps", "_areaStyle", "areaStyle", "_el$0", "_tmpl$4", "_el$11", "_el$12", "_co$3", "_el$1", "_el$10", "ColorAreaGradient", "cleanGradientProps", "_gradStyle", "gradStyle", "_el$13", "ColorAreaThumb", "_el$14", "Gradient", "ColorWheelContext", "ColorWheel", "createColorWheelState", "wheelRef", "setWheelRef", "createColorWheel", "hue", "getHue", "_el$15", "_tmpl$5", "_el$17", "_el$18", "_co$4", "_el$16", "ColorWheelTrack", "_el$19", "ColorWheelThumb", "_el$20", "ColorFieldContext", "ColorField", "createColorFieldState", "colorFormat", "isReadOnly", "inputRef", "createColorField", "isInvalid", "_el$21", "_tmpl$6", "_el$23", "_el$24", "_co$5", "_el$25", "_el$26", "_co$6", "_el$22", "ColorFieldInput", "cleanInputProps", "_inputStyle", "_el$27", "_tmpl$7", "Input", "ColorSwatch", "swatchProps", "createColorSwatch", "normalizeColor", "colorValue", "toString", "cleanSwatchProps", "_swatchStyle", "swatchStyle", "_el$28", "createContext", "createMemo", "createSignal", "splitProps", "Dynamic", "createLandmark", "getLandmarkController", "LandmarkContext", "createContext", "roleToSemanticElement", "main", "navigation", "search", "banner", "contentinfo", "complementary", "form", "region", "Landmark", "props", "local", "ariaProps", "splitProps", "ref", "setRef", "createSignal", "elementType", "createMemo", "role", "landmarkAria", "createLandmark", "id", "focus", "renderValues", "resolvedClass", "cls", "class", "resolvedStyle", "style", "domProps", "filterDOMProps", "global", "_$createComponent", "Dynamic", "_$mergeProps", "component", "landmarkProps", "slot", "children", "useLandmarkController", "getLandmarkController"]
|
|
7
7
|
}
|