@ftdata/ui 0.0.1
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/README.md +23 -0
- package/dist/assets/AddIcon.d.ts +3 -0
- package/dist/assets/AddIcon.js +35 -0
- package/dist/assets/ArrowLeftIcon.d.ts +2 -0
- package/dist/assets/ArrowLeftIcon.js +26 -0
- package/dist/assets/BackArrowIcon.d.ts +3 -0
- package/dist/assets/BackArrowIcon.js +35 -0
- package/dist/assets/BellIcon.d.ts +2 -0
- package/dist/assets/BellIcon.js +43 -0
- package/dist/assets/BuildingIcon.d.ts +2 -0
- package/dist/assets/BuildingIcon.js +15 -0
- package/dist/assets/BurgerMenu.d.ts +3 -0
- package/dist/assets/BurgerMenu.js +41 -0
- package/dist/assets/CancelSquareIcon.d.ts +3 -0
- package/dist/assets/CancelSquareIcon.js +36 -0
- package/dist/assets/CarretDownIcon.d.ts +3 -0
- package/dist/assets/CarretDownIcon.js +32 -0
- package/dist/assets/CavetDown.d.ts +2 -0
- package/dist/assets/CavetDown.js +18 -0
- package/dist/assets/CavetRight.d.ts +2 -0
- package/dist/assets/CavetRight.js +18 -0
- package/dist/assets/CavetUp.d.ts +2 -0
- package/dist/assets/CavetUp.js +18 -0
- package/dist/assets/CheckMarkIcon.d.ts +3 -0
- package/dist/assets/CheckMarkIcon.js +39 -0
- package/dist/assets/CheckmarkDone.d.ts +3 -0
- package/dist/assets/CheckmarkDone.js +27 -0
- package/dist/assets/CloseIcon.d.ts +2 -0
- package/dist/assets/CloseIcon.js +27 -0
- package/dist/assets/CommandIcon.d.ts +2 -0
- package/dist/assets/CommandIcon.js +77 -0
- package/dist/assets/DoneCircleIcon.d.ts +3 -0
- package/dist/assets/DoneCircleIcon.js +29 -0
- package/dist/assets/EmptyAlertDetail.d.ts +2 -0
- package/dist/assets/EmptyAlertDetail.js +451 -0
- package/dist/assets/EmptyPage.d.ts +3 -0
- package/dist/assets/EmptyPage.js +551 -0
- package/dist/assets/EyeIcon.d.ts +2 -0
- package/dist/assets/EyeIcon.js +35 -0
- package/dist/assets/FenceIcon.d.ts +2 -0
- package/dist/assets/FenceIcon.js +70 -0
- package/dist/assets/FolderCheckmark.d.ts +3 -0
- package/dist/assets/FolderCheckmark.js +44 -0
- package/dist/assets/FulltrackLogo.d.ts +3 -0
- package/dist/assets/FulltrackLogo.js +37 -0
- package/dist/assets/GlobeIcon.d.ts +2 -0
- package/dist/assets/GlobeIcon.js +61 -0
- package/dist/assets/GoogleIcon.d.ts +2 -0
- package/dist/assets/GoogleIcon.js +18 -0
- package/dist/assets/Group.js +2 -0
- package/dist/assets/MinusMarkIcon.d.ts +3 -0
- package/dist/assets/MinusMarkIcon.js +40 -0
- package/dist/assets/MosaicIcon.d.ts +3 -0
- package/dist/assets/MosaicIcon.js +41 -0
- package/dist/assets/NavLogo.d.ts +3 -0
- package/dist/assets/NavLogo.js +73 -0
- package/dist/assets/PinLocation.d.ts +2 -0
- package/dist/assets/PinLocation.js +31 -0
- package/dist/assets/PlusAddIcon.d.ts +2 -0
- package/dist/assets/PlusAddIcon.js +42 -0
- package/dist/assets/RefreshIcon.d.ts +2 -0
- package/dist/assets/RefreshIcon.js +16 -0
- package/dist/assets/SearchIcon.d.ts +3 -0
- package/dist/assets/SearchIcon.js +30 -0
- package/dist/assets/SendIcon.d.ts +3 -0
- package/dist/assets/SendIcon.js +20 -0
- package/dist/assets/StreetView.d.ts +2 -0
- package/dist/assets/StreetView.js +52 -0
- package/dist/assets/SwitchCheckMarkIcon.d.ts +3 -0
- package/dist/assets/SwitchCheckMarkIcon.js +40 -0
- package/dist/assets/WarningIcon.d.ts +2 -0
- package/dist/assets/WarningIcon.js +34 -0
- package/dist/assets/gif/how-to-use.js +2 -0
- package/dist/assets/iconMenu/SettingsIcon.d.ts +2 -0
- package/dist/assets/iconMenu/SettingsIcon.js +30 -0
- package/dist/assets/img/cover.js +2 -0
- package/dist/assets/img/map-sample.js +2 -0
- package/dist/assets/img/photo-goes-here.js +2 -0
- package/dist/assets/svg/chat.js +2 -0
- package/dist/assets/svg/colored-item.js +2 -0
- package/dist/assets/svg/mailbox-bro.js +2 -0
- package/dist/assets/svg/star-favorite.js +2 -0
- package/dist/assets/travolta.js +2 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +33 -0
- package/dist/components/Avatar/Avatar.stories.js +177 -0
- package/dist/components/Avatar/index.d.ts +7 -0
- package/dist/components/Avatar/index.js +28 -0
- package/dist/components/Avatar/styles.d.ts +4 -0
- package/dist/components/Avatar/styles.js +37 -0
- package/dist/components/Avatar/utils/getAvatarColors.d.ts +6 -0
- package/dist/components/Avatar/utils/getAvatarColors.js +48 -0
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +17 -0
- package/dist/components/Breadcrumb/Breadcrumb.stories.js +51 -0
- package/dist/components/Breadcrumb/index.d.ts +10 -0
- package/dist/components/Breadcrumb/index.js +34 -0
- package/dist/components/Breadcrumb/styles.d.ts +9 -0
- package/dist/components/Breadcrumb/styles.js +43 -0
- package/dist/components/Button/Button.stories.d.ts +58 -0
- package/dist/components/Button/Button.stories.js +284 -0
- package/dist/components/Button/index.d.ts +26 -0
- package/dist/components/Button/index.js +69 -0
- package/dist/components/Button/modifiers.d.ts +8 -0
- package/dist/components/Button/modifiers.js +41 -0
- package/dist/components/Button/styles.d.ts +25 -0
- package/dist/components/Button/styles.js +111 -0
- package/dist/components/Checkbox/CheckMarkIcon.d.ts +3 -0
- package/dist/components/Checkbox/CheckMarkIcon.js +38 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +35 -0
- package/dist/components/Checkbox/Checkbox.stories.js +101 -0
- package/dist/components/Checkbox/MinusMarkIcon.d.ts +3 -0
- package/dist/components/Checkbox/MinusMarkIcon.js +39 -0
- package/dist/components/Checkbox/index.d.ts +9 -0
- package/dist/components/Checkbox/index.js +40 -0
- package/dist/components/Checkbox/styles.d.ts +12 -0
- package/dist/components/Checkbox/styles.js +41 -0
- package/dist/components/Collapse/Colapse.stories.d.ts +10 -0
- package/dist/components/Collapse/Colapse.stories.js +108 -0
- package/dist/components/Collapse/index.d.ts +15 -0
- package/dist/components/Collapse/index.js +61 -0
- package/dist/components/Collapse/styles.d.ts +11 -0
- package/dist/components/Collapse/styles.js +23 -0
- package/dist/components/CustomSelect/CustomSelect.stories.d.ts +73 -0
- package/dist/components/CustomSelect/CustomSelect.stories.js +477 -0
- package/dist/components/CustomSelect/CustomSelectList/index.d.ts +10 -0
- package/dist/components/CustomSelect/CustomSelectList/index.js +66 -0
- package/dist/components/CustomSelect/CustomSelectList/style.d.ts +8 -0
- package/dist/components/CustomSelect/CustomSelectList/style.js +95 -0
- package/dist/components/CustomSelect/index.d.ts +30 -0
- package/dist/components/CustomSelect/index.js +193 -0
- package/dist/components/CustomSelect/styles.d.ts +22 -0
- package/dist/components/CustomSelect/styles.js +93 -0
- package/dist/components/DoubleList/DoubleList.stories.d.ts +13 -0
- package/dist/components/DoubleList/DoubleList.stories.js +82 -0
- package/dist/components/DoubleList/index.d.ts +9 -0
- package/dist/components/DoubleList/index.js +70 -0
- package/dist/components/DoubleList/style.d.ts +5 -0
- package/dist/components/DoubleList/style.js +92 -0
- package/dist/components/EmptyState/Empty.stories.d.ts +26 -0
- package/dist/components/EmptyState/Empty.stories.js +72 -0
- package/dist/components/EmptyState/index.d.ts +10 -0
- package/dist/components/EmptyState/index.js +48 -0
- package/dist/components/EmptyState/styles.d.ts +3 -0
- package/dist/components/EmptyState/styles.js +39 -0
- package/dist/components/Grid/Column/Column.stories.d.ts +26 -0
- package/dist/components/Grid/Column/Column.stories.js +335 -0
- package/dist/components/Grid/Column/index.d.ts +15 -0
- package/dist/components/Grid/Column/index.js +10 -0
- package/dist/components/Grid/Container/Container.stories.d.ts +11 -0
- package/dist/components/Grid/Container/Container.stories.js +114 -0
- package/dist/components/Grid/Container/index.d.ts +6 -0
- package/dist/components/Grid/Container/index.js +11 -0
- package/dist/components/Grid/Row/Row.stories.d.ts +22 -0
- package/dist/components/Grid/Row/Row.stories.js +248 -0
- package/dist/components/Grid/Row/index.d.ts +20 -0
- package/dist/components/Grid/Row/index.js +10 -0
- package/dist/components/Grid/index.d.ts +38 -0
- package/dist/components/Grid/index.js +121 -0
- package/dist/components/Grid/utils.d.ts +1 -0
- package/dist/components/Grid/utils.js +18 -0
- package/dist/components/Loading/Loading/index.d.ts +7 -0
- package/dist/components/Loading/Loading/index.js +9 -0
- package/dist/components/Loading/Loading.stories.d.ts +24 -0
- package/dist/components/Loading/Loading.stories.js +145 -0
- package/dist/components/Loading/index.d.ts +16 -0
- package/dist/components/Loading/index.js +98 -0
- package/dist/components/Menu/constants/icons.d.ts +17 -0
- package/dist/components/Menu/constants/icons.js +61 -0
- package/dist/components/Menu/helpers/createMenus.d.ts +2 -0
- package/dist/components/Menu/helpers/createMenus.js +20 -0
- package/dist/components/Menu/helpers/createSubMenus.d.ts +2 -0
- package/dist/components/Menu/helpers/createSubMenus.js +13 -0
- package/dist/components/Menu/helpers/generateColorScale.d.ts +1 -0
- package/dist/components/Menu/helpers/generateColorScale.js +62 -0
- package/dist/components/Menu/helpers/getLuminance.d.ts +1 -0
- package/dist/components/Menu/helpers/getLuminance.js +9 -0
- package/dist/components/Menu/index.d.ts +12 -0
- package/dist/components/Menu/index.js +108 -0
- package/dist/components/Menu/styles.d.ts +17 -0
- package/dist/components/Menu/styles.js +202 -0
- package/dist/components/Menu/types/IconKeysType.d.ts +2 -0
- package/dist/components/Menu/types/IconKeysType.js +0 -0
- package/dist/components/Menu/types/MenuItem.d.ts +26 -0
- package/dist/components/Menu/types/MenuItem.js +0 -0
- package/dist/components/MultiSelect/Badge/index.d.ts +6 -0
- package/dist/components/MultiSelect/Badge/index.js +31 -0
- package/dist/components/MultiSelect/Badge/styles.d.ts +1 -0
- package/dist/components/MultiSelect/Badge/styles.js +57 -0
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +61 -0
- package/dist/components/MultiSelect/MultiSelect.stories.js +336 -0
- package/dist/components/MultiSelect/MultiSelectList/index.d.ts +10 -0
- package/dist/components/MultiSelect/MultiSelectList/index.js +59 -0
- package/dist/components/MultiSelect/MultiSelectList/style.d.ts +3 -0
- package/dist/components/MultiSelect/MultiSelectList/style.js +82 -0
- package/dist/components/MultiSelect/calcTextSize.d.ts +1 -0
- package/dist/components/MultiSelect/calcTextSize.js +10 -0
- package/dist/components/MultiSelect/index.d.ts +24 -0
- package/dist/components/MultiSelect/index.js +284 -0
- package/dist/components/MultiSelect/styles.d.ts +24 -0
- package/dist/components/MultiSelect/styles.js +165 -0
- package/dist/components/Radio/Radio.stories.d.ts +18 -0
- package/dist/components/Radio/Radio.stories.js +30 -0
- package/dist/components/Radio/index.d.ts +7 -0
- package/dist/components/Radio/index.js +27 -0
- package/dist/components/Radio/story.d.ts +5 -0
- package/dist/components/Radio/story.js +47 -0
- package/dist/components/Radio/styles.d.ts +8 -0
- package/dist/components/Radio/styles.js +43 -0
- package/dist/components/StateAlert/StateAlert.stories.d.ts +46 -0
- package/dist/components/StateAlert/StateAlert.stories.js +189 -0
- package/dist/components/StateAlert/index.d.ts +22 -0
- package/dist/components/StateAlert/index.js +56 -0
- package/dist/components/StateAlert/styles.d.ts +7 -0
- package/dist/components/StateAlert/styles.js +124 -0
- package/dist/components/Switch/Switch.stories.d.ts +26 -0
- package/dist/components/Switch/Switch.stories.js +81 -0
- package/dist/components/Switch/index.d.ts +8 -0
- package/dist/components/Switch/index.js +26 -0
- package/dist/components/Switch/styles.d.ts +15 -0
- package/dist/components/Switch/styles.js +33 -0
- package/dist/components/Text/Paragraph/Paragraph.stories.d.ts +29 -0
- package/dist/components/Text/Paragraph/Paragraph.stories.js +124 -0
- package/dist/components/Text/Title/Title.stories.d.ts +41 -0
- package/dist/components/Text/Title/Title.stories.js +106 -0
- package/dist/components/Text/index.d.ts +3 -0
- package/dist/components/Text/index.js +17 -0
- package/dist/components/Text/styles.d.ts +23 -0
- package/dist/components/Text/styles.js +70 -0
- package/dist/components/TextArea/Textarea.stories.d.ts +33 -0
- package/dist/components/TextArea/Textarea.stories.js +65 -0
- package/dist/components/TextArea/index.d.ts +10 -0
- package/dist/components/TextArea/index.js +39 -0
- package/dist/components/TextArea/styles.d.ts +18 -0
- package/dist/components/TextArea/styles.js +88 -0
- package/dist/components/TooltipWrapper/Tooltip.stories.d.ts +21 -0
- package/dist/components/TooltipWrapper/Tooltip.stories.js +54 -0
- package/dist/components/TooltipWrapper/index.d.ts +20 -0
- package/dist/components/TooltipWrapper/index.js +56 -0
- package/dist/components/TooltipWrapper/styles.d.ts +6 -0
- package/dist/components/TooltipWrapper/styles.js +20 -0
- package/dist/components/Tooltips/Tooltips.stories.d.ts +25 -0
- package/dist/components/Tooltips/Tooltips.stories.js +139 -0
- package/dist/components/Tooltips/index.d.ts +8 -0
- package/dist/components/Tooltips/index.js +28 -0
- package/dist/components/Tooltips/styles.d.ts +5 -0
- package/dist/components/Tooltips/styles.js +37 -0
- package/dist/components/UserMenu/UserMenu.stories.d.ts +26 -0
- package/dist/components/UserMenu/UserMenu.stories.js +174 -0
- package/dist/components/UserMenu/index.d.ts +19 -0
- package/dist/components/UserMenu/index.js +64 -0
- package/dist/components/UserMenu/style.d.ts +2 -0
- package/dist/components/UserMenu/style.js +44 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/static/image/cover.png +0 -0
- package/dist/static/image/how-to-use.gif +0 -0
- package/dist/static/image/map-sample.png +0 -0
- package/dist/static/image/photo-goes-here.png +0 -0
- package/dist/static/image/travolta.jpg +0 -0
- package/dist/static/svg/Group.svg +5 -0
- package/dist/static/svg/chat.svg +10 -0
- package/dist/static/svg/colored-item.svg +9 -0
- package/dist/static/svg/mailbox-bro.svg +102 -0
- package/dist/static/svg/star-favorite.svg +3 -0
- package/dist/style/_reset.css +205 -0
- package/package.json +43 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TooltipWrapper } from "./index.js";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "DESIGN COMPONENTS/TooltipWrapper",
|
|
5
|
+
component: TooltipWrapper,
|
|
6
|
+
tags: [
|
|
7
|
+
"autodocs"
|
|
8
|
+
],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered"
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
spacing: {
|
|
14
|
+
description: "Espa\xe7amento entre o elemento e o tooltip."
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const Tooltip_stories = meta;
|
|
19
|
+
const Default = {
|
|
20
|
+
render: ()=>/*#__PURE__*/ jsx(TooltipWrapper, {
|
|
21
|
+
children: ({ showTooltip, hideTooltip })=>/*#__PURE__*/ jsx("div", {
|
|
22
|
+
style: {
|
|
23
|
+
padding: "10px",
|
|
24
|
+
backgroundColor: "#f5f5f5",
|
|
25
|
+
borderRadius: "8px",
|
|
26
|
+
cursor: "pointer",
|
|
27
|
+
color: "#6b757c",
|
|
28
|
+
fontWeight: "500"
|
|
29
|
+
},
|
|
30
|
+
onMouseEnter: (e)=>showTooltip(e, "Tooltip Padr\xe3o!"),
|
|
31
|
+
onMouseLeave: hideTooltip,
|
|
32
|
+
children: "Passe o mouse aqui"
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
};
|
|
36
|
+
const Spacing = {
|
|
37
|
+
render: ()=>/*#__PURE__*/ jsx(TooltipWrapper, {
|
|
38
|
+
spacing: 64,
|
|
39
|
+
children: ({ showTooltip, hideTooltip })=>/*#__PURE__*/ jsx("div", {
|
|
40
|
+
style: {
|
|
41
|
+
padding: "10px",
|
|
42
|
+
backgroundColor: "#f5f5f5",
|
|
43
|
+
borderRadius: "8px",
|
|
44
|
+
cursor: "pointer",
|
|
45
|
+
color: "#6b757c",
|
|
46
|
+
fontWeight: "500"
|
|
47
|
+
},
|
|
48
|
+
onMouseEnter: (e)=>showTooltip(e, "Tooltip com espa\xe7amento"),
|
|
49
|
+
onMouseLeave: hideTooltip,
|
|
50
|
+
children: "Passe o mouse aqui"
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
};
|
|
54
|
+
export { Default, Spacing, Tooltip_stories as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { JSX } from "react";
|
|
2
|
+
interface TooltipProps {
|
|
3
|
+
text: string;
|
|
4
|
+
position: {
|
|
5
|
+
top: number;
|
|
6
|
+
left: number;
|
|
7
|
+
};
|
|
8
|
+
visible: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function Tooltip({ text, position, visible }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
interface ChildrenProps {
|
|
12
|
+
showTooltip: (event: React.MouseEvent<HTMLElement>, text: string) => void;
|
|
13
|
+
hideTooltip: () => void;
|
|
14
|
+
}
|
|
15
|
+
interface TooltipWrapperProps {
|
|
16
|
+
children: (props: ChildrenProps) => JSX.Element;
|
|
17
|
+
spacing?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function TooltipWrapper({ children, spacing }: TooltipWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState } from "react";
|
|
3
|
+
import { TooltipContainer } from "./styles.js";
|
|
4
|
+
function Tooltip({ text, position, visible }) {
|
|
5
|
+
if (!visible) return /*#__PURE__*/ jsx(Fragment, {});
|
|
6
|
+
return /*#__PURE__*/ jsx(TooltipContainer, {
|
|
7
|
+
position: position,
|
|
8
|
+
children: text
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function TooltipWrapper({ children, spacing = 8 }) {
|
|
12
|
+
const [tooltip, setTooltip] = useState({
|
|
13
|
+
text: "",
|
|
14
|
+
position: {
|
|
15
|
+
top: 0,
|
|
16
|
+
left: 0
|
|
17
|
+
},
|
|
18
|
+
visible: false
|
|
19
|
+
});
|
|
20
|
+
const wrapperRef = useRef(null);
|
|
21
|
+
const showTooltip = (event, text)=>{
|
|
22
|
+
if (!wrapperRef.current) return;
|
|
23
|
+
const wrapperRect = wrapperRef.current.getBoundingClientRect();
|
|
24
|
+
const targetRect = event.currentTarget.getBoundingClientRect();
|
|
25
|
+
setTooltip({
|
|
26
|
+
text,
|
|
27
|
+
position: {
|
|
28
|
+
top: targetRect.top - wrapperRect.top,
|
|
29
|
+
left: targetRect.right - wrapperRect.left + spacing
|
|
30
|
+
},
|
|
31
|
+
visible: true
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const hideTooltip = ()=>setTooltip({
|
|
35
|
+
...tooltip,
|
|
36
|
+
visible: false
|
|
37
|
+
});
|
|
38
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
39
|
+
ref: wrapperRef,
|
|
40
|
+
style: {
|
|
41
|
+
position: "relative"
|
|
42
|
+
},
|
|
43
|
+
children: [
|
|
44
|
+
children({
|
|
45
|
+
showTooltip,
|
|
46
|
+
hideTooltip
|
|
47
|
+
}),
|
|
48
|
+
/*#__PURE__*/ jsx(Tooltip, {
|
|
49
|
+
text: tooltip.text,
|
|
50
|
+
position: tooltip.position,
|
|
51
|
+
visible: tooltip.visible
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
export { Tooltip, TooltipWrapper };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const TooltipContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
+
position: {
|
|
3
|
+
top: number;
|
|
4
|
+
left: number;
|
|
5
|
+
};
|
|
6
|
+
}>> & string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import styled_components from "styled-components";
|
|
2
|
+
import { COLOR_NEUTRAL_DAY, COLOR_NEUTRAL_DUSK } from "@ftdata/f-tokens";
|
|
3
|
+
const TooltipContainer = styled_components.div`
|
|
4
|
+
position: absolute;
|
|
5
|
+
top: ${({ position })=>position.top}px;
|
|
6
|
+
left: ${({ position })=>position.left}px;
|
|
7
|
+
background-color: ${COLOR_NEUTRAL_DUSK};
|
|
8
|
+
color: ${COLOR_NEUTRAL_DAY};
|
|
9
|
+
padding: 0.25rem 0.5rem;
|
|
10
|
+
border-radius: 0.25rem;
|
|
11
|
+
overflow-wrap: break-word;
|
|
12
|
+
line-height: 0.875rem;
|
|
13
|
+
font-size: 0.75rem;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
max-width: 15rem;
|
|
16
|
+
width: 100%;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
z-index: 1000;
|
|
19
|
+
`;
|
|
20
|
+
export { TooltipContainer };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Tooltips from ".";
|
|
3
|
+
/**
|
|
4
|
+
* Tooltips são pequenas caixas de texto que surgem ao passar o mouse sobre um elemento, revelando informações extras.
|
|
5
|
+
* Este componente também funciona com os atributos nativos de um HTML div element.
|
|
6
|
+
*/
|
|
7
|
+
declare const meta: Meta<typeof Tooltips>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
/**
|
|
11
|
+
* Variação padrão do Tooltips quando apenas as propriedades obrigatórias são fornecidas.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Todas as variações de posição onde o Tolltips é renderizado.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Positions: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Exemplo simples da usabilidade do componente.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ExampleWithButton: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Exemplo simples da usabilidade do componente.
|
|
24
|
+
*/
|
|
25
|
+
export declare const ExampleWithIcon: Story;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import index from "./index.js";
|
|
3
|
+
import Button from "../Button/index.js";
|
|
4
|
+
import chat from "../../assets/svg/chat.js";
|
|
5
|
+
const defaultExample = /*#__PURE__*/ jsx("div", {
|
|
6
|
+
style: {
|
|
7
|
+
color: "#FF5656",
|
|
8
|
+
fontWeight: "800",
|
|
9
|
+
padding: "0.5rem"
|
|
10
|
+
},
|
|
11
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
12
|
+
children: "Passe o mouse"
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
const firstExample = /*#__PURE__*/ jsx(Button, {
|
|
16
|
+
variant: "secondary",
|
|
17
|
+
children: "Passe o Mouse"
|
|
18
|
+
});
|
|
19
|
+
const secondExample = /*#__PURE__*/ jsx("img", {
|
|
20
|
+
src: chat,
|
|
21
|
+
style: {
|
|
22
|
+
width: "40px"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const meta = {
|
|
26
|
+
title: "DESIGN COMPONENTS/Tooltips",
|
|
27
|
+
component: index,
|
|
28
|
+
tags: [
|
|
29
|
+
"autodocs"
|
|
30
|
+
],
|
|
31
|
+
parameters: {
|
|
32
|
+
layout: "centered"
|
|
33
|
+
},
|
|
34
|
+
argTypes: {
|
|
35
|
+
children: {
|
|
36
|
+
control: {
|
|
37
|
+
type: "select"
|
|
38
|
+
},
|
|
39
|
+
description: "Define o conte\xfado que ser\xe1 renderizado dentro do componente.",
|
|
40
|
+
mapping: {
|
|
41
|
+
"Default Example": defaultExample,
|
|
42
|
+
"First Example": firstExample,
|
|
43
|
+
"Second Example": secondExample
|
|
44
|
+
},
|
|
45
|
+
options: [
|
|
46
|
+
"Default Example",
|
|
47
|
+
"First Example",
|
|
48
|
+
"Second Example"
|
|
49
|
+
],
|
|
50
|
+
table: {
|
|
51
|
+
type: {
|
|
52
|
+
summary: "ReactNode"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
text: {
|
|
57
|
+
description: "Define o texto dentro do Tooltip."
|
|
58
|
+
},
|
|
59
|
+
position: {
|
|
60
|
+
control: {
|
|
61
|
+
type: "inline-radio"
|
|
62
|
+
},
|
|
63
|
+
description: "Define a posi\xe7\xe3o que o Tooltip ser\xe1 renderizado.",
|
|
64
|
+
table: {
|
|
65
|
+
type: {
|
|
66
|
+
summary: '"left" | "right" | "top" | "bottom"'
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const Tooltips_stories = meta;
|
|
73
|
+
const Default = {
|
|
74
|
+
args: {
|
|
75
|
+
children: defaultExample,
|
|
76
|
+
text: "tooltip",
|
|
77
|
+
position: "bottom"
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const Positions = {
|
|
81
|
+
render: ()=>/*#__PURE__*/ jsxs("div", {
|
|
82
|
+
style: {
|
|
83
|
+
display: "flex",
|
|
84
|
+
justifyContent: "center",
|
|
85
|
+
alignItems: "center",
|
|
86
|
+
gap: "4rem",
|
|
87
|
+
width: "100%"
|
|
88
|
+
},
|
|
89
|
+
children: [
|
|
90
|
+
/*#__PURE__*/ jsx(index, {
|
|
91
|
+
position: "top",
|
|
92
|
+
text: "tooltip",
|
|
93
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
94
|
+
variant: "secondary",
|
|
95
|
+
children: "top"
|
|
96
|
+
})
|
|
97
|
+
}),
|
|
98
|
+
/*#__PURE__*/ jsx(index, {
|
|
99
|
+
position: "bottom",
|
|
100
|
+
text: "tooltip",
|
|
101
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
102
|
+
variant: "secondary",
|
|
103
|
+
children: "bottom"
|
|
104
|
+
})
|
|
105
|
+
}),
|
|
106
|
+
/*#__PURE__*/ jsx(index, {
|
|
107
|
+
position: "left",
|
|
108
|
+
text: "tooltip",
|
|
109
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
110
|
+
variant: "secondary",
|
|
111
|
+
children: "left"
|
|
112
|
+
})
|
|
113
|
+
}),
|
|
114
|
+
/*#__PURE__*/ jsx(index, {
|
|
115
|
+
position: "right",
|
|
116
|
+
text: "tooltip",
|
|
117
|
+
children: /*#__PURE__*/ jsx(Button, {
|
|
118
|
+
variant: "secondary",
|
|
119
|
+
children: "right"
|
|
120
|
+
})
|
|
121
|
+
})
|
|
122
|
+
]
|
|
123
|
+
})
|
|
124
|
+
};
|
|
125
|
+
const ExampleWithButton = {
|
|
126
|
+
args: {
|
|
127
|
+
children: firstExample,
|
|
128
|
+
text: "Bot\xe3o",
|
|
129
|
+
position: "right"
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
const ExampleWithIcon = {
|
|
133
|
+
args: {
|
|
134
|
+
children: secondExample,
|
|
135
|
+
text: "icone",
|
|
136
|
+
position: "bottom"
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
export { Default, ExampleWithButton, ExampleWithIcon, Positions, Tooltips_stories as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
interface Props extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
position?: "left" | "right" | "top" | "bottom";
|
|
4
|
+
text?: string;
|
|
5
|
+
children?: ReactElement;
|
|
6
|
+
}
|
|
7
|
+
declare const Tooltips: React.FC<Props>;
|
|
8
|
+
export default Tooltips;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { TooltipContainer } from "./styles.js";
|
|
4
|
+
const Tooltips = ({ children, text, position, ...rest })=>{
|
|
5
|
+
const [show, setShow] = useState(false);
|
|
6
|
+
return /*#__PURE__*/ jsxs(TooltipContainer, {
|
|
7
|
+
position: position,
|
|
8
|
+
children: [
|
|
9
|
+
show && /*#__PURE__*/ jsxs("div", {
|
|
10
|
+
className: "tooltip-box",
|
|
11
|
+
children: [
|
|
12
|
+
text,
|
|
13
|
+
/*#__PURE__*/ jsx("span", {
|
|
14
|
+
className: "tooltipArrow"
|
|
15
|
+
})
|
|
16
|
+
]
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ jsx("div", {
|
|
19
|
+
onMouseEnter: ()=>setShow(true),
|
|
20
|
+
onMouseLeave: ()=>setShow(false),
|
|
21
|
+
...rest,
|
|
22
|
+
children: children
|
|
23
|
+
})
|
|
24
|
+
]
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
const components_Tooltips = Tooltips;
|
|
28
|
+
export { components_Tooltips as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
interface PositionProps {
|
|
2
|
+
position?: "left" | "right" | "top" | "bottom";
|
|
3
|
+
}
|
|
4
|
+
export declare const TooltipContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, PositionProps>> & string;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import styled_components from "styled-components";
|
|
2
|
+
const TooltipContainer = styled_components("div")`
|
|
3
|
+
position: relative;
|
|
4
|
+
width: max-content;
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
|
|
8
|
+
& > .tooltip-box {
|
|
9
|
+
font-size: 12px;
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
position: absolute;
|
|
12
|
+
background: #26333b;
|
|
13
|
+
color: #fff;
|
|
14
|
+
padding: 4px 8px;
|
|
15
|
+
border-radius: 4px;
|
|
16
|
+
top: ${({ position })=>"bottom" === position && "calc(100% + 5px)" || "left" === position && "-2px" || "right" === position && "-2px"};
|
|
17
|
+
bottom: ${({ position })=>"top" === position && "calc(100% + 5px)"};
|
|
18
|
+
right: ${({ position })=>"left" === position && "calc(100% + 5px)"};
|
|
19
|
+
left: ${({ position })=>"right" === position && "calc(100% + 5px)"};
|
|
20
|
+
width: max-content;
|
|
21
|
+
font-family: "Inter";
|
|
22
|
+
font-style: normal;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.tooltipArrow {
|
|
26
|
+
position: absolute;
|
|
27
|
+
left: ${({ position })=>"top" === position && "50%" || "bottom" === position && "50%" || "right" === position && "-10px"};
|
|
28
|
+
right: ${({ position })=>"left" === position && "-0.65rem"};
|
|
29
|
+
top: ${({ position })=>"bottom" === position && "-10px" || "left" === position && "30%" || "right" === position && "30%"};
|
|
30
|
+
bottom: ${({ position })=>"top" === position && "-10px"};
|
|
31
|
+
border-width: 5px;
|
|
32
|
+
margin: ${({ position })=>"top" === position && "0 -5px" || "bottom" === position && "0 -5px"};
|
|
33
|
+
border-style: solid;
|
|
34
|
+
border-color: ${({ position })=>"top" === position && "#26333b transparent transparent transparent" || "right" === position && "transparent #26333b transparent transparent" || "bottom" === position && "transparent transparent #26333b transparent" || "left" === position && "transparent transparent transparent #26333b"};
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
export { TooltipContainer };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import UserMenu from ".";
|
|
3
|
+
/**
|
|
4
|
+
* UserMenu é um componente de menu que permite ao usuário realizar ações como efetuar logout ou ajustar suas configurações pessoais.
|
|
5
|
+
*/
|
|
6
|
+
declare const meta: Meta<typeof UserMenu>;
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof meta>;
|
|
9
|
+
/**
|
|
10
|
+
* Variação padrão do UserMenu quando são passadas apenas propriedades obrigatórias.
|
|
11
|
+
*/
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
/**
|
|
14
|
+
* Variação padrão do UserMenu opções customizadas são passadas.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CustomOptions: Story;
|
|
17
|
+
/**
|
|
18
|
+
* Exemplo interativo do componente UserMenu para demonstrar seu comportamento e funcionalidades.
|
|
19
|
+
* ##### importante: A interatividade só está disponivel na storie do componente.
|
|
20
|
+
*/
|
|
21
|
+
export declare const Clickable: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Exemplo interativo do componente UserMenu com opções customizadas para demonstrar seu comportamento e funcionalidades.
|
|
24
|
+
* ##### importante: A interatividade só está disponivel na storie do componente.
|
|
25
|
+
*/
|
|
26
|
+
export declare const ClickableCustom: Story;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import index from "./index.js";
|
|
4
|
+
import Avatar from "../Avatar/index.js";
|
|
5
|
+
import { COLOR_CUSTOM_COLUMNBG, COLOR_NEUTRAL_DAY } from "@ftdata/f-tokens";
|
|
6
|
+
import { Icon } from "@ftdata/f-icons";
|
|
7
|
+
const meta = {
|
|
8
|
+
title: "DESIGN COMPONENTS/UserMenu",
|
|
9
|
+
component: index,
|
|
10
|
+
tags: [
|
|
11
|
+
"autodocs"
|
|
12
|
+
],
|
|
13
|
+
argTypes: {
|
|
14
|
+
slug: {
|
|
15
|
+
description: "Recebe o slug da empresa para o logout."
|
|
16
|
+
},
|
|
17
|
+
translate: {
|
|
18
|
+
description: "Fun\xe7\xe3o respons\xe1vel pela tradu\xe7\xe3o dos textos do UserMenu."
|
|
19
|
+
},
|
|
20
|
+
setIsOpen: {
|
|
21
|
+
description: "Recebe o estado que controla se o menu est\xe1 aberto ou fechado.",
|
|
22
|
+
table: {
|
|
23
|
+
type: {
|
|
24
|
+
summary: "React.Dispatch<React.SetStateAction<boolean>>"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const UserMenu_stories = meta;
|
|
31
|
+
const mockTranslate = (key)=>"exit" === key ? "Sair" : "settings" === key ? "Configura\xe7\xf5es" : "Acessar outras empresas";
|
|
32
|
+
const containerDecorator = (Story)=>/*#__PURE__*/ jsxs("div", {
|
|
33
|
+
style: {
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
color: COLOR_NEUTRAL_DAY,
|
|
36
|
+
fontWeight: 600,
|
|
37
|
+
position: "relative",
|
|
38
|
+
background: COLOR_CUSTOM_COLUMNBG,
|
|
39
|
+
padding: "0.5rem 1rem",
|
|
40
|
+
width: "100%",
|
|
41
|
+
display: "flex",
|
|
42
|
+
justifyContent: "space-between",
|
|
43
|
+
borderRadius: "14px 14px 0 0",
|
|
44
|
+
fontSize: "0.8rem"
|
|
45
|
+
},
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ jsx("p", {
|
|
48
|
+
children: "Container exemplo para mostrar o UserMenu"
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ jsx("div", {
|
|
51
|
+
style: {
|
|
52
|
+
cursor: "pointer"
|
|
53
|
+
},
|
|
54
|
+
children: /*#__PURE__*/ jsx(Avatar, {
|
|
55
|
+
size: "large"
|
|
56
|
+
})
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ jsx(Story, {})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
const Default = {
|
|
62
|
+
decorators: [
|
|
63
|
+
containerDecorator
|
|
64
|
+
],
|
|
65
|
+
args: {
|
|
66
|
+
slug: "slug-da-empresa",
|
|
67
|
+
translate: mockTranslate,
|
|
68
|
+
setIsOpen: ()=>null,
|
|
69
|
+
isOpen: true
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const customOptions = [
|
|
73
|
+
{
|
|
74
|
+
icon: /*#__PURE__*/ jsx(Icon, {
|
|
75
|
+
name: "bld hotel-building",
|
|
76
|
+
color: "currentColor"
|
|
77
|
+
}),
|
|
78
|
+
text: mockTranslate("access_other_companies")
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
const CustomOptions = {
|
|
82
|
+
decorators: [
|
|
83
|
+
containerDecorator
|
|
84
|
+
],
|
|
85
|
+
args: {
|
|
86
|
+
slug: "slug-da-empresa",
|
|
87
|
+
translate: mockTranslate,
|
|
88
|
+
setIsOpen: ()=>null,
|
|
89
|
+
isOpen: true,
|
|
90
|
+
customOptions: customOptions
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
const Clickable = {
|
|
94
|
+
render: ()=>{
|
|
95
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
96
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
97
|
+
style: {
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
color: COLOR_NEUTRAL_DAY,
|
|
100
|
+
fontWeight: 600,
|
|
101
|
+
position: "absolute",
|
|
102
|
+
background: COLOR_CUSTOM_COLUMNBG,
|
|
103
|
+
padding: "0.5rem 1rem",
|
|
104
|
+
width: "calc(100% - 2rem)",
|
|
105
|
+
display: "flex",
|
|
106
|
+
justifyContent: "space-between",
|
|
107
|
+
borderRadius: "14px 14px 0 0",
|
|
108
|
+
fontSize: "0.8rem"
|
|
109
|
+
},
|
|
110
|
+
children: [
|
|
111
|
+
/*#__PURE__*/ jsx("p", {
|
|
112
|
+
children: "Container exemplo para mostrar o UserMenu"
|
|
113
|
+
}),
|
|
114
|
+
/*#__PURE__*/ jsx("div", {
|
|
115
|
+
style: {
|
|
116
|
+
cursor: "pointer"
|
|
117
|
+
},
|
|
118
|
+
children: /*#__PURE__*/ jsx(Avatar, {
|
|
119
|
+
size: "large",
|
|
120
|
+
onClick: ()=>setIsOpen(!isOpen)
|
|
121
|
+
})
|
|
122
|
+
}),
|
|
123
|
+
/*#__PURE__*/ jsx(index, {
|
|
124
|
+
slug: "teste",
|
|
125
|
+
isOpen: isOpen,
|
|
126
|
+
setIsOpen: setIsOpen,
|
|
127
|
+
translate: mockTranslate
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const ClickableCustom = {
|
|
134
|
+
render: ()=>{
|
|
135
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
136
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
137
|
+
style: {
|
|
138
|
+
alignItems: "center",
|
|
139
|
+
color: COLOR_NEUTRAL_DAY,
|
|
140
|
+
fontWeight: 600,
|
|
141
|
+
position: "absolute",
|
|
142
|
+
background: COLOR_CUSTOM_COLUMNBG,
|
|
143
|
+
padding: "0.5rem 1rem",
|
|
144
|
+
width: "calc(100% - 2rem)",
|
|
145
|
+
display: "flex",
|
|
146
|
+
justifyContent: "space-between",
|
|
147
|
+
borderRadius: "14px 14px 0 0",
|
|
148
|
+
fontSize: "0.8rem"
|
|
149
|
+
},
|
|
150
|
+
children: [
|
|
151
|
+
/*#__PURE__*/ jsx("p", {
|
|
152
|
+
children: "Container exemplo para mostrar o UserMenu"
|
|
153
|
+
}),
|
|
154
|
+
/*#__PURE__*/ jsx("div", {
|
|
155
|
+
style: {
|
|
156
|
+
cursor: "pointer"
|
|
157
|
+
},
|
|
158
|
+
children: /*#__PURE__*/ jsx(Avatar, {
|
|
159
|
+
size: "large",
|
|
160
|
+
onClick: ()=>setIsOpen(!isOpen)
|
|
161
|
+
})
|
|
162
|
+
}),
|
|
163
|
+
/*#__PURE__*/ jsx(index, {
|
|
164
|
+
slug: "teste",
|
|
165
|
+
isOpen: isOpen,
|
|
166
|
+
setIsOpen: setIsOpen,
|
|
167
|
+
translate: mockTranslate,
|
|
168
|
+
customOptions: customOptions
|
|
169
|
+
})
|
|
170
|
+
]
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
export { Clickable, ClickableCustom, CustomOptions, Default, UserMenu_stories as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { JSX } from "react";
|
|
2
|
+
export interface SelectProps {
|
|
3
|
+
value: string | number;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
interface UserMenu {
|
|
7
|
+
translate: (key: string) => string;
|
|
8
|
+
slug?: string;
|
|
9
|
+
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
customOptions?: DropdownOption[] | [];
|
|
12
|
+
}
|
|
13
|
+
interface DropdownOption {
|
|
14
|
+
icon: JSX.Element;
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
text: string;
|
|
17
|
+
}
|
|
18
|
+
export default function UserMenu({ translate, slug, setIsOpen, isOpen, customOptions, }: UserMenu): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|