@sanity/ui 3.0.0-static.19 → 3.0.0-static.20

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 (131) hide show
  1. package/dist/_chunks-cjs/_visual-editing.cjs +109 -112
  2. package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
  3. package/dist/_chunks-cjs/buildCommand.cjs +30 -24
  4. package/dist/_chunks-cjs/buildCommand.cjs.map +1 -1
  5. package/dist/_chunks-es/_visual-editing.js +110 -113
  6. package/dist/_chunks-es/_visual-editing.js.map +1 -1
  7. package/dist/cli.cjs +1 -1
  8. package/dist/css.cjs +379 -358
  9. package/dist/css.cjs.map +1 -1
  10. package/dist/css.d.cts +45 -10
  11. package/dist/css.d.ts +45 -10
  12. package/dist/css.js +379 -358
  13. package/dist/css.js.map +1 -1
  14. package/dist/index.d.cts +0 -1
  15. package/dist/index.d.ts +0 -1
  16. package/dist/theme.cjs +89 -64
  17. package/dist/theme.cjs.map +1 -1
  18. package/dist/theme.d.cts +28 -2
  19. package/dist/theme.d.ts +28 -2
  20. package/dist/theme.js +89 -64
  21. package/dist/theme.js.map +1 -1
  22. package/dist/ui-system.css +1236 -801
  23. package/dist/ui-system.min.css +1 -1
  24. package/dist/ui-theme.css +413 -82
  25. package/dist/ui-theme.min.css +1 -1
  26. package/dist/ui.css +1649 -883
  27. package/dist/ui.min.css +1 -1
  28. package/exports/_visual-editing.ts +0 -1
  29. package/package.json +6 -6
  30. package/src/cli/buildCommand.ts +48 -41
  31. package/src/core/components/autocomplete/__workshop__/async.tsx +1 -1
  32. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +1 -1
  33. package/src/core/components/autocomplete/__workshop__/custom.tsx +12 -11
  34. package/src/core/components/autocomplete/__workshop__/example.tsx +13 -12
  35. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +53 -54
  36. package/src/core/components/breadcrumbs/__workshop__/example.tsx +1 -2
  37. package/src/core/components/dialog/__workshop__/autoFocus.tsx +2 -2
  38. package/src/core/components/dialog/__workshop__/onScroll.tsx +16 -4
  39. package/src/core/components/dialog/__workshop__/position.tsx +3 -3
  40. package/src/core/components/dialog/__workshop__/props.tsx +6 -6
  41. package/src/core/components/menu/__workshop__/menuButton.tsx +3 -3
  42. package/src/core/components/menu/__workshop__/tones.tsx +3 -3
  43. package/src/core/components/skeleton/__workshop__/delay.tsx +2 -2
  44. package/src/core/components/skeleton/__workshop__/skeleton.tsx +2 -2
  45. package/src/core/components/tab/__workshop__/example.tsx +1 -1
  46. package/src/core/components/toast/__workshop__/toast.tsx +5 -5
  47. package/src/core/primitives/avatar/__workshop__/asButton.tsx +2 -2
  48. package/src/core/primitives/avatar/__workshop__/stack.tsx +2 -2
  49. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +1 -1
  50. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +1 -1
  51. package/src/core/primitives/badge/__workshop__/props.tsx +5 -8
  52. package/src/core/primitives/box/__workshop__/props.tsx +2 -2
  53. package/src/core/primitives/box/box.tsx +2 -0
  54. package/src/core/primitives/button/__workshop__/props.tsx +17 -19
  55. package/src/core/primitives/button/__workshop__/stacked.tsx +12 -12
  56. package/src/core/primitives/card/__workshop__/asButton.tsx +1 -1
  57. package/src/core/primitives/card/__workshop__/interactive.tsx +2 -2
  58. package/src/core/primitives/card/__workshop__/props.tsx +11 -11
  59. package/src/core/primitives/card/__workshop__/selected.tsx +2 -2
  60. package/src/core/primitives/checkbox/__workshop__/props.tsx +5 -5
  61. package/src/core/primitives/code/__workshop__/props.tsx +4 -7
  62. package/src/core/primitives/code/code.tsx +1 -1
  63. package/src/core/primitives/container/__workshop__/example.tsx +2 -2
  64. package/src/core/primitives/flex/__workshop__/example.tsx +2 -2
  65. package/src/core/primitives/heading/__workshop__/plain.tsx +11 -7
  66. package/src/core/primitives/heading/heading.tsx +1 -1
  67. package/src/core/primitives/inline/__workshop__/plain.tsx +2 -5
  68. package/src/core/primitives/label/__workshop__/plain.tsx +7 -8
  69. package/src/core/primitives/label/label.tsx +1 -1
  70. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +6 -6
  71. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +3 -3
  72. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +1 -1
  73. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +1 -1
  74. package/src/core/primitives/popover/__workshop__/TestStory.tsx +3 -1
  75. package/src/core/primitives/radio/__workshop__/example.tsx +2 -2
  76. package/src/core/primitives/radio/__workshop__/plain.tsx +3 -3
  77. package/src/core/primitives/select/__workshop__/plain.tsx +5 -8
  78. package/src/core/primitives/spinner/__workshop__/Props.tsx +3 -3
  79. package/src/core/primitives/stack/__workshop__/plain.tsx +2 -2
  80. package/src/core/primitives/text/__workshop__/colored.tsx +2 -2
  81. package/src/core/primitives/text/__workshop__/example.tsx +8 -11
  82. package/src/core/primitives/textArea/__workshop__/plain.tsx +11 -12
  83. package/src/core/primitives/textArea/textArea.tsx +10 -7
  84. package/src/core/primitives/textInput/__workshop__/customValidity.tsx +1 -1
  85. package/src/core/primitives/textInput/__workshop__/plain.tsx +30 -18
  86. package/src/core/primitives/textInput/__workshop__/states.tsx +1 -1
  87. package/src/core/primitives/textInput/__workshop__/typed.tsx +2 -2
  88. package/src/core/primitives/textInput/textInput.tsx +11 -20
  89. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +3 -3
  90. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +1 -1
  91. package/src/core/primitives/tooltip/__workshop__/props.tsx +4 -4
  92. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +1 -1
  93. package/src/core/primitives/tooltip/tooltipLayer.tsx +1 -3
  94. package/src/css/_system.style.ts +2 -0
  95. package/src/css/aspects/font/font.style.ts +9 -8
  96. package/src/css/aspects/index.ts +1 -0
  97. package/src/css/aspects/margin/margin.style.ts +13 -0
  98. package/src/css/aspects/margin/types.ts +12 -7
  99. package/src/css/aspects/minHeight/index.ts +2 -0
  100. package/src/css/aspects/minHeight/minHeight.style.ts +9 -0
  101. package/src/css/aspects/minHeight/minHeight.ts +8 -0
  102. package/src/css/aspects/minHeight/types.ts +9 -0
  103. package/src/css/components/skeleton/skeleton.style.ts +7 -10
  104. package/src/css/primitives/_input/_input.style.ts +30 -51
  105. package/src/css/primitives/_selectable/_selectable.style.ts +2 -3
  106. package/src/css/primitives/box/box.style.ts +0 -3
  107. package/src/css/primitives/box/box.ts +2 -0
  108. package/src/css/primitives/box/types.ts +2 -0
  109. package/src/css/primitives/card/card.style.ts +3 -0
  110. package/src/css/primitives/code/code.style.ts +1 -0
  111. package/src/css/primitives/heading/heading.style.ts +1 -0
  112. package/src/css/primitives/label/label.style.ts +1 -0
  113. package/src/css/primitives/text/text.style.ts +1 -0
  114. package/src/css/primitives/textArea/textArea.style.ts +1 -3
  115. package/src/css/primitives/textInput/textInput.style.ts +10 -18
  116. package/src/css/primitives/textInput/textInput.ts +15 -0
  117. package/src/css/primitives/tooltip/tooltip.style.ts +0 -13
  118. package/src/css/primitives/tooltip/tooltip.ts +0 -5
  119. package/src/css/theme/resolveTheme.ts +29 -18
  120. package/src/theme/v0/font.ts +0 -1
  121. package/src/theme/v2/defaults/fonts.ts +0 -1
  122. package/src/theme/v3/_parseColorToken.ts +0 -5
  123. package/src/theme/v3/buildTheme_v3.ts +2 -2
  124. package/src/theme/v3/defaultFonts.ts +250 -0
  125. package/src/theme/v3/defaultTokens.ts +39 -35
  126. package/src/theme/v3/types.ts +35 -2
  127. package/src/theme/versioning/v3_v2.ts +1 -0
  128. package/src/css/primitives/_input/__workshop__/customInput.tsx +0 -16
  129. package/src/css/primitives/_input/__workshop__/index.ts +0 -14
  130. /package/src/core/components/autocomplete/{__mocks__ → __workshop__/mock}/apiStore.ts +0 -0
  131. /package/src/core/components/autocomplete/{__mocks__ → __workshop__/mock}/countries.ts +0 -0
