@sanity/ui 2.0.0-alpha.3 → 2.0.0-alpha.31

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 (637) hide show
  1. package/dist/index.cjs.mjs +37 -10
  2. package/dist/index.d.ts +445 -659
  3. package/dist/index.esm.js +737 -2925
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.js +1052 -3033
  6. package/dist/index.js.map +1 -1
  7. package/dist/theme.cjs.mjs +48 -0
  8. package/dist/theme.d.ts +1205 -0
  9. package/dist/theme.esm.js +4113 -0
  10. package/dist/theme.esm.js.map +1 -0
  11. package/dist/theme.js +4162 -0
  12. package/dist/theme.js.map +1 -0
  13. package/exports/index.ts +1 -0
  14. package/exports/theme.ts +1 -0
  15. package/package.json +56 -35
  16. package/src/{__workshop__ → core/__workshop__}/constants.ts +1 -3
  17. package/src/core/_compat.ts +115 -0
  18. package/src/{components → core/components}/autocomplete/__workshop__/async.tsx +4 -5
  19. package/src/{components → core/components}/autocomplete/__workshop__/constrainedHeight.tsx +27 -22
  20. package/src/{components → core/components}/autocomplete/__workshop__/custom.tsx +36 -31
  21. package/src/{components → core/components}/autocomplete/__workshop__/example.tsx +2 -2
  22. package/src/{components → core/components}/autocomplete/__workshop__/focusAndBlur.tsx +5 -3
  23. package/src/{components → core/components}/autocomplete/autocomplete.tsx +7 -1
  24. package/src/{components → core/components}/dialog/__workshop__/activate.tsx +0 -1
  25. package/src/{components → core/components}/dialog/__workshop__/layering.tsx +5 -1
  26. package/src/{components → core/components}/dialog/__workshop__/panes.tsx +2 -7
  27. package/src/{components → core/components}/dialog/dialog.tsx +25 -24
  28. package/src/{components → core/components}/dialog/styles.ts +40 -1
  29. package/src/{components → core/components}/hotkeys/hotkeys.tsx +2 -0
  30. package/src/{components → core/components}/menu/__workshop__/asComponent.tsx +4 -4
  31. package/src/{components → core/components}/menu/__workshop__/customMenuItem.tsx +9 -3
  32. package/src/{components → core/components}/menu/__workshop__/disableFocusOnClose.tsx +2 -2
  33. package/src/{components → core/components}/menu/__workshop__/menuButton.tsx +1 -1
  34. package/src/{components → core/components}/menu/menu.test.tsx +1 -1
  35. package/src/{components → core/components}/menu/menu.tsx +2 -0
  36. package/src/{components → core/components}/menu/menuButton.tsx +3 -1
  37. package/src/{components → core/components}/menu/menuGroup.tsx +22 -23
  38. package/src/{components → core/components}/menu/menuItem.tsx +29 -35
  39. package/src/{components → core/components}/skeleton/textSkeleton.tsx +1 -1
  40. package/src/{components → core/components}/tab/tab.tsx +4 -2
  41. package/src/{components → core/components}/toast/toast.test.tsx +1 -1
  42. package/src/{components → core/components}/toast/toast.tsx +13 -4
  43. package/src/{components → core/components}/tree/__workshop__/tabFromElement.tsx +1 -1
  44. package/src/{components → core/components}/tree/style.ts +6 -6
  45. package/src/{components → core/components}/tree/treeItem.tsx +3 -3
  46. package/src/{constants.ts → core/constants.ts} +1 -0
  47. package/src/{hooks → core/hooks}/useElementRect/__workshop__/example.tsx +3 -1
  48. package/src/{hooks → core/hooks}/useMediaIndex/__workshop__/test.tsx +1 -1
  49. package/src/{hooks → core/hooks}/useMediaIndex/useMediaIndex.test.tsx +2 -1
  50. package/src/{index.ts → core/index.ts} +2 -0
  51. package/src/{lib → core/lib}/isRecord.ts +1 -1
  52. package/src/{primitives → core/primitives}/_selectable/style.ts +2 -1
  53. package/src/{primitives → core/primitives}/avatar/avatar.tsx +35 -21
  54. package/src/{primitives → core/primitives}/avatar/avatarCounter.tsx +3 -3
  55. package/src/{primitives → core/primitives}/avatar/styles.ts +15 -7
  56. package/src/{primitives → core/primitives}/avatar/types.ts +2 -1
  57. package/src/{primitives → core/primitives}/badge/badge.test.tsx +1 -1
  58. package/src/{primitives → core/primitives}/badge/badge.tsx +10 -5
  59. package/src/core/primitives/badge/styles.ts +20 -0
  60. package/src/{primitives → core/primitives}/badge/types.ts +1 -2
  61. package/src/{primitives → core/primitives}/box/box.tsx +3 -0
  62. package/src/{primitives → core/primitives}/button/__workshop__/sanityUploadButton.tsx +2 -1
  63. package/src/{primitives → core/primitives}/button/__workshop__/stacked.tsx +1 -1
  64. package/src/{primitives → core/primitives}/button/button.test.tsx +1 -1
  65. package/src/{primitives → core/primitives}/button/button.tsx +8 -4
  66. package/src/{primitives → core/primitives}/button/styles.ts +27 -10
  67. package/src/{primitives → core/primitives}/card/__workshop__/asButton.tsx +6 -6
  68. package/src/{primitives → core/primitives}/card/__workshop__/asComponent.tsx +1 -1
  69. package/src/{primitives → core/primitives}/card/__workshop__/selected.tsx +2 -12
  70. package/src/{primitives → core/primitives}/card/card.tsx +6 -1
  71. package/src/{primitives → core/primitives}/card/styles.ts +2 -0
  72. package/src/{primitives → core/primitives}/card/types.ts +1 -1
  73. package/src/{primitives → core/primitives}/checkbox/__workshop__/example.tsx +1 -1
  74. package/src/{primitives → core/primitives}/checkbox/__workshop__/props.tsx +1 -1
  75. package/src/{primitives → core/primitives}/checkbox/__workshop__/readOnly.tsx +1 -1
  76. package/src/{primitives → core/primitives}/checkbox/checkbox.tsx +2 -0
  77. package/src/{primitives → core/primitives}/checkbox/styles.ts +4 -3
  78. package/src/{primitives → core/primitives}/code/code.tsx +1 -0
  79. package/src/{primitives → core/primitives}/container/container.tsx +2 -0
  80. package/src/{primitives → core/primitives}/container/styles.ts +1 -1
  81. package/src/{primitives → core/primitives}/flex/flex.tsx +2 -0
  82. package/src/{primitives → core/primitives}/grid/grid.tsx +2 -0
  83. package/src/{primitives → core/primitives}/heading/heading.tsx +3 -1
  84. package/src/{primitives → core/primitives}/inline/inline.tsx +3 -0
  85. package/src/{primitives → core/primitives}/inline/styles.ts +1 -1
  86. package/src/{primitives → core/primitives}/kbd/kbd.tsx +2 -0
  87. package/src/{primitives → core/primitives}/label/label.tsx +3 -1
  88. package/src/{primitives → core/primitives}/popover/__workshop__/RecursiveStory.tsx +2 -9
  89. package/src/{primitives → core/primitives}/popover/__workshop__/TestStory.tsx +6 -3
  90. package/src/{primitives → core/primitives}/popover/constants.ts +3 -2
  91. package/src/{primitives → core/primitives}/popover/helpers.ts +1 -1
  92. package/src/{primitives → core/primitives}/popover/popover.tsx +12 -8
  93. package/src/{primitives → core/primitives}/popover/popoverCard.tsx +22 -16
  94. package/src/{primitives → core/primitives}/radio/radio.tsx +2 -0
  95. package/src/{primitives → core/primitives}/radio/styles.ts +1 -1
  96. package/src/{primitives → core/primitives}/select/select.tsx +4 -2
  97. package/src/{primitives → core/primitives}/select/styles.ts +4 -2
  98. package/src/{primitives → core/primitives}/spinner/spinner.tsx +2 -0
  99. package/src/{primitives → core/primitives}/stack/stack.tsx +2 -0
  100. package/src/{primitives → core/primitives}/stack/styles.ts +1 -1
  101. package/src/{primitives → core/primitives}/switch/__workshop__/example.tsx +1 -1
  102. package/src/{primitives → core/primitives}/switch/styles.ts +2 -2
  103. package/src/{primitives → core/primitives}/switch/switch.tsx +4 -0
  104. package/src/{primitives → core/primitives}/text/__workshop__/colored.tsx +2 -1
  105. package/src/{primitives → core/primitives}/text/text.tsx +4 -1
  106. package/src/{primitives → core/primitives}/textArea/__workshop__/plain.tsx +1 -1
  107. package/src/{primitives → core/primitives}/textArea/textArea.tsx +6 -2
  108. package/src/{primitives → core/primitives}/textInput/__workshop__/plain.tsx +1 -1
  109. package/src/{primitives → core/primitives}/textInput/__workshop__/states.tsx +3 -3
  110. package/src/{primitives → core/primitives}/textInput/textInput.tsx +12 -2
  111. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +99 -0
  112. package/src/core/primitives/tooltip/__workshop__/index.ts +29 -0
  113. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +73 -0
  114. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +85 -0
  115. package/src/core/primitives/tooltip/conditionalWrapper.tsx +15 -0
  116. package/src/core/primitives/tooltip/constants.ts +23 -0
  117. package/src/{primitives → core/primitives}/tooltip/tooltip.test.tsx +192 -20
  118. package/src/{primitives → core/primitives}/tooltip/tooltip.tsx +199 -76
  119. package/src/{primitives → core/primitives}/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +4 -10
  120. package/src/{primitives → core/primitives}/types.ts +4 -0
  121. package/src/{styles → core/styles}/border/borderStyle.ts +16 -13
  122. package/src/{styles → core/styles}/box/boxStyle.ts +1 -1
  123. package/src/{styles → core/styles}/colorVars/colorVarsStyle.ts +3 -3
  124. package/src/{styles → core/styles}/flex/flexItemStyle.ts +1 -1
  125. package/src/{styles → core/styles}/flex/flexStyle.ts +1 -1
  126. package/src/{styles → core/styles}/focusRing/index.ts +2 -2
  127. package/src/{styles → core/styles}/font/codeFontStyle.ts +1 -1
  128. package/src/{styles → core/styles}/font/headingFontStyle.ts +1 -1
  129. package/src/{styles → core/styles}/font/labelFontStyle.ts +1 -1
  130. package/src/{styles → core/styles}/font/responsiveFont.ts +2 -2
  131. package/src/{styles → core/styles}/font/textAlignStyle.ts +1 -1
  132. package/src/{styles → core/styles}/font/textFontStyle.ts +1 -1
  133. package/src/{styles → core/styles}/font/types.ts +1 -1
  134. package/src/{styles → core/styles}/grid/gridItemStyle.ts +1 -1
  135. package/src/{styles → core/styles}/grid/gridStyle.ts +1 -1
  136. package/src/{styles → core/styles}/helpers.ts +2 -2
  137. package/src/{styles → core/styles}/input/responsiveInputPaddingStyle.ts +1 -1
  138. package/src/{styles → core/styles}/input/textInputStyle.ts +13 -8
  139. package/src/{styles → core/styles}/margin/marginStyle.ts +1 -1
  140. package/src/{styles → core/styles}/margin/marginsStyle.test.ts +1 -1
  141. package/src/{styles → core/styles}/padding/paddingStyle.test.ts +1 -1
  142. package/src/{styles → core/styles}/padding/paddingStyle.ts +1 -1
  143. package/src/{styles → core/styles}/radius/radiusStyle.ts +1 -1
  144. package/src/{styles → core/styles}/shadow/shadowStyle.ts +9 -7
  145. package/src/{styles → core/styles}/types.ts +1 -1
  146. package/src/core/theme/__workshop__/build/Root.tsx +346 -0
  147. package/src/core/theme/__workshop__/build/helpers.ts +46 -0
  148. package/src/core/theme/__workshop__/build/story.tsx +457 -0
  149. package/src/{theme → core/theme}/__workshop__/canvas.tsx +87 -113
  150. package/src/{theme → core/theme}/__workshop__/color.tsx +3 -6
  151. package/src/{theme → core/theme}/__workshop__/index.ts +5 -0
  152. package/src/{theme → core/theme}/defaults.ts +1 -1
  153. package/src/core/theme/index.ts +5 -0
  154. package/src/{theme → core/theme}/theme.test.tsx +2 -2
  155. package/src/{theme → core/theme}/themeColorProvider.tsx +2 -2
  156. package/src/{theme → core/theme}/themeProvider.tsx +3 -3
  157. package/src/core/theme/types.ts +11 -0
  158. package/src/{theme → core/theme}/useRootTheme.ts +1 -2
  159. package/src/{theme → core/theme}/useTheme.ts +1 -2
  160. package/src/core/types/badge.ts +12 -0
  161. package/src/core/types/button.ts +22 -0
  162. package/src/core/types/card.ts +6 -0
  163. package/src/{types → core/types}/index.ts +0 -1
  164. package/src/core/types/selectable.ts +6 -0
  165. package/src/core/utils/arrow/arrow.tsx +121 -0
  166. package/src/core/utils/arrow/cmds.ts +91 -0
  167. package/src/core/utils/arrow/index.ts +1 -0
  168. package/src/{utils → core/utils}/boundaryElement/__workshop__/plain.tsx +2 -6
  169. package/src/{utils → core/utils}/boundaryElement/boundaryElement.test.tsx +1 -1
  170. package/src/{utils → core/utils}/index.ts +1 -0
  171. package/src/{utils → core/utils}/layer/__workshop__/_debug.tsx +1 -1
  172. package/src/{utils → core/utils}/layer/layer.test.tsx +1 -1
  173. package/src/{utils → core/utils}/portal/__workshop__/named.tsx +3 -3
  174. package/src/{utils → core/utils}/portal/portal.test.tsx +1 -1
  175. package/src/theme/{lib/theme/color/selectable → build/_deprecated/color/_selectable}/createSelectableTones.ts +7 -4
  176. package/src/theme/{lib/theme/color/solid → build/_deprecated/color/_solid}/createSolidTones.ts +1 -3
  177. package/src/theme/{lib/theme → build/_deprecated}/color/button/createButtonModes.ts +6 -4
  178. package/src/theme/{lib/theme → build/_deprecated}/color/button/createButtonTones.ts +7 -4
  179. package/src/theme/{lib/theme → build/_deprecated}/color/card/createCardStates.ts +7 -5
  180. package/src/theme/{lib/theme → build/_deprecated}/color/color.test.ts +1 -1
  181. package/src/theme/{lib/theme → build/_deprecated}/color/defaults.ts +7 -7
  182. package/src/theme/{lib/theme → build/_deprecated}/color/factory.ts +25 -21
  183. package/src/theme/build/_deprecated/color/index.ts +1 -0
  184. package/src/theme/{lib/theme → build/_deprecated}/color/input/createInputModes.ts +1 -4
  185. package/src/theme/{lib/theme → build/_deprecated}/color/muted/createMuted.ts +2 -4
  186. package/src/theme/{lib/theme → build/_deprecated}/color/spot/createSpot.ts +1 -2
  187. package/src/theme/build/buildColorTheme.test.ts +184 -0
  188. package/src/theme/build/buildColorTheme.ts +537 -0
  189. package/src/theme/build/buildTheme.test.ts +85 -0
  190. package/src/theme/build/buildTheme.ts +28 -0
  191. package/src/theme/build/colorToken.ts +37 -0
  192. package/src/theme/build/defaults/colorPalette.ts +5 -0
  193. package/src/theme/build/defaults/colorTokens.ts +499 -0
  194. package/src/theme/{studioTheme/theme.ts → build/defaults/config.ts} +27 -28
  195. package/src/theme/build/defaults/fonts.ts +219 -0
  196. package/src/theme/build/index.ts +3 -0
  197. package/src/theme/{lib → build/lib}/color-fns/blend/index.ts +1 -0
  198. package/src/theme/build/lib/color-fns/blend/mix.ts +21 -0
  199. package/src/theme/build/lib/color-fns/blend/multiply.ts +18 -0
  200. package/src/theme/build/lib/color-fns/blend/screen.ts +18 -0
  201. package/src/theme/{lib → build/lib}/color-fns/color-fns.test.ts +10 -7
  202. package/src/theme/build/lib/color-fns/contrastRatio.ts +30 -0
  203. package/src/theme/{lib → build/lib}/color-fns/convert.ts +25 -2
  204. package/src/theme/{lib → build/lib}/color-fns/index.ts +2 -1
  205. package/src/theme/{lib → build/lib}/color-fns/parse.ts +7 -3
  206. package/src/theme/{lib/color-fns/helpers → build/lib/color-fns}/rgba.ts +1 -1
  207. package/src/theme/{lib → build/lib}/color-fns/types.ts +11 -0
  208. package/src/theme/build/lib/utils.ts +19 -0
  209. package/src/theme/build/merge.ts +23 -0
  210. package/src/theme/build/mixThemeColor.test.ts +21 -0
  211. package/src/theme/build/mixThemeColor.ts +53 -0
  212. package/src/theme/build/renderColorTheme.ts +544 -0
  213. package/src/theme/build/renderColorValue.ts +70 -0
  214. package/src/theme/build/resolveColorTokens.ts +352 -0
  215. package/src/theme/config/helpers.ts +47 -0
  216. package/src/theme/config/index.ts +4 -0
  217. package/src/theme/config/system.ts +83 -0
  218. package/src/theme/config/tokens/color/types.ts +112 -0
  219. package/src/theme/config/tokens/index.ts +4 -0
  220. package/src/theme/config/tokens/parseTokenKey.test.ts +64 -0
  221. package/src/theme/config/tokens/parseTokenKey.ts +66 -0
  222. package/src/theme/config/tokens/parseTokenValue.test.ts +45 -0
  223. package/src/theme/config/tokens/parseTokenValue.ts +102 -0
  224. package/src/theme/config/tokens/types.ts +44 -0
  225. package/src/theme/config/types.ts +51 -0
  226. package/src/theme/index.ts +4 -8
  227. package/src/theme/system/_system.ts +95 -0
  228. package/src/theme/system/avatar.ts +14 -0
  229. package/src/theme/system/color/_constants.ts +38 -0
  230. package/src/theme/{lib/theme/color/muted/types.ts → system/color/_deprecated/muted.ts} +3 -1
  231. package/src/theme/{lib/theme/color/solid/types.ts → system/color/_deprecated/solid.ts} +3 -1
  232. package/src/theme/system/color/_deprecated/spot.ts +13 -0
  233. package/src/theme/{lib/theme/color/_generic/types.ts → system/color/_generic.ts} +5 -1
  234. package/src/theme/system/color/_helpers.ts +23 -0
  235. package/src/theme/system/color/_system.ts +100 -0
  236. package/src/theme/system/color/avatar.ts +13 -0
  237. package/src/theme/system/color/badge.ts +9 -0
  238. package/src/theme/{lib/theme/color/button/types.ts → system/color/button.ts} +6 -11
  239. package/src/theme/system/color/card.ts +18 -0
  240. package/src/theme/system/color/index.ts +20 -0
  241. package/src/theme/{lib/theme/color/input/types.ts → system/color/input.ts} +3 -0
  242. package/src/theme/system/color/kbd.ts +8 -0
  243. package/src/theme/{lib/theme/color/selectable/types.ts → system/color/selectable.ts} +1 -1
  244. package/src/theme/{lib/theme → system}/index.ts +2 -1
  245. package/src/theme/{lib/theme → system}/input.ts +6 -6
  246. package/src/theme/system/shadow.ts +24 -0
  247. package/src/theme/themes/studio/config.ts +69 -0
  248. package/src/theme/{studioTheme → themes/studio}/fonts.ts +50 -50
  249. package/src/theme/themes/studio/index.ts +1 -0
  250. package/src/theme/themes/studio/studioTheme.test.ts +27 -0
  251. package/src/theme/themes/studio/studioTheme.ts +8 -0
  252. package/src/primitives/badge/styles.ts +0 -20
  253. package/src/primitives/popover/popoverArrow.tsx +0 -76
  254. package/src/primitives/tooltip/__workshop__/index.ts +0 -14
  255. package/src/primitives/tooltip/constants.ts +0 -16
  256. package/src/primitives/tooltip/tooltipArrow.tsx +0 -89
  257. package/src/theme/lib/color-fns/blend/multiply.ts +0 -22
  258. package/src/theme/lib/color-fns/blend/screen.ts +0 -22
  259. package/src/theme/lib/color-fns/helpers/index.ts +0 -1
  260. package/src/theme/lib/theme/avatar.ts +0 -12
  261. package/src/theme/lib/theme/color/base/index.ts +0 -1
  262. package/src/theme/lib/theme/color/button/index.ts +0 -1
  263. package/src/theme/lib/theme/color/card/index.ts +0 -1
  264. package/src/theme/lib/theme/color/card/types.ts +0 -18
  265. package/src/theme/lib/theme/color/index.ts +0 -14
  266. package/src/theme/lib/theme/color/input/index.ts +0 -1
  267. package/src/theme/lib/theme/color/muted/index.ts +0 -1
  268. package/src/theme/lib/theme/color/selectable/index.ts +0 -1
  269. package/src/theme/lib/theme/color/solid/index.ts +0 -1
  270. package/src/theme/lib/theme/color/spot/index.ts +0 -1
  271. package/src/theme/lib/theme/color/spot/types.ts +0 -28
  272. package/src/theme/lib/theme/color/syntax/index.ts +0 -1
  273. package/src/theme/lib/theme/color/types.ts +0 -72
  274. package/src/theme/lib/theme/shadow.ts +0 -20
  275. package/src/theme/lib/theme/theme.ts +0 -43
  276. package/src/theme/studioTheme/color.ts +0 -650
  277. package/src/theme/studioTheme/helpers.ts +0 -17
  278. package/src/theme/studioTheme/index.ts +0 -1
  279. package/src/theme/studioTheme/tints.ts +0 -152
  280. package/src/theme/types.ts +0 -47
  281. package/src/types/badge.ts +0 -9
  282. package/src/types/button.ts +0 -14
  283. package/src/types/card.ts +0 -6
  284. package/src/types/selectable.ts +0 -4
  285. package/src/types/styled.ts +0 -9
  286. /package/src/{components → core/components}/autocomplete/__fixtures__/countries.ts +0 -0
  287. /package/src/{components → core/components}/autocomplete/__mocks__/apiStore.ts +0 -0
  288. /package/src/{components → core/components}/autocomplete/__workshop__/.eslintrc +0 -0
  289. /package/src/{components → core/components}/autocomplete/__workshop__/fullscreen.tsx +0 -0
  290. /package/src/{components → core/components}/autocomplete/__workshop__/index.ts +0 -0
  291. /package/src/{components → core/components}/autocomplete/__workshop__/types.ts +0 -0
  292. /package/src/{components → core/components}/autocomplete/autocomplete.styles.tsx +0 -0
  293. /package/src/{components → core/components}/autocomplete/autocompleteOption.tsx +0 -0
  294. /package/src/{components → core/components}/autocomplete/autocompleteReducer.ts +0 -0
  295. /package/src/{components → core/components}/autocomplete/constants.ts +0 -0
  296. /package/src/{components → core/components}/autocomplete/index.ts +0 -0
  297. /package/src/{components → core/components}/autocomplete/types.ts +0 -0
  298. /package/src/{components → core/components}/breadcrumbs/__workshop__/.eslintrc +0 -0
  299. /package/src/{components → core/components}/breadcrumbs/__workshop__/example.tsx +0 -0
  300. /package/src/{components → core/components}/breadcrumbs/__workshop__/index.ts +0 -0
  301. /package/src/{components → core/components}/breadcrumbs/breadcrumbs.styles.ts +0 -0
  302. /package/src/{components → core/components}/breadcrumbs/breadcrumbs.tsx +0 -0
  303. /package/src/{components → core/components}/breadcrumbs/index.ts +0 -0
  304. /package/src/{components → core/components}/dialog/__workshop__/.eslintrc +0 -0
  305. /package/src/{components → core/components}/dialog/__workshop__/autoFocus.tsx +0 -0
  306. /package/src/{components → core/components}/dialog/__workshop__/index.ts +0 -0
  307. /package/src/{components → core/components}/dialog/__workshop__/nested.tsx +0 -0
  308. /package/src/{components → core/components}/dialog/__workshop__/onScroll.tsx +0 -0
  309. /package/src/{components → core/components}/dialog/__workshop__/position.tsx +0 -0
  310. /package/src/{components → core/components}/dialog/__workshop__/props.tsx +0 -0
  311. /package/src/{components → core/components}/dialog/__workshop__/provider.tsx +0 -0
  312. /package/src/{components → core/components}/dialog/__workshop__/wrapped.tsx +0 -0
  313. /package/src/{components → core/components}/dialog/dialogContext.ts +0 -0
  314. /package/src/{components → core/components}/dialog/dialogProvider.tsx +0 -0
  315. /package/src/{components → core/components}/dialog/index.ts +0 -0
  316. /package/src/{components → core/components}/dialog/useDialog.ts +0 -0
  317. /package/src/{components → core/components}/hotkeys/__workshop__/.eslintrc +0 -0
  318. /package/src/{components → core/components}/hotkeys/__workshop__/index.ts +0 -0
  319. /package/src/{components → core/components}/hotkeys/__workshop__/plain.tsx +0 -0
  320. /package/src/{components → core/components}/hotkeys/index.ts +0 -0
  321. /package/src/{components → core/components}/index.ts +0 -0
  322. /package/src/{components → core/components}/menu/__workshop__/.eslintrc +0 -0
  323. /package/src/{components → core/components}/menu/__workshop__/closableMenuButton.tsx +0 -0
  324. /package/src/{components → core/components}/menu/__workshop__/constrainedInBoundary.tsx +0 -0
  325. /package/src/{components → core/components}/menu/__workshop__/groups.tsx +0 -0
  326. /package/src/{components → core/components}/menu/__workshop__/index.ts +0 -0
  327. /package/src/{components → core/components}/menu/__workshop__/menuGroupRight.tsx +0 -0
  328. /package/src/{components → core/components}/menu/__workshop__/nestedMenu.tsx +0 -0
  329. /package/src/{components → core/components}/menu/__workshop__/onCloseMenuButton.tsx +0 -0
  330. /package/src/{components → core/components}/menu/__workshop__/selectedItem.tsx +0 -0
  331. /package/src/{components → core/components}/menu/__workshop__/shouldFocus.tsx +0 -0
  332. /package/src/{components → core/components}/menu/__workshop__/tones.tsx +0 -0
  333. /package/src/{components → core/components}/menu/__workshop__/withoutArrow.tsx +0 -0
  334. /package/src/{components → core/components}/menu/helpers.ts +0 -0
  335. /package/src/{components → core/components}/menu/index.ts +0 -0
  336. /package/src/{components → core/components}/menu/menuContext.ts +0 -0
  337. /package/src/{components → core/components}/menu/menuDivider.ts +0 -0
  338. /package/src/{components → core/components}/menu/useMenu.ts +0 -0
  339. /package/src/{components → core/components}/menu/useMenuController.ts +0 -0
  340. /package/src/{components → core/components}/skeleton/__workshop__/.eslintrc +0 -0
  341. /package/src/{components → core/components}/skeleton/__workshop__/delay.tsx +0 -0
  342. /package/src/{components → core/components}/skeleton/__workshop__/index.ts +0 -0
  343. /package/src/{components → core/components}/skeleton/__workshop__/skeleton.tsx +0 -0
  344. /package/src/{components → core/components}/skeleton/index.ts +0 -0
  345. /package/src/{components → core/components}/skeleton/skeleton.tsx +0 -0
  346. /package/src/{components → core/components}/skeleton/styles.ts +0 -0
  347. /package/src/{components → core/components}/tab/__workshop__/.eslintrc +0 -0
  348. /package/src/{components → core/components}/tab/__workshop__/example.tsx +0 -0
  349. /package/src/{components → core/components}/tab/__workshop__/index.ts +0 -0
  350. /package/src/{components → core/components}/tab/index.ts +0 -0
  351. /package/src/{components → core/components}/tab/tabList.tsx +0 -0
  352. /package/src/{components → core/components}/tab/tabPanel.tsx +0 -0
  353. /package/src/{components → core/components}/toast/__workshop__/.eslintrc +0 -0
  354. /package/src/{components → core/components}/toast/__workshop__/hook.tsx +0 -0
  355. /package/src/{components → core/components}/toast/__workshop__/index.ts +0 -0
  356. /package/src/{components → core/components}/toast/__workshop__/toast.tsx +0 -0
  357. /package/src/{components → core/components}/toast/index.ts +0 -0
  358. /package/src/{components → core/components}/toast/toastContext.ts +0 -0
  359. /package/src/{components → core/components}/toast/toastProvider.tsx +0 -0
  360. /package/src/{components → core/components}/toast/types.ts +0 -0
  361. /package/src/{components → core/components}/toast/useToast.ts +0 -0
  362. /package/src/{components → core/components}/tree/__workshop__/.eslintrc +0 -0
  363. /package/src/{components → core/components}/tree/__workshop__/basic.perf.ts +0 -0
  364. /package/src/{components → core/components}/tree/__workshop__/basic.tsx +0 -0
  365. /package/src/{components → core/components}/tree/__workshop__/index.ts +0 -0
  366. /package/src/{components → core/components}/tree/helpers.ts +0 -0
  367. /package/src/{components → core/components}/tree/index.ts +0 -0
  368. /package/src/{components → core/components}/tree/tree.tsx +0 -0
  369. /package/src/{components → core/components}/tree/treeContext.ts +0 -0
  370. /package/src/{components → core/components}/tree/treeGroup.tsx +0 -0
  371. /package/src/{components → core/components}/tree/types.ts +0 -0
  372. /package/src/{components → core/components}/tree/useTree.ts +0 -0
  373. /package/src/{global.ts → core/global.ts} +0 -0
  374. /package/src/{helpers → core/helpers}/animation.ts +0 -0
  375. /package/src/{helpers → core/helpers}/element.ts +0 -0
  376. /package/src/{helpers → core/helpers}/focus.ts +0 -0
  377. /package/src/{helpers → core/helpers}/index.ts +0 -0
  378. /package/src/{helpers → core/helpers}/scroll.ts +0 -0
  379. /package/src/{hooks → core/hooks}/_internal/index.ts +0 -0
  380. /package/src/{hooks → core/hooks}/_internal/useUnique.ts +0 -0
  381. /package/src/{hooks → core/hooks}/index.ts +0 -0
  382. /package/src/{hooks → core/hooks}/useArrayProp.ts +0 -0
  383. /package/src/{hooks → core/hooks}/useClickOutside.ts +0 -0
  384. /package/src/{hooks → core/hooks}/useCustomValidity.ts +0 -0
  385. /package/src/{hooks → core/hooks}/useDelayed.test.ts +0 -0
  386. /package/src/{hooks → core/hooks}/useDelayedState.ts +0 -0
  387. /package/src/{hooks → core/hooks}/useElementRect/__workshop__/.eslintrc +0 -0
  388. /package/src/{hooks → core/hooks}/useElementRect/__workshop__/index.ts +0 -0
  389. /package/src/{hooks → core/hooks}/useElementRect/index.ts +0 -0
  390. /package/src/{hooks → core/hooks}/useElementRect/useElementRect.ts +0 -0
  391. /package/src/{hooks → core/hooks}/useElementSize.ts +0 -0
  392. /package/src/{hooks → core/hooks}/useForwardedRef.ts +0 -0
  393. /package/src/{hooks → core/hooks}/useGlobalKeyDown.ts +0 -0
  394. /package/src/{hooks → core/hooks}/useIsomorphicEffect.ts +0 -0
  395. /package/src/{hooks → core/hooks}/useMediaIndex/__workshop__/.eslintrc +0 -0
  396. /package/src/{hooks → core/hooks}/useMediaIndex/__workshop__/index.ts +0 -0
  397. /package/src/{hooks → core/hooks}/useMediaIndex/index.ts +0 -0
  398. /package/src/{hooks → core/hooks}/useMediaIndex/useMediaIndex.ts +0 -0
  399. /package/src/{hooks → core/hooks}/useMounted.ts +0 -0
  400. /package/src/{hooks → core/hooks}/usePrefersDark.hydration.test.tsx +0 -0
  401. /package/src/{hooks → core/hooks}/usePrefersDark.test.tsx +0 -0
  402. /package/src/{hooks → core/hooks}/usePrefersDark.ts +0 -0
  403. /package/src/{hooks → core/hooks}/usePrefersReducedMotion.hydration.test.tsx +0 -0
  404. /package/src/{hooks → core/hooks}/usePrefersReducedMotion.test.tsx +0 -0
  405. /package/src/{hooks → core/hooks}/usePrefersReducedMotion.ts +0 -0
  406. /package/src/{lib → core/lib}/globalScope.ts +0 -0
  407. /package/src/{observers → core/observers}/elementSizeObserver.ts +0 -0
  408. /package/src/{observers → core/observers}/index.ts +0 -0
  409. /package/src/{observers → core/observers}/resizeObserver.ts +0 -0
  410. /package/src/{primitives → core/primitives}/_selectable/index.ts +0 -0
  411. /package/src/{primitives → core/primitives}/_selectable/selectable.tsx +0 -0
  412. /package/src/{primitives → core/primitives}/avatar/__workshop__/.eslintrc +0 -0
  413. /package/src/{primitives → core/primitives}/avatar/__workshop__/asButton.tsx +0 -0
  414. /package/src/{primitives → core/primitives}/avatar/__workshop__/index.ts +0 -0
  415. /package/src/{primitives → core/primitives}/avatar/__workshop__/stack.tsx +0 -0
  416. /package/src/{primitives → core/primitives}/avatar/avatarStack.tsx +0 -0
  417. /package/src/{primitives → core/primitives}/avatar/index.ts +0 -0
  418. /package/src/{primitives → core/primitives}/badge/__workshop__/.eslintrc +0 -0
  419. /package/src/{primitives → core/primitives}/badge/__workshop__/index.ts +0 -0
  420. /package/src/{primitives → core/primitives}/badge/__workshop__/props.tsx +0 -0
  421. /package/src/{primitives → core/primitives}/badge/__workshop__/tones.tsx +0 -0
  422. /package/src/{primitives → core/primitives}/badge/index.ts +0 -0
  423. /package/src/{primitives → core/primitives}/box/__workshop__/.eslintrc +0 -0
  424. /package/src/{primitives → core/primitives}/box/__workshop__/index.ts +0 -0
  425. /package/src/{primitives → core/primitives}/box/__workshop__/props.tsx +0 -0
  426. /package/src/{primitives → core/primitives}/box/__workshop__/responsive.tsx +0 -0
  427. /package/src/{primitives → core/primitives}/box/index.ts +0 -0
  428. /package/src/{primitives → core/primitives}/button/__workshop__/.eslintrc +0 -0
  429. /package/src/{primitives → core/primitives}/button/__workshop__/custom.tsx +0 -0
  430. /package/src/{primitives → core/primitives}/button/__workshop__/customIcons.tsx +0 -0
  431. /package/src/{primitives → core/primitives}/button/__workshop__/index.ts +0 -0
  432. /package/src/{primitives → core/primitives}/button/__workshop__/mixedChildren.tsx +0 -0
  433. /package/src/{primitives → core/primitives}/button/__workshop__/props.tsx +0 -0
  434. /package/src/{primitives → core/primitives}/button/__workshop__/styled1.tsx +0 -0
  435. /package/src/{primitives → core/primitives}/button/__workshop__/styled2.tsx +0 -0
  436. /package/src/{primitives → core/primitives}/button/__workshop__/uploadButton.tsx +0 -0
  437. /package/src/{primitives → core/primitives}/button/index.ts +0 -0
  438. /package/src/{primitives → core/primitives}/card/__workshop__/.eslintrc +0 -0
  439. /package/src/{primitives → core/primitives}/card/__workshop__/allTones.tsx +0 -0
  440. /package/src/{primitives → core/primitives}/card/__workshop__/checkered.tsx +0 -0
  441. /package/src/{primitives → core/primitives}/card/__workshop__/index.ts +0 -0
  442. /package/src/{primitives → core/primitives}/card/__workshop__/interactive.tsx +0 -0
  443. /package/src/{primitives → core/primitives}/card/__workshop__/listNavigation.tsx +0 -0
  444. /package/src/{primitives → core/primitives}/card/__workshop__/props.tsx +0 -0
  445. /package/src/{primitives → core/primitives}/card/__workshop__/styled.tsx +0 -0
  446. /package/src/{primitives → core/primitives}/card/index.ts +0 -0
  447. /package/src/{primitives → core/primitives}/checkbox/__workshop__/.eslintrc +0 -0
  448. /package/src/{primitives → core/primitives}/checkbox/__workshop__/index.ts +0 -0
  449. /package/src/{primitives → core/primitives}/checkbox/__workshop__/tones.tsx +0 -0
  450. /package/src/{primitives → core/primitives}/checkbox/index.ts +0 -0
  451. /package/src/{primitives → core/primitives}/code/__workshop__/.eslintrc +0 -0
  452. /package/src/{primitives → core/primitives}/code/__workshop__/index.ts +0 -0
  453. /package/src/{primitives → core/primitives}/code/__workshop__/opticalAlignment.tsx +0 -0
  454. /package/src/{primitives → core/primitives}/code/__workshop__/props.tsx +0 -0
  455. /package/src/{primitives → core/primitives}/code/index.ts +0 -0
  456. /package/src/{primitives → core/primitives}/code/styles.ts +0 -0
  457. /package/src/{primitives → core/primitives}/container/__workshop__/.eslintrc +0 -0
  458. /package/src/{primitives → core/primitives}/container/__workshop__/example.tsx +0 -0
  459. /package/src/{primitives → core/primitives}/container/__workshop__/index.ts +0 -0
  460. /package/src/{primitives → core/primitives}/container/index.ts +0 -0
  461. /package/src/{primitives → core/primitives}/container/types.ts +0 -0
  462. /package/src/{primitives → core/primitives}/flex/__workshop__/.eslintrc +0 -0
  463. /package/src/{primitives → core/primitives}/flex/__workshop__/example.tsx +0 -0
  464. /package/src/{primitives → core/primitives}/flex/__workshop__/gap.tsx +0 -0
  465. /package/src/{primitives → core/primitives}/flex/__workshop__/index.ts +0 -0
  466. /package/src/{primitives → core/primitives}/flex/index.ts +0 -0
  467. /package/src/{primitives → core/primitives}/grid/__workshop__/.eslintrc +0 -0
  468. /package/src/{primitives → core/primitives}/grid/__workshop__/index.ts +0 -0
  469. /package/src/{primitives → core/primitives}/grid/__workshop__/responsive.tsx +0 -0
  470. /package/src/{primitives → core/primitives}/grid/index.ts +0 -0
  471. /package/src/{primitives → core/primitives}/heading/__workshop__/.eslintrc +0 -0
  472. /package/src/{primitives → core/primitives}/heading/__workshop__/index.ts +0 -0
  473. /package/src/{primitives → core/primitives}/heading/__workshop__/opticalAlignment.tsx +0 -0
  474. /package/src/{primitives → core/primitives}/heading/__workshop__/plain.tsx +0 -0
  475. /package/src/{primitives → core/primitives}/heading/index.ts +0 -0
  476. /package/src/{primitives → core/primitives}/heading/styles.ts +0 -0
  477. /package/src/{primitives → core/primitives}/heading/types.ts +0 -0
  478. /package/src/{primitives → core/primitives}/helpers.ts +0 -0
  479. /package/src/{primitives → core/primitives}/index.ts +0 -0
  480. /package/src/{primitives → core/primitives}/inline/__workshop__/.eslintrc +0 -0
  481. /package/src/{primitives → core/primitives}/inline/__workshop__/index.ts +0 -0
  482. /package/src/{primitives → core/primitives}/inline/__workshop__/plain.tsx +0 -0
  483. /package/src/{primitives → core/primitives}/inline/index.ts +0 -0
  484. /package/src/{primitives → core/primitives}/inline/types.ts +0 -0
  485. /package/src/{primitives → core/primitives}/kbd/__workshop__/.eslintrc +0 -0
  486. /package/src/{primitives → core/primitives}/kbd/__workshop__/index.ts +0 -0
  487. /package/src/{primitives → core/primitives}/kbd/__workshop__/plain.tsx +0 -0
  488. /package/src/{primitives → core/primitives}/kbd/index.tsx +0 -0
  489. /package/src/{primitives → core/primitives}/label/__workshop__/.eslintrc +0 -0
  490. /package/src/{primitives → core/primitives}/label/__workshop__/index.ts +0 -0
  491. /package/src/{primitives → core/primitives}/label/__workshop__/opticalAlignment.tsx +0 -0
  492. /package/src/{primitives → core/primitives}/label/__workshop__/plain.tsx +0 -0
  493. /package/src/{primitives → core/primitives}/label/index.ts +0 -0
  494. /package/src/{primitives → core/primitives}/label/styles.ts +0 -0
  495. /package/src/{primitives → core/primitives}/popover/__workshop__/.eslintrc +0 -0
  496. /package/src/{primitives → core/primitives}/popover/__workshop__/AlignedStory.tsx +0 -0
  497. /package/src/{primitives → core/primitives}/popover/__workshop__/MarginsStory.tsx +0 -0
  498. /package/src/{primitives → core/primitives}/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -0
  499. /package/src/{primitives → core/primitives}/popover/__workshop__/OpenOnMountStory.tsx +0 -0
  500. /package/src/{primitives → core/primitives}/popover/__workshop__/PlainStory.tsx +0 -0
  501. /package/src/{primitives → core/primitives}/popover/__workshop__/SidePanelStory.tsx +0 -0
  502. /package/src/{primitives → core/primitives}/popover/__workshop__/index.ts +0 -0
  503. /package/src/{primitives → core/primitives}/popover/floating-ui/size.ts +0 -0
  504. /package/src/{primitives → core/primitives}/popover/index.ts +0 -0
  505. /package/src/{primitives → core/primitives}/popover/types.ts +0 -0
  506. /package/src/{primitives → core/primitives}/radio/__workshop__/.eslintrc +0 -0
  507. /package/src/{primitives → core/primitives}/radio/__workshop__/example.tsx +0 -0
  508. /package/src/{primitives → core/primitives}/radio/__workshop__/index.ts +0 -0
  509. /package/src/{primitives → core/primitives}/radio/__workshop__/plain.tsx +0 -0
  510. /package/src/{primitives → core/primitives}/radio/index.ts +0 -0
  511. /package/src/{primitives → core/primitives}/select/__workshop__/.eslintrc +0 -0
  512. /package/src/{primitives → core/primitives}/select/__workshop__/index.ts +0 -0
  513. /package/src/{primitives → core/primitives}/select/__workshop__/plain.tsx +0 -0
  514. /package/src/{primitives → core/primitives}/select/__workshop__/readOnly.tsx +0 -0
  515. /package/src/{primitives → core/primitives}/select/index.ts +0 -0
  516. /package/src/{primitives → core/primitives}/spinner/__workshop__/.eslintrc +0 -0
  517. /package/src/{primitives → core/primitives}/spinner/__workshop__/Props.tsx +0 -0
  518. /package/src/{primitives → core/primitives}/spinner/__workshop__/index.ts +0 -0
  519. /package/src/{primitives → core/primitives}/spinner/index.ts +0 -0
  520. /package/src/{primitives → core/primitives}/stack/__workshop__/.eslintrc +0 -0
  521. /package/src/{primitives → core/primitives}/stack/__workshop__/index.ts +0 -0
  522. /package/src/{primitives → core/primitives}/stack/__workshop__/plain.tsx +0 -0
  523. /package/src/{primitives → core/primitives}/stack/index.ts +0 -0
  524. /package/src/{primitives → core/primitives}/switch/__workshop__/.eslintrc +0 -0
  525. /package/src/{primitives → core/primitives}/switch/__workshop__/index.ts +0 -0
  526. /package/src/{primitives → core/primitives}/switch/__workshop__/props.tsx +0 -0
  527. /package/src/{primitives → core/primitives}/switch/index.ts +0 -0
  528. /package/src/{primitives → core/primitives}/text/__workshop__/.eslintrc +0 -0
  529. /package/src/{primitives → core/primitives}/text/__workshop__/example.tsx +0 -0
  530. /package/src/{primitives → core/primitives}/text/__workshop__/index.ts +0 -0
  531. /package/src/{primitives → core/primitives}/text/__workshop__/opticalAlignment.tsx +0 -0
  532. /package/src/{primitives → core/primitives}/text/index.ts +0 -0
  533. /package/src/{primitives → core/primitives}/text/styles.ts +0 -0
  534. /package/src/{primitives → core/primitives}/textArea/__workshop__/.eslintrc +0 -0
  535. /package/src/{primitives → core/primitives}/textArea/__workshop__/index.ts +0 -0
  536. /package/src/{primitives → core/primitives}/textArea/index.ts +0 -0
  537. /package/src/{primitives → core/primitives}/textInput/__workshop__/.eslintrc +0 -0
  538. /package/src/{primitives → core/primitives}/textInput/__workshop__/clearButton.tsx +0 -0
  539. /package/src/{primitives → core/primitives}/textInput/__workshop__/customValidity.tsx +0 -0
  540. /package/src/{primitives → core/primitives}/textInput/__workshop__/index.ts +0 -0
  541. /package/src/{primitives → core/primitives}/textInput/__workshop__/multipleTones.tsx +0 -0
  542. /package/src/{primitives → core/primitives}/textInput/__workshop__/readOnly.tsx +0 -0
  543. /package/src/{primitives → core/primitives}/textInput/__workshop__/tones.tsx +0 -0
  544. /package/src/{primitives → core/primitives}/textInput/__workshop__/typed.tsx +0 -0
  545. /package/src/{primitives → core/primitives}/textInput/index.ts +0 -0
  546. /package/src/{primitives → core/primitives}/tooltip/__workshop__/.eslintrc +0 -0
  547. /package/src/{primitives → core/primitives}/tooltip/__workshop__/props.tsx +0 -0
  548. /package/src/{primitives → core/primitives}/tooltip/index.ts +0 -0
  549. /package/src/{primitives → core/primitives}/tooltip/tooltipDelayGroup/index.ts +0 -0
  550. /package/src/{primitives → core/primitives}/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -0
  551. /package/src/{primitives → core/primitives}/tooltip/tooltipDelayGroup/types.ts +0 -0
  552. /package/src/{primitives → core/primitives}/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -0
  553. /package/src/{styles → core/styles}/border/index.ts +0 -0
  554. /package/src/{styles → core/styles}/border/types.ts +0 -0
  555. /package/src/{styles → core/styles}/box/index.ts +0 -0
  556. /package/src/{styles → core/styles}/box/types.ts +0 -0
  557. /package/src/{styles → core/styles}/colorVars/index.ts +0 -0
  558. /package/src/{styles → core/styles}/flex/index.ts +0 -0
  559. /package/src/{styles → core/styles}/flex/types.ts +0 -0
  560. /package/src/{styles → core/styles}/font/index.ts +0 -0
  561. /package/src/{styles → core/styles}/grid/index.ts +0 -0
  562. /package/src/{styles → core/styles}/grid/types.ts +0 -0
  563. /package/src/{styles → core/styles}/index.ts +0 -0
  564. /package/src/{styles → core/styles}/input/index.ts +0 -0
  565. /package/src/{styles → core/styles}/internal.ts +0 -0
  566. /package/src/{styles → core/styles}/margin/index.ts +0 -0
  567. /package/src/{styles → core/styles}/margin/types.ts +0 -0
  568. /package/src/{styles → core/styles}/padding/index.ts +0 -0
  569. /package/src/{styles → core/styles}/padding/types.ts +0 -0
  570. /package/src/{styles → core/styles}/radius/index.ts +0 -0
  571. /package/src/{styles → core/styles}/radius/types.ts +0 -0
  572. /package/src/{styles → core/styles}/shadow/index.ts +0 -0
  573. /package/src/{styles → core/styles}/shadow/types.ts +0 -0
  574. /package/src/{theme → core/theme}/__workshop__/.eslintrc +0 -0
  575. /package/src/{theme → core/theme}/__workshop__/layer.tsx +0 -0
  576. /package/src/{theme → core/theme}/__workshop__/nestedProvider.tsx +0 -0
  577. /package/src/{theme → core/theme}/themeContext.ts +0 -0
  578. /package/src/{types → core/types}/avatar.ts +0 -0
  579. /package/src/{types → core/types}/box.ts +0 -0
  580. /package/src/{types → core/types}/dialog.ts +0 -0
  581. /package/src/{types → core/types}/flex.ts +0 -0
  582. /package/src/{types → core/types}/grid.ts +0 -0
  583. /package/src/{types → core/types}/gridItem.ts +0 -0
  584. /package/src/{types → core/types}/placement.ts +0 -0
  585. /package/src/{types → core/types}/popover.ts +0 -0
  586. /package/src/{types → core/types}/radius.ts +0 -0
  587. /package/src/{types → core/types}/text.ts +0 -0
  588. /package/src/{utils → core/utils}/boundaryElement/__workshop__/.eslintrc +0 -0
  589. /package/src/{utils → core/utils}/boundaryElement/__workshop__/index.ts +0 -0
  590. /package/src/{utils → core/utils}/boundaryElement/boundaryElementContext.ts +0 -0
  591. /package/src/{utils → core/utils}/boundaryElement/boundaryElementProvider.tsx +0 -0
  592. /package/src/{utils → core/utils}/boundaryElement/index.ts +0 -0
  593. /package/src/{utils → core/utils}/boundaryElement/types.ts +0 -0
  594. /package/src/{utils → core/utils}/boundaryElement/useBoundaryElement.ts +0 -0
  595. /package/src/{utils → core/utils}/elementQuery/__workshop__/.eslintrc +0 -0
  596. /package/src/{utils → core/utils}/elementQuery/__workshop__/customMedia.tsx +0 -0
  597. /package/src/{utils → core/utils}/elementQuery/__workshop__/index.ts +0 -0
  598. /package/src/{utils → core/utils}/elementQuery/elementQuery.tsx +0 -0
  599. /package/src/{utils → core/utils}/elementQuery/helpers.ts +0 -0
  600. /package/src/{utils → core/utils}/elementQuery/index.ts +0 -0
  601. /package/src/{utils → core/utils}/errorBoundary.tsx +0 -0
  602. /package/src/{utils → core/utils}/layer/__workshop__/.eslintrc +0 -0
  603. /package/src/{utils → core/utils}/layer/__workshop__/index.ts +0 -0
  604. /package/src/{utils → core/utils}/layer/__workshop__/multipleRoots.tsx +0 -0
  605. /package/src/{utils → core/utils}/layer/__workshop__/nested.tsx +0 -0
  606. /package/src/{utils → core/utils}/layer/__workshop__/responsiveZOffset.tsx +0 -0
  607. /package/src/{utils → core/utils}/layer/getLayerContext.test.ts +0 -0
  608. /package/src/{utils → core/utils}/layer/getLayerContext.ts +0 -0
  609. /package/src/{utils → core/utils}/layer/index.ts +0 -0
  610. /package/src/{utils → core/utils}/layer/layer.tsx +0 -0
  611. /package/src/{utils → core/utils}/layer/layerContext.ts +0 -0
  612. /package/src/{utils → core/utils}/layer/layerProvider.tsx +0 -0
  613. /package/src/{utils → core/utils}/layer/types.ts +0 -0
  614. /package/src/{utils → core/utils}/layer/useLayer.ts +0 -0
  615. /package/src/{utils → core/utils}/portal/__workshop__/.eslintrc +0 -0
  616. /package/src/{utils → core/utils}/portal/__workshop__/index.ts +0 -0
  617. /package/src/{utils → core/utils}/portal/index.ts +0 -0
  618. /package/src/{utils → core/utils}/portal/portal.ts +0 -0
  619. /package/src/{utils → core/utils}/portal/portalContext.ts +0 -0
  620. /package/src/{utils → core/utils}/portal/portalProvider.tsx +0 -0
  621. /package/src/{utils → core/utils}/portal/types.ts +0 -0
  622. /package/src/{utils → core/utils}/portal/usePortal.ts +0 -0
  623. /package/src/{utils → core/utils}/srOnly/index.ts +0 -0
  624. /package/src/{utils → core/utils}/srOnly/srOnly.tsx +0 -0
  625. /package/src/{utils → core/utils}/virtualList/__workshop__/.eslintrc +0 -0
  626. /package/src/{utils → core/utils}/virtualList/__workshop__/changingProps.tsx +0 -0
  627. /package/src/{utils → core/utils}/virtualList/__workshop__/elementScroll.tsx +0 -0
  628. /package/src/{utils → core/utils}/virtualList/__workshop__/index.ts +0 -0
  629. /package/src/{utils → core/utils}/virtualList/__workshop__/infiniteList.tsx +0 -0
  630. /package/src/{utils → core/utils}/virtualList/__workshop__/windowScrolll.tsx +0 -0
  631. /package/src/{utils → core/utils}/virtualList/index.ts +0 -0
  632. /package/src/{utils → core/utils}/virtualList/virtualList.tsx +0 -0
  633. /package/src/theme/{lib/theme/color/_generic → config/tokens/color}/index.ts +0 -0
  634. /package/src/theme/{lib/theme/color/base/types.ts → system/color/base.ts} +0 -0
  635. /package/src/theme/{lib/theme/color/syntax/types.ts → system/color/syntax.ts} +0 -0
  636. /package/src/theme/{lib/theme → system}/fonts.ts +0 -0
  637. /package/src/theme/{lib/theme → system}/layer.ts +0 -0
