@sanity/ui 3.0.0-static.11 → 3.0.0-static.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +1293 -1215
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-cjs/buildCommand.js +28 -10
  4. package/dist/_chunks-cjs/buildCommand.js.map +1 -1
  5. package/dist/_chunks-es/_visual-editing.mjs +1284 -1202
  6. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  7. package/dist/_visual-editing.d.mts +528 -358
  8. package/dist/_visual-editing.d.ts +528 -358
  9. package/dist/cli.js +1 -1
  10. package/dist/css.d.mts +143 -73
  11. package/dist/css.d.ts +143 -73
  12. package/dist/css.js +329 -472
  13. package/dist/css.js.map +1 -1
  14. package/dist/css.mjs +330 -473
  15. package/dist/css.mjs.map +1 -1
  16. package/dist/index.d.mts +1362 -869
  17. package/dist/index.d.ts +1362 -869
  18. package/dist/index.js +383 -308
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +387 -312
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/sanity-palette.css +105 -1
  23. package/dist/sanity-palette.min.css +1 -0
  24. package/dist/sanity-theme.css +4571 -1
  25. package/dist/sanity-theme.min.css +1 -0
  26. package/dist/system.css +22053 -21946
  27. package/dist/system.min.css +1 -0
  28. package/dist/theme.d.mts +51 -106
  29. package/dist/theme.d.ts +51 -106
  30. package/dist/theme.js +9 -9
  31. package/dist/theme.js.map +1 -1
  32. package/dist/theme.mjs +9 -9
  33. package/dist/theme.mjs.map +1 -1
  34. package/package.json +10 -5
  35. package/src/cli/buildCommand.ts +46 -19
  36. package/src/css/_comp.ts +2 -2
  37. package/src/css/{compile/compileStyle.ts → _compileStyle.ts} +7 -7
  38. package/src/css/{system.style.ts → _system.style.ts} +3 -2
  39. package/src/css/aspects/display/display.ts +1 -0
  40. package/src/css/aspects/display/types.ts +2 -3
  41. package/src/css/aspects/flex/types.ts +4 -12
  42. package/src/css/aspects/flexItem/types.ts +1 -3
  43. package/src/css/aspects/font/types.ts +1 -3
  44. package/src/css/aspects/grid/grid.ts +1 -0
  45. package/src/css/aspects/grid/types.ts +5 -9
  46. package/src/css/aspects/gridItem/gridItem.ts +1 -1
  47. package/src/css/aspects/gridItem/types.ts +7 -18
  48. package/src/css/aspects/height/height.ts +3 -4
  49. package/src/css/aspects/inset/inset.ts +1 -0
  50. package/src/css/aspects/margin/margin.ts +1 -0
  51. package/src/css/aspects/margin/types.ts +1 -0
  52. package/src/css/aspects/maxWidth/maxWidth.ts +1 -0
  53. package/src/css/aspects/maxWidth/types.ts +1 -0
  54. package/src/css/aspects/minWidth/minWidth.ts +1 -0
  55. package/src/css/aspects/minWidth/types.ts +2 -0
  56. package/src/css/aspects/overflow/overflow.ts +1 -0
  57. package/src/css/aspects/padding/padding.ts +1 -0
  58. package/src/css/aspects/pointerEvents/pointerEvents.ts +1 -0
  59. package/src/css/aspects/position/position.ts +1 -0
  60. package/src/css/aspects/shadow/shadow.ts +1 -0
  61. package/src/css/aspects/textOverflow/textOverflow.ts +1 -0
  62. package/src/css/aspects/textOverflow/types.ts +1 -0
  63. package/src/css/aspects/width/types.ts +2 -0
  64. package/src/css/aspects/width/width.ts +1 -0
  65. package/src/css/{compile/compilePalette.ts → compilePalette.ts} +14 -10
  66. package/src/css/compileSystem.ts +7 -0
  67. package/src/css/{compile/compileTheme.ts → compileTheme.ts} +1 -0
  68. package/src/css/{compile/compileTheme_v3.ts → compileTheme_v3.ts} +123 -104
  69. package/src/css/components/breadcrumbs/breadcrumbs.ts +1 -0
  70. package/src/css/components/dialog/dialog.ts +7 -0
  71. package/src/css/components/menu/menu.ts +2 -0
  72. package/src/css/components/skeleton/skeleton.ts +4 -0
  73. package/src/css/components/skeleton/types.ts +4 -0
  74. package/src/css/components/toast/toast.ts +5 -0
  75. package/src/css/components/tree/tree.ts +1 -0
  76. package/src/css/composeClassNames.ts +4 -2
  77. package/src/css/constants.ts +2 -0
  78. package/src/css/index.ts +3 -3
  79. package/src/css/primitives/_arrow/_arrow.ts +3 -0
  80. package/src/css/primitives/_input/input.ts +2 -0
  81. package/src/css/primitives/_selectable/_selectable.style.ts +1 -2
  82. package/src/css/primitives/_selectable/selectable.ts +1 -2
  83. package/src/css/primitives/avatar/avatar.style.ts +5 -8
  84. package/src/css/primitives/avatar/avatar.ts +6 -0
  85. package/src/css/primitives/avatar/types.ts +1 -0
  86. package/src/css/primitives/box/types.ts +1 -3
  87. package/src/css/primitives/button/button.ts +4 -21
  88. package/src/css/primitives/button/index.ts +1 -0
  89. package/src/css/primitives/button/types.ts +18 -0
  90. package/src/css/primitives/card/card.style.ts +3 -6
  91. package/src/css/primitives/card/card.ts +2 -2
  92. package/src/css/primitives/card/types.ts +2 -2
  93. package/src/css/primitives/checkbox/checkbox.ts +2 -0
  94. package/src/css/primitives/container/container.ts +1 -0
  95. package/src/css/primitives/container/types.ts +1 -0
  96. package/src/css/primitives/kbd/kbd.ts +1 -0
  97. package/src/css/primitives/label/types.ts +7 -2
  98. package/src/css/primitives/popover/popover.ts +2 -0
  99. package/src/css/primitives/radio/radio.ts +1 -0
  100. package/src/css/primitives/select/select.ts +2 -0
  101. package/src/css/primitives/spinner/spinner.ts +2 -0
  102. package/src/css/primitives/switch/switch.ts +5 -0
  103. package/src/css/primitives/text/types.ts +4 -0
  104. package/src/css/primitives/textArea/textArea.ts +1 -0
  105. package/src/css/primitives/textInput/textInput.ts +1 -0
  106. package/src/css/primitives/tooltip/tooltip.ts +2 -0
  107. package/src/css/scopeClassName.ts +1 -0
  108. package/src/css/types.ts +9 -12
  109. package/src/css/util.ts +5 -0
  110. package/src/css/utils/srOnly/srOnly.ts +3 -1
  111. package/src/css/varNames.ts +131 -141
  112. package/src/css/vars.ts +1 -6
  113. package/src/theme/palette/constants.ts +2 -0
  114. package/src/theme/palette/types.ts +3 -0
  115. package/src/theme/types.ts +2 -6
  116. package/src/theme/v0/focusRing.ts +1 -3
  117. package/src/theme/v0/font.ts +6 -18
  118. package/src/theme/v0/layer.ts +1 -3
  119. package/src/theme/v0/shadow.ts +2 -6
  120. package/src/theme/v2/avatar.ts +1 -3
  121. package/src/theme/v2/color/_system.ts +1 -3
  122. package/src/theme/v2/color/avatar.ts +2 -6
  123. package/src/theme/v2/color/badge.ts +2 -6
  124. package/src/theme/v2/color/button.ts +3 -9
  125. package/src/theme/v2/color/color.ts +3 -9
  126. package/src/theme/v2/color/input.ts +3 -9
  127. package/src/theme/v2/color/kbd.ts +1 -3
  128. package/src/theme/v2/color/selectable.ts +2 -6
  129. package/src/theme/v2/color/state.ts +1 -3
  130. package/src/theme/v2/color/syntax.ts +1 -3
  131. package/src/theme/v2/input.ts +1 -3
  132. package/src/theme/v2/theme.ts +2 -6
  133. package/src/theme/v3/buildTheme_v3.ts +1 -0
  134. package/src/theme/v3/color/color.ts +6 -4
  135. package/src/theme/v3/color/renderColor.ts +4 -1
  136. package/src/theme/v3/defaultTokens.ts +1 -0
  137. package/src/theme/v3/resolveTokens.ts +9 -9
  138. package/src/ui/RootClassNames.tsx +3 -0
  139. package/src/ui/StyleTags.tsx +3 -1
  140. package/src/ui/_compat/theme/themeColorProvider.tsx +2 -6
  141. package/src/ui/_compat/theme/themeProvider.tsx +2 -6
  142. package/src/ui/_compat/theme/types.ts +1 -3
  143. package/src/ui/_compat/theme/useRootTheme.ts +1 -3
  144. package/src/ui/_compat/theme/useTheme.ts +2 -6
  145. package/src/ui/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
  146. package/src/ui/components/autocomplete/autocomplete.tsx +86 -114
  147. package/src/ui/components/autocomplete/autocompleteOption.tsx +2 -0
  148. package/src/ui/components/autocomplete/types.ts +3 -8
  149. package/src/ui/components/breadcrumbs/breadcrumbs.tsx +27 -21
  150. package/src/ui/components/dialog/dialog.tsx +89 -291
  151. package/src/ui/components/dialog/dialogCard.tsx +183 -0
  152. package/src/ui/components/dialog/isTargetWithinScope.ts +14 -0
  153. package/src/ui/components/hotkeys/hotkeys.tsx +33 -15
  154. package/src/ui/components/menu/__workshop__/asComponent.tsx +6 -6
  155. package/src/ui/components/menu/menu.tsx +27 -33
  156. package/src/ui/components/menu/menuButton.tsx +10 -14
  157. package/src/ui/components/menu/menuDivider.tsx +25 -13
  158. package/src/ui/components/menu/menuGroup.tsx +34 -26
  159. package/src/ui/components/menu/menuItem.tsx +51 -40
  160. package/src/ui/components/skeleton/codeSkeleton.tsx +53 -0
  161. package/src/ui/components/skeleton/headingSkeleton.tsx +52 -0
  162. package/src/ui/components/skeleton/index.ts +3 -0
  163. package/src/ui/components/skeleton/labelSkeleton.tsx +51 -0
  164. package/src/ui/components/skeleton/skeleton.tsx +39 -16
  165. package/src/ui/components/skeleton/textSkeleton.tsx +31 -110
  166. package/src/ui/components/tab/tab.tsx +23 -19
  167. package/src/ui/components/tab/tabList.tsx +34 -33
  168. package/src/ui/components/tab/tabPanel.tsx +25 -19
  169. package/src/ui/components/toast/toast.tsx +21 -16
  170. package/src/ui/components/toast/toastLayer.tsx +28 -10
  171. package/src/ui/components/toast/toastProvider.tsx +2 -6
  172. package/src/ui/components/toast/types.ts +2 -6
  173. package/src/ui/components/toast/useToast.ts +1 -3
  174. package/src/ui/components/tree/tree.tsx +194 -187
  175. package/src/ui/components/tree/treeGroup.tsx +25 -5
  176. package/src/ui/components/tree/treeItem.tsx +35 -23
  177. package/src/ui/hooks/useClickOutside.ts +2 -6
  178. package/src/ui/hooks/useClickOutsideEvent.ts +3 -9
  179. package/src/ui/primitives/_selectable/selectable.tsx +33 -20
  180. package/src/ui/primitives/avatar/avatar.tsx +28 -31
  181. package/src/ui/primitives/avatar/avatarCounter.tsx +33 -25
  182. package/src/ui/primitives/avatar/avatarStack.tsx +31 -24
  183. package/src/ui/primitives/avatar/types.ts +2 -0
  184. package/src/ui/primitives/badge/__workshop__/props.tsx +1 -9
  185. package/src/ui/primitives/badge/__workshop__/tones.tsx +1 -6
  186. package/src/ui/primitives/badge/badge.tsx +33 -32
  187. package/src/ui/primitives/badge/types.ts +2 -1
  188. package/src/ui/primitives/box/box.tsx +59 -29
  189. package/src/ui/primitives/button/__workshop__/sanityUploadButton.tsx +3 -3
  190. package/src/ui/primitives/button/__workshop__/uploadButton.tsx +2 -1
  191. package/src/ui/primitives/button/button.test.tsx +1 -15
  192. package/src/ui/primitives/button/button.tsx +64 -70
  193. package/src/ui/primitives/card/__workshop__/asComponent.tsx +3 -3
  194. package/src/ui/primitives/card/card.tsx +22 -22
  195. package/src/ui/primitives/card/cardProvider.tsx +2 -0
  196. package/src/ui/primitives/checkbox/checkbox.tsx +26 -15
  197. package/src/ui/primitives/code/code.tsx +24 -22
  198. package/src/ui/primitives/container/container.tsx +26 -15
  199. package/src/ui/primitives/flex/flex.tsx +21 -19
  200. package/src/ui/primitives/grid/grid.tsx +21 -16
  201. package/src/ui/primitives/heading/heading.tsx +42 -19
  202. package/src/ui/primitives/inline/inline.tsx +26 -23
  203. package/src/ui/primitives/kbd/kbd.tsx +25 -23
  204. package/src/ui/primitives/label/label.tsx +41 -26
  205. package/src/ui/primitives/popover/popover.tsx +281 -277
  206. package/src/ui/primitives/popover/popoverCard.tsx +119 -118
  207. package/src/ui/primitives/radio/radio.tsx +30 -14
  208. package/src/ui/primitives/select/select.tsx +24 -16
  209. package/src/ui/primitives/spinner/animatedSpinnerIcon.tsx +4 -2
  210. package/src/ui/primitives/spinner/spinner.tsx +24 -12
  211. package/src/ui/primitives/stack/stack.tsx +27 -18
  212. package/src/ui/primitives/switch/switch.tsx +31 -14
  213. package/src/ui/primitives/text/text.tsx +42 -24
  214. package/src/ui/primitives/textArea/textArea.tsx +33 -18
  215. package/src/ui/primitives/textInput/textInput.tsx +28 -40
  216. package/src/ui/primitives/tooltip/constants.ts +1 -1
  217. package/src/ui/primitives/tooltip/tooltip.tsx +76 -59
  218. package/src/ui/primitives/tooltip/tooltipCard.tsx +89 -82
  219. package/src/ui/primitives/types.ts +1 -3
  220. package/src/ui/types/avatar.ts +3 -6
  221. package/src/ui/types/badge.ts +1 -3
  222. package/src/ui/types/button.ts +1 -3
  223. package/src/ui/types/card.ts +1 -3
  224. package/src/ui/types/dialog.ts +1 -3
  225. package/src/ui/types/props.ts +20 -10
  226. package/src/ui/utils/arrow/arrow.tsx +40 -14
  227. package/src/ui/utils/boundaryElement/boundaryElementProvider.tsx +2 -6
  228. package/src/ui/utils/boundaryElement/types.ts +1 -3
  229. package/src/ui/utils/boundaryElement/useBoundaryElement.ts +1 -3
  230. package/src/ui/utils/elementQuery/elementQuery.tsx +36 -14
  231. package/src/ui/utils/errorBoundary.tsx +2 -0
  232. package/src/ui/utils/index.ts +0 -1
  233. package/src/ui/utils/layer/layer.tsx +23 -93
  234. package/src/ui/utils/layer/layerCard.tsx +92 -0
  235. package/src/ui/utils/layer/layerProvider.tsx +2 -6
  236. package/src/ui/utils/layer/useLayer.ts +1 -3
  237. package/src/ui/utils/portal/portal.ts +2 -6
  238. package/src/ui/utils/portal/portalProvider.tsx +2 -6
  239. package/src/ui/utils/portal/types.ts +1 -3
  240. package/src/ui/utils/portal/usePortal.ts +1 -3
  241. package/src/ui/utils/srOnly/srOnly.tsx +25 -20
  242. package/src/ui/utils/virtualList/virtualList.tsx +36 -24
  243. package/src/css/compile/compileRule.ts +0 -97
  244. package/src/css/compile/compileRules.test.ts +0 -36
  245. package/src/css/compile/compileRules.ts +0 -43
  246. package/src/css/compile/compileSystem.ts +0 -7
  247. package/src/css/compile/types.ts +0 -6
  248. package/src/css/primitives/_selectable/_contants.ts +0 -11
  249. package/src/css/primitives/card/_constants.ts +0 -13
  250. package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
  251. package/src/ui/utils/conditionalWrapper/index.ts +0 -1