package/dist/css.d.cts CHANGED
@@ -115,6 +115,7 @@ export declare interface BoxStyleProps
115
115
  InsetStyleProps,
116
116
  MarginStyleProps,
117
117
  MaxWidthStyleProps,
118
+ MinHeightStyleProps,
118
119
  MinWidthStyleProps,
119
120
  OverflowStyleProps,
120
121
  PaddingStyleProps,
@@ -493,18 +494,21 @@ export declare interface LabelStyleProps extends FontStyleProps {
493
494
  size?: ResponsiveProp<FontLabelSize>
494
495
  }
495
496
 
497
+ /** @public */
498
+ export declare type Margin = Space | 'auto'
499
+
496
500
  /** @internal */
497
501
  export declare function margin(props: MarginStyleProps): string | undefined
498
502
 
499
503
  /** @public */
500
504
  export declare interface MarginStyleProps {
501
- margin?: ResponsiveProp<number>
502
- marginTop?: ResponsiveProp<number>
503
- marginRight?: ResponsiveProp<number>
504
- marginBottom?: ResponsiveProp<number>
505
- marginLeft?: ResponsiveProp<number>
506
- marginX?: ResponsiveProp<number>
507
- marginY?: ResponsiveProp<number>
505
+ margin?: ResponsiveProp<Margin>
506
+ marginTop?: ResponsiveProp<Margin>
507
+ marginRight?: ResponsiveProp<Margin>
508
+ marginBottom?: ResponsiveProp<Margin>
509
+ marginLeft?: ResponsiveProp<Margin>
510
+ marginX?: ResponsiveProp<Margin>
511
+ marginY?: ResponsiveProp<Margin>
508
512
  }
