@strapi/design-system 2.0.0-rc.15 → 2.0.0-rc.17
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/components/SimpleMenu/Menu.d.ts +3 -1
- package/dist/components/SimpleMenu/Menu.d.ts.map +1 -1
- package/dist/components/SimpleMenu/SimpleMenu.d.ts +1 -1
- package/dist/components/SimpleMenu/SimpleMenu.d.ts.map +1 -1
- package/dist/index.js +28 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1856,8 +1856,33 @@ const DropdownMenuContent = styled(DropdownMenu.Content)`
|
|
|
1856
1856
|
}
|
|
1857
1857
|
}
|
|
1858
1858
|
`;
|
|
1859
|
-
const MenuItem$1 = ({ onSelect, disabled = false, isLink, ...props }) => {
|
|
1860
|
-
return /* @__PURE__ */ jsx(DropdownMenu.Item, { asChild: true, onSelect, disabled, children: isLink ||
|
|
1859
|
+
const MenuItem$1 = ({ onSelect, disabled = false, isLink, startIcon, endIcon, isExternal, ...props }) => {
|
|
1860
|
+
return /* @__PURE__ */ jsx(DropdownMenu.Item, { asChild: true, onSelect, disabled, children: isLink || isExternal ? /* @__PURE__ */ jsx(
|
|
1861
|
+
OptionLink,
|
|
1862
|
+
{
|
|
1863
|
+
color: "neutral800",
|
|
1864
|
+
startIcon,
|
|
1865
|
+
endIcon,
|
|
1866
|
+
...props,
|
|
1867
|
+
isExternal: isExternal ?? false,
|
|
1868
|
+
children: /* @__PURE__ */ jsx(Typography, { children: props.children })
|
|
1869
|
+
}
|
|
1870
|
+
) : /* @__PURE__ */ jsxs(
|
|
1871
|
+
OptionButton,
|
|
1872
|
+
{
|
|
1873
|
+
cursor: "pointer",
|
|
1874
|
+
color: "neutral800",
|
|
1875
|
+
background: "transparent",
|
|
1876
|
+
borderStyle: "none",
|
|
1877
|
+
gap: 2,
|
|
1878
|
+
...props,
|
|
1879
|
+
children: [
|
|
1880
|
+
startIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, children: startIcon }),
|
|
1881
|
+
/* @__PURE__ */ jsx(Typography, { grow: 1, children: props.children }),
|
|
1882
|
+
endIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, children: endIcon })
|
|
1883
|
+
]
|
|
1884
|
+
}
|
|
1885
|
+
) });
|
|
1861
1886
|
};
|
|
1862
1887
|
const getOptionStyle = ({ theme }) => css`
|
|
1863
1888
|
text-align: left;
|
|
@@ -1911,7 +1936,7 @@ const StyledSeparator = styled(Box)`
|
|
|
1911
1936
|
display: none;
|
|
1912
1937
|
}
|
|
1913
1938
|
`;
|
|
1914
|
-
const MenuSeparator = React.forwardRef((props) => /* @__PURE__ */ jsx(DropdownMenu.Separator, { ...props, asChild: true, children: /* @__PURE__ */ jsx(StyledSeparator, { height: "1px", shrink: 0, background: "neutral150" }) }));
|
|
1939
|
+
const MenuSeparator = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(DropdownMenu.Separator, { ...props, asChild: true, children: /* @__PURE__ */ jsx(StyledSeparator, { height: "1px", shrink: 0, background: "neutral150", ref }) }));
|
|
1915
1940
|
const MenuLabel = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(DropdownMenu.Label, { asChild: true, children: /* @__PURE__ */ jsx(StyledLabel, { ref, variant: "sigma", textColor: "neutral600", ...props }) }));
|
|
1916
1941
|
const StyledLabel = styled(Typography)`
|
|
1917
1942
|
padding: ${({ theme }) => theme.spaces[2]} ${({ theme }) => theme.spaces[4]};
|