@sanity/ui 4.0.5 → 4.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{arrow-BaqZdFUX.js → arrow-BBpqkhzC.js} +2 -2
- package/dist/{arrow-BaqZdFUX.js.map → arrow-BBpqkhzC.js.map} +1 -1
- package/dist/autocomplete.js +6 -6
- package/dist/breadcrumbs.js +6 -6
- package/dist/{button-DpAiERt1.js → button-DPIMguMh.js} +5 -5
- package/dist/{button-DpAiERt1.js.map → button-DPIMguMh.js.map} +1 -1
- package/dist/code.js +2 -2
- package/dist/{codeFontStyle-aWvllgWi.js → codeFontStyle-DHrcV3wD.js} +2 -2
- package/dist/{codeFontStyle-aWvllgWi.js.map → codeFontStyle-DHrcV3wD.js.map} +1 -1
- package/dist/{flex-C6SsHFy8.js → flex-CDMKJ54v.js} +3 -3
- package/dist/{flex-C6SsHFy8.js.map → flex-CDMKJ54v.js.map} +1 -1
- package/dist/{grid-3kBnMOwF.js → grid-CFhbAO8d.js} +3 -3
- package/dist/{grid-3kBnMOwF.js.map → grid-CFhbAO8d.js.map} +1 -1
- package/dist/{helpers-JV5y3U_M.js → helpers-CmuDTEVl.js} +1 -22
- package/dist/helpers-CmuDTEVl.js.map +1 -0
- package/dist/{hotkeys-BYRfM-HW.js → hotkeys-B8-FMlBd.js} +4 -4
- package/dist/{hotkeys-BYRfM-HW.js.map → hotkeys-B8-FMlBd.js.map} +1 -1
- package/dist/index.js +13 -13
- package/dist/{layer-DsScTlqC.js → layer-BQuAIq9M.js} +3 -3
- package/dist/{layer-DsScTlqC.js.map → layer-BQuAIq9M.js.map} +1 -1
- package/dist/menu.js +7 -7
- package/dist/{popover-C2DFbwZu.js → popover-dCgSQgsm.js} +40 -47
- package/dist/popover-dCgSQgsm.js.map +1 -0
- package/dist/popover.js +1 -1
- package/dist/{responsiveFont-BwYElGq4.js → responsiveFont-CYyTL7C5.js} +2 -2
- package/dist/{responsiveFont-BwYElGq4.js.map → responsiveFont-CYyTL7C5.js.map} +1 -1
- package/dist/{stack-wyPeapSx.js → stack-BKKeh5M0.js} +4 -4
- package/dist/{stack-wyPeapSx.js.map → stack-BKKeh5M0.js.map} +1 -1
- package/dist/{textInput-DW447nYT.js → textInput-Cp2Jvgw1.js} +5 -5
- package/dist/{textInput-DW447nYT.js.map → textInput-Cp2Jvgw1.js.map} +1 -1
- package/dist/toast.js +5 -5
- package/dist/tooltip.js +4 -4
- package/dist/{useClickOutsideEvent-DbLUuPQ6.js → useClickOutsideEvent-CQ40LrHo.js} +2 -2
- package/dist/{useClickOutsideEvent-DbLUuPQ6.js.map → useClickOutsideEvent-CQ40LrHo.js.map} +1 -1
- package/dist/{useLayer-Dhme0dcp.js → useLayer-DzgZ2cTe.js} +2 -2
- package/dist/{useLayer-Dhme0dcp.js.map → useLayer-DzgZ2cTe.js.map} +1 -1
- package/package.json +3 -3
- package/dist/helpers-JV5y3U_M.js.map +0 -1
- package/dist/popover-C2DFbwZu.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLayer-Dhme0dcp.js","names":["asProp = 'div'","display = 'block'","margin = 0","padding = 0","_getArrayProp(gridColumn)","_getArrayProp(gridColumnStart)","_getArrayProp(gridColumnEnd)","_getArrayProp(display)","_getArrayProp(flex)","_getArrayProp(height)","_getArrayProp(margin)","_getArrayProp(marginX)","_getArrayProp(marginY)","_getArrayProp(marginTop)","_getArrayProp(marginRight)","_getArrayProp(marginBottom)","_getArrayProp(marginLeft)","_getArrayProp(overflow)","_getArrayProp(padding)","_getArrayProp(paddingX)","_getArrayProp(paddingY)","_getArrayProp(paddingTop)","_getArrayProp(paddingRight)","_getArrayProp(paddingBottom)","_getArrayProp(paddingLeft)","_getArrayProp(gridRow)","_getArrayProp(gridRowStart)","_getArrayProp(gridRowEnd)","_getArrayProp(sizing)","<StyledBox\n data-as={typeof asProp === 'string' ? asProp : undefined}\n data-ui=\"Box\"\n {...restProps}\n $column={_getArrayProp(gridColumn)}\n $columnStart={_getArrayProp(gridColumnStart)}\n $columnEnd={_getArrayProp(gridColumnEnd)}\n $display={_getArrayProp(display)}\n $flex={_getArrayProp(flex)}\n $height={_getArrayProp(height)}\n $margin={_getArrayProp(margin)}\n $marginX={_getArrayProp(marginX)}\n $marginY={_getArrayProp(marginY)}\n $marginTop={_getArrayProp(marginTop)}\n $marginRight={_getArrayProp(marginRight)}\n $marginBottom={_getArrayProp(marginBottom)}\n $marginLeft={_getArrayProp(marginLeft)}\n $overflow={_getArrayProp(overflow)}\n $padding={_getArrayProp(padding)}\n $paddingX={_getArrayProp(paddingX)}\n $paddingY={_getArrayProp(paddingY)}\n $paddingTop={_getArrayProp(paddingTop)}\n $paddingRight={_getArrayProp(paddingRight)}\n $paddingBottom={_getArrayProp(paddingBottom)}\n $paddingLeft={_getArrayProp(paddingLeft)}\n $row={_getArrayProp(gridRow)}\n $rowStart={_getArrayProp(gridRowStart)}\n $rowEnd={_getArrayProp(gridRowEnd)}\n $sizing={_getArrayProp(sizing)}\n // styled-components 6.5 distributes PolymorphicCallProps over ElementType and\n // hits TS2589; narrow the call-site target while still passing the real value.\n // oxlint-disable-next-line no-unsafe-type-assertion\n as={asProp as 'div'}\n ref={ref}\n >\n {props.children}\n </StyledBox>","children","asProp as 'div'","typeof asProp === 'string' ? asProp : undefined","getTheme_v2(useStyledTheme() as Theme)","useStyledTheme() as Theme","useMemo(() => {\n if (!rootTheme) return null\n\n return {\n version: 0.0,\n theme: rootTheme,\n scheme,\n tone,\n }\n }, [rootTheme, scheme, tone])","{\n version: 0.0,\n theme: rootTheme,\n scheme,\n tone,\n }","useMemo(() => {\n if (!rootTheme) return null\n\n return getScopedTheme(rootTheme, scheme, tone)\n }, [scheme, rootTheme, tone])","getScopedTheme(rootTheme, scheme, tone)","<pre>ThemeProvider: no \"theme\" property provided</pre>","<StyledThemeProvider theme={theme}>{children}</StyledThemeProvider>","<ThemeContext.Provider value={themeContext}>\n <StyledThemeProvider theme={theme}>{children}</StyledThemeProvider>\n </ThemeContext.Provider>","ThemeContext.Provider","<ThemeProvider scheme={scheme || root.scheme} theme={root.theme} tone={tone}>\n {children}\n </ThemeProvider>","theme","scheme || root.scheme","checkered = false","focusRing = false","radius = 0","toneProp = 'default'","_getArrayProp(border)","_getArrayProp(borderTop)","_getArrayProp(borderRight)","_getArrayProp(borderBottom)","_getArrayProp(borderLeft)","_getArrayProp(radius)","_getArrayProp(shadow)","<StyledCard\n data-as={typeof as === 'string' ? as : undefined}\n data-scheme={rootTheme.scheme}\n data-ui=\"Card\"\n data-tone={tone}\n {...restProps}\n $border={_getArrayProp(border)}\n $borderTop={_getArrayProp(borderTop)}\n $borderRight={_getArrayProp(borderRight)}\n $borderBottom={_getArrayProp(borderBottom)}\n $borderLeft={_getArrayProp(borderLeft)}\n $checkered={checkered}\n $focusRing={focusRing}\n $muted={muted ?? false}\n $radius={_getArrayProp(radius)}\n $shadow={_getArrayProp(shadow)}\n $tone={tone}\n data-checkered={checkered ? '' : undefined}\n data-pressed={pressed ? '' : undefined}\n data-selected={selected ? '' : undefined}\n forwardedAs={as}\n ref={ref}\n selected={selected}\n />","scheme","muted ?? false","checkered ? '' : undefined","pressed ? '' : undefined","selected ? '' : undefined","typeof as === 'string' ? as : undefined","rootTheme.scheme","<ThemeColorProvider scheme={scheme} tone={tone}>\n <StyledCard\n data-as={typeof as === 'string' ? as : undefined}\n data-scheme={rootTheme.scheme}\n data-ui=\"Card\"\n data-tone={tone}\n {...restProps}\n $border={_getArrayProp(border)}\n $borderTop={_getArrayProp(borderTop)}\n $borderRight={_getArrayProp(borderRight)}\n $borderBottom={_getArrayProp(borderBottom)}\n $borderLeft={_getArrayProp(borderLeft)}\n $checkered={checkered}\n $focusRing={focusRing}\n $muted={muted ?? false}\n $radius={_getArrayProp(radius)}\n $shadow={_getArrayProp(shadow)}\n $tone={tone}\n data-checkered={checkered ? '' : undefined}\n data-pressed={pressed ? '' : undefined}\n data-selected={selected ? '' : undefined}\n forwardedAs={as}\n ref={ref}\n selected={selected}\n />\n </ThemeColorProvider>","_createMediaStore(media)","useMemo(() => _createMediaStore(media), [media])","(onStoreChange) => {\n const media = window.matchMedia(mediaQueryString)\n media.addEventListener('change', onStoreChange)\n return () => media.removeEventListener('change', onStoreChange)\n }","() => window.matchMedia(mediaQueryString).matches","useCallback(\n (onStoreChange) => {\n const media = window.matchMedia(mediaQueryString)\n media.addEventListener('change', onStoreChange)\n return () => media.removeEventListener('change', onStoreChange)\n },\n [mediaQueryString],\n )","() => false","getServerSnapshot = () => false","zOffsetProp = 0","parentContextValue && getLayerContext(parentContextValue)","_getArrayProp(zOffsetProp)","{}","(childLevel?: number) => {\n // Register child layers to the parent layer\n const parentDispose = parentRegisterChild?.(childLevel)\n\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const prevLen = state[childLevel] ?? 0\n const nextState = {...state, [childLevel]: prevLen + 1}\n\n setSize(Object.keys(nextState).length)\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, increment the size by 1\n setSize((v) => v + 1)\n }\n\n return () => {\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const nextState = {...state}\n\n if (nextState[childLevel] === 1) {\n delete nextState[childLevel]\n\n setSize(Object.keys(nextState).length)\n } else {\n nextState[childLevel] -= 1\n }\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, decrement the size by 1\n setSize((v) => v - 1)\n }\n\n parentDispose?.()\n }\n }","(v) => v + 1","nextState","state","(v) => v - 1","useCallback(\n (childLevel?: number) => {\n // Register child layers to the parent layer\n const parentDispose = parentRegisterChild?.(childLevel)\n\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const prevLen = state[childLevel] ?? 0\n const nextState = {...state, [childLevel]: prevLen + 1}\n\n setSize(Object.keys(nextState).length)\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, increment the size by 1\n setSize((v) => v + 1)\n }\n\n return () => {\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const nextState = {...state}\n\n if (nextState[childLevel] === 1) {\n delete nextState[childLevel]\n\n setSize(Object.keys(nextState).length)\n } else {\n nextState[childLevel] -= 1\n }\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, decrement the size by 1\n setSize((v) => v - 1)\n }\n\n parentDispose?.()\n }\n },\n [parentRegisterChild, setSize, setChildLayers],\n )","() => parentRegisterChild?.(level)","[level, parentRegisterChild]","{\n version: 0.0,\n isTopLayer,\n level,\n registerChild,\n size,\n zIndex,\n }","useMemo(\n () => ({\n version: 0.0,\n isTopLayer,\n level,\n registerChild,\n size,\n zIndex,\n }),\n [isTopLayer, level, registerChild, size, zIndex],\n )","<LayerContext.Provider value={value}>{children}</LayerContext.Provider>","LayerContext.Provider","v","getLayerContext(value)","err"],"sources":["../src/core/styles/box/boxStyle.ts","../src/core/styles/flex/flexItemStyle.ts","../src/core/styles/grid/gridItemStyle.ts","../src/core/styles/margin/marginStyle.ts","../src/core/styles/padding/paddingStyle.ts","../src/core/primitives/box/box.tsx","../src/core/styles/radius/radiusStyle.ts","../src/core/theme/useTheme.ts","../src/core/styles/card/_cardColorStyle.ts","../src/core/styles/focusRing/index.ts","../src/core/styles/border/borderStyle.ts","../src/core/styles/shadow/shadowStyle.ts","../src/core/lib/globalScope.ts","../src/core/lib/createGlobalScopedContext.ts","../src/core/theme/themeContext.ts","../src/core/theme/themeProvider.tsx","../src/core/theme/useRootTheme.ts","../src/core/theme/themeColorProvider.tsx","../src/core/primitives/card/styles.ts","../src/core/primitives/card/card.tsx","../src/core/hooks/useMediaIndex/useMediaIndex.ts","../src/core/hooks/useMatchMedia.ts","../src/core/hooks/usePrefersReducedMotion.ts","../src/core/lib/isRecord.ts","../src/core/utils/layer/getLayerContext.ts","../src/core/utils/layer/layerContext.ts","../src/core/utils/layer/layerProvider.tsx","../src/core/utils/layer/useLayer.ts"],"sourcesContent":["import {Property} from 'csstype'\n\nimport {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveBoxStyleProps} from './types'\n\nconst BASE_STYLE: CSSObject = {\n '&[data-as=\"ul\"],&[data-as=\"ol\"]': {\n listStyle: 'none',\n },\n}\n\nconst BOX_SIZING: {[key: string]: Property.BoxSizing} = {\n content: 'content-box',\n border: 'border-box',\n}\n\nconst BOX_HEIGHT = {\n stretch: 'stretch',\n fill: '100%',\n}\n\nexport function boxStyle(): CSSObject {\n return BASE_STYLE\n}\n\nexport function responsiveBoxStyle(): Array<\n (props: ResponsiveBoxStyleProps & ThemeProps) => CSSObject[]\n> {\n return [\n responsiveBoxSizingStyle,\n responsiveBoxHeightStyle,\n responsiveBoxOverflowStyle,\n responsiveBoxDisplayStyle,\n ]\n}\n\nfunction responsiveBoxDisplayStyle(props: ResponsiveBoxStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$display, (display) => ({\n '&:not([hidden])': {display},\n }))\n}\n\nfunction responsiveBoxSizingStyle(props: ResponsiveBoxStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$sizing, (sizing) => ({\n boxSizing: BOX_SIZING[sizing],\n }))\n}\n\nfunction responsiveBoxHeightStyle(props: ResponsiveBoxStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$height, (height) => ({\n height: BOX_HEIGHT[height],\n }))\n}\n\nfunction responsiveBoxOverflowStyle(props: ResponsiveBoxStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$overflow, (overflow) => ({\n overflow,\n }))\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {EMPTY_ARRAY} from '../../constants'\nimport {_responsive} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveFlexItemStyleProps} from './types'\n\nconst BASE_STYLE: CSSObject = {\n minWidth: 0,\n minHeight: 0,\n}\n\nexport function flexItemStyle(): Array<\n CSSObject | ((props: ResponsiveFlexItemStyleProps & ThemeProps) => CSSObject[])\n> {\n return [BASE_STYLE, responsiveFlexItemStyle]\n}\n\nfunction responsiveFlexItemStyle(props: ResponsiveFlexItemStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n if (!props.$flex) return EMPTY_ARRAY\n\n return _responsive(media, props.$flex, (flex) => ({flex: `${flex}`}))\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveGridItemStyleProps} from './types'\n\nexport function responsiveGridItemStyle(): Array<\n (props: ResponsiveGridItemStyleProps & ThemeProps) => CSSObject[]\n> {\n return [\n responsiveGridItemRowStyle,\n responsiveGridItemRowStartStyle,\n responsiveGridItemRowEndStyle,\n responsiveGridItemColumnStyle,\n responsiveGridItemColumnStartStyle,\n responsiveGridItemColumnEndStyle,\n ]\n}\n\nconst GRID_ITEM_ROW = {\n auto: 'auto',\n full: '1 / -1',\n}\n\nconst GRID_ITEM_COLUMN = {\n auto: 'auto',\n full: '1 / -1',\n}\n\nfunction responsiveGridItemRowStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$row, (row) => {\n if (typeof row === 'number') {\n return {gridRow: `span ${row} / span ${row}`}\n }\n\n return {gridRow: GRID_ITEM_ROW[row]}\n })\n}\n\nfunction responsiveGridItemRowStartStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$rowStart, (rowStart) => ({\n gridRowStart: `${rowStart}`,\n }))\n}\n\nfunction responsiveGridItemRowEndStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$rowEnd, (rowEnd) => ({gridRowEnd: `${rowEnd}`}))\n}\n\nfunction responsiveGridItemColumnStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$column, (column) => {\n if (typeof column === 'number') {\n return {gridColumn: `span ${column} / span ${column}`}\n }\n\n return {gridColumn: GRID_ITEM_COLUMN[column]}\n })\n}\n\nfunction responsiveGridItemColumnStartStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$columnStart, (columnStart) => ({\n gridColumnStart: `${columnStart}`,\n }))\n}\n\nfunction responsiveGridItemColumnEndStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$columnEnd, (columnEnd) => ({\n gridColumnEnd: `${columnEnd}`,\n }))\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {_getResponsiveSpace} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveMarginStyleProps} from './types'\n\nexport function responsiveMarginStyle(\n props: ResponsiveMarginStyleProps & ThemeProps,\n): CSSObject[][] {\n const {theme} = props\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return [\n _getResponsiveSpace(theme, ['margin'], props.$margin),\n _getResponsiveSpace(theme, ['marginLeft', 'marginRight'], props.$marginX),\n _getResponsiveSpace(theme, ['marginTop', 'marginBottom'], props.$marginY),\n _getResponsiveSpace(theme, ['marginTop'], props.$marginTop),\n _getResponsiveSpace(theme, ['marginRight'], props.$marginRight),\n _getResponsiveSpace(theme, ['marginBottom'], props.$marginBottom),\n _getResponsiveSpace(theme, ['marginLeft'], props.$marginLeft),\n ].filter(Boolean) as CSSObject[][]\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {_getResponsiveSpace} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsivePaddingStyleProps} from './types'\n\nexport function responsivePaddingStyle(\n props: ResponsivePaddingStyleProps & ThemeProps,\n): CSSObject[][] {\n const {theme} = props\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return [\n _getResponsiveSpace(theme, ['padding'], props.$padding),\n _getResponsiveSpace(theme, ['paddingLeft', 'paddingRight'], props.$paddingX),\n _getResponsiveSpace(theme, ['paddingTop', 'paddingBottom'], props.$paddingY),\n _getResponsiveSpace(theme, ['paddingTop'], props.$paddingTop),\n _getResponsiveSpace(theme, ['paddingRight'], props.$paddingRight),\n _getResponsiveSpace(theme, ['paddingBottom'], props.$paddingBottom),\n _getResponsiveSpace(theme, ['paddingLeft'], props.$paddingLeft),\n ].filter(Boolean) as CSSObject[][]\n}\n","import {styled} from 'styled-components'\n\nimport {boxStyle, responsiveBoxStyle} from '../../styles/box/boxStyle'\nimport {ResponsiveBoxStyleProps} from '../../styles/box/types'\nimport {flexItemStyle} from '../../styles/flex/flexItemStyle'\nimport {FlexItemStyleProps} from '../../styles/flex/types'\nimport {responsiveGridItemStyle} from '../../styles/grid/gridItemStyle'\nimport {ResponsiveGridItemStyleProps} from '../../styles/grid/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {responsiveMarginStyle} from '../../styles/margin/marginStyle'\nimport {ResponsiveMarginStyleProps} from '../../styles/margin/types'\nimport {responsivePaddingStyle} from '../../styles/padding/paddingStyle'\nimport {ResponsivePaddingStyleProps} from '../../styles/padding/types'\nimport {ElementType, Props} from '../../types/component'\nimport {\n ResponsiveBoxProps,\n ResponsiveFlexItemProps,\n ResponsiveGridItemProps,\n ResponsiveMarginProps,\n ResponsivePaddingProps,\n} from '../types'\n\n/**\n * The props that `Box` adds on top of the element it renders as.\n *\n * @public\n */\nexport interface BoxOwnProps\n extends\n ResponsiveFlexItemProps,\n ResponsiveBoxProps,\n ResponsiveGridItemProps,\n ResponsiveMarginProps,\n ResponsivePaddingProps {\n forwardedAs?: ElementType\n}\n\n/**\n * @public\n */\nexport type BoxProps<E extends ElementType = 'div'> = Props<BoxOwnProps, E>\n\nconst StyledBox = styled.div<\n FlexItemStyleProps &\n ResponsiveBoxStyleProps &\n ResponsiveGridItemStyleProps &\n ResponsiveMarginStyleProps &\n ResponsivePaddingStyleProps\n>(\n boxStyle,\n flexItemStyle,\n responsiveBoxStyle,\n responsiveGridItemStyle,\n responsiveMarginStyle,\n responsivePaddingStyle,\n)\n\nconst BoxComponent = function Box(\n props: BoxOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height'>,\n) {\n const {\n as: asProp = 'div',\n ref,\n gridColumn,\n gridColumnStart,\n gridColumnEnd,\n display = 'block',\n flex,\n height,\n margin = 0,\n marginX,\n marginY,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n overflow,\n padding = 0,\n paddingX,\n paddingY,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n gridRow,\n gridRowStart,\n gridRowEnd,\n sizing,\n ...restProps\n } = props\n\n return (\n <StyledBox\n data-as={typeof asProp === 'string' ? asProp : undefined}\n data-ui=\"Box\"\n {...restProps}\n $column={_getArrayProp(gridColumn)}\n $columnStart={_getArrayProp(gridColumnStart)}\n $columnEnd={_getArrayProp(gridColumnEnd)}\n $display={_getArrayProp(display)}\n $flex={_getArrayProp(flex)}\n $height={_getArrayProp(height)}\n $margin={_getArrayProp(margin)}\n $marginX={_getArrayProp(marginX)}\n $marginY={_getArrayProp(marginY)}\n $marginTop={_getArrayProp(marginTop)}\n $marginRight={_getArrayProp(marginRight)}\n $marginBottom={_getArrayProp(marginBottom)}\n $marginLeft={_getArrayProp(marginLeft)}\n $overflow={_getArrayProp(overflow)}\n $padding={_getArrayProp(padding)}\n $paddingX={_getArrayProp(paddingX)}\n $paddingY={_getArrayProp(paddingY)}\n $paddingTop={_getArrayProp(paddingTop)}\n $paddingRight={_getArrayProp(paddingRight)}\n $paddingBottom={_getArrayProp(paddingBottom)}\n $paddingLeft={_getArrayProp(paddingLeft)}\n $row={_getArrayProp(gridRow)}\n $rowStart={_getArrayProp(gridRowStart)}\n $rowEnd={_getArrayProp(gridRowEnd)}\n $sizing={_getArrayProp(sizing)}\n // styled-components 6.5 distributes PolymorphicCallProps over ElementType and\n // hits TS2589; narrow the call-site target while still passing the real value.\n // oxlint-disable-next-line no-unsafe-type-assertion\n as={asProp as 'div'}\n ref={ref}\n >\n {props.children}\n </StyledBox>\n )\n}\n\n/**\n * The `Box` component is a basic layout wrapper component which provides utility properties\n * for flex, margins and padding.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Box = BoxComponent as unknown as <E extends ElementType = 'div'>(\n props: BoxProps<E>,\n) => React.JSX.Element\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveRadiusStyleProps} from './types'\n\nexport function responsiveRadiusStyle(props: ResponsiveRadiusStyleProps & ThemeProps): CSSObject[] {\n const {media, radius} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$radius, (value) => {\n let borderRadius: string | 0 = 0\n\n if (typeof value === 'number') {\n borderRadius = rem(radius[value])\n }\n\n if (value === 'full') {\n borderRadius = '9999px'\n }\n\n return {borderRadius}\n })\n}\n","import {useTheme as useStyledTheme} from 'styled-components'\n\nimport {Theme, Theme_v2} from '../../theme/system/theme'\nimport {getTheme_v2} from '../../theme/versioning/getTheme_v2'\n\n/**\n * @public\n */\nexport function useTheme(): Theme {\n // oxlint-disable-next-line no-unnecessary-type-assertion\n return useStyledTheme() as Theme\n}\n\n/**\n * @public\n */\nexport function useTheme_v2(): Theme_v2 {\n // oxlint-disable-next-line no-unnecessary-type-assertion\n return getTheme_v2(useStyledTheme() as Theme)\n}\n","import {ThemeColorCard_v2} from '../../../theme/system/color/color'\nimport {ThemeColorState_v2} from '../../../theme/system/color/state'\nimport {CSSObject} from '../../../theme/system/css'\n\n/**\n * @internal\n */\nexport function _cardColorStyle(\n base: ThemeColorCard_v2,\n color: ThemeColorState_v2,\n checkered = false,\n): CSSObject {\n return {\n // from base\n\n '--card-backdrop-color': base.backdrop,\n\n '--card-focus-ring-color': base.focusRing,\n\n '--card-shadow-outline-color': base.shadow.outline,\n '--card-shadow-umbra-color': base.shadow.umbra,\n '--card-shadow-penumbra-color': base.shadow.penumbra,\n '--card-shadow-ambient-color': base.shadow.ambient,\n\n // from state\n\n '--card-accent-fg-color': color.accent.fg,\n\n '--card-avatar-gray-bg-color': color.avatar.gray.bg,\n '--card-avatar-gray-fg-color': color.avatar.gray.fg,\n '--card-avatar-blue-bg-color': color.avatar.blue.bg,\n '--card-avatar-blue-fg-color': color.avatar.blue.fg,\n '--card-avatar-purple-bg-color': color.avatar.purple.bg,\n '--card-avatar-purple-fg-color': color.avatar.purple.fg,\n '--card-avatar-magenta-bg-color': color.avatar.magenta.bg,\n '--card-avatar-magenta-fg-color': color.avatar.magenta.fg,\n '--card-avatar-red-bg-color': color.avatar.red.bg,\n '--card-avatar-red-fg-color': color.avatar.red.fg,\n '--card-avatar-orange-bg-color': color.avatar.orange.bg,\n '--card-avatar-orange-fg-color': color.avatar.orange.fg,\n '--card-avatar-yellow-bg-color': color.avatar.yellow.bg,\n '--card-avatar-yellow-fg-color': color.avatar.yellow.fg,\n '--card-avatar-green-bg-color': color.avatar.green.bg,\n '--card-avatar-green-fg-color': color.avatar.green.fg,\n '--card-avatar-cyan-bg-color': color.avatar.cyan.bg,\n '--card-avatar-cyan-fg-color': color.avatar.cyan.fg,\n\n '--card-bg-color': color.bg,\n '--card-bg-image': checkered\n ? `repeating-conic-gradient(${color.bg} 0% 25%, ${color.muted.bg} 0% 50%)`\n : undefined,\n\n '--card-border-color': color.border,\n\n '--card-badge-default-bg-color': color.badge.default.bg,\n '--card-badge-default-dot-color': color.badge.default.dot,\n '--card-badge-default-fg-color': color.badge.default.fg,\n '--card-badge-default-icon-color': color.badge.default.icon,\n '--card-badge-neutral-bg-color': color.badge.neutral?.bg,\n '--card-badge-neutral-dot-color': color.badge.neutral?.dot,\n '--card-badge-neutral-fg-color': color.badge.neutral?.fg,\n '--card-badge-neutral-icon-color': color.badge.neutral?.icon,\n '--card-badge-primary-bg-color': color.badge.primary.bg,\n '--card-badge-primary-dot-color': color.badge.primary.dot,\n '--card-badge-primary-fg-color': color.badge.primary.fg,\n '--card-badge-primary-icon-color': color.badge.primary.icon,\n '--card-badge-suggest-bg-color': color.badge.suggest?.bg,\n '--card-badge-suggest-dot-color': color.badge.suggest?.dot,\n '--card-badge-suggest-fg-color': color.badge.suggest?.fg,\n '--card-badge-suggest-icon-color': color.badge.suggest?.icon,\n '--card-badge-positive-bg-color': color.badge.positive.bg,\n '--card-badge-positive-dot-color': color.badge.positive.dot,\n '--card-badge-positive-fg-color': color.badge.positive.fg,\n '--card-badge-positive-icon-color': color.badge.positive.icon,\n '--card-badge-caution-bg-color': color.badge.caution.bg,\n '--card-badge-caution-dot-color': color.badge.caution.dot,\n '--card-badge-caution-fg-color': color.badge.caution.fg,\n '--card-badge-caution-icon-color': color.badge.caution.icon,\n '--card-badge-critical-bg-color': color.badge.critical.bg,\n '--card-badge-critical-dot-color': color.badge.critical.dot,\n '--card-badge-critical-fg-color': color.badge.critical.fg,\n '--card-badge-critical-icon-color': color.badge.critical.icon,\n\n '--card-code-bg-color': color.code.bg,\n '--card-code-fg-color': color.code.fg,\n\n '--card-fg-color': color.fg,\n\n '--card-icon-color': color.icon,\n\n '--card-kbd-bg-color': color.kbd.bg,\n '--card-kbd-border-color': color.kbd.border,\n '--card-kbd-fg-color': color.kbd.fg,\n\n '--card-link-fg-color': color.link.fg,\n\n '--card-muted-bg-color': color.muted.bg,\n '--card-muted-fg-color': color.muted.fg,\n\n '--card-skeleton-color-from': color.skeleton.from,\n '--card-skeleton-color-to': color.skeleton.to,\n\n // deprecated variables (kept for legacy)\n\n '--card-bg2-color': color.muted.bg,\n '--card-link-color': color.link.fg,\n '--card-hairline-soft-color': color.border,\n '--card-hairline-hard-color': color.border,\n }\n}\n","import {ThemeFocusRing} from '../../../theme/system/focusRing'\n\nexport function focusRingBorderStyle(border: {color: string; width: number}): string {\n return `inset 0 0 0 ${border.width}px ${border.color}`\n}\n\nexport function focusRingStyle(opts: {\n base?: {bg: string}\n border?: {color: string; width: number}\n focusRing: ThemeFocusRing\n}): string {\n const {base, border, focusRing} = opts\n const focusRingOutsetWidth = focusRing.offset + focusRing.width\n const focusRingInsetWidth = 0 - focusRing.offset\n const bgColor = base ? base.bg : 'var(--card-bg-color)'\n\n return [\n focusRingInsetWidth > 0 && `inset 0 0 0 ${focusRingInsetWidth}px var(--card-focus-ring-color)`,\n border && focusRingBorderStyle(border),\n focusRingInsetWidth < 0 && `0 0 0 ${0 - focusRingInsetWidth}px ${bgColor}`,\n focusRingOutsetWidth > 0 && `0 0 0 ${focusRingOutsetWidth}px var(--card-focus-ring-color)`,\n ]\n .filter(Boolean)\n .join(',')\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveBorderStyleProps} from './types'\n\nexport function responsiveBorderStyle(): Array<\n (props: ResponsiveBorderStyleProps & ThemeProps) => CSSObject[]\n> {\n return [border, borderTop, borderRight, borderBottom, borderLeft]\n}\n\nfunction border(props: ResponsiveBorderStyleProps & ThemeProps) {\n const {card, media} = getTheme_v2(props.theme)\n const borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`\n\n return _responsive(media, props.$border, (value) =>\n value ? {'&&': {border: borderStyle}} : {'&&': {border: 0}},\n )\n}\n\nfunction borderTop(props: ResponsiveBorderStyleProps & ThemeProps) {\n const {card, media} = getTheme_v2(props.theme)\n const borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`\n\n return _responsive(media, props.$borderTop, (value) =>\n value ? {'&&': {borderTop: borderStyle}} : {'&&': {borderTop: 0}},\n )\n}\n\nfunction borderRight(props: ResponsiveBorderStyleProps & ThemeProps) {\n const {card, media} = getTheme_v2(props.theme)\n const borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`\n\n return _responsive(media, props.$borderRight, (value) =>\n value ? {'&&': {borderRight: borderStyle}} : {'&&': {borderRight: 0}},\n )\n}\n\nfunction borderBottom(props: ResponsiveBorderStyleProps & ThemeProps) {\n const {card, media} = getTheme_v2(props.theme)\n const borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`\n\n return _responsive(media, props.$borderBottom, (value) =>\n value ? {'&&': {borderBottom: borderStyle}} : {'&&': {borderBottom: 0}},\n )\n}\n\nfunction borderLeft(props: ResponsiveBorderStyleProps & ThemeProps) {\n const {card, media} = getTheme_v2(props.theme)\n const borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`\n\n return _responsive(media, props.$borderLeft, (value) =>\n value ? {'&&': {borderLeft: borderStyle}} : {'&&': {borderLeft: 0}},\n )\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {ThemeBoxShadow, ThemeShadow} from '../../../theme/system/shadow'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {EMPTY_RECORD} from '../../constants'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveShadowStyleProps} from './types'\n\nfunction toBoxShadow(shadow: ThemeBoxShadow, color: string) {\n return `${shadow.map(rem).join(' ')} ${color}`\n}\n\nfunction shadowStyle(shadow: ThemeShadow | null, outlineWidth: number = 1): CSSObject {\n if (!shadow) return EMPTY_RECORD\n\n const outline = `0 0 0 ${rem(outlineWidth)} var(--card-shadow-outline-color)`\n const umbra = toBoxShadow(shadow.umbra, 'var(--card-shadow-umbra-color)')\n const penumbra = toBoxShadow(shadow.penumbra, 'var(--card-shadow-penumbra-color)')\n const ambient = toBoxShadow(shadow.ambient, 'var(--card-shadow-ambient-color)')\n\n return {boxShadow: `${outline}, ${umbra}, ${penumbra}, ${ambient}`}\n}\n\nexport function responsiveShadowStyle(props: ResponsiveShadowStyleProps & ThemeProps): CSSObject[] {\n const {card, media, shadow} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$shadow, (index) =>\n shadowStyle(shadow[index], card.shadow.outline),\n )\n}\n","/**\n * Gets the global scope instance in a given environment.\n *\n * The strategy is to return the most modern, and if not, the most common:\n * - The `globalThis` variable is the modern approach to accessing the global scope\n * - The `window` variable is the global scope in a web browser\n * - The `self` variable is the global scope in workers and others\n * - The `global` variable is the global scope in Node.js\n */\nfunction getGlobalScope() {\n if (typeof globalThis !== 'undefined') return globalThis\n if (typeof window !== 'undefined') return window\n if (typeof self !== 'undefined') return self\n if (typeof global !== 'undefined') return global\n\n throw new Error('@sanity/ui: could not locate global scope')\n}\n\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const globalScope = getGlobalScope() as any\n","/**\n * As `@sanity/ui` is declared as a dependency, and may be duplicated, sometimes across major versions\n * it's critical that vital react contexts are shared even when there is a duplicate.\n * If we used a model similar to `sanity` itself, or `styled-components`, this would be unnecessary as\n * those libraries enforce single instances.\n * Since we don't enforce it we have to support a sanity plugin being able to call hooks like `useToast`, and then\n * read the context setup by `sanity`, which calls `ToastProvider`, even if the provider and hook are different instances in memory.\n * It's also why it's vital that all changes to globally scoped providers remain fully backwards compatible to v1.\n */\n\nimport {type Context, createContext} from 'react'\n\nimport {globalScope} from './globalScope'\n\n// oxlint-disable-next-line no-unnecessary-type-parameters\nexport function createGlobalScopedContext<ContextType, const T extends ContextType = ContextType>(\n /**\n * Enforce that all Symbol.for keys used for globally scoped contexts have a predictable prefix\n */\n key: `@sanity/ui/context/${string}`,\n defaultValue: T,\n): Context<ContextType> {\n const symbol = Symbol.for(key)\n\n /**\n * Prevent errors about re-renders on React SSR on Next.js App Router\n */\n if (typeof document === 'undefined') {\n const context = createContext<ContextType>(defaultValue)\n context.displayName = key\n return context\n }\n\n globalScope[symbol] = globalScope[symbol] || createContext<T>(defaultValue)\n\n return globalScope[symbol]\n}\n","import {createGlobalScopedContext} from '../lib/createGlobalScopedContext'\nimport {ThemeContextValue} from './types'\n\n/**\n * @internal\n */\nexport const ThemeContext = createGlobalScopedContext<ThemeContextValue | null>(\n '@sanity/ui/context/theme',\n null,\n)\n","import {useContext, useMemo} from 'react'\nimport {ThemeProvider as StyledThemeProvider} from 'styled-components'\n\nimport {getScopedTheme} from '../../theme/getScopedTheme'\nimport {\n type ThemeColorCardToneKey,\n type ThemeColorSchemeKey,\n} from '../../theme/system/color/_system'\nimport {type RootTheme, type Theme} from '../../theme/system/theme'\nimport {ThemeContext} from './themeContext'\nimport {ThemeContextValue} from './types'\n\n/**\n * @public\n */\nexport interface ThemeProviderProps {\n children?: React.ReactNode\n scheme?: ThemeColorSchemeKey\n theme?: RootTheme\n tone?: ThemeColorCardToneKey\n}\n\n/**\n * @public\n */\nexport function ThemeProvider(props: ThemeProviderProps): React.JSX.Element {\n const parentTheme = useContext(ThemeContext)\n const {children} = props\n const scheme = props.scheme ?? (parentTheme?.scheme || 'light')\n const rootTheme = props.theme ?? (parentTheme?.theme || null)\n const tone = props.tone ?? (parentTheme?.tone || 'default')\n\n const themeContext: ThemeContextValue | null = useMemo(() => {\n if (!rootTheme) return null\n\n return {\n version: 0.0,\n theme: rootTheme,\n scheme,\n tone,\n }\n }, [rootTheme, scheme, tone])\n\n const theme: Theme | null = useMemo(() => {\n if (!rootTheme) return null\n\n return getScopedTheme(rootTheme, scheme, tone)\n }, [scheme, rootTheme, tone])\n\n if (!theme) {\n return <pre>ThemeProvider: no \"theme\" property provided</pre>\n }\n\n return (\n <ThemeContext.Provider value={themeContext}>\n <StyledThemeProvider theme={theme}>{children}</StyledThemeProvider>\n </ThemeContext.Provider>\n )\n}\n","import {useContext} from 'react'\n\nimport {ThemeContext} from './themeContext'\nimport {ThemeContextValue} from './types'\n\n/**\n * @public\n */\nexport function useRootTheme(): ThemeContextValue {\n const value = useContext(ThemeContext)\n\n if (!value) {\n throw new Error('useRootTheme(): missing context value')\n }\n\n // oxlint-disable-next-line no-unnecessary-type-assertion, no-unsafe-type-assertion\n return value as unknown as ThemeContextValue\n}\n","import {ThemeColorCardToneKey, ThemeColorSchemeKey} from '../../theme/system/color/_system'\nimport {ThemeProvider} from './themeProvider'\nimport {useRootTheme} from './useRootTheme'\n\n/**\n * @public\n */\nexport interface ThemeColorProviderProps {\n children?: React.ReactNode\n scheme?: ThemeColorSchemeKey\n tone?: ThemeColorCardToneKey\n}\n\n/**\n * @public\n */\nexport function ThemeColorProvider(props: ThemeColorProviderProps): React.JSX.Element {\n const {children, scheme, tone} = props\n const root = useRootTheme()\n\n return (\n <ThemeProvider scheme={scheme || root.scheme} theme={root.theme} tone={tone}>\n {children}\n </ThemeProvider>\n )\n}\n","import {css} from 'styled-components'\n\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_cardColorStyle} from '../../styles/card/_cardColorStyle'\nimport {focusRingStyle} from '../../styles/focusRing'\nimport {ThemeProps} from '../../styles/types'\nimport {CardStyleProps} from './types'\n\nexport function cardStyle(\n props: CardStyleProps & ThemeProps,\n): Array<ReturnType<typeof css> | (() => ReturnType<typeof css>)> {\n return [cardBaseStyle(props), cardColorStyle(props)]\n}\n\nfunction cardBaseStyle(props: CardStyleProps & ThemeProps): ReturnType<typeof css> {\n const {$checkered} = props\n const {space} = getTheme_v2(props.theme)\n\n return css`\n ${\n $checkered &&\n css`\n background-size: ${space[3]}px ${space[3]}px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n `\n }\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n outline: none;\n text-decoration: none;\n }\n\n /* &:is(pre) */\n &[data-as='pre'] {\n font: inherit;\n }\n `\n}\n\nfunction cardColorStyle(props: CardStyleProps & ThemeProps): ReturnType<typeof css> {\n const {$checkered, $focusRing, $muted} = props\n const {card, color, style} = getTheme_v2(props.theme)\n const border = {width: card.border.width, color: 'var(--card-border-color)'}\n\n return css`\n color-scheme: ${color._dark ? 'dark' : 'light'};\n\n ${_cardColorStyle(color, color, $checkered)}\n\n background-color: ${$muted ? 'var(--card-muted-bg-color)' : 'var(--card-bg-color)'};\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}\n }\n\n &[data-selected] {\n ${_cardColorStyle(color, color.selectable.default.selected, $checkered)}\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}\n }\n\n &:active {\n ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ${\n $focusRing\n ? focusRingStyle({base: color, border, focusRing: card.focusRing})\n : undefined\n };\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n cursor: pointer;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &[data-disabled] {\n ${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}\n }\n\n &[data-selected] {\n ${_cardColorStyle(color, color.selectable.default.selected, $checkered)}\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}\n }\n\n &:active {\n ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ${\n $focusRing\n ? focusRingStyle({base: color, border, focusRing: card.focusRing})\n : undefined\n };\n }\n }\n }\n\n ${style?.card?.root}\n `\n}\n","import {isValidElementType} from 'react-is'\nimport {styled} from 'styled-components'\n\nimport {ThemeColorSchemeKey} from '../../../theme/system/color/_system'\nimport {responsiveBorderStyle} from '../../styles/border/borderStyle'\nimport {ResponsiveBorderStyleProps} from '../../styles/border/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {responsiveShadowStyle} from '../../styles/shadow/shadowStyle'\nimport {ResponsiveShadowStyleProps} from '../../styles/shadow/types'\nimport {ThemeColorProvider} from '../../theme/themeColorProvider'\nimport {useRootTheme} from '../../theme/useRootTheme'\nimport {CardTone} from '../../types/card'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {ResponsiveBorderProps, ResponsiveRadiusProps, ResponsiveShadowProps} from '../types'\nimport {cardStyle} from './styles'\nimport {CardStyleProps} from './types'\n\n/**\n * @public\n */\nexport interface CardOwnProps\n extends BoxOwnProps, ResponsiveBorderProps, ResponsiveRadiusProps, ResponsiveShadowProps {\n /**\n * Do not use in production.\n * @beta\n */\n __unstable_checkered?: boolean\n /**\n * Do not use in production.\n * @beta\n */\n __unstable_focusRing?: boolean\n disabled?: boolean\n muted?: boolean\n pressed?: boolean\n scheme?: ThemeColorSchemeKey\n selected?: boolean\n tone?: CardTone\n}\n\n/**\n * @public\n */\nexport type CardProps<E extends ElementType = 'div'> = Props<CardOwnProps, E>\n\nconst StyledCard = styled(Box)<\n CardStyleProps &\n ResponsiveRadiusStyleProps &\n ResponsiveBorderStyleProps &\n ResponsiveShadowStyleProps\n>(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle)\n\nfunction CardComponent(\n props: CardOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height'>,\n) {\n const {\n __unstable_checkered: checkered = false,\n __unstable_focusRing: focusRing = false,\n as: asProp,\n border,\n borderTop,\n borderRight,\n borderBottom,\n borderLeft,\n muted,\n pressed,\n radius = 0,\n ref,\n scheme,\n selected,\n shadow,\n tone: toneProp = 'default',\n ...restProps\n } = props\n\n const as = isValidElementType(asProp) ? asProp : 'div'\n const rootTheme = useRootTheme()\n const tone = toneProp === 'inherit' ? rootTheme.tone : toneProp\n\n // todo: Consider adding the wrapper approach for nested cards in which the tones are not changing, avoid unnecessary ThemeColorProvider\n return (\n <ThemeColorProvider scheme={scheme} tone={tone}>\n <StyledCard\n data-as={typeof as === 'string' ? as : undefined}\n data-scheme={rootTheme.scheme}\n data-ui=\"Card\"\n data-tone={tone}\n {...restProps}\n $border={_getArrayProp(border)}\n $borderTop={_getArrayProp(borderTop)}\n $borderRight={_getArrayProp(borderRight)}\n $borderBottom={_getArrayProp(borderBottom)}\n $borderLeft={_getArrayProp(borderLeft)}\n $checkered={checkered}\n $focusRing={focusRing}\n $muted={muted ?? false}\n $radius={_getArrayProp(radius)}\n $shadow={_getArrayProp(shadow)}\n $tone={tone}\n data-checkered={checkered ? '' : undefined}\n data-pressed={pressed ? '' : undefined}\n data-selected={selected ? '' : undefined}\n forwardedAs={as}\n ref={ref}\n selected={selected}\n />\n </ThemeColorProvider>\n )\n}\n\n/**\n * The `Card` component acts much like a `Box`, but with a background and foreground color.\n * Components within a `Card` inherit its colors.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Card = CardComponent as unknown as <E extends ElementType = 'div'>(\n props: CardProps<E>,\n) => React.JSX.Element\n","import {useMemo, useSyncExternalStore} from 'react'\n\nimport {useTheme_v2} from '../../theme/useTheme'\n\n/**\n * @internal\n */\nexport interface _MediaStore {\n subscribe: (onStoreChange: () => void) => () => void\n getSnapshot: () => number\n}\n\ntype MediaQueryMinWidth = `(min-width: ${number}px)`\ntype MediaQueryMaxWidth = `(max-width: ${number}px)`\ntype MediaQueryMinMaxWidth = `${MediaQueryMinWidth} and ${MediaQueryMaxWidth}`\ntype MediaQuery = `screen and ${MediaQueryMinWidth | MediaQueryMaxWidth | MediaQueryMinMaxWidth}`\n\nfunction _getMediaQuery(media: number[], index: number): MediaQuery {\n if (index === 0) {\n return `screen and (max-width: ${media[index] - 1}px)`\n }\n\n if (index === media.length) {\n return `screen and (min-width: ${media[index - 1]}px)`\n }\n\n return `screen and (min-width: ${media[index - 1]}px) and (max-width: ${media[index] - 1}px)`\n}\n\nfunction _createMediaStore(media: number[]): _MediaStore {\n const mediaLen = media.length\n let sizes: {mq: MediaQueryList; index: number}[]\n\n // The _createMediaStore function is called in both server and client environments.\n // However since subscribe and getSnapshot are only called on the client we lazy init what we need for them\n // so that we don't need to run checks for wether it's safe to call `window.matchMedia`\n const getSizes = () => {\n if (!sizes) {\n sizes = []\n\n for (let index = mediaLen; index > -1; index -= 1) {\n const mediaQuery = _getMediaQuery(media, index)\n\n sizes.push({index, mq: window.matchMedia(mediaQuery)})\n }\n }\n\n return sizes\n }\n\n const getSnapshot = () => {\n for (const {index, mq} of getSizes()) {\n if (mq.matches) return index\n }\n\n return 0\n }\n\n const subscribe = (onStoreChange: () => void) => {\n const disposeFns: (() => void)[] = []\n\n for (const {mq} of getSizes()) {\n const handleChange = () => {\n if (mq.matches) onStoreChange()\n }\n\n mq.addEventListener('change', handleChange)\n\n disposeFns.push(() => mq.removeEventListener('change', handleChange))\n }\n\n return () => {\n for (const disposeFn of disposeFns) {\n disposeFn()\n }\n }\n }\n\n return {getSnapshot, subscribe}\n}\n\n/**\n * Only called during server-side rendering, and hydration if using hydrateRoot\n * Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query\n * and we assume `(prefers-color-scheme: light)` since it's the most common scheme\n *\n * @link https://beta.reactjs.org/apis/react/useSyncExternalStore#adding-support-for-server-rendering\n */\nfunction getServerSnapshot() {\n return 0\n}\n\n/**\n * This API might change. DO NOT USE IN PRODUCTION.\n * @beta\n */\nexport function useMediaIndex(): number {\n const {media} = useTheme_v2()\n const store = useMemo(() => _createMediaStore(media), [media])\n\n return useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot)\n}\n","import {useCallback, useDebugValue, useSyncExternalStore} from 'react'\n\n/**\n * Efficiently subscribes to `window.matchMedia` queries\n *\n * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)\n *\n * @public\n */\nexport function useMatchMedia(\n mediaQueryString: `(${string})`,\n getServerSnapshot?: () => boolean,\n): boolean {\n useDebugValue(mediaQueryString)\n\n return useSyncExternalStore(\n useCallback(\n (onStoreChange) => {\n const media = window.matchMedia(mediaQueryString)\n media.addEventListener('change', onStoreChange)\n return () => media.removeEventListener('change', onStoreChange)\n },\n [mediaQueryString],\n ),\n () => window.matchMedia(mediaQueryString).matches,\n getServerSnapshot,\n )\n}\n","import {useMatchMedia} from './useMatchMedia'\n\n/**\n * Returns true if motion should be reduced\n *\n * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-reduced-motion: no-preference)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)\n *\n * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.\n * Chrome supports reading the `prefers-reduced-motion` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Reduced-Motion\n * @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b\n *\n * @public\n */\nexport function usePrefersReducedMotion(getServerSnapshot = () => false): boolean {\n return useMatchMedia('(prefers-reduced-motion: reduce)', getServerSnapshot)\n}\n","export function isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value && typeof value === 'object' && !Array.isArray(value))\n}\n","import {isRecord} from '../../lib/isRecord'\nimport {LayerContextValue} from './types'\n\nexport function getLayerContext(contextValue: LayerContextValue): LayerContextValue {\n // NOTE: This check is for future-compatiblity\n // - If the value is not an object, it’s not compatible with the current version\n // - If the value is an object, but doesn’t have `version: 0.0`, it’s not compatible with the current version\n if (!isRecord(contextValue) || contextValue.version !== 0.0) {\n throw new Error('the context value is not compatible')\n }\n\n if (!contextValue) {\n throw new Error('components using `useLayer()` should be wrapped in a <LayerProvider>.')\n }\n\n if (contextValue.version === 0.0) {\n return contextValue\n }\n\n throw new Error('could not get layer context')\n}\n","import {createGlobalScopedContext} from '../../lib/createGlobalScopedContext'\nimport {LayerContextValue} from './types'\n\nexport const LayerContext = createGlobalScopedContext<LayerContextValue | null>(\n '@sanity/ui/context/layer',\n null,\n)\n","import {useCallback, useContext, useEffect, useMemo, useState} from 'react'\n\nimport {useMediaIndex} from '../../hooks/useMediaIndex/useMediaIndex'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {getLayerContext} from './getLayerContext'\nimport {LayerContext} from './layerContext'\nimport {LayerContextValue} from './types'\n\n/**\n * @public\n */\nexport interface LayerProviderProps {\n children?: React.ReactNode\n zOffset?: number | number[]\n}\n\n/**\n * @public\n */\nexport function LayerProvider(props: LayerProviderProps): React.JSX.Element {\n const {children, zOffset: zOffsetProp = 0} = props\n\n // Get parent context values\n const parentContextValue = useContext(LayerContext)\n const parent = parentContextValue && getLayerContext(parentContextValue)\n const parentRegisterChild = parent?.registerChild\n const parentLevel = parent?.level ?? 0\n\n // Get level\n const level = parentLevel + 1\n\n // Get z-index offset\n const zOffset = _getArrayProp(zOffsetProp)\n\n // Get responsive z-index value\n const maxMediaIndex = zOffset.length - 1\n const mediaIndex = Math.min(useMediaIndex(), maxMediaIndex)\n const zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex]\n\n // A state value that is used to keep track of the number of child layers on each level\n const [, setChildLayers] = useState<Record<number, number>>({})\n\n // A state value that is used to keep track of the number of child levels\n const [size, setSize] = useState(0)\n\n const isTopLayer = size === 0\n\n const registerChild = useCallback(\n (childLevel?: number) => {\n // Register child layers to the parent layer\n const parentDispose = parentRegisterChild?.(childLevel)\n\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const prevLen = state[childLevel] ?? 0\n const nextState = {...state, [childLevel]: prevLen + 1}\n\n setSize(Object.keys(nextState).length)\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, increment the size by 1\n setSize((v) => v + 1)\n }\n\n return () => {\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const nextState = {...state}\n\n if (nextState[childLevel] === 1) {\n delete nextState[childLevel]\n\n setSize(Object.keys(nextState).length)\n } else {\n nextState[childLevel] -= 1\n }\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, decrement the size by 1\n setSize((v) => v - 1)\n }\n\n parentDispose?.()\n }\n },\n [parentRegisterChild, setSize, setChildLayers],\n )\n\n // Register this layer on mount\n useEffect(() => parentRegisterChild?.(level), [level, parentRegisterChild])\n\n const value: LayerContextValue = useMemo(\n () => ({\n version: 0.0,\n isTopLayer,\n level,\n registerChild,\n size,\n zIndex,\n }),\n [isTopLayer, level, registerChild, size, zIndex],\n )\n\n return <LayerContext.Provider value={value}>{children}</LayerContext.Provider>\n}\n","import {useContext} from 'react'\n\nimport {getLayerContext} from './getLayerContext'\nimport {LayerContext} from './layerContext'\nimport {LayerContextValue} from './types'\n\n/**\n * @public\n */\nexport function useLayer(): LayerContextValue {\n const value = useContext(LayerContext)\n\n if (!value) {\n throw new Error('useLayer(): missing context value')\n }\n\n try {\n return getLayerContext(value)\n } catch (err) {\n if (err instanceof Error) {\n // oxlint-disable-next-line preserve-caught-error\n throw new Error(`useLayer(): ${err.message}`)\n } else {\n // oxlint-disable-next-line preserve-caught-error, restrict-template-expressions\n throw new Error(`useLayer(): ${err}`)\n }\n }\n}\n"],"mappings":";;;;;;;;AAQA,MAAM,eAAwB,EAC5B,uCAAmC,EACjC,WAAW,OACb,EACF,GAEM,aAAkD;CACtD,SAAS;CACT,QAAQ;AACV,GAEM,aAAa;CACjB,SAAS;CACT,MAAM;AACR;AAEA,SAAgB,W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Ae,GAGpBA;GACT,CAAC,GAMH,gBAAgB;EAClB;CACF,GAtCwB,EAAA,KAAA;CAH1B,IAAM,gBAAgBG,IA8CZC,IAAoCC;CAA9C,AAAsC,EAAA,OAAA,SAAA,EAAA,OAAtB,uBAAN,WAAM,sBAAsB,KAAK,GAAG,KAAA,CAAC,OAAO,mBAAmB,GAAnC,EAAA,KAAA,OAAtB,EAAA,KAAA,uEAAhB,UAAUD,IAAoCC,EAA4B;CAGjEC,IAAAA;CAEL,AAAA,EAAA,QAAA,cAAA,EAAA,QACA,SAAA,EAAA,QACA,iBAAA,EAAA,QACA,QAAA,EAAA,QACA,UANK,KAAA;EACL,SAAS;EACT;EACA;EACA;EACA;EACA;CACF,GALE,EAAA,MAAA,YACA,EAAA,MAAA,OACA,EAAA,MAAA,eACA,EAAA,MAAA,MACA,EAAA,MAAA;CAPJ,IAAM,QAA2BC,IAY1BC;CAAP,OAA6C,EAAA,QAAA,YAAA,EAAA,QAAR,SAA9B,KAAA,oBAACC,aAAAA,UAAD;EAA8B;EAAQ;CAAgC,CAAA,GAAhC,EAAA,MAAA,UAAR,EAAA,MAAA,iCAA9BD;AACT;AAzBkB,SAAA,OAAC,KAAA;CAAME,OAAAA,MAAI;;AApBb,SAAA,MAAC,GAAA;CAAM,OAAA,IAAI;;;;;ACtD3B,SAAgB,WAA8B;eACtC,QAAQ,WAAW,YAAY;CAErC,IAAI,CAAC,OACH,MAAU,MAAM,mCAAmC;CAGrD,IAAI;EACKC,IAAAA;EAAP,OAAuB,EAAA,OAAA,qBAAhB,KAAA,gBAAgB,KAAK,GAAL,EAAA,KAAA,mBAAhBA;CACT,SAASC,IAAK;EAAL,IAAA,MAAA;EAML,MALE,eAAe,QAEP,MAAM,eAAe,IAAI,SAAS,IAGlC,MAAM,eAAe,KAAK;CAExC;AACF"}
|
|
1
|
+
{"version":3,"file":"useLayer-DzgZ2cTe.js","names":["asProp = 'div'","display = 'block'","margin = 0","padding = 0","_getArrayProp(gridColumn)","_getArrayProp(gridColumnStart)","_getArrayProp(gridColumnEnd)","_getArrayProp(display)","_getArrayProp(flex)","_getArrayProp(height)","_getArrayProp(margin)","_getArrayProp(marginX)","_getArrayProp(marginY)","_getArrayProp(marginTop)","_getArrayProp(marginRight)","_getArrayProp(marginBottom)","_getArrayProp(marginLeft)","_getArrayProp(overflow)","_getArrayProp(padding)","_getArrayProp(paddingX)","_getArrayProp(paddingY)","_getArrayProp(paddingTop)","_getArrayProp(paddingRight)","_getArrayProp(paddingBottom)","_getArrayProp(paddingLeft)","_getArrayProp(gridRow)","_getArrayProp(gridRowStart)","_getArrayProp(gridRowEnd)","_getArrayProp(sizing)","<StyledBox\n data-as={typeof asProp === 'string' ? asProp : undefined}\n data-ui=\"Box\"\n {...restProps}\n $column={_getArrayProp(gridColumn)}\n $columnStart={_getArrayProp(gridColumnStart)}\n $columnEnd={_getArrayProp(gridColumnEnd)}\n $display={_getArrayProp(display)}\n $flex={_getArrayProp(flex)}\n $height={_getArrayProp(height)}\n $margin={_getArrayProp(margin)}\n $marginX={_getArrayProp(marginX)}\n $marginY={_getArrayProp(marginY)}\n $marginTop={_getArrayProp(marginTop)}\n $marginRight={_getArrayProp(marginRight)}\n $marginBottom={_getArrayProp(marginBottom)}\n $marginLeft={_getArrayProp(marginLeft)}\n $overflow={_getArrayProp(overflow)}\n $padding={_getArrayProp(padding)}\n $paddingX={_getArrayProp(paddingX)}\n $paddingY={_getArrayProp(paddingY)}\n $paddingTop={_getArrayProp(paddingTop)}\n $paddingRight={_getArrayProp(paddingRight)}\n $paddingBottom={_getArrayProp(paddingBottom)}\n $paddingLeft={_getArrayProp(paddingLeft)}\n $row={_getArrayProp(gridRow)}\n $rowStart={_getArrayProp(gridRowStart)}\n $rowEnd={_getArrayProp(gridRowEnd)}\n $sizing={_getArrayProp(sizing)}\n // styled-components 6.5 distributes PolymorphicCallProps over ElementType and\n // hits TS2589; narrow the call-site target while still passing the real value.\n // oxlint-disable-next-line no-unsafe-type-assertion\n as={asProp as 'div'}\n ref={ref}\n >\n {props.children}\n </StyledBox>","children","asProp as 'div'","typeof asProp === 'string' ? asProp : undefined","getTheme_v2(useStyledTheme() as Theme)","useStyledTheme() as Theme","useMemo(() => {\n if (!rootTheme) return null\n\n return {\n version: 0.0,\n theme: rootTheme,\n scheme,\n tone,\n }\n }, [rootTheme, scheme, tone])","{\n version: 0.0,\n theme: rootTheme,\n scheme,\n tone,\n }","useMemo(() => {\n if (!rootTheme) return null\n\n return getScopedTheme(rootTheme, scheme, tone)\n }, [scheme, rootTheme, tone])","getScopedTheme(rootTheme, scheme, tone)","<pre>ThemeProvider: no \"theme\" property provided</pre>","<StyledThemeProvider theme={theme}>{children}</StyledThemeProvider>","<ThemeContext.Provider value={themeContext}>\n <StyledThemeProvider theme={theme}>{children}</StyledThemeProvider>\n </ThemeContext.Provider>","ThemeContext.Provider","<ThemeProvider scheme={scheme || root.scheme} theme={root.theme} tone={tone}>\n {children}\n </ThemeProvider>","theme","scheme || root.scheme","checkered = false","focusRing = false","radius = 0","toneProp = 'default'","_getArrayProp(border)","_getArrayProp(borderTop)","_getArrayProp(borderRight)","_getArrayProp(borderBottom)","_getArrayProp(borderLeft)","_getArrayProp(radius)","_getArrayProp(shadow)","<StyledCard\n data-as={typeof as === 'string' ? as : undefined}\n data-scheme={rootTheme.scheme}\n data-ui=\"Card\"\n data-tone={tone}\n {...restProps}\n $border={_getArrayProp(border)}\n $borderTop={_getArrayProp(borderTop)}\n $borderRight={_getArrayProp(borderRight)}\n $borderBottom={_getArrayProp(borderBottom)}\n $borderLeft={_getArrayProp(borderLeft)}\n $checkered={checkered}\n $focusRing={focusRing}\n $muted={muted ?? false}\n $radius={_getArrayProp(radius)}\n $shadow={_getArrayProp(shadow)}\n $tone={tone}\n data-checkered={checkered ? '' : undefined}\n data-pressed={pressed ? '' : undefined}\n data-selected={selected ? '' : undefined}\n forwardedAs={as}\n ref={ref}\n selected={selected}\n />","scheme","muted ?? false","checkered ? '' : undefined","pressed ? '' : undefined","selected ? '' : undefined","typeof as === 'string' ? as : undefined","rootTheme.scheme","<ThemeColorProvider scheme={scheme} tone={tone}>\n <StyledCard\n data-as={typeof as === 'string' ? as : undefined}\n data-scheme={rootTheme.scheme}\n data-ui=\"Card\"\n data-tone={tone}\n {...restProps}\n $border={_getArrayProp(border)}\n $borderTop={_getArrayProp(borderTop)}\n $borderRight={_getArrayProp(borderRight)}\n $borderBottom={_getArrayProp(borderBottom)}\n $borderLeft={_getArrayProp(borderLeft)}\n $checkered={checkered}\n $focusRing={focusRing}\n $muted={muted ?? false}\n $radius={_getArrayProp(radius)}\n $shadow={_getArrayProp(shadow)}\n $tone={tone}\n data-checkered={checkered ? '' : undefined}\n data-pressed={pressed ? '' : undefined}\n data-selected={selected ? '' : undefined}\n forwardedAs={as}\n ref={ref}\n selected={selected}\n />\n </ThemeColorProvider>","_createMediaStore(media)","useMemo(() => _createMediaStore(media), [media])","(onStoreChange) => {\n const media = window.matchMedia(mediaQueryString)\n media.addEventListener('change', onStoreChange)\n return () => media.removeEventListener('change', onStoreChange)\n }","() => window.matchMedia(mediaQueryString).matches","useCallback(\n (onStoreChange) => {\n const media = window.matchMedia(mediaQueryString)\n media.addEventListener('change', onStoreChange)\n return () => media.removeEventListener('change', onStoreChange)\n },\n [mediaQueryString],\n )","() => false","getServerSnapshot = () => false","zOffsetProp = 0","parentContextValue && getLayerContext(parentContextValue)","_getArrayProp(zOffsetProp)","{}","(childLevel?: number) => {\n // Register child layers to the parent layer\n const parentDispose = parentRegisterChild?.(childLevel)\n\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const prevLen = state[childLevel] ?? 0\n const nextState = {...state, [childLevel]: prevLen + 1}\n\n setSize(Object.keys(nextState).length)\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, increment the size by 1\n setSize((v) => v + 1)\n }\n\n return () => {\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const nextState = {...state}\n\n if (nextState[childLevel] === 1) {\n delete nextState[childLevel]\n\n setSize(Object.keys(nextState).length)\n } else {\n nextState[childLevel] -= 1\n }\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, decrement the size by 1\n setSize((v) => v - 1)\n }\n\n parentDispose?.()\n }\n }","(v) => v + 1","nextState","state","(v) => v - 1","useCallback(\n (childLevel?: number) => {\n // Register child layers to the parent layer\n const parentDispose = parentRegisterChild?.(childLevel)\n\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const prevLen = state[childLevel] ?? 0\n const nextState = {...state, [childLevel]: prevLen + 1}\n\n setSize(Object.keys(nextState).length)\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, increment the size by 1\n setSize((v) => v + 1)\n }\n\n return () => {\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const nextState = {...state}\n\n if (nextState[childLevel] === 1) {\n delete nextState[childLevel]\n\n setSize(Object.keys(nextState).length)\n } else {\n nextState[childLevel] -= 1\n }\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, decrement the size by 1\n setSize((v) => v - 1)\n }\n\n parentDispose?.()\n }\n },\n [parentRegisterChild, setSize, setChildLayers],\n )","() => parentRegisterChild?.(level)","[level, parentRegisterChild]","{\n version: 0.0,\n isTopLayer,\n level,\n registerChild,\n size,\n zIndex,\n }","useMemo(\n () => ({\n version: 0.0,\n isTopLayer,\n level,\n registerChild,\n size,\n zIndex,\n }),\n [isTopLayer, level, registerChild, size, zIndex],\n )","<LayerContext.Provider value={value}>{children}</LayerContext.Provider>","LayerContext.Provider","v","getLayerContext(value)","err"],"sources":["../src/core/styles/box/boxStyle.ts","../src/core/styles/flex/flexItemStyle.ts","../src/core/styles/grid/gridItemStyle.ts","../src/core/styles/margin/marginStyle.ts","../src/core/styles/padding/paddingStyle.ts","../src/core/primitives/box/box.tsx","../src/core/styles/radius/radiusStyle.ts","../src/core/theme/useTheme.ts","../src/core/styles/card/_cardColorStyle.ts","../src/core/styles/focusRing/index.ts","../src/core/styles/border/borderStyle.ts","../src/core/styles/shadow/shadowStyle.ts","../src/core/lib/globalScope.ts","../src/core/lib/createGlobalScopedContext.ts","../src/core/theme/themeContext.ts","../src/core/theme/themeProvider.tsx","../src/core/theme/useRootTheme.ts","../src/core/theme/themeColorProvider.tsx","../src/core/primitives/card/styles.ts","../src/core/primitives/card/card.tsx","../src/core/hooks/useMediaIndex/useMediaIndex.ts","../src/core/hooks/useMatchMedia.ts","../src/core/hooks/usePrefersReducedMotion.ts","../src/core/lib/isRecord.ts","../src/core/utils/layer/getLayerContext.ts","../src/core/utils/layer/layerContext.ts","../src/core/utils/layer/layerProvider.tsx","../src/core/utils/layer/useLayer.ts"],"sourcesContent":["import {Property} from 'csstype'\n\nimport {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveBoxStyleProps} from './types'\n\nconst BASE_STYLE: CSSObject = {\n '&[data-as=\"ul\"],&[data-as=\"ol\"]': {\n listStyle: 'none',\n },\n}\n\nconst BOX_SIZING: {[key: string]: Property.BoxSizing} = {\n content: 'content-box',\n border: 'border-box',\n}\n\nconst BOX_HEIGHT = {\n stretch: 'stretch',\n fill: '100%',\n}\n\nexport function boxStyle(): CSSObject {\n return BASE_STYLE\n}\n\nexport function responsiveBoxStyle(): Array<\n (props: ResponsiveBoxStyleProps & ThemeProps) => CSSObject[]\n> {\n return [\n responsiveBoxSizingStyle,\n responsiveBoxHeightStyle,\n responsiveBoxOverflowStyle,\n responsiveBoxDisplayStyle,\n ]\n}\n\nfunction responsiveBoxDisplayStyle(props: ResponsiveBoxStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$display, (display) => ({\n '&:not([hidden])': {display},\n }))\n}\n\nfunction responsiveBoxSizingStyle(props: ResponsiveBoxStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$sizing, (sizing) => ({\n boxSizing: BOX_SIZING[sizing],\n }))\n}\n\nfunction responsiveBoxHeightStyle(props: ResponsiveBoxStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$height, (height) => ({\n height: BOX_HEIGHT[height],\n }))\n}\n\nfunction responsiveBoxOverflowStyle(props: ResponsiveBoxStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$overflow, (overflow) => ({\n overflow,\n }))\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {EMPTY_ARRAY} from '../../constants'\nimport {_responsive} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveFlexItemStyleProps} from './types'\n\nconst BASE_STYLE: CSSObject = {\n minWidth: 0,\n minHeight: 0,\n}\n\nexport function flexItemStyle(): Array<\n CSSObject | ((props: ResponsiveFlexItemStyleProps & ThemeProps) => CSSObject[])\n> {\n return [BASE_STYLE, responsiveFlexItemStyle]\n}\n\nfunction responsiveFlexItemStyle(props: ResponsiveFlexItemStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n if (!props.$flex) return EMPTY_ARRAY\n\n return _responsive(media, props.$flex, (flex) => ({flex: `${flex}`}))\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveGridItemStyleProps} from './types'\n\nexport function responsiveGridItemStyle(): Array<\n (props: ResponsiveGridItemStyleProps & ThemeProps) => CSSObject[]\n> {\n return [\n responsiveGridItemRowStyle,\n responsiveGridItemRowStartStyle,\n responsiveGridItemRowEndStyle,\n responsiveGridItemColumnStyle,\n responsiveGridItemColumnStartStyle,\n responsiveGridItemColumnEndStyle,\n ]\n}\n\nconst GRID_ITEM_ROW = {\n auto: 'auto',\n full: '1 / -1',\n}\n\nconst GRID_ITEM_COLUMN = {\n auto: 'auto',\n full: '1 / -1',\n}\n\nfunction responsiveGridItemRowStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$row, (row) => {\n if (typeof row === 'number') {\n return {gridRow: `span ${row} / span ${row}`}\n }\n\n return {gridRow: GRID_ITEM_ROW[row]}\n })\n}\n\nfunction responsiveGridItemRowStartStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$rowStart, (rowStart) => ({\n gridRowStart: `${rowStart}`,\n }))\n}\n\nfunction responsiveGridItemRowEndStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$rowEnd, (rowEnd) => ({gridRowEnd: `${rowEnd}`}))\n}\n\nfunction responsiveGridItemColumnStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$column, (column) => {\n if (typeof column === 'number') {\n return {gridColumn: `span ${column} / span ${column}`}\n }\n\n return {gridColumn: GRID_ITEM_COLUMN[column]}\n })\n}\n\nfunction responsiveGridItemColumnStartStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$columnStart, (columnStart) => ({\n gridColumnStart: `${columnStart}`,\n }))\n}\n\nfunction responsiveGridItemColumnEndStyle(props: ResponsiveGridItemStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$columnEnd, (columnEnd) => ({\n gridColumnEnd: `${columnEnd}`,\n }))\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {_getResponsiveSpace} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveMarginStyleProps} from './types'\n\nexport function responsiveMarginStyle(\n props: ResponsiveMarginStyleProps & ThemeProps,\n): CSSObject[][] {\n const {theme} = props\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return [\n _getResponsiveSpace(theme, ['margin'], props.$margin),\n _getResponsiveSpace(theme, ['marginLeft', 'marginRight'], props.$marginX),\n _getResponsiveSpace(theme, ['marginTop', 'marginBottom'], props.$marginY),\n _getResponsiveSpace(theme, ['marginTop'], props.$marginTop),\n _getResponsiveSpace(theme, ['marginRight'], props.$marginRight),\n _getResponsiveSpace(theme, ['marginBottom'], props.$marginBottom),\n _getResponsiveSpace(theme, ['marginLeft'], props.$marginLeft),\n ].filter(Boolean) as CSSObject[][]\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {_getResponsiveSpace} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsivePaddingStyleProps} from './types'\n\nexport function responsivePaddingStyle(\n props: ResponsivePaddingStyleProps & ThemeProps,\n): CSSObject[][] {\n const {theme} = props\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n return [\n _getResponsiveSpace(theme, ['padding'], props.$padding),\n _getResponsiveSpace(theme, ['paddingLeft', 'paddingRight'], props.$paddingX),\n _getResponsiveSpace(theme, ['paddingTop', 'paddingBottom'], props.$paddingY),\n _getResponsiveSpace(theme, ['paddingTop'], props.$paddingTop),\n _getResponsiveSpace(theme, ['paddingRight'], props.$paddingRight),\n _getResponsiveSpace(theme, ['paddingBottom'], props.$paddingBottom),\n _getResponsiveSpace(theme, ['paddingLeft'], props.$paddingLeft),\n ].filter(Boolean) as CSSObject[][]\n}\n","import {styled} from 'styled-components'\n\nimport {boxStyle, responsiveBoxStyle} from '../../styles/box/boxStyle'\nimport {ResponsiveBoxStyleProps} from '../../styles/box/types'\nimport {flexItemStyle} from '../../styles/flex/flexItemStyle'\nimport {FlexItemStyleProps} from '../../styles/flex/types'\nimport {responsiveGridItemStyle} from '../../styles/grid/gridItemStyle'\nimport {ResponsiveGridItemStyleProps} from '../../styles/grid/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {responsiveMarginStyle} from '../../styles/margin/marginStyle'\nimport {ResponsiveMarginStyleProps} from '../../styles/margin/types'\nimport {responsivePaddingStyle} from '../../styles/padding/paddingStyle'\nimport {ResponsivePaddingStyleProps} from '../../styles/padding/types'\nimport {ElementType, Props} from '../../types/component'\nimport {\n ResponsiveBoxProps,\n ResponsiveFlexItemProps,\n ResponsiveGridItemProps,\n ResponsiveMarginProps,\n ResponsivePaddingProps,\n} from '../types'\n\n/**\n * The props that `Box` adds on top of the element it renders as.\n *\n * @public\n */\nexport interface BoxOwnProps\n extends\n ResponsiveFlexItemProps,\n ResponsiveBoxProps,\n ResponsiveGridItemProps,\n ResponsiveMarginProps,\n ResponsivePaddingProps {\n forwardedAs?: ElementType\n}\n\n/**\n * @public\n */\nexport type BoxProps<E extends ElementType = 'div'> = Props<BoxOwnProps, E>\n\nconst StyledBox = styled.div<\n FlexItemStyleProps &\n ResponsiveBoxStyleProps &\n ResponsiveGridItemStyleProps &\n ResponsiveMarginStyleProps &\n ResponsivePaddingStyleProps\n>(\n boxStyle,\n flexItemStyle,\n responsiveBoxStyle,\n responsiveGridItemStyle,\n responsiveMarginStyle,\n responsivePaddingStyle,\n)\n\nconst BoxComponent = function Box(\n props: BoxOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height'>,\n) {\n const {\n as: asProp = 'div',\n ref,\n gridColumn,\n gridColumnStart,\n gridColumnEnd,\n display = 'block',\n flex,\n height,\n margin = 0,\n marginX,\n marginY,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n overflow,\n padding = 0,\n paddingX,\n paddingY,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n gridRow,\n gridRowStart,\n gridRowEnd,\n sizing,\n ...restProps\n } = props\n\n return (\n <StyledBox\n data-as={typeof asProp === 'string' ? asProp : undefined}\n data-ui=\"Box\"\n {...restProps}\n $column={_getArrayProp(gridColumn)}\n $columnStart={_getArrayProp(gridColumnStart)}\n $columnEnd={_getArrayProp(gridColumnEnd)}\n $display={_getArrayProp(display)}\n $flex={_getArrayProp(flex)}\n $height={_getArrayProp(height)}\n $margin={_getArrayProp(margin)}\n $marginX={_getArrayProp(marginX)}\n $marginY={_getArrayProp(marginY)}\n $marginTop={_getArrayProp(marginTop)}\n $marginRight={_getArrayProp(marginRight)}\n $marginBottom={_getArrayProp(marginBottom)}\n $marginLeft={_getArrayProp(marginLeft)}\n $overflow={_getArrayProp(overflow)}\n $padding={_getArrayProp(padding)}\n $paddingX={_getArrayProp(paddingX)}\n $paddingY={_getArrayProp(paddingY)}\n $paddingTop={_getArrayProp(paddingTop)}\n $paddingRight={_getArrayProp(paddingRight)}\n $paddingBottom={_getArrayProp(paddingBottom)}\n $paddingLeft={_getArrayProp(paddingLeft)}\n $row={_getArrayProp(gridRow)}\n $rowStart={_getArrayProp(gridRowStart)}\n $rowEnd={_getArrayProp(gridRowEnd)}\n $sizing={_getArrayProp(sizing)}\n // styled-components 6.5 distributes PolymorphicCallProps over ElementType and\n // hits TS2589; narrow the call-site target while still passing the real value.\n // oxlint-disable-next-line no-unsafe-type-assertion\n as={asProp as 'div'}\n ref={ref}\n >\n {props.children}\n </StyledBox>\n )\n}\n\n/**\n * The `Box` component is a basic layout wrapper component which provides utility properties\n * for flex, margins and padding.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Box = BoxComponent as unknown as <E extends ElementType = 'div'>(\n props: BoxProps<E>,\n) => React.JSX.Element\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveRadiusStyleProps} from './types'\n\nexport function responsiveRadiusStyle(props: ResponsiveRadiusStyleProps & ThemeProps): CSSObject[] {\n const {media, radius} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$radius, (value) => {\n let borderRadius: string | 0 = 0\n\n if (typeof value === 'number') {\n borderRadius = rem(radius[value])\n }\n\n if (value === 'full') {\n borderRadius = '9999px'\n }\n\n return {borderRadius}\n })\n}\n","import {useTheme as useStyledTheme} from 'styled-components'\n\nimport {Theme, Theme_v2} from '../../theme/system/theme'\nimport {getTheme_v2} from '../../theme/versioning/getTheme_v2'\n\n/**\n * @public\n */\nexport function useTheme(): Theme {\n // oxlint-disable-next-line no-unnecessary-type-assertion\n return useStyledTheme() as Theme\n}\n\n/**\n * @public\n */\nexport function useTheme_v2(): Theme_v2 {\n // oxlint-disable-next-line no-unnecessary-type-assertion\n return getTheme_v2(useStyledTheme() as Theme)\n}\n","import {ThemeColorCard_v2} from '../../../theme/system/color/color'\nimport {ThemeColorState_v2} from '../../../theme/system/color/state'\nimport {CSSObject} from '../../../theme/system/css'\n\n/**\n * @internal\n */\nexport function _cardColorStyle(\n base: ThemeColorCard_v2,\n color: ThemeColorState_v2,\n checkered = false,\n): CSSObject {\n return {\n // from base\n\n '--card-backdrop-color': base.backdrop,\n\n '--card-focus-ring-color': base.focusRing,\n\n '--card-shadow-outline-color': base.shadow.outline,\n '--card-shadow-umbra-color': base.shadow.umbra,\n '--card-shadow-penumbra-color': base.shadow.penumbra,\n '--card-shadow-ambient-color': base.shadow.ambient,\n\n // from state\n\n '--card-accent-fg-color': color.accent.fg,\n\n '--card-avatar-gray-bg-color': color.avatar.gray.bg,\n '--card-avatar-gray-fg-color': color.avatar.gray.fg,\n '--card-avatar-blue-bg-color': color.avatar.blue.bg,\n '--card-avatar-blue-fg-color': color.avatar.blue.fg,\n '--card-avatar-purple-bg-color': color.avatar.purple.bg,\n '--card-avatar-purple-fg-color': color.avatar.purple.fg,\n '--card-avatar-magenta-bg-color': color.avatar.magenta.bg,\n '--card-avatar-magenta-fg-color': color.avatar.magenta.fg,\n '--card-avatar-red-bg-color': color.avatar.red.bg,\n '--card-avatar-red-fg-color': color.avatar.red.fg,\n '--card-avatar-orange-bg-color': color.avatar.orange.bg,\n '--card-avatar-orange-fg-color': color.avatar.orange.fg,\n '--card-avatar-yellow-bg-color': color.avatar.yellow.bg,\n '--card-avatar-yellow-fg-color': color.avatar.yellow.fg,\n '--card-avatar-green-bg-color': color.avatar.green.bg,\n '--card-avatar-green-fg-color': color.avatar.green.fg,\n '--card-avatar-cyan-bg-color': color.avatar.cyan.bg,\n '--card-avatar-cyan-fg-color': color.avatar.cyan.fg,\n\n '--card-bg-color': color.bg,\n '--card-bg-image': checkered\n ? `repeating-conic-gradient(${color.bg} 0% 25%, ${color.muted.bg} 0% 50%)`\n : undefined,\n\n '--card-border-color': color.border,\n\n '--card-badge-default-bg-color': color.badge.default.bg,\n '--card-badge-default-dot-color': color.badge.default.dot,\n '--card-badge-default-fg-color': color.badge.default.fg,\n '--card-badge-default-icon-color': color.badge.default.icon,\n '--card-badge-neutral-bg-color': color.badge.neutral?.bg,\n '--card-badge-neutral-dot-color': color.badge.neutral?.dot,\n '--card-badge-neutral-fg-color': color.badge.neutral?.fg,\n '--card-badge-neutral-icon-color': color.badge.neutral?.icon,\n '--card-badge-primary-bg-color': color.badge.primary.bg,\n '--card-badge-primary-dot-color': color.badge.primary.dot,\n '--card-badge-primary-fg-color': color.badge.primary.fg,\n '--card-badge-primary-icon-color': color.badge.primary.icon,\n '--card-badge-suggest-bg-color': color.badge.suggest?.bg,\n '--card-badge-suggest-dot-color': color.badge.suggest?.dot,\n '--card-badge-suggest-fg-color': color.badge.suggest?.fg,\n '--card-badge-suggest-icon-color': color.badge.suggest?.icon,\n '--card-badge-positive-bg-color': color.badge.positive.bg,\n '--card-badge-positive-dot-color': color.badge.positive.dot,\n '--card-badge-positive-fg-color': color.badge.positive.fg,\n '--card-badge-positive-icon-color': color.badge.positive.icon,\n '--card-badge-caution-bg-color': color.badge.caution.bg,\n '--card-badge-caution-dot-color': color.badge.caution.dot,\n '--card-badge-caution-fg-color': color.badge.caution.fg,\n '--card-badge-caution-icon-color': color.badge.caution.icon,\n '--card-badge-critical-bg-color': color.badge.critical.bg,\n '--card-badge-critical-dot-color': color.badge.critical.dot,\n '--card-badge-critical-fg-color': color.badge.critical.fg,\n '--card-badge-critical-icon-color': color.badge.critical.icon,\n\n '--card-code-bg-color': color.code.bg,\n '--card-code-fg-color': color.code.fg,\n\n '--card-fg-color': color.fg,\n\n '--card-icon-color': color.icon,\n\n '--card-kbd-bg-color': color.kbd.bg,\n '--card-kbd-border-color': color.kbd.border,\n '--card-kbd-fg-color': color.kbd.fg,\n\n '--card-link-fg-color': color.link.fg,\n\n '--card-muted-bg-color': color.muted.bg,\n '--card-muted-fg-color': color.muted.fg,\n\n '--card-skeleton-color-from': color.skeleton.from,\n '--card-skeleton-color-to': color.skeleton.to,\n\n // deprecated variables (kept for legacy)\n\n '--card-bg2-color': color.muted.bg,\n '--card-link-color': color.link.fg,\n '--card-hairline-soft-color': color.border,\n '--card-hairline-hard-color': color.border,\n }\n}\n","import {ThemeFocusRing} from '../../../theme/system/focusRing'\n\nexport function focusRingBorderStyle(border: {color: string; width: number}): string {\n return `inset 0 0 0 ${border.width}px ${border.color}`\n}\n\nexport function focusRingStyle(opts: {\n base?: {bg: string}\n border?: {color: string; width: number}\n focusRing: ThemeFocusRing\n}): string {\n const {base, border, focusRing} = opts\n const focusRingOutsetWidth = focusRing.offset + focusRing.width\n const focusRingInsetWidth = 0 - focusRing.offset\n const bgColor = base ? base.bg : 'var(--card-bg-color)'\n\n return [\n focusRingInsetWidth > 0 && `inset 0 0 0 ${focusRingInsetWidth}px var(--card-focus-ring-color)`,\n border && focusRingBorderStyle(border),\n focusRingInsetWidth < 0 && `0 0 0 ${0 - focusRingInsetWidth}px ${bgColor}`,\n focusRingOutsetWidth > 0 && `0 0 0 ${focusRingOutsetWidth}px var(--card-focus-ring-color)`,\n ]\n .filter(Boolean)\n .join(',')\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveBorderStyleProps} from './types'\n\nexport function responsiveBorderStyle(): Array<\n (props: ResponsiveBorderStyleProps & ThemeProps) => CSSObject[]\n> {\n return [border, borderTop, borderRight, borderBottom, borderLeft]\n}\n\nfunction border(props: ResponsiveBorderStyleProps & ThemeProps) {\n const {card, media} = getTheme_v2(props.theme)\n const borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`\n\n return _responsive(media, props.$border, (value) =>\n value ? {'&&': {border: borderStyle}} : {'&&': {border: 0}},\n )\n}\n\nfunction borderTop(props: ResponsiveBorderStyleProps & ThemeProps) {\n const {card, media} = getTheme_v2(props.theme)\n const borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`\n\n return _responsive(media, props.$borderTop, (value) =>\n value ? {'&&': {borderTop: borderStyle}} : {'&&': {borderTop: 0}},\n )\n}\n\nfunction borderRight(props: ResponsiveBorderStyleProps & ThemeProps) {\n const {card, media} = getTheme_v2(props.theme)\n const borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`\n\n return _responsive(media, props.$borderRight, (value) =>\n value ? {'&&': {borderRight: borderStyle}} : {'&&': {borderRight: 0}},\n )\n}\n\nfunction borderBottom(props: ResponsiveBorderStyleProps & ThemeProps) {\n const {card, media} = getTheme_v2(props.theme)\n const borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`\n\n return _responsive(media, props.$borderBottom, (value) =>\n value ? {'&&': {borderBottom: borderStyle}} : {'&&': {borderBottom: 0}},\n )\n}\n\nfunction borderLeft(props: ResponsiveBorderStyleProps & ThemeProps) {\n const {card, media} = getTheme_v2(props.theme)\n const borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`\n\n return _responsive(media, props.$borderLeft, (value) =>\n value ? {'&&': {borderLeft: borderStyle}} : {'&&': {borderLeft: 0}},\n )\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {ThemeBoxShadow, ThemeShadow} from '../../../theme/system/shadow'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {EMPTY_RECORD} from '../../constants'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveShadowStyleProps} from './types'\n\nfunction toBoxShadow(shadow: ThemeBoxShadow, color: string) {\n return `${shadow.map(rem).join(' ')} ${color}`\n}\n\nfunction shadowStyle(shadow: ThemeShadow | null, outlineWidth: number = 1): CSSObject {\n if (!shadow) return EMPTY_RECORD\n\n const outline = `0 0 0 ${rem(outlineWidth)} var(--card-shadow-outline-color)`\n const umbra = toBoxShadow(shadow.umbra, 'var(--card-shadow-umbra-color)')\n const penumbra = toBoxShadow(shadow.penumbra, 'var(--card-shadow-penumbra-color)')\n const ambient = toBoxShadow(shadow.ambient, 'var(--card-shadow-ambient-color)')\n\n return {boxShadow: `${outline}, ${umbra}, ${penumbra}, ${ambient}`}\n}\n\nexport function responsiveShadowStyle(props: ResponsiveShadowStyleProps & ThemeProps): CSSObject[] {\n const {card, media, shadow} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$shadow, (index) =>\n shadowStyle(shadow[index], card.shadow.outline),\n )\n}\n","/**\n * Gets the global scope instance in a given environment.\n *\n * The strategy is to return the most modern, and if not, the most common:\n * - The `globalThis` variable is the modern approach to accessing the global scope\n * - The `window` variable is the global scope in a web browser\n * - The `self` variable is the global scope in workers and others\n * - The `global` variable is the global scope in Node.js\n */\nfunction getGlobalScope() {\n if (typeof globalThis !== 'undefined') return globalThis\n if (typeof window !== 'undefined') return window\n if (typeof self !== 'undefined') return self\n if (typeof global !== 'undefined') return global\n\n throw new Error('@sanity/ui: could not locate global scope')\n}\n\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const globalScope = getGlobalScope() as any\n","/**\n * As `@sanity/ui` is declared as a dependency, and may be duplicated, sometimes across major versions\n * it's critical that vital react contexts are shared even when there is a duplicate.\n * If we used a model similar to `sanity` itself, or `styled-components`, this would be unnecessary as\n * those libraries enforce single instances.\n * Since we don't enforce it we have to support a sanity plugin being able to call hooks like `useToast`, and then\n * read the context setup by `sanity`, which calls `ToastProvider`, even if the provider and hook are different instances in memory.\n * It's also why it's vital that all changes to globally scoped providers remain fully backwards compatible to v1.\n */\n\nimport {type Context, createContext} from 'react'\n\nimport {globalScope} from './globalScope'\n\n// oxlint-disable-next-line no-unnecessary-type-parameters\nexport function createGlobalScopedContext<ContextType, const T extends ContextType = ContextType>(\n /**\n * Enforce that all Symbol.for keys used for globally scoped contexts have a predictable prefix\n */\n key: `@sanity/ui/context/${string}`,\n defaultValue: T,\n): Context<ContextType> {\n const symbol = Symbol.for(key)\n\n /**\n * Prevent errors about re-renders on React SSR on Next.js App Router\n */\n if (typeof document === 'undefined') {\n const context = createContext<ContextType>(defaultValue)\n context.displayName = key\n return context\n }\n\n globalScope[symbol] = globalScope[symbol] || createContext<T>(defaultValue)\n\n return globalScope[symbol]\n}\n","import {createGlobalScopedContext} from '../lib/createGlobalScopedContext'\nimport {ThemeContextValue} from './types'\n\n/**\n * @internal\n */\nexport const ThemeContext = createGlobalScopedContext<ThemeContextValue | null>(\n '@sanity/ui/context/theme',\n null,\n)\n","import {useContext, useMemo} from 'react'\nimport {ThemeProvider as StyledThemeProvider} from 'styled-components'\n\nimport {getScopedTheme} from '../../theme/getScopedTheme'\nimport {\n type ThemeColorCardToneKey,\n type ThemeColorSchemeKey,\n} from '../../theme/system/color/_system'\nimport {type RootTheme, type Theme} from '../../theme/system/theme'\nimport {ThemeContext} from './themeContext'\nimport {ThemeContextValue} from './types'\n\n/**\n * @public\n */\nexport interface ThemeProviderProps {\n children?: React.ReactNode\n scheme?: ThemeColorSchemeKey\n theme?: RootTheme\n tone?: ThemeColorCardToneKey\n}\n\n/**\n * @public\n */\nexport function ThemeProvider(props: ThemeProviderProps): React.JSX.Element {\n const parentTheme = useContext(ThemeContext)\n const {children} = props\n const scheme = props.scheme ?? (parentTheme?.scheme || 'light')\n const rootTheme = props.theme ?? (parentTheme?.theme || null)\n const tone = props.tone ?? (parentTheme?.tone || 'default')\n\n const themeContext: ThemeContextValue | null = useMemo(() => {\n if (!rootTheme) return null\n\n return {\n version: 0.0,\n theme: rootTheme,\n scheme,\n tone,\n }\n }, [rootTheme, scheme, tone])\n\n const theme: Theme | null = useMemo(() => {\n if (!rootTheme) return null\n\n return getScopedTheme(rootTheme, scheme, tone)\n }, [scheme, rootTheme, tone])\n\n if (!theme) {\n return <pre>ThemeProvider: no \"theme\" property provided</pre>\n }\n\n return (\n <ThemeContext.Provider value={themeContext}>\n <StyledThemeProvider theme={theme}>{children}</StyledThemeProvider>\n </ThemeContext.Provider>\n )\n}\n","import {useContext} from 'react'\n\nimport {ThemeContext} from './themeContext'\nimport {ThemeContextValue} from './types'\n\n/**\n * @public\n */\nexport function useRootTheme(): ThemeContextValue {\n const value = useContext(ThemeContext)\n\n if (!value) {\n throw new Error('useRootTheme(): missing context value')\n }\n\n // oxlint-disable-next-line no-unnecessary-type-assertion, no-unsafe-type-assertion\n return value as unknown as ThemeContextValue\n}\n","import {ThemeColorCardToneKey, ThemeColorSchemeKey} from '../../theme/system/color/_system'\nimport {ThemeProvider} from './themeProvider'\nimport {useRootTheme} from './useRootTheme'\n\n/**\n * @public\n */\nexport interface ThemeColorProviderProps {\n children?: React.ReactNode\n scheme?: ThemeColorSchemeKey\n tone?: ThemeColorCardToneKey\n}\n\n/**\n * @public\n */\nexport function ThemeColorProvider(props: ThemeColorProviderProps): React.JSX.Element {\n const {children, scheme, tone} = props\n const root = useRootTheme()\n\n return (\n <ThemeProvider scheme={scheme || root.scheme} theme={root.theme} tone={tone}>\n {children}\n </ThemeProvider>\n )\n}\n","import {css} from 'styled-components'\n\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_cardColorStyle} from '../../styles/card/_cardColorStyle'\nimport {focusRingStyle} from '../../styles/focusRing'\nimport {ThemeProps} from '../../styles/types'\nimport {CardStyleProps} from './types'\n\nexport function cardStyle(\n props: CardStyleProps & ThemeProps,\n): Array<ReturnType<typeof css> | (() => ReturnType<typeof css>)> {\n return [cardBaseStyle(props), cardColorStyle(props)]\n}\n\nfunction cardBaseStyle(props: CardStyleProps & ThemeProps): ReturnType<typeof css> {\n const {$checkered} = props\n const {space} = getTheme_v2(props.theme)\n\n return css`\n ${\n $checkered &&\n css`\n background-size: ${space[3]}px ${space[3]}px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n `\n }\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n outline: none;\n text-decoration: none;\n }\n\n /* &:is(pre) */\n &[data-as='pre'] {\n font: inherit;\n }\n `\n}\n\nfunction cardColorStyle(props: CardStyleProps & ThemeProps): ReturnType<typeof css> {\n const {$checkered, $focusRing, $muted} = props\n const {card, color, style} = getTheme_v2(props.theme)\n const border = {width: card.border.width, color: 'var(--card-border-color)'}\n\n return css`\n color-scheme: ${color._dark ? 'dark' : 'light'};\n\n ${_cardColorStyle(color, color, $checkered)}\n\n background-color: ${$muted ? 'var(--card-muted-bg-color)' : 'var(--card-bg-color)'};\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}\n }\n\n &[data-selected] {\n ${_cardColorStyle(color, color.selectable.default.selected, $checkered)}\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}\n }\n\n &:active {\n ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ${\n $focusRing\n ? focusRingStyle({base: color, border, focusRing: card.focusRing})\n : undefined\n };\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n cursor: pointer;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &[data-disabled] {\n ${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}\n }\n\n &[data-selected] {\n ${_cardColorStyle(color, color.selectable.default.selected, $checkered)}\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}\n }\n\n &:active {\n ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ${\n $focusRing\n ? focusRingStyle({base: color, border, focusRing: card.focusRing})\n : undefined\n };\n }\n }\n }\n\n ${style?.card?.root}\n `\n}\n","import {isValidElementType} from 'react-is'\nimport {styled} from 'styled-components'\n\nimport {ThemeColorSchemeKey} from '../../../theme/system/color/_system'\nimport {responsiveBorderStyle} from '../../styles/border/borderStyle'\nimport {ResponsiveBorderStyleProps} from '../../styles/border/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {responsiveShadowStyle} from '../../styles/shadow/shadowStyle'\nimport {ResponsiveShadowStyleProps} from '../../styles/shadow/types'\nimport {ThemeColorProvider} from '../../theme/themeColorProvider'\nimport {useRootTheme} from '../../theme/useRootTheme'\nimport {CardTone} from '../../types/card'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {ResponsiveBorderProps, ResponsiveRadiusProps, ResponsiveShadowProps} from '../types'\nimport {cardStyle} from './styles'\nimport {CardStyleProps} from './types'\n\n/**\n * @public\n */\nexport interface CardOwnProps\n extends BoxOwnProps, ResponsiveBorderProps, ResponsiveRadiusProps, ResponsiveShadowProps {\n /**\n * Do not use in production.\n * @beta\n */\n __unstable_checkered?: boolean\n /**\n * Do not use in production.\n * @beta\n */\n __unstable_focusRing?: boolean\n disabled?: boolean\n muted?: boolean\n pressed?: boolean\n scheme?: ThemeColorSchemeKey\n selected?: boolean\n tone?: CardTone\n}\n\n/**\n * @public\n */\nexport type CardProps<E extends ElementType = 'div'> = Props<CardOwnProps, E>\n\nconst StyledCard = styled(Box)<\n CardStyleProps &\n ResponsiveRadiusStyleProps &\n ResponsiveBorderStyleProps &\n ResponsiveShadowStyleProps\n>(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle)\n\nfunction CardComponent(\n props: CardOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height'>,\n) {\n const {\n __unstable_checkered: checkered = false,\n __unstable_focusRing: focusRing = false,\n as: asProp,\n border,\n borderTop,\n borderRight,\n borderBottom,\n borderLeft,\n muted,\n pressed,\n radius = 0,\n ref,\n scheme,\n selected,\n shadow,\n tone: toneProp = 'default',\n ...restProps\n } = props\n\n const as = isValidElementType(asProp) ? asProp : 'div'\n const rootTheme = useRootTheme()\n const tone = toneProp === 'inherit' ? rootTheme.tone : toneProp\n\n // todo: Consider adding the wrapper approach for nested cards in which the tones are not changing, avoid unnecessary ThemeColorProvider\n return (\n <ThemeColorProvider scheme={scheme} tone={tone}>\n <StyledCard\n data-as={typeof as === 'string' ? as : undefined}\n data-scheme={rootTheme.scheme}\n data-ui=\"Card\"\n data-tone={tone}\n {...restProps}\n $border={_getArrayProp(border)}\n $borderTop={_getArrayProp(borderTop)}\n $borderRight={_getArrayProp(borderRight)}\n $borderBottom={_getArrayProp(borderBottom)}\n $borderLeft={_getArrayProp(borderLeft)}\n $checkered={checkered}\n $focusRing={focusRing}\n $muted={muted ?? false}\n $radius={_getArrayProp(radius)}\n $shadow={_getArrayProp(shadow)}\n $tone={tone}\n data-checkered={checkered ? '' : undefined}\n data-pressed={pressed ? '' : undefined}\n data-selected={selected ? '' : undefined}\n forwardedAs={as}\n ref={ref}\n selected={selected}\n />\n </ThemeColorProvider>\n )\n}\n\n/**\n * The `Card` component acts much like a `Box`, but with a background and foreground color.\n * Components within a `Card` inherit its colors.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Card = CardComponent as unknown as <E extends ElementType = 'div'>(\n props: CardProps<E>,\n) => React.JSX.Element\n","import {useMemo, useSyncExternalStore} from 'react'\n\nimport {useTheme_v2} from '../../theme/useTheme'\n\n/**\n * @internal\n */\nexport interface _MediaStore {\n subscribe: (onStoreChange: () => void) => () => void\n getSnapshot: () => number\n}\n\ntype MediaQueryMinWidth = `(min-width: ${number}px)`\ntype MediaQueryMaxWidth = `(max-width: ${number}px)`\ntype MediaQueryMinMaxWidth = `${MediaQueryMinWidth} and ${MediaQueryMaxWidth}`\ntype MediaQuery = `screen and ${MediaQueryMinWidth | MediaQueryMaxWidth | MediaQueryMinMaxWidth}`\n\nfunction _getMediaQuery(media: number[], index: number): MediaQuery {\n if (index === 0) {\n return `screen and (max-width: ${media[index] - 1}px)`\n }\n\n if (index === media.length) {\n return `screen and (min-width: ${media[index - 1]}px)`\n }\n\n return `screen and (min-width: ${media[index - 1]}px) and (max-width: ${media[index] - 1}px)`\n}\n\nfunction _createMediaStore(media: number[]): _MediaStore {\n const mediaLen = media.length\n let sizes: {mq: MediaQueryList; index: number}[]\n\n // The _createMediaStore function is called in both server and client environments.\n // However since subscribe and getSnapshot are only called on the client we lazy init what we need for them\n // so that we don't need to run checks for wether it's safe to call `window.matchMedia`\n const getSizes = () => {\n if (!sizes) {\n sizes = []\n\n for (let index = mediaLen; index > -1; index -= 1) {\n const mediaQuery = _getMediaQuery(media, index)\n\n sizes.push({index, mq: window.matchMedia(mediaQuery)})\n }\n }\n\n return sizes\n }\n\n const getSnapshot = () => {\n for (const {index, mq} of getSizes()) {\n if (mq.matches) return index\n }\n\n return 0\n }\n\n const subscribe = (onStoreChange: () => void) => {\n const disposeFns: (() => void)[] = []\n\n for (const {mq} of getSizes()) {\n const handleChange = () => {\n if (mq.matches) onStoreChange()\n }\n\n mq.addEventListener('change', handleChange)\n\n disposeFns.push(() => mq.removeEventListener('change', handleChange))\n }\n\n return () => {\n for (const disposeFn of disposeFns) {\n disposeFn()\n }\n }\n }\n\n return {getSnapshot, subscribe}\n}\n\n/**\n * Only called during server-side rendering, and hydration if using hydrateRoot\n * Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query\n * and we assume `(prefers-color-scheme: light)` since it's the most common scheme\n *\n * @link https://beta.reactjs.org/apis/react/useSyncExternalStore#adding-support-for-server-rendering\n */\nfunction getServerSnapshot() {\n return 0\n}\n\n/**\n * This API might change. DO NOT USE IN PRODUCTION.\n * @beta\n */\nexport function useMediaIndex(): number {\n const {media} = useTheme_v2()\n const store = useMemo(() => _createMediaStore(media), [media])\n\n return useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot)\n}\n","import {useCallback, useDebugValue, useSyncExternalStore} from 'react'\n\n/**\n * Efficiently subscribes to `window.matchMedia` queries\n *\n * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)\n *\n * @public\n */\nexport function useMatchMedia(\n mediaQueryString: `(${string})`,\n getServerSnapshot?: () => boolean,\n): boolean {\n useDebugValue(mediaQueryString)\n\n return useSyncExternalStore(\n useCallback(\n (onStoreChange) => {\n const media = window.matchMedia(mediaQueryString)\n media.addEventListener('change', onStoreChange)\n return () => media.removeEventListener('change', onStoreChange)\n },\n [mediaQueryString],\n ),\n () => window.matchMedia(mediaQueryString).matches,\n getServerSnapshot,\n )\n}\n","import {useMatchMedia} from './useMatchMedia'\n\n/**\n * Returns true if motion should be reduced\n *\n * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-reduced-motion: no-preference)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)\n *\n * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.\n * Chrome supports reading the `prefers-reduced-motion` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Reduced-Motion\n * @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b\n *\n * @public\n */\nexport function usePrefersReducedMotion(getServerSnapshot = () => false): boolean {\n return useMatchMedia('(prefers-reduced-motion: reduce)', getServerSnapshot)\n}\n","export function isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value && typeof value === 'object' && !Array.isArray(value))\n}\n","import {isRecord} from '../../lib/isRecord'\nimport {LayerContextValue} from './types'\n\nexport function getLayerContext(contextValue: LayerContextValue): LayerContextValue {\n // NOTE: This check is for future-compatiblity\n // - If the value is not an object, it’s not compatible with the current version\n // - If the value is an object, but doesn’t have `version: 0.0`, it’s not compatible with the current version\n if (!isRecord(contextValue) || contextValue.version !== 0.0) {\n throw new Error('the context value is not compatible')\n }\n\n if (!contextValue) {\n throw new Error('components using `useLayer()` should be wrapped in a <LayerProvider>.')\n }\n\n if (contextValue.version === 0.0) {\n return contextValue\n }\n\n throw new Error('could not get layer context')\n}\n","import {createGlobalScopedContext} from '../../lib/createGlobalScopedContext'\nimport {LayerContextValue} from './types'\n\nexport const LayerContext = createGlobalScopedContext<LayerContextValue | null>(\n '@sanity/ui/context/layer',\n null,\n)\n","import {useCallback, useContext, useEffect, useMemo, useState} from 'react'\n\nimport {useMediaIndex} from '../../hooks/useMediaIndex/useMediaIndex'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {getLayerContext} from './getLayerContext'\nimport {LayerContext} from './layerContext'\nimport {LayerContextValue} from './types'\n\n/**\n * @public\n */\nexport interface LayerProviderProps {\n children?: React.ReactNode\n zOffset?: number | number[]\n}\n\n/**\n * @public\n */\nexport function LayerProvider(props: LayerProviderProps): React.JSX.Element {\n const {children, zOffset: zOffsetProp = 0} = props\n\n // Get parent context values\n const parentContextValue = useContext(LayerContext)\n const parent = parentContextValue && getLayerContext(parentContextValue)\n const parentRegisterChild = parent?.registerChild\n const parentLevel = parent?.level ?? 0\n\n // Get level\n const level = parentLevel + 1\n\n // Get z-index offset\n const zOffset = _getArrayProp(zOffsetProp)\n\n // Get responsive z-index value\n const maxMediaIndex = zOffset.length - 1\n const mediaIndex = Math.min(useMediaIndex(), maxMediaIndex)\n const zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex]\n\n // A state value that is used to keep track of the number of child layers on each level\n const [, setChildLayers] = useState<Record<number, number>>({})\n\n // A state value that is used to keep track of the number of child levels\n const [size, setSize] = useState(0)\n\n const isTopLayer = size === 0\n\n const registerChild = useCallback(\n (childLevel?: number) => {\n // Register child layers to the parent layer\n const parentDispose = parentRegisterChild?.(childLevel)\n\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const prevLen = state[childLevel] ?? 0\n const nextState = {...state, [childLevel]: prevLen + 1}\n\n setSize(Object.keys(nextState).length)\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, increment the size by 1\n setSize((v) => v + 1)\n }\n\n return () => {\n if (childLevel !== undefined) {\n setChildLayers((state) => {\n const nextState = {...state}\n\n if (nextState[childLevel] === 1) {\n delete nextState[childLevel]\n\n setSize(Object.keys(nextState).length)\n } else {\n nextState[childLevel] -= 1\n }\n\n return nextState\n })\n } else {\n // Legacy behavior: if no child level is provided, decrement the size by 1\n setSize((v) => v - 1)\n }\n\n parentDispose?.()\n }\n },\n [parentRegisterChild, setSize, setChildLayers],\n )\n\n // Register this layer on mount\n useEffect(() => parentRegisterChild?.(level), [level, parentRegisterChild])\n\n const value: LayerContextValue = useMemo(\n () => ({\n version: 0.0,\n isTopLayer,\n level,\n registerChild,\n size,\n zIndex,\n }),\n [isTopLayer, level, registerChild, size, zIndex],\n )\n\n return <LayerContext.Provider value={value}>{children}</LayerContext.Provider>\n}\n","import {useContext} from 'react'\n\nimport {getLayerContext} from './getLayerContext'\nimport {LayerContext} from './layerContext'\nimport {LayerContextValue} from './types'\n\n/**\n * @public\n */\nexport function useLayer(): LayerContextValue {\n const value = useContext(LayerContext)\n\n if (!value) {\n throw new Error('useLayer(): missing context value')\n }\n\n try {\n return getLayerContext(value)\n } catch (err) {\n if (err instanceof Error) {\n // oxlint-disable-next-line preserve-caught-error\n throw new Error(`useLayer(): ${err.message}`)\n } else {\n // oxlint-disable-next-line preserve-caught-error, restrict-template-expressions\n throw new Error(`useLayer(): ${err}`)\n }\n }\n}\n"],"mappings":";;;;;;;;AAQA,MAAM,eAAwB,EAC5B,uCAAmC,EACjC,WAAW,OACb,EACF,GAEM,aAAkD;CACtD,SAAS;CACT,QAAQ;AACV,GAEM,aAAa;CACjB,SAAS;CACT,MAAM;AACR;AAEA,SAAgB,WAAsB;CACpC,OAAO;AACT;AAEA,SAAgB,qBAEd;CACA,OAAO;EACL;EACA;EACA;EACA;CACF;AACF;AAEA,SAAS,0BAA0B,OAA6C;CAC9E,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,WAAW,aAAa,EACtD,mBAAmB,EAAC,QAAO,EAC7B,EAAE;AACJ;AAEA,SAAS,yBAAyB,OAA6C;CAC7E,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,UAAU,YAAY,EACpD,WAAW,WAAW,QACxB,EAAE;AACJ;AAEA,SAAS,yBAAyB,OAA6C;CAC7E,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,UAAU,YAAY,EACpD,QAAQ,WAAW,QACrB,EAAE;AACJ;AAEA,SAAS,2BAA2B,OAA6C;CAC/E,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,YAAY,cAAc,EACxD,SACF,EAAE;AACJ;AC9DA,MAAM,aAAwB;CAC5B,UAAU;CACV,WAAW;AACb;AAEA,SAAgB,gBAEd;CACA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AI;;AApBb,SAAA,MAAC,GAAA;CAAM,OAAA,IAAI;;;;;ACtD3B,SAAgB,WAA8B;eACtC,QAAQ,WAAW,YAAY;CAErC,IAAI,CAAC,OACH,MAAU,MAAM,mCAAmC;CAGrD,IAAI;EACKC,IAAAA;EAAP,OAAuB,EAAA,OAAA,qBAAhB,KAAA,gBAAgB,KAAK,GAAL,EAAA,KAAA,mBAAhBA;CACT,SAASC,IAAK;EAAL,IAAA,MAAA;EAML,MALE,eAAe,QAEP,MAAM,eAAe,IAAI,SAAS,IAGlC,MAAM,eAAe,KAAK;CAExC;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.6",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"components",
|
|
6
6
|
"design-system",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@floating-ui/react-dom": "^2.1.9",
|
|
52
52
|
"csstype": "^3.2.3",
|
|
53
|
-
"motion": "^13.1.
|
|
53
|
+
"motion": "^13.1.1",
|
|
54
54
|
"react-is": "^19.2.8",
|
|
55
55
|
"react-refractor": "^4.0.0",
|
|
56
56
|
"use-effect-event": "^2.0.3",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"tsdown": "^0.22.14",
|
|
79
79
|
"typescript": "7.0.2",
|
|
80
80
|
"unrun": "^0.3.1",
|
|
81
|
-
"vite": "^8.2.
|
|
81
|
+
"vite": "^8.2.2",
|
|
82
82
|
"vitest": "^4.1.10",
|
|
83
83
|
"vitest-axe": "^1.0.0-pre.5"
|
|
84
84
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-JV5y3U_M.js","names":[],"sources":["../src/core/constants.ts","../src/core/styles/helpers.ts"],"sourcesContent":["import type {TargetAndTransition, Transition, Variant} 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 * Shared `framer-motion` variants used by `Popover` and `Tooltip` components.\n * @internal\n */\nexport const POPOVER_MOTION_PROPS: {\n card: {\n initial: Variant\n hidden: Variant\n visible: Variant\n scaleIn: Variant\n scaleOut: Variant\n }\n content: {\n hidden: TargetAndTransition\n visible: TargetAndTransition\n }\n transition: Transition\n} = {\n card: {\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 /**\n * Crossfade targets for the popover content wrapper. These are plain\n * animation targets (not variants): the content fade is driven directly by\n * the `open` prop rather than by variant/exit propagation from the card,\n * so that any open/close/open sequence converges to the correct opacity.\n * On enter, the content starts fading in halfway through the card fade\n * (which lasts `POPOVER_MOTION_DURATION / 2`); on exit, it fades out\n * together with the card.\n */\n content: {\n hidden: {\n opacity: 0,\n },\n visible: {\n opacity: 1,\n transition: {\n type: 'spring',\n visualDuration: POPOVER_MOTION_DURATION,\n bounce: 0.25,\n delay: POPOVER_MOTION_DURATION / 4,\n },\n },\n },\n transition: {\n type: 'spring',\n visualDuration: POPOVER_MOTION_DURATION,\n bounce: 0.25,\n },\n}\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,IAMnB,uBAaT;CACF,MAAM;EACJ,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;;;;;;;;;;CAUA,SAAS;EACP,QAAQ,EACN,SAAS,EACX;EACA,SAAS;GACP,SAAS;GACT,YAAY;IACV,MAAM;IACN,gBAAgB;IAChB,QAAQ;IACR,OAAO,0BAA0B;GACnC;EACF;CACF;CACA,YAAY;EACV,MAAM;EACN,gBAAgB;EAChB,QAAQ;CACV;AACF;;;;ACzEA,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popover-C2DFbwZu.js","names":["{\n left: x,\n originX,\n originY,\n position: strategy,\n top: y,\n width,\n zIndex,\n willChange: animate ? 'transform' : undefined,\n ...style,\n }","animate ? 'transform' : undefined","useMemo(\n () => ({\n left: x,\n originX,\n originY,\n position: strategy,\n top: y,\n width,\n zIndex,\n willChange: animate ? 'transform' : undefined,\n ...style,\n }),\n [animate, originX, originY, strategy, style, width, x, y, zIndex],\n )","{\n left: arrowX !== null ? arrowX : undefined,\n top: arrowY !== null ? arrowY : undefined,\n right: undefined,\n bottom: undefined,\n }","arrowX !== null ? arrowX : undefined","arrowY !== null ? arrowY : undefined","useMemo(\n () => ({\n left: arrowX !== null ? arrowX : undefined,\n top: arrowY !== null ? arrowY : undefined,\n right: undefined,\n bottom: undefined,\n }),\n [arrowX, arrowY],\n )","animate ? ['hidden', 'initial'] : undefined","animate ? ['visible', 'scaleIn'] : undefined","animate ? ['hidden', 'scaleOut'] : undefined","<Flex direction=\"column\" flex={1} padding={padding}>\n {children}\n </Flex>","<MotionFlex\n data-ui=\"Popover__wrapper\"\n direction=\"column\"\n flex={1}\n overflow={overflow}\n transition={POPOVER_MOTION_PROPS.transition}\n initial={animate ? POPOVER_MOTION_PROPS.content.hidden : undefined}\n // The content fade is deliberately driven by `open` as a plain\n // target instead of participating in the card's variant/exit\n // propagation. Re-entering while an exit is (or seems) in flight can\n // leave motion's presence bookkeeping in a state where a variant\n // child's fade-in is skipped (it waits for a parent-driven animation\n // that never comes), permanently stuck at opacity 0. A target derived\n // from `open` is recomputed on every render and always animates from\n // the current value, so any rapid open/close/open sequence converges.\n animate={\n animate\n ? open\n ? POPOVER_MOTION_PROPS.content.visible\n : POPOVER_MOTION_PROPS.content.hidden\n : undefined\n }\n >\n <Flex direction=\"column\" flex={1} padding={padding}>\n {children}\n </Flex>\n </MotionFlex>","animate ? POPOVER_MOTION_PROPS.content.hidden : undefined","animate\n ? open\n ? POPOVER_MOTION_PROPS.content.visible\n : POPOVER_MOTION_PROPS.content.hidden\n : undefined","arrow && (\n <Arrow\n ref={arrowRef}\n style={arrowStyle}\n width={DEFAULT_POPOVER_ARROW_WIDTH}\n height={DEFAULT_POPOVER_ARROW_HEIGHT}\n radius={DEFAULT_POPOVER_ARROW_RADIUS}\n />\n )","<MotionCard\n data-ui=\"Popover\"\n {...restProps}\n data-placement={placement}\n radius={radius}\n ref={ref}\n scheme={scheme}\n shadow={shadow}\n sizing=\"border\"\n style={rootStyle}\n tone={tone}\n variants={POPOVER_MOTION_PROPS.card}\n transition={POPOVER_MOTION_PROPS.transition}\n initial={animate ? ['hidden', 'initial'] : undefined}\n animate={animate ? ['visible', 'scaleIn'] : undefined}\n exit={animate ? ['hidden', 'scaleOut'] : undefined}\n >\n <MotionFlex\n data-ui=\"Popover__wrapper\"\n direction=\"column\"\n flex={1}\n overflow={overflow}\n transition={POPOVER_MOTION_PROPS.transition}\n initial={animate ? POPOVER_MOTION_PROPS.content.hidden : undefined}\n // The content fade is deliberately driven by `open` as a plain\n // target instead of participating in the card's variant/exit\n // propagation. Re-entering while an exit is (or seems) in flight can\n // leave motion's presence bookkeeping in a state where a variant\n // child's fade-in is skipped (it waits for a parent-driven animation\n // that never comes), permanently stuck at opacity 0. A target derived\n // from `open` is recomputed on every render and always animates from\n // the current value, so any rapid open/close/open sequence converges.\n animate={\n animate\n ? open\n ? POPOVER_MOTION_PROPS.content.visible\n : POPOVER_MOTION_PROPS.content.hidden\n : undefined\n }\n >\n <Flex direction=\"column\" flex={1} padding={padding}>\n {children}\n </Flex>\n </MotionFlex>\n\n {arrow && (\n <Arrow\n ref={arrowRef}\n style={arrowStyle}\n width={DEFAULT_POPOVER_ARROW_WIDTH}\n height={DEFAULT_POPOVER_ARROW_HEIGHT}\n radius={DEFAULT_POPOVER_ARROW_RADIUS}\n />\n )}\n </MotionCard>","<div style={{height: '100vh', inset: 0, position: 'fixed', width: '100vw', zIndex}} />","margins = DEFAULT_POPOVER_MARGINS","_animate = false","tone = 'inherit'","widthProp = 'auto'","arrowProp = false","constrainSize = false","overflow = 'hidden'","placementProp = 'bottom'","placementStrategy = 'flip'","preventOverflow = true","radiusProp = 3","shadowProp = 3","childProp","_fallbackPlacements","_floatingBoundary","paddingProp","forwardedRef","_referenceBoundary","_zOffsetProp","...restProps","_getArrayProp(paddingProp)","_getArrayProp(radiusProp)","_getArrayProp(shadowProp)","_getArrayProp(zOffsetProp)","() => ref.current","() => {\n widthRef.current = width\n }","[width]","calcMaxWidth({boundaryWidth, currentWidth: width})","() => {\n maxWidthRef.current = maxWidth\n }","[maxWidth]","() => {\n const floatingElement = ref.current\n\n if (!open || !floatingElement) return\n\n const referenceWidth = referenceWidthRef.current\n\n if (matchReferenceWidth) {\n if (referenceWidth !== undefined) {\n floatingElement.style.width = `${referenceWidth}px`\n }\n } else if (width !== undefined) {\n floatingElement.style.width = `${width}px`\n }\n\n if (typeof maxWidth === 'number') {\n floatingElement.style.maxWidth = `${maxWidth}px`\n }\n }","[width, matchReferenceWidth, maxWidth, open]","referenceWidth","{\n animate,\n arrowProp,\n arrowRef,\n constrainSize,\n fallbackPlacements,\n floatingBoundary,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n placementProp,\n placementStrategy,\n preventOverflow,\n referenceBoundary,\n referenceWidthRef,\n rootBoundary,\n setReferenceWidth,\n widthRef,\n }","referenceElement\n ? {\n reference: referenceElement,\n }\n : undefined","{\n middleware,\n placement: placementProp,\n whileElementsMounted: autoUpdate,\n elements: referenceElement\n ? {\n reference: referenceElement,\n }\n : undefined,\n }","(arrowEl: HTMLDivElement | null) => {\n arrowRef.current = arrowEl\n }","useCallback((arrowEl: HTMLDivElement | null) => {\n arrowRef.current = arrowEl\n }, [])","(node: HTMLDivElement | null) => {\n ref.current = node\n refs.setFloating(node)\n }","useCallback(\n (node: HTMLDivElement | null) => {\n ref.current = node\n refs.setFloating(node)\n },\n [refs],\n )","childProp ? getElementRef(childProp) : null","() => refs.reference.current","current","useMemo(() => {\n // If a reference element is defined, we don't need to clone the child\n if (referenceElement) return childProp\n\n if (!childProp) return null\n\n return cloneElement(childProp, {ref: refs.setReference})\n }, [childProp, referenceElement, refs.setReference])","cloneElement(childProp, {ref: refs.setReference})","setReference","() => update","[update]","childProp || <></>","modal && <ViewportOverlay />","<PopoverCard\n {...restProps}\n __unstable_margins={margins}\n animate={animate}\n arrow={arrowProp}\n arrowRef={setArrow}\n arrowX={arrowX}\n arrowY={arrowY}\n hidden={referenceHidden}\n open={open}\n overflow={overflow}\n padding={padding}\n placement={placement}\n radius={radius}\n ref={setFloating}\n scheme={scheme}\n shadow={shadow}\n originX={originX}\n originY={originY}\n strategy={strategy}\n tone={tone}\n width={matchReferenceWidth ? referenceWidth : width}\n x={x}\n y={y}\n >\n {content}\n </PopoverCard>","matchReferenceWidth ? referenceWidth : width","<LayerProvider zOffset={zOffset}>\n {/* Optional transparent blocking overlay at the top-most z-index layer. Must be positioned before the below popover card. */}\n {modal && <ViewportOverlay />}\n\n <PopoverCard\n {...restProps}\n __unstable_margins={margins}\n animate={animate}\n arrow={arrowProp}\n arrowRef={setArrow}\n arrowX={arrowX}\n arrowY={arrowY}\n hidden={referenceHidden}\n open={open}\n overflow={overflow}\n padding={padding}\n placement={placement}\n radius={radius}\n ref={setFloating}\n scheme={scheme}\n shadow={shadow}\n originX={originX}\n originY={originY}\n strategy={strategy}\n tone={tone}\n width={matchReferenceWidth ? referenceWidth : width}\n x={x}\n y={y}\n >\n {content}\n </PopoverCard>\n </LayerProvider>","portal ? (\n <Portal __unstable_name={typeof portal === 'string' ? portal : undefined}>{popover}</Portal>\n ) : (\n popover\n )","animate ? (\n <AnimateActivity layoutMode=\"default\" mode={open ? 'visible' : 'hidden'}>\n {popoverNode}\n </AnimateActivity>\n ) : (\n <Activity mode={open ? 'visible' : 'hidden'}>{popoverNode}</Activity>\n )","<>\n {/* the popover */}\n {animate ? (\n <AnimateActivity layoutMode=\"default\" mode={open ? 'visible' : 'hidden'}>\n {popoverNode}\n </AnimateActivity>\n ) : (\n <Activity mode={open ? 'visible' : 'hidden'}>{popoverNode}</Activity>\n )}\n\n {/* the referred element */}\n {child}\n </>","{\n animate,\n arrowProp,\n arrowRef,\n constrainSize,\n fallbackPlacements,\n floatingBoundary,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n placementProp,\n placementStrategy,\n preventOverflow,\n referenceBoundary,\n referenceWidthRef,\n rootBoundary,\n setReferenceWidth,\n widthRef,\n}: {\n animate: boolean\n arrowProp: boolean\n arrowRef: React.RefObject<HTMLDivElement | null>\n constrainSize: boolean\n fallbackPlacements: Placement[]\n floatingBoundary: HTMLElement | null\n margins: PopoverMargins\n matchReferenceWidth: boolean | undefined\n maxWidthRef: React.RefObject<number | undefined>\n placementProp: Placement\n placementStrategy: 'flip' | 'autoPlacement'\n preventOverflow: boolean\n referenceBoundary: HTMLElement | null\n referenceWidthRef: React.RefObject<number | undefined>\n rootBoundary: RootBoundary\n setReferenceWidth: (referenceWidth: number) => void\n widthRef: React.RefObject<number | undefined>\n}","autoPlacement({\n allowedPlacements: [placementProp].concat(fallbackPlacements),\n })","flip({\n boundary: floatingBoundary || undefined,\n fallbackPlacements,\n padding: DEFAULT_POPOVER_PADDING,\n rootBoundary,\n })","floatingBoundary || undefined","offset({mainAxis: DEFAULT_POPOVER_DISTANCE})","size({\n boundaryElement: floatingBoundary || undefined,\n constrainSize,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n padding: DEFAULT_POPOVER_PADDING,\n referenceWidthRef,\n setReferenceWidth,\n widthRef,\n })","shift({\n boundary: floatingBoundary || undefined,\n rootBoundary,\n padding: DEFAULT_POPOVER_PADDING,\n })","arrow({\n element: arrowRef,\n padding: DEFAULT_POPOVER_PADDING,\n })","hide({\n boundary: referenceBoundary || undefined,\n padding: DEFAULT_POPOVER_PADDING,\n strategy: 'referenceHidden',\n })","referenceBoundary || undefined","useMemo(() => {\n const ret: Middleware[] = []\n\n // Flip the floating element when leaving the boundary box\n if (constrainSize || preventOverflow) {\n if (placementStrategy === 'autoPlacement') {\n ret.push(\n autoPlacement({\n allowedPlacements: [placementProp].concat(fallbackPlacements),\n }),\n )\n } else {\n ret.push(\n flip({\n boundary: floatingBoundary || undefined,\n fallbackPlacements,\n padding: DEFAULT_POPOVER_PADDING,\n rootBoundary,\n }),\n )\n }\n }\n\n // Define distance between reference and floating element\n ret.push(offset({mainAxis: DEFAULT_POPOVER_DISTANCE}))\n\n // Track sizes\n if (constrainSize || matchReferenceWidth) {\n ret.push(\n size({\n boundaryElement: floatingBoundary || undefined,\n constrainSize,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n padding: DEFAULT_POPOVER_PADDING,\n referenceWidthRef,\n setReferenceWidth,\n widthRef,\n }),\n )\n }\n\n // Shift the popover so its sits within the boundary element\n if (preventOverflow) {\n ret.push(\n shift({\n boundary: floatingBoundary || undefined,\n rootBoundary,\n padding: DEFAULT_POPOVER_PADDING,\n }),\n )\n }\n\n // Place arrow\n if (arrowProp) {\n ret.push(\n arrow({\n element: arrowRef,\n padding: DEFAULT_POPOVER_PADDING,\n }),\n )\n }\n\n // Determine the origin to scale from.\n // Must be placed after `@sanity/ui/size` and `shift` middleware.\n if (animate) {\n ret.push(origin)\n }\n\n ret.push(\n hide({\n boundary: referenceBoundary || undefined,\n padding: DEFAULT_POPOVER_PADDING,\n strategy: 'referenceHidden',\n }),\n )\n\n return ret\n }, [\n animate,\n arrowProp,\n arrowRef,\n constrainSize,\n fallbackPlacements,\n floatingBoundary,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n placementProp,\n placementStrategy,\n preventOverflow,\n referenceBoundary,\n referenceWidthRef,\n rootBoundary,\n setReferenceWidth,\n widthRef,\n ])"],"sources":["../src/core/primitives/popover/constants.ts","../src/core/primitives/popover/floating-ui/size.ts","../src/core/primitives/popover/helpers.ts","../src/core/primitives/popover/popoverCard.tsx","../src/core/primitives/popover/popover.tsx"],"sourcesContent":["import {Placement} from '../../types/placement'\nimport {PopoverMargins} from '../../types/popover'\n\nexport const DEFAULT_POPOVER_DISTANCE = 4\nexport const DEFAULT_POPOVER_PADDING = 4\nexport const DEFAULT_POPOVER_ARROW_WIDTH = 19\nexport const DEFAULT_POPOVER_ARROW_HEIGHT = 8\nexport const DEFAULT_POPOVER_ARROW_RADIUS = 2\nexport const DEFAULT_POPOVER_MARGINS: PopoverMargins = [0, 0, 0, 0]\nexport const DEFAULT_FALLBACK_PLACEMENTS: Record<Placement, Placement[]> = {\n 'top': ['bottom', 'left', 'right'],\n 'top-start': ['bottom-start', 'left-start', 'right-start'],\n 'top-end': ['bottom-end', 'left-end', 'right-end'],\n 'bottom': ['top', 'left', 'right'],\n 'bottom-start': ['top-start', 'left-start', 'right-start'],\n 'bottom-end': ['top-end', 'left-end', 'right-end'],\n 'left': ['right', 'top', 'bottom'],\n 'left-start': ['right-start', 'top-start', 'bottom-start'],\n 'left-end': ['right-end', 'top-end', 'bottom-end'],\n 'right': ['left', 'top', 'bottom'],\n 'right-start': ['left-start', 'top-start', 'bottom-start'],\n 'right-end': ['left-end', 'top-end', 'bottom-end'],\n}\n","import {detectOverflow, Middleware} from '@floating-ui/react-dom'\n\nimport {PopoverMargins} from '../../../types/popover'\n\nexport function size(options: {\n boundaryElement?: HTMLElement | null\n constrainSize: boolean\n margins: PopoverMargins\n matchReferenceWidth?: boolean\n maxWidthRef: React.RefObject<number | undefined>\n padding?: number\n referenceWidthRef: React.RefObject<number | undefined>\n setReferenceWidth: (referenceWidth: number) => void\n widthRef: React.RefObject<number | undefined>\n}): Middleware {\n const {\n constrainSize,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n padding = 0,\n referenceWidthRef,\n setReferenceWidth,\n widthRef,\n } = options\n\n return {\n name: '@sanity/ui/size',\n async fn(args) {\n const {elements, placement, platform, rects} = args\n const {floating, reference} = rects\n\n const overflow = await detectOverflow(args, {\n altBoundary: true,\n boundary: options.boundaryElement || undefined,\n elementContext: 'floating',\n padding,\n rootBoundary: 'viewport',\n })\n\n let maxWidth = Infinity\n let maxHeight = Infinity\n\n const floatingW = floating.width\n const floatingH = floating.height\n\n if (placement.includes('top')) {\n maxWidth = floatingW - (overflow.left + overflow.right)\n maxHeight = floatingH - overflow.top\n }\n\n if (placement.includes('right')) {\n maxWidth = floatingW - overflow.right\n maxHeight = floatingH - (overflow.top + overflow.bottom)\n }\n\n if (placement.includes('bottom')) {\n maxWidth = floatingW - (overflow.left + overflow.right)\n maxHeight = floatingH - overflow.bottom\n }\n\n if (placement.includes('left')) {\n maxWidth = floatingW - overflow.left\n maxHeight = floatingH - (overflow.top + overflow.bottom)\n }\n\n // IMPORTANT – APPLY ELEMENT STYLES HERE\n // Elements need to be resized BEFORE the `platform.getDimensions` call below\n const availableWidth = maxWidth - margins[1] - margins[3]\n const availableHeight = maxHeight - margins[0] - margins[2]\n const referenceWidth = reference.width - margins[1] - margins[3]\n referenceWidthRef.current = referenceWidth\n setReferenceWidth(referenceWidth)\n\n if (matchReferenceWidth) {\n elements.floating.style.width = `${referenceWidth}px`\n } else if (widthRef.current !== undefined) {\n elements.floating.style.width = `${widthRef.current}px`\n }\n\n if (constrainSize) {\n elements.floating.style.maxWidth = `${Math.min(availableWidth, maxWidthRef.current ?? Infinity)}px`\n\n elements.floating.style.maxHeight = `${availableHeight}px`\n }\n\n const nextDimensions = await platform.getDimensions(elements.floating)\n\n const targetH = nextDimensions.height\n const targetW = nextDimensions.width\n\n if (floatingW !== targetW || floatingH !== targetH) {\n return {reset: {rects: true}}\n }\n\n return {}\n },\n }\n}\n","import {DEFAULT_POPOVER_PADDING} from './constants'\nimport {PopoverWidth} from './types'\n\nexport function calcCurrentWidth(params: {\n mediaIndex: number\n container: number[]\n width: PopoverWidth[]\n}): number | undefined {\n const {container, mediaIndex, width} = params\n\n const w = width[mediaIndex]\n const currentWidth: PopoverWidth | undefined = w === undefined ? width[width.length - 1] : w\n\n return typeof currentWidth === 'number' ? container[currentWidth] : undefined\n}\n\nexport function calcMaxWidth(params: {\n boundaryWidth: number | undefined\n currentWidth: number | undefined\n}): number | undefined {\n const {boundaryWidth, currentWidth} = params\n\n if (currentWidth === undefined && boundaryWidth === undefined) {\n return undefined\n }\n\n return Math.min(\n currentWidth ?? Infinity,\n (boundaryWidth || Infinity) - DEFAULT_POPOVER_PADDING * 2,\n )\n}\n","import {Strategy} from '@floating-ui/react-dom'\nimport {motion} from 'motion/react'\nimport React, {CSSProperties, useMemo} from 'react'\nimport {styled} from 'styled-components'\n\nimport {ThemeColorSchemeKey} from '../../../theme/system/color/_system'\nimport {POPOVER_MOTION_PROPS} from '../../constants'\nimport {BoxOverflow} from '../../types/box'\nimport {CardTone} from '../../types/card'\nimport {Placement} from '../../types/placement'\nimport {PopoverMargins} from '../../types/popover'\nimport {Radius} from '../../types/radius'\nimport {Arrow} from '../../utils/arrow/arrow'\nimport {useLayer} from '../../utils/layer/useLayer'\nimport {Card} from '../card/card'\nimport {Flex} from '../flex/flex'\nimport {\n DEFAULT_POPOVER_ARROW_HEIGHT,\n DEFAULT_POPOVER_ARROW_RADIUS,\n DEFAULT_POPOVER_ARROW_WIDTH,\n DEFAULT_POPOVER_MARGINS,\n} from './constants'\n\nconst MotionCard = styled(motion.create(Card))`\n &:not([hidden]) {\n display: flex;\n }\n flex-direction: column;\n width: max-content;\n min-width: min-content;\n will-change: transform;\n`\n\nconst MotionFlex = styled(motion.create(Flex))`\n will-change: opacity;\n`\n\n/**\n * @internal\n */\nexport function PopoverCard(\n props: {\n /** @beta*/\n __unstable_margins?: PopoverMargins\n animate?: boolean\n arrow: boolean\n arrowRef: React.Ref<HTMLDivElement>\n arrowX?: number\n arrowY?: number\n open?: boolean\n originX?: number\n originY?: number\n overflow?: BoxOverflow\n padding?: number | number[]\n placement: Placement\n radius?: Radius | Radius[]\n scheme?: ThemeColorSchemeKey\n shadow?: number | number[]\n strategy: Strategy\n tone: CardTone\n width: number | undefined\n x: number | null\n y: number | null\n } & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'width'>,\n) {\n const {\n __unstable_margins: marginsProp,\n animate,\n arrow,\n arrowRef,\n arrowX,\n arrowY,\n children,\n open,\n padding,\n placement,\n originX,\n originY,\n overflow,\n radius,\n ref,\n scheme,\n shadow,\n strategy,\n style,\n tone,\n width,\n x: xProp,\n y: yProp,\n ...restProps\n } = props\n\n const {zIndex} = useLayer()\n\n // Get margins: [top, right, bottom, left]\n const margins: PopoverMargins = useMemo(\n () => marginsProp || DEFAULT_POPOVER_MARGINS,\n [marginsProp],\n )\n\n // Translate according to margins\n const x = (xProp ?? 0) + margins[3]\n const y = (yProp ?? 0) + margins[0]\n\n const rootStyle: CSSProperties = useMemo(\n () => ({\n left: x,\n originX,\n originY,\n position: strategy,\n top: y,\n width,\n zIndex,\n willChange: animate ? 'transform' : undefined,\n ...style,\n }),\n [animate, originX, originY, strategy, style, width, x, y, zIndex],\n )\n\n const arrowStyle: CSSProperties = useMemo(\n () => ({\n left: arrowX !== null ? arrowX : undefined,\n top: arrowY !== null ? arrowY : undefined,\n right: undefined,\n bottom: undefined,\n }),\n [arrowX, arrowY],\n )\n\n return (\n <MotionCard\n data-ui=\"Popover\"\n {...restProps}\n data-placement={placement}\n radius={radius}\n ref={ref}\n scheme={scheme}\n shadow={shadow}\n sizing=\"border\"\n style={rootStyle}\n tone={tone}\n variants={POPOVER_MOTION_PROPS.card}\n transition={POPOVER_MOTION_PROPS.transition}\n initial={animate ? ['hidden', 'initial'] : undefined}\n animate={animate ? ['visible', 'scaleIn'] : undefined}\n exit={animate ? ['hidden', 'scaleOut'] : undefined}\n >\n <MotionFlex\n data-ui=\"Popover__wrapper\"\n direction=\"column\"\n flex={1}\n overflow={overflow}\n transition={POPOVER_MOTION_PROPS.transition}\n initial={animate ? POPOVER_MOTION_PROPS.content.hidden : undefined}\n // The content fade is deliberately driven by `open` as a plain\n // target instead of participating in the card's variant/exit\n // propagation. Re-entering while an exit is (or seems) in flight can\n // leave motion's presence bookkeeping in a state where a variant\n // child's fade-in is skipped (it waits for a parent-driven animation\n // that never comes), permanently stuck at opacity 0. A target derived\n // from `open` is recomputed on every render and always animates from\n // the current value, so any rapid open/close/open sequence converges.\n animate={\n animate\n ? open\n ? POPOVER_MOTION_PROPS.content.visible\n : POPOVER_MOTION_PROPS.content.hidden\n : undefined\n }\n >\n <Flex direction=\"column\" flex={1} padding={padding}>\n {children}\n </Flex>\n </MotionFlex>\n\n {arrow && (\n <Arrow\n ref={arrowRef}\n style={arrowStyle}\n width={DEFAULT_POPOVER_ARROW_WIDTH}\n height={DEFAULT_POPOVER_ARROW_HEIGHT}\n radius={DEFAULT_POPOVER_ARROW_RADIUS}\n />\n )}\n </MotionCard>\n )\n}\n","import {\n arrow,\n autoPlacement,\n autoUpdate,\n flip,\n hide,\n Middleware,\n offset,\n RootBoundary,\n shift,\n useFloating,\n} from '@floating-ui/react-dom'\nimport {\n Activity,\n cloneElement,\n type Ref,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react'\n\nimport {ThemeColorSchemeKey} from '../../../theme/system/color/_system'\nimport {useElementSize} from '../../hooks/useElementSize'\nimport {useMediaIndex} from '../../hooks/useMediaIndex/useMediaIndex'\nimport {usePrefersReducedMotion} from '../../hooks/usePrefersReducedMotion'\nimport {origin} from '../../middleware/origin'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {useTheme_v2} from '../../theme/useTheme'\nimport {BoxOverflow} from '../../types/box'\nimport {CardTone} from '../../types/card'\nimport {Placement} from '../../types/placement'\nimport {PopoverMargins} from '../../types/popover'\nimport {AnimateActivity} from '../../utils/animateActivity'\nimport {useBoundaryElement} from '../../utils/boundaryElement/useBoundaryElement'\nimport {getElementRef} from '../../utils/getElementRef'\nimport {LayerProps} from '../../utils/layer/layer'\nimport {LayerProvider} from '../../utils/layer/layerProvider'\nimport {useLayer} from '../../utils/layer/useLayer'\nimport {Portal} from '../../utils/portal/portal'\nimport {ResponsiveRadiusProps, ResponsiveShadowProps} from '../types'\nimport {\n DEFAULT_FALLBACK_PLACEMENTS,\n DEFAULT_POPOVER_DISTANCE,\n DEFAULT_POPOVER_MARGINS,\n DEFAULT_POPOVER_PADDING,\n} from './constants'\nimport {size} from './floating-ui/size'\nimport {calcCurrentWidth, calcMaxWidth} from './helpers'\nimport {PopoverCard} from './popoverCard'\nimport {PopoverUpdateCallback, PopoverWidth} from './types'\n\n/** @public */\nexport interface PopoverProps\n extends Omit<LayerProps, 'as'>, ResponsiveRadiusProps, ResponsiveShadowProps {\n /** @beta */\n __unstable_margins?: PopoverMargins\n /**\n * Whether the popover should animate in and out.\n *\n * @beta\n * @defaultValue false\n */\n animate?: boolean\n arrow?: boolean\n /** @deprecated Use `floatingBoundary` and/or `referenceBoundary` instead */\n boundaryElement?: never\n children?: React.JSX.Element\n /**\n * When `true`, prevent overflow within the current boundary:\n * - by flipping on its side axis\n * - by resizing\n /*\n * Note that:\n * - setting `preventOverflow` to `true` also prevents overflow on its side axis\n * - setting `matchReferenceWidth` to `true` also causes the popover to resize\n *\n * @defaultValue false\n */\n constrainSize?: boolean\n content?: React.ReactNode\n disabled?: boolean\n fallbackPlacements?: Placement[]\n floatingBoundary?: HTMLElement | null\n /**\n * When `true`, set the maximum width to match the reference element, and also prevent overflow within\n * the current boundary by resizing.\n *\n * Note that setting `constrainSize` to `true` also causes the popover to resize\n *\n * @defaultValue false\n */\n matchReferenceWidth?: boolean\n /**\n * When true, blocks all pointer interaction with elements beneath the popover until closed.\n *\n * @beta\n * @defaultValue false\n */\n modal?: boolean\n open?: boolean\n overflow?: BoxOverflow\n padding?: number | number[]\n placement?: Placement\n /**\n * When 'flip' (default), the placement is determined from the initial placement and the\n * fallback placements in order. Whichever fits in the viewport first.\n *\n * When 'autoPlacement', the initial placement and all fallback placements are evaluated\n * and the placement with the most viewport space available.\n *\n * Option is only relevant if either `constrainSize` or `preventOverflow` is `true`\n */\n placementStrategy?: 'flip' | 'autoPlacement'\n /** Whether or not to render the popover in a portal element. */\n portal?: boolean | string\n preventOverflow?: boolean\n referenceBoundary?: HTMLElement | null\n /**\n * When defined, the popover will be positioned relative to this element.\n * The children of the popover won't be rendered.\n */\n referenceElement?: HTMLElement | null\n scheme?: ThemeColorSchemeKey\n tone?: CardTone\n /** @beta */\n updateRef?: Ref<PopoverUpdateCallback | undefined>\n width?: PopoverWidth | PopoverWidth[]\n}\n\nconst ViewportOverlay = () => {\n const {zIndex} = useLayer()\n\n return <div style={{height: '100vh', inset: 0, position: 'fixed', width: '100vw', zIndex}} />\n}\n\n/**\n * The `Popover` component is used to display some content on top of another.\n *\n * @public\n */\nexport function Popover(\n props: PopoverProps &\n Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'width'>,\n): React.JSX.Element {\n const {container, layer} = useTheme_v2()\n const boundaryElementContext = useBoundaryElement()\n\n const {\n __unstable_margins: margins = DEFAULT_POPOVER_MARGINS,\n animate: _animate = false,\n arrow: arrowProp = false,\n children: childProp,\n constrainSize = false,\n content,\n disabled,\n fallbackPlacements: _fallbackPlacements,\n matchReferenceWidth,\n floatingBoundary: _floatingBoundary,\n modal,\n // oxlint-disable-next-line no-unused-vars\n onActivate,\n open,\n overflow = 'hidden',\n padding: paddingProp,\n placement: placementProp = 'bottom',\n placementStrategy = 'flip',\n portal,\n preventOverflow = true,\n radius: radiusProp = 3,\n ref: forwardedRef,\n referenceBoundary: _referenceBoundary,\n referenceElement,\n scheme,\n shadow: shadowProp = 3,\n tone = 'inherit',\n width: widthProp = 'auto',\n zOffset: _zOffsetProp,\n updateRef,\n ...restProps\n } = props\n const fallbackPlacements =\n _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? 'bottom']\n const floatingBoundary = _floatingBoundary ?? boundaryElementContext.element\n const referenceBoundary = _referenceBoundary ?? boundaryElementContext.element\n // Max-width uses BoundaryElementProvider when present; otherwise the floating\n // boundary (same element the old `boundaryElement` prop used for both).\n const boundaryElement = boundaryElementContext.element ?? floatingBoundary\n const zOffsetProp = _zOffsetProp ?? layer.popover.zOffset\n const prefersReducedMotion = usePrefersReducedMotion()\n const animate = prefersReducedMotion ? false : _animate\n const boundarySize = useElementSize(boundaryElement)?.border\n const padding = _getArrayProp(paddingProp)\n const radius = _getArrayProp(radiusProp)\n const shadow = _getArrayProp(shadowProp)\n const widthArrayProp = _getArrayProp(widthProp)\n const zOffset = _getArrayProp(zOffsetProp)\n const ref = useRef<HTMLDivElement | null>(null)\n const arrowRef = useRef<HTMLDivElement | null>(null)\n const rootBoundary: RootBoundary = 'viewport'\n\n useImperativeHandle<HTMLDivElement | null, HTMLDivElement | null>(forwardedRef, () => ref.current)\n\n const mediaIndex = useMediaIndex()\n const boundaryWidth = constrainSize || preventOverflow ? boundarySize?.width : undefined\n\n // Update width when\n // - media index changes\n // - `width` property changes\n const width = calcCurrentWidth({\n container,\n mediaIndex,\n width: widthArrayProp,\n })\n const widthRef = useRef(width)\n\n useEffect(() => {\n widthRef.current = width\n }, [width])\n\n // Update max width when\n // - boundary width changes\n // - `width` property changes\n const maxWidth = calcMaxWidth({boundaryWidth, currentWidth: width})\n const maxWidthRef = useRef(maxWidth)\n\n useEffect(() => {\n maxWidthRef.current = maxWidth\n }, [maxWidth])\n\n // Keep track of reference element width (see `size` middleware below)\n const referenceWidthRef = useRef<number>(undefined)\n\n // Force apply width & max width to floating element\n useEffect(() => {\n const floatingElement = ref.current\n\n if (!open || !floatingElement) return\n\n const referenceWidth = referenceWidthRef.current\n\n if (matchReferenceWidth) {\n if (referenceWidth !== undefined) {\n floatingElement.style.width = `${referenceWidth}px`\n }\n } else if (width !== undefined) {\n floatingElement.style.width = `${width}px`\n }\n\n if (typeof maxWidth === 'number') {\n floatingElement.style.maxWidth = `${maxWidth}px`\n }\n }, [width, matchReferenceWidth, maxWidth, open])\n\n const [referenceWidth, setReferenceWidth] = useState<number | undefined>(undefined)\n const middleware = useMiddleware({\n animate,\n arrowProp,\n arrowRef,\n constrainSize,\n fallbackPlacements,\n floatingBoundary,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n placementProp,\n placementStrategy,\n preventOverflow,\n referenceBoundary,\n referenceWidthRef,\n rootBoundary,\n setReferenceWidth,\n widthRef,\n })\n\n const {x, y, middlewareData, placement, refs, strategy, update} = useFloating({\n middleware,\n placement: placementProp,\n whileElementsMounted: autoUpdate,\n elements: referenceElement\n ? {\n reference: referenceElement,\n }\n : undefined,\n })\n\n const referenceHidden = middlewareData.hide?.referenceHidden\n\n const arrowX = middlewareData.arrow?.x\n const arrowY = middlewareData.arrow?.y\n\n const originX = middlewareData['@sanity/ui/origin']?.originX\n const originY = middlewareData['@sanity/ui/origin']?.originY\n\n const setArrow = useCallback((arrowEl: HTMLDivElement | null) => {\n arrowRef.current = arrowEl\n }, [])\n\n const setFloating = useCallback(\n (node: HTMLDivElement | null) => {\n ref.current = node\n refs.setFloating(node)\n },\n [refs],\n )\n\n // If there's a child then we need to set the reference element to the cloned child ref\n // and if child changes we make sure to update or remove the reference element.\n useImperativeHandle(childProp ? getElementRef(childProp) : null, () => refs.reference.current)\n\n const child = useMemo(() => {\n // If a reference element is defined, we don't need to clone the child\n if (referenceElement) return childProp\n\n if (!childProp) return null\n\n return cloneElement(childProp, {ref: refs.setReference})\n }, [childProp, referenceElement, refs.setReference])\n\n useImperativeHandle(updateRef, () => update, [update])\n\n if (disabled) {\n return childProp || <></>\n }\n\n const popover = (\n <LayerProvider zOffset={zOffset}>\n {/* Optional transparent blocking overlay at the top-most z-index layer. Must be positioned before the below popover card. */}\n {modal && <ViewportOverlay />}\n\n <PopoverCard\n {...restProps}\n __unstable_margins={margins}\n animate={animate}\n arrow={arrowProp}\n arrowRef={setArrow}\n arrowX={arrowX}\n arrowY={arrowY}\n hidden={referenceHidden}\n open={open}\n overflow={overflow}\n padding={padding}\n placement={placement}\n radius={radius}\n ref={setFloating}\n scheme={scheme}\n shadow={shadow}\n originX={originX}\n originY={originY}\n strategy={strategy}\n tone={tone}\n width={matchReferenceWidth ? referenceWidth : width}\n x={x}\n y={y}\n >\n {content}\n </PopoverCard>\n </LayerProvider>\n )\n\n const popoverNode = portal ? (\n <Portal __unstable_name={typeof portal === 'string' ? portal : undefined}>{popover}</Portal>\n ) : (\n popover\n )\n\n return (\n <>\n {/* the popover */}\n {animate ? (\n <AnimateActivity layoutMode=\"default\" mode={open ? 'visible' : 'hidden'}>\n {popoverNode}\n </AnimateActivity>\n ) : (\n <Activity mode={open ? 'visible' : 'hidden'}>{popoverNode}</Activity>\n )}\n\n {/* the referred element */}\n {child}\n </>\n )\n}\n\nfunction useMiddleware({\n animate,\n arrowProp,\n arrowRef,\n constrainSize,\n fallbackPlacements,\n floatingBoundary,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n placementProp,\n placementStrategy,\n preventOverflow,\n referenceBoundary,\n referenceWidthRef,\n rootBoundary,\n setReferenceWidth,\n widthRef,\n}: {\n animate: boolean\n arrowProp: boolean\n arrowRef: React.RefObject<HTMLDivElement | null>\n constrainSize: boolean\n fallbackPlacements: Placement[]\n floatingBoundary: HTMLElement | null\n margins: PopoverMargins\n matchReferenceWidth: boolean | undefined\n maxWidthRef: React.RefObject<number | undefined>\n placementProp: Placement\n placementStrategy: 'flip' | 'autoPlacement'\n preventOverflow: boolean\n referenceBoundary: HTMLElement | null\n referenceWidthRef: React.RefObject<number | undefined>\n rootBoundary: RootBoundary\n setReferenceWidth: (referenceWidth: number) => void\n widthRef: React.RefObject<number | undefined>\n}) {\n return useMemo(() => {\n const ret: Middleware[] = []\n\n // Flip the floating element when leaving the boundary box\n if (constrainSize || preventOverflow) {\n if (placementStrategy === 'autoPlacement') {\n ret.push(\n autoPlacement({\n allowedPlacements: [placementProp].concat(fallbackPlacements),\n }),\n )\n } else {\n ret.push(\n flip({\n boundary: floatingBoundary || undefined,\n fallbackPlacements,\n padding: DEFAULT_POPOVER_PADDING,\n rootBoundary,\n }),\n )\n }\n }\n\n // Define distance between reference and floating element\n ret.push(offset({mainAxis: DEFAULT_POPOVER_DISTANCE}))\n\n // Track sizes\n if (constrainSize || matchReferenceWidth) {\n ret.push(\n size({\n boundaryElement: floatingBoundary || undefined,\n constrainSize,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n padding: DEFAULT_POPOVER_PADDING,\n referenceWidthRef,\n setReferenceWidth,\n widthRef,\n }),\n )\n }\n\n // Shift the popover so its sits within the boundary element\n if (preventOverflow) {\n ret.push(\n shift({\n boundary: floatingBoundary || undefined,\n rootBoundary,\n padding: DEFAULT_POPOVER_PADDING,\n }),\n )\n }\n\n // Place arrow\n if (arrowProp) {\n ret.push(\n arrow({\n element: arrowRef,\n padding: DEFAULT_POPOVER_PADDING,\n }),\n )\n }\n\n // Determine the origin to scale from.\n // Must be placed after `@sanity/ui/size` and `shift` middleware.\n if (animate) {\n ret.push(origin)\n }\n\n ret.push(\n hide({\n boundary: referenceBoundary || undefined,\n padding: DEFAULT_POPOVER_PADDING,\n strategy: 'referenceHidden',\n }),\n )\n\n return ret\n }, [\n animate,\n arrowProp,\n arrowRef,\n constrainSize,\n fallbackPlacements,\n floatingBoundary,\n margins,\n matchReferenceWidth,\n maxWidthRef,\n placementProp,\n placementStrategy,\n preventOverflow,\n referenceBoundary,\n referenceWidthRef,\n rootBoundary,\n setReferenceWidth,\n widthRef,\n ])\n}\n"],"mappings":";;;;;;;;;;;;AAQA,MAAa,0BAA0C;CAAC;CAAG;CAAG;CAAG;AAAC,GACrD,8BAA8D;CACzE,KAAO;EAAC;EAAU;EAAQ;CAAO;CACjC,aAAa;EAAC;EAAgB;EAAc;CAAa;CACzD,WAAW;EAAC;EAAc;EAAY;CAAW;CACjD,QAAU;EAAC;EAAO;EAAQ;CAAO;CACjC,gBAAgB;EAAC;EAAa;EAAc;CAAa;CACzD,cAAc;EAAC;EAAW;EAAY;CAAW;CACjD,MAAQ;EAAC;EAAS;EAAO;CAAQ;CACjC,cAAc;EAAC;EAAe;EAAa;CAAc;CACzD,YAAY;EAAC;EAAa;EAAW;CAAY;CACjD,OAAS;EAAC;EAAQ;EAAO;CAAQ;CACjC,eAAe;EAAC;EAAc;EAAa;CAAc;CACzD,aAAa;EAAC;EAAY;EAAW;CAAY;AACnD;AClBA,SAAgB,KAAK,SAUN;CACb,IAAM,EACJ,eACA,SACA,qBACA,aACA,UAAU,GACV,mBACA,mBACA,aACE;CAEJ,OAAO;EACL,MAAM;EACN,MAAM,GAAG,MAAM;GACb,IAAM,EAAC,UAAU,WAAW,UAAU,UAAS,MACzC,EAAC,UAAU,cAAa,OAExB,WAAW,MAAM,eAAe,MAAM;IAC1C,aAAa;IACb,UAAU,QAAQ,mBAAmB,KAAA;IACrC,gBAAgB;IAChB;IACA,cAAc;GAChB,CAAC,GAEG,WAAW,UACX,YAAY,UAEV,YAAY,SAAS,OACrB,YAAY,SAAS;GAiB3B,AAfI,UAAU,SAAS,KAAK,MAC1B,WAAW,aAAa,SAA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