509
513
 
510
514
  /** @internal */
@@ -521,6 +525,17 @@ export declare function menu(): string | undefined
521
525
  /** @public */
522
526
  export declare function menuDivider(): string | undefined
523
527
 
528
+ /** @public */
529
+ export declare type MinHeight = 0 | 'full'
530
+
531
+ /** @internal */
532
+ export declare function minHeight(props: MinHeightStyleProps): string | undefined
533
+
534
+ /** @public */
535
+ export declare interface MinHeightStyleProps {
536
+ minHeight?: ResponsiveProp<MinHeight>
537
+ }
538
+
524
539
  /** @public */
525
540
  export declare type MinWidth = 0 | 'auto' | 'full' | 'min' | 'max' | 'fit'
526
541
 
@@ -727,9 +742,18 @@ export declare interface TextAreaStyleProps extends InputStyleProps {}
727
742
  /** @public */
728
743
  export declare function textInput(props: TextInputStyleProps): string | undefined
729
744
 
745
+ /** @public */
746
+ export declare function textInputElement(): string | undefined
747
+
748
+ /** @public */
749
+ export declare function textInputPrefix(): string | undefined
750
+
730
751
  /** @public */
731
752
  export declare interface TextInputStyleProps extends InputStyleProps {}
732
753
 
754
+ /** @public */
755
+ export declare function textInputSuffix(): string | undefined
756
+
733
757
  /** @internal */
734
758
  export declare function textOverflow(props: TextOverflowStyleProps): string | undefined
735
759
 
@@ -786,9 +810,6 @@ export declare function toBoxShadow(value: ThemeBoxShadow | undefined): string
786
810
  /** @public */
787
811
  export declare function tooltip(): string | undefined
788
812
 
789
- /** @public */
790
- export declare function tooltipCard(): string | undefined
791
-
792
813
  /** @beta */
793
814
  export declare function treeItem(): string | undefined
794
815
 
@@ -5322,7 +5343,10 @@ export declare const varNames: Readonly<{
5322
5343
  iconSize: null
5323
5344
  featureSettings: null
5324
5345
  fontWeight: null
5346
+ capHeight: null
5325
5347
  iconOffset: null
5348
+ customIconSize: null
5349
+ customIconOffset: null
5326
5350
  code: {
5327
5351
  family: string
5328
5352
  featureSettings: string
@@ -5341,6 +5365,7 @@ export declare const varNames: Readonly<{
5341
5365
  ascenderHeight: string
5342
5366
  descenderHeight: string
5343
5367
  iconSize: string
5368
+ customIconSize: string
5344
5369
  }
5345
5370
  >
5346
5371
  }
@@ -5362,6 +5387,7 @@ export declare const varNames: Readonly<{
5362
5387
  ascenderHeight: string
5363
5388
  descenderHeight: string
5364
5389
  iconSize: string
5390
+ customIconSize: string
5365
5391
  }
5366
5392
  >
5367
5393
  }
