w-design-system 0.0.83 → 0.0.85
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/.storybook/main.ts +8 -5
- package/.storybook/preview.ts +4 -13
- package/dist/components/Banner/index.d.ts +1 -1
- package/dist/components/Banner/styles.d.ts +1 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/styles.d.ts +2 -2
- package/dist/components/Button/test.d.ts +0 -1
- package/dist/components/ButtonRadiusIcon/index.d.ts +1 -1
- package/dist/components/ButtonRadiusIcon/styles.d.ts +1 -1
- package/dist/components/ButtonRound/index.d.ts +1 -1
- package/dist/components/ButtonRound/styles.d.ts +1 -1
- package/dist/components/CardStories/index.d.ts +1 -1
- package/dist/components/CardStories/index.d.ts.map +1 -1
- package/dist/components/CardStories/stories.d.ts +2 -2
- package/dist/components/CountryStateSelector/index.d.ts +1 -2
- package/dist/components/DatePicker/index.d.ts +2 -7
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DateRangePicker/index.d.ts +1 -1
- package/dist/components/DateRangePicker/index.d.ts.map +1 -1
- package/dist/components/DateRangePicker/styles.d.ts +7 -7
- package/dist/components/EmptyState/index.d.ts +1 -1
- package/dist/components/EmptyState/index.d.ts.map +1 -1
- package/dist/components/EmptyState/stories.d.ts +1 -1
- package/dist/components/EmptyState/styles.d.ts +1 -1
- package/dist/components/IconWrapper/index.d.ts +1 -1
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/styles.d.ts +6 -6
- package/dist/components/InputTag/index.d.ts +1 -1
- package/dist/components/InputTag/index.d.ts.map +1 -1
- package/dist/components/InputTag/styles.d.ts +6 -6
- package/dist/components/Loading/index.d.ts +1 -1
- package/dist/components/Loading/stories.d.ts +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/styles.d.ts +2 -2
- package/dist/components/MultiSelect/index.d.ts +1 -1
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/Paginate/index.d.ts +1 -1
- package/dist/components/Paginate/index.d.ts.map +1 -1
- package/dist/components/Paginate/styles.d.ts +1 -1
- package/dist/components/Paragraph/index.d.ts +1 -1
- package/dist/components/Paragraph/stories.d.ts +1 -1
- package/dist/components/PortalSelect/index.d.ts +1 -1
- package/dist/components/PortalSelect/styles.d.ts +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/styles.d.ts +9 -9
- package/dist/components/Sidebar/SidebarGroup/index.d.ts +1 -2
- package/dist/components/Sidebar/SidebarGroup/index.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarGroup/styles.d.ts +3 -3
- package/dist/components/Sidebar/SidebarItem/index.d.ts +1 -1
- package/dist/components/Sidebar/SidebarItem/index.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarItem/styles.d.ts +2 -2
- package/dist/components/Sidebar/SidebarLogo/index.d.ts +1 -1
- package/dist/components/Sidebar/SidebarLogo/index.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarLogo/styles.d.ts +1 -1
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/styles.d.ts +4 -4
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/stories.d.ts +1 -1
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/Tabs/styles.d.ts +2 -2
- package/dist/components/Title/index.d.ts +1 -1
- package/dist/components/Title/stories.d.ts +1 -1
- package/dist/favicon.ico +0 -0
- package/dist/index.html +43 -0
- package/dist/logo192.png +0 -0
- package/dist/logo512.png +0 -0
- package/dist/manifest.json +25 -0
- package/dist/robots.txt +3 -0
- package/dist/setupTests.d.ts +0 -1
- package/dist/src/globalStyles.d.ts +1 -1
- package/dist/stories/Button.d.ts +1 -2
- package/dist/stories/Button.d.ts.map +1 -1
- package/dist/stories/Button.stories.d.ts +3 -3
- package/dist/stories/Header.d.ts +1 -2
- package/dist/stories/Header.d.ts.map +1 -1
- package/dist/stories/Header.stories.d.ts +5 -5
- package/dist/stories/Page.d.ts +1 -2
- package/dist/stories/Page.stories.d.ts +2 -2
- package/dist/w-design-system.es.js +4656 -0
- package/dist/w-design-system.umd.js +1412 -0
- package/eslint.config.ts +21 -0
- package/package.json +28 -45
- package/prettier.config.js +11 -0
- package/src/components/Input/index.tsx +3 -6
- package/src/components/InputTag/index.tsx +3 -5
- package/src/components/Select/styles.ts +1 -1
- package/tsconfig.json +5 -18
- package/vite.config.ts +31 -0
- package/.babelrc +0 -8
- package/dist/assets/icon/index.js +0 -41
- package/dist/assets/icon/index.js.map +0 -1
- package/dist/components/Banner/index.js +0 -44
- package/dist/components/Banner/index.js.map +0 -1
- package/dist/components/Banner/stories.js +0 -25
- package/dist/components/Banner/stories.js.map +0 -1
- package/dist/components/Banner/styles.js +0 -56
- package/dist/components/Banner/styles.js.map +0 -1
- package/dist/components/Button/index.js +0 -66
- package/dist/components/Button/index.js.map +0 -1
- package/dist/components/Button/stories.js +0 -88
- package/dist/components/Button/stories.js.map +0 -1
- package/dist/components/Button/styles.js +0 -217
- package/dist/components/Button/styles.js.map +0 -1
- package/dist/components/Button/test.js +0 -33
- package/dist/components/Button/test.js.map +0 -1
- package/dist/components/ButtonRadiusIcon/index.js +0 -25
- package/dist/components/ButtonRadiusIcon/index.js.map +0 -1
- package/dist/components/ButtonRadiusIcon/stories.js +0 -42
- package/dist/components/ButtonRadiusIcon/stories.js.map +0 -1
- package/dist/components/ButtonRadiusIcon/styles.js +0 -150
- package/dist/components/ButtonRadiusIcon/styles.js.map +0 -1
- package/dist/components/ButtonRound/index.js +0 -21
- package/dist/components/ButtonRound/index.js.map +0 -1
- package/dist/components/ButtonRound/stories.js +0 -43
- package/dist/components/ButtonRound/stories.js.map +0 -1
- package/dist/components/ButtonRound/styles.js +0 -134
- package/dist/components/ButtonRound/styles.js.map +0 -1
- package/dist/components/CardStories/index.js +0 -43
- package/dist/components/CardStories/index.js.map +0 -1
- package/dist/components/CardStories/stories.js +0 -35
- package/dist/components/CardStories/stories.js.map +0 -1
- package/dist/components/CountryStateSelector/index.js +0 -106
- package/dist/components/CountryStateSelector/index.js.map +0 -1
- package/dist/components/CountryStateSelector/stories.js +0 -46
- package/dist/components/CountryStateSelector/stories.js.map +0 -1
- package/dist/components/DatePicker/index.js +0 -22
- package/dist/components/DatePicker/index.js.map +0 -1
- package/dist/components/DatePicker/stories.js +0 -61
- package/dist/components/DatePicker/stories.js.map +0 -1
- package/dist/components/DateRangePicker/index.js +0 -187
- package/dist/components/DateRangePicker/index.js.map +0 -1
- package/dist/components/DateRangePicker/stories.js +0 -65
- package/dist/components/DateRangePicker/stories.js.map +0 -1
- package/dist/components/DateRangePicker/styles.js +0 -122
- package/dist/components/DateRangePicker/styles.js.map +0 -1
- package/dist/components/EmptyState/index.js +0 -14
- package/dist/components/EmptyState/index.js.map +0 -1
- package/dist/components/EmptyState/stories.js +0 -31
- package/dist/components/EmptyState/stories.js.map +0 -1
- package/dist/components/EmptyState/styles.js +0 -29
- package/dist/components/EmptyState/styles.js.map +0 -1
- package/dist/components/IconWrapper/index.js +0 -34
- package/dist/components/IconWrapper/index.js.map +0 -1
- package/dist/components/Input/index.js +0 -91
- package/dist/components/Input/index.js.map +0 -1
- package/dist/components/Input/stories.js +0 -55
- package/dist/components/Input/stories.js.map +0 -1
- package/dist/components/Input/styles.js +0 -86
- package/dist/components/Input/styles.js.map +0 -1
- package/dist/components/InputTag/index.js +0 -124
- package/dist/components/InputTag/index.js.map +0 -1
- package/dist/components/InputTag/stories.js +0 -25
- package/dist/components/InputTag/stories.js.map +0 -1
- package/dist/components/InputTag/styles.js +0 -146
- package/dist/components/InputTag/styles.js.map +0 -1
- package/dist/components/Loading/index.js +0 -50
- package/dist/components/Loading/index.js.map +0 -1
- package/dist/components/Loading/stories.js +0 -46
- package/dist/components/Loading/stories.js.map +0 -1
- package/dist/components/Modal/index.js +0 -31
- package/dist/components/Modal/index.js.map +0 -1
- package/dist/components/Modal/stories.js +0 -24
- package/dist/components/Modal/stories.js.map +0 -1
- package/dist/components/Modal/styles.js +0 -48
- package/dist/components/Modal/styles.js.map +0 -1
- package/dist/components/MultiSelect/index.js +0 -284
- package/dist/components/MultiSelect/index.js.map +0 -1
- package/dist/components/MultiSelect/stories.js +0 -39
- package/dist/components/MultiSelect/stories.js.map +0 -1
- package/dist/components/MultiSelect/styles.d.ts +0 -14
- package/dist/components/MultiSelect/styles.d.ts.map +0 -1
- package/dist/components/MultiSelect/styles.js +0 -66
- package/dist/components/MultiSelect/styles.js.map +0 -1
- package/dist/components/Paginate/index.js +0 -63
- package/dist/components/Paginate/index.js.map +0 -1
- package/dist/components/Paginate/stories.js +0 -44
- package/dist/components/Paginate/stories.js.map +0 -1
- package/dist/components/Paginate/styles.js +0 -64
- package/dist/components/Paginate/styles.js.map +0 -1
- package/dist/components/Paragraph/index.js +0 -51
- package/dist/components/Paragraph/index.js.map +0 -1
- package/dist/components/Paragraph/stories.js +0 -113
- package/dist/components/Paragraph/stories.js.map +0 -1
- package/dist/components/PortalSelect/index.js +0 -141
- package/dist/components/PortalSelect/index.js.map +0 -1
- package/dist/components/PortalSelect/stories.js +0 -82
- package/dist/components/PortalSelect/stories.js.map +0 -1
- package/dist/components/PortalSelect/styles.js +0 -9
- package/dist/components/PortalSelect/styles.js.map +0 -1
- package/dist/components/Select/index.js +0 -260
- package/dist/components/Select/index.js.map +0 -1
- package/dist/components/Select/stories.js +0 -40
- package/dist/components/Select/stories.js.map +0 -1
- package/dist/components/Select/styles.js +0 -90
- package/dist/components/Select/styles.js.map +0 -1
- package/dist/components/Sidebar/SidebarGroup/index.js +0 -42
- package/dist/components/Sidebar/SidebarGroup/index.js.map +0 -1
- package/dist/components/Sidebar/SidebarGroup/styles.js +0 -68
- package/dist/components/Sidebar/SidebarGroup/styles.js.map +0 -1
- package/dist/components/Sidebar/SidebarItem/index.js +0 -26
- package/dist/components/Sidebar/SidebarItem/index.js.map +0 -1
- package/dist/components/Sidebar/SidebarItem/styles.js +0 -64
- package/dist/components/Sidebar/SidebarItem/styles.js.map +0 -1
- package/dist/components/Sidebar/SidebarLogo/index.js +0 -12
- package/dist/components/Sidebar/SidebarLogo/index.js.map +0 -1
- package/dist/components/Sidebar/SidebarLogo/styles.js +0 -48
- package/dist/components/Sidebar/SidebarLogo/styles.js.map +0 -1
- package/dist/components/Sidebar/index.js +0 -45
- package/dist/components/Sidebar/index.js.map +0 -1
- package/dist/components/Sidebar/stories.js +0 -94
- package/dist/components/Sidebar/stories.js.map +0 -1
- package/dist/components/Sidebar/styles.js +0 -73
- package/dist/components/Sidebar/styles.js.map +0 -1
- package/dist/components/Table/index.js +0 -95
- package/dist/components/Table/index.js.map +0 -1
- package/dist/components/Table/stories.js +0 -163
- package/dist/components/Table/stories.js.map +0 -1
- package/dist/components/Table/styles.js +0 -2
- package/dist/components/Table/styles.js.map +0 -1
- package/dist/components/Tabs/index.js +0 -13
- package/dist/components/Tabs/index.js.map +0 -1
- package/dist/components/Tabs/stories.js +0 -31
- package/dist/components/Tabs/stories.js.map +0 -1
- package/dist/components/Tabs/styles.js +0 -22
- package/dist/components/Tabs/styles.js.map +0 -1
- package/dist/components/Themes/index.js +0 -88
- package/dist/components/Themes/index.js.map +0 -1
- package/dist/components/Title/index.js +0 -17
- package/dist/components/Title/index.js.map +0 -1
- package/dist/components/Title/stories.js +0 -61
- package/dist/components/Title/stories.js.map +0 -1
- package/dist/components/Types/index.js +0 -2
- package/dist/components/Types/index.js.map +0 -1
- package/dist/components/index.js +0 -16
- package/dist/components/index.js.map +0 -1
- package/dist/index.js +0 -25
- package/dist/index.js.map +0 -1
- package/dist/prettier.config.js +0 -13
- package/dist/prettier.config.js.map +0 -1
- package/dist/reportWebVitals.d.ts +0 -4
- package/dist/reportWebVitals.d.ts.map +0 -1
- package/dist/reportWebVitals.js +0 -14
- package/dist/reportWebVitals.js.map +0 -1
- package/dist/setupTests.js +0 -6
- package/dist/setupTests.js.map +0 -1
- package/dist/src/globalStyles.js +0 -15
- package/dist/src/globalStyles.js.map +0 -1
- package/dist/stories/Button.js +0 -22
- package/dist/stories/Button.js.map +0 -1
- package/dist/stories/Button.stories.js +0 -45
- package/dist/stories/Button.stories.js.map +0 -1
- package/dist/stories/Header.js +0 -21
- package/dist/stories/Header.js.map +0 -1
- package/dist/stories/Header.stories.js +0 -27
- package/dist/stories/Header.stories.js.map +0 -1
- package/dist/stories/Page.js +0 -38
- package/dist/stories/Page.js.map +0 -1
- package/dist/stories/Page.stories.js +0 -34
- package/dist/stories/Page.stories.js.map +0 -1
- package/dist/utils/constanst.js +0 -3
- package/dist/utils/constanst.js.map +0 -1
- package/src/reportWebVitals.ts +0 -16
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import { theme } from '../Themes';
|
|
3
|
-
const { colors } = theme;
|
|
4
|
-
const buttonRadiusWrapperIconStyles = (color) => css `
|
|
5
|
-
.buttonRadiusWrapperIcon {
|
|
6
|
-
svg {
|
|
7
|
-
fill: ${color};
|
|
8
|
-
path {
|
|
9
|
-
fill: ${color};
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
.buttonRoundBadge {
|
|
14
|
-
background: ${color};
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
const colorScheme = {
|
|
18
|
-
primary: css `
|
|
19
|
-
background: ${colors.shade10};
|
|
20
|
-
${buttonRadiusWrapperIconStyles(colors.shade30)}
|
|
21
|
-
&:hover {
|
|
22
|
-
background-color: ${colors.shade20};
|
|
23
|
-
${buttonRadiusWrapperIconStyles(colors.cyan40)};
|
|
24
|
-
}
|
|
25
|
-
&:active {
|
|
26
|
-
background-color: ${colors.shade10};
|
|
27
|
-
${buttonRadiusWrapperIconStyles(colors.shade30)};
|
|
28
|
-
}
|
|
29
|
-
`,
|
|
30
|
-
secondary: css `
|
|
31
|
-
background: ${colors.cyan10};
|
|
32
|
-
&:hover {
|
|
33
|
-
background-color: ${colors.cyan10};
|
|
34
|
-
${buttonRadiusWrapperIconStyles(colors.cyan30)}
|
|
35
|
-
}
|
|
36
|
-
&:active {
|
|
37
|
-
background-color: ${colors.cyan10};
|
|
38
|
-
}
|
|
39
|
-
${buttonRadiusWrapperIconStyles(colors.cyan40)};
|
|
40
|
-
`,
|
|
41
|
-
danger: css `
|
|
42
|
-
background: ${colors.red10};
|
|
43
|
-
&:hover {
|
|
44
|
-
background-color: ${colors.red20};
|
|
45
|
-
}
|
|
46
|
-
&:active {
|
|
47
|
-
background-color: ${colors.red10};
|
|
48
|
-
}
|
|
49
|
-
${buttonRadiusWrapperIconStyles(colors.red40)};
|
|
50
|
-
`,
|
|
51
|
-
warning: css `
|
|
52
|
-
background: ${colors.honey10};
|
|
53
|
-
color: ${colors.honey30};
|
|
54
|
-
&:hover {
|
|
55
|
-
background-color: ${colors.honey20};
|
|
56
|
-
}
|
|
57
|
-
&:active {
|
|
58
|
-
background-color: ${colors.honey10};
|
|
59
|
-
}
|
|
60
|
-
${buttonRadiusWrapperIconStyles(colors.honey30)};
|
|
61
|
-
`,
|
|
62
|
-
success: css `
|
|
63
|
-
background: ${colors.mint10};
|
|
64
|
-
&:hover {
|
|
65
|
-
background-color: ${colors.mint20};
|
|
66
|
-
}
|
|
67
|
-
&:active {
|
|
68
|
-
background-color: ${colors.mint10};
|
|
69
|
-
}
|
|
70
|
-
${buttonRadiusWrapperIconStyles(colors.mint40)};
|
|
71
|
-
`,
|
|
72
|
-
gray: css `
|
|
73
|
-
background: ${colors.shade10};
|
|
74
|
-
&:hover {
|
|
75
|
-
background-color: ${colors.shade20};
|
|
76
|
-
}
|
|
77
|
-
&:active {
|
|
78
|
-
background-color: ${colors.shade10};
|
|
79
|
-
}
|
|
80
|
-
${buttonRadiusWrapperIconStyles(colors.shade40)};
|
|
81
|
-
`,
|
|
82
|
-
yellow: css `
|
|
83
|
-
background: ${colors.yellow10};
|
|
84
|
-
&:hover {
|
|
85
|
-
background-color: ${colors.yellow20};
|
|
86
|
-
}
|
|
87
|
-
&:active {
|
|
88
|
-
background-color: ${colors.yellow10};
|
|
89
|
-
}
|
|
90
|
-
${buttonRadiusWrapperIconStyles(colors.yellow30)};
|
|
91
|
-
`,
|
|
92
|
-
};
|
|
93
|
-
export const ButtonStyled = styled.button `
|
|
94
|
-
display: inline-flex;
|
|
95
|
-
align-items: center;
|
|
96
|
-
justify-content: center;
|
|
97
|
-
box-sizing: border-box;
|
|
98
|
-
height: ${({ size }) => (size === 'small' ? '32px' : '40px')};
|
|
99
|
-
width: ${({ size }) => (size === 'small' ? '32px' : '40px')};
|
|
100
|
-
font-size: 16px;
|
|
101
|
-
font-weight: 600;
|
|
102
|
-
line-height: 140%;
|
|
103
|
-
border: none;
|
|
104
|
-
border-radius: 100%;
|
|
105
|
-
font-family: 'Nunito Sans', sans-serif;
|
|
106
|
-
transition:
|
|
107
|
-
color 0.3s,
|
|
108
|
-
background-color 0.3s,
|
|
109
|
-
opacity 0.3s;
|
|
110
|
-
color: white;
|
|
111
|
-
gap: ${({ size }) => (size === 'small' ? '8' : '12px')};
|
|
112
|
-
cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
|
|
113
|
-
opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};
|
|
114
|
-
${({ variant = 'primary', outline }) => colorScheme[variant]};
|
|
115
|
-
|
|
116
|
-
.buttonRadiusWrapperIcon {
|
|
117
|
-
margin-top: 4px;
|
|
118
|
-
}
|
|
119
|
-
.buttonRoundBadge {
|
|
120
|
-
box-sizing: border-box;
|
|
121
|
-
margin-bottom: 24px;
|
|
122
|
-
margin-left: 54px;
|
|
123
|
-
position: absolute;
|
|
124
|
-
width: ${({ size }) => (size === 'small' ? '16px' : '26px')};
|
|
125
|
-
height: ${({ size }) => (size === 'small' ? '16px' : '26px')};
|
|
126
|
-
border-radius: 100%;
|
|
127
|
-
font-size: 12px;
|
|
128
|
-
display: flex;
|
|
129
|
-
justify-content: center;
|
|
130
|
-
align-items: center;
|
|
131
|
-
border: 2px solid;
|
|
132
|
-
}
|
|
133
|
-
`;
|
|
134
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/ButtonRound/styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAGjC,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAA;AACxB,MAAM,6BAA6B,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,GAAG,CAAA;;;cAG9C,KAAK;;gBAEH,KAAK;;;;;kBAKH,KAAK;;CAEtB,CAAA;AACD,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,GAAG,CAAA;kBACI,MAAM,CAAC,OAAO;MAC1B,6BAA6B,CAAC,MAAM,CAAC,OAAO,CAAC;;0BAEzB,MAAM,CAAC,OAAO;QAChC,6BAA6B,CAAC,MAAM,CAAC,MAAM,CAAC;;;0BAG1B,MAAM,CAAC,OAAO;QAChC,6BAA6B,CAAC,MAAM,CAAC,OAAO,CAAC;;GAElD;IACD,SAAS,EAAE,GAAG,CAAA;kBACE,MAAM,CAAC,MAAM;;0BAEL,MAAM,CAAC,MAAM;QAC/B,6BAA6B,CAAC,MAAM,CAAC,MAAM,CAAC;;;0BAG1B,MAAM,CAAC,MAAM;;MAEjC,6BAA6B,CAAC,MAAM,CAAC,MAAM,CAAC;GAC/C;IACD,MAAM,EAAE,GAAG,CAAA;kBACK,MAAM,CAAC,KAAK;;0BAEJ,MAAM,CAAC,KAAK;;;0BAGZ,MAAM,CAAC,KAAK;;MAEhC,6BAA6B,CAAC,MAAM,CAAC,KAAK,CAAC;GAC9C;IACD,OAAO,EAAE,GAAG,CAAA;kBAC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AC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC,EAAE,OAAO,GAAG,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;;;;;;;;;aAUjD,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;cACjD,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;;;;CAQ/D,CAAA"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { Paragraph } from '../Paragraph';
|
|
4
|
-
import { theme } from '../Themes';
|
|
5
|
-
const ContainerCardStories = styled.div `
|
|
6
|
-
min-height: 300px;
|
|
7
|
-
min-width: 200px;
|
|
8
|
-
height: auto;
|
|
9
|
-
width: auto;
|
|
10
|
-
border: 1px solid #e0e0e0;
|
|
11
|
-
border-radius: 8px;
|
|
12
|
-
display: flex;
|
|
13
|
-
justify-content: space-between;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
`;
|
|
16
|
-
const Wrapper = styled.div `
|
|
17
|
-
padding: 16px;
|
|
18
|
-
display: flex;
|
|
19
|
-
min-height: 240px;
|
|
20
|
-
min-width: 200px;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
align-items: center;
|
|
23
|
-
flex-wrap: wrap;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
`;
|
|
26
|
-
const WrapperFooter = styled.div `
|
|
27
|
-
height: 50px;
|
|
28
|
-
width: 100%;
|
|
29
|
-
display: flex;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
align-items: center;
|
|
32
|
-
border-top: 1px solid #e0e0e0;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
`;
|
|
35
|
-
const CardStories = ({ title, subTitle, children }) => {
|
|
36
|
-
return (React.createElement(ContainerCardStories, null,
|
|
37
|
-
React.createElement(Wrapper, null, children),
|
|
38
|
-
React.createElement(WrapperFooter, null,
|
|
39
|
-
React.createElement(Paragraph, { color: theme.colors.shade50, heavyBod: true }, title),
|
|
40
|
-
React.createElement(Paragraph, { size: 'x-small', color: theme.colors.shade30 }, subTitle))));
|
|
41
|
-
};
|
|
42
|
-
export default CardStories;
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CardStories/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAqB,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAEjC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;CAUtC,CAAA;AAED,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;CASzB,CAAA;AACD,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQ/B,CAAA;AAOD,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAoB,EAAE,EAAE;IACtE,OAAO,CACL,oBAAC,oBAAoB;QACnB,oBAAC,OAAO,QAAE,QAAQ,CAAW;QAC7B,oBAAC,aAAa;YACZ,oBAAC,SAAS,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,UAC7C,KAAK,CACI;YACZ,oBAAC,SAAS,IAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,IACpD,QAAQ,CACC,CACE,CACK,CACxB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import CardStories from './index';
|
|
2
|
-
import { Paragraph } from '../Paragraph';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Components/CardStories',
|
|
6
|
-
component: CardStories,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
export const Default = {
|
|
14
|
-
args: {
|
|
15
|
-
title: 'Default Title',
|
|
16
|
-
subTitle: 'Default Subtitle',
|
|
17
|
-
children: 'This is the default content.',
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
export const WithCustomContent = {
|
|
21
|
-
args: {
|
|
22
|
-
title: 'Custom Title',
|
|
23
|
-
subTitle: 'Custom Subtitle',
|
|
24
|
-
children: (React.createElement(React.Fragment, null,
|
|
25
|
-
React.createElement(Paragraph, null, "This is custom content."),
|
|
26
|
-
React.createElement(Paragraph, { size: "small" }, "Additional custom content."))),
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
export const WithoutSubtitle = {
|
|
30
|
-
args: {
|
|
31
|
-
title: 'Title Only',
|
|
32
|
-
children: React.createElement(Paragraph, null, "This card has no subtitle."),
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../src/components/CardStories/stories.tsx"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,IAAI,GAA6B;IACrC,KAAK,EAAE,wBAAwB;IAC/B,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE;QACV,MAAM,EAAE,UAAU;KACnB;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;CACgB,CAAA;AAEpC,eAAe,IAAI,CAAA;AAGnB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,KAAK,EAAE,eAAe;QACtB,QAAQ,EAAE,kBAAkB;QAC5B,QAAQ,EAAE,8BAA8B;KACzC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAU;IACtC,IAAI,EAAE;QACJ,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE,CACR;YACE,oBAAC,SAAS,kCAAoC;YAC9C,oBAAC,SAAS,IAAC,IAAI,EAAC,OAAO,iCAAuC,CAC7D,CACJ;KACF;CACF,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAU;IACpC,IAAI,EAAE;QACJ,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,oBAAC,SAAS,qCAAuC;KAC5D;CACF,CAAA"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { useMemo, forwardRef } from 'react';
|
|
13
|
-
import { Select } from '../Select';
|
|
14
|
-
import React from 'react';
|
|
15
|
-
const CountryStateSelectFowardRef = (_a, ref) => {
|
|
16
|
-
var _b;
|
|
17
|
-
var { children, allStatesOption, selectedOption, selectedOptionAbbreviation, validStates } = _a, props = __rest(_a, ["children", "allStatesOption", "selectedOption", "selectedOptionAbbreviation", "validStates"]);
|
|
18
|
-
const allStatesOptionValue = allStatesOption !== false;
|
|
19
|
-
const allCountryStates = useMemo(() => [
|
|
20
|
-
{ id: 1, name: 'Acre', abbreviation: 'AC' },
|
|
21
|
-
{ id: 2, name: 'Alagoas', abbreviation: 'AL' },
|
|
22
|
-
{ id: 3, name: 'Amapá', abbreviation: 'AP' },
|
|
23
|
-
{ id: 4, name: 'Amazonas', abbreviation: 'AM' },
|
|
24
|
-
{ id: 5, name: 'Bahia', abbreviation: 'BA' },
|
|
25
|
-
{ id: 6, name: 'Ceará', abbreviation: 'CE' },
|
|
26
|
-
{ id: 7, name: 'Espírito Santo', abbreviation: 'ES' },
|
|
27
|
-
{ id: 8, name: 'Goiás', abbreviation: 'GO' },
|
|
28
|
-
{ id: 9, name: 'Maranhão', abbreviation: 'MA' },
|
|
29
|
-
{ id: 10, name: 'Mato Grosso', abbreviation: 'MT' },
|
|
30
|
-
{ id: 11, name: 'Mato Grosso do Sul', abbreviation: 'MS' },
|
|
31
|
-
{ id: 12, name: 'Minas Gerais', abbreviation: 'MG' },
|
|
32
|
-
{ id: 13, name: 'Pará', abbreviation: 'PA' },
|
|
33
|
-
{ id: 14, name: 'Paraíba', abbreviation: 'PB' },
|
|
34
|
-
{ id: 15, name: 'Paraná', abbreviation: 'PR' },
|
|
35
|
-
{ id: 16, name: 'Pernambuco', abbreviation: 'PE' },
|
|
36
|
-
{ id: 17, name: 'Piauí', abbreviation: 'PI' },
|
|
37
|
-
{ id: 18, name: 'Rio de Janeiro', abbreviation: 'RJ' },
|
|
38
|
-
{ id: 19, name: 'Rio Grande do Norte', abbreviation: 'RN' },
|
|
39
|
-
{ id: 20, name: 'Rio Grande do Sul', abbreviation: 'RS' },
|
|
40
|
-
{ id: 21, name: 'Rondônia', abbreviation: 'RO' },
|
|
41
|
-
{ id: 22, name: 'Roraima', abbreviation: 'RR' },
|
|
42
|
-
{ id: 23, name: 'Santa Catarina', abbreviation: 'SC' },
|
|
43
|
-
{ id: 24, name: 'São Paulo', abbreviation: 'SP' },
|
|
44
|
-
{ id: 25, name: 'Sergipe', abbreviation: 'SE' },
|
|
45
|
-
{ id: 26, name: 'Tocantins', abbreviation: 'TO' },
|
|
46
|
-
{ id: 27, name: 'Distrito Federal', abbreviation: 'DF' },
|
|
47
|
-
], []);
|
|
48
|
-
const countryStates = useMemo(() => {
|
|
49
|
-
if (!validStates)
|
|
50
|
-
return allCountryStates;
|
|
51
|
-
return allCountryStates.filter(state => validStates.includes(state.abbreviation));
|
|
52
|
-
}, [validStates, allCountryStates]);
|
|
53
|
-
const countrysStateOptions = useMemo(() => {
|
|
54
|
-
return allStatesOptionValue
|
|
55
|
-
? [{ id: 0, name: 'Todos os estados', abbreviation: 'BR' }, ...countryStates]
|
|
56
|
-
: countryStates;
|
|
57
|
-
}, [allStatesOptionValue, countryStates]);
|
|
58
|
-
const selectedOptionAbbreviationMap = useMemo(() => {
|
|
59
|
-
return new Map(countrysStateOptions.map((option) => [option.abbreviation, option]));
|
|
60
|
-
}, [countrysStateOptions]);
|
|
61
|
-
const selectedOptionValue = useMemo(() => {
|
|
62
|
-
if (selectedOption) {
|
|
63
|
-
return {
|
|
64
|
-
id: selectedOption.id,
|
|
65
|
-
text: selectedOption.name,
|
|
66
|
-
countryState: selectedOption,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
if (selectedOptionAbbreviation) {
|
|
70
|
-
const selectedOptionMap = selectedOptionAbbreviationMap.get(selectedOptionAbbreviation);
|
|
71
|
-
if (selectedOptionMap) {
|
|
72
|
-
return {
|
|
73
|
-
id: selectedOptionMap.id,
|
|
74
|
-
text: selectedOptionMap.name,
|
|
75
|
-
countryState: selectedOptionMap,
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return null;
|
|
80
|
-
}, [selectedOption, selectedOptionAbbreviation, selectedOptionAbbreviationMap]);
|
|
81
|
-
const selectProps = Object.assign(Object.assign({}, props), { placeholder: (_b = props.placeholder) !== null && _b !== void 0 ? _b : 'Estado', options: countrysStateOptions.map(countryState => {
|
|
82
|
-
return {
|
|
83
|
-
id: countryState.id,
|
|
84
|
-
text: countryState.name,
|
|
85
|
-
countryState,
|
|
86
|
-
};
|
|
87
|
-
}), onOptionChange: option => {
|
|
88
|
-
var _a;
|
|
89
|
-
if (props.onOptionChange) {
|
|
90
|
-
if (allStatesOption && !option) {
|
|
91
|
-
props.onOptionChange({
|
|
92
|
-
id: 0,
|
|
93
|
-
name: 'Todos os estados',
|
|
94
|
-
abbreviation: 'BR',
|
|
95
|
-
});
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
props.onOptionChange((_a = option === null || option === void 0 ? void 0 : option.countryState) !== null && _a !== void 0 ? _a : null);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}, selectedOption: selectedOptionValue });
|
|
103
|
-
return (React.createElement(Select, Object.assign({}, selectProps, { ref: ref }), children));
|
|
104
|
-
};
|
|
105
|
-
export const CountryStateSelect = forwardRef(CountryStateSelectFowardRef);
|
|
106
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CountryStateSelector/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAgD,UAAU,EAAE,MAAM,OAAO,CAAA;AACzF,OAAO,EAAE,MAAM,EAA0B,MAAM,WAAW,CAAA;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAA;AA6BzB,MAAM,2BAA2B,GAAG,CAClC,EAO6C,EAC7C,GAAkC,EAClC,EAAE;;QATF,EACE,QAAQ,EACR,eAAe,EACf,cAAc,EACd,0BAA0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) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { CountryStateSelect } from './index';
|
|
13
|
-
import React from 'react';
|
|
14
|
-
const meta = {
|
|
15
|
-
title: 'Components/CountryStateSelect',
|
|
16
|
-
component: CountryStateSelect,
|
|
17
|
-
tags: ['autodocs'],
|
|
18
|
-
argTypes: {
|
|
19
|
-
placeholder: { control: 'text' },
|
|
20
|
-
label: { control: 'text' },
|
|
21
|
-
disabled: { control: 'boolean' },
|
|
22
|
-
selectedOption: { control: 'number' },
|
|
23
|
-
onOptionChange: { action: 'selectedOptionChange' },
|
|
24
|
-
dropDownTop: { control: 'boolean' },
|
|
25
|
-
allStatesOption: { control: 'boolean' },
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
export default meta;
|
|
29
|
-
const ComponentWrapper = (_a) => {
|
|
30
|
-
var args = __rest(_a, []);
|
|
31
|
-
const [selectedOption, setSelectOption] = React.useState(null);
|
|
32
|
-
return (React.createElement(CountryStateSelect, Object.assign({}, args, { selectedOption: selectedOption, onOptionChange: option => setSelectOption(option) })));
|
|
33
|
-
};
|
|
34
|
-
export const Default = {
|
|
35
|
-
render: args => (React.createElement(ComponentWrapper, Object.assign({}, args, { label: "Label", placeholder: "Placeholder" }))),
|
|
36
|
-
};
|
|
37
|
-
export const OnlySudesteRegion = {
|
|
38
|
-
render: args => (React.createElement(ComponentWrapper, Object.assign({}, args, { label: "Label", placeholder: "Placeholder", validStates: ['SP', 'RJ', 'MG', 'ES'] }))),
|
|
39
|
-
};
|
|
40
|
-
export const OnlySulRegion = {
|
|
41
|
-
render: args => (React.createElement(ComponentWrapper, Object.assign({}, args, { label: "Label", placeholder: "Placeholder", validStates: ['PR', 'SC', 'RS'] }))),
|
|
42
|
-
};
|
|
43
|
-
export const OnlySulRegionWithoutAllOption = {
|
|
44
|
-
render: args => (React.createElement(ComponentWrapper, Object.assign({}, args, { label: "Label", placeholder: "Placeholder", validStates: ['PR', 'SC', 'RS'], allStatesOption: false }))),
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../src/components/CountryStateSelector/stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,kBAAkB,EAA2B,MAAM,SAAS,CAAA;AACrE,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,IAAI,GAAoC;IAC5C,KAAK,EAAE,+BAA+B;IACtC,SAAS,EAAE,kBAAkB;IAC7B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,QAAQ,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QAChC,cAAc,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,sBAAsB,EAAE;QAClD,WAAW,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;QACnC,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;KACxC;CACwC,CAAA;AAE3C,eAAe,IAAI,CAAA;AAInB,MAAM,gBAAgB,GAAG,CAAC,EAAoC,EAAE,EAAE;QAAnC,IAAI,cAAT,EAAW,CAAF;IACjC,MAAM,CAAC,cAAc,EAAE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) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import { DateRangePicker } from '../DateRangePicker';
|
|
14
|
-
export const DatePicker = (_a) => {
|
|
15
|
-
var { onSelectedCustomDate, customDate } = _a, props = __rest(_a, ["onSelectedCustomDate", "customDate"]);
|
|
16
|
-
const onRangeSelected = (start) => {
|
|
17
|
-
if (onSelectedCustomDate)
|
|
18
|
-
onSelectedCustomDate(start);
|
|
19
|
-
};
|
|
20
|
-
return (React.createElement(DateRangePicker, Object.assign({}, props, { isRange: false, onSelectedCustomRange: onRangeSelected, startCustomDate: customDate, endCustomDate: customDate })));
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DatePicker/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAyB,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAwB,MAAM,oBAAoB,CAAA;AAkB1E,MAAM,CAAC,MAAM,UAAU,GAAG,CAExB,EAImB,EAAE,EAAE;QAJvB,EACA,oBAAoB,EACpB,UAAU,OAES,EADhB,KAAK,cAHR,sCAID,CADS;IAER,MAAM,eAAe,GAAG,CAAC,KAAkB,EAAE,EAAE;QAC7C,IAAI,oBAAoB;YAAE,oBAAoB,CAAC,KAAK,CAAC,CAAA;IACvD,CAAC,CAAA;IACD,OAAO,CACL,oBAAC,eAAe,oBACV,KAAK,IACT,OAAO,EAAE,KAAK,EACd,qBAAqB,EAAE,eAAe,EACtC,eAAe,EAAE,UAAU,EAC3B,aAAa,EAAE,UAAU,IACzB,CACH,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { DatePicker } from './index';
|
|
13
|
-
import React from 'react';
|
|
14
|
-
const meta = {
|
|
15
|
-
title: 'Components/DatePicker',
|
|
16
|
-
component: DatePicker,
|
|
17
|
-
tags: ['autodocs'],
|
|
18
|
-
argTypes: {
|
|
19
|
-
placeholder: { control: 'text' },
|
|
20
|
-
label: { control: 'text' },
|
|
21
|
-
readonly: { control: 'boolean' },
|
|
22
|
-
disabled: { control: 'boolean' },
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
export default meta;
|
|
26
|
-
const ComponentWrapper = (_a) => {
|
|
27
|
-
var { defaultOptions } = _a, args = __rest(_a, ["defaultOptions"]);
|
|
28
|
-
const [selectedOption, setSelectOption] = React.useState(null);
|
|
29
|
-
const [customDate, setCustomDate] = React.useState(null);
|
|
30
|
-
const onSelectedOptionChange = (option) => {
|
|
31
|
-
setSelectOption(option);
|
|
32
|
-
if (option == null) {
|
|
33
|
-
setCustomDate(null);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const date = new Date();
|
|
37
|
-
date.setDate(date.getDate() + (option === null || option === void 0 ? void 0 : option.id));
|
|
38
|
-
setCustomDate(date);
|
|
39
|
-
};
|
|
40
|
-
return (React.createElement(DatePicker, Object.assign({ selectedOption: selectedOption, customDate: customDate, onSelectedOptionChange: onSelectedOptionChange, onSelectedCustomDate: date => setCustomDate(date), options: defaultOptions !== null && defaultOptions !== void 0 ? defaultOptions : [
|
|
41
|
-
{
|
|
42
|
-
text: 'Ontem',
|
|
43
|
-
id: -1,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
text: 'Hoje',
|
|
47
|
-
id: 0,
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
text: 'Amanhã',
|
|
51
|
-
id: 1,
|
|
52
|
-
},
|
|
53
|
-
] }, args)));
|
|
54
|
-
};
|
|
55
|
-
export const SelecionarDataDeDatas = {
|
|
56
|
-
render: args => React.createElement(ComponentWrapper, { label: "Data da Disputa", placeholder: "Placeholder" }),
|
|
57
|
-
};
|
|
58
|
-
export const SelecionarDatasSimples = {
|
|
59
|
-
render: args => React.createElement(ComponentWrapper, { defaultOptions: [] }),
|
|
60
|
-
};
|
|
61
|
-
//# sourceMappingURL=stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../src/components/DatePicker/stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAmB,MAAM,SAAS,CAAA;AACrD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,IAAI,GAA4B;IACpC,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,WAAW,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,QAAQ,EAAE,EA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