package/dist/theme.d.ts CHANGED
@@ -9,9 +9,7 @@ export declare const AVATAR_SIZE: readonly [0, 1, 2, 3]
9
9
  /** @public */
10
10
  export declare type AvatarSize = (typeof AVATAR_SIZE)[number]
11
11
 
12
- /**
13
- * @public
14
- */
12
+ /** @public */
15
13
  export declare type BaseTheme = RootTheme
16
14
 
17
15
  /** @internal */
@@ -20,6 +18,7 @@ export declare function buildColor_v3(tokens: ColorTokens): ThemeColor_v3
20
18
  /** @internal */
21
19
  export declare function buildTheme(_config?: ThemeConfig): RootTheme
22
20
 
21
+ /** @public */
23
22
  export declare function buildTheme_v3(options?: ThemeOptions): Theme_v3
24
23
 
25
24
  /** @public */
@@ -282,8 +281,10 @@ export declare function createColorTheme(
282
281
  */
283
282
  export declare type CSSObject = StyledObject<any>
284
283
 
285
- declare type CSSVariableKey = `--${string}`
284
+ /** @public */
285
+ export declare type CSSVariableKey = `--${string}`
286
286
 
287
+ /** @internal */
287
288
  export declare const defaultTokens: PartialTokens<Tokens>
288
289
 
289
290
  /** @public */
@@ -362,8 +363,10 @@ export declare interface HSL {
362
363
  */
363
364
  export declare function hslToRgb(hsl: HSL): RGB
364
365
 
366
+ /** @public */
365
367
  export declare type Hue = (typeof HUES)[number]
366
368
 
369
+ /** @public */
367
370
  export declare const HUES: readonly [
368
371
  'gray',
369
372
  'blue',
@@ -457,11 +460,13 @@ export declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6, 'full']
457
460
  /** @public */
458
461
  export declare type Radius = (typeof RADIUS)[number]
459
462
 
463
+ /** @public */
460
464
  export declare function renderColor(
461
465
  token: [ColorToken, ColorToken],
462
466
  context: RenderColorContext,
463
467
  ): string
464
468
 
469
+ /** @public */
465
470
  export declare interface RenderColorContext {
466
471
  bgVar: CSSVariableKey
467
472
  hue: Hue
@@ -512,9 +517,7 @@ export declare function rgbToHex(color: RGB | RGBA): string
512
517
  */
513
518
  export declare function rgbToHsl({r, g, b}: RGB): HSL
514
519
 
515
- /**
516
- * @public
517
- */
520
+ /** @public */
518
521
  export declare interface RootTheme extends RootTheme_v0 {
519
522
  v2?: RootTheme_v2
520
523
  v3?: Theme_v3
@@ -585,9 +588,7 @@ export declare interface RootTheme_v0 {
585
588
  styles?: ThemeStyles
586
589
  }
587
590
 
588
- /**
589
- * @public
590
- */
591
+ /** @public */
591
592
  export declare interface RootTheme_v2 {
592
593
  _version: 2
593
594
  avatar: ThemeAvatar_v2
@@ -710,9 +711,7 @@ export declare const THEME_COLOR_STATES: readonly [
710
711
  'disabled',
711
712
  ]
712
713
 
713
- /**
714
- * @public
715
- */
714
+ /** @public */
716
715
  export declare type Theme_v2 = Omit<RootTheme_v2, 'color'> & {
717
716
  color: ThemeColorCard_v2
718
717
  /**
@@ -770,9 +769,7 @@ export declare interface ThemeAvatar {
770
769
  }[]
771
770
  }
772
771
 
773
- /**
774
- * @public
775
- */
772
+ /** @public */
776
773
  export declare interface ThemeAvatar_v2 {
777
774
  sizes: {
778
775
  /** Spacing between avatars in an <AvatarStack> component (px) */
@@ -783,9 +780,7 @@ export declare interface ThemeAvatar_v2 {
783
780
  focusRing: ThemeFocusRing
784
781
  }
785
782
 
786
- /**
787
- * @public
788
- */
783
+ /** @public */
789
784
  export declare type ThemeBoxShadow = [number, number, number, number]
790
785
 
791
786
  /**
@@ -805,19 +800,16 @@ export declare interface ThemeColor extends Partial<Omit<ThemeColorGenericState,
805
800
  syntax: ThemeColorSyntax
806
801
  }
807
802
 
803
+ /** @public */
808
804
  export declare type ThemeColor_v3 = Record<ThemeColorSchemeKey, ThemeColorScheme_v3>
809
805
 
810
- /**
811
- * @public
812
- */
806
+ /** @public */
813
807
  export declare type ThemeColorAvatar_v2 = Record<ThemeColorAvatarColorKey, ThemeColorAvatarHue_v2>
814
808
 
815
809
  /** @public */
816
810
  export declare type ThemeColorAvatarColorKey = (typeof THEME_COLOR_AVATAR_COLORS)[number]
817
811
 
818
- /**
819
- * @public
820
- */
812
+ /** @public */
821
813
  export declare interface ThemeColorAvatarHue_v2 {
822
814
  _blend?: ThemeColorBlendModeKey
823
815
  bg: string
@@ -846,9 +838,7 @@ export declare interface ThemeColorAvatarTokens {
846
838
  'cyan'?: ThemeColorAvatarHueTokens
847
839
  }
848
840
 
849
- /**
850
- * @public
851
- */
841
+ /** @public */
852
842
  export declare type ThemeColorBadge_v2 = Record<ThemeColorStateToneKey, ThemeColorBadgeTone_v2>
853
843
 
854
844
  /** @public */
@@ -856,9 +846,7 @@ export declare type ThemeColorBadgeTokens = Partial<
856
846
  Record<'*' | ThemeColorStateToneKey, ThemeColorBadgeToneTokens>
857
847
  >
858
848
 
859
- /**
860
- * @public
861
- */
849
+ /** @public */
862
850
  export declare interface ThemeColorBadgeTone_v2 {
863
851
  bg: string
864
852
  fg: string
@@ -978,14 +966,10 @@ export declare interface ThemeColorButton {
978
966
  bleed: ThemeColorButtonTones
979
967
  }
980
968
 
981
- /**
982
- * @public
983
- */
969
+ /** @public */
984
970
  export declare type ThemeColorButton_v2 = Record<ThemeColorButtonModeKey, ThemeColorButtonMode_v2>
985
971
 
986
- /**
987
- * @public
988
- */
972
+ /** @public */
989
973
  export declare type ThemeColorButtonMode_v2 = Record<
990
974
  ThemeColorStateToneKey,
991
975
  ThemeColorButtonTone_v2
@@ -1018,9 +1002,7 @@ export declare interface ThemeColorButtonTokens
1018
1002
  _hue?: ColorHueKey
1019
1003
  }
1020
1004
 
1021
- /**
1022
- * @public
1023
- */
1005
+ /** @public */
1024
1006
  export declare type ThemeColorButtonTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
1025
1007
 
1026
1008
  /**
@@ -1048,9 +1030,7 @@ export declare interface ThemeColorCard {
1048
1030
  disabled: ThemeColorGenericState
1049
1031
  }
1050
1032
 
1051
- /**
1052
- * @public
1053
- */
1033
+ /** @public */
1054
1034
  export declare interface ThemeColorCard_v2 extends ThemeColorState_v2 {
1055
1035
  /** @internal */
1056
1036
  _blend: ThemeColorBlendModeKey
@@ -1064,6 +1044,7 @@ export declare interface ThemeColorCard_v2 extends ThemeColorState_v2 {
1064
1044
  syntax: ThemeColorSyntax
1065
1045
  }
1066
1046
 
1047
+ /** @public */
1067
1048
  export declare interface ThemeColorCard_v3 {
1068
1049
  _hue: Hue
1069
1050
  avatar: ThemeColorAvatar_v2
@@ -1133,6 +1114,7 @@ export declare type ThemeColorCardState = ThemeColorGenericState
1133
1114
  /** @public */
1134
1115
  export declare type ThemeColorCardToneKey = (typeof THEME_COLOR_CARD_TONES)[number]
1135
1116
 
1117
+ /** @public */
1136
1118
  export declare interface ThemeColorElement {
1137
1119
  _hue: Hue
1138
1120
  bg: {
@@ -1192,14 +1174,10 @@ export declare interface ThemeColorInput {
1192
1174
  invalid: ThemeColorInputStates
1193
1175
  }
1194
1176
 
1195
- /**
1196
- * @public
1197
- */
1177
+ /** @public */
1198
1178
  export declare type ThemeColorInput_v2 = Record<ThemeColorInputModeKey, ThemeColorInputMode_v2>
1199
1179
 
1200
- /**
1201
- * @public
1202
- */
1180
+ /** @public */
1203
1181
  export declare type ThemeColorInputMode_v2 = Record<
1204
1182
  ThemeColorInputStateKey,
1205
1183
  ThemeColorInputState_v2
@@ -1221,9 +1199,7 @@ export declare interface ThemeColorInputState {
1221
1199
  placeholder: string
1222
1200
  }
1223
1201
 
1224
- /**
1225
- * @public
1226
- */
1202
+ /** @public */
1227
1203
  export declare interface ThemeColorInputState_v2 {
1228
1204
  _blend?: ThemeColorBlendModeKey
1229
1205
  bg: string
@@ -1268,9 +1244,7 @@ export declare interface ThemeColorInputTokens
1268
1244
  _hue?: ColorHueKey
1269
1245
  }
1270
1246
 
1271
- /**
1272
- * @public
1273
- */
1247
+ /** @public */
1274
1248
  export declare interface ThemeColorKBD {
1275
1249
  bg: string
1276
1250
  fg: string
@@ -1326,18 +1300,15 @@ export declare type ThemeColorPalette = {
1326
1300
  */
1327
1301
  export declare type ThemeColorScheme = Record<ThemeColorName, ThemeColor>
1328
1302
 
1329
- /**
1330
- * @public
1331
- */
1303
+ /** @public */
1332
1304
  export declare type ThemeColorScheme_v2 = Record<ThemeColorCardToneKey, ThemeColorCard_v2>
1333
1305
 
1306
+ /** @public */
1334
1307
  export declare interface ThemeColorScheme_v3 {
1335
1308
  card: Record<ThemeColorCardToneKey, ThemeColorCard_v3>
1336
1309
  }
1337
1310
 
1338
- /**
1339
- * @public
1340
- */
1311
+ /** @public */
1341
1312
  export declare type ThemeColorSchemeKey = (typeof THEME_COLOR_SCHEMES)[number]
1342
1313
 
1343
1314
  /**
@@ -1346,9 +1317,7 @@ export declare type ThemeColorSchemeKey = (typeof THEME_COLOR_SCHEMES)[number]
1346
1317
  */
1347
1318
  export declare type ThemeColorSchemes = Record<ThemeColorSchemeKey, ThemeColorScheme>
1348
1319
 
1349
- /**
1350
- * @public
1351
- */
1320
+ /** @public */
1352
1321
  export declare type ThemeColorSchemes_v2 = Record<ThemeColorSchemeKey, ThemeColorScheme_v2>
1353
1322
 
1354
1323
  /**
@@ -1363,9 +1332,7 @@ export declare interface ThemeColorSelectable {
1363
1332
  critical: ThemeColorSelectableStates
1364
1333
  }
1365
1334
 
1366
- /**
1367
- * @public
1368
- */
1335
+ /** @public */
1369
1336
  export declare type ThemeColorSelectable_v2 = Record<
1370
1337
  ThemeColorStateToneKey,
1371
1338
  ThemeColorSelectableTone_v2
@@ -1389,9 +1356,7 @@ export declare interface ThemeColorSelectableStates {
1389
1356
  disabled: ThemeColorSelectableState
1390
1357
  }
1391
1358
 
1392
- /**
1393
- * @public
1394
- */
1359
+ /** @public */
1395
1360
  export declare type ThemeColorSelectableTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
1396
1361
 
1397
1362
  /** @public */
@@ -1439,9 +1404,7 @@ export declare type ThemeColorSpot = Record<ThemeColorSpotKey, string>
1439
1404
  */
1440
1405
  export declare type ThemeColorSpotKey = ThemeColorAvatarColorKey
1441
1406
 
1442
- /**
1443
- * @public
1444
- */
1407
+ /** @public */
1445
1408
  export declare interface ThemeColorState_v2 {
1446
1409
  /** @internal */
1447
1410
  _blend?: ThemeColorBlendModeKey
@@ -1524,9 +1487,7 @@ export declare interface ThemeColorStateTokens {
1524
1487
  /** @public */
1525
1488
  export declare type ThemeColorStateToneKey = (typeof THEME_COLOR_STATE_TONES)[number]
1526
1489
 
1527
- /**
1528
- * @public
1529
- */
1490
+ /** @public */
1530
1491
  export declare interface ThemeColorSyntax {
1531
1492
  atrule: string
1532
1493
  attrName: string
@@ -1591,8 +1552,10 @@ export declare type ThemeColorTokenValue = [ColorConfigValue, ColorConfigValue]
1591
1552
  */
1592
1553
  export declare type ThemeColorToneKey = ThemeColorName
1593
1554
 
1555
+ /** @public */
1594
1556
  export declare type ThemeColorVariant = Record<ThemeColorStateToneKey, ThemeColorElement>
1595
1557
 
1558
+ /** @public */
1596
1559
  export declare type ThemeColorVariantKey = 'tinted' | 'solid'
1597
1560
 
1598
1561
  /** @public */
@@ -1631,17 +1594,13 @@ export declare interface ThemeConfig {
1631
1594
  /** @public */
1632
1595
  export declare type ThemeEntry = [`--${string}`, string]
1633
1596
 
1634
- /**
1635
- * @public
1636
- */
1597
+ /** @public */
1637
1598
  export declare interface ThemeFocusRing {
1638
1599
  offset: number
1639
1600
  width: number
1640
1601
  }
1641
1602
 
1642
- /**
1643
- * @public
1644
- */
1603
+ /** @public */
1645
1604
  export declare interface ThemeFont {
1646
1605
  family: string
1647
1606
  featureSettings?: string
@@ -1651,14 +1610,10 @@ export declare interface ThemeFont {
1651
1610
  horizontalOffset?: number
1652
1611
  }
1653
1612
 
1654
- /**
1655
- * @public
1656
- */
1613
+ /** @public */
1657
1614
  export declare type ThemeFontKey = 'code' | 'heading' | 'label' | 'text'
1658
1615
 
1659
- /**
1660
- * @public
1661
- */
1616
+ /** @public */
1662
1617
  export declare interface ThemeFonts {
1663
1618
  code: ThemeFont
1664
1619
  heading: ThemeFont
@@ -1666,9 +1621,7 @@ export declare interface ThemeFonts {
1666
1621
  text: ThemeFont
1667
1622
  }
1668
1623
 
1669
- /**
1670
- * @public
1671
- */
1624
+ /** @public */
1672
1625
  export declare interface ThemeFontSize {
1673
1626
  ascenderHeight: number
1674
1627
  descenderHeight: number
@@ -1678,9 +1631,7 @@ export declare interface ThemeFontSize {
1678
1631
  lineHeight: number
1679
1632
  }
1680
1633
 
1681
- /**
1682
- * @public
1683
- */
1634
+ /** @public */
1684
1635
  export declare interface ThemeFontWeight {
1685
1636
  regular: number
1686
1637
  medium: number
@@ -1688,9 +1639,7 @@ export declare interface ThemeFontWeight {
1688
1639
  bold: number
1689
1640
  }
1690
1641
 
1691
- /**
1692
- * @public
1693
- */
1642
+ /** @public */
1694
1643
  export declare type ThemeFontWeightKey = 'regular' | 'medium' | 'semibold' | 'bold'
1695
1644
 
1696
1645
  /**
@@ -1717,9 +1666,7 @@ export declare interface ThemeInput {
1717
1666
  }
1718
1667
  }
1719
1668
 
1720
- /**
1721
- * @public
1722
- */
1669
+ /** @public */
1723
1670
  export declare interface ThemeInput_v2 {
1724
1671
  checkbox: {
1725
1672
  size: number
@@ -1749,9 +1696,7 @@ export declare interface ThemeInput_v2 {
1749
1696
  }
1750
1697
  }
1751
1698
 
1752
- /**
1753
- * @public
1754
- */
1699
+ /** @public */
1755
1700
  export declare interface ThemeLayer {
1756
1701
  dialog: {
1757
1702
  zOffset: number
@@ -1770,9 +1715,7 @@ export declare interface ThemeOptions {
1770
1715
  tokens?: PartialTokens<Tokens>
1771
1716
  }
1772
1717
 
1773
- /**
1774
- * @public
1775
- */
1718
+ /** @public */
1776
1719
  export declare interface ThemeShadow {
1777
1720
  umbra: ThemeBoxShadow
1778
1721
  penumbra: ThemeBoxShadow
@@ -1791,8 +1734,10 @@ export declare interface ThemeStyles {
1791
1734
  }
1792
1735
  }
1793
1736
 
1737
+ /** @public */
1794
1738
  export declare type Tint = (typeof TINTS)[number]
1795
1739
 
1740
+ /** @public */
1796
1741
  export declare const TINTS: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]
1797
1742
 
1798
1743
  /** @internal */
package/dist/theme.js CHANGED
@@ -1938,47 +1938,47 @@ function resolveCardColorTokens(tokens) {
1938
1938
  gray: {
1939
1939
  _hue: tokens?.avatar?.gray?._hue ?? "gray",
1940
1940
  bg: tokens?.avatar?.gray?.bg ?? ["400", "500"],
1941
- fg: tokens?.avatar?.gray?.fg ?? ["900", "900"]
1941
+ fg: tokens?.avatar?.gray?.fg ?? ["900", "white"]
1942
1942
  },
1943
1943
  blue: {
1944
1944
  _hue: tokens?.avatar?.blue?._hue ?? "blue",
1945
1945
  bg: tokens?.avatar?.blue?.bg ?? ["400", "500"],
1946
- fg: tokens?.avatar?.blue?.fg ?? ["900", "900"]
1946
+ fg: tokens?.avatar?.blue?.fg ?? ["900", "white"]
1947
1947
  },
1948
1948
  purple: {
1949
1949
  _hue: tokens?.avatar?.purple?._hue ?? "purple",
1950
1950
  bg: tokens?.avatar?.purple?.bg ?? ["400", "500"],
1951
- fg: tokens?.avatar?.purple?.fg ?? ["900", "900"]
1951
+ fg: tokens?.avatar?.purple?.fg ?? ["900", "white"]
1952
1952
  },
1953
1953
  magenta: {
1954
1954
  _hue: tokens?.avatar?.magenta?._hue ?? "magenta",
1955
1955
  bg: tokens?.avatar?.magenta?.bg ?? ["400", "500"],
1956
- fg: tokens?.avatar?.magenta?.fg ?? ["900", "900"]
1956
+ fg: tokens?.avatar?.magenta?.fg ?? ["900", "white"]
1957
1957
  },
1958
1958
  red: {
1959
1959
  _hue: tokens?.avatar?.red?._hue ?? "red",
1960
1960
  bg: tokens?.avatar?.red?.bg ?? ["400", "500"],
1961
- fg: tokens?.avatar?.red?.fg ?? ["900", "900"]
1961
+ fg: tokens?.avatar?.red?.fg ?? ["900", "white"]
1962
1962
  },
1963
1963
  orange: {
1964
1964
  _hue: tokens?.avatar?.orange?._hue ?? "orange",
1965
1965
  bg: tokens?.avatar?.orange?.bg ?? ["400", "500"],
1966
- fg: tokens?.avatar?.orange?.fg ?? ["900", "900"]
1966
+ fg: tokens?.avatar?.orange?.fg ?? ["900", "white"]
1967
1967
  },
1968
1968
  yellow: {
1969
1969
  _hue: tokens?.avatar?.yellow?._hue ?? "yellow",
1970
1970
  bg: tokens?.avatar?.yellow?.bg ?? ["400", "500"],
1971
- fg: tokens?.avatar?.yellow?.fg ?? ["900", "900"]
1971
+ fg: tokens?.avatar?.yellow?.fg ?? ["900", "white"]
1972
1972
  },
1973
1973
  green: {
1974
1974
  _hue: tokens?.avatar?.green?._hue ?? "green",
1975
1975
  bg: tokens?.avatar?.green?.bg ?? ["400", "500"],
1976
- fg: tokens?.avatar?.green?.fg ?? ["900", "900"]
1976
+ fg: tokens?.avatar?.green?.fg ?? ["900", "white"]
1977
1977
  },
1978
1978
  cyan: {
1979
1979
  _hue: tokens?.avatar?.cyan?._hue ?? "cyan",
1980
1980
  bg: tokens?.avatar?.cyan?.bg ?? ["400", "500"],
1981
- fg: tokens?.avatar?.cyan?.fg ?? ["900", "900"]
1981
+ fg: tokens?.avatar?.cyan?.fg ?? ["900", "white"]
1982
1982
  }
1983
1983
  },
1984
1984
  backdrop: tokens?.backdrop ?? ["900", "100"],