package/dist/index.esm.js CHANGED
@@ -1,21 +1,15 @@
1
+ export { COLOR_CONFIG_BASE_KEYS, COLOR_CONFIG_BASE_TONES, COLOR_CONFIG_BLEND_KEYS, COLOR_CONFIG_STATE_KEYS, COLOR_CONFIG_STATE_TONES, THEME_COLOR_BASE_TONES, THEME_COLOR_BLEND_MODES, THEME_COLOR_BUTTON_MODES, THEME_COLOR_STATES, THEME_COLOR_STATE_TONES, buildTheme, createColorTheme, hexToRgb, hslToRgb, isColorBlendModeValue, isColorButtonMode, isColorConfigBaseKey, isColorConfigBaseTone, isColorConfigBlendKey, isColorConfigStateKey, isColorConfigStateTone, isColorHueKey, isColorOpacityValue, isColorTintKey, isColorTokenValue, isColorValue, multiply, parseColor, parseTokenKey, parseTokenValue, rgbToHex, rgbToHsl, rgba, rgbaToRGBA, screen, studioTheme } from '@sanity/ui/theme';
1
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
3
  import { useMemo, useState, useRef, useEffect, createContext, useContext, useSyncExternalStore, useLayoutEffect, forwardRef, useId, useCallback, cloneElement, isValidElement, createElement, Component, memo, useReducer, Children, Fragment as Fragment$1, startTransition } from 'react';
3
4
  import ReactIs, { isElement as isElement$1, isFragment, isValidElementType } from 'react-is';
4
5
  import styled, { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css, keyframes } from 'styled-components';
5
- import { black as black$1, hues, white as white$1 } from '@sanity/color';
6
- import { SpinnerIcon, CheckmarkIcon, RemoveIcon, SelectIcon, CloseIcon, ChevronDownIcon, ChevronRightIcon, ToggleArrowRightIcon } from '@sanity/icons';
6
+ import { SpinnerIcon, CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ChevronRightIcon, ToggleArrowRightIcon } from '@sanity/icons';
7
7
  import Refractor from 'react-refractor';
8
- import { detectOverflow, flip, offset, shift, arrow, hide, useFloating, autoUpdate, size as size$2 } from '@floating-ui/react-dom';
8
+ import { detectOverflow, flip, offset, shift, arrow, hide, useFloating, autoUpdate } from '@floating-ui/react-dom';
9
9
  import { createPortal } from 'react-dom';
10
10
  import { AnimatePresence, motion } from 'framer-motion';
11
11
  const EMPTY_ARRAY = [];
12
12
  const EMPTY_RECORD = {};
