@sanity/ui 4.4.12 → 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 (79) 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-Df43Duu7.js → arrow-BhooatHA.js} +2 -2
  4. package/dist/{arrow-Df43Duu7.js.map → arrow-BhooatHA.js.map} +1 -1
  5. package/dist/autocomplete.d.ts +3 -3
  6. package/dist/autocomplete.js +8 -8
  7. package/dist/breadcrumbs.js +6 -6
  8. package/dist/{button-dnqMFkWg.d.ts → button-DJ_N-Z82.d.ts} +5 -5
  9. package/dist/{button-dnqMFkWg.d.ts.map → button-DJ_N-Z82.d.ts.map} +1 -1
  10. package/dist/{button-DBWvhK72.js → button-GFefHUiY.js} +8 -8
  11. package/dist/{button-DBWvhK72.js.map → button-GFefHUiY.js.map} +1 -1
  12. package/dist/card-CEB9JLru.d.ts +7 -0
  13. package/dist/card-CEB9JLru.d.ts.map +1 -0
  14. package/dist/code.d.ts +1 -1
  15. package/dist/code.js +4 -4
  16. package/dist/{component-DVlwaWB-.d.ts → component-CWyWF8Ut.d.ts} +1 -1
  17. package/dist/{component-DVlwaWB-.d.ts.map → component-CWyWF8Ut.d.ts.map} +1 -1
  18. package/dist/{element-BYgCE_iK.js → element-DIcKo4Jp.js} +1 -1
  19. package/dist/{element-BYgCE_iK.js.map → element-DIcKo4Jp.js.map} +1 -1
  20. package/dist/{elementSizeObserver-pevZfdGa.js → elementSizeObserver-CSI5StGC.js} +1 -1
  21. package/dist/{elementSizeObserver-pevZfdGa.js.map → elementSizeObserver-CSI5StGC.js.map} +1 -1
  22. package/dist/{factory-BzXTX8_Q.js → factory-D1M0GqJn.js} +3 -3
  23. package/dist/{factory-BzXTX8_Q.js.map → factory-D1M0GqJn.js.map} +1 -1
  24. package/dist/{flex-DZLSBZTk.js → flex-DeU6k2uN.js} +4 -4
  25. package/dist/{flex-DZLSBZTk.js.map → flex-DeU6k2uN.js.map} +1 -1
  26. package/dist/{font-EtfxKPUz.d.ts → font-DI_tc5s8.d.ts} +1 -1
  27. package/dist/{font-EtfxKPUz.d.ts.map → font-DI_tc5s8.d.ts.map} +1 -1
  28. package/dist/{getElementRef-BLVMlHTn.js → getElementRef-5HypX0AT.js} +1 -1
  29. package/dist/{getElementRef-BLVMlHTn.js.map → getElementRef-5HypX0AT.js.map} +1 -1
  30. package/dist/{getScopedTheme-C-sZsyAz.js → getScopedTheme-BJoqtbrb.js} +2 -2
  31. package/dist/{getScopedTheme-C-sZsyAz.js.map → getScopedTheme-BJoqtbrb.js.map} +1 -1
  32. package/dist/{getTheme_v2-y09KqtEb.js → getTheme_v2-CP5x_AcH.js} +1 -1
  33. package/dist/{getTheme_v2-y09KqtEb.js.map → getTheme_v2-CP5x_AcH.js.map} +1 -1
  34. package/dist/{grid-HONPZVbL.js → grid-Bz_gKSjw.js} +4 -4
  35. package/dist/{grid-HONPZVbL.js.map → grid-Bz_gKSjw.js.map} +1 -1
  36. package/dist/{helpers-XThPpWje.js → helpers-jp2T-bdR.js} +2 -2
  37. package/dist/{helpers-XThPpWje.js.map → helpers-jp2T-bdR.js.map} +1 -1
  38. package/dist/{hotkeys-CQgNwGAf.js → hotkeys-B9h8uliL.js} +5 -5
  39. package/dist/{hotkeys-CQgNwGAf.js.map → hotkeys-B9h8uliL.js.map} +1 -1
  40. package/dist/index.d.ts +8 -8
  41. package/dist/index.js +19 -19
  42. package/dist/{layer-CZ8G9TS5.js → layer-Bl7rtdZ_.js} +4 -4
  43. package/dist/{layer-CZ8G9TS5.js.map → layer-Bl7rtdZ_.js.map} +1 -1
  44. package/dist/{layer-ChlP9Ik6.d.ts → layer-CAyooswI.d.ts} +1 -1
  45. package/dist/{layer-ChlP9Ik6.d.ts.map → layer-CAyooswI.d.ts.map} +1 -1
  46. package/dist/menu.d.ts +4 -4
  47. package/dist/menu.js +12 -12
  48. package/dist/{popover-sE-Xd89W.js → popover-C-YWzo_l.js} +9 -9
  49. package/dist/{popover-sE-Xd89W.js.map → popover-C-YWzo_l.js.map} +1 -1
  50. package/dist/{popover-fmTtK69w.d.ts → popover-DpHuX7yr.d.ts} +4 -4
  51. package/dist/{popover-fmTtK69w.d.ts.map → popover-DpHuX7yr.d.ts.map} +1 -1
  52. package/dist/popover.d.ts +1 -1
  53. package/dist/popover.js +1 -1
  54. package/dist/{refractor-CC48DwHi.js → refractor-DeAFUFLp.js} +2 -2
  55. package/dist/{refractor-CC48DwHi.js.map → refractor-DeAFUFLp.js.map} +1 -1
  56. package/dist/{responsiveFont-DJ-TUdSl.js → responsiveFont-CfFXLc7o.js} +3 -3
  57. package/dist/{responsiveFont-DJ-TUdSl.js.map → responsiveFont-CfFXLc7o.js.map} +1 -1
  58. package/dist/{rgba-BSYaEUW6.d.ts → rgba-Hlu7P1jF.d.ts} +3 -3
  59. package/dist/{rgba-BSYaEUW6.d.ts.map → rgba-Hlu7P1jF.d.ts.map} +1 -1
  60. package/dist/selectable-2IHh9SLq.d.ts +7 -0
  61. package/dist/selectable-2IHh9SLq.d.ts.map +1 -0
  62. package/dist/{stack-DFSqrIj4.js → stack-DFRXALVU.js} +5 -5
  63. package/dist/{stack-DFSqrIj4.js.map → stack-DFRXALVU.js.map} +1 -1
  64. package/dist/{textInput-CUhBHHFK.js → textInput-cMQvSl5n.js} +7 -7
  65. package/dist/{textInput-CUhBHHFK.js.map → textInput-cMQvSl5n.js.map} +1 -1
  66. package/dist/theme.d.ts +3 -3
  67. package/dist/theme.js +3 -3
  68. package/dist/toast.js +8 -8
  69. package/dist/tooltip.d.ts +2 -2
  70. package/dist/tooltip.js +7 -7
  71. package/dist/{useClickOutsideEvent-CC1zgOmv.js → useClickOutsideEvent-C-9cvlOu.js} +2 -2
  72. package/dist/{useClickOutsideEvent-CC1zgOmv.js.map → useClickOutsideEvent-C-9cvlOu.js.map} +1 -1
  73. package/dist/{useLayer-CKA2DU8j.js → useLayer-DiYnwQ5T.js} +4 -4
  74. package/dist/{useLayer-CKA2DU8j.js.map → useLayer-DiYnwQ5T.js.map} +1 -1
  75. package/package.json +17 -17
  76. package/dist/card-C0a0wQTc.d.ts +0 -7
  77. package/dist/card-C0a0wQTc.d.ts.map +0 -1
  78. package/dist/selectable-B0GUIL74.d.ts +0 -7
  79. package/dist/selectable-B0GUIL74.d.ts.map +0 -1
