@sanity/ui 4.4.11 → 4.4.12
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-CleOpGKV.js → arrow-Df43Duu7.js} +2 -2
- package/dist/arrow-Df43Duu7.js.map +1 -0
- package/dist/autocomplete.d.ts +2 -2
- package/dist/autocomplete.d.ts.map +1 -1
- package/dist/autocomplete.js +62 -61
- package/dist/autocomplete.js.map +1 -1
- package/dist/breadcrumbs.js +5 -5
- package/dist/breadcrumbs.js.map +1 -1
- package/dist/{button-DnJrhWml.js → button-DBWvhK72.js} +4 -4
- package/dist/button-DBWvhK72.js.map +1 -0
- package/dist/code.js +1 -1
- package/dist/code.js.map +1 -1
- package/dist/elementSizeObserver-pevZfdGa.js.map +1 -1
- package/dist/factory-BzXTX8_Q.js.map +1 -1
- package/dist/{flex-ohP2jG9d.js → flex-DZLSBZTk.js} +3 -3
- package/dist/flex-DZLSBZTk.js.map +1 -0
- package/dist/getElementRef-BLVMlHTn.js.map +1 -1
- package/dist/getScopedTheme-C-sZsyAz.js.map +1 -1
- package/dist/getTheme_v2-y09KqtEb.js.map +1 -1
- package/dist/{grid-D-gOpN8z.js → grid-HONPZVbL.js} +3 -3
- package/dist/grid-HONPZVbL.js.map +1 -0
- package/dist/{hotkeys-Bd5rZOMO.js → hotkeys-CQgNwGAf.js} +3 -3
- package/dist/hotkeys-CQgNwGAf.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/{layer-umnlcWXZ.js → layer-CZ8G9TS5.js} +2 -2
- package/dist/layer-CZ8G9TS5.js.map +1 -0
- package/dist/menu.d.ts +2 -2
- package/dist/menu.js +8 -8
- package/dist/menu.js.map +1 -1
- package/dist/{popover-HDVgZg5e.d.ts → popover-fmTtK69w.d.ts} +2 -2
- package/dist/{popover-HDVgZg5e.d.ts.map → popover-fmTtK69w.d.ts.map} +1 -1
- package/dist/{popover-qhIrQ_4V.js → popover-sE-Xd89W.js} +16 -11
- package/dist/popover-sE-Xd89W.js.map +1 -0
- package/dist/popover.d.ts +1 -1
- package/dist/popover.js +1 -1
- package/dist/refractor-CC48DwHi.js.map +1 -1
- package/dist/{responsiveFont-Cyvxxz-G.js → responsiveFont-DJ-TUdSl.js} +2 -2
- package/dist/{responsiveFont-Cyvxxz-G.js.map → responsiveFont-DJ-TUdSl.js.map} +1 -1
- package/dist/{stack-DyrC2YfU.js → stack-DFSqrIj4.js} +3 -3
- package/dist/stack-DFSqrIj4.js.map +1 -0
- package/dist/{textInput-DhYi5cPT.js → textInput-CUhBHHFK.js} +4 -4
- package/dist/textInput-CUhBHHFK.js.map +1 -0
- package/dist/theme.d.ts +2 -2
- package/dist/theme.js +2 -2
- package/dist/toast.js +5 -5
- package/dist/toast.js.map +1 -1
- package/dist/tooltip.d.ts +1 -1
- package/dist/tooltip.js +6 -6
- package/dist/tooltip.js.map +1 -1
- package/dist/useClickOutsideEvent-CC1zgOmv.js.map +1 -1
- package/dist/{useLayer-D_TnC6On.js → useLayer-CKA2DU8j.js} +9 -9
- package/dist/useLayer-CKA2DU8j.js.map +1 -0
- package/package.json +14 -14
- package/dist/arrow-CleOpGKV.js.map +0 -1
- package/dist/button-DnJrhWml.js.map +0 -1
- package/dist/flex-ohP2jG9d.js.map +0 -1
- package/dist/grid-D-gOpN8z.js.map +0 -1
- package/dist/hotkeys-Bd5rZOMO.js.map +0 -1
- package/dist/layer-umnlcWXZ.js.map +0 -1
- package/dist/popover-qhIrQ_4V.js.map +0 -1
- package/dist/stack-DyrC2YfU.js.map +0 -1
- package/dist/textInput-DhYi5cPT.js.map +0 -1
- package/dist/useLayer-D_TnC6On.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLayer-CKA2DU8j.js","names":["RULES","RULES","RULES","asProp = 'div'","display = 'block'","margin = 0","padding = 0","...restProps","typeof asProp === 'string' ? asProp : undefined","_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)","asProp as 'div'","<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","useStyledTheme() as Theme","getTheme_v2(useStyledTheme() as Theme)","useStyledTheme","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","_jsx","StyledThemeProvider","scheme || root.scheme","<ThemeProvider scheme={scheme || root.scheme} theme={root.theme} tone={tone}>\n {children}\n </ThemeProvider>","theme","checkered = false","focusRing = false","radius = 0","toneProp = 'default'","...restProps","typeof as === 'string' ? as : undefined","rootTheme.scheme","_getArrayProp(border)","_getArrayProp(borderTop)","_getArrayProp(borderRight)","_getArrayProp(borderBottom)","_getArrayProp(borderLeft)","muted ?? false","_getArrayProp(radius)","_getArrayProp(shadow)","checkered ? '' : undefined","pressed ? '' : undefined","selected ? '' : undefined","<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","<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>","useTheme_v2()","_getCanonicalMedia(useTheme_v2().media)","media","_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 )","getServerSnapshot = () => false","() => false","zOffsetProp = 0","parentContextValue && getLayerContext(parentContextValue)","_getArrayProp(zOffsetProp)","{childLayers, childrenWithoutLevel}","(childLevel?: number) => {\n const parentDispose = parentRegisterChild?.(childLevel)\n\n dispatch({type: 'child/register', level: childLevel})\n\n return () => {\n dispatch({type: 'child/unregister', level: childLevel})\n\n parentDispose?.()\n }\n }","useCallback(\n (childLevel?: number) => {\n const parentDispose = parentRegisterChild?.(childLevel)\n\n dispatch({type: 'child/register', level: childLevel})\n\n return () => {\n dispatch({type: 'child/unregister', level: childLevel})\n\n parentDispose?.()\n }\n },\n [parentRegisterChild],\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","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/layerReducer.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, _ruleSet} 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\nconst RULES = _ruleSet(\n responsiveBoxSizingStyle,\n responsiveBoxHeightStyle,\n responsiveBoxOverflowStyle,\n responsiveBoxDisplayStyle,\n)\n\nexport function responsiveBoxStyle(): CSSObject[] {\n return RULES\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 {_responsive, _ruleSet} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveFlexItemStyleProps} from './types'\n\nconst BASE_STYLE: CSSObject = {\n minWidth: 0,\n minHeight: 0,\n}\n\nconst RULES = _ruleSet(BASE_STYLE, responsiveFlexItemStyle)\n\nexport function flexItemStyle(): CSSObject[] {\n return RULES\n}\n\nfunction responsiveFlexItemStyle(props: ResponsiveFlexItemStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n if (!props.$flex) return _ruleSet()\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, _ruleSet} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveGridItemStyleProps} from './types'\n\nconst RULES = _ruleSet(\n responsiveGridItemRowStyle,\n responsiveGridItemRowStartStyle,\n responsiveGridItemRowEndStyle,\n responsiveGridItemColumnStyle,\n responsiveGridItemColumnStartStyle,\n responsiveGridItemColumnEndStyle,\n)\n\nexport function responsiveGridItemStyle(): CSSObject[] {\n return RULES\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, _ruleSet} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveMarginStyleProps} from './types'\n\nexport function responsiveMarginStyle(props: ResponsiveMarginStyleProps & ThemeProps): CSSObject[] {\n const {theme} = props\n\n return _ruleSet(\n ...[\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((value): value is CSSObject[] => value !== null),\n )\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {_getResponsiveSpace, _ruleSet} 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 return _ruleSet(\n ...[\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((value): value is CSSObject[] => value !== null),\n )\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 */\nexport const Box: <E extends ElementType = 'div'>(props: BoxProps<E>) => React.JSX.Element =\n BoxComponent\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'\n\nconst cache = new WeakMap<ThemeColorCard_v2, WeakMap<ThemeColorState_v2, string>>()\n\n/**\n * Joined once per pair of theme color objects, as themes are immutable.\n *\n * @internal\n */\nexport function _cardColorStyle(\n base: ThemeColorCard_v2,\n color: ThemeColorState_v2,\n checkered = false,\n): string {\n let byColor = cache.get(base)\n if (!byColor) cache.set(base, (byColor = new WeakMap()))\n\n let declarations = byColor.get(color)\n if (declarations === undefined) {\n declarations = Object.entries(cardColorVariables(base, color))\n .filter(([, value]) => value)\n .map(([name, value]) => `${name}: ${value};`)\n .join('')\n byColor.set(color, declarations)\n }\n\n return checkered\n ? `${declarations}--card-bg-image: repeating-conic-gradient(${color.bg} 0% 25%, ${color.muted.bg} 0% 50%);`\n : declarations\n}\n\nfunction cardColorVariables(\n base: ThemeColorCard_v2,\n color: ThemeColorState_v2,\n): Record<`--${string}`, string | undefined> {\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\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, _ruleSet} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveBorderStyleProps} from './types'\n\nconst RULES = _ruleSet(border, borderTop, borderRight, borderBottom, borderLeft)\n\nexport function responsiveBorderStyle(): CSSObject[] {\n return RULES\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 cardCheckeredStyle(\n props: Pick<CardStyleProps, '$checkered'> & ThemeProps,\n): ReturnType<typeof css> | false {\n if (!props.$checkered) return false\n\n const {space} = getTheme_v2(props.theme)\n\n return 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\nexport const cardStaticStyle = css`\n color: var(--card-fg-color);\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\nexport function cardColorStyle(\n props: Pick<CardStyleProps, '$checkered'> & ThemeProps,\n): ReturnType<typeof css> {\n const {$checkered} = props\n const {color} = getTheme_v2(props.theme)\n\n // A card is either a button or a link, so their state rules can share selector lists\n return css`\n color-scheme: ${color._dark ? 'dark' : 'light'};\n\n ${_cardColorStyle(color, color, $checkered)}\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\n /* &:is(a) */\n &[data-as='a'] {\n cursor: pointer;\n box-shadow: var(--card-focus-ring-box-shadow);\n }\n\n &[data-as='button']:disabled,\n &[data-as='a'][data-disabled] {\n ${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}\n }\n\n &[data-as='button']:not(:disabled),\n &[data-as='a']: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 `\n}\n\nexport function cardStyle(\n props: Pick<CardStyleProps, '$focusRing' | '$muted'> & ThemeProps,\n): ReturnType<typeof css> {\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 background-color: ${props.$muted ? 'var(--card-muted-bg-color)' : 'var(--card-bg-color)'};\n\n ${\n props.$focusRing &&\n css`\n &[data-as='button']:not(:disabled):focus-visible,\n &[data-as='a']:not([data-disabled]):focus-visible {\n --card-focus-ring-box-shadow: ${focusRingStyle({\n base: color,\n border,\n focusRing: card.focusRing,\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 {cardCheckeredStyle, cardColorStyle, cardStaticStyle, 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\n// Each level gets its own class per distinct CSS, so the colors aren't repeated per combination of\n// props. Their order is the cascade order: borders before the button reset, `style.card.root` last\nconst CardBorder = styled(Box)<CardStyleProps & ResponsiveBorderStyleProps>(\n responsiveBorderStyle,\n cardCheckeredStyle,\n)\n\nconst CardStatic = styled(CardBorder)`\n ${cardStaticStyle}\n`\n\nconst CardColor = styled(CardStatic)<CardStyleProps>(cardColorStyle)\n\nconst StyledCard = styled(CardColor)<\n CardStyleProps & ResponsiveRadiusStyleProps & ResponsiveShadowStyleProps\n>(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 */\nexport const Card: <E extends ElementType = 'div'>(props: CardProps<E>) => React.JSX.Element =\n CardComponent\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\n// One canonical breakpoint array per content. Theme objects are rebuilt freely\n// (`buildTheme({media})` per workspace or scheme, cloned or deserialized themes),\n// and each rebuild carries its own `media` array instance. The store below is\n// keyed on that instance, so without this a new array with the same values\n// would tear down `media.length + 1` MediaQueryLists and listeners in every\n// subscribed `useMediaIndex` and create them again, for no change. Keyed by the\n// joined values; an app has as many entries as it has distinct breakpoint\n// configurations, so the map does not grow with rendering.\nconst canonicalMedia = new Map<string, number[]>()\n\nfunction _getCanonicalMedia(media: number[]): number[] {\n const key = media.join(',')\n const canonical = canonicalMedia.get(key)\n\n if (canonical) return canonical\n\n canonicalMedia.set(key, media)\n\n return media\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 = _getCanonicalMedia(useTheme_v2().media)\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","/** @internal */\nexport interface LayerState {\n childLayers: ReadonlyMap<number, number>\n childrenWithoutLevel: number\n}\n\n/**\n * Registers or unregisters a child layer. Children from older `@sanity/ui` copies that share the\n * layer context register without a `level`.\n *\n * @internal\n */\nexport type LayerAction =\n | {type: 'child/register'; level?: number}\n | {type: 'child/unregister'; level?: number}\n\n/** @internal */\nexport const initialLayerState: LayerState = {childLayers: new Map(), childrenWithoutLevel: 0}\n\n/** @internal */\nexport function layerReducer(state: LayerState, action: LayerAction): LayerState {\n const {level} = action\n\n switch (action.type) {\n case 'child/register': {\n if (level === undefined) {\n return {...state, childrenWithoutLevel: state.childrenWithoutLevel + 1}\n }\n\n const childLayers = new Map(state.childLayers)\n\n childLayers.set(level, (childLayers.get(level) ?? 0) + 1)\n\n return {...state, childLayers}\n }\n\n case 'child/unregister': {\n if (level === undefined) {\n return {...state, childrenWithoutLevel: state.childrenWithoutLevel - 1}\n }\n\n const childLayers = new Map(state.childLayers)\n const count = childLayers.get(level) ?? 0\n\n if (count === 1) {\n childLayers.delete(level)\n } else {\n childLayers.set(level, count - 1)\n }\n\n return {...state, childLayers}\n }\n\n default: {\n action satisfies never\n\n return state\n }\n }\n}\n","import {useCallback, useContext, useEffect, useMemo, useReducer} from 'react'\n\nimport {useMediaIndex} from '../../hooks/useMediaIndex/useMediaIndex'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {getLayerContext} from './getLayerContext'\nimport {LayerContext} from './layerContext'\nimport {initialLayerState, layerReducer} from './layerReducer'\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 const [{childLayers, childrenWithoutLevel}, dispatch] = useReducer(\n layerReducer,\n initialLayerState,\n )\n\n const size = childLayers.size + childrenWithoutLevel\n const isTopLayer = size === 0\n\n const registerChild = useCallback(\n (childLevel?: number) => {\n const parentDispose = parentRegisterChild?.(childLevel)\n\n dispatch({type: 'child/register', level: childLevel})\n\n return () => {\n dispatch({type: 'child/unregister', level: childLevel})\n\n parentDispose?.()\n }\n },\n [parentRegisterChild],\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,aAAwB,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,MAAMA,UAAQ,SACZ,0BACA,0BACA,4BACA,yBACF;AAEA,SAAgB,qBAAkC;CAChD,OAAOA;AACT;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;CA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;EACA;CACF,GALE,EAAA,MAAA,YACA,EAAA,MAAA,OACA,EAAA,MAAA,eACA,EAAA,MAAA,MACA,EAAA,MAAA,Q;CAPJ,IAAM,QAA2BC,IAY1BC;CAAP,OAA6C,EAAA,QAAA,YAAA,EAAA,QAAR,SAA9BA,KAAAA,oBAACC,aAAAA,UAAD;EAA8B;EAAQ;CAAgC,CAAA,GAAhC,EAAA,MAAA,UAAR,EAAA,MAAA,O,0BAA9BD;AACT;;;;ACtEA,SAAgB,WAA8B;C,cACtC,QAAQ,WAAW,YAAY;CAErC,IAAI,CAAC,OACH,MAAU,MAAM,mCAAmC;CAGrD,IAAI;EACKE,IAAAA;EAAP,OAAuB,EAAA,OAAA,Q,aAAhBA,KAAAA,gBAAgB,KAAK,GAAL,EAAA,KAAA,O,YAAhBA;CACT,SAASC,IAAK;EAALA,IAAAA,MAAAA;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.4.
|
|
3
|
+
"version": "4.4.12",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"components",
|
|
6
6
|
"design-system",
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
"@sanity/icons": "^5.3.0",
|
|
55
55
|
"clsx": "^2.1.1",
|
|
56
56
|
"csstype": "^3.2.3",
|
|
57
|
-
"motion": "^14.
|
|
57
|
+
"motion": "^14.13.0",
|
|
58
58
|
"react-is": "^19.3.1",
|
|
59
59
|
"react-refractor": "^4.0.0",
|
|
60
60
|
"use-effect-event": "^2.0.4"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@pandacss/dev": "^2.
|
|
64
|
-
"@pandacss/transformer": "^2.
|
|
65
|
-
"@pandacss/vite": "^2.
|
|
66
|
-
"@sanity/pandacss-tsdown-plugin": "^0.3.
|
|
67
|
-
"@sanity/tsdown-config": "^0.31.
|
|
63
|
+
"@pandacss/dev": "^2.5.0",
|
|
64
|
+
"@pandacss/transformer": "^2.5.0",
|
|
65
|
+
"@pandacss/vite": "^2.5.0",
|
|
66
|
+
"@sanity/pandacss-tsdown-plugin": "^0.3.3",
|
|
67
|
+
"@sanity/tsdown-config": "^0.31.4",
|
|
68
68
|
"@testing-library/dom": "^10.4.2",
|
|
69
69
|
"@testing-library/jest-dom": "^7.0.1",
|
|
70
70
|
"@testing-library/react": "^16.3.3",
|
|
@@ -73,19 +73,19 @@
|
|
|
73
73
|
"@types/react": "^19.3.0",
|
|
74
74
|
"@types/react-dom": "^19.3.0",
|
|
75
75
|
"@types/react-is": "^19.3.0",
|
|
76
|
-
"@vitejs/plugin-react": "^6.
|
|
77
|
-
"@vitest/coverage-v8": "^5.0
|
|
78
|
-
"jsdom": "^
|
|
79
|
-
"oxc-transform-react": "^0.
|
|
76
|
+
"@vitejs/plugin-react": "^6.3.0",
|
|
77
|
+
"@vitest/coverage-v8": "^5.1.0",
|
|
78
|
+
"jsdom": "^31.0.0",
|
|
79
|
+
"oxc-transform-react": "^0.158.0",
|
|
80
80
|
"react": "^19.3.1",
|
|
81
81
|
"react-dom": "^19.3.1",
|
|
82
82
|
"rimraf": "^5.0.5",
|
|
83
83
|
"styled-components": "^6.6.0",
|
|
84
|
-
"tsdown": "^0.23.
|
|
84
|
+
"tsdown": "^0.23.7",
|
|
85
85
|
"typescript": "7.0.2",
|
|
86
86
|
"unrun": "^0.3.1",
|
|
87
|
-
"vite": "^8.3.
|
|
88
|
-
"vitest": "^5.0
|
|
87
|
+
"vite": "^8.3.8",
|
|
88
|
+
"vitest": "^5.1.0",
|
|
89
89
|
"vitest-axe": "^1.0.0-pre.5"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-CleOpGKV.js","names":["createPortal(children, portalElement)","_c","radius = 0","compileCommands(cmds)","clsx(arrow, className)","{...style, '--arrow-size': `${w}px`}","`${w}px`","<rect x={0} y={strokeWidth} width={w} height={w} fill=\"white\" />","<mask id={strokeMaskId}>\n <rect x={0} y={strokeWidth} width={w} height={w} fill=\"white\" />\n </mask>","<path\n className={arrowStroke}\n d={strokePath}\n mask={`url(#${strokeMaskId})`}\n strokeWidth={strokeWidth * 2}\n />","strokeWidth * 2","`url(#${strokeMaskId})`","<path className={arrowShape} d={fillPath} />","<svg width={w} height={w} viewBox={`0 0 ${w} ${w}`}>\n <mask id={strokeMaskId}>\n <rect x={0} y={strokeWidth} width={w} height={w} fill=\"white\" />\n </mask>\n <path\n className={arrowStroke}\n d={strokePath}\n mask={`url(#${strokeMaskId})`}\n strokeWidth={strokeWidth * 2}\n />\n <path className={arrowShape} d={fillPath} />\n </svg>","`0 0 ${w} ${w}`","<div\n data-ui=\"Arrow\"\n {...restProps}\n className={clsx(arrow, className)}\n ref={ref}\n style={{...style, '--arrow-size': `${w}px`} as CSSProperties}\n >\n <svg width={w} height={w} viewBox={`0 0 ${w} ${w}`}>\n <mask id={strokeMaskId}>\n <rect x={0} y={strokeWidth} width={w} height={w} fill=\"white\" />\n </mask>\n <path\n className={arrowStroke}\n d={strokePath}\n mask={`url(#${strokeMaskId})`}\n strokeWidth={strokeWidth * 2}\n />\n <path className={arrowShape} d={fillPath} />\n </svg>\n </div>","{...style, '--arrow-size': `${w}px`} as CSSProperties","_c"],"sources":["../src/core/utils/boundaryElement/boundaryElementContext.ts","../src/core/utils/boundaryElement/useBoundaryElement.ts","../src/core/utils/portal/resolvePortalElement.ts","../src/core/utils/portal/portalContext.ts","../src/core/utils/portal/usePortal.ts","../src/core/utils/portal/portal.ts","../src/core/utils/arrow/cmds.ts","../src/core/utils/arrow/arrow.css.ts","../src/core/utils/arrow/arrow.tsx"],"sourcesContent":["import {createGlobalScopedContext} from '../../lib/createGlobalScopedContext'\nimport {BoundaryElementContextValue} from './types'\n\nexport const BoundaryElementContext = createGlobalScopedContext<BoundaryElementContextValue | null>(\n '@sanity/ui/context/boundaryElement',\n null,\n)\n","import {useContext} from 'react'\n\nimport {isRecord} from '../../lib/isRecord'\nimport {BoundaryElementContext} from './boundaryElementContext'\nimport {BoundaryElementContextValue} from './types'\n\nconst DEFAULT_VALUE: BoundaryElementContextValue = {\n version: 0.0,\n element: null,\n}\n\n/**\n * @public\n */\nexport function useBoundaryElement(): BoundaryElementContextValue {\n const value = useContext(BoundaryElementContext)\n\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 (value && (!isRecord(value) || value.version !== 0.0)) {\n throw new Error('useBoundaryElement(): the context value is not compatible')\n }\n\n return value || DEFAULT_VALUE\n}\n","import type {PortalContextValue} from './types'\n\n/**\n * The element a `Portal` renders into: the named element when `name` is given, otherwise the\n * context's element, falling back to the `default` named element in both cases.\n *\n * Components that reason about the portal element (the tooltip caps its width to it, the dialog\n * scopes its click-outside and focus handling to it) resolve it through this function as well, so\n * they cannot disagree with where the portal content ends up.\n */\nexport function resolvePortalElement(\n portal: PortalContextValue,\n name?: string,\n): HTMLElement | null {\n return (name ? portal.elements?.[name] : portal.element) || portal.elements?.default || null\n}\n","import {createGlobalScopedContext} from '../../lib/createGlobalScopedContext'\nimport {globalScope} from '../../lib/globalScope'\nimport {PortalContextValue} from './types'\n\nconst key = '@sanity/ui/context/portal'\nconst elementKey = Symbol.for(`${key}/element`)\n\nglobalScope[elementKey] = null\n\nconst defaultContextValue: PortalContextValue = {\n version: 0.0,\n boundaryElement: null,\n get element() {\n if (typeof document === 'undefined') {\n return null\n }\n\n if (globalScope[elementKey]) {\n return globalScope[elementKey]\n }\n\n globalScope[elementKey] = document.createElement('div')\n globalScope[elementKey].setAttribute('data-portal', '')\n\n document.body.appendChild(globalScope[elementKey])\n\n return globalScope[elementKey]\n },\n}\n\nexport const PortalContext = createGlobalScopedContext<PortalContextValue>(key, defaultContextValue)\n","import {useContext} from 'react'\n\nimport {isRecord} from '../../lib/isRecord'\nimport {PortalContext} from './portalContext'\nimport {PortalContextValue} from './types'\n\n/**\n * @public\n */\nexport function usePortal(): PortalContextValue {\n const value = useContext(PortalContext)\n\n if (!value) {\n throw new Error('usePortal(): missing context value')\n }\n\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(value) || value.version !== 0.0) {\n throw new Error('usePortal(): the context value is not compatible')\n }\n\n return value\n}\n","import {createPortal} from 'react-dom'\n\nimport {resolvePortalElement} from './resolvePortalElement'\nimport {usePortal} from './usePortal'\n\n/**\n * @public\n */\nexport interface PortalProps {\n children: React.ReactNode\n /**\n * @beta This API might change. DO NOT USE IN PRODUCTION.\n */\n __unstable_name?: string\n}\n\n/**\n * @public\n */\nexport function Portal(props: PortalProps): React.ReactPortal | null {\n const {children, __unstable_name: name} = props\n const portal = usePortal()\n const portalElement = resolvePortalElement(portal, name)\n\n if (!portalElement) {\n return null\n }\n\n return createPortal(children, portalElement)\n}\n","interface PointCmd {\n type: 'point'\n x: number\n y: number\n radius?: number\n}\n\ninterface CurveCmd {\n type: 'curve'\n startControl: Point\n endControl: Point\n curveEnd: Point\n}\n\nexport type Cmd = PointCmd | CurveCmd\n\nexport interface Point {\n x: number\n y: number\n radius?: number\n}\n\nfunction moveTowardsLength(movingPoint: Point, targetPoint: Point, amount: number) {\n const width = targetPoint.x - movingPoint.x\n const height = targetPoint.y - movingPoint.y\n\n const distance = Math.sqrt(width * width + height * height)\n\n return moveTowardsFractional(movingPoint, targetPoint, Math.min(1, amount / distance))\n}\n\nfunction moveTowardsFractional(movingPoint: Point, targetPoint: Point, fraction: number): Point {\n return {\n x: movingPoint.x + (targetPoint.x - movingPoint.x) * fraction,\n y: movingPoint.y + (targetPoint.y - movingPoint.y) * fraction,\n }\n}\n\nexport function getRoundedCommands(points: Point[]): Cmd[] {\n const len = points.length\n\n const cmds: Cmd[] = []\n\n for (let i = 0; i < len; i += 1) {\n const point = points[i]\n const prevPoint = points[i - 1]\n const nextPoint = points[i + 1]\n\n if (prevPoint && point.radius) {\n const curveStart = moveTowardsLength(point, prevPoint, point.radius)\n const curveEnd = moveTowardsLength(point, nextPoint, point.radius)\n const startControl = moveTowardsFractional(curveStart, point, 0.5)\n const endControl = moveTowardsFractional(point, curveEnd, 0.5)\n\n cmds.push({\n type: 'point',\n ...curveStart,\n })\n\n cmds.push({\n type: 'curve',\n curveEnd,\n startControl,\n endControl,\n })\n } else {\n cmds.push({\n type: 'point',\n ...point,\n })\n }\n }\n\n return cmds\n}\n\nexport function compileCommands(cmds: Cmd[]): string {\n return cmds\n .map((n, idx) => {\n if (n.type === 'point') {\n return `${idx === 0 ? 'M' : 'L'} ${n.x} ${n.y}`\n }\n\n if (n.type === 'curve') {\n return `C ${n.startControl.x} ${n.startControl.y} ${n.endControl.x} ${n.endControl.y} ${n.curveEnd.x} ${n.curveEnd.y}`\n }\n\n return ``\n })\n .join(' ')\n}\n","import {css} from '#styled-system/css'\n\nconst arrowSize = 'var(--arrow-size)'\n\nexport const arrow = css({\n 'position': 'absolute',\n 'width': arrowSize,\n 'height': arrowSize,\n ':empty + &': {display: 'none'},\n \"[data-placement^='top'] > &\": {\n 'bottom': `calc(-1 * ${arrowSize})`,\n '& > svg': {transform: 'rotate(0)'},\n },\n \"[data-placement^='right'] > &\": {\n 'left': `calc(-1 * ${arrowSize})`,\n '& > svg': {transform: 'rotate(90deg)'},\n },\n \"[data-placement^='left'] > &\": {\n 'right': `calc(-1 * ${arrowSize})`,\n '& > svg': {transform: 'rotate(-90deg)'},\n },\n \"[data-placement^='bottom'] > &\": {\n 'top': `calc(-1 * ${arrowSize})`,\n '& > svg': {transform: 'rotate(180deg)'},\n },\n '& > svg': {\n display: 'block',\n lineHeight: 0,\n transformOrigin: `calc(${arrowSize} / 2) calc(${arrowSize} / 2)`,\n },\n})\n\nexport const arrowStroke = css({\n stroke: 'var(--card-shadow-outline-color)',\n})\n\nexport const arrowShape = css({\n fill: 'var(--card-bg-color)',\n})\n","import {clsx} from 'clsx/lite'\nimport {CSSProperties, HTMLProps, useId} from 'react'\n\nimport {useTheme_v2} from '../../theme/useTheme'\nimport {compileCommands, getRoundedCommands, Point} from './cmds'\n\nimport {arrow, arrowShape, arrowStroke} from './arrow.css'\n\n/** @internal */\nexport function Arrow(\n props: {width: number; height: number; radius?: number} & Omit<\n HTMLProps<HTMLDivElement>,\n 'width' | 'height'\n >,\n): React.JSX.Element {\n const {className, width: w, height: h, radius = 0, ref, style, ...restProps} = props\n const {card} = useTheme_v2()\n const strokeMaskId = `stroke-mask-${useId()}`\n const strokeWidth = card.shadow.outline\n\n const center = w / 2\n\n const points: Point[] = [\n {\n x: 0,\n y: 0,\n },\n {\n x: radius,\n y: 0,\n radius,\n },\n {\n x: center,\n y: h - 1,\n radius,\n },\n {\n x: w - radius,\n y: 0,\n radius,\n },\n {\n x: w,\n y: 0,\n },\n ]\n\n const cmds = getRoundedCommands(points)\n const path = compileCommands(cmds)\n\n // oxlint-disable-next-line no-unnecessary-template-expression\n const strokePath = `${path}`\n const fillPath = `${path} M ${w} -1 M 0 -1 Z`\n\n return (\n <div\n data-ui=\"Arrow\"\n {...restProps}\n className={clsx(arrow, className)}\n ref={ref}\n style={{...style, '--arrow-size': `${w}px`} as CSSProperties}\n >\n <svg width={w} height={w} viewBox={`0 0 ${w} ${w}`}>\n <mask id={strokeMaskId}>\n <rect x={0} y={strokeWidth} width={w} height={w} fill=\"white\" />\n </mask>\n <path\n className={arrowStroke}\n d={strokePath}\n mask={`url(#${strokeMaskId})`}\n strokeWidth={strokeWidth * 2}\n />\n <path className={arrowShape} d={fillPath} />\n </svg>\n </div>\n )\n}\n"],"mappings":";;;;;;AAGA,MAAa,yBAAyB,0BACpC,sCACA,IACF,GCAM,gBAA6C;CACjD,SAAS;CACT,SAAS;AACX;;;;AAKA,SAAgB,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CAAA,GAfE,EAAA,MAAA,KAFD,EAAA,MAAA,WAKJA,EAAAA,MAAAA,KAJWT,EAAAA,MAAAA,IAEJY,EAAAA,MAAAA,I,4BALTD;AAqBJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button-DnJrhWml.js","names":["<SpinnerIcon className={spinnerIcon} />","<Text data-ui=\"Spinner\" {...props}>\n <SpinnerIcon className={spinnerIcon} />\n </Text>","_c","fontSize = 1","justifyProp = 'center'","mode = 'default'","paddingProp = 3","radiusProp = 2","gap = 3","tone = 'default'","type = 'button'","muted = false","_getArrayProp(justifyProp)","_getArrayProp(paddingProp)","_getArrayProp(paddingXProp)","_getArrayProp(paddingYProp)","_getArrayProp(paddingTopProp)","_getArrayProp(paddingBottomProp)","_getArrayProp(paddingLeftProp)","_getArrayProp(paddingRightProp)","_getArrayProp(radiusProp)","_getArrayProp(gap)","{\n // flex: 1,\n padding,\n paddingX,\n paddingY,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n }","useMemo(\n () => ({\n // flex: 1,\n padding,\n paddingX,\n paddingY,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n }),\n [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight],\n )","Boolean(loading) && (\n <div className={buttonLoadingBox} data-ui=\"ButtonLoading\">\n <Spinner />\n </div>\n )","(IconComponent || text || IconRightComponent) && (\n <Box as=\"span\" {...boxProps}>\n <Flex as=\"span\" justify={justify} gap={spacing}>\n {IconComponent && (\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n )}\n\n {text && (\n <Box>\n <Text\n muted={muted}\n align={textAlign}\n size={fontSize}\n textOverflow=\"ellipsis\"\n weight={textWeight ?? button.textWeight}\n >\n {text}\n </Text>\n </Box>\n )}\n\n {IconRightComponent && (\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n )}\n </Flex>\n </Box>\n )","button.textWeight","children && (\n <Box as=\"span\" {...boxProps}>\n {children}\n </Box>\n )","<StyledButton\n data-ui=\"Button\"\n {...restProps}\n $mode={mode}\n $radius={radius}\n $tone={tone}\n data-disabled={Boolean(loading || disabled)}\n data-selected={selected ? '' : undefined}\n disabled={Boolean(loading || disabled)}\n ref={ref}\n type={type}\n $width={width}\n >\n {Boolean(loading) && (\n <div className={buttonLoadingBox} data-ui=\"ButtonLoading\">\n <Spinner />\n </div>\n )}\n\n {(IconComponent || text || IconRightComponent) && (\n <Box as=\"span\" {...boxProps}>\n <Flex as=\"span\" justify={justify} gap={spacing}>\n {IconComponent && (\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n )}\n\n {text && (\n <Box>\n <Text\n muted={muted}\n align={textAlign}\n size={fontSize}\n textOverflow=\"ellipsis\"\n weight={textWeight ?? button.textWeight}\n >\n {text}\n </Text>\n </Box>\n )}\n\n {IconRightComponent && (\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n )}\n </Flex>\n </Box>\n )}\n\n {children && (\n <Box as=\"span\" {...boxProps}>\n {children}\n </Box>\n )}\n </StyledButton>","Boolean(loading || disabled)","selected ? '' : undefined","_c"],"sources":["../src/core/primitives/spinner/spinner.css.ts","../src/core/primitives/spinner/spinner.tsx","../src/core/primitives/button/styles.ts","../src/core/primitives/button/button.css.ts","../src/core/primitives/button/button.tsx"],"sourcesContent":["import {css, keyframes} from '#styled-system/css'\n\nconst rotate = keyframes({\n from: {transform: 'rotate(0deg)'},\n to: {transform: 'rotate(360deg)'},\n})\n\nconst size = 'round(1em, 2px)'\nexport const spinnerIcon = css({\n animation: `${rotate} 500ms linear infinite`,\n // Prevents a wobbly spinner on Safari\n height: size,\n width: size,\n})\n","import {SpinnerIcon} from '@sanity/icons/Spinner'\n\nimport {Text} from '../text/text'\n\nimport {spinnerIcon} from './spinner.css'\n\n/**\n * @public\n */\nexport interface SpinnerProps {\n muted?: boolean\n size?: number | number[]\n}\n\n/**\n * Indicate that something is loading for an indeterminate amount of time.\n *\n * @public\n */\nexport function Spinner(\n props: SpinnerProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'size'>,\n) {\n return (\n <Text data-ui=\"Spinner\" {...props}>\n <SpinnerIcon className={spinnerIcon} />\n </Text>\n )\n}\n","import {css} from 'styled-components'\n\nimport {ThemeColorCard_v2} from '../../../theme/system/color/color'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_cardColorStyle} from '../../styles/card/_cardColorStyle'\nimport {focusRingBorderStyle, focusRingStyle} from '../../styles/focusRing'\nimport {ThemeProps} from '../../styles/types'\nimport {ButtonMode, ButtonTone} from '../../types/button'\n\nfunction buttonToneColor(\n base: ThemeColorCard_v2,\n {$mode, $tone}: {$mode: ButtonMode; $tone: ButtonTone},\n) {\n const mode = base.button[$mode] || base.button.default\n\n return mode[$tone] || mode.default\n}\n\n/**\n * @internal\n */\nexport function buttonBaseStyles(props: ThemeProps): ReturnType<typeof css> {\n const {button} = getTheme_v2(props.theme)\n const borderBoxShadow = focusRingBorderStyle({\n width: button.border.width,\n color: 'var(--card-border-color)',\n })\n\n return css`\n /* Stays here: Breadcrumbs' expand button overrides it at equal specificity */\n margin: 0;\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n box-shadow: ${borderBoxShadow};\n\n &:not([data-disabled='true']) {\n &:focus:not(:focus-visible) {\n box-shadow: ${borderBoxShadow};\n }\n }\n `\n}\n\n/**\n * @internal\n */\nexport function buttonColorStyles(\n props: {$mode: ButtonMode; $tone: ButtonTone} & ThemeProps,\n): ReturnType<typeof css> {\n const {color: baseColor} = getTheme_v2(props.theme)\n const color = buttonToneColor(baseColor, props)\n\n return css`\n ${_cardColorStyle(baseColor, color.enabled)}\n\n &:not([data-disabled='true']) {\n @media (hover: hover) {\n &:hover {\n ${_cardColorStyle(baseColor, color.hovered)}\n }\n\n &:active {\n ${_cardColorStyle(baseColor, color.pressed)}\n }\n\n &[data-hovered] {\n ${_cardColorStyle(baseColor, color.hovered)}\n }\n }\n\n &[data-selected] {\n ${_cardColorStyle(baseColor, color.pressed)}\n }\n }\n `\n}\n\n/**\n * @internal\n */\nexport function buttonDisabledAndFocusStyles(\n props: {$mode: ButtonMode; $tone: ButtonTone} & ThemeProps,\n): ReturnType<typeof css> {\n const {button, color: baseColor} = getTheme_v2(props.theme)\n const color = buttonToneColor(baseColor, props)\n\n return css`\n &:disabled,\n &[data-disabled='true'] {\n ${_cardColorStyle(baseColor, color.disabled)}\n }\n\n &:not([data-disabled='true']):focus {\n box-shadow: ${focusRingStyle({\n base: baseColor,\n border: {width: 2, color: baseColor.bg},\n focusRing: button.focusRing,\n })};\n }\n `\n}\n\n/**\n * @internal\n */\nexport function buttonStyles(props: ThemeProps): ReturnType<typeof css> {\n const {style} = getTheme_v2(props.theme)\n\n return css`\n ${style?.button?.root}\n `\n}\n","import {css, firstThatWorks} from '#styled-system/css'\n\nexport const buttonRoot = css({\n 'WebkitFontSmoothing': 'inherit',\n 'appearance': 'none',\n 'display': 'inline-flex',\n 'alignItems': 'center',\n 'font': 'inherit',\n 'border': 0,\n 'outline': 'none',\n 'userSelect': 'none',\n 'textDecoration': 'none',\n 'boxSizing': 'border-box',\n 'padding': 0,\n 'whiteSpace': 'nowrap',\n 'textAlign': 'left',\n 'position': 'relative',\n 'verticalAlign': 'top',\n '&::-moz-focus-inner': {\n border: 0,\n padding: 0,\n },\n '& > span': {\n display: 'block',\n flex: 1,\n minWidth: 0,\n borderRadius: 'inherit',\n },\n})\n\nexport const buttonWidthFill = css({\n width: firstThatWorks('stretch', '-webkit-fill-available', '-moz-available'),\n})\n\nexport const buttonLoadingBox = css({\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'var(--card-bg-color)',\n borderRadius: 'inherit',\n zIndex: 1,\n boxShadow: 'inherit',\n})\n","import {isValidElement, useMemo} from 'react'\nimport {isValidElementType} from 'react-is'\nimport {styled} from 'styled-components'\n\nimport {ThemeFontWeightKey} from '../../../theme/system/font'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {useTheme_v2} from '../../theme/useTheme'\nimport {ButtonMode, ButtonTextAlign, ButtonTone, ButtonWidth} from '../../types/button'\nimport {ElementType, Props} from '../../types/component'\nimport {FlexJustify} from '../../types/flex'\nimport {Box} from '../box/box'\nimport {Flex} from '../flex/flex'\nimport {Spinner} from '../spinner/spinner'\nimport {Text} from '../text/text'\nimport {ResponsivePaddingProps, ResponsiveRadiusProps} from '../types'\nimport {\n buttonBaseStyles,\n buttonColorStyles,\n buttonDisabledAndFocusStyles,\n buttonStyles,\n} from './styles'\n\nimport {buttonLoadingBox, buttonRoot, buttonWidthFill} from './button.css'\n\n/**\n * @public\n */\nexport interface ButtonOwnProps extends ResponsivePaddingProps, ResponsiveRadiusProps {\n fontSize?: number | number[]\n mode?: ButtonMode\n // oxlint-disable-next-line no-redundant-type-constituents\n icon?: React.ElementType | React.ReactNode\n // oxlint-disable-next-line no-redundant-type-constituents\n iconRight?: React.ElementType | React.ReactNode\n justify?: FlexJustify | FlexJustify[]\n /**\n * @beta Do not use in production, as this might change.\n */\n loading?: boolean\n selected?: boolean\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n gap?: number | number[]\n muted?: boolean\n text?: React.ReactNode\n textAlign?: ButtonTextAlign\n textWeight?: ThemeFontWeightKey\n tone?: ButtonTone\n type?: 'button' | 'reset' | 'submit'\n width?: ButtonWidth\n}\n\n/**\n * @public\n */\nexport type ButtonProps<E extends ElementType = 'button'> = Props<ButtonOwnProps, E>\n\n// The static rules live in `buttonRoot` in styles.css; `width=\"fill\"` is the\n// `buttonWidthFill` class on the last level\nconst ButtonBase = styled.button.attrs({className: buttonRoot})(buttonBaseStyles)\n\nconst ButtonColor = styled(ButtonBase)<{$mode: ButtonMode; $tone: ButtonTone}>(buttonColorStyles)\n\nconst ButtonDisabledAndFocus = styled(ButtonColor)<{$mode: ButtonMode; $tone: ButtonTone}>(\n buttonDisabledAndFocusStyles,\n)\n\nconst StyledButton = styled(ButtonDisabledAndFocus).attrs<{$width?: ButtonWidth}>((props) => ({\n className: props.$width === 'fill' ? buttonWidthFill : undefined,\n}))<{$width?: ButtonWidth} & ResponsiveRadiusStyleProps>(responsiveRadiusStyle, buttonStyles)\n\nfunction ButtonComponent(\n props: ButtonOwnProps & {as?: ElementType} & Omit<\n React.HTMLProps<HTMLButtonElement>,\n 'as' | 'width'\n >,\n) {\n const {\n children,\n disabled,\n ref,\n fontSize = 1,\n icon: IconComponent,\n iconRight: IconRightComponent,\n justify: justifyProp = 'center',\n loading,\n mode = 'default',\n padding: paddingProp = 3,\n paddingX: paddingXProp,\n paddingY: paddingYProp,\n paddingTop: paddingTopProp,\n paddingBottom: paddingBottomProp,\n paddingLeft: paddingLeftProp,\n paddingRight: paddingRightProp,\n radius: radiusProp = 2,\n selected,\n gap = 3,\n text,\n textAlign,\n textWeight,\n tone = 'default',\n type = 'button',\n muted = false,\n width,\n ...restProps\n } = props\n const {button} = useTheme_v2()\n\n const justify = _getArrayProp(justifyProp)\n const padding = _getArrayProp(paddingProp)\n const paddingX = _getArrayProp(paddingXProp)\n const paddingY = _getArrayProp(paddingYProp)\n const paddingTop = _getArrayProp(paddingTopProp)\n const paddingBottom = _getArrayProp(paddingBottomProp)\n const paddingLeft = _getArrayProp(paddingLeftProp)\n const paddingRight = _getArrayProp(paddingRightProp)\n const radius = _getArrayProp(radiusProp)\n const spacing = _getArrayProp(gap)\n\n const boxProps = useMemo(\n () => ({\n // flex: 1,\n padding,\n paddingX,\n paddingY,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n }),\n [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight],\n )\n\n return (\n <StyledButton\n data-ui=\"Button\"\n {...restProps}\n $mode={mode}\n $radius={radius}\n $tone={tone}\n data-disabled={Boolean(loading || disabled)}\n data-selected={selected ? '' : undefined}\n disabled={Boolean(loading || disabled)}\n ref={ref}\n type={type}\n $width={width}\n >\n {Boolean(loading) && (\n <div className={buttonLoadingBox} data-ui=\"ButtonLoading\">\n <Spinner />\n </div>\n )}\n\n {(IconComponent || text || IconRightComponent) && (\n <Box as=\"span\" {...boxProps}>\n <Flex as=\"span\" justify={justify} gap={spacing}>\n {IconComponent && (\n <Text size={fontSize}>\n {isValidElement(IconComponent) && IconComponent}\n {isValidElementType(IconComponent) && <IconComponent />}\n </Text>\n )}\n\n {text && (\n <Box>\n <Text\n muted={muted}\n align={textAlign}\n size={fontSize}\n textOverflow=\"ellipsis\"\n weight={textWeight ?? button.textWeight}\n >\n {text}\n </Text>\n </Box>\n )}\n\n {IconRightComponent && (\n <Text size={fontSize}>\n {isValidElement(IconRightComponent) && IconRightComponent}\n {isValidElementType(IconRightComponent) && <IconRightComponent />}\n </Text>\n )}\n </Flex>\n </Box>\n )}\n\n {children && (\n <Box as=\"span\" {...boxProps}>\n {children}\n </Box>\n )}\n </StyledButton>\n )\n}\n\n/**\n * @public\n */\nexport const Button: <E extends ElementType = 'button'>(\n props: ButtonProps<E>,\n) => React.JSX.Element = ButtonComponent\n"],"mappings":";;;;;;;;;;;AAQA,MAAA,cAA2B;;;;;;ACW3B,SAAgB,QACd,OACA;C,cAGIA;C,oDAAC,KAAA,oBAAA,aAAD,EAAa,WAAW,YAAc,CAAA,G;CADxCC,IAAAA;CADF,OAC8B,EAAA,OAAA,Q,aAA5B,KAAA,oBAAC,MAAD;EAAM,WAAQ;EAAU,GAAI;EAC1BD,UAAAA;CACI,CAAA,GAFsB,EAAA,KAAA,O,YAA5BC;AAIJ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nBC,IAAAA;CACoB,AAAA,EAAA,QAAA,YAAA,EAAA,QADpB,YACC,MAAA,YAAA,oBAAC,KAAD;EAAK,IAAG;EAAO,GAAI;EAChB;CACE,CAAA,GAFc,EAAA,MAAA,UADpB,EAAA,MAAA,U;CArDHC,IAAAA;CADF,OAIW,EAAA,QAAA,QAAA,EAAA,QACE,UAAA,EAAA,QAKJ,OAAA,EAAA,QAPD,aAAA,EAAA,QAIWC,OAAAA,EAAAA,QACAC,OAAAA,EAAAA,QACLD,OAAAA,EAAAA,QAKTL,OAAAA,EAAAA,QAMAC,OAAAA,EAAAA,QAkCAE,OAAAA,EAAAA,QAhDM,QAAA,EAAA,QAKD,QAAA,EAAA,QACE,SAXV,MAAA,qBAAC,cAAD;EACE,WAAQ;EACR,GAAI;EACJ,OAAO;EACP,SAAS;EACT,OAAO;EACP,iBAAeE;EACf,iBAAeC;EACf,UAAUD;EACL;EACC;EACN,QAAQ;EAXV,UAAA;GAaGL;GAMAC;GAkCAE;EAKW;C,IAvDL,EAAA,MAAA,MACE,EAAA,MAAA,QAKJ,EAAA,MAAA,KAPD,EAAA,MAAA,WAIWE,EAAAA,MAAAA,KACAC,EAAAA,MAAAA,KACLD,EAAAA,MAAAA,KAKTL,EAAAA,MAAAA,KAMAC,EAAAA,MAAAA,KAkCAE,EAAAA,MAAAA,KAhDM,EAAA,MAAA,MAKD,EAAA,MAAA,MACE,EAAA,MAAA,O,4BAXVC;AA4DJ;;;;AAKA,MAAa,SAEY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flex-ohP2jG9d.js","names":["direction = 'row'","_getArrayProp(align)","_getArrayProp(direction)","_getArrayProp(gap)","_getArrayProp(justify)","_getArrayProp(wrap)","<StyledFlex\n data-ui=\"Flex\"\n {...restProps}\n $align={_getArrayProp(align)}\n $direction={_getArrayProp(direction)}\n $gap={_getArrayProp(gap)}\n $justify={_getArrayProp(justify)}\n $wrap={_getArrayProp(wrap)}\n forwardedAs={as}\n ref={ref}\n />","_c"],"sources":["../src/core/styles/flex/flexStyle.ts","../src/core/primitives/flex/flex.tsx"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, _ruleSet, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveFlexStyleProps} from './types'\n\nconst BASE_STYLE: CSSObject = {\n '&&:not([hidden])': {\n display: 'flex',\n },\n}\n\nconst RULES = _ruleSet(\n BASE_STYLE,\n responsiveFlexAlignStyle,\n responsiveFlexGapStyle,\n responsiveFlexWrapStyle,\n responsiveFlexJustifyStyle,\n responsiveFlexDirectionStyle,\n)\n\nexport function responsiveFlexStyle(): CSSObject[] {\n return RULES\n}\n\nfunction responsiveFlexAlignStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$align, (align) => {\n return {alignItems: align}\n })\n}\n\nfunction responsiveFlexGapStyle(props: ResponsiveFlexStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gap, (gap) => ({\n gap: gap ? rem(space[gap]) : undefined,\n }))\n}\n\nfunction responsiveFlexWrapStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$wrap, (wrap) => {\n return {flexWrap: wrap}\n })\n}\n\nfunction responsiveFlexJustifyStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$justify, (justify) => {\n return {justifyContent: justify}\n })\n}\n\nfunction responsiveFlexDirectionStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$direction, (direction) => {\n return {flexDirection: direction}\n })\n}\n","import {styled} from 'styled-components'\n\nimport {flexItemStyle} from '../../styles/flex/flexItemStyle'\nimport {responsiveFlexStyle} from '../../styles/flex/flexStyle'\nimport {FlexItemStyleProps, ResponsiveFlexStyleProps} from '../../styles/flex/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {ResponsiveFlexItemProps, ResponsiveFlexProps} from '../types'\n\n/**\n * @public\n */\nexport interface FlexOwnProps\n extends Omit<BoxOwnProps, 'display'>, ResponsiveFlexProps, ResponsiveFlexItemProps {\n gap?: number | number[]\n}\n\n/**\n * @public\n */\nexport type FlexProps<E extends ElementType = 'div'> = Props<FlexOwnProps, E>\n\nconst StyledFlex = styled(Box)<FlexItemStyleProps & ResponsiveFlexStyleProps>(\n flexItemStyle,\n responsiveFlexStyle,\n)\n\nfunction FlexComponent(\n props: FlexOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'wrap'>,\n) {\n const {align, as, direction = 'row', gap, justify, ref, wrap, ...restProps} = props\n\n return (\n <StyledFlex\n data-ui=\"Flex\"\n {...restProps}\n $align={_getArrayProp(align)}\n $direction={_getArrayProp(direction)}\n $gap={_getArrayProp(gap)}\n $justify={_getArrayProp(justify)}\n $wrap={_getArrayProp(wrap)}\n forwardedAs={as}\n ref={ref}\n />\n )\n}\n\n/**\n * The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Flex = FlexComponent as unknown as <E extends ElementType = 'div'>(\n props: FlexProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;AAYA,MAAM,QAAQ,SACZ,EANA,oBAAoB,EAClB,SAAS,OACX,EAIA,GACA,0BACA,wBACA,yBACA,4BACA,4BACF;AAEA,SAAgB,sBAAmC;CACjD,OAAO;AACT;AAEA,SAAS,yBAAyB,OAA2D;CAC3F,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,SAAS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,IAAAA;CAAc,AAAA,EAAA,QAAA,U,cAAd,KAAA,cAAc,OAAO,GAAP,EAAA,MAAA,S;CACjBC,IAAAA;CAAc,AAAA,EAAA,QAAA,O,cAAd,KAAA,cAAc,IAAI,GAAJ,EAAA,MAAA,M;CAPvBC,IAAAA;CADF,OASiB,EAAA,QAAA,MAAA,EAAA,QACR,OAAA,EAAA,QAPD,aAAA,EAAA,QACIL,MAAAA,EAAAA,QACIC,MAAAA,EAAAA,QACNC,MAAAA,EAAAA,QACIC,MAAAA,EAAAA,QACHC,MAPT,KAAA,oBAAC,YAAD;EACE,WAAQ;EACR,GAAI;EACJ,QAAQJ;EACR,YAAYC;EACZ,MAAMC;EACN,UAAUC;EACV,OAAOC;EACP,aAAa;EACR;CACN,CAAA,GAFc,EAAA,MAAA,IACR,EAAA,MAAA,KAPD,EAAA,MAAA,WACIJ,EAAAA,MAAAA,IACIC,EAAAA,MAAAA,IACNC,EAAAA,MAAAA,IACIC,EAAAA,MAAAA,IACHC,EAAAA,MAAAA,I,0BAPTC;AAYJ;;;;;;AAQA,MAAa,OAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grid-D-gOpN8z.js","names":["_getArrayProp(autoRows)","_getArrayProp(autoCols)","_getArrayProp(autoFlow)","_getArrayProp(gridTemplateColumns)","_getArrayProp(gap)","_getArrayProp(gapX)","_getArrayProp(gapY)","_getArrayProp(gridTemplateRows)","<StyledGrid\n data-as={typeof as === 'string' ? as : undefined}\n data-ui=\"Grid\"\n {...restProps}\n $autoRows={_getArrayProp(autoRows)}\n $autoCols={_getArrayProp(autoCols)}\n $autoFlow={_getArrayProp(autoFlow)}\n $columns={_getArrayProp(gridTemplateColumns)}\n $gap={_getArrayProp(gap)}\n $gapX={_getArrayProp(gapX)}\n $gapY={_getArrayProp(gapY)}\n $rows={_getArrayProp(gridTemplateRows)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledGrid>","typeof as === 'string' ? as : undefined","_c"],"sources":["../src/core/styles/grid/gridStyle.ts","../src/core/primitives/grid/grid.tsx"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, _ruleSet, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveGridStyleProps} from './types'\n\nconst GRID_CSS = {\n '&&:not([hidden])': {\n display: 'grid',\n },\n '&[data-as=\"ul\"],&[data-as=\"ol\"]': {\n listStyle: 'none',\n },\n}\n\nconst GRID_AUTO_COLUMS = {\n auto: 'auto',\n min: 'min-content',\n max: 'max-content',\n fr: 'minmax(0, 1fr)',\n}\n\nconst GRID_AUTO_ROWS = {\n auto: 'auto',\n min: 'min-content',\n max: 'max-content',\n fr: 'minmax(0, 1fr)',\n}\n\nconst RULES = _ruleSet(\n GRID_CSS,\n responsiveGridAutoFlowStyle,\n responsiveGridAutoRowsStyle,\n responsiveGridAutoColsStyle,\n responsiveGridColumnsStyle,\n responsiveGridRowsStyle,\n responsiveGridGapStyle,\n responsiveGridGapXStyle,\n responsiveGridGapYStyle,\n)\n\nexport function responsiveGridStyle(): CSSObject[] {\n return RULES\n}\n\nfunction responsiveGridAutoFlowStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoFlow, (autoFlow) => ({\n gridAutoFlow: autoFlow,\n }))\n}\n\nfunction responsiveGridAutoRowsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoRows, (autoRows) => ({\n gridAutoRows: autoRows && GRID_AUTO_ROWS[autoRows],\n }))\n}\n\nfunction responsiveGridAutoColsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$autoCols, (autoCols) => ({\n gridAutoColumns: autoCols && GRID_AUTO_COLUMS[autoCols],\n }))\n}\n\nfunction responsiveGridColumnsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$columns, (columns) => ({\n gridTemplateColumns: columns && `repeat(${columns},minmax(0,1fr));`,\n }))\n}\n\nfunction responsiveGridRowsStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$rows, (rows) => ({\n gridTemplateRows: rows && `repeat(${rows},minmax(0,1fr));`,\n }))\n}\n\nfunction responsiveGridGapStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gap, (gap) => ({\n // oxlint-disable-next-line no-deprecated\n gridGap: gap ? rem(space[gap]) : undefined,\n }))\n}\n\nfunction responsiveGridGapXStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gapX, (gapX) => ({\n columnGap: gapX ? rem(space[gapX]) : undefined,\n }))\n}\n\nfunction responsiveGridGapYStyle(props: ResponsiveGridStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gapY, (gapY) => ({\n rowGap: gapY ? rem(space[gapY]) : undefined,\n }))\n}\n","import {styled} from 'styled-components'\n\nimport {responsiveGridStyle} from '../../styles/grid/gridStyle'\nimport {ResponsiveGridStyleProps} from '../../styles/grid/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {ResponsiveGridProps} from '../types'\n\n/**\n * @public\n */\nexport interface GridOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveGridProps {}\n\n/**\n * @public\n */\nexport type GridProps<E extends ElementType = 'div'> = Props<GridOwnProps, E>\n\nconst StyledGrid = styled(Box)<ResponsiveGridStyleProps>(responsiveGridStyle)\n\nfunction GridComponent(\n props: GridOwnProps & {as?: ElementType} & Omit<\n React.HTMLProps<HTMLDivElement>,\n 'as' | 'height' | 'rows'\n >,\n) {\n const {\n as,\n autoRows,\n autoCols,\n autoFlow,\n gridTemplateColumns,\n gap,\n gapX,\n gapY,\n gridTemplateRows,\n children,\n ref,\n ...restProps\n } = props\n\n return (\n <StyledGrid\n data-as={typeof as === 'string' ? as : undefined}\n data-ui=\"Grid\"\n {...restProps}\n $autoRows={_getArrayProp(autoRows)}\n $autoCols={_getArrayProp(autoCols)}\n $autoFlow={_getArrayProp(autoFlow)}\n $columns={_getArrayProp(gridTemplateColumns)}\n $gap={_getArrayProp(gap)}\n $gapX={_getArrayProp(gapX)}\n $gapY={_getArrayProp(gapY)}\n $rows={_getArrayProp(gridTemplateRows)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledGrid>\n )\n}\n\n/**\n * The `Grid` component is for building 2-dimensional layers (based on CSS grid).\n *\n * @public\n */\nexport const Grid: <E extends ElementType = 'div'>(props: GridProps<E>) => React.JSX.Element =\n GridComponent\n"],"mappings":";;;;;;AAMA,MAAM,WAAW;CACf,oBAAoB,EAClB,SAAS,OACX;CACA,uCAAmC,EACjC,WAAW,OACb;AACF,GAEM,mBAAmB;CACvB,MAAM;CACN,KAAK;CACL,KAAK;CACL,IAAI;AACN,GAEM,iBAAiB;CACrB,MAAM;CACN,KAAK;CACL,KAAK;CACL,IAAI;AACN,GAEM,QAAQ,SACZ,UACA,6BACA,6BACA,6BACA,4BACA,yBACA,wBACA,yBACA,uBACF;AAEA,SAAgB,sBAAmC;CACjD,OAAO;AACT;AAEA,SAAS,4BAA4B,OAA8C;CACjF,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,YAAY,cAAc,EACxD,cAAc,SAChB,EAAE;AACJ;AAEA,SAAS,4BAA4B,OAA8C;CACjF,IAAM,EAAC,UAAS,YAAY,MAAM,KAAK;CAEvC,OAAO,YAAY,OAAO,MAAM,YAAY,cAAc,EACxD,cAAc,YAAY,eAAe,UAC3C,EAAE;AACJ;A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UAAUC;EACV,MAAMC;EACN,OAAOC;EACP,OAAOC;EACP,OAAOC;EACP,aAAa;EACR;EAEJ;CACS,CAAA,GAJG,EAAA,MAAA,IAGZ,EAAA,MAAA,UAFI,EAAA,MAAA,KAVD,EAAA,MAAA,WAFKE,EAAAA,MAAAA,IAGET,EAAAA,MAAAA,IACAC,EAAAA,MAAAA,IACAC,EAAAA,MAAAA,IACDC,EAAAA,MAAAA,IACJC,EAAAA,MAAAA,IACCC,EAAAA,MAAAA,IACAC,EAAAA,MAAAA,IACAC,EAAAA,MAAAA,I,0BAXTC;AAkBJ;;;;;;AAOA,MAAa,OACX"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hotkeys-Bd5rZOMO.js","names":["(event: KeyboardEvent) => onKeyDown(event)","() => {\n const handler = (event: KeyboardEvent) => handleKeyDown(event)\n\n window.addEventListener('keydown', handler, options)\n\n return () => window.removeEventListener('keydown', handler, options)\n }","event","[options]","_c","Children.map(childrenProp, (child) => child && <div>{child}</div>)","(child) => child && <div>{child}</div>","useMemo(\n () => Children.map(childrenProp, (child) => child && <div>{child}</div>),\n [childrenProp],\n )","_getArrayProp(gap)","<StyledInline\n data-ui=\"Inline\"\n {...restProps}\n $space={_getArrayProp(gap)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledInline>","_c","fontSize = 0","padding = 1","radius = 2","_getArrayProp(radius)","<Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>","<Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>","<StyledKBD data-ui=\"KBD\" {...restProps} $radius={_getArrayProp(radius)} ref={ref}>\n <Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>\n </StyledKBD>","_c","gap = 0.5","_getArrayProp(gap)","<></>","clsx(hotkeys, className)","keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key key={i} fontSize={fontSize} padding={padding} radius={radius}>\n {key}\n </Key>\n ))","(key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key key={i} fontSize={fontSize} padding={padding} radius={radius}>\n {key}\n </Key>\n )","<Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key key={i} fontSize={fontSize} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>","<kbd className={clsx(hotkeys, className)} data-ui=\"Hotkeys\" ref={ref} {...restProps}>\n <Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key key={i} fontSize={fontSize} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>\n </kbd>","_c","_Fragment","\"lineHeight\"","\"margin\""],"sources":["../src/core/hooks/useGlobalKeyDown.ts","../src/core/primitives/inline/styles.ts","../src/core/primitives/inline/inline.tsx","../src/core/primitives/kbd/kbd.tsx","../src/core/components/hotkeys/hotkeys.css.ts","../src/core/components/hotkeys/hotkeys.tsx"],"sourcesContent":["import {useEffect} from 'react'\n// TODO: switch to `useEffectEvent` from `react` once\n// https://github.com/facebook/react/issues/34818 is fixed in the lowest React\n// version we support: on React 19.2 the native hook never sees values past\n// the first render when the calling component is wrapped in `forwardRef` or\n// `memo`. This public hook runs in the fiber of whatever component calls it\n// (consumers may call it from `forwardRef` or `memo` components).\nimport {useEffectEvent} from 'use-effect-event'\n\n/**\n * Adds global keydown event listener to the window.\n *\n * @param onKeyDown - The function to call when a keydown event is triggered.\n * @param options - The options to pass to the addEventListener function (example, capture: true)\n * @beta\n */\nexport function useGlobalKeyDown(\n onKeyDown: (event: KeyboardEvent) => void,\n options?: AddEventListenerOptions,\n): void {\n const handleKeyDown = useEffectEvent((event: KeyboardEvent) => onKeyDown(event))\n\n useEffect(() => {\n const handler = (event: KeyboardEvent) => handleKeyDown(event)\n\n window.addEventListener('keydown', handler, options)\n\n return () => window.removeEventListener('keydown', handler, options)\n }, [options])\n}\n","import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../../styles/helpers'\nimport {ThemeProps} from '../../styles/types'\nimport {ResponsiveInlineSpaceStyleProps} from './types'\n\nexport function inlineBaseStyle(): CSSObject {\n return {\n 'lineHeight': '0',\n\n '&&:not([hidden])': {\n display: 'block',\n },\n\n '& > div': {\n display: 'inline-block',\n verticalAlign: 'middle',\n },\n }\n}\n\nexport function inlineSpaceStyle(props: ResponsiveInlineSpaceStyleProps & ThemeProps): CSSObject[] {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$space, (spaceIndex) => {\n const _space = rem(spaceIndex === 0.5 ? space[1] / 2 : space[spaceIndex])\n\n return {\n 'margin': `-${_space} 0 0 -${_space}`,\n '& > div': {padding: `${_space} 0 0 ${_space}`},\n }\n })\n}\n","import {Children, useMemo} from 'react'\nimport {styled} from 'styled-components'\n\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {inlineBaseStyle, inlineSpaceStyle} from './styles'\nimport {ResponsiveInlineSpaceStyleProps} from './types'\n\n/**\n * @public\n */\nexport interface InlineOwnProps extends Omit<BoxOwnProps, 'display'> {\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n /** The spacing between children. */\n gap?: number | number[]\n}\n\n/**\n * @public\n */\nexport type InlineProps<E extends ElementType = 'div'> = Props<InlineOwnProps, E>\n\nconst StyledInline = styled(Box)<ResponsiveInlineSpaceStyleProps>(inlineBaseStyle, inlineSpaceStyle)\n\nfunction InlineComponent(\n props: InlineOwnProps & {as?: ElementType} & React.HTMLProps<HTMLDivElement>,\n) {\n const {as, children: childrenProp, gap, ref, ...restProps} = props\n\n const children = useMemo(\n () => Children.map(childrenProp, (child) => child && <div>{child}</div>),\n [childrenProp],\n )\n\n return (\n <StyledInline\n data-ui=\"Inline\"\n {...restProps}\n $space={_getArrayProp(gap)}\n forwardedAs={as}\n ref={ref}\n >\n {children}\n </StyledInline>\n )\n}\n\n/**\n * The `Inline` component is a layout utility for aligning and spacing items horizontally.\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Inline = InlineComponent as unknown as <E extends ElementType = 'div'>(\n props: InlineProps<E>,\n) => React.JSX.Element\n","import {css, styled} from 'styled-components'\n\nimport {_getArrayProp} from '../../styles/helpers'\nimport {responsiveRadiusStyle} from '../../styles/radius/radiusStyle'\nimport {ResponsiveRadiusStyleProps} from '../../styles/radius/types'\nimport {ElementType, Props} from '../../types/component'\nimport {Radius} from '../../types/radius'\nimport {Box} from '../box/box'\nimport {Text} from '../text/text'\n\n/**\n * @public\n */\nexport interface KBDOwnProps {\n fontSize?: number | number[]\n padding?: number | number[]\n radius?: Radius | Radius[]\n}\n\n/**\n * @public\n */\nexport type KBDProps<E extends ElementType = 'kbd'> = Props<KBDOwnProps, E>\n\nconst kbdBaseStyle = css`\n --card-bg-color: var(--card-kbd-bg-color);\n --card-border-color: var(--card-kbd-border-color);\n --card-fg-color: var(--card-kbd-fg-color);\n\n box-shadow: inset 0 0 0 1px var(--card-border-color);\n background: var(--card-bg-color);\n font: inherit;\n\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n`\n\nconst KBDBase = styled.kbd`\n ${kbdBaseStyle}\n`\n\nconst StyledKBD = styled(KBDBase)<ResponsiveRadiusStyleProps>(responsiveRadiusStyle)\n\nfunction KBDComponent(\n props: KBDOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'>,\n) {\n const {children, fontSize = 0, padding = 1, radius = 2, ref, ...restProps} = props\n\n return (\n <StyledKBD data-ui=\"KBD\" {...restProps} $radius={_getArrayProp(radius)} ref={ref}>\n <Box as=\"span\" padding={padding}>\n <Text as=\"span\" size={fontSize} weight=\"semibold\">\n {children}\n </Text>\n </Box>\n </StyledKBD>\n )\n}\n\n/**\n * Used to define some text as keyboard input.\n *\n * @public\n */\nexport const KBD: <E extends ElementType = 'kbd'>(props: KBDProps<E>) => React.JSX.Element =\n KBDComponent\n","import {css} from '#styled-system/css'\n\nexport const hotkeys = css({\n 'font': 'inherit',\n 'padding': '1px',\n '&:not([hidden])': {\n display: 'block',\n },\n})\n","import {clsx} from 'clsx/lite'\nimport {styled} from 'styled-components'\n\nimport {Inline} from '../../primitives/inline/inline'\nimport {KBD} from '../../primitives/kbd/kbd'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {Radius} from '../../types/radius'\n\nimport {hotkeys} from './hotkeys.css'\n\n/**\n * @public\n */\nexport interface HotkeysProps {\n fontSize?: number | number[]\n gap?: number | number[]\n padding?: number | number[]\n radius?: Radius | Radius[]\n /**\n * @deprecated Use `gap` instead.\n */\n space?: never\n keys?: string[]\n}\n\n// Stays on styled-components: `display: block` must beat KBD's runtime\n// `display: inline-block` at equal specificity, which needs both rules in the\n// runtime stylesheet.\nconst Key = styled(KBD)`\n &:not([hidden]) {\n display: block;\n }\n`\n\n/**\n * Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.\n *\n * @public\n */\nexport function Hotkeys(props: HotkeysProps & Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'>) {\n const {className, fontSize, gap = 0.5, keys, padding, radius, ref, ...restProps} = props\n const spacing = _getArrayProp(gap)\n\n if (!keys || keys.length === 0) {\n return <></>\n }\n\n return (\n <kbd className={clsx(hotkeys, className)} data-ui=\"Hotkeys\" ref={ref} {...restProps}>\n <Inline as=\"span\" gap={spacing}>\n {keys.map((key, i) => (\n // oxlint-disable-next-line no-array-index-key\n <Key key={i} fontSize={fontSize} padding={padding} radius={radius}>\n {key}\n </Key>\n ))}\n </Inline>\n </kbd>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBA,SAAgB,iBACd,WACA,SACM;C,cAC+BA;CAA0B,AAAA,EAAA,OAAA,Y,aAA1B,MAAC,UAAyB,UAAU,KA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KAAK,MAEd,oBAAC,KAAD;GAAuB;GAAmB;GAAiB;GACxD,UAAA;EACE,GAFK,CAEL,GAFkB,EAAA,MAAA,UAAmB,EAAA,MAAA,SAAiB,EAAA,MAAA,Q,0BAF5D,KAAA,KAAK,IAAIA,EAKT,GAHwB,EAAA,MAAA,UAFxB,EAAA,MAAA,MAE2C,EAAA,MAAA,SAAiB,EAAA,MAAA,Q;;CAH/DC,IAAAA;CAAuB,AAAA,EAAA,QAAA,WAAA,EAAA,QACpBF,MADH,KAAA,oBAAC,QAAD;EAAQ,IAAG;EAAO,KAAK;EACpBA,UAAAA;CAMK,CAAA,GAPe,EAAA,MAAA,SACpBA,EAAAA,MAAAA,I;CAFLG,IAAAA;CADF,OACmE,EAAA,QAAA,OAAA,EAAA,QAAS,aAAA,EAAA,QAA1DJ,MAAAA,EAAAA,QACdG,MADF,KAAA,oBAAC,OAAD;EAAK,WAAWH;EAA0B,WAAQ;EAAe;EAAK,GAAI;EACxEG,UAAAA;CAQG,CAAA,GAT4D,EAAA,MAAA,KAAS,EAAA,MAAA,WAA1DH,EAAAA,MAAAA,IACdG,EAAAA,MAAAA,I,0BADFC;AAWJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layer-umnlcWXZ.js","names":["as = 'div'","style = EMPTY_RECORD","() => ref.current","() => {\n const becameTopLayer = isTopLayerRef.current !== isTopLayer && isTopLayer\n\n if (becameTopLayer) {\n onActivate?.({activeElement: lastFocusedRef.current})\n }\n\n isTopLayerRef.current = isTopLayer\n }","[isTopLayer, onActivate]","(event: FocusEvent<HTMLDivElement, Element>) => {\n // Call the user-provided onFocus handler if any\n onFocus?.(event)\n\n const rootElement = ref.current\n const target = document.activeElement\n\n if (!isTopLayer || !rootElement || !target) return\n\n if (isHTMLElement(target) && containsOrEqualsElement(rootElement, target)) {\n lastFocusedRef.current = target\n }\n }","useCallback(\n // oxlint-disable-next-line no-unnecessary-type-arguments\n (event: FocusEvent<HTMLDivElement, Element>) => {\n // Call the user-provided onFocus handler if any\n onFocus?.(event)\n\n const rootElement = ref.current\n const target = document.activeElement\n\n if (!isTopLayer || !rootElement || !target) return\n\n if (isHTMLElement(target) && containsOrEqualsElement(rootElement, target)) {\n lastFocusedRef.current = target\n }\n },\n [isTopLayer, onFocus],\n )","clsx(layer, className)","{...style, zIndex}","<Component\n data-ui=\"Layer\"\n {...restProps}\n className={clsx(layer, className)}\n onFocus={handleFocus}\n ref={ref}\n style={{...style, zIndex}}\n >\n {children}\n </Component>","zOffset = 1","<LayerChildren {...restProps}>{children}</LayerChildren>","<LayerProvider zOffset={zOffset}>\n <LayerChildren {...restProps}>{children}</LayerChildren>\n </LayerProvider>","_c"],"sources":["../src/core/utils/layer/layer.css.ts","../src/core/utils/layer/layer.tsx"],"sourcesContent":["import {css} from '#styled-system/css'\n\nexport const layer = css({\n position: 'relative',\n})\n","import {clsx} from 'clsx/lite'\nimport {FocusEvent, useCallback, useEffect, useImperativeHandle, useRef} from 'react'\n\nimport {EMPTY_RECORD} from '../../constants'\nimport {containsOrEqualsElement, isHTMLElement} from '../../helpers/element'\nimport {LayerProvider} from './layerProvider'\nimport {useLayer} from './useLayer'\n\nimport {layer} from './layer.css'\n\n/**\n * @public\n */\nexport interface LayerProps {\n as?: React.ElementType | keyof React.JSX.IntrinsicElements\n /** A callback that fires when the layer becomes the top layer when it was not the top layer before. */\n onActivate?: (props: {activeElement: HTMLElement | null}) => void\n zOffset?: number | number[]\n}\n\ninterface LayerChildrenProps {\n as?: React.ElementType | keyof React.JSX.IntrinsicElements\n onActivate?: LayerProps['onActivate']\n}\n\nfunction LayerChildren(props: LayerChildrenProps & Omit<React.HTMLProps<HTMLDivElement>, 'as'>) {\n const {\n as = 'div',\n children,\n className,\n onActivate,\n onFocus,\n ref: forwardedRef,\n style = EMPTY_RECORD,\n ...restProps\n } = props\n const {zIndex, isTopLayer} = useLayer()\n const lastFocusedRef = useRef<HTMLElement | null>(null)\n const ref = useRef<HTMLDivElement | null>(null)\n const isTopLayerRef = useRef<boolean>(isTopLayer)\n\n useImperativeHandle<HTMLDivElement | null, HTMLDivElement | null>(forwardedRef, () => ref.current)\n\n // When the layer very first mounts, it will be the top layer, but we don't want to fire\n // the callback in that case. We use a ref to track the previous value of isTopLayer to\n // determine if the layer has become the top layer since the last render.\n useEffect(() => {\n const becameTopLayer = isTopLayerRef.current !== isTopLayer && isTopLayer\n\n if (becameTopLayer) {\n onActivate?.({activeElement: lastFocusedRef.current})\n }\n\n isTopLayerRef.current = isTopLayer\n }, [isTopLayer, onActivate])\n\n const handleFocus = useCallback(\n // oxlint-disable-next-line no-unnecessary-type-arguments\n (event: FocusEvent<HTMLDivElement, Element>) => {\n // Call the user-provided onFocus handler if any\n onFocus?.(event)\n\n const rootElement = ref.current\n const target = document.activeElement\n\n if (!isTopLayer || !rootElement || !target) return\n\n if (isHTMLElement(target) && containsOrEqualsElement(rootElement, target)) {\n lastFocusedRef.current = target\n }\n },\n [isTopLayer, onFocus],\n )\n\n // Rendering the polymorphic `as` needs one concrete element type for JSX to\n // type-check the div-flavored props (the same widening styled-components'\n // `as` prop performed here before).\n // oxlint-disable-next-line no-unsafe-type-assertion\n const Component = as as 'div'\n\n return (\n <Component\n data-ui=\"Layer\"\n {...restProps}\n className={clsx(layer, className)}\n onFocus={handleFocus}\n ref={ref}\n style={{...style, zIndex}}\n >\n {children}\n </Component>\n )\n}\n\n/**\n * @public\n */\nexport function Layer(props: LayerProps & Omit<React.HTMLProps<HTMLDivElement>, 'as'>) {\n const {children, zOffset = 1, ...restProps} = props\n\n return (\n <LayerProvider zOffset={zOffset}>\n <LayerChildren {...restProps}>{children}</LayerChildren>\n </LayerProvider>\n )\n}\n"],"mappings":";;;;;;;ACyBA,SAAS,cAAc,OAAyE;C,eAG5F,UACA,WAGK,cAFL,YACA,SAGG,WAPHA,IAMAC;CAEE,AAAA,EAAA,OAAA,S,sIATE,CACJ,IAAA,IACA,UACA,WACA,YACA,SACA,KAAK,cACL,OAAA,IACA,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