@sanity/ui 4.4.11 → 4.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/{_system-CTe2lb5l.d.ts → _system-DjnSx8gA.d.ts} +1 -1
  2. package/dist/{_system-CTe2lb5l.d.ts.map → _system-DjnSx8gA.d.ts.map} +1 -1
  3. package/dist/{arrow-CleOpGKV.js → arrow-BhooatHA.js} +2 -2
  4. package/dist/arrow-BhooatHA.js.map +1 -0
  5. package/dist/autocomplete.d.ts +3 -3
  6. package/dist/autocomplete.d.ts.map +1 -1
  7. package/dist/autocomplete.js +64 -63
  8. package/dist/autocomplete.js.map +1 -1
  9. package/dist/breadcrumbs.js +6 -6
  10. package/dist/breadcrumbs.js.map +1 -1
  11. package/dist/{button-dnqMFkWg.d.ts → button-DJ_N-Z82.d.ts} +5 -5
  12. package/dist/{button-dnqMFkWg.d.ts.map → button-DJ_N-Z82.d.ts.map} +1 -1
  13. package/dist/{button-DnJrhWml.js → button-GFefHUiY.js} +8 -8
  14. package/dist/button-GFefHUiY.js.map +1 -0
  15. package/dist/card-CEB9JLru.d.ts +7 -0
  16. package/dist/card-CEB9JLru.d.ts.map +1 -0
  17. package/dist/code.d.ts +1 -1
  18. package/dist/code.js +4 -4
  19. package/dist/code.js.map +1 -1
  20. package/dist/{component-DVlwaWB-.d.ts → component-CWyWF8Ut.d.ts} +1 -1
  21. package/dist/{component-DVlwaWB-.d.ts.map → component-CWyWF8Ut.d.ts.map} +1 -1
  22. package/dist/{element-BYgCE_iK.js → element-DIcKo4Jp.js} +1 -1
  23. package/dist/{element-BYgCE_iK.js.map → element-DIcKo4Jp.js.map} +1 -1
  24. package/dist/{elementSizeObserver-pevZfdGa.js → elementSizeObserver-CSI5StGC.js} +1 -1
  25. package/dist/{elementSizeObserver-pevZfdGa.js.map → elementSizeObserver-CSI5StGC.js.map} +1 -1
  26. package/dist/{factory-BzXTX8_Q.js → factory-D1M0GqJn.js} +3 -3
  27. package/dist/factory-D1M0GqJn.js.map +1 -0
  28. package/dist/{flex-ohP2jG9d.js → flex-DeU6k2uN.js} +4 -4
  29. package/dist/flex-DeU6k2uN.js.map +1 -0
  30. package/dist/{font-EtfxKPUz.d.ts → font-DI_tc5s8.d.ts} +1 -1
  31. package/dist/{font-EtfxKPUz.d.ts.map → font-DI_tc5s8.d.ts.map} +1 -1
  32. package/dist/{getElementRef-BLVMlHTn.js → getElementRef-5HypX0AT.js} +1 -1
  33. package/dist/getElementRef-5HypX0AT.js.map +1 -0
  34. package/dist/{getScopedTheme-C-sZsyAz.js → getScopedTheme-BJoqtbrb.js} +2 -2
  35. package/dist/{getScopedTheme-C-sZsyAz.js.map → getScopedTheme-BJoqtbrb.js.map} +1 -1
  36. package/dist/{getTheme_v2-y09KqtEb.js → getTheme_v2-CP5x_AcH.js} +1 -1
  37. package/dist/{getTheme_v2-y09KqtEb.js.map → getTheme_v2-CP5x_AcH.js.map} +1 -1
  38. package/dist/{grid-D-gOpN8z.js → grid-Bz_gKSjw.js} +4 -4
  39. package/dist/grid-Bz_gKSjw.js.map +1 -0
  40. package/dist/{helpers-XThPpWje.js → helpers-jp2T-bdR.js} +2 -2
  41. package/dist/{helpers-XThPpWje.js.map → helpers-jp2T-bdR.js.map} +1 -1
  42. package/dist/{hotkeys-Bd5rZOMO.js → hotkeys-B9h8uliL.js} +5 -5
  43. package/dist/hotkeys-B9h8uliL.js.map +1 -0
  44. package/dist/index.d.ts +8 -8
  45. package/dist/index.js +19 -19
  46. package/dist/index.js.map +1 -1
  47. package/dist/{layer-umnlcWXZ.js → layer-Bl7rtdZ_.js} +4 -4
  48. package/dist/layer-Bl7rtdZ_.js.map +1 -0
  49. package/dist/{layer-ChlP9Ik6.d.ts → layer-CAyooswI.d.ts} +1 -1
  50. package/dist/{layer-ChlP9Ik6.d.ts.map → layer-CAyooswI.d.ts.map} +1 -1
  51. package/dist/menu.d.ts +4 -4
  52. package/dist/menu.js +12 -12
  53. package/dist/menu.js.map +1 -1
  54. package/dist/{popover-qhIrQ_4V.js → popover-C-YWzo_l.js} +20 -15
  55. package/dist/popover-C-YWzo_l.js.map +1 -0
  56. package/dist/{popover-HDVgZg5e.d.ts → popover-DpHuX7yr.d.ts} +4 -4
  57. package/dist/{popover-HDVgZg5e.d.ts.map → popover-DpHuX7yr.d.ts.map} +1 -1
  58. package/dist/popover.d.ts +1 -1
  59. package/dist/popover.js +1 -1
  60. package/dist/{refractor-CC48DwHi.js → refractor-DeAFUFLp.js} +2 -2
  61. package/dist/refractor-DeAFUFLp.js.map +1 -0
  62. package/dist/{responsiveFont-Cyvxxz-G.js → responsiveFont-CfFXLc7o.js} +3 -3
  63. package/dist/{responsiveFont-Cyvxxz-G.js.map → responsiveFont-CfFXLc7o.js.map} +1 -1
  64. package/dist/{rgba-BSYaEUW6.d.ts → rgba-Hlu7P1jF.d.ts} +3 -3
  65. package/dist/{rgba-BSYaEUW6.d.ts.map → rgba-Hlu7P1jF.d.ts.map} +1 -1
  66. package/dist/selectable-2IHh9SLq.d.ts +7 -0
  67. package/dist/selectable-2IHh9SLq.d.ts.map +1 -0
  68. package/dist/{stack-DyrC2YfU.js → stack-DFRXALVU.js} +5 -5
  69. package/dist/stack-DFRXALVU.js.map +1 -0
  70. package/dist/{textInput-DhYi5cPT.js → textInput-cMQvSl5n.js} +7 -7
  71. package/dist/textInput-cMQvSl5n.js.map +1 -0
  72. package/dist/theme.d.ts +3 -3
  73. package/dist/theme.js +3 -3
  74. package/dist/toast.js +8 -8
  75. package/dist/toast.js.map +1 -1
  76. package/dist/tooltip.d.ts +2 -2
  77. package/dist/tooltip.js +9 -9
  78. package/dist/tooltip.js.map +1 -1
  79. package/dist/{useClickOutsideEvent-CC1zgOmv.js → useClickOutsideEvent-C-9cvlOu.js} +2 -2
  80. package/dist/useClickOutsideEvent-C-9cvlOu.js.map +1 -0
  81. package/dist/{useLayer-D_TnC6On.js → useLayer-DiYnwQ5T.js} +12 -12
  82. package/dist/useLayer-DiYnwQ5T.js.map +1 -0
  83. package/package.json +21 -21
  84. package/dist/arrow-CleOpGKV.js.map +0 -1
  85. package/dist/button-DnJrhWml.js.map +0 -1
  86. package/dist/card-C0a0wQTc.d.ts +0 -7
  87. package/dist/card-C0a0wQTc.d.ts.map +0 -1
  88. package/dist/factory-BzXTX8_Q.js.map +0 -1
  89. package/dist/flex-ohP2jG9d.js.map +0 -1
  90. package/dist/getElementRef-BLVMlHTn.js.map +0 -1
  91. package/dist/grid-D-gOpN8z.js.map +0 -1
  92. package/dist/hotkeys-Bd5rZOMO.js.map +0 -1
  93. package/dist/layer-umnlcWXZ.js.map +0 -1
  94. package/dist/popover-qhIrQ_4V.js.map +0 -1
  95. package/dist/refractor-CC48DwHi.js.map +0 -1
  96. package/dist/selectable-B0GUIL74.d.ts +0 -7
  97. package/dist/selectable-B0GUIL74.d.ts.map +0 -1
  98. package/dist/stack-DyrC2YfU.js.map +0 -1
  99. package/dist/textInput-DhYi5cPT.js.map +0 -1
  100. package/dist/useClickOutsideEvent-CC1zgOmv.js.map +0 -1
  101. package/dist/useLayer-D_TnC6On.js.map +0 -1
