@sanity/ui 1.7.9 → 1.7.10

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 (54) hide show
  1. package/dist/index.d.ts +351 -15
  2. package/dist/index.esm.js +20 -13
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +20 -13
  5. package/dist/index.js.map +1 -1
  6. package/package.json +20 -19
  7. package/src/components/dialog/styles.ts +1 -1
  8. package/src/components/menu/__workshop__/shouldFocus.tsx +1 -1
  9. package/src/components/menu/menuDivider.ts +2 -3
  10. package/src/components/menu/menuGroup.tsx +1 -1
  11. package/src/components/tree/style.ts +4 -4
  12. package/src/primitives/_selectable/style.ts +3 -3
  13. package/src/primitives/avatar/styles.ts +6 -3
  14. package/src/primitives/badge/styles.ts +1 -1
  15. package/src/primitives/box/box.tsx +1 -0
  16. package/src/primitives/button/styles.ts +3 -2
  17. package/src/primitives/card/styles.ts +4 -4
  18. package/src/primitives/checkbox/styles.ts +3 -3
  19. package/src/primitives/code/styles.ts +3 -5
  20. package/src/primitives/container/styles.ts +1 -1
  21. package/src/primitives/flex/flex.tsx +1 -0
  22. package/src/primitives/heading/styles.ts +2 -4
  23. package/src/primitives/inline/inline.tsx +8 -1
  24. package/src/primitives/inline/styles.ts +1 -1
  25. package/src/primitives/label/styles.ts +2 -2
  26. package/src/primitives/popover/popover.tsx +2 -0
  27. package/src/primitives/radio/styles.ts +3 -3
  28. package/src/primitives/select/styles.ts +6 -5
  29. package/src/primitives/stack/styles.ts +1 -1
  30. package/src/primitives/switch/styles.ts +6 -6
  31. package/src/primitives/text/styles.ts +2 -2
  32. package/src/styles/border/borderStyle.ts +1 -1
  33. package/src/styles/box/boxStyle.ts +1 -1
  34. package/src/styles/colorVars/colorVarsStyle.ts +1 -1
  35. package/src/styles/flex/flexItemStyle.ts +1 -1
  36. package/src/styles/flex/flexStyle.ts +1 -1
  37. package/src/styles/font/codeFontStyle.ts +1 -1
  38. package/src/styles/font/headingFontStyle.ts +1 -1
  39. package/src/styles/font/labelFontStyle.ts +1 -1
  40. package/src/styles/font/responsiveFont.ts +1 -1
  41. package/src/styles/font/textAlignStyle.ts +1 -1
  42. package/src/styles/font/textFontStyle.ts +1 -1
  43. package/src/styles/grid/gridItemStyle.ts +1 -1
  44. package/src/styles/grid/gridStyle.ts +1 -1
  45. package/src/styles/helpers.ts +1 -1
  46. package/src/styles/input/responsiveInputPaddingStyle.ts +1 -1
  47. package/src/styles/input/textInputStyle.ts +5 -4
  48. package/src/styles/margin/marginStyle.ts +1 -1
  49. package/src/styles/padding/paddingStyle.ts +1 -1
  50. package/src/styles/radius/radiusStyle.ts +1 -1
  51. package/src/styles/shadow/shadowStyle.ts +1 -1
  52. package/src/theme/types.ts +1 -1
  53. package/src/types/index.ts +1 -0
  54. package/src/types/styled.ts +9 -0
package/dist/index.js CHANGED
@@ -3996,6 +3996,7 @@ function avatarArrowStyle() {
3996
3996
  top: "-5px",
3997
3997
  left: "50%",
3998
3998
  transform: "translateX(-6px)",
3999
+ // @ts-expect-error -- TODO wait for CSSObject types to be fixed in `styled-components` itself
3999
4000
  "&:not([hidden])": {
4000
4001
  display: "block"
4001
4002
  }
@@ -4032,13 +4033,14 @@ function avatarRootStyle(props) {
4032
4033
  opacity: 0.5
4033
4034
  },
4034
4035
  "&>svg": {
4036
+ // @ts-expect-error -- TODO wait for CSSObject types to be fixed in `styled-components` itself
4035
4037
  "&:not([hidden])": {
4036
4038
  display: "block"
4037
4039
  }
4038
4040
  },
4039
4041
  /* &:is(button) */
4040
4042
  '&[data-as="button"]': {
4041
- "-webkit-font-smoothing": "inherit",
4043
+ WebkitFontSmoothing: "inherit",
4042
4044
  appearance: "none",
4043
4045
  margin: 0,
4044
4046
  padding: 0,
@@ -4046,6 +4048,7 @@ function avatarRootStyle(props) {
4046
4048
  font: "inherit",
4047
4049
  color: "inherit",
4048
4050
  outline: "none",
4051
+ // @ts-expect-error -- TODO wait for CSSObject types to be fixed in `styled-components` itself
4049
4052
  "&:focus": {
4050
4053
  boxShadow: focusRingStyle({
4051
4054
  focusRing
@@ -4110,7 +4113,7 @@ function avatarStrokeStyle() {
4110
4113
  return {
4111
4114
  strokeWidth: "3px",
4112
4115
  '[data-status="editing"] &': {
4113
- strokeSasharray: "2 4",
4116
+ strokeDasharray: "2 4",
4114
4117
  strokeLinecap: "round"
4115
4118
  }
4116
4119
  };
@@ -4527,17 +4530,21 @@ const Flex = react.forwardRef(function Flex2(props, ref) {
4527
4530
  wrap,
4528
4531
  ...restProps
4529
4532
  } = props;
4530
- return /* @__PURE__ */jsxRuntime.jsx(Root$x, {
4531
- "data-ui": "Flex",
4532
- ...restProps,
4533
- $align: useArrayProp(align),
4534
- $direction: useArrayProp(direction),
4535
- $gap: useArrayProp(gap),
4536
- $justify: useArrayProp(justify),
4537
- $wrap: useArrayProp(wrap),
4538
- forwardedAs: as,
4539
- ref
4540
- });
4533
+ return (
4534
+ // @ts-expect-error -- some dollar prefixed typings aren't inferred correctly https://github.com/styled-components/styled-components/issues/4062
4535
+ /* @__PURE__ */
4536
+ jsxRuntime.jsx(Root$x, {
4537
+ "data-ui": "Flex",
4538
+ ...restProps,
4539
+ $align: useArrayProp(align),
4540
+ $direction: useArrayProp(direction),
4541
+ $gap: useArrayProp(gap),
4542
+ $justify: useArrayProp(justify),
4543
+ $wrap: useArrayProp(wrap),
4544
+ forwardedAs: as,
4545
+ ref
4546
+ })
4547
+ );
4541
4548
  });
4542
4549
  var __freeze$w = Object.freeze;
4543
4550
  var __defProp$x = Object.defineProperty;