@locus-ui/components 0.0.12 → 0.0.15
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/index.css +278 -4
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +238 -5
- package/dist/index.d.ts +238 -5
- package/dist/index.js +756 -156
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +852 -252
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/accordion/content/accordion-content.tsx","../src/utils/get-component-props.ts","../src/components/accordion/accordion-context.ts","../src/components/accordion/content/accordion-content.props.ts","../src/components/accordion/header/accordion-header.tsx","../src/icons/icon-colors.ts","../src/icons/chevron-down.icon.tsx","../src/components/accordion/header/accordion-header.props.ts","../src/components/accordion/item/accordion-item.tsx","../src/utils/filter-children.ts","../src/components/accordion/item/accordion-item.props.ts","../src/components/accordion/root/accordion-root.tsx","../src/props/align.prop.ts","../src/props/margin.prop.ts","../src/props/padding.prop.ts","../src/props/radius.prop.ts","../src/props/roundness.prop.ts","../src/props/size.prop.ts","../src/props/spacing.prop.ts","../src/utils/use-controllable-state.ts","../src/components/accordion/root/accordion-root.props.ts","../src/components/accordion/accordion.tsx","../src/components/badge/badge.tsx","../src/components/badge/badge.props.ts","../src/components/box/box.tsx","../src/components/box/box.props.ts","../src/components/button/button.tsx","../src/components/button/button.props.ts","../src/components/checkbox/indicator/checkbox-indicator.tsx","../src/icons/check-mark.icon.tsx","../src/icons/minus.icon.tsx","../src/components/checkbox/checkbox-context.ts","../src/components/checkbox/root/checkbox-root.props.ts","../src/components/checkbox/indicator/checkbox-indicator.props.ts","../src/components/checkbox/label/checkbox-label.tsx","../src/components/text/text.tsx","../src/components/text/text.props.ts","../src/components/checkbox/label/checkbox-label.props.ts","../src/components/checkbox/root/checkbox-root.tsx","../src/components/checkbox/checkbox.tsx","../src/components/container/container.tsx","../src/components/portal/backdrop/portal-backdrop.tsx","../src/components/portal/portal-context.tsx","../src/components/portal/backdrop/portal-backdrop.props.ts","../src/components/portal/content/portal-content.tsx","../src/components/theme/theme-context.tsx","../src/components/portal/utils/use-anchor-position.ts","../src/components/portal/content/portal-content.props.ts","../src/components/portal/root/portal-root.tsx","../src/components/portal/trigger/portal-trigger.tsx","../src/components/portal/root/portal-root.props.ts","../src/components/portal/portal.tsx","../src/components/select/content/select-content.tsx","../src/components/select/select-context.tsx","../src/components/select/utils/user-composed-refs.ts","../src/components/select/viewport/select-viewport.tsx","../src/components/select/group/select-group.tsx","../src/components/select/group/select-group.props.ts","../src/components/select/item/select-item.tsx","../src/components/select/item/select-item-indicator.tsx","../src/components/select/item/select-item.props.ts","../src/components/select/label/select-label.tsx","../src/components/select/label/select-label.props.ts","../src/components/select/root/select-root.tsx","../src/components/select/trigger/select-trigger.tsx","../src/components/select/value/select-value.tsx","../src/components/select/trigger/select-trigger-icon.tsx","../src/components/select/trigger/select-trigger.props.ts","../src/components/select/root/select-root.props.ts","../src/components/select/separator/select-separator.tsx","../src/components/select/select.tsx","../src/components/separator/separator.tsx","../src/components/separator/separator.props.ts","../src/components/theme/theme.tsx","../src/components/theme/theme-control.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { FC } from \"react\";\nimport { PaddingProps } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useAccordionContext } from \"../accordion-context\";\nimport {\n AccordionContentInternalProps,\n AccordionContentPropDefs,\n} from \"./accordion-content.props\";\n\ninterface AllAccordionContentProps\n extends AccordionContentInternalProps, PaddingProps {}\n\ntype AccordionContentProps = AllAccordionContentProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\n/** Content for an accordion item */\nconst AccordionContent: FC<AccordionContentProps> = (props) => {\n const context = useAccordionContext();\n const { className, children, dataAttrs, ...rest } = getComponentProps(\n props,\n AccordionContentPropDefs,\n );\n\n return (\n <div\n data-variant={context.variant}\n className={clsx(\"accordion-content\", className)}\n {...rest}\n >\n <div className=\"accordion-content-inner\">\n <div>{children}</div>\n </div>\n </div>\n );\n};\nAccordionContent.displayName = \"Accordion.Content\";\n\nexport { AccordionContent, AccordionContentProps, AllAccordionContentProps };\n","import clsx from \"clsx\";\nimport { PropDef } from \"../props\";\n\nexport function getComponentProps<\n P extends {\n className?: string;\n style?: React.CSSProperties;\n [key: string]: any;\n },\n T extends Record<string, PropDef>[]\n>(props: P, ...propDefs: T) {\n let style: React.CSSProperties = props.style ?? {};\n const classNames: string[] = props.className ? [props.className] : [];\n const dataAttrs: Record<string, string> = {};\n const extractedProps: Record<string, any> = {};\n\n const allProps = Object.assign({}, ...propDefs);\n const propKeys = Object.keys(allProps);\n\n // Create a copy of props excluding the component-specific props\n const restProps = { ...props };\n delete restProps.className;\n delete restProps.style;\n\n for (const key of propKeys) {\n const prop = allProps[key];\n const value = props?.[key];\n\n // Remove the processed prop from restProps\n delete restProps[key];\n\n // Store the value for non-enum props (boolean, string, function)\n if (\n prop.type === \"boolean\" ||\n prop.type === \"string\" ||\n prop.type === \"value | array\" ||\n prop.type === \"reactNode\" ||\n prop.type === \"function\"\n ) {\n extractedProps[key] = value;\n\n if (prop.cssProperty && value !== undefined && value !== null) {\n style = {\n ...style,\n [prop.cssProperty]:\n prop.type === \"boolean\" ? (value ? \"1\" : \"0\") : value,\n };\n }\n\n if (prop.dataAttr) {\n if (value) dataAttrs[`data-${prop.dataAttr}`] = value;\n else if (prop.default !== undefined) {\n dataAttrs[`data-${prop.dataAttr}`] = prop.default;\n }\n }\n\n continue;\n }\n\n const applyValue = (propValue: any, breakpoint?: string) => {\n const usedBreakpoint = breakpoint ? `-${breakpoint}` : \"\";\n\n if (prop.type === \"enum\" || prop.type === \"enum | string\") {\n if (propValue !== null && propValue !== undefined) {\n if (!breakpoint) extractedProps[key] = propValue;\n\n if (!prop.values.includes(propValue)) {\n if (prop.className) {\n classNames.push(\n breakpoint ? `${prop.className}-${breakpoint}` : prop.className\n );\n style = {\n ...style,\n [`--custom-${key}${usedBreakpoint}`]: propValue,\n };\n }\n\n if (prop.dataAttr) {\n dataAttrs[`data-${prop.dataAttr}${usedBreakpoint}`] = propValue;\n }\n } else if (prop.dataAttr) {\n if (propValue === \"inherit\" && prop.className) {\n classNames.push(prop.className);\n }\n\n dataAttrs[`data-${prop.dataAttr}${usedBreakpoint}`] = propValue;\n }\n } else if (prop.dataAttr && prop.default) {\n if (!breakpoint) extractedProps[key] = prop.default;\n if (prop.dataAttr) {\n dataAttrs[`data-${prop.dataAttr}${usedBreakpoint}`] = prop.default;\n }\n }\n }\n };\n\n if (\n \"responsive\" in prop &&\n prop.responsive &&\n value &&\n typeof value === \"object\" &&\n !Array.isArray(value)\n ) {\n // Apply breakpoint-specific values\n for (const [bp, bpValue] of Object.entries(value)) {\n applyValue(bpValue, bp);\n }\n\n if (\"dataAttr\" in prop && prop.dataAttr) {\n dataAttrs[`data-${prop.dataAttr}`] = \"\";\n }\n } else applyValue(value);\n }\n\n return {\n ...restProps,\n ...extractedProps,\n style,\n dataAttrs,\n className: clsx(classNames),\n };\n}\n","import React from \"react\";\n\nexport interface AccordionContextValue {\n value: string | string[] | null;\n setValue: (value: string | string[] | null) => void;\n onValueChange?: (value: string | string[] | null) => void;\n variant?: string;\n multiple?: boolean;\n itemsRef: React.RefObject<Map<string, HTMLDivElement>>;\n itemValues: React.RefObject<string[]>;\n}\n\nexport const AccordionContext =\n React.createContext<AccordionContextValue | null>(null);\n\nexport function useAccordionContext() {\n const context = React.useContext(AccordionContext);\n if (!context) {\n throw new Error(\n \"Accordion components must be used within an Accordion.Root\"\n );\n }\n return context;\n}\n","import { GetPropDefTypes } from \"../../../props/prop-def\";\n\nconst AccordionContentPropDefs = {\n //\n};\n\ntype AccordionContentInternalProps = GetPropDefTypes<\n typeof AccordionContentPropDefs\n>;\n\nexport { AccordionContentInternalProps, AccordionContentPropDefs };\n","import clsx from \"clsx\";\nimport { FC } from \"react\";\nimport { ChevronDown } from \"../../../icons/chevron-down.icon\";\nimport { PaddingProps } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useAccordionContext } from \"../accordion-context\";\nimport {\n AccordionHeaderInternalProps,\n AccordionHeaderPropDefs,\n} from \"./accordion-header.props\";\n\ninterface AllAccordionHeaderProps\n extends AccordionHeaderInternalProps, PaddingProps {}\n\ntype AccordionHeaderProps = AllAccordionHeaderProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\n/** Header for an accordion item */\nconst AccordionHeader: FC<AccordionHeaderProps> = (props) => {\n const context = useAccordionContext();\n const { className, children, value, dataAttrs, ...rest } = getComponentProps(\n props,\n AccordionHeaderPropDefs,\n );\n\n const itemOpen = context.multiple\n ? context.value?.includes(value ?? \"\")\n : context.value === value;\n\n const handleClick = () => {\n if (!value) return;\n\n if (context.multiple) {\n const current = (context.value as string[]) ?? [];\n const next = current.includes(value)\n ? current.filter((v) => v !== value)\n : [...current, value];\n context.setValue(next.length ? next : null);\n } else {\n context.setValue(context.value === value ? null : value);\n }\n };\n\n return (\n <div\n data-open={itemOpen}\n data-variant={context.variant}\n className={clsx(\"accordion-header\", className)}\n role=\"button\"\n tabIndex={0}\n onClick={handleClick}\n onKeyDown={(e) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n handleClick();\n }\n }}\n {...rest}\n >\n <span>{children}</span>\n\n <span className=\"accordion-header-indicator\" aria-hidden=\"true\">\n <ChevronDown />\n </span>\n </div>\n );\n};\nAccordionHeader.displayName = \"Accordion.Header\";\n\nexport { AccordionHeader, AccordionHeaderProps, AllAccordionHeaderProps };\n","type IconColors = \"currentColor\" | \"primary\" | \"white\" | \"black\";\n\ninterface IconProps {\n color?: IconColors;\n}\n\nconst colorMap: Record<IconColors, string> = {\n currentColor: \"currentColor\",\n primary: \"rgb(var(--primary))\",\n white: \"white\",\n black: \"black\",\n};\n\nexport { colorMap, IconProps };\n","import * as React from \"react\";\nimport { colorMap, IconProps } from \"./icon-colors\";\n\nexport const ChevronDown: React.FC<IconProps> = ({\n color = \"currentColor\",\n}) => {\n return (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill={colorMap[color]}\n d=\"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n};\n","import { GetPropDefTypes, PropDef } from \"../../../props/prop-def\";\n\nconst AccordionHeaderPropDefs = {\n /** The value of the parent AccordionItem — injected automatically */\n value: {\n type: \"string\",\n } satisfies PropDef<string>,\n};\n\ntype AccordionHeaderInternalProps = GetPropDefTypes<\n typeof AccordionHeaderPropDefs\n>;\n\nexport { AccordionHeaderInternalProps, AccordionHeaderPropDefs };\n","import clsx from \"clsx\";\nimport React, { FC, useEffect, useMemo } from \"react\";\nimport { filterChildren } from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useAccordionContext } from \"../accordion-context\";\nimport { AccordionContent } from \"../content/accordion-content\";\nimport { AccordionHeader } from \"../header/accordion-header\";\nimport {\n AccordionItemInternalProps,\n AccordionItemPropDefs,\n} from \"./accordion-item.props\";\n\ninterface AllAccordionItemProps extends AccordionItemInternalProps {}\n\nconst ALLOWED_CHILDREN = [\n AccordionHeader.displayName!,\n AccordionContent.displayName!,\n];\n\n/**\n * An individual item within an accordion. Contains the header and content for a single section of the accordion.\n */\ntype AccordionItemProps = AllAccordionItemProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\nconst AccordionItem: FC<AccordionItemProps> = (props) => {\n const context = useAccordionContext();\n const { open, value, className, dataAttrs, ...rest } = getComponentProps(\n props,\n AccordionItemPropDefs,\n );\n\n const itemOpen =\n open ??\n (context.multiple\n ? context.value?.includes(value ?? \"\")\n : context.value === value);\n\n const validChildren = filterChildren(props.children, ALLOWED_CHILDREN, {\n parentDisplayName: AccordionItem.displayName,\n }) as React.ReactElement[];\n\n const { header, content } = useMemo(() => {\n const header = validChildren.find(\n (child) =>\n (child.type as React.FC).displayName === AccordionHeader.displayName,\n );\n\n const content = validChildren.find(\n (child) =>\n (child.type as React.FC).displayName === AccordionContent.displayName,\n );\n\n return { header, content };\n }, [validChildren]);\n\n useEffect(() => {\n if (!value) return;\n\n return () => {\n const values = context.itemValues.current;\n const index = values.indexOf(value);\n if (index > -1) values.splice(index, 1);\n };\n }, [value]);\n\n const headerWithValue = header\n ? React.cloneElement(header as React.ReactElement<{ value?: string }>, {\n value,\n })\n : null;\n\n return (\n <div\n data-variant={context.variant}\n className={clsx(\"accordion-item\", className)}\n {...rest}\n data-open={itemOpen}\n >\n {headerWithValue}\n {content}\n </div>\n );\n};\nAccordionItem.displayName = \"Accordion.Item\";\n\nexport { AccordionItem, AccordionItemProps, AllAccordionItemProps };\n","import * as React from \"react\";\n\n/**\n * Type utility to restrict children to specific React element types.\n * Use with Omit<Props, 'children'> & StrictChildren<AllowedProps>\n *\n * @example\n * type MyComponentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>\n * & StrictChildren<ChildAProps | ChildBProps>;\n */\nexport type StrictChildren<AllowedChildProps> = {\n children:\n | React.ReactElement<AllowedChildProps>\n | React.ReactElement<AllowedChildProps>[];\n};\n\n/**\n * Type utility to replace the children prop with strictly typed children.\n * Combines Omit and StrictChildren in one step.\n *\n * @example\n * type MyComponentProps = WithStrictChildren<\n * React.HTMLAttributes<HTMLDivElement>,\n * ChildAProps | ChildBProps\n * >;\n */\nexport type WithStrictChildren<\n Props extends { children?: React.ReactNode },\n AllowedChildProps\n> = Omit<Props, \"children\"> & StrictChildren<AllowedChildProps>;\n\nexport interface FilterChildrenOptions {\n /** The parent component's displayName (for error/warning messages) */\n parentDisplayName?: string;\n /** If true, throws an error for invalid children instead of warning */\n strict?: boolean;\n}\n\n/**\n * Filters React children to only include allowed components based on displayName.\n * Logs a warning or throws an error for any invalid children.\n *\n * @param children - The children to filter\n * @param allowedDisplayNames - Array of allowed component displayNames\n * @param options - Configuration options\n * @returns Filtered array of valid children\n */\nexport function filterChildren(\n children: React.ReactNode,\n allowedDisplayNames: string[],\n options: FilterChildrenOptions = {}\n): React.ReactNode[] {\n const { parentDisplayName, strict = false } = options;\n\n return React.Children.toArray(children).filter((child) => {\n if (!React.isValidElement(child)) return false;\n\n const childType = child.type as React.ComponentType;\n const displayName = childType?.displayName;\n\n if (!displayName || !allowedDisplayNames.includes(displayName)) {\n const parent = parentDisplayName ?? \"Component\";\n const childName = displayName || \"Unknown\";\n const allowed = allowedDisplayNames.join(\", \");\n\n const message =\n `${parent}: Invalid child \"${childName}\"${\n strict ? \"\" : \" was filtered out\"\n }. ` + `Only ${allowed} are allowed as direct children.`;\n\n if (strict) throw new Error(message);\n console.warn(message);\n\n return false;\n }\n\n return true;\n });\n}\n","import { GetPropDefTypes, PropDef } from \"../../../props\";\n\nconst AccordionItemPropDefs = {\n /**\n * Sets the accordion item to be open by default.\n */\n open: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n /**\n * The value of the accordion item. Automatically generated if not provided.\n */\n value: {\n type: \"string\",\n } satisfies PropDef<string>,\n} as const;\n\ntype AccordionItemInternalProps = GetPropDefTypes<typeof AccordionItemPropDefs>;\n\nexport { AccordionItemInternalProps, AccordionItemPropDefs };\n","import clsx from \"clsx\";\nimport { FC, HTMLAttributes, ReactElement, useMemo, useRef } from \"react\";\nimport { SizeProp, SizePropDef } from \"../../../props\";\nimport {\n filterChildren,\n WithStrictChildren,\n} from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useControllableState } from \"../../../utils/use-controllable-state\";\nimport { AccordionContext } from \"../accordion-context\";\nimport { AccordionItem, AccordionItemProps } from \"../item/accordion-item\";\nimport {\n AccordionRootInternalProps,\n AccordionRootPropsDefs,\n} from \"./accordion-root.props\";\n\ninterface AllAccordionRootProps extends AccordionRootInternalProps, SizeProp {}\n\nconst ALLOWED_CHILDREN = [AccordionItem.displayName!];\n\n/**\n * A versatile Accordion component, managing state, context, and styling.\n */\ntype AccordionRootProps = AllAccordionRootProps &\n WithStrictChildren<HTMLAttributes<HTMLDivElement>, AccordionItemProps>;\n\nconst AccordionRoot: FC<AccordionRootProps> = (props) => {\n const {\n variant,\n multiple,\n size,\n value: propValue,\n onValueChange,\n className,\n dataAttrs,\n ...rest\n } = getComponentProps(props, AccordionRootPropsDefs, SizePropDef);\n\n const [value, setValue] = useControllableState({\n value: propValue,\n defaultValue: propValue ?? null,\n onChange: onValueChange,\n });\n\n const validChildren = filterChildren(props.children, ALLOWED_CHILDREN, {\n parentDisplayName: AccordionRoot.displayName,\n }) as ReactElement<{ value?: string; children?: React.ReactNode }>[];\n\n const itemsRef = useRef<Map<string, HTMLDivElement>>(new Map());\n const itemValues = useRef<string[]>([]);\n\n const contextValue = useMemo(\n () => ({\n variant,\n multiple,\n value,\n setValue,\n onValueChange,\n itemsRef,\n itemValues,\n }),\n [variant, multiple, value, setValue, onValueChange],\n );\n\n return (\n <AccordionContext.Provider value={contextValue}>\n <div\n className={clsx(\"accordion-root\", className)}\n {...dataAttrs}\n {...rest}\n >\n {validChildren.map((child, index) => (\n <AccordionItem\n key={index}\n value={child.props.value ?? String(index)}\n {...child.props}\n >\n {child.props.children}\n </AccordionItem>\n ))}\n </div>\n </AccordionContext.Provider>\n );\n};\nAccordionRoot.displayName = \"Accordion\";\n\nexport { AccordionRoot, AccordionRootProps, AllAccordionRootProps };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst Alignments = [\"start\", \"center\", \"end\"] as const;\n\nconst AlignPropDef = {\n /**\n * The alignment of the component.\n */\n align: {\n type: \"enum\",\n values: Alignments,\n dataAttr: \"align\",\n } satisfies PropDef<(typeof Alignments)[number]>,\n};\n\ntype AlignProp = GetPropDefTypes<typeof AlignPropDef>;\n\nexport { Alignments, AlignProp, AlignPropDef };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst marginValues = [\n \"auto\",\n \"inherit\",\n \"-8\",\n \"-6\",\n \"-5\",\n \"-4\",\n \"-3\",\n \"-2\",\n \"-1\",\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"8\",\n] as const;\n\nconst MarginPropDefs = {\n /**\n * Sets margin on all sides of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example m=\"4\" // 16px margin on all sides\n * @example m=\"-26px\" // -26px negative margin custom value\n * @example m={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n */\n m: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"m\",\n className: \"lcs-m\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the top of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example mt=\"4\" // 16px margin on all sides\n * @example mt=\"-26px\" // -26px negative margin custom value\n * @example mt={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n */\n mt: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"mt\",\n className: \"lcs-mt\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the bottom of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example mb=\"4\" // 16px margin on all sides\n * @example mb=\"-26px\" // -26px negative margin custom value\n * @example mb={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n mb: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"mb\",\n className: \"lcs-mb\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the left of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example ml=\"4\" // 16px margin on all sides\n * @example ml=\"-26px\" // -26px negative margin custom value\n * @example ml={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n */\n ml: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"ml\",\n className: \"lcs-ml\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the right of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example mr=\"4\" // 16px margin on all sides\n * @example mr=\"-26px\" // -26px negative margin custom value\n * @example mr={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mr: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"mr\",\n className: \"lcs-mr\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the left and right (horizontal) sides of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example mx=\"4\" // 16px horizontal margin\n * @example mx=\"-26px\" // -26px negative horizontal margin custom value\n * @example mx={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive horizontal margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mx: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"mx\",\n className: \"lcs-mx\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the top and bottom (vertical) sides of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example my=\"4\" // 16px vertical margin\n * @example my=\"-26px\" // -26px negative vertical margin custom value\n * @example my={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive vertical margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n my: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"my\",\n className: \"lcs-my\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n};\n\ntype MarginProps = GetPropDefTypes<typeof MarginPropDefs>;\n\nexport { MarginPropDefs, MarginProps };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst paddingValues = [\n \"inherit\",\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"8\",\n] as const;\n\nconst PaddingPropDefs = {\n /**\n * Sets padding on all sides of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example p=\"4\" // 16px padding on all sides\n * @example p=\"26px\" // 26px padding custom value\n * @example p={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n */\n p: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"p\",\n className: \"lcs-p\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the top of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example pt=\"4\" // 16px top padding\n * @example pt=\"26px\" // 26px top padding custom value\n * @example pt={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive top padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n */\n pt: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"pt\",\n className: \"lcs-pt\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the bottom of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example pb=\"4\" // 16px bottom padding\n * @example pb=\"26px\" // 26px bottom padding custom value\n * @example pb={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive bottom padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n pb: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"pb\",\n className: \"lcs-pb\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the left of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example pl=\"4\" // 16px left padding\n * @example pl=\"26px\" // 26px left padding custom value\n * @example pl={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive left padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n */\n pl: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"pl\",\n className: \"lcs-pl\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the right of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example pr=\"4\" // 16px right padding\n * @example pr=\"26px\" // 26px right padding custom value\n * @example pr={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive right padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n pr: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"pr\",\n className: \"lcs-pr\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the left and right (horizontal) sides of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example px=\"4\" // 16px horizontal padding\n * @example px=\"26px\" // 26px horizontal padding custom value\n * @example px={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive horizontal padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n px: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"px\",\n className: \"lcs-px\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the top and bottom (vertical) sides of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example py=\"4\" // 16px vertical padding\n * @example py=\"26px\" // 26px vertical padding custom value\n * @example py={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive vertical padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n py: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"py\",\n className: \"lcs-py\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n};\n\ntype PaddingProps = GetPropDefTypes<typeof PaddingPropDefs>;\n\nexport { PaddingPropDefs, PaddingProps };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst radii = [\n \"none\",\n \"xs\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\",\n \"full\",\n \"inherit\",\n] as const;\n\nconst RadiusPropDefs = {\n /**\n * Sets the border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius=\"md\" // medium border-radius\n * @example radius=\"26px\" // 26px border-radius custom value\n * @example radius={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @default \"theme\" // uses the theme's default border-radius value or none if not set\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\n */\n radius: {\n type: \"enum | string\",\n values: radii,\n default: \"theme\",\n dataAttr: \"radius\",\n className: \"lcs-radius\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the top border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius-t=\"md\" // medium border-radius\n * @example radius-t=\"26px\" // 26px border-radius custom value\n * @example radius-t={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius\n */\n \"radius-t\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-t\",\n className: \"lcs-radius-t\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the right border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius-r=\"md\" // medium border-radius\n * @example radius-r=\"26px\" // 26px border-radius custom value\n * @example radius-r={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius\n */\n \"radius-r\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-r\",\n className: \"lcs-radius-r\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the bottom border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius-b=\"md\" // medium border-radius\n * @example radius-b=\"26px\" // 26px border-radius custom value\n * @example radius-b={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius\n */\n \"radius-b\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-b\",\n className: \"lcs-radius-b\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the left border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius-l=\"md\" // medium border-radius\n * @example radius-l=\"26px\" // 26px border-radius custom value\n * @example radius-l={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-top-radius\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-bottom-radius\n */\n \"radius-l\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-l\",\n className: \"lcs-radius-l\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the top-left border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius-tl=\"md\" // medium border-radius\n * @example radius-tl=\"26px\" // 26px border-radius custom value\n * @example radius-tl={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius\n */\n \"radius-tl\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-tl\",\n className: \"lcs-radius-tl\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the top-right border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example \"radius-tr\"=\"md\" // medium border-radius\n * @example \"radius-tr\"=\"26px\" // 26px border-radius custom value\n * @example \"radius-tr\"={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius\n */\n \"radius-tr\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-tr\",\n className: \"lcs-radius-tr\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the bottom-right border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example \"radius-br\"=\"md\" // medium border-radius\n * @example \"radius-br\"=\"26px\" // 26px border-radius custom value\n * @example \"radius-br\"={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius\n */\n \"radius-br\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-br\",\n className: \"lcs-radius-br\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the bottom-left border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example \"radius-bl\"=\"md\" // medium border-radius\n * @example \"radius-bl\"=\"26px\" // 26px border-radius custom value\n * @example \"radius-bl\"={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius\n */\n \"radius-bl\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-bl\",\n className: \"lcs-radius-bl\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n};\n\ntype RadiusProps = GetPropDefTypes<typeof RadiusPropDefs>;\n\nexport { radii, RadiusPropDefs, RadiusProps };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst roundness = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"inherit\"] as const;\n\nconst RoundnessPropDef = {\n /**\n * Sets the roundness multiplier for the element's radius.\n * Supports scaled and inherit values.\n *\n * @example roundness=\"4\" // 8px base roundness\n * @example roundness=\"inherit\" // inherits roundness from parent\n *\n * @default \"theme\" // uses the theme's default roundness value or none if not set\n */\n roundness: {\n type: \"enum\",\n values: roundness,\n default: \"theme\",\n dataAttr: \"roundness\",\n } satisfies PropDef<(typeof roundness)[number]>,\n};\n\ntype RoundnessProp = GetPropDefTypes<typeof RoundnessPropDef>;\n\nexport { roundness, RoundnessProp, RoundnessPropDef };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst Sizes = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"] as const;\n\nconst SizePropDef = {\n /**\n * Sets the size of the component.\n *\n * @example size=\"md\" // medium sized component\n */\n size: {\n type: \"enum | string\",\n values: Sizes,\n dataAttr: \"size\",\n className: \"size\",\n } satisfies PropDef<(typeof Sizes)[number]>,\n};\n\ntype SizeProp = GetPropDefTypes<typeof SizePropDef>;\n\nexport { SizeProp, SizePropDef, Sizes };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst spacingValues = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"inherit\"] as const;\n\nconst SpacingPropDef = {\n /**\n * Sets the spacing scale for the component.\n * This multiplier affects various layout properties such as margin, padding, and gap values.\n *\n * @example spacing=\"md\" // medium spacing scale (1)\n * @example spacing={{ initial: \"sm\", lg: \"xl\" }} // responsive spacing\n *\n * @default \"theme\" // uses the theme's default spacing value or none if not set\n */\n spacing: {\n type: \"enum\",\n values: spacingValues,\n dataAttr: \"spacing\",\n default: \"theme\",\n responsive: true,\n } satisfies PropDef<(typeof spacingValues)[number]>,\n};\n\ntype SpacingProp = GetPropDefTypes<typeof SpacingPropDef>;\n\nexport { SpacingProp, SpacingPropDef, spacingValues };\n","import * as React from \"react\";\n\nexport function useControllableState<T>({\n value,\n defaultValue,\n onChange,\n}: {\n value?: T;\n defaultValue: T;\n onChange?: (value: T) => void;\n}) {\n const [state, setState] = React.useState(defaultValue);\n\n const isControlled = value !== undefined;\n const current = isControlled ? value : state;\n\n const set = React.useCallback(\n (value: T) => {\n if (!isControlled) setState(value);\n onChange?.(value);\n },\n [isControlled, onChange]\n );\n\n return [current, set] as const;\n}\n","import {\n FunctionPropDef,\n GetPropDefTypes,\n PropDef,\n ValueOrArrayPropDef,\n} from \"../../../props/prop-def\";\n\nconst AccordionVariants = [\"solid\", \"outlined\", \"muted\"] as const;\n\nconst AccordionRootPropsDefs = {\n /**\n * Sets the variant style of the accordion (\"solid\", \"outlined\", or \"muted\").\n */\n variant: {\n type: \"enum\",\n values: AccordionVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof AccordionVariants)[number]>,\n\n /**\n * Allows multiple accordion items to be expanded simultaneously when set to true.\n */\n multiple: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n /**\n * The value of the accordion.\n */\n value: {\n type: \"value | array\",\n } satisfies PropDef<string> as ValueOrArrayPropDef<string>,\n\n /**\n * Callback fired when the value of the accordion changes.\n */\n onValueChange: {\n type: \"function\",\n } satisfies FunctionPropDef<\n (value: string | string[] | null) => void\n > as FunctionPropDef<(value: string | string[] | null) => void>,\n};\n\ntype AccordionRootInternalProps = GetPropDefTypes<\n typeof AccordionRootPropsDefs\n>;\n\nexport {\n AccordionRootInternalProps,\n AccordionRootPropsDefs,\n AccordionVariants,\n};\n","import { AccordionContent } from \"./content/accordion-content\";\nimport { AccordionHeader } from \"./header/accordion-header\";\nimport { AccordionItem } from \"./item/accordion-item\";\nimport { AccordionRoot } from \"./root/accordion-root\";\n\nexport const Accordion = Object.assign(AccordionRoot, {\n Root: AccordionRoot,\n Item: AccordionItem,\n Header: AccordionHeader,\n Content: AccordionContent,\n});\n","import clsx from \"clsx\";\nimport {\n ColorProp,\n MarginPropDefs,\n MarginProps,\n PaddingPropDefs,\n PaddingProps,\n RadiusPropDefs,\n RadiusProps,\n SizeProp,\n SizePropDef,\n} from \"../../props\";\nimport { getComponentProps } from \"../../utils/get-component-props\";\nimport { BadgeRootInternalProps, BadgeRootPropsDefs } from \"./badge.props\";\n\ninterface AllBadgeRootProps\n extends\n BadgeRootInternalProps,\n ColorProp,\n MarginProps,\n PaddingProps,\n RadiusProps,\n SizeProp {}\n\ntype BadgeRootProps = AllBadgeRootProps & React.HTMLAttributes<HTMLDivElement>;\n\nconst Badge: React.FC<BadgeRootProps> = (props) => {\n const { color, variant, className, dataAttrs, ...rest } = getComponentProps(\n props,\n BadgeRootPropsDefs,\n MarginPropDefs,\n PaddingPropDefs,\n RadiusPropDefs,\n SizePropDef,\n );\n\n return (\n <div\n className={clsx(\"badge\", className)}\n data-color={color ?? true}\n data-variant={variant}\n {...dataAttrs}\n {...rest}\n >\n {props.children}\n </div>\n );\n};\n\nexport { AllBadgeRootProps, Badge, BadgeRootProps };\n","import { GetPropDefTypes, PropDef } from \"../../props/prop-def\";\n\nconst BadgeVariants = [\"solid\", \"outlined\", \"muted\", \"clear\"] as const;\n\nconst BadgeRootPropsDefs = {\n /**\n * Sets the variant style of the badge (\"solid\", \"outlined\", \"muted\", or \"clear\").\n */\n variant: {\n type: \"enum\",\n values: BadgeVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof BadgeVariants)[number]>,\n} as const;\n\ntype BadgeRootInternalProps = GetPropDefTypes<typeof BadgeRootPropsDefs>;\n\nexport { BadgeRootInternalProps, BadgeRootPropsDefs, BadgeVariants };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport {\n MarginPropDefs,\n MarginProps,\n PaddingPropDefs,\n PaddingProps,\n RadiusPropDefs,\n RadiusProps,\n RoundnessProp,\n RoundnessPropDef,\n SpacingProp,\n SpacingPropDef,\n} from \"../../props\";\nimport { getComponentProps } from \"../../utils/get-component-props\";\nimport { BoxInternalProps, BoxPropsDefs } from \"./box.props\";\n\ninterface BoxExternalProps\n extends MarginProps,\n PaddingProps,\n SpacingProp,\n RadiusProps,\n RoundnessProp {}\n\ntype BoxProps = BoxInternalProps &\n BoxExternalProps &\n React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * A versatile container used to provide layout and styling capabilities.\n */\nconst Box = React.forwardRef<HTMLDivElement, BoxProps>((props, ref) => {\n const { className, dataAttrs, children, ...rest } = getComponentProps(\n props,\n BoxPropsDefs,\n MarginPropDefs,\n PaddingPropDefs,\n SpacingPropDef,\n RadiusPropDefs,\n RoundnessPropDef\n );\n\n return (\n <div\n ref={ref}\n {...dataAttrs}\n className={clsx(\"lcs-box\", className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\nBox.displayName = \"Box\";\n\nexport { Box };\n","import { GetPropDefTypes } from \"../../props/prop-def\";\n\nconst boxAs = [\"div\", \"span\"] as const;\n\nconst BoxPropsDefs = {\n /**\n * Defines wether the Box is rendered as a **div** or **span**.\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n // as: {\n // type: \"enum\",\n // values: boxAs,\n // default: \"div\",\n // } satisfies PropDef<(typeof boxAs)[number]>,\n};\n\ntype BoxInternalProps = GetPropDefTypes<typeof BoxPropsDefs>;\n\nexport { BoxInternalProps, BoxPropsDefs };\n","import clsx from \"clsx\";\nimport { useState } from \"react\";\nimport {\n ColorProp,\n MarginPropDefs,\n MarginProps,\n PaddingPropDefs,\n PaddingProps,\n RadiusPropDefs,\n RadiusProps,\n SizeProp,\n SizePropDef,\n} from \"../../props\";\nimport { getComponentProps } from \"../../utils/get-component-props\";\nimport { ButtonRootInternalProps, ButtonRootPropsDefs } from \"./button.props\";\n\ninterface AllButtonRootProps\n extends ButtonRootInternalProps,\n ColorProp,\n MarginProps,\n PaddingProps,\n RadiusProps,\n SizeProp {}\n\ntype ButtonRootProps = AllButtonRootProps &\n React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nconst Button: React.FC<ButtonRootProps> = (props) => {\n const {\n color,\n variant,\n className,\n dataAttrs,\n disabled,\n highContrast,\n readonly,\n ...rest\n } = getComponentProps(\n props,\n ButtonRootPropsDefs,\n MarginPropDefs,\n PaddingPropDefs,\n RadiusPropDefs,\n SizePropDef\n );\n\n const [hovered, setHovered] = useState(false);\n\n return (\n <button\n className={clsx(\"button\", className)}\n data-color={color ?? true}\n data-variant={variant}\n data-disabled={disabled ? true : undefined}\n data-high-contrast={highContrast ? true : undefined}\n data-readonly={readonly ? true : undefined}\n data-hovered={hovered ? true : undefined}\n {...dataAttrs}\n disabled={disabled || readonly}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n {...rest}\n >\n <span>{props.children}</span>\n </button>\n );\n};\n\nexport { AllButtonRootProps, Button, ButtonRootProps };\n","import { GetPropDefTypes, PropDef } from \"../../props/prop-def\";\n\nconst ButtonVariants = [\"solid\", \"outlined\", \"muted\", \"clear\"] as const;\n\nconst ButtonRootPropsDefs = {\n /**\n * Sets the variant style of the button (\"solid\", \"outlined\", \"muted\", or \"clear\").\n */\n variant: {\n type: \"enum\",\n values: ButtonVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof ButtonVariants)[number]>,\n\n /**\n * Enables high contrast mode for better visibility.\n * @default undefined\n */\n highContrast: {\n type: \"boolean\",\n dataAttr: \"high-contrast\",\n } satisfies PropDef<boolean>,\n\n /**\n * Disables the button component.\n * @default undefined\n */\n disabled: {\n type: \"boolean\",\n dataAttr: \"disabled\",\n } satisfies PropDef<boolean>,\n\n /**\n * Makes the button read-only.\n * @default undefined\n */\n readonly: {\n type: \"boolean\",\n dataAttr: \"readonly\",\n } satisfies PropDef<boolean>,\n} as const;\n\ntype ButtonRootInternalProps = GetPropDefTypes<typeof ButtonRootPropsDefs>;\n\nexport { ButtonRootInternalProps, ButtonRootPropsDefs, ButtonVariants };\n","import clsx from \"clsx\";\nimport React from \"react\";\nimport { CheckMark, Minus } from \"../../../icons\";\nimport { SizeProp, SizePropDef } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useCheckboxContext } from \"../checkbox-context\";\nimport {\n CheckboxIndicatorInternalProps,\n CheckboxIndicatorPropDefs,\n} from \"./checkbox-indicator.props\";\n\ninterface AllCheckboxIndicatorProps\n extends CheckboxIndicatorInternalProps,\n SizeProp {}\n\ntype CheckboxIndicatorProps = AllCheckboxIndicatorProps &\n Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\">;\n\n/**\n * Indicator for a checkbox component.\n * Supports checked, indeterminate, disabled, readonly, and high contrast states.\n */\nconst CheckboxIndicator: React.FC<CheckboxIndicatorProps> = React.forwardRef<\n HTMLSpanElement,\n CheckboxIndicatorProps\n>((props, ref) => {\n const {\n value,\n setValue,\n hovered,\n color,\n disabled,\n readonly,\n highContrast,\n indeterminate,\n variant: contextVariant,\n } = useCheckboxContext();\n const { size, variant, className, style, dataAttrs } = getComponentProps(\n props,\n CheckboxIndicatorPropDefs,\n SizePropDef\n );\n\n const indicatorVariant = variant || contextVariant;\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLSpanElement>) => {\n if (disabled || readonly) return;\n\n if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n setValue(!value);\n }\n };\n\n const indicatorProps = {\n ...(value && { \"data-checked\": true }),\n ...(disabled && { \"data-disabled\": true }),\n ...(readonly && { \"data-readonly\": true }),\n ...(highContrast && { \"data-high-contrast\": true }),\n ...(indeterminate && { \"data-indeterminate\": true }),\n ...((variant || contextVariant) && { \"data-variant\": indicatorVariant }),\n };\n\n return (\n <span\n ref={ref}\n style={style}\n role=\"checkbox\"\n data-color={color}\n data-hovered={hovered}\n aria-disabled={disabled}\n aria-readonly={readonly}\n aria-checked={indeterminate ? \"mixed\" : value}\n onKeyDown={handleKeyDown}\n tabIndex={disabled || readonly ? -1 : 0}\n className={clsx(\"checkbox-indicator\", className)}\n {...indicatorProps}\n {...dataAttrs}\n >\n {indeterminate && !value && (\n <Minus\n color={\n highContrast && indicatorVariant === \"solid\" ? \"black\" : \"white\"\n }\n />\n )}\n\n {value && (\n <CheckMark\n color={\n highContrast && indicatorVariant === \"solid\" ? \"black\" : \"white\"\n }\n />\n )}\n </span>\n );\n});\nCheckboxIndicator.displayName = \"Checkbox.Indicator\";\n\nexport { AllCheckboxIndicatorProps, CheckboxIndicator, CheckboxIndicatorProps };\n","import * as React from \"react\";\nimport { colorMap, IconProps } from \"./icon-colors\";\n\nexport const CheckMark: React.FC<IconProps> = ({ color = \"currentColor\" }) => {\n return (\n <svg\n width=\"64\"\n height=\"64\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n fill={colorMap[color]}\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n};\n","import * as React from \"react\";\nimport { colorMap, IconProps } from \"./icon-colors\";\n\nexport const Minus: React.FC<IconProps> = ({ color = \"currentColor\" }) => {\n return (\n <svg\n width=\"64\"\n height=\"64\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 7.5C3.5 7.08579 3.83579 6.75 4.25 6.75H10.75C11.1642 6.75 11.5 7.08579 11.5 7.5C11.5 7.91421 11.1642 8.25 10.75 8.25H4.25C3.83579 8.25 3.5 7.91421 3.5 7.5Z\"\n fill={colorMap[color]}\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n};\n","import React from \"react\";\nimport { LabelPosition } from \"./label/checkbox-label.props\";\n\nexport interface CheckboxContextValue {\n value: boolean;\n setValue: (value: boolean) => void;\n onCheckedChange?: (value: boolean) => void;\n color?: string;\n labelId: string;\n labelPosition?: LabelPosition;\n setLabelPosition?: (position: LabelPosition) => void;\n disabled?: boolean;\n readonly?: boolean;\n required?: boolean;\n indeterminate?: boolean;\n variant?: string;\n highContrast?: boolean;\n name?: string;\n hovered?: boolean;\n setHovered?: (hovered: boolean) => void;\n}\n\nexport const CheckboxContext = React.createContext<CheckboxContextValue | null>(\n null\n);\n\nexport function useCheckboxContext() {\n const context = React.useContext(CheckboxContext);\n if (!context) {\n throw new Error(\"Checkbox components must be used within a Checkbox.Root\");\n }\n return context;\n}\n","import {\n FunctionPropDef,\n GetPropDefTypes,\n PropDef,\n} from \"../../../props/prop-def\";\n\nconst CheckboxVariants = [\"solid\", \"outlined\", \"muted\"] as const;\n\nconst CheckboxRootPropsDefs = {\n /**\n * Sets the variant style of the checkbox (\"solid\" or \"outlined\").\n */\n variant: {\n type: \"enum\",\n values: CheckboxVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof CheckboxVariants)[number]>,\n\n /**\n * Sets the checked state of the checkbox.\n *\n * When using an uncontrolled checkbox, use `defaultChecked` instead.\n * @default undefined\n */\n checked: {\n type: \"boolean\",\n dataAttr: \"checked\",\n } satisfies PropDef<boolean>,\n\n /**\n * Sets the indeterminate state of the checkbox.\n * @default undefined\n */\n indeterminate: {\n type: \"boolean\",\n dataAttr: \"indeterminate\",\n } satisfies PropDef<boolean>,\n\n /**\n * Enables high contrast mode for better visibility.\n * @default undefined\n */\n highContrast: {\n type: \"boolean\",\n dataAttr: \"high-contrast\",\n } satisfies PropDef<boolean>,\n\n /**\n * The value of the checkbox (checked state).\n */\n value: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n /**\n * Sets the default checked state of the checkbox.\n * @default undefined\n */\n defaultChecked: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n /**\n * Disables the checkbox component.\n * @default undefined\n */\n disabled: {\n type: \"boolean\",\n dataAttr: \"disabled\",\n } satisfies PropDef<boolean>,\n\n /**\n * Makes the checkbox read-only.\n * @default undefined\n */\n readonly: {\n type: \"boolean\",\n dataAttr: \"readonly\",\n } satisfies PropDef<boolean>,\n\n /**\n * Marks the checkbox as required.\n * @default undefined\n */\n required: {\n type: \"boolean\",\n dataAttr: \"required\",\n } satisfies PropDef<boolean>,\n\n /**\n * Sets the name attribute of the checkbox input for form control.\n * @default undefined\n */\n name: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n /**\n * Callback fired when the checked state changes.\n *\n * @param value - The new checked state.\n */\n onCheckedChange: {\n type: \"function\",\n } satisfies FunctionPropDef<(value: boolean) => void> as FunctionPropDef<\n (value: boolean) => void\n >,\n} as const;\n\ntype CheckboxRootInternalProps = GetPropDefTypes<typeof CheckboxRootPropsDefs>;\n\nexport { CheckboxRootInternalProps, CheckboxRootPropsDefs, CheckboxVariants };\n","import { GetPropDefTypes, PropDef } from \"../../../props\";\nimport { CheckboxVariants } from \"../root/checkbox-root.props\";\n\nconst CheckboxIndicatorPropDefs = {\n /**\n * Sets the variant style of the checkbox (\"solid\" or \"outlined\").\n */\n variant: {\n type: \"enum\",\n values: CheckboxVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof CheckboxVariants)[number]>,\n} as const;\n\ntype CheckboxIndicatorInternalProps = GetPropDefTypes<\n typeof CheckboxIndicatorPropDefs\n>;\n\nexport { CheckboxIndicatorInternalProps, CheckboxIndicatorPropDefs };\n","import clsx from \"clsx\";\nimport React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { Text } from \"../../text\";\nimport { useCheckboxContext } from \"../checkbox-context\";\nimport {\n CheckboxLabelInternalProps,\n CheckboxLabelPropDefs,\n} from \"./checkbox-label.props\";\n\ninterface AllCheckboxLabelProps extends CheckboxLabelInternalProps {}\n\ntype CheckboxLabelProps = AllCheckboxLabelProps &\n Omit<React.HTMLAttributes<HTMLLabelElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\n/** Label for a checkbox component. */\nconst CheckboxLabel = React.forwardRef<HTMLLabelElement, CheckboxLabelProps>(\n (props, ref) => {\n const context = useCheckboxContext();\n const { className, children, position } = getComponentProps(\n props,\n CheckboxLabelPropDefs\n );\n\n React.useLayoutEffect(() => {\n context.setLabelPosition?.(position ?? \"right\");\n }, [position, context.setLabelPosition]);\n\n return (\n <label\n ref={ref}\n htmlFor={context.labelId}\n className={clsx(\"checkbox-label\", className)}\n {...(position && { [`data-position`]: position })}\n >\n <Text>{children}</Text>\n </label>\n );\n }\n);\nCheckboxLabel.displayName = \"Checkbox.Label\";\n\nexport { AllCheckboxLabelProps, CheckboxLabel, CheckboxLabelProps };\n","import clsx from \"clsx\";\nimport React from \"react\";\nimport {\n MarginPropDefs,\n MarginProps,\n PaddingPropDefs,\n PaddingProps,\n} from \"../../props\";\nimport { getComponentProps } from \"../../utils/get-component-props\";\nimport { TextInternalProps, TextPropsDefs } from \"./text.props\";\n\ninterface TextExternalProps extends MarginProps, PaddingProps {}\n\ntype TextProps = TextInternalProps &\n TextExternalProps &\n React.HTMLAttributes<HTMLParagraphElement>;\n\n/**\n * A component for displaying text with customizable styling and layout.\n */\nexport const Text = React.forwardRef<HTMLParagraphElement, TextProps>(\n (props, ref) => {\n const { className, dataAttrs, children, ...rest } = getComponentProps(\n props,\n TextPropsDefs,\n MarginPropDefs,\n PaddingPropDefs\n );\n\n return (\n <p\n ref={ref}\n {...dataAttrs}\n className={clsx(\"lcs-text\", className)}\n {...rest}\n >\n {children}\n </p>\n );\n }\n);\n","import { GetPropDefTypes, PropDef } from \"../../props/prop-def\";\n\nconst textAs = [\"p\", \"span\", \"div\"] as const;\n\nconst TextPropsDefs = {\n disabled: {\n type: \"boolean\",\n default: false,\n dataAttr: \"disabled\",\n } satisfies PropDef<boolean>,\n /**\n * Defines wether the Text is rendered as a **p**, **span** or **div**.\n *\n * @example\n * as=\"p\"\n * as=\"span\"\n * as=\"div\"\n */\n // as: {\n // type: \"enum\",\n // values: textAs,\n // default: \"p\",\n // } satisfies PropDef<(typeof textAs)[number]>,\n};\n\ntype TextInternalProps = GetPropDefTypes<typeof TextPropsDefs>;\n\nexport { TextInternalProps, TextPropsDefs };\n","import { GetPropDefTypes, PropDef } from \"../../../props\";\n\nconst labelPositions = [\"top\", \"left\", \"right\", \"bottom\"] as const;\ntype LabelPosition = (typeof labelPositions)[number];\n\nconst CheckboxLabelPropDefs = {\n /**\n * Sets the position of the label relative to the checkbox.\n *\n * @example position=\"left\" // positions the label to the left of the checkbox\n * @example position=\"top\" // positions the label above the checkbox\n */\n position: {\n type: \"enum\",\n values: labelPositions,\n dataAttr: \"position\",\n } satisfies PropDef<LabelPosition>,\n} as const;\n\ntype CheckboxLabelInternalProps = GetPropDefTypes<typeof CheckboxLabelPropDefs>;\n\nexport {\n CheckboxLabelInternalProps,\n CheckboxLabelPropDefs,\n LabelPosition,\n labelPositions,\n};\n","\"use client\";\n\nimport clsx from \"clsx\";\nimport React, {\n FC,\n HTMLAttributes,\n isValidElement,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport {\n AlignProp,\n AlignPropDef,\n ColorProp,\n MarginPropDefs,\n MarginProps,\n SizeProp,\n SizePropDef,\n} from \"../../../props\";\nimport {\n filterChildren,\n WithStrictChildren,\n} from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useControllableState } from \"../../../utils/use-controllable-state\";\nimport { CheckboxContext } from \"../checkbox-context\";\nimport {\n CheckboxIndicator,\n CheckboxIndicatorProps,\n} from \"../indicator/checkbox-indicator\";\nimport { CheckboxLabel, CheckboxLabelProps } from \"../label/checkbox-label\";\nimport { LabelPosition } from \"../label/checkbox-label.props\";\nimport {\n CheckboxRootInternalProps,\n CheckboxRootPropsDefs,\n} from \"./checkbox-root.props\";\n\ninterface AllCheckboxRootProps\n extends CheckboxRootInternalProps,\n AlignProp,\n ColorProp,\n MarginProps,\n SizeProp {}\n\nconst ALLOWED_CHILDREN = [\n CheckboxLabel.displayName!,\n CheckboxIndicator.displayName!,\n];\n\n/**\n * A versatile Checkbox, managing state, context, and styling.\n */\ntype CheckboxRootProps = AllCheckboxRootProps &\n WithStrictChildren<\n HTMLAttributes<HTMLDivElement>,\n CheckboxLabelProps | CheckboxIndicatorProps\n >;\n\nconst CheckboxRoot: FC<CheckboxRootProps> = (props) => {\n const {\n name,\n size,\n color,\n variant,\n checked,\n dataAttrs,\n onCheckedChange,\n value: valueProp,\n disabled = false,\n required = false,\n readonly = false,\n highContrast = false,\n indeterminate = false,\n defaultChecked = false,\n } = getComponentProps(\n props,\n CheckboxRootPropsDefs,\n AlignPropDef,\n MarginPropDefs,\n SizePropDef\n );\n\n const [value, setValue] = useControllableState<boolean>({\n value: valueProp || checked,\n defaultValue: defaultChecked,\n onChange: onCheckedChange,\n });\n\n const labelId = useId();\n const [labelPosition, setLabelPosition] = useState<LabelPosition>(\"right\");\n\n const [hovered, setHovered] = useState(false);\n\n const validChildren = filterChildren(props.children, ALLOWED_CHILDREN, {\n parentDisplayName: CheckboxRoot.displayName,\n });\n\n const { indicator, otherChildren } = useMemo(() => {\n const indicatorIndex = validChildren.findIndex(\n (child) =>\n isValidElement(child) &&\n (child.type as React.FC).displayName === CheckboxIndicator.displayName\n );\n\n if (indicatorIndex > -1) {\n return {\n indicator: validChildren[indicatorIndex],\n otherChildren: validChildren.filter((_, i) => i !== indicatorIndex),\n };\n }\n\n return {\n indicator: <CheckboxIndicator size={size} />,\n otherChildren: validChildren,\n };\n }, [validChildren, size]);\n\n const contextValue = useMemo(\n () => ({\n name,\n value,\n color,\n setValue,\n onCheckedChange,\n labelId,\n labelPosition,\n setLabelPosition,\n variant,\n hovered,\n setHovered,\n disabled,\n readonly,\n required,\n indeterminate,\n highContrast,\n }),\n [\n name,\n value,\n color,\n onCheckedChange,\n setValue,\n labelId,\n labelPosition,\n hovered,\n disabled,\n readonly,\n required,\n indeterminate,\n highContrast,\n ]\n );\n\n const handleClick = () => {\n if (disabled || readonly) return;\n setValue(!value);\n };\n\n return (\n <CheckboxContext.Provider value={contextValue}>\n <div\n className={clsx(\"checkbox-root\", props.className)}\n onClick={() => handleClick()}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n {...dataAttrs}\n >\n {indicator}\n {otherChildren}\n {name && <input type=\"hidden\" name={name} value={String(value)} />}\n </div>\n </CheckboxContext.Provider>\n );\n};\nCheckboxRoot.displayName = \"Checkbox\";\n\nexport { AllCheckboxRootProps, CheckboxRoot, CheckboxRootProps };\n","import { CheckboxIndicator } from \"./indicator/checkbox-indicator\";\nimport { CheckboxLabel } from \"./label/checkbox-label\";\nimport { CheckboxRoot } from \"./root/checkbox-root\";\n\nexport const Checkbox = Object.assign(CheckboxRoot, {\n Root: CheckboxRoot,\n Label: CheckboxLabel,\n Indicator: CheckboxIndicator,\n});\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { GetProps } from \"../../utils/get-props\";\nimport { ContainerPropsDefs } from \"./container.props\";\n\nexport type BoxProps = GetProps<typeof ContainerPropsDefs> &\n React.HTMLAttributes<HTMLDivElement>;\n\nconst Container = React.forwardRef<HTMLDivElement, BoxProps>((props, ref) => {\n const { className, children, direction, ...rest } = props;\n\n return (\n <div\n ref={ref}\n data-direction={direction}\n className={clsx(className, \"lcs-container\")}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\nContainer.displayName = \"Container\";\n\nexport { Container };\n","\"use client\";\n\nimport clsx from \"clsx\";\nimport * as React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { usePortalContext } from \"../portal-context\";\nimport {\n PortalBackdropInternalProps,\n PortalBackdropPropsDefs,\n} from \"./portal-backdrop.props\";\n\ninterface AllPortalBackdropProps extends PortalBackdropInternalProps {}\n\ntype PortalBackdropProps = AllPortalBackdropProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\">;\n\n/** A backdrop optionally displayed behind portal content when open. */\nconst PortalBackdrop = React.forwardRef<HTMLDivElement, PortalBackdropProps>(\n (props, ref) => {\n const context = usePortalContext();\n\n const { className, dataAttrs, ...rest } = getComponentProps(\n props,\n PortalBackdropPropsDefs\n );\n\n if (!context.open) return null;\n\n return (\n <div\n ref={ref}\n className={clsx(\"portal-backdrop\", className)}\n {...dataAttrs}\n {...rest}\n />\n );\n }\n);\nPortalBackdrop.displayName = \"Portal.Backdrop\";\n\nexport { AllPortalBackdropProps, PortalBackdrop, PortalBackdropProps };\n","\"use client\";\n\nimport * as React from \"react\";\n\ninterface PortalContextValue {\n open: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Ref to the trigger element, used as default anchor */\n triggerRef: React.RefObject<HTMLElement | null>;\n /** Custom anchor element ref (overrides trigger as anchor) */\n anchorRef?: React.RefObject<HTMLElement | null>;\n}\n\nconst PortalContext = React.createContext<PortalContextValue | undefined>(\n undefined\n);\n\ninterface PortalContextProps extends PortalContextValue {}\n\nfunction usePortalContext() {\n const context = React.useContext(PortalContext);\n if (!context) {\n throw new Error(\"`usePortalContext` must be used within a `Portal.Root`\");\n }\n return context;\n}\n\nexport { PortalContext, PortalContextProps, usePortalContext };\n","import { PropDef } from \"../../../props\";\n\nconst variants = [\"clear\", \"shadow\", \"blurred\"] as const;\n\nconst PortalBackdropPropsDefs = {\n /**\n * The visual style variant of the backdrop.\n *\n * @example variant=\"blurred\" // Applies a blurred effect to the backdrop\n * @default \"clear\"\n */\n variant: {\n type: \"enum\",\n values: variants,\n default: \"clear\",\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof variants)[number]>,\n\n /**\n * The opacity level of the backdrop.\n *\n * @example opacity=\"0.5\" // Sets the backdrop opacity to 50%\n * @default \"0.3\"\n */\n opacity: {\n type: \"string\",\n default: \"0.3\",\n cssProperty: \"--backdrop-opacity\",\n } satisfies PropDef<string>,\n\n /**\n * The blur amount applied to the backdrop when the \"blurred\" variant is used.\n *\n * @example blur=\"4px\" // Sets the backdrop blur to 4 pixels\n * @default \"2px\"\n */\n blur: {\n type: \"string\",\n default: \"2px\",\n cssProperty: \"--backdrop-blur\",\n } satisfies PropDef<string>,\n};\n\ntype PortalBackdropInternalProps = {\n /**\n * The visual style variant of the backdrop.\n *\n * @example variant=\"blurred\" // Applies a blurred effect to the backdrop\n * @default \"clear\"\n */\n variant?: (typeof variants)[number];\n\n /**\n * The opacity level of the backdrop.\n *\n * @example opacity=\"0.5\" // Sets the backdrop opacity to 50%\n * @default \"0.3\"\n */\n opacity?: string;\n\n /**\n * The blur amount applied to the backdrop when the \"blurred\" variant is used.\n *\n * @example blur=\"4px\" // Sets the backdrop blur to 4 pixels\n * @default \"2px\"\n */\n blur?: string;\n};\n\nexport { PortalBackdropInternalProps, PortalBackdropPropsDefs };\n","\"use client\";\n\nimport clsx from \"clsx\";\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { AlignProp, AlignPropDef } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { ThemeContext } from \"../../theme/theme-context\";\nimport { usePortalContext } from \"../portal-context\";\nimport {\n AnchorAlign,\n AnchorSide,\n useAnchorPosition,\n} from \"../utils/use-anchor-position\";\nimport {\n PortalContentInternalProps,\n PortalContentPropsDefs,\n} from \"./portal-content.props\";\n\ninterface AllPortalContentProps extends PortalContentInternalProps, AlignProp {}\n\ntype PortalContentProps = AllPortalContentProps &\n React.HTMLAttributes<HTMLDivElement>;\n\n/** The content displayed within a portal. */\nconst PortalContent = React.forwardRef<HTMLDivElement, PortalContentProps>(\n (props, ref) => {\n const portalContext = usePortalContext();\n const themeContext = React.useContext(ThemeContext);\n const contentRef = React.useRef<HTMLDivElement>(null);\n\n const {\n side = \"bottom\",\n align = \"center\",\n sideOffset = \"0\",\n alignOffset = \"0\",\n anchored = false,\n children,\n className,\n dataAttrs,\n style,\n } = getComponentProps(props, PortalContentPropsDefs, AlignPropDef);\n\n // Determine anchor element (custom anchorRef or triggerRef)\n const anchorRef = portalContext.anchorRef ?? portalContext.triggerRef;\n\n // Calculate anchor position when anchored mode is enabled\n const anchorPosition = useAnchorPosition({\n anchorRef,\n contentRef,\n side: side as AnchorSide,\n align: align as AnchorAlign,\n sideOffset: parseInt(sideOffset, 10) || 0,\n alignOffset: parseInt(alignOffset, 10) || 0,\n enabled: anchored && portalContext.open,\n });\n\n // Compose refs\n const setRefs = React.useCallback(\n (node: HTMLDivElement | null) => {\n contentRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref]\n );\n\n React.useEffect(() => {\n if (!portalContext.open) return;\n\n function onKeyDown(e: KeyboardEvent) {\n if (e.key === \"Escape\") {\n portalContext.onOpenChange?.(false);\n }\n }\n\n document.addEventListener(\"keydown\", onKeyDown);\n\n return () => {\n document.removeEventListener(\"keydown\", onKeyDown);\n };\n }, [portalContext.open, portalContext.onOpenChange]);\n\n // Click outside listener for anchored portals\n React.useEffect(() => {\n if (!portalContext.open || !anchored) return;\n\n function onClickOutside(e: MouseEvent) {\n const target = e.target as Node;\n const content = contentRef.current;\n const trigger = (portalContext.anchorRef ?? portalContext.triggerRef)\n ?.current;\n\n // Don't close if clicking inside the content or the trigger\n if (content?.contains(target) || trigger?.contains(target)) {\n return;\n }\n\n portalContext.onOpenChange?.(false);\n }\n\n // Use setTimeout to avoid the click that opened the portal from immediately closing it\n const timeoutId = setTimeout(() => {\n document.addEventListener(\"click\", onClickOutside);\n }, 0);\n\n return () => {\n clearTimeout(timeoutId);\n document.removeEventListener(\"click\", onClickOutside);\n };\n }, [\n portalContext.open,\n portalContext.onOpenChange,\n portalContext.anchorRef,\n portalContext.triggerRef,\n anchored,\n ]);\n\n const container = portalContext.open && globalThis?.document?.body;\n if (!container) return null;\n\n // Build style for anchored positioning\n const combinedStyle: React.CSSProperties = {\n ...style,\n ...(anchored && anchorPosition\n ? {\n position: \"absolute\",\n top: anchorPosition.top,\n left: anchorPosition.left,\n }\n : {}),\n };\n\n const portalContent = (\n <div\n ref={setRefs}\n className={clsx(\"portal\", className)}\n data-appearance={themeContext?.appearance}\n data-radius={themeContext?.radius}\n data-roundness={themeContext?.roundness ?? \"theme\"}\n data-spacing={themeContext?.spacing ?? \"theme\"}\n data-theme-radius={themeContext?.radius}\n data-theme-roundness={themeContext?.roundness}\n data-theme-spacing={themeContext?.spacing}\n onClick={\n anchored ? undefined : () => portalContext.onOpenChange?.(false)\n }\n style={combinedStyle}\n {...dataAttrs}\n >\n <div\n className=\"portal-content\"\n onClick={(e) => e.stopPropagation()}\n >\n {children}\n </div>\n </div>\n );\n\n // Wrap with ThemeContext if available to pass theme through\n const content = themeContext ? (\n <ThemeContext.Provider value={themeContext}>\n {portalContent}\n </ThemeContext.Provider>\n ) : (\n portalContent\n );\n\n return ReactDOM.createPortal(content, container);\n }\n);\nPortalContent.displayName = \"Portal.Content\";\n\nexport { AllPortalContentProps, PortalContent, PortalContentProps };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { ThemePropsDefs } from \"./theme.props\";\n\nexport type ThemeAppearance = (typeof ThemePropsDefs.appearance.values)[number];\nexport type ThemeRadius = (typeof ThemePropsDefs.radius.values)[number];\nexport type ThemeRoundness = (typeof ThemePropsDefs.roundness.values)[number];\nexport type ThemeSpacing = (typeof ThemePropsDefs.spacing.values)[number];\n\ninterface ThemeChangeHandlers {\n onAppearanceChange?: (appearance: ThemeAppearance) => void;\n onRadiusChange?: (radius: ThemeRadius) => void;\n onRoundnessChange?: (roundness: ThemeRoundness) => void;\n onSpacingChange?: (spacing: ThemeSpacing) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n radius: ThemeRadius;\n roundness: ThemeRoundness;\n spacing: ThemeSpacing;\n}\n\ninterface ThemeContextProps extends ThemeContextValue, ThemeChangeHandlers {}\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(\n undefined\n);\n\nfunction useTheme() {\n const context = React.useContext(ThemeContext);\n if (!context) {\n throw new Error(\"`useTheme` must be used within a `Theme`\");\n }\n return context;\n}\n\nexport { ThemeContext, ThemeContextProps, useTheme };\n","\"use client\";\n\nimport * as React from \"react\";\n\nexport type AnchorSide = \"top\" | \"right\" | \"bottom\" | \"left\";\nexport type AnchorAlign = \"start\" | \"center\" | \"end\";\n\nexport interface AnchorPosition {\n top: number;\n left: number;\n}\n\nexport interface UseAnchorPositionOptions {\n /** The anchor element to position relative to */\n anchorRef: React.RefObject<HTMLElement | null>;\n /** The content element being positioned */\n contentRef: React.RefObject<HTMLElement | null>;\n /** Which side of the anchor to position on */\n side?: AnchorSide;\n /** Alignment along the side */\n align?: AnchorAlign;\n /** Offset from the anchor (perpendicular to side) */\n sideOffset?: number;\n /** Offset along the alignment axis */\n alignOffset?: number;\n /** Whether positioning is enabled */\n enabled?: boolean;\n}\n\n/**\n * Hook to calculate position for anchored content.\n * Returns the top/left position for the content element.\n */\nexport function useAnchorPosition({\n anchorRef,\n contentRef,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 0,\n alignOffset = 0,\n enabled = true,\n}: UseAnchorPositionOptions): AnchorPosition | null {\n const [position, setPosition] = React.useState<AnchorPosition | null>(null);\n // Force update counter to trigger recalculation\n const [, _forceUpdate] = React.useReducer((x) => x + 1, 0);\n\n const updatePosition = React.useCallback(() => {\n const anchor = anchorRef.current;\n const content = contentRef.current;\n\n if (!anchor || !content || !enabled) {\n setPosition(null);\n return;\n }\n\n const anchorRect = anchor.getBoundingClientRect();\n const contentRect = content.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n\n // Calculate position based on side\n switch (side) {\n case \"top\":\n top = anchorRect.top - contentRect.height - sideOffset;\n break;\n case \"bottom\":\n top = anchorRect.bottom + sideOffset;\n break;\n case \"left\":\n left = anchorRect.left - contentRect.width - sideOffset;\n break;\n case \"right\":\n left = anchorRect.right + sideOffset;\n break;\n }\n\n // Calculate alignment\n if (side === \"top\" || side === \"bottom\") {\n switch (align) {\n case \"start\":\n left = anchorRect.left + alignOffset;\n break;\n case \"center\":\n left =\n anchorRect.left +\n (anchorRect.width - contentRect.width) / 2 +\n alignOffset;\n break;\n case \"end\":\n left = anchorRect.right - contentRect.width + alignOffset;\n break;\n }\n } else {\n // left or right side\n switch (align) {\n case \"start\":\n top = anchorRect.top + alignOffset;\n break;\n case \"center\":\n top =\n anchorRect.top +\n (anchorRect.height - contentRect.height) / 2 +\n alignOffset;\n break;\n case \"end\":\n top = anchorRect.bottom - contentRect.height + alignOffset;\n break;\n }\n }\n\n // Add scroll offset for fixed positioning\n top += window.scrollY;\n left += window.scrollX;\n\n // Clamp to viewport bounds\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n // Prevent going off-screen\n left = Math.max(0, Math.min(left, viewportWidth - contentRect.width));\n top = Math.max(\n 0,\n Math.min(top, viewportHeight - contentRect.height + window.scrollY)\n );\n\n setPosition({ top, left });\n }, [anchorRef, contentRef, side, align, sideOffset, alignOffset, enabled]);\n\n // Update position when enabled changes or on mount\n React.useEffect(() => {\n if (!enabled) {\n setPosition(null);\n return;\n }\n\n // Try multiple times to ensure refs are set\n let attempts = 0;\n const maxAttempts = 10;\n\n const tryUpdate = () => {\n attempts++;\n if (anchorRef.current && contentRef.current) {\n updatePosition();\n } else if (attempts < maxAttempts) {\n requestAnimationFrame(tryUpdate);\n }\n };\n\n requestAnimationFrame(tryUpdate);\n\n // Update on scroll and resize\n window.addEventListener(\"scroll\", updatePosition, true);\n window.addEventListener(\"resize\", updatePosition);\n\n return () => {\n window.removeEventListener(\"scroll\", updatePosition, true);\n window.removeEventListener(\"resize\", updatePosition);\n };\n }, [enabled, updatePosition, anchorRef, contentRef]);\n\n return position;\n}\n","import { PropDef } from \"../../../props\";\nimport { GetPropDefTypes } from \"../../../props/prop-def\";\n\nconst positions = [\n \"tl\",\n \"top\",\n \"tr\",\n \"left\",\n \"center\",\n \"right\",\n \"bl\",\n \"bottom\",\n \"br\",\n] as const;\n\nconst anchorSides = [\"top\", \"right\", \"bottom\", \"left\"] as const;\n\nconst PortalContentPropsDefs = {\n /**\n * The position of the portal content relative to the screen if no anchor is used.\n *\n * @example position=\"bl\" // Portal renders at bottom-left of the screen\n */\n position: {\n type: \"enum\",\n values: positions,\n default: \"center\",\n dataAttr: \"position\",\n } satisfies PropDef<(typeof positions)[number]>,\n\n /**\n * Whether the portal content is anchored to an element.\n *\n * When anchored, the portal content is positioned relative to the trigger element unless a custom anchorRef is provided.\n */\n anchored: {\n type: \"boolean\",\n dataAttr: \"anchored\",\n } satisfies PropDef<boolean>,\n\n /**\n * The side of the anchor element to position the portal content on.\n *\n * @default \"bottom\"\n */\n side: {\n type: \"enum\",\n values: anchorSides,\n default: \"bottom\",\n } satisfies PropDef<(typeof anchorSides)[number]>,\n\n /** Offset in pixels from the anchor element along the side axis. */\n sideOffset: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n /** Offset in pixels along the alignment axis. */\n alignOffset: {\n type: \"string\",\n } satisfies PropDef<string>,\n};\n\ntype PortalContentInternalProps = GetPropDefTypes<\n typeof PortalContentPropsDefs\n>;\n\nexport { PortalContentInternalProps, PortalContentPropsDefs };\n","\"use client\";\n\nimport * as React from \"react\";\nimport {\n filterChildren,\n WithStrictChildren,\n} from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useControllableState } from \"../../../utils/use-controllable-state\";\nimport {\n PortalBackdrop,\n PortalBackdropProps,\n} from \"../backdrop/portal-backdrop\";\nimport { PortalContent, PortalContentProps } from \"../content/portal-content\";\nimport { PortalContext } from \"../portal-context\";\nimport { PortalTrigger, PortalTriggerProps } from \"../trigger/portal-trigger\";\nimport {\n PortalRootInternalProps,\n PortalRootPropsDefs,\n} from \"./portal-root.props\";\n\nconst ALLOWED_CHILDREN = [\n PortalTrigger.displayName!,\n PortalBackdrop.displayName!,\n PortalContent.displayName!,\n];\n\ninterface AllPortalRootProps extends PortalRootInternalProps {}\n\ntype PortalRootProps = AllPortalRootProps &\n WithStrictChildren<\n React.HTMLAttributes<HTMLDivElement>,\n PortalTriggerProps | PortalBackdropProps | PortalContentProps\n >;\n\n/** The root component of a portal used to provide context and styling to its children. */\nconst PortalRoot: React.FC<PortalRootProps> = (props) => {\n const {\n defaultOpen = false,\n open: portalOpen,\n onOpenChange,\n anchorRef,\n children,\n } = getComponentProps(props, PortalRootPropsDefs);\n\n const [open, setOpen] = useControllableState<boolean>({\n value: portalOpen,\n defaultValue: defaultOpen,\n onChange: onOpenChange,\n });\n\n const triggerRef = React.useRef<HTMLElement | null>(null);\n\n const value = React.useMemo(\n () => ({\n open,\n onOpenChange: setOpen,\n triggerRef,\n anchorRef,\n }),\n [open, setOpen, anchorRef]\n );\n\n const validChildren = filterChildren(children, ALLOWED_CHILDREN, {\n parentDisplayName: PortalRoot.displayName,\n });\n\n return (\n <PortalContext.Provider value={value}>\n {validChildren}\n </PortalContext.Provider>\n );\n};\nPortalRoot.displayName = \"Portal.Root\";\n\nexport { AllPortalRootProps, PortalRoot, PortalRootProps };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { usePortalContext } from \"../portal-context\";\n\nexport interface PortalTriggerProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\n/** The trigger element that toggles the portal open and closed. */\nconst PortalTrigger = React.forwardRef<HTMLButtonElement, PortalTriggerProps>(\n ({ children, asChild, onClick, ...props }, ref) => {\n const context = usePortalContext();\n const internalRef = React.useRef<HTMLButtonElement>(null);\n\n // Compose refs to set both the forwarded ref and the context triggerRef\n React.useEffect(() => {\n if (internalRef.current) {\n (\n context.triggerRef as React.MutableRefObject<HTMLElement | null>\n ).current = internalRef.current;\n }\n }, [context.triggerRef]);\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n context.onOpenChange?.(!context.open);\n onClick?.(event);\n };\n\n const setRefs = React.useCallback(\n (node: HTMLButtonElement | null) => {\n internalRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n (\n context.triggerRef as React.MutableRefObject<HTMLElement | null>\n ).current = node;\n },\n [ref, context.triggerRef]\n );\n\n if (asChild && React.isValidElement(children)) {\n return React.cloneElement(children as React.ReactElement<any>, {\n ref: setRefs,\n onClick: handleClick,\n ...props,\n });\n }\n\n return (\n <button\n ref={setRefs}\n type=\"button\"\n onClick={handleClick}\n aria-expanded={context.open}\n aria-haspopup=\"dialog\"\n {...props}\n >\n {children}\n </button>\n );\n }\n);\nPortalTrigger.displayName = \"Portal.Trigger\";\n\nexport { PortalTrigger };\n","import {\n GetPropDefTypes,\n PropDef,\n ReactNodePropDef,\n} from \"../../../props/prop-def\";\n\nconst PortalRootPropsDefs = {\n /** Whether the portal is open. */\n open: {\n type: \"boolean\",\n default: false,\n } satisfies PropDef<boolean>,\n\n /** Callback fired when the open state changes. */\n onOpenChange: {\n type: \"function\",\n } satisfies PropDef<(open: boolean) => void>,\n\n /** Whether the portal is open by default (uncontrolled). */\n defaultOpen: {\n type: \"boolean\",\n default: false,\n } satisfies PropDef<boolean>,\n\n /** Custom anchor element ref. If not provided, the trigger is used as anchor. */\n anchorRef: {\n type: \"reactNode\",\n } as ReactNodePropDef<React.RefObject<HTMLElement | null>>,\n};\n\ntype PortalRootInternalProps = GetPropDefTypes<typeof PortalRootPropsDefs>;\n\nexport { PortalRootInternalProps, PortalRootPropsDefs };\n","import { PortalBackdrop } from \"./backdrop/portal-backdrop\";\nimport { PortalContent } from \"./content/portal-content\";\nimport { PortalRoot } from \"./root/portal-root\";\nimport { PortalTrigger } from \"./trigger/portal-trigger\";\n\nexport const Portal = {\n /** The root component that provides context for the portal. */\n Root: PortalRoot,\n /** The trigger element that opens the portal when interacted with. */\n Trigger: PortalTrigger,\n /** The content displayed inside the portal when open. */\n Content: PortalContent,\n /** A backdrop optionally displayed behind portal content when open. */\n Backdrop: PortalBackdrop,\n};\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { RadiusProps, SpacingProp } from \"../../../props\";\nimport { Portal } from \"../../portal/portal\";\nimport { useSelectContext } from \"../select-context\";\nimport { useComposedRefs } from \"../utils/user-composed-refs\";\nimport { SelectViewport } from \"../viewport/select-viewport\";\nimport { SelectContentInternalProps } from \"./select-content.props\";\n\ninterface AllSelectContentProps\n extends SelectContentInternalProps,\n RadiusProps,\n SpacingProp {}\n\ntype SelectContentProps = AllSelectContentProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\nconst SelectContent = React.forwardRef<HTMLDivElement, SelectContentProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n position = \"popper\",\n side = \"bottom\",\n offset,\n align = \"center\",\n ...rest\n } = props;\n const context = useSelectContext();\n\n const composedRef = useComposedRefs(forwardedRef, context.contentRef);\n\n // Reset item values on mount\n React.useEffect(() => {\n context.itemValues.current = [];\n }, [context.open]);\n\n // Handle click outside\n React.useEffect(() => {\n if (!context.open) return;\n\n const handleClickOutside = (event: MouseEvent) => {\n const target = event.target as Node;\n if (\n context.contentRef.current &&\n !context.contentRef.current.contains(target) &&\n context.triggerRef.current &&\n !context.triggerRef.current.contains(target)\n ) {\n context.onOpenChange(false);\n }\n };\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () =>\n document.removeEventListener(\"mousedown\", handleClickOutside);\n }, [context.open]);\n\n // Handle keyboard navigation\n React.useEffect(() => {\n if (!context.open) return;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n const items = context.itemValues.current;\n const itemCount = items.length;\n\n switch (event.key) {\n case \"ArrowDown\":\n event.preventDefault();\n context.setHighlightedIndex((prev) =>\n prev < itemCount - 1 ? prev + 1 : 0\n );\n break;\n case \"ArrowUp\":\n event.preventDefault();\n context.setHighlightedIndex((prev) =>\n prev > 0 ? prev - 1 : itemCount - 1\n );\n break;\n case \"Tab\":\n event.preventDefault();\n if (event.shiftKey) {\n context.setHighlightedIndex((prev) =>\n prev > 0 ? prev - 1 : itemCount - 1\n );\n } else {\n context.setHighlightedIndex((prev) =>\n prev < itemCount - 1 ? prev + 1 : 0\n );\n }\n break;\n case \"Enter\":\n case \" \":\n event.preventDefault();\n if (context.highlightedIndex >= 0) {\n const selectedValue = items[context.highlightedIndex];\n if (selectedValue) {\n context.onValueChange(selectedValue);\n const displayText = children;\n if (displayText) context.setDisplayValue(displayText);\n context.onOpenChange(false);\n }\n }\n break;\n case \"Escape\":\n event.preventDefault();\n context.onOpenChange(false);\n context.triggerRef.current?.focus();\n break;\n }\n };\n\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => document.removeEventListener(\"keydown\", handleKeyDown);\n }, [context.open, context.highlightedIndex]);\n\n const [contentWidth, setContentWidth] = React.useState<\n number | undefined\n >();\n const labelInside = context.labelPosition === \"inside\";\n const anchorRef = labelInside ? context.rootRef : context.triggerRef;\n\n React.useLayoutEffect(() => {\n if (context.open && anchorRef.current) {\n setContentWidth(anchorRef.current.getBoundingClientRect().width);\n }\n }, [context.open, context.labelPosition, anchorRef]);\n\n if (!context.open) {\n return (\n <div style={{ display: \"none\" }} aria-hidden=\"true\">\n {children}\n </div>\n );\n }\n\n return (\n <Portal.Root\n open={context.open}\n onOpenChange={context.onOpenChange}\n anchorRef={anchorRef}\n >\n <Portal.Content anchored side={side} align={align} sideOffset={offset}>\n <div\n ref={composedRef}\n role=\"listbox\"\n data-state={context.open ? \"open\" : \"closed\"}\n data-side={side}\n data-align={align}\n data-trigger-variant={context.triggerVariant}\n className={clsx(\"select-content\", className)}\n style={{ width: contentWidth }}\n {...rest}\n >\n <SelectViewport>{children}</SelectViewport>\n </div>\n </Portal.Content>\n </Portal.Root>\n );\n }\n);\nSelectContent.displayName = \"Select.Content\";\n\nexport { AllSelectContentProps, SelectContent, SelectContentProps };\n","import * as React from \"react\";\nimport { LabelPosition } from \"./label/select-label.props\";\nimport { TriggerVariant } from \"./trigger/select-trigger.props\";\n\nexport interface SelectContextValue {\n open: boolean;\n value: string;\n displayValue: React.ReactNode;\n onOpenChange: (open: boolean) => void;\n onValueChange: (value: string) => void;\n setDisplayValue: (displayValue: React.ReactNode) => void;\n rootRef: React.RefObject<HTMLDivElement | HTMLButtonElement | null>;\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentRef: React.RefObject<HTMLDivElement | null>;\n labelPosition?: LabelPosition;\n setLabelPosition?: (position: LabelPosition) => void;\n triggerVariant?: TriggerVariant;\n setTriggerVariant?: (variant: TriggerVariant) => void;\n disabled?: boolean;\n required?: boolean;\n name?: string;\n placeholder?: string;\n labelId: string;\n highlightedIndex: number;\n setHighlightedIndex: React.Dispatch<React.SetStateAction<number>>;\n itemsRef: React.RefObject<Map<string, HTMLDivElement>>;\n itemValues: React.RefObject<string[]>;\n}\n\nexport const SelectContext = React.createContext<SelectContextValue | null>(\n null\n);\n\nexport function useSelectContext() {\n const context = React.useContext(SelectContext);\n if (!context) {\n throw new Error(\"Select components must be used within a Select.Root\");\n }\n return context;\n}\n","import * as React from \"react\";\n\nexport function useComposedRefs<T>(\n ...refs: (React.Ref<T> | undefined)[]\n): React.RefCallback<T> {\n return React.useCallback(\n (node: T) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref != null) {\n (ref as React.RefObject<T>).current = node;\n }\n });\n },\n [refs]\n );\n}\n","import clsx from \"clsx\";\nimport * as React from \"react\";\n\ninterface SelectViewportProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst SelectViewport = React.forwardRef<HTMLDivElement, SelectViewportProps>(\n (props, ref) => {\n const { className, children, ...rest } = props;\n\n return (\n <div ref={ref} className={clsx(\"select-viewport\", className)} {...rest}>\n {children}\n </div>\n );\n }\n);\nSelectViewport.displayName = \"Select.Viewport\";\n\nexport { SelectViewport, SelectViewportProps };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { Text } from \"../../text/text\";\nimport {\n SelectGroupInternalProps,\n SelectGroupsPropDefs,\n} from \"./select-group.props\";\n\ninterface AllSelectGroupProps extends SelectGroupInternalProps {}\n\ntype SelectGroupProps = AllSelectGroupProps &\n React.HTMLAttributes<HTMLDivElement>;\n\nconst SelectGroup = React.forwardRef<HTMLDivElement, SelectGroupProps>(\n (props, ref) => {\n const { className, children, dataAttrs, ...rest } = getComponentProps(\n props,\n SelectGroupsPropDefs\n );\n\n return (\n <div\n ref={ref}\n role=\"group\"\n className={clsx(\"select-group\", className)}\n {...rest}\n >\n <Text className=\"select-group-label\" disabled>\n {props.title}\n </Text>\n\n {children}\n </div>\n );\n }\n);\nSelectGroup.displayName = \"Select.Group\";\n\nexport { AllSelectGroupProps, SelectGroup, SelectGroupProps };\n","import { GetPropDefTypes, PropDef } from \"../../../props/prop-def\";\n\nconst SelectGroupsPropDefs = {\n title: {\n type: \"string\",\n } satisfies PropDef<string>,\n} as const;\n\ntype SelectGroupInternalProps = GetPropDefTypes<typeof SelectGroupsPropDefs>;\n\nexport { SelectGroupInternalProps, SelectGroupsPropDefs };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { Box } from \"../../box\";\nimport { Text } from \"../../text\";\nimport { useSelectContext } from \"../select-context\";\nimport { SelectItemIndicator } from \"./select-item-indicator\";\nimport {\n SelectItemInternalProps,\n SelectItemPropDefs,\n} from \"./select-item.props\";\n\ninterface AllSelectItemProps extends SelectItemInternalProps {}\n\ntype SelectItemProps = AllSelectItemProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\nconst SelectItem = React.forwardRef<HTMLDivElement, SelectItemProps>(\n (props, ref) => {\n const context = useSelectContext();\n const { value, disabled, children, className, ...rest } = getComponentProps(\n props,\n SelectItemPropDefs\n );\n\n const selected = context.value === value;\n\n // Set display value if this item is already selected on mount\n React.useEffect(() => {\n if (selected && children) {\n context.setDisplayValue(children);\n }\n }, [selected]);\n\n // Register item value\n React.useEffect(() => {\n if (!value) return;\n\n if (!disabled) {\n const values = context.itemValues.current;\n if (!values.includes(value)) values.push(value);\n }\n\n return () => {\n const values = context.itemValues.current;\n const index = values.indexOf(value);\n if (index > -1) values.splice(index, 1);\n };\n }, [value, disabled]);\n\n const itemIndex = value ? context.itemValues.current.indexOf(value) : -1;\n const isHighlighted =\n context.highlightedIndex >= 0 && context.highlightedIndex === itemIndex;\n\n const handleClick = () => {\n if (!disabled) {\n if (value) {\n context.onValueChange(value);\n context.setDisplayValue(children);\n }\n context.onOpenChange(false);\n context.triggerRef.current?.focus();\n }\n };\n\n const handleMouseEnter = () => {\n if (!disabled) context.setHighlightedIndex(itemIndex);\n };\n\n return (\n <Box\n ref={ref}\n role=\"option\"\n radius=\"none\"\n aria-selected={selected}\n aria-disabled={disabled}\n data-variant={context.triggerVariant}\n data-state={selected ? \"checked\" : \"unchecked\"}\n data-highlighted={isHighlighted ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n className={clsx(\"select-item\", className)}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n {...rest}\n >\n <Box\n style={{ width: 24, height: 24, justifyContent: \"center\" }}\n className=\"flex items-center\"\n >\n {selected && <SelectItemIndicator />}\n </Box>\n\n <Text disabled={disabled}>{children}</Text>\n </Box>\n );\n }\n);\nSelectItem.displayName = \"Select.Item\";\n\nexport { AllSelectItemProps, SelectItem, SelectItemProps };\n","import * as React from \"react\";\n\nexport const SelectItemIndicator: React.FC = () => {\n return (\n <span className=\"select-item-indicator\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n );\n};\n","import { GetPropDefTypes, PropDef } from \"../../../props/prop-def\";\n\nconst SelectItemPropDefs = {\n value: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n disabled: {\n type: \"boolean\",\n default: false,\n } satisfies PropDef<boolean>,\n} as const;\n\ntype SelectItemInternalProps = GetPropDefTypes<typeof SelectItemPropDefs>;\n\nexport { SelectItemInternalProps, SelectItemPropDefs };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { Text } from \"../../text\";\nimport { useSelectContext } from \"../select-context\";\nimport {\n SelectLabelInternalProps,\n SelectLabelPropDefs,\n} from \"./select-label.props\";\n\ninterface AllSelectLabelProps extends SelectLabelInternalProps {}\n\ntype SelectLabelProps = AllSelectLabelProps &\n Omit<React.HTMLAttributes<HTMLLabelElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\n/** Label for a select component. */\nconst SelectLabel = React.forwardRef<HTMLLabelElement, SelectLabelProps>(\n (props, ref) => {\n const context = useSelectContext();\n const { className, children, position, dataAttrs } = getComponentProps(\n props,\n SelectLabelPropDefs\n );\n\n React.useLayoutEffect(() => {\n context.setLabelPosition?.(position ?? \"top\");\n }, [position, context.setLabelPosition]);\n\n return (\n <label\n ref={ref}\n htmlFor={context.labelId}\n className={clsx(\"select-label\", className)}\n {...dataAttrs}\n >\n <Text disabled={context.disabled}>{children}</Text>\n </label>\n );\n }\n);\nSelectLabel.displayName = \"Select.Label\";\n\nexport { AllSelectLabelProps, SelectLabel, SelectLabelProps };\n","import { GetPropDefTypes, PropDef } from \"../../../props/prop-def\";\n\nconst labelPositions = [\"top\", \"left\", \"inside\"] as const;\ntype LabelPosition = (typeof labelPositions)[number];\n\nconst SelectLabelPropDefs = {\n position: {\n type: \"enum\",\n values: labelPositions,\n default: \"top\",\n dataAttr: \"position\",\n } satisfies PropDef<LabelPosition>,\n} as const;\n\ntype SelectLabelInternalProps = GetPropDefTypes<typeof SelectLabelPropDefs>;\n\nexport {\n LabelPosition,\n labelPositions,\n SelectLabelInternalProps,\n SelectLabelPropDefs,\n};\n","\"use client\";\n\nimport clsx from \"clsx\";\nimport {\n FC,\n HTMLAttributes,\n ReactNode,\n RefObject,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n MarginPropDefs,\n MarginProps,\n RadiusPropDefs,\n RadiusProps,\n RoundnessPropDef,\n} from \"../../../props\";\nimport {\n filterChildren,\n WithStrictChildren,\n} from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useControllableState } from \"../../../utils/use-controllable-state\";\nimport { Box } from \"../../box\";\nimport { SelectContent, SelectContentProps } from \"../content/select-content\";\nimport { SelectLabel, SelectLabelProps } from \"../label/select-label\";\nimport { LabelPosition } from \"../label/select-label.props\";\nimport { SelectContext } from \"../select-context\";\nimport { SelectTrigger, SelectTriggerProps } from \"../trigger/select-trigger\";\nimport {\n SelectRootInternalProps,\n SelectRootPropsDefs,\n SelectVariant,\n} from \"./select-root.props\";\n\ninterface AllSelectRootProps\n extends SelectRootInternalProps,\n MarginProps,\n RadiusProps {}\n\nconst ALLOWED_CHILDREN = [\n SelectLabel.displayName!,\n SelectTrigger.displayName!,\n SelectContent.displayName!,\n];\n\ntype SelectRootProps = AllSelectRootProps &\n WithStrictChildren<\n HTMLAttributes<HTMLSelectElement>,\n SelectLabelProps | SelectTriggerProps | SelectContentProps\n >;\n\nconst SelectRoot: FC<SelectRootProps> = (props) => {\n const {\n children,\n className,\n dataAttrs,\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n disabled = false,\n required = false,\n placeholder,\n variant,\n name,\n } = getComponentProps(\n props,\n SelectRootPropsDefs,\n MarginPropDefs,\n RadiusPropDefs,\n RoundnessPropDef\n );\n\n const [value, setValue] = useControllableState({\n value: valueProp,\n defaultValue,\n onChange: onValueChange,\n });\n\n const [open, setOpen] = useState(false);\n\n const [highlightedIndex, setHighlightedIndex] = useState(-1);\n const [labelPosition, setLabelPosition] = useState<LabelPosition>(\"top\");\n const [triggerVariant, setTriggerVariant] =\n useState<SelectVariant>(\"outlined\");\n const [displayValue, setDisplayValue] = useState<ReactNode>(null);\n\n const labelId = useId();\n\n const rootRef = useRef<HTMLDivElement | HTMLButtonElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const itemsRef = useRef<Map<string, HTMLDivElement>>(new Map());\n const itemValues = useRef<string[]>([]);\n\n const contextValue = useMemo(\n () => ({\n open,\n value,\n displayValue,\n onOpenChange: setOpen,\n onValueChange: setValue,\n setDisplayValue,\n rootRef,\n triggerRef,\n contentRef,\n labelPosition,\n setLabelPosition,\n triggerVariant,\n setTriggerVariant,\n disabled,\n required,\n placeholder,\n name,\n labelId,\n highlightedIndex,\n setHighlightedIndex,\n itemsRef,\n itemValues,\n }),\n [\n open,\n value,\n displayValue,\n disabled,\n required,\n name,\n placeholder,\n labelId,\n highlightedIndex,\n labelPosition,\n triggerVariant,\n ]\n );\n\n useLayoutEffect(() => {\n setTriggerVariant?.(variant ?? \"outlined\");\n }, [variant, setTriggerVariant]);\n\n const validChildren = filterChildren(children, ALLOWED_CHILDREN, {\n parentDisplayName: SelectRoot.displayName,\n });\n\n const labelInside = labelPosition === \"inside\";\n\n const handleClick = () => {\n if (!disabled) {\n setOpen(!open);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (disabled) return;\n\n switch (event.key) {\n case \"Enter\":\n case \" \":\n case \"ArrowDown\":\n case \"ArrowUp\":\n event.preventDefault();\n setOpen(true);\n break;\n }\n };\n\n if (labelInside) {\n return (\n <SelectContext.Provider value={contextValue}>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n aria-haspopup=\"listbox\"\n aria-disabled={disabled}\n disabled={disabled}\n ref={rootRef as RefObject<HTMLButtonElement>}\n data-state={open ? \"open\" : \"closed\"}\n data-disabled={disabled ? \"\" : undefined}\n className={clsx(\"select-root\", className)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n {...dataAttrs}\n >\n {validChildren}\n {name && <input type=\"hidden\" name={name} value={value} />}\n </button>\n </SelectContext.Provider>\n );\n }\n\n return (\n <SelectContext.Provider value={contextValue}>\n <Box\n ref={rootRef as RefObject<HTMLDivElement>}\n className={clsx(\"select-root\", className)}\n {...dataAttrs}\n >\n {validChildren}\n {name && <input type=\"hidden\" name={name} value={value} />}\n </Box>\n </SelectContext.Provider>\n );\n};\nSelectRoot.displayName = \"Select.Root\";\n\nexport { AllSelectRootProps, SelectRoot, SelectRootProps };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { RadiusProps, RoundnessProp } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useSelectContext } from \"../select-context\";\nimport { useComposedRefs } from \"../utils/user-composed-refs\";\nimport { SelectValue } from \"../value/select-value\";\nimport { SelectTriggerIcon } from \"./select-trigger-icon\";\nimport {\n SelectTriggerInternalProps,\n SelectTriggerPropsDefs,\n} from \"./select-trigger.props\";\n\ninterface AllSelectTriggerProps\n extends SelectTriggerInternalProps,\n RadiusProps,\n RoundnessProp {}\n\ntype SelectTriggerProps = AllSelectTriggerProps &\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> & {\n asChild?: boolean;\n children?: React.ReactNode;\n };\n\nconst SelectTrigger = React.forwardRef<HTMLButtonElement, SelectTriggerProps>(\n (props, forwardedRef) => {\n const {\n className,\n disabled: disabledProp,\n dataAttrs,\n } = getComponentProps(props, SelectTriggerPropsDefs);\n const context = useSelectContext();\n\n const disabled = disabledProp ?? context.disabled;\n const isInsideLabel = context.labelPosition === \"inside\";\n\n const composedRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const handleClick = () => {\n if (!disabled) {\n context.onOpenChange(!context.open);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (disabled) return;\n\n switch (event.key) {\n case \"Enter\":\n case \" \":\n case \"ArrowDown\":\n case \"ArrowUp\":\n event.preventDefault();\n context.onOpenChange(true);\n break;\n }\n };\n\n // When label is inside, render as a div since root is the button\n if (isInsideLabel) {\n return (\n <div\n ref={composedRef as React.Ref<HTMLDivElement>}\n data-state={context.open ? \"open\" : \"closed\"}\n data-disabled={disabled ? \"\" : undefined}\n data-variant={context.triggerVariant}\n className={clsx(\"select-trigger\", className)}\n {...dataAttrs}\n >\n <SelectValue />\n <SelectTriggerIcon />\n </div>\n );\n }\n\n return (\n <button\n ref={composedRef}\n type=\"button\"\n role=\"combobox\"\n aria-expanded={context.open}\n aria-haspopup=\"listbox\"\n aria-disabled={disabled}\n disabled={disabled}\n data-state={context.open ? \"open\" : \"closed\"}\n data-disabled={disabled ? \"\" : undefined}\n className={clsx(\"select-trigger\", className)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n data-variant={context.triggerVariant}\n {...dataAttrs}\n >\n <SelectValue />\n\n <SelectTriggerIcon />\n </button>\n );\n }\n);\nSelectTrigger.displayName = \"Select.Trigger\";\n\nexport { AllSelectTriggerProps, SelectTrigger, SelectTriggerProps };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { Text } from \"../../text\";\nimport { useSelectContext } from \"../select-context\";\n\nexport interface SelectValueProps\n extends React.HTMLAttributes<HTMLSpanElement> {\n placeholder?: string;\n}\n\nexport const SelectValue = React.forwardRef<HTMLSpanElement, SelectValueProps>(\n (props, ref) => {\n const { className, placeholder: placeholderProp, ...rest } = props;\n const context = useSelectContext();\n const placeholder = placeholderProp ?? context.placeholder;\n\n return (\n <span\n ref={ref}\n className={clsx(\"select-value\", className)}\n data-placeholder={!context.value ? \"\" : undefined}\n {...rest}\n >\n <Text disabled={context.disabled}>\n {context.displayValue || placeholder}\n </Text>\n </span>\n );\n }\n);\nSelectValue.displayName = \"Select.Value\";\n","import clsx from \"clsx\";\nimport * as React from \"react\";\n\nconst SelectTriggerIcon: React.FC<React.SVGAttributes<SVGElement>> = (\n props\n) => {\n const { className, ...rest } = props;\n return (\n <svg\n className={clsx(\"select-trigger-icon\", className)}\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <path\n d=\"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n};\n\nexport { SelectTriggerIcon };\n","import { GetPropDefTypes } from \"../../../props/prop-def\";\n\nconst SelectTriggerPropsDefs = {} as const;\n\ntype SelectTriggerInternalProps = GetPropDefTypes<\n typeof SelectTriggerPropsDefs\n>;\n\nexport { SelectTriggerInternalProps, SelectTriggerPropsDefs };\n","import {\n FunctionPropDef,\n GetPropDefTypes,\n PropDef,\n} from \"../../../props/prop-def\";\n\nconst selectVariants = [\"outlined\", \"solid\", \"clear\"] as const;\ntype SelectVariant = (typeof selectVariants)[number];\n\nconst SelectRootPropsDefs = {\n variant: {\n type: \"enum\",\n values: selectVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<SelectVariant>,\n\n value: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n defaultValue: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n disabled: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n required: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n placeholder: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n name: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n onValueChange: {\n type: \"function\",\n } satisfies FunctionPropDef<(value: string) => void> as FunctionPropDef<\n (value: string) => void\n >,\n} as const;\n\ntype SelectRootInternalProps = GetPropDefTypes<typeof SelectRootPropsDefs>;\n\nexport { SelectRootInternalProps, SelectRootPropsDefs, SelectVariant };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\n\ninterface SelectSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst SelectSeparator = React.forwardRef<HTMLDivElement, SelectSeparatorProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n\n return (\n <div\n ref={ref}\n className={clsx(\"select-separator\", className)}\n {...rest}\n />\n );\n }\n);\nSelectSeparator.displayName = \"Select.Separator\";\n\nexport { SelectSeparator, SelectSeparatorProps };\n","import { SelectContent } from \"./content/select-content\";\nimport { SelectGroup } from \"./group/select-group\";\nimport { SelectItem } from \"./item/select-item\";\nimport { SelectLabel } from \"./label/select-label\";\nimport { SelectRoot } from \"./root/select-root\";\nimport { SelectSeparator } from \"./separator/select-separator\";\nimport { SelectTrigger } from \"./trigger/select-trigger\";\nimport { SelectViewport } from \"./viewport/select-viewport\";\n\nexport const Select = {\n Root: SelectRoot,\n Trigger: SelectTrigger,\n Content: SelectContent,\n Viewport: SelectViewport,\n Group: SelectGroup,\n Label: SelectLabel,\n Item: SelectItem,\n Separator: SelectSeparator,\n};\n","import clsx from \"clsx\";\nimport React, { FC } from \"react\";\nimport { MarginProps, PaddingProps } from \"../../props\";\nimport { getComponentProps } from \"../../utils/get-component-props\";\nimport { SeparatorInternalProps, SeparatorPropsDefs } from \"./separator.props\";\n\ninterface AllSeparatorProps\n extends SeparatorInternalProps,\n MarginProps,\n PaddingProps {}\n\ntype SeparatorProps = AllSeparatorProps & React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * A component for visually separating content with a line\n */\nconst Separator: FC<SeparatorProps> = (props) => {\n const { className, dataAttrs, style } = getComponentProps(\n props,\n SeparatorPropsDefs\n );\n\n return (\n <div\n className={clsx(\"separator\", className)}\n style={style}\n {...dataAttrs}\n />\n );\n};\nSeparator.displayName = \"Separator\";\n\nexport { AllSeparatorProps, Separator, SeparatorProps };\n","import { GetPropDefTypes, PropDef } from \"../../props/prop-def\";\n\nconst directions = [\"horizontal\", \"vertical\"] as const;\nconst variants = [\"solid\", \"dashed\", \"dotted\"] as const;\n\nconst SeparatorPropsDefs = {\n /**\n * The direction of the separator.\n *\n * @example direction=\"vertical\" // positions the separator vertically\n */\n direction: {\n type: \"enum\",\n values: directions,\n default: \"horizontal\",\n dataAttr: \"direction\",\n } satisfies PropDef<(typeof directions)[number]>,\n\n /**\n * The variant of the separator.\n *\n * @example variant=\"dashed\" // makes the separator dashed\n */\n variant: {\n type: \"enum\",\n values: variants,\n default: \"solid\",\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof variants)[number]>,\n};\n\ntype SeparatorInternalProps = GetPropDefTypes<typeof SeparatorPropsDefs>;\n\nexport { SeparatorInternalProps, SeparatorPropsDefs };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { GetProps } from \"../../utils/get-props\";\nimport {\n ThemeAppearance,\n ThemeContext,\n ThemeContextProps,\n ThemeRadius,\n ThemeRoundness,\n} from \"./theme-context\";\nimport { ThemePropsDefs } from \"./theme.props\";\n\nexport type ThemeProps = GetProps<typeof ThemePropsDefs> &\n React.HTMLAttributes<HTMLDivElement>;\n\nconst Theme = React.forwardRef<HTMLDivElement, ThemeProps>((props, ref) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n\n if (isRoot) return <ThemeRoot {...props} ref={ref} />;\n\n return <ThemeSub {...props} ref={ref} />;\n});\nTheme.displayName = \"Theme\";\n\nconst ThemeRoot = React.forwardRef<HTMLDivElement, ThemeProps>((props, ref) => {\n const {\n appearance: themeAppearance,\n radius: themeRadius,\n roundness: themeRoundness,\n spacing: themeSpacing,\n\n children,\n ...rest\n } = props;\n\n const [appearance, setAppearance] = React.useState<ThemeAppearance>(\n themeAppearance ?? \"light\"\n );\n const [radius, setRadius] = React.useState<ThemeRadius>(themeRadius ?? \"md\");\n const [roundness, setRoundness] = React.useState<ThemeRoundness>(\n themeRoundness ?? \"3\"\n );\n const [spacing, setSpacing] = React.useState(themeSpacing ?? \"md\");\n\n const value = React.useMemo(\n () => ({\n appearance,\n radius,\n roundness,\n spacing,\n onAppearanceChange: setAppearance,\n onRadiusChange: setRadius,\n onRoundnessChange: setRoundness,\n onSpacingChange: setSpacing,\n }),\n [appearance, radius, roundness, spacing]\n );\n\n return (\n <ThemeContext.Provider value={value}>\n <div\n ref={ref}\n data-appearance={appearance}\n data-theme-radius={radius}\n data-theme-roundness={roundness}\n data-theme-spacing={spacing}\n {...rest}\n >\n {children}\n </div>\n </ThemeContext.Provider>\n );\n});\nThemeRoot.displayName = \"ThemeRoot\";\n\nconst ThemeSub = React.forwardRef<\n HTMLDivElement,\n Partial<ThemeContextProps> &\n React.HTMLAttributes<HTMLDivElement> & { isRoot?: boolean }\n>((props, ref) => {\n const context = React.useContext(ThemeContext)!;\n\n const {\n appearance,\n radius,\n roundness,\n spacing,\n onAppearanceChange,\n onRadiusChange,\n onRoundnessChange,\n onSpacingChange,\n\n children,\n ...rest\n } = props;\n\n const contextProps: ThemeContextProps = {\n appearance: appearance ?? context.appearance,\n radius: radius ?? context.radius,\n roundness: roundness ?? context.roundness,\n spacing: spacing ?? context.spacing,\n\n onAppearanceChange: context.onAppearanceChange,\n onRadiusChange: context.onRadiusChange,\n onRoundnessChange: context.onRoundnessChange,\n onSpacingChange: context.onSpacingChange,\n };\n\n return (\n <ThemeContext.Provider value={contextProps}>\n <div\n ref={ref}\n data-appearance={appearance}\n data-theme-radius={radius}\n data-theme-roundness={roundness}\n data-theme-spacing={spacing}\n {...rest}\n className=\"flex\"\n >\n {children}\n </div>\n </ThemeContext.Provider>\n );\n});\nThemeSub.displayName = \"ThemeSub\";\n\nexport { Theme };\n","\"use client\";\n\nimport { Select } from \"../select\";\nimport { useTheme } from \"./theme-context\";\n\nexport function ThemeControl() {\n const {\n appearance,\n onAppearanceChange,\n radius,\n onRadiusChange,\n roundness,\n onRoundnessChange,\n spacing,\n onSpacingChange,\n } = useTheme();\n\n return (\n <div className=\"flex flex-col gap-2\">\n <Select.Root\n variant=\"solid\"\n value={appearance}\n onValueChange={(change) => onAppearanceChange?.(change as any)}\n >\n <Select.Label position=\"inside\">Theme Settings</Select.Label>\n\n <Select.Trigger />\n\n <Select.Content>\n <Select.Item value=\"light\">Light</Select.Item>\n <Select.Item value=\"dark\">Dark</Select.Item>\n </Select.Content>\n </Select.Root>\n\n <Select.Root\n variant=\"solid\"\n value={radius}\n onValueChange={(change) => onRadiusChange?.(change as any)}\n >\n <Select.Label position=\"inside\">Radius</Select.Label>\n\n <Select.Trigger />\n\n <Select.Content>\n <Select.Item value=\"none\">None</Select.Item>\n <Select.Item value=\"xs\">XS</Select.Item>\n <Select.Item value=\"sm\">SM</Select.Item>\n <Select.Item value=\"md\">MD</Select.Item>\n <Select.Item value=\"lg\">LG</Select.Item>\n <Select.Item value=\"xl\">XL</Select.Item>\n <Select.Item value=\"full\">FULL</Select.Item>\n </Select.Content>\n </Select.Root>\n\n <Select.Root\n variant=\"solid\"\n value={roundness}\n onValueChange={(change) => onRoundnessChange?.(change as any)}\n >\n <Select.Label className=\"min-w-40!\" position=\"inside\">\n Roundness\n </Select.Label>\n\n <Select.Trigger />\n\n <Select.Content>\n <Select.Item value=\"1\">1</Select.Item>\n <Select.Item value=\"2\">2</Select.Item>\n <Select.Item value=\"3\">3</Select.Item>\n <Select.Item value=\"4\">4</Select.Item>\n <Select.Item value=\"5\">5</Select.Item>\n <Select.Item value=\"6\">6</Select.Item>\n </Select.Content>\n </Select.Root>\n\n <Select.Root\n variant=\"solid\"\n value={spacing}\n onValueChange={(change) => onSpacingChange?.(change as any)}\n >\n <Select.Label position=\"inside\">Spacing</Select.Label>\n\n <Select.Trigger />\n\n <Select.Content>\n <Select.Item value=\"xs\">XS</Select.Item>\n <Select.Item value=\"sm\">SM</Select.Item>\n <Select.Item value=\"md\">MD</Select.Item>\n <Select.Item value=\"lg\">LG</Select.Item>\n <Select.Item value=\"xl\">XL</Select.Item>\n </Select.Content>\n </Select.Root>\n </div>\n );\n}\n"],"mappings":";;;AAAA,OAAOA,WAAU;;;ACAjB,OAAO,UAAU;AAGV,SAAS,kBAOd,UAAa,UAAa;AAC1B,MAAI,QAA6B,MAAM,SAAS,CAAC;AACjD,QAAM,aAAuB,MAAM,YAAY,CAAC,MAAM,SAAS,IAAI,CAAC;AACpE,QAAM,YAAoC,CAAC;AAC3C,QAAM,iBAAsC,CAAC;AAE7C,QAAM,WAAW,OAAO,OAAO,CAAC,GAAG,GAAG,QAAQ;AAC9C,QAAM,WAAW,OAAO,KAAK,QAAQ;AAGrC,QAAM,YAAY,EAAE,GAAG,MAAM;AAC7B,SAAO,UAAU;AACjB,SAAO,UAAU;AAEjB,aAAW,OAAO,UAAU;AAC1B,UAAM,OAAO,SAAS,GAAG;AACzB,UAAM,QAAQ,QAAQ,GAAG;AAGzB,WAAO,UAAU,GAAG;AAGpB,QACE,KAAK,SAA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,OAAM,KAAI,eAAC;AAAA,aAC1B;AAAA;AAAA;AAAA,IACF;AAAA,IAEA,gBAAAC;AAAA,MAAC,OAAO;AAAA,MAAP;AAAA,QACC,SAAQ;AAAA,QACR,OAAO;AAAA,QACP,eAAe,CAAC,WAAW,kBAAkB,MAAa;AAAA,QAE1D;AAAA,0BAAAD,MAAC,OAAO,OAAP,EAAa,UAAS,UAAS,qBAAO;AAAA,UAEvC,gBAAAA,MAAC,OAAO,SAAP,EAAe;AAAA,UAEhB,gBAAAC,MAAC,OAAO,SAAP,EACC;AAAA,4BAAAD,MAAC,OAAO,MAAP,EAAY,OAAM,MAAK,gBAAE;AAAA,YAC1B,gBAAAA,MAAC,OAAO,MAAP,EAAY,OAAM,MAAK,gBAAE;AAAA,YAC1B,gBAAAA,MAAC,OAAO,MAAP,EAAY,OAAM,MAAK,gBAAE;AAAA,YAC1B,gBAAAA,MAAC,OAAO,MAAP,EAAY,OAAM,MAAK,gBAAE;AAAA,YAC1B,gBAAAA,MAAC,OAAO,MAAP,EAAY,OAAM,MAAK,gBAAE;AAAA,aAC5B;AAAA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":["clsx","clsx","clsx","jsx","jsx","clsx","clsx","React","React","jsxs","header","content","React","clsx","clsx","useMemo","React","value","jsx","ALLOWED_CHILDREN","useMemo","clsx","clsx","jsx","clsx","clsx","React","jsx","clsx","clsx","useState","jsx","useState","clsx","clsx","React","jsx","jsx","React","jsx","jsxs","React","clsx","clsx","React","clsx","React","jsx","React","clsx","jsx","React","clsx","clsx","isValidElement","useMemo","useState","jsx","jsxs","ALLOWED_CHILDREN","useState","useMemo","isValidElement","clsx","clsx","React","jsx","clsx","React","React","jsx","clsx","clsx","React","React","React","jsx","content","clsx","React","React","jsx","jsx","ALLOWED_CHILDREN","clsx","React","React","React","clsx","React","jsx","jsx","clsx","clsx","React","jsx","jsxs","clsx","clsx","React","jsx","jsx","jsxs","clsx","clsx","React","labelPositions","jsx","clsx","clsx","useId","useLayoutEffect","useMemo","useRef","useState","clsx","React","clsx","React","jsx","clsx","clsx","jsx","jsx","jsxs","clsx","jsx","jsxs","ALLOWED_CHILDREN","useState","useId","useRef","useMemo","useLayoutEffect","clsx","clsx","React","jsx","clsx","variants","jsx","clsx","React","jsx","roundness","jsx","jsxs","roundness"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/accordion/content/accordion-content.tsx","../src/utils/get-component-props.ts","../src/components/accordion/accordion-context.ts","../src/components/accordion/content/accordion-content.props.ts","../src/components/accordion/header/accordion-header.tsx","../src/icons/icon-colors.ts","../src/icons/chevron-down.icon.tsx","../src/components/accordion/header/accordion-header.props.ts","../src/components/accordion/item/accordion-item.tsx","../src/utils/filter-children.ts","../src/components/accordion/item/accordion-item.props.ts","../src/components/accordion/root/accordion-root.tsx","../src/props/align.prop.ts","../src/utils/parse-color.ts","../src/props/color.prop.ts","../src/props/margin.prop.ts","../src/props/padding.prop.ts","../src/props/radius.prop.ts","../src/props/roundness.prop.ts","../src/props/size.prop.ts","../src/props/spacing.prop.ts","../src/utils/use-controllable-state.ts","../src/components/accordion/root/accordion-root.props.ts","../src/components/accordion/accordion.tsx","../src/components/badge/badge.tsx","../src/components/badge/badge.props.ts","../src/components/box/box.tsx","../src/components/box/box.props.ts","../src/components/button/button.tsx","../src/components/button/button.props.ts","../src/components/checkbox/indicator/checkbox-indicator.tsx","../src/icons/check-mark.icon.tsx","../src/icons/minus.icon.tsx","../src/components/checkbox/checkbox-context.ts","../src/components/checkbox/root/checkbox-root.props.ts","../src/components/checkbox/indicator/checkbox-indicator.props.ts","../src/components/checkbox/label/checkbox-label.tsx","../src/components/text/text.tsx","../src/components/text/text.props.ts","../src/components/checkbox/label/checkbox-label.props.ts","../src/components/checkbox/root/checkbox-root.tsx","../src/components/checkbox/checkbox.tsx","../src/components/container/container.tsx","../src/components/panel/panel.tsx","../src/components/panel/panel.props.ts","../src/components/portal/backdrop/portal-backdrop.tsx","../src/components/portal/portal-context.tsx","../src/components/portal/backdrop/portal-backdrop.props.ts","../src/components/portal/content/portal-content.tsx","../src/components/theme/theme-context.tsx","../src/components/portal/utils/use-anchor-position.ts","../src/components/portal/content/portal-content.props.ts","../src/components/portal/root/portal-root.tsx","../src/components/portal/trigger/portal-trigger.tsx","../src/components/portal/root/portal-root.props.ts","../src/components/portal/portal.tsx","../src/components/progress-bar/fill/progress-bar-fill.tsx","../src/components/progress-bar/progress-bar-context.ts","../src/components/progress-bar/fill/progress-bar-fill.props.ts","../src/components/progress-bar/root/progress-bar-root.tsx","../src/components/progress-bar/root/progress-bar-root.props.ts","../src/components/progress-bar/progress-bar.tsx","../src/components/select/content/select-content.tsx","../src/components/select/select-context.tsx","../src/components/select/utils/user-composed-refs.ts","../src/components/select/viewport/select-viewport.tsx","../src/components/select/group/select-group.tsx","../src/components/select/group/select-group.props.ts","../src/components/select/item/select-item.tsx","../src/components/select/item/select-item-indicator.tsx","../src/components/select/item/select-item.props.ts","../src/components/select/label/select-label.tsx","../src/components/select/label/select-label.props.ts","../src/components/select/root/select-root.tsx","../src/components/select/trigger/select-trigger.tsx","../src/components/select/value/select-value.tsx","../src/components/select/trigger/select-trigger-icon.tsx","../src/components/select/trigger/select-trigger.props.ts","../src/components/select/root/select-root.props.ts","../src/components/select/separator/select-separator.tsx","../src/components/select/select.tsx","../src/components/separator/separator.tsx","../src/components/separator/separator.props.ts","../src/components/switch/indicator/switch-indicator.tsx","../src/components/switch/switch-context.ts","../src/components/switch/root/switch-root.props.ts","../src/components/switch/indicator/switch-indicator.props.ts","../src/components/switch/label/switch-label.tsx","../src/components/switch/label/switch-label.props.ts","../src/components/switch/root/switch-root.tsx","../src/components/switch/switch.tsx","../src/components/theme/theme.tsx","../src/components/theme/theme-control.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { FC } from \"react\";\nimport { PaddingProps } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useAccordionContext } from \"../accordion-context\";\nimport {\n AccordionContentInternalProps,\n AccordionContentPropDefs,\n} from \"./accordion-content.props\";\n\ninterface AllAccordionContentProps\n extends AccordionContentInternalProps, PaddingProps {}\n\ntype AccordionContentProps = AllAccordionContentProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\n/** Content for an accordion item */\nconst AccordionContent: FC<AccordionContentProps> = (props) => {\n const context = useAccordionContext();\n const { className, children, dataAttrs, ...rest } = getComponentProps(\n props,\n AccordionContentPropDefs,\n );\n\n return (\n <div\n data-variant={context.variant}\n className={clsx(\"accordion-content\", className)}\n {...rest}\n >\n <div className=\"accordion-content-inner\">\n <div>{children}</div>\n </div>\n </div>\n );\n};\nAccordionContent.displayName = \"Accordion.Content\";\n\nexport { AccordionContent, AccordionContentProps, AllAccordionContentProps };\n","import clsx from \"clsx\";\nimport { PropDef } from \"../props\";\n\nexport function getComponentProps<\n P extends {\n className?: string;\n style?: React.CSSProperties;\n [key: string]: any;\n },\n T extends Record<string, PropDef>[],\n>(props: P, ...propDefs: T) {\n let style: React.CSSProperties = props.style ?? {};\n const classNames: string[] = props.className ? [props.className] : [];\n const dataAttrs: Record<string, string> = {};\n const extractedProps: Record<string, any> = {};\n\n const allProps = Object.assign({}, ...propDefs);\n const propKeys = Object.keys(allProps);\n\n // Create a copy of props excluding the component-specific props\n const restProps = { ...props };\n delete restProps.className;\n delete restProps.style;\n\n for (const key of propKeys) {\n const prop = allProps[key];\n const value = props?.[key];\n\n // Remove the processed prop from restProps\n delete restProps[key];\n\n // Store the value for non-enum props (boolean, string, function)\n if (\n prop.type === \"boolean\" ||\n prop.type === \"string\" ||\n prop.type === \"number\" ||\n prop.type === \"value | array\" ||\n prop.type === \"reactNode\" ||\n prop.type === \"function\"\n ) {\n extractedProps[key] = value;\n\n if (prop.cssProperty) {\n if (value !== undefined && value !== null) {\n style = {\n ...style,\n [prop.cssProperty]:\n prop.type === \"boolean\" ? (value ? \"1\" : \"0\") : value,\n };\n } else if (prop.default !== undefined) {\n style = {\n ...style,\n [prop.cssProperty]:\n prop.type === \"boolean\"\n ? prop.default\n ? \"1\"\n : \"0\"\n : prop.default,\n };\n }\n }\n\n if (prop.dataAttr) {\n if (value) dataAttrs[`data-${prop.dataAttr}`] = value;\n else if (prop.default !== undefined) {\n dataAttrs[`data-${prop.dataAttr}`] = prop.default;\n }\n }\n\n continue;\n }\n\n const applyValue = (propValue: any, breakpoint?: string) => {\n const usedBreakpoint = breakpoint ? `-${breakpoint}` : \"\";\n\n if (prop.type === \"enum\" || prop.type === \"enum | string\") {\n if (propValue !== null && propValue !== undefined) {\n if (!breakpoint) extractedProps[key] = propValue;\n\n if (!prop.values.includes(propValue)) {\n const transformedValue =\n \"transform\" in prop && prop.transform\n ? prop.transform(propValue)\n : propValue;\n\n if (prop.className) {\n classNames.push(\n breakpoint ? `${prop.className}-${breakpoint}` : prop.className,\n );\n style = {\n ...style,\n [`--custom-${key}${usedBreakpoint}`]: transformedValue,\n };\n }\n\n if (prop.dataAttr) {\n dataAttrs[`data-${prop.dataAttr}${usedBreakpoint}`] = propValue;\n }\n } else if (prop.dataAttr) {\n if (propValue === \"inherit\" && prop.className) {\n classNames.push(prop.className);\n }\n\n dataAttrs[`data-${prop.dataAttr}${usedBreakpoint}`] = propValue;\n }\n } else if (prop.dataAttr && prop.default) {\n if (!breakpoint) extractedProps[key] = prop.default;\n if (prop.dataAttr) {\n dataAttrs[`data-${prop.dataAttr}${usedBreakpoint}`] = prop.default;\n }\n }\n }\n };\n\n if (\n \"responsive\" in prop &&\n prop.responsive &&\n value &&\n typeof value === \"object\" &&\n !Array.isArray(value)\n ) {\n // Apply breakpoint-specific values\n for (const [bp, bpValue] of Object.entries(value)) {\n applyValue(bpValue, bp);\n }\n\n if (\"dataAttr\" in prop && prop.dataAttr) {\n dataAttrs[`data-${prop.dataAttr}`] = \"\";\n }\n } else applyValue(value);\n }\n\n return {\n ...restProps,\n ...extractedProps,\n style,\n dataAttrs,\n className: clsx(classNames),\n };\n}\n","import React from \"react\";\n\nexport interface AccordionContextValue {\n value: string | string[] | null;\n setValue: (value: string | string[] | null) => void;\n onValueChange?: (value: string | string[] | null) => void;\n variant?: string;\n multiple?: boolean;\n itemsRef: React.RefObject<Map<string, HTMLDivElement>>;\n itemValues: React.RefObject<string[]>;\n}\n\nexport const AccordionContext =\n React.createContext<AccordionContextValue | null>(null);\n\nexport function useAccordionContext() {\n const context = React.useContext(AccordionContext);\n if (!context) {\n throw new Error(\n \"Accordion components must be used within an Accordion.Root\"\n );\n }\n return context;\n}\n","import { GetPropDefTypes } from \"../../../props/prop-def\";\n\nconst AccordionContentPropDefs = {\n //\n};\n\ntype AccordionContentInternalProps = GetPropDefTypes<\n typeof AccordionContentPropDefs\n>;\n\nexport { AccordionContentInternalProps, AccordionContentPropDefs };\n","import clsx from \"clsx\";\nimport { FC } from \"react\";\nimport { ChevronDown } from \"../../../icons/chevron-down.icon\";\nimport { PaddingProps } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useAccordionContext } from \"../accordion-context\";\nimport {\n AccordionHeaderInternalProps,\n AccordionHeaderPropDefs,\n} from \"./accordion-header.props\";\n\ninterface AllAccordionHeaderProps\n extends AccordionHeaderInternalProps, PaddingProps {}\n\ntype AccordionHeaderProps = AllAccordionHeaderProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\n/** Header for an accordion item */\nconst AccordionHeader: FC<AccordionHeaderProps> = (props) => {\n const context = useAccordionContext();\n const { className, children, value, dataAttrs, ...rest } = getComponentProps(\n props,\n AccordionHeaderPropDefs,\n );\n\n const itemOpen = context.multiple\n ? context.value?.includes(value ?? \"\")\n : context.value === value;\n\n const handleClick = () => {\n if (!value) return;\n\n if (context.multiple) {\n const current = (context.value as string[]) ?? [];\n const next = current.includes(value)\n ? current.filter((v) => v !== value)\n : [...current, value];\n context.setValue(next.length ? next : null);\n } else {\n context.setValue(context.value === value ? null : value);\n }\n };\n\n return (\n <div\n data-open={itemOpen}\n data-variant={context.variant}\n className={clsx(\"accordion-header\", className)}\n role=\"button\"\n tabIndex={0}\n onClick={handleClick}\n onKeyDown={(e) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n handleClick();\n }\n }}\n {...rest}\n >\n <span>{children}</span>\n\n <span className=\"accordion-header-indicator\" aria-hidden=\"true\">\n <ChevronDown />\n </span>\n </div>\n );\n};\nAccordionHeader.displayName = \"Accordion.Header\";\n\nexport { AccordionHeader, AccordionHeaderProps, AllAccordionHeaderProps };\n","type IconColors = \"currentColor\" | \"primary\" | \"white\" | \"black\";\n\ninterface IconProps {\n color?: IconColors;\n}\n\nconst colorMap: Record<IconColors, string> = {\n currentColor: \"currentColor\",\n primary: \"rgb(var(--primary))\",\n white: \"white\",\n black: \"black\",\n};\n\nexport { colorMap, IconProps };\n","import * as React from \"react\";\nimport { colorMap, IconProps } from \"./icon-colors\";\n\nexport const ChevronDown: React.FC<IconProps> = ({\n color = \"currentColor\",\n}) => {\n return (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill={colorMap[color]}\n d=\"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n};\n","import { GetPropDefTypes, PropDef } from \"../../../props/prop-def\";\n\nconst AccordionHeaderPropDefs = {\n /** The value of the parent AccordionItem — injected automatically */\n value: {\n type: \"string\",\n } satisfies PropDef<string>,\n};\n\ntype AccordionHeaderInternalProps = GetPropDefTypes<\n typeof AccordionHeaderPropDefs\n>;\n\nexport { AccordionHeaderInternalProps, AccordionHeaderPropDefs };\n","import clsx from \"clsx\";\nimport React, { FC, useEffect, useMemo } from \"react\";\nimport { filterChildren } from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useAccordionContext } from \"../accordion-context\";\nimport { AccordionContent } from \"../content/accordion-content\";\nimport { AccordionHeader } from \"../header/accordion-header\";\nimport {\n AccordionItemInternalProps,\n AccordionItemPropDefs,\n} from \"./accordion-item.props\";\n\ninterface AllAccordionItemProps extends AccordionItemInternalProps {}\n\nconst ALLOWED_CHILDREN = [\n AccordionHeader.displayName!,\n AccordionContent.displayName!,\n];\n\n/**\n * An individual item within an accordion. Contains the header and content for a single section of the accordion.\n */\ntype AccordionItemProps = AllAccordionItemProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\nconst AccordionItem: FC<AccordionItemProps> = (props) => {\n const context = useAccordionContext();\n const { open, value, className, dataAttrs, ...rest } = getComponentProps(\n props,\n AccordionItemPropDefs,\n );\n\n const itemOpen =\n open ??\n (context.multiple\n ? context.value?.includes(value ?? \"\")\n : context.value === value);\n\n const validChildren = filterChildren(props.children, ALLOWED_CHILDREN, {\n parentDisplayName: AccordionItem.displayName,\n }) as React.ReactElement[];\n\n const { header, content } = useMemo(() => {\n const header = validChildren.find(\n (child) =>\n (child.type as React.FC).displayName === AccordionHeader.displayName,\n );\n\n const content = validChildren.find(\n (child) =>\n (child.type as React.FC).displayName === AccordionContent.displayName,\n );\n\n return { header, content };\n }, [validChildren]);\n\n useEffect(() => {\n if (!value) return;\n\n return () => {\n const values = context.itemValues.current;\n const index = values.indexOf(value);\n if (index > -1) values.splice(index, 1);\n };\n }, [value]);\n\n const headerWithValue = header\n ? React.cloneElement(header as React.ReactElement<{ value?: string }>, {\n value,\n })\n : null;\n\n return (\n <div\n data-variant={context.variant}\n className={clsx(\"accordion-item\", className)}\n {...rest}\n data-open={itemOpen}\n >\n {headerWithValue}\n {content}\n </div>\n );\n};\nAccordionItem.displayName = \"Accordion.Item\";\n\nexport { AccordionItem, AccordionItemProps, AllAccordionItemProps };\n","import * as React from \"react\";\n\n/**\n * Type utility to restrict children to specific React element types.\n * Use with Omit<Props, 'children'> & StrictChildren<AllowedProps>\n *\n * @example\n * type MyComponentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>\n * & StrictChildren<ChildAProps | ChildBProps>;\n */\nexport type StrictChildren<AllowedChildProps> = {\n children:\n | React.ReactElement<AllowedChildProps>\n | React.ReactElement<AllowedChildProps>[];\n};\n\n/**\n * Type utility to replace the children prop with strictly typed children.\n * Combines Omit and StrictChildren in one step.\n *\n * @example\n * type MyComponentProps = WithStrictChildren<\n * React.HTMLAttributes<HTMLDivElement>,\n * ChildAProps | ChildBProps\n * >;\n */\nexport type WithStrictChildren<\n Props extends { children?: React.ReactNode },\n AllowedChildProps\n> = Omit<Props, \"children\"> & StrictChildren<AllowedChildProps>;\n\n/**\n * Like WithStrictChildren, but children are optional.\n * When provided, children are still restricted to the allowed types.\n */\nexport type WithOptionalStrictChildren<\n Props extends { children?: React.ReactNode },\n AllowedChildProps\n> = Omit<Props, \"children\"> & Partial<StrictChildren<AllowedChildProps>>;\n\nexport interface FilterChildrenOptions {\n /** The parent component's displayName (for error/warning messages) */\n parentDisplayName?: string;\n /** If true, throws an error for invalid children instead of warning */\n strict?: boolean;\n}\n\n/**\n * Filters React children to only include allowed components based on displayName.\n * Logs a warning or throws an error for any invalid children.\n *\n * @param children - The children to filter\n * @param allowedDisplayNames - Array of allowed component displayNames\n * @param options - Configuration options\n * @returns Filtered array of valid children\n */\nexport function filterChildren(\n children: React.ReactNode,\n allowedDisplayNames: string[],\n options: FilterChildrenOptions = {}\n): React.ReactNode[] {\n const { parentDisplayName, strict = false } = options;\n\n return React.Children.toArray(children).filter((child) => {\n if (!React.isValidElement(child)) return false;\n\n const childType = child.type as React.ComponentType;\n const displayName = childType?.displayName;\n\n if (!displayName || !allowedDisplayNames.includes(displayName)) {\n const parent = parentDisplayName ?? \"Component\";\n const childName = displayName || \"Unknown\";\n const allowed = allowedDisplayNames.join(\", \");\n\n const message =\n `${parent}: Invalid child \"${childName}\"${\n strict ? \"\" : \" was filtered out\"\n }. ` + `Only ${allowed} are allowed as direct children.`;\n\n if (strict) throw new Error(message);\n console.warn(message);\n\n return false;\n }\n\n return true;\n });\n}\n","import { GetPropDefTypes, PropDef } from \"../../../props\";\n\nconst AccordionItemPropDefs = {\n /**\n * Sets the accordion item to be open by default.\n */\n open: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n /**\n * The value of the accordion item. Automatically generated if not provided.\n */\n value: {\n type: \"string\",\n } satisfies PropDef<string>,\n} as const;\n\ntype AccordionItemInternalProps = GetPropDefTypes<typeof AccordionItemPropDefs>;\n\nexport { AccordionItemInternalProps, AccordionItemPropDefs };\n","import clsx from \"clsx\";\nimport { FC, HTMLAttributes, ReactElement, useMemo, useRef } from \"react\";\nimport { SizeProp, SizePropDef } from \"../../../props\";\nimport {\n filterChildren,\n WithStrictChildren,\n} from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useControllableState } from \"../../../utils/use-controllable-state\";\nimport { AccordionContext } from \"../accordion-context\";\nimport { AccordionItem, AccordionItemProps } from \"../item/accordion-item\";\nimport {\n AccordionRootInternalProps,\n AccordionRootPropsDefs,\n} from \"./accordion-root.props\";\n\ninterface AllAccordionRootProps extends AccordionRootInternalProps, SizeProp {}\n\nconst ALLOWED_CHILDREN = [AccordionItem.displayName!];\n\n/**\n * A versatile Accordion component, managing state, context, and styling.\n */\ntype AccordionRootProps = AllAccordionRootProps &\n WithStrictChildren<HTMLAttributes<HTMLDivElement>, AccordionItemProps>;\n\nconst AccordionRoot: FC<AccordionRootProps> = (props) => {\n const {\n variant,\n multiple,\n size,\n value: propValue,\n onValueChange,\n className,\n dataAttrs,\n ...rest\n } = getComponentProps(props, AccordionRootPropsDefs, SizePropDef);\n\n const [value, setValue] = useControllableState({\n value: propValue,\n defaultValue: propValue ?? null,\n onChange: onValueChange,\n });\n\n const validChildren = filterChildren(props.children, ALLOWED_CHILDREN, {\n parentDisplayName: AccordionRoot.displayName,\n }) as ReactElement<{ value?: string; children?: React.ReactNode }>[];\n\n const itemsRef = useRef<Map<string, HTMLDivElement>>(new Map());\n const itemValues = useRef<string[]>([]);\n\n const contextValue = useMemo(\n () => ({\n variant,\n multiple,\n value,\n setValue,\n onValueChange,\n itemsRef,\n itemValues,\n }),\n [variant, multiple, value, setValue, onValueChange],\n );\n\n return (\n <AccordionContext.Provider value={contextValue}>\n <div\n className={clsx(\"accordion-root\", className)}\n {...dataAttrs}\n {...rest}\n >\n {validChildren.map((child, index) => (\n <AccordionItem\n key={index}\n value={child.props.value ?? String(index)}\n {...child.props}\n >\n {child.props.children}\n </AccordionItem>\n ))}\n </div>\n </AccordionContext.Provider>\n );\n};\nAccordionRoot.displayName = \"Accordion\";\n\nexport { AccordionRoot, AccordionRootProps, AllAccordionRootProps };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst Alignments = [\"start\", \"center\", \"end\"] as const;\n\nconst AlignPropDef = {\n /**\n * The alignment of the component.\n */\n align: {\n type: \"enum\",\n values: Alignments,\n dataAttr: \"align\",\n } satisfies PropDef<(typeof Alignments)[number]>,\n};\n\ntype AlignProp = GetPropDefTypes<typeof AlignPropDef>;\n\nexport { Alignments, AlignProp, AlignPropDef };\n","/**\n * Parses a color string (hex, rgb, or raw r,g,b) into a raw \"r, g, b\" string\n * suitable for use with CSS rgba().\n *\n * Supported formats:\n * - Hex: \"#7BEB34\", \"#7beb34\", \"#abc\"\n * - RGB function: \"rgb(125, 235, 52)\"\n * - Raw: \"125, 235, 52\"\n *\n * Returns the original string unchanged if parsing fails.\n */\nexport function parseColor(value: string): string {\n const trimmed = value.trim();\n\n // Hex color: #RGB or #RRGGBB\n const hexMatch = trimmed.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);\n if (hexMatch) {\n let hex = hexMatch[1];\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n const r = parseInt(hex.slice(0, 2), 16);\n const g = parseInt(hex.slice(2, 4), 16);\n const b = parseInt(hex.slice(4, 6), 16);\n return `${r}, ${g}, ${b}`;\n }\n\n // rgb(r, g, b) or rgb(r g b)\n const rgbMatch = trimmed.match(\n /^rgba?\\(\\s*(\\d{1,3})\\s*[,\\s]\\s*(\\d{1,3})\\s*[,\\s]\\s*(\\d{1,3})\\s*(?:[,/]\\s*[\\d.]+%?\\s*)?\\)$/,\n );\n if (rgbMatch) {\n return `${rgbMatch[1]}, ${rgbMatch[2]}, ${rgbMatch[3]}`;\n }\n\n // Already raw \"r, g, b\" or unknown — return as-is\n return trimmed;\n}\n","import { parseColor } from \"../utils/parse-color\";\nimport { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst Colors = [\n \"primary\",\n \"secondary\",\n \"tertiary\",\n \"accent\",\n \"success\",\n \"warning\",\n \"danger\",\n \"info\",\n] as const;\n\nconst ColorPropDef = {\n /**\n * Sets the color of the component.\n *\n * Uses predefined theme colors (\"primary\", \"secondary\", etc.) or accepts custom color values in hex, rgb, or raw rgb formats.\n *\n * @example color=\"primary\" // primary color\n * @example color=\"#7BEB34\" // hex color\n * @example color=\"rgb(125, 235, 52)\" // rgb color\n * @example color=\"125, 235, 52\" // raw rgb values\n */\n color: {\n type: \"enum | string\",\n values: Colors,\n dataAttr: \"color\",\n className: \"color\",\n transform: parseColor,\n } satisfies PropDef<(typeof Colors)[number]>,\n};\n\ntype ColorProp = GetPropDefTypes<typeof ColorPropDef>;\n\nexport { ColorProp, ColorPropDef, Colors };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst marginValues = [\n \"auto\",\n \"inherit\",\n \"-8\",\n \"-6\",\n \"-5\",\n \"-4\",\n \"-3\",\n \"-2\",\n \"-1\",\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"8\",\n] as const;\n\nconst MarginPropDefs = {\n /**\n * Sets margin on all sides of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example m=\"4\" // 16px margin on all sides\n * @example m=\"-26px\" // -26px negative margin custom value\n * @example m={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n */\n m: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"m\",\n className: \"lcs-m\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the top of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example mt=\"4\" // 16px margin on all sides\n * @example mt=\"-26px\" // -26px negative margin custom value\n * @example mt={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n */\n mt: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"mt\",\n className: \"lcs-mt\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the bottom of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example mb=\"4\" // 16px margin on all sides\n * @example mb=\"-26px\" // -26px negative margin custom value\n * @example mb={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n mb: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"mb\",\n className: \"lcs-mb\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the left of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example ml=\"4\" // 16px margin on all sides\n * @example ml=\"-26px\" // -26px negative margin custom value\n * @example ml={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n */\n ml: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"ml\",\n className: \"lcs-ml\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the right of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example mr=\"4\" // 16px margin on all sides\n * @example mr=\"-26px\" // -26px negative margin custom value\n * @example mr={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mr: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"mr\",\n className: \"lcs-mr\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the left and right (horizontal) sides of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example mx=\"4\" // 16px horizontal margin\n * @example mx=\"-26px\" // -26px negative horizontal margin custom value\n * @example mx={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive horizontal margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mx: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"mx\",\n className: \"lcs-mx\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n\n /**\n * Sets margin on the top and bottom (vertical) sides of the element.\n * Supports scale, auto, inherit, custom, and responsive values.\n *\n * @example my=\"4\" // 16px vertical margin\n * @example my=\"-26px\" // -26px negative vertical margin custom value\n * @example my={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive vertical margins\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n my: {\n type: \"enum | string\",\n values: marginValues,\n dataAttr: \"my\",\n className: \"lcs-my\",\n responsive: true,\n } satisfies PropDef<(typeof marginValues)[number]>,\n};\n\ntype MarginProps = GetPropDefTypes<typeof MarginPropDefs>;\n\nexport { MarginPropDefs, MarginProps };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst paddingValues = [\n \"inherit\",\n \"0\",\n \"1\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"8\",\n] as const;\n\nconst PaddingPropDefs = {\n /**\n * Sets padding on all sides of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example p=\"4\" // 16px padding on all sides\n * @example p=\"26px\" // 26px padding custom value\n * @example p={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n */\n p: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"p\",\n className: \"lcs-p\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the top of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example pt=\"4\" // 16px top padding\n * @example pt=\"26px\" // 26px top padding custom value\n * @example pt={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive top padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n */\n pt: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"pt\",\n className: \"lcs-pt\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the bottom of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example pb=\"4\" // 16px bottom padding\n * @example pb=\"26px\" // 26px bottom padding custom value\n * @example pb={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive bottom padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n pb: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"pb\",\n className: \"lcs-pb\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the left of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example pl=\"4\" // 16px left padding\n * @example pl=\"26px\" // 26px left padding custom value\n * @example pl={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive left padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n */\n pl: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"pl\",\n className: \"lcs-pl\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the right of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example pr=\"4\" // 16px right padding\n * @example pr=\"26px\" // 26px right padding custom value\n * @example pr={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive right padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n pr: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"pr\",\n className: \"lcs-pr\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the left and right (horizontal) sides of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example px=\"4\" // 16px horizontal padding\n * @example px=\"26px\" // 26px horizontal padding custom value\n * @example px={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive horizontal padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n px: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"px\",\n className: \"lcs-px\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n\n /**\n * Sets padding on the top and bottom (vertical) sides of the element.\n * Supports scale, inherit, custom, and responsive values.\n *\n * @example py=\"4\" // 16px vertical padding\n * @example py=\"26px\" // 26px vertical padding custom value\n * @example py={{ initial: \"2\", md: \"4\", lg: \"8\" }} // responsive vertical padding\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n py: {\n type: \"enum | string\",\n values: paddingValues,\n dataAttr: \"py\",\n className: \"lcs-py\",\n responsive: true,\n } satisfies PropDef<(typeof paddingValues)[number]>,\n};\n\ntype PaddingProps = GetPropDefTypes<typeof PaddingPropDefs>;\n\nexport { PaddingPropDefs, PaddingProps };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst radii = [\n \"none\",\n \"xs\",\n \"sm\",\n \"md\",\n \"lg\",\n \"xl\",\n \"full\",\n \"inherit\",\n] as const;\n\nconst RadiusPropDefs = {\n /**\n * Sets the border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius=\"md\" // medium border-radius\n * @example radius=\"26px\" // 26px border-radius custom value\n * @example radius={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @default \"theme\" // uses the theme's default border-radius value or none if not set\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius\n */\n radius: {\n type: \"enum | string\",\n values: radii,\n default: \"theme\",\n dataAttr: \"radius\",\n className: \"lcs-radius\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the top border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius-t=\"md\" // medium border-radius\n * @example radius-t=\"26px\" // 26px border-radius custom value\n * @example radius-t={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius\n */\n \"radius-t\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-t\",\n className: \"lcs-radius-t\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the right border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius-r=\"md\" // medium border-radius\n * @example radius-r=\"26px\" // 26px border-radius custom value\n * @example radius-r={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius\n */\n \"radius-r\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-r\",\n className: \"lcs-radius-r\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the bottom border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius-b=\"md\" // medium border-radius\n * @example radius-b=\"26px\" // 26px border-radius custom value\n * @example radius-b={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius\n */\n \"radius-b\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-b\",\n className: \"lcs-radius-b\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the left border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius-l=\"md\" // medium border-radius\n * @example radius-l=\"26px\" // 26px border-radius custom value\n * @example radius-l={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-top-radius\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-left-bottom-radius\n */\n \"radius-l\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-l\",\n className: \"lcs-radius-l\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the top-left border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example radius-tl=\"md\" // medium border-radius\n * @example radius-tl=\"26px\" // 26px border-radius custom value\n * @example radius-tl={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius\n */\n \"radius-tl\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-tl\",\n className: \"lcs-radius-tl\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the top-right border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example \"radius-tr\"=\"md\" // medium border-radius\n * @example \"radius-tr\"=\"26px\" // 26px border-radius custom value\n * @example \"radius-tr\"={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-right-radius\n */\n \"radius-tr\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-tr\",\n className: \"lcs-radius-tr\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the bottom-right border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example \"radius-br\"=\"md\" // medium border-radius\n * @example \"radius-br\"=\"26px\" // 26px border-radius custom value\n * @example \"radius-br\"={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius\n */\n \"radius-br\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-br\",\n className: \"lcs-radius-br\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n\n /**\n * Sets the bottom-left border-radius of the element.\n * Supports scaled, inherit, custom, and responsive values.\n *\n * @example \"radius-bl\"=\"md\" // medium border-radius\n * @example \"radius-bl\"=\"26px\" // 26px border-radius custom value\n * @example \"radius-bl\"={{ initial: \"none\", lg: \"full\" }} // responsive border-radius\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius\n */\n \"radius-bl\": {\n type: \"enum | string\",\n values: radii,\n dataAttr: \"radius-bl\",\n className: \"lcs-radius-bl\",\n responsive: true,\n } satisfies PropDef<(typeof radii)[number]>,\n};\n\ntype RadiusProps = GetPropDefTypes<typeof RadiusPropDefs>;\n\nexport { radii, RadiusPropDefs, RadiusProps };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst roundness = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"inherit\"] as const;\n\nconst RoundnessPropDef = {\n /**\n * Sets the roundness multiplier for the element's radius.\n * Supports scaled and inherit values.\n *\n * @example roundness=\"4\" // 8px base roundness\n * @example roundness=\"inherit\" // inherits roundness from parent\n *\n * @default \"theme\" // uses the theme's default roundness value or none if not set\n */\n roundness: {\n type: \"enum\",\n values: roundness,\n default: \"theme\",\n dataAttr: \"roundness\",\n } satisfies PropDef<(typeof roundness)[number]>,\n};\n\ntype RoundnessProp = GetPropDefTypes<typeof RoundnessPropDef>;\n\nexport { roundness, RoundnessProp, RoundnessPropDef };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst Sizes = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"] as const;\n\nconst SizePropDef = {\n /**\n * Sets the size of the component.\n *\n * @example size=\"md\" // medium sized component\n */\n size: {\n type: \"enum | string\",\n values: Sizes,\n dataAttr: \"size\",\n className: \"size\",\n } satisfies PropDef<(typeof Sizes)[number]>,\n};\n\ntype SizeProp = GetPropDefTypes<typeof SizePropDef>;\n\nexport { SizeProp, SizePropDef, Sizes };\n","import { GetPropDefTypes, PropDef } from \"./prop-def\";\n\nconst spacingValues = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"inherit\"] as const;\n\nconst SpacingPropDef = {\n /**\n * Sets the spacing scale for the component.\n * This multiplier affects various layout properties such as margin, padding, and gap values.\n *\n * @example spacing=\"md\" // medium spacing scale (1)\n * @example spacing={{ initial: \"sm\", lg: \"xl\" }} // responsive spacing\n *\n * @default \"theme\" // uses the theme's default spacing value or none if not set\n */\n spacing: {\n type: \"enum\",\n values: spacingValues,\n dataAttr: \"spacing\",\n default: \"theme\",\n responsive: true,\n } satisfies PropDef<(typeof spacingValues)[number]>,\n};\n\ntype SpacingProp = GetPropDefTypes<typeof SpacingPropDef>;\n\nexport { SpacingProp, SpacingPropDef, spacingValues };\n","import * as React from \"react\";\n\nexport function useControllableState<T>({\n value,\n defaultValue,\n onChange,\n}: {\n value?: T;\n defaultValue: T;\n onChange?: (value: T) => void;\n}) {\n const [state, setState] = React.useState(defaultValue);\n\n const isControlled = value !== undefined;\n const current = isControlled ? value : state;\n\n const set = React.useCallback(\n (value: T) => {\n if (!isControlled) setState(value);\n onChange?.(value);\n },\n [isControlled, onChange]\n );\n\n return [current, set] as const;\n}\n","import {\n FunctionPropDef,\n GetPropDefTypes,\n PropDef,\n ValueOrArrayPropDef,\n} from \"../../../props/prop-def\";\n\nconst AccordionVariants = [\"solid\", \"outlined\", \"muted\"] as const;\n\nconst AccordionRootPropsDefs = {\n /**\n * Sets the variant style of the accordion (\"solid\", \"outlined\", or \"muted\").\n */\n variant: {\n type: \"enum\",\n values: AccordionVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof AccordionVariants)[number]>,\n\n /**\n * Allows multiple accordion items to be expanded simultaneously when set to true.\n */\n multiple: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n /**\n * The value of the accordion.\n */\n value: {\n type: \"value | array\",\n } satisfies PropDef<string> as ValueOrArrayPropDef<string>,\n\n /**\n * Callback fired when the value of the accordion changes.\n */\n onValueChange: {\n type: \"function\",\n } satisfies FunctionPropDef<\n (value: string | string[] | null) => void\n > as FunctionPropDef<(value: string | string[] | null) => void>,\n};\n\ntype AccordionRootInternalProps = GetPropDefTypes<\n typeof AccordionRootPropsDefs\n>;\n\nexport {\n AccordionRootInternalProps,\n AccordionRootPropsDefs,\n AccordionVariants,\n};\n","import { AccordionContent } from \"./content/accordion-content\";\nimport { AccordionHeader } from \"./header/accordion-header\";\nimport { AccordionItem } from \"./item/accordion-item\";\nimport { AccordionRoot } from \"./root/accordion-root\";\n\nexport const Accordion = Object.assign(AccordionRoot, {\n Root: AccordionRoot,\n Item: AccordionItem,\n Header: AccordionHeader,\n Content: AccordionContent,\n});\n","import clsx from \"clsx\";\nimport {\n ColorProp,\n MarginPropDefs,\n MarginProps,\n PaddingPropDefs,\n PaddingProps,\n RadiusPropDefs,\n RadiusProps,\n SizeProp,\n SizePropDef,\n} from \"../../props\";\nimport { getComponentProps } from \"../../utils/get-component-props\";\nimport { BadgeRootInternalProps, BadgeRootPropsDefs } from \"./badge.props\";\n\ninterface AllBadgeRootProps\n extends\n BadgeRootInternalProps,\n ColorProp,\n MarginProps,\n PaddingProps,\n RadiusProps,\n SizeProp {}\n\ntype BadgeRootProps = AllBadgeRootProps & React.HTMLAttributes<HTMLDivElement>;\n\nconst Badge: React.FC<BadgeRootProps> = (props) => {\n const { color, variant, className, dataAttrs, ...rest } = getComponentProps(\n props,\n BadgeRootPropsDefs,\n MarginPropDefs,\n PaddingPropDefs,\n RadiusPropDefs,\n SizePropDef,\n );\n\n return (\n <div\n className={clsx(\"badge\", className)}\n data-color={color ?? true}\n data-variant={variant}\n {...dataAttrs}\n {...rest}\n >\n {props.children}\n </div>\n );\n};\n\nexport { AllBadgeRootProps, Badge, BadgeRootProps };\n","import { GetPropDefTypes, PropDef } from \"../../props/prop-def\";\n\nconst BadgeVariants = [\"solid\", \"outlined\", \"muted\", \"clear\"] as const;\n\nconst BadgeRootPropsDefs = {\n /**\n * Sets the variant style of the badge (\"solid\", \"outlined\", \"muted\", or \"clear\").\n */\n variant: {\n type: \"enum\",\n values: BadgeVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof BadgeVariants)[number]>,\n} as const;\n\ntype BadgeRootInternalProps = GetPropDefTypes<typeof BadgeRootPropsDefs>;\n\nexport { BadgeRootInternalProps, BadgeRootPropsDefs, BadgeVariants };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport {\n MarginPropDefs,\n MarginProps,\n PaddingPropDefs,\n PaddingProps,\n RadiusPropDefs,\n RadiusProps,\n RoundnessProp,\n RoundnessPropDef,\n SpacingProp,\n SpacingPropDef,\n} from \"../../props\";\nimport { getComponentProps } from \"../../utils/get-component-props\";\nimport { BoxInternalProps, BoxPropsDefs } from \"./box.props\";\n\ninterface BoxExternalProps\n extends MarginProps,\n PaddingProps,\n SpacingProp,\n RadiusProps,\n RoundnessProp {}\n\ntype BoxProps = BoxInternalProps &\n BoxExternalProps &\n React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * A versatile container used to provide layout and styling capabilities.\n */\nconst Box = React.forwardRef<HTMLDivElement, BoxProps>((props, ref) => {\n const { className, dataAttrs, children, ...rest } = getComponentProps(\n props,\n BoxPropsDefs,\n MarginPropDefs,\n PaddingPropDefs,\n SpacingPropDef,\n RadiusPropDefs,\n RoundnessPropDef\n );\n\n return (\n <div\n ref={ref}\n {...dataAttrs}\n className={clsx(\"lcs-box\", className)}\n {...rest}\n >\n {children}\n </div>\n );\n});\nBox.displayName = \"Box\";\n\nexport { Box };\n","import { GetPropDefTypes } from \"../../props/prop-def\";\n\nconst boxAs = [\"div\", \"span\"] as const;\n\nconst BoxPropsDefs = {\n /**\n * Defines wether the Box is rendered as a **div** or **span**.\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n // as: {\n // type: \"enum\",\n // values: boxAs,\n // default: \"div\",\n // } satisfies PropDef<(typeof boxAs)[number]>,\n};\n\ntype BoxInternalProps = GetPropDefTypes<typeof BoxPropsDefs>;\n\nexport { BoxInternalProps, BoxPropsDefs };\n","import clsx from \"clsx\";\nimport { useState } from \"react\";\nimport {\n ColorProp,\n ColorPropDef,\n MarginPropDefs,\n MarginProps,\n PaddingPropDefs,\n PaddingProps,\n RadiusPropDefs,\n RadiusProps,\n SizeProp,\n SizePropDef,\n} from \"../../props\";\nimport { getComponentProps } from \"../../utils/get-component-props\";\nimport { ButtonRootInternalProps, ButtonRootPropsDefs } from \"./button.props\";\n\ninterface AllButtonRootProps\n extends ButtonRootInternalProps,\n ColorProp,\n MarginProps,\n PaddingProps,\n RadiusProps,\n SizeProp {}\n\ntype ButtonRootProps = AllButtonRootProps &\n React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nconst Button: React.FC<ButtonRootProps> = (props) => {\n const {\n color,\n variant,\n className,\n dataAttrs,\n disabled,\n highContrast,\n readonly,\n ...rest\n } = getComponentProps(\n props,\n ButtonRootPropsDefs,\n ColorPropDef,\n MarginPropDefs,\n PaddingPropDefs,\n RadiusPropDefs,\n SizePropDef\n );\n\n const [hovered, setHovered] = useState(false);\n\n return (\n <button\n className={clsx(\"button\", className)}\n data-color={color ?? true}\n data-variant={variant}\n data-disabled={disabled ? true : undefined}\n data-high-contrast={highContrast ? true : undefined}\n data-readonly={readonly ? true : undefined}\n data-hovered={hovered ? true : undefined}\n {...dataAttrs}\n disabled={disabled || readonly}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n {...rest}\n >\n <span>{props.children}</span>\n </button>\n );\n};\n\nexport { AllButtonRootProps, Button, ButtonRootProps };\n","import { GetPropDefTypes, PropDef } from \"../../props/prop-def\";\n\nconst ButtonVariants = [\"solid\", \"outlined\", \"muted\", \"clear\"] as const;\n\nconst ButtonRootPropsDefs = {\n /**\n * Sets the variant style of the button (\"solid\", \"outlined\", \"muted\", or \"clear\").\n */\n variant: {\n type: \"enum\",\n values: ButtonVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof ButtonVariants)[number]>,\n\n /**\n * Enables high contrast mode for better visibility.\n * @default undefined\n */\n highContrast: {\n type: \"boolean\",\n dataAttr: \"high-contrast\",\n } satisfies PropDef<boolean>,\n\n /**\n * Disables the button component.\n * @default undefined\n */\n disabled: {\n type: \"boolean\",\n dataAttr: \"disabled\",\n } satisfies PropDef<boolean>,\n\n /**\n * Makes the button read-only.\n * @default undefined\n */\n readonly: {\n type: \"boolean\",\n dataAttr: \"readonly\",\n } satisfies PropDef<boolean>,\n} as const;\n\ntype ButtonRootInternalProps = GetPropDefTypes<typeof ButtonRootPropsDefs>;\n\nexport { ButtonRootInternalProps, ButtonRootPropsDefs, ButtonVariants };\n","import clsx from \"clsx\";\nimport React from \"react\";\nimport { CheckMark, Minus } from \"../../../icons\";\nimport { SizeProp, SizePropDef } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useCheckboxContext } from \"../checkbox-context\";\nimport {\n CheckboxIndicatorInternalProps,\n CheckboxIndicatorPropDefs,\n} from \"./checkbox-indicator.props\";\n\ninterface AllCheckboxIndicatorProps\n extends CheckboxIndicatorInternalProps,\n SizeProp {}\n\ntype CheckboxIndicatorProps = AllCheckboxIndicatorProps &\n Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\">;\n\n/**\n * Indicator for a checkbox component.\n * Supports checked, indeterminate, disabled, readonly, and high contrast states.\n */\nconst CheckboxIndicator: React.FC<CheckboxIndicatorProps> = React.forwardRef<\n HTMLSpanElement,\n CheckboxIndicatorProps\n>((props, ref) => {\n const {\n value,\n setValue,\n hovered,\n color,\n disabled,\n readonly,\n highContrast,\n indeterminate,\n variant: contextVariant,\n } = useCheckboxContext();\n const { size, variant, className, style, dataAttrs } = getComponentProps(\n props,\n CheckboxIndicatorPropDefs,\n SizePropDef\n );\n\n const indicatorVariant = variant || contextVariant;\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLSpanElement>) => {\n if (disabled || readonly) return;\n\n if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n setValue(!value);\n }\n };\n\n const indicatorProps = {\n ...(value && { \"data-checked\": true }),\n ...(disabled && { \"data-disabled\": true }),\n ...(readonly && { \"data-readonly\": true }),\n ...(highContrast && { \"data-high-contrast\": true }),\n ...(indeterminate && { \"data-indeterminate\": true }),\n ...((variant || contextVariant) && { \"data-variant\": indicatorVariant }),\n };\n\n return (\n <span\n ref={ref}\n style={style}\n role=\"checkbox\"\n data-color={color}\n data-hovered={hovered}\n aria-disabled={disabled}\n aria-readonly={readonly}\n aria-checked={indeterminate ? \"mixed\" : value}\n onKeyDown={handleKeyDown}\n tabIndex={disabled || readonly ? -1 : 0}\n className={clsx(\"checkbox-indicator\", className)}\n {...indicatorProps}\n {...dataAttrs}\n >\n {indeterminate && !value && (\n <Minus\n color={\n highContrast && indicatorVariant === \"solid\" ? \"black\" : \"white\"\n }\n />\n )}\n\n {value && (\n <CheckMark\n color={\n highContrast && indicatorVariant === \"solid\" ? \"black\" : \"white\"\n }\n />\n )}\n </span>\n );\n});\nCheckboxIndicator.displayName = \"Checkbox.Indicator\";\n\nexport { AllCheckboxIndicatorProps, CheckboxIndicator, CheckboxIndicatorProps };\n","import * as React from \"react\";\nimport { colorMap, IconProps } from \"./icon-colors\";\n\nexport const CheckMark: React.FC<IconProps> = ({ color = \"currentColor\" }) => {\n return (\n <svg\n width=\"64\"\n height=\"64\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n fill={colorMap[color]}\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n};\n","import * as React from \"react\";\nimport { colorMap, IconProps } from \"./icon-colors\";\n\nexport const Minus: React.FC<IconProps> = ({ color = \"currentColor\" }) => {\n return (\n <svg\n width=\"64\"\n height=\"64\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M3.5 7.5C3.5 7.08579 3.83579 6.75 4.25 6.75H10.75C11.1642 6.75 11.5 7.08579 11.5 7.5C11.5 7.91421 11.1642 8.25 10.75 8.25H4.25C3.83579 8.25 3.5 7.91421 3.5 7.5Z\"\n fill={colorMap[color]}\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n};\n","import React from \"react\";\nimport { LabelPosition } from \"./label/checkbox-label.props\";\n\nexport interface CheckboxContextValue {\n value: boolean;\n setValue: (value: boolean) => void;\n onCheckedChange?: (value: boolean) => void;\n color?: string;\n labelId: string;\n labelPosition?: LabelPosition;\n setLabelPosition?: (position: LabelPosition) => void;\n disabled?: boolean;\n readonly?: boolean;\n required?: boolean;\n indeterminate?: boolean;\n variant?: string;\n highContrast?: boolean;\n name?: string;\n hovered?: boolean;\n setHovered?: (hovered: boolean) => void;\n}\n\nexport const CheckboxContext = React.createContext<CheckboxContextValue | null>(\n null\n);\n\nexport function useCheckboxContext() {\n const context = React.useContext(CheckboxContext);\n if (!context) {\n throw new Error(\"Checkbox components must be used within a Checkbox.Root\");\n }\n return context;\n}\n","import {\n FunctionPropDef,\n GetPropDefTypes,\n PropDef,\n} from \"../../../props/prop-def\";\n\nconst CheckboxVariants = [\"solid\", \"outlined\", \"muted\"] as const;\n\nconst CheckboxRootPropsDefs = {\n /**\n * Sets the variant style of the checkbox (\"solid\" or \"outlined\").\n */\n variant: {\n type: \"enum\",\n values: CheckboxVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof CheckboxVariants)[number]>,\n\n /**\n * Sets the checked state of the checkbox.\n *\n * When using an uncontrolled checkbox, use `defaultChecked` instead.\n * @default undefined\n */\n checked: {\n type: \"boolean\",\n dataAttr: \"checked\",\n } satisfies PropDef<boolean>,\n\n /**\n * Sets the indeterminate state of the checkbox.\n * @default undefined\n */\n indeterminate: {\n type: \"boolean\",\n dataAttr: \"indeterminate\",\n } satisfies PropDef<boolean>,\n\n /**\n * Enables high contrast mode for better visibility.\n * @default undefined\n */\n highContrast: {\n type: \"boolean\",\n dataAttr: \"high-contrast\",\n } satisfies PropDef<boolean>,\n\n /**\n * The value of the checkbox (checked state).\n */\n value: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n /**\n * Sets the default checked state of the checkbox.\n * @default undefined\n */\n defaultChecked: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n /**\n * Disables the checkbox component.\n * @default undefined\n */\n disabled: {\n type: \"boolean\",\n dataAttr: \"disabled\",\n } satisfies PropDef<boolean>,\n\n /**\n * Makes the checkbox read-only.\n * @default undefined\n */\n readonly: {\n type: \"boolean\",\n dataAttr: \"readonly\",\n } satisfies PropDef<boolean>,\n\n /**\n * Marks the checkbox as required.\n * @default undefined\n */\n required: {\n type: \"boolean\",\n dataAttr: \"required\",\n } satisfies PropDef<boolean>,\n\n /**\n * Sets the name attribute of the checkbox input for form control.\n * @default undefined\n */\n name: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n /**\n * Callback fired when the checked state changes.\n *\n * @param value - The new checked state.\n */\n onCheckedChange: {\n type: \"function\",\n } satisfies FunctionPropDef<(value: boolean) => void> as FunctionPropDef<\n (value: boolean) => void\n >,\n} as const;\n\ntype CheckboxRootInternalProps = GetPropDefTypes<typeof CheckboxRootPropsDefs>;\n\nexport { CheckboxRootInternalProps, CheckboxRootPropsDefs, CheckboxVariants };\n","import { GetPropDefTypes, PropDef } from \"../../../props\";\nimport { CheckboxVariants } from \"../root/checkbox-root.props\";\n\nconst CheckboxIndicatorPropDefs = {\n /**\n * Sets the variant style of the checkbox (\"solid\" or \"outlined\").\n */\n variant: {\n type: \"enum\",\n values: CheckboxVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof CheckboxVariants)[number]>,\n} as const;\n\ntype CheckboxIndicatorInternalProps = GetPropDefTypes<\n typeof CheckboxIndicatorPropDefs\n>;\n\nexport { CheckboxIndicatorInternalProps, CheckboxIndicatorPropDefs };\n","import clsx from \"clsx\";\nimport React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { Text } from \"../../text\";\nimport { useCheckboxContext } from \"../checkbox-context\";\nimport {\n CheckboxLabelInternalProps,\n CheckboxLabelPropDefs,\n} from \"./checkbox-label.props\";\n\ninterface AllCheckboxLabelProps extends CheckboxLabelInternalProps {}\n\ntype CheckboxLabelProps = AllCheckboxLabelProps &\n Omit<React.HTMLAttributes<HTMLLabelElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\n/** Label for a checkbox component. */\nconst CheckboxLabel = React.forwardRef<HTMLLabelElement, CheckboxLabelProps>(\n (props, ref) => {\n const context = useCheckboxContext();\n const { className, children, position } = getComponentProps(\n props,\n CheckboxLabelPropDefs\n );\n\n React.useLayoutEffect(() => {\n context.setLabelPosition?.(position ?? \"right\");\n }, [position, context.setLabelPosition]);\n\n return (\n <label\n ref={ref}\n htmlFor={context.labelId}\n className={clsx(\"checkbox-label\", className)}\n {...(position && { [`data-position`]: position })}\n >\n <Text>{children}</Text>\n </label>\n );\n }\n);\nCheckboxLabel.displayName = \"Checkbox.Label\";\n\nexport { AllCheckboxLabelProps, CheckboxLabel, CheckboxLabelProps };\n","import clsx from \"clsx\";\nimport React from \"react\";\nimport {\n ColorProp,\n ColorPropDef,\n MarginPropDefs,\n MarginProps,\n PaddingPropDefs,\n PaddingProps,\n} from \"../../props\";\nimport { getComponentProps } from \"../../utils/get-component-props\";\nimport { TextInternalProps, TextPropsDefs } from \"./text.props\";\n\ninterface TextExternalProps extends MarginProps, PaddingProps, ColorProp {}\n\ntype TextProps = TextInternalProps &\n TextExternalProps &\n React.HTMLAttributes<HTMLParagraphElement>;\n\n/**\n * A component for displaying text with customizable styling and layout.\n */\nexport const Text = React.forwardRef<HTMLParagraphElement, TextProps>(\n (props, ref) => {\n const { className, dataAttrs, children, ...rest } = getComponentProps(\n props,\n TextPropsDefs,\n MarginPropDefs,\n PaddingPropDefs,\n ColorPropDef,\n );\n\n return (\n <p ref={ref} {...dataAttrs} className={clsx(\"text\", className)} {...rest}>\n {children}\n </p>\n );\n },\n);\n","import { GetPropDefTypes, PropDef } from \"../../props/prop-def\";\n\nconst textAs = [\"p\", \"span\", \"div\"] as const;\n\nconst TextPropsDefs = {\n disabled: {\n type: \"boolean\",\n default: false,\n dataAttr: \"disabled\",\n } satisfies PropDef<boolean>,\n /**\n * Defines wether the Text is rendered as a **p**, **span** or **div**.\n *\n * @example\n * as=\"p\"\n * as=\"span\"\n * as=\"div\"\n */\n // as: {\n // type: \"enum\",\n // values: textAs,\n // default: \"p\",\n // } satisfies PropDef<(typeof textAs)[number]>,\n};\n\ntype TextInternalProps = GetPropDefTypes<typeof TextPropsDefs>;\n\nexport { TextInternalProps, TextPropsDefs };\n","import { GetPropDefTypes, PropDef } from \"../../../props\";\n\nconst labelPositions = [\"top\", \"left\", \"right\", \"bottom\"] as const;\ntype LabelPosition = (typeof labelPositions)[number];\n\nconst CheckboxLabelPropDefs = {\n /**\n * Sets the position of the label relative to the checkbox.\n *\n * @example position=\"left\" // positions the label to the left of the checkbox\n * @example position=\"top\" // positions the label above the checkbox\n */\n position: {\n type: \"enum\",\n values: labelPositions,\n dataAttr: \"position\",\n } satisfies PropDef<LabelPosition>,\n} as const;\n\ntype CheckboxLabelInternalProps = GetPropDefTypes<typeof CheckboxLabelPropDefs>;\n\nexport {\n CheckboxLabelInternalProps,\n CheckboxLabelPropDefs,\n LabelPosition,\n labelPositions,\n};\n","\"use client\";\n\nimport clsx from \"clsx\";\nimport React, {\n FC,\n HTMLAttributes,\n isValidElement,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport {\n AlignProp,\n AlignPropDef,\n ColorProp,\n MarginPropDefs,\n MarginProps,\n SizeProp,\n SizePropDef,\n} from \"../../../props\";\nimport {\n filterChildren,\n WithStrictChildren,\n} from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useControllableState } from \"../../../utils/use-controllable-state\";\nimport { CheckboxContext } from \"../checkbox-context\";\nimport {\n CheckboxIndicator,\n CheckboxIndicatorProps,\n} from \"../indicator/checkbox-indicator\";\nimport { CheckboxLabel, CheckboxLabelProps } from \"../label/checkbox-label\";\nimport { LabelPosition } from \"../label/checkbox-label.props\";\nimport {\n CheckboxRootInternalProps,\n CheckboxRootPropsDefs,\n} from \"./checkbox-root.props\";\n\ninterface AllCheckboxRootProps\n extends CheckboxRootInternalProps,\n AlignProp,\n ColorProp,\n MarginProps,\n SizeProp {}\n\nconst ALLOWED_CHILDREN = [\n CheckboxLabel.displayName!,\n CheckboxIndicator.displayName!,\n];\n\n/**\n * A versatile Checkbox, managing state, context, and styling.\n */\ntype CheckboxRootProps = AllCheckboxRootProps &\n WithStrictChildren<\n HTMLAttributes<HTMLDivElement>,\n CheckboxLabelProps | CheckboxIndicatorProps\n >;\n\nconst CheckboxRoot: FC<CheckboxRootProps> = (props) => {\n const {\n name,\n size,\n color,\n variant,\n checked,\n dataAttrs,\n onCheckedChange,\n value: valueProp,\n disabled = false,\n required = false,\n readonly = false,\n highContrast = false,\n indeterminate = false,\n defaultChecked = false,\n } = getComponentProps(\n props,\n CheckboxRootPropsDefs,\n AlignPropDef,\n MarginPropDefs,\n SizePropDef\n );\n\n const [value, setValue] = useControllableState<boolean>({\n value: valueProp || checked,\n defaultValue: defaultChecked,\n onChange: onCheckedChange,\n });\n\n const labelId = useId();\n const [labelPosition, setLabelPosition] = useState<LabelPosition>(\"right\");\n\n const [hovered, setHovered] = useState(false);\n\n const validChildren = filterChildren(props.children, ALLOWED_CHILDREN, {\n parentDisplayName: CheckboxRoot.displayName,\n });\n\n const { indicator, otherChildren } = useMemo(() => {\n const indicatorIndex = validChildren.findIndex(\n (child) =>\n isValidElement(child) &&\n (child.type as React.FC).displayName === CheckboxIndicator.displayName\n );\n\n if (indicatorIndex > -1) {\n return {\n indicator: validChildren[indicatorIndex],\n otherChildren: validChildren.filter((_, i) => i !== indicatorIndex),\n };\n }\n\n return {\n indicator: <CheckboxIndicator size={size} />,\n otherChildren: validChildren,\n };\n }, [validChildren, size]);\n\n const contextValue = useMemo(\n () => ({\n name,\n value,\n color,\n setValue,\n onCheckedChange,\n labelId,\n labelPosition,\n setLabelPosition,\n variant,\n hovered,\n setHovered,\n disabled,\n readonly,\n required,\n indeterminate,\n highContrast,\n }),\n [\n name,\n value,\n color,\n onCheckedChange,\n setValue,\n labelId,\n labelPosition,\n hovered,\n disabled,\n readonly,\n required,\n indeterminate,\n highContrast,\n ]\n );\n\n const handleClick = () => {\n if (disabled || readonly) return;\n setValue(!value);\n };\n\n return (\n <CheckboxContext.Provider value={contextValue}>\n <div\n className={clsx(\"checkbox-root\", props.className)}\n onClick={() => handleClick()}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n {...dataAttrs}\n >\n {indicator}\n {otherChildren}\n {name && <input type=\"hidden\" name={name} value={String(value)} />}\n </div>\n </CheckboxContext.Provider>\n );\n};\nCheckboxRoot.displayName = \"Checkbox\";\n\nexport { AllCheckboxRootProps, CheckboxRoot, CheckboxRootProps };\n","import { CheckboxIndicator } from \"./indicator/checkbox-indicator\";\nimport { CheckboxLabel } from \"./label/checkbox-label\";\nimport { CheckboxRoot } from \"./root/checkbox-root\";\n\nexport const Checkbox = Object.assign(CheckboxRoot, {\n Root: CheckboxRoot,\n Label: CheckboxLabel,\n Indicator: CheckboxIndicator,\n});\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { GetProps } from \"../../utils/get-props\";\nimport { ContainerPropsDefs } from \"./container.props\";\n\nexport type BoxProps = GetProps<typeof ContainerPropsDefs> &\n React.HTMLAttributes<HTMLDivElement>;\n\nconst Container = React.forwardRef<HTMLDivElement, BoxProps>((props, ref) => {\n const { className, children, direction, ...rest } = props;\n\n return (\n <div\n ref={ref}\n data-direction={direction}\n className={clsx(className, \"lcs-container\")}\n {...rest}\n >\n {children}\n </div>\n );\n});\n\nContainer.displayName = \"Container\";\n\nexport { Container };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport {\n ColorProp,\n ColorPropDef,\n MarginPropDefs,\n MarginProps,\n PaddingPropDefs,\n PaddingProps,\n RadiusPropDefs,\n RadiusProps,\n RoundnessProp,\n RoundnessPropDef,\n SpacingProp,\n SpacingPropDef,\n} from \"../../props\";\nimport { getComponentProps } from \"../../utils/get-component-props\";\nimport { PanelInternalProps, PanelPropsDefs } from \"./panel.props\";\n\ninterface PanelExternalProps\n extends\n MarginProps,\n PaddingProps,\n SpacingProp,\n RadiusProps,\n RoundnessProp,\n ColorProp {}\n\ntype PanelProps = PanelInternalProps &\n PanelExternalProps &\n React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * A versatile container used to provide layout and styling capabilities.\n */\nconst Panel = React.forwardRef<HTMLDivElement, PanelProps>((props, ref) => {\n const { className, dataAttrs, children, ...rest } = getComponentProps(\n props,\n PanelPropsDefs,\n MarginPropDefs,\n PaddingPropDefs,\n SpacingPropDef,\n RadiusPropDefs,\n RoundnessPropDef,\n ColorPropDef,\n );\n\n return (\n <div\n ref={ref}\n className={clsx(\"panel\", className)}\n {...dataAttrs}\n {...rest}\n >\n {children}\n </div>\n );\n});\nPanel.displayName = \"Panel\";\n\nexport { Panel };\n","import { GetPropDefTypes, PropDef } from \"../../props/prop-def\";\n\nconst PanelVariants = [\"solid\", \"outlined\", \"muted\"] as const;\n\nconst PanelPropsDefs = {\n /**\n * Sets the variant style of the panel (\"solid\", \"outlined\", or \"muted\").\n */\n variant: {\n type: \"enum\",\n values: PanelVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof PanelVariants)[number]>,\n\n /**\n * The blur amount applied to the panel.\n *\n * @example blur=\"4px\" // Sets the backdrop blur to 4 pixels\n * @default \"2px\"\n */\n blur: {\n type: \"string\",\n default: \"2px\",\n cssProperty: \"--panel-blur\",\n } satisfies PropDef<string>,\n} as const;\n\ntype PanelInternalProps = GetPropDefTypes<typeof PanelPropsDefs>;\n\nexport { PanelInternalProps, PanelPropsDefs, PanelVariants };\n","\"use client\";\n\nimport clsx from \"clsx\";\nimport * as React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { usePortalContext } from \"../portal-context\";\nimport {\n PortalBackdropInternalProps,\n PortalBackdropPropsDefs,\n} from \"./portal-backdrop.props\";\n\ninterface AllPortalBackdropProps extends PortalBackdropInternalProps {}\n\ntype PortalBackdropProps = AllPortalBackdropProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\">;\n\n/** A backdrop optionally displayed behind portal content when open. */\nconst PortalBackdrop = React.forwardRef<HTMLDivElement, PortalBackdropProps>(\n (props, ref) => {\n const context = usePortalContext();\n\n const { className, dataAttrs, ...rest } = getComponentProps(\n props,\n PortalBackdropPropsDefs\n );\n\n if (!context.open) return null;\n\n return (\n <div\n ref={ref}\n className={clsx(\"portal-backdrop\", className)}\n {...dataAttrs}\n {...rest}\n />\n );\n }\n);\nPortalBackdrop.displayName = \"Portal.Backdrop\";\n\nexport { AllPortalBackdropProps, PortalBackdrop, PortalBackdropProps };\n","\"use client\";\n\nimport * as React from \"react\";\n\ninterface PortalContextValue {\n open: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Ref to the trigger element, used as default anchor */\n triggerRef: React.RefObject<HTMLElement | null>;\n /** Custom anchor element ref (overrides trigger as anchor) */\n anchorRef?: React.RefObject<HTMLElement | null>;\n}\n\nconst PortalContext = React.createContext<PortalContextValue | undefined>(\n undefined\n);\n\ninterface PortalContextProps extends PortalContextValue {}\n\nfunction usePortalContext() {\n const context = React.useContext(PortalContext);\n if (!context) {\n throw new Error(\"`usePortalContext` must be used within a `Portal.Root`\");\n }\n return context;\n}\n\nexport { PortalContext, PortalContextProps, usePortalContext };\n","import { PropDef } from \"../../../props\";\n\nconst variants = [\"clear\", \"shadow\", \"blurred\"] as const;\n\nconst PortalBackdropPropsDefs = {\n /**\n * The visual style variant of the backdrop.\n *\n * @example variant=\"blurred\" // Applies a blurred effect to the backdrop\n * @default \"clear\"\n */\n variant: {\n type: \"enum\",\n values: variants,\n default: \"clear\",\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof variants)[number]>,\n\n /**\n * The opacity level of the backdrop.\n *\n * @example opacity=\"0.5\" // Sets the backdrop opacity to 50%\n * @default \"0.3\"\n */\n opacity: {\n type: \"string\",\n default: \"0.3\",\n cssProperty: \"--backdrop-opacity\",\n } satisfies PropDef<string>,\n\n /**\n * The blur amount applied to the backdrop when the \"blurred\" variant is used.\n *\n * @example blur=\"4px\" // Sets the backdrop blur to 4 pixels\n * @default \"2px\"\n */\n blur: {\n type: \"string\",\n default: \"2px\",\n cssProperty: \"--backdrop-blur\",\n } satisfies PropDef<string>,\n};\n\ntype PortalBackdropInternalProps = {\n /**\n * The visual style variant of the backdrop.\n *\n * @example variant=\"blurred\" // Applies a blurred effect to the backdrop\n * @default \"clear\"\n */\n variant?: (typeof variants)[number];\n\n /**\n * The opacity level of the backdrop.\n *\n * @example opacity=\"0.5\" // Sets the backdrop opacity to 50%\n * @default \"0.3\"\n */\n opacity?: string;\n\n /**\n * The blur amount applied to the backdrop when the \"blurred\" variant is used.\n *\n * @example blur=\"4px\" // Sets the backdrop blur to 4 pixels\n * @default \"2px\"\n */\n blur?: string;\n};\n\nexport { PortalBackdropInternalProps, PortalBackdropPropsDefs };\n","\"use client\";\n\nimport clsx from \"clsx\";\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { AlignProp, AlignPropDef } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { ThemeContext } from \"../../theme/theme-context\";\nimport { usePortalContext } from \"../portal-context\";\nimport {\n AnchorAlign,\n AnchorSide,\n useAnchorPosition,\n} from \"../utils/use-anchor-position\";\nimport {\n PortalContentInternalProps,\n PortalContentPropsDefs,\n} from \"./portal-content.props\";\n\ninterface AllPortalContentProps extends PortalContentInternalProps, AlignProp {}\n\ntype PortalContentProps = AllPortalContentProps &\n React.HTMLAttributes<HTMLDivElement>;\n\n/** The content displayed within a portal. */\nconst PortalContent = React.forwardRef<HTMLDivElement, PortalContentProps>(\n (props, ref) => {\n const portalContext = usePortalContext();\n const themeContext = React.useContext(ThemeContext);\n const contentRef = React.useRef<HTMLDivElement>(null);\n\n const {\n side = \"bottom\",\n align = \"center\",\n sideOffset = \"0\",\n alignOffset = \"0\",\n anchored = false,\n children,\n className,\n dataAttrs,\n style,\n } = getComponentProps(props, PortalContentPropsDefs, AlignPropDef);\n\n // Determine anchor element (custom anchorRef or triggerRef)\n const anchorRef = portalContext.anchorRef ?? portalContext.triggerRef;\n\n // Calculate anchor position when anchored mode is enabled\n const anchorPosition = useAnchorPosition({\n anchorRef,\n contentRef,\n side: side as AnchorSide,\n align: align as AnchorAlign,\n sideOffset: parseInt(sideOffset, 10) || 0,\n alignOffset: parseInt(alignOffset, 10) || 0,\n enabled: anchored && portalContext.open,\n });\n\n // Compose refs\n const setRefs = React.useCallback(\n (node: HTMLDivElement | null) => {\n contentRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref]\n );\n\n React.useEffect(() => {\n if (!portalContext.open) return;\n\n function onKeyDown(e: KeyboardEvent) {\n if (e.key === \"Escape\") {\n portalContext.onOpenChange?.(false);\n }\n }\n\n document.addEventListener(\"keydown\", onKeyDown);\n\n return () => {\n document.removeEventListener(\"keydown\", onKeyDown);\n };\n }, [portalContext.open, portalContext.onOpenChange]);\n\n // Click outside listener for anchored portals\n React.useEffect(() => {\n if (!portalContext.open || !anchored) return;\n\n function onClickOutside(e: MouseEvent) {\n const target = e.target as Node;\n const content = contentRef.current;\n const trigger = (portalContext.anchorRef ?? portalContext.triggerRef)\n ?.current;\n\n // Don't close if clicking inside the content or the trigger\n if (content?.contains(target) || trigger?.contains(target)) {\n return;\n }\n\n portalContext.onOpenChange?.(false);\n }\n\n // Use setTimeout to avoid the click that opened the portal from immediately closing it\n const timeoutId = setTimeout(() => {\n document.addEventListener(\"click\", onClickOutside);\n }, 0);\n\n return () => {\n clearTimeout(timeoutId);\n document.removeEventListener(\"click\", onClickOutside);\n };\n }, [\n portalContext.open,\n portalContext.onOpenChange,\n portalContext.anchorRef,\n portalContext.triggerRef,\n anchored,\n ]);\n\n const container = portalContext.open && globalThis?.document?.body;\n if (!container) return null;\n\n // Build style for anchored positioning\n const combinedStyle: React.CSSProperties = {\n ...style,\n ...(anchored && anchorPosition\n ? {\n position: \"absolute\",\n top: anchorPosition.top,\n left: anchorPosition.left,\n }\n : {}),\n };\n\n const portalContent = (\n <div\n ref={setRefs}\n className={clsx(\"portal\", className)}\n data-appearance={themeContext?.appearance}\n data-radius={themeContext?.radius}\n data-roundness={themeContext?.roundness ?? \"theme\"}\n data-spacing={themeContext?.spacing ?? \"theme\"}\n data-theme-radius={themeContext?.radius}\n data-theme-roundness={themeContext?.roundness}\n data-theme-spacing={themeContext?.spacing}\n onClick={\n anchored ? undefined : () => portalContext.onOpenChange?.(false)\n }\n style={combinedStyle}\n {...dataAttrs}\n >\n <div\n className=\"portal-content\"\n onClick={(e) => e.stopPropagation()}\n >\n {children}\n </div>\n </div>\n );\n\n // Wrap with ThemeContext if available to pass theme through\n const content = themeContext ? (\n <ThemeContext.Provider value={themeContext}>\n {portalContent}\n </ThemeContext.Provider>\n ) : (\n portalContent\n );\n\n return ReactDOM.createPortal(content, container);\n }\n);\nPortalContent.displayName = \"Portal.Content\";\n\nexport { AllPortalContentProps, PortalContent, PortalContentProps };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { ThemePropsDefs } from \"./theme.props\";\n\nexport type ThemeAppearance = (typeof ThemePropsDefs.appearance.values)[number];\nexport type ThemeRadius = (typeof ThemePropsDefs.radius.values)[number];\nexport type ThemeRoundness = (typeof ThemePropsDefs.roundness.values)[number];\nexport type ThemeSpacing = (typeof ThemePropsDefs.spacing.values)[number];\n\ninterface ThemeChangeHandlers {\n onAppearanceChange?: (appearance: ThemeAppearance) => void;\n onRadiusChange?: (radius: ThemeRadius) => void;\n onRoundnessChange?: (roundness: ThemeRoundness) => void;\n onSpacingChange?: (spacing: ThemeSpacing) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n radius: ThemeRadius;\n roundness: ThemeRoundness;\n spacing: ThemeSpacing;\n}\n\ninterface ThemeContextProps extends ThemeContextValue, ThemeChangeHandlers {}\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(\n undefined\n);\n\nfunction useTheme() {\n const context = React.useContext(ThemeContext);\n if (!context) {\n throw new Error(\"`useTheme` must be used within a `Theme`\");\n }\n return context;\n}\n\nexport { ThemeContext, ThemeContextProps, useTheme };\n","\"use client\";\n\nimport * as React from \"react\";\n\nexport type AnchorSide = \"top\" | \"right\" | \"bottom\" | \"left\";\nexport type AnchorAlign = \"start\" | \"center\" | \"end\";\n\nexport interface AnchorPosition {\n top: number;\n left: number;\n}\n\nexport interface UseAnchorPositionOptions {\n /** The anchor element to position relative to */\n anchorRef: React.RefObject<HTMLElement | null>;\n /** The content element being positioned */\n contentRef: React.RefObject<HTMLElement | null>;\n /** Which side of the anchor to position on */\n side?: AnchorSide;\n /** Alignment along the side */\n align?: AnchorAlign;\n /** Offset from the anchor (perpendicular to side) */\n sideOffset?: number;\n /** Offset along the alignment axis */\n alignOffset?: number;\n /** Whether positioning is enabled */\n enabled?: boolean;\n}\n\n/**\n * Hook to calculate position for anchored content.\n * Returns the top/left position for the content element.\n */\nexport function useAnchorPosition({\n anchorRef,\n contentRef,\n side = \"bottom\",\n align = \"center\",\n sideOffset = 0,\n alignOffset = 0,\n enabled = true,\n}: UseAnchorPositionOptions): AnchorPosition | null {\n const [position, setPosition] = React.useState<AnchorPosition | null>(null);\n // Force update counter to trigger recalculation\n const [, _forceUpdate] = React.useReducer((x) => x + 1, 0);\n\n const updatePosition = React.useCallback(() => {\n const anchor = anchorRef.current;\n const content = contentRef.current;\n\n if (!anchor || !content || !enabled) {\n setPosition(null);\n return;\n }\n\n const anchorRect = anchor.getBoundingClientRect();\n const contentRect = content.getBoundingClientRect();\n\n let top = 0;\n let left = 0;\n\n // Calculate position based on side\n switch (side) {\n case \"top\":\n top = anchorRect.top - contentRect.height - sideOffset;\n break;\n case \"bottom\":\n top = anchorRect.bottom + sideOffset;\n break;\n case \"left\":\n left = anchorRect.left - contentRect.width - sideOffset;\n break;\n case \"right\":\n left = anchorRect.right + sideOffset;\n break;\n }\n\n // Calculate alignment\n if (side === \"top\" || side === \"bottom\") {\n switch (align) {\n case \"start\":\n left = anchorRect.left + alignOffset;\n break;\n case \"center\":\n left =\n anchorRect.left +\n (anchorRect.width - contentRect.width) / 2 +\n alignOffset;\n break;\n case \"end\":\n left = anchorRect.right - contentRect.width + alignOffset;\n break;\n }\n } else {\n // left or right side\n switch (align) {\n case \"start\":\n top = anchorRect.top + alignOffset;\n break;\n case \"center\":\n top =\n anchorRect.top +\n (anchorRect.height - contentRect.height) / 2 +\n alignOffset;\n break;\n case \"end\":\n top = anchorRect.bottom - contentRect.height + alignOffset;\n break;\n }\n }\n\n // Add scroll offset for fixed positioning\n top += window.scrollY;\n left += window.scrollX;\n\n // Clamp to viewport bounds\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n // Prevent going off-screen\n left = Math.max(0, Math.min(left, viewportWidth - contentRect.width));\n top = Math.max(\n 0,\n Math.min(top, viewportHeight - contentRect.height + window.scrollY)\n );\n\n setPosition({ top, left });\n }, [anchorRef, contentRef, side, align, sideOffset, alignOffset, enabled]);\n\n // Update position when enabled changes or on mount\n React.useEffect(() => {\n if (!enabled) {\n setPosition(null);\n return;\n }\n\n // Try multiple times to ensure refs are set\n let attempts = 0;\n const maxAttempts = 10;\n\n const tryUpdate = () => {\n attempts++;\n if (anchorRef.current && contentRef.current) {\n updatePosition();\n } else if (attempts < maxAttempts) {\n requestAnimationFrame(tryUpdate);\n }\n };\n\n requestAnimationFrame(tryUpdate);\n\n // Update on scroll and resize\n window.addEventListener(\"scroll\", updatePosition, true);\n window.addEventListener(\"resize\", updatePosition);\n\n return () => {\n window.removeEventListener(\"scroll\", updatePosition, true);\n window.removeEventListener(\"resize\", updatePosition);\n };\n }, [enabled, updatePosition, anchorRef, contentRef]);\n\n return position;\n}\n","import { PropDef } from \"../../../props\";\nimport { GetPropDefTypes } from \"../../../props/prop-def\";\n\nconst positions = [\n \"tl\",\n \"top\",\n \"tr\",\n \"left\",\n \"center\",\n \"right\",\n \"bl\",\n \"bottom\",\n \"br\",\n] as const;\n\nconst anchorSides = [\"top\", \"right\", \"bottom\", \"left\"] as const;\n\nconst PortalContentPropsDefs = {\n /**\n * The position of the portal content relative to the screen if no anchor is used.\n *\n * @example position=\"bl\" // Portal renders at bottom-left of the screen\n */\n position: {\n type: \"enum\",\n values: positions,\n default: \"center\",\n dataAttr: \"position\",\n } satisfies PropDef<(typeof positions)[number]>,\n\n /**\n * Whether the portal content is anchored to an element.\n *\n * When anchored, the portal content is positioned relative to the trigger element unless a custom anchorRef is provided.\n */\n anchored: {\n type: \"boolean\",\n dataAttr: \"anchored\",\n } satisfies PropDef<boolean>,\n\n /**\n * The side of the anchor element to position the portal content on.\n *\n * @default \"bottom\"\n */\n side: {\n type: \"enum\",\n values: anchorSides,\n default: \"bottom\",\n } satisfies PropDef<(typeof anchorSides)[number]>,\n\n /** Offset in pixels from the anchor element along the side axis. */\n sideOffset: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n /** Offset in pixels along the alignment axis. */\n alignOffset: {\n type: \"string\",\n } satisfies PropDef<string>,\n};\n\ntype PortalContentInternalProps = GetPropDefTypes<\n typeof PortalContentPropsDefs\n>;\n\nexport { PortalContentInternalProps, PortalContentPropsDefs };\n","\"use client\";\n\nimport * as React from \"react\";\nimport {\n filterChildren,\n WithStrictChildren,\n} from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useControllableState } from \"../../../utils/use-controllable-state\";\nimport {\n PortalBackdrop,\n PortalBackdropProps,\n} from \"../backdrop/portal-backdrop\";\nimport { PortalContent, PortalContentProps } from \"../content/portal-content\";\nimport { PortalContext } from \"../portal-context\";\nimport { PortalTrigger, PortalTriggerProps } from \"../trigger/portal-trigger\";\nimport {\n PortalRootInternalProps,\n PortalRootPropsDefs,\n} from \"./portal-root.props\";\n\nconst ALLOWED_CHILDREN = [\n PortalTrigger.displayName!,\n PortalBackdrop.displayName!,\n PortalContent.displayName!,\n];\n\ninterface AllPortalRootProps extends PortalRootInternalProps {}\n\ntype PortalRootProps = AllPortalRootProps &\n WithStrictChildren<\n React.HTMLAttributes<HTMLDivElement>,\n PortalTriggerProps | PortalBackdropProps | PortalContentProps\n >;\n\n/** The root component of a portal used to provide context and styling to its children. */\nconst PortalRoot: React.FC<PortalRootProps> = (props) => {\n const {\n defaultOpen = false,\n open: portalOpen,\n onOpenChange,\n anchorRef,\n children,\n } = getComponentProps(props, PortalRootPropsDefs);\n\n const [open, setOpen] = useControllableState<boolean>({\n value: portalOpen,\n defaultValue: defaultOpen,\n onChange: onOpenChange,\n });\n\n const triggerRef = React.useRef<HTMLElement | null>(null);\n\n const value = React.useMemo(\n () => ({\n open,\n onOpenChange: setOpen,\n triggerRef,\n anchorRef,\n }),\n [open, setOpen, anchorRef]\n );\n\n const validChildren = filterChildren(children, ALLOWED_CHILDREN, {\n parentDisplayName: PortalRoot.displayName,\n });\n\n return (\n <PortalContext.Provider value={value}>\n {validChildren}\n </PortalContext.Provider>\n );\n};\nPortalRoot.displayName = \"Portal.Root\";\n\nexport { AllPortalRootProps, PortalRoot, PortalRootProps };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { usePortalContext } from \"../portal-context\";\n\nexport interface PortalTriggerProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\n/** The trigger element that toggles the portal open and closed. */\nconst PortalTrigger = React.forwardRef<HTMLButtonElement, PortalTriggerProps>(\n ({ children, asChild, onClick, ...props }, ref) => {\n const context = usePortalContext();\n const internalRef = React.useRef<HTMLButtonElement>(null);\n\n // Compose refs to set both the forwarded ref and the context triggerRef\n React.useEffect(() => {\n if (internalRef.current) {\n (\n context.triggerRef as React.MutableRefObject<HTMLElement | null>\n ).current = internalRef.current;\n }\n }, [context.triggerRef]);\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n context.onOpenChange?.(!context.open);\n onClick?.(event);\n };\n\n const setRefs = React.useCallback(\n (node: HTMLButtonElement | null) => {\n internalRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n (\n context.triggerRef as React.MutableRefObject<HTMLElement | null>\n ).current = node;\n },\n [ref, context.triggerRef]\n );\n\n if (asChild && React.isValidElement(children)) {\n return React.cloneElement(children as React.ReactElement<any>, {\n ref: setRefs,\n onClick: handleClick,\n ...props,\n });\n }\n\n return (\n <button\n ref={setRefs}\n type=\"button\"\n onClick={handleClick}\n aria-expanded={context.open}\n aria-haspopup=\"dialog\"\n {...props}\n >\n {children}\n </button>\n );\n }\n);\nPortalTrigger.displayName = \"Portal.Trigger\";\n\nexport { PortalTrigger };\n","import {\n GetPropDefTypes,\n PropDef,\n ReactNodePropDef,\n} from \"../../../props/prop-def\";\n\nconst PortalRootPropsDefs = {\n /** Whether the portal is open. */\n open: {\n type: \"boolean\",\n default: false,\n } satisfies PropDef<boolean>,\n\n /** Callback fired when the open state changes. */\n onOpenChange: {\n type: \"function\",\n } satisfies PropDef<(open: boolean) => void>,\n\n /** Whether the portal is open by default (uncontrolled). */\n defaultOpen: {\n type: \"boolean\",\n default: false,\n } satisfies PropDef<boolean>,\n\n /** Custom anchor element ref. If not provided, the trigger is used as anchor. */\n anchorRef: {\n type: \"reactNode\",\n } as ReactNodePropDef<React.RefObject<HTMLElement | null>>,\n};\n\ntype PortalRootInternalProps = GetPropDefTypes<typeof PortalRootPropsDefs>;\n\nexport { PortalRootInternalProps, PortalRootPropsDefs };\n","import { PortalBackdrop } from \"./backdrop/portal-backdrop\";\nimport { PortalContent } from \"./content/portal-content\";\nimport { PortalRoot } from \"./root/portal-root\";\nimport { PortalTrigger } from \"./trigger/portal-trigger\";\n\nexport const Portal = {\n /** The root component that provides context for the portal. */\n Root: PortalRoot,\n /** The trigger element that opens the portal when interacted with. */\n Trigger: PortalTrigger,\n /** The content displayed inside the portal when open. */\n Content: PortalContent,\n /** A backdrop optionally displayed behind portal content when open. */\n Backdrop: PortalBackdrop,\n};\n","\"use client\";\n\nimport clsx from \"clsx\";\nimport { FC, HTMLAttributes, useContext } from \"react\";\nimport { ColorProp, MarginProps, SizeProp } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { ProgressBarContext } from \"../progress-bar-context\";\nimport {\n ProgressBarFillInternalProps,\n ProgressBarFillPropsDefs,\n} from \"./progress-bar-fill.props\";\n\ninterface AllProgressBarFillProps\n extends ProgressBarFillInternalProps, ColorProp, MarginProps, SizeProp {}\n\n/**\n * A ProgressBarFill.\n */\ntype ProgressBarFillProps = AllProgressBarFillProps &\n HTMLAttributes<HTMLDivElement>;\n\nconst ProgressBarFill: FC<ProgressBarFillProps> = (props) => {\n const context = useContext(ProgressBarContext);\n const { value, color, style, className, dataAttrs, ...rest } =\n getComponentProps(props, ProgressBarFillPropsDefs);\n\n return (\n <div\n data-color={color ?? context?.color}\n data-variant={context?.variant}\n style={{ ...style, width: `${((value ?? 0) / ((context?.totalValue ?? 0) > 1 ? context!.totalValue! : 1)) * 100}%` }}\n className={clsx(\"progress-bar-fill\", className)}\n {...dataAttrs}\n {...rest}\n />\n );\n};\nProgressBarFill.displayName = \"ProgressBar.Fill\";\n\nexport { AllProgressBarFillProps, ProgressBarFill, ProgressBarFillProps };\n","import React from \"react\";\n\nexport interface ProgressBarContextValue {\n color?: string;\n variant?: string;\n totalValue?: number;\n}\n\nexport const ProgressBarContext =\n React.createContext<ProgressBarContextValue | null>(null);\n\nexport function useProgressBarContext() {\n const context = React.useContext(ProgressBarContext);\n if (!context) {\n throw new Error(\n \"ProgressBar components must be used within a ProgressBar.Root\",\n );\n }\n return context;\n}\n","import { GetPropDefTypes, PropDef } from \"../../../props/prop-def\";\n\nconst ProgressBarFillPropsDefs = {\n /**\n * The value of the progress bar (filled state).\n * Should be a number between 0 and 1 representing the percentage of completion.\n */\n value: {\n type: \"number\",\n } satisfies PropDef<number>,\n} as const;\n\ntype ProgressBarFillInternalProps = GetPropDefTypes<\n typeof ProgressBarFillPropsDefs\n>;\n\nexport { ProgressBarFillInternalProps, ProgressBarFillPropsDefs };\n","\"use client\";\n\nimport clsx from \"clsx\";\nimport React, { FC, HTMLAttributes, isValidElement, useMemo } from \"react\";\nimport {\n ColorProp,\n MarginPropDefs,\n MarginProps,\n SizeProp,\n SizePropDef,\n} from \"../../../props\";\nimport {\n filterChildren,\n WithOptionalStrictChildren,\n} from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport {\n ProgressBarFill,\n ProgressBarFillProps,\n} from \"../fill/progress-bar-fill\";\nimport { ProgressBarContext } from \"../progress-bar-context\";\nimport {\n ProgressBarRootInternalProps,\n ProgressBarRootPropsDefs,\n} from \"./progress-bar-root.props\";\n\ninterface AllProgressBarRootProps\n extends ProgressBarRootInternalProps, ColorProp, MarginProps, SizeProp {}\n\nconst ALLOWED_CHILDREN = [ProgressBarFill.displayName!];\n\ntype ProgressBarRootProps = AllProgressBarRootProps &\n WithOptionalStrictChildren<\n HTMLAttributes<HTMLDivElement>,\n ProgressBarFillProps\n >;\n\nconst ProgressBarRoot: FC<ProgressBarRootProps> = (props) => {\n const { value, size, color, variant, className, dataAttrs, ...rest } =\n getComponentProps(\n props,\n ProgressBarRootPropsDefs,\n MarginPropDefs,\n SizePropDef,\n );\n\n const validChildren = filterChildren(props.children, ALLOWED_CHILDREN, {\n parentDisplayName: ProgressBarRoot.displayName,\n });\n\n const { fills, totalValue } = useMemo(() => {\n const fills = validChildren.filter(\n (child) =>\n isValidElement(child) &&\n (child.type as React.FC).displayName === ProgressBarFill.displayName,\n );\n\n if (fills.length > 0) {\n const totalValue = fills.reduce<number>(\n (sum, child) =>\n sum +\n (isValidElement(child)\n ? ((child.props as ProgressBarFillProps).value ?? 0)\n : 0),\n 0,\n );\n\n return {\n fills,\n totalValue,\n };\n }\n\n return {\n fills: [<ProgressBarFill color={color} value={value} />],\n totalValue: value ?? 0,\n };\n }, [validChildren, color, value]);\n\n return (\n <ProgressBarContext.Provider value={{ color, variant, totalValue }}>\n <div\n data-size={size}\n data-color={color}\n data-variant={variant}\n className={clsx(\"progress-bar-root\", className)}\n {...dataAttrs}\n {...rest}\n >\n {fills.map((fill, index) => (\n <React.Fragment key={index}>{fill}</React.Fragment>\n ))}\n </div>\n </ProgressBarContext.Provider>\n );\n};\nProgressBarRoot.displayName = \"ProgressBar.Root\";\n\nexport { AllProgressBarRootProps, ProgressBarRoot, ProgressBarRootProps };\n","import { GetPropDefTypes, PropDef } from \"../../../props/prop-def\";\n\nconst ProgressBarVariants = [\"solid\", \"outlined\", \"muted\"] as const;\n\nconst ProgressBarRootPropsDefs = {\n /**\n * Sets the variant style of the progress bar (\"solid\", \"outlined\", or \"muted\").\n */\n variant: {\n type: \"enum\",\n values: ProgressBarVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof ProgressBarVariants)[number]>,\n\n /**\n * The value of the progress bar (filled state).\n * Should be a number between 0 and 1 representing the percentage of completion.\n */\n value: {\n type: \"number\",\n } satisfies PropDef<number>,\n} as const;\n\ntype ProgressBarRootInternalProps = GetPropDefTypes<\n typeof ProgressBarRootPropsDefs\n>;\n\nexport {\n ProgressBarRootInternalProps,\n ProgressBarRootPropsDefs,\n ProgressBarVariants,\n};\n","import { ProgressBarFill } from \"./fill/progress-bar-fill\";\nimport { ProgressBarRoot } from \"./root/progress-bar-root\";\n\n/**\n * A Progress Bar component to display single or stacked progress bars.\n */\nexport const ProgressBar = Object.assign(ProgressBarRoot, {\n /**\n * The root component for the Progress Bar.\n */\n Root: ProgressBarRoot,\n /**\n * The fill component for the Progress Bar, representing the filled portion.\n */\n Fill: ProgressBarFill,\n});\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { RadiusProps, SpacingProp } from \"../../../props\";\nimport { Portal } from \"../../portal/portal\";\nimport { useSelectContext } from \"../select-context\";\nimport { useComposedRefs } from \"../utils/user-composed-refs\";\nimport { SelectViewport } from \"../viewport/select-viewport\";\nimport { SelectContentInternalProps } from \"./select-content.props\";\n\ninterface AllSelectContentProps\n extends SelectContentInternalProps,\n RadiusProps,\n SpacingProp {}\n\ntype SelectContentProps = AllSelectContentProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\nconst SelectContent = React.forwardRef<HTMLDivElement, SelectContentProps>(\n (props, forwardedRef) => {\n const {\n className,\n children,\n position = \"popper\",\n side = \"bottom\",\n offset,\n align = \"center\",\n ...rest\n } = props;\n const context = useSelectContext();\n\n const composedRef = useComposedRefs(forwardedRef, context.contentRef);\n\n // Reset item values on mount\n React.useEffect(() => {\n context.itemValues.current = [];\n }, [context.open]);\n\n // Handle click outside\n React.useEffect(() => {\n if (!context.open) return;\n\n const handleClickOutside = (event: MouseEvent) => {\n const target = event.target as Node;\n if (\n context.contentRef.current &&\n !context.contentRef.current.contains(target) &&\n context.triggerRef.current &&\n !context.triggerRef.current.contains(target)\n ) {\n context.onOpenChange(false);\n }\n };\n\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () =>\n document.removeEventListener(\"mousedown\", handleClickOutside);\n }, [context.open]);\n\n // Handle keyboard navigation\n React.useEffect(() => {\n if (!context.open) return;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n const items = context.itemValues.current;\n const itemCount = items.length;\n\n switch (event.key) {\n case \"ArrowDown\":\n event.preventDefault();\n context.setHighlightedIndex((prev) =>\n prev < itemCount - 1 ? prev + 1 : 0\n );\n break;\n case \"ArrowUp\":\n event.preventDefault();\n context.setHighlightedIndex((prev) =>\n prev > 0 ? prev - 1 : itemCount - 1\n );\n break;\n case \"Tab\":\n event.preventDefault();\n if (event.shiftKey) {\n context.setHighlightedIndex((prev) =>\n prev > 0 ? prev - 1 : itemCount - 1\n );\n } else {\n context.setHighlightedIndex((prev) =>\n prev < itemCount - 1 ? prev + 1 : 0\n );\n }\n break;\n case \"Enter\":\n case \" \":\n event.preventDefault();\n if (context.highlightedIndex >= 0) {\n const selectedValue = items[context.highlightedIndex];\n if (selectedValue) {\n context.onValueChange(selectedValue);\n const displayText = children;\n if (displayText) context.setDisplayValue(displayText);\n context.onOpenChange(false);\n }\n }\n break;\n case \"Escape\":\n event.preventDefault();\n context.onOpenChange(false);\n context.triggerRef.current?.focus();\n break;\n }\n };\n\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => document.removeEventListener(\"keydown\", handleKeyDown);\n }, [context.open, context.highlightedIndex]);\n\n const [contentWidth, setContentWidth] = React.useState<\n number | undefined\n >();\n const labelInside = context.labelPosition === \"inside\";\n const anchorRef = labelInside ? context.rootRef : context.triggerRef;\n\n React.useLayoutEffect(() => {\n if (context.open && anchorRef.current) {\n setContentWidth(anchorRef.current.getBoundingClientRect().width);\n }\n }, [context.open, context.labelPosition, anchorRef]);\n\n if (!context.open) {\n return (\n <div style={{ display: \"none\" }} aria-hidden=\"true\">\n {children}\n </div>\n );\n }\n\n return (\n <Portal.Root\n open={context.open}\n onOpenChange={context.onOpenChange}\n anchorRef={anchorRef}\n >\n <Portal.Content anchored side={side} align={align} sideOffset={offset}>\n <div\n ref={composedRef}\n role=\"listbox\"\n data-state={context.open ? \"open\" : \"closed\"}\n data-side={side}\n data-align={align}\n data-trigger-variant={context.triggerVariant}\n className={clsx(\"select-content\", className)}\n style={{ width: contentWidth }}\n {...rest}\n >\n <SelectViewport>{children}</SelectViewport>\n </div>\n </Portal.Content>\n </Portal.Root>\n );\n }\n);\nSelectContent.displayName = \"Select.Content\";\n\nexport { AllSelectContentProps, SelectContent, SelectContentProps };\n","import * as React from \"react\";\nimport { LabelPosition } from \"./label/select-label.props\";\nimport { TriggerVariant } from \"./trigger/select-trigger.props\";\n\nexport interface SelectContextValue {\n open: boolean;\n value: string;\n displayValue: React.ReactNode;\n onOpenChange: (open: boolean) => void;\n onValueChange: (value: string) => void;\n setDisplayValue: (displayValue: React.ReactNode) => void;\n rootRef: React.RefObject<HTMLDivElement | HTMLButtonElement | null>;\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentRef: React.RefObject<HTMLDivElement | null>;\n labelPosition?: LabelPosition;\n setLabelPosition?: (position: LabelPosition) => void;\n triggerVariant?: TriggerVariant;\n setTriggerVariant?: (variant: TriggerVariant) => void;\n disabled?: boolean;\n required?: boolean;\n name?: string;\n placeholder?: string;\n labelId: string;\n highlightedIndex: number;\n setHighlightedIndex: React.Dispatch<React.SetStateAction<number>>;\n itemsRef: React.RefObject<Map<string, HTMLDivElement>>;\n itemValues: React.RefObject<string[]>;\n}\n\nexport const SelectContext = React.createContext<SelectContextValue | null>(\n null\n);\n\nexport function useSelectContext() {\n const context = React.useContext(SelectContext);\n if (!context) {\n throw new Error(\"Select components must be used within a Select.Root\");\n }\n return context;\n}\n","import * as React from \"react\";\n\nexport function useComposedRefs<T>(\n ...refs: (React.Ref<T> | undefined)[]\n): React.RefCallback<T> {\n return React.useCallback(\n (node: T) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref != null) {\n (ref as React.RefObject<T>).current = node;\n }\n });\n },\n [refs]\n );\n}\n","import clsx from \"clsx\";\nimport * as React from \"react\";\n\ninterface SelectViewportProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst SelectViewport = React.forwardRef<HTMLDivElement, SelectViewportProps>(\n (props, ref) => {\n const { className, children, ...rest } = props;\n\n return (\n <div ref={ref} className={clsx(\"select-viewport\", className)} {...rest}>\n {children}\n </div>\n );\n }\n);\nSelectViewport.displayName = \"Select.Viewport\";\n\nexport { SelectViewport, SelectViewportProps };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { Text } from \"../../text/text\";\nimport {\n SelectGroupInternalProps,\n SelectGroupsPropDefs,\n} from \"./select-group.props\";\n\ninterface AllSelectGroupProps extends SelectGroupInternalProps {}\n\ntype SelectGroupProps = AllSelectGroupProps &\n React.HTMLAttributes<HTMLDivElement>;\n\nconst SelectGroup = React.forwardRef<HTMLDivElement, SelectGroupProps>(\n (props, ref) => {\n const { className, children, dataAttrs, ...rest } = getComponentProps(\n props,\n SelectGroupsPropDefs\n );\n\n return (\n <div\n ref={ref}\n role=\"group\"\n className={clsx(\"select-group\", className)}\n {...rest}\n >\n <Text className=\"select-group-label\" disabled>\n {props.title}\n </Text>\n\n {children}\n </div>\n );\n }\n);\nSelectGroup.displayName = \"Select.Group\";\n\nexport { AllSelectGroupProps, SelectGroup, SelectGroupProps };\n","import { GetPropDefTypes, PropDef } from \"../../../props/prop-def\";\n\nconst SelectGroupsPropDefs = {\n title: {\n type: \"string\",\n } satisfies PropDef<string>,\n} as const;\n\ntype SelectGroupInternalProps = GetPropDefTypes<typeof SelectGroupsPropDefs>;\n\nexport { SelectGroupInternalProps, SelectGroupsPropDefs };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { Box } from \"../../box\";\nimport { Text } from \"../../text\";\nimport { useSelectContext } from \"../select-context\";\nimport { SelectItemIndicator } from \"./select-item-indicator\";\nimport {\n SelectItemInternalProps,\n SelectItemPropDefs,\n} from \"./select-item.props\";\n\ninterface AllSelectItemProps extends SelectItemInternalProps {}\n\ntype SelectItemProps = AllSelectItemProps &\n Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\nconst SelectItem = React.forwardRef<HTMLDivElement, SelectItemProps>(\n (props, ref) => {\n const context = useSelectContext();\n const { value, disabled, children, className, ...rest } = getComponentProps(\n props,\n SelectItemPropDefs\n );\n\n const selected = context.value === value;\n\n // Set display value if this item is already selected on mount\n React.useEffect(() => {\n if (selected && children) {\n context.setDisplayValue(children);\n }\n }, [selected]);\n\n // Register item value\n React.useEffect(() => {\n if (!value) return;\n\n if (!disabled) {\n const values = context.itemValues.current;\n if (!values.includes(value)) values.push(value);\n }\n\n return () => {\n const values = context.itemValues.current;\n const index = values.indexOf(value);\n if (index > -1) values.splice(index, 1);\n };\n }, [value, disabled]);\n\n const itemIndex = value ? context.itemValues.current.indexOf(value) : -1;\n const isHighlighted =\n context.highlightedIndex >= 0 && context.highlightedIndex === itemIndex;\n\n const handleClick = () => {\n if (!disabled) {\n if (value) {\n context.onValueChange(value);\n context.setDisplayValue(children);\n }\n context.onOpenChange(false);\n context.triggerRef.current?.focus();\n }\n };\n\n const handleMouseEnter = () => {\n if (!disabled) context.setHighlightedIndex(itemIndex);\n };\n\n return (\n <Box\n ref={ref}\n role=\"option\"\n radius=\"none\"\n aria-selected={selected}\n aria-disabled={disabled}\n data-variant={context.triggerVariant}\n data-state={selected ? \"checked\" : \"unchecked\"}\n data-highlighted={isHighlighted ? \"\" : undefined}\n data-disabled={disabled ? \"\" : undefined}\n className={clsx(\"select-item\", className)}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n {...rest}\n >\n <Box\n style={{ width: 24, height: 24, justifyContent: \"center\" }}\n className=\"flex items-center\"\n >\n {selected && <SelectItemIndicator />}\n </Box>\n\n <Text disabled={disabled}>{children}</Text>\n </Box>\n );\n }\n);\nSelectItem.displayName = \"Select.Item\";\n\nexport { AllSelectItemProps, SelectItem, SelectItemProps };\n","import * as React from \"react\";\n\nexport const SelectItemIndicator: React.FC = () => {\n return (\n <span className=\"select-item-indicator\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n );\n};\n","import { GetPropDefTypes, PropDef } from \"../../../props/prop-def\";\n\nconst SelectItemPropDefs = {\n value: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n disabled: {\n type: \"boolean\",\n default: false,\n } satisfies PropDef<boolean>,\n} as const;\n\ntype SelectItemInternalProps = GetPropDefTypes<typeof SelectItemPropDefs>;\n\nexport { SelectItemInternalProps, SelectItemPropDefs };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { Text } from \"../../text\";\nimport { useSelectContext } from \"../select-context\";\nimport {\n SelectLabelInternalProps,\n SelectLabelPropDefs,\n} from \"./select-label.props\";\n\ninterface AllSelectLabelProps extends SelectLabelInternalProps {}\n\ntype SelectLabelProps = AllSelectLabelProps &\n Omit<React.HTMLAttributes<HTMLLabelElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\n/** Label for a select component. */\nconst SelectLabel = React.forwardRef<HTMLLabelElement, SelectLabelProps>(\n (props, ref) => {\n const context = useSelectContext();\n const { className, children, position, dataAttrs } = getComponentProps(\n props,\n SelectLabelPropDefs\n );\n\n React.useLayoutEffect(() => {\n context.setLabelPosition?.(position ?? \"top\");\n }, [position, context.setLabelPosition]);\n\n return (\n <label\n ref={ref}\n htmlFor={context.labelId}\n className={clsx(\"select-label\", className)}\n {...dataAttrs}\n >\n <Text disabled={context.disabled}>{children}</Text>\n </label>\n );\n }\n);\nSelectLabel.displayName = \"Select.Label\";\n\nexport { AllSelectLabelProps, SelectLabel, SelectLabelProps };\n","import { GetPropDefTypes, PropDef } from \"../../../props/prop-def\";\n\nconst labelPositions = [\"top\", \"left\", \"inside\"] as const;\ntype LabelPosition = (typeof labelPositions)[number];\n\nconst SelectLabelPropDefs = {\n position: {\n type: \"enum\",\n values: labelPositions,\n default: \"top\",\n dataAttr: \"position\",\n } satisfies PropDef<LabelPosition>,\n} as const;\n\ntype SelectLabelInternalProps = GetPropDefTypes<typeof SelectLabelPropDefs>;\n\nexport {\n LabelPosition,\n labelPositions,\n SelectLabelInternalProps,\n SelectLabelPropDefs,\n};\n","\"use client\";\n\nimport clsx from \"clsx\";\nimport {\n FC,\n HTMLAttributes,\n ReactNode,\n RefObject,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n MarginPropDefs,\n MarginProps,\n RadiusPropDefs,\n RadiusProps,\n RoundnessPropDef,\n} from \"../../../props\";\nimport {\n filterChildren,\n WithStrictChildren,\n} from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useControllableState } from \"../../../utils/use-controllable-state\";\nimport { Box } from \"../../box\";\nimport { SelectContent, SelectContentProps } from \"../content/select-content\";\nimport { SelectLabel, SelectLabelProps } from \"../label/select-label\";\nimport { LabelPosition } from \"../label/select-label.props\";\nimport { SelectContext } from \"../select-context\";\nimport { SelectTrigger, SelectTriggerProps } from \"../trigger/select-trigger\";\nimport {\n SelectRootInternalProps,\n SelectRootPropsDefs,\n SelectVariant,\n} from \"./select-root.props\";\n\ninterface AllSelectRootProps\n extends SelectRootInternalProps,\n MarginProps,\n RadiusProps {}\n\nconst ALLOWED_CHILDREN = [\n SelectLabel.displayName!,\n SelectTrigger.displayName!,\n SelectContent.displayName!,\n];\n\ntype SelectRootProps = AllSelectRootProps &\n WithStrictChildren<\n HTMLAttributes<HTMLSelectElement>,\n SelectLabelProps | SelectTriggerProps | SelectContentProps\n >;\n\nconst SelectRoot: FC<SelectRootProps> = (props) => {\n const {\n children,\n className,\n dataAttrs,\n value: valueProp,\n defaultValue = \"\",\n onValueChange,\n disabled = false,\n required = false,\n placeholder,\n variant,\n name,\n } = getComponentProps(\n props,\n SelectRootPropsDefs,\n MarginPropDefs,\n RadiusPropDefs,\n RoundnessPropDef\n );\n\n const [value, setValue] = useControllableState({\n value: valueProp,\n defaultValue,\n onChange: onValueChange,\n });\n\n const [open, setOpen] = useState(false);\n\n const [highlightedIndex, setHighlightedIndex] = useState(-1);\n const [labelPosition, setLabelPosition] = useState<LabelPosition>(\"top\");\n const [triggerVariant, setTriggerVariant] =\n useState<SelectVariant>(\"outlined\");\n const [displayValue, setDisplayValue] = useState<ReactNode>(null);\n\n const labelId = useId();\n\n const rootRef = useRef<HTMLDivElement | HTMLButtonElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const itemsRef = useRef<Map<string, HTMLDivElement>>(new Map());\n const itemValues = useRef<string[]>([]);\n\n const contextValue = useMemo(\n () => ({\n open,\n value,\n displayValue,\n onOpenChange: setOpen,\n onValueChange: setValue,\n setDisplayValue,\n rootRef,\n triggerRef,\n contentRef,\n labelPosition,\n setLabelPosition,\n triggerVariant,\n setTriggerVariant,\n disabled,\n required,\n placeholder,\n name,\n labelId,\n highlightedIndex,\n setHighlightedIndex,\n itemsRef,\n itemValues,\n }),\n [\n open,\n value,\n displayValue,\n disabled,\n required,\n name,\n placeholder,\n labelId,\n highlightedIndex,\n labelPosition,\n triggerVariant,\n ]\n );\n\n useLayoutEffect(() => {\n setTriggerVariant?.(variant ?? \"outlined\");\n }, [variant, setTriggerVariant]);\n\n const validChildren = filterChildren(children, ALLOWED_CHILDREN, {\n parentDisplayName: SelectRoot.displayName,\n });\n\n const labelInside = labelPosition === \"inside\";\n\n const handleClick = () => {\n if (!disabled) {\n setOpen(!open);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (disabled) return;\n\n switch (event.key) {\n case \"Enter\":\n case \" \":\n case \"ArrowDown\":\n case \"ArrowUp\":\n event.preventDefault();\n setOpen(true);\n break;\n }\n };\n\n if (labelInside) {\n return (\n <SelectContext.Provider value={contextValue}>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n aria-haspopup=\"listbox\"\n aria-disabled={disabled}\n disabled={disabled}\n ref={rootRef as RefObject<HTMLButtonElement>}\n data-state={open ? \"open\" : \"closed\"}\n data-disabled={disabled ? \"\" : undefined}\n className={clsx(\"select-root\", className)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n {...dataAttrs}\n >\n {validChildren}\n {name && <input type=\"hidden\" name={name} value={value} />}\n </button>\n </SelectContext.Provider>\n );\n }\n\n return (\n <SelectContext.Provider value={contextValue}>\n <Box\n ref={rootRef as RefObject<HTMLDivElement>}\n className={clsx(\"select-root\", className)}\n {...dataAttrs}\n >\n {validChildren}\n {name && <input type=\"hidden\" name={name} value={value} />}\n </Box>\n </SelectContext.Provider>\n );\n};\nSelectRoot.displayName = \"Select.Root\";\n\nexport { AllSelectRootProps, SelectRoot, SelectRootProps };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { RadiusProps, RoundnessProp } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useSelectContext } from \"../select-context\";\nimport { useComposedRefs } from \"../utils/user-composed-refs\";\nimport { SelectValue } from \"../value/select-value\";\nimport { SelectTriggerIcon } from \"./select-trigger-icon\";\nimport {\n SelectTriggerInternalProps,\n SelectTriggerPropsDefs,\n} from \"./select-trigger.props\";\n\ninterface AllSelectTriggerProps\n extends SelectTriggerInternalProps,\n RadiusProps,\n RoundnessProp {}\n\ntype SelectTriggerProps = AllSelectTriggerProps &\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> & {\n asChild?: boolean;\n children?: React.ReactNode;\n };\n\nconst SelectTrigger = React.forwardRef<HTMLButtonElement, SelectTriggerProps>(\n (props, forwardedRef) => {\n const {\n className,\n disabled: disabledProp,\n dataAttrs,\n } = getComponentProps(props, SelectTriggerPropsDefs);\n const context = useSelectContext();\n\n const disabled = disabledProp ?? context.disabled;\n const isInsideLabel = context.labelPosition === \"inside\";\n\n const composedRef = useComposedRefs(forwardedRef, context.triggerRef);\n\n const handleClick = () => {\n if (!disabled) {\n context.onOpenChange(!context.open);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (disabled) return;\n\n switch (event.key) {\n case \"Enter\":\n case \" \":\n case \"ArrowDown\":\n case \"ArrowUp\":\n event.preventDefault();\n context.onOpenChange(true);\n break;\n }\n };\n\n // When label is inside, render as a div since root is the button\n if (isInsideLabel) {\n return (\n <div\n ref={composedRef as React.Ref<HTMLDivElement>}\n data-state={context.open ? \"open\" : \"closed\"}\n data-disabled={disabled ? \"\" : undefined}\n data-variant={context.triggerVariant}\n className={clsx(\"select-trigger\", className)}\n {...dataAttrs}\n >\n <SelectValue />\n <SelectTriggerIcon />\n </div>\n );\n }\n\n return (\n <button\n ref={composedRef}\n type=\"button\"\n role=\"combobox\"\n aria-expanded={context.open}\n aria-haspopup=\"listbox\"\n aria-disabled={disabled}\n disabled={disabled}\n data-state={context.open ? \"open\" : \"closed\"}\n data-disabled={disabled ? \"\" : undefined}\n className={clsx(\"select-trigger\", className)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n data-variant={context.triggerVariant}\n {...dataAttrs}\n >\n <SelectValue />\n\n <SelectTriggerIcon />\n </button>\n );\n }\n);\nSelectTrigger.displayName = \"Select.Trigger\";\n\nexport { AllSelectTriggerProps, SelectTrigger, SelectTriggerProps };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\nimport { Text } from \"../../text\";\nimport { useSelectContext } from \"../select-context\";\n\nexport interface SelectValueProps\n extends React.HTMLAttributes<HTMLSpanElement> {\n placeholder?: string;\n}\n\nexport const SelectValue = React.forwardRef<HTMLSpanElement, SelectValueProps>(\n (props, ref) => {\n const { className, placeholder: placeholderProp, ...rest } = props;\n const context = useSelectContext();\n const placeholder = placeholderProp ?? context.placeholder;\n\n return (\n <span\n ref={ref}\n className={clsx(\"select-value\", className)}\n data-placeholder={!context.value ? \"\" : undefined}\n {...rest}\n >\n <Text disabled={context.disabled}>\n {context.displayValue || placeholder}\n </Text>\n </span>\n );\n }\n);\nSelectValue.displayName = \"Select.Value\";\n","import clsx from \"clsx\";\nimport * as React from \"react\";\n\nconst SelectTriggerIcon: React.FC<React.SVGAttributes<SVGElement>> = (\n props\n) => {\n const { className, ...rest } = props;\n return (\n <svg\n className={clsx(\"select-trigger-icon\", className)}\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <path\n d=\"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n};\n\nexport { SelectTriggerIcon };\n","import { GetPropDefTypes } from \"../../../props/prop-def\";\n\nconst SelectTriggerPropsDefs = {} as const;\n\ntype SelectTriggerInternalProps = GetPropDefTypes<\n typeof SelectTriggerPropsDefs\n>;\n\nexport { SelectTriggerInternalProps, SelectTriggerPropsDefs };\n","import {\n FunctionPropDef,\n GetPropDefTypes,\n PropDef,\n} from \"../../../props/prop-def\";\n\nconst selectVariants = [\"outlined\", \"solid\", \"clear\"] as const;\ntype SelectVariant = (typeof selectVariants)[number];\n\nconst SelectRootPropsDefs = {\n variant: {\n type: \"enum\",\n values: selectVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<SelectVariant>,\n\n value: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n defaultValue: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n disabled: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n required: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n placeholder: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n name: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n onValueChange: {\n type: \"function\",\n } satisfies FunctionPropDef<(value: string) => void> as FunctionPropDef<\n (value: string) => void\n >,\n} as const;\n\ntype SelectRootInternalProps = GetPropDefTypes<typeof SelectRootPropsDefs>;\n\nexport { SelectRootInternalProps, SelectRootPropsDefs, SelectVariant };\n","import clsx from \"clsx\";\nimport * as React from \"react\";\n\ninterface SelectSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst SelectSeparator = React.forwardRef<HTMLDivElement, SelectSeparatorProps>(\n (props, ref) => {\n const { className, ...rest } = props;\n\n return (\n <div\n ref={ref}\n className={clsx(\"select-separator\", className)}\n {...rest}\n />\n );\n }\n);\nSelectSeparator.displayName = \"Select.Separator\";\n\nexport { SelectSeparator, SelectSeparatorProps };\n","import { SelectContent } from \"./content/select-content\";\nimport { SelectGroup } from \"./group/select-group\";\nimport { SelectItem } from \"./item/select-item\";\nimport { SelectLabel } from \"./label/select-label\";\nimport { SelectRoot } from \"./root/select-root\";\nimport { SelectSeparator } from \"./separator/select-separator\";\nimport { SelectTrigger } from \"./trigger/select-trigger\";\nimport { SelectViewport } from \"./viewport/select-viewport\";\n\nexport const Select = {\n Root: SelectRoot,\n Trigger: SelectTrigger,\n Content: SelectContent,\n Viewport: SelectViewport,\n Group: SelectGroup,\n Label: SelectLabel,\n Item: SelectItem,\n Separator: SelectSeparator,\n};\n","import clsx from \"clsx\";\nimport React, { FC } from \"react\";\nimport { MarginProps, PaddingProps } from \"../../props\";\nimport { getComponentProps } from \"../../utils/get-component-props\";\nimport { SeparatorInternalProps, SeparatorPropsDefs } from \"./separator.props\";\n\ninterface AllSeparatorProps\n extends SeparatorInternalProps,\n MarginProps,\n PaddingProps {}\n\ntype SeparatorProps = AllSeparatorProps & React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * A component for visually separating content with a line\n */\nconst Separator: FC<SeparatorProps> = (props) => {\n const { className, dataAttrs, style } = getComponentProps(\n props,\n SeparatorPropsDefs\n );\n\n return (\n <div\n className={clsx(\"separator\", className)}\n style={style}\n {...dataAttrs}\n />\n );\n};\nSeparator.displayName = \"Separator\";\n\nexport { AllSeparatorProps, Separator, SeparatorProps };\n","import { GetPropDefTypes, PropDef } from \"../../props/prop-def\";\n\nconst directions = [\"horizontal\", \"vertical\"] as const;\nconst variants = [\"solid\", \"dashed\", \"dotted\"] as const;\n\nconst SeparatorPropsDefs = {\n /**\n * The direction of the separator.\n *\n * @example direction=\"vertical\" // positions the separator vertically\n */\n direction: {\n type: \"enum\",\n values: directions,\n default: \"horizontal\",\n dataAttr: \"direction\",\n } satisfies PropDef<(typeof directions)[number]>,\n\n /**\n * The variant of the separator.\n *\n * @example variant=\"dashed\" // makes the separator dashed\n */\n variant: {\n type: \"enum\",\n values: variants,\n default: \"solid\",\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof variants)[number]>,\n};\n\ntype SeparatorInternalProps = GetPropDefTypes<typeof SeparatorPropsDefs>;\n\nexport { SeparatorInternalProps, SeparatorPropsDefs };\n","import clsx from \"clsx\";\nimport React from \"react\";\nimport { SizeProp, SizePropDef } from \"../../../props\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useSwitchContext } from \"../switch-context\";\nimport {\n SwitchIndicatorInternalProps,\n SwitchIndicatorPropDefs,\n} from \"./switch-indicator.props\";\n\ninterface AllSwitchIndicatorProps\n extends SwitchIndicatorInternalProps, SizeProp {}\n\ntype SwitchIndicatorProps = AllSwitchIndicatorProps &\n Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\">;\n\n/**\n * Indicator for a switch component.\n * Supports checked, indeterminate, disabled, readonly, and high contrast states.\n */\nconst SwitchIndicator: React.FC<SwitchIndicatorProps> = React.forwardRef<\n HTMLDivElement,\n SwitchIndicatorProps\n>((props, ref) => {\n const {\n value,\n setValue,\n hovered,\n color,\n disabled,\n readonly,\n focused,\n variant: contextVariant,\n } = useSwitchContext();\n const { size, variant, className, style, dataAttrs } = getComponentProps(\n props,\n SwitchIndicatorPropDefs,\n SizePropDef,\n );\n\n const indicatorVariant = variant || contextVariant;\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLSpanElement>) => {\n if (disabled || readonly) return;\n\n if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n setValue(!value);\n }\n };\n\n const indicatorProps = {\n ...(value && { \"data-checked\": true }),\n ...(disabled && { \"data-disabled\": true }),\n ...(readonly && { \"data-readonly\": true }),\n ...((variant || contextVariant) && { \"data-variant\": indicatorVariant }),\n };\n\n return (\n <div\n ref={ref}\n style={style}\n role=\"switch\"\n data-size={size}\n data-color={color}\n data-hovered={hovered}\n aria-disabled={disabled}\n data-focused={focused}\n aria-readonly={readonly}\n onKeyDown={handleKeyDown}\n tabIndex={disabled || readonly ? -1 : 0}\n className={clsx(\"switch-indicator\", className)}\n {...indicatorProps}\n {...dataAttrs}\n />\n );\n});\nSwitchIndicator.displayName = \"Switch.Indicator\";\n\nexport { AllSwitchIndicatorProps, SwitchIndicator, SwitchIndicatorProps };\n","import React from \"react\";\nimport { LabelPosition } from \"./label/switch-label.props\";\n\nexport interface SwitchContextValue {\n value: boolean;\n setValue: (value: boolean) => void;\n onCheckedChange?: (value: boolean) => void;\n color?: string;\n labelId: string;\n labelPosition?: LabelPosition;\n setLabelPosition?: (position: LabelPosition) => void;\n disabled?: boolean;\n readonly?: boolean;\n required?: boolean;\n variant?: string;\n name?: string;\n hovered?: boolean;\n setHovered?: (hovered: boolean) => void;\n focused?: boolean;\n setFocused?: (focused: boolean) => void;\n}\n\nexport const SwitchContext = React.createContext<SwitchContextValue | null>(\n null,\n);\n\nexport function useSwitchContext() {\n const context = React.useContext(SwitchContext);\n if (!context) {\n throw new Error(\"Switch components must be used within a Switch.Root\");\n }\n return context;\n}\n","import {\n FunctionPropDef,\n GetPropDefTypes,\n PropDef,\n} from \"../../../props/prop-def\";\n\nconst SwitchVariants = [\"solid\", \"outlined\", \"muted\"] as const;\n\nconst SwitchRootPropsDefs = {\n /**\n * Sets the variant style of the switch (\"solid\" or \"outlined\").\n */\n variant: {\n type: \"enum\",\n values: SwitchVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof SwitchVariants)[number]>,\n\n /**\n * Sets the checked state of the switch.\n *\n * When using an uncontrolled switch, use `defaultChecked` instead.\n * @default undefined\n */\n checked: {\n type: \"boolean\",\n dataAttr: \"checked\",\n } satisfies PropDef<boolean>,\n\n /**\n * The value of the switch (checked state).\n */\n value: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n /**\n * Sets the default checked state of the switch.\n * @default undefined\n */\n defaultChecked: {\n type: \"boolean\",\n } satisfies PropDef<boolean>,\n\n /**\n * Disables the switch component.\n * @default undefined\n */\n disabled: {\n type: \"boolean\",\n dataAttr: \"disabled\",\n } satisfies PropDef<boolean>,\n\n /**\n * Makes the switch read-only.\n * @default undefined\n */\n readonly: {\n type: \"boolean\",\n dataAttr: \"readonly\",\n } satisfies PropDef<boolean>,\n\n /**\n * Marks the switch as required.\n * @default undefined\n */\n required: {\n type: \"boolean\",\n dataAttr: \"required\",\n } satisfies PropDef<boolean>,\n\n /**\n * Sets the name attribute of the switch input for form control.\n * @default undefined\n */\n name: {\n type: \"string\",\n } satisfies PropDef<string>,\n\n /**\n * Callback fired when the checked state changes.\n *\n * @param value - The new checked state.\n */\n onCheckedChange: {\n type: \"function\",\n } satisfies FunctionPropDef<(value: boolean) => void> as FunctionPropDef<\n (value: boolean) => void\n >,\n} as const;\n\ntype SwitchRootInternalProps = GetPropDefTypes<typeof SwitchRootPropsDefs>;\n\nexport { SwitchRootInternalProps, SwitchRootPropsDefs, SwitchVariants };\n","import { GetPropDefTypes, PropDef } from \"../../../props\";\nimport { SwitchVariants } from \"../root/switch-root.props\";\n\nconst SwitchIndicatorPropDefs = {\n /**\n * Sets the variant style of the switch (\"solid\" or \"outlined\").\n */\n variant: {\n type: \"enum\",\n values: SwitchVariants,\n dataAttr: \"variant\",\n } satisfies PropDef<(typeof SwitchVariants)[number]>,\n} as const;\n\ntype SwitchIndicatorInternalProps = GetPropDefTypes<\n typeof SwitchIndicatorPropDefs\n>;\n\nexport { SwitchIndicatorInternalProps, SwitchIndicatorPropDefs };\n","import clsx from \"clsx\";\nimport React from \"react\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { Text } from \"../../text\";\nimport { useSwitchContext } from \"../switch-context\";\nimport {\n SwitchLabelInternalProps,\n SwitchLabelPropDefs,\n} from \"./switch-label.props\";\n\ninterface AllSwitchLabelProps extends SwitchLabelInternalProps {}\n\ntype SwitchLabelProps = AllSwitchLabelProps &\n Omit<React.HTMLAttributes<HTMLLabelElement>, \"children\"> & {\n children?: React.ReactNode;\n };\n\n/** Label for a switch component. */\nconst SwitchLabel = React.forwardRef<HTMLLabelElement, SwitchLabelProps>(\n (props, ref) => {\n const context = useSwitchContext();\n const { className, children, position } = getComponentProps(\n props,\n SwitchLabelPropDefs,\n );\n\n React.useLayoutEffect(() => {\n context.setLabelPosition?.(position ?? \"right\");\n }, [position, context.setLabelPosition]);\n\n return (\n <label\n ref={ref}\n htmlFor={context.labelId}\n className={clsx(\"switch-label\", className)}\n {...(position && { [`data-position`]: position })}\n >\n <Text>{children}</Text>\n </label>\n );\n },\n);\nSwitchLabel.displayName = \"Switch.Label\";\n\nexport { AllSwitchLabelProps, SwitchLabel, SwitchLabelProps };\n","import { GetPropDefTypes, PropDef } from \"../../../props\";\n\nconst labelPositions = [\"top\", \"left\", \"right\", \"bottom\"] as const;\ntype LabelPosition = (typeof labelPositions)[number];\n\nconst SwitchLabelPropDefs = {\n /**\n * Sets the position of the label relative to the switch.\n *\n * @example position=\"left\" // positions the label to the left of the switch\n * @example position=\"top\" // positions the label above the switch\n */\n position: {\n type: \"enum\",\n values: labelPositions,\n dataAttr: \"position\",\n } satisfies PropDef<LabelPosition>,\n} as const;\n\ntype SwitchLabelInternalProps = GetPropDefTypes<typeof SwitchLabelPropDefs>;\n\nexport {\n LabelPosition,\n labelPositions,\n SwitchLabelInternalProps,\n SwitchLabelPropDefs,\n};\n","\"use client\";\n\nimport clsx from \"clsx\";\nimport React, {\n FC,\n HTMLAttributes,\n isValidElement,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport {\n AlignProp,\n AlignPropDef,\n ColorProp,\n ColorPropDef,\n MarginPropDefs,\n MarginProps,\n SizeProp,\n SizePropDef,\n} from \"../../../props\";\nimport {\n filterChildren,\n WithStrictChildren,\n} from \"../../../utils/filter-children\";\nimport { getComponentProps } from \"../../../utils/get-component-props\";\nimport { useControllableState } from \"../../../utils/use-controllable-state\";\nimport {\n SwitchIndicator,\n SwitchIndicatorProps,\n} from \"../indicator/switch-indicator\";\nimport { SwitchLabel, SwitchLabelProps } from \"../label/switch-label\";\nimport { LabelPosition } from \"../label/switch-label.props\";\nimport { SwitchContext } from \"../switch-context\";\nimport {\n SwitchRootInternalProps,\n SwitchRootPropsDefs,\n} from \"./switch-root.props\";\n\ninterface AllSwitchRootProps\n extends\n SwitchRootInternalProps,\n AlignProp,\n ColorProp,\n MarginProps,\n SizeProp {}\n\nconst ALLOWED_CHILDREN = [\n SwitchLabel.displayName!,\n SwitchIndicator.displayName!,\n];\n\n/**\n * A versatile Switch, managing state, context, and styling.\n */\ntype SwitchRootProps = AllSwitchRootProps &\n WithStrictChildren<\n HTMLAttributes<HTMLDivElement>,\n SwitchLabelProps | SwitchIndicatorProps\n >;\n\nconst SwitchRoot: FC<SwitchRootProps> = (props) => {\n const {\n name,\n size,\n color,\n variant,\n checked,\n dataAttrs,\n onCheckedChange,\n value: valueProp,\n disabled = false,\n required = false,\n readonly = false,\n defaultChecked = false,\n } = getComponentProps(\n props,\n SwitchRootPropsDefs,\n AlignPropDef,\n MarginPropDefs,\n SizePropDef,\n ColorPropDef,\n );\n\n const [value, setValue] = useControllableState<boolean>({\n value: valueProp || checked,\n defaultValue: defaultChecked,\n onChange: onCheckedChange,\n });\n\n const labelId = useId();\n const [labelPosition, setLabelPosition] = useState<LabelPosition>(\"right\");\n\n const [hovered, setHovered] = useState(false);\n const [focused, setFocused] = useState(false);\n\n const validChildren = filterChildren(props.children, ALLOWED_CHILDREN, {\n parentDisplayName: SwitchRoot.displayName,\n });\n\n const { restDataAttrs } = useMemo(() => {\n const { [\"data-color\"]: _, ...restDataAttrs } = dataAttrs || {};\n return { restDataAttrs };\n }, [dataAttrs]);\n\n const { indicator, otherChildren } = useMemo(() => {\n const indicatorIndex = validChildren.findIndex(\n (child) =>\n isValidElement(child) &&\n (child.type as React.FC).displayName === SwitchIndicator.displayName,\n );\n\n if (indicatorIndex > -1) {\n return {\n indicator: validChildren[indicatorIndex],\n otherChildren: validChildren.filter((_, i) => i !== indicatorIndex),\n };\n }\n\n return {\n indicator: <SwitchIndicator size={size} />,\n otherChildren: validChildren,\n };\n }, [validChildren, size]);\n\n const contextValue = useMemo(\n () => ({\n name,\n value,\n color,\n setValue,\n onCheckedChange,\n labelId,\n labelPosition,\n setLabelPosition,\n variant,\n hovered,\n setHovered,\n focused,\n setFocused,\n disabled,\n readonly,\n required,\n }),\n [\n name,\n value,\n color,\n onCheckedChange,\n setValue,\n labelId,\n labelPosition,\n hovered,\n focused,\n disabled,\n readonly,\n required,\n ],\n );\n\n const handleClick = () => {\n if (disabled || readonly) return;\n setValue(!value);\n };\n\n return (\n <SwitchContext.Provider value={contextValue}>\n <div\n className={clsx(\"switch-root\", props.className)}\n onClick={() => handleClick()}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n {...restDataAttrs}\n >\n <div\n className=\"switch-container\"\n data-size={size}\n data-color={color}\n data-checked={value}\n data-hovered={hovered}\n data-focused={focused}\n data-variant={variant}\n >\n {indicator}\n </div>\n\n {otherChildren}\n {name && <input type=\"hidden\" name={name} value={String(value)} />}\n </div>\n </SwitchContext.Provider>\n );\n};\nSwitchRoot.displayName = \"Switch\";\n\nexport { AllSwitchRootProps, SwitchRoot, SwitchRootProps };\n","import { SwitchIndicator } from \"./indicator/switch-indicator\";\nimport { SwitchLabel } from \"./label/switch-label\";\nimport { SwitchRoot } from \"./root/switch-root\";\n\nexport const Switch = Object.assign(SwitchRoot, {\n Root: SwitchRoot,\n Label: SwitchLabel,\n Indicator: SwitchIndicator,\n});\n","\"use client\";\n\nimport * as React from \"react\";\nimport { GetProps } from \"../../utils/get-props\";\nimport {\n ThemeAppearance,\n ThemeContext,\n ThemeContextProps,\n ThemeRadius,\n ThemeRoundness,\n} from \"./theme-context\";\nimport { ThemePropsDefs } from \"./theme.props\";\n\nexport type ThemeProps = GetProps<typeof ThemePropsDefs> &\n React.HTMLAttributes<HTMLDivElement>;\n\nconst Theme = React.forwardRef<HTMLDivElement, ThemeProps>((props, ref) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n\n if (isRoot) return <ThemeRoot {...props} ref={ref} />;\n\n return <ThemeSub {...props} ref={ref} />;\n});\nTheme.displayName = \"Theme\";\n\nconst ThemeRoot = React.forwardRef<HTMLDivElement, ThemeProps>((props, ref) => {\n const {\n appearance: themeAppearance,\n radius: themeRadius,\n roundness: themeRoundness,\n spacing: themeSpacing,\n\n children,\n ...rest\n } = props;\n\n const [appearance, setAppearance] = React.useState<ThemeAppearance>(\n themeAppearance ?? \"light\"\n );\n const [radius, setRadius] = React.useState<ThemeRadius>(themeRadius ?? \"md\");\n const [roundness, setRoundness] = React.useState<ThemeRoundness>(\n themeRoundness ?? \"3\"\n );\n const [spacing, setSpacing] = React.useState(themeSpacing ?? \"md\");\n\n const value = React.useMemo(\n () => ({\n appearance,\n radius,\n roundness,\n spacing,\n onAppearanceChange: setAppearance,\n onRadiusChange: setRadius,\n onRoundnessChange: setRoundness,\n onSpacingChange: setSpacing,\n }),\n [appearance, radius, roundness, spacing]\n );\n\n return (\n <ThemeContext.Provider value={value}>\n <div\n ref={ref}\n data-appearance={appearance}\n data-theme-radius={radius}\n data-theme-roundness={roundness}\n data-theme-spacing={spacing}\n {...rest}\n >\n {children}\n </div>\n </ThemeContext.Provider>\n );\n});\nThemeRoot.displayName = \"ThemeRoot\";\n\nconst ThemeSub = React.forwardRef<\n HTMLDivElement,\n Partial<ThemeContextProps> &\n React.HTMLAttributes<HTMLDivElement> & { isRoot?: boolean }\n>((props, ref) => {\n const context = React.useContext(ThemeContext)!;\n\n const {\n appearance,\n radius,\n roundness,\n spacing,\n onAppearanceChange,\n onRadiusChange,\n onRoundnessChange,\n onSpacingChange,\n\n children,\n ...rest\n } = props;\n\n const contextProps: ThemeContextProps = {\n appearance: appearance ?? context.appearance,\n radius: radius ?? context.radius,\n roundness: roundness ?? context.roundness,\n spacing: spacing ?? context.spacing,\n\n onAppearanceChange: context.onAppearanceChange,\n onRadiusChange: context.onRadiusChange,\n onRoundnessChange: context.onRoundnessChange,\n onSpacingChange: context.onSpacingChange,\n };\n\n return (\n <ThemeContext.Provider value={contextProps}>\n <div\n ref={ref}\n data-appearance={appearance}\n data-theme-radius={radius}\n data-theme-roundness={roundness}\n data-theme-spacing={spacing}\n {...rest}\n className=\"flex\"\n >\n {children}\n </div>\n </ThemeContext.Provider>\n );\n});\nThemeSub.displayName = \"ThemeSub\";\n\nexport { Theme };\n","\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Box } from \"../box\";\nimport { Portal } from \"../portal\";\nimport { Select } from \"../select\";\nimport { useTheme } from \"./theme-context\";\n\nconst ThemeControlPosition = [\n \"tl\",\n \"top\",\n \"tr\",\n \"left\",\n \"center\",\n \"right\",\n \"bl\",\n \"bottom\",\n \"br\",\n] as const;\n\ninterface ThemeControlProps {\n position?: (typeof ThemeControlPosition)[number];\n}\n\nexport function ThemeControl({ position = \"bottom\" }: ThemeControlProps) {\n const {\n appearance,\n onAppearanceChange,\n radius,\n onRadiusChange,\n roundness,\n onRoundnessChange,\n spacing,\n onSpacingChange,\n } = useTheme();\n\n const [visible, setVisible] = useState(false);\n\n useEffect(() => {\n function handleKeyDown(event: KeyboardEvent) {\n if (event.altKey && event.code === \"KeyT\") {\n event.preventDefault();\n setVisible(!visible);\n }\n }\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => document.removeEventListener(\"keydown\", handleKeyDown);\n }, [visible]);\n\n return (\n <Portal.Root open={visible} onOpenChange={setVisible}>\n <Portal.Content position={position}>\n <Box\n m=\"4\"\n p=\"4\"\n className=\"flex flex-col gap-2 border-[rgba(var(--border-color), 0.6)]\"\n >\n <Select.Root\n variant=\"solid\"\n value={appearance}\n onValueChange={(change) => onAppearanceChange?.(change as any)}\n >\n <Select.Label position=\"inside\">Theme Settings</Select.Label>\n\n <Select.Trigger />\n\n <Select.Content>\n <Select.Item value=\"light\">Light</Select.Item>\n <Select.Item value=\"dark\">Dark</Select.Item>\n </Select.Content>\n </Select.Root>\n\n <Select.Root\n variant=\"solid\"\n value={radius}\n onValueChange={(change) => onRadiusChange?.(change as any)}\n >\n <Select.Label position=\"inside\">Radius</Select.Label>\n\n <Select.Trigger />\n\n <Select.Content>\n <Select.Item value=\"none\">None</Select.Item>\n <Select.Item value=\"xs\">XS</Select.Item>\n <Select.Item value=\"sm\">SM</Select.Item>\n <Select.Item value=\"md\">MD</Select.Item>\n <Select.Item value=\"lg\">LG</Select.Item>\n <Select.Item value=\"xl\">XL</Select.Item>\n <Select.Item value=\"full\">FULL</Select.Item>\n </Select.Content>\n </Select.Root>\n\n <Select.Root\n variant=\"solid\"\n value={roundness}\n onValueChange={(change) => onRoundnessChange?.(change as any)}\n >\n <Select.Label className=\"min-w-40!\" position=\"inside\">\n Roundness\n </Select.Label>\n\n <Select.Trigger />\n\n <Select.Content>\n <Select.Item value=\"1\">1</Select.Item>\n <Select.Item value=\"2\">2</Select.Item>\n <Select.Item value=\"3\">3</Select.Item>\n <Select.Item value=\"4\">4</Select.Item>\n <Select.Item value=\"5\">5</Select.Item>\n <Select.Item value=\"6\">6</Select.Item>\n </Select.Content>\n </Select.Root>\n\n <Select.Root\n variant=\"solid\"\n value={spacing}\n onValueChange={(change) => onSpacingChange?.(change as any)}\n >\n <Select.Label position=\"inside\">Spacing</Select.Label>\n\n <Select.Trigger />\n\n <Select.Content>\n <Select.Item value=\"xs\">XS</Select.Item>\n <Select.Item value=\"sm\">SM</Select.Item>\n <Select.Item value=\"md\">MD</Select.Item>\n <Select.Item value=\"lg\">LG</Select.Item>\n <Select.Item value=\"xl\">XL</Select.Item>\n </Select.Content>\n </Select.Root>\n </Box>\n </Portal.Content>\n </Portal.Root>\n );\n}\n"],"mappings":";;;AAAA,OAAOA,WAAU;;;ACAjB,OAAO,UAAU;AAGV,SAAS,kBAOd,UAAa,UAAa;AAC1B,MAAI,QAA6B,MAAM,SAAS,CAAC;AACjD,QAAM,aAAuB,MAAM,YAAY,CAAC,MAAM,SAAS,IAAI,CAAC;AACpE,QAAM,YAAoC,CAAC;AAC3C,QAAM,iBAAsC,CAAC;AAE7C,QAAM,WAAW,OAAO,OAAO,CAAC,GAAG,GAAG,QAAQ;AAC9C,QAAM,WAAW,OAAO,KAAK,QAAQ;AAGrC,QAAM,YAAY,EAAE,GAAG,MAAM;AAC7B,SAAO,UAAU;AACjB,SAAO,UAAU;AAEjB,aAAW,OAAO,UAAU;AAC1B,UAAM,OAAO,SAAS,GAAG;AACzB,UAAM,QAAQ,QAAQ,GAAG;AAGzB,WAAO,UAAU,GAAG;AAGpB,QACE,KAAK,SAAS,aACd,KAAK,SAAS,YACd,KAAK,SAAS,YACd,KAAK,SAAS,mBACd,KAAK,SAAS,eACd,KAAK,SAAS,YACd;AACA,qBAAe,GAAG,IAAI;AAEtB,UAAI,KAAK,aAAa;AACpB,YAAI,UAAU,UAAa,UAAU,MAAM;AACzC,kBAAQ;AAAA,YACN,GAAG;AAAA,YACH,CAAC,KAAK,WAAW,GACf,KAAK,SAAS,YAAa,QAAQ,MAAM,MAAO;AAAA,UACpD;AAAA,QACF,WAAW,KAAK,YAAY,QAAW;AACrC,kBAAQ;AAAA,YACN,GAAG;AAAA,YACH,CAAC,KAAK,WAAW,GACf,KAAK,SAAS,YACV,KAAK,UACH,MACA,MACF,KAAK;AAAA,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MAAP,EAAY,OAAM,MAAK,gBAAE;AAAA,iBAC5B;AAAA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF,GACF,GACF;AAEJ;","names":["clsx","clsx","clsx","jsx","jsx","clsx","clsx","React","React","jsxs","header","content","React","clsx","clsx","useMemo","React","value","jsx","ALLOWED_CHILDREN","useMemo","clsx","clsx","jsx","clsx","clsx","React","jsx","clsx","clsx","useState","jsx","useState","clsx","clsx","React","jsx","jsx","React","jsx","jsxs","React","clsx","clsx","React","clsx","React","jsx","React","clsx","jsx","React","clsx","clsx","isValidElement","useMemo","useState","jsx","jsxs","ALLOWED_CHILDREN","useState","useMemo","isValidElement","clsx","clsx","React","jsx","clsx","React","jsx","clsx","clsx","React","React","jsx","clsx","clsx","React","React","React","jsx","content","clsx","React","React","jsx","jsx","ALLOWED_CHILDREN","clsx","useContext","React","jsx","useContext","clsx","clsx","React","isValidElement","useMemo","jsx","ALLOWED_CHILDREN","useMemo","fills","isValidElement","totalValue","clsx","React","clsx","React","React","React","clsx","React","jsx","jsx","clsx","clsx","React","jsx","jsxs","clsx","clsx","React","jsx","jsx","jsxs","clsx","clsx","React","labelPositions","jsx","clsx","clsx","useId","useLayoutEffect","useMemo","useRef","useState","clsx","React","clsx","React","jsx","clsx","clsx","jsx","jsx","jsxs","clsx","jsx","jsxs","ALLOWED_CHILDREN","useState","useId","useRef","useMemo","useLayoutEffect","clsx","clsx","React","jsx","clsx","variants","jsx","clsx","clsx","React","React","jsx","React","clsx","clsx","React","labelPositions","jsx","React","clsx","clsx","isValidElement","useId","useMemo","useState","jsx","jsxs","ALLOWED_CHILDREN","useId","useState","useMemo","restDataAttrs","isValidElement","clsx","React","jsx","roundness","useEffect","useState","jsx","jsxs","roundness","useState","useEffect","jsx","jsxs"]}
|