@sanity/ui 4.0.5 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/{arrow-BaqZdFUX.js → arrow-CL8xmdbg.js} +2 -2
  2. package/dist/{arrow-BaqZdFUX.js.map → arrow-CL8xmdbg.js.map} +1 -1
  3. package/dist/autocomplete.js +6 -6
  4. package/dist/autocomplete.js.map +1 -1
  5. package/dist/breadcrumbs.js +6 -6
  6. package/dist/breadcrumbs.js.map +1 -1
  7. package/dist/{button-DpAiERt1.js → button-DQH2KIbq.js} +5 -5
  8. package/dist/{button-DpAiERt1.js.map → button-DQH2KIbq.js.map} +1 -1
  9. package/dist/code.js +2 -2
  10. package/dist/code.js.map +1 -1
  11. package/dist/{codeFontStyle-aWvllgWi.js → codeFontStyle-84SMhFtI.js} +2 -2
  12. package/dist/{codeFontStyle-aWvllgWi.js.map → codeFontStyle-84SMhFtI.js.map} +1 -1
  13. package/dist/{flex-C6SsHFy8.js → flex-CySCBzQm.js} +3 -3
  14. package/dist/{flex-C6SsHFy8.js.map → flex-CySCBzQm.js.map} +1 -1
  15. package/dist/{grid-3kBnMOwF.js → grid-I2TNptX-.js} +3 -3
  16. package/dist/{grid-3kBnMOwF.js.map → grid-I2TNptX-.js.map} +1 -1
  17. package/dist/{helpers-JV5y3U_M.js → helpers-C8xxXAQC.js} +6 -24
  18. package/dist/helpers-C8xxXAQC.js.map +1 -0
  19. package/dist/{hotkeys-BYRfM-HW.js → hotkeys-BPlacpG8.js} +4 -4
  20. package/dist/{hotkeys-BYRfM-HW.js.map → hotkeys-BPlacpG8.js.map} +1 -1
  21. package/dist/index.js +13 -13
  22. package/dist/index.js.map +1 -1
  23. package/dist/{layer-DsScTlqC.js → layer-DGn7KJIB.js} +3 -3
  24. package/dist/{layer-DsScTlqC.js.map → layer-DGn7KJIB.js.map} +1 -1
  25. package/dist/menu.js +7 -7
  26. package/dist/menu.js.map +1 -1
  27. package/dist/{popover-C2DFbwZu.js → popover-CEbjxiPx.js} +38 -55
  28. package/dist/popover-CEbjxiPx.js.map +1 -0
  29. package/dist/popover.js +1 -1
  30. package/dist/{responsiveFont-BwYElGq4.js → responsiveFont-CilwaORG.js} +2 -2
  31. package/dist/{responsiveFont-BwYElGq4.js.map → responsiveFont-CilwaORG.js.map} +1 -1
  32. package/dist/{stack-wyPeapSx.js → stack-BGFEokua.js} +4 -4
  33. package/dist/{stack-wyPeapSx.js.map → stack-BGFEokua.js.map} +1 -1
  34. package/dist/{textInput-DW447nYT.js → textInput-B6ZZJSOj.js} +5 -5
  35. package/dist/{textInput-DW447nYT.js.map → textInput-B6ZZJSOj.js.map} +1 -1
  36. package/dist/toast.js +5 -5
  37. package/dist/toast.js.map +1 -1
  38. package/dist/tooltip.js +14 -24
  39. package/dist/tooltip.js.map +1 -1
  40. package/dist/{useClickOutsideEvent-DbLUuPQ6.js → useClickOutsideEvent-wGLGWBZN.js} +2 -2
  41. package/dist/{useClickOutsideEvent-DbLUuPQ6.js.map → useClickOutsideEvent-wGLGWBZN.js.map} +1 -1
  42. package/dist/{useLayer-Dhme0dcp.js → useLayer-jUJIz8mh.js} +2 -2
  43. package/dist/{useLayer-Dhme0dcp.js.map → useLayer-jUJIz8mh.js.map} +1 -1
  44. package/package.json +12 -12
  45. package/dist/helpers-JV5y3U_M.js.map +0 -1
  46. package/dist/popover-C2DFbwZu.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"button-DpAiERt1.js","names":["<SpinnerIcon className={spinnerIcon} />","<Text data-ui=\"Spinner\" {...props}>\n <SpinnerIcon className={spinnerIcon} />\n </Text>","fontSize = 1","justifyProp = 'center'","mode = 'default'","paddingProp = 3","radiusProp = 2","gap = 3","tone = 'default'","type = 'button'","muted = false","_getArrayProp(justifyProp)","_getArrayProp(paddingProp)","_getArrayProp(paddingXProp)","_getArrayProp(paddingYProp)","_getArrayProp(paddingTopProp)","_getArrayProp(paddingBottomProp)","_getArrayProp(paddingLeftProp)","_getArrayProp(paddingRightProp)","_getArrayProp(radiusProp)","_getArrayProp(gap)","{\n // flex: 1,\n padding,\n paddingX,\n paddingY,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n }","useMemo(\n () => ({\n // flex: 1,\n padding,\n paddingX,\n paddingY,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n }),\n [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight],\n )","Boolean(loading) && (\n <LoadingBox>\n <Spinner />\n </LoadingBox>\n )","(IconComponent || text || IconRightComponent) && (\n <Box as=\"span\" {...boxProps}>\n <Flex as=\"span\" justify={justify} gap={spacing}>\n {IconComponent && (\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n )}\n\n {text && (\n <Box>\n <Text\n muted={muted}\n align={textAlign}\n size={fontSize}\n textOverflow=\"ellipsis\"\n weight={textWeight ?? button.textWeight}\n >\n {text}\n </Text>\n </Box>\n )}\n\n {IconRightComponent && (\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n )}\n </Flex>\n </Box>\n )","button.textWeight","children && (\n <Box as=\"span\" {...boxProps}>\n {children}\n </Box>\n )","<StyledButton\n data-ui=\"Button\"\n {...restProps}\n $mode={mode}\n $radius={radius}\n $tone={tone}\n data-disabled={Boolean(loading || disabled)}\n data-selected={selected ? '' : undefined}\n disabled={Boolean(loading || disabled)}\n ref={ref}\n type={type}\n $width={width}\n >\n {Boolean(loading) && (\n <LoadingBox>\n <Spinner />\n </LoadingBox>\n )}\n\n {(IconComponent || text || IconRightComponent) && (\n <Box as=\"span\" {...boxProps}>\n <Flex as=\"span\" justify={justify} gap={spacing}>\n {IconComponent && (\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n )}\n\n {text && (\n <Box>\n <Text\n muted={muted}\n align={textAlign}\n size={fontSize}\n textOverflow=\"ellipsis\"\n weight={textWeight ?? button.textWeight}\n >\n {text}\n </Text>\n </Box>\n )}\n\n {IconRightComponent && (\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n )}\n </Flex>\n </Box>\n )}\n\n {children && (\n <Box as=\"span\" {...boxProps}>\n {children}\n </Box>\n )}\n </StyledButton>","Boolean(loading || disabled)","selected ? '' : undefined"],"sources":["../src/core/primitives/spinner/spinner.css.ts","../src/core/primitives/spinner/spinner.tsx","../src/core/primitives/button/styles.ts","../src/core/primitives/button/button.tsx"],"sourcesContent":["import {keyframes, style} from '@vanilla-extract/css'\n\nconst rotate = keyframes({\n from: {transform: 'rotate(0deg)'},\n to: {transform: 'rotate(360deg)'},\n})\n\nexport const spinnerIcon = style({\n animation: `${rotate} 500ms linear infinite`,\n})\n","import {SpinnerIcon} from '@sanity/icons/Spinner'\n\nimport {Text} from '../text/text'\n\nimport {spinnerIcon} from './spinner.css'\n\n/**\n * @public\n */\nexport interface SpinnerProps {\n muted?: boolean\n size?: number | number[]\n}\n\n/**\n * Indicate that something is loading for an indeterminate amount of time.\n *\n * @public\n */\nexport function Spinner(\n props: SpinnerProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'size'>,\n) {\n return (\n <Text data-ui=\"Spinner\" {...props}>\n <SpinnerIcon className={spinnerIcon} />\n </Text>\n )\n}\n","import {css} from 'styled-components'\n\nimport {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_cardColorStyle} from '../../styles/card/_cardColorStyle'\nimport {focusRingBorderStyle, focusRingStyle} from '../../styles/focusRing'\nimport {ThemeProps} from '../../styles/types'\nimport {ButtonMode, ButtonTone, ButtonWidth} from '../../types/button'\n\n/**\n * @internal\n */\nexport function buttonBaseStyles(\n props: {$width?: ButtonWidth} & ThemeProps,\n): ReturnType<typeof css> {\n const {$width} = props\n const {style} = getTheme_v2(props.theme)\n\n return css`\n ${style?.button};\n\n -webkit-font-smoothing: inherit;\n appearance: none;\n display: inline-flex;\n align-items: center;\n font: inherit;\n border: 0;\n outline: none;\n user-select: none;\n text-decoration: none;\n border: 0;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n text-align: left;\n position: relative;\n vertical-align: top;\n\n ${\n $width === 'fill' &&\n css`\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n `\n }\n\n & > span {\n display: block;\n flex: 1;\n min-width: 0;\n border-radius: inherit;\n }\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n `\n}\n\nfunction combineBoxShadow(...boxShadows: (string | undefined)[]): string {\n return boxShadows.filter(Boolean).join(',')\n}\n\n/**\n * @internal\n */\nexport function buttonColorStyles(\n props: {$mode: ButtonMode; $tone: ButtonTone} & ThemeProps,\n): CSSObject[] {\n const {$mode} = props\n const {button, color: baseColor, style} = getTheme_v2(props.theme)\n const shadow = props.$mode === 'ghost'\n const mode = baseColor.button[$mode] || baseColor.button.default\n const color = mode[props.$tone] || mode.default\n const border = {\n width: button.border.width,\n color: 'var(--card-border-color)',\n }\n // const defaultBoxShadow = `inset 0px -1.5px 0px ${buttonTheme.border.width}px color-mix(in srgb, var(--card-border-color) 25%, var(--card-bg-color))`\n const defaultBoxShadow = undefined\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return [\n _cardColorStyle(baseColor, color.enabled),\n {\n 'backgroundColor': 'var(--card-bg-color)',\n 'color': 'var(--card-fg-color)',\n 'boxShadow': focusRingBorderStyle(border),\n '&:disabled, &[data-disabled=\"true\"]': _cardColorStyle(baseColor, color.disabled),\n \"&:not([data-disabled='true'])\": {\n 'boxShadow': combineBoxShadow(\n focusRingBorderStyle(border),\n shadow ? defaultBoxShadow : undefined,\n ),\n '&:focus': {\n boxShadow: focusRingStyle({\n base: baseColor,\n border: {width: 2, color: baseColor.bg},\n focusRing: button.focusRing,\n }),\n },\n '&:focus:not(:focus-visible)': {\n boxShadow: combineBoxShadow(\n focusRingBorderStyle(border),\n shadow ? defaultBoxShadow : undefined,\n ),\n },\n '@media (hover: hover)': {\n '&:hover': _cardColorStyle(baseColor, color.hovered),\n '&:active': _cardColorStyle(baseColor, color.pressed),\n '&[data-hovered]': _cardColorStyle(baseColor, color.hovered),\n },\n '&[data-selected]': _cardColorStyle(baseColor, color.pressed),\n },\n },\n style?.button?.root,\n ].filter(Boolean) as CSSObject[]\n}\n","import {isValidElement, useMemo} from 'react'\nimport {isValidElementType} from 'react-is'\nimport {styled} from 'styled-components'\n\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {useTheme_v2} from '../../theme/useTheme'\nimport {ButtonMode, ButtonTextAlign, ButtonTone, ButtonWidth} from '../../types/button'\nimport {ElementType, Props} from '../../types/component'\nimport {FlexJustify} from '../../types/flex'\nimport {Box} from '../box/box'\nimport {Flex} from '../flex/flex'\nimport {Spinner} from '../spinner/spinner'\nimport {Text} from '../text/text'\nimport {ResponsivePaddingProps, ResponsiveRadiusProps} from '../types'\nimport {buttonBaseStyles, buttonColorStyles} from './styles'\n\n/**\n * @public\n */\nexport interface ButtonOwnProps extends ResponsivePaddingProps, ResponsiveRadiusProps {\n fontSize?: number | number[]\n mode?: ButtonMode\n // oxlint-disable-next-line no-redundant-type-constituents\n icon?: React.ElementType | React.ReactNode\n // oxlint-disable-next-line no-redundant-type-constituents\n iconRight?: React.ElementType | React.ReactNode\n justify?: FlexJustify | FlexJustify[]\n /**\n * @beta Do not use in production, as this might change.\n */\n loading?: boolean\n selected?: boolean\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n gap?: number | number[]\n muted?: boolean\n text?: React.ReactNode\n textAlign?: ButtonTextAlign\n textWeight?: ThemeFontWeightKey\n tone?: ButtonTone\n type?: 'button' | 'reset' | 'submit'\n width?: ButtonWidth\n}\n\n/**\n * @public\n */\nexport type ButtonProps<E extends ElementType = 'button'> = Props<ButtonOwnProps, E>\n\nconst StyledButton = styled.button<\n {$mode: ButtonMode; $tone: ButtonTone; $width?: ButtonWidth} & ResponsiveRadiusStyleProps\n>(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles)\n\nconst LoadingBox = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--card-bg-color);\n border-radius: inherit;\n z-index: 1;\n box-shadow: inherit;\n`\n\nfunction ButtonComponent(\n props: ButtonOwnProps & {as?: ElementType} & Omit<\n React.HTMLProps<HTMLButtonElement>,\n 'as' | 'width'\n >,\n) {\n const {\n children,\n disabled,\n ref,\n fontSize = 1,\n icon: IconComponent,\n iconRight: IconRightComponent,\n justify: justifyProp = 'center',\n loading,\n mode = 'default',\n padding: paddingProp = 3,\n paddingX: paddingXProp,\n paddingY: paddingYProp,\n paddingTop: paddingTopProp,\n paddingBottom: paddingBottomProp,\n paddingLeft: paddingLeftProp,\n paddingRight: paddingRightProp,\n radius: radiusProp = 2,\n selected,\n gap = 3,\n text,\n textAlign,\n textWeight,\n tone = 'default',\n type = 'button',\n muted = false,\n width,\n ...restProps\n } = props\n const {button} = useTheme_v2()\n\n const justify = _getArrayProp(justifyProp)\n const padding = _getArrayProp(paddingProp)\n const paddingX = _getArrayProp(paddingXProp)\n const paddingY = _getArrayProp(paddingYProp)\n const paddingTop = _getArrayProp(paddingTopProp)\n const paddingBottom = _getArrayProp(paddingBottomProp)\n const paddingLeft = _getArrayProp(paddingLeftProp)\n const paddingRight = _getArrayProp(paddingRightProp)\n const radius = _getArrayProp(radiusProp)\n const spacing = _getArrayProp(gap)\n\n const boxProps = useMemo(\n () => ({\n // flex: 1,\n padding,\n paddingX,\n paddingY,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n }),\n [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight],\n )\n\n return (\n <StyledButton\n data-ui=\"Button\"\n {...restProps}\n $mode={mode}\n $radius={radius}\n $tone={tone}\n data-disabled={Boolean(loading || disabled)}\n data-selected={selected ? '' : undefined}\n disabled={Boolean(loading || disabled)}\n ref={ref}\n type={type}\n $width={width}\n >\n {Boolean(loading) && (\n <LoadingBox>\n <Spinner />\n </LoadingBox>\n )}\n\n {(IconComponent || text || IconRightComponent) && (\n <Box as=\"span\" {...boxProps}>\n <Flex as=\"span\" justify={justify} gap={spacing}>\n {IconComponent && (\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n )}\n\n {text && (\n <Box>\n <Text\n muted={muted}\n align={textAlign}\n size={fontSize}\n textOverflow=\"ellipsis\"\n weight={textWeight ?? button.textWeight}\n >\n {text}\n </Text>\n </Box>\n )}\n\n {IconRightComponent && (\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n )}\n </Flex>\n </Box>\n )}\n\n {children && (\n <Box as=\"span\" {...boxProps}>\n {children}\n </Box>\n )}\n </StyledButton>\n )\n}\n\n/**\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Button = ButtonComponent as unknown as <E extends ElementType = 'button'>(\n props: ButtonProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;;;;;;;;;;;;ACmBA,SAAgB,QACd,OACA;eAGIA;qDAAC,KAAA,oBAAA,aAAD,EAAa,WAAW,YAAc,CAAA;CADxCC,IAAAA;CADF,OAC8B,EAAA,OAAA,qBAA5B,KAAA,oBAAC,MAAD;EAAM,WAAQ;EAAU,GAAI;EAC1BD,UAAAA;CACI,CAAA,GAFsB,EAAA,KAAA,mBAA5BC;AAIJ;;;;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AAAA,QACLD,OAAAA,EAAAA,QAKTL,OAAAA,EAAAA,QAMAC,OAAAA,EAAAA,QAkCAE,OAAAA,EAAAA,QAhDM,QAAA,EAAA,QAKD,QAAA,EAAA,QACE,SAXV,MAAA,qBAAC,cAAD;EACE,WAAQ;EACR,GAAI;EACJ,OAAO;EACP,SAAS;EACT,OAAO;EACP,iBAAeE;EACf,iBAAeC;EACf,UAAUD;EACL;EACC;EACN,QAAQ;EAXV,UAAA;GAaGL;GAMAC;GAkCAE;EAKW;KAvDL,EAAA,MAAA,MACE,EAAA,MAAA,QAKJ,EAAA,MAAA,KAPD,EAAA,MAAA,WAIWE,EAAAA,MAAAA,KACAC,EAAAA,MAAAA,KACLD,EAAAA,MAAAA,KAKTL,EAAAA,MAAAA,KAMAC,EAAAA,MAAAA,KAkCAE,EAAAA,MAAAA,KAhDM,EAAA,MAAA,MAKD,EAAA,MAAA,MACE,EAAA,MAAA,mCAXVC;AA4DJ;;;;AAMA,MAAa,SAAS"}
