@sanity/ui 2.3.2 → 2.3.4-canary.0
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.
- package/dist/index.esm.js +5 -11
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -11
- package/dist/index.mjs.map +1 -1
- package/dist/theme.esm.js +1 -1
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +1 -1
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +1 -1
- package/dist/theme.mjs.map +1 -1
- package/package.json +27 -35
- package/src/core/primitives/avatar/avatarStack.tsx +2 -3
- package/src/core/primitives/inline/inline.tsx +2 -6
- package/src/theme/defaults/colorTokens.ts +1 -1
- package/src/core/primitives/helpers.ts +0 -11
package/dist/index.js
CHANGED
|
@@ -1525,13 +1525,7 @@ const Root$A = styledComponents.styled.div(
|
|
|
1525
1525
|
[size2]
|
|
1526
1526
|
);
|
|
1527
1527
|
return /* @__PURE__ */ jsxRuntime.jsx(Root$A, { $size: size2, "data-ui": "AvatarCounter", ref, children: /* @__PURE__ */ jsxRuntime.jsx(Label, { as: "span", size: fontSize2, weight: "medium", children: count }) });
|
|
1528
|
-
})
|
|
1529
|
-
function childrenToElementArray(children) {
|
|
1530
|
-
return (Array.isArray(children) ? children : [children]).filter(
|
|
1531
|
-
(node) => ReactIs.isElement(node) || ReactIs.isFragment(node) || typeof node == "string"
|
|
1532
|
-
);
|
|
1533
|
-
}
|
|
1534
|
-
const BASE_STYLES = styledComponents.css`
|
|
1528
|
+
}), BASE_STYLES = styledComponents.css`
|
|
1535
1529
|
white-space: nowrap;
|
|
1536
1530
|
|
|
1537
1531
|
& > div {
|
|
@@ -1562,7 +1556,7 @@ const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avata
|
|
|
1562
1556
|
maxLength: maxLengthProp = 4,
|
|
1563
1557
|
size: sizeProp = 1,
|
|
1564
1558
|
...restProps
|
|
1565
|
-
} = props, children =
|
|
1559
|
+
} = props, children = react.Children.toArray(childrenProp).filter(
|
|
1566
1560
|
(child) => typeof child != "string"
|
|
1567
1561
|
), maxLength = Math.max(maxLengthProp, 0), size2 = useArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
|
|
1568
1562
|
return /* @__PURE__ */ jsxRuntime.jsxs(Root$z, { "data-ui": "AvatarStack", ...restProps, ref, $size: size2, children: [
|
|
@@ -2637,7 +2631,7 @@ function inlineSpaceStyle(props) {
|
|
|
2637
2631
|
}
|
|
2638
2632
|
const Root$m = styledComponents.styled(Box)(inlineBaseStyle, inlineSpaceStyle), Inline = react.forwardRef(function(props, ref) {
|
|
2639
2633
|
const { as, children: childrenProp, space, ...restProps } = props, children = react.useMemo(
|
|
2640
|
-
() =>
|
|
2634
|
+
() => react.Children.map(childrenProp, (child) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: child })),
|
|
2641
2635
|
[childrenProp]
|
|
2642
2636
|
);
|
|
2643
2637
|
return /* @__PURE__ */ jsxRuntime.jsx(
|