@@ -1,9 +1,9 @@
1
- import { a as _ruleSet, c as EMPTY_RECORD, i as _responsive, n as _getArrayProp, o as rem, r as _getResponsiveSpace } from "./helpers-XThPpWje.js";
2
- import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
3
- import { t as getScopedTheme } from "./getScopedTheme-C-sZsyAz.js";
1
+ import { a as _ruleSet, c as EMPTY_RECORD, i as _responsive, n as _getArrayProp, o as rem, r as _getResponsiveSpace } from "./helpers-jp2T-bdR.js";
2
+ import { t as getTheme_v2 } from "./getTheme_v2-CP5x_AcH.js";
3
+ import { t as getScopedTheme } from "./getScopedTheme-BJoqtbrb.js";
4
4
  import { c } from "react/compiler-runtime";
5
5
  import { createContext, useContext, useDebugValue, useEffect, useReducer, useSyncExternalStore } from "react";
6
- import { ThemeProvider, css, styled, useTheme } from "styled-components";
6
+ import { ThemeProvider as ThemeProvider$1, css, styled, useTheme as useTheme$1 } from "styled-components";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  import { isValidElementType } from "react-is";
9
9
  const BASE_STYLE = { "&[data-as=\"ul\"],&[data-as=\"ol\"]": { listStyle: "none" } }, BOX_SIZING = {
@@ -207,14 +207,14 @@ function responsiveRadiusStyle(props) {
207
207
  /**
208
208
  * @public
209
209
  */
210
- function useTheme$1() {
211
- return useTheme();
210
+ function useTheme() {
211
+ return useTheme$1();
212
212
  }
213
213
  /**
214
214
  * @public
215
215
  */
216
216
  function useTheme_v2() {
217
- let $ = c(2), t0 = useTheme(), t1;
217
+ let $ = c(2), t0 = useTheme$1(), t1;
218
218
  return $[0] === t0 ? t1 = $[1] : (t1 = getTheme_v2(t0), $[0] = t0, $[1] = t1), t1;
219
219
  }
220
220
  const cache = /* @__PURE__ */ new WeakMap();
@@ -394,7 +394,7 @@ const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null)
394
394
  /**
395
395
  * @public
396
396
  */
397
- function ThemeProvider$1(props) {
397
+ function ThemeProvider(props) {
398
398
  let $ = c(15), parentTheme = useContext(ThemeContext), { children } = props, scheme = props.scheme ?? (parentTheme?.scheme || "light"), rootTheme = props.theme ?? (parentTheme?.theme || null), tone = props.tone ?? (parentTheme?.tone || "default"), t0;
399
399
  bb0: {
400
400
  if (!rootTheme) {
@@ -424,7 +424,7 @@ function ThemeProvider$1(props) {
424
424
  return $[8] === Symbol.for("react.memo_cache_sentinel") ? (t2 = /* @__PURE__ */ jsx("pre", { children: "ThemeProvider: no \"theme\" property provided" }), $[8] = t2) : t2 = $[8], t2;
425
425
  }
426
426
  let t2;
427
- $[9] !== children || $[10] !== theme ? (t2 = /* @__PURE__ */ jsx(ThemeProvider, {
427
+ $[9] !== children || $[10] !== theme ? (t2 = /* @__PURE__ */ jsx(ThemeProvider$1, {
428
428
  theme,
429
429
  children
430
430
  }), $[9] = children, $[10] = theme, $[11] = t2) : t2 = $[11];
@@ -447,7 +447,7 @@ function useRootTheme() {
447
447
  */
448
448
  function ThemeColorProvider(props) {
449
449
  let $ = c(5), { children, scheme, tone } = props, root = useRootTheme(), t0 = scheme || root.scheme, t1;
450
- return $[0] !== children || $[1] !== root.theme || $[2] !== t0 || $[3] !== tone ? (t1 = /* @__PURE__ */ jsx(ThemeProvider$1, {
450
+ return $[0] !== children || $[1] !== root.theme || $[2] !== t0 || $[3] !== tone ? (t1 = /* @__PURE__ */ jsx(ThemeProvider, {
451
451
  scheme: t0,
452
452
  theme: root.theme,
453
453
  tone,
@@ -736,6 +736,6 @@ function useLayer() {
736
736
  throw err instanceof Error ? Error(`useLayer(): ${err.message}`) : Error(`useLayer(): ${err}`);
737
737
  }
738
738
  }
739
- export { useTheme_v2 as _, useMatchMedia as a, responsivePaddingStyle as b, ThemeColorProvider as c, createGlobalScopedContext as d, globalScope as f, useTheme$1 as g, _cardColorStyle as h, usePrefersReducedMotion as i, useRootTheme as l, focusRingStyle as m, LayerProvider as n, useMediaIndex as o, focusRingBorderStyle as p, isRecord as r, Card as s, useLayer as t, ThemeProvider$1 as u, responsiveRadiusStyle as v, flexItemStyle as x, Box as y };
739
+ export { useTheme_v2 as _, useMatchMedia as a, responsivePaddingStyle as b, ThemeColorProvider as c, createGlobalScopedContext as d, globalScope as f, useTheme as g, _cardColorStyle as h, usePrefersReducedMotion as i, useRootTheme as l, focusRingStyle as m, LayerProvider as n, useMediaIndex as o, focusRingBorderStyle as p, isRecord as r, Card as s, useLayer as t, ThemeProvider as u, responsiveRadiusStyle as v, flexItemStyle as x, Box as y };
740
740
 
741
- //# sourceMappingURL=useLayer-D_TnC6On.js.map
741
+ //# sourceMappingURL=useLayer-DiYnwQ5T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLayer-DiYnwQ5T.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;CAC7E,IAAM,EAAC,U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AA,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.11",
3
+ "version": "4.4.13",
4
4
  "keywords": [
5
5
  "components",
6
6
  "design-system",
@@ -25,7 +25,7 @@
25
25
  ],
26
26
  "type": "module",
27
27
  "sideEffects": [
28
- "*.css"
28
+ "./dist/styles.css"
29
29
  ],
30
30
  "types": "./dist/index.d.ts",
31
31
  "imports": {},
@@ -51,41 +51,41 @@
51
51
  "dependencies": {
52
52
  "@floating-ui/react-dom": "^2.1.9",
53
53
  "@sanity/color": "^3.0.9",
54
- "@sanity/icons": "^5.3.0",
54
+ "@sanity/icons": "^5.4.0",
55
55
  "clsx": "^2.1.1",
56
- "csstype": "^3.2.3",
57
- "motion": "^14.12.0",
56
+ "csstype": "^3.2.4",
57
+ "motion": "^14.14.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.3.0",
64
- "@pandacss/transformer": "^2.3.0",
65
- "@pandacss/vite": "^2.3.0",
66
- "@sanity/pandacss-tsdown-plugin": "^0.3.1",
67
- "@sanity/tsdown-config": "^0.31.2",
63
+ "@pandacss/dev": "^2.6.0",
64
+ "@pandacss/transformer": "^2.6.0",
65
+ "@pandacss/vite": "^2.6.0",
66
+ "@sanity/pandacss-tsdown-plugin": "^0.3.4",
67
+ "@sanity/tsdown-config": "^0.33.0",
68
68
  "@testing-library/dom": "^10.4.2",
69
- "@testing-library/jest-dom": "^7.0.1",
69
+ "@testing-library/jest-dom": "^8.0.0",
70
70
  "@testing-library/react": "^16.3.3",
71
- "@testing-library/user-event": "^14.6.9",
71
+ "@testing-library/user-event": "^14.6.13",
72
72
  "@types/node": "^26.6.6",
73
- "@types/react": "^19.3.0",
73
+ "@types/react": "^19.3.3",
74
74
  "@types/react-dom": "^19.3.0",
75
75
  "@types/react-is": "^19.3.0",
76
- "@vitejs/plugin-react": "^6.1.2",
77
- "@vitest/coverage-v8": "^5.0.5",
78
- "jsdom": "^30.1.3",
79
- "oxc-transform-react": "^0.155.0",
76
+ "@vitejs/plugin-react": "^6.3.0",
77
+ "@vitest/coverage-v8": "^5.1.2",
78
+ "jsdom": "^31.0.1",
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
- "styled-components": "^6.6.0",
84
- "tsdown": "^0.23.1",
83
+ "styled-components": "^6.7.0",
84
+ "tsdown": "^0.23.7",
85
85
  "typescript": "7.0.2",
86
86
  "unrun": "^0.3.1",
87
- "vite": "^8.3.4",
88
- "vitest": "^5.0.5",
87
+ "vite": "^8.3.8",
88
+ "vitest": "^5.1.2",
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,q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AAA,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;AClBA,SAAS,gB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,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,7 +0,0 @@
1
- import { i as ThemeColorCardToneKey } from "./_system-CTe2lb5l.js";
2
- /**
3
- * @public
4
- */
5
- type CardTone = ThemeColorCardToneKey | 'inherit';
6
- export { CardTone as t };
7
- //# sourceMappingURL=card-C0a0wQTc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"card-C0a0wQTc.d.ts","names":[],"sources":["../src/core/types/card.ts"],"mappings":";;;;KAKY,WAAW"}