@kushagradhawan/kookie-ui 0.3.12 → 0.3.13
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/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +2 -2
- package/dist/cjs/components/theme-panel.d.ts.map +1 -1
- package/dist/cjs/components/theme-panel.js +3 -3
- package/dist/cjs/components/theme-panel.js.map +2 -2
- package/dist/cjs/components/virtual-menu.js +1 -1
- package/dist/cjs/components/virtual-menu.js.map +2 -2
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/components/index.js +5 -5
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/theme-panel.d.ts.map +1 -1
- package/dist/esm/components/theme-panel.js +3 -3
- package/dist/esm/components/theme-panel.js.map +2 -2
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/components/virtual-menu.js.map +2 -2
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +2 -2
- package/package.json +1 -1
- package/schemas/base-button.json +1 -1
- package/schemas/button.json +1 -1
- package/schemas/icon-button.json +1 -1
- package/schemas/index.json +6 -6
- package/schemas/toggle-button.json +1 -1
- package/schemas/toggle-icon-button.json +1 -1
- package/src/components/theme-panel.tsx +3 -1
- package/src/components/virtual-menu.tsx +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/theme-panel.tsx", "../../../src/components/accessible-icon.tsx", "../../../src/components/box.tsx", "../../../src/components/slot.tsx", "../../../src/props/as-child.prop.ts", "../../../src/components/box.props.tsx", "../../../src/helpers/extract-props.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/props/padding.props.ts", "../../../src/props/height.props.ts", "../../../src/props/width.props.ts", "../../../src/props/layout.props.ts", "../../../src/props/margin.props.ts", "../../../src/components/button.tsx", "../../../src/components/_internal/base-button.tsx", "../../../src/props/color.prop.ts", "../../../src/props/high-contrast.prop.ts", "../../../src/props/radius.prop.ts", "../../../src/components/_internal/base-button.props.ts", "../../../src/components/flex.tsx", "../../../src/props/gap.props.ts", "../../../src/components/flex.props.tsx", "../../../src/components/spinner.tsx", "../../../src/components/spinner.props.tsx", "../../../src/components/visually-hidden.tsx", "../../../src/helpers/map-prop-values.ts", "../../../src/components/tooltip.tsx", "../../../src/components/text.tsx", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-align.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/font-family.prop.ts", "../../../src/props/weight.prop.ts", "../../../src/components/text.props.tsx", "../../../src/components/theme.tsx", "../../../src/helpers/get-matching-gray-color.ts", "../../../src/components/theme.props.tsx", "../../../src/components/tooltip.props.tsx", "../../../src/hooks/use-tooltip-wrapper.ts", "../../../src/components/grid.tsx", "../../../src/components/grid.props.tsx", "../../../src/components/heading.tsx", "../../../src/components/heading.props.tsx", "../../../src/components/icon-button.tsx", "../../../src/components/kbd.tsx", "../../../src/components/kbd.props.tsx", "../../../src/components/popover.tsx", "../../../src/helpers/require-react-element.ts", "../../../src/components/popover.props.tsx", "../../../src/components/scroll-area.tsx", "../../../src/components/scroll-area.props.tsx", "../../../src/helpers/extract-margin-props.ts", "../../../src/helpers/get-margin-styles.ts", "../../../src/helpers/get-subtree.ts", "../../../src/helpers/inert.ts"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport { useCallbackRef } from 'radix-ui/internal';\nimport { flushSync } from 'react-dom';\n\nimport { AccessibleIcon } from './accessible-icon.js';\nimport { Box } from './box.js';\nimport { Button } from './button.js';\nimport { Flex } from './flex.js';\nimport { Grid } from './grid.js';\nimport { Heading } from './heading.js';\nimport { IconButton } from './icon-button.js';\nimport { Kbd } from './kbd.js';\nimport * as Popover from './popover.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Text } from './text.js';\nimport { Tooltip } from './tooltip.js';\nimport { Theme, useThemeContext, type ThemeContextValue } from './theme.js';\nimport { inert } from '../helpers/inert.js';\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ninterface ThemePanelProps extends Omit<ThemePanelImplProps, keyof ThemePanelImplPrivateProps> {\n onAppearanceChange?: (value: 'light' | 'dark') => void;\n defaultOpen?: boolean;\n}\n\nconst keyboardInputElement = `\n [contenteditable],\n [role=\"combobox\"],\n [role=\"listbox\"],\n [role=\"menu\"],\n input:not([type=\"radio\"], [type=\"checkbox\"]),\n select,\n textarea\n `;\n\nconst ThemePanel = React.forwardRef<ThemePanelImplElement, ThemePanelProps>(\n ({ defaultOpen = true, ...props }, forwardedRef) => {\n const [open, setOpen] = React.useState(defaultOpen);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const previouslyFocusedElementRef = React.useRef<HTMLElement | null>(null);\n\n // quickly show/hide using \"T\" keypress\n React.useEffect(() => {\n function handleKeydown(event: KeyboardEvent) {\n const isModifierActive = event.altKey || event.ctrlKey || event.shiftKey || event.metaKey;\n const isKeyboardInputActive = document.activeElement?.closest(keyboardInputElement);\n const isKeyT = event.key?.toUpperCase() === 'T' && !isModifierActive;\n if (isKeyT && !isKeyboardInputActive) {\n let isOpen = false;\n flushSync(() => {\n setOpen((open) => {\n isOpen = !open;\n return isOpen;\n });\n });\n if (isOpen) {\n previouslyFocusedElementRef.current = document.activeElement as HTMLElement | null;\n triggerRef.current?.focus();\n } else {\n previouslyFocusedElementRef.current?.focus();\n }\n }\n }\n document.addEventListener('keydown', handleKeydown);\n return () => document.removeEventListener('keydown', handleKeydown);\n }, []);\n\n return (\n <ThemePanelImpl\n {...props}\n ref={forwardedRef}\n triggerRef={triggerRef}\n open={open}\n shortcut={\n <Tooltip content=\"Press T to show/hide the Theme Panel\" side=\"bottom\" sideOffset={6}>\n <Kbd asChild size=\"3\" tabIndex={0} className=\"rt-ThemePanelShortcut\">\n <button\n type=\"button\"\n onClick={() => setOpen((open) => !open)}\n ref={triggerRef}\n aria-label=\"Toggle the Theme Panel\"\n >\n T\n </button>\n </Kbd>\n </Tooltip>\n }\n />\n );\n },\n);\nThemePanel.displayName = 'ThemePanel';\n\ntype ThemePanelImplElement = React.ElementRef<'div'>;\ninterface ThemePanelImplPrivateProps {\n open: boolean;\n shortcut: React.ReactNode;\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n}\ninterface ThemePanelImplProps\n extends ComponentPropsWithout<'div', RemovedProps>, ThemePanelImplPrivateProps {\n onAppearanceChange?: (value: 'light' | 'dark') => void;\n}\nconst ThemePanelImpl = React.forwardRef<ThemePanelImplElement, ThemePanelImplProps>(\n (props, forwardedRef) => {\n const { open, onAppearanceChange, shortcut, triggerRef, ...panelProps } = props;\n const themeContext = useThemeContext();\n return (\n <Theme asChild radius=\"medium\" scaling=\"100%\">\n <Flex\n direction=\"column\"\n position=\"fixed\"\n top=\"0\"\n right=\"0\"\n mr={{ initial: '2', sm: '4' }}\n mt={{ initial: '2', sm: '4' }}\n width={{ initial: '360px' }}\n maxHeight={{\n initial: 'calc(100svh - var(--space-2) - var(--space-2))',\n sm: 'calc(100svh - var(--space-4) - var(--space-4))',\n }}\n maxWidth={{\n initial: 'calc(100svw - var(--space-2) - var(--space-2))',\n sm: 'calc(100svw - var(--space-4) - var(--space-4))',\n }}\n inert={open ? undefined : inert}\n {...panelProps}\n ref={forwardedRef}\n style={{\n zIndex: 999999999,\n overflow: 'hidden',\n borderRadius: 'var(--radius-4)',\n backgroundColor: 'var(--color-panel-solid)',\n transformOrigin: 'top center',\n transitionProperty: 'transform, box-shadow',\n transitionDuration: '200ms',\n transitionTimingFunction: open ? 'ease-out' : 'ease-in',\n transform: open ? 'none' : 'translateX(105%)',\n boxShadow: open ? 'var(--shadow-5)' : 'var(--shadow-2)',\n ...props.style,\n }}\n >\n <ScrollArea>\n <Box flexGrow=\"1\" p={{ initial: '4', xs: '5' }} position=\"relative\">\n {!!shortcut && (\n <Box position=\"absolute\" top=\"0\" right=\"0\" m=\"2\">\n {shortcut}\n </Box>\n )}\n <ThemePanelContent onAppearanceChange={onAppearanceChange} context={themeContext} />\n </Box>\n </ScrollArea>\n </Flex>\n </Theme>\n );\n },\n);\nThemePanelImpl.displayName = 'ThemePanelImpl';\n\ntype ThemePanelContentElement = React.ElementRef<typeof Flex>;\ninterface ThemePanelContentProps extends ComponentPropsWithout<\n typeof Flex,\n RemovedProps | 'direction'\n> {\n onAppearanceChange?: (value: 'light' | 'dark') => void;\n context?: ThemeContextValue;\n}\nconst ThemePanelContent = React.forwardRef<ThemePanelContentElement, ThemePanelContentProps>(\n (props, forwardedRef) => {\n const {\n onAppearanceChange: onAppearanceChangeProp,\n context: contextProp,\n ...contentProps\n } = props;\n\n const themeContext = useThemeContext();\n\n const {\n appearance,\n onAppearanceChange,\n accentColor,\n onAccentColorChange,\n grayColor,\n onGrayColorChange,\n panelBackground,\n onPanelBackgroundChange,\n radius,\n onRadiusChange,\n scaling,\n onScalingChange,\n } = contextProp ?? themeContext;\n\n const [resolvedAppearance, setResolvedAppearance] = React.useState<'light' | 'dark' | null>(\n appearance === 'inherit' ? null : appearance,\n );\n const hasOnAppearanceChangeProp = onAppearanceChangeProp !== undefined;\n const handleAppearanceChangeProp = useCallbackRef(onAppearanceChangeProp);\n const handleAppearanceChange = React.useCallback(\n (value: 'light' | 'dark') => {\n const cleanup = disableAnimation();\n\n if (appearance !== 'inherit') {\n onAppearanceChange(value);\n return;\n }\n\n if (hasOnAppearanceChangeProp) {\n handleAppearanceChangeProp(value);\n } else {\n setResolvedAppearance(value);\n updateRootAppearanceClass(value);\n }\n\n cleanup();\n },\n [appearance, onAppearanceChange, hasOnAppearanceChangeProp, handleAppearanceChangeProp],\n );\n\n const autoMatchedGray = getMatchingGrayColor(accentColor);\n const resolvedGrayColor = grayColor === 'auto' ? autoMatchedGray : grayColor;\n\n const [copyState, setCopyState] = React.useState<'idle' | 'copying' | 'copied'>('idle');\n async function handleCopyThemeConfig() {\n const theme = {\n appearance: appearance === themePropDefs.appearance.default ? undefined : appearance,\n accentColor: accentColor === themePropDefs.accentColor.default ? undefined : accentColor,\n grayColor: grayColor === themePropDefs.grayColor.default ? undefined : grayColor,\n panelBackground:\n panelBackground === themePropDefs.panelBackground.default ? undefined : panelBackground,\n radius: radius === themePropDefs.radius.default ? undefined : radius,\n scaling: scaling === themePropDefs.scaling.default ? undefined : scaling,\n } satisfies GetPropDefTypes<typeof themePropDefs>;\n\n const props = Object.keys(theme)\n .filter((key) => theme[key as keyof typeof theme] !== undefined)\n .map((key) => `${key}=\"${theme[key as keyof typeof theme]}\"`)\n .join(' ');\n\n const textToCopy = props ? `<Theme ${props}>` : '<Theme>';\n\n setCopyState('copying');\n await navigator.clipboard.writeText(textToCopy);\n setCopyState('copied');\n setTimeout(() => setCopyState('idle'), 2000);\n }\n\n // quickly toggle appearance using \"D\" keypress\n React.useEffect(() => {\n function handleKeydown(event: KeyboardEvent) {\n const isModifierActive = event.altKey || event.ctrlKey || event.shiftKey || event.metaKey;\n const isKeyboardInputActive = document.activeElement?.closest(keyboardInputElement);\n const isKeyD = event.key?.toUpperCase() === 'D' && !isModifierActive;\n if (isKeyD && !isKeyboardInputActive) {\n handleAppearanceChange(resolvedAppearance === 'light' ? 'dark' : 'light');\n }\n }\n document.addEventListener('keydown', handleKeydown);\n return () => document.removeEventListener('keydown', handleKeydown);\n }, [handleAppearanceChange, resolvedAppearance]);\n\n React.useEffect(() => {\n const root = document.documentElement;\n const body = document.body;\n\n function update() {\n const hasDarkClass =\n root.classList.contains('dark') ||\n root.classList.contains('dark-theme') ||\n body.classList.contains('dark') ||\n body.classList.contains('dark-theme');\n\n if (appearance === 'inherit') {\n setResolvedAppearance(hasDarkClass ? 'dark' : 'light');\n } else {\n setResolvedAppearance(appearance);\n }\n }\n\n const classNameObserver = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n if (mutation.attributeName === 'class') {\n update();\n }\n });\n });\n\n update();\n\n // Observe <html> and <body> for `class` changes only when the appearance is inherited from them\n if (appearance === 'inherit') {\n classNameObserver.observe(root, { attributes: true });\n classNameObserver.observe(body, { attributes: true });\n }\n\n return () => classNameObserver.disconnect();\n }, [appearance]);\n\n return (\n <Flex direction=\"column\" gap=\"5\" {...contentProps} ref={forwardedRef}>\n <Heading size={{ initial: '3', sm: '5' }} trim=\"both\" as=\"h2\">\n Theme\n </Heading>\n <Flex direction=\"column\" gap=\"5\">\n {/* Accent color */}\n <ThemePanelSection>\n <ThemePanelHeading id=\"accent-color-title\">Accent color</ThemePanelHeading>\n <Flex wrap=\"wrap\" gap=\"2\" role=\"group\" aria-labelledby=\"accent-color-title\">\n {themePropDefs.accentColor.values.map((color) => (\n <Box asChild key={color}>\n <label\n className=\"rt-ThemePanelSwatch\"\n style={{ backgroundColor: `var(--${color}-9)` }}\n >\n <Tooltip\n content={`${upperFirst(color)}${\n accentColor === 'gray' && resolvedGrayColor !== 'gray'\n ? ` (${upperFirst(resolvedGrayColor)})`\n : ''\n }`}\n >\n <input\n className=\"rt-ThemePanelSwatchInput\"\n type=\"radio\"\n name=\"accentColor\"\n value={color}\n checked={accentColor === color}\n onChange={(event) =>\n onAccentColorChange(event.target.value as typeof accentColor)\n }\n />\n </Tooltip>\n </label>\n </Box>\n ))}\n </Flex>\n </ThemePanelSection>\n\n {/* Gray color */}\n <ThemePanelSection>\n <ThemePanelHeading id=\"gray-color-title\">Gray color</ThemePanelHeading>\n <Flex wrap=\"wrap\" gap=\"2\" role=\"group\" aria-labelledby=\"gray-color-title\">\n {themePropDefs.grayColor.values.map((gray) => (\n <Flex key={gray} asChild align=\"center\" justify=\"center\">\n <label\n className=\"rt-ThemePanelSwatch\"\n style={{\n backgroundColor:\n gray === 'auto'\n ? `var(--${autoMatchedGray}-9)`\n : gray === 'gray'\n ? 'var(--gray-9)'\n : `var(--${gray}-9)`,\n // we override --gray so pure gray doesn't exist anymore\n // recover something as close as possible by desaturating\n filter: gray === 'gray' ? 'saturate(0)' : undefined,\n }}\n >\n <Tooltip\n content={`${upperFirst(gray)}${\n gray === 'auto' ? ` (${upperFirst(autoMatchedGray)})` : ''\n }`}\n >\n <input\n className=\"rt-ThemePanelSwatchInput\"\n type=\"radio\"\n name=\"grayColor\"\n value={gray}\n checked={grayColor === gray}\n onChange={(event) =>\n onGrayColorChange(event.target.value as typeof grayColor)\n }\n />\n </Tooltip>\n </label>\n </Flex>\n ))}\n </Flex>\n </ThemePanelSection>\n\n {/* Appearance */}\n <ThemePanelSection>\n <ThemePanelHeading id=\"appearance-title\">Appearance</ThemePanelHeading>\n <Grid columns=\"2\" gap=\"2\" role=\"group\" aria-labelledby=\"appearance-title\">\n {(['light', 'dark'] as const).map((value) => (\n <label key={value} className=\"rt-ThemePanelRadioCard\">\n <input\n className=\"rt-ThemePanelRadioCardInput\"\n type=\"radio\"\n name=\"appearance\"\n value={value}\n checked={resolvedAppearance === value}\n onChange={(event) =>\n handleAppearanceChange(event.target.value as 'light' | 'dark')\n }\n />\n <Flex align=\"center\" justify=\"center\" height=\"32px\" gap=\"2\">\n {value === 'light' ? (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ margin: '0 -1px' }}\n >\n <path\n d=\"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n ) : (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ margin: '0 -1px' }}\n >\n <path\n d=\"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n )}\n <Text size=\"1\" weight=\"medium\">\n {upperFirst(value)}\n </Text>\n </Flex>\n </label>\n ))}\n </Grid>\n </ThemePanelSection>\n\n {/* Radius */}\n <ThemePanelSection>\n <ThemePanelHeading id=\"radius-title\">Radius</ThemePanelHeading>\n <Flex gap=\"2\" role=\"group\" aria-labelledby=\"radius-title\" wrap=\"wrap\">\n {themePropDefs.radius.values.map((value) => (\n <Flex key={value} direction=\"column\" align=\"center\">\n <label className=\"rt-ThemePanelRadioCard\">\n <input\n className=\"rt-ThemePanelRadioCardInput\"\n type=\"radio\"\n name=\"radius\"\n id={`theme-panel-radius-${value}`}\n value={value}\n checked={radius === value}\n onChange={(event) => onRadiusChange(event.target.value as typeof radius)}\n />\n <Theme asChild radius={value}>\n <Box\n m=\"3\"\n width={{ initial: '24px', sm: '32px' }}\n height={{ initial: '24px', sm: '32px' }}\n style={{\n borderTopLeftRadius: value === 'full' ? '80%' : 'var(--radius-5)',\n backgroundImage:\n 'linear-gradient(to bottom right, var(--accent-3), var(--accent-4))',\n borderTop: '2px solid var(--accent-a8)',\n borderLeft: '2px solid var(--accent-a8)',\n }}\n />\n </Theme>\n </label>\n <Box asChild pt=\"2\">\n <Text asChild size=\"1\" color=\"gray\">\n <label htmlFor={`theme-panel-radius-${value}`}>{upperFirst(value)}</label>\n </Text>\n </Box>\n </Flex>\n ))}\n </Flex>\n </ThemePanelSection>\n\n {/* Scaling */}\n <ThemePanelSection>\n <ThemePanelHeading id=\"scaling-title\">Scaling</ThemePanelHeading>\n <Grid\n columns={{\n initial: 'repeat(3, 1fr)',\n sm: '5',\n }}\n gap=\"2\"\n role=\"group\"\n aria-labelledby=\"scaling-title\"\n >\n {themePropDefs.scaling.values.map((value) => (\n <label key={value} className=\"rt-ThemePanelRadioCard\">\n <input\n className=\"rt-ThemePanelRadioCardInput\"\n type=\"radio\"\n name=\"scaling\"\n value={value}\n checked={scaling === value}\n onChange={(event) => onScalingChange(event.target.value as typeof scaling)}\n />\n\n <Flex align=\"center\" justify=\"center\" height=\"32px\">\n <Theme asChild scaling={value}>\n <Flex align=\"center\" justify=\"center\">\n <Text size=\"1\" weight=\"medium\">\n {upperFirst(value)}\n </Text>\n </Flex>\n </Theme>\n </Flex>\n </label>\n ))}\n </Grid>\n </ThemePanelSection>\n\n {/* Panel background */}\n <ThemePanelSection>\n <Flex align=\"center\" gap=\"2\">\n <ThemePanelHeading id=\"panel-background-title\">Panel background</ThemePanelHeading>\n <Popover.Root>\n <Popover.Trigger>\n <IconButton size=\"1\" variant=\"ghost\" color=\"gray\">\n <AccessibleIcon label=\"Learn more about panel background options\">\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n </AccessibleIcon>\n </IconButton>\n </Popover.Trigger>\n <Popover.Content\n size=\"1\"\n width=\"220px\"\n maxWidth=\"90svw\"\n minWidth=\"0\"\n side=\"top\"\n align=\"center\"\n >\n <Text as=\"p\" size=\"1\">\n Whether Card and Table panels are translucent, showing some of the background\n behind them.\n </Text>\n </Popover.Content>\n </Popover.Root>\n </Flex>\n <Grid\n columns={{ initial: '1', sm: '2' }}\n rows={{ initial: '2', sm: '1' }}\n gap=\"2\"\n role=\"group\"\n aria-labelledby=\"panel-background-title\"\n >\n {themePropDefs.panelBackground.values.map((value) => (\n <label key={value} className=\"rt-ThemePanelRadioCard\">\n <input\n className=\"rt-ThemePanelRadioCardInput\"\n type=\"radio\"\n name=\"panelBackground\"\n value={value}\n checked={panelBackground === value}\n onChange={(event) =>\n onPanelBackgroundChange(event.target.value as typeof panelBackground)\n }\n />\n <Flex align=\"center\" justify=\"center\" height=\"32px\" gap=\"2\">\n {value === 'solid' ? (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ margin: '0 -2px' }}\n >\n <path\n d=\"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n ) : (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ margin: '0 -2px' }}\n >\n <path\n opacity=\".05\"\n d=\"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".1\"\n d=\"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".15\"\n d=\"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".2\"\n d=\"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".25\"\n d=\"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".3\"\n d=\"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".35\"\n d=\"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".4\"\n d=\"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".45\"\n d=\"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".5\"\n d=\"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n d=\"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n )}\n <Text size=\"1\" weight=\"medium\">\n {upperFirst(value)}\n </Text>\n </Flex>\n </label>\n ))}\n </Grid>\n </ThemePanelSection>\n </Flex>\n <Button style={{ width: '100%' }} onClick={handleCopyThemeConfig}>\n {copyState === 'copied' ? 'Copied' : 'Copy Theme'}\n </Button>\n </Flex>\n );\n },\n);\nThemePanelContent.displayName = 'ThemePanelContent';\n\nfunction ThemePanelSection(\n props: Omit<React.ComponentPropsWithoutRef<typeof Flex>, 'asChild' | 'direction' | 'gap'>,\n) {\n return (\n <Flex direction=\"column\" gap=\"3\" asChild {...props}>\n <section>{props.children}</section>\n </Flex>\n );\n}\n\nfunction ThemePanelHeading(props: React.ComponentPropsWithoutRef<typeof Heading>) {\n return <Heading as=\"h3\" size={{ initial: '1', sm: '2' }} {...props} />;\n}\n\n// https://github.com/pacocoursey/next-themes/blob/main/packages/next-themes/src/index.tsx#L285\nfunction disableAnimation() {\n const css = document.createElement('style');\n css.appendChild(\n document.createTextNode(\n `*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`,\n ),\n );\n document.head.appendChild(css);\n\n return () => {\n // Force restyle\n (() => window.getComputedStyle(document.body))();\n\n // Wait for next tick before removing\n setTimeout(() => {\n document.head.removeChild(css);\n }, 1);\n };\n}\n\nfunction upperFirst(string: string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nfunction updateRootAppearanceClass(appearance: 'light' | 'dark') {\n const root = document.documentElement;\n const hasLightTheme = root.classList.contains('light-theme');\n const hasDarkTheme = root.classList.contains('dark-theme');\n const hasLight = root.classList.contains('light');\n const hasDark = root.classList.contains('dark');\n\n if (hasLightTheme || hasDarkTheme) {\n root.classList.remove('light-theme', 'dark-theme');\n root.style.colorScheme = appearance;\n root.classList.add(`${appearance}-theme`);\n }\n\n if (hasLight || hasDark) {\n root.classList.remove('light', 'dark');\n root.style.colorScheme = appearance;\n root.classList.add(appearance);\n }\n\n if (!hasLightTheme && !hasDarkTheme && !hasLight && !hasDark) {\n root.style.colorScheme = appearance;\n root.classList.add(appearance);\n }\n}\n\nexport { ThemePanel, ThemePanelContent };\nexport type { ThemePanelProps, ThemePanelContentProps };\n", "import { AccessibleIcon as AccessibleIconPrimitive } from 'radix-ui';\nexport const AccessibleIcon = AccessibleIconPrimitive.Root;\nexport type AccessibleIconProps = AccessibleIconPrimitive.AccessibleIconProps;\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Slot } from './slot.js';\nimport { boxPropDefs } from './box.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { BoxOwnProps } from './box.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype BoxElement = React.ElementRef<'div'>;\ninterface CommonBoxProps extends MarginProps, LayoutProps, BoxOwnProps {}\ntype BoxDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype BoxSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype BoxProps = CommonBoxProps & (BoxSpanProps | BoxDivProps);\n\nconst Box = React.forwardRef<BoxElement, BoxProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...boxProps\n } = extractProps(props, boxPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...boxProps} ref={forwardedRef} className={classNames('rt-Box', className)} />;\n});\nBox.displayName = 'Box';\n\nexport { Box };\nexport type { BoxProps };\n", "import { Slot as SlotPrimitive } from 'radix-ui';\nexport const Root = SlotPrimitive.Root;\nexport const Slot = SlotPrimitive.Root;\nexport const Slottable: typeof SlotPrimitive.Slottable = SlotPrimitive.Slottable;\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst as = ['div', 'span'] as const;\nconst displayValues = ['none', 'inline', 'inline-block', 'block', 'contents'] as const;\n\nconst boxPropDefs = {\n /**\n * Controls whether to render **div** or **span**\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n as: { type: 'enum', values: as, default: 'div' },\n ...asChildPropDef,\n /**\n * Sets the CSS **display** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * display=\"inline-block\"\n * display={{ sm: 'none', lg: 'block' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/display\n */\n display: {\n type: 'enum',\n className: 'rt-r-display',\n values: displayValues,\n responsive: true,\n },\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n display: PropDef<(typeof displayValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype BoxOwnProps = GetPropDefTypes<typeof boxPropDefs & typeof asChildPropDef>;\n\nexport { boxPropDefs };\nexport type { BoxOwnProps };\n", "import classNames from 'classnames';\n\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef>\n ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T]\n : never;\n\nfunction mergePropDefs<T extends Record<string, PropDef>[]>(...args: T): Record<string, PropDef> {\n return Object.assign({}, ...args);\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<\n P extends { className?: string; style?: React.CSSProperties; [key: string]: any },\n T extends Record<string, PropDef>[]\n>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n let className: string | undefined;\n let style: ReturnType<typeof mergeStyles>;\n const extractedProps = { ...props };\n const allPropDefs = mergePropDefs(...propDefs);\n\n for (const key in allPropDefs) {\n let value = extractedProps[key];\n const propDef = allPropDefs[key];\n\n // Apply prop def defaults\n if (propDef.default !== undefined && value === undefined) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.type === 'enum') {\n const values = [propDef.default, ...propDef.values];\n\n if (!values.includes(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n }\n\n // Apply the value with defaults\n (extractedProps as Record<string, any>)[key] = value;\n\n if ('className' in propDef && propDef.className) {\n delete extractedProps[key];\n\n const isResponsivePropDef = 'responsive' in propDef;\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!value || (isResponsiveObject(value) && !isResponsivePropDef)) {\n continue;\n }\n\n if (isResponsiveObject(value)) {\n // Apply prop def defaults to the `initial` breakpoint\n if (propDef.default !== undefined && value.initial === undefined) {\n value.initial = propDef.default;\n }\n\n // Apply the default value to the `initial` breakpoint when it is not a valid enum value\n if (propDef.type === 'enum') {\n const values = [propDef.default, ...propDef.values];\n\n if (!values.includes(value.initial)) {\n value.initial = propDef.default;\n }\n }\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className,\n propValues: propDef.values,\n parseValue: propDef.parseValue,\n });\n\n className = classNames(className, propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const propDefValues = propDef.type === 'string' ? [] : propDef.values;\n\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className,\n customProperties: propDef.customProperties,\n propValues: propDefValues,\n parseValue: propDef.parseValue,\n value,\n });\n\n style = mergeStyles(style, propCustomProperties);\n className = classNames(className, propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean' && value) {\n // TODO handle responsive boolean props\n className = classNames(className, propDef.className);\n continue;\n }\n }\n }\n\n extractedProps.className = classNames(className, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps;\n}\n\nexport { extractProps };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({\n allowArbitraryValues,\n value,\n className,\n propValues,\n parseValue = (value) => value,\n}: GetResponsiveClassNamesOptions): string | undefined {\n const classNames: string[] = [];\n\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string' && propValues.includes(value)) {\n return getBaseClassName(className, value, parseValue);\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (propValues.includes(value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.join(' ');\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(\n className: string,\n value: string,\n parseValue: (value: string) => string | undefined\n): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({\n customProperties,\n value,\n propValues,\n parseValue = (value) => value,\n}: GetResponsiveCustomPropertiesOptions) {\n let styles: Record<string, string | undefined> = {};\n\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && propValues.includes(value))) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n styles = Object.fromEntries(customProperties.map((prop) => [prop, value]));\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (propValues.includes(value)) {\n continue;\n }\n\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = value;\n }\n }\n }\n\n for (const key in styles) {\n const value = styles[key];\n if (value !== undefined) {\n styles[key] = parseValue(value);\n }\n }\n\n return styles;\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst paddingValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst paddingPropDefs = {\n /**\n * Sets the CSS **padding** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * p=\"4\"\n * p=\"100px\"\n * p={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n */\n p: {\n type: 'enum | string',\n className: 'rt-r-p',\n customProperties: ['--p'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** and **padding-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * px=\"4\"\n * px=\"100px\"\n * px={{ sm: '6', lg: '9' }}\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 className: 'rt-r-px',\n customProperties: ['--pl', '--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** and **padding-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * py=\"4\"\n * py=\"100px\"\n * py={{ sm: '6', lg: '9' }}\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 className: 'rt-r-py',\n customProperties: ['--pt', '--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pt=\"4\"\n * pt=\"100px\"\n * pt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n */\n pt: {\n type: 'enum | string',\n className: 'rt-r-pt',\n customProperties: ['--pt'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pr=\"4\"\n * pr=\"100px\"\n * pr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n pr: {\n type: 'enum | string',\n className: 'rt-r-pr',\n customProperties: ['--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pb=\"4\"\n * pb=\"100px\"\n * pb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n pb: {\n type: 'enum | string',\n className: 'rt-r-pb',\n customProperties: ['--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pl=\"4\"\n * pl=\"100px\"\n * pl={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n */\n pl: {\n type: 'enum | string',\n className: 'rt-r-pl',\n customProperties: ['--pl'],\n values: paddingValues,\n responsive: true,\n },\n} satisfies {\n p: PropDef<(typeof paddingValues)[number]>;\n px: PropDef<(typeof paddingValues)[number]>;\n py: PropDef<(typeof paddingValues)[number]>;\n pt: PropDef<(typeof paddingValues)[number]>;\n pr: PropDef<(typeof paddingValues)[number]>;\n pb: PropDef<(typeof paddingValues)[number]>;\n pl: PropDef<(typeof paddingValues)[number]>;\n};\n\ntype PaddingProps = GetPropDefTypes<typeof paddingPropDefs>;\n\nexport { paddingPropDefs };\nexport type { PaddingProps };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst heightPropDefs = {\n /**\n * Sets the CSS **height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * height=\"100px\"\n * height={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/height\n */\n height: {\n type: 'string',\n className: 'rt-r-h',\n customProperties: ['--height'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minHeight=\"100px\"\n * minHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-height\n */\n minHeight: {\n type: 'string',\n className: 'rt-r-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxHeight=\"100px\"\n * maxHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-height\n */\n maxHeight: {\n type: 'string',\n className: 'rt-r-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst widthPropDefs = {\n /**\n * Sets the CSS **width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * width=\"100px\"\n * width={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/width\n */\n width: {\n type: 'string',\n className: 'rt-r-w',\n customProperties: ['--width'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minWidth=\"100px\"\n * minWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-width\n */\n minWidth: {\n type: 'string',\n className: 'rt-r-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxWidth=\"100px\"\n * maxWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n */\n maxWidth: {\n type: 'string',\n className: 'rt-r-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n", "import { paddingPropDefs } from './padding.props.js';\nimport { heightPropDefs } from './height.props.js';\nimport { widthPropDefs } from './width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst overflowValues = ['visible', 'hidden', 'clip', 'scroll', 'auto'] as const;\nconst positionValues = ['static', 'relative', 'absolute', 'fixed', 'sticky'] as const;\n// prettier-ignore\nconst positionEdgeValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9'] as const;\nconst flexShrinkValues = ['0', '1'] as const;\nconst flexGrowValues = ['0', '1'] as const;\nconst alignSelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifySelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\n\nconst layoutPropDefs = {\n ...paddingPropDefs,\n ...widthPropDefs,\n ...heightPropDefs,\n /**\n * Sets the CSS **position** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * position=\"absolute\"\n * position={{ sm: 'absolute', lg: 'sticky' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/position\n */\n position: {\n type: 'enum',\n className: 'rt-r-position',\n values: positionValues,\n responsive: true,\n },\n /**\n * Sets the CSS **inset** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * inset=\"4\"\n * inset=\"100px\"\n * inset={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/inset\n */\n inset: {\n type: 'enum | string',\n className: 'rt-r-inset',\n customProperties: ['--inset'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * top=\"4\"\n * top=\"100px\"\n * top={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/top\n */\n top: {\n type: 'enum | string',\n className: 'rt-r-top',\n customProperties: ['--top'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * right=\"4\"\n * right=\"100px\"\n * right={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/right\n */\n right: {\n type: 'enum | string',\n className: 'rt-r-right',\n customProperties: ['--right'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * bottom=\"4\"\n * bottom=\"100px\"\n * bottom={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/bottom\n */\n bottom: {\n type: 'enum | string',\n className: 'rt-r-bottom',\n customProperties: ['--bottom'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * left=\"4\"\n * left=\"100px\"\n * left={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/left\n */\n left: {\n type: 'enum | string',\n className: 'rt-r-left',\n customProperties: ['--left'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflow=\"hidden\"\n * overflow={{ sm: 'hidden', lg: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflow: {\n type: 'enum',\n className: 'rt-r-overflow',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-x** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowX=\"hidden\"\n * overflowX={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowX: {\n type: 'enum',\n className: 'rt-r-ox',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-y** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowY=\"hidden\"\n * overflowY={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowY: {\n type: 'enum',\n className: 'rt-r-oy',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-basis** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexBasis=\"0\"\n * flexBasis=\"100%\"\n * flexBasis={{ sm: '200px', lg: 'auto' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis\n */\n flexBasis: {\n type: 'string',\n className: 'rt-r-fb',\n customProperties: ['--flex-basis'],\n responsive: true,\n },\n /**\n * Sets the CSS **flex-shrink** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexShrink=\"0\"\n * flexShrink=\"1\"\n * flexShrink={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink\n */\n flexShrink: {\n type: 'enum | string',\n className: 'rt-r-fs',\n customProperties: ['--flex-shrink'],\n values: flexShrinkValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-grow** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexGrow=\"0\"\n * flexGrow=\"1\"\n * flexGrow={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow\n */\n flexGrow: {\n type: 'enum | string',\n className: 'rt-r-fg',\n customProperties: ['--flex-grow'],\n values: flexGrowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-area** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridArea=\"header\"\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area\n */\n gridArea: {\n type: 'string',\n className: 'rt-r-ga',\n customProperties: ['--grid-area'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumn=\"1\"\n * gridColumn=\"1 / -1\"\n * gridColumn={{ sm: '1 / 3', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column\n */\n gridColumn: {\n type: 'string',\n className: 'rt-r-gc',\n customProperties: ['--grid-column'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnStart=\"1\"\n * gridColumnStart=\"auto\"\n * gridColumnStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start\n */\n gridColumnStart: {\n type: 'string',\n className: 'rt-r-gcs',\n customProperties: ['--grid-column-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnEnd=\"1\"\n * gridColumnEnd=\"auto\"\n * gridColumnEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end\n */\n gridColumnEnd: {\n type: 'string',\n className: 'rt-r-gce',\n customProperties: ['--grid-column-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRow=\"1\"\n * gridRow=\"auto\"\n * gridRow={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row\n */\n gridRow: {\n type: 'string',\n className: 'rt-r-gr',\n customProperties: ['--grid-row'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowStart=\"1\"\n * gridRowStart=\"auto\"\n * gridRowStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start\n */\n gridRowStart: {\n type: 'string',\n className: 'rt-r-grs',\n customProperties: ['--grid-row-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowEnd=\"1\"\n * gridRowEnd=\"auto\"\n * gridRowEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end\n */\n gridRowEnd: {\n type: 'string',\n className: 'rt-r-gre',\n customProperties: ['--grid-row-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **align-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * alignSelf=\"center\"\n * alignSelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-self\n */\n alignSelf: {\n type: 'enum',\n className: 'rt-r-as',\n values: alignSelfValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justifySelf=\"center\"\n * justifySelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self\n */\n justifySelf: {\n type: 'enum',\n className: 'rt-r-js',\n values: justifySelfValues,\n responsive: true,\n },\n} satisfies {\n position: PropDef<(typeof positionValues)[number]>;\n inset: PropDef<(typeof positionEdgeValues)[number]>;\n top: PropDef<(typeof positionEdgeValues)[number]>;\n right: PropDef<(typeof positionEdgeValues)[number]>;\n bottom: PropDef<(typeof positionEdgeValues)[number]>;\n left: PropDef<(typeof positionEdgeValues)[number]>;\n overflow: PropDef<(typeof overflowValues)[number]>;\n overflowX: PropDef<(typeof overflowValues)[number]>;\n overflowY: PropDef<(typeof overflowValues)[number]>;\n flexBasis: PropDef<string>;\n flexShrink: PropDef<(typeof flexShrinkValues)[number]>;\n flexGrow: PropDef<(typeof flexGrowValues)[number]>;\n gridColumn: PropDef<string>;\n gridColumnStart: PropDef<string>;\n gridColumnEnd: PropDef<string>;\n gridRow: PropDef<string>;\n gridRowStart: PropDef<string>;\n gridRowEnd: PropDef<string>;\n gridArea: PropDef<string>;\n alignSelf: PropDef<(typeof alignSelfValues)[number]>;\n justifySelf: PropDef<(typeof justifySelfValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype LayoutProps = GetPropDefTypes<\n typeof paddingPropDefs & typeof widthPropDefs & typeof heightPropDefs & typeof layoutPropDefs\n>;\n\nexport { layoutPropDefs };\nexport type { LayoutProps };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\n// prettier-ignore\nconst marginValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10', '-11', '-12'] as const;\n\nconst marginPropDefs = {\n /**\n * Sets the CSS **margin** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * m=\"4\"\n * m=\"100px\"\n * m={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-m',\n customProperties: ['--m'],\n },\n /**\n * Sets the CSS **margin-left** and **margin-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mx=\"4\"\n * mx=\"100px\"\n * mx={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-mx',\n customProperties: ['--ml', '--mr'],\n },\n /**\n * Sets the CSS **margin-top** and **margin-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * my=\"4\"\n * my=\"100px\"\n * my={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-my',\n customProperties: ['--mt', '--mb'],\n },\n /**\n * Sets the CSS **margin-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mt=\"4\"\n * mt=\"100px\"\n * mt={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-mt',\n customProperties: ['--mt'],\n },\n /**\n * Sets the CSS **margin-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mr=\"4\"\n * mr=\"100px\"\n * mr={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-mr',\n customProperties: ['--mr'],\n },\n /**\n * Sets the CSS **margin-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mb=\"4\"\n * mb=\"100px\"\n * mb={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-mb',\n customProperties: ['--mb'],\n },\n /**\n * Sets the CSS **margin-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * ml=\"4\"\n * ml=\"100px\"\n * ml={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-ml',\n customProperties: ['--ml'],\n },\n} satisfies {\n m: PropDef<(typeof marginValues)[number]>;\n mx: PropDef<(typeof marginValues)[number]>;\n my: PropDef<(typeof marginValues)[number]>;\n mt: PropDef<(typeof marginValues)[number]>;\n mr: PropDef<(typeof marginValues)[number]>;\n mb: PropDef<(typeof marginValues)[number]>;\n ml: PropDef<(typeof marginValues)[number]>;\n};\n\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport { Tooltip } from './tooltip.js';\nimport { useTooltipWrapper } from '../hooks/use-tooltip-wrapper.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\n/**\n * Styles that can be overridden for a particular interaction state\n */\ninterface ButtonOverrideStateStyles {\n color?: string;\n background?: string;\n backgroundColor?: string;\n boxShadow?: string;\n filter?: string;\n outline?: string;\n outlineOffset?: string;\n opacity?: string | number;\n}\n\n/**\n * Full set of override styles keyed by interaction state\n */\ninterface ButtonOverrideStyles {\n /** Default/idle state styles */\n normal?: ButtonOverrideStateStyles;\n /** Hover state styles */\n hover?: ButtonOverrideStateStyles;\n /** Active (mouse down) state styles */\n active?: ButtonOverrideStateStyles;\n /** Toggle pressed state styles (data-state=\"on\") */\n pressed?: ButtonOverrideStateStyles;\n /** Open state styles (e.g., when used as a trigger) */\n open?: ButtonOverrideStateStyles;\n /** Disabled state styles */\n disabled?: ButtonOverrideStateStyles;\n /** Focus-visible outline styles */\n focus?: Pick<ButtonOverrideStateStyles, 'outline' | 'outlineOffset'>;\n}\n\ntype ButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Tooltip configuration props that can be passed to Button\n * These props are forwarded to the underlying Tooltip component\n */\ninterface ButtonTooltipProps {\n /** Content to display in the tooltip on hover/focus */\n tooltip?: React.ReactNode;\n /** Side of the button where the tooltip should appear */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n /** Alignment of the tooltip relative to the button */\n tooltipAlign?: 'start' | 'center' | 'end';\n /** Delay before showing the tooltip (in milliseconds) */\n tooltipDelayDuration?: number;\n /** Whether to disable hoverable content behavior */\n tooltipDisableHoverableContent?: boolean;\n}\n\n/**\n * Core Button props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with tooltip functionality\n */\ntype ButtonOwnProps = Omit<BaseButtonProps, 'as'> &\n ButtonTooltipProps & {\n /**\n * When using variant=\"override\", provide token-based styles per state.\n * We propagate these into CSS variables consumed by the override variant.\n */\n overrideStyles?: ButtonOverrideStyles;\n };\n\n/**\n * Polymorphic Button props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype ButtonProps<C extends React.ElementType = 'button'> = ButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof ButtonOwnProps>;\n\n/**\n * Button component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype ButtonComponent = <C extends React.ElementType = 'button'>(props: ButtonProps<C> & { ref?: React.ForwardedRef<ButtonElement> }) => React.ReactElement | null;\n\n/**\n * Button component for triggering actions throughout your interface\n *\n * The Button component is the primary interactive element in the Kookie User Interface.\n * It provides six visual variants, four sizes, comprehensive color options, and built-in\n * tooltip support. The component automatically handles icon sizing, supports responsive\n * layouts, and provides accessibility compliance out of the box.\n *\n * @example\n * ```tsx\n * // Basic button\n * <Button>Click me</Button>\n *\n * // Button with variant and size\n * <Button variant=\"solid\" size=\"3\">Primary Action</Button>\n *\n * // Button with tooltip\n * <Button tooltip=\"Save your progress\">Save</Button>\n *\n * // Polymorphic button as link\n * <Button as=\"a\" href=\"/dashboard\">Go to Dashboard</Button>\n * ```\n */\nconst Button = React.forwardRef(\n (\n { className, style, tooltip, tooltipSide = 'top', tooltipAlign = 'center', tooltipDelayDuration, tooltipDisableHoverableContent, overrideStyles, ...props }: ButtonProps,\n forwardedRef: React.ForwardedRef<ButtonElement>,\n ) => {\n // Use shared tooltip wrapper hook for accessibility props\n const { tooltipId, hasTooltip, accessibilityProps: tooltipAccessibilityProps } = useTooltipWrapper(tooltip);\n\n // Create the base button element with tooltip accessibility props\n // Map overrideStyles to CSS variables consumed by the override variant rules\n const overrideVars = React.useMemo(() => {\n if (!overrideStyles) return undefined;\n const vars: Record<string, string | number> = {};\n const setVar = (key: string, value: string | number | undefined) => {\n if (value !== undefined) vars[key] = value;\n };\n const apply = (prefix: string, s?: ButtonOverrideStateStyles) => {\n if (!s) return;\n setVar(`--button-override-${prefix}color`, s.color);\n setVar(`--button-override-${prefix}background`, s.background);\n setVar(`--button-override-${prefix}background-color`, s.backgroundColor);\n setVar(`--button-override-${prefix}box-shadow`, s.boxShadow);\n setVar(`--button-override-${prefix}filter`, s.filter);\n setVar(`--button-override-${prefix}outline`, s.outline);\n setVar(`--button-override-${prefix}outline-offset`, s.outlineOffset);\n setVar(`--button-override-${prefix}opacity`, s.opacity);\n };\n\n apply('', overrideStyles.normal);\n apply('hover-', overrideStyles.hover);\n apply('active-', overrideStyles.active);\n apply('pressed-', overrideStyles.pressed);\n apply('open-', overrideStyles.open);\n apply('disabled-', overrideStyles.disabled);\n\n if (overrideStyles.focus) {\n setVar('--button-override-focus-outline', overrideStyles.focus.outline);\n setVar('--button-override-focus-outline-offset', overrideStyles.focus.outlineOffset);\n }\n\n return vars as React.CSSProperties;\n }, [overrideStyles]);\n\n // Combine override styles with user-provided styles\n const combinedStyle = React.useMemo(() => (overrideVars ? { ...overrideVars, ...style } : style), [overrideVars, style]);\n\n const button = <BaseButton {...props} {...tooltipAccessibilityProps} ref={forwardedRef} className={classNames('rt-Button', className)} style={combinedStyle} />;\n\n // If no tooltip is provided, return the button as-is for better performance\n if (!hasTooltip) {\n return button;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n // This creates a compound component that handles both button and tooltip functionality\n return (\n <Tooltip content={tooltip} side={tooltipSide} align={tooltipAlign} delayDuration={tooltipDelayDuration} disableHoverableContent={tooltipDisableHoverableContent} id={tooltipId}>\n {button}\n </Tooltip>\n );\n },\n) as ButtonComponent & { displayName?: string };\n\nButton.displayName = 'Button';\n\nexport { Button };\nexport type { ButtonProps, ButtonOverrideStyles, ButtonOverrideStateStyles };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\nimport { composeRefs } from 'radix-ui/internal';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n/**\n * Polymorphic BaseButton props that support rendering as different HTML elements\n * Uses the proper ComponentPropsWithout pattern for type safety\n * @template C - The element type to render as (defaults to 'button')\n */\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\n/**\n * BaseButton props interface that combines all available props\n */\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\n/**\n * BaseButton component that provides the core button functionality\n *\n * This is the foundational button component that handles all the complex logic\n * including loading states, accessibility, performance optimizations, and\n * polymorphic rendering. It's used by Button, IconButton, and other button\n * variants to ensure consistent behavior across the design system.\n *\n * Key features:\n * - Loading state with spinner and accessibility announcements\n * - Performance optimizations for backdrop-filter effects\n * - Comprehensive accessibility support\n * - Polymorphic rendering support\n * - Material/panel background handling\n *\n * @example\n * ```tsx\n * // Basic usage\n * <BaseButton>Click me</BaseButton>\n *\n * // With loading state\n * <BaseButton loading>Processing...</BaseButton>\n *\n * // Polymorphic rendering\n * <BaseButton as=\"a\" href=\"/link\">Link Button</BaseButton>\n * ```\n */\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n\n // Extract button-specific props from the combined props object\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n material,\n panelBackground,\n flush,\n disabled = props.loading, // Loading state automatically disables the button\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n // Show deprecation warning for panelBackground when used\n // This helps developers migrate to the new material prop\n React.useEffect(() => {\n if (props.panelBackground !== undefined) {\n console.warn('Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.');\n }\n }, [props.panelBackground]);\n\n // Material takes precedence over panelBackground for backward compatibility\n const effectiveMaterial = material ?? panelBackground;\n\n // Will-change cleanup for backdrop-filter performance optimization\n // This prevents layout thrashing when using translucent materials\n const buttonRef = React.useRef<HTMLElement>(null);\n\n // Use a ref to track current material value to avoid stale closures in setTimeout\n const materialRef = React.useRef(effectiveMaterial);\n materialRef.current = effectiveMaterial;\n\n React.useEffect(() => {\n const button = buttonRef.current;\n if (!button) return;\n\n const hasTranslucentMaterial = effectiveMaterial === 'translucent';\n\n if (hasTranslucentMaterial) {\n // Add will-change when material is translucent to optimize rendering\n button.style.setProperty('will-change', 'backdrop-filter');\n\n // Track timeout for cleanup\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n // Clean up will-change after transition completes to prevent memory leaks\n const cleanup = () => {\n const transitionDuration = getComputedStyle(button).getPropertyValue('--duration-2') || '75ms';\n const duration = parseInt(transitionDuration) || 75;\n\n timeoutId = setTimeout(() => {\n // Use ref to get current value, not stale closure value\n if (button && materialRef.current !== 'translucent') {\n button.style.setProperty('will-change', 'auto');\n }\n }, duration);\n };\n\n // Listen for material changes to clean up will-change property\n const observer = new MutationObserver(cleanup);\n observer.observe(button, { attributes: true, attributeFilter: ['data-material'] });\n\n return () => {\n if (timeoutId) clearTimeout(timeoutId);\n observer.disconnect();\n button.style.setProperty('will-change', 'auto');\n };\n } else {\n // Remove will-change when material is not translucent\n button.style.setProperty('will-change', 'auto');\n }\n }, [effectiveMaterial]);\n\n // asChild takes precedence over as prop for Radix Slot integration\n // When asChild is true, we use Slot.Root to merge props onto the child element\n // When asChild is false, we render as the specified element (or button by default)\n const Comp = asChild ? Slot.Root : (as || 'button');\n\n // Only pass disabled for elements that support it\n // This prevents invalid HTML attributes on unsupported elements\n const shouldPassDisabled = asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n // Determine if we are rendering a real <button> element so we can set a safe\n // default type. Native <button> defaults to type=\"submit\" which can cause\n // accidental form submissions. We default to type=\"button\" unless the user\n // explicitly provided a type or we're using asChild (unknown underlying node).\n const isNativeButtonElement = !asChild && (!as || as === 'button');\n const hasExplicitTypeAttribute = 'type' in (baseButtonProps as Record<string, unknown>);\n\n // Generate unique ID for loading announcements\n const loadingId = React.useId();\n const describedById = props.loading ? `${loadingId}-loading` : undefined;\n\n // Extract button text for accessibility announcements\n const buttonText = React.useMemo(() => {\n if (typeof children === 'string') return children;\n if (React.isValidElement(children) && typeof (children.props as any)?.children === 'string') {\n return (children.props as any).children;\n }\n return 'button';\n }, [children]);\n\n // Enhanced accessibility props for loading state\n // These ensure screen readers announce the loading state properly\n const accessibilityProps = React.useMemo(() => {\n if (props.loading) {\n return {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'aria-describedby': describedById,\n 'aria-label': `${buttonText} (loading)`,\n };\n }\n return {};\n }, [props.loading, describedById, buttonText]);\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n data-material={effectiveMaterial}\n data-panel-background={effectiveMaterial}\n data-flush={flush ? 'true' : undefined}\n {...baseButtonProps}\n {...accessibilityProps}\n ref={composeRefs(buttonRef, forwardedRef)}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n {...(isNativeButtonElement && !hasExplicitTypeAttribute ? { type: 'button' } : {})}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n\n {/* Enhanced accessibility for loading state */}\n <VisuallyHidden>\n <span id={describedById}>{buttonText} is loading, please wait...</span>\n {children}\n </VisuallyHidden>\n\n {/* Centered spinner overlay during loading state */}\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)} aria-hidden=\"true\" />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Defines accent color for descendant text components\u00A0with `highContrast={true}`.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst highContrastPropDef = {\n highContrast: {\n type: 'boolean',\n className: 'rt-high-contrast',\n default: undefined,\n },\n} satisfies {\n highContrast: PropDef<boolean>;\n};\n\nexport { highContrastPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\n/**\n * Available button sizes for responsive design\n * Size 1: 24px - Compact for toolbars and dense interfaces\n * Size 2: 32px - Standard for most interface contexts\n * Size 3: 40px - Large for important actions and mobile touch targets\n * Size 4: 48px - Extra large for hero sections and maximum impact\n */\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Available button variants for different visual contexts\n * - classic: Premium, sophisticated appearance\n * - solid: Primary actions that should be noticed first\n * - soft: Content-heavy interfaces, natural integration\n * - surface: Elevated appearance with subtle depth\n * - outline: Secondary actions that support primary actions\n * - ghost: Utility functions that don't compete for attention\n */\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost', 'override'] as const;\n\n/**\n * Available panel background options (deprecated)\n * @deprecated Use `materials` instead\n */\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\n/**\n * Available material options for visual rendering\n * - solid: Opaque backgrounds and borders\n * - translucent: Elevated effects with depth and visual separation\n */\nconst materials = ['solid', 'translucent'] as const;\n\n/**\n * Base button prop definitions that define the component's API\n * \n * These props are used by all button variants (Button, IconButton, etc.)\n * to ensure consistent behavior and styling across the design system.\n * \n * Key features:\n * - Responsive sizing with mobile-first approach\n * - Six visual variants for different interface contexts\n * - Comprehensive color system with semantic meanings\n * - Loading states with automatic accessibility\n * - Material system for visual depth and elevation\n * - Polymorphic rendering support via asChild\n * \n * @example\n * ```tsx\n * // Basic button with default props\n * <BaseButton>Click me</BaseButton>\n * \n * // Button with custom size and variant\n * <BaseButton size=\"3\" variant=\"solid\">Primary Action</BaseButton>\n * \n * // Button with loading state\n * <BaseButton loading>Processing...</BaseButton>\n * \n * // Button with material and high contrast\n * <BaseButton material=\"translucent\" highContrast>Elevated Button</BaseButton>\n * ```\n */\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n /**\n * Visual variant that determines the button's appearance and context\n */\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n */\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n */\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n /**\n * Material type for visual rendering and depth effects\n * Controls how the button renders its visual elements\n */\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Flush mode that removes visual padding for seamless text integration\n * Only effective with ghost variant\n */\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { Slot } from './slot.js';\nimport { flexPropDefs } from './flex.props.js';\n\nimport type { FlexOwnProps } from './flex.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\n\ntype FlexElement = React.ElementRef<'div'>;\ninterface CommonFlexProps extends MarginProps, LayoutProps, FlexOwnProps {}\ntype FlexDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype FlexSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype FlexProps = CommonFlexProps & (FlexSpanProps | FlexDivProps);\n\nconst Flex = React.forwardRef<FlexElement, FlexProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...flexProps\n } = extractProps(props, flexPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...flexProps} ref={forwardedRef} className={classNames('rt-Flex', className)} />;\n});\nFlex.displayName = 'Flex';\n\nexport { Flex };\nexport type { FlexProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst gapValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst gapPropDefs = {\n /**\n * Sets the CSS **gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gap=\"4\"\n * gap=\"20px\"\n * gap={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/gap\n */\n gap: {\n type: 'enum | string',\n className: 'rt-r-gap',\n customProperties: ['--gap'],\n values: gapValues,\n responsive: true,\n },\n /**\n * Sets the CSS **row-gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gapX=\"4\"\n * gapX=\"20px\"\n * gapX={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/row-gap\n */\n gapX: {\n type: 'enum | string',\n className: 'rt-r-cg',\n customProperties: ['--column-gap'],\n values: gapValues,\n responsive: true,\n },\n /**\n * Sets the CSS **column-gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gapY=\"4\"\n * gapY=\"20px\"\n * gapY={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap\n */\n gapY: {\n type: 'enum | string',\n className: 'rt-r-rg',\n customProperties: ['--row-gap'],\n values: gapValues,\n responsive: true,\n },\n} satisfies {\n gap: PropDef<(typeof gapValues)[number]>;\n gapX: PropDef<(typeof gapValues)[number]>;\n gapY: PropDef<(typeof gapValues)[number]>;\n};\n\nexport { gapPropDefs };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { gapPropDefs } from '../props/gap.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst as = ['div', 'span'] as const;\nconst displayValues = ['none', 'inline-flex', 'flex'] as const;\nconst directionValues = ['row', 'column', 'row-reverse', 'column-reverse'] as const;\nconst alignValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifyValues = ['start', 'center', 'end', 'between'] as const;\nconst wrapValues = ['nowrap', 'wrap', 'wrap-reverse'] as const;\n\nconst flexPropDefs = {\n /**\n * Controls whether to render **div** or **span**\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n as: { type: 'enum', values: as, default: 'div' },\n ...asChildPropDef,\n /**\n * Sets the CSS **display** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * display=\"inline-flex\"\n * display={{ sm: 'none', lg: 'flex' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/display\n */\n display: {\n type: 'enum',\n className: 'rt-r-display',\n values: displayValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-direction** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * direction=\"column\"\n * direction={{ sm: 'column', lg: 'row' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction\n */\n direction: {\n type: 'enum',\n className: 'rt-r-fd',\n values: directionValues,\n responsive: true,\n },\n /**\n * Sets the CSS **align-items** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * align=\"center\"\n * align={{ sm: 'baseline', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-items\n */\n align: {\n type: 'enum',\n className: 'rt-r-ai',\n values: alignValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-content** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justify=\"between\"\n * justify={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content\n */\n justify: {\n type: 'enum',\n className: 'rt-r-jc',\n values: justifyValues,\n parseValue: parseJustifyValue,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-wrap** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * wrap=\"wrap\"\n * wrap={{ sm: 'wrap', lg: 'nowrap' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap\n */\n wrap: {\n type: 'enum',\n className: 'rt-r-fw',\n values: wrapValues,\n responsive: true,\n },\n ...gapPropDefs,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n display: PropDef<(typeof displayValues)[number]>;\n direction: PropDef<(typeof directionValues)[number]>;\n align: PropDef<(typeof alignValues)[number]>;\n justify: PropDef<(typeof justifyValues)[number]>;\n wrap: PropDef<(typeof wrapValues)[number]>;\n};\n\nfunction parseJustifyValue(value: string) {\n return value === 'between' ? 'space-between' : value;\n}\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype FlexOwnProps = GetPropDefTypes<\n typeof flexPropDefs & typeof gapPropDefs & typeof asChildPropDef\n>;\n\nexport { flexPropDefs };\nexport type { FlexOwnProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Flex } from './flex.js';\nimport { spinnerPropDefs } from './spinner.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype SpinnerElement = React.ElementRef<'span'>;\ntype SpinnerOwnProps = GetPropDefTypes<typeof spinnerPropDefs>;\ninterface SpinnerProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n MarginProps,\n SpinnerOwnProps {}\nconst Spinner = React.forwardRef<SpinnerElement, SpinnerProps>((props, forwardedRef) => {\n const { className, children, loading, ...spinnerProps } = extractProps(\n props,\n spinnerPropDefs,\n marginPropDefs\n );\n\n if (!loading) return children;\n\n const spinner = (\n <span {...spinnerProps} ref={forwardedRef} className={classNames('rt-Spinner', className)}>\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n </span>\n );\n\n if (children === undefined) return spinner;\n\n return (\n <Flex asChild position=\"relative\" align=\"center\" justify=\"center\">\n <span>\n {/**\n * `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden`\n */}\n <span aria-hidden style={{ display: 'contents', visibility: 'hidden' }} inert={undefined}>\n {children}\n </span>\n\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>{spinner}</span>\n </Flex>\n </span>\n </Flex>\n );\n});\nSpinner.displayName = 'Spinner';\n\nexport { Spinner };\nexport type { SpinnerProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\n\nconst spinnerPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n loading: { type: 'boolean', default: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n loading: PropDef<boolean>;\n};\n\nexport { spinnerPropDefs };\n", "import { VisuallyHidden as VisuallyHiddenPrimitive } from 'radix-ui';\nexport const VisuallyHidden = VisuallyHiddenPrimitive.Root;\nexport const Root = VisuallyHiddenPrimitive.Root;\nexport type VisuallyHiddenProps = VisuallyHiddenPrimitive.VisuallyHiddenProps;\n", "import type { baseButtonPropDefs } from '../components/_internal/base-button.props.js';\nimport type { calloutRootPropDefs } from '../components/callout.props.js';\nimport type { spinnerPropDefs } from '../components/spinner.props.js';\nimport type { textPropDefs } from '../components/text.props.js';\nimport type { Responsive } from '../props/prop-def.js';\n\nfunction mapResponsiveProp<Input extends string, Output>(\n propValue: Responsive<Input> | undefined,\n mapValue: (value: Input) => Output\n): Responsive<Output> | undefined {\n if (propValue === undefined) return undefined;\n if (typeof propValue === 'string') {\n return mapValue(propValue);\n }\n return Object.fromEntries(\n Object.entries(propValue).map(([key, value]) => [key, mapValue(value)])\n );\n}\n\nfunction mapCalloutSizeToTextSize(\n size: (typeof calloutRootPropDefs.size.values)[number]\n): (typeof textPropDefs.size.values)[number] {\n return size === '3' ? '3' : size === '1' ? '1' : '2';\n}\n\nfunction mapButtonSizeToSpinnerSize(\n size: (typeof baseButtonPropDefs.size.values)[number]\n): (typeof spinnerPropDefs.size.values)[number] {\n switch (size) {\n case '1':\n return '1';\n case '2':\n case '3':\n return '2';\n case '4':\n return '3';\n }\n}\n\nexport { mapResponsiveProp, mapCalloutSizeToTextSize, mapButtonSizeToSpinnerSize };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { tooltipPropDefs } from './tooltip.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TooltipElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs>;\ninterface TooltipProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>,\n ComponentPropsWithout<typeof TooltipPrimitive.Content, RemovedProps | 'content'>,\n TooltipOwnProps {\n content: React.ReactNode;\n container?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Portal>['container'];\n}\nconst Tooltip = React.forwardRef<TooltipElement, TooltipProps>((props, forwardedRef) => {\n const {\n children,\n className,\n open,\n defaultOpen,\n onOpenChange,\n delayDuration,\n disableHoverableContent,\n content,\n container,\n forceMount,\n ...tooltipContentProps\n } = extractProps(props, tooltipPropDefs);\n const rootProps = { open, defaultOpen, onOpenChange, delayDuration, disableHoverableContent };\n return (\n <TooltipPrimitive.Root {...rootProps}>\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <TooltipPrimitive.Content\n sideOffset={4}\n collisionPadding={10}\n {...tooltipContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-TooltipContent', className)}\n >\n <Text as=\"p\" className=\"rt-TooltipText\" size=\"1\">\n {content}\n </Text>\n <TooltipPrimitive.Arrow className=\"rt-TooltipArrow\" />\n </TooltipPrimitive.Content>\n </Theme>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n});\nTooltip.displayName = 'Tooltip';\n\nexport { Tooltip };\nexport type { TooltipProps };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends MarginProps, TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...textPropDefs, ...marginPropDefs };\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Text ${className}` : 'rt-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'rt-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'rt-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'rt-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'rt-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'rt-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeMaterial = (typeof themePropDefs.material.values)[number];\ntype ThemePanelBackground = (typeof themePropDefs.panelBackground.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onMaterialChange: (material: ThemeMaterial) => void;\n onPanelBackgroundChange: (panelBackground: ThemePanelBackground) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n material: ThemeMaterial;\n panelBackground: ThemePanelBackground;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n fontFamily: ThemeFontFamily;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n material: themePropDefs.material.default,\n panelBackground: themePropDefs.panelBackground.default,\n radius: themePropDefs.radius.default,\n scaling: themePropDefs.scaling.default,\n fontFamily: themePropDefs.fontFamily.default,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onMaterialChange: noop,\n onPanelBackgroundChange: noop,\n onRadiusChange: noop,\n onScalingChange: noop,\n onFontFamilyChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir=\"ltr\">\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n material: materialProp = themePropDefs.material.default,\n panelBackground: panelBackgroundProp = themePropDefs.panelBackground.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n // Show deprecation warning for panelBackground when used\n React.useEffect(() => {\n if (props.panelBackground !== undefined) {\n console.warn(\n 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.',\n );\n }\n }, [props.panelBackground]);\n\n const [appearance, setAppearance] = React.useState(appearanceProp);\n React.useEffect(() => setAppearance(appearanceProp), [appearanceProp]);\n\n const [accentColor, setAccentColor] = React.useState(accentColorProp);\n React.useEffect(() => setAccentColor(accentColorProp), [accentColorProp]);\n\n const [grayColor, setGrayColor] = React.useState(grayColorProp);\n React.useEffect(() => setGrayColor(grayColorProp), [grayColorProp]);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n materialProp !== themePropDefs.material.default ? materialProp : panelBackgroundProp;\n const [material, setMaterial] = React.useState(effectiveMaterial);\n React.useEffect(() => setMaterial(effectiveMaterial), [effectiveMaterial]);\n\n // Keep panelBackground in sync with material for backward compatibility\n const [panelBackground, setPanelBackground] = React.useState(panelBackgroundProp);\n React.useEffect(() => setPanelBackground(material), [material]);\n\n const [radius, setRadius] = React.useState(radiusProp);\n React.useEffect(() => setRadius(radiusProp), [radiusProp]);\n\n const [scaling, setScaling] = React.useState(scalingProp);\n React.useEffect(() => setScaling(scalingProp), [scalingProp]);\n\n const [fontFamily, setFontFamily] = React.useState(fontFamilyProp);\n React.useEffect(() => setFontFamily(fontFamilyProp), [fontFamilyProp]);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n material={material}\n panelBackground={panelBackground}\n radius={radius}\n scaling={scaling}\n fontFamily={fontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onMaterialChange={setMaterial}\n onPanelBackgroundChange={setPanelBackground}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n onFontFamilyChange={setFontFamily}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nfunction getClientOS(): 'windows' | 'macos' | 'linux' | undefined {\n if (typeof navigator === 'undefined') return undefined;\n const ua = navigator.userAgent;\n if (ua.includes('Win')) return 'windows';\n if (ua.includes('Mac')) return 'macos';\n if (ua.includes('Linux')) return 'linux';\n return undefined;\n}\n\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n material = props.material ?? context?.material ?? themePropDefs.material.default,\n panelBackground = props.panelBackground ??\n context?.panelBackground ??\n themePropDefs.panelBackground.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n scaling = props.scaling ?? context?.scaling ?? themePropDefs.scaling.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onMaterialChange = noop,\n onPanelBackgroundChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n onFontFamilyChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n const [clientOS, setClientOS] = React.useState<ReturnType<typeof getClientOS>>(undefined);\n React.useEffect(() => {\n if (isRoot) setClientOS(getClientOS());\n }, [isRoot]);\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-material={material}\n data-panel-background={panelBackground}\n data-radius={radius}\n data-scaling={scaling}\n data-font-family={fontFamily}\n data-os={isRoot ? clientOS : undefined}\n ref={forwardedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n", "import type { accentColors } from '../props/color.prop.js';\n\ntype ThemeAccentColor = (typeof accentColors)[number];\n\nexport function getMatchingGrayColor(accentColor: ThemeAccentColor) {\n switch (accentColor) {\n case 'tomato':\n case 'red':\n case 'ruby':\n case 'crimson':\n case 'pink':\n case 'plum':\n case 'purple':\n case 'violet':\n return 'mauve';\n case 'iris':\n case 'indigo':\n case 'blue':\n case 'sky':\n case 'cyan':\n return 'slate';\n case 'teal':\n case 'jade':\n case 'mint':\n case 'green':\n return 'sage';\n case 'grass':\n case 'lime':\n return 'olive';\n case 'yellow':\n case 'amber':\n case 'orange':\n case 'brown':\n case 'gold':\n case 'bronze':\n return 'sand';\n case 'gray':\n return 'gray';\n }\n}\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst scalings = ['90%', '95%', '100%', '105%', '110%'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'blue' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'slate' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n material: { type: 'enum', values: materials, default: 'translucent' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: 'translucent' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'medium' },\n /**\n * Sets a scaling multiplier for values like spacing, font sizes, line heights, etc. are scaled.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/layout\n */\n scaling: { type: 'enum', values: scalings, default: '100%' },\n /**\n * Sets the font family for the theme.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n material: PropDef<(typeof materials)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n scaling: PropDef<(typeof scalings)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n", "import { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst tooltipPropDefs = {\n content: { type: 'ReactNode', required: true },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '360px' },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n content: PropDef<React.ReactNode>;\n};\n\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs & typeof widthPropDefs>;\n\nexport { tooltipPropDefs };\nexport type { TooltipOwnProps };\n", "import * as React from 'react';\n\n/**\n * Hook for managing tooltip accessibility props and conditional rendering.\n * Encapsulates tooltip ID generation and aria-describedby binding.\n *\n * @param tooltip - The tooltip content (if any)\n * @returns Object containing tooltipId, hasTooltip flag, and accessibility props\n *\n * @example\n * ```tsx\n * const { tooltipId, hasTooltip, accessibilityProps } = useTooltipWrapper(tooltip);\n *\n * const button = <button {...accessibilityProps}>Click me</button>;\n *\n * if (!hasTooltip) return button;\n *\n * return <Tooltip id={tooltipId} content={tooltip}>{button}</Tooltip>;\n * ```\n */\nexport function useTooltipWrapper(tooltip: React.ReactNode) {\n const tooltipId = React.useId();\n const hasTooltip = Boolean(tooltip);\n\n const accessibilityProps = React.useMemo(() => (hasTooltip ? { 'aria-describedby': tooltipId } : {}), [hasTooltip, tooltipId]);\n\n return { tooltipId, hasTooltip, accessibilityProps };\n}\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Slot } from './slot.js';\nimport { gridPropDefs } from './grid.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GridOwnProps } from './grid.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype GridElement = React.ElementRef<'div'>;\ninterface CommonGridProps extends MarginProps, LayoutProps, GridOwnProps {}\ntype GridDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype GridSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype GridProps = CommonGridProps & (GridSpanProps | GridDivProps);\n\nconst Grid = React.forwardRef<GridElement, GridProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...gridProps\n } = extractProps(props, gridPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...gridProps} ref={forwardedRef} className={classNames('rt-Grid', className)} />;\n});\nGrid.displayName = 'Grid';\n\nexport { Grid };\nexport type { GridProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { gapPropDefs } from '../props/gap.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst as = ['div', 'span'] as const;\nconst displayValues = ['none', 'inline-grid', 'grid'] as const;\nconst columnsValues = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst rowsValues = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst flowValues = ['row', 'column', 'dense', 'row-dense', 'column-dense'] as const;\nconst alignValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifyValues = ['start', 'center', 'end', 'between'] as const;\nconst alignContentValues = [\n 'start',\n 'center',\n 'end',\n 'baseline',\n 'between',\n 'around',\n 'evenly',\n 'stretch',\n] as const;\nconst justifyItemsValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\n\nconst gridPropDefs = {\n /**\n * Controls whether to render **div** or **span**\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n as: { type: 'enum', values: as, default: 'div' },\n ...asChildPropDef,\n /**\n * Sets the CSS **display** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * display=\"inline-grid\"\n * display={{ sm: 'none', lg: 'grid' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/display\n */\n display: {\n type: 'enum',\n className: 'rt-r-display',\n values: displayValues,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-template** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * template='\"header header\" \"sidebar content\"'\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas\n */\n areas: {\n type: 'string',\n className: 'rt-r-gta',\n customProperties: ['--grid-template-areas'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-template-columns** property.\n * Supports numeric string values, CSS strings and responsive objects.\n *\n * Use numeric string values to create grid columns of even size.\n *\n * @example\n * columns=\"3\"\n * columns=\"100px 1fr\"\n * columns={{ xs: '1', md: 'auto 1fr' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns\n */\n columns: {\n type: 'enum | string',\n className: 'rt-r-gtc',\n customProperties: ['--grid-template-columns'],\n values: columnsValues,\n parseValue: parseGridValue,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-template-rows** property.\n * Supports numeric string values, CSS strings and responsive objects.\n *\n * Use numeric string values to create grid rows of even size.\n *\n * @example\n * rows=\"3\"\n * rows=\"100px 1fr\"\n * rows={{ xs: '1', md: 'auto 1fr' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows\n */\n rows: {\n type: 'enum | string',\n className: 'rt-r-gtr',\n customProperties: ['--grid-template-rows'],\n values: rowsValues,\n parseValue: parseGridValue,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-auto-flow** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * flow=\"column\"\n * flow={{ sm: 'column', lg: 'row' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow\n */\n flow: {\n type: 'enum',\n className: 'rt-r-gaf',\n values: flowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **align-items** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * align=\"center\"\n * align={{ sm: 'baseline', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-items\n */\n align: {\n type: 'enum',\n className: 'rt-r-ai',\n values: alignValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-content** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justify=\"between\"\n * justify={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content\n */\n justify: {\n type: 'enum',\n className: 'rt-r-jc',\n values: justifyValues,\n parseValue: parseJustifyValue,\n responsive: true,\n },\n /**\n * Sets the CSS **align-content** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * alignContent=\"between\"\n * alignContent={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-content\n */\n alignContent: {\n type: 'enum',\n className: 'rt-r-ac',\n values: alignContentValues,\n parseValue: parseAlignContentValue,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-items** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justifyItems=\"center\"\n * justifyItems={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-items\n */\n justifyItems: {\n type: 'enum',\n className: 'rt-r-ji',\n values: justifyItemsValues,\n responsive: true,\n },\n ...gapPropDefs,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n display: PropDef<(typeof displayValues)[number]>;\n areas: PropDef<string>;\n columns: PropDef<(typeof columnsValues)[number]>;\n rows: PropDef<(typeof rowsValues)[number]>;\n flow: PropDef<(typeof flowValues)[number]>;\n align: PropDef<(typeof alignValues)[number]>;\n justify: PropDef<(typeof justifyValues)[number]>;\n alignContent: PropDef<(typeof alignContentValues)[number]>;\n justifyItems: PropDef<(typeof justifyItemsValues)[number]>;\n};\n\nfunction parseGridValue(value: string): string {\n if ((gridPropDefs.columns.values as readonly string[]).includes(value)) {\n return value;\n }\n\n return value?.match(/^\\d+$/) ? `repeat(${value}, minmax(0, 1fr))` : value;\n}\n\nfunction parseJustifyValue(value: string) {\n return value === 'between' ? 'space-between' : value;\n}\n\nfunction parseAlignContentValue(value: string) {\n return value === 'between'\n ? 'space-between'\n : value === 'around'\n ? 'space-around'\n : value === 'evenly'\n ? 'space-evenly'\n : value;\n}\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype GridOwnProps = GetPropDefTypes<typeof gridPropDefs & typeof asChildPropDef>;\n\nexport { gridPropDefs };\nexport type { GridOwnProps };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { headingPropDefs } from './heading.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype HeadingElement = React.ElementRef<'h1'>;\ntype HeadingOwnProps = GetPropDefTypes<typeof headingPropDefs>;\ninterface CommonHeadingProps extends MarginProps, HeadingOwnProps {}\ntype HeadingH1Props = { as?: 'h1' } & ComponentPropsWithout<'h1', RemovedProps>;\ntype HeadingH2Props = { as: 'h2' } & ComponentPropsWithout<'h2', RemovedProps>;\ntype HeadingH3Props = { as: 'h3' } & ComponentPropsWithout<'h3', RemovedProps>;\ntype HeadingH4Props = { as: 'h4' } & ComponentPropsWithout<'h4', RemovedProps>;\ntype HeadingH5Props = { as: 'h5' } & ComponentPropsWithout<'h5', RemovedProps>;\ntype HeadingH6Props = { as: 'h6' } & ComponentPropsWithout<'h6', RemovedProps>;\ntype HeadingProps = CommonHeadingProps &\n (HeadingH1Props | HeadingH2Props | HeadingH3Props | HeadingH4Props | HeadingH5Props | HeadingH6Props);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...headingPropDefs, ...marginPropDefs };\n\nconst Heading = React.memo(\n React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'h1',\n color,\n ...headingProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Heading ${className}` : 'rt-Heading';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...headingProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(headingProps as React.HTMLAttributes<HTMLHeadingElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nHeading.displayName = 'Heading';\n\nexport { Heading };\nexport type { HeadingProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst headingPropDefs = {\n as: { type: 'enum', values: as, default: 'h1' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n default: '6',\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { headingPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport { Tooltip } from './tooltip.js';\nimport { useTooltipWrapper } from '../hooks/use-tooltip-wrapper.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\ntype IconButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Required accessibility props for icon buttons\n * Icon buttons must have an accessible name to meet WCAG guidelines\n *\n * Three ways to provide accessibility:\n * 1. aria-label: Direct descriptive text\n * 2. aria-labelledby: Reference to a label element\n * 3. children: Visible text content (fallback)\n */\ntype AccessibilityProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string }\n | { 'aria-label'?: never; 'aria-labelledby'?: never; children: React.ReactNode };\n\n/**\n * Tooltip configuration props that can be passed to IconButton\n * These props are forwarded to the underlying Tooltip component\n */\ninterface IconButtonTooltipProps {\n /** Content to display in the tooltip on hover/focus */\n tooltip?: React.ReactNode;\n /** Side of the button where the tooltip should appear */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n /** Alignment of the tooltip relative to the button */\n tooltipAlign?: 'start' | 'center' | 'end';\n /** Delay before showing the tooltip (in milliseconds) */\n tooltipDelayDuration?: number;\n /** Whether to disable hoverable content behavior */\n tooltipDisableHoverableContent?: boolean;\n}\n\n/**\n * Core IconButton props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with accessibility requirements and tooltip functionality\n */\ntype IconButtonOwnProps = Omit<BaseButtonProps, 'as'> & AccessibilityProps & IconButtonTooltipProps;\n\n/**\n * Polymorphic IconButton props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;\n\n/**\n * IconButton component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype IconButtonComponent = <C extends React.ElementType = 'button'>(props: IconButtonProps<C> & { ref?: React.ForwardedRef<IconButtonElement> }) => React.ReactElement | null;\n\n/**\n * IconButton component for compact, accessible icon-only interactions\n *\n * The IconButton component extends Button with specialized behavior for visual symbols.\n * It enforces accessibility requirements, provides automatic square sizing, and includes\n * built-in tooltip integration. Icon buttons are essential for space-efficient interfaces\n * while maintaining accessibility compliance.\n *\n * Key features:\n * - Enforced accessibility requirements (aria-label, aria-labelledby, or children)\n * - Automatic square aspect ratios for consistent visual alignment\n * - Built-in tooltip support for context and guidance\n * - Same variant and size system as Button for consistency\n * - Runtime validation for accessibility compliance\n *\n * @example\n * ```tsx\n * // Basic icon button with aria-label\n * <IconButton aria-label=\"Settings\">\n * <Settings />\n * </IconButton>\n *\n * // Icon button with tooltip\n * <IconButton aria-label=\"Save\" tooltip=\"Save your progress\">\n * <Save />\n * </IconButton>\n *\n * // Icon button with aria-labelledby\n * <IconButton aria-labelledby=\"settings-label\">\n * <Settings />\n * </IconButton>\n * <span id=\"settings-label\">Open settings panel</span>\n *\n * // Icon button with visible text (fallback)\n * <IconButton>\n * <Settings />\n * Settings\n * </IconButton>\n * ```\n */\nconst IconButton = React.forwardRef(\n (\n { className, tooltip, tooltipSide = 'top', tooltipAlign = 'center', tooltipDelayDuration, tooltipDisableHoverableContent, ...props }: IconButtonProps,\n forwardedRef: React.ForwardedRef<IconButtonElement>,\n ) => {\n // Use shared tooltip wrapper hook for accessibility props\n const { tooltipId, hasTooltip, accessibilityProps: tooltipAccessibilityProps } = useTooltipWrapper(tooltip);\n\n // Runtime accessibility validation to ensure WCAG compliance\n // This helps catch accessibility issues during development\n const hasAriaLabel = 'aria-label' in props && props['aria-label'];\n const hasAriaLabelledBy = 'aria-labelledby' in props && props['aria-labelledby'];\n const hasChildren = 'children' in props && props.children;\n\n // Validate accessible name - throw in development, log error in production\n if (!hasAriaLabel && !hasAriaLabelledBy && !hasChildren) {\n const errorMessage =\n 'IconButton: Icon buttons must have an accessible name. Please provide either:' +\n '\\n- aria-label prop with descriptive text' +\n '\\n- aria-labelledby prop referencing a label element' +\n '\\n- or visible text children';\n\n if (process.env.NODE_ENV === 'development') {\n throw new Error(errorMessage);\n } else {\n console.error(errorMessage);\n }\n }\n\n // Create the base icon button element with accessibility props\n const iconButton = <BaseButton {...props} {...tooltipAccessibilityProps} ref={forwardedRef} className={classNames('rt-IconButton', className)} />;\n\n // If no tooltip is provided, return the icon button as-is for better performance\n if (!hasTooltip) {\n return iconButton;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n // This creates a compound component that handles both button and tooltip functionality\n return (\n <Tooltip content={tooltip} side={tooltipSide} align={tooltipAlign} delayDuration={tooltipDelayDuration} disableHoverableContent={tooltipDisableHoverableContent} id={tooltipId}>\n {iconButton}\n </Tooltip>\n );\n },\n) as IconButtonComponent & { displayName?: string };\n\nIconButton.displayName = 'IconButton';\n\nexport { IconButton };\nexport type { IconButtonProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { kbdPropDefs } from './kbd.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype KbdElement = React.ElementRef<'kbd'>;\ntype KbdOwnProps = GetPropDefTypes<typeof kbdPropDefs>;\ninterface KbdProps extends ComponentPropsWithout<'kbd', RemovedProps>, MarginProps, KbdOwnProps {}\nconst Kbd = React.forwardRef<KbdElement, KbdProps>((props, forwardedRef) => {\n const { asChild, className, ...kbdProps } = extractProps(props, kbdPropDefs, marginPropDefs);\n const Comp = asChild ? Slot.Root : 'kbd';\n return (\n <Comp\n {...kbdProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-Kbd', className)}\n />\n );\n});\nKbd.displayName = 'Kbd';\n\nexport { Kbd };\nexport type { KbdProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst variants = ['classic', 'soft'] as const;\n\nconst kbdPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: variants,\n default: 'classic',\n },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { kbdPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } from './theme.js';\nimport { useThemeContext } from './theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// ---------------------------------------------\n// Popover Content Context\n// ---------------------------------------------\ntype PopoverContentContextValue = {\n /** Ref to the Popover.Content DOM node */\n contentRef: React.MutableRefObject<HTMLDivElement | null>;\n /** Update content's toolbar offset variable and presence flag */\n setToolbarOffset: (offsetPx: number) => void;\n /** Wire up aria-labelledby for toolbar title */\n setLabelId: (id: string | undefined) => void;\n};\n\nconst PopoverContentContext = React.createContext<PopoverContentContextValue | null>(null);\nconst usePopoverContentContext = (caller: string) => {\n const ctx = React.useContext(PopoverContentContext);\n if (!ctx) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`${caller} must be used within Popover.Content`);\n }\n }\n return ctx;\n};\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n ),\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const panelBackground = props.panelBackground ?? themeContext.panelBackground;\n const {\n className,\n forceMount,\n container,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, popoverContentPropDefs);\n\n // Manage refs (we need the DOM node to apply CSS variables)\n const contentRef = React.useRef<HTMLDivElement>(null);\n const combinedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n contentRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [forwardedRef],\n );\n\n const [labelId, setLabelId] = React.useState<string | undefined>(undefined);\n\n const setToolbarOffset = React.useCallback((offsetPx: number) => {\n const el = contentRef.current;\n if (!el) return;\n if (offsetPx > 0) {\n el.style.setProperty('--popover-toolbar-offset', `${offsetPx}px`);\n el.setAttribute('data-has-toolbar', 'true');\n } else {\n el.style.removeProperty('--popover-toolbar-offset');\n el.removeAttribute('data-has-toolbar');\n }\n }, []);\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={combinedRef}\n aria-labelledby={labelId}\n data-panel-background={panelBackground}\n className={classNames('rt-PopperContent', 'rt-PopoverContent', className)}\n >\n <PopoverContentContext.Provider value={React.useMemo(() => ({ contentRef, setToolbarOffset, setLabelId }), [setToolbarOffset])}>\n {props.children}\n </PopoverContentContext.Provider>\n </PopoverPrimitive.Content>\n </Theme>\n </PopoverPrimitive.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n ),\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />\n ),\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\n// ---------------------------------------------\n// Toolbar (Popover-only)\n// ---------------------------------------------\n\ntype PopoverToolbarElement = HTMLDivElement;\ntype PopoverToolbarProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarBase = React.forwardRef<PopoverToolbarElement, PopoverToolbarProps>(\n ({ className, children, ...props }, forwardedRef) => {\n const ctx = usePopoverContentContext('Popover.Toolbar');\n\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRefs = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef)\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [forwardedRef],\n );\n\n React.useEffect(() => {\n if (!ctx || !localRef.current) return;\n const el = localRef.current;\n const update = () => {\n const height = el.getBoundingClientRect().height;\n ctx.setToolbarOffset(height);\n };\n update();\n const ro = new ResizeObserver(update);\n ro.observe(el);\n return () => {\n ro.disconnect();\n ctx.setToolbarOffset(0);\n };\n }, [ctx]);\n\n return (\n <div {...props} ref={setRefs} className={classNames('rt-PopoverToolbar', className)}>\n {children}\n </div>\n );\n },\n);\n(PopoverToolbarBase as any).displayName = 'Popover.Toolbar';\n\ntype SectionProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarLeft = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarLeft', className)}\n />\n ),\n);\nPopoverToolbarLeft.displayName = 'Popover.Toolbar.Left';\n\nconst PopoverToolbarCenter = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarCenter', className)}\n />\n ),\n);\nPopoverToolbarCenter.displayName = 'Popover.Toolbar.Center';\n\nconst PopoverToolbarRight = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarRight', className)}\n />\n ),\n);\nPopoverToolbarRight.displayName = 'Popover.Toolbar.Right';\n\ntype TitleProps = React.ComponentPropsWithoutRef<'span'>;\nconst PopoverToolbarTitle = React.forwardRef<HTMLSpanElement, TitleProps>(\n ({ className, id: idProp, ...props }, ref) => {\n const ctx = usePopoverContentContext('Popover.Toolbar.Title');\n const reactId = React.useId();\n const id = idProp ?? `rt-popover-toolbar-title-${reactId}`;\n React.useEffect(() => {\n ctx?.setLabelId(id);\n return () => ctx?.setLabelId(undefined);\n }, [ctx, id]);\n return (\n <span\n {...props}\n id={id}\n ref={ref}\n className={classNames('rt-PopoverToolbarTitle', className)}\n />\n );\n },\n);\nPopoverToolbarTitle.displayName = 'Popover.Toolbar.Title';\n\ntype PopoverToolbarComponent = React.ForwardRefExoticComponent<\n React.PropsWithoutRef<PopoverToolbarProps> & React.RefAttributes<HTMLDivElement>\n> & {\n Left: typeof PopoverToolbarLeft;\n Center: typeof PopoverToolbarCenter;\n Right: typeof PopoverToolbarRight;\n Title: typeof PopoverToolbarTitle;\n};\n\nconst PopoverToolbar = Object.assign(PopoverToolbarBase, {\n Left: PopoverToolbarLeft,\n Center: PopoverToolbarCenter,\n Right: PopoverToolbarRight,\n Title: PopoverToolbarTitle,\n}) as PopoverToolbarComponent;\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n PopoverToolbar as Toolbar,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n};\n", "import * as React from 'react';\n\n/** A function that throws an error when a value isn't a valid React Element, otherwise returns the value */\nexport const requireReactElement = <T extends React.ReactNode>(children: T): T => {\n const isReactElement = React.isValidElement(children);\n\n if (!isReactElement) {\n throw Error(\n `Expected a single React Element child, but got: ${React.Children.toArray(children)\n .map((child) =>\n typeof child === 'object' && 'type' in child && typeof child.type === 'string'\n ? child.type\n : typeof child\n )\n .join(', ')}`\n );\n }\n\n return children;\n};\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3', '4'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst popoverContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\ntype PopoverContentOwnProps = GetPropDefTypes<\n typeof popoverContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { popoverContentPropDefs };\nexport type { PopoverContentOwnProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nimport { scrollAreaPropDefs } from './scroll-area.props.js';\nimport { extractMarginProps } from '../helpers/extract-margin-props.js';\nimport { getMarginStyles } from '../helpers/get-margin-styles.js';\nimport { getResponsiveClassNames } from '../helpers/get-responsive-styles.js';\nimport { getSubtree } from '../helpers/get-subtree.js';\nimport { mergeStyles } from '../helpers/merge-styles.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Viewport>;\ntype ScrollAreaOwnProps = GetPropDefTypes<typeof scrollAreaPropDefs>;\ninterface ScrollAreaProps\n extends ComponentPropsWithout<typeof ScrollAreaPrimitive.Root, RemovedProps>,\n ComponentPropsWithout<typeof ScrollAreaPrimitive.Viewport, RemovedProps | 'dir'>,\n MarginProps,\n ScrollAreaOwnProps {}\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>((props, forwardedRef) => {\n const { rest: marginRest, ...marginProps } = extractMarginProps(props);\n const [marginClassNames, marginCustomProperties] = getMarginStyles(marginProps);\n\n const {\n asChild,\n children,\n className,\n style,\n type,\n scrollHideDelay = type !== 'scroll' ? 0 : undefined,\n dir,\n size = scrollAreaPropDefs.size.default,\n radius = scrollAreaPropDefs.radius.default,\n scrollbars = scrollAreaPropDefs.scrollbars.default,\n ...viewportProps\n } = marginRest;\n\n return (\n <ScrollAreaPrimitive.Root\n type={type}\n scrollHideDelay={scrollHideDelay}\n className={classNames('rt-ScrollAreaRoot', marginClassNames, className)}\n style={mergeStyles(marginCustomProperties, style)}\n asChild={asChild}\n >\n {getSubtree({ asChild, children }, (children) => (\n <>\n <ScrollAreaPrimitive.Viewport\n {...viewportProps}\n ref={forwardedRef}\n className=\"rt-ScrollAreaViewport\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n\n <div className=\"rt-ScrollAreaViewportFocusRing\" />\n\n {scrollbars !== 'vertical' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"horizontal\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars !== 'horizontal' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"vertical\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars === 'both' ? (\n <ScrollAreaPrimitive.Corner className=\"rt-ScrollAreaCorner\" />\n ) : null}\n </>\n ))}\n </ScrollAreaPrimitive.Root>\n );\n});\nScrollArea.displayName = 'ScrollArea';\n\nexport { ScrollArea };\nexport type { ScrollAreaProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst scrollbarsValues = ['vertical', 'horizontal', 'both'] as const;\n\nconst scrollAreaPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '1', responsive: true },\n ...radiusPropDef,\n scrollbars: { type: 'enum', values: scrollbarsValues, default: 'both' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n scrollbars: PropDef<(typeof scrollbarsValues)[number]>;\n};\n\nexport { scrollAreaPropDefs };\n", "import type { MarginProps } from '../props/margin.props.js';\n\nexport function extractMarginProps<T extends MarginProps>(props: T) {\n const { m, mx, my, mt, mr, mb, ml, ...rest } = props;\n return { m, mx, my, mt, mr, mb, ml, rest };\n}\n", "import classNames from 'classnames';\n\nimport { getResponsiveStyles } from './get-responsive-styles.js';\nimport { mergeStyles } from './merge-styles.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\n\nconst marginValues = marginPropDefs.m.values;\n\nexport function getMarginStyles(props: MarginProps) {\n const [mClassNames, mCustomProperties] = getResponsiveStyles({\n className: 'rt-r-m',\n customProperties: ['--margin'],\n propValues: marginValues,\n value: props.m,\n });\n\n const [mxClassNames, mxCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mx',\n customProperties: ['--margin-left', '--margin-right'],\n propValues: marginValues,\n value: props.mx,\n });\n\n const [myClassNames, myCustomProperties] = getResponsiveStyles({\n className: 'rt-r-my',\n customProperties: ['--margin-top', '--margin-bottom'],\n propValues: marginValues,\n value: props.my,\n });\n\n const [mtClassNames, mtCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mt',\n customProperties: ['--margin-top'],\n propValues: marginValues,\n value: props.mt,\n });\n\n const [mrClassNames, mrCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mr',\n customProperties: ['--margin-right'],\n propValues: marginValues,\n value: props.mr,\n });\n\n const [mbClassNames, mbCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mb',\n customProperties: ['--margin-bottom'],\n propValues: marginValues,\n value: props.mb,\n });\n\n const [mlClassNames, mlCustomProperties] = getResponsiveStyles({\n className: 'rt-r-ml',\n customProperties: ['--margin-left'],\n propValues: marginValues,\n value: props.ml,\n });\n\n return [\n classNames(\n mClassNames,\n mxClassNames,\n myClassNames,\n mtClassNames,\n mrClassNames,\n mbClassNames,\n mlClassNames\n ),\n mergeStyles(\n mCustomProperties,\n mxCustomProperties,\n myCustomProperties,\n mtCustomProperties,\n mrCustomProperties,\n mbCustomProperties,\n mlCustomProperties\n ),\n ] as const;\n}\n", "import * as React from 'react';\n\n/**\n * This is a helper function that is used when a component supports `asChild`\n * using the `Slot` component but its implementation contains nested DOM elements.\n *\n * Using it ensures if a consumer uses the `asChild` prop, the elements are in\n * correct order in the DOM, adopting the intended consumer `children`.\n */\nexport function getSubtree(\n options: { asChild: boolean | undefined; children: React.ReactNode },\n content: React.ReactNode | ((children: React.ReactNode) => React.ReactNode)\n) {\n const { asChild, children } = options;\n if (!asChild) return typeof content === 'function' ? content(children) : content;\n\n const firstChild = React.Children.only(children) as React.ReactElement;\n return React.cloneElement(firstChild, {\n // @ts-expect-error\n children: typeof content === 'function' ? content(firstChild.props.children) : content,\n });\n}\n", "import * as React from 'react';\n\n// \"inert\" works differently between React versions\n// https://github.com/facebook/react/pull/24730\nexport const inert = (Number.parseFloat(React.version) >= 19 || '') as React.HTMLAttributes<unknown>['inert'];\n"],
|
|
5
|
-
"mappings": "2lBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,gBAAAE,GAAA,sBAAAC,KAAA,eAAAC,GAAAJ,IAEA,IAAAK,EAAuB,oBACvBC,GAA+B,6BAC/BC,GAA0B,qBCJ1B,IAAAC,GAA0D,oBAC7CC,GAAiB,GAAAC,eAAwB,KCDtD,IAAAC,GAAuB,oBACvBC,GAAuB,yBCDvB,IAAAC,GAAsC,oBACzBC,GAAO,GAAAC,KAAc,KACrBC,GAAO,GAAAD,KAAc,KACrBE,GAA4C,GAAAF,KAAc,UCDvE,IAAMG,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECNA,IAAMC,GAAK,CAAC,MAAO,MAAM,EACnBC,GAAgB,CAAC,OAAQ,SAAU,eAAgB,QAAS,UAAU,EAEtEC,GAAc,CAQlB,GAAI,CAAE,KAAM,OAAQ,OAAQF,GAAI,QAAS,KAAM,EAC/C,GAAGG,EAYH,QAAS,CACP,KAAM,OACN,UAAW,eACX,OAAQF,GACR,WAAY,EACd,CACF,EClCA,IAAAG,GAAuB,yBCMvB,IAAMC,GAAc,CAAC,UAAW,KAAM,KAAM,KAAM,KAAM,IAAI,EACtDC,GAA6B,IAAI,IAAID,EAAW,ECNtD,SAASE,GACPC,EACAC,EACU,CACV,OAAO,OAAO,UAAU,eAAe,KAAKD,EAAKC,CAAG,CACtD,CCHA,IA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AgBvB,EAAK,UAAU,SAAS,aAAa,EACrDwB,EAAexB,EAAK,UAAU,SAAS,YAAY,EACnDyB,EAAWzB,EAAK,UAAU,SAAS,OAAO,EAC1C0B,EAAU1B,EAAK,UAAU,SAAS,MAAM,GAE1CuB,GAAiBC,KACnBxB,EAAK,UAAU,OAAO,cAAe,YAAY,EACjDA,EAAK,MAAM,YAAc9B,EACzB8B,EAAK,UAAU,IAAI,GAAG9B,CAAU,QAAQ,IAGtCuD,GAAYC,KACd1B,EAAK,UAAU,OAAO,QAAS,MAAM,EACrCA,EAAK,MAAM,YAAc9B,EACzB8B,EAAK,UAAU,IAAI9B,CAAU,GAG3B,CAACqD,GAAiB,CAACC,GAAgB,CAACC,GAAY,CAACC,IACnD1B,EAAK,MAAM,YAAc9B,EACzB8B,EAAK,UAAU,IAAI9B,CAAU,EAEjC",
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport { useCallbackRef } from 'radix-ui/internal';\nimport { flushSync } from 'react-dom';\n\nimport { AccessibleIcon } from './accessible-icon.js';\nimport { Box } from './box.js';\nimport { Button } from './button.js';\nimport { Flex } from './flex.js';\nimport { Grid } from './grid.js';\nimport { Heading } from './heading.js';\nimport { IconButton } from './icon-button.js';\nimport { Kbd } from './kbd.js';\nimport * as Popover from './popover.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Text } from './text.js';\nimport { Tooltip } from './tooltip.js';\nimport { Theme, useThemeContext, type ThemeContextValue } from './theme.js';\nimport { inert } from '../helpers/inert.js';\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ninterface ThemePanelProps extends Omit<ThemePanelImplProps, keyof ThemePanelImplPrivateProps> {\n onAppearanceChange?: (value: 'light' | 'dark') => void;\n defaultOpen?: boolean;\n}\n\nconst keyboardInputElement = `\n [contenteditable],\n [role=\"combobox\"],\n [role=\"listbox\"],\n [role=\"menu\"],\n input:not([type=\"radio\"], [type=\"checkbox\"]),\n select,\n textarea\n `;\n\nconst ThemePanel = React.forwardRef<ThemePanelImplElement, ThemePanelProps>(\n ({ defaultOpen = true, ...props }, forwardedRef) => {\n const [open, setOpen] = React.useState(defaultOpen);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const previouslyFocusedElementRef = React.useRef<HTMLElement | null>(null);\n\n // quickly show/hide using \"T\" keypress\n React.useEffect(() => {\n function handleKeydown(event: KeyboardEvent) {\n const isModifierActive = event.altKey || event.ctrlKey || event.shiftKey || event.metaKey;\n const isKeyboardInputActive = document.activeElement?.closest(keyboardInputElement);\n const isKeyT = event.key?.toUpperCase() === 'T' && !isModifierActive;\n if (isKeyT && !isKeyboardInputActive) {\n let isOpen = false;\n flushSync(() => {\n setOpen((open) => {\n isOpen = !open;\n return isOpen;\n });\n });\n if (isOpen) {\n previouslyFocusedElementRef.current = document.activeElement as HTMLElement | null;\n triggerRef.current?.focus();\n } else {\n previouslyFocusedElementRef.current?.focus();\n }\n }\n }\n document.addEventListener('keydown', handleKeydown);\n return () => document.removeEventListener('keydown', handleKeydown);\n }, []);\n\n return (\n <ThemePanelImpl\n {...props}\n ref={forwardedRef}\n triggerRef={triggerRef}\n open={open}\n shortcut={\n <Tooltip content=\"Press T to show/hide the Theme Panel\" side=\"bottom\" sideOffset={6}>\n <Kbd asChild size=\"3\" tabIndex={0} className=\"rt-ThemePanelShortcut\">\n <button\n type=\"button\"\n onClick={() => setOpen((open) => !open)}\n ref={triggerRef}\n aria-label=\"Toggle the Theme Panel\"\n >\n T\n </button>\n </Kbd>\n </Tooltip>\n }\n />\n );\n },\n);\nThemePanel.displayName = 'ThemePanel';\n\ntype ThemePanelImplElement = React.ElementRef<'div'>;\ninterface ThemePanelImplPrivateProps {\n open: boolean;\n shortcut: React.ReactNode;\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n}\ninterface ThemePanelImplProps\n extends ComponentPropsWithout<'div', RemovedProps>, ThemePanelImplPrivateProps {\n onAppearanceChange?: (value: 'light' | 'dark') => void;\n}\nconst ThemePanelImpl = React.forwardRef<ThemePanelImplElement, ThemePanelImplProps>(\n (props, forwardedRef) => {\n const { open, onAppearanceChange, shortcut, triggerRef, ...panelProps } = props;\n const themeContext = useThemeContext();\n return (\n <Theme asChild radius=\"medium\" scaling=\"100%\">\n <Flex\n direction=\"column\"\n position=\"fixed\"\n top=\"0\"\n right=\"0\"\n mr={{ initial: '2', sm: '4' }}\n mt={{ initial: '2', sm: '4' }}\n width={{ initial: '360px' }}\n maxHeight={{\n initial: 'calc(100svh - var(--space-2) - var(--space-2))',\n sm: 'calc(100svh - var(--space-4) - var(--space-4))',\n }}\n maxWidth={{\n initial: 'calc(100svw - var(--space-2) - var(--space-2))',\n sm: 'calc(100svw - var(--space-4) - var(--space-4))',\n }}\n inert={open ? undefined : inert}\n {...panelProps}\n ref={forwardedRef}\n style={{\n zIndex: 999999999,\n overflow: 'hidden',\n borderRadius: 'var(--radius-4)',\n backgroundColor: 'var(--color-panel-solid)',\n transformOrigin: 'top center',\n transitionProperty: 'transform, box-shadow',\n transitionDuration: '200ms',\n transitionTimingFunction: open ? 'ease-out' : 'ease-in',\n transform: open ? 'none' : 'translateX(105%)',\n boxShadow: open ? 'var(--shadow-5)' : 'var(--shadow-2)',\n ...props.style,\n }}\n >\n <ScrollArea>\n <Box flexGrow=\"1\" p={{ initial: '4', xs: '5' }} position=\"relative\">\n {!!shortcut && (\n <Box position=\"absolute\" top=\"0\" right=\"0\" m=\"2\">\n {shortcut}\n </Box>\n )}\n <ThemePanelContent onAppearanceChange={onAppearanceChange} context={themeContext} />\n </Box>\n </ScrollArea>\n </Flex>\n </Theme>\n );\n },\n);\nThemePanelImpl.displayName = 'ThemePanelImpl';\n\ntype ThemePanelContentElement = React.ElementRef<typeof Flex>;\ninterface ThemePanelContentProps extends ComponentPropsWithout<\n typeof Flex,\n RemovedProps | 'direction'\n> {\n onAppearanceChange?: (value: 'light' | 'dark') => void;\n context?: ThemeContextValue;\n}\nconst ThemePanelContent = React.forwardRef<ThemePanelContentElement, ThemePanelContentProps>(\n (props, forwardedRef) => {\n const {\n onAppearanceChange: onAppearanceChangeProp,\n context: contextProp,\n ...contentProps\n } = props;\n\n const themeContext = useThemeContext();\n\n const {\n appearance,\n onAppearanceChange,\n accentColor,\n onAccentColorChange,\n grayColor,\n onGrayColorChange,\n panelBackground,\n onPanelBackgroundChange,\n radius,\n onRadiusChange,\n scaling,\n onScalingChange,\n } = contextProp ?? themeContext;\n\n const [resolvedAppearance, setResolvedAppearance] = React.useState<'light' | 'dark' | null>(\n appearance === 'inherit' ? null : appearance,\n );\n const hasOnAppearanceChangeProp = onAppearanceChangeProp !== undefined;\n const handleAppearanceChangeProp = useCallbackRef(onAppearanceChangeProp);\n const handleAppearanceChange = React.useCallback(\n (value: 'light' | 'dark') => {\n const cleanup = disableAnimation();\n\n if (appearance !== 'inherit') {\n onAppearanceChange(value);\n return;\n }\n\n if (hasOnAppearanceChangeProp) {\n handleAppearanceChangeProp(value);\n } else {\n setResolvedAppearance(value);\n updateRootAppearanceClass(value);\n }\n\n cleanup();\n },\n [appearance, onAppearanceChange, hasOnAppearanceChangeProp, handleAppearanceChangeProp],\n );\n\n const autoMatchedGray = getMatchingGrayColor(accentColor);\n const resolvedGrayColor = grayColor === 'auto' ? autoMatchedGray : grayColor;\n\n const [copyState, setCopyState] = React.useState<'idle' | 'copying' | 'copied'>('idle');\n async function handleCopyThemeConfig() {\n const theme = {\n appearance: appearance === themePropDefs.appearance.default ? undefined : appearance,\n accentColor: accentColor === themePropDefs.accentColor.default ? undefined : accentColor,\n grayColor: grayColor === themePropDefs.grayColor.default ? undefined : grayColor,\n panelBackground:\n panelBackground === themePropDefs.panelBackground.default ? undefined : panelBackground,\n radius: radius === themePropDefs.radius.default ? undefined : radius,\n scaling: scaling === themePropDefs.scaling.default ? undefined : scaling,\n } satisfies GetPropDefTypes<typeof themePropDefs>;\n\n const props = Object.keys(theme)\n .filter((key) => theme[key as keyof typeof theme] !== undefined)\n .map((key) => `${key}=\"${theme[key as keyof typeof theme]}\"`)\n .join(' ');\n\n const textToCopy = props ? `<Theme ${props}>` : '<Theme>';\n\n setCopyState('copying');\n await navigator.clipboard.writeText(textToCopy);\n setCopyState('copied');\n setTimeout(() => setCopyState('idle'), 2000);\n }\n\n // quickly toggle appearance using \"D\" keypress\n React.useEffect(() => {\n function handleKeydown(event: KeyboardEvent) {\n const isModifierActive = event.altKey || event.ctrlKey || event.shiftKey || event.metaKey;\n const isKeyboardInputActive = document.activeElement?.closest(keyboardInputElement);\n const isKeyD = event.key?.toUpperCase() === 'D' && !isModifierActive;\n if (isKeyD && !isKeyboardInputActive) {\n handleAppearanceChange(resolvedAppearance === 'light' ? 'dark' : 'light');\n }\n }\n document.addEventListener('keydown', handleKeydown);\n return () => document.removeEventListener('keydown', handleKeydown);\n }, [handleAppearanceChange, resolvedAppearance]);\n\n React.useEffect(() => {\n const root = document.documentElement;\n const body = document.body;\n\n function update() {\n const hasDarkClass =\n root.classList.contains('dark') ||\n root.classList.contains('dark-theme') ||\n body.classList.contains('dark') ||\n body.classList.contains('dark-theme');\n\n if (appearance === 'inherit') {\n setResolvedAppearance(hasDarkClass ? 'dark' : 'light');\n } else {\n setResolvedAppearance(appearance);\n }\n }\n\n const classNameObserver = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n if (mutation.attributeName === 'class') {\n update();\n }\n });\n });\n\n update();\n\n // Observe <html> and <body> for `class` changes only when the appearance is inherited from them\n if (appearance === 'inherit') {\n classNameObserver.observe(root, { attributes: true });\n classNameObserver.observe(body, { attributes: true });\n }\n\n return () => classNameObserver.disconnect();\n }, [appearance]);\n\n return (\n <Flex direction=\"column\" gap=\"5\" {...contentProps} ref={forwardedRef}>\n <Heading size={{ initial: '3', sm: '5' }} trim=\"both\" as=\"h2\">\n Theme\n </Heading>\n <Flex direction=\"column\" gap=\"5\">\n {/* Accent color */}\n <ThemePanelSection>\n <ThemePanelHeading id=\"accent-color-title\">Accent color</ThemePanelHeading>\n <Flex wrap=\"wrap\" gap=\"2\" role=\"group\" aria-labelledby=\"accent-color-title\">\n {themePropDefs.accentColor.values.map((color) => (\n <Box asChild key={color}>\n <label\n className=\"rt-ThemePanelSwatch\"\n aria-label={upperFirst(color)}\n style={{ backgroundColor: `var(--${color}-9)` }}\n >\n <Tooltip\n content={`${upperFirst(color)}${\n accentColor === 'gray' && resolvedGrayColor !== 'gray'\n ? ` (${upperFirst(resolvedGrayColor)})`\n : ''\n }`}\n >\n <input\n className=\"rt-ThemePanelSwatchInput\"\n type=\"radio\"\n name=\"accentColor\"\n value={color}\n checked={accentColor === color}\n onChange={(event) =>\n onAccentColorChange(event.target.value as typeof accentColor)\n }\n />\n </Tooltip>\n </label>\n </Box>\n ))}\n </Flex>\n </ThemePanelSection>\n\n {/* Gray color */}\n <ThemePanelSection>\n <ThemePanelHeading id=\"gray-color-title\">Gray color</ThemePanelHeading>\n <Flex wrap=\"wrap\" gap=\"2\" role=\"group\" aria-labelledby=\"gray-color-title\">\n {themePropDefs.grayColor.values.map((gray) => (\n <Flex key={gray} asChild align=\"center\" justify=\"center\">\n <label\n className=\"rt-ThemePanelSwatch\"\n aria-label={upperFirst(gray)}\n style={{\n backgroundColor:\n gray === 'auto'\n ? `var(--${autoMatchedGray}-9)`\n : gray === 'gray'\n ? 'var(--gray-9)'\n : `var(--${gray}-9)`,\n // we override --gray so pure gray doesn't exist anymore\n // recover something as close as possible by desaturating\n filter: gray === 'gray' ? 'saturate(0)' : undefined,\n }}\n >\n <Tooltip\n content={`${upperFirst(gray)}${\n gray === 'auto' ? ` (${upperFirst(autoMatchedGray)})` : ''\n }`}\n >\n <input\n className=\"rt-ThemePanelSwatchInput\"\n type=\"radio\"\n name=\"grayColor\"\n value={gray}\n checked={grayColor === gray}\n onChange={(event) =>\n onGrayColorChange(event.target.value as typeof grayColor)\n }\n />\n </Tooltip>\n </label>\n </Flex>\n ))}\n </Flex>\n </ThemePanelSection>\n\n {/* Appearance */}\n <ThemePanelSection>\n <ThemePanelHeading id=\"appearance-title\">Appearance</ThemePanelHeading>\n <Grid columns=\"2\" gap=\"2\" role=\"group\" aria-labelledby=\"appearance-title\">\n {(['light', 'dark'] as const).map((value) => (\n <label key={value} className=\"rt-ThemePanelRadioCard\">\n <input\n className=\"rt-ThemePanelRadioCardInput\"\n type=\"radio\"\n name=\"appearance\"\n value={value}\n checked={resolvedAppearance === value}\n onChange={(event) =>\n handleAppearanceChange(event.target.value as 'light' | 'dark')\n }\n />\n <Flex align=\"center\" justify=\"center\" height=\"32px\" gap=\"2\">\n {value === 'light' ? (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ margin: '0 -1px' }}\n >\n <path\n d=\"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n ) : (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ margin: '0 -1px' }}\n >\n <path\n d=\"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n )}\n <Text size=\"1\" weight=\"medium\">\n {upperFirst(value)}\n </Text>\n </Flex>\n </label>\n ))}\n </Grid>\n </ThemePanelSection>\n\n {/* Radius */}\n <ThemePanelSection>\n <ThemePanelHeading id=\"radius-title\">Radius</ThemePanelHeading>\n <Flex gap=\"2\" role=\"group\" aria-labelledby=\"radius-title\" wrap=\"wrap\">\n {themePropDefs.radius.values.map((value) => (\n <Flex key={value} direction=\"column\" align=\"center\">\n <label className=\"rt-ThemePanelRadioCard\">\n <input\n className=\"rt-ThemePanelRadioCardInput\"\n type=\"radio\"\n name=\"radius\"\n id={`theme-panel-radius-${value}`}\n value={value}\n checked={radius === value}\n onChange={(event) => onRadiusChange(event.target.value as typeof radius)}\n />\n <Theme asChild radius={value}>\n <Box\n m=\"3\"\n width={{ initial: '24px', sm: '32px' }}\n height={{ initial: '24px', sm: '32px' }}\n style={{\n borderTopLeftRadius: value === 'full' ? '80%' : 'var(--radius-5)',\n backgroundImage:\n 'linear-gradient(to bottom right, var(--accent-3), var(--accent-4))',\n borderTop: '2px solid var(--accent-a8)',\n borderLeft: '2px solid var(--accent-a8)',\n }}\n />\n </Theme>\n </label>\n <Box asChild pt=\"2\">\n <Text asChild size=\"1\" color=\"gray\">\n <label htmlFor={`theme-panel-radius-${value}`}>{upperFirst(value)}</label>\n </Text>\n </Box>\n </Flex>\n ))}\n </Flex>\n </ThemePanelSection>\n\n {/* Scaling */}\n <ThemePanelSection>\n <ThemePanelHeading id=\"scaling-title\">Scaling</ThemePanelHeading>\n <Grid\n columns={{\n initial: 'repeat(3, 1fr)',\n sm: '5',\n }}\n gap=\"2\"\n role=\"group\"\n aria-labelledby=\"scaling-title\"\n >\n {themePropDefs.scaling.values.map((value) => (\n <label key={value} className=\"rt-ThemePanelRadioCard\" aria-label={`Scaling ${value}`}>\n <input\n className=\"rt-ThemePanelRadioCardInput\"\n type=\"radio\"\n name=\"scaling\"\n value={value}\n checked={scaling === value}\n onChange={(event) => onScalingChange(event.target.value as typeof scaling)}\n />\n\n <Flex align=\"center\" justify=\"center\" height=\"32px\">\n <Theme asChild scaling={value}>\n <Flex align=\"center\" justify=\"center\">\n <Text size=\"1\" weight=\"medium\">\n {upperFirst(value)}\n </Text>\n </Flex>\n </Theme>\n </Flex>\n </label>\n ))}\n </Grid>\n </ThemePanelSection>\n\n {/* Panel background */}\n <ThemePanelSection>\n <Flex align=\"center\" gap=\"2\">\n <ThemePanelHeading id=\"panel-background-title\">Panel background</ThemePanelHeading>\n <Popover.Root>\n <Popover.Trigger>\n <IconButton size=\"1\" variant=\"ghost\" color=\"gray\">\n <AccessibleIcon label=\"Learn more about panel background options\">\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </svg>\n </AccessibleIcon>\n </IconButton>\n </Popover.Trigger>\n <Popover.Content\n size=\"1\"\n width=\"220px\"\n maxWidth=\"90svw\"\n minWidth=\"0\"\n side=\"top\"\n align=\"center\"\n >\n <Text as=\"p\" size=\"1\">\n Whether Card and Table panels are translucent, showing some of the background\n behind them.\n </Text>\n </Popover.Content>\n </Popover.Root>\n </Flex>\n <Grid\n columns={{ initial: '1', sm: '2' }}\n rows={{ initial: '2', sm: '1' }}\n gap=\"2\"\n role=\"group\"\n aria-labelledby=\"panel-background-title\"\n >\n {themePropDefs.panelBackground.values.map((value) => (\n <label key={value} className=\"rt-ThemePanelRadioCard\">\n <input\n className=\"rt-ThemePanelRadioCardInput\"\n type=\"radio\"\n name=\"panelBackground\"\n value={value}\n checked={panelBackground === value}\n onChange={(event) =>\n onPanelBackgroundChange(event.target.value as typeof panelBackground)\n }\n />\n <Flex align=\"center\" justify=\"center\" height=\"32px\" gap=\"2\">\n {value === 'solid' ? (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ margin: '0 -2px' }}\n >\n <path\n d=\"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n ) : (\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ margin: '0 -2px' }}\n >\n <path\n opacity=\".05\"\n d=\"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".1\"\n d=\"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".15\"\n d=\"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".2\"\n d=\"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".25\"\n d=\"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".3\"\n d=\"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".35\"\n d=\"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".4\"\n d=\"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".45\"\n d=\"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n opacity=\".5\"\n d=\"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n <path\n d=\"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n ></path>\n </svg>\n )}\n <Text size=\"1\" weight=\"medium\">\n {upperFirst(value)}\n </Text>\n </Flex>\n </label>\n ))}\n </Grid>\n </ThemePanelSection>\n </Flex>\n <Button style={{ width: '100%' }} onClick={handleCopyThemeConfig}>\n {copyState === 'copied' ? 'Copied' : 'Copy Theme'}\n </Button>\n </Flex>\n );\n },\n);\nThemePanelContent.displayName = 'ThemePanelContent';\n\nfunction ThemePanelSection(\n props: Omit<React.ComponentPropsWithoutRef<typeof Flex>, 'asChild' | 'direction' | 'gap'>,\n) {\n return (\n <Flex direction=\"column\" gap=\"3\" asChild {...props}>\n <section>{props.children}</section>\n </Flex>\n );\n}\n\nfunction ThemePanelHeading(props: React.ComponentPropsWithoutRef<typeof Heading>) {\n return <Heading as=\"h3\" size={{ initial: '1', sm: '2' }} {...props} />;\n}\n\n// https://github.com/pacocoursey/next-themes/blob/main/packages/next-themes/src/index.tsx#L285\nfunction disableAnimation() {\n const css = document.createElement('style');\n css.appendChild(\n document.createTextNode(\n `*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`,\n ),\n );\n document.head.appendChild(css);\n\n return () => {\n // Force restyle\n (() => window.getComputedStyle(document.body))();\n\n // Wait for next tick before removing\n setTimeout(() => {\n document.head.removeChild(css);\n }, 1);\n };\n}\n\nfunction upperFirst(string: string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nfunction updateRootAppearanceClass(appearance: 'light' | 'dark') {\n const root = document.documentElement;\n const hasLightTheme = root.classList.contains('light-theme');\n const hasDarkTheme = root.classList.contains('dark-theme');\n const hasLight = root.classList.contains('light');\n const hasDark = root.classList.contains('dark');\n\n if (hasLightTheme || hasDarkTheme) {\n root.classList.remove('light-theme', 'dark-theme');\n root.style.colorScheme = appearance;\n root.classList.add(`${appearance}-theme`);\n }\n\n if (hasLight || hasDark) {\n root.classList.remove('light', 'dark');\n root.style.colorScheme = appearance;\n root.classList.add(appearance);\n }\n\n if (!hasLightTheme && !hasDarkTheme && !hasLight && !hasDark) {\n root.style.colorScheme = appearance;\n root.classList.add(appearance);\n }\n}\n\nexport { ThemePanel, ThemePanelContent };\nexport type { ThemePanelProps, ThemePanelContentProps };\n", "import { AccessibleIcon as AccessibleIconPrimitive } from 'radix-ui';\nexport const AccessibleIcon = AccessibleIconPrimitive.Root;\nexport type AccessibleIconProps = AccessibleIconPrimitive.AccessibleIconProps;\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Slot } from './slot.js';\nimport { boxPropDefs } from './box.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { BoxOwnProps } from './box.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype BoxElement = React.ElementRef<'div'>;\ninterface CommonBoxProps extends MarginProps, LayoutProps, BoxOwnProps {}\ntype BoxDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype BoxSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype BoxProps = CommonBoxProps & (BoxSpanProps | BoxDivProps);\n\nconst Box = React.forwardRef<BoxElement, BoxProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...boxProps\n } = extractProps(props, boxPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...boxProps} ref={forwardedRef} className={classNames('rt-Box', className)} />;\n});\nBox.displayName = 'Box';\n\nexport { Box };\nexport type { BoxProps };\n", "import { Slot as SlotPrimitive } from 'radix-ui';\nexport const Root = SlotPrimitive.Root;\nexport const Slot = SlotPrimitive.Root;\nexport const Slottable: typeof SlotPrimitive.Slottable = SlotPrimitive.Slottable;\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst as = ['div', 'span'] as const;\nconst displayValues = ['none', 'inline', 'inline-block', 'block', 'contents'] as const;\n\nconst boxPropDefs = {\n /**\n * Controls whether to render **div** or **span**\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n as: { type: 'enum', values: as, default: 'div' },\n ...asChildPropDef,\n /**\n * Sets the CSS **display** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * display=\"inline-block\"\n * display={{ sm: 'none', lg: 'block' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/display\n */\n display: {\n type: 'enum',\n className: 'rt-r-display',\n values: displayValues,\n responsive: true,\n },\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n display: PropDef<(typeof displayValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype BoxOwnProps = GetPropDefTypes<typeof boxPropDefs & typeof asChildPropDef>;\n\nexport { boxPropDefs };\nexport type { BoxOwnProps };\n", "import classNames from 'classnames';\n\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef>\n ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T]\n : never;\n\nfunction mergePropDefs<T extends Record<string, PropDef>[]>(...args: T): Record<string, PropDef> {\n return Object.assign({}, ...args);\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<\n P extends { className?: string; style?: React.CSSProperties; [key: string]: any },\n T extends Record<string, PropDef>[]\n>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n let className: string | undefined;\n let style: ReturnType<typeof mergeStyles>;\n const extractedProps = { ...props };\n const allPropDefs = mergePropDefs(...propDefs);\n\n for (const key in allPropDefs) {\n let value = extractedProps[key];\n const propDef = allPropDefs[key];\n\n // Apply prop def defaults\n if (propDef.default !== undefined && value === undefined) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.type === 'enum') {\n const values = [propDef.default, ...propDef.values];\n\n if (!values.includes(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n }\n\n // Apply the value with defaults\n (extractedProps as Record<string, any>)[key] = value;\n\n if ('className' in propDef && propDef.className) {\n delete extractedProps[key];\n\n const isResponsivePropDef = 'responsive' in propDef;\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!value || (isResponsiveObject(value) && !isResponsivePropDef)) {\n continue;\n }\n\n if (isResponsiveObject(value)) {\n // Apply prop def defaults to the `initial` breakpoint\n if (propDef.default !== undefined && value.initial === undefined) {\n value.initial = propDef.default;\n }\n\n // Apply the default value to the `initial` breakpoint when it is not a valid enum value\n if (propDef.type === 'enum') {\n const values = [propDef.default, ...propDef.values];\n\n if (!values.includes(value.initial)) {\n value.initial = propDef.default;\n }\n }\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className,\n propValues: propDef.values,\n parseValue: propDef.parseValue,\n });\n\n className = classNames(className, propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const propDefValues = propDef.type === 'string' ? [] : propDef.values;\n\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className,\n customProperties: propDef.customProperties,\n propValues: propDefValues,\n parseValue: propDef.parseValue,\n value,\n });\n\n style = mergeStyles(style, propCustomProperties);\n className = classNames(className, propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean' && value) {\n // TODO handle responsive boolean props\n className = classNames(className, propDef.className);\n continue;\n }\n }\n }\n\n extractedProps.className = classNames(className, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps;\n}\n\nexport { extractProps };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({\n allowArbitraryValues,\n value,\n className,\n propValues,\n parseValue = (value) => value,\n}: GetResponsiveClassNamesOptions): string | undefined {\n const classNames: string[] = [];\n\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string' && propValues.includes(value)) {\n return getBaseClassName(className, value, parseValue);\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (propValues.includes(value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.join(' ');\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(\n className: string,\n value: string,\n parseValue: (value: string) => string | undefined\n): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({\n customProperties,\n value,\n propValues,\n parseValue = (value) => value,\n}: GetResponsiveCustomPropertiesOptions) {\n let styles: Record<string, string | undefined> = {};\n\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && propValues.includes(value))) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n styles = Object.fromEntries(customProperties.map((prop) => [prop, value]));\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (propValues.includes(value)) {\n continue;\n }\n\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = value;\n }\n }\n }\n\n for (const key in styles) {\n const value = styles[key];\n if (value !== undefined) {\n styles[key] = parseValue(value);\n }\n }\n\n return styles;\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst paddingValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst paddingPropDefs = {\n /**\n * Sets the CSS **padding** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * p=\"4\"\n * p=\"100px\"\n * p={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n */\n p: {\n type: 'enum | string',\n className: 'rt-r-p',\n customProperties: ['--p'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** and **padding-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * px=\"4\"\n * px=\"100px\"\n * px={{ sm: '6', lg: '9' }}\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 className: 'rt-r-px',\n customProperties: ['--pl', '--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** and **padding-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * py=\"4\"\n * py=\"100px\"\n * py={{ sm: '6', lg: '9' }}\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 className: 'rt-r-py',\n customProperties: ['--pt', '--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pt=\"4\"\n * pt=\"100px\"\n * pt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n */\n pt: {\n type: 'enum | string',\n className: 'rt-r-pt',\n customProperties: ['--pt'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pr=\"4\"\n * pr=\"100px\"\n * pr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n pr: {\n type: 'enum | string',\n className: 'rt-r-pr',\n customProperties: ['--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pb=\"4\"\n * pb=\"100px\"\n * pb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n pb: {\n type: 'enum | string',\n className: 'rt-r-pb',\n customProperties: ['--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pl=\"4\"\n * pl=\"100px\"\n * pl={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n */\n pl: {\n type: 'enum | string',\n className: 'rt-r-pl',\n customProperties: ['--pl'],\n values: paddingValues,\n responsive: true,\n },\n} satisfies {\n p: PropDef<(typeof paddingValues)[number]>;\n px: PropDef<(typeof paddingValues)[number]>;\n py: PropDef<(typeof paddingValues)[number]>;\n pt: PropDef<(typeof paddingValues)[number]>;\n pr: PropDef<(typeof paddingValues)[number]>;\n pb: PropDef<(typeof paddingValues)[number]>;\n pl: PropDef<(typeof paddingValues)[number]>;\n};\n\ntype PaddingProps = GetPropDefTypes<typeof paddingPropDefs>;\n\nexport { paddingPropDefs };\nexport type { PaddingProps };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst heightPropDefs = {\n /**\n * Sets the CSS **height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * height=\"100px\"\n * height={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/height\n */\n height: {\n type: 'string',\n className: 'rt-r-h',\n customProperties: ['--height'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minHeight=\"100px\"\n * minHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-height\n */\n minHeight: {\n type: 'string',\n className: 'rt-r-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxHeight=\"100px\"\n * maxHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-height\n */\n maxHeight: {\n type: 'string',\n className: 'rt-r-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst widthPropDefs = {\n /**\n * Sets the CSS **width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * width=\"100px\"\n * width={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/width\n */\n width: {\n type: 'string',\n className: 'rt-r-w',\n customProperties: ['--width'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minWidth=\"100px\"\n * minWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-width\n */\n minWidth: {\n type: 'string',\n className: 'rt-r-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxWidth=\"100px\"\n * maxWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n */\n maxWidth: {\n type: 'string',\n className: 'rt-r-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n", "import { paddingPropDefs } from './padding.props.js';\nimport { heightPropDefs } from './height.props.js';\nimport { widthPropDefs } from './width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst overflowValues = ['visible', 'hidden', 'clip', 'scroll', 'auto'] as const;\nconst positionValues = ['static', 'relative', 'absolute', 'fixed', 'sticky'] as const;\n// prettier-ignore\nconst positionEdgeValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9'] as const;\nconst flexShrinkValues = ['0', '1'] as const;\nconst flexGrowValues = ['0', '1'] as const;\nconst alignSelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifySelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\n\nconst layoutPropDefs = {\n ...paddingPropDefs,\n ...widthPropDefs,\n ...heightPropDefs,\n /**\n * Sets the CSS **position** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * position=\"absolute\"\n * position={{ sm: 'absolute', lg: 'sticky' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/position\n */\n position: {\n type: 'enum',\n className: 'rt-r-position',\n values: positionValues,\n responsive: true,\n },\n /**\n * Sets the CSS **inset** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * inset=\"4\"\n * inset=\"100px\"\n * inset={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/inset\n */\n inset: {\n type: 'enum | string',\n className: 'rt-r-inset',\n customProperties: ['--inset'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * top=\"4\"\n * top=\"100px\"\n * top={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/top\n */\n top: {\n type: 'enum | string',\n className: 'rt-r-top',\n customProperties: ['--top'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * right=\"4\"\n * right=\"100px\"\n * right={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/right\n */\n right: {\n type: 'enum | string',\n className: 'rt-r-right',\n customProperties: ['--right'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * bottom=\"4\"\n * bottom=\"100px\"\n * bottom={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/bottom\n */\n bottom: {\n type: 'enum | string',\n className: 'rt-r-bottom',\n customProperties: ['--bottom'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * left=\"4\"\n * left=\"100px\"\n * left={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/left\n */\n left: {\n type: 'enum | string',\n className: 'rt-r-left',\n customProperties: ['--left'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflow=\"hidden\"\n * overflow={{ sm: 'hidden', lg: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflow: {\n type: 'enum',\n className: 'rt-r-overflow',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-x** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowX=\"hidden\"\n * overflowX={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowX: {\n type: 'enum',\n className: 'rt-r-ox',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-y** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowY=\"hidden\"\n * overflowY={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowY: {\n type: 'enum',\n className: 'rt-r-oy',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-basis** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexBasis=\"0\"\n * flexBasis=\"100%\"\n * flexBasis={{ sm: '200px', lg: 'auto' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis\n */\n flexBasis: {\n type: 'string',\n className: 'rt-r-fb',\n customProperties: ['--flex-basis'],\n responsive: true,\n },\n /**\n * Sets the CSS **flex-shrink** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexShrink=\"0\"\n * flexShrink=\"1\"\n * flexShrink={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink\n */\n flexShrink: {\n type: 'enum | string',\n className: 'rt-r-fs',\n customProperties: ['--flex-shrink'],\n values: flexShrinkValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-grow** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexGrow=\"0\"\n * flexGrow=\"1\"\n * flexGrow={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow\n */\n flexGrow: {\n type: 'enum | string',\n className: 'rt-r-fg',\n customProperties: ['--flex-grow'],\n values: flexGrowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-area** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridArea=\"header\"\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area\n */\n gridArea: {\n type: 'string',\n className: 'rt-r-ga',\n customProperties: ['--grid-area'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumn=\"1\"\n * gridColumn=\"1 / -1\"\n * gridColumn={{ sm: '1 / 3', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column\n */\n gridColumn: {\n type: 'string',\n className: 'rt-r-gc',\n customProperties: ['--grid-column'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnStart=\"1\"\n * gridColumnStart=\"auto\"\n * gridColumnStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start\n */\n gridColumnStart: {\n type: 'string',\n className: 'rt-r-gcs',\n customProperties: ['--grid-column-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnEnd=\"1\"\n * gridColumnEnd=\"auto\"\n * gridColumnEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end\n */\n gridColumnEnd: {\n type: 'string',\n className: 'rt-r-gce',\n customProperties: ['--grid-column-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRow=\"1\"\n * gridRow=\"auto\"\n * gridRow={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row\n */\n gridRow: {\n type: 'string',\n className: 'rt-r-gr',\n customProperties: ['--grid-row'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowStart=\"1\"\n * gridRowStart=\"auto\"\n * gridRowStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start\n */\n gridRowStart: {\n type: 'string',\n className: 'rt-r-grs',\n customProperties: ['--grid-row-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowEnd=\"1\"\n * gridRowEnd=\"auto\"\n * gridRowEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end\n */\n gridRowEnd: {\n type: 'string',\n className: 'rt-r-gre',\n customProperties: ['--grid-row-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **align-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * alignSelf=\"center\"\n * alignSelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-self\n */\n alignSelf: {\n type: 'enum',\n className: 'rt-r-as',\n values: alignSelfValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justifySelf=\"center\"\n * justifySelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self\n */\n justifySelf: {\n type: 'enum',\n className: 'rt-r-js',\n values: justifySelfValues,\n responsive: true,\n },\n} satisfies {\n position: PropDef<(typeof positionValues)[number]>;\n inset: PropDef<(typeof positionEdgeValues)[number]>;\n top: PropDef<(typeof positionEdgeValues)[number]>;\n right: PropDef<(typeof positionEdgeValues)[number]>;\n bottom: PropDef<(typeof positionEdgeValues)[number]>;\n left: PropDef<(typeof positionEdgeValues)[number]>;\n overflow: PropDef<(typeof overflowValues)[number]>;\n overflowX: PropDef<(typeof overflowValues)[number]>;\n overflowY: PropDef<(typeof overflowValues)[number]>;\n flexBasis: PropDef<string>;\n flexShrink: PropDef<(typeof flexShrinkValues)[number]>;\n flexGrow: PropDef<(typeof flexGrowValues)[number]>;\n gridColumn: PropDef<string>;\n gridColumnStart: PropDef<string>;\n gridColumnEnd: PropDef<string>;\n gridRow: PropDef<string>;\n gridRowStart: PropDef<string>;\n gridRowEnd: PropDef<string>;\n gridArea: PropDef<string>;\n alignSelf: PropDef<(typeof alignSelfValues)[number]>;\n justifySelf: PropDef<(typeof justifySelfValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype LayoutProps = GetPropDefTypes<\n typeof paddingPropDefs & typeof widthPropDefs & typeof heightPropDefs & typeof layoutPropDefs\n>;\n\nexport { layoutPropDefs };\nexport type { LayoutProps };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\n// prettier-ignore\nconst marginValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10', '-11', '-12'] as const;\n\nconst marginPropDefs = {\n /**\n * Sets the CSS **margin** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * m=\"4\"\n * m=\"100px\"\n * m={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-m',\n customProperties: ['--m'],\n },\n /**\n * Sets the CSS **margin-left** and **margin-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mx=\"4\"\n * mx=\"100px\"\n * mx={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-mx',\n customProperties: ['--ml', '--mr'],\n },\n /**\n * Sets the CSS **margin-top** and **margin-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * my=\"4\"\n * my=\"100px\"\n * my={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-my',\n customProperties: ['--mt', '--mb'],\n },\n /**\n * Sets the CSS **margin-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mt=\"4\"\n * mt=\"100px\"\n * mt={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-mt',\n customProperties: ['--mt'],\n },\n /**\n * Sets the CSS **margin-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mr=\"4\"\n * mr=\"100px\"\n * mr={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-mr',\n customProperties: ['--mr'],\n },\n /**\n * Sets the CSS **margin-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mb=\"4\"\n * mb=\"100px\"\n * mb={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-mb',\n customProperties: ['--mb'],\n },\n /**\n * Sets the CSS **margin-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * ml=\"4\"\n * ml=\"100px\"\n * ml={{ sm: '6', lg: '9' }}\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 responsive: true,\n className: 'rt-r-ml',\n customProperties: ['--ml'],\n },\n} satisfies {\n m: PropDef<(typeof marginValues)[number]>;\n mx: PropDef<(typeof marginValues)[number]>;\n my: PropDef<(typeof marginValues)[number]>;\n mt: PropDef<(typeof marginValues)[number]>;\n mr: PropDef<(typeof marginValues)[number]>;\n mb: PropDef<(typeof marginValues)[number]>;\n ml: PropDef<(typeof marginValues)[number]>;\n};\n\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport { Tooltip } from './tooltip.js';\nimport { useTooltipWrapper } from '../hooks/use-tooltip-wrapper.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\n/**\n * Styles that can be overridden for a particular interaction state\n */\ninterface ButtonOverrideStateStyles {\n color?: string;\n background?: string;\n backgroundColor?: string;\n boxShadow?: string;\n filter?: string;\n outline?: string;\n outlineOffset?: string;\n opacity?: string | number;\n}\n\n/**\n * Full set of override styles keyed by interaction state\n */\ninterface ButtonOverrideStyles {\n /** Default/idle state styles */\n normal?: ButtonOverrideStateStyles;\n /** Hover state styles */\n hover?: ButtonOverrideStateStyles;\n /** Active (mouse down) state styles */\n active?: ButtonOverrideStateStyles;\n /** Toggle pressed state styles (data-state=\"on\") */\n pressed?: ButtonOverrideStateStyles;\n /** Open state styles (e.g., when used as a trigger) */\n open?: ButtonOverrideStateStyles;\n /** Disabled state styles */\n disabled?: ButtonOverrideStateStyles;\n /** Focus-visible outline styles */\n focus?: Pick<ButtonOverrideStateStyles, 'outline' | 'outlineOffset'>;\n}\n\ntype ButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Tooltip configuration props that can be passed to Button\n * These props are forwarded to the underlying Tooltip component\n */\ninterface ButtonTooltipProps {\n /** Content to display in the tooltip on hover/focus */\n tooltip?: React.ReactNode;\n /** Side of the button where the tooltip should appear */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n /** Alignment of the tooltip relative to the button */\n tooltipAlign?: 'start' | 'center' | 'end';\n /** Delay before showing the tooltip (in milliseconds) */\n tooltipDelayDuration?: number;\n /** Whether to disable hoverable content behavior */\n tooltipDisableHoverableContent?: boolean;\n}\n\n/**\n * Core Button props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with tooltip functionality\n */\ntype ButtonOwnProps = Omit<BaseButtonProps, 'as'> &\n ButtonTooltipProps & {\n /**\n * When using variant=\"override\", provide token-based styles per state.\n * We propagate these into CSS variables consumed by the override variant.\n */\n overrideStyles?: ButtonOverrideStyles;\n };\n\n/**\n * Polymorphic Button props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype ButtonProps<C extends React.ElementType = 'button'> = ButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof ButtonOwnProps>;\n\n/**\n * Button component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype ButtonComponent = <C extends React.ElementType = 'button'>(props: ButtonProps<C> & { ref?: React.ForwardedRef<ButtonElement> }) => React.ReactElement | null;\n\n/**\n * Button component for triggering actions throughout your interface\n *\n * The Button component is the primary interactive element in the Kookie User Interface.\n * It provides six visual variants, four sizes, comprehensive color options, and built-in\n * tooltip support. The component automatically handles icon sizing, supports responsive\n * layouts, and provides accessibility compliance out of the box.\n *\n * @example\n * ```tsx\n * // Basic button\n * <Button>Click me</Button>\n *\n * // Button with variant and size\n * <Button variant=\"solid\" size=\"3\">Primary Action</Button>\n *\n * // Button with tooltip\n * <Button tooltip=\"Save your progress\">Save</Button>\n *\n * // Polymorphic button as link\n * <Button as=\"a\" href=\"/dashboard\">Go to Dashboard</Button>\n * ```\n */\nconst Button = React.forwardRef(\n (\n { className, style, tooltip, tooltipSide = 'top', tooltipAlign = 'center', tooltipDelayDuration, tooltipDisableHoverableContent, overrideStyles, ...props }: ButtonProps,\n forwardedRef: React.ForwardedRef<ButtonElement>,\n ) => {\n // Use shared tooltip wrapper hook for accessibility props\n const { tooltipId, hasTooltip, accessibilityProps: tooltipAccessibilityProps } = useTooltipWrapper(tooltip);\n\n // Create the base button element with tooltip accessibility props\n // Map overrideStyles to CSS variables consumed by the override variant rules\n const overrideVars = React.useMemo(() => {\n if (!overrideStyles) return undefined;\n const vars: Record<string, string | number> = {};\n const setVar = (key: string, value: string | number | undefined) => {\n if (value !== undefined) vars[key] = value;\n };\n const apply = (prefix: string, s?: ButtonOverrideStateStyles) => {\n if (!s) return;\n setVar(`--button-override-${prefix}color`, s.color);\n setVar(`--button-override-${prefix}background`, s.background);\n setVar(`--button-override-${prefix}background-color`, s.backgroundColor);\n setVar(`--button-override-${prefix}box-shadow`, s.boxShadow);\n setVar(`--button-override-${prefix}filter`, s.filter);\n setVar(`--button-override-${prefix}outline`, s.outline);\n setVar(`--button-override-${prefix}outline-offset`, s.outlineOffset);\n setVar(`--button-override-${prefix}opacity`, s.opacity);\n };\n\n apply('', overrideStyles.normal);\n apply('hover-', overrideStyles.hover);\n apply('active-', overrideStyles.active);\n apply('pressed-', overrideStyles.pressed);\n apply('open-', overrideStyles.open);\n apply('disabled-', overrideStyles.disabled);\n\n if (overrideStyles.focus) {\n setVar('--button-override-focus-outline', overrideStyles.focus.outline);\n setVar('--button-override-focus-outline-offset', overrideStyles.focus.outlineOffset);\n }\n\n return vars as React.CSSProperties;\n }, [overrideStyles]);\n\n // Combine override styles with user-provided styles\n const combinedStyle = React.useMemo(() => (overrideVars ? { ...overrideVars, ...style } : style), [overrideVars, style]);\n\n const button = <BaseButton {...props} {...tooltipAccessibilityProps} ref={forwardedRef} className={classNames('rt-Button', className)} style={combinedStyle} />;\n\n // If no tooltip is provided, return the button as-is for better performance\n if (!hasTooltip) {\n return button;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n // This creates a compound component that handles both button and tooltip functionality\n return (\n <Tooltip content={tooltip} side={tooltipSide} align={tooltipAlign} delayDuration={tooltipDelayDuration} disableHoverableContent={tooltipDisableHoverableContent} id={tooltipId}>\n {button}\n </Tooltip>\n );\n },\n) as ButtonComponent & { displayName?: string };\n\nButton.displayName = 'Button';\n\nexport { Button };\nexport type { ButtonProps, ButtonOverrideStyles, ButtonOverrideStateStyles };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\nimport { composeRefs } from 'radix-ui/internal';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n/**\n * Polymorphic BaseButton props that support rendering as different HTML elements\n * Uses the proper ComponentPropsWithout pattern for type safety\n * @template C - The element type to render as (defaults to 'button')\n */\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\n/**\n * BaseButton props interface that combines all available props\n */\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\n/**\n * BaseButton component that provides the core button functionality\n *\n * This is the foundational button component that handles all the complex logic\n * including loading states, accessibility, performance optimizations, and\n * polymorphic rendering. It's used by Button, IconButton, and other button\n * variants to ensure consistent behavior across the design system.\n *\n * Key features:\n * - Loading state with spinner and accessibility announcements\n * - Performance optimizations for backdrop-filter effects\n * - Comprehensive accessibility support\n * - Polymorphic rendering support\n * - Material/panel background handling\n *\n * @example\n * ```tsx\n * // Basic usage\n * <BaseButton>Click me</BaseButton>\n *\n * // With loading state\n * <BaseButton loading>Processing...</BaseButton>\n *\n * // Polymorphic rendering\n * <BaseButton as=\"a\" href=\"/link\">Link Button</BaseButton>\n * ```\n */\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n\n // Extract button-specific props from the combined props object\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n material,\n panelBackground,\n flush,\n disabled = props.loading, // Loading state automatically disables the button\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n // Show deprecation warning for panelBackground when used\n // This helps developers migrate to the new material prop\n React.useEffect(() => {\n if (props.panelBackground !== undefined) {\n console.warn('Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.');\n }\n }, [props.panelBackground]);\n\n // Material takes precedence over panelBackground for backward compatibility\n const effectiveMaterial = material ?? panelBackground;\n\n // Will-change cleanup for backdrop-filter performance optimization\n // This prevents layout thrashing when using translucent materials\n const buttonRef = React.useRef<HTMLElement>(null);\n\n // Use a ref to track current material value to avoid stale closures in setTimeout\n const materialRef = React.useRef(effectiveMaterial);\n materialRef.current = effectiveMaterial;\n\n React.useEffect(() => {\n const button = buttonRef.current;\n if (!button) return;\n\n const hasTranslucentMaterial = effectiveMaterial === 'translucent';\n\n if (hasTranslucentMaterial) {\n // Add will-change when material is translucent to optimize rendering\n button.style.setProperty('will-change', 'backdrop-filter');\n\n // Track timeout for cleanup\n let timeoutId: ReturnType<typeof setTimeout> | undefined;\n\n // Clean up will-change after transition completes to prevent memory leaks\n const cleanup = () => {\n const transitionDuration = getComputedStyle(button).getPropertyValue('--duration-2') || '75ms';\n const duration = parseInt(transitionDuration) || 75;\n\n timeoutId = setTimeout(() => {\n // Use ref to get current value, not stale closure value\n if (button && materialRef.current !== 'translucent') {\n button.style.setProperty('will-change', 'auto');\n }\n }, duration);\n };\n\n // Listen for material changes to clean up will-change property\n const observer = new MutationObserver(cleanup);\n observer.observe(button, { attributes: true, attributeFilter: ['data-material'] });\n\n return () => {\n if (timeoutId) clearTimeout(timeoutId);\n observer.disconnect();\n button.style.setProperty('will-change', 'auto');\n };\n } else {\n // Remove will-change when material is not translucent\n button.style.setProperty('will-change', 'auto');\n }\n }, [effectiveMaterial]);\n\n // asChild takes precedence over as prop for Radix Slot integration\n // When asChild is true, we use Slot.Root to merge props onto the child element\n // When asChild is false, we render as the specified element (or button by default)\n const Comp = asChild ? Slot.Root : (as || 'button');\n\n // Only pass disabled for elements that support it\n // This prevents invalid HTML attributes on unsupported elements\n const shouldPassDisabled = asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n // Determine if we are rendering a real <button> element so we can set a safe\n // default type. Native <button> defaults to type=\"submit\" which can cause\n // accidental form submissions. We default to type=\"button\" unless the user\n // explicitly provided a type or we're using asChild (unknown underlying node).\n const isNativeButtonElement = !asChild && (!as || as === 'button');\n const hasExplicitTypeAttribute = 'type' in (baseButtonProps as Record<string, unknown>);\n\n // Generate unique ID for loading announcements\n const loadingId = React.useId();\n const describedById = props.loading ? `${loadingId}-loading` : undefined;\n\n // Extract button text for accessibility announcements\n const buttonText = React.useMemo(() => {\n if (typeof children === 'string') return children;\n if (React.isValidElement(children) && typeof (children.props as any)?.children === 'string') {\n return (children.props as any).children;\n }\n return 'button';\n }, [children]);\n\n // Enhanced accessibility props for loading state\n // These ensure screen readers announce the loading state properly\n const accessibilityProps = React.useMemo(() => {\n if (props.loading) {\n return {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'aria-describedby': describedById,\n 'aria-label': `${buttonText} (loading)`,\n };\n }\n return {};\n }, [props.loading, describedById, buttonText]);\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n data-material={effectiveMaterial}\n data-panel-background={effectiveMaterial}\n data-flush={flush ? 'true' : undefined}\n {...baseButtonProps}\n {...accessibilityProps}\n ref={composeRefs(buttonRef, forwardedRef)}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n {...(isNativeButtonElement && !hasExplicitTypeAttribute ? { type: 'button' } : {})}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n\n {/* Enhanced accessibility for loading state */}\n <VisuallyHidden>\n <span id={describedById}>{buttonText} is loading, please wait...</span>\n {children}\n </VisuallyHidden>\n\n {/* Centered spinner overlay during loading state */}\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)} aria-hidden=\"true\" />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Defines accent color for descendant text components\u00A0with `highContrast={true}`.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst highContrastPropDef = {\n highContrast: {\n type: 'boolean',\n className: 'rt-high-contrast',\n default: undefined,\n },\n} satisfies {\n highContrast: PropDef<boolean>;\n};\n\nexport { highContrastPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\n/**\n * Available button sizes for responsive design\n * Size 1: 24px - Compact for toolbars and dense interfaces\n * Size 2: 32px - Standard for most interface contexts\n * Size 3: 40px - Large for important actions and mobile touch targets\n * Size 4: 48px - Extra large for hero sections and maximum impact\n */\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Available button variants for different visual contexts\n * - classic: Premium, sophisticated appearance\n * - solid: Primary actions that should be noticed first\n * - soft: Content-heavy interfaces, natural integration\n * - surface: Elevated appearance with subtle depth\n * - outline: Secondary actions that support primary actions\n * - ghost: Utility functions that don't compete for attention\n */\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost', 'override'] as const;\n\n/**\n * Available panel background options (deprecated)\n * @deprecated Use `materials` instead\n */\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\n/**\n * Available material options for visual rendering\n * - solid: Opaque backgrounds and borders\n * - translucent: Elevated effects with depth and visual separation\n */\nconst materials = ['solid', 'translucent'] as const;\n\n/**\n * Base button prop definitions that define the component's API\n * \n * These props are used by all button variants (Button, IconButton, etc.)\n * to ensure consistent behavior and styling across the design system.\n * \n * Key features:\n * - Responsive sizing with mobile-first approach\n * - Six visual variants for different interface contexts\n * - Comprehensive color system with semantic meanings\n * - Loading states with automatic accessibility\n * - Material system for visual depth and elevation\n * - Polymorphic rendering support via asChild\n * \n * @example\n * ```tsx\n * // Basic button with default props\n * <BaseButton>Click me</BaseButton>\n * \n * // Button with custom size and variant\n * <BaseButton size=\"3\" variant=\"solid\">Primary Action</BaseButton>\n * \n * // Button with loading state\n * <BaseButton loading>Processing...</BaseButton>\n * \n * // Button with material and high contrast\n * <BaseButton material=\"translucent\" highContrast>Elevated Button</BaseButton>\n * ```\n */\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n /**\n * Visual variant that determines the button's appearance and context\n */\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n */\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n */\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n /**\n * Material type for visual rendering and depth effects\n * Controls how the button renders its visual elements\n */\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Flush mode that removes visual padding for seamless text integration\n * Only effective with ghost variant\n */\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { Slot } from './slot.js';\nimport { flexPropDefs } from './flex.props.js';\n\nimport type { FlexOwnProps } from './flex.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\n\ntype FlexElement = React.ElementRef<'div'>;\ninterface CommonFlexProps extends MarginProps, LayoutProps, FlexOwnProps {}\ntype FlexDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype FlexSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype FlexProps = CommonFlexProps & (FlexSpanProps | FlexDivProps);\n\nconst Flex = React.forwardRef<FlexElement, FlexProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...flexProps\n } = extractProps(props, flexPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...flexProps} ref={forwardedRef} className={classNames('rt-Flex', className)} />;\n});\nFlex.displayName = 'Flex';\n\nexport { Flex };\nexport type { FlexProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst gapValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst gapPropDefs = {\n /**\n * Sets the CSS **gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gap=\"4\"\n * gap=\"20px\"\n * gap={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/gap\n */\n gap: {\n type: 'enum | string',\n className: 'rt-r-gap',\n customProperties: ['--gap'],\n values: gapValues,\n responsive: true,\n },\n /**\n * Sets the CSS **row-gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gapX=\"4\"\n * gapX=\"20px\"\n * gapX={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/row-gap\n */\n gapX: {\n type: 'enum | string',\n className: 'rt-r-cg',\n customProperties: ['--column-gap'],\n values: gapValues,\n responsive: true,\n },\n /**\n * Sets the CSS **column-gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gapY=\"4\"\n * gapY=\"20px\"\n * gapY={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap\n */\n gapY: {\n type: 'enum | string',\n className: 'rt-r-rg',\n customProperties: ['--row-gap'],\n values: gapValues,\n responsive: true,\n },\n} satisfies {\n gap: PropDef<(typeof gapValues)[number]>;\n gapX: PropDef<(typeof gapValues)[number]>;\n gapY: PropDef<(typeof gapValues)[number]>;\n};\n\nexport { gapPropDefs };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { gapPropDefs } from '../props/gap.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst as = ['div', 'span'] as const;\nconst displayValues = ['none', 'inline-flex', 'flex'] as const;\nconst directionValues = ['row', 'column', 'row-reverse', 'column-reverse'] as const;\nconst alignValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifyValues = ['start', 'center', 'end', 'between'] as const;\nconst wrapValues = ['nowrap', 'wrap', 'wrap-reverse'] as const;\n\nconst flexPropDefs = {\n /**\n * Controls whether to render **div** or **span**\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n as: { type: 'enum', values: as, default: 'div' },\n ...asChildPropDef,\n /**\n * Sets the CSS **display** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * display=\"inline-flex\"\n * display={{ sm: 'none', lg: 'flex' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/display\n */\n display: {\n type: 'enum',\n className: 'rt-r-display',\n values: displayValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-direction** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * direction=\"column\"\n * direction={{ sm: 'column', lg: 'row' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction\n */\n direction: {\n type: 'enum',\n className: 'rt-r-fd',\n values: directionValues,\n responsive: true,\n },\n /**\n * Sets the CSS **align-items** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * align=\"center\"\n * align={{ sm: 'baseline', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-items\n */\n align: {\n type: 'enum',\n className: 'rt-r-ai',\n values: alignValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-content** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justify=\"between\"\n * justify={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content\n */\n justify: {\n type: 'enum',\n className: 'rt-r-jc',\n values: justifyValues,\n parseValue: parseJustifyValue,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-wrap** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * wrap=\"wrap\"\n * wrap={{ sm: 'wrap', lg: 'nowrap' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap\n */\n wrap: {\n type: 'enum',\n className: 'rt-r-fw',\n values: wrapValues,\n responsive: true,\n },\n ...gapPropDefs,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n display: PropDef<(typeof displayValues)[number]>;\n direction: PropDef<(typeof directionValues)[number]>;\n align: PropDef<(typeof alignValues)[number]>;\n justify: PropDef<(typeof justifyValues)[number]>;\n wrap: PropDef<(typeof wrapValues)[number]>;\n};\n\nfunction parseJustifyValue(value: string) {\n return value === 'between' ? 'space-between' : value;\n}\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype FlexOwnProps = GetPropDefTypes<\n typeof flexPropDefs & typeof gapPropDefs & typeof asChildPropDef\n>;\n\nexport { flexPropDefs };\nexport type { FlexOwnProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Flex } from './flex.js';\nimport { spinnerPropDefs } from './spinner.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype SpinnerElement = React.ElementRef<'span'>;\ntype SpinnerOwnProps = GetPropDefTypes<typeof spinnerPropDefs>;\ninterface SpinnerProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n MarginProps,\n SpinnerOwnProps {}\nconst Spinner = React.forwardRef<SpinnerElement, SpinnerProps>((props, forwardedRef) => {\n const { className, children, loading, ...spinnerProps } = extractProps(\n props,\n spinnerPropDefs,\n marginPropDefs\n );\n\n if (!loading) return children;\n\n const spinner = (\n <span {...spinnerProps} ref={forwardedRef} className={classNames('rt-Spinner', className)}>\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n </span>\n );\n\n if (children === undefined) return spinner;\n\n return (\n <Flex asChild position=\"relative\" align=\"center\" justify=\"center\">\n <span>\n {/**\n * `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden`\n */}\n <span aria-hidden style={{ display: 'contents', visibility: 'hidden' }} inert={undefined}>\n {children}\n </span>\n\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>{spinner}</span>\n </Flex>\n </span>\n </Flex>\n );\n});\nSpinner.displayName = 'Spinner';\n\nexport { Spinner };\nexport type { SpinnerProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\n\nconst spinnerPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n loading: { type: 'boolean', default: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n loading: PropDef<boolean>;\n};\n\nexport { spinnerPropDefs };\n", "import { VisuallyHidden as VisuallyHiddenPrimitive } from 'radix-ui';\nexport const VisuallyHidden = VisuallyHiddenPrimitive.Root;\nexport const Root = VisuallyHiddenPrimitive.Root;\nexport type VisuallyHiddenProps = VisuallyHiddenPrimitive.VisuallyHiddenProps;\n", "import type { baseButtonPropDefs } from '../components/_internal/base-button.props.js';\nimport type { calloutRootPropDefs } from '../components/callout.props.js';\nimport type { spinnerPropDefs } from '../components/spinner.props.js';\nimport type { textPropDefs } from '../components/text.props.js';\nimport type { Responsive } from '../props/prop-def.js';\n\nfunction mapResponsiveProp<Input extends string, Output>(\n propValue: Responsive<Input> | undefined,\n mapValue: (value: Input) => Output\n): Responsive<Output> | undefined {\n if (propValue === undefined) return undefined;\n if (typeof propValue === 'string') {\n return mapValue(propValue);\n }\n return Object.fromEntries(\n Object.entries(propValue).map(([key, value]) => [key, mapValue(value)])\n );\n}\n\nfunction mapCalloutSizeToTextSize(\n size: (typeof calloutRootPropDefs.size.values)[number]\n): (typeof textPropDefs.size.values)[number] {\n return size === '3' ? '3' : size === '1' ? '1' : '2';\n}\n\nfunction mapButtonSizeToSpinnerSize(\n size: (typeof baseButtonPropDefs.size.values)[number]\n): (typeof spinnerPropDefs.size.values)[number] {\n switch (size) {\n case '1':\n return '1';\n case '2':\n case '3':\n return '2';\n case '4':\n return '3';\n }\n}\n\nexport { mapResponsiveProp, mapCalloutSizeToTextSize, mapButtonSizeToSpinnerSize };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { tooltipPropDefs } from './tooltip.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TooltipElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs>;\ninterface TooltipProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>,\n ComponentPropsWithout<typeof TooltipPrimitive.Content, RemovedProps | 'content'>,\n TooltipOwnProps {\n content: React.ReactNode;\n container?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Portal>['container'];\n}\nconst Tooltip = React.forwardRef<TooltipElement, TooltipProps>((props, forwardedRef) => {\n const {\n children,\n className,\n open,\n defaultOpen,\n onOpenChange,\n delayDuration,\n disableHoverableContent,\n content,\n container,\n forceMount,\n ...tooltipContentProps\n } = extractProps(props, tooltipPropDefs);\n const rootProps = { open, defaultOpen, onOpenChange, delayDuration, disableHoverableContent };\n return (\n <TooltipPrimitive.Root {...rootProps}>\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <TooltipPrimitive.Content\n sideOffset={4}\n collisionPadding={10}\n {...tooltipContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-TooltipContent', className)}\n >\n <Text as=\"p\" className=\"rt-TooltipText\" size=\"1\">\n {content}\n </Text>\n <TooltipPrimitive.Arrow className=\"rt-TooltipArrow\" />\n </TooltipPrimitive.Content>\n </Theme>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n});\nTooltip.displayName = 'Tooltip';\n\nexport { Tooltip };\nexport type { TooltipProps };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends MarginProps, TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...textPropDefs, ...marginPropDefs };\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Text ${className}` : 'rt-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'rt-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'rt-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'rt-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'rt-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'rt-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeMaterial = (typeof themePropDefs.material.values)[number];\ntype ThemePanelBackground = (typeof themePropDefs.panelBackground.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onMaterialChange: (material: ThemeMaterial) => void;\n onPanelBackgroundChange: (panelBackground: ThemePanelBackground) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n material: ThemeMaterial;\n panelBackground: ThemePanelBackground;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n fontFamily: ThemeFontFamily;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n material: themePropDefs.material.default,\n panelBackground: themePropDefs.panelBackground.default,\n radius: themePropDefs.radius.default,\n scaling: themePropDefs.scaling.default,\n fontFamily: themePropDefs.fontFamily.default,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onMaterialChange: noop,\n onPanelBackgroundChange: noop,\n onRadiusChange: noop,\n onScalingChange: noop,\n onFontFamilyChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir=\"ltr\">\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n material: materialProp = themePropDefs.material.default,\n panelBackground: panelBackgroundProp = themePropDefs.panelBackground.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n // Show deprecation warning for panelBackground when used\n React.useEffect(() => {\n if (props.panelBackground !== undefined) {\n console.warn(\n 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.',\n );\n }\n }, [props.panelBackground]);\n\n const [appearance, setAppearance] = React.useState(appearanceProp);\n React.useEffect(() => setAppearance(appearanceProp), [appearanceProp]);\n\n const [accentColor, setAccentColor] = React.useState(accentColorProp);\n React.useEffect(() => setAccentColor(accentColorProp), [accentColorProp]);\n\n const [grayColor, setGrayColor] = React.useState(grayColorProp);\n React.useEffect(() => setGrayColor(grayColorProp), [grayColorProp]);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n materialProp !== themePropDefs.material.default ? materialProp : panelBackgroundProp;\n const [material, setMaterial] = React.useState(effectiveMaterial);\n React.useEffect(() => setMaterial(effectiveMaterial), [effectiveMaterial]);\n\n // Keep panelBackground in sync with material for backward compatibility\n const [panelBackground, setPanelBackground] = React.useState(panelBackgroundProp);\n React.useEffect(() => setPanelBackground(material), [material]);\n\n const [radius, setRadius] = React.useState(radiusProp);\n React.useEffect(() => setRadius(radiusProp), [radiusProp]);\n\n const [scaling, setScaling] = React.useState(scalingProp);\n React.useEffect(() => setScaling(scalingProp), [scalingProp]);\n\n const [fontFamily, setFontFamily] = React.useState(fontFamilyProp);\n React.useEffect(() => setFontFamily(fontFamilyProp), [fontFamilyProp]);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n material={material}\n panelBackground={panelBackground}\n radius={radius}\n scaling={scaling}\n fontFamily={fontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onMaterialChange={setMaterial}\n onPanelBackgroundChange={setPanelBackground}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n onFontFamilyChange={setFontFamily}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nfunction getClientOS(): 'windows' | 'macos' | 'linux' | undefined {\n if (typeof navigator === 'undefined') return undefined;\n const ua = navigator.userAgent;\n if (ua.includes('Win')) return 'windows';\n if (ua.includes('Mac')) return 'macos';\n if (ua.includes('Linux')) return 'linux';\n return undefined;\n}\n\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n material = props.material ?? context?.material ?? themePropDefs.material.default,\n panelBackground = props.panelBackground ??\n context?.panelBackground ??\n themePropDefs.panelBackground.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n scaling = props.scaling ?? context?.scaling ?? themePropDefs.scaling.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onMaterialChange = noop,\n onPanelBackgroundChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n onFontFamilyChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n const [clientOS, setClientOS] = React.useState<ReturnType<typeof getClientOS>>(undefined);\n React.useEffect(() => {\n if (isRoot) setClientOS(getClientOS());\n }, [isRoot]);\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-material={material}\n data-panel-background={panelBackground}\n data-radius={radius}\n data-scaling={scaling}\n data-font-family={fontFamily}\n data-os={isRoot ? clientOS : undefined}\n ref={forwardedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n", "import type { accentColors } from '../props/color.prop.js';\n\ntype ThemeAccentColor = (typeof accentColors)[number];\n\nexport function getMatchingGrayColor(accentColor: ThemeAccentColor) {\n switch (accentColor) {\n case 'tomato':\n case 'red':\n case 'ruby':\n case 'crimson':\n case 'pink':\n case 'plum':\n case 'purple':\n case 'violet':\n return 'mauve';\n case 'iris':\n case 'indigo':\n case 'blue':\n case 'sky':\n case 'cyan':\n return 'slate';\n case 'teal':\n case 'jade':\n case 'mint':\n case 'green':\n return 'sage';\n case 'grass':\n case 'lime':\n return 'olive';\n case 'yellow':\n case 'amber':\n case 'orange':\n case 'brown':\n case 'gold':\n case 'bronze':\n return 'sand';\n case 'gray':\n return 'gray';\n }\n}\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst scalings = ['90%', '95%', '100%', '105%', '110%'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'blue' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'slate' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n material: { type: 'enum', values: materials, default: 'translucent' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: 'translucent' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'medium' },\n /**\n * Sets a scaling multiplier for values like spacing, font sizes, line heights, etc. are scaled.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/layout\n */\n scaling: { type: 'enum', values: scalings, default: '100%' },\n /**\n * Sets the font family for the theme.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n material: PropDef<(typeof materials)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n scaling: PropDef<(typeof scalings)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n", "import { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst tooltipPropDefs = {\n content: { type: 'ReactNode', required: true },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '360px' },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n content: PropDef<React.ReactNode>;\n};\n\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs & typeof widthPropDefs>;\n\nexport { tooltipPropDefs };\nexport type { TooltipOwnProps };\n", "import * as React from 'react';\n\n/**\n * Hook for managing tooltip accessibility props and conditional rendering.\n * Encapsulates tooltip ID generation and aria-describedby binding.\n *\n * @param tooltip - The tooltip content (if any)\n * @returns Object containing tooltipId, hasTooltip flag, and accessibility props\n *\n * @example\n * ```tsx\n * const { tooltipId, hasTooltip, accessibilityProps } = useTooltipWrapper(tooltip);\n *\n * const button = <button {...accessibilityProps}>Click me</button>;\n *\n * if (!hasTooltip) return button;\n *\n * return <Tooltip id={tooltipId} content={tooltip}>{button}</Tooltip>;\n * ```\n */\nexport function useTooltipWrapper(tooltip: React.ReactNode) {\n const tooltipId = React.useId();\n const hasTooltip = Boolean(tooltip);\n\n const accessibilityProps = React.useMemo(() => (hasTooltip ? { 'aria-describedby': tooltipId } : {}), [hasTooltip, tooltipId]);\n\n return { tooltipId, hasTooltip, accessibilityProps };\n}\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Slot } from './slot.js';\nimport { gridPropDefs } from './grid.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GridOwnProps } from './grid.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype GridElement = React.ElementRef<'div'>;\ninterface CommonGridProps extends MarginProps, LayoutProps, GridOwnProps {}\ntype GridDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype GridSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype GridProps = CommonGridProps & (GridSpanProps | GridDivProps);\n\nconst Grid = React.forwardRef<GridElement, GridProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...gridProps\n } = extractProps(props, gridPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...gridProps} ref={forwardedRef} className={classNames('rt-Grid', className)} />;\n});\nGrid.displayName = 'Grid';\n\nexport { Grid };\nexport type { GridProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { gapPropDefs } from '../props/gap.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst as = ['div', 'span'] as const;\nconst displayValues = ['none', 'inline-grid', 'grid'] as const;\nconst columnsValues = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst rowsValues = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst flowValues = ['row', 'column', 'dense', 'row-dense', 'column-dense'] as const;\nconst alignValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifyValues = ['start', 'center', 'end', 'between'] as const;\nconst alignContentValues = [\n 'start',\n 'center',\n 'end',\n 'baseline',\n 'between',\n 'around',\n 'evenly',\n 'stretch',\n] as const;\nconst justifyItemsValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\n\nconst gridPropDefs = {\n /**\n * Controls whether to render **div** or **span**\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n as: { type: 'enum', values: as, default: 'div' },\n ...asChildPropDef,\n /**\n * Sets the CSS **display** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * display=\"inline-grid\"\n * display={{ sm: 'none', lg: 'grid' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/display\n */\n display: {\n type: 'enum',\n className: 'rt-r-display',\n values: displayValues,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-template** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * template='\"header header\" \"sidebar content\"'\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas\n */\n areas: {\n type: 'string',\n className: 'rt-r-gta',\n customProperties: ['--grid-template-areas'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-template-columns** property.\n * Supports numeric string values, CSS strings and responsive objects.\n *\n * Use numeric string values to create grid columns of even size.\n *\n * @example\n * columns=\"3\"\n * columns=\"100px 1fr\"\n * columns={{ xs: '1', md: 'auto 1fr' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns\n */\n columns: {\n type: 'enum | string',\n className: 'rt-r-gtc',\n customProperties: ['--grid-template-columns'],\n values: columnsValues,\n parseValue: parseGridValue,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-template-rows** property.\n * Supports numeric string values, CSS strings and responsive objects.\n *\n * Use numeric string values to create grid rows of even size.\n *\n * @example\n * rows=\"3\"\n * rows=\"100px 1fr\"\n * rows={{ xs: '1', md: 'auto 1fr' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows\n */\n rows: {\n type: 'enum | string',\n className: 'rt-r-gtr',\n customProperties: ['--grid-template-rows'],\n values: rowsValues,\n parseValue: parseGridValue,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-auto-flow** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * flow=\"column\"\n * flow={{ sm: 'column', lg: 'row' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow\n */\n flow: {\n type: 'enum',\n className: 'rt-r-gaf',\n values: flowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **align-items** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * align=\"center\"\n * align={{ sm: 'baseline', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-items\n */\n align: {\n type: 'enum',\n className: 'rt-r-ai',\n values: alignValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-content** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justify=\"between\"\n * justify={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content\n */\n justify: {\n type: 'enum',\n className: 'rt-r-jc',\n values: justifyValues,\n parseValue: parseJustifyValue,\n responsive: true,\n },\n /**\n * Sets the CSS **align-content** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * alignContent=\"between\"\n * alignContent={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-content\n */\n alignContent: {\n type: 'enum',\n className: 'rt-r-ac',\n values: alignContentValues,\n parseValue: parseAlignContentValue,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-items** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justifyItems=\"center\"\n * justifyItems={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-items\n */\n justifyItems: {\n type: 'enum',\n className: 'rt-r-ji',\n values: justifyItemsValues,\n responsive: true,\n },\n ...gapPropDefs,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n display: PropDef<(typeof displayValues)[number]>;\n areas: PropDef<string>;\n columns: PropDef<(typeof columnsValues)[number]>;\n rows: PropDef<(typeof rowsValues)[number]>;\n flow: PropDef<(typeof flowValues)[number]>;\n align: PropDef<(typeof alignValues)[number]>;\n justify: PropDef<(typeof justifyValues)[number]>;\n alignContent: PropDef<(typeof alignContentValues)[number]>;\n justifyItems: PropDef<(typeof justifyItemsValues)[number]>;\n};\n\nfunction parseGridValue(value: string): string {\n if ((gridPropDefs.columns.values as readonly string[]).includes(value)) {\n return value;\n }\n\n return value?.match(/^\\d+$/) ? `repeat(${value}, minmax(0, 1fr))` : value;\n}\n\nfunction parseJustifyValue(value: string) {\n return value === 'between' ? 'space-between' : value;\n}\n\nfunction parseAlignContentValue(value: string) {\n return value === 'between'\n ? 'space-between'\n : value === 'around'\n ? 'space-around'\n : value === 'evenly'\n ? 'space-evenly'\n : value;\n}\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype GridOwnProps = GetPropDefTypes<typeof gridPropDefs & typeof asChildPropDef>;\n\nexport { gridPropDefs };\nexport type { GridOwnProps };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { headingPropDefs } from './heading.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype HeadingElement = React.ElementRef<'h1'>;\ntype HeadingOwnProps = GetPropDefTypes<typeof headingPropDefs>;\ninterface CommonHeadingProps extends MarginProps, HeadingOwnProps {}\ntype HeadingH1Props = { as?: 'h1' } & ComponentPropsWithout<'h1', RemovedProps>;\ntype HeadingH2Props = { as: 'h2' } & ComponentPropsWithout<'h2', RemovedProps>;\ntype HeadingH3Props = { as: 'h3' } & ComponentPropsWithout<'h3', RemovedProps>;\ntype HeadingH4Props = { as: 'h4' } & ComponentPropsWithout<'h4', RemovedProps>;\ntype HeadingH5Props = { as: 'h5' } & ComponentPropsWithout<'h5', RemovedProps>;\ntype HeadingH6Props = { as: 'h6' } & ComponentPropsWithout<'h6', RemovedProps>;\ntype HeadingProps = CommonHeadingProps &\n (HeadingH1Props | HeadingH2Props | HeadingH3Props | HeadingH4Props | HeadingH5Props | HeadingH6Props);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...headingPropDefs, ...marginPropDefs };\n\nconst Heading = React.memo(\n React.forwardRef<HeadingElement, HeadingProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'h1',\n color,\n ...headingProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Heading ${className}` : 'rt-Heading';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...headingProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(headingProps as React.HTMLAttributes<HTMLHeadingElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nHeading.displayName = 'Heading';\n\nexport { Heading };\nexport type { HeadingProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst headingPropDefs = {\n as: { type: 'enum', values: as, default: 'h1' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n default: '6',\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { headingPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport { Tooltip } from './tooltip.js';\nimport { useTooltipWrapper } from '../hooks/use-tooltip-wrapper.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\ntype IconButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Required accessibility props for icon buttons\n * Icon buttons must have an accessible name to meet WCAG guidelines\n *\n * Three ways to provide accessibility:\n * 1. aria-label: Direct descriptive text\n * 2. aria-labelledby: Reference to a label element\n * 3. children: Visible text content (fallback)\n */\ntype AccessibilityProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string }\n | { 'aria-label'?: never; 'aria-labelledby'?: never; children: React.ReactNode };\n\n/**\n * Tooltip configuration props that can be passed to IconButton\n * These props are forwarded to the underlying Tooltip component\n */\ninterface IconButtonTooltipProps {\n /** Content to display in the tooltip on hover/focus */\n tooltip?: React.ReactNode;\n /** Side of the button where the tooltip should appear */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n /** Alignment of the tooltip relative to the button */\n tooltipAlign?: 'start' | 'center' | 'end';\n /** Delay before showing the tooltip (in milliseconds) */\n tooltipDelayDuration?: number;\n /** Whether to disable hoverable content behavior */\n tooltipDisableHoverableContent?: boolean;\n}\n\n/**\n * Core IconButton props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with accessibility requirements and tooltip functionality\n */\ntype IconButtonOwnProps = Omit<BaseButtonProps, 'as'> & AccessibilityProps & IconButtonTooltipProps;\n\n/**\n * Polymorphic IconButton props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;\n\n/**\n * IconButton component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype IconButtonComponent = <C extends React.ElementType = 'button'>(props: IconButtonProps<C> & { ref?: React.ForwardedRef<IconButtonElement> }) => React.ReactElement | null;\n\n/**\n * IconButton component for compact, accessible icon-only interactions\n *\n * The IconButton component extends Button with specialized behavior for visual symbols.\n * It enforces accessibility requirements, provides automatic square sizing, and includes\n * built-in tooltip integration. Icon buttons are essential for space-efficient interfaces\n * while maintaining accessibility compliance.\n *\n * Key features:\n * - Enforced accessibility requirements (aria-label, aria-labelledby, or children)\n * - Automatic square aspect ratios for consistent visual alignment\n * - Built-in tooltip support for context and guidance\n * - Same variant and size system as Button for consistency\n * - Runtime validation for accessibility compliance\n *\n * @example\n * ```tsx\n * // Basic icon button with aria-label\n * <IconButton aria-label=\"Settings\">\n * <Settings />\n * </IconButton>\n *\n * // Icon button with tooltip\n * <IconButton aria-label=\"Save\" tooltip=\"Save your progress\">\n * <Save />\n * </IconButton>\n *\n * // Icon button with aria-labelledby\n * <IconButton aria-labelledby=\"settings-label\">\n * <Settings />\n * </IconButton>\n * <span id=\"settings-label\">Open settings panel</span>\n *\n * // Icon button with visible text (fallback)\n * <IconButton>\n * <Settings />\n * Settings\n * </IconButton>\n * ```\n */\nconst IconButton = React.forwardRef(\n (\n { className, tooltip, tooltipSide = 'top', tooltipAlign = 'center', tooltipDelayDuration, tooltipDisableHoverableContent, ...props }: IconButtonProps,\n forwardedRef: React.ForwardedRef<IconButtonElement>,\n ) => {\n // Use shared tooltip wrapper hook for accessibility props\n const { tooltipId, hasTooltip, accessibilityProps: tooltipAccessibilityProps } = useTooltipWrapper(tooltip);\n\n // Runtime accessibility validation to ensure WCAG compliance\n // This helps catch accessibility issues during development\n const hasAriaLabel = 'aria-label' in props && props['aria-label'];\n const hasAriaLabelledBy = 'aria-labelledby' in props && props['aria-labelledby'];\n const hasChildren = 'children' in props && props.children;\n\n // Validate accessible name - throw in development, log error in production\n if (!hasAriaLabel && !hasAriaLabelledBy && !hasChildren) {\n const errorMessage =\n 'IconButton: Icon buttons must have an accessible name. Please provide either:' +\n '\\n- aria-label prop with descriptive text' +\n '\\n- aria-labelledby prop referencing a label element' +\n '\\n- or visible text children';\n\n if (process.env.NODE_ENV === 'development') {\n throw new Error(errorMessage);\n } else {\n console.error(errorMessage);\n }\n }\n\n // Create the base icon button element with accessibility props\n const iconButton = <BaseButton {...props} {...tooltipAccessibilityProps} ref={forwardedRef} className={classNames('rt-IconButton', className)} />;\n\n // If no tooltip is provided, return the icon button as-is for better performance\n if (!hasTooltip) {\n return iconButton;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n // This creates a compound component that handles both button and tooltip functionality\n return (\n <Tooltip content={tooltip} side={tooltipSide} align={tooltipAlign} delayDuration={tooltipDelayDuration} disableHoverableContent={tooltipDisableHoverableContent} id={tooltipId}>\n {iconButton}\n </Tooltip>\n );\n },\n) as IconButtonComponent & { displayName?: string };\n\nIconButton.displayName = 'IconButton';\n\nexport { IconButton };\nexport type { IconButtonProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { kbdPropDefs } from './kbd.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype KbdElement = React.ElementRef<'kbd'>;\ntype KbdOwnProps = GetPropDefTypes<typeof kbdPropDefs>;\ninterface KbdProps extends ComponentPropsWithout<'kbd', RemovedProps>, MarginProps, KbdOwnProps {}\nconst Kbd = React.forwardRef<KbdElement, KbdProps>((props, forwardedRef) => {\n const { asChild, className, ...kbdProps } = extractProps(props, kbdPropDefs, marginPropDefs);\n const Comp = asChild ? Slot.Root : 'kbd';\n return (\n <Comp\n {...kbdProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-Kbd', className)}\n />\n );\n});\nKbd.displayName = 'Kbd';\n\nexport { Kbd };\nexport type { KbdProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\nconst variants = ['classic', 'soft'] as const;\n\nconst kbdPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: variants,\n default: 'classic',\n },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { kbdPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { popoverContentPropDefs } from './popover.props.js';\nimport { Theme } from './theme.js';\nimport { useThemeContext } from './theme.js';\n\nimport type { PopoverContentOwnProps } from './popover.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\n// ---------------------------------------------\n// Popover Content Context\n// ---------------------------------------------\ntype PopoverContentContextValue = {\n /** Ref to the Popover.Content DOM node */\n contentRef: React.MutableRefObject<HTMLDivElement | null>;\n /** Update content's toolbar offset variable and presence flag */\n setToolbarOffset: (offsetPx: number) => void;\n /** Wire up aria-labelledby for toolbar title */\n setLabelId: (id: string | undefined) => void;\n};\n\nconst PopoverContentContext = React.createContext<PopoverContentContextValue | null>(null);\nconst usePopoverContentContext = (caller: string) => {\n const ctx = React.useContext(PopoverContentContext);\n if (!ctx) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`${caller} must be used within Popover.Content`);\n }\n }\n return ctx;\n};\n\ninterface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}\nconst PopoverRoot: React.FC<PopoverRootProps> = (props: PopoverRootProps) => (\n <PopoverPrimitive.Root {...props} />\n);\nPopoverRoot.displayName = 'Popover.Root';\n\ntype PopoverTriggerElement = React.ElementRef<typeof PopoverPrimitive.Trigger>;\ninterface PopoverTriggerProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Trigger, RemovedProps> {}\nconst PopoverTrigger = React.forwardRef<PopoverTriggerElement, PopoverTriggerProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Trigger {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Trigger>\n ),\n);\nPopoverTrigger.displayName = 'Popover.Trigger';\n\ntype PopoverContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ninterface PopoverContentProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>,\n PopoverContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n}\nconst PopoverContent = React.forwardRef<PopoverContentElement, PopoverContentProps>(\n (props, forwardedRef) => {\n const themeContext = useThemeContext();\n const panelBackground = props.panelBackground ?? themeContext.panelBackground;\n const {\n className,\n forceMount,\n container,\n panelBackground: _,\n ...contentProps\n } = extractProps(props, popoverContentPropDefs);\n\n // Manage refs (we need the DOM node to apply CSS variables)\n const contentRef = React.useRef<HTMLDivElement>(null);\n const combinedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n contentRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n }\n },\n [forwardedRef],\n );\n\n const [labelId, setLabelId] = React.useState<string | undefined>(undefined);\n\n const setToolbarOffset = React.useCallback((offsetPx: number) => {\n const el = contentRef.current;\n if (!el) return;\n if (offsetPx > 0) {\n el.style.setProperty('--popover-toolbar-offset', `${offsetPx}px`);\n el.setAttribute('data-has-toolbar', 'true');\n } else {\n el.style.removeProperty('--popover-toolbar-offset');\n el.removeAttribute('data-has-toolbar');\n }\n }, []);\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <PopoverPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={combinedRef}\n aria-labelledby={labelId}\n data-panel-background={panelBackground}\n className={classNames('rt-PopperContent', 'rt-PopoverContent', className)}\n >\n <PopoverContentContext.Provider value={React.useMemo(() => ({ contentRef, setToolbarOffset, setLabelId }), [setToolbarOffset])}>\n {props.children}\n </PopoverContentContext.Provider>\n </PopoverPrimitive.Content>\n </Theme>\n </PopoverPrimitive.Portal>\n );\n },\n);\nPopoverContent.displayName = 'Popover.Content';\n\ntype PopoverCloseElement = React.ElementRef<typeof PopoverPrimitive.Close>;\ninterface PopoverCloseProps\n extends ComponentPropsWithout<typeof PopoverPrimitive.Close, RemovedProps> {}\nconst PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Close {...props} ref={forwardedRef} asChild>\n {requireReactElement(children)}\n </PopoverPrimitive.Close>\n ),\n);\nPopoverClose.displayName = 'Popover.Close';\n\ntype PopoverAnchorElement = React.ElementRef<typeof PopoverPrimitive.Anchor>;\ninterface PopoverAnchorProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor> {}\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n ({ children, ...props }, forwardedRef) => (\n <PopoverPrimitive.Anchor {...props} ref={forwardedRef} />\n ),\n);\n\nPopoverAnchor.displayName = 'Popover.Anchor';\n\n// ---------------------------------------------\n// Toolbar (Popover-only)\n// ---------------------------------------------\n\ntype PopoverToolbarElement = HTMLDivElement;\ntype PopoverToolbarProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarBase = React.forwardRef<PopoverToolbarElement, PopoverToolbarProps>(\n ({ className, children, ...props }, forwardedRef) => {\n const ctx = usePopoverContentContext('Popover.Toolbar');\n\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRefs = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef)\n (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [forwardedRef],\n );\n\n React.useEffect(() => {\n if (!ctx || !localRef.current) return;\n const el = localRef.current;\n const update = () => {\n const height = el.getBoundingClientRect().height;\n ctx.setToolbarOffset(height);\n };\n update();\n const ro = new ResizeObserver(update);\n ro.observe(el);\n return () => {\n ro.disconnect();\n ctx.setToolbarOffset(0);\n };\n }, [ctx]);\n\n return (\n <div {...props} ref={setRefs} className={classNames('rt-PopoverToolbar', className)}>\n {children}\n </div>\n );\n },\n);\n(PopoverToolbarBase as any).displayName = 'Popover.Toolbar';\n\ntype SectionProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst PopoverToolbarLeft = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarLeft', className)}\n />\n ),\n);\nPopoverToolbarLeft.displayName = 'Popover.Toolbar.Left';\n\nconst PopoverToolbarCenter = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarCenter', className)}\n />\n ),\n);\nPopoverToolbarCenter.displayName = 'Popover.Toolbar.Center';\n\nconst PopoverToolbarRight = React.forwardRef<HTMLDivElement, SectionProps>(\n ({ className, ...props }, ref) => (\n <div\n {...props}\n ref={ref}\n className={classNames('rt-PopoverToolbarSection', 'rt-PopoverToolbarRight', className)}\n />\n ),\n);\nPopoverToolbarRight.displayName = 'Popover.Toolbar.Right';\n\ntype TitleProps = React.ComponentPropsWithoutRef<'span'>;\nconst PopoverToolbarTitle = React.forwardRef<HTMLSpanElement, TitleProps>(\n ({ className, id: idProp, ...props }, ref) => {\n const ctx = usePopoverContentContext('Popover.Toolbar.Title');\n const reactId = React.useId();\n const id = idProp ?? `rt-popover-toolbar-title-${reactId}`;\n React.useEffect(() => {\n ctx?.setLabelId(id);\n return () => ctx?.setLabelId(undefined);\n }, [ctx, id]);\n return (\n <span\n {...props}\n id={id}\n ref={ref}\n className={classNames('rt-PopoverToolbarTitle', className)}\n />\n );\n },\n);\nPopoverToolbarTitle.displayName = 'Popover.Toolbar.Title';\n\ntype PopoverToolbarComponent = React.ForwardRefExoticComponent<\n React.PropsWithoutRef<PopoverToolbarProps> & React.RefAttributes<HTMLDivElement>\n> & {\n Left: typeof PopoverToolbarLeft;\n Center: typeof PopoverToolbarCenter;\n Right: typeof PopoverToolbarRight;\n Title: typeof PopoverToolbarTitle;\n};\n\nconst PopoverToolbar = Object.assign(PopoverToolbarBase, {\n Left: PopoverToolbarLeft,\n Center: PopoverToolbarCenter,\n Right: PopoverToolbarRight,\n Title: PopoverToolbarTitle,\n}) as PopoverToolbarComponent;\n\nexport {\n PopoverRoot as Root,\n PopoverContent as Content,\n PopoverTrigger as Trigger,\n PopoverClose as Close,\n PopoverAnchor as Anchor,\n PopoverToolbar as Toolbar,\n};\nexport type {\n PopoverRootProps as RootProps,\n PopoverContentProps as ContentProps,\n PopoverTriggerProps as TriggerProps,\n PopoverCloseProps as CloseProps,\n PopoverAnchorProps as AnchorProps,\n};\n", "import * as React from 'react';\n\n/** A function that throws an error when a value isn't a valid React Element, otherwise returns the value */\nexport const requireReactElement = <T extends React.ReactNode>(children: T): T => {\n const isReactElement = React.isValidElement(children);\n\n if (!isReactElement) {\n throw Error(\n `Expected a single React Element child, but got: ${React.Children.toArray(children)\n .map((child) =>\n typeof child === 'object' && 'type' in child && typeof child.type === 'string'\n ? child.type\n : typeof child\n )\n .join(', ')}`\n );\n }\n\n return children;\n};\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3', '4'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\nconst popoverContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n};\n\ntype PopoverContentOwnProps = GetPropDefTypes<\n typeof popoverContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { popoverContentPropDefs };\nexport type { PopoverContentOwnProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nimport { scrollAreaPropDefs } from './scroll-area.props.js';\nimport { extractMarginProps } from '../helpers/extract-margin-props.js';\nimport { getMarginStyles } from '../helpers/get-margin-styles.js';\nimport { getResponsiveClassNames } from '../helpers/get-responsive-styles.js';\nimport { getSubtree } from '../helpers/get-subtree.js';\nimport { mergeStyles } from '../helpers/merge-styles.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Viewport>;\ntype ScrollAreaOwnProps = GetPropDefTypes<typeof scrollAreaPropDefs>;\ninterface ScrollAreaProps\n extends ComponentPropsWithout<typeof ScrollAreaPrimitive.Root, RemovedProps>,\n ComponentPropsWithout<typeof ScrollAreaPrimitive.Viewport, RemovedProps | 'dir'>,\n MarginProps,\n ScrollAreaOwnProps {}\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>((props, forwardedRef) => {\n const { rest: marginRest, ...marginProps } = extractMarginProps(props);\n const [marginClassNames, marginCustomProperties] = getMarginStyles(marginProps);\n\n const {\n asChild,\n children,\n className,\n style,\n type,\n scrollHideDelay = type !== 'scroll' ? 0 : undefined,\n dir,\n size = scrollAreaPropDefs.size.default,\n radius = scrollAreaPropDefs.radius.default,\n scrollbars = scrollAreaPropDefs.scrollbars.default,\n ...viewportProps\n } = marginRest;\n\n return (\n <ScrollAreaPrimitive.Root\n type={type}\n scrollHideDelay={scrollHideDelay}\n className={classNames('rt-ScrollAreaRoot', marginClassNames, className)}\n style={mergeStyles(marginCustomProperties, style)}\n asChild={asChild}\n >\n {getSubtree({ asChild, children }, (children) => (\n <>\n <ScrollAreaPrimitive.Viewport\n {...viewportProps}\n ref={forwardedRef}\n className=\"rt-ScrollAreaViewport\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n\n <div className=\"rt-ScrollAreaViewportFocusRing\" />\n\n {scrollbars !== 'vertical' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"horizontal\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars !== 'horizontal' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"vertical\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars === 'both' ? (\n <ScrollAreaPrimitive.Corner className=\"rt-ScrollAreaCorner\" />\n ) : null}\n </>\n ))}\n </ScrollAreaPrimitive.Root>\n );\n});\nScrollArea.displayName = 'ScrollArea';\n\nexport { ScrollArea };\nexport type { ScrollAreaProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst scrollbarsValues = ['vertical', 'horizontal', 'both'] as const;\n\nconst scrollAreaPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '1', responsive: true },\n ...radiusPropDef,\n scrollbars: { type: 'enum', values: scrollbarsValues, default: 'both' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n scrollbars: PropDef<(typeof scrollbarsValues)[number]>;\n};\n\nexport { scrollAreaPropDefs };\n", "import type { MarginProps } from '../props/margin.props.js';\n\nexport function extractMarginProps<T extends MarginProps>(props: T) {\n const { m, mx, my, mt, mr, mb, ml, ...rest } = props;\n return { m, mx, my, mt, mr, mb, ml, rest };\n}\n", "import classNames from 'classnames';\n\nimport { getResponsiveStyles } from './get-responsive-styles.js';\nimport { mergeStyles } from './merge-styles.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\n\nconst marginValues = marginPropDefs.m.values;\n\nexport function getMarginStyles(props: MarginProps) {\n const [mClassNames, mCustomProperties] = getResponsiveStyles({\n className: 'rt-r-m',\n customProperties: ['--margin'],\n propValues: marginValues,\n value: props.m,\n });\n\n const [mxClassNames, mxCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mx',\n customProperties: ['--margin-left', '--margin-right'],\n propValues: marginValues,\n value: props.mx,\n });\n\n const [myClassNames, myCustomProperties] = getResponsiveStyles({\n className: 'rt-r-my',\n customProperties: ['--margin-top', '--margin-bottom'],\n propValues: marginValues,\n value: props.my,\n });\n\n const [mtClassNames, mtCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mt',\n customProperties: ['--margin-top'],\n propValues: marginValues,\n value: props.mt,\n });\n\n const [mrClassNames, mrCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mr',\n customProperties: ['--margin-right'],\n propValues: marginValues,\n value: props.mr,\n });\n\n const [mbClassNames, mbCustomProperties] = getResponsiveStyles({\n className: 'rt-r-mb',\n customProperties: ['--margin-bottom'],\n propValues: marginValues,\n value: props.mb,\n });\n\n const [mlClassNames, mlCustomProperties] = getResponsiveStyles({\n className: 'rt-r-ml',\n customProperties: ['--margin-left'],\n propValues: marginValues,\n value: props.ml,\n });\n\n return [\n classNames(\n mClassNames,\n mxClassNames,\n myClassNames,\n mtClassNames,\n mrClassNames,\n mbClassNames,\n mlClassNames\n ),\n mergeStyles(\n mCustomProperties,\n mxCustomProperties,\n myCustomProperties,\n mtCustomProperties,\n mrCustomProperties,\n mbCustomProperties,\n mlCustomProperties\n ),\n ] as const;\n}\n", "import * as React from 'react';\n\n/**\n * This is a helper function that is used when a component supports `asChild`\n * using the `Slot` component but its implementation contains nested DOM elements.\n *\n * Using it ensures if a consumer uses the `asChild` prop, the elements are in\n * correct order in the DOM, adopting the intended consumer `children`.\n */\nexport function getSubtree(\n options: { asChild: boolean | undefined; children: React.ReactNode },\n content: React.ReactNode | ((children: React.ReactNode) => React.ReactNode)\n) {\n const { asChild, children } = options;\n if (!asChild) return typeof content === 'function' ? content(children) : content;\n\n const firstChild = React.Children.only(children) as React.ReactElement;\n return React.cloneElement(firstChild, {\n // @ts-expect-error\n children: typeof content === 'function' ? content(firstChild.props.children) : content,\n });\n}\n", "import * as React from 'react';\n\n// \"inert\" works differently between React versions\n// https://github.com/facebook/react/pull/24730\nexport const inert = (Number.parseFloat(React.version) >= 19 || '') as React.HTMLAttributes<unknown>['inert'];\n"],
|
|
5
|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,GAAYC,KACd1B,EAAK,UAAU,OAAO,QAAS,MAAM,EACrCA,EAAK,MAAM,YAAc9B,EACzB8B,EAAK,UAAU,IAAI9B,CAAU,GAG3B,CAACqD,GAAiB,CAACC,GAAgB,CAACC,GAAY,CAACC,IACnD1B,EAAK,MAAM,YAAc9B,EACzB8B,EAAK,UAAU,IAAI9B,CAAU,EAEjC",
|
|
6
6
|
"names": ["theme_panel_exports", "__export", "ThemePanel", "ThemePanelContent", "__toCommonJS", "React", "import_internal", "import_react_dom", "import_radix_ui", "AccessibleIcon", "AccessibleIconPrimitive", "React", "import_classnames", "import_radix_ui", "Root", "SlotPrimitive", "Slot", "Slottable", "asChildPropDef", "as", "displayValues", "boxPropDefs", "asChildPropDef", "import_classnames", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "value", "propValues", "parseValue", "classNames", "getBaseClassName", "isResponsiveObject", "object", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "prop", "customProperty", "bpProperty", "key", "mergeStyles", "styles", "result", "style", "mergePropDefs", "args", "extractProps", "props", "propDefs", "className", "style", "extractedProps", "allPropDefs", "key", "value", "propDef", "isResponsiveObject", "isResponsivePropDef", "propClassName", "getResponsiveClassNames", "classNames", "propDefValues", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "paddingValues", "paddingPropDefs", "heightPropDefs", "widthPropDefs", "overflowValues", "positionValues", "positionEdgeValues", "flexShrinkValues", "flexGrowValues", "alignSelfValues", "justifySelfValues", "layoutPropDefs", "paddingPropDefs", "widthPropDefs", "heightPropDefs", "marginValues", "marginPropDefs", "Box", "props", "forwardedRef", "className", "asChild", "Tag", "boxProps", "extractProps", "boxPropDefs", "layoutPropDefs", "marginPropDefs", "Slot", "classNames", "React", "import_classnames", "React", "import_classnames", "import_radix_ui", "import_internal", "accentColors", "grayColors", "colorPropDef", "accentColorPropDef", "highContrastPropDef", "radii", "radiusPropDef", "sizes", "variants", "panelBackgrounds", "materials", "baseButtonPropDefs", "asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "React", "import_classnames", "gapValues", "gapPropDefs", "as", "displayValues", "directionValues", "alignValues", "justifyValues", "wrapValues", "flexPropDefs", "asChildPropDef", "parseJustifyValue", "gapPropDefs", "value", "Flex", "props", "forwardedRef", "className", "asChild", "Tag", "flexProps", "extractProps", "flexPropDefs", "layoutPropDefs", "marginPropDefs", "Slot", "classNames", "React", "import_classnames", "sizes", "spinnerPropDefs", "Spinner", "props", "forwardedRef", "className", "children", "loading", "spinnerProps", "extractProps", "spinnerPropDefs", "marginPropDefs", "spinner", "classNames", "Flex", "import_radix_ui", "VisuallyHidden", "VisuallyHiddenPrimitive", "Root", "mapResponsiveProp", "propValue", "mapValue", "key", "value", "mapButtonSizeToSpinnerSize", "size", "BaseButton", "props", "forwardedRef", "size", "baseButtonPropDefs", "className", "children", "asChild", "as", "color", "radius", "material", "panelBackground", "flush", "disabled", "baseButtonProps", "extractProps", "marginPropDefs", "effectiveMaterial", "buttonRef", "materialRef", "button", "timeoutId", "cleanup", "transitionDuration", "duration", "observer", "Comp", "shouldPassDisabled", "isNativeButtonElement", "hasExplicitTypeAttribute", "loadingId", "describedById", "buttonText", "accessibilityProps", "classNames", "VisuallyHidden", "Flex", "Spinner", "mapResponsiveProp", "mapButtonSizeToSpinnerSize", "React", "import_classnames", "import_radix_ui", "React", "import_radix_ui", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "highContrastPropDef", "mergedPropDefs", "textPropDefs", "marginPropDefs", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "combinedClassName", "React", "import_classnames", "import_radix_ui", "getMatchingGrayColor", "accentColor", "appearances", "panelBackgrounds", "materials", "scalings", "fontFamilies", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "useThemeContext", "Theme", "props", "forwardedRef", "TooltipPrimitive", "ThemeRoot", "ThemeImpl", "appearanceProp", "accentColorProp", "grayColorProp", "materialProp", "panelBackgroundProp", "radiusProp", "scalingProp", "fontFamilyProp", "hasBackground", "rootProps", "appearance", "setAppearance", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "effectiveMaterial", "material", "setMaterial", "panelBackground", "setPanelBackground", "radius", "setRadius", "scaling", "setScaling", "fontFamily", "setFontFamily", "getClientOS", "ua", "context", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "onAccentColorChange", "onGrayColorChange", "onMaterialChange", "onPanelBackgroundChange", "onRadiusChange", "onScalingChange", "onFontFamilyChange", "themeProps", "Comp", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "clientOS", "setClientOS", "classNames", "tooltipPropDefs", "widthPropDefs", "Tooltip", "props", "forwardedRef", "children", "className", "open", "defaultOpen", "onOpenChange", "delayDuration", "disableHoverableContent", "content", "container", "forceMount", "tooltipContentProps", "extractProps", "tooltipPropDefs", "rootProps", "TooltipPrimitive", "Theme", "classNames", "Text", "React", "useTooltipWrapper", "tooltip", "tooltipId", "hasTooltip", "accessibilityProps", "Button", "className", "style", "tooltip", "tooltipSide", "tooltipAlign", "tooltipDelayDuration", "tooltipDisableHoverableContent", "overrideStyles", "props", "forwardedRef", "tooltipId", "hasTooltip", "tooltipAccessibilityProps", "useTooltipWrapper", "overrideVars", "vars", "setVar", "key", "value", "apply", "prefix", "s", "combinedStyle", "button", "BaseButton", "classNames", "Tooltip", "React", "import_classnames", "as", "displayValues", "columnsValues", "rowsValues", "flowValues", "alignValues", "justifyValues", "alignContentValues", "justifyItemsValues", "gridPropDefs", "asChildPropDef", "parseGridValue", "parseJustifyValue", "parseAlignContentValue", "gapPropDefs", "value", "Grid", "props", "forwardedRef", "className", "asChild", "Tag", "gridProps", "extractProps", "gridPropDefs", "layoutPropDefs", "marginPropDefs", "Slot", "classNames", "React", "import_radix_ui", "as", "sizes", "headingPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "highContrastPropDef", "mergedPropDefs", "headingPropDefs", "marginPropDefs", "Heading", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "headingProps", "extractProps", "combinedClassName", "React", "import_classnames", "IconButton", "className", "tooltip", "tooltipSide", "tooltipAlign", "tooltipDelayDuration", "tooltipDisableHoverableContent", "props", "forwardedRef", "tooltipId", "hasTooltip", "tooltipAccessibilityProps", "useTooltipWrapper", "hasAriaLabel", "hasAriaLabelledBy", "hasChildren", "iconButton", "BaseButton", "classNames", "Tooltip", "React", "import_classnames", "import_radix_ui", "sizes", "variants", "kbdPropDefs", "asChildPropDef", "Kbd", "props", "forwardedRef", "asChild", "className", "kbdProps", "extractProps", "kbdPropDefs", "marginPropDefs", "Comp", "classNames", "React", "import_classnames", "import_radix_ui", "React", "requireReactElement", "children", "child", "contentSizes", "panelBackgrounds", "popoverContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs", "PopoverContentContext", "usePopoverContentContext", "caller", "ctx", "PopoverRoot", "props", "PopoverPrimitive", "PopoverTrigger", "children", "forwardedRef", "requireReactElement", "PopoverContent", "themeContext", "useThemeContext", "panelBackground", "className", "forceMount", "container", "_", "contentProps", "extractProps", "popoverContentPropDefs", "contentRef", "combinedRef", "node", "labelId", "setLabelId", "setToolbarOffset", "offsetPx", "el", "Theme", "classNames", "PopoverClose", "PopoverAnchor", "PopoverToolbarBase", "localRef", "setRefs", "update", "height", "ro", "PopoverToolbarLeft", "ref", "PopoverToolbarCenter", "PopoverToolbarRight", "PopoverToolbarTitle", "idProp", "reactId", "id", "PopoverToolbar", "React", "import_classnames", "import_radix_ui", "sizes", "scrollbarsValues", "scrollAreaPropDefs", "asChildPropDef", "radiusPropDef", "extractMarginProps", "props", "m", "mx", "my", "mt", "mr", "mb", "ml", "rest", "import_classnames", "marginValues", "marginPropDefs", "getMarginStyles", "props", "mClassNames", "mCustomProperties", "getResponsiveStyles", "mxClassNames", "mxCustomProperties", "myClassNames", "myCustomProperties", "mtClassNames", "mtCustomProperties", "mrClassNames", "mrCustomProperties", "mbClassNames", "mbCustomProperties", "mlClassNames", "mlCustomProperties", "classNames", "mergeStyles", "React", "getSubtree", "options", "content", "asChild", "children", "firstChild", "ScrollArea", "props", "forwardedRef", "marginRest", "marginProps", "extractMarginProps", "marginClassNames", "marginCustomProperties", "getMarginStyles", "asChild", "children", "className", "style", "type", "scrollHideDelay", "dir", "size", "scrollAreaPropDefs", "radius", "scrollbars", "viewportProps", "ScrollAreaPrimitive", "classNames", "mergeStyles", "getSubtree", "getResponsiveClassNames", "React", "inert", "keyboardInputElement", "ThemePanel", "defaultOpen", "props", "forwardedRef", "open", "setOpen", "triggerRef", "previouslyFocusedElementRef", "handleKeydown", "event", "isModifierActive", "isKeyboardInputActive", "isOpen", "ThemePanelImpl", "Tooltip", "Kbd", "onAppearanceChange", "shortcut", "panelProps", "themeContext", "useThemeContext", "Theme", "Flex", "inert", "ScrollArea", "Box", "ThemePanelContent", "onAppearanceChangeProp", "contextProp", "contentProps", "appearance", "accentColor", "onAccentColorChange", "grayColor", "onGrayColorChange", "panelBackground", "onPanelBackgroundChange", "radius", "onRadiusChange", "scaling", "onScalingChange", "resolvedAppearance", "setResolvedAppearance", "hasOnAppearanceChangeProp", "handleAppearanceChangeProp", "handleAppearanceChange", "value", "cleanup", "disableAnimation", "updateRootAppearanceClass", "autoMatchedGray", "getMatchingGrayColor", "resolvedGrayColor", "copyState", "setCopyState", "handleCopyThemeConfig", "theme", "themePropDefs", "key", "textToCopy", "root", "body", "update", "hasDarkClass", "classNameObserver", "mutations", "mutation", "Heading", "ThemePanelSection", "ThemePanelHeading", "color", "upperFirst", "gray", "Grid", "Text", "PopoverRoot", "PopoverTrigger", "IconButton", "AccessibleIcon", "PopoverContent", "Button", "css", "string", "hasLightTheme", "hasDarkTheme", "hasLight", "hasDark"]
|
|
7
7
|
}
|