@telicent-oss/ds 0.22.0 → 0.23.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/ds.js +87 -2
- package/dist/ds.umd.cjs +87 -2
- package/dist/src/v1/components/data-display/DropdownButton/DropdownButton.d.ts +20 -0
- package/dist/src/v1/components/data-display/DropdownButton/DropdownButton.stories.d.ts +47 -0
- package/dist/src/v1/components/data-display/DropdownButton/DropdownButton.test.d.ts +1 -0
- package/dist/src/v1/components/data-display/DropdownButton/assets/TestIcons.d.ts +2 -0
- package/dist/src/v1/components/data-display/index.d.ts +1 -0
- package/package.json +2 -1
package/dist/ds.js
CHANGED
|
@@ -55119,9 +55119,9 @@ const DownArrow = ({
|
|
|
55119
55119
|
...iconProps
|
|
55120
55120
|
}) => {
|
|
55121
55121
|
const theme = useTheme$1();
|
|
55122
|
-
return /* @__PURE__ */ jsx$1(FontAwesomeIcon, { icon: faAngleDown, css: /* @__PURE__ */ css({
|
|
55122
|
+
return /* @__PURE__ */ jsx$1(FontAwesomeIcon, { icon: faAngleDown, size: "sm", css: /* @__PURE__ */ css({
|
|
55123
55123
|
color: color2 === "primary" ? theme.palette.primary.main : "inherit"
|
|
55124
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:DownArrow;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
55124
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:DownArrow;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL3RlbGljZW50LWRzL3RlbGljZW50LWRzL3NyYy92MS9jb21wb25lbnRzL2RhdGEtZGlzcGxheS9Gb250QXdlc29tZUljb25zL0Rvd25BcnJvd0ljb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1CTSIsImZpbGUiOiIvaG9tZS9ydW5uZXIvd29yay90ZWxpY2VudC1kcy90ZWxpY2VudC1kcy9zcmMvdjEvY29tcG9uZW50cy9kYXRhLWRpc3BsYXkvRm9udEF3ZXNvbWVJY29ucy9Eb3duQXJyb3dJY29uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCB7XG4gIEZvbnRBd2Vzb21lSWNvbixcbiAgRm9udEF3ZXNvbWVJY29uUHJvcHMsXG59IGZyb20gXCJAZm9ydGF3ZXNvbWUvcmVhY3QtZm9udGF3ZXNvbWVcIjtcbmltcG9ydCB7IGZhQW5nbGVEb3duIH0gZnJvbSBcIkBmb3J0YXdlc29tZS9mcmVlLXNvbGlkLXN2Zy1pY29uc1wiO1xuaW1wb3J0IHsgdXNlVGhlbWUgfSBmcm9tIFwiQG11aS9tYXRlcmlhbC9zdHlsZXNcIjtcblxudHlwZSBEb3duQXJyb3dJY29uUHJvcHMgPSBPbWl0PEZvbnRBd2Vzb21lSWNvblByb3BzLCBcImljb25cIj4gJiB7XG4gIGNvbG9yPzogXCJwcmltYXJ5XCIgfCBcImluaGVyaXRcIjtcbn07XG5cbmNvbnN0IERvd25BcnJvdzogUmVhY3QuRkM8RG93bkFycm93SWNvblByb3BzPiA9ICh7IGNvbG9yLCAuLi5pY29uUHJvcHMgfSkgPT4ge1xuICBjb25zdCB0aGVtZSA9IHVzZVRoZW1lKCk7XG5cbiAgcmV0dXJuIChcbiAgICA8Rm9udEF3ZXNvbWVJY29uXG4gICAgICBpY29uPXtmYUFuZ2xlRG93bn1cbiAgICAgIHNpemU9XCJzbVwiXG4gICAgICBjc3M9e3tcbiAgICAgICAgY29sb3I6IGNvbG9yID09PSBcInByaW1hcnlcIiA/IHRoZW1lLnBhbGV0dGUucHJpbWFyeS5tYWluIDogXCJpbmhlcml0XCIsXG4gICAgICB9fVxuICAgICAgey4uLmljb25Qcm9wc31cbiAgICAvPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgRG93bkFycm93O1xuIl19 */"), ...iconProps });
|
|
55125
55125
|
};
|
|
55126
55126
|
const Download = ({
|
|
55127
55127
|
color: color2,
|
|
@@ -57729,6 +57729,90 @@ const UserStatus = ({
|
|
|
57729
57729
|
/* @__PURE__ */ jsx$1(Grid, { item: true, xs: 5, children: children2 })
|
|
57730
57730
|
] })
|
|
57731
57731
|
] });
|
|
57732
|
+
const DropdownButtonMenuItem = ({
|
|
57733
|
+
onClick,
|
|
57734
|
+
faIcon,
|
|
57735
|
+
id: id2,
|
|
57736
|
+
icon: icon2,
|
|
57737
|
+
value,
|
|
57738
|
+
selected = false
|
|
57739
|
+
}) => {
|
|
57740
|
+
const Icon2 = icon2;
|
|
57741
|
+
const theme = useExtendedTheme();
|
|
57742
|
+
return /* @__PURE__ */ jsxs(MenuItem, { onClick, id: id2, selected, sx: {
|
|
57743
|
+
display: "flex",
|
|
57744
|
+
alignItems: "center",
|
|
57745
|
+
marginX: 1,
|
|
57746
|
+
borderRadius: "4px",
|
|
57747
|
+
border: "1px solid rgba(0, 0, 0, 0)",
|
|
57748
|
+
"&.Mui-selected.Mui-selected": {
|
|
57749
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.background.default : "rgba(0, 0, 0, 0.04)"
|
|
57750
|
+
},
|
|
57751
|
+
"&.Mui-selected.Mui-selected:hover": {
|
|
57752
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.background.default : "rgba(0, 0, 0, 0.04)"
|
|
57753
|
+
},
|
|
57754
|
+
"&:hover": {
|
|
57755
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.background.default : "rgba(0, 0, 0, 0.04)",
|
|
57756
|
+
border: `1px solid ${theme.palette.primary.main}`
|
|
57757
|
+
}
|
|
57758
|
+
}, children: [
|
|
57759
|
+
(Icon2 || faIcon) && /* @__PURE__ */ jsxs(ListItemIcon$1, { children: [
|
|
57760
|
+
Icon2 && /* @__PURE__ */ jsx$1(Icon2, { color: selected ? "primary" : "inherit" }),
|
|
57761
|
+
faIcon && /* @__PURE__ */ jsx$1(FontAwesomeIcon, { icon: faIcon, fontSize: "medium", color: selected ? theme.palette.primary.main : "white" })
|
|
57762
|
+
] }),
|
|
57763
|
+
/* @__PURE__ */ jsx$1(ListItemText$1, { children: /* @__PURE__ */ jsx$1(Typography, { variant: "h1", sx: {
|
|
57764
|
+
marginTop: 0.5,
|
|
57765
|
+
fontFamily: "Figtree",
|
|
57766
|
+
fontSize: 16,
|
|
57767
|
+
fontWeight: 400,
|
|
57768
|
+
color: `${selected ? theme.palette.primary.main : "primary"}`,
|
|
57769
|
+
display: "flex",
|
|
57770
|
+
alignItems: "center"
|
|
57771
|
+
}, children: value }) })
|
|
57772
|
+
] });
|
|
57773
|
+
};
|
|
57774
|
+
const DropdownButton = ({
|
|
57775
|
+
ariaLabel,
|
|
57776
|
+
id: id2,
|
|
57777
|
+
menuItems
|
|
57778
|
+
}) => {
|
|
57779
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
57780
|
+
const [selectedMenuItem, setSelectedMenuItem] = useState(menuItems.find((menuItem) => menuItem.default) ?? menuItems[0]);
|
|
57781
|
+
const theme = useExtendedTheme();
|
|
57782
|
+
const open = Boolean(anchorEl);
|
|
57783
|
+
const handleClick = (event) => {
|
|
57784
|
+
setAnchorEl(event.currentTarget);
|
|
57785
|
+
};
|
|
57786
|
+
const handleClose = () => {
|
|
57787
|
+
setAnchorEl(null);
|
|
57788
|
+
};
|
|
57789
|
+
return /* @__PURE__ */ jsxs(FlexBox, { children: [
|
|
57790
|
+
/* @__PURE__ */ jsxs(IconButton2, { "aria-label": ariaLabel, "aria-controls": open ? id2 : void 0, "aria-haspopup": "true", sx: {
|
|
57791
|
+
border: 0,
|
|
57792
|
+
"&:hover": {
|
|
57793
|
+
backgroundColor: "rgba(255, 255, 255, 0.08)"
|
|
57794
|
+
}
|
|
57795
|
+
}, "aria-expanded": open ? "true" : void 0, onClick: handleClick, color: "primary", children: [
|
|
57796
|
+
selectedMenuItem.icon && /* @__PURE__ */ jsx$1(selectedMenuItem.icon, { color: "primary", className: "mr-2" }),
|
|
57797
|
+
selectedMenuItem.faIcon && /* @__PURE__ */ jsx$1(FontAwesomeIcon, { icon: selectedMenuItem.faIcon, fontSize: "medium", color: theme.palette.primary.main ?? "white", className: "mr-2" }),
|
|
57798
|
+
/* @__PURE__ */ jsx$1(DownArrow, {})
|
|
57799
|
+
] }),
|
|
57800
|
+
/* @__PURE__ */ jsx$1(Menu, { id: id2, anchorEl, open, transformOrigin: {
|
|
57801
|
+
vertical: -20,
|
|
57802
|
+
horizontal: "left"
|
|
57803
|
+
}, onClose: handleClose, MenuListProps: {
|
|
57804
|
+
"aria-labelledby": id2
|
|
57805
|
+
}, sx: {
|
|
57806
|
+
"& .MuiPaper-root": {
|
|
57807
|
+
backgroundColor: theme.palette.mode === "dark" ? "#2A2A2A" : "#ffffff"
|
|
57808
|
+
}
|
|
57809
|
+
}, children: menuItems.map((menuItem, index) => /* @__PURE__ */ jsx$1(DropdownButtonMenuItem, { id: `${id2}-item-${index}`, onClick: () => {
|
|
57810
|
+
menuItem.onClick(menuItem.value);
|
|
57811
|
+
setSelectedMenuItem(menuItem);
|
|
57812
|
+
handleClose();
|
|
57813
|
+
}, icon: menuItem == null ? void 0 : menuItem.icon, faIcon: menuItem == null ? void 0 : menuItem.faIcon, value: menuItem.value, selected: menuItem.value === selectedMenuItem.value }, `${id2}-item-${index}`)) })
|
|
57814
|
+
] });
|
|
57815
|
+
};
|
|
57732
57816
|
const LinearProgress2 = ({
|
|
57733
57817
|
// isActive,
|
|
57734
57818
|
// transition = 500,
|
|
@@ -80696,6 +80780,7 @@ export {
|
|
|
80696
80780
|
DownArrow as DownArrowIcon,
|
|
80697
80781
|
Download as DownloadIcon,
|
|
80698
80782
|
DragHandleIcon,
|
|
80783
|
+
DropdownButton,
|
|
80699
80784
|
ENCODE_SEARCH_PARAMS_MODES_Schema,
|
|
80700
80785
|
FeatureMap,
|
|
80701
80786
|
Panel as FixedPanel,
|
package/dist/ds.umd.cjs
CHANGED
|
@@ -55137,9 +55137,9 @@ Please use another name.` : formatMuiErrorMessage$1(18));
|
|
|
55137
55137
|
...iconProps
|
|
55138
55138
|
}) => {
|
|
55139
55139
|
const theme = useTheme$1();
|
|
55140
|
-
return /* @__PURE__ */ jsx$1(FontAwesomeIcon, { icon: faAngleDown, css: /* @__PURE__ */ css({
|
|
55140
|
+
return /* @__PURE__ */ jsx$1(FontAwesomeIcon, { icon: faAngleDown, size: "sm", css: /* @__PURE__ */ css({
|
|
55141
55141
|
color: color2 === "primary" ? theme.palette.primary.main : "inherit"
|
|
55142
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:DownArrow;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
55142
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:DownArrow;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL3RlbGljZW50LWRzL3RlbGljZW50LWRzL3NyYy92MS9jb21wb25lbnRzL2RhdGEtZGlzcGxheS9Gb250QXdlc29tZUljb25zL0Rvd25BcnJvd0ljb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1CTSIsImZpbGUiOiIvaG9tZS9ydW5uZXIvd29yay90ZWxpY2VudC1kcy90ZWxpY2VudC1kcy9zcmMvdjEvY29tcG9uZW50cy9kYXRhLWRpc3BsYXkvRm9udEF3ZXNvbWVJY29ucy9Eb3duQXJyb3dJY29uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCB7XG4gIEZvbnRBd2Vzb21lSWNvbixcbiAgRm9udEF3ZXNvbWVJY29uUHJvcHMsXG59IGZyb20gXCJAZm9ydGF3ZXNvbWUvcmVhY3QtZm9udGF3ZXNvbWVcIjtcbmltcG9ydCB7IGZhQW5nbGVEb3duIH0gZnJvbSBcIkBmb3J0YXdlc29tZS9mcmVlLXNvbGlkLXN2Zy1pY29uc1wiO1xuaW1wb3J0IHsgdXNlVGhlbWUgfSBmcm9tIFwiQG11aS9tYXRlcmlhbC9zdHlsZXNcIjtcblxudHlwZSBEb3duQXJyb3dJY29uUHJvcHMgPSBPbWl0PEZvbnRBd2Vzb21lSWNvblByb3BzLCBcImljb25cIj4gJiB7XG4gIGNvbG9yPzogXCJwcmltYXJ5XCIgfCBcImluaGVyaXRcIjtcbn07XG5cbmNvbnN0IERvd25BcnJvdzogUmVhY3QuRkM8RG93bkFycm93SWNvblByb3BzPiA9ICh7IGNvbG9yLCAuLi5pY29uUHJvcHMgfSkgPT4ge1xuICBjb25zdCB0aGVtZSA9IHVzZVRoZW1lKCk7XG5cbiAgcmV0dXJuIChcbiAgICA8Rm9udEF3ZXNvbWVJY29uXG4gICAgICBpY29uPXtmYUFuZ2xlRG93bn1cbiAgICAgIHNpemU9XCJzbVwiXG4gICAgICBjc3M9e3tcbiAgICAgICAgY29sb3I6IGNvbG9yID09PSBcInByaW1hcnlcIiA/IHRoZW1lLnBhbGV0dGUucHJpbWFyeS5tYWluIDogXCJpbmhlcml0XCIsXG4gICAgICB9fVxuICAgICAgey4uLmljb25Qcm9wc31cbiAgICAvPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgRG93bkFycm93O1xuIl19 */"), ...iconProps });
|
|
55143
55143
|
};
|
|
55144
55144
|
const Download = ({
|
|
55145
55145
|
color: color2,
|
|
@@ -57747,6 +57747,90 @@ Please use another name.` : formatMuiErrorMessage$1(18));
|
|
|
57747
57747
|
/* @__PURE__ */ jsx$1(Grid, { item: true, xs: 5, children: children2 })
|
|
57748
57748
|
] })
|
|
57749
57749
|
] });
|
|
57750
|
+
const DropdownButtonMenuItem = ({
|
|
57751
|
+
onClick,
|
|
57752
|
+
faIcon,
|
|
57753
|
+
id: id2,
|
|
57754
|
+
icon: icon2,
|
|
57755
|
+
value,
|
|
57756
|
+
selected = false
|
|
57757
|
+
}) => {
|
|
57758
|
+
const Icon2 = icon2;
|
|
57759
|
+
const theme = useExtendedTheme();
|
|
57760
|
+
return /* @__PURE__ */ jsxs(MenuItem, { onClick, id: id2, selected, sx: {
|
|
57761
|
+
display: "flex",
|
|
57762
|
+
alignItems: "center",
|
|
57763
|
+
marginX: 1,
|
|
57764
|
+
borderRadius: "4px",
|
|
57765
|
+
border: "1px solid rgba(0, 0, 0, 0)",
|
|
57766
|
+
"&.Mui-selected.Mui-selected": {
|
|
57767
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.background.default : "rgba(0, 0, 0, 0.04)"
|
|
57768
|
+
},
|
|
57769
|
+
"&.Mui-selected.Mui-selected:hover": {
|
|
57770
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.background.default : "rgba(0, 0, 0, 0.04)"
|
|
57771
|
+
},
|
|
57772
|
+
"&:hover": {
|
|
57773
|
+
backgroundColor: theme.palette.mode === "dark" ? theme.palette.background.default : "rgba(0, 0, 0, 0.04)",
|
|
57774
|
+
border: `1px solid ${theme.palette.primary.main}`
|
|
57775
|
+
}
|
|
57776
|
+
}, children: [
|
|
57777
|
+
(Icon2 || faIcon) && /* @__PURE__ */ jsxs(ListItemIcon$1, { children: [
|
|
57778
|
+
Icon2 && /* @__PURE__ */ jsx$1(Icon2, { color: selected ? "primary" : "inherit" }),
|
|
57779
|
+
faIcon && /* @__PURE__ */ jsx$1(FontAwesomeIcon, { icon: faIcon, fontSize: "medium", color: selected ? theme.palette.primary.main : "white" })
|
|
57780
|
+
] }),
|
|
57781
|
+
/* @__PURE__ */ jsx$1(ListItemText$1, { children: /* @__PURE__ */ jsx$1(Typography, { variant: "h1", sx: {
|
|
57782
|
+
marginTop: 0.5,
|
|
57783
|
+
fontFamily: "Figtree",
|
|
57784
|
+
fontSize: 16,
|
|
57785
|
+
fontWeight: 400,
|
|
57786
|
+
color: `${selected ? theme.palette.primary.main : "primary"}`,
|
|
57787
|
+
display: "flex",
|
|
57788
|
+
alignItems: "center"
|
|
57789
|
+
}, children: value }) })
|
|
57790
|
+
] });
|
|
57791
|
+
};
|
|
57792
|
+
const DropdownButton = ({
|
|
57793
|
+
ariaLabel,
|
|
57794
|
+
id: id2,
|
|
57795
|
+
menuItems
|
|
57796
|
+
}) => {
|
|
57797
|
+
const [anchorEl, setAnchorEl] = React$2.useState(null);
|
|
57798
|
+
const [selectedMenuItem, setSelectedMenuItem] = React$2.useState(menuItems.find((menuItem) => menuItem.default) ?? menuItems[0]);
|
|
57799
|
+
const theme = useExtendedTheme();
|
|
57800
|
+
const open = Boolean(anchorEl);
|
|
57801
|
+
const handleClick = (event) => {
|
|
57802
|
+
setAnchorEl(event.currentTarget);
|
|
57803
|
+
};
|
|
57804
|
+
const handleClose = () => {
|
|
57805
|
+
setAnchorEl(null);
|
|
57806
|
+
};
|
|
57807
|
+
return /* @__PURE__ */ jsxs(FlexBox, { children: [
|
|
57808
|
+
/* @__PURE__ */ jsxs(IconButton, { "aria-label": ariaLabel, "aria-controls": open ? id2 : void 0, "aria-haspopup": "true", sx: {
|
|
57809
|
+
border: 0,
|
|
57810
|
+
"&:hover": {
|
|
57811
|
+
backgroundColor: "rgba(255, 255, 255, 0.08)"
|
|
57812
|
+
}
|
|
57813
|
+
}, "aria-expanded": open ? "true" : void 0, onClick: handleClick, color: "primary", children: [
|
|
57814
|
+
selectedMenuItem.icon && /* @__PURE__ */ jsx$1(selectedMenuItem.icon, { color: "primary", className: "mr-2" }),
|
|
57815
|
+
selectedMenuItem.faIcon && /* @__PURE__ */ jsx$1(FontAwesomeIcon, { icon: selectedMenuItem.faIcon, fontSize: "medium", color: theme.palette.primary.main ?? "white", className: "mr-2" }),
|
|
57816
|
+
/* @__PURE__ */ jsx$1(DownArrow, {})
|
|
57817
|
+
] }),
|
|
57818
|
+
/* @__PURE__ */ jsx$1(Menu, { id: id2, anchorEl, open, transformOrigin: {
|
|
57819
|
+
vertical: -20,
|
|
57820
|
+
horizontal: "left"
|
|
57821
|
+
}, onClose: handleClose, MenuListProps: {
|
|
57822
|
+
"aria-labelledby": id2
|
|
57823
|
+
}, sx: {
|
|
57824
|
+
"& .MuiPaper-root": {
|
|
57825
|
+
backgroundColor: theme.palette.mode === "dark" ? "#2A2A2A" : "#ffffff"
|
|
57826
|
+
}
|
|
57827
|
+
}, children: menuItems.map((menuItem, index) => /* @__PURE__ */ jsx$1(DropdownButtonMenuItem, { id: `${id2}-item-${index}`, onClick: () => {
|
|
57828
|
+
menuItem.onClick(menuItem.value);
|
|
57829
|
+
setSelectedMenuItem(menuItem);
|
|
57830
|
+
handleClose();
|
|
57831
|
+
}, icon: menuItem == null ? void 0 : menuItem.icon, faIcon: menuItem == null ? void 0 : menuItem.faIcon, value: menuItem.value, selected: menuItem.value === selectedMenuItem.value }, `${id2}-item-${index}`)) })
|
|
57832
|
+
] });
|
|
57833
|
+
};
|
|
57750
57834
|
const LinearProgress = ({
|
|
57751
57835
|
// isActive,
|
|
57752
57836
|
// transition = 500,
|
|
@@ -80718,6 +80802,7 @@ uniform ${i3} ${s4} u_${a3};
|
|
|
80718
80802
|
exports2.DownArrowIcon = DownArrow;
|
|
80719
80803
|
exports2.DownloadIcon = Download;
|
|
80720
80804
|
exports2.DragHandleIcon = DragHandleIcon;
|
|
80805
|
+
exports2.DropdownButton = DropdownButton;
|
|
80721
80806
|
exports2.ENCODE_SEARCH_PARAMS_MODES_Schema = ENCODE_SEARCH_PARAMS_MODES_Schema;
|
|
80722
80807
|
exports2.FeatureMap = FeatureMap;
|
|
80723
80808
|
exports2.FixedPanel = Panel;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvgIconProps } from '@mui/material/SvgIcon';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
4
|
+
|
|
5
|
+
export interface DropdownButtonProps {
|
|
6
|
+
ariaLabel: string;
|
|
7
|
+
id: string;
|
|
8
|
+
menuItems: DropDownButtonMenuItemProps[];
|
|
9
|
+
}
|
|
10
|
+
export interface DropDownButtonMenuItemProps {
|
|
11
|
+
id: string;
|
|
12
|
+
onClick: (val: string) => void;
|
|
13
|
+
faIcon?: IconProp;
|
|
14
|
+
icon?: React.ElementType<SvgIconProps>;
|
|
15
|
+
value: string;
|
|
16
|
+
default?: boolean;
|
|
17
|
+
selected: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const DropdownButton: React.FC<DropdownButtonProps>;
|
|
20
|
+
export default DropdownButton;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import('react').FC<import('./DropdownButton').DropdownButtonProps>;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
id: string;
|
|
14
|
+
ariaLabel: string;
|
|
15
|
+
menuItems: {
|
|
16
|
+
id: string;
|
|
17
|
+
icon: (() => import("@emotion/react/jsx-runtime").JSX.Element) | (() => import("@emotion/react/jsx-runtime").JSX.Element);
|
|
18
|
+
value: string;
|
|
19
|
+
default: boolean;
|
|
20
|
+
onClick: () => void;
|
|
21
|
+
selected: boolean;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
argTypes: {
|
|
25
|
+
ariaLabel: {
|
|
26
|
+
control: "text";
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
id: {
|
|
30
|
+
control: "text";
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
menuItems: {
|
|
34
|
+
control: "object";
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
decorators: (Story: import('@storybook/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
39
|
+
ariaLabel: string;
|
|
40
|
+
id: string;
|
|
41
|
+
menuItems: import('./DropdownButton').DropDownButtonMenuItemProps[];
|
|
42
|
+
}>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
43
|
+
};
|
|
44
|
+
export default meta;
|
|
45
|
+
type Story = StoryObj<typeof meta>;
|
|
46
|
+
export declare const DropdownWithFontAwesome: Story;
|
|
47
|
+
export declare const DropdownWithCustomIcons: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -18,3 +18,4 @@ export { default as UserProfileContent } from './UserProfile/UserProfileContent/
|
|
|
18
18
|
export { default as TitleAndContent } from './Text/TitleAndContent/TitleAndContent';
|
|
19
19
|
export { default as UserStatus } from './UserProfile/UserProfileContent/UserStatus';
|
|
20
20
|
export type { UserStatusProps } from './UserProfile/UserProfileContent/UserStatus';
|
|
21
|
+
export { default as DropdownButton } from './DropdownButton/DropdownButton';
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"url": "https://github.com/telicent-oss/telicent-ds.git"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
|
-
"version": "0.
|
|
10
|
+
"version": "0.23.0",
|
|
11
11
|
"private": false,
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@emotion/react": "^11.10.6",
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
"@storybook/react": "8.4.0",
|
|
102
102
|
"@storybook/react-vite": "8.4.0",
|
|
103
103
|
"@storybook/test": "8.4.0",
|
|
104
|
+
"@storybook/theming": "^8.6.12",
|
|
104
105
|
"@testing-library/dom": "^10.4.0",
|
|
105
106
|
"@testing-library/jest-dom": "^6.6.3",
|
|
106
107
|
"@testing-library/react": "^16.0.1",
|