@sanity/ui 3.0.0-static.0 → 3.0.0-static.1

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 (216) hide show
  1. package/dist/_chunks-cjs/buildCommand.js +1387 -681
  2. package/dist/_chunks-cjs/buildCommand.js.map +1 -1
  3. package/dist/cli.js +4 -2
  4. package/dist/cli.js.map +1 -1
  5. package/dist/css.d.mts +131 -12
  6. package/dist/css.d.ts +131 -12
  7. package/dist/css.esm.js +1450 -791
  8. package/dist/css.esm.js.map +1 -1
  9. package/dist/css.js +1449 -790
  10. package/dist/css.js.map +1 -1
  11. package/dist/css.mjs +1450 -791
  12. package/dist/css.mjs.map +1 -1
  13. package/dist/index.d.mts +84 -76
  14. package/dist/index.d.ts +84 -76
  15. package/dist/index.esm.js +2734 -3146
  16. package/dist/index.esm.js.map +1 -1
  17. package/dist/index.js +2733 -3145
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +2734 -3146
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/sanity-theme.css +1 -1
  22. package/dist/system.css +1590 -1158
  23. package/dist/theme.esm.js +1565 -452
  24. package/dist/theme.esm.js.map +1 -1
  25. package/dist/theme.js +1599 -484
  26. package/dist/theme.js.map +1 -1
  27. package/dist/theme.mjs +1565 -452
  28. package/dist/theme.mjs.map +1 -1
  29. package/package.json +22 -22
  30. package/src/core/__workshop__/constants.ts +14 -5
  31. package/src/core/__workshop__/fontsPlugin.tsx +1 -1
  32. package/src/core/_compat/index.ts +2 -0
  33. package/src/core/{styles → _compat/styles}/box/boxStyle.ts +1 -1
  34. package/src/core/{styles → _compat/styles}/box/types.ts +1 -1
  35. package/src/core/{styles → _compat/styles}/card/_cardColorStyle.ts +2 -2
  36. package/src/core/{styles → _compat/styles}/flex/flexItemStyle.ts +1 -1
  37. package/src/core/{styles → _compat/styles}/font/types.ts +1 -1
  38. package/src/core/{styles → _compat/styles}/grid/types.ts +1 -1
  39. package/src/core/{styles → _compat/styles}/helpers.ts +1 -1
  40. package/src/core/{styles → _compat/styles}/input/textInputStyle.ts +2 -2
  41. package/src/core/{styles → _compat/styles}/radius/types.ts +1 -1
  42. package/src/core/{styles → _compat/styles}/shadow/shadowStyle.ts +1 -1
  43. package/src/core/components/autocomplete/__workshop__/custom.tsx +5 -4
  44. package/src/core/components/autocomplete/__workshop__/example.tsx +3 -2
  45. package/src/core/components/autocomplete/autocomplete.tsx +5 -5
  46. package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
  47. package/src/core/components/dialog/__workshop__/props.tsx +2 -0
  48. package/src/core/components/dialog/dialog.tsx +1 -5
  49. package/src/core/components/hotkeys/hotkeys.tsx +1 -1
  50. package/src/core/components/menu/menu.tsx +8 -10
  51. package/src/core/components/menu/menuDivider.tsx +16 -0
  52. package/src/core/components/menu/menuGroup.tsx +2 -8
  53. package/src/core/components/menu/menuItem.tsx +1 -1
  54. package/src/core/components/skeleton/skeleton.tsx +14 -20
  55. package/src/core/components/skeleton/textSkeleton.tsx +72 -48
  56. package/src/core/components/tab/tab.tsx +0 -1
  57. package/src/core/components/tab/tabList.tsx +4 -21
  58. package/src/core/components/tab/tabPanel.tsx +1 -0
  59. package/src/core/components/toast/toast.tsx +27 -14
  60. package/src/core/components/toast/toastProvider.tsx +4 -13
  61. package/src/core/components/tree/tree.tsx +1 -2
  62. package/src/core/components/tree/treeGroup.tsx +4 -1
  63. package/src/core/components/tree/treeItem.tsx +11 -15
  64. package/src/core/hooks/useArrayProp.ts +1 -1
  65. package/src/core/index.ts +0 -1
  66. package/src/core/lib/styled/members.ts +2 -2
  67. package/src/core/primitives/avatar/avatar.tsx +0 -21
  68. package/src/core/primitives/avatar/avatarCounter.tsx +1 -1
  69. package/src/core/primitives/avatar/avatarStack.tsx +1 -1
  70. package/src/core/primitives/avatar/styles.ts +2 -2
  71. package/src/core/primitives/box/box.tsx +4 -1
  72. package/src/core/primitives/button/__workshop__/props.tsx +2 -1
  73. package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
  74. package/src/core/primitives/button/__workshop__/stacked.tsx +2 -1
  75. package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
  76. package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
  77. package/src/core/primitives/button/styles.ts +3 -3
  78. package/src/core/primitives/card/__workshop__/props.tsx +2 -2
  79. package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
  80. package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
  81. package/src/core/primitives/card/card.tsx +7 -10
  82. package/src/core/primitives/code/code.tsx +2 -4
  83. package/src/core/primitives/container/styles.ts +1 -1
  84. package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
  85. package/src/core/primitives/flex/flex.tsx +1 -13
  86. package/src/core/primitives/grid/grid.tsx +5 -19
  87. package/src/core/primitives/heading/heading.tsx +8 -25
  88. package/src/core/primitives/heading/styles.ts +1 -1
  89. package/src/core/primitives/inline/inline.tsx +3 -12
  90. package/src/core/primitives/inline/styles.ts +1 -1
  91. package/src/core/primitives/label/label.tsx +4 -9
  92. package/src/core/primitives/label/styles.ts +1 -1
  93. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +2 -2
  94. package/src/core/primitives/popover/__workshop__/TestStory.tsx +2 -1
  95. package/src/core/primitives/popover/popover.tsx +1 -1
  96. package/src/core/primitives/popover/popoverCard.tsx +1 -1
  97. package/src/core/primitives/radio/radio.tsx +1 -1
  98. package/src/core/primitives/radio/styles.ts +2 -2
  99. package/src/core/primitives/select/select.tsx +1 -1
  100. package/src/core/primitives/select/styles.ts +3 -3
  101. package/src/core/primitives/spinner/__workshop__/Props.tsx +2 -1
  102. package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +16 -0
  103. package/src/core/primitives/spinner/spinner.tsx +2 -2
  104. package/src/core/primitives/stack/styles.ts +1 -1
  105. package/src/core/primitives/switch/styles.ts +2 -2
  106. package/src/core/primitives/text/__workshop__/colored.tsx +1 -1
  107. package/src/core/primitives/text/styles.ts +1 -1
  108. package/src/core/primitives/text/text.tsx +1 -4
  109. package/src/core/primitives/textArea/__workshop__/plain.tsx +2 -2
  110. package/src/core/primitives/textArea/textArea.tsx +3 -3
  111. package/src/core/primitives/textInput/__workshop__/plain.tsx +3 -2
  112. package/src/core/primitives/textInput/textInput.tsx +16 -83
  113. package/src/core/primitives/tooltip/tooltipCard.tsx +5 -5
  114. package/src/core/primitives/types.ts +1 -0
  115. package/src/core/theme/__workshop__/build/Root.tsx +1 -1
  116. package/src/core/theme/__workshop__/build/story.tsx +2 -4
  117. package/src/core/theme/themeProvider.tsx +1 -1
  118. package/src/core/types/box.ts +22 -16
  119. package/src/core/types/grid.ts +17 -12
  120. package/src/core/types/text.ts +7 -4
  121. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
  122. package/src/core/utils/layer/layer.tsx +2 -2
  123. package/src/core/utils/virtualList/virtualList.tsx +1 -1
  124. package/src/css/compile/{comileRules.ts → compileRules.ts} +2 -5
  125. package/src/css/compile/compileSystem.ts +1 -1
  126. package/src/css/compile/compileTheme.ts +4 -1
  127. package/src/css/components/breadcrumbs/rules.ts +18 -0
  128. package/src/css/components/menu/index.ts +1 -0
  129. package/src/css/components/menu/menu.ts +5 -0
  130. package/src/css/components/menu/rules.ts +10 -0
  131. package/src/css/components/skeleton/index.ts +2 -0
  132. package/src/css/components/skeleton/rules.ts +106 -0
  133. package/src/css/components/skeleton/skeleton.ts +31 -0
  134. package/src/css/components/skeleton/types.ts +24 -0
  135. package/src/css/components/toast/rules.ts +68 -0
  136. package/src/css/components/tree/rules.ts +115 -0
  137. package/src/css/index.ts +4 -0
  138. package/src/css/primitives/box/box.ts +5 -1
  139. package/src/css/primitives/box/types.ts +7 -8
  140. package/src/css/primitives/card/rules.ts +161 -13
  141. package/src/css/primitives/checkbox/__styles.ts +115 -113
  142. package/src/css/primitives/selectable/__style.ts +117 -115
  143. package/src/css/primitives/spinner/rules.ts +5 -7
  144. package/src/css/primitives/spinner/spinner.ts +4 -0
  145. package/src/css/primitives/textInput/index.ts +1 -0
  146. package/src/css/primitives/textInput/rules.ts +159 -64
  147. package/src/css/primitives/textInput/textInput.ts +11 -3
  148. package/src/css/primitives/textInput/types.ts +8 -0
  149. package/src/css/rules.ts +16 -38
  150. package/src/css/styles/font/font.ts +7 -2
  151. package/src/css/styles/font/rules.ts +23 -0
  152. package/src/css/styles/font/types.ts +6 -0
  153. package/src/css/styles/gap/rules.ts +6 -6
  154. package/src/css/styles/grid/grid.ts +13 -0
  155. package/src/css/styles/grid/index.ts +2 -0
  156. package/src/css/styles/grid/rules.ts +112 -1
  157. package/src/css/styles/grid/types.ts +29 -0
  158. package/src/css/styles/margin/rules.ts +58 -54
  159. package/src/css/styles/outline/rules.ts +7 -0
  160. package/src/css/styles/overflow/index.ts +2 -0
  161. package/src/css/styles/overflow/overflow.ts +11 -0
  162. package/src/css/styles/overflow/types.ts +11 -0
  163. package/src/css/styles/padding/rules.ts +50 -48
  164. package/src/css/types.ts +36 -1
  165. package/src/css/varNames.ts +1 -1
  166. package/src/css/vars.ts +86 -0
  167. package/dist/_chunks-cjs/getTheme_v2.js +0 -316
  168. package/dist/_chunks-cjs/getTheme_v2.js.map +0 -1
  169. package/dist/_chunks-es/getTheme_v2.mjs +0 -317
  170. package/dist/_chunks-es/getTheme_v2.mjs.map +0 -1
  171. package/dist/_legacy/getTheme_v2.esm.js +0 -317
  172. package/dist/_legacy/getTheme_v2.esm.js.map +0 -1
  173. package/src/core/components/autocomplete/autocomplete.styles.tsx +0 -38
  174. package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +0 -17
  175. package/src/core/components/menu/menuDivider.ts +0 -13
  176. package/src/core/components/skeleton/styles.ts +0 -50
  177. package/src/core/components/toast/styles.ts +0 -61
  178. package/src/core/components/tree/style.ts +0 -104
  179. package/src/core/primitives/card/styles.ts +0 -146
  180. /package/src/core/{styles → _compat/styles}/border/borderStyle.ts +0 -0
  181. /package/src/core/{styles → _compat/styles}/border/index.ts +0 -0
  182. /package/src/core/{styles → _compat/styles}/border/types.ts +0 -0
  183. /package/src/core/{styles → _compat/styles}/box/index.ts +0 -0
  184. /package/src/core/{styles → _compat/styles}/card/index.ts +0 -0
  185. /package/src/core/{styles → _compat/styles}/flex/flexStyle.ts +0 -0
  186. /package/src/core/{styles → _compat/styles}/flex/index.ts +0 -0
  187. /package/src/core/{styles → _compat/styles}/flex/types.ts +0 -0
  188. /package/src/core/{styles → _compat/styles}/focusRing/index.ts +0 -0
  189. /package/src/core/{styles → _compat/styles}/font/codeFontStyle.ts +0 -0
  190. /package/src/core/{styles → _compat/styles}/font/headingFontStyle.ts +0 -0
  191. /package/src/core/{styles → _compat/styles}/font/index.ts +0 -0
  192. /package/src/core/{styles → _compat/styles}/font/labelFontStyle.ts +0 -0
  193. /package/src/core/{styles → _compat/styles}/font/responsiveFont.ts +0 -0
  194. /package/src/core/{styles → _compat/styles}/font/textAlignStyle.ts +0 -0
  195. /package/src/core/{styles → _compat/styles}/font/textFontStyle.ts +0 -0
  196. /package/src/core/{styles → _compat/styles}/grid/gridItemStyle.ts +0 -0
  197. /package/src/core/{styles → _compat/styles}/grid/gridStyle.ts +0 -0
  198. /package/src/core/{styles → _compat/styles}/grid/index.ts +0 -0
  199. /package/src/core/{styles → _compat/styles}/index.ts +0 -0
  200. /package/src/core/{styles → _compat/styles}/input/index.ts +0 -0
  201. /package/src/core/{styles → _compat/styles}/input/responsiveInputPaddingStyle.ts +0 -0
  202. /package/src/core/{styles → _compat/styles}/internal.ts +0 -0
  203. /package/src/core/{styles → _compat/styles}/margin/index.ts +0 -0
  204. /package/src/core/{styles → _compat/styles}/margin/marginStyle.ts +0 -0
  205. /package/src/core/{styles → _compat/styles}/margin/marginsStyle.test.ts +0 -0
  206. /package/src/core/{styles → _compat/styles}/margin/types.ts +0 -0
  207. /package/src/core/{styles → _compat/styles}/padding/index.ts +0 -0
  208. /package/src/core/{styles → _compat/styles}/padding/paddingStyle.test.ts +0 -0
  209. /package/src/core/{styles → _compat/styles}/padding/paddingStyle.ts +0 -0
  210. /package/src/core/{styles → _compat/styles}/padding/types.ts +0 -0
  211. /package/src/core/{styles → _compat/styles}/radius/index.ts +0 -0
  212. /package/src/core/{styles → _compat/styles}/radius/radiusStyle.ts +0 -0
  213. /package/src/core/{styles → _compat/styles}/shadow/index.ts +0 -0
  214. /package/src/core/{styles → _compat/styles}/shadow/types.ts +0 -0
  215. /package/src/core/{styles → _compat/styles}/types.ts +0 -0
  216. /package/src/core/{_compat.ts → _compat/types.ts} +0 -0