1
+ {"version":3,"file":"button-DQH2KIbq.js","names":["<SpinnerIcon className={spinnerIcon} />","<Text data-ui=\"Spinner\" {...props}>\n <SpinnerIcon className={spinnerIcon} />\n </Text>","fontSize = 1","justifyProp = 'center'","mode = 'default'","paddingProp = 3","radiusProp = 2","gap = 3","tone = 'default'","type = 'button'","muted = false","_getArrayProp(justifyProp)","_getArrayProp(paddingProp)","_getArrayProp(paddingXProp)","_getArrayProp(paddingYProp)","_getArrayProp(paddingTopProp)","_getArrayProp(paddingBottomProp)","_getArrayProp(paddingLeftProp)","_getArrayProp(paddingRightProp)","_getArrayProp(radiusProp)","_getArrayProp(gap)","{\n // flex: 1,\n padding,\n paddingX,\n paddingY,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n }","useMemo(\n () => ({\n // flex: 1,\n padding,\n paddingX,\n paddingY,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n }),\n [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight],\n )","Boolean(loading) && (\n <LoadingBox>\n <Spinner />\n </LoadingBox>\n )","(IconComponent || text || IconRightComponent) && (\n <Box as=\"span\" {...boxProps}>\n <Flex as=\"span\" justify={justify} gap={spacing}>\n {IconComponent && (\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n )}\n\n {text && (\n <Box>\n <Text\n muted={muted}\n align={textAlign}\n size={fontSize}\n textOverflow=\"ellipsis\"\n weight={textWeight ?? button.textWeight}\n >\n {text}\n </Text>\n </Box>\n )}\n\n {IconRightComponent && (\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n )}\n </Flex>\n </Box>\n )","button.textWeight","children && (\n <Box as=\"span\" {...boxProps}>\n {children}\n </Box>\n )","<StyledButton\n data-ui=\"Button\"\n {...restProps}\n $mode={mode}\n $radius={radius}\n $tone={tone}\n data-disabled={Boolean(loading || disabled)}\n data-selected={selected ? '' : undefined}\n disabled={Boolean(loading || disabled)}\n ref={ref}\n type={type}\n $width={width}\n >\n {Boolean(loading) && (\n <LoadingBox>\n <Spinner />\n </LoadingBox>\n )}\n\n {(IconComponent || text || IconRightComponent) && (\n <Box as=\"span\" {...boxProps}>\n <Flex as=\"span\" justify={justify} gap={spacing}>\n {IconComponent && (\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n )}\n\n {text && (\n <Box>\n <Text\n muted={muted}\n align={textAlign}\n size={fontSize}\n textOverflow=\"ellipsis\"\n weight={textWeight ?? button.textWeight}\n >\n {text}\n </Text>\n </Box>\n )}\n\n {IconRightComponent && (\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n )}\n </Flex>\n </Box>\n )}\n\n {children && (\n <Box as=\"span\" {...boxProps}>\n {children}\n </Box>\n )}\n </StyledButton>","Boolean(loading || disabled)","selected ? '' : undefined"],"sources":["../src/core/primitives/spinner/spinner.css.ts","../src/core/primitives/spinner/spinner.tsx","../src/core/primitives/button/styles.ts","../src/core/primitives/button/button.tsx"],"sourcesContent":["import {keyframes, style} from '@vanilla-extract/css'\n\nconst rotate = keyframes({\n from: {transform: 'rotate(0deg)'},\n to: {transform: 'rotate(360deg)'},\n})\n\nexport const spinnerIcon = style({\n animation: `${rotate} 500ms linear infinite`,\n})\n","import {SpinnerIcon} from '@sanity/icons/Spinner'\n\nimport {Text} from '../text/text'\n\nimport {spinnerIcon} from './spinner.css'\n\n/**\n * @public\n */\nexport interface SpinnerProps {\n muted?: boolean\n size?: number | number[]\n}\n\n/**\n * Indicate that something is loading for an indeterminate amount of time.\n *\n * @public\n */\nexport function Spinner(\n props: SpinnerProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'size'>,\n) {\n return (\n <Text data-ui=\"Spinner\" {...props}>\n <SpinnerIcon className={spinnerIcon} />\n </Text>\n )\n}\n","import {css} from 'styled-components'\n\nimport {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_cardColorStyle} from '../../styles/card/_cardColorStyle'\nimport {focusRingBorderStyle, focusRingStyle} from '../../styles/focusRing'\nimport {ThemeProps} from '../../styles/types'\nimport {ButtonMode, ButtonTone, ButtonWidth} from '../../types/button'\n\n/**\n * @internal\n */\nexport function buttonBaseStyles(\n props: {$width?: ButtonWidth} & ThemeProps,\n): ReturnType<typeof css> {\n const {$width} = props\n const {style} = getTheme_v2(props.theme)\n\n return css`\n ${style?.button};\n\n -webkit-font-smoothing: inherit;\n appearance: none;\n display: inline-flex;\n align-items: center;\n font: inherit;\n border: 0;\n outline: none;\n user-select: none;\n text-decoration: none;\n border: 0;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n text-align: left;\n position: relative;\n vertical-align: top;\n\n ${\n $width === 'fill' &&\n css`\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n `\n }\n\n & > span {\n display: block;\n flex: 1;\n min-width: 0;\n border-radius: inherit;\n }\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n `\n}\n\nfunction combineBoxShadow(...boxShadows: (string | undefined)[]): string {\n return boxShadows.filter(Boolean).join(',')\n}\n\n/**\n * @internal\n */\nexport function buttonColorStyles(\n props: {$mode: ButtonMode; $tone: ButtonTone} & ThemeProps,\n): CSSObject[] {\n const {$mode} = props\n const {button, color: baseColor, style} = getTheme_v2(props.theme)\n const shadow = props.$mode === 'ghost'\n const mode = baseColor.button[$mode] || baseColor.button.default\n const color = mode[props.$tone] || mode.default\n const border = {\n width: button.border.width,\n color: 'var(--card-border-color)',\n }\n // const defaultBoxShadow = `inset 0px -1.5px 0px ${buttonTheme.border.width}px color-mix(in srgb, var(--card-border-color) 25%, var(--card-bg-color))`\n const defaultBoxShadow = undefined\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return [\n _cardColorStyle(baseColor, color.enabled),\n {\n 'backgroundColor': 'var(--card-bg-color)',\n 'color': 'var(--card-fg-color)',\n 'boxShadow': focusRingBorderStyle(border),\n '&:disabled, &[data-disabled=\"true\"]': _cardColorStyle(baseColor, color.disabled),\n \"&:not([data-disabled='true'])\": {\n 'boxShadow': combineBoxShadow(\n focusRingBorderStyle(border),\n shadow ? defaultBoxShadow : undefined,\n ),\n '&:focus': {\n boxShadow: focusRingStyle({\n base: baseColor,\n border: {width: 2, color: baseColor.bg},\n focusRing: button.focusRing,\n }),\n },\n '&:focus:not(:focus-visible)': {\n boxShadow: combineBoxShadow(\n focusRingBorderStyle(border),\n shadow ? defaultBoxShadow : undefined,\n ),\n },\n '@media (hover: hover)': {\n '&:hover': _cardColorStyle(baseColor, color.hovered),\n '&:active': _cardColorStyle(baseColor, color.pressed),\n '&[data-hovered]': _cardColorStyle(baseColor, color.hovered),\n },\n '&[data-selected]': _cardColorStyle(baseColor, color.pressed),\n },\n },\n style?.button?.root,\n ].filter(Boolean) as CSSObject[]\n}\n","import {isValidElement, useMemo} from 'react'\nimport {isValidElementType} from 'react-is'\nimport {styled} from 'styled-components'\n\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {useTheme_v2} from '../../theme/useTheme'\nimport {ButtonMode, ButtonTextAlign, ButtonTone, ButtonWidth} from '../../types/button'\nimport {ElementType, Props} from '../../types/component'\nimport {FlexJustify} from '../../types/flex'\nimport {Box} from '../box/box'\nimport {Flex} from '../flex/flex'\nimport {Spinner} from '../spinner/spinner'\nimport {Text} from '../text/text'\nimport {ResponsivePaddingProps, ResponsiveRadiusProps} from '../types'\nimport {buttonBaseStyles, buttonColorStyles} from './styles'\n\n/**\n * @public\n */\nexport interface ButtonOwnProps extends ResponsivePaddingProps, ResponsiveRadiusProps {\n fontSize?: number | number[]\n mode?: ButtonMode\n // oxlint-disable-next-line no-redundant-type-constituents\n icon?: React.ElementType | React.ReactNode\n // oxlint-disable-next-line no-redundant-type-constituents\n iconRight?: React.ElementType | React.ReactNode\n justify?: FlexJustify | FlexJustify[]\n /**\n * @beta Do not use in production, as this might change.\n */\n loading?: boolean\n selected?: boolean\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n gap?: number | number[]\n muted?: boolean\n text?: React.ReactNode\n textAlign?: ButtonTextAlign\n textWeight?: ThemeFontWeightKey\n tone?: ButtonTone\n type?: 'button' | 'reset' | 'submit'\n width?: ButtonWidth\n}\n\n/**\n * @public\n */\nexport type ButtonProps<E extends ElementType = 'button'> = Props<ButtonOwnProps, E>\n\nconst StyledButton = styled.button<\n {$mode: ButtonMode; $tone: ButtonTone; $width?: ButtonWidth} & ResponsiveRadiusStyleProps\n>(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles)\n\nconst LoadingBox = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--card-bg-color);\n border-radius: inherit;\n z-index: 1;\n box-shadow: inherit;\n`\n\nfunction ButtonComponent(\n props: ButtonOwnProps & {as?: ElementType} & Omit<\n React.HTMLProps<HTMLButtonElement>,\n 'as' | 'width'\n >,\n) {\n const {\n children,\n disabled,\n ref,\n fontSize = 1,\n icon: IconComponent,\n iconRight: IconRightComponent,\n justify: justifyProp = 'center',\n loading,\n mode = 'default',\n padding: paddingProp = 3,\n paddingX: paddingXProp,\n paddingY: paddingYProp,\n paddingTop: paddingTopProp,\n paddingBottom: paddingBottomProp,\n paddingLeft: paddingLeftProp,\n paddingRight: paddingRightProp,\n radius: radiusProp = 2,\n selected,\n gap = 3,\n text,\n textAlign,\n textWeight,\n tone = 'default',\n type = 'button',\n muted = false,\n width,\n ...restProps\n } = props\n const {button} = useTheme_v2()\n\n const justify = _getArrayProp(justifyProp)\n const padding = _getArrayProp(paddingProp)\n const paddingX = _getArrayProp(paddingXProp)\n const paddingY = _getArrayProp(paddingYProp)\n const paddingTop = _getArrayProp(paddingTopProp)\n const paddingBottom = _getArrayProp(paddingBottomProp)\n const paddingLeft = _getArrayProp(paddingLeftProp)\n const paddingRight = _getArrayProp(paddingRightProp)\n const radius = _getArrayProp(radiusProp)\n const spacing = _getArrayProp(gap)\n\n const boxProps = useMemo(\n () => ({\n // flex: 1,\n padding,\n paddingX,\n paddingY,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n }),\n [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight],\n )\n\n return (\n <StyledButton\n data-ui=\"Button\"\n {...restProps}\n $mode={mode}\n $radius={radius}\n $tone={tone}\n data-disabled={Boolean(loading || disabled)}\n data-selected={selected ? '' : undefined}\n disabled={Boolean(loading || disabled)}\n ref={ref}\n type={type}\n $width={width}\n >\n {Boolean(loading) && (\n <LoadingBox>\n <Spinner />\n </LoadingBox>\n )}\n\n {(IconComponent || text || IconRightComponent) && (\n <Box as=\"span\" {...boxProps}>\n <Flex as=\"span\" justify={justify} gap={spacing}>\n {IconComponent && (\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n )}\n\n {text && (\n <Box>\n <Text\n muted={muted}\n align={textAlign}\n size={fontSize}\n textOverflow=\"ellipsis\"\n weight={textWeight ?? button.textWeight}\n >\n {text}\n </Text>\n </Box>\n )}\n\n {IconRightComponent && (\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n )}\n </Flex>\n </Box>\n )}\n\n {children && (\n <Box as=\"span\" {...boxProps}>\n {children}\n </Box>\n )}\n </StyledButton>\n )\n}\n\n/**\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Button = ButtonComponent as unknown as <E extends ElementType = 'button'>(\n props: ButtonProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;;;;;;;;;;;;ACmBA,SAAgB,QACd,OACA;eAGIA;qDAAC,KAAA,oBAAA,aAAD,EAAa,WAAW,YAAc,CAAA;CADxCC,IAAAA;CADF,OAC8B,EAAA,OAAA,qBAA5B,KAAA,oBAAC,MAAD;EAAM,WAAQ;EAAU,GAAI;EAC1BD,UAAAA;CACI,CAAA,GAFsB,EAAA,KAAA,mBAA5BC;AAIJ;;;;ACfA,SAAgB,iBACd,OACwB;CACxB,IAAM,EAAC,WAAU,OACX,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,GAAG,GACN,OAAO,OAAO,4RAqBd,WAAW,UACX,GAAG,mEAKJ;AAcL;AAEA,SAAS,iBAAiB,GAAG,YAA4C;CACvE,OAAO,WAAW,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AAC5C;;;;AAKA,SAAgB,kBACd,OACa;CACb,IAAM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A;GAaGL;GAMAC;GAkCAE;EAKW;KAvDL,EAAA,MAAA,MACE,EAAA,MAAA,QAKJ,EAAA,MAAA,KAPD,EAAA,MAAA,WAIWE,EAAAA,MAAAA,KACAC,EAAAA,MAAAA,KACLD,EAAAA,MAAAA,KAKTL,EAAAA,MAAAA,KAMAC,EAAAA,MAAAA,KAkCAE,EAAAA,MAAAA,KAhDM,EAAA,MAAA,MAKD,EAAA,MAAA,MACE,EAAA,MAAA,mCAXVC;AA4DJ;;;;AAMA,MAAa,SAAS"}
package/dist/code.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { n as _getArrayProp } from "./helpers-JV5y3U_M.js";
2
+ import { n as _getArrayProp } from "./helpers-C8xxXAQC.js";
3
3
  import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
4
- import { t as responsiveCodeFontStyle } from "./codeFontStyle-aWvllgWi.js";
4
+ import { t as responsiveCodeFontStyle } from "./codeFontStyle-84SMhFtI.js";
5
5
  import { c } from "react/compiler-runtime";
6
6
  import { Suspense, lazy } from "react";
7
7
  import { css, styled } from "styled-components";
package/dist/code.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"code.js","names":["size = 2","_getArrayProp(size)","<code>{children}</code>","<LazyRefractor language={language} value={children} />","<Suspense fallback={<code>{children}</code>}>\n <LazyRefractor language={language} value={children} />\n </Suspense>","<StyledCode\n data-ui=\"Code\"\n {...restProps}\n $size={_getArrayProp(size)}\n // oxlint-disable-next-line no-unsafe-type-assertion -- `weight` is typed as `string` in the public API; unknown weights fall back to `regular` at runtime\n $weight={weight as ThemeFontWeightKey | undefined}\n ref={ref}\n >\n <Suspense fallback={<code>{children}</code>}>\n <LazyRefractor language={language} value={children} />\n </Suspense>\n </StyledCode>","weight as ThemeFontWeightKey | undefined"],"sources":["../src/core/primitives/code/styles.ts","../src/core/primitives/code/code.tsx"],"sourcesContent":["import {css, ExecutionContext} from 'styled-components'\n\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\n\nfunction codeSyntaxHighlightingStyle({theme}: ExecutionContext) {\n const {\n color: {syntax: color},\n } = getTheme_v2(theme)\n\n return {\n '&.atrule': {color: color.atrule},\n '&.attr-name': {color: color.attrName},\n '&.attr-value': {color: color.attrValue},\n '&.attribute': {color: color.attribute},\n '&.boolean': {color: color.boolean},\n '&.builtin': {color: color.builtin},\n '&.cdata': {color: color.cdata},\n '&.char': {color: color.char},\n '&.class': {color: color.class},\n '&.class-name': {color: color.className},\n '&.comment': {color: color.comment},\n '&.constant': {color: color.constant},\n '&.deleted': {color: color.deleted},\n '&.doctype': {color: color.doctype},\n '&.entity': {color: color.entity},\n '&.function': {color: color.function},\n '&.hexcode': {color: color.hexcode},\n '&.id': {color: color.id},\n '&.important': {color: color.important},\n '&.inserted': {color: color.inserted},\n '&.keyword': {color: color.keyword},\n '&.number': {color: color.number},\n '&.operator': {color: color.operator},\n '&.prolog': {color: color.prolog},\n '&.property': {color: color.property},\n '&.pseudo-class': {color: color.pseudoClass},\n '&.pseudo-element': {color: color.pseudoElement},\n '&.punctuation': {color: color.punctuation},\n '&.regex': {color: color.regex},\n '&.selector': {color: color.selector},\n '&.string': {color: color.string},\n '&.symbol': {color: color.symbol},\n '&.tag': {color: color.tag},\n '&.unit': {color: color.unit},\n '&.url': {color: color.url},\n '&.variable': {color: color.variable},\n }\n}\n\nexport function codeBaseStyle(): ReturnType<typeof css> {\n return css`\n color: var(--card-code-fg-color);\n\n & code {\n font-family: inherit;\n\n &.refractor .token {\n ${codeSyntaxHighlightingStyle}\n }\n }\n\n & a {\n color: inherit;\n text-decoration: underline;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n /* ...and aren't squeezed by resets that set max-width: 100% */\n max-width: unset;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n `\n}\n","import {lazy, Suspense} from 'react'\nimport {styled} from 'styled-components'\n\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {responsiveCodeFontStyle} from '../../styles/font/codeFontStyle'\nimport {FontWeightStyleProps, ResponsiveFontSizeStyleProps} from '../../styles/font/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {codeBaseStyle} from './styles'\n\nconst LazyRefractor = lazy(() => import('./refractor'))\n\n/**\n * @public\n */\nexport interface CodeOwnProps {\n /** Define the language to use for syntax highlighting. */\n language?: string\n size?: number | number[]\n weight?: string\n}\n\n/**\n * @public\n */\nexport type CodeProps<E extends ElementType = 'pre'> = Props<CodeOwnProps, E>\n\nconst StyledCode = styled.pre<FontWeightStyleProps & ResponsiveFontSizeStyleProps>(\n codeBaseStyle,\n responsiveCodeFontStyle,\n)\n\nfunction CodeComponent(\n props: CodeOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLPreElement>, 'as' | 'size'>,\n) {\n const {children, language, ref, size = 2, weight, ...restProps} = props\n\n return (\n <StyledCode\n data-ui=\"Code\"\n {...restProps}\n $size={_getArrayProp(size)}\n // oxlint-disable-next-line no-unsafe-type-assertion -- `weight` is typed as `string` in the public API; unknown weights fall back to `regular` at runtime\n $weight={weight as ThemeFontWeightKey | undefined}\n ref={ref}\n >\n <Suspense fallback={<code>{children}</code>}>\n <LazyRefractor language={language} value={children} />\n </Suspense>\n </StyledCode>\n )\n}\n\n/**\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Code = CodeComponent as unknown as <E extends ElementType = 'pre'>(\n props: CodeProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;;;AAIA,SAAS,4BAA4B,EAAC,SAA0B;CAC9D,IAAM,EACJ,OAAO,EAAC,QAAQ,YACd,YAAY,KAAK;CAErB,OAAO;EACL,YAAY,EAAC,OAAO,MAAM,OAAM;EAChC,eAAe,EAAC,OAAO,MAAM,SAAQ;EACrC,gBAAgB,EAAC,OAAO,MAAM,UAAS;EACvC,eAAe,EAAC,O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3,"file":"code.js","names":["size = 2","_getArrayProp(size)","<code>{children}</code>","<LazyRefractor language={language} value={children} />","<Suspense fallback={<code>{children}</code>}>\n <LazyRefractor language={language} value={children} />\n </Suspense>","<StyledCode\n data-ui=\"Code\"\n {...restProps}\n $size={_getArrayProp(size)}\n // oxlint-disable-next-line no-unsafe-type-assertion -- `weight` is typed as `string` in the public API; unknown weights fall back to `regular` at runtime\n $weight={weight as ThemeFontWeightKey | undefined}\n ref={ref}\n >\n <Suspense fallback={<code>{children}</code>}>\n <LazyRefractor language={language} value={children} />\n </Suspense>\n </StyledCode>","weight as ThemeFontWeightKey | undefined"],"sources":["../src/core/primitives/code/styles.ts","../src/core/primitives/code/code.tsx"],"sourcesContent":["import {css, ExecutionContext} from 'styled-components'\n\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\n\nfunction codeSyntaxHighlightingStyle({theme}: ExecutionContext) {\n const {\n color: {syntax: color},\n } = getTheme_v2(theme)\n\n return {\n '&.atrule': {color: color.atrule},\n '&.attr-name': {color: color.attrName},\n '&.attr-value': {color: color.attrValue},\n '&.attribute': {color: color.attribute},\n '&.boolean': {color: color.boolean},\n '&.builtin': {color: color.builtin},\n '&.cdata': {color: color.cdata},\n '&.char': {color: color.char},\n '&.class': {color: color.class},\n '&.class-name': {color: color.className},\n '&.comment': {color: color.comment},\n '&.constant': {color: color.constant},\n '&.deleted': {color: color.deleted},\n '&.doctype': {color: color.doctype},\n '&.entity': {color: color.entity},\n '&.function': {color: color.function},\n '&.hexcode': {color: color.hexcode},\n '&.id': {color: color.id},\n '&.important': {color: color.important},\n '&.inserted': {color: color.inserted},\n '&.keyword': {color: color.keyword},\n '&.number': {color: color.number},\n '&.operator': {color: color.operator},\n '&.prolog': {color: color.prolog},\n '&.property': {color: color.property},\n '&.pseudo-class': {color: color.pseudoClass},\n '&.pseudo-element': {color: color.pseudoElement},\n '&.punctuation': {color: color.punctuation},\n '&.regex': {color: color.regex},\n '&.selector': {color: color.selector},\n '&.string': {color: color.string},\n '&.symbol': {color: color.symbol},\n '&.tag': {color: color.tag},\n '&.unit': {color: color.unit},\n '&.url': {color: color.url},\n '&.variable': {color: color.variable},\n }\n}\n\nexport function codeBaseStyle(): ReturnType<typeof css> {\n return css`\n color: var(--card-code-fg-color);\n\n & code {\n font-family: inherit;\n\n &.refractor .token {\n ${codeSyntaxHighlightingStyle}\n }\n }\n\n & a {\n color: inherit;\n text-decoration: underline;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n /* ...and aren't squeezed by resets that set max-width: 100% */\n max-width: unset;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n `\n}\n","import {lazy, Suspense} from 'react'\nimport {styled} from 'styled-components'\n\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {responsiveCodeFontStyle} from '../../styles/font/codeFontStyle'\nimport {FontWeightStyleProps, ResponsiveFontSizeStyleProps} from '../../styles/font/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {codeBaseStyle} from './styles'\n\nconst LazyRefractor = lazy(() => import('./refractor'))\n\n/**\n * @public\n */\nexport interface CodeOwnProps {\n /** Define the language to use for syntax highlighting. */\n language?: string\n size?: number | number[]\n weight?: string\n}\n\n/**\n * @public\n */\nexport type CodeProps<E extends ElementType = 'pre'> = Props<CodeOwnProps, E>\n\nconst StyledCode = styled.pre<FontWeightStyleProps & ResponsiveFontSizeStyleProps>(\n codeBaseStyle,\n responsiveCodeFontStyle,\n)\n\nfunction CodeComponent(\n props: CodeOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLPreElement>, 'as' | 'size'>,\n) {\n const {children, language, ref, size = 2, weight, ...restProps} = props\n\n return (\n <StyledCode\n data-ui=\"Code\"\n {...restProps}\n $size={_getArrayProp(size)}\n // oxlint-disable-next-line no-unsafe-type-assertion -- `weight` is typed as `string` in the public API; unknown weights fall back to `regular` at runtime\n $weight={weight as ThemeFontWeightKey | undefined}\n ref={ref}\n >\n <Suspense fallback={<code>{children}</code>}>\n <LazyRefractor language={language} value={children} />\n </Suspense>\n </StyledCode>\n )\n}\n\n/**\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Code = CodeComponent as unknown as <E extends ElementType = 'pre'>(\n props: CodeProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;;;AAIA,SAAS,4BAA4B,EAAC,SAA0B;CAC9D,IAAM,EACJ,OAAO,EAAC,QAAQ,YACd,YAAY,KAAK;CAErB,OAAO;EACL,YAAY,EAAC,OAAO,MAAM,OAAM;EAChC,eAAe,EAAC,OAAO,MAAM,SAAQ;EACrC,gBAAgB,EAAC,OAAO,MAAM,UAAS;EACvC,eAAe,EAAC,OAAO,MAAM,UAAS;EACtC,aAAa,EAAC,OAAO,MAAM,QAAO;EAClC,aAAa,EAAC,OAAO,MAAM,QAAO;EAClC,WAAW,EAAC,OAAO,MAAM,MAAK;EAC9B,UAAU,EAAC,OAAO,MAAM,KAAI;EAC5B,WAAW,EAAC,OAAO,MAAM,MAAK;EAC9B,gBAAgB,EAAC,OAAO,MAAM,UAAS;EACvC,aAAa,EAAC,OAAO,MAAM,QAAO;EAClC,cAAc,EAAC,OAAO,MAAM,SAAQ;EACpC,aAAa,EAAC,OAAO,MAAM,QAAO;EAClC,aAAa,EAAC,OAAO,MAAM,QAAO;EAClC,YAAY,EAAC,OAAO,MAAM,OAAM;EAChC,cAAc,EAAC,OAAO,MAAM,SAAQ;EACpC,aAAa,EAAC,OAAO,MAAM,QAAO;EAClC,QAAQ,EAAC,OAAO,MAAM,GAAE;EACxB,eAAe,EAAC,OAAO,MAAM,UAAS;EACtC,cAAc,EAAC,OAAO,MAAM,SAAQ;EACpC,aAAa,EAAC,OAAO,MAAM,QAAO;EAClC,YAAY,EAAC,OAAO,MAAM,OAAM;EAChC,cAAc,EAAC,OAAO,MAAM,SAAQ;EACpC,YAAY,E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EAAAA,QAAAA,MAAAA,EAAAA,QAClBC,MADF,KAAA,oBAAC,UAAD;EAAU,UAAUD;EAClBC,UAAAA;CACQ,CAAA,GAFUD,EAAAA,MAAAA,IAClBC,EAAAA,MAAAA;CATJE,IAAAA;CADF,OAOS,EAAA,QAAA,OAAA,EAAA,QAJD,aAAA,EAAA,QACGJ,MAAAA,EAAAA,QAEEK,MAAAA,EAAAA,QAGTF,MARF,KAAA,oBAAC,YAAD;EACE,WAAQ;EACR,GAAI;EACJ,OAAOH;EAEP,SAASK;EACJ;EAELF,UAAAA;CAGU,CAAA,GALL,EAAA,MAAA,KAJD,EAAA,MAAA,WACGH,EAAAA,MAAAA,IAEEK,EAAAA,MAAAA,IAGTF,EAAAA,MAAAA,8BARFC;AAaJ;;;;AAMA,MAAa,OAAO"}
@@ -1,4 +1,4 @@
1
- import { t as responsiveFont } from "./responsiveFont-BwYElGq4.js";
1
+ import { t as responsiveFont } from "./responsiveFont-CilwaORG.js";
2
2
  /**
3
3
  * Get responsive CSS for the `code` font style.
4
4
  * @internal
@@ -8,4 +8,4 @@ function responsiveCodeFontStyle(props) {
8
8
  }
9
9
  export { responsiveCodeFontStyle as t };
10
10
 
11
- //# sourceMappingURL=codeFontStyle-aWvllgWi.js.map
11
+ //# sourceMappingURL=codeFontStyle-84SMhFtI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"codeFontStyle-aWvllgWi.js","names":[],"sources":["../src/core/styles/font/codeFontStyle.ts"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {ThemeProps} from '../types'\nimport {responsiveFont} from './responsiveFont'\nimport {FontWeightStyleProps, ResponsiveFontSizeStyleProps} from './types'\n\n/**\n * Get responsive CSS for the `code` font style.\n * @internal\n */\nexport function responsiveCodeFontStyle(\n props: FontWeightStyleProps & ResponsiveFontSizeStyleProps & ThemeProps,\n): CSSObject[] {\n return responsiveFont('code', props)\n}\n"],"mappings":";;;;;AASA,SAAgB,wBACd,OACa;CACb,OAAO,eAAe,QAAQ,KAAK;AACrC"}
1
+ {"version":3,"file":"codeFontStyle-84SMhFtI.js","names":[],"sources":["../src/core/styles/font/codeFontStyle.ts"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {ThemeProps} from '../types'\nimport {responsiveFont} from './responsiveFont'\nimport {FontWeightStyleProps, ResponsiveFontSizeStyleProps} from './types'\n\n/**\n * Get responsive CSS for the `code` font style.\n * @internal\n */\nexport function responsiveCodeFontStyle(\n props: FontWeightStyleProps & ResponsiveFontSizeStyleProps & ThemeProps,\n): CSSObject[] {\n return responsiveFont('code', props)\n}\n"],"mappings":";;;;;AASA,SAAgB,wBACd,OACa;CACb,OAAO,eAAe,QAAQ,KAAK;AACrC"}
@@ -1,6 +1,6 @@
1
- import { a as rem, i as _responsive, n as _getArrayProp } from "./helpers-JV5y3U_M.js";
1
+ import { a as rem, i as _responsive, n as _getArrayProp } from "./helpers-C8xxXAQC.js";
2
2
  import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
3
- import { x as flexItemStyle, y as Box } from "./useLayer-Dhme0dcp.js";
3
+ import { x as flexItemStyle, y as Box } from "./useLayer-jUJIz8mh.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import { styled } from "styled-components";
6
6
  import { jsx } from "react/jsx-runtime";
@@ -73,4 +73,4 @@ function FlexComponent(props) {
73
73
  const Flex = FlexComponent;
74
74
  export { Flex as t };
75
75
 
76
- //# sourceMappingURL=flex-C6SsHFy8.js.map
76
+ //# sourceMappingURL=flex-CySCBzQm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flex-C6SsHFy8.js","names":["direction = 'row'","_getArrayProp(align)","_getArrayProp(direction)","_getArrayProp(gap)","_getArrayProp(justify)","_getArrayProp(wrap)","<StyledFlex\n data-ui=\"Flex\"\n {...restProps}\n $align={_getArrayProp(align)}\n $direction={_getArrayProp(direction)}\n $gap={_getArrayProp(gap)}\n $justify={_getArrayProp(justify)}\n $wrap={_getArrayProp(wrap)}\n forwardedAs={as}\n ref={ref}\n />"],"sources":["../src/core/styles/flex/flexStyle.ts","../src/core/primitives/flex/flex.tsx"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveFlexStyleProps} from './types'\n\nconst BASE_STYLE: CSSObject = {\n '&&:not([hidden])': {\n display: 'flex',\n },\n}\n\nexport function responsiveFlexStyle(): Array<\n CSSObject | ((props: ResponsiveFlexStyleProps & ThemeProps) => CSSObject[])\n> {\n return [\n BASE_STYLE,\n responsiveFlexAlignStyle,\n responsiveFlexGapStyle,\n responsiveFlexWrapStyle,\n responsiveFlexJustifyStyle,\n responsiveFlexDirectionStyle,\n ]\n}\n\nfunction responsiveFlexAlignStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$align, (align) => {\n return {alignItems: align}\n })\n}\n\nfunction responsiveFlexGapStyle(props: ResponsiveFlexStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gap, (gap) => ({\n gap: gap ? rem(space[gap]) : undefined,\n }))\n}\n\nfunction responsiveFlexWrapStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$wrap, (wrap) => {\n return {flexWrap: wrap}\n })\n}\n\nfunction responsiveFlexJustifyStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$justify, (justify) => {\n return {justifyContent: justify}\n })\n}\n\nfunction responsiveFlexDirectionStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$direction, (direction) => {\n return {flexDirection: direction}\n })\n}\n","import {styled} from 'styled-components'\n\nimport {flexItemStyle} from '../../styles/flex/flexItemStyle'\nimport {responsiveFlexStyle} from '../../styles/flex/flexStyle'\nimport {FlexItemStyleProps, ResponsiveFlexStyleProps} from '../../styles/flex/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {ResponsiveFlexItemProps, ResponsiveFlexProps} from '../types'\n\n/**\n * @public\n */\nexport interface FlexOwnProps\n extends Omit<BoxOwnProps, 'display'>, ResponsiveFlexProps, ResponsiveFlexItemProps {\n gap?: number | number[]\n}\n\n/**\n * @public\n */\nexport type FlexProps<E extends ElementType = 'div'> = Props<FlexOwnProps, E>\n\nconst StyledFlex = styled(Box)<FlexItemStyleProps & ResponsiveFlexStyleProps>(\n flexItemStyle,\n responsiveFlexStyle,\n)\n\nfunction FlexComponent(\n props: FlexOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'wrap'>,\n) {\n const {align, as, direction = 'row', gap, justify, ref, wrap, ...restProps} = props\n\n return (\n <StyledFlex\n data-ui=\"Flex\"\n {...restProps}\n $align={_getArrayProp(align)}\n $direction={_getArrayProp(direction)}\n $gap={_getArrayProp(gap)}\n $justify={_getArrayProp(justify)}\n $wrap={_getArrayProp(wrap)}\n forwardedAs={as}\n ref={ref}\n />\n )\n}\n\n/**\n * The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Flex = FlexComponent as unknown as <E extends ElementType = 'div'>(\n props: FlexProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;AAMA,MAAM,aAAwB,EAC5B,oBAAoB,EAClB,SAAS,OACX,EACF;AAEA,SAAgB,sBAEd;CACA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;CACF;AACF;AAEA,SAAS,yBAAyB,OAA2D;CAC3F,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY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;CAAc,AAAA,EAAA,QAAA,wBAAd,KAAA,cAAc,OAAO,GAAP,EAAA,MAAA;CACjBC,IAAAA;CAAc,AAAA,EAAA,QAAA,qBAAd,KAAA,cAAc,IAAI,GAAJ,EAAA,MAAA;CAPvBC,IAAAA;CADF,OASiB,EAAA,QAAA,MAAA,EAAA,QACR,OAAA,EAAA,QAPD,aAAA,EAAA,QACIL,MAAAA,EAAAA,QACIC,MAAAA,EAAAA,QACNC,MAAAA,EAAAA,QACIC,MAAAA,EAAAA,QACHC,MAPT,KAAA,oBAAC,YAAD;EACE,WAAQ;EACR,GAAI;EACJ,QAAQJ;EACR,YAAYC;EACZ,MAAMC;EACN,UAAUC;EACV,OAAOC;EACP,aAAa;EACR;CACN,CAAA,GAFc,EAAA,MAAA,IACR,EAAA,MAAA,KAPD,EAAA,MAAA,WACIJ,EAAAA,MAAAA,IACIC,EAAAA,MAAAA,IACNC,EAAAA,MAAAA,IACIC,EAAAA,MAAAA,IACHC,EAAAA,MAAAA,8BAPTC;AAYJ;;;;;;AAQA,MAAa,OAAO"}
1
+ {"version":3,"file":"flex-CySCBzQm.js","names":["direction = 'row'","_getArrayProp(align)","_getArrayProp(direction)","_getArrayProp(gap)","_getArrayProp(justify)","_getArrayProp(wrap)","<StyledFlex\n data-ui=\"Flex\"\n {...restProps}\n $align={_getArrayProp(align)}\n $direction={_getArrayProp(direction)}\n $gap={_getArrayProp(gap)}\n $justify={_getArrayProp(justify)}\n $wrap={_getArrayProp(wrap)}\n forwardedAs={as}\n ref={ref}\n />"],"sources":["../src/core/styles/flex/flexStyle.ts","../src/core/primitives/flex/flex.tsx"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveFlexStyleProps} from './types'\n\nconst BASE_STYLE: CSSObject = {\n '&&:not([hidden])': {\n display: 'flex',\n },\n}\n\nexport function responsiveFlexStyle(): Array<\n CSSObject | ((props: ResponsiveFlexStyleProps & ThemeProps) => CSSObject[])\n> {\n return [\n BASE_STYLE,\n responsiveFlexAlignStyle,\n responsiveFlexGapStyle,\n responsiveFlexWrapStyle,\n responsiveFlexJustifyStyle,\n responsiveFlexDirectionStyle,\n ]\n}\n\nfunction responsiveFlexAlignStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$align, (align) => {\n return {alignItems: align}\n })\n}\n\nfunction responsiveFlexGapStyle(props: ResponsiveFlexStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gap, (gap) => ({\n gap: gap ? rem(space[gap]) : undefined,\n }))\n}\n\nfunction responsiveFlexWrapStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$wrap, (wrap) => {\n return {flexWrap: wrap}\n })\n}\n\nfunction responsiveFlexJustifyStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$justify, (justify) => {\n return {justifyContent: justify}\n })\n}\n\nfunction responsiveFlexDirectionStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$direction, (direction) => {\n return {flexDirection: direction}\n })\n}\n","import {styled} from 'styled-components'\n\nimport {flexItemStyle} from '../../styles/flex/flexItemStyle'\nimport {responsiveFlexStyle} from '../../styles/flex/flexStyle'\nimport {FlexItemStyleProps, ResponsiveFlexStyleProps} from '../../styles/flex/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {ResponsiveFlexItemProps, ResponsiveFlexProps} from '../types'\n\n/**\n * @public\n */\nexport interface FlexOwnProps\n extends Omit<BoxOwnProps, 'display'>, ResponsiveFlexProps, ResponsiveFlexItemProps {\n gap?: number | number[]\n}\n\n/**\n * @public\n */\nexport type FlexProps<E extends ElementType = 'div'> = Props<FlexOwnProps, E>\n\nconst StyledFlex = styled(Box)<FlexItemStyleProps & ResponsiveFlexStyleProps>(\n flexItemStyle,\n responsiveFlexStyle,\n)\n\nfunction FlexComponent(\n props: FlexOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'wrap'>,\n) {\n const {align, as, direction = 'row', gap, justify, ref, wrap, ...restProps} = props\n\n return (\n <StyledFlex\n data-ui=\"Flex\"\n {...restProps}\n $align={_getArrayProp(align)}\n $direction={_getArrayProp(direction)}\n $gap={_getArrayProp(gap)}\n $justify={_getArrayProp(justify)}\n $wrap={_getArrayProp(wrap)}\n forwardedAs={as}\n ref={ref}\n />\n )\n}\n\n/**\n * The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Flex = FlexComponent as unknown as <E extends ElementType = 'div'>(\n props: FlexProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;AAMA,MAAM,aAAwB,EAC5B,oBAAoB,EAClB,SAAS,OACX,EACF;AAEA,SAAgB,sBAEd;CACA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;CACF;AACF;AAEA,SAAS,yBAAyB,OAA2D;CAC3F,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,SAAS,WAChC,EAAC,YAAY,MAAK,EAC1B;AACH;AAEA,SAAS,uBAAuB,OAA8C;CAC5E,IAAM,EAAC,OAAO,UAAS,YAAY,MAAM,KAAK;CAE9C,OAAO,YAAY,OAAO,MAAM,OAAO,SAAS,EAC9C,KAAK,MAAM,IAAI,MAAM,IAAI,IAAI,KAAA,EAC/B,EAAE;AACJ;AAEA,SAAS,wBAAwB,OAA2D;CAC1F,IAAM,EAAC,UAAS,YAAY,M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QACIC,MAAAA,EAAAA,QACHC,MAPT,KAAA,oBAAC,YAAD;EACE,WAAQ;EACR,GAAI;EACJ,QAAQJ;EACR,YAAYC;EACZ,MAAMC;EACN,UAAUC;EACV,OAAOC;EACP,aAAa;EACR;CACN,CAAA,GAFc,EAAA,MAAA,IACR,EAAA,MAAA,KAPD,EAAA,MAAA,WACIJ,EAAAA,MAAAA,IACIC,EAAAA,MAAAA,IACNC,EAAAA,MAAAA,IACIC,EAAAA,MAAAA,IACHC,EAAAA,MAAAA,8BAPTC;AAYJ;;;;;;AAQA,MAAa,OAAO"}
@@ -1,6 +1,6 @@
1
- import { a as rem, i as _responsive, n as _getArrayProp } from "./helpers-JV5y3U_M.js";
1
+ import { a as rem, i as _responsive, n as _getArrayProp } from "./helpers-C8xxXAQC.js";
2
2
  import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