@@ -37,4 +37,4 @@ type ThemeColorInputStateKey = (typeof THEME_COLOR_INPUT_STATES)[number];
37
37
  /** @public */
38
38
  type ThemeColorAvatarColorKey = (typeof THEME_COLOR_AVATAR_COLORS)[number];
39
39
  export { THEME_COLOR_STATES as _, ThemeColorInputModeKey as a, ThemeColorStateKey as c, THEME_COLOR_BLEND_MODES as d, THEME_COLOR_BUTTON_MODES as f, THEME_COLOR_SCHEMES as g, THEME_COLOR_INPUT_STATES as h, ThemeColorCardToneKey as i, ThemeColorStateToneKey as l, THEME_COLOR_INPUT_MODES as m, ThemeColorBlendModeKey as n, ThemeColorInputStateKey as o, THEME_COLOR_CARD_TONES as p, ThemeColorButtonModeKey as r, ThemeColorSchemeKey as s, ThemeColorAvatarColorKey as t, THEME_COLOR_AVATAR_COLORS as u, THEME_COLOR_STATE_TONES as v };
40
- //# sourceMappingURL=_system-CTe2lb5l.d.ts.map
40
+ //# sourceMappingURL=_system-DjnSx8gA.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_system-CTe2lb5l.d.ts","names":[],"sources":["../src/theme/system/color/_constants.ts","../src/theme/system/color/_system.ts"],"mappings":"AAGA;cAAa;;cAGA;;cAGA;;cAYA;;cAWA;;cAGA;;cAGA;;cAGA;;cAGA,mDAAyB;;;;KC7B1B,8BAA8B;;KAG9B,iCAAiC;;KAGjC,gCAAgC;;KAGhC,kCAAkC;;KAGlC,6BAA6B;;KAG7B,iCAAiC;;KAGjC,iCAAiC;;KAGjC,kCAAkC;;KAGlC,mCAAmC"}
1
+ {"version":3,"file":"_system-DjnSx8gA.d.ts","names":[],"sources":["../src/theme/system/color/_constants.ts","../src/theme/system/color/_system.ts"],"mappings":"AAGA;cAAa;;cAGA;;cAGA;;cAYA;;cAWA;;cAGA;;cAGA;;cAGA;;cAGA,mDAAyB;;;;KC7B1B,8BAA8B;;KAG9B,iCAAiC;;KAGjC,gCAAgC;;KAGhC,kCAAkC;;KAGlC,6BAA6B;;KAG7B,iCAAiC;;KAGjC,iCAAiC;;KAGjC,kCAAkC;;KAGlC,mCAAmC"}
@@ -1,4 +1,4 @@
1
- import { _ as useTheme_v2, d as createGlobalScopedContext, f as globalScope, r as isRecord } from "./useLayer-CKA2DU8j.js";
1
+ import { _ as useTheme_v2, d as createGlobalScopedContext, f as globalScope, r as isRecord } from "./useLayer-DiYnwQ5T.js";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { clsx } from "clsx/lite";
4
4
  import { useContext, useId } from "react";
@@ -184,4 +184,4 @@ function Arrow(props) {
184
184
  }
185
185
  export { resolvePortalElement as a, PortalContext as i, Portal as n, useBoundaryElement as o, usePortal as r, BoundaryElementContext as s, Arrow as t };
186
186
 