@@ -5383,6 +5409,7 @@ export declare const varNames: Readonly<{
5383
5409
  ascenderHeight: string
5384
5410
  descenderHeight: string
5385
5411
  iconSize: string
5412
+ customIconSize: string
5386
5413
  }
5387
5414
  >
5388
5415
  }
@@ -5404,6 +5431,7 @@ export declare const varNames: Readonly<{
5404
5431
  ascenderHeight: string
5405
5432
  descenderHeight: string
5406
5433
  iconSize: string
5434
+ customIconSize: string
5407
5435
  }
5408
5436
  >
5409
5437
  }
@@ -10024,7 +10052,10 @@ export declare const vars: Readonly<{
10024
10052
  iconSize: null
10025
10053
  featureSettings: null
10026
10054
  fontWeight: null
10055
+ capHeight: null
10027
10056
  iconOffset: null
10057
+ customIconSize: null
10058
+ customIconOffset: null
10028
10059
  code: {
10029
10060
  family: string
10030
10061
  featureSettings: string
@@ -10043,6 +10074,7 @@ export declare const vars: Readonly<{
10043
10074
  ascenderHeight: string
10044
10075
  descenderHeight: string
10045
10076
  iconSize: string
10077
+ customIconSize: string
10046
10078
  }
10047
10079
  >
10048
10080
  }
@@ -10064,6 +10096,7 @@ export declare const vars: Readonly<{
10064
10096
  ascenderHeight: string
10065
10097
  descenderHeight: string
10066
10098
  iconSize: string
10099
+ customIconSize: string
10067
10100
  }
10068
10101
  >
10069
10102
  }
@@ -10085,6 +10118,7 @@ export declare const vars: Readonly<{
10085
10118
  ascenderHeight: string
10086
10119
  descenderHeight: string
10087
10120
  iconSize: string
10121
+ customIconSize: string
10088
10122
  }
10089
10123
  >
10090
10124
  }
@@ -10106,6 +10140,7 @@ export declare const vars: Readonly<{
10106
10140
  ascenderHeight: string
10107
10141
  descenderHeight: string
10108
10142
  iconSize: string
10143
+ customIconSize: string
10109
10144
  }
10110
10145
  >
10111
10146
  }
package/dist/css.d.ts CHANGED
@@ -115,6 +115,7 @@ export declare interface BoxStyleProps
115
115
  InsetStyleProps,
116
116
  MarginStyleProps,
117
117
  MaxWidthStyleProps,
118
+ MinHeightStyleProps,
118
119
  MinWidthStyleProps,
119
120
  OverflowStyleProps,
120
121
  PaddingStyleProps,
@@ -493,18 +494,21 @@ export declare interface LabelStyleProps extends FontStyleProps {
493
494
  size?: ResponsiveProp<FontLabelSize>
494
495
  }
495
496
 
497
+ /** @public */
498
+ export declare type Margin = Space | 'auto'
499
+
496
500
  /** @internal */
497
501
  export declare function margin(props: MarginStyleProps): string | undefined
498
502
 
499
503
  /** @public */
500
504
  export declare interface MarginStyleProps {
501
- margin?: ResponsiveProp<number>
502
- marginTop?: ResponsiveProp<number>
503
- marginRight?: ResponsiveProp<number>
504
- marginBottom?: ResponsiveProp<number>
505
- marginLeft?: ResponsiveProp<number>
506
- marginX?: ResponsiveProp<number>
507
- marginY?: ResponsiveProp<number>
505
+ margin?: ResponsiveProp<Margin>
506
+ marginTop?: ResponsiveProp<Margin>
507
+ marginRight?: ResponsiveProp<Margin>
508
+ marginBottom?: ResponsiveProp<Margin>
509
+ marginLeft?: ResponsiveProp<Margin>
510
+ marginX?: ResponsiveProp<Margin>
511
+ marginY?: ResponsiveProp<Margin>
508
512
  }
509
513
 
510
514
  /** @internal */
@@ -521,6 +525,17 @@ export declare function menu(): string | undefined
521
525
  /** @public */
522
526
  export declare function menuDivider(): string | undefined
523
527
 
528
+ /** @public */
529
+ export declare type MinHeight = 0 | 'full'
530
+
531
+ /** @internal */
532
+ export declare function minHeight(props: MinHeightStyleProps): string | undefined
533
+
534
+ /** @public */
535
+ export declare interface MinHeightStyleProps {
536
+ minHeight?: ResponsiveProp<MinHeight>
537
+ }
538
+
524
539
  /** @public */
