@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,124 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Paragraph, Title } from "../index.js";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "DESIGN COMPONENTS/Text/Paragraph",
|
|
5
|
+
component: Paragraph,
|
|
6
|
+
tags: [
|
|
7
|
+
"autodocs"
|
|
8
|
+
],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered"
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
children: {
|
|
14
|
+
description: "Define o texto que ser\xe1 renderizado.",
|
|
15
|
+
control: {
|
|
16
|
+
type: "text"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
description: "Define o tamanho do Paragraph.",
|
|
21
|
+
table: {
|
|
22
|
+
type: {
|
|
23
|
+
summary: '"caption" | "sm" | "md"'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const Paragraph_stories = meta;
|
|
30
|
+
const loremIpsum = `Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
31
|
+
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
32
|
+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
33
|
+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
34
|
+
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.`;
|
|
35
|
+
const Default = {
|
|
36
|
+
args: {
|
|
37
|
+
size: "caption",
|
|
38
|
+
children: loremIpsum
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const Caption = {
|
|
42
|
+
args: {
|
|
43
|
+
children: loremIpsum,
|
|
44
|
+
size: "caption"
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const Sm = {
|
|
48
|
+
args: {
|
|
49
|
+
children: loremIpsum,
|
|
50
|
+
size: "sm"
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const Md = {
|
|
54
|
+
args: {
|
|
55
|
+
children: loremIpsum,
|
|
56
|
+
size: "md"
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const Sizes = {
|
|
60
|
+
render: ()=>/*#__PURE__*/ jsxs("div", {
|
|
61
|
+
style: {
|
|
62
|
+
display: "flex",
|
|
63
|
+
justifyContent: "center",
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
flexDirection: "column",
|
|
66
|
+
gap: "2.5rem",
|
|
67
|
+
width: "100%"
|
|
68
|
+
},
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ jsxs("div", {
|
|
71
|
+
style: {
|
|
72
|
+
display: "grid",
|
|
73
|
+
gridTemplateColumns: "10% 90%",
|
|
74
|
+
alignItems: "center"
|
|
75
|
+
},
|
|
76
|
+
children: [
|
|
77
|
+
/*#__PURE__*/ jsx(Title, {
|
|
78
|
+
size: "md",
|
|
79
|
+
children: "Caption"
|
|
80
|
+
}),
|
|
81
|
+
/*#__PURE__*/ jsx(Paragraph, {
|
|
82
|
+
size: "caption",
|
|
83
|
+
children: loremIpsum
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
}),
|
|
87
|
+
/*#__PURE__*/ jsxs("div", {
|
|
88
|
+
style: {
|
|
89
|
+
display: "grid",
|
|
90
|
+
gridTemplateColumns: "10% 90%",
|
|
91
|
+
alignItems: "center"
|
|
92
|
+
},
|
|
93
|
+
children: [
|
|
94
|
+
/*#__PURE__*/ jsx(Title, {
|
|
95
|
+
size: "md",
|
|
96
|
+
children: "md"
|
|
97
|
+
}),
|
|
98
|
+
/*#__PURE__*/ jsx(Paragraph, {
|
|
99
|
+
size: "md",
|
|
100
|
+
children: loremIpsum
|
|
101
|
+
})
|
|
102
|
+
]
|
|
103
|
+
}),
|
|
104
|
+
/*#__PURE__*/ jsxs("div", {
|
|
105
|
+
style: {
|
|
106
|
+
display: "grid",
|
|
107
|
+
gridTemplateColumns: "10% 90%",
|
|
108
|
+
alignItems: "center"
|
|
109
|
+
},
|
|
110
|
+
children: [
|
|
111
|
+
/*#__PURE__*/ jsx(Title, {
|
|
112
|
+
size: "md",
|
|
113
|
+
children: "sm"
|
|
114
|
+
}),
|
|
115
|
+
/*#__PURE__*/ jsx(Paragraph, {
|
|
116
|
+
size: "sm",
|
|
117
|
+
children: loremIpsum
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
})
|
|
123
|
+
};
|
|
124
|
+
export { Caption, Default, Md, Sizes, Sm, Paragraph_stories as default };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Title } from "../index";
|
|
3
|
+
/**
|
|
4
|
+
* Títulos são usados para mostrar textos importantes em uma página.
|
|
5
|
+
* Este componente também funciona com os atributos nativos de um HTML input element.
|
|
6
|
+
*/
|
|
7
|
+
declare const meta: Meta<typeof Title>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
/**
|
|
11
|
+
* Variação padrão do Title quando apenas as propriedades obrigatórias são fornecidas.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Variação subheading do Title.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Subheading: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Variação sm do Title.
|
|
20
|
+
*/
|
|
21
|
+
export declare const Sm: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Variação md do Title.
|
|
24
|
+
*/
|
|
25
|
+
export declare const Md: Story;
|
|
26
|
+
/**
|
|
27
|
+
* Variação section do Title.
|
|
28
|
+
*/
|
|
29
|
+
export declare const Section: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Variação standart do Title.
|
|
32
|
+
*/
|
|
33
|
+
export declare const Standart: Story;
|
|
34
|
+
/**
|
|
35
|
+
* Variação huge do Title.
|
|
36
|
+
*/
|
|
37
|
+
export declare const Huge: Story;
|
|
38
|
+
/**
|
|
39
|
+
* Todas as variações padrão de de tamanho do Title.
|
|
40
|
+
*/
|
|
41
|
+
export declare const Sizes: Story;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Title } from "../index.js";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "DESIGN COMPONENTS/Text/Title",
|
|
5
|
+
component: Title,
|
|
6
|
+
tags: [
|
|
7
|
+
"autodocs"
|
|
8
|
+
],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered"
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
description: "Define o tipo e tamanho do Title de acordo com sua varia\xe7\xe3o.",
|
|
15
|
+
table: {
|
|
16
|
+
type: {
|
|
17
|
+
summary: '"subheading" | "sm" | "md" | "section" | "standard" | "huge"'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
children: {
|
|
22
|
+
control: {
|
|
23
|
+
type: "text"
|
|
24
|
+
},
|
|
25
|
+
description: "Define o texto que ser\xe1 renderizado."
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const Title_stories = meta;
|
|
30
|
+
const Default = {
|
|
31
|
+
args: {
|
|
32
|
+
children: "Default",
|
|
33
|
+
size: "huge"
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const Subheading = {
|
|
37
|
+
args: {
|
|
38
|
+
children: "Subheading",
|
|
39
|
+
size: "subheading"
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const Sm = {
|
|
43
|
+
args: {
|
|
44
|
+
children: "Sm",
|
|
45
|
+
size: "sm"
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const Md = {
|
|
49
|
+
args: {
|
|
50
|
+
children: "Md",
|
|
51
|
+
size: "md"
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const Section = {
|
|
55
|
+
args: {
|
|
56
|
+
children: "Section",
|
|
57
|
+
size: "section"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const Standart = {
|
|
61
|
+
args: {
|
|
62
|
+
children: "Standart",
|
|
63
|
+
size: "standard"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const Huge = {
|
|
67
|
+
args: {
|
|
68
|
+
children: "Huge",
|
|
69
|
+
size: "huge"
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const Sizes = {
|
|
73
|
+
render: ()=>/*#__PURE__*/ jsxs("div", {
|
|
74
|
+
style: {
|
|
75
|
+
display: "flex",
|
|
76
|
+
flexDirection: "column"
|
|
77
|
+
},
|
|
78
|
+
children: [
|
|
79
|
+
/*#__PURE__*/ jsx(Title, {
|
|
80
|
+
size: "huge",
|
|
81
|
+
children: "Huge - Lorem Ipsum"
|
|
82
|
+
}),
|
|
83
|
+
/*#__PURE__*/ jsx(Title, {
|
|
84
|
+
size: "standard",
|
|
85
|
+
children: "Standart - Lorem Ipsum"
|
|
86
|
+
}),
|
|
87
|
+
/*#__PURE__*/ jsx(Title, {
|
|
88
|
+
size: "section",
|
|
89
|
+
children: "Section - Lorem Ipsum"
|
|
90
|
+
}),
|
|
91
|
+
/*#__PURE__*/ jsx(Title, {
|
|
92
|
+
size: "subheading",
|
|
93
|
+
children: "Subheading - Lorem Ipsum"
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ jsx(Title, {
|
|
96
|
+
size: "md",
|
|
97
|
+
children: "Md - Lorem Ipsum"
|
|
98
|
+
}),
|
|
99
|
+
/*#__PURE__*/ jsx(Title, {
|
|
100
|
+
size: "sm",
|
|
101
|
+
children: "sm - Lorem Ipsum"
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
})
|
|
105
|
+
};
|
|
106
|
+
export { Default, Huge, Md, Section, Sizes, Sm, Standart, Subheading, Title_stories as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ParagraphContainer, TITLE_MODIFIERS, TitleContainer } from "./styles.js";
|
|
3
|
+
const Title = ({ children, size, ...rest })=>{
|
|
4
|
+
const tag = TITLE_MODIFIERS[size][0];
|
|
5
|
+
return /*#__PURE__*/ jsx(TitleContainer, {
|
|
6
|
+
size: size,
|
|
7
|
+
...rest,
|
|
8
|
+
as: tag,
|
|
9
|
+
children: children
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
const Paragraph = ({ children, size, ...rest })=>/*#__PURE__*/ jsx(ParagraphContainer, {
|
|
13
|
+
size: size,
|
|
14
|
+
...rest,
|
|
15
|
+
children: children
|
|
16
|
+
});
|
|
17
|
+
export { Paragraph, Title };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type HeadingTypes = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
2
|
+
type TitleModifiersProps = {
|
|
3
|
+
huge: [HeadingTypes, string];
|
|
4
|
+
standard: [HeadingTypes, string];
|
|
5
|
+
section: [HeadingTypes, string];
|
|
6
|
+
md: [HeadingTypes, string];
|
|
7
|
+
sm: [HeadingTypes, string];
|
|
8
|
+
subheading: [HeadingTypes, string];
|
|
9
|
+
};
|
|
10
|
+
export declare const TITLE_MODIFIERS: TitleModifiersProps;
|
|
11
|
+
type TitleSizes = "subheading" | "sm" | "md" | "section" | "standard" | "huge";
|
|
12
|
+
export interface TitleContainerProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
size: TitleSizes;
|
|
15
|
+
}
|
|
16
|
+
export type ParagraphSizes = "caption" | "sm" | "md";
|
|
17
|
+
export interface ParagraphContainerProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
size: ParagraphSizes;
|
|
20
|
+
}
|
|
21
|
+
export declare const TitleContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").ClassAttributes<HTMLHeadingElement> & import("react").HTMLAttributes<HTMLHeadingElement>, TitleContainerProps>> & string;
|
|
22
|
+
export declare const ParagraphContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").ClassAttributes<HTMLParagraphElement> & import("react").HTMLAttributes<HTMLParagraphElement>, ParagraphContainerProps>> & string;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import styled_components from "styled-components";
|
|
2
|
+
import { FONT_FAMILY_01, FONT_SIZE_LG, FONT_SIZE_MD, FONT_SIZE_SM, FONT_SIZE_XL, FONT_SIZE_XS, FONT_SIZE_XXL, FONT_WEIGHT_BOLD, FONT_WEIGHT_MEDIUM, LETTER_CASE_UPPERCASE, LETTER_SPACING_TIGHT, LETTER_SPACING_VERY_DISTANT, LINE_HEIGHT_MEDIUM, LINE_HEIGHT_TIGHT } from "@ftdata/f-tokens";
|
|
3
|
+
const TITLE_MODIFIERS = {
|
|
4
|
+
huge: [
|
|
5
|
+
"h1",
|
|
6
|
+
`
|
|
7
|
+
font-size: ${FONT_SIZE_XXL};
|
|
8
|
+
letter-spacing: ${LETTER_SPACING_TIGHT};
|
|
9
|
+
`
|
|
10
|
+
],
|
|
11
|
+
standard: [
|
|
12
|
+
"h2",
|
|
13
|
+
`
|
|
14
|
+
font-size: ${FONT_SIZE_XL};
|
|
15
|
+
letter-spacing: ${LETTER_SPACING_TIGHT};
|
|
16
|
+
`
|
|
17
|
+
],
|
|
18
|
+
section: [
|
|
19
|
+
"h3",
|
|
20
|
+
`
|
|
21
|
+
font-size: ${FONT_SIZE_LG};
|
|
22
|
+
font-weight: ${FONT_WEIGHT_MEDIUM};
|
|
23
|
+
letter-spacing: ${LETTER_SPACING_TIGHT};
|
|
24
|
+
`
|
|
25
|
+
],
|
|
26
|
+
md: [
|
|
27
|
+
"h4",
|
|
28
|
+
`
|
|
29
|
+
font-size: ${FONT_SIZE_MD};
|
|
30
|
+
`
|
|
31
|
+
],
|
|
32
|
+
sm: [
|
|
33
|
+
"h5",
|
|
34
|
+
`
|
|
35
|
+
font-size: ${FONT_SIZE_SM};
|
|
36
|
+
`
|
|
37
|
+
],
|
|
38
|
+
subheading: [
|
|
39
|
+
"h6",
|
|
40
|
+
`
|
|
41
|
+
font-size: ${FONT_SIZE_XS};
|
|
42
|
+
letter-spacing: ${LETTER_SPACING_VERY_DISTANT};
|
|
43
|
+
text-transform: ${LETTER_CASE_UPPERCASE};
|
|
44
|
+
`
|
|
45
|
+
]
|
|
46
|
+
};
|
|
47
|
+
const PARAGRAPH_MODIFIERS = {
|
|
48
|
+
md: `
|
|
49
|
+
font-size: ${FONT_SIZE_MD};
|
|
50
|
+
`,
|
|
51
|
+
sm: `
|
|
52
|
+
font-size: ${FONT_SIZE_SM};
|
|
53
|
+
`,
|
|
54
|
+
caption: `
|
|
55
|
+
font-size: ${FONT_SIZE_XS};
|
|
56
|
+
`
|
|
57
|
+
};
|
|
58
|
+
const TitleContainer = styled_components("h1")`
|
|
59
|
+
font-family: ${FONT_FAMILY_01};
|
|
60
|
+
font-weight: ${FONT_WEIGHT_BOLD};
|
|
61
|
+
line-height: ${LINE_HEIGHT_TIGHT};
|
|
62
|
+
${({ size })=>TITLE_MODIFIERS[size][1]}
|
|
63
|
+
`;
|
|
64
|
+
const ParagraphContainer = styled_components("p")`
|
|
65
|
+
font-family: ${FONT_FAMILY_01};
|
|
66
|
+
font-weight: ${FONT_WEIGHT_MEDIUM};
|
|
67
|
+
line-height: ${LINE_HEIGHT_MEDIUM};
|
|
68
|
+
${({ size })=>PARAGRAPH_MODIFIERS[size]}
|
|
69
|
+
`;
|
|
70
|
+
export { ParagraphContainer, TITLE_MODIFIERS, TitleContainer };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import TextArea from ".";
|
|
3
|
+
/**
|
|
4
|
+
* TextAreas são utilizadas em formulários para permitir que usuários digitem informações extensas em várias linhas.
|
|
5
|
+
* Este componente também funciona com os atributos nativos de um HTML textarea element.
|
|
6
|
+
*/
|
|
7
|
+
declare const meta: Meta<typeof TextArea>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
/**
|
|
11
|
+
* Variação padrão da TextArea quando apenas as propriedades obrigatórias são fornecidas.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Mensagem para auxiliar o usuário em determinadas situações.
|
|
16
|
+
*/
|
|
17
|
+
export declare const HelpText: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Indica um erro de validação para o usuário.
|
|
20
|
+
*/
|
|
21
|
+
export declare const Error: Story;
|
|
22
|
+
/**
|
|
23
|
+
* Indica sucesso de validação para o usuário.
|
|
24
|
+
*/
|
|
25
|
+
export declare const Succes: Story;
|
|
26
|
+
/**
|
|
27
|
+
* Rótulo exibido acima da Textarea.
|
|
28
|
+
*/
|
|
29
|
+
export declare const TextField: Story;
|
|
30
|
+
/**
|
|
31
|
+
* Variação da Textarea obrigátória
|
|
32
|
+
*/
|
|
33
|
+
export declare const Required: Story;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import index from "./index.js";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "DESIGN COMPONENTS/TextArea",
|
|
4
|
+
component: index,
|
|
5
|
+
tags: [
|
|
6
|
+
"autodocs"
|
|
7
|
+
],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: "centered"
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
error: {
|
|
13
|
+
description: "Define se a TextArea possui erros de valida\xe7\xe3o."
|
|
14
|
+
},
|
|
15
|
+
helpText: {
|
|
16
|
+
description: "Define o texto de ajuda abaixo da TextArea. A cor muda se for uma mensagem de erro ou de sucesso."
|
|
17
|
+
},
|
|
18
|
+
success: {
|
|
19
|
+
description: "Define se os dados de entrada foram validados com sucesso."
|
|
20
|
+
},
|
|
21
|
+
width: {
|
|
22
|
+
control: {
|
|
23
|
+
type: "text"
|
|
24
|
+
},
|
|
25
|
+
description: "Define o tamnho da TextArea.",
|
|
26
|
+
table: {
|
|
27
|
+
type: {
|
|
28
|
+
summary: "number | string"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const Textarea_stories = meta;
|
|
35
|
+
const Default = {};
|
|
36
|
+
const HelpText = {
|
|
37
|
+
args: {
|
|
38
|
+
helpText: "Help Text"
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const Error = {
|
|
42
|
+
args: {
|
|
43
|
+
helpText: "Erro",
|
|
44
|
+
error: true
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const Succes = {
|
|
48
|
+
args: {
|
|
49
|
+
helpText: "Sucesso",
|
|
50
|
+
error: false,
|
|
51
|
+
success: true
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const TextField = {
|
|
55
|
+
args: {
|
|
56
|
+
textField: "Text Field"
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const Required = {
|
|
60
|
+
args: {
|
|
61
|
+
textField: "Text Field",
|
|
62
|
+
required: true
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
export { Default, Error, HelpText, Required, Succes, TextField, Textarea_stories as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
2
|
+
error?: boolean;
|
|
3
|
+
helpText?: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
success?: boolean;
|
|
6
|
+
textField?: string;
|
|
7
|
+
width?: number | string;
|
|
8
|
+
}
|
|
9
|
+
declare const TextArea: React.FC<TextAreaProps>;
|
|
10
|
+
export default TextArea;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ContainerTextField, HelpText, Label, TextAreaControl, TextField } from "./styles.js";
|
|
3
|
+
import DoneCircleIcon from "../../assets/DoneCircleIcon.js";
|
|
4
|
+
import CancelSquareIcon from "../../assets/CancelSquareIcon.js";
|
|
5
|
+
const TextArea = ({ name, disabled, error, success, textField, helpText, width, required, ...rest })=>/*#__PURE__*/ jsxs(Label, {
|
|
6
|
+
htmlFor: name,
|
|
7
|
+
children: [
|
|
8
|
+
textField && /*#__PURE__*/ jsxs(ContainerTextField, {
|
|
9
|
+
children: [
|
|
10
|
+
/*#__PURE__*/ jsx(TextField, {
|
|
11
|
+
children: textField
|
|
12
|
+
}),
|
|
13
|
+
required && /*#__PURE__*/ jsx("div", {
|
|
14
|
+
className: "required",
|
|
15
|
+
children: "*"
|
|
16
|
+
})
|
|
17
|
+
]
|
|
18
|
+
}),
|
|
19
|
+
/*#__PURE__*/ jsx(TextAreaControl, {
|
|
20
|
+
...rest,
|
|
21
|
+
disabled: disabled,
|
|
22
|
+
error: error,
|
|
23
|
+
id: name,
|
|
24
|
+
success: success,
|
|
25
|
+
width: width
|
|
26
|
+
}),
|
|
27
|
+
helpText && /*#__PURE__*/ jsxs(HelpText, {
|
|
28
|
+
disabled: disabled,
|
|
29
|
+
error: error,
|
|
30
|
+
success: success,
|
|
31
|
+
children: [
|
|
32
|
+
!disabled && error && /*#__PURE__*/ jsx(CancelSquareIcon, {}) || success && /*#__PURE__*/ jsx(DoneCircleIcon, {}),
|
|
33
|
+
helpText
|
|
34
|
+
]
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
});
|
|
38
|
+
const components_TextArea = TextArea;
|
|
39
|
+
export { components_TextArea as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LabelHTMLAttributes, TextareaHTMLAttributes } from "react";
|
|
2
|
+
export declare const ContainerTextField: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const TextField: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
4
|
+
export declare const Label: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").ClassAttributes<HTMLLabelElement> & LabelHTMLAttributes<HTMLLabelElement>, LabelHTMLAttributes<HTMLLabelElement>>> & string;
|
|
5
|
+
interface TextAreaPropTypes extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
error?: boolean;
|
|
8
|
+
success?: boolean;
|
|
9
|
+
width?: string | number;
|
|
10
|
+
}
|
|
11
|
+
export declare const TextAreaControl: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").ClassAttributes<HTMLTextAreaElement> & TextareaHTMLAttributes<HTMLTextAreaElement>, TextAreaPropTypes>> & string;
|
|
12
|
+
interface HelpTextProps extends React.AllHTMLAttributes<HTMLSpanElement> {
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
error?: boolean;
|
|
15
|
+
success?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const HelpText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, HelpTextProps>> & string;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import styled_components from "styled-components";
|
|
2
|
+
import { BORDER_RADIUS_SM, BORDER_WIDTH_HAIRLINE, BORDER_WIDTH_NONE, BORDER_WIDTH_THIN, COLOR_BRAND_LIGHT, COLOR_DANGER_MEDIUM, COLOR_NEUTRAL_DARK, COLOR_NEUTRAL_DAY, COLOR_NEUTRAL_DUSK, COLOR_NEUTRAL_LIGHT, COLOR_NEUTRAL_LIGHTER, COLOR_NEUTRAL_MEDIUM, COLOR_SUCCESS_DARK, COLOR_SUCCESS_MEDIUM, FONT_FAMILY_01, FONT_SIZE_MD, FONT_SIZE_SM, FONT_SIZE_XS, FONT_WEIGHT_BOLD, FONT_WEIGHT_MEDIUM, LINE_HEIGHT_MEDIUM, SPACING_INLINE_01, SPACING_SQUISH_NANO, SPACING_STACK_02 } from "@ftdata/f-tokens";
|
|
3
|
+
const ContainerTextField = styled_components.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
margin-bottom: ${SPACING_STACK_02};
|
|
6
|
+
gap: 4px;
|
|
7
|
+
|
|
8
|
+
.required {
|
|
9
|
+
color: ${COLOR_DANGER_MEDIUM};
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
const TextField = styled_components.span`
|
|
13
|
+
font-weight: ${FONT_WEIGHT_BOLD};
|
|
14
|
+
font-size: ${FONT_SIZE_SM};
|
|
15
|
+
color: ${COLOR_NEUTRAL_DUSK};
|
|
16
|
+
font-family: "Inter";
|
|
17
|
+
`;
|
|
18
|
+
const Label = styled_components("label")`
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
* {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
}
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
`;
|
|
27
|
+
const TextAreaControl = styled_components("textarea")`
|
|
28
|
+
background-color: ${({ disabled })=>disabled && COLOR_NEUTRAL_LIGHTER || COLOR_NEUTRAL_DAY};
|
|
29
|
+
border-color: ${({ disabled, error, success })=>disabled && COLOR_NEUTRAL_LIGHT || error && COLOR_DANGER_MEDIUM || success && COLOR_SUCCESS_MEDIUM || COLOR_NEUTRAL_MEDIUM};
|
|
30
|
+
border-style: solid;
|
|
31
|
+
border-width: ${BORDER_WIDTH_HAIRLINE};
|
|
32
|
+
border-radius: ${BORDER_RADIUS_SM};
|
|
33
|
+
color: ${COLOR_NEUTRAL_DARK};
|
|
34
|
+
cursor: ${({ disabled })=>disabled ? "not-allowed" : "initial"};
|
|
35
|
+
font-family: ${FONT_FAMILY_01};
|
|
36
|
+
font-weight: ${FONT_WEIGHT_MEDIUM};
|
|
37
|
+
font-size: ${FONT_SIZE_MD};
|
|
38
|
+
line-height: ${LINE_HEIGHT_MEDIUM};
|
|
39
|
+
height: 120px;
|
|
40
|
+
min-width: ${({ width })=>width || 230}px;
|
|
41
|
+
outline: 2px solid transparent;
|
|
42
|
+
padding: ${SPACING_SQUISH_NANO};
|
|
43
|
+
resize: ${({ disabled })=>disabled ? "none" : "both"};
|
|
44
|
+
transition:
|
|
45
|
+
color,
|
|
46
|
+
background-color,
|
|
47
|
+
border-color 0.2s ease;
|
|
48
|
+
|
|
49
|
+
::placeholder {
|
|
50
|
+
color: ${({ disabled })=>disabled ? COLOR_NEUTRAL_LIGHT : COLOR_NEUTRAL_MEDIUM};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:hover,
|
|
54
|
+
&:active,
|
|
55
|
+
&:disabled,
|
|
56
|
+
&:focus {
|
|
57
|
+
outline: ${BORDER_WIDTH_NONE};
|
|
58
|
+
transition:
|
|
59
|
+
color,
|
|
60
|
+
background-color,
|
|
61
|
+
border-color 0.2s ease;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:not([disabled]):not(:active):not([open]) {
|
|
65
|
+
&:focus {
|
|
66
|
+
border-color: ${({ disabled, error, success })=>disabled && COLOR_NEUTRAL_LIGHT || error && COLOR_BRAND_LIGHT || success && COLOR_SUCCESS_MEDIUM || COLOR_NEUTRAL_DARK};
|
|
67
|
+
border-style: solid;
|
|
68
|
+
border-width: ${BORDER_WIDTH_THIN};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
const HelpText = styled_components("span")`
|
|
73
|
+
align-items: center;
|
|
74
|
+
color: ${({ disabled, error, success })=>disabled && COLOR_NEUTRAL_MEDIUM || error && COLOR_DANGER_MEDIUM || success && COLOR_SUCCESS_DARK || COLOR_NEUTRAL_DARK};
|
|
75
|
+
display: flex;
|
|
76
|
+
font-family: ${FONT_FAMILY_01};
|
|
77
|
+
font-weight: ${FONT_WEIGHT_MEDIUM};
|
|
78
|
+
font-size: ${FONT_SIZE_XS};
|
|
79
|
+
margin-top: 8px;
|
|
80
|
+
|
|
81
|
+
svg {
|
|
82
|
+
margin-right: ${SPACING_INLINE_01};
|
|
83
|
+
path {
|
|
84
|
+
stroke: ${({ error, success })=>error && COLOR_DANGER_MEDIUM || success && COLOR_SUCCESS_MEDIUM || COLOR_NEUTRAL_DARK};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
export { ContainerTextField, HelpText, Label, TextAreaControl, TextField };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { TooltipWrapper } from ".";
|
|
3
|
+
/**
|
|
4
|
+
* TooltipWrapper permite exibir tooltips personalizados quando o usuário passa o mouse sobre um elemento.
|
|
5
|
+
* O componente gerencia a visibilidade e a posição do tooltip de forma dinâmica.
|
|
6
|
+
*/
|
|
7
|
+
declare const meta: Meta<typeof TooltipWrapper>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
/**
|
|
11
|
+
* Variação padrão do Tooltip Wrapper com apenas propriedades essenciais
|
|
12
|
+
*/
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Variação do Tooltip usando Espaçamento personalizado.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Spacing: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Tooltip ainda incompleto, implementar funções de posiction e uma varição com tail
|
|
20
|
+
* posições a adicionar: top, top-right, top-left, bottom, bottom-right, bottom-left, rigth, right-top, right-bottom, left, left-top, left-bottom
|
|
21
|
+
*/
|