3
- import { y as Box } from "./useLayer-Dhme0dcp.js";
3
+ import { y as Box } from "./useLayer-jUJIz8mh.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import { styled } from "styled-components";
6
6
  import { jsx } from "react/jsx-runtime";
@@ -112,4 +112,4 @@ function GridComponent(props) {
112
112
  const Grid = GridComponent;
113
113
  export { Grid as t };
114
114
 
115
- //# sourceMappingURL=grid-3kBnMOwF.js.map
115
+ //# sourceMappingURL=grid-I2TNptX-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grid-3kBnMOwF.js","names":["_getArrayProp(autoRows)","_getArrayProp(autoCols)","_getArrayProp(autoFlow)","_getArrayProp(gridTemplateColumns)","_getArrayProp(gap)","_getArrayProp(gapX)","_getArrayProp(gapY)","_getArrayProp(gridTemplateRows)","<StyledGrid\n data-as={typeof as === 'string' ? as : undefined}\n data-ui=\"Grid\"\n {...restProps}\n $autoRows={_getArrayProp(autoRows)}\n $autoCols={_getArrayProp(autoCols)}\n $autoFlow={_getArrayProp(autoFlow)}\n $columns={_getArrayProp(gridTemplateColumns)}\n $gap={_getArrayProp(gap)}\n $gapX={_getArrayProp(gapX)}\n $gapY={_getArrayProp(gapY)}\n $rows={_getArrayProp(gridTemplateRows)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledGrid>","typeof as === 'string' ? as : undefined"],"sources":["../src/core/styles/grid/gridStyle.ts","../src/core/primitives/grid/grid.tsx"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveGridStyleProps} from './types'\n\nconst GRID_CSS = {\n '&&:not([hidden])': {\n display: 'grid',\n },\n '&[data-as=\"ul\"],&[data-as=\"ol\"]': {\n listStyle: 'none',\n },\n}\n\nconst GRID_AUTO_COLUMS = {\n auto: 'auto',\n min: 'min-content',\n max: 'max-content',\n fr: 'minmax(0, 1fr)',\n}\n\nconst GRID_AUTO_ROWS = {\n auto: 'auto',\n min: 'min-content',\n max: 'max-content',\n fr: 'minmax(0, 1fr)',\n}\n\nexport function responsiveGridStyle(): Array<\n CSSObject | ((props: ResponsiveGridStyleProps & ThemeProps) => CSSObject[])\n> {\n return [\n GRID_CSS,\n responsiveGridAutoFlowStyle,\n responsiveGridAutoRowsStyle,\n responsiveGridAutoColsStyle,\n responsiveGridColumnsStyle,\n responsiveGridRowsStyle,\n responsiveGridGapStyle,\n responsiveGridGapXStyle,\n responsiveGridGapYStyle,\n ]\n}\n\nfunction responsiveGridAutoFlowStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoFlow, (autoFlow) => ({\n gridAutoFlow: autoFlow,\n }))\n}\n\nfunction responsiveGridAutoRowsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoRows, (autoRows) => ({\n gridAutoRows: autoRows && GRID_AUTO_ROWS[autoRows],\n }))\n}\n\nfunction responsiveGridAutoColsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoCols, (autoCols) => ({\n gridAutoColumns: autoCols && GRID_AUTO_COLUMS[autoCols],\n }))\n}\n\nfunction responsiveGridColumnsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$columns, (columns) => ({\n gridTemplateColumns: columns && `repeat(${columns},minmax(0,1fr));`,\n }))\n}\n\nfunction responsiveGridRowsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$rows, (rows) => ({\n gridTemplateRows: rows && `repeat(${rows},minmax(0,1fr));`,\n }))\n}\n\nfunction responsiveGridGapStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gap, (gap) => ({\n // oxlint-disable-next-line no-deprecated\n gridGap: gap ? rem(space[gap]) : undefined,\n }))\n}\n\nfunction responsiveGridGapXStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gapX, (gapX) => ({\n columnGap: gapX ? rem(space[gapX]) : undefined,\n }))\n}\n\nfunction responsiveGridGapYStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gapY, (gapY) => ({\n rowGap: gapY ? rem(space[gapY]) : undefined,\n }))\n}\n","import {styled} from 'styled-components'\n\nimport {responsiveGridStyle} from '../../styles/grid/gridStyle'\nimport {ResponsiveGridStyleProps} from '../../styles/grid/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {ResponsiveGridProps} from '../types'\n\n/**\n * @public\n */\nexport interface GridOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveGridProps {}\n\n/**\n * @public\n */\nexport type GridProps<E extends ElementType = 'div'> = Props<GridOwnProps, E>\n\nconst StyledGrid = styled(Box)<ResponsiveGridStyleProps>(responsiveGridStyle)\n\nfunction GridComponent(\n props: GridOwnProps & {as?: ElementType} & Omit<\n React.HTMLProps<HTMLDivElement>,\n 'as' | 'height' | 'rows'\n >,\n) {\n const {\n as,\n autoRows,\n autoCols,\n autoFlow,\n gridTemplateColumns,\n gap,\n gapX,\n gapY,\n gridTemplateRows,\n children,\n ref,\n ...restProps\n } = props\n\n return (\n <StyledGrid\n data-as={typeof as === 'string' ? as : undefined}\n data-ui=\"Grid\"\n {...restProps}\n $autoRows={_getArrayProp(autoRows)}\n $autoCols={_getArrayProp(autoCols)}\n $autoFlow={_getArrayProp(autoFlow)}\n $columns={_getArrayProp(gridTemplateColumns)}\n $gap={_getArrayProp(gap)}\n $gapX={_getArrayProp(gapX)}\n $gapY={_getArrayProp(gapY)}\n $rows={_getArrayProp(gridTemplateRows)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledGrid>\n )\n}\n\n/**\n * The `Grid` component is for building 2-dimensional layers (based on CSS grid).\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Grid = GridComponent as unknown as <E extends ElementType = 'div'>(\n props: GridProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;AAMA,MAAM,WAAW;CACf,oBAAoB,EAClB,SAAS,OACX;CACA,uCAAmC,EACjC,WAAW,OACb;AACF,GAEM,mBAAmB;CACvB,MAAM;CACN,KAAK;CACL,KAAK;CACL,IAAI;AACN,GAEM,iBAAiB;CACrB,MAAM;CACN,KAAK;CACL,KAAK;CACL,IAAI;AACN;AAEA,SAAgB,sBAEd;CACA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;AAEA,SAAS,4BAA4B,OAA8C;CACjF,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,YAAY,cAAc,EACxD,cAAc,SA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QACAC,MAAAA,EAAAA,QACAC,MAXT,KAAA,oBAAC,YAAD;EACE,WAASE;EACT,WAAQ;EACR,GAAI;EACJ,WAAWT;EACX,WAAWC;EACX,WAAWC;EACX,UAAUC;EACV,MAAMC;EACN,OAAOC;EACP,OAAOC;EACP,OAAOC;EACP,aAAa;EACR;EAEJ;CACS,CAAA,GAJG,EAAA,MAAA,IAGZ,EAAA,MAAA,UAFI,EAAA,MAAA,KAVD,EAAA,MAAA,WAFKE,EAAAA,MAAAA,IAGET,EAAAA,MAAAA,IACAC,EAAAA,MAAAA,IACAC,EAAAA,MAAAA,IACDC,EAAAA,MAAAA,IACJC,EAAAA,MAAAA,IACCC,EAAAA,MAAAA,IACAC,EAAAA,MAAAA,IACAC,EAAAA,MAAAA,8BAXTC;AAkBJ;;;;;;AAQA,MAAa,OAAO"}
1
+ {"version":3,"file":"grid-I2TNptX-.js","names":["_getArrayProp(autoRows)","_getArrayProp(autoCols)","_getArrayProp(autoFlow)","_getArrayProp(gridTemplateColumns)","_getArrayProp(gap)","_getArrayProp(gapX)","_getArrayProp(gapY)","_getArrayProp(gridTemplateRows)","<StyledGrid\n data-as={typeof as === 'string' ? as : undefined}\n data-ui=\"Grid\"\n {...restProps}\n $autoRows={_getArrayProp(autoRows)}\n $autoCols={_getArrayProp(autoCols)}\n $autoFlow={_getArrayProp(autoFlow)}\n $columns={_getArrayProp(gridTemplateColumns)}\n $gap={_getArrayProp(gap)}\n $gapX={_getArrayProp(gapX)}\n $gapY={_getArrayProp(gapY)}\n $rows={_getArrayProp(gridTemplateRows)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledGrid>","typeof as === 'string' ? as : undefined"],"sources":["../src/core/styles/grid/gridStyle.ts","../src/core/primitives/grid/grid.tsx"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveGridStyleProps} from './types'\n\nconst GRID_CSS = {\n '&&:not([hidden])': {\n display: 'grid',\n },\n '&[data-as=\"ul\"],&[data-as=\"ol\"]': {\n listStyle: 'none',\n },\n}\n\nconst GRID_AUTO_COLUMS = {\n auto: 'auto',\n min: 'min-content',\n max: 'max-content',\n fr: 'minmax(0, 1fr)',\n}\n\nconst GRID_AUTO_ROWS = {\n auto: 'auto',\n min: 'min-content',\n max: 'max-content',\n fr: 'minmax(0, 1fr)',\n}\n\nexport function responsiveGridStyle(): Array<\n CSSObject | ((props: ResponsiveGridStyleProps & ThemeProps) => CSSObject[])\n> {\n return [\n GRID_CSS,\n responsiveGridAutoFlowStyle,\n responsiveGridAutoRowsStyle,\n responsiveGridAutoColsStyle,\n responsiveGridColumnsStyle,\n responsiveGridRowsStyle,\n responsiveGridGapStyle,\n responsiveGridGapXStyle,\n responsiveGridGapYStyle,\n ]\n}\n\nfunction responsiveGridAutoFlowStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoFlow, (autoFlow) => ({\n gridAutoFlow: autoFlow,\n }))\n}\n\nfunction responsiveGridAutoRowsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoRows, (autoRows) => ({\n gridAutoRows: autoRows && GRID_AUTO_ROWS[autoRows],\n }))\n}\n\nfunction responsiveGridAutoColsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoCols, (autoCols) => ({\n gridAutoColumns: autoCols && GRID_AUTO_COLUMS[autoCols],\n }))\n}\n\nfunction responsiveGridColumnsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$columns, (columns) => ({\n gridTemplateColumns: columns && `repeat(${columns},minmax(0,1fr));`,\n }))\n}\n\nfunction responsiveGridRowsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$rows, (rows) => ({\n gridTemplateRows: rows && `repeat(${rows},minmax(0,1fr));`,\n }))\n}\n\nfunction responsiveGridGapStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gap, (gap) => ({\n // oxlint-disable-next-line no-deprecated\n gridGap: gap ? rem(space[gap]) : undefined,\n }))\n}\n\nfunction responsiveGridGapXStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gapX, (gapX) => ({\n columnGap: gapX ? rem(space[gapX]) : undefined,\n }))\n}\n\nfunction responsiveGridGapYStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gapY, (gapY) => ({\n rowGap: gapY ? rem(space[gapY]) : undefined,\n }))\n}\n","import {styled} from 'styled-components'\n\nimport {responsiveGridStyle} from '../../styles/grid/gridStyle'\nimport {ResponsiveGridStyleProps} from '../../styles/grid/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {ResponsiveGridProps} from '../types'\n\n/**\n * @public\n */\nexport interface GridOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveGridProps {}\n\n/**\n * @public\n */\nexport type GridProps<E extends ElementType = 'div'> = Props<GridOwnProps, E>\n\nconst StyledGrid = styled(Box)<ResponsiveGridStyleProps>(responsiveGridStyle)\n\nfunction GridComponent(\n props: GridOwnProps & {as?: ElementType} & Omit<\n React.HTMLProps<HTMLDivElement>,\n 'as' | 'height' | 'rows'\n >,\n) {\n const {\n as,\n autoRows,\n autoCols,\n autoFlow,\n gridTemplateColumns,\n gap,\n gapX,\n gapY,\n gridTemplateRows,\n children,\n ref,\n ...restProps\n } = props\n\n return (\n <StyledGrid\n data-as={typeof as === 'string' ? as : undefined}\n data-ui=\"Grid\"\n {...restProps}\n $autoRows={_getArrayProp(autoRows)}\n $autoCols={_getArrayProp(autoCols)}\n $autoFlow={_getArrayProp(autoFlow)}\n $columns={_getArrayProp(gridTemplateColumns)}\n $gap={_getArrayProp(gap)}\n $gapX={_getArrayProp(gapX)}\n $gapY={_getArrayProp(gapY)}\n $rows={_getArrayProp(gridTemplateRows)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledGrid>\n )\n}\n\n/**\n * The `Grid` component is for building 2-dimensional layers (based on CSS grid).\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Grid = GridComponent as unknown as <E extends ElementType = 'div'>(\n props: GridProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;AAMA,MAAM,WAAW;CACf,oBAAoB,EAClB,SAAS,OACX;CACA,uCAAmC,EACjC,WAAW,OACb;AACF,GAEM,mBAAmB;CACvB,MAAM;CACN,KAAK;CACL,KAAK;CACL,IAAI;AACN,GAEM,iBAAiB;CACrB,MAAM;CACN,KAAK;CACL,KAAK;CACL,IAAI;AACN;AAEA,SAAgB,sBAEd;CACA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF;AAEA,SAAS,4BAA4B,OAA8C;CACjF,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,YAAY,cAAc,EACxD,cAAc,SAChB,EAAE;AACJ;AAEA,SAAS,4BAA4B,OAA8C;CACjF,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,YAAY,cAAc,EACxD,cAAc,YAAY,eAAe,UAC3C,EAAE;AACJ;AAEA,SAAS,4BAA4B,OAA8C;CACjF,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,YAAY,cAAc,EACxD,iBAAiB,YAAY,iBAAiB,UAChD,EAAE;AACJ;AAEA,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IACAC,EAAAA,MAAAA,IACAC,EAAAA,MAAAA,IACDC,EAAAA,MAAAA,IACJC,EAAAA,MAAAA,IACCC,EAAAA,MAAAA,IACAC,EAAAA,MAAAA,IACAC,EAAAA,MAAAA,8BAXTC;AAkBJ;;;;;;AAQA,MAAa,OAAO"}
@@ -3,7 +3,7 @@ import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
3
3
  * @internal
4
4
  */
5
5
  const EMPTY_ARRAY = [], EMPTY_RECORD = {}, POPOVER_MOTION_DURATION = .2, POPOVER_MOTION_PROPS = {
6
- card: {
6
+ variants: {
7
7
  initial: {
8
8
  scale: .97,
9
9
  willChange: "transform"
@@ -16,32 +16,14 @@ const EMPTY_ARRAY = [], EMPTY_RECORD = {}, POPOVER_MOTION_DURATION = .2, POPOVER
16
16
  scaleIn: { scale: 1 },
17
17
  scaleOut: { scale: .97 }
18
18
  },
19
- /**
20
- * Crossfade targets for the popover content wrapper. These are plain
21
- * animation targets (not variants): the content fade is driven directly by
22
- * the `open` prop rather than by variant/exit propagation from the card,
23
- * so that any open/close/open sequence converges to the correct opacity.
24
- * On enter, the content starts fading in halfway through the card fade
25
- * (which lasts `POPOVER_MOTION_DURATION / 2`); on exit, it fades out
26
- * together with the card.
27
- */
28
- content: {
29
- hidden: { opacity: 0 },
30
- visible: {
31
- opacity: 1,
32
- transition: {
33
- type: "spring",
34
- visualDuration: POPOVER_MOTION_DURATION,
35
- bounce: .25,
36
- delay: POPOVER_MOTION_DURATION / 4
37
- }
38
- }
39
- },
40
19
  transition: {
41
20
  type: "spring",
42
21
  visualDuration: POPOVER_MOTION_DURATION,
43
22
  bounce: .25
44
- }
23
+ },
24
+ initial: ["hidden", "initial"],
25
+ animate: ["visible", "scaleIn"],
26
+ exit: ["hidden", "scaleOut"]
45
27
  };
46
28
  /**
47
29
  * @internal
@@ -78,4 +60,4 @@ function _getResponsiveSpace(theme, props, spaceIndexes = EMPTY_ARRAY) {
78
60
  }
79
61
  export { rem as a, POPOVER_MOTION_PROPS as c, _responsive as i, _getArrayProp as n, EMPTY_ARRAY as o, _getResponsiveSpace as r, EMPTY_RECORD as s, _fillCSSObject as t };
80
62
 
81
- //# sourceMappingURL=helpers-JV5y3U_M.js.map
63
+ //# sourceMappingURL=helpers-C8xxXAQC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers-C8xxXAQC.js","names":[],"sources":["../src/core/constants.ts","../src/core/styles/helpers.ts"],"sourcesContent":["import type {MotionProps} from 'motion/react'\n\n/**\n * @internal\n */\nexport const EMPTY_ARRAY: never[] = []\n\n/**\n * @internal\n */\nexport const EMPTY_RECORD: Record<string, never> = {}\n\nconst POPOVER_MOTION_DURATION = 0.2\n\n/**\n * The `motion` props shared by the `Popover` and `Tooltip` cards.\n *\n * Spread as a whole, and only while animating. `motion` treats any component\n * with `variants` as a variant node and hands it the variant labels of the\n * nearest animating ancestor, so a card that keeps its `variants` while\n * dropping `initial`/`animate` mounts on an ancestor popover's `hidden`\n * variant. It only leaves that variant if the ancestor changes label again,\n * which a card mounting after the ancestor's enter animation never sees.\n *\n * @internal\n */\nexport const POPOVER_MOTION_PROPS = {\n variants: {\n initial: {\n scale: 0.97,\n willChange: 'transform',\n },\n hidden: {\n opacity: 0,\n },\n visible: {\n opacity: 1,\n transition: {\n duration: POPOVER_MOTION_DURATION / 2,\n },\n },\n scaleIn: {\n scale: 1,\n },\n scaleOut: {\n scale: 0.97,\n },\n },\n transition: {\n type: 'spring',\n visualDuration: POPOVER_MOTION_DURATION,\n bounce: 0.25,\n },\n initial: ['hidden', 'initial'],\n animate: ['visible', 'scaleIn'],\n exit: ['hidden', 'scaleOut'],\n} satisfies MotionProps\n","import {CSSObject} from '../../theme/system/css'\nimport {Theme} from '../../theme/system/theme'\nimport {getTheme_v2} from '../../theme/versioning/getTheme_v2'\nimport {EMPTY_ARRAY} from '../constants'\n\n/**\n * @internal\n */\nexport function _fillCSSObject(keys: string[], value: string | number | CSSObject): CSSObject {\n return keys.reduce<CSSObject>((style, key) => {\n style[key] = value\n\n return style\n }, {})\n}\n\n/**\n * @public\n */\nexport function rem(pixelValue: number): string | 0 {\n if (pixelValue === 0) return 0\n\n return `${pixelValue / 16}rem`\n}\n\n/**\n * @internal\n */\nexport function _responsive<T>(\n media: number[],\n values: T[],\n callback: (value: T, index: number, array: T[]) => CSSObject,\n): CSSObject[] {\n const statements = values?.map(callback) || []\n\n return statements.map((statement, mediaIndex) => {\n if (mediaIndex === 0) return statement\n\n return {[`@media screen and (min-width: ${media[mediaIndex - 1]}px)`]: statement}\n })\n}\n\n/**\n * @internal\n */\nexport function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[] {\n if (val === undefined) return defaultVal || EMPTY_ARRAY\n\n return Array.isArray(val) ? val : [val]\n}\n\n/**\n * @internal\n */\nexport function _getResponsiveSpace(\n theme: Theme,\n props: string[],\n spaceIndexes: number[] = EMPTY_ARRAY,\n): CSSObject[] | null {\n if (!Array.isArray(spaceIndexes)) {\n throw new Error('the property must be array of numbers')\n }\n\n if (spaceIndexes.length === 0) {\n return null\n }\n\n const {media, space} = getTheme_v2(theme)\n\n return _responsive(media, spaceIndexes, (spaceIndex) =>\n _fillCSSObject(props, rem(space[spaceIndex])),\n )\n}\n"],"mappings":";;;;AAKA,MAAa,cAAuB,CAAC,GAKxB,eAAsC,CAAC,GAE9C,0BAA0B,IAcnB,uBAAuB;CAClC,UAAU;EACR,SAAS;GACP,OAAO;GACP,YAAY;EACd;EACA,QAAQ,EACN,SAAS,EACX;EACA,SAAS;GACP,SAAS;GACT,YAAY,EACV,UAAU,0BAA0B,EACtC;EACF;EACA,SAAS,EACP,OAAO,EACT;EACA,UAAU,EACR,OAAO,IACT;CACF;CACA,YAAY;EACV,MAAM;EACN,gBAAgB;EAChB,QAAQ;CACV;CACA,SAAS,CAAC,UAAU,SAAS;CAC7B,SAAS,CAAC,WAAW,SAAS;CAC9B,MAAM,CAAC,UAAU,UAAU;AAC7B;;;;AChDA,SAAgB,eAAe,MAAgB,OAA+C;CAC5F,OAAO,KAAK,QAAmB,OAAO,SACpC,MAAM,OAAO,OAEN,QACN,CAAC,CAAC;AACP;;;;AAKA,SAAgB,IAAI,YAAgC;CAGlD,OAFI,eAAe,IAAU,IAEtB,GAAG,aAAa,GAAG;AAC5B;;;;AAKA,SAAgB,YACd,OACA,QACA,UACa;CAGb,QAFmB,QAAQ,IAAI,QAAQ,KAAK,CAAC,EAAA,CAE3B,KAAK,WAAW,eAC5B,eAAe,IAAU,YAEtB,GAAE,iCAAiC,MAAM,aAAa,GAAG,OAAO,UAAS,CACjF;AACH;;;;AAKA,SAAgB,cAA0B,KAA0B,YAAuB;CAGzF,OAFI,QAAQ,KAAA,IAAkB,cAAc,cAErC,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,GAAG;AACxC;;;;AAKA,SAAgB,oBACd,OACA,OACA,eAAyB,aACL;CACpB,IAAI,CAAC,MAAM,QAAQ,YAAY,GAC7B,MAAU,MAAM,uCAAuC;CAGzD,IAAI,aAAa,WAAW,GAC1B,OAAO;CAGT,IAAM,EAAC,OAAO,UAAS,YAAY,KAAK;CAExC,OAAO,YAAY,OAAO,eAAe,eACvC,eAAe,OAAO,IAAI,MAAM,WAAW,CAAC,CAC9C;AACF"}
@@ -1,7 +1,7 @@
1
- import { a as rem, i as _responsive, n as _getArrayProp } from "./helpers-JV5y3U_M.js";
1
+ import { a as rem, i as _responsive, n as _getArrayProp } from "./helpers-C8xxXAQC.js";
2
2
  import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
3
- import { v as responsiveRadiusStyle, y as Box } from "./useLayer-Dhme0dcp.js";
4
- import { n as Text } from "./stack-wyPeapSx.js";
3
+ import { v as responsiveRadiusStyle, y as Box } from "./useLayer-jUJIz8mh.js";
4
+ import { n as Text } from "./stack-BGFEokua.js";
5
5
  import { c } from "react/compiler-runtime";
6
6
  import { Children, useEffect } from "react";
7
7
  import { css, styled } from "styled-components";
@@ -162,4 +162,4 @@ function Hotkeys(props) {
162
162
  }
163
163
  export { useGlobalKeyDown as i, KBD as n, Inline as r, Hotkeys as t };
164
164
 
165
- //# sourceMappingURL=hotkeys-BYRfM-HW.js.map
165
+ //# sourceMappingURL=hotkeys-BPlacpG8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hotkeys-BYRfM-HW.js","names":["(event: KeyboardEvent) => onKeyDown(event)","() => {\n const handler = (event: KeyboardEvent) => handleKeyDown(event)\n\n window.addEventListener('keydown', handler, options)\n\n return () => window.removeEventListener('keydown', handler, options)\n // oxlint-disable-next-line react/exhaustive-effect-dependencies\n }","event","[options]","Children.map(childrenProp, (child) => child && <div>{child}</div>)","(child) => child && <div>{child}</div>","useMemo(\n () => Children.map(childrenProp, (child) => child && <div>{child}</div>),\n [childrenProp],\n )","_getArrayProp(gap)","<StyledInline\n data-ui=\"Inline\"\n {...restProps}\n $space={_getArrayProp(gap)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledInline>","fontSize = 0","padding = 1","radius = 2","_getArrayProp(radius)","<Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>","<Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>","<StyledKBD data-ui=\"KBD\" {...restProps} $radius={_getArrayProp(radius)} ref={ref}>\n <Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>\n </StyledKBD>","gap = 0.5","_getArrayProp(gap)","<></>","keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key fontSize={fontSize} key={i} padding={padding} radius={radius}>\n {key}\n </Key>\n ))","(key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key fontSize={fontSize} key={i} padding={padding} radius={radius}>\n {key}\n </Key>\n )","<Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key fontSize={fontSize} key={i} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>","<StyledHotkeys data-ui=\"Hotkeys\" {...restProps} ref={ref}>\n <Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key fontSize={fontSize} key={i} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>\n </StyledHotkeys>"],"sources":["../src/core/hooks/useGlobalKeyDown.ts","../src/core/primitives/inline/styles.ts","../src/core/primitives/inline/inline.tsx","../src/core/primitives/kbd/kbd.tsx","../src/core/components/hotkeys/hotkeys.tsx"],"sourcesContent":["import {useEffect} from 'react'\n// TODO: switch to `useEffectEvent` from `react` once\n// https://github.com/facebook/react/issues/34818 is fixed in the lowest React\n// version we support: on React 19.2 the native hook never sees values past\n// the first render when the calling component is wrapped in `forwardRef` or\n// `memo`. This public hook runs in the fiber of whatever component calls it\n// (consumers may call it from `forwardRef` or `memo` components).\nimport {useEffectEvent} from 'use-effect-event'\n\n/**\n * Adds global keydown event listener to the window.\n *\n * @param onKeyDown - The function to call when a keydown event is triggered.\n * @param options - The options to pass to the addEventListener function (example, capture: true)\n * @beta\n */\nexport function useGlobalKeyDown(\n onKeyDown: (event: KeyboardEvent) => void,\n options?: AddEventListenerOptions,\n): void {\n const handleKeyDown = useEffectEvent((event: KeyboardEvent) => onKeyDown(event))\n\n useEffect(() => {\n const handler = (event: KeyboardEvent) => handleKeyDown(event)\n\n window.addEventListener('keydown', handler, options)\n\n return () => window.removeEventListener('keydown', handler, options)\n // oxlint-disable-next-line react/exhaustive-effect-dependencies\n }, [options])\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../../styles/helpers'\nimport {ThemeProps} from '../../styles/types'\nimport {ResponsiveInlineSpaceStyleProps} from './types'\n\nexport function inlineBaseStyle(): CSSObject {\n return {\n 'lineHeight': '0',\n\n '&&:not([hidden])': {\n display: 'block',\n },\n\n '& > div': {\n display: 'inline-block',\n verticalAlign: 'middle',\n },\n }\n}\n\nexport function inlineSpaceStyle(props: ResponsiveInlineSpaceStyleProps & ThemeProps): CSSObject[] {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$space, (spaceIndex) => {\n const _space = rem(spaceIndex === 0.5 ? space[1] / 2 : space[spaceIndex])\n\n return {\n 'margin': `-${_space} 0 0 -${_space}`,\n '& > div': {padding: `${_space} 0 0 ${_space}`},\n }\n })\n}\n","import {Children, useMemo} from 'react'\nimport {styled} from 'styled-components'\n\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {inlineBaseStyle, inlineSpaceStyle} from './styles'\nimport {ResponsiveInlineSpaceStyleProps} from './types'\n\n/**\n * @public\n */\nexport interface InlineOwnProps extends Omit<BoxOwnProps, 'display'> {\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n /** The spacing between children. */\n gap?: number | number[]\n}\n\n/**\n * @public\n */\nexport type InlineProps<E extends ElementType = 'div'> = Props<InlineOwnProps, E>\n\nconst StyledInline = styled(Box)<ResponsiveInlineSpaceStyleProps>(inlineBaseStyle, inlineSpaceStyle)\n\nfunction InlineComponent(\n props: InlineOwnProps & {as?: ElementType} & React.HTMLProps<HTMLDivElement>,\n) {\n const {as, children: childrenProp, gap, ref, ...restProps} = props\n\n const children = useMemo(\n () => Children.map(childrenProp, (child) => child && <div>{child}</div>),\n [childrenProp],\n )\n\n return (\n <StyledInline\n data-ui=\"Inline\"\n {...restProps}\n $space={_getArrayProp(gap)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledInline>\n )\n}\n\n/**\n * The `Inline` component is a layout utility for aligning and spacing items horizontally.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Inline = InlineComponent as unknown as <E extends ElementType = 'div'>(\n props: InlineProps<E>,\n) => React.JSX.Element\n","import {css, styled} from 'styled-components'\n\nimport {_getArrayProp} from '../../styles/helpers'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {ElementType, Props} from '../../types/component'\nimport {Radius} from '../../types/radius'\nimport {Box} from '../box/box'\nimport {Text} from '../text/text'\n\n/**\n * @public\n */\nexport interface KBDOwnProps {\n fontSize?: number | number[]\n padding?: number | number[]\n radius?: Radius | Radius[]\n}\n\n/**\n * @public\n */\nexport type KBDProps<E extends ElementType = 'kbd'> = Props<KBDOwnProps, E>\n\nfunction kbdStyle() {\n return css`\n --card-bg-color: var(--card-kbd-bg-color);\n --card-border-color: var(--card-kbd-border-color);\n --card-fg-color: var(--card-kbd-fg-color);\n\n box-shadow: inset 0 0 0 1px var(--card-border-color);\n background: var(--card-bg-color);\n font: inherit;\n\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n `\n}\n\nconst StyledKBD = styled.kbd<ResponsiveRadiusStyleProps>(responsiveRadiusStyle, kbdStyle)\n\nfunction KBDComponent(\n props: KBDOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'>,\n) {\n const {children, fontSize = 0, padding = 1, radius = 2, ref, ...restProps} = props\n\n return (\n <StyledKBD data-ui=\"KBD\" {...restProps} $radius={_getArrayProp(radius)} ref={ref}>\n <Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>\n </StyledKBD>\n )\n}\n\n/**\n * Used to define some text as keyboard input.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const KBD = KBDComponent as unknown as <E extends ElementType = 'kbd'>(\n props: KBDProps<E>,\n) => React.JSX.Element\n","import {styled} from 'styled-components'\n\nimport {Inline} from '../../primitives/inline/inline'\nimport {KBD} from '../../primitives/kbd/kbd'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {Radius} from '../../types/radius'\n\n/**\n * @public\n */\nexport interface HotkeysProps {\n fontSize?: number | number[]\n gap?: number | number[]\n padding?: number | number[]\n radius?: Radius | Radius[]\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n keys?: string[]\n}\n\nconst StyledHotkeys = styled.kbd`\n font: inherit;\n padding: 1px;\n\n &:not([hidden]) {\n display: block;\n }\n`\n\nconst Key = styled(KBD)`\n &:not([hidden]) {\n display: block;\n }\n`\n\n/**\n * Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.\n *\n * @public\n */\nexport function Hotkeys(props: HotkeysProps & Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'>) {\n const {fontSize, gap = 0.5, keys, padding, radius, ref, ...restProps} = props\n const spacing = _getArrayProp(gap)\n\n if (!keys || keys.length === 0) {\n return <></>\n }\n\n return (\n <StyledHotkeys data-ui=\"Hotkeys\" {...restProps} ref={ref}>\n <Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key fontSize={fontSize} key={i} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>\n </StyledHotkeys>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAgB,iBACd,WACA,SACM;eAC+BA;CAA0B,AAAA,EAAA,OAAA,yBAA1B,MAAC,UAAyB,UAAU,KAAK,GAAf,EAAA,KAAA;CAA/D,IAAM,gBAAgB,eAAeA,EAA0C,GAErEC;CACkC,AAAA,EAAA,OAAA,iBAAA,EAAA,OAEE,WAHpC,WAAM;EACd,IAAM,WAAW,YAAyB,cAAcC,OAAK;EAI7D,OAFA,OAAO,iBAAiB,WAAW,SAAS,OAAO,SAEtC,OAAO,oBAAoB,WAAW,SAAS,OAAO;CAErE,GAN4C,EAAA,KAAA,eAEE,EAAA,KAAA;CAI3CC,IAAAA;CAPH,AAOI,EAAA,OAAA,uBAAD,KAAA,CAAC,OAAO,GAAP,EAAA,KAAA,qBAPJ,UAAUF,IAOPE,EAAS;AACd;ACxBA,SAAgB,kBAA6B;CA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AA,KAAhB,EAAA,MAAA,WACnCA,EAAAA,MAAAA,8BADFC;AAWJ"}
1
+ {"version":3,"file":"hotkeys-BPlacpG8.js","names":["(event: KeyboardEvent) => onKeyDown(event)","() => {\n const handler = (event: KeyboardEvent) => handleKeyDown(event)\n\n window.addEventListener('keydown', handler, options)\n\n return () => window.removeEventListener('keydown', handler, options)\n // oxlint-disable-next-line react/exhaustive-effect-dependencies\n }","event","[options]","Children.map(childrenProp, (child) => child && <div>{child}</div>)","(child) => child && <div>{child}</div>","useMemo(\n () => Children.map(childrenProp, (child) => child && <div>{child}</div>),\n [childrenProp],\n )","_getArrayProp(gap)","<StyledInline\n data-ui=\"Inline\"\n {...restProps}\n $space={_getArrayProp(gap)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledInline>","fontSize = 0","padding = 1","radius = 2","_getArrayProp(radius)","<Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>","<Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>","<StyledKBD data-ui=\"KBD\" {...restProps} $radius={_getArrayProp(radius)} ref={ref}>\n <Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>\n </StyledKBD>","gap = 0.5","_getArrayProp(gap)","<></>","keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key fontSize={fontSize} key={i} padding={padding} radius={radius}>\n {key}\n </Key>\n ))","(key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key fontSize={fontSize} key={i} padding={padding} radius={radius}>\n {key}\n </Key>\n )","<Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key fontSize={fontSize} key={i} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>","<StyledHotkeys data-ui=\"Hotkeys\" {...restProps} ref={ref}>\n <Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key fontSize={fontSize} key={i} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>\n </StyledHotkeys>"],"sources":["../src/core/hooks/useGlobalKeyDown.ts","../src/core/primitives/inline/styles.ts","../src/core/primitives/inline/inline.tsx","../src/core/primitives/kbd/kbd.tsx","../src/core/components/hotkeys/hotkeys.tsx"],"sourcesContent":["import {useEffect} from 'react'\n// TODO: switch to `useEffectEvent` from `react` once\n// https://github.com/facebook/react/issues/34818 is fixed in the lowest React\n// version we support: on React 19.2 the native hook never sees values past\n// the first render when the calling component is wrapped in `forwardRef` or\n// `memo`. This public hook runs in the fiber of whatever component calls it\n// (consumers may call it from `forwardRef` or `memo` components).\nimport {useEffectEvent} from 'use-effect-event'\n\n/**\n * Adds global keydown event listener to the window.\n *\n * @param onKeyDown - The function to call when a keydown event is triggered.\n * @param options - The options to pass to the addEventListener function (example, capture: true)\n * @beta\n */\nexport function useGlobalKeyDown(\n onKeyDown: (event: KeyboardEvent) => void,\n options?: AddEventListenerOptions,\n): void {\n const handleKeyDown = useEffectEvent((event: KeyboardEvent) => onKeyDown(event))\n\n useEffect(() => {\n const handler = (event: KeyboardEvent) => handleKeyDown(event)\n\n window.addEventListener('keydown', handler, options)\n\n return () => window.removeEventListener('keydown', handler, options)\n // oxlint-disable-next-line react/exhaustive-effect-dependencies\n }, [options])\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../../styles/helpers'\nimport {ThemeProps} from '../../styles/types'\nimport {ResponsiveInlineSpaceStyleProps} from './types'\n\nexport function inlineBaseStyle(): CSSObject {\n return {\n 'lineHeight': '0',\n\n '&&:not([hidden])': {\n display: 'block',\n },\n\n '& > div': {\n display: 'inline-block',\n verticalAlign: 'middle',\n },\n }\n}\n\nexport function inlineSpaceStyle(props: ResponsiveInlineSpaceStyleProps & ThemeProps): CSSObject[] {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$space, (spaceIndex) => {\n const _space = rem(spaceIndex === 0.5 ? space[1] / 2 : space[spaceIndex])\n\n return {\n 'margin': `-${_space} 0 0 -${_space}`,\n '& > div': {padding: `${_space} 0 0 ${_space}`},\n }\n })\n}\n","import {Children, useMemo} from 'react'\nimport {styled} from 'styled-components'\n\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {inlineBaseStyle, inlineSpaceStyle} from './styles'\nimport {ResponsiveInlineSpaceStyleProps} from './types'\n\n/**\n * @public\n */\nexport interface InlineOwnProps extends Omit<BoxOwnProps, 'display'> {\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n /** The spacing between children. */\n gap?: number | number[]\n}\n\n/**\n * @public\n */\nexport type InlineProps<E extends ElementType = 'div'> = Props<InlineOwnProps, E>\n\nconst StyledInline = styled(Box)<ResponsiveInlineSpaceStyleProps>(inlineBaseStyle, inlineSpaceStyle)\n\nfunction InlineComponent(\n props: InlineOwnProps & {as?: ElementType} & React.HTMLProps<HTMLDivElement>,\n) {\n const {as, children: childrenProp, gap, ref, ...restProps} = props\n\n const children = useMemo(\n () => Children.map(childrenProp, (child) => child && <div>{child}</div>),\n [childrenProp],\n )\n\n return (\n <StyledInline\n data-ui=\"Inline\"\n {...restProps}\n $space={_getArrayProp(gap)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledInline>\n )\n}\n\n/**\n * The `Inline` component is a layout utility for aligning and spacing items horizontally.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Inline = InlineComponent as unknown as <E extends ElementType = 'div'>(\n props: InlineProps<E>,\n) => React.JSX.Element\n","import {css, styled} from 'styled-components'\n\nimport {_getArrayProp} from '../../styles/helpers'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {ElementType, Props} from '../../types/component'\nimport {Radius} from '../../types/radius'\nimport {Box} from '../box/box'\nimport {Text} from '../text/text'\n\n/**\n * @public\n */\nexport interface KBDOwnProps {\n fontSize?: number | number[]\n padding?: number | number[]\n radius?: Radius | Radius[]\n}\n\n/**\n * @public\n */\nexport type KBDProps<E extends ElementType = 'kbd'> = Props<KBDOwnProps, E>\n\nfunction kbdStyle() {\n return css`\n --card-bg-color: var(--card-kbd-bg-color);\n --card-border-color: var(--card-kbd-border-color);\n --card-fg-color: var(--card-kbd-fg-color);\n\n box-shadow: inset 0 0 0 1px var(--card-border-color);\n background: var(--card-bg-color);\n font: inherit;\n\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n `\n}\n\nconst StyledKBD = styled.kbd<ResponsiveRadiusStyleProps>(responsiveRadiusStyle, kbdStyle)\n\nfunction KBDComponent(\n props: KBDOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'>,\n) {\n const {children, fontSize = 0, padding = 1, radius = 2, ref, ...restProps} = props\n\n return (\n <StyledKBD data-ui=\"KBD\" {...restProps} $radius={_getArrayProp(radius)} ref={ref}>\n <Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>\n </StyledKBD>\n )\n}\n\n/**\n * Used to define some text as keyboard input.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const KBD = KBDComponent as unknown as <E extends ElementType = 'kbd'>(\n props: KBDProps<E>,\n) => React.JSX.Element\n","import {styled} from 'styled-components'\n\nimport {Inline} from '../../primitives/inline/inline'\nimport {KBD} from '../../primitives/kbd/kbd'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {Radius} from '../../types/radius'\n\n/**\n * @public\n */\nexport interface HotkeysProps {\n fontSize?: number | number[]\n gap?: number | number[]\n padding?: number | number[]\n radius?: Radius | Radius[]\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n keys?: string[]\n}\n\nconst StyledHotkeys = styled.kbd`\n font: inherit;\n padding: 1px;\n\n &:not([hidden]) {\n display: block;\n }\n`\n\nconst Key = styled(KBD)`\n &:not([hidden]) {\n display: block;\n }\n`\n\n/**\n * Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.\n *\n * @public\n */\nexport function Hotkeys(props: HotkeysProps & Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'>) {\n const {fontSize, gap = 0.5, keys, padding, radius, ref, ...restProps} = props\n const spacing = _getArrayProp(gap)\n\n if (!keys || keys.length === 0) {\n return <></>\n }\n\n return (\n <StyledHotkeys data-ui=\"Hotkeys\" {...restProps} ref={ref}>\n <Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key fontSize={fontSize} key={i} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>\n </StyledHotkeys>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAgB,iBACd,WACA,SACM;eAC+BA;CAA0B,AAAA,EAAA,OAAA,yBAA1B,MAAC,UAAyB,UAAU,KAAK,GAAf,EAAA,KAAA;CAA/D,IAAM,gBAAgB,eAAeA,EAA0C,GAErEC;CACkC,AAAA,EAAA,OAAA,iBAAA,EAAA,OAEE,WAHpC,WAAM;EACd,IAAM,WAAW,YAAyB,cAAcC,OAAK;EAI7D,OAFA,OAAO,iBAAiB,WAAW,SAAS,OAAO,SAEtC,OAAO,oBAAoB,WAAW,SAAS,OAAO;CAErE,GAN4C,EAAA,KAAA,eAEE,EAAA,KAAA;CAI3CC,IAAAA;CAPH,AAOI,EAAA,OAAA,uBAAD,KAAA,CAAC,OAAO,GAAP,EAAA,KAAA,qBAPJ,UAAUF,IAOPE,EAAS;AACd;ACxBA,SAAgB,kBAA6B;CAC3C,OAAO;EACL,YAAc;EAEd,oBAAoB,EAClB,SAAS,QACX;EAEA,WAAW;GACT,SAAS;GACT,eAAe;EACjB;CACF;AACF;AAEA,SAAg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@
1
1
  "use client";
2
- import { a as rem, i as _responsive, n as _getArrayProp, r as _getResponsiveSpace, s as EMPTY_RECORD, t as _fillCSSObject } from "./helpers-JV5y3U_M.js";
3
- import { a as textInputRootStyle, c as useCustomValidity, d as focusFirstDescendant, f as focusLastDescendant, h as _raf2, i as textInputRepresentationStyle, l as _hasFocus, m as _raf, n as textInputBaseStyle, o as responsiveInputPaddingIconRightStyle, p as isFocusable, r as textInputFontSizeStyle, s as responsiveInputPaddingStyle, t as TextInput, u as attemptFocus } from "./textInput-DW447nYT.js";
2
+ import { a as rem, i as _responsive, n as _getArrayProp, r as _getResponsiveSpace, s as EMPTY_RECORD, t as _fillCSSObject } from "./helpers-C8xxXAQC.js";
3
+ import { a as textInputRootStyle, c as useCustomValidity, d as focusFirstDescendant, f as focusLastDescendant, h as _raf2, i as textInputRepresentationStyle, l as _hasFocus, m as _raf, n as textInputBaseStyle, o as responsiveInputPaddingIconRightStyle, p as isFocusable, r as textInputFontSizeStyle, s as responsiveInputPaddingStyle, t as TextInput, u as attemptFocus } from "./textInput-B6ZZJSOj.js";
4
4
  import { a as isHTMLElement, c as isHTMLTextAreaElement, i as isHTMLButtonElement, n as containsOrEqualsElement, o as isHTMLInputElement, r as isHTMLAnchorElement, s as isHTMLSelectElement, t as _isEnterToClickElement } from "./element-BYgCE_iK.js";
5
5
  import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
6
- import { _ as useTheme_v2, a as useMatchMedia, b as responsivePaddingStyle, c as ThemeColorProvider, d as createGlobalScopedContext, g as useTheme, h as _cardColorStyle, i as usePrefersReducedMotion, l as useRootTheme, m as focusRingStyle, n as LayerProvider, o as useMediaIndex, p as focusRingBorderStyle, s as Card, t as useLayer, u as ThemeProvider, v as responsiveRadiusStyle, y as Box } from "./useLayer-Dhme0dcp.js";
7
- import { t as Flex } from "./flex-C6SsHFy8.js";
8
- import { a as responsiveTextAlignStyle, i as responsiveTextFont, n as Text, r as SpanWithTextOverflow, t as Stack } from "./stack-wyPeapSx.js";
9
- import { t as responsiveFont } from "./responsiveFont-BwYElGq4.js";
10
- import { n as Spinner, t as Button } from "./button-DpAiERt1.js";
6
+ import { _ as useTheme_v2, a as useMatchMedia, b as responsivePaddingStyle, c as ThemeColorProvider, d as createGlobalScopedContext, g as useTheme, h as _cardColorStyle, i as usePrefersReducedMotion, l as useRootTheme, m as focusRingStyle, n as LayerProvider, o as useMediaIndex, p as focusRingBorderStyle, s as Card, t as useLayer, u as ThemeProvider, v as responsiveRadiusStyle, y as Box } from "./useLayer-jUJIz8mh.js";
7
+ import { t as Flex } from "./flex-CySCBzQm.js";
8
+ import { a as responsiveTextAlignStyle, i as responsiveTextFont, n as Text, r as SpanWithTextOverflow, t as Stack } from "./stack-BGFEokua.js";
9
+ import { t as responsiveFont } from "./responsiveFont-CilwaORG.js";
10
+ import { n as Spinner, t as Button } from "./button-DQH2KIbq.js";
11
11
  import { n as _elementSizeObserver, t as useElementSize } from "./useElementSize-BJvbGHq8.js";
12
- import { a as useBoundaryElement, i as PortalContext, n as Portal, o as BoundaryElementContext, r as usePortal, t as Arrow } from "./arrow-BaqZdFUX.js";
13
- import { t as useClickOutsideEvent } from "./useClickOutsideEvent-DbLUuPQ6.js";
14
- import { t as responsiveCodeFontStyle } from "./codeFontStyle-aWvllgWi.js";
12
+ import { a as useBoundaryElement, i as PortalContext, n as Portal, o as BoundaryElementContext, r as usePortal, t as Arrow } from "./arrow-CL8xmdbg.js";
13
+ import { t as useClickOutsideEvent } from "./useClickOutsideEvent-wGLGWBZN.js";
14
+ import { t as responsiveCodeFontStyle } from "./codeFontStyle-84SMhFtI.js";
15
15
  import { a as rgba$1, c as hslToRgb$1, i as multiply$1, l as rgbToHex$1, n as buildTheme, o as parseColor$1, r as screen$1, s as hexToRgb$1, t as createColorTheme$1, u as rgbToHsl$1 } from "./factory-BA3gEfyI.js";
16
- import { i as useGlobalKeyDown, n as KBD, r as Inline, t as Hotkeys } from "./hotkeys-BYRfM-HW.js";
17
- import { t as Layer } from "./layer-DsScTlqC.js";
18
- import { t as Grid } from "./grid-3kBnMOwF.js";
16
+ import { i as useGlobalKeyDown, n as KBD, r as Inline, t as Hotkeys } from "./hotkeys-BPlacpG8.js";
17
+ import { t as Layer } from "./layer-DGn7KJIB.js";
18
+ import { t as Grid } from "./grid-I2TNptX-.js";
19
19
  import { c } from "react/compiler-runtime";
20
20
  import { ChevronDownIcon } from "@sanity/icons/ChevronDown";
21
21
  import { Children, Component, cloneElement, isValidElement, startTransition, useContext, useEffect, useId, useImperativeHandle, useRef, useState, useSyncExternalStore } from "react";