187
- //# sourceMappingURL=arrow-Df43Duu7.js.map
187
+ //# sourceMappingURL=arrow-BhooatHA.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrow-Df43Duu7.js","names":["createPortal(children, portalElement)","null","radius = 0","...restProps","compileCommands(cmds)","clsx(arrow, className)","`${w}px`","{...style, '--arrow-size': `${w}px`}","{...style, '--arrow-size': `${w}px`} as CSSProperties","`0 0 ${w} ${w}`","<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>","`url(#${strokeMaskId})`","strokeWidth * 2","<path\n className={arrowStroke}\n d={strokePath}\n mask={`url(#${strokeMaskId})`}\n strokeWidth={strokeWidth * 2}\n />","<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>","<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>"],"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,qBAAkD;CAChE,IAAM,QAAQ,WAAW,sBAAsB;CAK/C,IAAI,UAAU,CAAC,SAAS,KAAK,KAAK,MAAM,YAAY,IAClD,MAAU,MAAM,2DAA2D;CAG7E,OAAO,SAAS;AAClB;;;;;;;;;ACfA,SAAgB,qBACd,QACA,MACoB;CACpB,QAAQ,OAAO,OAAO,WAAW,QAAQ,OAAO,YAAY,OAAO,UAAU,WAAW;AAC1F;ACXA,MAAM,MAAM,6BACN,aAAa,OAAO,IAAI,GAAG,IAAI,SAAS;AAE9C,YAAY,cAAc;AAuB1B,MAAa,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AAA,EAAA,QAEUD,OAAAA,EAAAA,QADPD,MAHRE,MAAAA,oBAAC,QAAD;EACE,WAAW;EACX,GAAG;EACH,MAAMF;EACN,aAAaC;CACd,CAAA,GAHI,EAAA,MAAA,YAEUA,EAAAA,MAAAA,KADPD,EAAAA,MAAAA,I;CAGRG,IAAAA;CAAgC,EAAA,QAAA,W,eAAhCA,MAAAA,oBAAC,QAAD;EAAM,WAAW;EAAY,GAAG;CAAW,CAAA,GAAX,EAAA,MAAA,U;CAVlCC,IAAAA;CAIEF,EAAAA,QAAAA,OAAAA,EAAAA,QAMAC,OAAAA,EAAAA,QAViCN,MAAAA,EAAAA,QACjCE,MAAAA,EAAAA,QADU,KAAZK,MAAAA,qBAAC,OAAD;EAAK,OAAO;EAAG,QAAQ;EAAG,SAASP;EAAnC,UAAA;GACEE;GAGAG;GAMAC;EACG;C,IAPHD,EAAAA,MAAAA,KAMAC,EAAAA,MAAAA,KAViCN,EAAAA,MAAAA,IACjCE,EAAAA,MAAAA,IADU,EAAA,MAAA,G;CAPdM,IAAAA;CADF,OAKS,EAAA,QAAA,OAAA,EAAA,QAFD,aAAA,EAAA,QAKJD,OAAAA,EAAAA,QAJWX,MAAAA,EAAAA,QAEJG,MALTS,MAAAA,oBAAC,OAAD;EACE,WAAQ;EACR,GAAI;EACJ,WAAWZ;EACN;EACL,OAAOG;EAEPQ,UAAAA;CAYG,CAAA,GAfE,EAAA,MAAA,KAFD,EAAA,MAAA,WAKJA,EAAAA,MAAAA,KAJWX,EAAAA,MAAAA,IAEJG,EAAAA,MAAAA,I,4BALTS;AAqBJ"}
1
+ {"version":3,"file":"arrow-BhooatHA.js","names":["createPortal(children, portalElement)","null","radius = 0","...restProps","compileCommands(cmds)","clsx(arrow, className)","`${w}px`","{...style, '--arrow-size': `${w}px`}","{...style, '--arrow-size': `${w}px`} as CSSProperties","`0 0 ${w} ${w}`","<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>","`url(#${strokeMaskId})`","strokeWidth * 2","<path\n className={arrowStroke}\n d={strokePath}\n mask={`url(#${strokeMaskId})`}\n strokeWidth={strokeWidth * 2}\n />","<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>","<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>"],"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,qBAAkD;CAChE,IAAM,QAAQ,WAAW,sBAAsB;CAK/C,IAAI,UAAU,CAAC,SAAS,KAAK,KAAK,MAAM,YAAY,IAClD,MAAU,MAAM,2DAA2D;CAG7E,OAAO,SAAS;AAClB;;;;;;;;;ACfA,SAAgB,qBACd,QACA,MACoB;CAC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as PopoverProps } from "./popover-fmTtK69w.js";
3
- import { g as Radius } from "./layer-ChlP9Ik6.js";
4
1
  import { ElementType, HTMLProps, ReactNode, Ref } from "react";
2
+ import { n as ButtonOwnProps, u as BoxProps } from "./button-DJ_N-Z82.js";
3
+ import { n as PopoverProps } from "./popover-DpHuX7yr.js";
4
+ import { g as Radius } from "./layer-CAyooswI.js";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -1,18 +1,18 @@
1
1
  "use client";
2
- import { c as EMPTY_RECORD, n as _getArrayProp, s as EMPTY_ARRAY } from "./helpers-XThPpWje.js";
3
- import { h as focusFirstDescendant, p as _hasFocus, t as TextInput, v as _raf } from "./textInput-CUhBHHFK.js";
4
- import { s as useLatestRef } from "./getElementRef-BLVMlHTn.js";
5
- import { s as Card, y as Box } from "./useLayer-CKA2DU8j.js";
6
- import { t as Button } from "./button-DBWvhK72.js";
7
- import { t as Popover } from "./popover-sE-Xd89W.js";
8
- import { n as Text, t as Stack } from "./stack-DFSqrIj4.js";
9
- import { t as _isEnterToClickElement } from "./element-BYgCE_iK.js";
10
2
  import { c } from "react/compiler-runtime";
11
3
  import { ChevronDownIcon } from "@sanity/icons/ChevronDown";
12
4
  import { SpinnerIcon } from "@sanity/icons/Spinner";
13
5
  import { clsx } from "clsx/lite";
14
6
  import { cloneElement, useDeferredValue, useEffect, useImperativeHandle, useReducer, useRef, useState } from "react";
15
7
  import { useEffectEvent } from "use-effect-event";
8
+ import { c as EMPTY_RECORD, n as _getArrayProp, s as EMPTY_ARRAY } from "./helpers-jp2T-bdR.js";
9
+ import { h as focusFirstDescendant, p as _hasFocus, t as TextInput, v as _raf } from "./textInput-cMQvSl5n.js";
10
+ import { s as useLatestRef } from "./getElementRef-5HypX0AT.js";
11
+ import { s as Card, y as Box } from "./useLayer-DiYnwQ5T.js";
12
+ import { t as Button } from "./button-GFefHUiY.js";
13
+ import { t as Popover } from "./popover-C-YWzo_l.js";
14
+ import { n as Text, t as Stack } from "./stack-DFRXALVU.js";
15
+ import { t as _isEnterToClickElement } from "./element-DIcKo4Jp.js";
16
16
  import { jsx, jsxs } from "react/jsx-runtime";
17
17
  function AutocompleteOption(props) {
18
18
  let $ = c(11), { children, id, onSelect, selected, value } = props, t0;
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import { t as useClickOutsideEvent } from "./useClickOutsideEvent-CC1zgOmv.js";
3
- import { y as Box } from "./useLayer-CKA2DU8j.js";
4
- import { t as Popover } from "./popover-sE-Xd89W.js";
5
- import { n as Text, t as Stack } from "./stack-DFSqrIj4.js";
6
- import { n as _getArrayProp } from "./helpers-XThPpWje.js";
7
- import { t as Button } from "./button-DBWvhK72.js";
8
2
  import { c } from "react/compiler-runtime";
9
3
  import { clsx } from "clsx/lite";
10
4
  import { Children, Fragment, isValidElement, startTransition, useRef, useState } from "react";
5
+ import { t as useClickOutsideEvent } from "./useClickOutsideEvent-C-9cvlOu.js";
6
+ import { y as Box } from "./useLayer-DiYnwQ5T.js";
7
+ import { t as Popover } from "./popover-C-YWzo_l.js";
8
+ import { n as Text, t as Stack } from "./stack-DFRXALVU.js";
9
+ import { n as _getArrayProp } from "./helpers-jp2T-bdR.js";
11
10
  import { styled } from "styled-components";
11
+ import { t as Button } from "./button-GFefHUiY.js";
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
13
  const ExpandButton = styled(Button).withConfig({
14
14
  displayName: "ExpandButton",
@@ -1,7 +1,7 @@
1
- import { a as Props, r as ElementType } from "./component-DVlwaWB-.js";
2
- import { O as FlexJustify, d as ResponsiveMarginProps, f as ResponsivePaddingProps, l as ResponsiveGridItemProps, o as ResponsiveBoxProps, p as ResponsiveRadiusProps, s as ResponsiveFlexItemProps } from "./layer-ChlP9Ik6.js";
3
- import { l as ThemeColorStateToneKey, r as ThemeColorButtonModeKey } from "./_system-CTe2lb5l.js";
4
- import { a as ThemeFontWeightKey } from "./font-EtfxKPUz.js";
1
+ import { a as Props, r as ElementType } from "./component-CWyWF8Ut.js";
2
+ import { O as FlexJustify, d as ResponsiveMarginProps, f as ResponsivePaddingProps, l as ResponsiveGridItemProps, o as ResponsiveBoxProps, p as ResponsiveRadiusProps, s as ResponsiveFlexItemProps } from "./layer-CAyooswI.js";
3
+ import { l as ThemeColorStateToneKey, r as ThemeColorButtonModeKey } from "./_system-DjnSx8gA.js";
4
+ import { a as ThemeFontWeightKey } from "./font-DI_tc5s8.js";
5
5
  /**
6
6
  * The props that `Box` adds on top of the element it renders as.
7
7
  *
@@ -73,4 +73,4 @@ type ButtonProps<E extends ElementType = 'button'> = Props<ButtonOwnProps, E>;
73
73
  */
74
74
  declare const Button: <E extends ElementType = 'button'>(props: ButtonProps<E>) => React.JSX.Element;
75
75
  export { ButtonTextAlign as a, Box as c, ButtonMode as i, BoxOwnProps as l, ButtonOwnProps as n, ButtonTone as o, ButtonProps as r, ButtonWidth as s, Button as t, BoxProps as u };
76
- //# sourceMappingURL=button-dnqMFkWg.d.ts.map
76
+ //# sourceMappingURL=button-DJ_N-Z82.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-dnqMFkWg.d.ts","names":[],"sources":["../src/core/primitives/box/box.tsx","../src/core/types/button.ts","../src/core/primitives/button/button.tsx"],"mappings":";;;;;;;;;UA2BiB,oBAEb,yBACA,oBACA,yBACA,uBACA;EACF,cAAc;;;;;KAMJ,SAAS,UAAU,uBAAuB,MAAM,aAAa;;;;;;;cAkG5D,MAAM,UAAU,qBAAqB,OAAO,SAAS,OAAO,MAAM,IAAI;;;;KCrIvE,aAAa;;;;KAKb;;;;KAKA,aAAa;;;;KAKb;;;;UCSK,uBAAuB,wBAAwB;EAC9D;EACA,OAAO;EAEP,OAAO,MAAM,cAAc,MAAM;EAEjC,YAAY,MAAM,cAAc,MAAM;EACtC,UAAU,cAAc;;;;EAIxB;EACA;;;;EAIA;EACA;EACA;EACA,OAAO,MAAM;EACb,YAAY;EACZ,aAAa;EACb,OAAO;EACP;EACA,QAAQ;;;;;KAME,YAAY,UAAU,0BAA0B,MAAM,gBAAgB;;;;cAgJrE,SAAS,UAAU,wBAC9B,OAAO,YAAY,OAChB,MAAM,IAAI"}
1
+ {"version":3,"file":"button-DJ_N-Z82.d.ts","names":[],"sources":["../src/core/primitives/box/box.tsx","../src/core/types/button.ts","../src/core/primitives/button/button.tsx"],"mappings":";;;;;;;;;UA2BiB,oBAEb,yBACA,oBACA,yBACA,uBACA;EACF,cAAc;;;;;KAMJ,SAAS,UAAU,uBAAuB,MAAM,aAAa;;;;;;;cAkG5D,MAAM,UAAU,qBAAqB,OAAO,SAAS,OAAO,MAAM,IAAI;;;;KCrIvE,aAAa;;;;KAKb;;;;KAKA,aAAa;;;;KAKb;;;;UCSK,uBAAuB,wBAAwB;EAC9D;EACA,OAAO;EAEP,OAAO,MAAM,cAAc,MAAM;EAEjC,YAAY,MAAM,cAAc,MAAM;EACtC,UAAU,cAAc;;;;EAIxB;EACA;;;;EAIA;EACA;EACA;EACA,OAAO,MAAM;EACb,YAAY;EACZ,aAAa;EACb,OAAO;EACP;EACA,QAAQ;;;;;KAME,YAAY,UAAU,0BAA0B,MAAM,gBAAgB;;;;cAgJrE,SAAS,UAAU,wBAC9B,OAAO,YAAY,OAChB,MAAM,IAAI"}
@@ -1,14 +1,14 @@
1
- import { n as _getArrayProp } from "./helpers-XThPpWje.js";
2
- import { _ as useTheme_v2, h as _cardColorStyle, m as focusRingStyle, p as focusRingBorderStyle, v as responsiveRadiusStyle, y as Box } from "./useLayer-CKA2DU8j.js";
3
- import { t as Flex } from "./flex-DZLSBZTk.js";
4
- import { n as Text } from "./stack-DFSqrIj4.js";
5
- import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
6
1
  import { c } from "react/compiler-runtime";
7
- import { SpinnerIcon } from "@sanity/icons/Spinner";
8
2
  import { isValidElement } from "react";
3
+ import { isValidElementType } from "react-is";
9
4
  import { css, styled } from "styled-components";
5
+ import { n as _getArrayProp } from "./helpers-jp2T-bdR.js";
6
+ import { _ as useTheme_v2, h as _cardColorStyle, m as focusRingStyle, p as focusRingBorderStyle, v as responsiveRadiusStyle, y as Box } from "./useLayer-DiYnwQ5T.js";
7
+ import { t as Flex } from "./flex-DeU6k2uN.js";
8
+ import { SpinnerIcon } from "@sanity/icons/Spinner";
9
+ import { n as Text } from "./stack-DFRXALVU.js";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
- import { isValidElementType } from "react-is";
11
+ import { t as getTheme_v2 } from "./getTheme_v2-CP5x_AcH.js";
12
12
  const spinnerIcon = "u-fteRbN u-jmIqco u-iNjdVt";
13
13
  /**
14
14
  * Indicate that something is loading for an indeterminate amount of time.
@@ -179,4 +179,4 @@ function ButtonComponent(props) {
179
179
  const Button = ButtonComponent;
180
180
  export { Spinner as n, spinnerIcon as r, Button as t };
181
181
 
182
- //# sourceMappingURL=button-DBWvhK72.js.map
182
+ //# sourceMappingURL=button-GFefHUiY.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-DBWvhK72.js","names":["<SpinnerIcon className={spinnerIcon} />","<Text data-ui=\"Spinner\" {...props}>\n <SpinnerIcon className={spinnerIcon} />\n </Text>","_jsx","fontSize = 1","justifyProp = 'center'","mode = 'default'","paddingProp = 3","radiusProp = 2","gap = 3","tone = 'default'","type = 'button'","muted = false","...restProps","_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 || disabled)","selected ? '' : undefined","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>","_jsx","_jsxs"],"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,KAAAE,oBAAA,aAAD,EAAa,WAAW,YAAc,CAAA,G;CADxCD,IAAAA;CADF,OAC8B,EAAA,OAAA,Q,aAA5BA,KAAAA,oBAAC,MAAD;EAAM,WAAQ;EAAU,GAAI;EAC1BD,UAAAA;CACI,CAAA,GAFsB,EAAA,KAAA,O,YAA5BC;AAIJ;AClBA,SAAS,gBACP,MACA,EAAC,OAAO,SACR;CACA,IAAM,OAAO,KAAK,OAAO,UAAU,KAAK,OAAO;CAE/C,OAAO,KAAK,UAAU,KAAK;AAC7B;;;;AAKA,SAAgB,iBAAiB,OAA2C;CAC1E,IAAM,EAAC,WAAU,YAAY,MAAM,KAAK,GAClC,kBAAkB,qBAAqB;EAC3C,OAAO,OAAO,OAAO;EACrB,OAAO;CACT,CAAC;CAED,OAAO,GAAG,wFAKM,gBAAgB,wEAIZ,gBAAgB;AAItC;;;;AAKA,SAAgB,kBACd,OACwB;CACxB,IAAM,EAAC,OAAO,cAAa,YAAY,MAAM,KAAK,GAC5C,QAAQ,gBAAgB,WAAW,KAAK;CAE9C,OAAO,GAAG,GACN,gBAAgB,WAAW,MAAM,OAAO,EAAE,8DAKpC,gBAAgB,WAAW,MAAM,OAAO,EAAE,YAI1C,gBAAgB,WAAW,MAAM,OAAO,EAAE,mBAI1C,gBAAgB,WAAW,MAAM,OAAO,EAAE,qBAK5C,gBAAgB,WAAW,MAAM,OAAO,EAAE;AAIpD;;;;AAKA,SAAgB,6BACd,OACwB;CACxB,IAAM,EAAC,QAAQ,OAAO,cAAa,YAAY,MAAM,KAAK,GACpD,QAAQ,gBAAgB,WAAW,KAAK;CAE9C,OAAO,GAAG,sCA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C,EAAAA,MAAAA,KAkCAE,EAAAA,MAAAA,KAhDM,EAAA,MAAA,MAKD,EAAA,MAAA,MACE,EAAA,MAAA,O,4BAXVC;AA4DJ;;;;AAKA,MAAa,SAEY"}
1
+ {"version":3,"file":"button-GFefHUiY.js","names":["<SpinnerIcon className={spinnerIcon} />","<Text data-ui=\"Spinner\" {...props}>\n <SpinnerIcon className={spinnerIcon} />\n </Text>","_jsx","fontSize = 1","justifyProp = 'center'","mode = 'default'","paddingProp = 3","radiusProp = 2","gap = 3","tone = 'default'","type = 'button'","muted = false","...restProps","_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 || disabled)","selected ? '' : undefined","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>","_jsx","_jsxs"],"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,KAAAE,oBAAA,aAAD,EAAa,WAAW,YAAc,CAAA,G;CADxCD,IAAAA;CADF,OAC8B,EAAA,OAAA,Q,aAA5BA,KAAAA,oBAAC,MAAD;EAAM,WAAQ;EAAU,GAAI;EAC1BD,UAAAA;CACI,CAAA,GAFsB,EAAA,KAAA,O,YAA5BC;AAIJ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GC,EAAA,MAAA,Y;CAiBnBC,IAAAA;CACoB,EAAA,QAAA,YAAA,EAAA,QADpBA,YACC,MAAA,YAAAE,oBAAC,KAAD;EAAK,IAAG;EAAO,GAAI;EAChB;CACE,CAAA,GAFc,EAAA,MAAA,UADpB,EAAA,MAAA,U;CArDHD,IAAAA;CADF,OAIW,EAAA,QAAA,QAAA,EAAA,QACE,UAAA,EAAA,QAKJ,OAAA,EAAA,QAPD,aAAA,EAAA,QAIWN,OAAAA,EAAAA,QACAC,OAAAA,EAAAA,QACLD,OAAAA,EAAAA,QAKTE,OAAAA,EAAAA,QAMAC,OAAAA,EAAAA,QAkCAE,OAAAA,EAAAA,QAhDM,QAAA,EAAA,QAKD,QAAA,EAAA,QACE,SAXVC,MAAAA,qBAAC,cAAD;EACE,WAAQ;EACR,GAAI;EACJ,OAAO;EACP,SAAS;EACT,OAAO;EACP,iBAAeN;EACf,iBAAeC;EACf,UAAUD;EACL;EACC;EACN,QAAQ;EAXV,UAAA;GAaGE;GAMAC;GAkCAE;EAKW;C,IAvDL,EAAA,MAAA,MACE,EAAA,MAAA,QAKJ,EAAA,MAAA,KAPD,EAAA,MAAA,WAIWL,EAAAA,MAAAA,KACAC,EAAAA,MAAAA,KACLD,EAAAA,MAAAA,KAKTE,EAAAA,MAAAA,KAMAC,EAAAA,MAAAA,KAkCAE,EAAAA,MAAAA,KAhDM,EAAA,MAAA,MAKD,EAAA,MAAA,MACE,EAAA,MAAA,O,4BAXVC;AA4DJ;;;;AAKA,MAAa,SAEY"}
@@ -0,0 +1,7 @@
1
+ import { i as ThemeColorCardToneKey } from "./_system-DjnSx8gA.js";
2
+ /**
3
+ * @public
4
+ */
5
+ type CardTone = ThemeColorCardToneKey | 'inherit';
6
+ export { CardTone as t };
7
+ //# sourceMappingURL=card-CEB9JLru.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card-CEB9JLru.d.ts","names":[],"sources":["../src/core/types/card.ts"],"mappings":";;;;KAKY,WAAW"}
package/dist/code.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as Props, r as ElementType } from "./component-DVlwaWB-.js";
1
+ import { a as Props, r as ElementType } from "./component-CWyWF8Ut.js";
2
2
  /**
3
3
  * @public
4
4
  */
package/dist/code.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { n as _fontWeight, r as _responsiveFontSize, t as _fontBase } from "./responsiveFont-DJ-TUdSl.js";
3
- import { n as _getArrayProp } from "./helpers-XThPpWje.js";
4
- import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
5
2
  import { c } from "react/compiler-runtime";
6
3
  import { Suspense, lazy } from "react";
7
4
  import { css, styled } from "styled-components";
5
+ import { n as _fontWeight, r as _responsiveFontSize, t as _fontBase } from "./responsiveFont-CfFXLc7o.js";
6
+ import { n as _getArrayProp } from "./helpers-jp2T-bdR.js";
7
+ import { t as getTheme_v2 } from "./getTheme_v2-CP5x_AcH.js";
8
8
  import { jsx } from "react/jsx-runtime";
9
9
  function codeSyntaxHighlightingStyle({ theme }) {
10
10
  let { color: { syntax: color } } = getTheme_v2(theme);
@@ -50,7 +50,7 @@ function codeSyntaxHighlightingStyle({ theme }) {
50
50
  function codeBaseStyle(props) {
51
51
  return css`color:var(--card-code-fg-color);& code{font-family:inherit;}& a{color:inherit;text-decoration:underline;border-radius:1px;}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;}${_fontBase("code", props)}`;
52
52
  }
53
- const codeSyntaxStyle = css`& code.refractor .token{${codeSyntaxHighlightingStyle}}`, LazyRefractor = lazy(() => import("./refractor-CC48DwHi.js")), CodeSyntax = styled(/* @__PURE__ */ styled.pre.withConfig({
53
+ const codeSyntaxStyle = css`& code.refractor .token{${codeSyntaxHighlightingStyle}}`, LazyRefractor = lazy(() => import("./refractor-DeAFUFLp.js")), CodeSyntax = styled(/* @__PURE__ */ styled.pre.withConfig({
54
54
  displayName: "CodeBase",
55
55
  componentId: "sc-b3rcso-0"
56
56
  })(codeBaseStyle)).withConfig({
@@ -22,4 +22,4 @@ type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<E extends Ta
22
22
  as?: E;
23
23
  }>;
24
24
  export { Props as a, EmptyProps as i, ComponentType as n, TagType as o, ElementType as r, Assign as t };
25
- //# sourceMappingURL=component-DVlwaWB-.d.ts.map
25
+ //# sourceMappingURL=component-CWyWF8Ut.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-DVlwaWB-.d.ts","names":[],"sources":["../src/core/types/component.ts"],"mappings":"AAKA;;;;;KAAY,OAAO,kBAAkB,oBAAoB,KAAK,SAAS,KAAK;;KAGhE;;KAGA,gBAAgB,MAAM,IAAI;;KAG1B,cAAc,WACtB,MAAM,kBAAkB,KACxB,MAAM,eAAe,KACrB,MAAM,gBAAgB;;KAGd,YAAY,WAAW,UAAU,cAAc;;;;;;;KAQ/C,MAAM,UAAU,YAAY,UAAU,YAAY,MAAM,OAClE,UAAU,UAAU,MAAM,IAAI,kBAAkB,KAAK,MAAM,eAAe,IAC1E;EAAK,KAAK"}
1
+ {"version":3,"file":"component-CWyWF8Ut.d.ts","names":[],"sources":["../src/core/types/component.ts"],"mappings":"AAKA;;;;;KAAY,OAAO,kBAAkB,oBAAoB,KAAK,SAAS,KAAK;;KAGhE;;KAGA,gBAAgB,MAAM,IAAI;;KAG1B,cAAc,WACtB,MAAM,kBAAkB,KACxB,MAAM,eAAe,KACrB,MAAM,gBAAgB;;KAGd,YAAY,WAAW,UAAU,cAAc;;;;;;;KAQ/C,MAAM,UAAU,YAAY,UAAU,YAAY,MAAM,OAClE,UAAU,UAAU,MAAM,IAAI,kBAAkB,KAAK,MAAM,eAAe,IAC1E;EAAK,KAAK"}
@@ -48,4 +48,4 @@ function containsOrEqualsElement(element, node) {
48
48
  }
49
49
  export { isHTMLElement as a, isHTMLTextAreaElement as c, isHTMLButtonElement as i, containsOrEqualsElement as n, isHTMLInputElement as o, isHTMLAnchorElement as r, isHTMLSelectElement as s, _isEnterToClickElement as t };
50
50
 
51
- //# sourceMappingURL=element-BYgCE_iK.js.map
51
+ //# sourceMappingURL=element-DIcKo4Jp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"element-BYgCE_iK.js","names":[],"sources":["../src/core/helpers/element.ts"],"sourcesContent":["/**\n * @internal\n */\nexport function _isEnterToClickElement(element: HTMLElement): boolean {\n return isHTMLAnchorElement(element) || isHTMLButtonElement(element)\n}\n\n/**\n * @internal\n */\nexport function isHTMLElement(node: unknown): node is HTMLElement {\n return node instanceof Node && node.nodeType === Node.ELEMENT_NODE\n}\n\n/**\n * @internal\n */\nexport function isHTMLAnchorElement(element: unknown): element is HTMLAnchorElement {\n return isHTMLElement(element) && element.nodeName === 'A'\n}\n\n/**\n * @internal\n */\nexport function isHTMLInputElement(element: unknown): element is HTMLInputElement {\n return isHTMLElement(element) && element.nodeName === 'INPUT'\n}\n\n/**\n * @internal\n */\nexport function isHTMLButtonElement(element: unknown): element is HTMLButtonElement {\n return isHTMLElement(element) && element.nodeName === 'BUTTON'\n}\n\n/**\n * @internal\n */\nexport function isHTMLSelectElement(element: unknown): element is HTMLSelectElement {\n return isHTMLElement(element) && element.nodeName === 'SELECT'\n}\n\n/**\n * @internal\n */\nexport function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement {\n return isHTMLElement(element) && element.nodeName === 'TEXTAREA'\n}\n\n/**\n * @internal\n */\nexport function containsOrEqualsElement(element: HTMLElement, node: Node): boolean {\n return element.contains(node) || element === node\n}\n"],"mappings":";;;AAGA,SAAgB,uBAAuB,SAA+B;CACpE,OAAO,oBAAoB,OAAO,KAAK,oBAAoB,OAAO;AACpE;;;;AAKA,SAAgB,cAAc,MAAoC;CAChE,OAAO,gBAAgB,QAAQ,KAAK,aAAa,KAAK;AACxD;;;;AAKA,SAAgB,oBAAoB,SAAgD;CAClF,OAAO,cAAc,OAAO,KAAK,QAAQ,aAAa;AACxD;;;;AAKA,SAAgB,mBAAmB,SAA+C;CAChF,OAAO,cAAc,OAAO,KAAK,QAAQ,aAAa;AACxD;;;;AAKA,SAAgB,oBAAoB,SAAgD;CAClF,OAAO,cAAc,OAAO,KAAK,QAAQ,aAAa;AACxD;;;;AAKA,SAAgB,oBAAoB,SAAgD;CAClF,OAAO,cAAc,OAAO,KAAK,QAAQ,aAAa;AACxD;;;;AAKA,SAAgB,sBAAsB,SAAkD;CACtF,OAAO,cAAc,OAAO,KAAK,QAAQ,aAAa;AACxD;;;;AAKA,SAAgB,wBAAwB,SAAsB,MAAqB;CACjF,OAAO,QAAQ,SAAS,IAAI,KAAK,YAAY;AAC/C"}
1
+ {"version":3,"file":"element-DIcKo4Jp.js","names":[],"sources":["../src/core/helpers/element.ts"],"sourcesContent":["/**\n * @internal\n */\nexport function _isEnterToClickElement(element: HTMLElement): boolean {\n return isHTMLAnchorElement(element) || isHTMLButtonElement(element)\n}\n\n/**\n * @internal\n */\nexport function isHTMLElement(node: unknown): node is HTMLElement {\n return node instanceof Node && node.nodeType === Node.ELEMENT_NODE\n}\n\n/**\n * @internal\n */\nexport function isHTMLAnchorElement(element: unknown): element is HTMLAnchorElement {\n return isHTMLElement(element) && element.nodeName === 'A'\n}\n\n/**\n * @internal\n */\nexport function isHTMLInputElement(element: unknown): element is HTMLInputElement {\n return isHTMLElement(element) && element.nodeName === 'INPUT'\n}\n\n/**\n * @internal\n */\nexport function isHTMLButtonElement(element: unknown): element is HTMLButtonElement {\n return isHTMLElement(element) && element.nodeName === 'BUTTON'\n}\n\n/**\n * @internal\n */\nexport function isHTMLSelectElement(element: unknown): element is HTMLSelectElement {\n return isHTMLElement(element) && element.nodeName === 'SELECT'\n}\n\n/**\n * @internal\n */\nexport function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement {\n return isHTMLElement(element) && element.nodeName === 'TEXTAREA'\n}\n\n/**\n * @internal\n */\nexport function containsOrEqualsElement(element: HTMLElement, node: Node): boolean {\n return element.contains(node) || element === node\n}\n"],"mappings":";;;AAGA,SAAgB,uBAAuB,SAA+B;CACpE,OAAO,oBAAoB,OAAO,KAAK,oBAAoB,OAAO;AACpE;;;;AAKA,SAAgB,cAAc,MAAoC;CAChE,OAAO,gBAAgB,QAAQ,KAAK,aAAa,KAAK;AACxD;;;;AAKA,SAAgB,oBAAoB,SAAgD;CAClF,OAAO,cAAc,OAAO,KAAK,QAAQ,aAAa;AACxD;;;;AAKA,SAAgB,mBAAmB,SAA+C;CAChF,OAAO,cAAc,OAAO,KAAK,QAAQ,aAAa;AACxD;;;;AAKA,SAAgB,oBAAoB,SAAgD;CAClF,OAAO,cAAc,OAAO,KAAK,QAAQ,aAAa;AACxD;;;;AAKA,SAAgB,oBAAoB,SAAgD;CAClF,OAAO,cAAc,OAAO,KAAK,QAAQ,aAAa;AACxD;;;;AAKA,SAAgB,sBAAsB,SAAkD;CACtF,OAAO,cAAc,OAAO,KAAK,QAAQ,aAAa;AACxD;;;;AAKA,SAAgB,wBAAwB,SAAsB,MAAqB;CACjF,OAAO,QAAQ,SAAS,IAAI,KAAK,YAAY;AAC/C"}
@@ -42,4 +42,4 @@ function _createElementSizeObserver() {
42
42
  }
43
43
  export { _elementSizeObserver as t };
44
44
 
45
- //# sourceMappingURL=elementSizeObserver-pevZfdGa.js.map
45
+ //# sourceMappingURL=elementSizeObserver-CSI5StGC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"elementSizeObserver-pevZfdGa.js","names":[],"sources":["../src/core/observers/elementSizeObserver.ts"],"sourcesContent":["/**\n * @beta\n */\nexport interface ElementRectValue {\n width: number\n height: number\n}\n\n/**\n * @beta\n */\nexport interface ElementSize {\n content: ElementRectValue\n border: ElementRectValue\n\n /** @deprecated INTERNAL ONLY */\n _contentRect: DOMRectReadOnly\n}\n\n/**\n * @internal\n */\nexport type _ElementSizeSubscriber = (elementRect: ElementSize) => void\n\n/**\n * @internal\n */\nexport interface _ElementSizeObserver {\n subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void\n}\n\n/**\n * @internal\n */\nexport interface _ElementSizeListener {\n subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void\n}\n\n// Initialize element size observer\n// NOTE: this should NOT have size effects\n/**\n * @internal\n */\nexport const _elementSizeObserver = _createElementSizeObserver()\n\nfunction _createElementRectValueListener(): _ElementSizeListener {\n return {\n subscribe(element, subscriber) {\n const resizeObserver = new ResizeObserver(([entry]) => {\n subscriber({\n // oxlint-disable-next-line no-deprecated\n _contentRect: entry.contentRect,\n border: {\n width: entry.borderBoxSize[0].inlineSize,\n height: entry.borderBoxSize[0].blockSize,\n },\n content: {\n width: entry.contentRect.width,\n height: entry.contentRect.height,\n },\n })\n })\n\n resizeObserver.observe(element)\n\n return () => {\n resizeObserver.unobserve(element)\n resizeObserver.disconnect()\n }\n },\n }\n}\n\nfunction _createElementSizeObserver(): _ElementSizeObserver {\n const disposeCache = new WeakMap<HTMLElement, () => void>()\n const subscribersCache = new WeakMap<HTMLElement, _ElementSizeSubscriber[]>()\n\n return {\n subscribe(element, subscriber) {\n let subscribers = subscribersCache.get(element)\n\n if (!subscribers) {\n const currentSubscribers: _ElementSizeSubscriber[] = []\n\n subscribers = currentSubscribers\n subscribersCache.set(element, subscribers)\n\n const listener = _createElementRectValueListener()\n\n // listen\n disposeCache.set(\n element,\n listener.subscribe(element, (elementRect) => {\n for (const sub of currentSubscribers) {\n sub(elementRect)\n }\n }),\n )\n }\n\n subscribers.push(subscriber)\n\n return () => {\n // dispose\n\n const idx = subscribers.indexOf(subscriber)\n\n if (idx > -1) {\n subscribers.splice(idx, 1)\n }\n\n // The last subscriber of this element leaving stops the observation and forgets the\n // element, so that a later subscriber starts a new one. (The guard keeps a stale\n // unsubscribe from disposing an observation that a later subscriber started.)\n if (subscribers.length === 0 && subscribersCache.get(element) === subscribers) {\n // unlisten\n disposeCache.get(element)?.()\n disposeCache.delete(element)\n subscribersCache.delete(element)\n }\n }\n },\n }\n}\n"],"mappings":";;;AA2CA,MAAa,uBAAuB,2BAA2B;AAE/D,SAAS,kCAAwD;CAC/D,OAAO,EACL,UAAU,SAAS,YAAY;EAC7B,IAAM,iBAAiB,IAAI,gBAAgB,CAAC,WAAW;GACrD,WAAW;IAET,cAAc,MAAM;IACpB,QAAQ;KACN,OAAO,MAAM,cAAc,EAAE,CAAC;KAC9B,QAAQ,MAAM,cAAc,EAAE,CAAC;IACjC;IACA,SAAS;KACP,OAAO,MAAM,YAAY;KACzB,QAAQ,MAAM,YAAY;IAC5B;GACF,CAAC;EACH,CAAC;EAID,OAFA,eAAe,QAAQ,OAAO,SAEjB;GACX,eAAe,UAAU,OAAO,GAChC,eAAe,WAAW;EAC5B;CACF,EACF;AACF;AAEA,SAAS,6BAAmD;CAC1D,IAAM,+BAAe,IAAI,QAAiC,GACpD,mCAAmB,IAAI,QAA+C;CAE5E,OAAO,EACL,UAAU,SAAS,YAAY;EAC7B,IAAI,cAAc,iBAAiB,IAAI,OAAO;EAE9C,IAAI,CAAC,aAAa;GAChB,IAAM,qBAA+C,CAAC;GAEtD,cAAc,oBACd,iBAAiB,IAAI,SAAS,WAAW;GAEzC,IAAM,WAAW,gCAAgC;GAGjD,aAAa,IACX,SACA,SAAS,UAAU,UAAU,gBAAgB;IAC3C,KAAK,IAAM,OAAO,oBAChB,IAAI,WAAW;GAEnB,CAAC,CACH;EACF;EAIA,OAFA,YAAY,KAAK,UAAU,SAEd;GAGX,IAAM,MAAM,YAAY,QAAQ,UAAU;GAEtC,MAAM,MACR,YAAY,OAAO,KAAK,CAAC,GAMvB,YAAY,WAAW,KAAK,iBAAiB,IAAI,OAAO,MAAM,gBAEhE,aAAa,IAAI,OAAO,CAAC,GAAG,GAC5B,aAAa,OAAO,OAAO,GAC3B,iBAAiB,OAAO,OAAO;EAEnC;CACF,EACF;AACF"}
1
+ {"version":3,"file":"elementSizeObserver-CSI5StGC.js","names":[],"sources":["../src/core/observers/elementSizeObserver.ts"],"sourcesContent":["/**\n * @beta\n */\nexport interface ElementRectValue {\n width: number\n height: number\n}\n\n/**\n * @beta\n */\nexport interface ElementSize {\n content: ElementRectValue\n border: ElementRectValue\n\n /** @deprecated INTERNAL ONLY */\n _contentRect: DOMRectReadOnly\n}\n\n/**\n * @internal\n */\nexport type _ElementSizeSubscriber = (elementRect: ElementSize) => void\n\n/**\n * @internal\n */\nexport interface _ElementSizeObserver {\n subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void\n}\n\n/**\n * @internal\n */\nexport interface _ElementSizeListener {\n subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void\n}\n\n// Initialize element size observer\n// NOTE: this should NOT have size effects\n/**\n * @internal\n */\nexport const _elementSizeObserver = _createElementSizeObserver()\n\nfunction _createElementRectValueListener(): _ElementSizeListener {\n return {\n subscribe(element, subscriber) {\n const resizeObserver = new ResizeObserver(([entry]) => {\n subscriber({\n // oxlint-disable-next-line no-deprecated\n _contentRect: entry.contentRect,\n border: {\n width: entry.borderBoxSize[0].inlineSize,\n height: entry.borderBoxSize[0].blockSize,\n },\n content: {\n width: entry.contentRect.width,\n height: entry.contentRect.height,\n },\n })\n })\n\n resizeObserver.observe(element)\n\n return () => {\n resizeObserver.unobserve(element)\n resizeObserver.disconnect()\n }\n },\n }\n}\n\nfunction _createElementSizeObserver(): _ElementSizeObserver {\n const disposeCache = new WeakMap<HTMLElement, () => void>()\n const subscribersCache = new WeakMap<HTMLElement, _ElementSizeSubscriber[]>()\n\n return {\n subscribe(element, subscriber) {\n let subscribers = subscribersCache.get(element)\n\n if (!subscribers) {\n const currentSubscribers: _ElementSizeSubscriber[] = []\n\n subscribers = currentSubscribers\n subscribersCache.set(element, subscribers)\n\n const listener = _createElementRectValueListener()\n\n // listen\n disposeCache.set(\n element,\n listener.subscribe(element, (elementRect) => {\n for (const sub of currentSubscribers) {\n sub(elementRect)\n }\n }),\n )\n }\n\n subscribers.push(subscriber)\n\n return () => {\n // dispose\n\n const idx = subscribers.indexOf(subscriber)\n\n if (idx > -1) {\n subscribers.splice(idx, 1)\n }\n\n // The last subscriber of this element leaving stops the observation and forgets the\n // element, so that a later subscriber starts a new one. (The guard keeps a stale\n // unsubscribe from disposing an observation that a later subscriber started.)\n if (subscribers.length === 0 && subscribersCache.get(element) === subscribers) {\n // unlisten\n disposeCache.get(element)?.()\n disposeCache.delete(element)\n subscribersCache.delete(element)\n }\n }\n },\n }\n}\n"],"mappings":";;;AA2CA,MAAa,uBAAuB,2BAA2B;AAE/D,SAAS,kCAAwD;CAC/D,OAAO,EACL,UAAU,SAAS,YAAY;EAC7B,IAAM,iBAAiB,IAAI,gBAAgB,CAAC,WAAW;GACrD,WAAW;IAET,cAAc,MAAM;IACpB,QAAQ;KACN,OAAO,MAAM,cAAc,EAAE,CAAC;KAC9B,QAAQ,MAAM,cAAc,EAAE,CAAC;IACjC;IACA,SAAS;KACP,OAAO,MAAM,YAAY;KACzB,QAAQ,MAAM,YAAY;IAC5B;GACF,CAAC;EACH,CAAC;EAID,OAFA,eAAe,QAAQ,OAAO,SAEjB;GACX,eAAe,UAAU,OAAO,GAChC,eAAe,WAAW;EAC5B;CACF,EACF;AACF;AAEA,SAAS,6BAAmD;CAC1D,IAAM,+BAAe,IAAI,QAAiC,GACpD,mCAAmB,IAAI,QAA+C;CAE5E,OAAO,EACL,UAAU,SAAS,YAAY;EAC7B,IAAI,cAAc,iBAAiB,IAAI,OAAO;EAE9C,IAAI,CAAC,aAAa;GAChB,IAAM,qBAA+C,CAAC;GAEtD,cAAc,oBACd,iBAAiB,IAAI,SAAS,WAAW;GAEzC,IAAM,WAAW,gCAAgC;GAGjD,aAAa,IACX,SACA,SAAS,UAAU,UAAU,gBAAgB;IAC3C,KAAK,IAAM,OAAO,oBAChB,IAAI,WAAW;GAEnB,CAAC,CACH;EACF;EAIA,OAFA,YAAY,KAAK,UAAU,SAEd;GAGX,IAAM,MAAM,YAAY,QAAQ,UAAU;GAEtC,MAAM,MACR,YAAY,OAAO,KAAK,CAAC,GAMvB,YAAY,WAAW,KAAK,iBAAiB,IAAI,OAAO,MAAM,gBAEhE,aAAa,IAAI,OAAO,CAAC,GAAG,GAC5B,aAAa,OAAO,OAAO,GAC3B,iBAAiB,OAAO,OAAO;EAEnC;CACF,EACF;AACF"}
@@ -1,5 +1,5 @@
1
- import { r as defaultThemeConfig } from "./getTheme_v2-y09KqtEb.js";
2
- import { a as defineLazyProperty, n as v2_v0 } from "./getScopedTheme-C-sZsyAz.js";
1
+ import { r as defaultThemeConfig } from "./getTheme_v2-CP5x_AcH.js";
2
+ import { a as defineLazyProperty, n as v2_v0 } from "./getScopedTheme-BJoqtbrb.js";
3
3
  import { COLOR_HUES, COLOR_TINTS, color } from "@sanity/color";
4
4
  const defaultThemeFonts = {
5
5
  code: {
@@ -3053,4 +3053,4 @@ function _createColor(opts, dark, name) {
3053
3053
  }
3054
3054
  export { COLOR_CONFIG_STATE_TONES as A, THEME_COLOR_INPUT_STATES as B, COLOR_CONFIG_BLEND_KEYS as C, COLOR_CONFIG_INPUT_STATES as D, COLOR_CONFIG_INPUT_MODES as E, THEME_COLOR_AVATAR_COLORS as F, THEME_COLOR_STATES as H, THEME_COLOR_BLEND_MODES as I, THEME_COLOR_BUTTON_MODES as L, isColorButtonMode as M, isColorHueKey as N, COLOR_CONFIG_STATES as O, isColorTintKey as P, THEME_COLOR_CARD_TONES as R, COLOR_CONFIG_AVATAR_COLORS as S, COLOR_CONFIG_CARD_TONES as T, THEME_COLOR_STATE_TONES as U, THEME_COLOR_SCHEMES as V, isColorConfigStateKey as _, rgba as a, isColorTokenValue as b, hslToRgb as c, rgbaToRGBA as d, mix as f, isColorConfigBlendKey as g, isColorConfigBaseTone as h, multiply as i, isColorBlendModeValue as j, COLOR_CONFIG_STATE_KEYS as k, rgbToHex as l, isColorConfigBaseKey as m, buildTheme as n, parseColor as o, parseTokenValue as p, screen as r, hexToRgb as s, createColorTheme as t, rgbToHsl as u, isColorConfigStateTone as v, COLOR_CONFIG_CARD_KEYS as w, isColorValue as x, isColorOpacityValue as y, THEME_COLOR_INPUT_MODES as z };
3055
3055
 
3056
- //# sourceMappingURL=factory-BzXTX8_Q.js.map
3056
+ //# sourceMappingURL=factory-D1M0GqJn.js.map