13
- const FLOATING_STATIC_SIDES = {
14
- top: "bottom",
15
- right: "left",
16
- bottom: "top",
17
- left: "right"
18
- };
19
13
  function _fillCSSObject(keys, value) {
20
14
  return keys.reduce((style, key) => {
21
15
  style[key] = value;
@@ -811,2402 +805,26 @@ function _createElementSizeObserver() {
811
805
  }
812
806
  };
813
807
  }
814
- };
815
- }
816
- function useElementSize(element) {
817
- const [size, setSize] = useState(null);
818
- useEffect(() => {
819
- if (!element) return void 0;
820
- return _elementSizeObserver.subscribe(element, setSize);
821
- }, [element]);
822
- return size;
823
- }
824
- function useElementRect(element) {
825
- const elementSize = useElementSize(element);
826
- return (elementSize == null ? void 0 : elementSize._contentRect) || null;
827
- }
828
- function useGlobalKeyDown(onKeyDown) {
829
- return useEffect(() => {
830
- addEventListener("keydown", onKeyDown);
831
- return () => removeEventListener("keydown", onKeyDown);
832
- }, [onKeyDown]);
833
- }
834
- function multiplyChannel(b, s) {
835
- return b * s;
836
- }
837
- function multiply$1(b, s) {
838
- return {
839
- r: Math.round(clamp$1(multiplyChannel(b.r / 255, s.r / 255) * 255)),
840
- g: Math.round(clamp$1(multiplyChannel(b.g / 255, s.g / 255) * 255)),
841
- b: Math.round(clamp$1(multiplyChannel(b.b / 255, s.b / 255) * 255))
842
- };
843
- }
844
- function clamp$1(num) {
845
- return Math.max(Math.min(num, 255), 0);
846
- }
847
- function screenChannel(b, s) {
848
- return b + s - b * s;
849
- }
850
- function screen$1(b, s) {
851
- return {
852
- r: Math.round(clamp(screenChannel(b.r / 255, s.r / 255) * 255)),
853
- g: Math.round(clamp(screenChannel(b.g / 255, s.g / 255) * 255)),
854
- b: Math.round(clamp(screenChannel(b.b / 255, s.b / 255) * 255))
855
- };
856
- }
857
- function clamp(num) {
858
- return Math.max(Math.min(num, 255), 0);
859
- }
860
- function hexToRgb(hex) {
861
- if (hex.length === 4) {
862
- const hexR = hex.slice(1, 2);
863
- const hexG = hex.slice(2, 3);
864
- const hexB = hex.slice(3, 4);
865
- return {
866
- r: parseInt(hexR + hexR, 16),
867
- g: parseInt(hexG + hexG, 16),
868
- b: parseInt(hexB + hexB, 16)
869
- };
870
- }
871
- return {
872
- r: parseInt(hex.slice(1, 3), 16),
873
- g: parseInt(hex.slice(3, 5), 16),
874
- b: parseInt(hex.slice(5, 7), 16)
875
- };
876
- }
877
- function rgbToHex(_ref2) {
878
- let {
879
- r,
880
- g,
881
- b
882
- } = _ref2;
883
- return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
884
- }
885
- function rgbToHsl(_ref3) {
886
- let {
887
- r,
888
- g,
889
- b
890
- } = _ref3;
891
- r /= 255;
892
- g /= 255;
893
- b /= 255;
894
- const cmin = Math.min(r, g, b);
895
- const cmax = Math.max(r, g, b);
896
- const delta = cmax - cmin;
897
- let h = 0;
898
- let s = 0;
899
- let l = 0;
900
- if (delta == 0) h = 0;else if (cmax == r) h = (g - b) / delta % 6;else if (cmax == g) h = (b - r) / delta + 2;else h = (r - g) / delta + 4;
901
- h = Math.round(h * 60);
902
- if (h < 0) h += 360;
903
- l = (cmax + cmin) / 2;
904
- s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));
905
- s = +(s * 100).toFixed(1);
906
- l = +(l * 100).toFixed(1);
907
- return {
908
- h,
909
- s,
910
- l
911
- };
912
- }
913
- function hslToRgb(hsl) {
914
- const s = hsl.s / 100;
915
- const l = hsl.l / 100;
916
- const c = (1 - Math.abs(2 * l - 1)) * s;
917
- const x = c * (1 - Math.abs(hsl.h / 60 % 2 - 1));
918
- const m = l - c / 2;
919
- let r = 0;
920
- let g = 0;
921
- let b = 0;
922
- if (0 <= hsl.h && hsl.h < 60) {
923
- r = c;
924
- g = x;
925
- b = 0;
926
- } else if (60 <= hsl.h && hsl.h < 120) {
927
- r = x;
928
- g = c;
929
- b = 0;
930
- } else if (120 <= hsl.h && hsl.h < 180) {
931
- r = 0;
932
- g = c;
933
- b = x;
934
- } else if (180 <= hsl.h && hsl.h < 240) {
935
- r = 0;
936
- g = x;
937
- b = c;
938
- } else if (240 <= hsl.h && hsl.h < 300) {
939
- r = x;
940
- g = 0;
941
- b = c;
942
- } else if (300 <= hsl.h && hsl.h < 360) {
943
- r = c;
944
- g = 0;
945
- b = x;
946
- }
947
- return {
948
- r: Math.round((r + m) * 255),
949
- g: Math.round((g + m) * 255),
950
- b: Math.round((b + m) * 255)
951
- };
952
- }
953
- const HEX_CHARS = "0123456789ABCDEFabcdef";
954
- const HSL_RE = /hsl\(\s*(\d+)\s*,\s*((\d+(?:\.\d+)?)%)\s*,\s*((\d+(?:\.\d+)?)%)\s*\)/i;
955
- function isHexChars(str) {
956
- for (const c of str) {
957
- if (HEX_CHARS.indexOf(c) === -1) {
958
- return false;
959
- }
960
- }
961
- return true;
962
- }
963
- function isHex(str) {
964
- if (str[0] !== "#") return false;
965
- if (!(str.length === 4 || str.length === 7)) return false;
966
- return isHexChars(str.slice(1));
967
- }
968
- function parseHsl(str) {
969
- const res = HSL_RE.exec(str);
970
- if (!res) {
971
- throw new Error('parseHsl: string is not a HSL color: "'.concat(str, '"'));
972
- }
973
- return {
974
- h: parseInt(res[1]),
975
- s: parseFloat(res[3]),
976
- l: parseFloat(res[5])
977
- };
978
- }
979
- function parseColor(color) {
980
- if (!color) return {
981
- r: 0,
982
- g: 0,
983
- b: 0
984
- };
985
- if (typeof color !== "string") {
986
- throw new Error("parseColor: expected a string");
987
- }
988
- if (isHex(color)) {
989
- return hexToRgb(color);
990
- }
991
- if (color.startsWith("hsl(")) {
992
- return hslToRgb(parseHsl(color));
993
- }
994
- throw new Error('parseColor: unexpected color format: "'.concat(color, '"'));
995
- }
996
- function rgba(color, a) {
997
- const rgb = parseColor(color);
998
- return "rgba(".concat(rgb.r, ",").concat(rgb.g, ",").concat(rgb.b, ",").concat(a, ")");
999
- }
1000
- function createButtonTones(opts, base, dark, solid, muted, mode) {
1001
- return {
1002
- default: opts.button({
1003
- base,
1004
- dark,
1005
- solid: solid.default,
1006
- muted: muted.default,
1007
- mode
1008
- }),
1009
- primary: opts.button({
1010
- base,
1011
- dark,
1012
- solid: solid.primary,
1013
- muted: muted.primary,
1014
- mode
1015
- }),
1016
- positive: opts.button({
1017
- base,
1018
- dark,
1019
- solid: solid.positive,
1020
- muted: muted.positive,
1021
- mode
1022
- }),
1023
- caution: opts.button({
1024
- base,
1025
- dark,
1026
- solid: solid.caution,
1027
- muted: muted.caution,
1028
- mode
1029
- }),
1030
- critical: opts.button({
1031
- base,
1032
- dark,
1033
- solid: solid.critical,
1034
- muted: muted.critical,
1035
- mode
1036
- })
1037
- };
1038
- }
1039
- function createButtonModes(opts, base, dark, solid, muted) {
1040
- return {
1041
- default: createButtonTones(opts, base, dark, solid, muted, "default"),
1042
- ghost: createButtonTones(opts, base, dark, solid, muted, "ghost"),
1043
- bleed: createButtonTones(opts, base, dark, solid, muted, "bleed")
1044
- };
1045
- }
1046
- function createCardStates(opts, base, dark, name, solid, muted) {
1047
- return {
1048
- enabled: opts.card({
1049
- base,
1050
- dark,
1051
- name,
1052
- state: "enabled",
1053
- solid,
1054
- muted
1055
- }),
1056
- disabled: opts.card({
1057
- base,
1058
- dark,
1059
- name,
1060
- state: "disabled",
1061
- solid,
1062
- muted
1063
- }),
1064
- hovered: opts.card({
1065
- base,
1066
- dark,
1067
- name,
1068
- state: "hovered",
1069
- solid,
1070
- muted
1071
- }),
1072
- pressed: opts.card({
1073
- base,
1074
- dark,
1075
- name,
1076
- state: "pressed",
1077
- solid,
1078
- muted
1079
- }),
1080
- selected: opts.card({
1081
- base,
1082
- dark,
1083
- name,
1084
- state: "selected",
1085
- solid,
1086
- muted
1087
- })
1088
- };
1089
- }
1090
- const black = "hsl(0, 0%, 0%)";
1091
- const white = "hsl(0, 0%, 100%)";
1092
- const colors = {
1093
- default: {
1094
- lightest: "hsl(0, 0%, 95%)",
1095
- lighter: "hsl(0, 0%, 70%)",
1096
- light: "hsl(0, 0%, 65%)",
1097
- base: "hsl(0, 0%, 50%)",
1098
- dark: "hsl(0, 0%, 35%)",
1099
- darker: "hsl(0, 0%, 20%)",
1100
- darkest: "hsl(0, 0%, 5%)"
1101
- },
1102
- transparent: {
1103
- lightest: "hsl(240, 100%, 95%)",
1104
- lighter: "hsl(240, 100%, 70%)",
1105
- light: "hsl(240, 100%, 65%)",
1106
- base: "hsl(240, 100%, 50%)",
1107
- dark: "hsl(240, 100%, 35%)",
1108
- darker: "hsl(240, 100%, 20%)",
1109
- darkest: "hsl(240, 100%, 5%)"
1110
- },
1111
- primary: {
1112
- lightest: "hsl(240, 100%, 95%)",
1113
- lighter: "hsl(240, 100%, 70%)",
1114
- light: "hsl(240, 100%, 65%)",
1115
- base: "hsl(240, 100%, 50%)",
1116
- dark: "hsl(240, 100%, 35%)",
1117
- darker: "hsl(240, 100%, 20%)",
1118
- darkest: "hsl(240, 100%, 5%)"
1119
- },
1120
- positive: {
1121
- lightest: "hsl(120, 100%, 95%)",
1122
- lighter: "hsl(120, 100%, 70%)",
1123
- light: "hsl(120, 100%, 65%)",
1124
- base: "hsl(120, 100%, 50%)",
1125
- dark: "hsl(120, 100%, 35%)",
1126
- darker: "hsl(120, 100%, 20%)",
1127
- darkest: "hsl(120, 100%, 5%)"
1128
- },
1129
- caution: {
1130
- lightest: "hsl(60, 100%, 95%)",
1131
- lighter: "hsl(60, 100%, 70%)",
1132
- light: "hsl(60, 100%, 65%)",
1133
- base: "hsl(60, 100%, 50%)",
1134
- dark: "hsl(60, 100%, 35%)",
1135
- darker: "hsl(60, 100%, 20%)",
1136
- darkest: "hsl(60, 100%, 5%)"
1137
- },
1138
- critical: {
1139
- lightest: "hsl(0, 100%, 95%)",
1140
- lighter: "hsl(0, 100%, 70%)",
1141
- light: "hsl(0, 100%, 65%)",
1142
- base: "hsl(0, 100%, 50%)",
1143
- dark: "hsl(0, 100%, 35%)",
1144
- darker: "hsl(0, 100%, 20%)",
1145
- darkest: "hsl(0, 100%, 5%)"
1146
- }
1147
- };
1148
- const spots = {
1149
- gray: "hsl(0, 0%, 50%)",
1150
- red: "hsl(0, 100%, 50%)",
1151
- orange: "hsl(30, 100%, 50%)",
1152
- yellow: "hsl(60, 100%, 50%)",
1153
- green: "hsl(120, 100%, 50%)",
1154
- cyan: "hsl(180, 100%, 50%)",
1155
- blue: "hsl(240, 100%, 50%)",
1156
- purple: "hsl(270, 100%, 50%)",
1157
- magenta: "hsl(300, 100%, 50%)"
1158
- };
1159
- const tones$1 = {
1160
- transparent: {
1161
- bg: [colors.transparent.darkest, colors.transparent.lightest],
1162
- fg: [colors.transparent.lightest, colors.transparent.darkest],
1163
- border: [colors.transparent.darker, colors.transparent.lighter],
1164
- focusRing: [colors.transparent.base, colors.transparent.base]
1165
- },
1166
- primary: {
1167
- bg: [colors.primary.darkest, colors.primary.lightest],
1168
- fg: [colors.primary.lightest, colors.primary.darkest],
1169
- border: [colors.primary.darker, colors.primary.lighter],
1170
- focusRing: [colors.primary.base, colors.primary.base]
1171
- },
1172
- positive: {
1173
- bg: [colors.positive.darkest, colors.positive.lightest],
1174
- fg: [colors.positive.lightest, colors.positive.darkest],
1175
- border: [colors.positive.darker, colors.positive.lighter],
1176
- focusRing: [colors.positive.base, colors.positive.base]
1177
- },
1178
- caution: {
1179
- bg: [colors.caution.darkest, colors.caution.lightest],
1180
- fg: [colors.caution.lightest, colors.caution.darkest],
1181
- border: [colors.caution.darker, colors.caution.lighter],
1182
- focusRing: [colors.caution.base, colors.caution.base]
1183
- },
1184
- critical: {
1185
- bg: [colors.critical.darkest, colors.critical.lightest],
1186
- fg: [colors.critical.lightest, colors.critical.darkest],
1187
- border: [colors.critical.darker, colors.critical.lighter],
1188
- focusRing: [colors.critical.base, colors.critical.base]
1189
- }
1190
- };
1191
- const defaultOpts = {
1192
- base: _ref4 => {
1193
- let {
1194
- dark,
1195
- name
1196
- } = _ref4;
1197
- if (name === "default") {
1198
- return {
1199
- bg: dark ? black : white,
1200
- fg: dark ? white : black,
1201
- border: dark ? colors.default.darkest : colors.default.lightest,
1202
- focusRing: colors.primary.base,
1203
- shadow: {
1204
- outline: black,
1205
- umbra: black,
1206
- penumbra: black,
1207
- ambient: black
1208
- },
1209
- skeleton: {
1210
- from: dark ? white : black,
1211
- to: dark ? white : black
1212
- }
1213
- };
1214
- }
1215
- return {
1216
- bg: tones$1[name].bg[dark ? 0 : 1],
1217
- fg: tones$1[name].fg[dark ? 0 : 1],
1218
- border: tones$1[name].border[dark ? 0 : 1],
1219
- focusRing: tones$1[name].focusRing[dark ? 0 : 1],
1220
- shadow: {
1221
- outline: black,
1222
- umbra: black,
1223
- penumbra: black,
1224
- ambient: black
1225
- },
1226
- skeleton: {
1227
- from: dark ? white : black,
1228
- to: dark ? white : black
1229
- }
1230
- };
1231
- },
1232
- solid: _ref5 => {
1233
- let {
1234
- base,
1235
- dark,
1236
- state,
1237
- tone
1238
- } = _ref5;
1239
- const color = colors[tone];
1240
- if (state === "hovered") {
1241
- return {
1242
- bg: dark ? color.light : color.dark,
1243
- bg2: dark ? color.light : color.dark,
1244
- border: dark ? color.lighter : color.darker,
1245
- fg: dark ? color.darkest : color.lightest,
1246
- iconColor: dark ? color.darkest : color.lightest,
1247
- muted: {
1248
- fg: black
1249
- },
1250
- accent: {
1251
- fg: black
1252
- },
1253
- link: {
1254
- fg: black
1255
- },
1256
- code: {
1257
- bg: black,
1258
- fg: black
1259
- },
1260
- skeleton: base.skeleton
1261
- };
1262
- }
1263
- return {
1264
- bg: color.base,
1265
- bg2: color.base,
1266
- border: dark ? color.light : color.dark,
1267
- fg: dark ? color.darkest : color.lightest,
1268
- iconColor: dark ? color.darkest : color.lightest,
1269
- muted: {
1270
- fg: black
1271
- },
1272
- accent: {
1273
- fg: black
1274
- },
1275
- link: {
1276
- fg: black
1277
- },
1278
- code: {
1279
- bg: black,
1280
- fg: black
1281
- },
1282
- skeleton: base.skeleton
1283
- };
1284
- },
1285
- muted: _ref6 => {
1286
- let {
1287
- base,
1288
- dark,
1289
- state,
1290
- tone
1291
- } = _ref6;
1292
- const color = colors[tone];
1293
- if (state === "hovered") {
1294
- return {
1295
- bg: dark ? color.darker : color.lighter,
1296
- bg2: dark ? color.darker : color.lighter,
1297
- border: dark ? color.lighter : color.darker,
1298
- fg: dark ? color.lightest : color.darkest,
1299
- iconColor: dark ? color.lightest : color.darkest,
1300
- muted: {
1301
- fg: black
1302
- },
1303
- accent: {
1304
- fg: black
1305
- },
1306
- link: {
1307
- fg: black
1308
- },
1309
- code: {
1310
- bg: black,
1311
- fg: black
1312
- },
1313
- skeleton: base.skeleton
1314
- };
1315
- }
1316
- return {
1317
- bg: dark ? color.darkest : color.lightest,
1318
- bg2: dark ? color.darkest : color.lightest,
1319
- border: dark ? color.darker : color.lighter,
1320
- fg: dark ? color.lighter : color.darker,
1321
- iconColor: dark ? color.lighter : color.darker,
1322
- muted: {
1323
- fg: black
1324
- },
1325
- accent: {
1326
- fg: black
1327
- },
1328
- link: {
1329
- fg: black
1330
- },
1331
- code: {
1332
- bg: black,
1333
- fg: black
1334
- },
1335
- skeleton: base.skeleton
1336
- };
1337
- },
1338
- button: _ref7 => {
1339
- let {
1340
- base,
1341
- mode,
1342
- muted,
1343
- solid
1344
- } = _ref7;
1345
- if (mode === "bleed") {
1346
- return {
1347
- ...muted,
1348
- enabled: {
1349
- bg: "transparent",
1350
- bg2: "transparent",
1351
- fg: muted.enabled.fg,
1352
- iconColor: muted.enabled.fg,
1353
- border: "transparent",
1354
- muted: {
1355
- fg: black
1356
- },
1357
- accent: {
1358
- fg: black
1359
- },
1360
- link: {
1361
- fg: black
1362
- },
1363
- code: {
1364
- bg: black,
1365
- fg: black
1366
- },
1367
- skeleton: base.skeleton
1368
- },
1369
- hovered: {
1370
- bg: muted.enabled.bg,
1371
- bg2: muted.enabled.bg,
1372
- fg: muted.hovered.fg,
1373
- iconColor: muted.hovered.fg,
1374
- border: "transparent",
1375
- muted: {
1376
- fg: black
1377
- },
1378
- accent: {
1379
- fg: black
1380
- },
1381
- link: {
1382
- fg: black
1383
- },
1384
- code: {
1385
- bg: black,
1386
- fg: black
1387
- },
1388
- skeleton: base.skeleton
1389
- }
1390
- };
1391
- }
1392
- if (mode === "ghost") return {
1393
- ...solid,
1394
- enabled: muted.enabled
1395
- };
1396
- return solid;
1397
- },
1398
- card: _ref8 => {
1399
- let {
1400
- base
1401
- } = _ref8;
1402
- return {
1403
- bg: black,
1404
- bg2: black,
1405
- fg: black,
1406
- iconColor: black,
1407
- border: black,
1408
- muted: {
1409
- fg: black
1410
- },
1411
- accent: {
1412
- fg: black
1413
- },
1414
- link: {
1415
- fg: black
1416
- },
1417
- code: {
1418
- bg: black,
1419
- fg: black
1420
- },
1421
- skeleton: base.skeleton
1422
- };
1423
- },
1424
- input: () => {
1425
- return {
1426
- bg: black,
1427
- bg2: black,
1428
- fg: black,
1429
- border: black,
1430
- placeholder: black
1431
- };
1432
- },
1433
- selectable: _ref9 => {
1434
- let {
1435
- muted,
1436
- state,
1437
- tone
1438
- } = _ref9;
1439
- return muted[tone][state];
1440
- },
1441
- spot: _ref10 => {
1442
- let {
1443
- key
1444
- } = _ref10;
1445
- return spots[key];
1446
- },
1447
- syntax: () => ({
1448
- atrule: black,
1449
- attrName: black,
1450
- attrValue: black,
1451
- attribute: black,
1452
- boolean: black,
1453
- builtin: black,
1454
- cdata: black,
1455
- char: black,
1456
- class: black,
1457
- className: black,
1458
- comment: black,
1459
- constant: black,
1460
- deleted: black,
1461
- doctype: black,
1462
- entity: black,
1463
- function: black,
1464
- hexcode: black,
1465
- id: black,
1466
- important: black,
1467
- inserted: black,
1468
- keyword: black,
1469
- number: black,
1470
- operator: black,
1471
- prolog: black,
1472
- property: black,
1473
- pseudoClass: black,
1474
- pseudoElement: black,
1475
- punctuation: black,
1476
- regex: black,
1477
- selector: black,
1478
- string: black,
1479
- symbol: black,
1480
- tag: black,
1481
- unit: black,
1482
- url: black,
1483
- variable: black
1484
- })
1485
- };
1486
- function createInputModes(opts, base, dark, solid, muted) {
1487
- return {
1488
- default: {
1489
- enabled: opts.input({
1490
- base,
1491
- dark,
1492
- mode: "default",
1493
- state: "enabled",
1494
- solid: solid.default,
1495
- muted: muted.default
1496
- }),
1497
- disabled: opts.input({
1498
- base,
1499
- dark,
1500
- mode: "default",
1501
- state: "disabled",
1502
- solid: solid.default,
1503
- muted: muted.default
1504
- }),
1505
- hovered: opts.input({
1506
- base,
1507
- dark,
1508
- mode: "default",
1509
- state: "hovered",
1510
- solid: solid.default,
1511
- muted: muted.default
1512
- }),
1513
- readOnly: opts.input({
1514
- base,
1515
- dark,
1516
- mode: "default",
1517
- state: "readOnly",
1518
- solid: solid.default,
1519
- muted: muted.default
1520
- })
1521
- },
1522
- invalid: {
1523
- enabled: opts.input({
1524
- base,
1525
- dark,
1526
- mode: "invalid",
1527
- state: "enabled",
1528
- solid: solid.default,
1529
- muted: muted.default
1530
- }),
1531
- disabled: opts.input({
1532
- base,
1533
- dark,
1534
- mode: "invalid",
1535
- state: "disabled",
1536
- solid: solid.default,
1537
- muted: muted.default
1538
- }),
1539
- hovered: opts.input({
1540
- base,
1541
- dark,
1542
- mode: "invalid",
1543
- state: "hovered",
1544
- solid: solid.default,
1545
- muted: muted.default
1546
- }),
1547
- readOnly: opts.input({
1548
- base,
1549
- dark,
1550
- mode: "invalid",
1551
- state: "readOnly",
1552
- solid: solid.default,
1553
- muted: muted.default
1554
- })
1555
- }
1556
- };
1557
- }
1558
- function createMutedTones(opts, base, dark, name) {
1559
- return {
1560
- default: {
1561
- enabled: opts.muted({
1562
- base,
1563
- dark,
1564
- tone: "default",
1565
- name,
1566
- state: "enabled"
1567
- }),
1568
- disabled: opts.muted({
1569
- base,
1570
- dark,
1571
- tone: "default",
1572
- name,
1573
- state: "disabled"
1574
- }),
1575
- hovered: opts.muted({
1576
- base,
1577
- dark,
1578
- tone: "default",
1579
- name,
1580
- state: "hovered"
1581
- }),
1582
- pressed: opts.muted({
1583
- base,
1584
- dark,
1585
- tone: "default",
1586
- name,
1587
- state: "pressed"
1588
- }),
1589
- selected: opts.muted({
1590
- base,
1591
- dark,
1592
- tone: "default",
1593
- name,
1594
- state: "selected"
1595
- })
1596
- },
1597
- transparent: {
1598
- enabled: opts.muted({
1599
- base,
1600
- dark,
1601
- tone: "transparent",
1602
- name,
1603
- state: "enabled"
1604
- }),
1605
- disabled: opts.muted({
1606
- base,
1607
- dark,
1608
- tone: "transparent",
1609
- name,
1610
- state: "disabled"
1611
- }),
1612
- hovered: opts.muted({
1613
- base,
1614
- dark,
1615
- tone: "transparent",
1616
- name,
1617
- state: "hovered"
1618
- }),
1619
- pressed: opts.muted({
1620
- base,
1621
- dark,
1622
- tone: "transparent",
1623
- name,
1624
- state: "pressed"
1625
- }),
1626
- selected: opts.muted({
1627
- base,
1628
- dark,
1629
- tone: "transparent",
1630
- name,
1631
- state: "selected"
1632
- })
1633
- },
1634
- primary: {
1635
- enabled: opts.muted({
1636
- base,
1637
- dark,
1638
- tone: "primary",
1639
- name,
1640
- state: "enabled"
1641
- }),
1642
- disabled: opts.muted({
1643
- base,
1644
- dark,
1645
- tone: "primary",
1646
- name,
1647
- state: "disabled"
1648
- }),
1649
- hovered: opts.muted({
1650
- base,
1651
- dark,
1652
- tone: "primary",
1653
- name,
1654
- state: "hovered"
1655
- }),
1656
- pressed: opts.muted({
1657
- base,
1658
- dark,
1659
- tone: "primary",
1660
- name,
1661
- state: "pressed"
1662
- }),
1663
- selected: opts.muted({
1664
- base,
1665
- dark,
1666
- tone: "primary",
1667
- name,
1668
- state: "selected"
1669
- })
1670
- },
1671
- positive: {
1672
- enabled: opts.muted({
1673
- base,
1674
- dark,
1675
- tone: "positive",
1676
- name,
1677
- state: "enabled"
1678
- }),
1679
- disabled: opts.muted({
1680
- base,
1681
- dark,
1682
- tone: "positive",
1683
- name,
1684
- state: "disabled"
1685
- }),
1686
- hovered: opts.muted({
1687
- base,
1688
- dark,
1689
- tone: "positive",
1690
- name,
1691
- state: "hovered"
1692
- }),
1693
- pressed: opts.muted({
1694
- base,
1695
- dark,
1696
- tone: "positive",
1697
- name,
1698
- state: "pressed"
1699
- }),
1700
- selected: opts.muted({
1701
- base,
1702
- dark,
1703
- tone: "positive",
1704
- name,
1705
- state: "selected"
1706
- })
1707
- },
1708
- caution: {
1709
- enabled: opts.muted({
1710
- base,
1711
- dark,
1712
- tone: "caution",
1713
- name,
1714
- state: "enabled"
1715
- }),
1716
- disabled: opts.muted({
1717
- base,
1718
- dark,
1719
- tone: "caution",
1720
- name,
1721
- state: "disabled"
1722
- }),
1723
- hovered: opts.muted({
1724
- base,
1725
- dark,
1726
- tone: "caution",
1727
- name,
1728
- state: "hovered"
1729
- }),
1730
- pressed: opts.muted({
1731
- base,
1732
- dark,
1733
- tone: "caution",
1734
- name,
1735
- state: "pressed"
1736
- }),
1737
- selected: opts.muted({
1738
- base,
1739
- dark,
1740
- tone: "caution",
1741
- name,
1742
- state: "selected"
1743
- })
1744
- },
1745
- critical: {
1746
- enabled: opts.muted({
1747
- base,
1748
- dark,
1749
- tone: "critical",
1750
- name,
1751
- state: "enabled"
1752
- }),
1753
- disabled: opts.muted({
1754
- base,
1755
- dark,
1756
- tone: "critical",
1757
- name,
1758
- state: "disabled"
1759
- }),
1760
- hovered: opts.muted({
1761
- base,
1762
- dark,
1763
- tone: "critical",
1764
- name,
1765
- state: "hovered"
1766
- }),
1767
- pressed: opts.muted({
1768
- base,
1769
- dark,
1770
- tone: "critical",
1771
- name,
1772
- state: "pressed"
1773
- }),
1774
- selected: opts.muted({
1775
- base,
1776
- dark,
1777
- tone: "critical",
1778
- name,
1779
- state: "selected"
1780
- })
1781
- }
1782
- };
1783
- }
1784
- function createSelectableTones(opts, base, dark, solid, muted) {
1785
- return {
1786
- default: _createSelectableStates(opts, base, dark, solid, muted, "default"),
1787
- primary: _createSelectableStates(opts, base, dark, solid, muted, "primary"),
1788
- positive: _createSelectableStates(opts, base, dark, solid, muted, "positive"),
1789
- caution: _createSelectableStates(opts, base, dark, solid, muted, "caution"),
1790
- critical: _createSelectableStates(opts, base, dark, solid, muted, "critical")
1791
- };
1792
- }
1793
- function _createSelectableStates(opts, base, dark, solid, muted, tone) {
1794
- return {
1795
- enabled: opts.selectable({
1796
- base,
1797
- dark,
1798
- solid,
1799
- muted,
1800
- state: "enabled",
1801
- tone
1802
- }),
1803
- hovered: opts.selectable({
1804
- base,
1805
- dark,
1806
- solid,
1807
- muted,
1808
- state: "hovered",
1809
- tone
1810
- }),
1811
- pressed: opts.selectable({
1812
- base,
1813
- dark,
1814
- solid,
1815
- muted,
1816
- state: "pressed",
1817
- tone
1818
- }),
1819
- selected: opts.selectable({
1820
- base,
1821
- dark,
1822
- solid,
1823
- muted,
1824
- state: "selected",
1825
- tone
1826
- }),
1827
- disabled: opts.selectable({
1828
- base,
1829
- dark,
1830
- solid,
1831
- muted,
1832
- state: "disabled",
1833
- tone
1834
- })
1835
- };
1836
- }
1837
- function createSolidTones(opts, base, dark, name) {
1838
- return {
1839
- default: {
1840
- enabled: opts.solid({
1841
- base,
1842
- dark,
1843
- tone: "default",
1844
- name,
1845
- state: "enabled"
1846
- }),
1847
- disabled: opts.solid({
1848
- base,
1849
- dark,
1850
- tone: "default",
1851
- name,
1852
- state: "disabled"
1853
- }),
1854
- hovered: opts.solid({
1855
- base,
1856
- dark,
1857
- tone: "default",
1858
- name,
1859
- state: "hovered"
1860
- }),
1861
- pressed: opts.solid({
1862
- base,
1863
- dark,
1864
- tone: "default",
1865
- name,
1866
- state: "pressed"
1867
- }),
1868
- selected: opts.solid({
1869
- base,
1870
- dark,
1871
- tone: "default",
1872
- name,
1873
- state: "selected"
1874
- })
1875
- },
1876
- transparent: {
1877
- enabled: opts.solid({
1878
- base,
1879
- dark,
1880
- tone: "transparent",
1881
- name,
1882
- state: "enabled"
1883
- }),
1884
- disabled: opts.solid({
1885
- base,
1886
- dark,
1887
- tone: "transparent",
1888
- name,
1889
- state: "disabled"
1890
- }),
1891
- hovered: opts.solid({
1892
- base,
1893
- dark,
1894
- tone: "transparent",
1895
- name,
1896
- state: "hovered"
1897
- }),
1898
- pressed: opts.solid({
1899
- base,
1900
- dark,
1901
- tone: "transparent",
1902
- name,
1903
- state: "pressed"
1904
- }),
1905
- selected: opts.solid({
1906
- base,
1907
- dark,
1908
- tone: "transparent",
1909
- name,
1910
- state: "selected"
1911
- })
1912
- },
1913
- primary: {
1914
- enabled: opts.solid({
1915
- base,
1916
- dark,
1917
- tone: "primary",
1918
- name,
1919
- state: "enabled"
1920
- }),
1921
- disabled: opts.solid({
1922
- base,
1923
- dark,
1924
- tone: "primary",
1925
- name,
1926
- state: "disabled"
1927
- }),
1928
- hovered: opts.solid({
1929
- base,
1930
- dark,
1931
- tone: "primary",
1932
- name,
1933
- state: "hovered"
1934
- }),
1935
- pressed: opts.solid({
1936
- base,
1937
- dark,
1938
- tone: "primary",
1939
- name,
1940
- state: "pressed"
1941
- }),
1942
- selected: opts.solid({
1943
- base,
1944
- dark,
1945
- tone: "primary",
1946
- name,
1947
- state: "selected"
1948
- })
1949
- },
1950
- positive: {
1951
- enabled: opts.solid({
1952
- base,
1953
- dark,
1954
- tone: "positive",
1955
- name,
1956
- state: "enabled"
1957
- }),
1958
- disabled: opts.solid({
1959
- base,
1960
- dark,
1961
- tone: "positive",
1962
- name,
1963
- state: "disabled"
1964
- }),
1965
- hovered: opts.solid({
1966
- base,
1967
- dark,
1968
- tone: "positive",
1969
- name,
1970
- state: "hovered"
1971
- }),
1972
- pressed: opts.solid({
1973
- base,
1974
- dark,
1975
- tone: "positive",
1976
- name,
1977
- state: "pressed"
1978
- }),
1979
- selected: opts.solid({
1980
- base,
1981
- dark,
1982
- tone: "positive",
1983
- name,
1984
- state: "selected"
1985
- })
1986
- },
1987
- caution: {
1988
- enabled: opts.solid({
1989
- base,
1990
- dark,
1991
- tone: "caution",
1992
- name,
1993
- state: "enabled"
1994
- }),
1995
- disabled: opts.solid({
1996
- base,
1997
- dark,
1998
- tone: "caution",
1999
- name,
2000
- state: "disabled"
2001
- }),
2002
- hovered: opts.solid({
2003
- base,
2004
- dark,
2005
- tone: "caution",
2006
- name,
2007
- state: "hovered"
2008
- }),
2009
- pressed: opts.solid({
2010
- base,
2011
- dark,
2012
- tone: "caution",
2013
- name,
2014
- state: "pressed"
2015
- }),
2016
- selected: opts.solid({
2017
- base,
2018
- dark,
2019
- tone: "caution",
2020
- name,
2021
- state: "selected"
2022
- })
2023
- },
2024
- critical: {
2025
- enabled: opts.solid({
2026
- base,
2027
- dark,
2028
- tone: "critical",
2029
- name,
2030
- state: "enabled"
2031
- }),
2032
- disabled: opts.solid({
2033
- base,
2034
- dark,
2035
- tone: "critical",
2036
- name,
2037
- state: "disabled"
2038
- }),
2039
- hovered: opts.solid({
2040
- base,
2041
- dark,
2042
- tone: "critical",
2043
- name,
2044
- state: "hovered"
2045
- }),
2046
- pressed: opts.solid({
2047
- base,
2048
- dark,
2049
- tone: "critical",
2050
- name,
2051
- state: "pressed"
2052
- }),
2053
- selected: opts.solid({
2054
- base,
2055
- dark,
2056
- tone: "critical",
2057
- name,
2058
- state: "selected"
2059
- })
2060
- }
2061
- };
2062
- }
2063
- function createSpot(opts, base, dark) {
2064
- return {
2065
- gray: opts.spot({
2066
- base,
2067
- dark,
2068
- key: "gray"
2069
- }),
2070
- blue: opts.spot({
2071
- base,
2072
- dark,
2073
- key: "blue"
2074
- }),
2075
- purple: opts.spot({
2076
- base,
2077
- dark,
2078
- key: "purple"
2079
- }),
2080
- magenta: opts.spot({
2081
- base,
2082
- dark,
2083
- key: "magenta"
2084
- }),
2085
- red: opts.spot({
2086
- base,
2087
- dark,
2088
- key: "red"
2089
- }),
2090
- orange: opts.spot({
2091
- base,
2092
- dark,
2093
- key: "orange"
2094
- }),
2095
- yellow: opts.spot({
2096
- base,
2097
- dark,
2098
- key: "yellow"
2099
- }),
2100
- green: opts.spot({
2101
- base,
2102
- dark,
2103
- key: "green"
2104
- }),
2105
- cyan: opts.spot({
2106
- base,
2107
- dark,
2108
- key: "cyan"
2109
- })
2110
- };
2111
- }
2112
- function createColorTheme() {
2113
- let partialOpts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2114
- const builders = {
2115
- ...defaultOpts,
2116
- ...partialOpts
2117
- };
2118
- return {
2119
- light: _createColorScheme(builders, false),
2120
- dark: _createColorScheme(builders, true)
2121
- };
2122
- }
2123
- function _createColorScheme(opts, dark) {
2124
- return {
2125
- default: _createColor(opts, dark, "default"),
2126
- transparent: _createColor(opts, dark, "transparent"),
2127
- primary: _createColor(opts, dark, "primary"),
2128
- positive: _createColor(opts, dark, "positive"),
2129
- caution: _createColor(opts, dark, "caution"),
2130
- critical: _createColor(opts, dark, "critical")
2131
- };
2132
- }
2133
- function _createColor(opts, dark, name) {
2134
- const base = opts.base({
2135
- dark,
2136
- name
2137
- });
2138
- const solid = createSolidTones(opts, base, dark, name);
2139
- const muted = createMutedTones(opts, base, dark, name);
2140
- return {
2141
- base,
2142
- button: createButtonModes(opts, base, dark, solid, muted),
2143
- card: createCardStates(opts, base, dark, name, solid, muted),
2144
- dark,
2145
- input: createInputModes(opts, base, dark, solid, muted),
2146
- selectable: createSelectableTones(opts, base, dark, solid, muted),
2147
- spot: createSpot(opts, base, dark),
2148
- syntax: opts.syntax({
2149
- base,
2150
- dark
2151
- }),
2152
- solid,
2153
- muted
2154
- };
2155
- }
2156
- function multiply(bg, fg) {
2157
- const b = parseColor(bg);
2158
- const s = parseColor(fg);
2159
- const hex = rgbToHex(multiply$1(b, s));
2160
- return hex;
2161
- }
2162
- function screen(bg, fg) {
2163
- const b = parseColor(bg);
2164
- const s = parseColor(fg);
2165
- const hex = rgbToHex(screen$1(b, s));
2166
- return hex;
2167
- }
2168
- const defaultTints = {
2169
- light: {
2170
- text_primary: "900",
2171
- text_secondary: "600",
2172
- text_inactive: "500",
2173
- bg_base: white$1,
2174
- bg_base_hover: "50",
2175
- bg_base_active: "100",
2176
- bg_accent: "500",
2177
- bg_accent_hover: "600",
2178
- bg_accent_active: "700",
2179
- bg_tint: "50",
2180
- icon_default: "500",
2181
- icon_inverted: white$1,
2182
- border_base: "100",
2183
- border_accent: "500",
2184
- border_accent_inverted: white$1
2185
- },
2186
- dark: {
2187
- text_primary: "50",
2188
- text_secondary: "300",
2189
- text_inactive: "400",
2190
- bg_base: black$1,
2191
- bg_base_hover: "900",
2192
- bg_base_active: "800",
2193
- bg_accent: "500",
2194
- bg_accent_hover: "400",
2195
- bg_accent_active: "300",
2196
- bg_tint: "900",
2197
- icon_default: "300",
2198
- icon_inverted: hues.gray[900],
2199
- border_base: "800",
2200
- border_accent: "300",
2201
- border_accent_inverted: hues.gray[900]
2202
- }
2203
- };
2204
- const colorTints = {
2205
- light: {
2206
- default: {
2207
- ...defaultTints.light,
2208
- bg_accent: "900",
2209
- bg_accent_hover: "950",
2210
- bg_accent_active: black$1,
2211
- border_accent: "600"
2212
- },
2213
- primary: {
2214
- ...defaultTints.light,
2215
- bg_accent: "900",
2216
- bg_accent_hover: "950",
2217
- bg_accent_active: black$1,
2218
- border_accent: "600"
2219
- },
2220
- positive: {
2221
- ...defaultTints.light,
2222
- bg_base_hover: hues.gray[50],
2223
- bg_base_active: "50",
2224
- bg_accent: "400",
2225
- bg_accent_hover: "500",
2226
- bg_accent_active: "600",
2227
- border_accent: "400"
2228
- },
2229
- transparent: defaultTints.light,
2230
- caution: defaultTints.light,
2231
- critical: defaultTints.light
2232
- },
2233
- dark: {
2234
- default: {
2235
- ...defaultTints.dark,
2236
- text_primary: white$1,
2237
- bg_accent: white$1,
2238
- bg_accent_hover: "50",
2239
- bg_accent_active: "100"
2240
- },
2241
- primary: {
2242
- ...defaultTints.dark,
2243
- text_primary: white$1,
2244
- bg_accent: white$1,
2245
- bg_accent_hover: "50",
2246
- bg_accent_active: "100"
2247
- },
2248
- positive: {
2249
- ...defaultTints.dark,
2250
- bg_base_hover: hues.gray[900],
2251
- bg_base_active: "900",
2252
- bg_accent: "400",
2253
- bg_accent_hover: "300",
2254
- bg_accent_active: "200",
2255
- border_accent: "400"
2256
- },
2257
- transparent: defaultTints.dark,
2258
- caution: defaultTints.dark,
2259
- critical: defaultTints.dark
2260
- }
2261
- };
2262
- const getColorValue = (tints, dark, tone, key) => {
2263
- const value = colorTints[dark ? "dark" : "light"][tone][key];
2264
- if (typeof value === "string") {
2265
- return tints[value];
2266
- }
2267
- return value;
2268
- };
2269
- const getColorHex = (tints, dark, tone, key) => {
2270
- return getColorValue(tints, dark, tone, key).hex;
2271
- };
2272
- const tones = {
2273
- default: hues.gray,
2274
- transparent: hues.gray,
2275
- primary: hues.gray,
2276
- positive: hues.cyan,
2277
- caution: hues.yellow,
2278
- critical: hues.red
2279
- };
2280
- const NEUTRAL_TONES = ["default", "transparent"];
2281
- const color = createColorTheme({
2282
- base: _ref11 => {
2283
- let {
2284
- dark,
2285
- name
2286
- } = _ref11;
2287
- if (name === "default") {
2288
- const tints2 = hues.gray;
2289
- const skeletonFrom2 = dark ? tints2[900].hex : tints2[100].hex;
2290
- return {
2291
- fg: dark ? white$1.hex : black$1.hex,
2292
- bg: getColorHex(tones["default"], dark, "default", "bg_base"),
2293
- border: getColorHex(tones["default"], dark, "default", "border_base"),
2294
- focusRing: getColorHex(tones["positive"], dark, "positive", "border_accent"),
2295
- shadow: {
2296
- outline: rgba(tints2[500].hex, 0.4),
2297
- umbra: dark ? rgba(tints2[950].hex, 0.4) : rgba(tints2[500].hex, 0.2),
2298
- penumbra: dark ? rgba(tints2[950].hex, 0.28) : rgba(tints2[500].hex, 0.14),
2299
- ambient: dark ? rgba(tints2[950].hex, 0.24) : rgba(tints2[500].hex, 0.12)
2300
- },
2301
- skeleton: {
2302
- from: skeletonFrom2,
2303
- to: rgba(skeletonFrom2, 0.5)
2304
- }
2305
- };
2306
- }
2307
- if (name === "transparent") {
2308
- const tints2 = tones.default;
2309
- const skeletonFrom2 = tints2[dark ? 800 : 200].hex;
2310
- return {
2311
- fg: tints2[dark ? 100 : 900].hex,
2312
- bg: tints2[dark ? 950 : 50].hex,
2313
- border: tints2[dark ? 800 : 300].hex,
2314
- focusRing: hues.blue[500].hex,
2315
- shadow: {
2316
- outline: rgba(tints2[500].hex, 0.4),
2317
- umbra: dark ? rgba(tints2[900].hex, 0.4) : rgba(tints2[500].hex, 0.2),
2318
- penumbra: dark ? rgba(tints2[900].hex, 0.28) : rgba(tints2[500].hex, 0.14),
2319
- ambient: dark ? rgba(tints2[900].hex, 0.24) : rgba(tints2[500].hex, 0.12)
2320
- },
2321
- skeleton: {
2322
- from: skeletonFrom2,
2323
- to: rgba(skeletonFrom2, 0.5)
2324
- }
2325
- };
2326
- }
2327
- const tints = tones[name] || tones.default;
2328
- const skeletonFrom = tints[dark ? 800 : 200].hex;
2329
- return {
2330
- fg: tints[dark ? 100 : 900].hex,
2331
- bg: getColorHex(tints, dark, name, "bg_base"),
2332
- border: getColorHex(tints, dark, name, "border_base"),
2333
- focusRing: getColorHex(tints, dark, name, "border_accent"),
2334
- shadow: {
2335
- outline: rgba(tints[500].hex, 0.4),
2336
- umbra: dark ? rgba(tints[900].hex, 0.4) : rgba(tints[500].hex, 0.2),
2337
- penumbra: dark ? rgba(tints[900].hex, 0.28) : rgba(tints[500].hex, 0.14),
2338
- ambient: dark ? rgba(tints[900].hex, 0.24) : rgba(tints[500].hex, 0.12)
2339
- },
2340
- skeleton: {
2341
- from: skeletonFrom,
2342
- to: rgba(skeletonFrom, 0.5)
2343
- }
2344
- };
2345
- },
2346
- solid: _ref12 => {
2347
- let {
2348
- base,
2349
- dark,
2350
- name,
2351
- state,
2352
- tone
2353
- } = _ref12;
2354
- const mix = dark ? screen : multiply;
2355
- const mix2 = dark ? multiply : screen;
2356
- const defaultTints = tones[name] || tones.default;
2357
- const isNeutral = NEUTRAL_TONES.includes(name) && NEUTRAL_TONES.includes(tone);
2358
- let tints = tones[tone === "default" ? name : tone] || defaultTints;
2359
- if (state === "disabled") {
2360
- tints = defaultTints;
2361
- const bg2 = getColorHex(tones.default, dark, "default", "bg_tint");
2362
- const skeletonFrom2 = mix2(bg2, tints[dark ? 200 : 800].hex);
2363
- return {
2364
- bg: bg2,
2365
- bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2366
- border: getColorHex(tones.default, dark, "default", "bg_base"),
2367
- fg: getColorHex(tones.default, dark, "default", "text_inactive"),
2368
- iconColor: getColorHex(tones.default, dark, "default", "border_base"),
2369
- muted: {
2370
- fg: mix(base.bg, tints[dark ? 950 : 50].hex)
2371
- },
2372
- accent: {
2373
- fg: mix(base.bg, tints[dark ? 950 : 50].hex)
2374
- },
2375
- link: {
2376
- fg: mix(base.bg, tints[dark ? 950 : 50].hex)
2377
- },
2378
- code: {
2379
- bg: bg2,
2380
- fg: mix(base.bg, tints[dark ? 950 : 50].hex)
2381
- },
2382
- skeleton: {
2383
- from: skeletonFrom2,
2384
- to: rgba(skeletonFrom2, 0.5)
2385
- }
2386
- };
2387
- }
2388
- if (state === "hovered") {
2389
- const bg2 = getColorHex(tints, dark, tone, "bg_accent_hover");
2390
- const skeletonFrom2 = mix2(bg2, tints[dark ? 200 : 800].hex);
2391
- return {
2392
- bg: bg2,
2393
- bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2394
- border: bg2,
2395
- fg: getColorHex(tints, dark, "default", "bg_base"),
2396
- iconColor: getColorHex(tints, dark, "default", "icon_inverted"),
2397
- muted: {
2398
- fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2399
- },
2400
- accent: {
2401
- fg: mix2(bg2, hues.red[dark ? 800 : 200].hex)
2402
- },
2403
- link: {
2404
- fg: mix2(bg2, hues.blue[dark ? 800 : 200].hex)
2405
- },
2406
- code: {
2407
- bg: mix(bg2, tints[dark ? 950 : 50].hex),
2408
- fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2409
- },
2410
- skeleton: {
2411
- from: skeletonFrom2,
2412
- to: rgba(skeletonFrom2, 0.5)
2413
- }
2414
- };
2415
- }
2416
- if (state === "pressed") {
2417
- const bg2 = getColorHex(tints, dark, tone, "bg_accent_active");
2418
- const skeletonFrom2 = mix2(bg2, tints[dark ? 200 : 600].hex);
2419
- return {
2420
- bg: bg2,
2421
- bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2422
- border: bg2,
2423
- fg: getColorHex(tints, dark, "default", "bg_base"),
2424
- iconColor: getColorHex(tints, dark, "default", "icon_inverted"),
2425
- muted: {
2426
- fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2427
- },
2428
- accent: {
2429
- fg: mix2(bg2, hues.red[dark ? 800 : 200].hex)
2430
- },
2431
- link: {
2432
- fg: mix2(bg2, hues.blue[dark ? 800 : 200].hex)
2433
- },
2434
- code: {
2435
- bg: mix(bg2, tints[dark ? 950 : 50].hex),
2436
- fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2437
- },
2438
- skeleton: {
2439
- from: skeletonFrom2,
2440
- to: rgba(skeletonFrom2, 0.5)
2441
- }
2442
- };
2443
- }
2444
- if (state === "selected") {
2445
- if (isNeutral) {
2446
- tints = tones.primary;
2447
- }
2448
- const bg2 = mix(base.bg, tints[dark ? 200 : 800].hex);
2449
- const skeletonFrom2 = mix2(bg2, tints[dark ? 200 : 800].hex);
2450
- return {
2451
- bg: bg2,
2452
- bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2453
- border: bg2,
2454
- fg: getColorHex(tints, dark, "default", "bg_base"),
2455
- iconColor: getColorHex(tints, dark, "default", "icon_inverted"),
2456
- muted: {
2457
- fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2458
- },
2459
- accent: {
2460
- fg: mix2(bg2, hues.red[dark ? 800 : 200].hex)
2461
- },
2462
- link: {
2463
- fg: mix2(bg2, hues.blue[dark ? 800 : 200].hex)
2464
- },
2465
- code: {
2466
- bg: mix(bg2, tints[dark ? 950 : 50].hex),
2467
- fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2468
- },
2469
- skeleton: {
2470
- from: skeletonFrom2,
2471
- to: rgba(skeletonFrom2, 0.5)
2472
- }
2473
- };
2474
- }
2475
- const bg = getColorHex(tints, dark, tone, "bg_accent");
2476
- const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex);
2477
- return {
2478
- bg,
2479
- bg2: mix2(bg, tints[dark ? 50 : 950].hex),
2480
- border: bg,
2481
- fg: getColorHex(tints, dark, "default", "bg_base"),
2482
- iconColor: getColorHex(tints, dark, "default", "icon_inverted"),
2483
- muted: {
2484
- fg: mix(base.bg, tints[dark ? 900 : 100].hex)
2485
- },
2486
- accent: {
2487
- fg: mix2(bg, hues.red[dark ? 900 : 100].hex)
2488
- },
2489
- link: {
2490
- fg: mix2(bg, hues.blue[dark ? 900 : 100].hex)
2491
- },
2492
- code: {
2493
- bg: mix(bg, tints[dark ? 950 : 50].hex),
2494
- fg: mix(base.bg, tints[dark ? 900 : 100].hex)
2495
- },
2496
- skeleton: {
2497
- from: skeletonFrom,
2498
- to: rgba(skeletonFrom, 0.5)
2499
- }
2500
- };
2501
- },
2502
- muted: _ref13 => {
2503
- let {
2504
- base,
2505
- dark,
2506
- name,
2507
- state,
2508
- tone
2509
- } = _ref13;
2510
- const mix = dark ? screen : multiply;
2511
- const defaultTints = tones[name] || tones.default;
2512
- const isNeutral = NEUTRAL_TONES.includes(name) && NEUTRAL_TONES.includes(tone);
2513
- let tints = tones[tone === "default" ? name : tone] || defaultTints;
2514
- if (state === "disabled") {
2515
- tints = defaultTints;
2516
- const bg2 = base.bg;
2517
- const skeletonFrom2 = mix(bg2, tints[dark ? 900 : 100].hex);
2518
- return {
2519
- bg: bg2,
2520
- bg2: mix(bg2, tints[dark ? 950 : 50].hex),
2521
- border: getColorHex(tones.default, dark, "default", "border_base"),
2522
- fg: getColorHex(tones.default, dark, "default", "text_inactive"),
2523
- iconColor: getColorHex(tones.default, dark, "default", "border_base"),
2524
- muted: {
2525
- fg: getColorHex(tones.default, dark, "default", "text_inactive")
2526
- },
2527
- accent: {
2528
- fg: getColorHex(tints, dark, tone, "text_secondary")
2529
- },
2530
- link: {
2531
- fg: getColorHex(tints, dark, tone, "text_secondary")
2532
- },
2533
- code: {
2534
- bg: bg2,
2535
- fg: getColorHex(tints, dark, tone, "text_secondary")
2536
- },
2537
- skeleton: {
2538
- from: rgba(skeletonFrom2, 0.5),
2539
- to: rgba(skeletonFrom2, 0.25)
2540
- }
2541
- };
2542
- }
2543
- if (state === "hovered") {
2544
- const bg2 = getColorHex(tints, dark, name, "bg_base_hover");
2545
- const skeletonFrom2 = mix(bg2, tints[dark ? 900 : 100].hex);
2546
- return {
2547
- bg: bg2,
2548
- bg2: mix(bg2, tints[dark ? 950 : 50].hex),
2549
- border: mix(bg2, tints[dark ? 900 : 100].hex),
2550
- fg: getColorHex(tints, dark, tone, "text_primary"),
2551
- iconColor: getColorHex(tints, dark, name, "icon_default"),
2552
- muted: {
2553
- fg: getColorHex(tints, dark, tone, "text_secondary")
2554
- },
2555
- accent: {
2556
- fg: mix(base.bg, hues.red[dark ? 400 : 500].hex)
2557
- },
2558
- link: {
2559
- fg: mix(base.bg, hues.blue[dark ? 400 : 600].hex)
2560
- },
2561
- code: {
2562
- bg: mix(bg2, tints[dark ? 950 : 50].hex),
2563
- fg: getColorHex(tints, dark, tone, "text_secondary")
2564
- },
2565
- skeleton: {
2566
- from: skeletonFrom2,
2567
- to: rgba(skeletonFrom2, 0.5)
2568
- }
2569
- };
2570
- }
2571
- if (state === "pressed") {
2572
- if (isNeutral) {
2573
- tints = tones.primary;
2574
- }
2575
- const bg2 = getColorHex(tints, dark, name, "bg_base_active");
2576
- const skeletonFrom2 = mix(bg2, getColorHex(tints, dark, name, "bg_base_active"));
2577
- return {
2578
- bg: bg2,
2579
- bg2: mix(bg2, tints[dark ? 950 : 50].hex),
2580
- border: getColorHex(tints, dark, name, "border_base"),
2581
- fg: getColorHex(tints, dark, tone, "text_primary"),
2582
- iconColor: getColorHex(tints, dark, name, "icon_default"),
2583
- muted: {
2584
- fg: getColorHex(tints, dark, tone, "text_secondary")
2585
- },
2586
- accent: {
2587
- fg: mix(bg2, hues.red[dark ? 400 : 500].hex)
2588
- },
2589
- link: {
2590
- fg: mix(bg2, hues.blue[dark ? 400 : 600].hex)
2591
- },
2592
- code: {
2593
- bg: mix(bg2, tints[dark ? 950 : 50].hex),
2594
- fg: getColorHex(tints, dark, tone, "text_secondary")
2595
- },
2596
- skeleton: {
2597
- from: skeletonFrom2,
2598
- to: rgba(skeletonFrom2, 0.5)
2599
- }
2600
- };
2601
- }
2602
- if (state === "selected") {
2603
- if (isNeutral) {
2604
- tints = tones.primary;
2605
- }
2606
- const bg2 = mix(base.bg, tints[dark ? 900 : 100].hex);
2607
- const skeletonFrom2 = mix(bg2, tints[dark ? 900 : 100].hex);
2608
- return {
2609
- bg: bg2,
2610
- bg2: mix(bg2, tints[dark ? 950 : 50].hex),
2611
- border: getColorHex(tints, dark, name, "border_base"),
2612
- fg: getColorHex(tints, dark, tone, "text_primary"),
2613
- iconColor: getColorHex(tints, dark, name, "icon_default"),
2614
- muted: {
2615
- fg: getColorHex(tints, dark, tone, "text_secondary")
2616
- },
2617
- accent: {
2618
- fg: mix(bg2, hues.red[dark ? 400 : 500].hex)
2619
- },
2620
- link: {
2621
- fg: mix(bg2, hues.blue[dark ? 400 : 600].hex)
2622
- },
2623
- code: {
2624
- bg: mix(bg2, tints[dark ? 950 : 50].hex),
2625
- fg: getColorHex(tints, dark, tone, "text_secondary")
2626
- },
2627
- skeleton: {
2628
- from: skeletonFrom2,
2629
- to: rgba(skeletonFrom2, 0.5)
2630
- }
2631
- };
2632
- }
2633
- const bg = base.bg;
2634
- const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex);
2635
- return {
2636
- bg,
2637
- bg2: mix(bg, tints[dark ? 950 : 50].hex),
2638
- border: mix(bg, getColorHex(tints, dark, name, "bg_base")),
2639
- fg: getColorHex(tints, dark, tone, "text_primary"),
2640
- iconColor: getColorHex(tints, dark, name, "icon_default"),
2641
- muted: {
2642
- fg: getColorHex(tints, dark, tone, "text_secondary")
2643
- },
2644
- accent: {
2645
- fg: mix(base.bg, hues.red[dark ? 400 : 500].hex)
2646
- },
2647
- link: {
2648
- fg: mix(base.bg, hues.blue[dark ? 400 : 600].hex)
2649
- },
2650
- code: {
2651
- bg: mix(base.bg, tints[dark ? 950 : 50].hex),
2652
- fg: getColorHex(tints, dark, tone, "text_secondary")
2653
- },
2654
- skeleton: {
2655
- from: skeletonFrom,
2656
- to: rgba(skeletonFrom, 0.5)
2657
- }
2658
- };
2659
- },
2660
- button: _ref14 => {
2661
- let {
2662
- base,
2663
- mode,
2664
- muted,
2665
- solid
2666
- } = _ref14;
2667
- if (mode === "bleed") {
2668
- return {
2669
- enabled: {
2670
- ...muted.enabled,
2671
- border: muted.enabled.bg
2672
- },
2673
- hovered: {
2674
- ...muted.hovered,
2675
- border: muted.hovered.bg
2676
- },
2677
- pressed: {
2678
- ...muted.pressed,
2679
- border: muted.pressed.bg
2680
- },
2681
- selected: {
2682
- ...muted.selected,
2683
- border: muted.selected.bg
2684
- },
2685
- disabled: {
2686
- ...muted.disabled,
2687
- border: muted.disabled.bg
2688
- }
2689
- };
2690
- }
2691
- if (mode === "ghost") {
2692
- return {
2693
- ...muted,
2694
- enabled: {
2695
- ...muted.enabled,
2696
- border: base.border
2697
- }
2698
- };
2699
- }
2700
- return solid;
2701
- },
2702
- card: _ref15 => {
2703
- let {
2704
- base,
2705
- dark,
2706
- muted,
2707
- name,
2708
- solid,
2709
- state
2710
- } = _ref15;
2711
- if (state === "hovered") {
2712
- return muted[name].hovered;
2713
- }
2714
- if (state === "disabled") {
2715
- return muted[name].disabled;
2716
- }
2717
- const isNeutral = NEUTRAL_TONES.includes(name);
2718
- const tints = tones[name] || tones.default;
2719
- const mix = dark ? screen : multiply;
2720
- if (state === "pressed") {
2721
- if (isNeutral) {
2722
- return muted.primary.pressed;
2723
- }
2724
- return muted[name].pressed;
2725
- }
2726
- if (state === "selected") {
2727
- if (isNeutral) {
2728
- return solid.primary.enabled;
2729
- }
2730
- return solid[name].enabled;
2731
- }
2732
- const bg = base.bg;
2733
- const skeletonFrom = mix(base.bg, tints[dark ? 900 : 100].hex);
2734
- return {
2735
- bg,
2736
- bg2: mix(bg, tints[dark ? 950 : 50].hex),
2737
- fg: base.fg,
2738
- iconColor: getColorHex(tints, dark, name, "icon_default"),
2739
- border: base.border,
2740
- muted: {
2741
- fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2742
- },
2743
- accent: {
2744
- fg: mix(base.bg, hues.red[dark ? 400 : 500].hex)
2745
- },
2746
- link: {
2747
- fg: mix(base.bg, hues.blue[dark ? 400 : 600].hex)
2748
- },
2749
- code: {
2750
- bg: mix(base.bg, tints[dark ? 950 : 50].hex),
2751
- fg: tints[dark ? 400 : 600].hex
2752
- },
2753
- skeleton: {
2754
- from: skeletonFrom,
2755
- to: rgba(skeletonFrom, 0.5)
2756
- }
2757
- };
2758
- },
2759
- input: _ref16 => {
2760
- let {
2761
- base,
2762
- dark,
2763
- mode,
2764
- state
2765
- } = _ref16;
2766
- const mix = dark ? screen : multiply;
2767
- if (mode === "invalid") {
2768
- const tints = tones.critical;
2769
- return {
2770
- bg: mix(base.bg, tints[dark ? 950 : 50].hex),
2771
- bg2: getColorHex(tints, dark, "critical", "text_secondary"),
2772
- fg: mix(base.bg, tints[dark ? 400 : 600].hex),
2773
- border: getColorHex(tints, dark, "critical", "border_base"),
2774
- placeholder: getColorHex(tones.default, !dark, "default", "text_secondary")
2775
- };
2776
- }
2777
- if (state === "hovered") {
2778
- return {
2779
- bg: base.bg,
2780
- bg2: getColorHex(tones.default, dark, "default", "text_secondary"),
2781
- fg: base.fg,
2782
- border: mix(base.bg, hues.gray[dark ? 700 : 300].hex),
2783
- placeholder: getColorHex(tones.default, !dark, "default", "text_secondary")
2784
- };
2785
- }
2786
- if (state === "disabled") {
2787
- return {
2788
- bg: getColorHex(tones.default, dark, "default", "bg_tint"),
2789
- bg2: getColorHex(tones.default, dark, "default", "border_base"),
2790
- fg: getColorHex(tones.default, dark, "default", "text_secondary"),
2791
- border: getColorHex(tones.default, dark, "default", "border_base"),
2792
- placeholder: getColorHex(tones.default, !dark, "default", "text_secondary")
2793
- };
2794
- }
2795
- if (state === "readOnly") {
2796
- return {
2797
- bg: getColorHex(tones.default, dark, "default", "bg_tint"),
2798
- bg2: getColorHex(tones.default, dark, "default", "border_base"),
2799
- fg: getColorHex(tones.default, dark, "default", "text_secondary"),
2800
- border: getColorHex(tones.default, dark, "default", "border_base"),
2801
- placeholder: getColorHex(tones.default, !dark, "default", "text_secondary")
2802
- };
2803
- }
2804
- return {
2805
- bg: base.bg,
2806
- bg2: getColorHex(tones.default, dark, "default", "text_secondary"),
2807
- fg: base.fg,
2808
- border: base.border,
2809
- placeholder: getColorHex(tones.default, !dark, "default", "text_secondary")
2810
- };
2811
- },
2812
- selectable: _ref17 => {
2813
- let {
2814
- base,
2815
- muted,
2816
- tone,
2817
- solid,
2818
- state
2819
- } = _ref17;
2820
- if (state === "enabled") {
2821
- return {
2822
- ...muted[tone].enabled,
2823
- bg: base.bg
2824
- };
2825
- }
2826
- if (state === "pressed") {
2827
- if (tone === "default") {
2828
- return muted.primary.pressed;
2829
- }
2830
- return muted[tone].pressed;
2831
- }
2832
- if (state === "selected") {
2833
- if (tone === "default") {
2834
- return solid.primary.enabled;
2835
- }
2836
- return solid[tone].enabled;
2837
- }
2838
- if (state === "disabled") {
2839
- return {
2840
- ...muted[tone].disabled,
2841
- bg: base.bg
2842
- };
2843
- }
2844
- return muted[tone][state];
2845
- },
2846
- spot: _ref18 => {
2847
- let {
2848
- base,
2849
- dark,
2850
- key
2851
- } = _ref18;
2852
- const mix = dark ? screen : multiply;
2853
- return mix(base.bg, hues[key][dark ? 400 : 500].hex);
2854
- },
2855
- syntax: _ref19 => {
2856
- let {
2857
- base,
2858
- dark
2859
- } = _ref19;
2860
- const mix = dark ? screen : multiply;
2861
- const mainShade = dark ? 400 : 600;
2862
- const secondaryShade = dark ? 600 : 400;
2863
- return {
2864
- atrule: mix(base.bg, hues.purple[mainShade].hex),
2865
- attrName: mix(base.bg, hues.green[mainShade].hex),
2866
- attrValue: mix(base.bg, hues.yellow[mainShade].hex),
2867
- attribute: mix(base.bg, hues.yellow[mainShade].hex),
2868
- boolean: mix(base.bg, hues.purple[mainShade].hex),
2869
- builtin: mix(base.bg, hues.purple[mainShade].hex),
2870
- cdata: mix(base.bg, hues.yellow[mainShade].hex),
2871
- char: mix(base.bg, hues.yellow[mainShade].hex),
2872
- class: mix(base.bg, hues.orange[mainShade].hex),
2873
- className: mix(base.bg, hues.cyan[mainShade].hex),
2874
- comment: mix(base.bg, hues.gray[secondaryShade].hex),
2875
- constant: mix(base.bg, hues.purple[mainShade].hex),
2876
- deleted: mix(base.bg, hues.red[mainShade].hex),
2877
- doctype: mix(base.bg, hues.gray[secondaryShade].hex),
2878
- entity: mix(base.bg, hues.red[mainShade].hex),
2879
- function: mix(base.bg, hues.green[mainShade].hex),
2880
- hexcode: mix(base.bg, hues.blue[mainShade].hex),
2881
- id: mix(base.bg, hues.purple[mainShade].hex),
2882
- important: mix(base.bg, hues.purple[mainShade].hex),
2883
- inserted: mix(base.bg, hues.yellow[mainShade].hex),
2884
- keyword: mix(base.bg, hues.magenta[mainShade].hex),
2885
- number: mix(base.bg, hues.purple[mainShade].hex),
2886
- operator: mix(base.bg, hues.magenta[mainShade].hex),
2887
- prolog: mix(base.bg, hues.gray[secondaryShade].hex),
2888
- property: mix(base.bg, hues.blue[mainShade].hex),
2889
- pseudoClass: mix(base.bg, hues.yellow[mainShade].hex),
2890
- pseudoElement: mix(base.bg, hues.yellow[mainShade].hex),
2891
- punctuation: mix(base.bg, hues.gray[mainShade].hex),
2892
- regex: mix(base.bg, hues.blue[mainShade].hex),
2893
- selector: mix(base.bg, hues.red[mainShade].hex),
2894
- string: mix(base.bg, hues.yellow[mainShade].hex),
2895
- symbol: mix(base.bg, hues.purple[mainShade].hex),
2896
- tag: mix(base.bg, hues.red[mainShade].hex),
2897
- unit: mix(base.bg, hues.orange[mainShade].hex),
2898
- url: mix(base.bg, hues.red[mainShade].hex),
2899
- variable: mix(base.bg, hues.red[mainShade].hex)
2900
- };
2901
- }
2902
- });
2903
- const fonts = {
2904
- code: {
2905
- family: "ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",
2906
- weights: {
2907
- regular: 400,
2908
- medium: 500,
2909
- semibold: 600,
2910
- bold: 700
2911
- },
2912
- sizes: [{
2913
- ascenderHeight: 3,
2914
- descenderHeight: 3,
2915
- fontSize: 10,
2916
- iconSize: 17,
2917
- lineHeight: 13,
2918
- letterSpacing: 0
2919
- }, {
2920
- ascenderHeight: 4,
2921
- descenderHeight: 4,
2922
- fontSize: 13,
2923
- iconSize: 21,
2924
- lineHeight: 17,
2925
- letterSpacing: 0
2926
- }, {
2927
- ascenderHeight: 5,
2928
- descenderHeight: 5,
2929
- fontSize: 16,
2930
- iconSize: 25,
2931
- lineHeight: 21,
2932
- letterSpacing: 0
2933
- }, {
2934
- ascenderHeight: 6,
2935
- descenderHeight: 6,
2936
- fontSize: 19,
2937
- iconSize: 29,
2938
- lineHeight: 25,
2939
- letterSpacing: 0
2940
- }, {
2941
- ascenderHeight: 7,
2942
- descenderHeight: 7,
2943
- fontSize: 22,
2944
- iconSize: 33,
2945
- lineHeight: 29,
2946
- letterSpacing: 0
2947
- }]
2948
- },
2949
- heading: {
2950
- family: 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',
2951
- weights: {
2952
- regular: 700,
2953
- medium: 800,
2954
- semibold: 900,
2955
- bold: 900
2956
- },
2957
- sizes: [{
2958
- ascenderHeight: 4,
2959
- descenderHeight: 4,
2960
- fontSize: 12,
2961
- iconSize: 17,
2962
- lineHeight: 17,
2963
- letterSpacing: 0
2964
- }, {
2965
- ascenderHeight: 5,
2966
- descenderHeight: 5,
2967
- fontSize: 16,
2968
- iconSize: 25,
2969
- lineHeight: 21,
2970
- letterSpacing: 0
2971
- }, {
2972
- ascenderHeight: 6,
2973
- descenderHeight: 6,
2974
- fontSize: 21,
2975
- iconSize: 33,
2976
- lineHeight: 27,
2977
- letterSpacing: 0
2978
- }, {
2979
- ascenderHeight: 7,
2980
- descenderHeight: 7,
2981
- fontSize: 27,
2982
- iconSize: 41,
2983
- lineHeight: 33,
2984
- letterSpacing: 0
2985
- }, {
2986
- ascenderHeight: 8,
2987
- descenderHeight: 8,
2988
- fontSize: 33,
2989
- iconSize: 49,
2990
- lineHeight: 39,
2991
- letterSpacing: 0
2992
- }, {
2993
- ascenderHeight: 9,
2994
- descenderHeight: 9,
2995
- fontSize: 38,
2996
- iconSize: 53,
2997
- lineHeight: 45,
2998
- letterSpacing: 0
2999
- }]
3000
- },
3001
- label: {
3002
- family: 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", system-ui, sans-serif',
3003
- weights: {
3004
- regular: 600,
3005
- medium: 700,
3006
- semibold: 800,
3007
- bold: 900
3008
- },
3009
- sizes: [{
3010
- ascenderHeight: 2,
3011
- descenderHeight: 2,
3012
- fontSize: 9.8,
3013
- iconSize: 15,
3014
- lineHeight: 11,
3015
- letterSpacing: 0.5
3016
- }, {
3017
- ascenderHeight: 2,
3018
- descenderHeight: 2,
3019
- fontSize: 11.25,
3020
- iconSize: 17,
3021
- lineHeight: 12,
3022
- letterSpacing: 0.5
3023
- }, {
3024
- ascenderHeight: 2,
3025
- descenderHeight: 2,
3026
- fontSize: 12.75,
3027
- iconSize: 19,
3028
- lineHeight: 13,
3029
- letterSpacing: 0.5
3030
- }, {
3031
- ascenderHeight: 2,
3032
- descenderHeight: 2,
3033
- fontSize: 14,
3034
- iconSize: 21,
3035
- lineHeight: 14,
3036
- letterSpacing: 0.5
3037
- }, {
3038
- ascenderHeight: 2,
3039
- descenderHeight: 2,
3040
- fontSize: 15.5,
3041
- iconSize: 23,
3042
- lineHeight: 15,
3043
- letterSpacing: 0.5
3044
- }]
3045
- },
3046
- text: {
3047
- family: 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',
3048
- weights: {
3049
- regular: 400,
3050
- medium: 500,
3051
- semibold: 600,
3052
- bold: 700
3053
- },
3054
- sizes: [{
3055
- ascenderHeight: 3,
3056
- descenderHeight: 3,
3057
- fontSize: 10,
3058
- iconSize: 17,
3059
- lineHeight: 13,
3060
- letterSpacing: 0
3061
- }, {
3062
- ascenderHeight: 4,
3063
- descenderHeight: 4,
3064
- fontSize: 13,
3065
- iconSize: 21,
3066
- lineHeight: 17,
3067
- letterSpacing: 0
3068
- }, {
3069
- ascenderHeight: 5,
3070
- descenderHeight: 5,
3071
- fontSize: 16,
3072
- iconSize: 25,
3073
- lineHeight: 21,
3074
- letterSpacing: 0
3075
- }, {
3076
- ascenderHeight: 6,
3077
- descenderHeight: 6,
3078
- fontSize: 19,
3079
- iconSize: 29,
3080
- lineHeight: 25,
3081
- letterSpacing: 0
3082
- }, {
3083
- ascenderHeight: 7,
3084
- descenderHeight: 7,
3085
- fontSize: 22,
3086
- iconSize: 33,
3087
- lineHeight: 29,
3088
- letterSpacing: 0
3089
- }]
3090
- }
3091
- };
3092
- const studioTheme = {
3093
- avatar: {
3094
- sizes: [{
3095
- distance: -3,
3096
- size: 25
3097
- }, {
3098
- distance: -6,
3099
- size: 35
3100
- }, {
3101
- distance: -9,
3102
- size: 55
3103
- }],
3104
- focusRing: {
3105
- offset: 1,
3106
- width: 1
3107
- }
3108
- },
3109
- button: {
3110
- textWeight: "medium",
3111
- focusRing: {
3112
- offset: -1,
3113
- width: 2
3114
- }
3115
- },
3116
- card: {
3117
- focusRing: {
3118
- offset: -1,
3119
- width: 1
3120
- }
3121
- },
3122
- color,
3123
- container: [320, 640, 960, 1280, 1600, 1920],
3124
- focusRing: {
3125
- offset: 1,
3126
- width: 2
3127
- },
3128
- fonts,
3129
- media: [360, 600, 900, 1200, 1800, 2400],
3130
- radius: [0, 1, 3, 6, 9, 12, 21],
3131
- shadows: [null, {
3132
- umbra: [0, 0, 0, 0],
3133
- penumbra: [0, 0, 0, 0],
3134
- ambient: [0, 0, 0, 0]
3135
- }, {
3136
- umbra: [0, 3, 5, -1],
3137
- penumbra: [0, 6, 10, 0],
3138
- ambient: [0, 1, 18, 0]
3139
- }, {
3140
- umbra: [0, 7, 8, -4],
3141
- penumbra: [0, 12, 17, 2],
3142
- ambient: [0, 5, 22, 4]
3143
- }, {
3144
- umbra: [0, 9, 11, -5],
3145
- penumbra: [0, 18, 28, 2],
3146
- ambient: [0, 7, 34, 6]
3147
- }, {
3148
- umbra: [0, 11, 15, -7],
3149
- penumbra: [0, 24, 38, 3],
3150
- ambient: [0, 9, 46, 8]
3151
- }],
3152
- space: [0, 4, 8, 12, 20, 32, 52, 84, 136, 220],
3153
- input: {
3154
- checkbox: {
3155
- size: 17,
3156
- focusRing: {
3157
- offset: -1,
3158
- width: 1
3159
- }
3160
- },
3161
- radio: {
3162
- size: 17,
3163
- markSize: 9,
3164
- focusRing: {
3165
- offset: -1,
3166
- width: 1
3167
- }
3168
- },
3169
- switch: {
3170
- width: 21,
3171
- height: 13,
3172
- padding: 2,
3173
- transitionDurationMs: 150,
3174
- transitionTimingFunction: "ease-out",
3175
- focusRing: {
3176
- offset: 1,
3177
- width: 1
3178
- }
3179
- },
3180
- border: {
3181
- width: 1
3182
- },
3183
- select: {
3184
- focusRing: {
3185
- offset: -1,
3186
- width: 1
3187
- }
3188
- },
3189
- text: {
3190
- focusRing: {
3191
- offset: -1,
3192
- width: 1
3193
- }
3194
- }
3195
- }
3196
- // styles: {
3197
- // button: {
3198
- // root: {
3199
- // transition: 'background-color 100ms,border-color 100ms,color 100ms',
3200
- // },
3201
- // },
3202
- // card: {
3203
- // root: {
3204
- // transition: 'background-color 100ms,border-color 100ms,color 100ms',
3205
- // },
3206
- // },
3207
- // },
3208
- };
3209
-
808
+ };
809
+ }
810
+ function useElementSize(element) {
811
+ const [size, setSize] = useState(null);
812
+ useEffect(() => {
813
+ if (!element) return void 0;
814
+ return _elementSizeObserver.subscribe(element, setSize);
815
+ }, [element]);
816
+ return size;
817
+ }
818
+ function useElementRect(element) {
819
+ const elementSize = useElementSize(element);
820
+ return (elementSize == null ? void 0 : elementSize._contentRect) || null;
821
+ }
822
+ function useGlobalKeyDown(onKeyDown) {
823
+ return useEffect(() => {
824
+ addEventListener("keydown", onKeyDown);
825
+ return () => removeEventListener("keydown", onKeyDown);
826
+ }, [onKeyDown]);
827
+ }
3210
828
  const DEFAULT_THEME_LAYER = {
3211
829
  dialog: {
3212
830
  zOffset: 600
@@ -3275,7 +893,7 @@ function ThemeProvider(props) {
3275
893
  });
3276
894
  }