package/dist/cli.js CHANGED
@@ -3,10 +3,12 @@ var cac = require("cac");
3
3
  function _interopDefaultCompat(e) {
4
4
  return e && typeof e == "object" && "default" in e ? e : { default: e };
5
5
  }
6
- var cac__default = /* @__PURE__ */ _interopDefaultCompat(cac), version = "3.0.0-static.0";
6
+ var cac__default = /* @__PURE__ */ _interopDefaultCompat(cac), version = "3.0.0-static.1";
7
7
  const cli = cac__default.default("ui");
8
8
  cli.command("build").option("--cwd [cwd]", "Working directory").option("--outDir [outDir]", "Output directory").action(async (options) => {
9
- const { buildCommand } = await Promise.resolve().then(function() {
9
+ const {
10
+ buildCommand
11
+ } = await Promise.resolve().then(function() {
10
12
  return require("./_chunks-cjs/buildCommand.js");
11
13
  });
12
14
  await buildCommand({
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sources":["../src/css/cli/index.ts"],"sourcesContent":["import cac from 'cac'\n\nimport {version} from '../../../package.json'\n\nconst cli = cac('ui')\n\n// cli\n// .command('dev')\n// .option('--cwd [cwd]', 'Output directory')\n// .action(async (options) => {\n// const {devCommand} = await import('./devCommand')\n\n// await devCommand({\n// ...options,\n// cwd: options.cwd || process.cwd(),\n// })\n// })\n\ncli\n .command('build')\n .option('--cwd [cwd]', 'Working directory')\n .option('--outDir [outDir]', 'Output directory')\n .action(async (options) => {\n const {buildCommand} = await import('./buildCommand')\n\n await buildCommand({\n ...options,\n cwd: options.cwd || process.cwd(),\n })\n })\n\ncli.command('').action(() => {\n cli.outputHelp()\n})\n\ncli.help()\ncli.version(version)\ncli.parse()\n"],"names":["cac"],"mappings":";;;;;;AAIA,MAAM,MAAMA,qBAAI,IAAI;AAcpB,IACG,QAAQ,OAAO,EACf,OAAO,eAAe,mBAAmB,EACzC,OAAO,qBAAqB,kBAAkB,EAC9C,OAAO,OAAO,YAAY;AACzB,QAAM,EAAC,aAAA,IAAgB,MAAM,QAAA,QAAA,EAAA,KAAA,WAAA;AAAA,WAAA,QAAO,+BAAgB;AAAA,EAAA,CAAA;AAEpD,QAAM,aAAa;AAAA,IACjB,GAAG;AAAA,IACH,KAAK,QAAQ,OAAO,QAAQ,IAAI;AAAA,EAAA,CACjC;AACH,CAAC;AAEH,IAAI,QAAQ,EAAE,EAAE,OAAO,MAAM;AAC3B,MAAI,WAAW;AACjB,CAAC;AAED,IAAI,KAAK;AACT,IAAI,QAAQ,OAAO;AACnB,IAAI,MAAM;"}
1
+ {"version":3,"file":"cli.js","sources":["../src/css/cli/index.ts"],"sourcesContent":["import cac from 'cac'\n\nimport {version} from '../../../package.json'\n\nconst cli = cac('ui')\n\n// cli\n// .command('dev')\n// .option('--cwd [cwd]', 'Output directory')\n// .action(async (options) => {\n// const {devCommand} = await import('./devCommand')\n\n// await devCommand({\n// ...options,\n// cwd: options.cwd || process.cwd(),\n// })\n// })\n\ncli\n .command('build')\n .option('--cwd [cwd]', 'Working directory')\n .option('--outDir [outDir]', 'Output directory')\n .action(async (options) => {\n const {buildCommand} = await import('./buildCommand')\n\n await buildCommand({\n ...options,\n cwd: options.cwd || process.cwd(),\n })\n })\n\ncli.command('').action(() => {\n cli.outputHelp()\n})\n\ncli.help()\ncli.version(version)\ncli.parse()\n"],"names":["cli","cac","command","option","action","options","buildCommand","cwd","process","outputHelp","help","version","parse"],"mappings":";;;;;;AAIA,MAAMA,MAAMC,qBAAI,IAAI;AAcpBD,IACGE,QAAQ,OAAO,EACfC,OAAO,eAAe,mBAAmB,EACzCA,OAAO,qBAAqB,kBAAkB,EAC9CC,OAAO,OAAOC,YAAY;AACnB,QAAA;AAAA,IAACC;AAAAA,EAAAA,IAAgB,MAAM,QAAO,QAAA,EAAA,KAAA,WAAA;AAAA,WAAA,QAAA,+BAAgB;AAAA,EAAA,CAAA;AAEpD,QAAMA,aAAa;AAAA,IACjB,GAAGD;AAAAA,IACHE,KAAKF,QAAQE,OAAOC,QAAQD,IAAI;AAAA,EAAA,CACjC;AACH,CAAC;AAEHP,IAAIE,QAAQ,EAAE,EAAEE,OAAO,MAAM;AAC3BJ,MAAIS,WAAW;AACjB,CAAC;AAEDT,IAAIU,KAAK;AACTV,IAAIW,QAAQA,OAAO;AACnBX,IAAIY,MAAM;"}
package/dist/css.d.mts CHANGED
@@ -10,6 +10,7 @@ import {FontLabelSize} from '@sanity/ui/theme'
10
10
  import {FontStyleProps as FontStyleProps_2} from '@sanity/ui/css'
11
11
  import {FontTextSize} from '@sanity/ui/theme'
12
12
  import {FontWeight} from '@sanity/ui/theme'
13
+ import {GridStyleProps as GridStyleProps_2} from '@sanity/ui/css'
13
14
  import {Radius} from '@sanity/ui/theme'
14
15
  import {RadiusStyleProps as RadiusStyleProps_2} from '@sanity/ui/css'
15
16
  import {RootTheme_v2} from '@sanity/ui/theme'
@@ -26,6 +27,8 @@ import {ThemeColorStateKey} from '@sanity/ui/theme'
26
27
  import {ThemeColorStateToneKey} from '@sanity/ui/theme'
27
28
  import {WidthStyleProps as WidthStyleProps_2} from '@sanity/ui/css'
28
29
 
30
+ export declare function animatedSpinnerIcon(): string
31
+
29
32
  export declare function avatar(props: AvatarStyleProps): string
30
33
 
31
34
  export declare function avatarArrow(): string
@@ -64,19 +67,12 @@ export declare interface BorderStyleProps {
64
67
  /** @public */
65
68
  export declare function box(props: BoxStyleProps): string
66
69
 
67
- /**
68
- * @public
69
- */
70
- export declare type BoxDisplay = 'none' | 'block' | 'grid' | 'flex' | 'inline-block'
71
-
72
70
  /**
73
71
  * @public
74
72
  */
75
73
  export declare type BoxHeight = 'stretch' | 'fill'
76
74
 
77
- /**
78
- * @public
79
- */
75
+ /** @public */
80
76
  export declare type BoxOverflow = 'visible' | 'hidden' | 'auto'
81
77
 
82
78
  /**
@@ -89,16 +85,18 @@ export declare interface BoxStyleProps
89
85
  extends FlexStyleProps,
90
86
  FlexItemStyleProps,
91
87
  GapStyleProps,
88
+ GridStyleProps_2,
92
89
  GridItemStyleProps,
93
90
  MarginStyleProps,
94
91
  MaxWidthStyleProps,
92
+ OverflowStyleProps,
95
93
  PaddingStyleProps,
96
94
  PointerEventsStyleProps,
97
95
  PositionStyleProps,
98
96
  WidthStyleProps {
99
- display?: ResponsiveProp<BoxDisplay>
97
+ display?: ResponsiveProp<Display>
100
98
  height?: ResponsiveProp<BoxHeight>
101
- overflow?: ResponsiveProp<BoxOverflow>
99
+ outline?: 'none'
102
100
  sizing?: ResponsiveProp<BoxSizing>
103
101
  }
104
102
 
@@ -197,15 +195,20 @@ export declare type CardScopedVarName =
197
195
  | `--card-badge-${ThemeColorStateToneKey}-fg-color`
198
196
  | `--card-badge-${ThemeColorStateToneKey}-icon-color`
199
197
  | `--card-bg-color`
198
+ | `--card-bg-image`
199
+ | `--card-bg2-color`
200
200
  | `--card-border-color`
201
201
  | `--card-code-bg-color`
202
202
  | `--card-code-fg-color`
203
203
  | `--card-fg-color`
204
204
  | `--card-focus-ring-color`
205
+ | `--card-hairline-soft-color`
206
+ | `--card-hairline-hard-color`
205
207
  | `--card-icon-color`
206
208
  | `--card-kbd-bg-color`
207
209
  | `--card-kbd-border-color`
208
210
  | `--card-kbd-fg-color`
211
+ | `--card-link-color`
209
212
  | `--card-link-fg-color`
210
213
  | `--card-muted-bg-color`
211
214
  | `--card-muted-fg-color`
@@ -229,12 +232,22 @@ export declare type CardScopedVarName =
229
232
  | `--font-letter-spacing`
230
233
  | `--font-line-height`
231
234
  | `--font-size`
235
+ | `--font-skeleton-line-height`
236
+ | `--font-skeleton-ascender-height`
237
+ | `--font-skeleton-descender-height`
232
238
  | `--font-weight-regular`
233
239
  | `--font-weight-medium`
234
240
  | `--font-weight-semibold`
235
241
  | `--font-weight-bold`
236
242
  | `--font-weight`
237
243
  | `--fg-color`
244
+ | `--input-bg-color`
245
+ | `--input-border-color`
246
+ | `--input-fg-color`
247
+ | `--padding-top`
248
+ | `--padding-right`
249
+ | `--padding-bottom`
250
+ | `--padding-left`
238
251
 
239
252
  export declare interface CardStyleProps extends BoxStyleProps, BorderStyleProps, RadiusStyleProps {
240
253
  checkered?: boolean
@@ -251,6 +264,12 @@ export declare function code(props: CodeStyleProps): string
251
264
  /** @public */
252
265
  export declare type CodeSize = number
253
266
 
267
+ export declare function codeSkeleton(props: CodeSkeletonStyleProps): string
268
+
269
+ export declare interface CodeSkeletonStyleProps {
270
+ size?: ResponsiveProp<FontCodeSize>
271
+ }
272
+
254
273
  /** @public */
255
274
  export declare interface CodeStyleProps extends FontStyleProps_2 {
256
275
  size?: ResponsiveProp<CodeSize>
@@ -487,6 +506,8 @@ export declare interface ColorStateVars {
487
506
  }
488
507
  }
489
508
 
509
+ export declare type Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12
510
+
490
511
  /** @public */
491
512
  export declare function compileSystem(): string
492
513
 
@@ -524,6 +545,11 @@ export declare function dialogHeader(): string
524
545
 
525
546
  export declare function dialogLayout(): string
526
547
 
548
+ /**
549
+ * @public
550
+ */
551
+ export declare type Display = 'none' | 'block' | 'grid' | 'flex' | 'inline-block'
552
+
527
553
  /**
528
554
  * @public
529
555
  */
@@ -568,11 +594,26 @@ export declare type FlexValue = number | 'none' | 'auto' | 'initial'
568
594
  */
569
595
  export declare type FlexWrap = 'wrap' | 'wrap-reverse' | 'nowrap'
570
596
 
597
+ export declare interface FontSizeVars {
598
+ ascenderHeight: CSSVar
599
+ descenderHeight: CSSVar
600
+ fontSize: CSSVar
601
+ lineHeight: CSSVar
602
+ letterSpacing: CSSVar
603
+ iconSize: CSSVar
604
+ }
605
+
571
606
  /** @public */
572
607
  export declare interface FontStyleProps {
608
+ align?: TextAlign
573
609
  weight?: FontWeight
574
610
  }
575
611
 
612
+ export declare interface FontVars<Size extends number> {
613
+ family: CSSVar
614
+ sizes: Record<Size, FontSizeVars>
615
+ }
616
+
576
617
  /** @public */
577
618
  export declare interface GapStyleProps {
578
619
  gap?: ResponsiveProp<Space>
@@ -580,6 +621,21 @@ export declare interface GapStyleProps {
580
621
  gapY?: ResponsiveProp<Space>
581
622
  }
582
623
 
624
+ /**
625
+ * @public
626
+ */
627
+ export declare type GridAutoCols = 'auto' | 'min' | 'max' | 'fr'
628
+
629
+ /**
630
+ * @public
631
+ */
632
+ export declare type GridAutoFlow = 'row' | 'column' | 'row dense' | 'column dense'
633
+
634
+ /**
635
+ * @public
636
+ */
637
+ export declare type GridAutoRows = 'auto' | 'min' | 'max' | 'fr'
638
+
583
639
  /**
584
640
  * @public
585
641
  */
@@ -619,12 +675,27 @@ export declare interface GridItemStyleProps {
619
675
  rowEnd?: ResponsiveProp<GridItemRowEnd>
620
676
  }
621
677
 
678
+ /** @public */
679
+ export declare interface GridStyleProps {
680
+ autoRows?: ResponsiveProp<GridAutoRows>
681
+ autoCols?: ResponsiveProp<GridAutoCols>
682
+ autoFlow?: ResponsiveProp<GridAutoFlow>
683
+ columns?: ResponsiveProp<Columns>
684
+ rows?: ResponsiveProp<Rows>
685
+ }
686
+
622
687
  /** @public */
623
688
  export declare function heading(props: HeadingStyleProps): string
624
689
 
625
690
  /** @public */
626
691
  export declare type HeadingSize = number
627
692
 
693
+ export declare function headingSkeleton(props: HeadingSkeletonStyleProps): string
694
+
695
+ export declare interface HeadingSkeletonStyleProps {
696
+ size?: ResponsiveProp<FontHeadingSize>
697
+ }
698
+
628
699
  /** @public */
629
700
  export declare interface HeadingStyleProps extends FontStyleProps_2 {
630
701
  accent?: boolean
@@ -645,6 +716,12 @@ export declare function label(props: LabelStyleProps): string
645
716
  /** @public */
646
717
  export declare type LabelSize = number
647
718
 
719
+ export declare function labelSkeleton(props: LabelSkeletonStyleProps): string
720
+
721
+ export declare interface LabelSkeletonStyleProps {
722
+ size?: ResponsiveProp<FontLabelSize>
723
+ }
724
+
648
725
  /** @public */
649
726
  export declare interface LabelStyleProps extends FontStyleProps_2 {
650
727
  accent?: boolean
@@ -666,6 +743,15 @@ export declare interface MaxWidthStyleProps {
666
743
  maxWidth?: ResponsiveProp<ContainerWidth | 'fill'>
667
744
  }
668
745
 
746
+ export declare function menuDivider(): string
747
+
748
+ /** @public */
749
+ export declare interface OverflowStyleProps {
750
+ overflow?: ResponsiveProp<BoxOverflow>
751
+ overflowX?: ResponsiveProp<BoxOverflow>
752
+ overflowY?: ResponsiveProp<BoxOverflow>
753
+ }
754
+
669
755
  /** @public */
670
756
  export declare interface PaddingStyleProps {
671
757
  padding?: ResponsiveProp<number>
@@ -712,6 +798,8 @@ export declare interface RadiusStyleProps {
712
798
 
713
799
  export declare type ResponsiveProp<T> = T | Array<T | null | undefined>
714
800
 
801
+ export declare type Rows = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12
802
+
715
803
  /** @public */
716
804
  export declare interface Rules {
717
805
  [className: string]: Properties
@@ -733,6 +821,12 @@ export declare interface SelectableStyleProps extends RadiusStyleProps {
733
821
  tone?: SelectableTone
734
822
  }
735
823
 
824
+ /** @beta */
825
+ export declare function skeleton(props: SkeletonStyleProps): string
826
+
827
+ /** @beta */
828
+ export declare interface SkeletonStyleProps extends RadiusStyleProps {}
829
+
736
830
  export declare function spinner(): string
737
831
 
738
832
  export declare function _switch(): string
@@ -740,12 +834,31 @@ export declare function _switch(): string
740
834
  /** @public */
741
835
  export declare function text(props: TextStyleProps): string
742
836
 
837
+ /**
838
+ * @public
839
+ */
840
+ export declare type TextAlign = 'left' | 'right' | 'center' | 'justify' | 'initial'
841
+
743
842
  export declare function textArea(): string
744
843
 
745
- export declare function textInput(props: {size: ResponsiveProp<number>}): string
844
+ export declare function textInput(props: TextInputStyleProps): string
845
+
846
+ export declare function textInputElement(): string
847
+
848
+ /** @public */
849
+ export declare interface TextInputStyleProps {
850
+ padding: ResponsiveProp<Space>
851
+ size: ResponsiveProp<FontTextSize>
852
+ }
746
853
 
747
854
  export declare type TextSize = number
748
855
 
856
+ export declare function textSkeleton(props: TextSkeletonStyleProps): string
857
+
858
+ export declare interface TextSkeletonStyleProps {
859
+ size?: ResponsiveProp<FontTextSize>
860
+ }
861
+
749
862
  /** @public */
750
863
  export declare interface TextStyleProps extends FontStyleProps_2 {
751
864
  accent?: boolean
@@ -902,7 +1015,7 @@ export declare type ThemeVarName =
902
1015
  | '--input-text-focus-ring-width'
903
1016
  | '--layer-dialog-z-offset'
904
1017
  | `--radius-${Radius}`
905
- | `--space-${Space}`
1018
+ | `--space-${Exclude<Space, 0.5> | '0_5'}`
906
1019
  | `--shadow-${Shadow}-umbra`
907
1020
  | `--shadow-${Shadow}-penumbra`
908
1021
  | `--shadow-${Shadow}-ambient`
@@ -931,6 +1044,12 @@ export declare interface Vars {
931
1044
  dark: ColorSchemeVars
932
1045
  light: ColorSchemeVars
933
1046
  } & ScopedColorVars
1047
+ font: {
1048
+ code: FontVars<FontCodeSize>
1049
+ heading: FontVars<FontHeadingSize>
1050
+ label: FontVars<FontLabelSize>
1051
+ text: FontVars<FontTextSize>
1052
+ }
934
1053
  space: Record<Space, CSSVar>
935
1054
  }
936
1055
 
package/dist/css.d.ts CHANGED
@@ -10,6 +10,7 @@ import {FontLabelSize} from '@sanity/ui/theme'
10
10
  import {FontStyleProps as FontStyleProps_2} from '@sanity/ui/css'
11
11
  import {FontTextSize} from '@sanity/ui/theme'
12
12
  import {FontWeight} from '@sanity/ui/theme'
13
+ import {GridStyleProps as GridStyleProps_2} from '@sanity/ui/css'
13
14
  import {Radius} from '@sanity/ui/theme'
14
15
  import {RadiusStyleProps as RadiusStyleProps_2} from '@sanity/ui/css'
15
16
  import {RootTheme_v2} from '@sanity/ui/theme'
@@ -26,6 +27,8 @@ import {ThemeColorStateKey} from '@sanity/ui/theme'
26
27
  import {ThemeColorStateToneKey} from '@sanity/ui/theme'
27
28
  import {WidthStyleProps as WidthStyleProps_2} from '@sanity/ui/css'
28
29
 
30
+ export declare function animatedSpinnerIcon(): string
31
+
29
32
  export declare function avatar(props: AvatarStyleProps): string
30
33
 
31
34
  export declare function avatarArrow(): string
@@ -64,19 +67,12 @@ export declare interface BorderStyleProps {
64
67
  /** @public */
65
68
  export declare function box(props: BoxStyleProps): string
66
69
 
67
- /**
68
- * @public
69
- */
70
- export declare type BoxDisplay = 'none' | 'block' | 'grid' | 'flex' | 'inline-block'
71
-
72
70
  /**
73
71
  * @public
74
72
  */
75
73
  export declare type BoxHeight = 'stretch' | 'fill'
76
74
 
77
- /**
78
- * @public
79
- */
75
+ /** @public */
80
76
  export declare type BoxOverflow = 'visible' | 'hidden' | 'auto'
81
77
 
82
78
  /**
@@ -89,16 +85,18 @@ export declare interface BoxStyleProps
89
85
  extends FlexStyleProps,
90
86
  FlexItemStyleProps,
91
87
  GapStyleProps,
88
+ GridStyleProps_2,
92
89
  GridItemStyleProps,
93
90
  MarginStyleProps,
94
91
  MaxWidthStyleProps,
92
+ OverflowStyleProps,
95
93
  PaddingStyleProps,
96
94
  PointerEventsStyleProps,
97
95
  PositionStyleProps,
98
96
  WidthStyleProps {
99
- display?: ResponsiveProp<BoxDisplay>
97
+ display?: ResponsiveProp<Display>
100
98
  height?: ResponsiveProp<BoxHeight>
101
- overflow?: ResponsiveProp<BoxOverflow>
99
+ outline?: 'none'
102
100
  sizing?: ResponsiveProp<BoxSizing>
103
101
  }
104
102
 
@@ -197,15 +195,20 @@ export declare type CardScopedVarName =
197
195
  | `--card-badge-${ThemeColorStateToneKey}-fg-color`
198
196
  | `--card-badge-${ThemeColorStateToneKey}-icon-color`
199
197
  | `--card-bg-color`
198
+ | `--card-bg-image`
199
+ | `--card-bg2-color`
200
200
  | `--card-border-color`
201
201
  | `--card-code-bg-color`
202
202
  | `--card-code-fg-color`
203
203
  | `--card-fg-color`
204
204
  | `--card-focus-ring-color`
205
+ | `--card-hairline-soft-color`
206
+ | `--card-hairline-hard-color`
205
207
  | `--card-icon-color`
206
208
  | `--card-kbd-bg-color`
207
209
  | `--card-kbd-border-color`
208
210
  | `--card-kbd-fg-color`
211
+ | `--card-link-color`
209
212
  | `--card-link-fg-color`
210
213
  | `--card-muted-bg-color`
211
214
  | `--card-muted-fg-color`
@@ -229,12 +232,22 @@ export declare type CardScopedVarName =
229
232
  | `--font-letter-spacing`
230
233
  | `--font-line-height`
231
234
  | `--font-size`
235
+ | `--font-skeleton-line-height`
236
+ | `--font-skeleton-ascender-height`
237
+ | `--font-skeleton-descender-height`
232
238
  | `--font-weight-regular`
233
239
  | `--font-weight-medium`
234
240
  | `--font-weight-semibold`
235
241
  | `--font-weight-bold`
236
242
  | `--font-weight`
237
243
  | `--fg-color`
244
+ | `--input-bg-color`
245
+ | `--input-border-color`
246
+ | `--input-fg-color`
247
+ | `--padding-top`
248
+ | `--padding-right`
249
+ | `--padding-bottom`
250
+ | `--padding-left`
238
251
 
239
252
  export declare interface CardStyleProps extends BoxStyleProps, BorderStyleProps, RadiusStyleProps {
240
253
  checkered?: boolean
@@ -251,6 +264,12 @@ export declare function code(props: CodeStyleProps): string
251
264
  /** @public */
252
265
  export declare type CodeSize = number
253
266
 
267
+ export declare function codeSkeleton(props: CodeSkeletonStyleProps): string
268
+
269
+ export declare interface CodeSkeletonStyleProps {
270
+ size?: ResponsiveProp<FontCodeSize>
271
+ }
272
+
254
273
  /** @public */
255
274
  export declare interface CodeStyleProps extends FontStyleProps_2 {
256
275
  size?: ResponsiveProp<CodeSize>
@@ -487,6 +506,8 @@ export declare interface ColorStateVars {
487
506
  }
488
507
  }
489
508
 
509
+ export declare type Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12
510
+
490
511
  /** @public */
491
512
  export declare function compileSystem(): string
492
513
 
@@ -524,6 +545,11 @@ export declare function dialogHeader(): string
524
545
 
525
546
  export declare function dialogLayout(): string
526
547
 
548
+ /**
549
+ * @public
550
+ */
551
+ export declare type Display = 'none' | 'block' | 'grid' | 'flex' | 'inline-block'
552
+
527
553
  /**
528
554
  * @public
529
555
  */
@@ -568,11 +594,26 @@ export declare type FlexValue = number | 'none' | 'auto' | 'initial'
568
594
  */
569
595
  export declare type FlexWrap = 'wrap' | 'wrap-reverse' | 'nowrap'
570
596
 
597
+ export declare interface FontSizeVars {
598
+ ascenderHeight: CSSVar
599
+ descenderHeight: CSSVar
600
+ fontSize: CSSVar
601
+ lineHeight: CSSVar
602
+ letterSpacing: CSSVar
603
+ iconSize: CSSVar
604
+ }
605
+
571
606
  /** @public */
572
607
  export declare interface FontStyleProps {
608
+ align?: TextAlign
573
609
  weight?: FontWeight
574
610
  }
575
611
 
612
+ export declare interface FontVars<Size extends number> {
613
+ family: CSSVar
614
+ sizes: Record<Size, FontSizeVars>
615
+ }
616
+
576
617
  /** @public */
577
618
  export declare interface GapStyleProps {
578
619
  gap?: ResponsiveProp<Space>
@@ -580,6 +621,21 @@ export declare interface GapStyleProps {
580
621
  gapY?: ResponsiveProp<Space>
581
622
  }
582
623
 
624
+ /**
625
+ * @public
626
+ */
627
+ export declare type GridAutoCols = 'auto' | 'min' | 'max' | 'fr'
628
+
629
+ /**
630
+ * @public
631
+ */
632
+ export declare type GridAutoFlow = 'row' | 'column' | 'row dense' | 'column dense'
633
+
634
+ /**
635
+ * @public
636
+ */
637
+ export declare type GridAutoRows = 'auto' | 'min' | 'max' | 'fr'
638
+
583
639
  /**
584
640
  * @public
585
641
  */
@@ -619,12 +675,27 @@ export declare interface GridItemStyleProps {
619
675
  rowEnd?: ResponsiveProp<GridItemRowEnd>
620
676
  }
621
677
 
678
+ /** @public */
679
+ export declare interface GridStyleProps {
680
+ autoRows?: ResponsiveProp<GridAutoRows>
681
+ autoCols?: ResponsiveProp<GridAutoCols>
682
+ autoFlow?: ResponsiveProp<GridAutoFlow>
683
+ columns?: ResponsiveProp<Columns>
684
+ rows?: ResponsiveProp<Rows>
685
+ }
686
+
622
687
  /** @public */
623
688
  export declare function heading(props: HeadingStyleProps): string
624
689
 
625
690
  /** @public */
626
691
  export declare type HeadingSize = number
627
692
 
693
+ export declare function headingSkeleton(props: HeadingSkeletonStyleProps): string
694
+
695
+ export declare interface HeadingSkeletonStyleProps {
696
+ size?: ResponsiveProp<FontHeadingSize>
697
+ }
698
+
628
699
  /** @public */
629
700
  export declare interface HeadingStyleProps extends FontStyleProps_2 {
630
701
  accent?: boolean
@@ -645,6 +716,12 @@ export declare function label(props: LabelStyleProps): string
645
716
  /** @public */
646
717
  export declare type LabelSize = number
647
718
 
719
+ export declare function labelSkeleton(props: LabelSkeletonStyleProps): string
720
+
721
+ export declare interface LabelSkeletonStyleProps {
722
+ size?: ResponsiveProp<FontLabelSize>
723
+ }
724
+
648
725
  /** @public */
649
726
  export declare interface LabelStyleProps extends FontStyleProps_2 {
650
727
  accent?: boolean
@@ -666,6 +743,15 @@ export declare interface MaxWidthStyleProps {
666
743
  maxWidth?: ResponsiveProp<ContainerWidth | 'fill'>
667
744
  }
668
745
 
746
+ export declare function menuDivider(): string
747
+
748
+ /** @public */
749
+ export declare interface OverflowStyleProps {
750
+ overflow?: ResponsiveProp<BoxOverflow>
751
+ overflowX?: ResponsiveProp<BoxOverflow>
752
+ overflowY?: ResponsiveProp<BoxOverflow>
753
+ }
754
+
669
755
  /** @public */
670
756
  export declare interface PaddingStyleProps {
671
757
  padding?: ResponsiveProp<number>
@@ -712,6 +798,8 @@ export declare interface RadiusStyleProps {
712
798
 
713
799
  export declare type ResponsiveProp<T> = T | Array<T | null | undefined>
714
800
 
801
+ export declare type Rows = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12
802
+
715
803
  /** @public */
716
804
  export declare interface Rules {
717
805
  [className: string]: Properties
@@ -733,6 +821,12 @@ export declare interface SelectableStyleProps extends RadiusStyleProps {
733
821
  tone?: SelectableTone
734
822
  }
735
823
 
824
+ /** @beta */
825
+ export declare function skeleton(props: SkeletonStyleProps): string
826
+
827
+ /** @beta */
828
+ export declare interface SkeletonStyleProps extends RadiusStyleProps {}
829
+
736
830
  export declare function spinner(): string
737
831
 
738
832
  export declare function _switch(): string
@@ -740,12 +834,31 @@ export declare function _switch(): string
740
834
  /** @public */
741
835
  export declare function text(props: TextStyleProps): string
742
836
 
837
+ /**
838
+ * @public
839
+ */
840
+ export declare type TextAlign = 'left' | 'right' | 'center' | 'justify' | 'initial'
841
+
743
842
  export declare function textArea(): string
744
843
 
745
- export declare function textInput(props: {size: ResponsiveProp<number>}): string
844
+ export declare function textInput(props: TextInputStyleProps): string
845
+
846
+ export declare function textInputElement(): string
847
+
848
+ /** @public */
849
+ export declare interface TextInputStyleProps {
850
+ padding: ResponsiveProp<Space>
851
+ size: ResponsiveProp<FontTextSize>
852
+ }
746
853
 
747
854
  export declare type TextSize = number
748
855
 
856
+ export declare function textSkeleton(props: TextSkeletonStyleProps): string
857
+
858
+ export declare interface TextSkeletonStyleProps {
859
+ size?: ResponsiveProp<FontTextSize>
860
+ }
861
+
749
862
  /** @public */
750
863
  export declare interface TextStyleProps extends FontStyleProps_2 {
751
864
  accent?: boolean
@@ -902,7 +1015,7 @@ export declare type ThemeVarName =
902
1015
  | '--input-text-focus-ring-width'
903
1016
  | '--layer-dialog-z-offset'
904
1017
  | `--radius-${Radius}`
905
- | `--space-${Space}`
1018
+ | `--space-${Exclude<Space, 0.5> | '0_5'}`
906
1019
  | `--shadow-${Shadow}-umbra`
907
1020
  | `--shadow-${Shadow}-penumbra`
908
1021
  | `--shadow-${Shadow}-ambient`
@@ -931,6 +1044,12 @@ export declare interface Vars {
931
1044
  dark: ColorSchemeVars
932
1045
  light: ColorSchemeVars
933
1046
  } & ScopedColorVars
1047
+ font: {
1048
+ code: FontVars<FontCodeSize>
1049
+ heading: FontVars<FontHeadingSize>
1050
+ label: FontVars<FontLabelSize>
1051
+ text: FontVars<FontTextSize>
1052
+ }
934
1053
  space: Record<Space, CSSVar>
935
1054
  }
936
1055