525
540
  export declare type MinWidth = 0 | 'auto' | 'full' | 'min' | 'max' | 'fit'
526
541
 
@@ -727,9 +742,18 @@ export declare interface TextAreaStyleProps extends InputStyleProps {}
727
742
  /** @public */
728
743
  export declare function textInput(props: TextInputStyleProps): string | undefined
729
744
 
745
+ /** @public */
746
+ export declare function textInputElement(): string | undefined
747
+
748
+ /** @public */
749
+ export declare function textInputPrefix(): string | undefined
750
+
730
751
  /** @public */
731
752
  export declare interface TextInputStyleProps extends InputStyleProps {}
732
753
 
754
+ /** @public */
755
+ export declare function textInputSuffix(): string | undefined
756
+
733
757
  /** @internal */
734
758
  export declare function textOverflow(props: TextOverflowStyleProps): string | undefined
735
759
 
@@ -786,9 +810,6 @@ export declare function toBoxShadow(value: ThemeBoxShadow | undefined): string
786
810
  /** @public */
787
811
  export declare function tooltip(): string | undefined
788
812
 
789
- /** @public */
790
- export declare function tooltipCard(): string | undefined
791
-
792
813
  /** @beta */
793
814
  export declare function treeItem(): string | undefined
794
815
 
@@ -5322,7 +5343,10 @@ export declare const varNames: Readonly<{
5322
5343
  iconSize: null
5323
5344
  featureSettings: null
5324
5345
  fontWeight: null
5346
+ capHeight: null
5325
5347
  iconOffset: null
5348
+ customIconSize: null
5349
+ customIconOffset: null
5326
5350
  code: {
5327
5351
  family: string
5328
5352
  featureSettings: string
@@ -5341,6 +5365,7 @@ export declare const varNames: Readonly<{
5341
5365
  ascenderHeight: string
5342
5366
  descenderHeight: string
5343
5367
  iconSize: string
5368
+ customIconSize: string
5344
5369
  }
5345
5370
  >
5346
5371
  }
@@ -5362,6 +5387,7 @@ export declare const varNames: Readonly<{
5362
5387
  ascenderHeight: string
5363
5388
  descenderHeight: string
5364
5389
  iconSize: string
5390
+ customIconSize: string
5365
5391
  }
5366
5392
  >
5367
5393
  }
@@ -5383,6 +5409,7 @@ export declare const varNames: Readonly<{
5383
5409
  ascenderHeight: string
5384
5410
  descenderHeight: string
5385
5411
  iconSize: string
5412
+ customIconSize: string
5386
5413
  }
5387
5414
  >
5388
5415
  }
@@ -5404,6 +5431,7 @@ export declare const varNames: Readonly<{
5404
5431
  ascenderHeight: string
5405
5432
  descenderHeight: string
5406
5433
  iconSize: string
5434
+ customIconSize: string
5407
5435
  }
5408
5436
  >
5409
5437
  }
@@ -10024,7 +10052,10 @@ export declare const vars: Readonly<{
10024
10052
  iconSize: null
10025
10053
  featureSettings: null
10026
10054
  fontWeight: null
10055
+ capHeight: null
10027
10056
  iconOffset: null
10057
+ customIconSize: null
10058
+ customIconOffset: null
10028
10059
  code: {
10029
10060
  family: string
10030
10061
  featureSettings: string
@@ -10043,6 +10074,7 @@ export declare const vars: Readonly<{
10043
10074
  ascenderHeight: string
10044
10075
  descenderHeight: string
10045
10076
  iconSize: string
10077
+ customIconSize: string
10046
10078
  }
10047
10079
  >
10048
10080
  }
@@ -10064,6 +10096,7 @@ export declare const vars: Readonly<{
10064
10096
  ascenderHeight: string
10065
10097
  descenderHeight: string
10066
10098
  iconSize: string
10099
+ customIconSize: string
10067
10100
  }
10068
10101
  >
10069
10102
  }
@@ -10085,6 +10118,7 @@ export declare const vars: Readonly<{
10085
10118
  ascenderHeight: string
10086
10119
  descenderHeight: string
10087
10120
  iconSize: string
10121
+ customIconSize: string
10088
10122
  }
10089
10123
  >
10090
10124
  }
@@ -10106,6 +10140,7 @@ export declare const vars: Readonly<{
10106
10140
  ascenderHeight: string
10107
10141
  descenderHeight: string
10108
10142
  iconSize: string
10143
+ customIconSize: string
10109
10144
  }
10110
10145
  >
10111
10146
  }