3277
895
  function isRecord(value) {
3278
- return Boolean(value && typeof value === "object");
896
+ return Boolean(value && typeof value === "object" && !Array.isArray(value));
3279
897
  }
3280
898
  function useRootTheme() {
3281
899
  const value = useContext(ThemeContext);
@@ -3438,20 +1056,22 @@ function useCustomValidity(ref, customValidity) {
3438
1056
  }
3439
1057
  }, [customValidity, ref]);
3440
1058
  }
3441
- const BORDER_VALUE = "1px solid var(--card-border-color)";
3442
1059
  function responsiveBorderStyle() {
3443
1060
  return [border, borderTop, borderRight, borderBottom, borderLeft];
3444
1061
  }
3445
1062
  function border(props) {
1063
+ var _a, _b;
3446
1064
  const {
3447
1065
  theme
3448
1066
  } = props;
3449
1067
  const {
1068
+ card,
3450
1069
  media
3451
1070
  } = theme.sanity;
1071
+ const borderStyle = "".concat((_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1, "px solid var(--card-border-color)");
3452
1072
  return _responsive(media, props.$border, value => value ? {
3453
1073
  "&&": {
3454
- border: BORDER_VALUE
1074
+ border: borderStyle
3455
1075
  }
3456
1076
  } : {
3457
1077
  "&&": {
@@ -3460,15 +1080,18 @@ function border(props) {
3460
1080
  });
3461
1081
  }
3462
1082
  function borderTop(props) {
1083
+ var _a, _b;
3463
1084
  const {
3464
1085
  theme
3465
1086
  } = props;
3466
1087
  const {
1088
+ card,
3467
1089
  media
3468
1090
  } = theme.sanity;
1091
+ const borderStyle = "".concat((_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1, "px solid var(--card-border-color)");
3469
1092
  return _responsive(media, props.$borderTop, value => value ? {
3470
1093
  "&&": {
3471
- borderTop: BORDER_VALUE
1094
+ borderTop: borderStyle
3472
1095
  }
3473
1096
  } : {
3474
1097
  "&&": {
@@ -3477,15 +1100,18 @@ function borderTop(props) {
3477
1100
  });
3478
1101
  }
3479
1102
  function borderRight(props) {
1103
+ var _a, _b;
3480
1104
  const {
3481
1105
  theme
3482
1106
  } = props;
3483
1107
  const {
1108
+ card,
3484
1109
  media
3485
1110
  } = theme.sanity;
1111
+ const borderStyle = "".concat((_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1, "px solid var(--card-border-color)");
3486
1112
  return _responsive(media, props.$borderRight, value => value ? {
3487
1113
  "&&": {
3488
- borderRight: BORDER_VALUE
1114
+ borderRight: borderStyle
3489
1115
  }
3490
1116
  } : {
3491
1117
  "&&": {
@@ -3494,15 +1120,18 @@ function borderRight(props) {
3494
1120
  });
3495
1121
  }
3496
1122
  function borderBottom(props) {
1123
+ var _a, _b;
3497
1124
  const {
3498
1125
  theme
3499
1126
  } = props;
3500
1127
  const {
1128
+ card,
3501
1129
  media
3502
1130
  } = theme.sanity;
1131
+ const borderStyle = "".concat((_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1, "px solid var(--card-border-color)");
3503
1132
  return _responsive(media, props.$borderBottom, value => value ? {
3504
1133
  "&&": {
3505
- borderBottom: BORDER_VALUE
1134
+ borderBottom: borderStyle
3506
1135
  }
3507
1136
  } : {
3508
1137
  "&&": {
@@ -3511,15 +1140,18 @@ function borderBottom(props) {
3511
1140
  });
3512
1141
  }
3513
1142
  function borderLeft(props) {
1143
+ var _a, _b;
3514
1144
  const {
3515
1145
  theme
3516
1146
  } = props;
3517
1147
  const {
1148
+ card,
3518
1149
  media
3519
1150
  } = theme.sanity;
1151
+ const borderStyle = "".concat((_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1, "px solid var(--card-border-color)");
3520
1152
  return _responsive(media, props.$borderLeft, value => value ? {
3521
1153
  "&&": {
3522
- borderLeft: BORDER_VALUE
1154
+ borderLeft: borderStyle
3523
1155
  }
3524
1156
  } : {
3525
1157
  "&&": {
@@ -3952,7 +1584,7 @@ var __defProp$E = Object.defineProperty;
3952
1584
  var __template$D = (cooked, raw) => __freeze$D(__defProp$E(cooked, "raw", {
3953
1585
  value: __freeze$D(raw || cooked.slice())
3954
1586
  }));
3955
- var _a$D, _b$m, _c$d;
1587
+ var _a$D, _b$n, _c$c;
3956
1588
  const ROOT_STYLE = css(_a$D || (_a$D = __template$D(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));
3957
1589
  function textInputRootStyle() {
3958
1590
  return ROOT_STYLE;
@@ -3966,7 +1598,7 @@ function textInputBaseStyle(props) {
3966
1598
  } = props;
3967
1599
  const font = theme.sanity.fonts.text;
3968
1600
  const color = theme.sanity.color.input;
3969
- return css(_b$m || (_b$m = __template$D(["\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ", ";\n font-weight: ", ";\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome\u2019s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='", "'][data-tone='", "'] {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n }\n "])), font.family, $weight && font.weights[$weight] || font.weights.regular, $scheme, $tone, color.default.enabled.fg, color.default.enabled.placeholder, color.default.enabled.fg, color.default.enabled.placeholder, color.default.disabled.fg, color.default.disabled.placeholder, color.invalid.enabled.fg, color.invalid.enabled.placeholder, color.default.readOnly.fg, color.default.readOnly.placeholder);
1601
+ return css(_b$n || (_b$n = __template$D(["\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ", ";\n font-weight: ", ";\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome\u2019s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='", "'][data-tone='", "'] {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n }\n "])), font.family, $weight && font.weights[$weight] || font.weights.regular, $scheme, $tone, color.default.enabled.fg, color.default.enabled.placeholder, color.default.enabled.fg, color.default.enabled.placeholder, color.default.disabled.fg, color.default.disabled.placeholder, color.invalid.enabled.fg, color.invalid.enabled.placeholder, color.default.readOnly.fg, color.default.readOnly.placeholder);
3970
1602
  }
3971
1603
  function textInputFontSizeStyle(props) {
3972
1604
  const {
@@ -3990,6 +1622,7 @@ function textInputRepresentationStyle(props) {
3990
1622
  $hasSuffix,
3991
1623
  $scheme,
3992
1624
  $tone,
1625
+ $unstableDisableFocusRing,
3993
1626
  theme
3994
1627
  } = props;
3995
1628
  const {
@@ -3999,19 +1632,19 @@ function textInputRepresentationStyle(props) {
3999
1632
  focusRing
4000
1633
  } = input.text;
4001
1634
  const color = theme.sanity.color.input;
4002
- return css(_c$d || (_c$d = __template$D(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n\n &[data-scheme='", "'][data-tone='", "'] {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ", ";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ", ";\n }\n\n &:not([data-border]) {\n --input-box-shadow: ", ";\n }\n }\n\n /* disabled */\n *:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* readOnly */\n *:read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n }\n "])), $hasPrefix ? 0 : void 0, $hasPrefix ? 0 : void 0, $hasSuffix ? 0 : void 0, $hasSuffix ? 0 : void 0, $scheme, $tone, color.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
1635
+ return css(_c$c || (_c$c = __template$D(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n\n &[data-scheme='", "'][data-tone='", "'] {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ", ";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ", ";\n }\n\n &:not([data-border]) {\n --input-box-shadow: ", ";\n }\n }\n\n /* disabled */\n *:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* readOnly */\n *:read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n }\n "])), $hasPrefix ? 0 : void 0, $hasPrefix ? 0 : void 0, $hasSuffix ? 0 : void 0, $hasSuffix ? 0 : void 0, $scheme, $tone, color.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
4003
1636
  color: color.default.enabled.border,
4004
1637
  width: input.border.width
4005
1638
  }), color.invalid.enabled.bg, color.invalid.enabled.fg, focusRingBorderStyle({
4006
1639
  color: color.invalid.enabled.border,
4007
1640
  width: input.border.width
4008
- }), focusRingStyle({
1641
+ }), $unstableDisableFocusRing ? void 0 : focusRingStyle({
4009
1642
  border: {
4010
1643
  color: color.default.enabled.border,
4011
1644
  width: input.border.width
4012
1645
  },
4013
1646
  focusRing
4014
- }), focusRingStyle({
1647
+ }), $unstableDisableFocusRing ? void 0 : focusRingStyle({
4015
1648
  focusRing
4016
1649
  }), color.default.disabled.bg, color.default.disabled.fg, focusRingBorderStyle({
4017
1650
  color: color.default.disabled.border,
@@ -4058,8 +1691,9 @@ function toBoxShadow(shadow, color) {
4058
1691
  return "".concat(shadow.map(rem).join(" "), " ").concat(color);
4059
1692
  }
4060
1693
  function shadowStyle(shadow) {
1694
+ let outlineWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
4061
1695
  if (!shadow) return EMPTY_RECORD;
4062
- const outline = "0 0 0 ".concat(rem(1), " var(--card-shadow-outline-color)");
1696
+ const outline = "0 0 0 ".concat(rem(outlineWidth), " var(--card-shadow-outline-color)");
4063
1697
  const umbra = toBoxShadow(shadow.umbra, "var(--card-shadow-umbra-color)");
4064
1698
  const penumbra = toBoxShadow(shadow.penumbra, "var(--card-shadow-penumbra-color)");
4065
1699
  const ambient = toBoxShadow(shadow.ambient, "var(--card-shadow-ambient-color)");
@@ -4072,27 +1706,28 @@ function responsiveShadowStyle(props) {
4072
1706
  theme
4073
1707
  } = props;
4074
1708
  const {
1709
+ card,
4075
1710
  media,
4076
1711
  shadows
4077
1712
  } = theme.sanity;
4078
- return _responsive(media, props.$shadow, shadow => shadowStyle(shadows[shadow]));
1713
+ return _responsive(media, props.$shadow, shadow => shadowStyle(shadows[shadow], card.shadow.outline));
4079
1714
  }
4080
1715
  var __freeze$C = Object.freeze;
4081
1716
  var __defProp$D = Object.defineProperty;
4082
1717
  var __template$C = (cooked, raw) => __freeze$C(__defProp$D(cooked, "raw", {
4083
1718
  value: __freeze$C(raw || cooked.slice())
4084
1719
  }));
4085
- var _a$C, _b$l, _c$c;
4086
- function textBaseStyle(props) {
1720
+ var _a$C, _b$m, _c$b;
1721
+ function labelBaseStyle(props) {
4087
1722
  const {
4088
1723
  $accent,
4089
1724
  $muted,
4090
1725
  theme
4091
1726
  } = props;
4092
1727
  const {
4093
- weights
4094
- } = theme.sanity.fonts.text;
4095
- return css(_c$c || (_c$c = __template$C(["\n color: var(--card-fg-color);\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ", ";\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n color: var(--card-icon-color);\n }\n "])), $accent && css(_a$C || (_a$C = __template$C(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$l || (_b$l = __template$C(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family, weights.bold);
1728
+ fonts
1729
+ } = theme.sanity;
1730
+ return css(_c$b || (_c$b = __template$C(["\n text-transform: uppercase;\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_a$C || (_a$C = __template$C(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$m || (_b$m = __template$C(["\n color: var(--card-muted-fg-color);\n "]))), fonts.code.family);
4096
1731
  }
4097
1732
  var __freeze$B = Object.freeze;
4098
1733
  var __defProp$C = Object.defineProperty;
@@ -4100,11 +1735,11 @@ var __template$B = (cooked, raw) => __freeze$B(__defProp$C(cooked, "raw", {
4100
1735
  value: __freeze$B(raw || cooked.slice())
4101
1736
  }));
4102
1737
  var _a$B;
4103
- const Root$E = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
1738
+ const Root$D = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
4104
1739
  const SpanWithTextOverflow$2 = styled.span(_a$B || (_a$B = __template$B(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
4105
- const Text = forwardRef(function Text2(props, ref) {
1740
+ const Label = forwardRef(function Label2(props, ref) {
4106
1741
  const {
4107
- accent = false,
1742
+ accent,
4108
1743
  align,
4109
1744
  children: childrenProp,
4110
1745
  muted = false,
@@ -4118,19 +1753,21 @@ const Text = forwardRef(function Text2(props, ref) {
4118
1753
  children = /* @__PURE__ */jsx(SpanWithTextOverflow$2, {
4119
1754
  children
4120
1755
  });
1756
+ } else {
1757
+ children = /* @__PURE__ */jsx("span", {
1758
+ children
1759
+ });
4121
1760
  }
4122
- return /* @__PURE__ */jsx(Root$E, {
4123
- "data-ui": "Text",
1761
+ return /* @__PURE__ */jsx(Root$D, {
1762
+ "data-ui": "Label",
4124
1763
  ...restProps,
4125
1764
  $accent: accent,
4126
1765
  $align: useArrayProp(align),
4127
1766
  $muted: muted,
4128
- ref,
4129
1767
  $size: useArrayProp(size),
4130
1768
  $weight: weight,
4131
- children: /* @__PURE__ */jsx("span", {
4132
- children
4133
- })
1769
+ ref,
1770
+ children
4134
1771
  });
4135
1772
  });
4136
1773
  const avatarStyle = {
@@ -4138,7 +1775,8 @@ const avatarStyle = {
4138
1775
  arrow: avatarArrowStyle,
4139
1776
  bgStroke: avatarBgStrokeStyle,
4140
1777
  stroke: avatarStrokeStyle,
4141
- initials: avatarInitialsStyle
1778
+ initials: avatarInitialsStyle,
1779
+ image: avatarImageStyle
4142
1780
  };
4143
1781
  function avatarArrowStyle() {
4144
1782
  return {
@@ -4179,6 +1817,7 @@ function avatarArrowStyle() {
4179
1817
  };
4180
1818
  }
4181
1819
  function avatarRootStyle(props) {
1820
+ var _a, _b, _c, _d;
4182
1821
  const {
4183
1822
  $color,
4184
1823
  theme
@@ -4187,7 +1826,9 @@ function avatarRootStyle(props) {
4187
1826
  focusRing
4188
1827
  } = theme.sanity.avatar;
4189
1828
  return {
4190
- backgroundColor: $color,
1829
+ "--avatar-bg-color": ((_b = (_a = theme.sanity.color.avatar) == null ? void 0 : _a[$color]) == null ? void 0 : _b.bg) || theme.sanity.color.spot[$color],
1830
+ "--avatar-fg-color": ((_d = (_c = theme.sanity.color.avatar) == null ? void 0 : _c[$color]) == null ? void 0 : _d.fg) || "var(--card-bg-color)",
1831
+ backgroundColor: "var(--avatar-bg-color)",
4191
1832
  position: "relative",
4192
1833
  boxSizing: "border-box",
4193
1834
  userSelect: "none",
@@ -4245,17 +1886,16 @@ function responsiveAvatarSizeStyle(props) {
4245
1886
  };
4246
1887
  });
4247
1888
  }
4248
- function avatarInitialsStyle(props) {
4249
- const {
4250
- theme
4251
- } = props;
4252
- const {
4253
- base
4254
- } = theme.sanity.color;
1889
+ function avatarImageStyle() {
1890
+ return {
1891
+ position: "relative"
1892
+ };
1893
+ }
1894
+ function avatarInitialsStyle() {
4255
1895
  return {
4256
1896
  width: "100%",
4257
1897
  height: "100%",
4258
- color: base.fg,
1898
+ color: "var(--avatar-fg-color)",
4259
1899
  alignItems: "center",
4260
1900
  justifyContent: "center",
4261
1901
  textTransform: "uppercase",
@@ -4274,22 +1914,28 @@ function avatarBgStrokeStyle() {
4274
1914
  }
4275
1915
  function avatarStrokeStyle() {
4276
1916
  return {
4277
- strokeWidth: "3px",
1917
+ strokeWidth: "2px",
1918
+ stroke: "var(--avatar-bg-color)",
4278
1919
  '[data-status="editing"] &': {
4279
1920
  strokeDasharray: "2 4",
4280
1921
  strokeLinecap: "round"
4281
1922
  }
4282
1923
  };
4283
1924
  }
4284
- const Root$D = styled.div(responsiveAvatarSizeStyle, avatarStyle.root);
4285
- const Arrow = styled.div(avatarStyle.arrow);
1925
+ const Root$C = styled.div(responsiveAvatarSizeStyle, avatarStyle.root);
1926
+ const Arrow$1 = styled.div(avatarStyle.arrow);
4286
1927
  const BgStroke = styled.ellipse(avatarStyle.bgStroke);
4287
1928
  const Stroke = styled.ellipse(avatarStyle.stroke);
4288
1929
  const Initials = styled.div(avatarStyle.initials);
1930
+ const InitialsLabel = styled(Label)({
1931
+ color: "inherit"
1932
+ });
1933
+ const Image = styled.svg(avatarStyle.image);
4289
1934
  const Avatar = forwardRef(function Avatar2(props, ref) {
4290
1935
  const {
1936
+ __unstable_hideInnerStroke,
4291
1937
  as: asProp,
4292
- color: colorKey = "gray",
1938
+ color = "gray",
4293
1939
  src,
4294
1940
  title,
4295
1941
  initials,
@@ -4303,7 +1949,6 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
4303
1949
  const as = ReactIs.isValidElementType(asProp) ? asProp : "div";
4304
1950
  const size = useArrayProp(sizeProp);
4305
1951
  const theme = useTheme();
4306
- const color = theme.sanity.color.spot[colorKey] || theme.sanity.color.spot.gray;
4307
1952
  const avatarSize = theme.sanity.avatar.sizes[size[0]] || theme.sanity.avatar.sizes[0];
4308
1953
  const _sizeRem = avatarSize.size;
4309
1954
  const _radius = _sizeRem / 2;
@@ -4325,20 +1970,20 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
4325
1970
  onImageLoadError(new Error("Avatar: the image failed to load"));
4326
1971
  }
4327
1972
  }, [onImageLoadError]);
4328
- const initialsSize = useMemo(() => size.map(s => s === 0 ? 0 : s + 1), [size]);
4329
- return /* @__PURE__ */jsxs(Root$D, {
1973
+ const initialsSize = useMemo(() => size.map(s => s === 0 ? 0 : s * 2), [size]);
1974
+ return /* @__PURE__ */jsxs(Root$C, {
4330
1975
  as,
4331
1976
  "data-as": typeof as === "string" ? as : void 0,
4332
1977
  "data-ui": "Avatar",
4333
1978
  ...restProps,
4334
- $size: size,
4335
1979
  $color: color,
1980
+ $size: size,
4336
1981
  "aria-label": title,
4337
1982
  "data-arrow-position": arrowPosition,
4338
1983
  "data-status": status,
4339
1984
  ref,
4340
1985
  title,
4341
- children: [/* @__PURE__ */jsx(Arrow, {
1986
+ children: [/* @__PURE__ */jsx(Arrow$1, {
4342
1987
  children: /* @__PURE__ */jsx("svg", {
4343
1988
  width: "11",
4344
1989
  height: "7",
@@ -4349,7 +1994,7 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
4349
1994
  fill: color
4350
1995
  })
4351
1996
  })
4352
- }), !imageFailed && src && /* @__PURE__ */jsxs("svg", {
1997
+ }), !imageFailed && src && /* @__PURE__ */jsxs(Image, {
4353
1998
  viewBox: "0 0 ".concat(_sizeRem, " ").concat(_sizeRem),
4354
1999
  fill: "none",
4355
2000
  children: [/* @__PURE__ */jsx("defs", {
@@ -4370,7 +2015,7 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
4370
2015
  cy: _radius,
4371
2016
  r: _radius,
4372
2017
  fill: "url(#".concat(imageId, ")")
4373
- }), /* @__PURE__ */jsx(BgStroke, {
2018
+ }), !__unstable_hideInnerStroke && /* @__PURE__ */jsx(BgStroke, {
4374
2019
  cx: _radius,
4375
2020
  cy: _radius,
4376
2021
  rx: _radius,
@@ -4381,17 +2026,14 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
4381
2026
  cy: _radius,
4382
2027
  rx: _radius,
4383
2028
  ry: _radius,
4384
- stroke: color,
4385
2029
  vectorEffect: "non-scaling-stroke"
4386
2030
  })]
4387
2031
  }), (imageFailed || !src) && initials && /* @__PURE__ */jsx(Fragment, {
4388
2032
  children: /* @__PURE__ */jsx(Initials, {
4389
- children: /* @__PURE__ */jsx(Text, {
4390
- as: "span",
2033
+ children: /* @__PURE__ */jsx(InitialsLabel, {
2034
+ forwardedAs: "span",
4391
2035
  size: initialsSize,
4392
- children: /* @__PURE__ */jsx("strong", {
4393
- children: initials
4394
- })
2036
+ children: initials
4395
2037
  })
4396
2038
  })
4397
2039
  })]
@@ -4402,7 +2044,63 @@ var __defProp$B = Object.defineProperty;
4402
2044
  var __template$A = (cooked, raw) => __freeze$A(__defProp$B(cooked, "raw", {
4403
2045
  value: __freeze$A(raw || cooked.slice())
4404
2046
  }));
4405
- var _a$A;
2047
+ var _a$A, _b$l, _c$a;
2048
+ function textBaseStyle(props) {
2049
+ const {
2050
+ $accent,
2051
+ $muted,
2052
+ theme
2053
+ } = props;
2054
+ const {
2055
+ weights
2056
+ } = theme.sanity.fonts.text;
2057
+ return css(_c$a || (_c$a = __template$A(["\n color: var(--card-fg-color);\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ", ";\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n color: var(--card-icon-color);\n }\n "])), $accent && css(_a$A || (_a$A = __template$A(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$l || (_b$l = __template$A(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family, weights.bold);
2058
+ }
2059
+ var __freeze$z = Object.freeze;
2060
+ var __defProp$A = Object.defineProperty;
2061
+ var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
2062
+ value: __freeze$z(raw || cooked.slice())
2063
+ }));
2064
+ var _a$z;
2065
+ const Root$B = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
2066
+ const SpanWithTextOverflow$1 = styled.span(_a$z || (_a$z = __template$z(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
2067
+ const Text = forwardRef(function Text2(props, ref) {
2068
+ const {
2069
+ accent = false,
2070
+ align,
2071
+ children: childrenProp,
2072
+ muted = false,
2073
+ size = 2,
2074
+ textOverflow,
2075
+ weight,
2076
+ ...restProps
2077
+ } = props;
2078
+ let children = childrenProp;
2079
+ if (textOverflow === "ellipsis") {
2080
+ children = /* @__PURE__ */jsx(SpanWithTextOverflow$1, {
2081
+ children
2082
+ });
2083
+ }
2084
+ return /* @__PURE__ */jsx(Root$B, {
2085
+ "data-ui": "Text",
2086
+ ...restProps,
2087
+ $accent: accent,
2088
+ $align: useArrayProp(align),
2089
+ $muted: muted,
2090
+ ref,
2091
+ $size: useArrayProp(size),
2092
+ $weight: weight,
2093
+ children: /* @__PURE__ */jsx("span", {
2094
+ children
2095
+ })
2096
+ });
2097
+ });
2098
+ var __freeze$y = Object.freeze;
2099
+ var __defProp$z = Object.defineProperty;
2100
+ var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
2101
+ value: __freeze$y(raw || cooked.slice())
2102
+ }));
2103
+ var _a$y;
4406
2104
  function _responsiveAvatarCounterSizeStyle(props) {
4407
2105
  const {
4408
2106
  theme
@@ -4425,9 +2123,9 @@ function _avatarCounterBaseStyle(props) {
4425
2123
  const {
4426
2124
  theme
4427
2125
  } = props;
4428
- return css(_a$A || (_a$A = __template$A(["\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n user-select: none;\n color: inherit;\n color: var(--card-fg-color);\n background: var(--card-bg-color);\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n inset 0 0 0 1.5px var(--card-hairline-hard-color);\n padding: 0 ", ";\n\n &:not([hidden]) {\n display: flex;\n }\n "])), rem(theme.sanity.space[2]));
2126
+ return css(_a$y || (_a$y = __template$y(["\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n user-select: none;\n color: inherit;\n color: var(--card-fg-color);\n background: var(--card-bg-color);\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n inset 0 0 0 1px var(--card-hairline-hard-color);\n padding: 0 ", ";\n\n &:not([hidden]) {\n display: flex;\n }\n "])), rem(theme.sanity.space[2]));
4429
2127
  }
4430
- const Root$C = styled.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
2128
+ const Root$A = styled.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
4431
2129
  const AvatarCounter = forwardRef(function AvatarCounter2(props, ref) {
4432
2130
  const {
4433
2131
  count,
@@ -4435,16 +2133,15 @@ const AvatarCounter = forwardRef(function AvatarCounter2(props, ref) {
4435
2133
  } = props;
4436
2134
  const size = useArrayProp(sizeProp);
4437
2135
  const counterSize = useMemo(() => size.map(s => s === 0 ? 0 : s + 1), [size]);
4438
- return /* @__PURE__ */jsx(Root$C, {
2136
+ return /* @__PURE__ */jsx(Root$A, {
4439
2137
  $size: size,
4440
2138
  "data-ui": "AvatarCounter",
4441
2139
  ref,
4442
2140
  children: /* @__PURE__ */jsx(Text, {
4443
2141
  as: "span",
4444
2142
  size: counterSize,
4445
- children: /* @__PURE__ */jsx("strong", {
4446
- children: count
4447
- })
2143
+ weight: "medium",
2144
+ children: count
4448
2145
  })
4449
2146
  });
4450
2147
  });
@@ -4452,13 +2149,13 @@ function childrenToElementArray(children) {
4452
2149
  const childrenArray = Array.isArray(children) ? children : [children];
4453
2150
  return childrenArray.filter(node => isElement$1(node) || isFragment(node) || typeof node === "string");
4454
2151
  }
4455
- var __freeze$z = Object.freeze;
4456
- var __defProp$A = Object.defineProperty;
4457
- var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
4458
- value: __freeze$z(raw || cooked.slice())
2152
+ var __freeze$x = Object.freeze;
2153
+ var __defProp$y = Object.defineProperty;
2154
+ var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
2155
+ value: __freeze$x(raw || cooked.slice())
4459
2156
  }));
4460
- var _a$z;
4461
- const BASE_STYLES = css(_a$z || (_a$z = __template$z(["\n white-space: nowrap;\n\n & > div {\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n }\n"])));
2157
+ var _a$x;
2158
+ const BASE_STYLES = css(_a$x || (_a$x = __template$x(["\n white-space: nowrap;\n\n & > div {\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n }\n"])));
4462
2159
  function avatarStackStyle() {
4463
2160
  return BASE_STYLES;
4464
2161
  }
@@ -4480,7 +2177,7 @@ function responsiveAvatarStackSizeStyle(props) {
4480
2177
  };
4481
2178
  });
4482
2179
  }
4483
- const Root$B = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle);
2180
+ const Root$z = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle);
4484
2181
  const AvatarStack = forwardRef(function AvatarStack2(props, ref) {
4485
2182
  const {
4486
2183
  children: childrenProp,
@@ -4495,7 +2192,7 @@ const AvatarStack = forwardRef(function AvatarStack2(props, ref) {
4495
2192
  const visibleCount = maxLength - 1;
4496
2193
  const extraCount = len - visibleCount;
4497
2194
  const visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
4498
- return /* @__PURE__ */jsxs(Root$B, {
2195
+ return /* @__PURE__ */jsxs(Root$z, {
4499
2196
  "data-ui": "AvatarStack",
4500
2197
  ...restProps,
4501
2198
  ref,
@@ -4516,7 +2213,7 @@ const AvatarStack = forwardRef(function AvatarStack2(props, ref) {
4516
2213
  }, String(childIndex)))]
4517
2214
  });
4518
2215
  });
4519
- const Root$A = styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle);
2216
+ const Root$y = styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle);
4520
2217
  const Box = forwardRef(function Box2(props, ref) {
4521
2218
  const {
4522
2219
  as: asProp = "div",
@@ -4547,7 +2244,7 @@ const Box = forwardRef(function Box2(props, ref) {
4547
2244
  sizing,
4548
2245
  ...restProps
4549
2246
  } = props;
4550
- return /* @__PURE__ */jsx(Root$A, {
2247
+ return /* @__PURE__ */jsx(Root$y, {
4551
2248
  "data-as": typeof asProp === "string" ? asProp : void 0,
4552
2249
  "data-ui": "Box",
4553
2250
  ...restProps,
@@ -4581,108 +2278,50 @@ const Box = forwardRef(function Box2(props, ref) {
4581
2278
  children: props.children
4582
2279
  });
4583
2280
  });
4584
- var __freeze$y = Object.freeze;
4585
- var __defProp$z = Object.defineProperty;
4586
- var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
4587
- value: __freeze$y(raw || cooked.slice())
4588
- }));
4589
- var _a$y, _b$k, _c$b;
4590
- function labelBaseStyle(props) {
4591
- const {
4592
- $accent,
4593
- $muted,
4594
- theme
4595
- } = props;
4596
- const {
4597
- fonts
4598
- } = theme.sanity;
4599
- return css(_c$b || (_c$b = __template$y(["\n text-transform: uppercase;\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_a$y || (_a$y = __template$y(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$k || (_b$k = __template$y(["\n color: var(--card-muted-fg-color);\n "]))), fonts.code.family);
4600
- }
4601
- var __freeze$x = Object.freeze;
4602
- var __defProp$y = Object.defineProperty;
4603
- var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
4604
- value: __freeze$x(raw || cooked.slice())
4605
- }));
4606
- var _a$x;
4607
- const Root$z = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
4608
- const SpanWithTextOverflow$1 = styled.span(_a$x || (_a$x = __template$x(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
4609
- const Label = forwardRef(function Label2(props, ref) {
4610
- const {
4611
- accent,
4612
- align,
4613
- children: childrenProp,
4614
- muted = false,
4615
- size = 2,
4616
- textOverflow,
4617
- weight,
4618
- ...restProps
4619
- } = props;
4620
- let children = childrenProp;
4621
- if (textOverflow === "ellipsis") {
4622
- children = /* @__PURE__ */jsx(SpanWithTextOverflow$1, {
4623
- children
4624
- });
4625
- } else {
4626
- children = /* @__PURE__ */jsx("span", {
4627
- children
4628
- });
4629
- }
4630
- return /* @__PURE__ */jsx(Root$z, {
4631
- "data-ui": "Label",
4632
- ...restProps,
4633
- $accent: accent,
4634
- $align: useArrayProp(align),
4635
- $muted: muted,
4636
- $size: useArrayProp(size),
4637
- $weight: weight,
4638
- ref,
4639
- children
4640
- });
4641
- });
4642
2281
  function badgeStyle(props) {
2282
+ var _a;
4643
2283
  const {
4644
- $mode,
4645
2284
  $tone,
4646
2285
  theme
4647
2286
  } = props;
4648
- const palette = theme.sanity.color[$mode === "outline" ? "muted" : "solid"];
4649
- const color = palette[$tone] || palette.default;
2287
+ const color = ((_a = theme.sanity.color.badge) == null ? void 0 : _a[$tone]) || theme.sanity.color.muted[$tone].enabled;
4650
2288
  return {
4651
- backgroundColor: color.enabled.bg,
4652
- color: color.enabled.fg,
4653
- boxShadow: "inset 0 0 0 1px ".concat(color.enabled.border),
2289
+ "--card-bg-color": color.bg,
2290
+ "--card-fg-color": color.fg,
2291
+ backgroundColor: "var(--card-bg-color)",
4654
2292
  cursor: "default",
4655
2293
  "&:not([hidden])": {
4656
2294
  display: "inline-block"
4657
2295
  }
4658
2296
  };
4659
2297
  }
4660
- const Root$y = styled(Box)(responsiveRadiusStyle, badgeStyle);
2298
+ const Root$x = styled(Box)(responsiveRadiusStyle, badgeStyle);
4661
2299
  const Badge = forwardRef(function Badge2(props, ref) {
4662
2300
  const {
4663
2301
  children,
4664
- fontSize,
4665
- mode = "default",
2302
+ fontSize = 1,
2303
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2304
+ mode: _deprecated_mode,
4666
2305
  padding = 1,
4667
2306
  radius = 2,
4668
2307
  tone = "default",
4669
2308
  ...restProps
4670
2309
  } = props;
4671
- return /* @__PURE__ */jsx(Root$y, {
2310
+ return /* @__PURE__ */jsx(Root$x, {
4672
2311
  "data-ui": "Badge",
4673
2312
  ...restProps,
4674
- $mode: mode,
4675
2313
  $tone: tone,
4676
2314
  $radius: useArrayProp(radius),
4677
2315
  padding: useArrayProp(padding),
4678
2316
  ref,
4679
- children: /* @__PURE__ */jsx(Label, {
2317
+ children: /* @__PURE__ */jsx(Text, {
4680
2318
  size: fontSize,
2319
+ weight: "medium",
4681
2320
  children
4682
2321
  })
4683
2322
  });
4684
2323
  });
4685
- const Root$x = styled(Box)(flexItemStyle, responsiveFlexStyle);
2324
+ const Root$w = styled(Box)(flexItemStyle, responsiveFlexStyle);
4686
2325
  const Flex = forwardRef(function Flex2(props, ref) {
4687
2326
  const {
4688
2327
  align,
@@ -4696,7 +2335,7 @@ const Flex = forwardRef(function Flex2(props, ref) {
4696
2335
  return (
4697
2336
  // @ts-expect-error -- some dollar prefixed typings aren't inferred correctly https://github.com/styled-components/styled-components/issues/4062
4698
2337
  /* @__PURE__ */
4699
- jsx(Root$x, {
2338
+ jsx(Root$w, {
4700
2339
  "data-ui": "Flex",
4701
2340
  ...restProps,
4702
2341
  $align: useArrayProp(align),
@@ -4714,11 +2353,11 @@ var __defProp$x = Object.defineProperty;
4714
2353
  var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
4715
2354
  value: __freeze$w(raw || cooked.slice())
4716
2355
  }));
4717
- var _a$w, _b$j;
2356
+ var _a$w, _b$k;
4718
2357
  const rotate$1 = keyframes(_a$w || (_a$w = __template$w(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
4719
- const Root$w = styled(Text)(_b$j || (_b$j = __template$w(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
2358
+ const Root$v = styled(Text)(_b$k || (_b$k = __template$w(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
4720
2359
  const Spinner = forwardRef(function Spinner2(props, ref) {
4721
- return /* @__PURE__ */jsx(Root$w, {
2360
+ return /* @__PURE__ */jsx(Root$v, {
4722
2361
  "data-ui": "Spinner",
4723
2362
  ...props,
4724
2363
  ref,
@@ -4736,7 +2375,7 @@ function _colorVarsStyle(base, color) {
4736
2375
  "--card-shadow-penumbra-color": base.shadow.penumbra,
4737
2376
  "--card-shadow-ambient-color": base.shadow.ambient,
4738
2377
  "--card-focus-ring-color": base.focusRing,
4739
- "--card-icon-color": color.iconColor,
2378
+ "--card-icon-color": color.icon,
4740
2379
  // Card
4741
2380
  "--card-bg-color": color.bg,
4742
2381
  "--card-bg2-color": color.bg2,
@@ -4761,16 +2400,17 @@ var __defProp$w = Object.defineProperty;
4761
2400
  var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
4762
2401
  value: __freeze$v(raw || cooked.slice())
4763
2402
  }));
4764
- var _a$v;
4765
- function buttonBaseStyles() {
4766
- return css(_a$v || (_a$v = __template$v(["\n -webkit-font-smoothing: inherit;\n appearance: none;\n display: inline-flex;\n align-items: center;\n font: inherit;\n border: 0;\n outline: none;\n user-select: none;\n text-decoration: none;\n border: 0;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n text-align: left;\n position: relative;\n\n & > span {\n display: block;\n flex: 1;\n min-width: 0;\n border-radius: inherit;\n }\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n "])));
2403
+ var _a$v, _b$j;
2404
+ function buttonBaseStyles(_ref2) {
2405
+ let {
2406
+ $width,
2407
+ theme
2408
+ } = _ref2;
2409
+ const {
2410
+ styles
2411
+ } = theme.sanity;
2412
+ return css(_b$j || (_b$j = __template$v(["\n ", ";\n\n -webkit-font-smoothing: inherit;\n appearance: none;\n display: inline-flex;\n align-items: center;\n font: inherit;\n border: 0;\n outline: none;\n user-select: none;\n text-decoration: none;\n border: 0;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n text-align: left;\n position: relative;\n vertical-align: top;\n\n ", "\n\n & > span {\n display: block;\n flex: 1;\n min-width: 0;\n border-radius: inherit;\n }\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n "])), styles == null ? void 0 : styles.button, $width === "fill" && css(_a$v || (_a$v = __template$v(["\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n "]))));
4767
2413
  }
4768
- const buttonTheme = {
4769
- border: {
4770
- width: 1
4771
- }
4772
- };
4773
- const defaultBoxShadow = "0px 2px 0px 0px rgba(112, 128, 155, 0.19);";
4774
2414
  function combineBoxShadow() {
4775
2415
  for (var _len = arguments.length, boxShadows = new Array(_len), _key = 0; _key < _len; _key++) {
4776
2416
  boxShadows[_key] = arguments[_key];
@@ -4778,15 +2418,13 @@ function combineBoxShadow() {
4778
2418
  return boxShadows.filter(Boolean).join(",");
4779
2419
  }
4780
2420
  function buttonColorStyles(props) {
4781
- var _a2, _b;
2421
+ var _a2, _b2;
4782
2422
  const {
4783
2423
  $mode,
4784
2424
  theme
4785
2425
  } = props;
4786
- const {
4787
- focusRing
4788
- } = theme.sanity.button;
4789
- const shadow = props.$mode !== "bleed";
2426
+ const buttonTheme = theme.sanity.button;
2427
+ const shadow = props.$mode === "ghost";
4790
2428
  const base = theme.sanity.color.base;
4791
2429
  const mode = theme.sanity.color.button[$mode] || theme.sanity.color.button.default;
4792
2430
  const color = mode[props.$tone] || mode.default;
@@ -4794,6 +2432,7 @@ function buttonColorStyles(props) {
4794
2432
  width: buttonTheme.border.width,
4795
2433
  color: "var(--card-border-color)"
4796
2434
  };
2435
+ const defaultBoxShadow = void 0;
4797
2436
  return [_colorVarsStyle(base, color.enabled), {
4798
2437
  backgroundColor: "var(--card-bg-color)",
4799
2438
  color: "var(--card-fg-color)",
@@ -4808,7 +2447,7 @@ function buttonColorStyles(props) {
4808
2447
  width: 2,
4809
2448
  color: base.bg
4810
2449
  },
4811
- focusRing
2450
+ focusRing: buttonTheme.focusRing
4812
2451
  })
4813
2452
  },
4814
2453
  "&:focus:not(:focus-visible)": {
@@ -4821,7 +2460,7 @@ function buttonColorStyles(props) {
4821
2460
  },
4822
2461
  "&[data-selected]": _colorVarsStyle(base, color.pressed)
4823
2462
  }
4824
- }, (_b = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.button) == null ? void 0 : _b.root].filter(Boolean);
2463
+ }, (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.button) == null ? void 0 : _b2.root].filter(Boolean);
4825
2464
  }
4826
2465
  var __freeze$u = Object.freeze;
4827
2466
  var __defProp$v = Object.defineProperty;
@@ -4829,7 +2468,7 @@ var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
4829
2468
  value: __freeze$u(raw || cooked.slice())
4830
2469
  }));
4831
2470
  var _a$u;
4832
- const Root$v = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
2471
+ const Root$u = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
4833
2472
  const LoadingBox = styled.div(_a$u || (_a$u = __template$u(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--card-bg-color);\n border-radius: inherit;\n z-index: 1;\n box-shadow: inherit;\n"])));
4834
2473
  const Button = forwardRef(function Button2(props, ref) {
4835
2474
  const {
@@ -4840,7 +2479,7 @@ const Button = forwardRef(function Button2(props, ref) {
4840
2479
  iconRight,
4841
2480
  justify: justifyProp = "center",
4842
2481
  loading,
4843
- mode = "default",
2482
+ mode = "ghost",
4844
2483
  padding: paddingProp = 3,
4845
2484
  paddingX: paddingXProp,
4846
2485
  paddingY: paddingYProp,
@@ -4856,6 +2495,7 @@ const Button = forwardRef(function Button2(props, ref) {
4856
2495
  tone = "default",
4857
2496
  type = "button",
4858
2497
  muted = false,
2498
+ width,
4859
2499
  ...restProps
4860
2500
  } = props;
4861
2501
  const justify = useArrayProp(justifyProp);
@@ -4879,7 +2519,7 @@ const Button = forwardRef(function Button2(props, ref) {
4879
2519
  paddingLeft,
4880
2520
  paddingRight
4881
2521
  }), [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight]);
4882
- return /* @__PURE__ */jsxs(Root$v, {
2522
+ return /* @__PURE__ */jsxs(Root$u, {
4883
2523
  "data-ui": "Button",
4884
2524
  ...restProps,
4885
2525
  $mode: mode,
@@ -4890,6 +2530,7 @@ const Button = forwardRef(function Button2(props, ref) {
4890
2530
  disabled: Boolean(loading || disabled),
4891
2531
  ref,
4892
2532
  type,
2533
+ $width: width,
4893
2534
  children: [Boolean(loading) && /* @__PURE__ */jsx(LoadingBox, {
4894
2535
  children: /* @__PURE__ */jsx(Spinner, {})
4895
2536
  }), (icon || text || iconRight) && /* @__PURE__ */jsx(Box, {
@@ -4929,7 +2570,7 @@ var __defProp$u = Object.defineProperty;
4929
2570
  var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
4930
2571
  value: __freeze$t(raw || cooked.slice())
4931
2572
  }));
4932
- var _a$t, _b$i, _c$a;
2573
+ var _a$t, _b$i, _c$9;
4933
2574
  function cardStyle(props) {
4934
2575
  return [cardBaseStyle(props), cardColorStyle(props)];
4935
2576
  }
@@ -4939,7 +2580,7 @@ function cardBaseStyle(props) {
4939
2580
  theme
4940
2581
  } = props;
4941
2582
  const space = theme.sanity.space;
4942
- return css(_b$i || (_b$i = __template$t(["\n ", "\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: 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 "])), $checkered && css(_a$t || (_a$t = __template$t(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])), space[3], space[3]));
2583
+ return css(_b$i || (_b$i = __template$t(["\n ", "\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n outline: none;\n text-decoration: none;\n }\n\n /* &:is(pre) */\n &[data-as='pre'] {\n font: inherit;\n }\n "])), $checkered && css(_a$t || (_a$t = __template$t(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])), space[3], space[3]));
4943
2584
  }
4944
2585
  function cardColorStyle(props) {
4945
2586
  var _a2, _b2;
@@ -4960,7 +2601,7 @@ function cardColorStyle(props) {
4960
2601
  width: 0,
4961
2602
  color: "var(--card-border-color)"
4962
2603
  };
4963
- return css(_c$a || (_c$a = __template$t(["\n color-scheme: ", ";\n\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus {\n --card-focus-ring-box-shadow: ", ";\n }\n\n &:focus:not(:focus-visible) {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n cursor: pointer;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus {\n --card-focus-ring-box-shadow: ", ";\n }\n\n &:focus:not(:focus-visible) {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n ", "\n "])), dark ? "dark" : "light", _colorVarsStyle(base, card.enabled, $checkered), _colorVarsStyle(base, card.disabled, $checkered), _colorVarsStyle(base, card.pressed, $checkered), _colorVarsStyle(base, card.selected, $checkered), _colorVarsStyle(base, card.hovered, $checkered), _colorVarsStyle(base, card.pressed, $checkered), $focusRing ? focusRingStyle({
2604
+ return css(_c$9 || (_c$9 = __template$t(["\n color-scheme: ", ";\n\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus {\n --card-focus-ring-box-shadow: ", ";\n }\n\n &:focus:not(:focus-visible) {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n cursor: pointer;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus {\n --card-focus-ring-box-shadow: ", ";\n }\n\n &:focus:not(:focus-visible) {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n ", "\n "])), dark ? "dark" : "light", _colorVarsStyle(base, card.enabled, $checkered), _colorVarsStyle(base, card.disabled, $checkered), _colorVarsStyle(base, card.pressed, $checkered), _colorVarsStyle(base, card.selected, $checkered), _colorVarsStyle(base, card.hovered, $checkered), _colorVarsStyle(base, card.pressed, $checkered), $focusRing ? focusRingStyle({
4964
2605
  base,
4965
2606
  border,
4966
2607
  focusRing
@@ -4970,7 +2611,7 @@ function cardColorStyle(props) {
4970
2611
  focusRing
4971
2612
  }) : void 0, $focusRing ? focusRingBorderStyle(border) : void 0, (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
4972
2613
  }
4973
- const Root$u = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
2614
+ const Root$t = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
4974
2615
  const Card = forwardRef(function Card2(props, ref) {
4975
2616
  const {
4976
2617
  __unstable_checkered: checkered = false,
@@ -4995,7 +2636,7 @@ const Card = forwardRef(function Card2(props, ref) {
4995
2636
  return /* @__PURE__ */jsx(ThemeColorProvider, {
4996
2637
  scheme,
4997
2638
  tone,
4998
- children: /* @__PURE__ */jsx(Root$u, {
2639
+ children: /* @__PURE__ */jsx(Root$t, {
4999
2640
  "data-as": typeof as === "string" ? as : void 0,
5000
2641
  "data-scheme": rootTheme.scheme,
5001
2642
  "data-ui": "Card",
@@ -5041,11 +2682,11 @@ function inputElementStyles(props) {
5041
2682
  const {
5042
2683
  focusRing
5043
2684
  } = input.checkbox;
5044
- return css(_b$h || (_b$h = __template$s(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n outline: none;\n opacity: 0;\n z-index: 1;\n padding: 0;\n margin: 0;\n\n & + span {\n position: relative;\n display: block;\n height: ", ";\n width: ", ";\n box-sizing: border-box;\n box-shadow: ", ";\n border-radius: ", ";\n line-height: 1;\n background-color: ", ";\n\n & > svg {\n display: block;\n position: absolute;\n opacity: 0;\n height: 100%;\n width: 100%;\n\n & > path {\n vector-effect: non-scaling-stroke;\n stroke-width: 1.2 !important;\n }\n }\n }\n &:checked + span {\n background: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n /* focus */\n &:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n /* focus when checked - uses a different offset */\n &:not(:disabled):focus:focus-visible&:checked + span {\n box-shadow: ", ";\n }\n\n &[data-error] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &[data-error]&:checked + span {\n background-color: ", ";\n color: ", ";\n }\n &[data-error]&:checked&:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n &:disabled + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &:disabled&:checked + span {\n background-color: ", ";\n }\n\n &[data-read-only] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &[data-read-only]&:checked + span {\n background-color: ", ";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])), rem(input.checkbox.size), rem(input.checkbox.size), focusRingBorderStyle({
2685
+ return css(_b$h || (_b$h = __template$s(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n outline: none;\n opacity: 0;\n z-index: 1;\n padding: 0;\n margin: 0;\n\n & + span {\n position: relative;\n display: block;\n height: ", ";\n width: ", ";\n box-sizing: border-box;\n box-shadow: ", ";\n border-radius: ", ";\n line-height: 1;\n background-color: ", ";\n\n & > svg {\n display: block;\n position: absolute;\n opacity: 0;\n height: 100%;\n width: 100%;\n\n & > path {\n vector-effect: non-scaling-stroke;\n stroke-width: 1.5px !important;\n }\n }\n }\n\n &:checked + span {\n background: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n /* focus */\n &:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n /* focus when checked - uses a different offset */\n &:not(:disabled):focus:focus-visible&:checked + span {\n box-shadow: ", ";\n }\n\n &[data-error] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &[data-error]&:checked + span {\n background-color: ", ";\n color: ", ";\n }\n &[data-error]&:checked&:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n &:disabled + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &:disabled&:checked + span {\n background-color: ", ";\n }\n\n &[data-read-only] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &[data-read-only]&:checked + span {\n background-color: ", ";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])), rem(input.checkbox.size), rem(input.checkbox.size), focusRingBorderStyle({
5045
2686
  color: color.default.enabled.border,
5046
2687
  width: input.border.width
5047
- }), rem(radius[2]), color.default.enabled.bg, color.default.enabled.bg2, focusRingBorderStyle({
5048
- color: color.default.enabled.bg2,
2688
+ }), rem(radius[2]), color.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
2689
+ color: color.default.enabled.fg,
5049
2690
  width: input.border.width
5050
2691
  }), color.default.enabled.bg, focusRingStyle({
5051
2692
  focusRing
@@ -5074,7 +2715,7 @@ function inputElementStyles(props) {
5074
2715
  color: color.default.readOnly.border
5075
2716
  }), color.default.readOnly.fg, color.default.readOnly.bg2);
5076
2717
  }
5077
- const Root$t = styled.div(checkboxBaseStyles);
2718
+ const Root$s = styled.div(checkboxBaseStyles);
5078
2719
  const Input$5 = styled.input(inputElementStyles);
5079
2720
  const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
5080
2721
  const {
@@ -5094,7 +2735,7 @@ const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
5094
2735
  ref.current.indeterminate = indeterminate || false;
5095
2736
  }
5096
2737
  }, [indeterminate, ref]);
5097
- return /* @__PURE__ */jsxs(Root$t, {
2738
+ return /* @__PURE__ */jsxs(Root$s, {
5098
2739
  className,
5099
2740
  "data-ui": "Checkbox",
5100
2741
  style,
@@ -5118,10 +2759,10 @@ var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
5118
2759
  value: __freeze$r(raw || cooked.slice())
5119
2760
  }));
5120
2761
  var _a$r;
5121
- function codeSyntaxHighlightingStyle(_ref20) {
2762
+ function codeSyntaxHighlightingStyle(_ref3) {
5122
2763
  let {
5123
2764
  theme
5124
- } = _ref20;
2765
+ } = _ref3;
5125
2766
  const color = theme.sanity.color.syntax;
5126
2767
  return {
5127
2768
  "&.atrule": {
@@ -5237,7 +2878,7 @@ function codeSyntaxHighlightingStyle(_ref20) {
5237
2878
  function codeBaseStyle() {
5238
2879
  return css(_a$r || (_a$r = __template$r(["\n color: var(--card-code-fg-color);\n\n & code {\n font-family: inherit;\n\n &.refractor .token {\n ", "\n }\n }\n\n & a {\n color: inherit;\n text-decoration: underline;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), codeSyntaxHighlightingStyle);
5239
2880
  }
5240
- const Root$s = styled.pre(codeBaseStyle, responsiveCodeFontStyle);
2881
+ const Root$r = styled.pre(codeBaseStyle, responsiveCodeFontStyle);
5241
2882
  const Code = forwardRef(function Code2(props, ref) {
5242
2883
  const {
5243
2884
  children,
@@ -5248,7 +2889,7 @@ const Code = forwardRef(function Code2(props, ref) {
5248
2889
  } = props;
5249
2890
  const language = typeof languageProp === "string" ? languageProp : void 0;
5250
2891
  const registered = language ? Refractor.hasLanguage(language) : false;
5251
- return /* @__PURE__ */jsxs(Root$s, {
2892
+ return /* @__PURE__ */jsxs(Root$r, {
5252
2893
  "data-ui": "Code",
5253
2894
  ...restProps,
5254
2895
  $size: useArrayProp(size),
@@ -5282,14 +2923,14 @@ function responsiveContainerWidthStyle(props) {
5282
2923
  maxWidth: val === "auto" ? "none" : rem(container[val])
5283
2924
  }));
5284
2925
  }
5285
- const Root$r = styled(Box)(containerBaseStyle, responsiveContainerWidthStyle);
2926
+ const Root$q = styled(Box)(containerBaseStyle, responsiveContainerWidthStyle);
5286
2927
  const Container = forwardRef(function Container2(props, ref) {
5287
2928
  const {
5288
2929
  as,
5289
2930
  width = 2,
5290
2931
  ...restProps
5291
2932
  } = props;
5292
- return /* @__PURE__ */jsx(Root$r, {
2933
+ return /* @__PURE__ */jsx(Root$q, {
5293
2934
  "data-ui": "Container",
5294
2935
  ...restProps,
5295
2936
  $width: useArrayProp(width),
@@ -5297,7 +2938,7 @@ const Container = forwardRef(function Container2(props, ref) {
5297
2938
  ref
5298
2939
  });
5299
2940
  });
5300
- const Root$q = styled(Box)(responsiveGridStyle);
2941
+ const Root$p = styled(Box)(responsiveGridStyle);
5301
2942
  const Grid = forwardRef(function Grid2(props, ref) {
5302
2943
  const {
5303
2944
  as,
@@ -5312,7 +2953,7 @@ const Grid = forwardRef(function Grid2(props, ref) {
5312
2953
  children,
5313
2954
  ...restProps
5314
2955
  } = props;
5315
- return /* @__PURE__ */jsx(Root$q, {
2956
+ return /* @__PURE__ */jsx(Root$p, {
5316
2957
  "data-as": typeof as === "string" ? as : void 0,
5317
2958
  "data-ui": "Grid",
5318
2959
  ...restProps,
@@ -5334,14 +2975,14 @@ var __defProp$r = Object.defineProperty;
5334
2975
  var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
5335
2976
  value: __freeze$q(raw || cooked.slice())
5336
2977
  }));
5337
- var _a$q, _b$g, _c$9;
2978
+ var _a$q, _b$g, _c$8;
5338
2979
  function headingBaseStyle(props) {
5339
2980
  const {
5340
2981
  $accent,
5341
2982
  $muted,
5342
2983
  theme
5343
2984
  } = props;
5344
- return css(_c$9 || (_c$9 = __template$q(["\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_a$q || (_a$q = __template$q(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$g || (_b$g = __template$q(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family);
2985
+ return css(_c$8 || (_c$8 = __template$q(["\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_a$q || (_a$q = __template$q(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$g || (_b$g = __template$q(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family);
5345
2986
  }
5346
2987
  var __freeze$p = Object.freeze;
5347
2988
  var __defProp$q = Object.defineProperty;
@@ -5349,7 +2990,7 @@ var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
5349
2990
  value: __freeze$p(raw || cooked.slice())
5350
2991
  }));
5351
2992
  var _a$p;
5352
- const Root$p = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
2993
+ const Root$o = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
5353
2994
  const SpanWithTextOverflow = styled.span(_a$p || (_a$p = __template$p(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
5354
2995
  const Heading = forwardRef(function Heading2(props, ref) {
5355
2996
  const {
@@ -5368,7 +3009,7 @@ const Heading = forwardRef(function Heading2(props, ref) {
5368
3009
  children
5369
3010
  });
5370
3011
  }
5371
- return /* @__PURE__ */jsx(Root$p, {
3012
+ return /* @__PURE__ */jsx(Root$o, {
5372
3013
  "data-ui": "Heading",
5373
3014
  ...restProps,
5374
3015
  $accent: accent,
@@ -5408,7 +3049,7 @@ function inlineSpaceStyle(props) {
5408
3049
  };
5409
3050
  });
5410
3051
  }
5411
- const Root$o = styled(Box)(inlineBaseStyle, inlineSpaceStyle);
3052
+ const Root$n = styled(Box)(inlineBaseStyle, inlineSpaceStyle);
5412
3053
  const Inline = forwardRef(function Inline2(props, ref) {
5413
3054
  const {
5414
3055
  as,
@@ -5419,7 +3060,7 @@ const Inline = forwardRef(function Inline2(props, ref) {
5419
3060
  const children = useMemo(() => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */jsx("div", {
5420
3061
  children: child
5421
3062
  }, idx)), [childrenProp]);
5422
- return /* @__PURE__ */jsx(Root$o, {
3063
+ return /* @__PURE__ */jsx(Root$n, {
5423
3064
  "data-ui": "Inline",
5424
3065
  ...restProps,
5425
3066
  $space: useArrayProp(space),
@@ -5437,7 +3078,7 @@ var _a$o;
5437
3078
  function kbdStyle() {
5438
3079
  return css(_a$o || (_a$o = __template$o(["\n background: var(--card-bg2-color);\n font: inherit;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
5439
3080
  }
5440
- const Root$n = styled.kbd(responsiveRadiusStyle, kbdStyle);
3081
+ const Root$m = styled.kbd(responsiveRadiusStyle, kbdStyle);
5441
3082
  const KBD = forwardRef(function KBD2(props, ref) {
5442
3083
  const {
5443
3084
  children,
@@ -5446,21 +3087,149 @@ const KBD = forwardRef(function KBD2(props, ref) {
5446
3087
  radius = 2,
5447
3088
  ...restProps
5448
3089
  } = props;
5449
- return /* @__PURE__ */jsx(Root$n, {
5450
- "data-ui": "KBD",
3090
+ return /* @__PURE__ */jsx(Root$m, {
3091
+ "data-ui": "KBD",
3092
+ ...restProps,
3093
+ $radius: useArrayProp(radius),
3094
+ ref,
3095
+ children: /* @__PURE__ */jsx(Box, {
3096
+ as: "span",
3097
+ padding,
3098
+ children: /* @__PURE__ */jsx(Text, {
3099
+ as: "span",
3100
+ muted: true,
3101
+ size: fontSize,
3102
+ weight: "medium",
3103
+ children
3104
+ })
3105
+ })
3106
+ });
3107
+ });
3108
+ function moveTowardsLength(movingPoint, targetPoint, amount) {
3109
+ const width = targetPoint.x - movingPoint.x;
3110
+ const height = targetPoint.y - movingPoint.y;
3111
+ const distance = Math.sqrt(width * width + height * height);
3112
+ return moveTowardsFractional(movingPoint, targetPoint, Math.min(1, amount / distance));
3113
+ }
3114
+ function moveTowardsFractional(movingPoint, targetPoint, fraction) {
3115
+ return {
3116
+ x: movingPoint.x + (targetPoint.x - movingPoint.x) * fraction,
3117
+ y: movingPoint.y + (targetPoint.y - movingPoint.y) * fraction
3118
+ };
3119
+ }
3120
+ function getRoundedCommands(points) {
3121
+ const len = points.length;
3122
+ const cmds = [];
3123
+ for (let i = 0; i < len; i += 1) {
3124
+ const point = points[i];
3125
+ const prevPoint = points[i - 1];
3126
+ const nextPoint = points[i + 1];
3127
+ if (prevPoint && point.radius) {
3128
+ const curveStart = moveTowardsLength(point, prevPoint, point.radius);
3129
+ const curveEnd = moveTowardsLength(point, nextPoint, point.radius);
3130
+ const startControl = moveTowardsFractional(curveStart, point, 0.5);
3131
+ const endControl = moveTowardsFractional(point, curveEnd, 0.5);
3132
+ cmds.push({
3133
+ type: "point",
3134
+ ...curveStart
3135
+ });
3136
+ cmds.push({
3137
+ type: "curve",
3138
+ curveEnd,
3139
+ startControl,
3140
+ endControl
3141
+ });
3142
+ } else {
3143
+ cmds.push({
3144
+ type: "point",
3145
+ ...point
3146
+ });
3147
+ }
3148
+ }
3149
+ return cmds;
3150
+ }
3151
+ function compileCommands(cmds) {
3152
+ return cmds.map((n, idx) => {
3153
+ if (n.type === "point") {
3154
+ return "".concat(idx === 0 ? "M" : "L", " ").concat(n.x, " ").concat(n.y);
3155
+ }
3156
+ if (n.type === "curve") {
3157
+ return "C ".concat(n.startControl.x, " ").concat(n.startControl.y, " ").concat(n.endControl.x, " ").concat(n.endControl.y, " ").concat(n.curveEnd.x, " ").concat(n.curveEnd.y);
3158
+ }
3159
+ return "";
3160
+ }).join(" ");
3161
+ }
3162
+ var __freeze$n = Object.freeze;
3163
+ var __defProp$o = Object.defineProperty;
3164
+ var __template$n = (cooked, raw) => __freeze$n(__defProp$o(cooked, "raw", {
3165
+ value: __freeze$n(raw || cooked.slice())
3166
+ }));
3167
+ var _a$n, _b$f, _c$7;
3168
+ const Root$l = styled.div(_ref4 => {
3169
+ let {
3170
+ $w: w
3171
+ } = _ref4;
3172
+ return css(_a$n || (_a$n = __template$n(["\n position: absolute;\n width: ", "px;\n height: ", "px;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n line-height: 0;\n transform-origin: ", "px ", "px;\n }\n\n [data-placement^='top'] > & {\n bottom: -", "px;\n\n & > svg {\n transform: rotate(0);\n }\n }\n\n [data-placement^='right'] > & {\n left: -", "px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -", "px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -", "px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n "])), w, w, w / 2, w / 2, w, w, w, w);
3173
+ });
3174
+ const StrokePath = styled.path(_b$f || (_b$f = __template$n(["\n stroke: var(--card-shadow-outline-color);\n"])));
3175
+ const ShapePath = styled.path(_c$7 || (_c$7 = __template$n(["\n fill: var(--card-bg-color);\n"])));
3176
+ const Arrow = forwardRef(function Arrow2(props, ref) {
3177
+ const {
3178
+ width: w,
3179
+ height: h,
3180
+ radius = 0,
3181
+ ...restProps
3182
+ } = props;
3183
+ const theme = useTheme();
3184
+ const strokeWidth = theme.sanity.card.shadow.outline;
3185
+ const center = w / 2;
3186
+ const points = [{
3187
+ x: 0,
3188
+ y: 0
3189
+ }, {
3190
+ x: radius,
3191
+ y: 0,
3192
+ radius
3193
+ }, {
3194
+ x: center,
3195
+ y: h - 1,
3196
+ radius
3197
+ }, {
3198
+ x: w - radius,
3199
+ y: 0,
3200
+ radius
3201
+ }, {
3202
+ x: w,
3203
+ y: 0
3204
+ }];
3205
+ const cmds = getRoundedCommands(points);
3206
+ const path = compileCommands(cmds);
3207
+ const strokePath = "".concat(path);
3208
+ const fillPath = "".concat(path, " M ").concat(w, " -1 M 0 -1 Z");
3209
+ return /* @__PURE__ */jsx(Root$l, {
5451
3210
  ...restProps,
5452
- $radius: useArrayProp(radius),
3211
+ $w: w,
5453
3212
  ref,
5454
- children: /* @__PURE__ */jsx(Box, {
5455
- as: "span",
5456
- padding,
5457
- children: /* @__PURE__ */jsx(Text, {
5458
- as: "span",
5459
- muted: true,
5460
- size: fontSize,
5461
- weight: "medium",
5462
- children
5463
- })
3213
+ children: /* @__PURE__ */jsxs("svg", {
3214
+ width: w,
3215
+ height: w,
3216
+ viewBox: "0 0 ".concat(w, " ").concat(w),
3217
+ children: [/* @__PURE__ */jsx("mask", {
3218
+ id: "stroke-mask",
3219
+ children: /* @__PURE__ */jsx("rect", {
3220
+ x: 0,
3221
+ y: strokeWidth,
3222
+ width: w,
3223
+ height: w,
3224
+ fill: "white"
3225
+ })
3226
+ }), /* @__PURE__ */jsx(StrokePath, {
3227
+ d: strokePath,
3228
+ mask: "url(#stroke-mask)",
3229
+ strokeWidth: strokeWidth * 2
3230
+ }), /* @__PURE__ */jsx(ShapePath, {
3231
+ d: fillPath
3232
+ })]
5464
3233
  })
5465
3234
  });
5466
3235
  });
@@ -5541,8 +3310,8 @@ const ElementQuery = forwardRef(function ElementQuery2(props, ref) {
5541
3310
  children
5542
3311
  });
5543
3312
  });
5544
- var __defProp$o = Object.defineProperty;
5545
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp$o(obj, key, {
3313
+ var __defProp$n = Object.defineProperty;
3314
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp$n(obj, key, {
5546
3315
  enumerable: true,
5547
3316
  configurable: true,
5548
3317
  writable: true,
@@ -5771,7 +3540,7 @@ function LayerProvider(props) {
5771
3540
  children
5772
3541
  });
5773
3542
  }
5774
- const Root$m = styled.div({
3543
+ const Root$k = styled.div({
5775
3544
  position: "relative"
5776
3545
  });
5777
3546
  const LayerChildren = forwardRef(function LayerChildren2(props, ref) {
@@ -5807,7 +3576,7 @@ const LayerChildren = forwardRef(function LayerChildren2(props, ref) {
5807
3576
  lastFocusedRef.current = target;
5808
3577
  }
5809
3578
  }, [forwardedRef, isTopLayer, onFocus]);
5810
- return /* @__PURE__ */jsx(Root$m, {
3579
+ return /* @__PURE__ */jsx(Root$k, {
5811
3580
  ...restProps,
5812
3581
  "data-ui": "Layer",
5813
3582
  onFocus: handleFocus,
@@ -5918,19 +3687,19 @@ function PortalProvider(props) {
5918
3687
  children
5919
3688
  });
5920
3689
  }
5921
- var __freeze$n = Object.freeze;
5922
- var __defProp$n = Object.defineProperty;
5923
- var __template$n = (cooked, raw) => __freeze$n(__defProp$n(cooked, "raw", {
5924
- value: __freeze$n(raw || cooked.slice())
3690
+ var __freeze$m = Object.freeze;
3691
+ var __defProp$m = Object.defineProperty;
3692
+ var __template$m = (cooked, raw) => __freeze$m(__defProp$m(cooked, "raw", {
3693
+ value: __freeze$m(raw || cooked.slice())
5925
3694
  }));
5926
- var _a$n;
5927
- const Root$l = styled.div(_a$n || (_a$n = __template$n(["\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n overflow: hidden;\n overflow: clip;\n"])));
3695
+ var _a$m;
3696
+ const Root$j = styled.div(_a$m || (_a$m = __template$m(["\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n overflow: hidden;\n overflow: clip;\n"])));
5928
3697
  const SrOnly = forwardRef(function SrOnly2(props, ref) {
5929
3698
  const {
5930
3699
  as,
5931
3700
  children
5932
3701
  } = props;
5933
- return /* @__PURE__ */jsx(Root$l, {
3702
+ return /* @__PURE__ */jsx(Root$j, {
5934
3703
  "aria-hidden": true,
5935
3704
  as,
5936
3705
  "data-ui": "SrOnly",
@@ -5938,14 +3707,14 @@ const SrOnly = forwardRef(function SrOnly2(props, ref) {
5938
3707
  children
5939
3708
  });
5940
3709
  });
5941
- var __freeze$m = Object.freeze;
5942
- var __defProp$m = Object.defineProperty;
5943
- var __template$m = (cooked, raw) => __freeze$m(__defProp$m(cooked, "raw", {
5944
- value: __freeze$m(raw || cooked.slice())
3710
+ var __freeze$l = Object.freeze;
3711
+ var __defProp$l = Object.defineProperty;
3712
+ var __template$l = (cooked, raw) => __freeze$l(__defProp$l(cooked, "raw", {
3713
+ value: __freeze$l(raw || cooked.slice())
5945
3714
  }));
5946
- var _a$m, _b$f;
5947
- const Root$k = styled.div(_a$m || (_a$m = __template$m(["\n position: relative;\n"])));
5948
- const ItemWrapper = styled.div(_b$f || (_b$f = __template$m(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
3715
+ var _a$l, _b$e;
3716
+ const Root$i = styled.div(_a$l || (_a$l = __template$l(["\n position: relative;\n"])));
3717
+ const ItemWrapper = styled.div(_b$e || (_b$e = __template$l(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
5949
3718
  const VirtualList = forwardRef(function VirtualList2(props, ref) {
5950
3719
  const {
5951
3720
  as = "div",
@@ -6051,7 +3820,7 @@ const VirtualList = forwardRef(function VirtualList2(props, ref) {
6051
3820
  const wrapperStyle = useMemo(() => ({
6052
3821
  height
6053
3822
  }), [height]);
6054
- return /* @__PURE__ */jsx(Root$k, {
3823
+ return /* @__PURE__ */jsx(Root$i, {
6055
3824
  as,
6056
3825
  "data-ui": "VirtualList",
6057
3826
  ...restProps,
@@ -6065,8 +3834,9 @@ const VirtualList = forwardRef(function VirtualList2(props, ref) {
6065
3834
  });
6066
3835
  const DEFAULT_POPOVER_DISTANCE = 4;
6067
3836
  const DEFAULT_POPOVER_PADDING = 4;
6068
- const DEFAULT_POPOVER_ARROW_WIDTH = 27;
6069
- const DEFAULT_POPOVER_ARROW_HEIGHT = 11;
3837
+ const DEFAULT_POPOVER_ARROW_WIDTH = 19;
3838
+ const DEFAULT_POPOVER_ARROW_HEIGHT = 8;
3839
+ const DEFAULT_POPOVER_ARROW_RADIUS = 2;
6070
3840
  const DEFAULT_POPOVER_MARGINS = [0, 0, 0, 0];
6071
3841
  const DEFAULT_FALLBACK_PLACEMENTS$1 = {
6072
3842
  top: ["bottom", "left", "right"],
@@ -6168,35 +3938,7 @@ function calcMaxWidth(params) {
6168
3938
  }
6169
3939
  return Math.min(currentWidth != null ? currentWidth : Infinity, (boundaryWidth || Infinity) - DEFAULT_POPOVER_PADDING * 2);
6170
3940
  }
6171
- var __freeze$l = Object.freeze;
6172
- var __defProp$l = Object.defineProperty;
6173
- var __template$l = (cooked, raw) => __freeze$l(__defProp$l(cooked, "raw", {
6174
- value: __freeze$l(raw || cooked.slice())
6175
- }));
6176
- var _a$l, _b$e, _c$8;
6177
- const Root$j = styled.div(_a$l || (_a$l = __template$l(["\n position: absolute;\n pointer-events: none;\n width: ", "px;\n height: ", "px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n transform-origin: ", "px ", "px;\n }\n\n [data-placement^='top'] > & {\n bottom: -", "px;\n }\n\n [data-placement^='right'] > & {\n left: -", "px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -", "px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -", "px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n"])), DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH / 2, DEFAULT_POPOVER_ARROW_WIDTH / 2, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH);
6178
- const BorderPath = styled.path(_b$e || (_b$e = __template$l(["\n fill: var(--card-shadow-outline-color);\n"])));
6179
- const ShapePath = styled.path(_c$8 || (_c$8 = __template$l(["\n fill: var(--card-bg-color);\n"])));
6180
- const PopoverArrow = forwardRef(function PopoverArrow2(props, ref) {
6181
- return /* @__PURE__ */jsx(Root$j, {
6182
- "data-ui": "Popover__arrow",
6183
- ...props,
6184
- ref,
6185
- children: /* @__PURE__ */jsxs("svg", {
6186
- width: DEFAULT_POPOVER_ARROW_WIDTH,
6187
- height: DEFAULT_POPOVER_ARROW_HEIGHT,
6188
- viewBox: "0 0 27 11",
6189
- fill: "none",
6190
- xmlns: "http://www.w3.org/2000/svg",
6191
- children: [/* @__PURE__ */jsx(BorderPath, {
6192
- d: "M1.18708 1C3.29803 1.0011 5.29585 1.95479 6.62414 3.59561L11.1683 9.20895C12.369 10.6922 14.631 10.6922 15.8317 9.20894L20.3759 3.59561C21.7042 1.95478 23.702 1.0011 25.8129 1H21.9436C21.0533 1.49255 20.2545 2.15618 19.5986 2.96641L15.0545 8.57975C14.254 9.56855 12.746 9.56855 11.9455 8.57975L7.40139 2.96642C6.74548 2.15618 5.94673 1.49255 5.05643 1H1.18708Z"
6193
- }), /* @__PURE__ */jsx(ShapePath, {
6194
- d: "M1.18342 0C3.59749 0 5.88246 1.0901 7.40138 2.96642L11.9455 8.57975C12.746 9.56855 14.254 9.56855 15.0545 8.57975L19.5986 2.96641C21.1175 1.0901 23.4025 0 25.8166 0H27H0H1.18342Z"
6195
- })]
6196
- })
6197
- });
6198
- });
6199
- const Root$i = styled(Card)({
3941
+ const Root$h = styled(Card)({
6200
3942
  "&:not([hidden])": {
6201
3943
  display: "flex"
6202
3944
  },
@@ -6240,18 +3982,13 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
6240
3982
  zIndex,
6241
3983
  ...style
6242
3984
  }), [strategy, style, width, x, y, zIndex]);
6243
- const staticSide = placement && FLOATING_STATIC_SIDES[placement.split("-")[0]];
6244
- const arrowStyle = useMemo(() => {
6245
- const style2 = {
6246
- left: arrowX !== null ? arrowX : void 0,
6247
- top: arrowY !== null ? arrowY : void 0,
6248
- right: void 0,
6249
- bottom: void 0
6250
- };
6251
- if (staticSide) style2[staticSide] = 0 - DEFAULT_POPOVER_ARROW_WIDTH;
6252
- return style2;
6253
- }, [arrowX, arrowY, staticSide]);
6254
- return /* @__PURE__ */jsxs(Root$i, {
3985
+ const arrowStyle = useMemo(() => ({
3986
+ left: arrowX !== null ? arrowX : void 0,
3987
+ top: arrowY !== null ? arrowY : void 0,
3988
+ right: void 0,
3989
+ bottom: void 0
3990
+ }), [arrowX, arrowY]);
3991
+ return /* @__PURE__ */jsxs(Root$h, {
6255
3992
  "data-ui": "Popover",
6256
3993
  ...restProps,
6257
3994
  "data-placement": placement,
@@ -6273,9 +4010,12 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
6273
4010
  padding,
6274
4011
  children
6275
4012
  })
6276
- }), arrow && /* @__PURE__ */jsx(PopoverArrow, {
4013
+ }), arrow && /* @__PURE__ */jsx(Arrow, {
6277
4014
  ref: arrowRef,
6278
- style: arrowStyle
4015
+ style: arrowStyle,
4016
+ width: DEFAULT_POPOVER_ARROW_WIDTH,
4017
+ height: DEFAULT_POPOVER_ARROW_HEIGHT,
4018
+ radius: DEFAULT_POPOVER_ARROW_RADIUS
6279
4019
  })]
6280
4020
  });
6281
4021
  }));
@@ -6286,7 +4026,7 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6286
4026
  const boundaryElementContext = useBoundaryElement();
6287
4027
  const {
6288
4028
  __unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
6289
- arrow: arrowProp = true,
4029
+ arrow: arrowProp = false,
6290
4030
  boundaryElement = boundaryElementContext.element,
6291
4031
  children: childProp,
6292
4032
  constrainSize = false,
@@ -6295,6 +4035,8 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6295
4035
  fallbackPlacements = (_b = props.fallbackPlacements) != null ? _b : DEFAULT_FALLBACK_PLACEMENTS$1[(_a = props.placement) != null ? _a : "bottom"],
6296
4036
  matchReferenceWidth,
6297
4037
  floatingBoundary = (_c = props.boundaryElement) != null ? _c : boundaryElementContext.element,
4038
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4039
+ onActivate,
6298
4040
  open,
6299
4041
  overflow = "hidden",
6300
4042
  padding: paddingProp,
@@ -6367,17 +4109,17 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6367
4109
  }));
6368
4110
  }
6369
4111
  ret.push(offset({
6370
- mainAxis: arrowProp ? DEFAULT_POPOVER_DISTANCE : 0
4112
+ mainAxis: DEFAULT_POPOVER_DISTANCE
6371
4113
  }));
6372
4114
  if (constrainSize || matchReferenceWidth) {
6373
4115
  ret.push(size({
6374
- apply(_ref21) {
4116
+ apply(_ref5) {
6375
4117
  let {
6376
4118
  availableWidth,
6377
4119
  availableHeight,
6378
4120
  elements,
6379
4121
  referenceWidth
6380
- } = _ref21;
4122
+ } = _ref5;
6381
4123
  referenceWidthRef.current = referenceWidth;
6382
4124
  const _currentWidth = widthRef.current;
6383
4125
  const _maxWidth = maxWidthRef.current;
@@ -6530,7 +4272,7 @@ function inputElementStyle(props) {
6530
4272
  return css(_b$d || (_b$d = __template$k(["\n appearance: none;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n z-index: 1;\n padding: 0;\n margin: 0;\n border-radius: ", ";\n border: none;\n\n /* enabled */\n & + span {\n display: block;\n position: relative;\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n box-shadow: ", ";\n\n &::after {\n content: '';\n position: absolute;\n top: ", ";\n left: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n opacity: 0;\n }\n }\n\n /* focused */\n &:not(:disabled):focus + span {\n box-shadow: ", ";\n }\n\n &:not(:disabled):focus:not(:focus-visible) + span {\n box-shadow: ", ";\n }\n\n &:checked + span::after {\n opacity: 1;\n }\n\n /* customValidity */\n &[data-error] + span {\n background-color: ", ";\n box-shadow: ", ";\n &::after {\n background: ", ";\n }\n }\n\n /* read only */\n &[data-read-only] + span {\n box-shadow: 0 0 0 1px ", ";\n background: ", ";\n\n &::after {\n background: ", ";\n }\n }\n\n /* disabled */\n &:not([data-read-only]):disabled + span {\n box-shadow: 0 0 0 1px ", ";\n background: ", ";\n\n &::after {\n background: ", ";\n }\n }\n "])), rem(input.radio.size / 2), rem(input.radio.size), rem(input.radio.size), rem(input.radio.size / 2), color.default.enabled.bg, focusRingBorderStyle({
6531
4273
  color: color.default.enabled.border,
6532
4274
  width: input.border.width
6533
- }), rem(dist), rem(dist), rem(input.radio.markSize), rem(input.radio.markSize), rem(input.radio.markSize / 2), color.default.enabled.bg2, focusRingStyle({
4275
+ }), rem(dist), rem(dist), rem(input.radio.markSize), rem(input.radio.markSize), rem(input.radio.markSize / 2), color.default.enabled.fg, focusRingStyle({
6534
4276
  border: {
6535
4277
  width: input.border.width,
6536
4278
  color: color.default.enabled.border
@@ -6544,7 +4286,7 @@ function inputElementStyle(props) {
6544
4286
  color: color.invalid.enabled.bg2
6545
4287
  }), color.invalid.enabled.bg2, color.default.readOnly.border, color.default.readOnly.bg, color.default.readOnly.border, color.default.disabled.border, color.default.disabled.bg, color.default.disabled.border);
6546
4288
  }
6547
- const Root$h = styled.div(radioBaseStyle);
4289
+ const Root$g = styled.div(radioBaseStyle);
6548
4290
  const Input$4 = styled.input(inputElementStyle);
6549
4291
  const Radio = forwardRef(function Radio2(props, forwardedRef) {
6550
4292
  const {
@@ -6557,7 +4299,7 @@ const Radio = forwardRef(function Radio2(props, forwardedRef) {
6557
4299
  } = props;
6558
4300
  const ref = useForwardedRef(forwardedRef);
6559
4301
  useCustomValidity(ref, customValidity);
6560
- return /* @__PURE__ */jsxs(Root$h, {
4302
+ return /* @__PURE__ */jsxs(Root$g, {
6561
4303
  className,
6562
4304
  "data-ui": "Radio",
6563
4305
  style,
@@ -6577,9 +4319,9 @@ var __defProp$j = Object.defineProperty;
6577
4319
  var __template$j = (cooked, raw) => __freeze$j(__defProp$j(cooked, "raw", {
6578
4320
  value: __freeze$j(raw || cooked.slice())
6579
4321
  }));
6580
- var _a$j, _b$c, _c$7, _d$5;
4322
+ var _a$j, _b$c, _c$6, _d$5;
6581
4323
  function rootStyle() {
6582
- return css(_a$j || (_a$j = __template$j(["\n position: relative;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
4324
+ return css(_a$j || (_a$j = __template$j(["\n position: relative;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
6583
4325
  }
6584
4326
  function inputBaseStyle(props) {
6585
4327
  const {
@@ -6599,7 +4341,7 @@ function inputColorStyle(props) {
6599
4341
  focusRing
6600
4342
  } = input.select;
6601
4343
  const color = theme.sanity.color.input;
6602
- return css(_c$7 || (_c$7 = __template$j(["\n /* enabled */\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n\n /* hovered */\n @media (hover: hover) {\n &:not(:disabled):hover {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n }\n\n /* focused */\n &:not(:disabled):focus {\n box-shadow: ", ";\n }\n\n /* read-only */\n &[data-read-only] {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n\n /* disabled */\n &:not([data-read-only]):disabled {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n "])), color.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
4344
+ return css(_c$6 || (_c$6 = __template$j(["\n /* enabled */\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n\n /* hovered */\n @media (hover: hover) {\n &:not(:disabled):hover {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n }\n\n /* focused */\n &:not(:disabled):focus {\n box-shadow: ", ";\n }\n\n /* read-only */\n &[data-read-only] {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n\n /* disabled */\n &:not([data-read-only]):disabled {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n "])), color.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
6603
4345
  color: color.default.enabled.border,
6604
4346
  width: input.border.width
6605
4347
  }), color.default.hovered.bg, color.default.hovered.fg, focusRingBorderStyle({
@@ -6650,7 +4392,7 @@ const selectStyle = {
6650
4392
  input: inputStyle,
6651
4393
  iconBox: iconBoxStyle
6652
4394
  };
6653
- const Root$g = styled.div(selectStyle.root);
4395
+ const Root$f = styled.div(selectStyle.root);
6654
4396
  const Input$3 = styled.select(selectStyle.input);
6655
4397
  const IconBox = styled(Box)(selectStyle.iconBox);
6656
4398
  const Select = forwardRef(function Select2(props, forwardedRef) {
@@ -6667,7 +4409,7 @@ const Select = forwardRef(function Select2(props, forwardedRef) {
6667
4409
  } = props;
6668
4410
  const ref = useForwardedRef(forwardedRef);
6669
4411
  useCustomValidity(ref, customValidity);
6670
- return /* @__PURE__ */jsxs(Root$g, {
4412
+ return /* @__PURE__ */jsxs(Root$f, {
6671
4413
  "data-ui": "Select",
6672
4414
  children: [/* @__PURE__ */jsx(Input$3, {
6673
4415
  "data-read-only": !disabled && readOnly ? "" : void 0,
@@ -6684,7 +4426,7 @@ const Select = forwardRef(function Select2(props, forwardedRef) {
6684
4426
  padding,
6685
4427
  children: /* @__PURE__ */jsx(Text, {
6686
4428
  size: fontSize,
6687
- children: /* @__PURE__ */jsx(SelectIcon, {})
4429
+ children: /* @__PURE__ */jsx(ChevronDownIcon, {})
6688
4430
  })
6689
4431
  })]
6690
4432
  });
@@ -6714,14 +4456,14 @@ function responsiveStackSpaceStyle(props) {
6714
4456
  gridGap: rem(space[spaceIndex])
6715
4457
  }));
6716
4458
  }
6717
- const Root$f = styled(Box)(stackBaseStyle, responsiveStackSpaceStyle);
4459
+ const Root$e = styled(Box)(stackBaseStyle, responsiveStackSpaceStyle);
6718
4460
  const Stack = forwardRef(function Stack2(props, ref) {
6719
4461
  const {
6720
4462
  as,
6721
4463
  space,
6722
4464
  ...restProps
6723
4465
  } = props;
6724
- return /* @__PURE__ */jsx(Root$f, {
4466
+ return /* @__PURE__ */jsx(Root$e, {
6725
4467
  "data-as": typeof as === "string" ? as : void 0,
6726
4468
  "data-ui": "Stack",
6727
4469
  ...restProps,
@@ -6735,7 +4477,7 @@ var __defProp$i = Object.defineProperty;
6735
4477
  var __template$i = (cooked, raw) => __freeze$i(__defProp$i(cooked, "raw", {
6736
4478
  value: __freeze$i(raw || cooked.slice())
6737
4479
  }));
6738
- var _a$i, _b$b, _c$6, _d$4, _e$2, _f$2, _g;
4480
+ var _a$i, _b$b, _c$5, _d$4, _e$2, _f$2, _g;
6739
4481
  function switchBaseStyles() {
6740
4482
  return css(_a$i || (_a$i = __template$i(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
6741
4483
  }
@@ -6753,9 +4495,9 @@ function switchRepresentationStyles(props) {
6753
4495
  focusRing
6754
4496
  } = input.switch;
6755
4497
  const color = theme.sanity.color.input;
6756
- return css(_c$6 || (_c$6 = __template$i(["\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n --switch-box-shadow: none;\n\n &:not([hidden]) {\n display: block;\n }\n position: relative;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n\n /* Make sure it\u2019s not possible to interact with the wrapper element */\n pointer-events: none;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n box-shadow: var(--switch-box-shadow);\n border-radius: inherit;\n }\n\n /* Focus styles */\n input:focus + && {\n --switch-box-shadow: ", ";\n }\n\n input:focus:not(:focus-visible) + && {\n --switch-box-shadow: none;\n }\n\n input:checked + && {\n --switch-bg-color: var(--card-focus-ring-color);\n --switch-fg-color: ", ";\n }\n\n @media (hover: hover) {\n input:not(:disabled):hover + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n input:not(:disabled):checked:hover + && {\n --switch-bg-color: var(--card-focus-ring-color);\n --switch-fg-color: ", ";\n }\n }\n\n input:not([data-read-only]):disabled + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n input[data-read-only]:disabled + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n "])), color.default.enabled.border, color.default.enabled.bg, rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2), focusRingStyle({
4498
+ return css(_c$5 || (_c$5 = __template$i(["\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n --switch-box-shadow: none;\n\n &:not([hidden]) {\n display: block;\n }\n position: relative;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n\n /* Make sure it\u2019s not possible to interact with the wrapper element */\n pointer-events: none;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n box-shadow: var(--switch-box-shadow);\n border-radius: inherit;\n }\n\n /* Focus styles */\n input:focus + && {\n --switch-box-shadow: ", ";\n }\n\n input:focus:not(:focus-visible) + && {\n --switch-box-shadow: none;\n }\n\n input:checked + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n @media (hover: hover) {\n input:not(:disabled):hover + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n input:not(:disabled):checked:hover + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n }\n\n input:not([data-read-only]):disabled + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n input[data-read-only]:disabled + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n "])), color.default.enabled.border, color.default.enabled.bg, rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2), focusRingStyle({
6757
4499
  focusRing
6758
- }), color.default.enabled.bg, color.default.hovered.border, color.default.hovered.bg, color.default.enabled.bg, color.default.disabled.border, color.default.disabled.bg, color.default.readOnly.border, color.default.readOnly.bg);
4500
+ }), color.default.enabled.fg, color.default.enabled.bg, color.default.hovered.border, color.default.hovered.bg, color.default.enabled.fg, color.default.enabled.bg, color.default.disabled.border, color.default.disabled.bg, color.default.readOnly.border, color.default.readOnly.bg);
6759
4501
  }
6760
4502
  function switchTrackStyles(props) {
6761
4503
  const {
@@ -6783,7 +4525,7 @@ function switchThumbStyles(props) {
6783
4525
  const checked = $indeterminate !== true && props.$checked === true;
6784
4526
  return css(_g || (_g = __template$i(["\n &:not([hidden]) {\n display: block;\n }\n position: absolute;\n left: ", ";\n top: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n transition-property: transform;\n transition-duration: ", "ms;\n transition-timing-function: ", ";\n background: var(--switch-fg-color);\n transform: translate3d(0, 0, 0);\n box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);\n\n ", "\n\n ", "\n "])), rem(trackPadding), rem(trackPadding), rem(size), rem(size), rem(size / 2), input.switch.transitionDurationMs, input.switch.transitionTimingFunction, checked && css(_e$2 || (_e$2 = __template$i(["\n transform: translate3d(", "px, 0, 0);\n "])), checkedOffset), $indeterminate && css(_f$2 || (_f$2 = __template$i(["\n transform: translate3d(", "px, 0, 0);\n "])), indeterminateOffset));
6785
4527
  }
6786
- const Root$e = styled.span(switchBaseStyles);
4528
+ const Root$d = styled.span(switchBaseStyles);
6787
4529
  const Input$2 = styled.input(switchInputStyles);
6788
4530
  const Representation = styled.span(switchRepresentationStyles);
6789
4531
  const Track = styled.span(switchTrackStyles);
@@ -6804,7 +4546,7 @@ const Switch = forwardRef(function Switch2(props, forwardedRef) {
6804
4546
  ref.current.indeterminate = indeterminate || false;
6805
4547
  }
6806
4548
  }, [indeterminate, ref]);
6807
- return /* @__PURE__ */jsxs(Root$e, {
4549
+ return /* @__PURE__ */jsxs(Root$d, {
6808
4550
  className,
6809
4551
  "data-ui": "Switch",
6810
4552
  style,
@@ -6831,7 +4573,7 @@ var __template$h = (cooked, raw) => __freeze$h(__defProp$h(cooked, "raw", {
6831
4573
  value: __freeze$h(raw || cooked.slice())
6832
4574
  }));
6833
4575
  var _a$h;
6834
- const Root$d = styled.span(textInputRootStyle);
4576
+ const Root$c = styled.span(textInputRootStyle);
6835
4577
  const InputRoot$1 = styled.span(_a$h || (_a$h = __template$h(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
6836
4578
  const Input$1 = styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
6837
4579
  const Presentation$1 = styled.div(responsiveRadiusStyle, textInputRepresentationStyle);
@@ -6842,14 +4584,14 @@ const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
6842
4584
  disabled = false,
6843
4585
  fontSize = 2,
6844
4586
  padding = 3,
6845
- radius = 1,
4587
+ radius = 2,
6846
4588
  weight,
6847
4589
  ...restProps
6848
4590
  } = props;
6849
4591
  const ref = useForwardedRef(forwardedRef);
6850
4592
  const rootTheme = useRootTheme();
6851
4593
  useCustomValidity(ref, customValidity);
6852
- return /* @__PURE__ */jsx(Root$d, {
4594
+ return /* @__PURE__ */jsx(Root$c, {
6853
4595
  "data-ui": "TextArea",
6854
4596
  children: /* @__PURE__ */jsxs(InputRoot$1, {
6855
4597
  children: [/* @__PURE__ */jsx(Input$1, {
@@ -6881,11 +4623,11 @@ var __defProp$g = Object.defineProperty;
6881
4623
  var __template$g = (cooked, raw) => __freeze$g(__defProp$g(cooked, "raw", {
6882
4624
  value: __freeze$g(raw || cooked.slice())
6883
4625
  }));
6884
- var _a$g, _b$a, _c$5, _d$3, _e$1, _f$1;
4626
+ var _a$g, _b$a, _c$4, _d$3, _e$1, _f$1;
6885
4627
  const CLEAR_BUTTON_BOX_STYLE = {
6886
4628
  zIndex: 2
6887
4629
  };
6888
- const Root$c = styled(Card).attrs({
4630
+ const Root$b = styled(Card).attrs({
6889
4631
  forwardedAs: "span"
6890
4632
  })(textInputRootStyle);
6891
4633
  const InputRoot = styled.span(_a$g || (_a$g = __template$g(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
@@ -6894,7 +4636,7 @@ const Prefix = styled(Card).attrs({
6894
4636
  })(_b$a || (_b$a = __template$g(["\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
6895
4637
  const Suffix = styled(Card).attrs({
6896
4638
  forwardedAs: "span"
6897
- })(_c$5 || (_c$5 = __template$g(["\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
4639
+ })(_c$4 || (_c$4 = __template$g(["\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
6898
4640
  const Input = styled.input(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
6899
4641
  const Presentation = styled.span(responsiveRadiusStyle, textInputRepresentationStyle);
6900
4642
  const LeftBox = styled(Box)(_d$3 || (_d$3 = __template$g(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
@@ -6907,6 +4649,7 @@ const TextInputClearButton = styled(Button)({
6907
4649
  });
6908
4650
  const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
6909
4651
  const {
4652
+ __unstable_disableFocusRing,
6910
4653
  border = true,
6911
4654
  clearButton,
6912
4655
  disabled = false,
@@ -6916,7 +4659,7 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
6916
4659
  onClear,
6917
4660
  padding: paddingProp = 3,
6918
4661
  prefix,
6919
- radius: radiusProp = 1,
4662
+ radius: radiusProp = 2,
6920
4663
  readOnly,
6921
4664
  space: spaceProp = 3,
6922
4665
  suffix,
@@ -6961,6 +4704,7 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
6961
4704
  }), [prefix, radius]);
6962
4705
  const presentationNode = useMemo(() => /* @__PURE__ */jsxs(Presentation, {
6963
4706
  $hasPrefix,
4707
+ $unstableDisableFocusRing: __unstable_disableFocusRing,
6964
4708
  $hasSuffix,
6965
4709
  $radius: radius,
6966
4710
  $scheme: rootTheme.scheme,
@@ -6981,7 +4725,7 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
6981
4725
  children: [isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && createElement(iconRight)]
6982
4726
  })
6983
4727
  })]
6984
- }), [border, fontSize, icon, iconRight, padding, radius, rootTheme, $hasClearButton, $hasPrefix, $hasSuffix]);
4728
+ }), [__unstable_disableFocusRing, border, fontSize, icon, iconRight, padding, radius, rootTheme, $hasClearButton, $hasPrefix, $hasSuffix]);
6985
4729
  const clearButtonBoxPadding = useMemo(() => padding.map(v => {
6986
4730
  if (v === 0) return 0;
6987
4731
  if (v === 1) return 1;
@@ -7024,7 +4768,7 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
7024
4768
  children: suffix
7025
4769
  })
7026
4770
  }), [radius, suffix]);
7027
- return /* @__PURE__ */jsxs(Root$c, {
4771
+ return /* @__PURE__ */jsxs(Root$b, {
7028
4772
  "data-ui": "TextInput",
7029
4773
  tone: rootTheme.tone,
7030
4774
  children: [prefixNode, /* @__PURE__ */jsxs(InputRoot, {
@@ -7065,49 +4809,36 @@ function useDelayedState(initialState) {
7065
4809
  }, []);
7066
4810
  return [state, onStateChange];
7067
4811
  }
4812
+ function ConditionalWrapper(_ref6) {
4813
+ let {
4814
+ children,
4815
+ condition,
4816
+ wrapper
4817
+ } = _ref6;
4818
+ if (!condition) {
4819
+ return children;
4820
+ }
4821
+ return wrapper(children);
4822
+ }
4823
+ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15;
4824
+ const DEFAULT_TOOLTIP_ARROW_HEIGHT = 6;
4825
+ const DEFAULT_TOOLTIP_ARROW_RADIUS = 2;
4826
+ const DEFAULT_TOOLTIP_DISTANCE = 4;
4827
+ const DEFAULT_TOOLTIP_PADDING = 4;
7068
4828
  const DEFAULT_FALLBACK_PLACEMENTS = {
7069
- top: ["bottom", "left", "right"],
7070
- "top-start": ["bottom-start", "left-start", "right-start"],
7071
- "top-end": ["bottom-end", "left-end", "right-end"],
7072
- bottom: ["top", "left", "right"],
7073
- "bottom-start": ["top-start", "left-start", "right-start"],
7074
- "bottom-end": ["top-end", "left-end", "right-end"],
7075
- left: ["right", "top", "bottom"],
7076
- "left-start": ["right-start", "top-start", "bottom-start"],
7077
- "left-end": ["right-end", "top-end", "bottom-end"],
7078
- right: ["left", "top", "bottom"],
7079
- "right-start": ["left-start", "top-start", "bottom-start"],
7080
- "right-end": ["left-end", "top-end", "bottom-end"]
4829
+ top: ["top-end", "top-start", "bottom", "left", "right"],
4830
+ "top-start": ["top", "top-end", "bottom-start", "left-start", "right-start"],
4831
+ "top-end": ["top", "top-start", "bottom-end", "left-end", "right-end"],
4832
+ bottom: ["bottom-end", "bottom-start", "top", "left", "right"],
4833
+ "bottom-start": ["bottom", "bottom-end", "top-start", "left-start", "right-start"],
4834
+ "bottom-end": ["bottom", "bottom-start", "top-end", "left-end", "right-end"],
4835
+ left: ["left-end", "left-start", "right", "top", "bottom"],
4836
+ "left-start": ["left", "left-end", "right-start", "top-start", "bottom-start"],
4837
+ "left-end": ["left", "left-start", "right-end", "top-end", "bottom-end"],
4838
+ right: ["right-end", "right-start", "left", "top", "bottom"],
4839
+ "right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
4840
+ "right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
7081
4841
  };
7082
- var __freeze$f = Object.freeze;
7083
- var __defProp$f = Object.defineProperty;
7084
- var __template$f = (cooked, raw) => __freeze$f(__defProp$f(cooked, "raw", {
7085
- value: __freeze$f(raw || cooked.slice())
7086
- }));
7087
- var _a$f, _b$9, _c$4;
7088
- const Root$b = styled.div(_a$f || (_a$f = __template$f(["\n position: absolute;\n pointer-events: none;\n width: 15px;\n height: 15px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n transform-origin: 7.5px 7.5px;\n }\n\n /* position: absolute;\n width: 15px;\n height: 15px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n &:not([hidden]) {\n display: block;\n }\n transform-origin: 7.5px 7.5px;\n } */\n\n [data-placement^='top'] > & {\n bottom: -27px;\n }\n\n [data-placement^='right'] > & {\n left: -27px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -27px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -27px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n"])));
7089
- const Border = styled.path(_b$9 || (_b$9 = __template$f(["\n fill: var(--card-shadow-outline-color);\n"])));
7090
- const Shape = styled.path(_c$4 || (_c$4 = __template$f(["\n fill: var(--card-bg-color);\n"])));
7091
- const TooltipArrow = forwardRef(function TooltipArrow2(props, ref) {
7092
- const {
7093
- ...restProps
7094
- } = props;
7095
- return /* @__PURE__ */jsx(Root$b, {
7096
- "data-ui": "Tooltip__arrow",
7097
- ...restProps,
7098
- ref,
7099
- children: /* @__PURE__ */jsxs("svg", {
7100
- width: "15",
7101
- height: "15",
7102
- viewBox: "0 0 15 15",
7103
- children: [/* @__PURE__ */jsx(Border, {
7104
- d: "M11.5266 1C11.032 1.32802 10.5837 1.73105 10.1995 2.20057L9.04792 3.6081C8.24771 4.58614 6.7523 4.58614 5.95209 3.6081L4.80047 2.20057C4.41632 1.73105 3.96796 1.32802 3.47341 1H0.156727C1.65639 1 3.07687 1.67313 4.02651 2.83381L5.17813 4.24134C6.37844 5.70839 8.62156 5.70839 9.82187 4.24134L10.9735 2.83381C11.9231 1.67313 13.3436 1 14.8433 1H11.5266Z"
7105
- }), /* @__PURE__ */jsx(Shape, {
7106
- d: "M0.156725 0C1.95632 0 3.66089 0.80776 4.80047 2.20057L5.95209 3.6081C6.75229 4.58614 8.24771 4.58614 9.04791 3.6081L10.1995 2.20057C11.3391 0.80776 13.0437 0 14.8433 0H15H0H0.156725Z"
7107
- })]
7108
- })
7109
- });
7110
- });
7111
4842
  const key$4 = Symbol.for("@sanity/ui/context/tooltipDelayGroup");
7112
4843
  globalScope[key$4] = globalScope[key$4] || createContext(null);
7113
4844
  const TooltipDelayGroupContext = globalScope[key$4];
@@ -7122,10 +4853,6 @@ function TooltipDelayGroupProvider(props) {
7122
4853
  } = props;
7123
4854
  const [isGroupActive, setIsGroupActive] = useDelayedState(false);
7124
4855
  const [openTooltipId, setOpenTooltipId] = useDelayedState(null);
7125
- const isInsideContext = useTooltipDelayGroup();
7126
- if (isInsideContext) {
7127
- throw new Error("TooltipDelayGroupProvider cannot be nested inside another TooltipDelayGroupProvider");
7128
- }
7129
4856
  const openDelay = typeof delay === "number" ? delay : (delay == null ? void 0 : delay.open) || 0;
7130
4857
  const closeDelay = typeof delay === "number" ? delay : (delay == null ? void 0 : delay.close) || 0;
7131
4858
  const value = useMemo(() => ({
@@ -7142,18 +4869,24 @@ function TooltipDelayGroupProvider(props) {
7142
4869
  children
7143
4870
  });
7144
4871
  }
7145
- var __freeze$e = Object.freeze;
7146
- var __defProp$e = Object.defineProperty;
7147
- var __template$e = (cooked, raw) => __freeze$e(__defProp$e(cooked, "raw", {
7148
- value: __freeze$e(raw || cooked.slice())
4872
+ var __freeze$f = Object.freeze;
4873
+ var __defProp$f = Object.defineProperty;
4874
+ var __template$f = (cooked, raw) => __freeze$f(__defProp$f(cooked, "raw", {
4875
+ value: __freeze$f(raw || cooked.slice())
7149
4876
  }));
7150
- var _a$e;
7151
- const Root$a = styled(Layer)(_a$e || (_a$e = __template$e(["\n pointer-events: none;\n"])));
4877
+ var _a$f;
4878
+ const Root$a = styled(Layer)(_a$f || (_a$f = __template$f(["\n pointer-events: none;\n max-width: ", "px;\n"])), _ref7 => {
4879
+ let {
4880
+ $maxWidth
4881
+ } = _ref7;
4882
+ return $maxWidth;
4883
+ });
7152
4884
  const Tooltip = forwardRef(function Tooltip2(props, ref) {
7153
- var _a2, _b, _c, _d, _e;
4885
+ var _a2, _b, _c, _d, _e, _f;
7154
4886
  const boundaryElementContext = useBoundaryElement();
7155
4887
  const theme = useTheme();
7156
4888
  const {
4889
+ arrow: arrowProp = false,
7157
4890
  boundaryElement = boundaryElementContext == null ? void 0 : boundaryElementContext.element,
7158
4891
  children: childProp,
7159
4892
  content,
@@ -7161,11 +4894,13 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
7161
4894
  fallbackPlacements: fallbackPlacementsProp = (_b = props.fallbackPlacements) != null ? _b : DEFAULT_FALLBACK_PLACEMENTS[(_a2 = props.placement) != null ? _a2 : "bottom"],
7162
4895
  padding = 3,
7163
4896
  placement: placementProp = "bottom",
7164
- portal,
4897
+ portal: portalProp,
4898
+ radius = 2,
7165
4899
  scheme,
7166
4900
  shadow = 2,
7167
4901
  zOffset = (_c = theme.sanity.layer) == null ? void 0 : _c.tooltip.zOffset,
7168
4902
  delay,
4903
+ animate = false,
7169
4904
  ...restProps
7170
4905
  } = props;
7171
4906
  const fallbackPlacements = useArrayProp(fallbackPlacementsProp);
@@ -7173,45 +4908,36 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
7173
4908
  const [referenceElement, setReferenceElement] = useState(null);
7174
4909
  const arrowRef = useRef(null);
7175
4910
  const rootBoundary = "viewport";
4911
+ const portal = usePortal();
4912
+ const portalElement = typeof portalProp === "string" ? ((_d = portal.elements) == null ? void 0 : _d[portalProp]) || null : portal.element;
4913
+ const tooltipWidth = useMemo(() => {
4914
+ const availableWidths = [...(boundaryElement ? [boundaryElement.offsetWidth] : []), (portalElement == null ? void 0 : portalElement.offsetWidth) || document.body.offsetWidth];
4915
+ return Math.min(...availableWidths) - DEFAULT_TOOLTIP_PADDING * 2;
4916
+ }, [boundaryElement, portalElement == null ? void 0 : portalElement.offsetWidth]);
7176
4917
  const middleware = useMemo(() => {
7177
4918
  const ret = [];
7178
4919
  ret.push(flip({
7179
4920
  boundary: boundaryElement || void 0,
7180
4921
  fallbackPlacements,
7181
- padding: 4,
7182
- rootBoundary,
7183
- mainAxis: false
4922
+ padding: DEFAULT_TOOLTIP_PADDING,
4923
+ rootBoundary
7184
4924
  }));
7185
4925
  ret.push(offset({
7186
- mainAxis: 3
7187
- }));
7188
- ret.push(size$2({
7189
- apply(_ref22) {
7190
- let {
7191
- availableWidth,
7192
- availableHeight,
7193
- elements
7194
- } = _ref22;
7195
- Object.assign(elements.floating.style, {
7196
- maxWidth: "".concat(availableWidth - 4 * 2, "px"),
7197
- // the padding is `4px`
7198
- maxHeight: "".concat(availableHeight - 4 * 2, "px")
7199
- // the padding is `4px`
7200
- });
7201
- }
4926
+ mainAxis: DEFAULT_TOOLTIP_DISTANCE
7202
4927
  }));
7203
-
7204
4928
  ret.push(shift({
7205
4929
  boundary: boundaryElement || void 0,
7206
4930
  rootBoundary,
7207
- padding: 4
7208
- }));
7209
- ret.push(arrow({
7210
- element: arrowRef,
7211
- padding: 2
4931
+ padding: DEFAULT_TOOLTIP_PADDING
7212
4932
  }));
4933
+ if (arrowProp) {
4934
+ ret.push(arrow({
4935
+ element: arrowRef,
4936
+ padding: DEFAULT_TOOLTIP_PADDING
4937
+ }));
4938
+ }
7213
4939
  return ret;
7214
- }, [boundaryElement, fallbackPlacements]);
4940
+ }, [arrowProp, boundaryElement, fallbackPlacements]);
7215
4941
  const {
7216
4942
  floatingStyles,
7217
4943
  placement,
@@ -7223,19 +4949,14 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
7223
4949
  placement: placementProp,
7224
4950
  whileElementsMounted: autoUpdate
7225
4951
  });
7226
- const staticSide = placement && FLOATING_STATIC_SIDES[placement.split("-")[0]];
7227
- const arrowX = (_d = middlewareData.arrow) == null ? void 0 : _d.x;
7228
- const arrowY = (_e = middlewareData.arrow) == null ? void 0 : _e.y;
7229
- const arrowStyle = useMemo(() => {
7230
- const style = {
7231
- left: arrowX !== null ? arrowX : void 0,
7232
- top: arrowY !== null ? arrowY : void 0,
7233
- right: void 0,
7234
- bottom: void 0
7235
- };
7236
- if (staticSide) style[staticSide] = -15;
7237
- return style;
7238
- }, [arrowX, arrowY, staticSide]);
4952
+ const arrowX = (_e = middlewareData.arrow) == null ? void 0 : _e.x;
4953
+ const arrowY = (_f = middlewareData.arrow) == null ? void 0 : _f.y;
4954
+ const arrowStyle = useMemo(() => ({
4955
+ left: arrowX !== null ? arrowX : void 0,
4956
+ top: arrowY !== null ? arrowY : void 0,
4957
+ right: void 0,
4958
+ bottom: void 0
4959
+ }), [arrowX, arrowY]);
7239
4960
  const tooltipId = useId();
7240
4961
  const [isOpen, setIsOpen] = useDelayedState(false);
7241
4962
  const delayGroupContext = useTooltipDelayGroup();
@@ -7245,27 +4966,55 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
7245
4966
  const closeDelayProp = typeof delay === "number" ? delay : (delay == null ? void 0 : delay.close) || 0;
7246
4967
  const openDelay = isInsideGroup ? delayGroupContext.openDelay : openDelayProp;
7247
4968
  const closeDelay = isInsideGroup ? delayGroupContext.closeDelay : closeDelayProp;
7248
- const handleIsOpenChange = useCallback(open => {
4969
+ const handleIsOpenChange = useCallback((open, immediate) => {
7249
4970
  if (isInsideGroup) {
7250
4971
  if (open) {
7251
- delayGroupContext.setIsGroupActive(open, openDelay);
7252
- delayGroupContext.setOpenTooltipId(tooltipId, openDelay);
4972
+ const groupedOpenDelay = immediate ? 0 : openDelay;
4973
+ delayGroupContext.setIsGroupActive(open, groupedOpenDelay);
4974
+ delayGroupContext.setOpenTooltipId(tooltipId, groupedOpenDelay);
7253
4975
  } else {
7254
4976
  const minimumGroupDeactivateDelay = 200;
7255
4977
  const groupDeactivateDelay = closeDelay > minimumGroupDeactivateDelay ? closeDelay : minimumGroupDeactivateDelay;
7256
4978
  delayGroupContext.setIsGroupActive(open, groupDeactivateDelay);
7257
- delayGroupContext.setOpenTooltipId(null, closeDelay);
4979
+ delayGroupContext.setOpenTooltipId(null, immediate ? 0 : closeDelay);
7258
4980
  }
7259
4981
  } else {
7260
- setIsOpen(open, open ? openDelay : closeDelay);
4982
+ const standaloneDelay = immediate ? 0 : open ? openDelay : closeDelay;
4983
+ setIsOpen(open, standaloneDelay);
7261
4984
  }
7262
4985
  }, [isInsideGroup, delayGroupContext, openDelay, tooltipId, closeDelay, setIsOpen]);
7263
- const handleBlur = useCallback(() => handleIsOpenChange(false), [handleIsOpenChange]);
7264
- const handleFocus = useCallback(() => handleIsOpenChange(true), [handleIsOpenChange]);
7265
- const handleMouseEnter = useCallback(() => handleIsOpenChange(true), [handleIsOpenChange]);
7266
- const handleMouseLeave = useCallback(() => handleIsOpenChange(false), [handleIsOpenChange]);
4986
+ const handleBlur = useCallback(e => {
4987
+ var _a3, _b2;
4988
+ handleIsOpenChange(false);
4989
+ (_b2 = (_a3 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a3.onBlur) == null ? void 0 : _b2.call(_a3, e);
4990
+ }, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]);
4991
+ const handleClick = useCallback(e => {
4992
+ var _a3, _b2;
4993
+ handleIsOpenChange(false, true);
4994
+ (_b2 = childProp == null ? void 0 : (_a3 = childProp.props).onClick) == null ? void 0 : _b2.call(_a3, e);
4995
+ }, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]);
4996
+ const handleContextMenu = useCallback(e => {
4997
+ var _a3, _b2;
4998
+ handleIsOpenChange(false, true);
4999
+ (_b2 = childProp == null ? void 0 : (_a3 = childProp.props).onContextMenu) == null ? void 0 : _b2.call(_a3, e);
5000
+ }, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]);
5001
+ const handleFocus = useCallback(e => {
5002
+ var _a3, _b2;
5003
+ handleIsOpenChange(true);
5004
+ (_b2 = (_a3 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a3.onFocus) == null ? void 0 : _b2.call(_a3, e);
5005
+ }, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]);
5006
+ const handleMouseEnter = useCallback(e => {
5007
+ var _a3, _b2;
5008
+ handleIsOpenChange(true);
5009
+ (_b2 = (_a3 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a3.onMouseEnter) == null ? void 0 : _b2.call(_a3, e);
5010
+ }, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]);
5011
+ const handleMouseLeave = useCallback(e => {
5012
+ var _a3, _b2;
5013
+ handleIsOpenChange(false);
5014
+ (_b2 = (_a3 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a3.onMouseLeave) == null ? void 0 : _b2.call(_a3, e);
5015
+ }, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]);
7267
5016
  useEffect(() => {
7268
- if (!isOpen) return;
5017
+ if (!showTooltip) return;
7269
5018
  function handleWindowMouseMove(event) {
7270
5019
  if (!referenceElement) return;
7271
5020
  const isHoveringReference = referenceElement === event.target || event.target instanceof Node && referenceElement.contains(event.target);
@@ -7278,14 +5027,26 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
7278
5027
  return () => {
7279
5028
  window.removeEventListener("mousemove", handleWindowMouseMove);
7280
5029
  };
7281
- }, [isOpen, referenceElement, handleIsOpenChange]);
5030
+ }, [showTooltip, referenceElement, handleIsOpenChange]);
7282
5031
  useEffect(() => {
7283
- if (disabled) handleIsOpenChange(false);
7284
- }, [disabled, handleIsOpenChange]);
5032
+ if (disabled && showTooltip) handleIsOpenChange(false);
5033
+ }, [disabled, handleIsOpenChange, showTooltip]);
7285
5034
  useEffect(() => {
7286
- if (!content) handleIsOpenChange(false);
7287
- }, [content, handleIsOpenChange]);
5035
+ if (!content && showTooltip) handleIsOpenChange(false);
5036
+ }, [content, handleIsOpenChange, showTooltip]);
7288
5037
  useEffect(() => refs.setReference(referenceElement), [referenceElement, refs]);
5038
+ useEffect(() => {
5039
+ if (!showTooltip) return;
5040
+ function handleWindowKeyDown(event) {
5041
+ if (event.key === "Escape") {
5042
+ handleIsOpenChange(false, true);
5043
+ }
5044
+ }
5045
+ window.addEventListener("keydown", handleWindowKeyDown);
5046
+ return () => {
5047
+ window.removeEventListener("keydown", handleWindowKeyDown);
5048
+ };
5049
+ }, [handleIsOpenChange, showTooltip]);
7289
5050
  const setArrow = useCallback(arrowEl => {
7290
5051
  arrowRef.current = arrowEl;
7291
5052
  update();
@@ -7310,9 +5071,11 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
7310
5071
  onFocus: handleFocus,
7311
5072
  onMouseEnter: handleMouseEnter,
7312
5073
  onMouseLeave: handleMouseLeave,
5074
+ onClick: handleClick,
5075
+ onContextMenu: handleContextMenu,
7313
5076
  ref: setReference
7314
5077
  });
7315
- }, [childProp, handleBlur, handleFocus, handleMouseEnter, handleMouseLeave, setReference]);
5078
+ }, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave, setReference]);
7316
5079
  if (!child) return /* @__PURE__ */jsx(Fragment, {});
7317
5080
  if (disabled) return child;
7318
5081
  const root = /* @__PURE__ */jsx(Root$a, {
@@ -7321,38 +5084,72 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
7321
5084
  ref: setFloating,
7322
5085
  style: floatingStyles,
7323
5086
  zOffset,
7324
- children: /* @__PURE__ */jsxs(Card, {
7325
- "data-ui": "Tooltip__card",
7326
- "data-placement": placement,
7327
- padding,
7328
- radius: 3,
7329
- scheme,
7330
- shadow,
7331
- children: [content, /* @__PURE__ */jsx(TooltipArrow, {
7332
- ref: setArrow,
7333
- style: arrowStyle
7334
- })]
5087
+ $maxWidth: tooltipWidth,
5088
+ children: /* @__PURE__ */jsx(ConditionalWrapper, {
5089
+ condition: animate,
5090
+ wrapper: children => /* @__PURE__ */jsx(motion.div, {
5091
+ initial: {
5092
+ opacity: 0.5,
5093
+ scale: 0.95
5094
+ },
5095
+ animate: {
5096
+ opacity: 1,
5097
+ scale: 1
5098
+ },
5099
+ exit: {
5100
+ opacity: 0,
5101
+ scale: 0.95
5102
+ },
5103
+ transition: {
5104
+ duration: 0.3,
5105
+ type: "spring"
5106
+ },
5107
+ children
5108
+ }),
5109
+ children: /* @__PURE__ */jsxs(Card, {
5110
+ "data-ui": "Tooltip__card",
5111
+ "data-placement": placement,
5112
+ padding,
5113
+ radius,
5114
+ scheme,
5115
+ shadow,
5116
+ children: [content, arrowProp && /* @__PURE__ */jsx(Arrow, {
5117
+ ref: setArrow,
5118
+ style: arrowStyle,
5119
+ width: DEFAULT_TOOLTIP_ARROW_WIDTH,
5120
+ height: DEFAULT_TOOLTIP_ARROW_HEIGHT,
5121
+ radius: DEFAULT_TOOLTIP_ARROW_RADIUS
5122
+ })]
5123
+ })
7335
5124
  })
7336
5125
  });
7337
5126
  return /* @__PURE__ */jsxs(Fragment, {
7338
- children: [child, showTooltip && /* @__PURE__ */jsx(Fragment, {
7339
- children: portal ? /* @__PURE__ */jsx(Portal, {
7340
- __unstable_name: typeof portal === "string" ? portal : void 0,
5127
+ children: [child, /* @__PURE__ */jsx(ConditionalWrapper, {
5128
+ condition: animate,
5129
+ wrapper: children => /* @__PURE__ */jsx(AnimatePresence, {
5130
+ children
5131
+ }),
5132
+ children: showTooltip && /* @__PURE__ */jsx(ConditionalWrapper, {
5133
+ condition: !!portalProp,
5134
+ wrapper: children => /* @__PURE__ */jsx(Portal, {
5135
+ __unstable_name: typeof portalProp === "string" ? portalProp : void 0,
5136
+ children
5137
+ }),
7341
5138
  children: root
7342
- }) : root
5139
+ })
7343
5140
  })]
7344
5141
  });
7345
5142
  });
7346
- var __freeze$d = Object.freeze;
7347
- var __defProp$d = Object.defineProperty;
7348
- var __template$d = (cooked, raw) => __freeze$d(__defProp$d(cooked, "raw", {
7349
- value: __freeze$d(raw || cooked.slice())
5143
+ var __freeze$e = Object.freeze;
5144
+ var __defProp$e = Object.defineProperty;
5145
+ var __template$e = (cooked, raw) => __freeze$e(__defProp$e(cooked, "raw", {
5146
+ value: __freeze$e(raw || cooked.slice())
7350
5147
  }));
7351
- var _a$d, _b$8, _c$3, _d$2;
7352
- const Root$9 = styled.div(_a$d || (_a$d = __template$d(["\n line-height: 0;\n"])));
7353
- const ListBox = styled(Box)(_b$8 || (_b$8 = __template$d(["\n & > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n"])));
7354
- const rotate = keyframes(_c$3 || (_c$3 = __template$d(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
7355
- const AnimatedSpinnerIcon = styled(SpinnerIcon)(_d$2 || (_d$2 = __template$d(["\n animation: ", " 500ms linear infinite;\n"])), rotate);
5148
+ var _a$e, _b$9, _c$3, _d$2;
5149
+ const Root$9 = styled.div(_a$e || (_a$e = __template$e(["\n line-height: 0;\n"])));
5150
+ const ListBox = styled(Box)(_b$9 || (_b$9 = __template$e(["\n & > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n"])));
5151
+ const rotate = keyframes(_c$3 || (_c$3 = __template$e(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
5152
+ const AnimatedSpinnerIcon = styled(SpinnerIcon)(_d$2 || (_d$2 = __template$e(["\n animation: ", " 500ms linear infinite;\n"])), rotate);
7356
5153
  function AutocompleteOption(props) {
7357
5154
  const {
7358
5155
  children,
@@ -7473,7 +5270,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7473
5270
  padding: paddingProp = 3,
7474
5271
  popover = EMPTY_RECORD,
7475
5272
  prefix,
7476
- radius = 3,
5273
+ radius = 2,
7477
5274
  readOnly,
7478
5275
  relatedElements,
7479
5276
  renderOption: renderOptionProp,
@@ -7497,10 +5294,10 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7497
5294
  query,
7498
5295
  value
7499
5296
  } = state;
7500
- const defaultRenderOption = useCallback(_ref23 => {
5297
+ const defaultRenderOption = useCallback(_ref8 => {
7501
5298
  let {
7502
5299
  value: value2
7503
- } = _ref23;
5300
+ } = _ref8;
7504
5301
  return /* @__PURE__ */jsx(Card, {
7505
5302
  "data-as": "button",
7506
5303
  padding: paddingProp,
@@ -7876,14 +5673,14 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7876
5673
  });
7877
5674
  });
7878
5675
  const Autocomplete = InnerAutocomplete;
7879
- var __freeze$c = Object.freeze;
7880
- var __defProp$c = Object.defineProperty;
7881
- var __template$c = (cooked, raw) => __freeze$c(__defProp$c(cooked, "raw", {
7882
- value: __freeze$c(raw || cooked.slice())
5676
+ var __freeze$d = Object.freeze;
5677
+ var __defProp$d = Object.defineProperty;
5678
+ var __template$d = (cooked, raw) => __freeze$d(__defProp$d(cooked, "raw", {
5679
+ value: __freeze$d(raw || cooked.slice())
7883
5680
  }));
7884
- var _a$c, _b$7;
7885
- const Root$8 = styled.ol(_a$c || (_a$c = __template$c(["\n margin: 0;\n padding: 0;\n display: flex;\n list-style: none;\n align-items: center;\n white-space: nowrap;\n line-height: 0;\n"])));
7886
- const ExpandButton = styled(Button)(_b$7 || (_b$7 = __template$c(["\n appearance: none;\n margin: -4px;\n"])));
5681
+ var _a$d, _b$8;
5682
+ const Root$8 = styled.ol(_a$d || (_a$d = __template$d(["\n margin: 0;\n padding: 0;\n display: flex;\n list-style: none;\n align-items: center;\n white-space: nowrap;\n line-height: 0;\n"])));
5683
+ const ExpandButton = styled(Button)(_b$8 || (_b$8 = __template$d(["\n appearance: none;\n margin: -4px;\n"])));
7887
5684
  const Breadcrumbs = forwardRef(function Breadcrumbs2(props, ref) {
7888
5685
  const {
7889
5686
  children,
@@ -7953,10 +5750,16 @@ const Breadcrumbs = forwardRef(function Breadcrumbs2(props, ref) {
7953
5750
  }, itemIndex))
7954
5751
  });
7955
5752
  });
7956
- function dialogStyle(_ref24) {
5753
+ var __freeze$c = Object.freeze;
5754
+ var __defProp$c = Object.defineProperty;
5755
+ var __template$c = (cooked, raw) => __freeze$c(__defProp$c(cooked, "raw", {
5756
+ value: __freeze$c(raw || cooked.slice())
5757
+ }));
5758
+ var _a$c, _b$7;
5759
+ function dialogStyle(_ref9) {
7957
5760
  let {
7958
5761
  theme
7959
- } = _ref24;
5762
+ } = _ref9;
7960
5763
  const color = theme.sanity.color.base;
7961
5764
  return {
7962
5765
  "&:not([hidden])": {
@@ -7985,6 +5788,10 @@ function responsiveDialogPositionStyle(props) {
7985
5788
  }
7986
5789
  }));
7987
5790
  }
5791
+ function animationDialogStyle(props) {
5792
+ if (!props.animate) return css(_a$c || (_a$c = __template$c([""])));
5793
+ return css(_b$7 || (_b$7 = __template$c(["\n @keyframes zoomIn {\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n }\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n animation: fadeIn 200ms ease-out;\n // Animates the dialog card.\n & > [data-ui='DialogCard'] {\n animation: zoomIn 200ms ease-out;\n }\n "])));
5794
+ }
7988
5795
  const key$3 = Symbol.for("@sanity/ui/context/dialog");
7989
5796
  globalScope[key$3] = globalScope[key$3] || createContext({
7990
5797
  version: 0
@@ -8003,13 +5810,13 @@ function isTargetWithinScope(boundaryElement, portalElement, target) {
8003
5810
  if (!boundaryElement || !portalElement) return true;
8004
5811
  return containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
8005
5812
  }
8006
- const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle);
5813
+ const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle);
8007
5814
  const DialogContainer = styled(Container)(_a$b || (_a$b = __template$b(["\n &:not([hidden]) {\n display: flex;\n }\n width: 100%;\n height: 100%;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"])));
8008
5815
  const DialogCardRoot = styled(Card)(_b$6 || (_b$6 = __template$b(["\n &:not([hidden]) {\n display: flex;\n }\n width: 100%;\n min-height: 0;\n max-height: 100%;\n overflow: hidden;\n overflow: clip;\n"])));
8009
5816
  const DialogLayout = styled(Flex)(_c$2 || (_c$2 = __template$b(["\n flex: 1;\n min-height: 0;\n width: 100%;\n"])));
8010
- const DialogHeader = styled(Card)(_d$1 || (_d$1 = __template$b(["\n position: relative;\n z-index: 2;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n right: 0;\n bottom: -1px;\n border-bottom: 1px solid var(--card-hairline-soft-color);\n }\n"])));
5817
+ const DialogHeader = styled(Box)(_d$1 || (_d$1 = __template$b(["\n position: relative;\n z-index: 2;\n"])));
8011
5818
  const DialogContent = styled(Box)(_e || (_e = __template$b(["\n position: relative;\n z-index: 1;\n overflow: auto;\n outline: none;\n"])));
8012
- const DialogFooter = styled(Box)(_f || (_f = __template$b(["\n position: relative;\n z-index: 3;\n border-top: 1px solid var(--card-hairline-soft-color);\n"])));
5819
+ const DialogFooter = styled(Box)(_f || (_f = __template$b(["\n position: relative;\n z-index: 3;\n"])));
8013
5820
  const DialogCard = forwardRef(function DialogCard2(props, ref) {
8014
5821
  var _a2;
8015
5822
  const {
@@ -8090,23 +5897,26 @@ const DialogCard = forwardRef(function DialogCard2(props, ref) {
8090
5897
  direction: "column",
8091
5898
  children: [showHeader && /* @__PURE__ */jsx(DialogHeader, {
8092
5899
  children: /* @__PURE__ */jsxs(Flex, {
5900
+ align: "center",
5901
+ padding: 3,
8093
5902
  children: [/* @__PURE__ */jsx(Box, {
8094
5903
  flex: 1,
8095
- padding: 4,
5904
+ padding: 2,
8096
5905
  children: header && /* @__PURE__ */jsx(Text, {
8097
5906
  id: labelId,
8098
- weight: "semibold",
5907
+ size: 1,
5908
+ weight: "medium",
8099
5909
  children: header
8100
5910
  })
8101
5911
  }), showCloseButton && /* @__PURE__ */jsx(Box, {
8102
- padding: 2,
5912
+ flex: "none",
8103
5913
  children: /* @__PURE__ */jsx(Button, {
8104
5914
  "aria-label": "Close dialog",
8105
5915
  disabled: !onClose,
8106
5916
  icon: CloseIcon,
8107
5917
  mode: "bleed",
8108
5918
  onClick: onClose,
8109
- padding: 3
5919
+ padding: 2
8110
5920
  })
8111
5921
  })]
8112
5922
  })
@@ -8140,12 +5950,13 @@ const Dialog = forwardRef(function Dialog2(props, ref) {
8140
5950
  onClickOutside,
8141
5951
  onClose,
8142
5952
  onFocus,
8143
- padding: paddingProp = 4,
5953
+ padding: paddingProp = 3,
8144
5954
  portal: portalProp,
8145
5955
  position: positionProp = dialog.position || "fixed",
8146
5956
  scheme,
8147
5957
  width: widthProp = 0,
8148
5958
  zOffset: zOffsetProp = dialog.zOffset || ((_a2 = theme.sanity.layer) == null ? void 0 : _a2.dialog.zOffset),
5959
+ animate = false,
8149
5960
  ...restProps
8150
5961
  } = props;
8151
5962
  const portal = usePortal();
@@ -8211,6 +6022,7 @@ const Dialog = forwardRef(function Dialog2(props, ref) {
8211
6022
  ref,
8212
6023
  role: "dialog",
8213
6024
  zOffset,
6025
+ animate,
8214
6026
  children: [/* @__PURE__ */jsx("div", {
8215
6027
  ref: preDivRef,
8216
6028
  tabIndex: 0
@@ -8734,7 +6546,7 @@ var __template$7 = (cooked, raw) => __freeze$7(__defProp$7(cooked, "raw", {
8734
6546
  }));
8735
6547
  var _a$7, _b$4;
8736
6548
  function selectableBaseStyle() {
8737
- return css(_a$7 || (_a$7 = __template$7(["\n background-color: inherit;\n color: inherit;\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: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n text-decoration: none;\n }\n "])));
6549
+ return css(_a$7 || (_a$7 = __template$7(["\n background-color: inherit;\n color: inherit;\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 text-decoration: none;\n }\n "])));
8738
6550
  }
8739
6551
  function selectableColorStyle(props) {
8740
6552
  var _a2, _b2;
@@ -8748,7 +6560,7 @@ function selectableColorStyle(props) {
8748
6560
  selectable
8749
6561
  } = theme.sanity.color;
8750
6562
  const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
8751
- return css(_b$4 || (_b$4 = __template$7(["\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n outline: none;\n\n /* &:is(button) */\n &[data-as='button'] {\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[aria-pressed='true'] {\n ", "\n }\n\n &[data-selected],\n &[aria-selected='true'] > & {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n ", "\n "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
6563
+ return css(_b$4 || (_b$4 = __template$7(["\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n outline: none;\n\n /* &:is(button) */\n &[data-as='button'] {\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[aria-pressed='true'] {\n ", "\n }\n\n &[data-selected],\n &[aria-selected='true'] > & {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n ", "\n "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
8752
6564
  }
8753
6565
  const Selectable = styled(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
8754
6566
  function useMenu() {
@@ -8765,7 +6577,7 @@ function MenuGroup(props) {
8765
6577
  const {
8766
6578
  as = "button",
8767
6579
  children,
8768
- fontSize,
6580
+ fontSize = 1,
8769
6581
  icon,
8770
6582
  onClick,
8771
6583
  padding = 3,
@@ -8777,6 +6589,9 @@ function MenuGroup(props) {
8777
6589
  ...restProps
8778
6590
  } = props;
8779
6591
  const menu = useMenu();
6592
+ const {
6593
+ scheme
6594
+ } = useRootTheme();
8780
6595
  const {
8781
6596
  activeElement,
8782
6597
  mount,
@@ -8865,34 +6680,31 @@ function MenuGroup(props) {
8865
6680
  "data-selected": !withinMenu && active ? "" : void 0,
8866
6681
  $radius: useArrayProp(radius),
8867
6682
  $tone: tone,
6683
+ $scheme: scheme,
8868
6684
  onClick: handleClick,
8869
6685
  onKeyDown: handleKeyDown,
8870
6686
  onMouseEnter: handleMouseEnter,
8871
6687
  ref: setRootElement,
8872
6688
  tabIndex: -1,
8873
6689
  type: as === "button" ? "button" : void 0,
8874
- children: /* @__PURE__ */jsx(Box, {
6690
+ children: /* @__PURE__ */jsxs(Flex, {
6691
+ gap: space,
8875
6692
  padding,
8876
- children: /* @__PURE__ */jsxs(Flex, {
8877
- children: [icon && /* @__PURE__ */jsxs(Text, {
6693
+ children: [icon && /* @__PURE__ */jsxs(Text, {
6694
+ size: fontSize,
6695
+ children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
6696
+ }), /* @__PURE__ */jsx(Box, {
6697
+ flex: 1,
6698
+ children: /* @__PURE__ */jsx(Text, {
8878
6699
  size: fontSize,
8879
- children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
8880
- }), /* @__PURE__ */jsx(Box, {
8881
- flex: 1,
8882
- marginLeft: icon ? space : void 0,
8883
- children: /* @__PURE__ */jsx(Text, {
8884
- size: fontSize,
8885
- textOverflow: "ellipsis",
8886
- children: text
8887
- })
8888
- }), /* @__PURE__ */jsx(Box, {
8889
- marginLeft: space,
8890
- children: /* @__PURE__ */jsx(Text, {
8891
- size: fontSize,
8892
- children: /* @__PURE__ */jsx(ChevronRightIcon, {})
8893
- })
8894
- })]
8895
- })
6700
+ textOverflow: "ellipsis",
6701
+ weight: "medium",
6702
+ children: text
6703
+ })
6704
+ }), /* @__PURE__ */jsx(Text, {
6705
+ size: fontSize,
6706
+ children: /* @__PURE__ */jsx(ChevronRightIcon, {})
6707
+ })]
8896
6708
  })
8897
6709
  })
8898
6710
  });
@@ -8902,7 +6714,7 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
8902
6714
  as = "button",
8903
6715
  children,
8904
6716
  disabled,
8905
- fontSize = 2,
6717
+ fontSize = 1,
8906
6718
  hotkeys,
8907
6719
  icon,
8908
6720
  iconRight,
@@ -8922,6 +6734,9 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
8922
6734
  tone = "default",
8923
6735
  ...restProps
8924
6736
  } = props;
6737
+ const {
6738
+ scheme
6739
+ } = useRootTheme();
8925
6740
  const menu = useMenu();
8926
6741
  const {
8927
6742
  activeElement,
@@ -8962,7 +6777,8 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
8962
6777
  forwardedAs: as,
8963
6778
  $radius: useArrayProp(radius),
8964
6779
  $padding: useArrayProp(0),
8965
- $tone: tone,
6780
+ $tone: disabled ? "default" : tone,
6781
+ $scheme: scheme,
8966
6782
  disabled,
8967
6783
  onClick: handleClick,
8968
6784
  onMouseEnter: onItemMouseEnter,
@@ -8971,38 +6787,33 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
8971
6787
  role: "menuitem",
8972
6788
  tabIndex: -1,
8973
6789
  type: as === "button" ? "button" : void 0,
8974
- children: [(icon || text || iconRight) && /* @__PURE__ */jsx(Box, {
6790
+ children: [(icon || text || iconRight) && /* @__PURE__ */jsxs(Flex, {
8975
6791
  as: "span",
6792
+ gap: space,
6793
+ align: "center",
8976
6794
  ...paddingProps,
8977
- children: /* @__PURE__ */jsxs(Flex, {
8978
- as: "span",
8979
- children: [icon && /* @__PURE__ */jsxs(Text, {
8980
- size: fontSize,
8981
- children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
8982
- }), text && /* @__PURE__ */jsx(Box, {
8983
- flex: 1,
8984
- marginLeft: icon ? space : void 0,
8985
- marginRight: iconRight ? space : void 0,
8986
- children: /* @__PURE__ */jsx(Text, {
8987
- size: fontSize,
8988
- textOverflow: "ellipsis",
8989
- children: text
8990
- })
8991
- }), hotkeys && /* @__PURE__ */jsx(Box, {
8992
- marginLeft: space,
8993
- style: {
8994
- marginTop: -4,
8995
- marginBottom: -4
8996
- },
8997
- children: /* @__PURE__ */jsx(Hotkeys, {
8998
- fontSize,
8999
- keys: hotkeys
9000
- })
9001
- }), iconRight && /* @__PURE__ */jsxs(Text, {
6795
+ children: [icon && /* @__PURE__ */jsxs(Text, {
6796
+ size: fontSize,
6797
+ children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
6798
+ }), text && /* @__PURE__ */jsx(Box, {
6799
+ flex: 1,
6800
+ children: /* @__PURE__ */jsx(Text, {
9002
6801
  size: fontSize,
9003
- children: [isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && createElement(iconRight)]
9004
- })]
9005
- })
6802
+ textOverflow: "ellipsis",
6803
+ weight: "medium",
6804
+ children: text
6805
+ })
6806
+ }), hotkeys && /* @__PURE__ */jsx(Hotkeys, {
6807
+ fontSize,
6808
+ keys: hotkeys,
6809
+ style: {
6810
+ marginTop: -4,
6811
+ marginBottom: -4
6812
+ }
6813
+ }), iconRight && /* @__PURE__ */jsxs(Text, {
6814
+ size: fontSize,
6815
+ children: [isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && createElement(iconRight)]
6816
+ })]
9006
6817
  }), children && /* @__PURE__ */jsx(Box, {
9007
6818
  as: "span",
9008
6819
  ...paddingProps,
@@ -9018,15 +6829,15 @@ var __template$6 = (cooked, raw) => __freeze$6(__defProp$6(cooked, "raw", {
9018
6829
  var _a$6, _b$3, _c$1, _d;
9019
6830
  const keyframe = keyframes(_a$6 || (_a$6 = __template$6(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
9020
6831
  const animation = css(_b$3 || (_b$3 = __template$6(["\n background-image: linear-gradient(\n to right,\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-to),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from)\n );\n background-position: 100%;\n background-size: 200% 100%;\n background-attachment: fixed;\n animation-name: ", ";\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n animation-duration: 2000ms;\n"])), keyframe);
9021
- const skeletonStyle = css(_d || (_d = __template$6(["\n opacity: ", ";\n transition: opacity 200ms ease-in;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n ", "\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n background-color: var(--card-skeleton-color-from);\n }\n"])), _ref25 => {
6832
+ const skeletonStyle = css(_d || (_d = __template$6(["\n opacity: ", ";\n transition: opacity 200ms ease-in;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n ", "\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n background-color: var(--card-skeleton-color-from);\n }\n"])), _ref10 => {
9022
6833
  let {
9023
6834
  $visible
9024
- } = _ref25;
6835
+ } = _ref10;
9025
6836
  return $visible ? 1 : 0;
9026
- }, _ref26 => {
6837
+ }, _ref11 => {
9027
6838
  let {
9028
6839
  $animated
9029
- } = _ref26;
6840
+ } = _ref11;
9030
6841
  return $animated ? animation : css(_c$1 || (_c$1 = __template$6(["\n background-color: var(--card-skeleton-color-from);\n "])));
9031
6842
  });
9032
6843
  const Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle);
@@ -9057,12 +6868,12 @@ const Skeleton = forwardRef(function Skeleton2(props, ref) {
9057
6868
  ref
9058
6869
  });
9059
6870
  });
9060
- const Root$3 = styled(Skeleton)(_ref27 => {
6871
+ const Root$3 = styled(Skeleton)(_ref12 => {
9061
6872
  let {
9062
6873
  $size,
9063
6874
  $style,
9064
6875
  theme
9065
- } = _ref27;
6876
+ } = _ref12;
9066
6877
  const {
9067
6878
  media
9068
6879
  } = theme.sanity;
@@ -9180,7 +6991,6 @@ const Tab = forwardRef(function Tab2(props, forwardedRef) {
9180
6991
  onBlur: handleBlur,
9181
6992
  onFocus: handleFocus,
9182
6993
  padding,
9183
- radius: "full",
9184
6994
  ref: setRef,
9185
6995
  role: "tab",
9186
6996
  selected,
@@ -9272,6 +7082,7 @@ function Toast(props) {
9272
7082
  closable,
9273
7083
  description,
9274
7084
  onClose,
7085
+ radius = 3,
9275
7086
  title,
9276
7087
  status,
9277
7088
  ...restProps
@@ -9283,7 +7094,7 @@ function Toast(props) {
9283
7094
  role,
9284
7095
  ...restProps,
9285
7096
  marginTop: 3,
9286
- radius: 2,
7097
+ radius,
9287
7098
  shadow: 2,
9288
7099
  tone: cardTone,
9289
7100
  children: /* @__PURE__ */jsxs(Flex, {
@@ -9294,7 +7105,8 @@ function Toast(props) {
9294
7105
  children: /* @__PURE__ */jsxs(Stack, {
9295
7106
  space: 3,
9296
7107
  children: [title && /* @__PURE__ */jsx(Text, {
9297
- weight: "semibold",
7108
+ size: 1,
7109
+ weight: "medium",
9298
7110
  children: title
9299
7111
  }), description && /* @__PURE__ */jsx(Text, {
9300
7112
  muted: true,
@@ -9410,12 +7222,12 @@ function ToastProvider(props) {
9410
7222
  paddingY,
9411
7223
  children: /* @__PURE__ */jsx(AnimatePresence, {
9412
7224
  initial: false,
9413
- children: state.map(_ref28 => {
7225
+ children: state.map(_ref13 => {
9414
7226
  let {
9415
7227
  dismiss,
9416
7228
  id,
9417
7229
  params
9418
- } = _ref28;
7230
+ } = _ref13;
9419
7231
  return /* @__PURE__ */jsx(motion.div, {
9420
7232
  animate: {
9421
7233
  opacity: 1,
@@ -9706,7 +7518,7 @@ var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", {
9706
7518
  }));
9707
7519
  var _a$1, _b, _c;
9708
7520
  function treeItemRootStyle() {
9709
- return css(_a$1 || (_a$1 = __template$1(["\n &[role='none'] > [role='treeitem'] {\n outline: none;\n cursor: default;\n border-radius: 3px;\n\n &:focus {\n position: relative;\n }\n }\n\n &[role='treeitem'] {\n outline: none;\n\n & > div {\n cursor: default;\n border-radius: 3px;\n }\n\n &:focus > div {\n position: relative;\n }\n }\n "])));
7521
+ return css(_a$1 || (_a$1 = __template$1(["\n &[role='none'] > [role='treeitem'] {\n outline: none;\n cursor: default;\n border-radius: 3px;\n\n background-color: var(--card-bg-color);\n color: var(--treeitem-fg-color);\n\n &:focus {\n position: relative;\n }\n }\n\n &[role='treeitem'] {\n outline: none;\n\n & > div {\n cursor: default;\n border-radius: 3px;\n\n background-color: var(--card-bg-color);\n color: var(--treeitem-fg-color);\n }\n\n &:focus > div {\n position: relative;\n }\n }\n "])));
9710
7522
  }
9711
7523
  function treeItemRootColorStyle(props) {
9712
7524
  const {
@@ -9719,7 +7531,7 @@ function treeItemRootColorStyle(props) {
9719
7531
  selectable
9720
7532
  } = theme.sanity.color;
9721
7533
  const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
9722
- return css(_b || (_b = __template$1(['\n /* <div role="none"><a data-ui="TreeItem__box" role="treeitem" tabIndex="0"></div> */\n &[role=\'none\'] {\n & > [role=\'treeitem\'] {\n ', "\n\n background-color: var(--card-bg-color);\n color: var(--treeitem-fg-color);\n }\n\n &[data-selected] > [role='treeitem'] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) > [role='treeitem']:not(:focus):hover {\n ", "\n }\n\n & > [role='treeitem']:focus {\n ", '\n }\n }\n }\n\n /* <div role="treeitem" tabIndex="0"><div data-ui="TreeItem__box"></div> */\n &[role=\'treeitem\'] {\n & > [data-ui=\'TreeItem__box\'] {\n ', "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n }\n\n &[data-selected] > [data-ui='TreeItem__box'] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover {\n ", "\n }\n\n &:focus > [data-ui='TreeItem__box'] {\n ", "\n }\n }\n }\n "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.selected));
7534
+ return css(_b || (_b = __template$1(['\n /* <div role="none"><a data-ui="TreeItem__box" role="treeitem" tabIndex="0"></div> */\n &[role=\'none\'] {\n & > [role=\'treeitem\'] {\n ', "\n }\n\n &[data-selected] > [role='treeitem'] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) > [role='treeitem']:not(:focus):hover {\n ", "\n }\n\n & > [role='treeitem']:focus {\n ", '\n }\n }\n }\n\n /* <div role="treeitem" tabIndex="0"><div data-ui="TreeItem__box"></div> */\n &[role=\'treeitem\'] {\n & > [data-ui=\'TreeItem__box\'] {\n ', "\n }\n\n &[data-selected] > [data-ui='TreeItem__box'] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover {\n ", "\n }\n\n &:focus > [data-ui='TreeItem__box'] {\n ", "\n }\n }\n }\n "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.selected));
9723
7535
  }
9724
7536
  function treeItemBoxStyle(props) {
9725
7537
  const {
@@ -9771,14 +7583,14 @@ const TreeItem = memo(function TreeItem2(props) {
9771
7583
  const {
9772
7584
  children,
9773
7585
  expanded: expandedProp = false,
9774
- fontSize,
7586
+ fontSize = 1,
9775
7587
  href,
9776
7588
  icon,
9777
7589
  id: idProp,
9778
7590
  linkAs,
9779
7591
  muted,
9780
7592
  onClick,
9781
- padding = 3,
7593
+ padding = 2,
9782
7594
  selected = false,
9783
7595
  space = 2,
9784
7596
  text,
@@ -9915,5 +7727,5 @@ const TreeItem = memo(function TreeItem2(props) {
9915
7727
  })]
9916
7728
  });
9917
7729
  });
9918
- export { Autocomplete, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Box, Breadcrumbs, Button, Card, Checkbox, Code, CodeSkeleton, Container, Dialog, DialogContext, DialogProvider, ElementQuery, ErrorBoundary, Flex, Grid, Heading, HeadingSkeleton, Hotkeys, Inline, KBD, Label, LabelSkeleton, Layer, LayerProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, Popover, Portal, PortalProvider, Radio, Select, Skeleton, Spinner, SrOnly, Stack, Switch, Tab, TabList, TabPanel, Text, TextArea, TextInput, TextSkeleton, ThemeColorProvider, ThemeProvider, Toast, ToastProvider, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupProvider, Tree, TreeItem, VirtualList, _ResizeObserver, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, containsOrEqualsElement, createColorTheme, focusFirstDescendant, focusLastDescendant, hexToRgb, hslToRgb, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, multiply$1 as multiply, parseColor, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen$1 as screen, studioTheme, useArrayProp, useBoundaryElement, useClickOutside, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useToast, useTooltipDelayGroup, useTree };
7730
+ export { Arrow, Autocomplete, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Box, Breadcrumbs, Button, Card, Checkbox, Code, CodeSkeleton, Container, Dialog, DialogContext, DialogProvider, ElementQuery, ErrorBoundary, Flex, Grid, Heading, HeadingSkeleton, Hotkeys, Inline, KBD, Label, LabelSkeleton, Layer, LayerProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, Popover, Portal, PortalProvider, Radio, Select, Skeleton, Spinner, SrOnly, Stack, Switch, Tab, TabList, TabPanel, Text, TextArea, TextInput, TextSkeleton, ThemeColorProvider, ThemeProvider, Toast, ToastProvider, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupProvider, Tree, TreeItem, VirtualList, _ResizeObserver, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, containsOrEqualsElement, focusFirstDescendant, focusLastDescendant, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, useArrayProp, useBoundaryElement, useClickOutside, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useToast, useTooltipDelayGroup, useTree };
9919
7731
  //# sourceMappingURL=index.esm.js.map