@sanity/ui 3.0.0-static.5 → 3.0.0-static.7

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 (57) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +60 -56
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-es/_visual-editing.mjs +61 -57
  4. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  5. package/dist/_visual-editing.d.mts +10 -10
  6. package/dist/_visual-editing.d.ts +10 -10
  7. package/dist/cli.js +1 -1
  8. package/dist/css.d.mts +11 -1
  9. package/dist/css.d.ts +11 -1
  10. package/dist/css.js +324 -309
  11. package/dist/css.js.map +1 -1
  12. package/dist/css.mjs +324 -309
  13. package/dist/css.mjs.map +1 -1
  14. package/dist/index.d.mts +10 -10
  15. package/dist/index.d.ts +10 -10
  16. package/dist/index.js +5 -17
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +7 -19
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/sanity-theme.css +1 -1
  21. package/dist/system.css +229 -10
  22. package/dist/theme.js +1 -1
  23. package/dist/theme.js.map +1 -1
  24. package/dist/theme.mjs +1 -1
  25. package/dist/theme.mjs.map +1 -1
  26. package/package.json +2 -2
  27. package/src/css/aspects/index.ts +1 -0
  28. package/src/css/aspects/minWidth/index.ts +2 -0
  29. package/src/css/aspects/minWidth/minWidth.style.ts +13 -0
  30. package/src/css/aspects/minWidth/minWidth.ts +6 -0
  31. package/src/css/aspects/minWidth/types.ts +7 -0
  32. package/src/css/compile/compileRule.ts +1 -0
  33. package/src/css/compile/compileStyle.ts +1 -1
  34. package/src/css/primitives/_input/__workshop__/index.ts +1 -1
  35. package/src/css/primitives/box/box.style.ts +1 -1
  36. package/src/css/primitives/box/box.ts +2 -3
  37. package/src/css/primitives/box/types.ts +2 -0
  38. package/src/css/primitives/card/card.style.ts +69 -3
  39. package/src/css/primitives/card/types.ts +0 -1
  40. package/src/css/primitives/popover/popover.ts +4 -0
  41. package/src/css/primitives/switch/switch.style.ts +8 -83
  42. package/src/css/system.style.ts +2 -0
  43. package/src/theme/v3/defaults.ts +1 -1
  44. package/src/ui/components/autocomplete/__workshop__/index.ts +1 -1
  45. package/src/ui/components/autocomplete/autocomplete.tsx +2 -11
  46. package/src/ui/components/dialog/dialog.tsx +3 -4
  47. package/src/ui/constants.ts +6 -0
  48. package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +0 -2
  49. package/src/ui/primitives/box/box.tsx +3 -2
  50. package/src/ui/primitives/card/card.tsx +2 -6
  51. package/src/ui/primitives/code/code.tsx +1 -1
  52. package/src/ui/primitives/kbd/kbd.tsx +2 -2
  53. package/src/ui/primitives/popover/popover.tsx +5 -75
  54. package/src/ui/primitives/popover/popoverCard.tsx +45 -39
  55. package/src/ui/primitives/textInput/textInput.tsx +1 -1
  56. package/src/ui/primitives/tooltip/tooltip.tsx +2 -3
  57. package/src/css/primitives/card/rules.ts +0 -473
@@ -431,16 +431,16 @@ export declare interface PopoverProps extends CardProps, LayerProps {
431
431
  ref: ForwardedRef<HTMLElement>
432
432
  }>
433
433
  /**
434
- * When `true`, prevent overflow within the current boundary:
435
- * - by flipping on its side axis
436
- * - by resizing
437
- /*
438
- * Note that:
439
- * - setting `preventOverflow` to `true` also prevents overflow on its side axis
440
- * - setting `matchReferenceWidth` to `true` also causes the popover to resize
441
- *
442
- * @defaultValue false
443
- */
434
+ * When `true`, prevent overflow within the current boundary:
435
+ * - by flipping on its side axis
436
+ * - by resizing
437
+ *
438
+ * Note that:
439
+ * - setting `preventOverflow` to `true` also prevents overflow on its side axis
440
+ * - setting `matchReferenceWidth` to `true` also causes the popover to resize
441
+ *
442
+ * @defaultValue false
443
+ */
444
444
  constrainSize?: boolean
445
445
  content?: ReactNode
446
446
  disabled?: boolean
@@ -431,16 +431,16 @@ export declare interface PopoverProps extends CardProps, LayerProps {
431
431
  ref: ForwardedRef<HTMLElement>
432
432
  }>
433
433
  /**
434
- * When `true`, prevent overflow within the current boundary:
435
- * - by flipping on its side axis
436
- * - by resizing
437
- /*
438
- * Note that:
439
- * - setting `preventOverflow` to `true` also prevents overflow on its side axis
440
- * - setting `matchReferenceWidth` to `true` also causes the popover to resize
441
- *
442
- * @defaultValue false
443
- */
434
+ * When `true`, prevent overflow within the current boundary:
435
+ * - by flipping on its side axis
436
+ * - by resizing
437
+ *
438
+ * Note that:
439
+ * - setting `preventOverflow` to `true` also prevents overflow on its side axis
440
+ * - setting `matchReferenceWidth` to `true` also causes the popover to resize
441
+ *
442
+ * @defaultValue false
443
+ */
444
444
  constrainSize?: boolean
445
445
  content?: ReactNode
446
446
  disabled?: boolean
package/dist/cli.js CHANGED
@@ -335,7 +335,7 @@ class CAC extends events.EventEmitter {
335
335
  }
336
336
  }
337
337
  const cac = (name = "") => new CAC(name);
338
- var version = "3.0.0-static.5";
338
+ var version = "3.0.0-static.7";
339
339
  const cli = cac("ui");
340
340
  cli.command("build").option("--cwd [cwd]", "Working directory").option("--outDir [outDir]", "Output directory").action(async (options) => {
341
341
  const {
package/dist/css.d.mts CHANGED
@@ -100,6 +100,7 @@ export declare interface BoxStyleProps
100
100
  InsetStyleProps,
101
101
  MarginStyleProps,
102
102
  MaxWidthStyleProps,
103
+ MinWidthStyleProps,
103
104
  OverflowStyleProps,
104
105
  PaddingStyleProps,
105
106
  PointerEventsStyleProps,
@@ -218,7 +219,6 @@ export declare type CardScopedVarName =
218
219
 
219
220
  export declare interface CardStyleProps extends BoxStyleProps, ShadowStyleProps {
220
221
  checkered?: boolean
221
- selectable?: boolean
222
222
  scheme?: ThemeColorSchemeKey
223
223
  tone?: ThemeColorCardToneKey | 'inherit'
224
224
  }
@@ -1007,6 +1007,14 @@ export declare function menu(): string | undefined
1007
1007
 
1008
1008
  export declare function menuDivider(): string | undefined
1009
1009
 
1010
+ export declare type MinWidth = 0 | 'auto' | 'full' | 'min' | 'max' | 'fit'
1011
+
1012
+ export declare function minWidth(props: MinWidthStyleProps): string
1013
+
1014
+ export declare interface MinWidthStyleProps {
1015
+ minWidth?: ResponsiveProp<MinWidth>
1016
+ }
1017
+
1010
1018
  export declare function overflow(props: OverflowStyleProps): string | undefined
1011
1019
 
1012
1020
  /** @public */
@@ -1044,6 +1052,8 @@ export declare interface PointerEventsStyleProps {
1044
1052
 
1045
1053
  export declare function popover(): string | undefined
1046
1054
 
1055
+ export declare function popoverCard(): string | undefined
1056
+
1047
1057
  /** @public */
1048
1058
  export declare type Position = 'absolute' | 'fixed' | 'relative' | 'static' | 'sticky'
1049
1059
 
package/dist/css.d.ts CHANGED
@@ -100,6 +100,7 @@ export declare interface BoxStyleProps
100
100
  InsetStyleProps,
101
101
  MarginStyleProps,
102
102
  MaxWidthStyleProps,
103
+ MinWidthStyleProps,
103
104
  OverflowStyleProps,
104
105
  PaddingStyleProps,
105
106
  PointerEventsStyleProps,
@@ -218,7 +219,6 @@ export declare type CardScopedVarName =
218
219
 
219
220
  export declare interface CardStyleProps extends BoxStyleProps, ShadowStyleProps {
220
221
  checkered?: boolean
221
- selectable?: boolean
222
222
  scheme?: ThemeColorSchemeKey
223
223
  tone?: ThemeColorCardToneKey | 'inherit'
224
224
  }
@@ -1007,6 +1007,14 @@ export declare function menu(): string | undefined
1007
1007
 
1008
1008
  export declare function menuDivider(): string | undefined
1009
1009
 
1010
+ export declare type MinWidth = 0 | 'auto' | 'full' | 'min' | 'max' | 'fit'
1011
+
1012
+ export declare function minWidth(props: MinWidthStyleProps): string
1013
+
1014
+ export declare interface MinWidthStyleProps {
1015
+ minWidth?: ResponsiveProp<MinWidth>
1016
+ }
1017
+
1010
1018
  export declare function overflow(props: OverflowStyleProps): string | undefined
1011
1019
 
1012
1020
  /** @public */
@@ -1044,6 +1052,8 @@ export declare interface PointerEventsStyleProps {
1044
1052
 
1045
1053
  export declare function popover(): string | undefined
1046
1054
 
1055
+ export declare function popoverCard(): string | undefined
1056
+
1047
1057
  /** @public */
1048
1058
  export declare type Position = 'absolute' | 'fixed' | 'relative' | 'static' | 'sticky'
1049
1059