norma-library 0.6.86 → 0.6.88
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 +7 -0
- package/dist/esm/components/Box/interfaces.d.ts +1 -0
- package/dist/esm/components/Breadcrumb/index.d.ts +2 -2
- package/dist/esm/components/Breadcrumb/index.js +13 -9
- package/dist/esm/components/Breadcrumb/index.js.map +1 -1
- package/dist/esm/components/Breadcrumb/interface.d.ts +11 -6
- package/dist/esm/components/Breadcrumb/styles.d.ts +3 -3
- package/dist/esm/components/Breadcrumb/styles.js +3 -3
- package/dist/esm/components/Breadcrumb/styles.js.map +1 -1
- package/dist/esm/components/ProductCard/ProductCard.js +7 -5
- package/dist/esm/components/ProductCard/ProductCard.js.map +1 -1
- package/dist/esm/components/ProductCard/ProductCard.style.js +1 -1
- package/dist/esm/components/ProductCard/ProductCard.style.js.map +1 -1
- package/dist/esm/components/Typography/Text/interfaces.d.ts +1 -0
- package/dist/esm/components/Typography/Title/interfaces.d.ts +1 -0
- package/dist/esm/hooks/useClickOutside.d.ts +1 -1
- package/dist/esm/hooks/useClickOutside.js.map +1 -1
- package/dist/esm/interfaces/ProductCard.d.ts +1 -1
- package/package.json +24 -24
- package/src/components/Box/interfaces.ts +2 -0
- package/src/components/Breadcrumb/index.tsx +16 -11
- package/src/components/Breadcrumb/interface.ts +12 -6
- package/src/components/Breadcrumb/styles.tsx +10 -11
- package/src/components/ProductCard/ProductCard.style.ts +0 -1
- package/src/components/ProductCard/ProductCard.tsx +6 -5
- package/src/components/Typography/Text/interfaces.ts +3 -1
- package/src/components/Typography/Title/interfaces.ts +2 -0
- package/src/hooks/useClickOutside.tsx +1 -1
- package/src/interfaces/ProductCard.ts +1 -1
- package/src/stories/Accordion.stories.tsx +19 -19
- package/src/stories/Avatar.stories.tsx +32 -28
- package/src/stories/Badge.stories.tsx +17 -15
- package/src/stories/Box.stories.tsx +16 -12
- package/src/stories/Breadcrumb.stories.tsx +62 -18
- package/src/stories/Button.stories.tsx +24 -16
- package/src/stories/Card.stories.tsx +21 -13
- package/src/stories/ChatMessage.stories.tsx +10 -9
- package/src/stories/ChatMessageBalloon.stories.tsx +83 -66
- package/src/stories/CheckBox.stories.tsx +23 -23
- package/src/stories/DateInput.stories.tsx +15 -16
- package/src/stories/DatePicker.stories.tsx +17 -12
- package/src/stories/DropDown.stories.tsx +16 -16
- package/src/stories/IconButton.stories.tsx +45 -21
- package/src/stories/Modal.stories.tsx +49 -49
- package/src/stories/ModalStatus.stories.tsx +34 -18
- package/src/stories/MultiSelectInput.stories.tsx +30 -28
- package/src/stories/NormaChatMessageBalloon.stories.tsx +119 -82
- package/src/stories/Paper.stories.tsx +14 -14
- package/src/stories/ProductCard.stories.tsx +123 -51
- package/src/stories/ProgressBar.stories.tsx +27 -19
- package/src/stories/RadioGroup.stories.tsx +28 -21
- package/src/stories/RangerSlider.stories.tsx +43 -35
- package/src/stories/Select.stories.tsx +61 -33
- package/src/stories/SelectInput.stories.tsx +27 -25
- package/src/stories/ServiceCard.stories.tsx +36 -27
- package/src/stories/Table.stories.tsx +211 -276
- package/src/stories/Tabs.stories.tsx +17 -17
- package/src/stories/Tag.stories.tsx +22 -14
- package/src/stories/Text.stories.tsx +9 -9
- package/src/stories/TextField.stories.tsx +116 -35
- package/src/stories/TextInput.stories.tsx +14 -15
- package/src/stories/TimeLine.stories.tsx +22 -20
- package/src/stories/TimePicker.stories.tsx +54 -30
- package/src/stories/Title.stories.tsx +9 -9
- package/src/stories/UncontrolledTable.stories.tsx +196 -66
- package/src/stories/UncontrolledTabs.stories.tsx +28 -23
- /package/src/stories/{Colors.stories.mdx → Colors.mdx} +0 -0
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import type { Meta } from '@storybook/react'
|
|
3
|
-
import { IconButton, Icons, NormaChatMessageBalloon } from '../components'
|
|
4
|
-
import { useChatMessageBalloon } from '../components/NormaChatMessageBalloon/hook'
|
|
5
|
-
import { Avatar, Box, Typography } from '@mui/material'
|
|
6
|
-
import { SentimentDissatisfiedOutlined, TagFacesOutlined } from '@mui/icons-material'
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import type { Meta } from '@storybook/react'
|
|
3
|
+
import { IconButton, Icons, NormaChatMessageBalloon } from '../components'
|
|
4
|
+
import { useChatMessageBalloon } from '../components/NormaChatMessageBalloon/hook'
|
|
5
|
+
import { Avatar, Box, Typography } from '@mui/material'
|
|
6
|
+
import { SentimentDissatisfiedOutlined, TagFacesOutlined } from '@mui/icons-material'
|
|
7
7
|
|
|
8
8
|
const messageArr = [
|
|
9
9
|
{
|
|
10
10
|
direction: 'O' as 'O',
|
|
11
|
-
label:
|
|
12
|
-
description:
|
|
13
|
-
|
|
11
|
+
label: 'Teste de Título',
|
|
12
|
+
description:
|
|
13
|
+
'lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec purus feugiat, molestie ipsum et, varius velit. Nulla nec purus feugiat, molestie ipsum et, varius velit.',
|
|
14
|
+
date: '06/02/2025',
|
|
14
15
|
},
|
|
15
16
|
{
|
|
16
17
|
direction: 'I' as 'I',
|
|
17
|
-
label:
|
|
18
|
-
description:
|
|
19
|
-
|
|
18
|
+
label: 'Teste de Título',
|
|
19
|
+
description:
|
|
20
|
+
'lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec purus feugiat, molestie ipsum et, varius velit. Nulla nec purus feugiat, molestie ipsum et, varius velit.',
|
|
21
|
+
date: '06/02/2025',
|
|
20
22
|
},
|
|
21
23
|
{
|
|
22
24
|
direction: 'O' as 'O',
|
|
23
|
-
label:
|
|
24
|
-
description:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
label: 'Teste de Título',
|
|
26
|
+
description:
|
|
27
|
+
'lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec purus feugiat, molestie ipsum et, varius velit. Nulla nec purus feugiat, molestie ipsum et, varius velit.',
|
|
28
|
+
date: '07/02/2025',
|
|
29
|
+
},
|
|
30
|
+
]
|
|
28
31
|
|
|
29
32
|
const avatars = {
|
|
30
33
|
O: {
|
|
31
34
|
src: '',
|
|
32
|
-
alt: 'HC'
|
|
35
|
+
alt: 'HC',
|
|
33
36
|
},
|
|
34
37
|
I: {
|
|
35
38
|
src: 'https://letsenhance.io/static/73136da51c245e80edc6ccfe44888a99/1015f/MainBefore.jpg',
|
|
36
|
-
alt: 'MB'
|
|
39
|
+
alt: 'MB',
|
|
37
40
|
},
|
|
38
41
|
}
|
|
39
42
|
|
|
@@ -41,17 +44,27 @@ const Template = () => {
|
|
|
41
44
|
return (
|
|
42
45
|
<>
|
|
43
46
|
{messageArr.map((message, index) => {
|
|
44
|
-
const { balloonClassNames } = useChatMessageBalloon(() => console.log('hover'), false)
|
|
47
|
+
const { balloonClassNames } = useChatMessageBalloon(() => console.log('hover'), false)
|
|
45
48
|
return (
|
|
46
|
-
<Box
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
<Box
|
|
50
|
+
key={index}
|
|
51
|
+
sx={{
|
|
52
|
+
display: 'flex',
|
|
53
|
+
justifyContent: 'center',
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
backgroundColor: '#F5F5F5',
|
|
56
|
+
padding: '20px',
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
<NormaChatMessageBalloon.Root
|
|
60
|
+
onMouseEnter={() => console.log('hover')}
|
|
61
|
+
onMouseLeave={() => console.log('leave')}
|
|
62
|
+
>
|
|
63
|
+
<NormaChatMessageBalloon.Row
|
|
64
|
+
direction={message.direction}
|
|
65
|
+
onMouseEnter={() => console.log('row hover')}
|
|
66
|
+
onMouseLeave={() => console.log('row leave')}
|
|
67
|
+
>
|
|
55
68
|
<NormaChatMessageBalloon.Content
|
|
56
69
|
label={message.label}
|
|
57
70
|
description={message.description}
|
|
@@ -64,33 +77,42 @@ const Template = () => {
|
|
|
64
77
|
</NormaChatMessageBalloon.Row>
|
|
65
78
|
</NormaChatMessageBalloon.Root>
|
|
66
79
|
</Box>
|
|
67
|
-
)
|
|
80
|
+
)
|
|
68
81
|
})}
|
|
69
82
|
</>
|
|
70
|
-
)
|
|
71
|
-
}
|
|
83
|
+
)
|
|
84
|
+
}
|
|
72
85
|
|
|
73
86
|
const TemplateWithAvatar = () => {
|
|
74
87
|
return (
|
|
75
88
|
<>
|
|
76
89
|
{messageArr.map((message, index) => {
|
|
77
|
-
const { balloonClassNames } = useChatMessageBalloon(() => console.log('hover'), false)
|
|
90
|
+
const { balloonClassNames } = useChatMessageBalloon(() => console.log('hover'), false)
|
|
78
91
|
return (
|
|
79
|
-
<Box
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
92
|
+
<Box
|
|
93
|
+
key={index}
|
|
94
|
+
sx={{
|
|
95
|
+
display: 'flex',
|
|
96
|
+
justifyContent: 'center',
|
|
97
|
+
alignItems: 'center',
|
|
98
|
+
backgroundColor: '#F5F5F5',
|
|
99
|
+
padding: '20px',
|
|
100
|
+
}}
|
|
101
|
+
>
|
|
102
|
+
<NormaChatMessageBalloon.Root
|
|
103
|
+
onMouseEnter={() => console.log('hover')}
|
|
104
|
+
onMouseLeave={() => console.log('leave')}
|
|
105
|
+
>
|
|
106
|
+
<NormaChatMessageBalloon.Row
|
|
107
|
+
direction={message.direction}
|
|
108
|
+
onMouseEnter={() => console.log('row hover')}
|
|
109
|
+
onMouseLeave={() => console.log('row leave')}
|
|
110
|
+
>
|
|
88
111
|
<NormaChatMessageBalloon.Content
|
|
89
112
|
label={message.label}
|
|
90
113
|
description={message.description}
|
|
91
114
|
direction={message.direction}
|
|
92
115
|
className={balloonClassNames}
|
|
93
|
-
|
|
94
116
|
/>
|
|
95
117
|
</NormaChatMessageBalloon.Row>
|
|
96
118
|
<NormaChatMessageBalloon.Row direction={message.direction}>
|
|
@@ -119,27 +141,37 @@ const TemplateWithAvatar = () => {
|
|
|
119
141
|
</NormaChatMessageBalloon.Row>
|
|
120
142
|
</NormaChatMessageBalloon.Root>
|
|
121
143
|
</Box>
|
|
122
|
-
)
|
|
144
|
+
)
|
|
123
145
|
})}
|
|
124
146
|
</>
|
|
125
|
-
)
|
|
126
|
-
}
|
|
147
|
+
)
|
|
148
|
+
}
|
|
127
149
|
|
|
128
150
|
const TemplateWithChildren = () => {
|
|
129
151
|
return (
|
|
130
152
|
<>
|
|
131
153
|
{messageArr.map((message, index) => {
|
|
132
|
-
const { balloonClassNames } = useChatMessageBalloon(() => console.log('hover'), false)
|
|
154
|
+
const { balloonClassNames } = useChatMessageBalloon(() => console.log('hover'), false)
|
|
133
155
|
return (
|
|
134
|
-
<Box
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
156
|
+
<Box
|
|
157
|
+
key={index}
|
|
158
|
+
sx={{
|
|
159
|
+
display: 'flex',
|
|
160
|
+
justifyContent: 'center',
|
|
161
|
+
alignItems: 'center',
|
|
162
|
+
backgroundColor: '#F5F5F5',
|
|
163
|
+
padding: '20px',
|
|
164
|
+
}}
|
|
165
|
+
>
|
|
166
|
+
<NormaChatMessageBalloon.Root
|
|
167
|
+
onMouseEnter={() => console.log('hover')}
|
|
168
|
+
onMouseLeave={() => console.log('leave')}
|
|
169
|
+
>
|
|
170
|
+
<NormaChatMessageBalloon.Row
|
|
171
|
+
direction={message.direction}
|
|
172
|
+
onMouseEnter={() => console.log('row hover')}
|
|
173
|
+
onMouseLeave={() => console.log('row leave')}
|
|
174
|
+
>
|
|
143
175
|
<NormaChatMessageBalloon.Content
|
|
144
176
|
label={message.label}
|
|
145
177
|
description={message.description}
|
|
@@ -153,36 +185,41 @@ const TemplateWithChildren = () => {
|
|
|
153
185
|
{/* Children located here */}
|
|
154
186
|
<NormaChatMessageBalloon.Row direction={message.direction}>
|
|
155
187
|
<IconButton>
|
|
156
|
-
<Icons icon={TagFacesOutlined} scale=
|
|
188
|
+
<Icons icon={TagFacesOutlined} scale="medium" color="black" />
|
|
157
189
|
</IconButton>
|
|
158
190
|
<IconButton>
|
|
159
|
-
<Icons icon={SentimentDissatisfiedOutlined} scale=
|
|
191
|
+
<Icons icon={SentimentDissatisfiedOutlined} scale="medium" color="black" />
|
|
160
192
|
</IconButton>
|
|
161
193
|
<p>...children</p>
|
|
162
194
|
</NormaChatMessageBalloon.Row>
|
|
163
|
-
|
|
164
195
|
</NormaChatMessageBalloon.Root>
|
|
165
196
|
</Box>
|
|
166
|
-
)
|
|
197
|
+
)
|
|
167
198
|
})}
|
|
168
199
|
</>
|
|
169
|
-
)
|
|
170
|
-
}
|
|
200
|
+
)
|
|
201
|
+
}
|
|
171
202
|
|
|
172
203
|
const SimplifiedTemplate = () => {
|
|
173
204
|
return (
|
|
174
205
|
<>
|
|
175
206
|
{messageArr.map((message, index) => {
|
|
176
|
-
const { balloonClassNames } = useChatMessageBalloon(() => console.log('hover'), false)
|
|
207
|
+
const { balloonClassNames } = useChatMessageBalloon(() => console.log('hover'), false)
|
|
177
208
|
return (
|
|
178
|
-
<Box
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
209
|
+
<Box
|
|
210
|
+
key={index}
|
|
211
|
+
sx={{
|
|
212
|
+
display: 'flex',
|
|
213
|
+
justifyContent: 'center',
|
|
214
|
+
alignItems: 'center',
|
|
215
|
+
backgroundColor: '#F5F5F5',
|
|
216
|
+
padding: '20px',
|
|
217
|
+
}}
|
|
218
|
+
>
|
|
219
|
+
<NormaChatMessageBalloon.Root
|
|
220
|
+
onMouseEnter={() => console.log('hover')}
|
|
221
|
+
onMouseLeave={() => console.log('leave')}
|
|
222
|
+
>
|
|
186
223
|
<NormaChatMessageBalloon.MessageItem
|
|
187
224
|
direction={message.direction}
|
|
188
225
|
label={message.label}
|
|
@@ -194,10 +231,10 @@ const SimplifiedTemplate = () => {
|
|
|
194
231
|
children={
|
|
195
232
|
<>
|
|
196
233
|
<IconButton>
|
|
197
|
-
<Icons icon={TagFacesOutlined} scale=
|
|
234
|
+
<Icons icon={TagFacesOutlined} scale="medium" color="black" />
|
|
198
235
|
</IconButton>
|
|
199
236
|
<IconButton>
|
|
200
|
-
<Icons icon={TagFacesOutlined} scale=
|
|
237
|
+
<Icons icon={TagFacesOutlined} scale="medium" color="primary" />
|
|
201
238
|
</IconButton>
|
|
202
239
|
<p>...children</p>
|
|
203
240
|
</>
|
|
@@ -205,11 +242,11 @@ const SimplifiedTemplate = () => {
|
|
|
205
242
|
/>
|
|
206
243
|
</NormaChatMessageBalloon.Root>
|
|
207
244
|
</Box>
|
|
208
|
-
)
|
|
245
|
+
)
|
|
209
246
|
})}
|
|
210
247
|
</>
|
|
211
|
-
)
|
|
212
|
-
}
|
|
248
|
+
)
|
|
249
|
+
}
|
|
213
250
|
|
|
214
251
|
const meta = {
|
|
215
252
|
title: 'Norma/ChatMessageBalloon',
|
|
@@ -219,11 +256,11 @@ const meta = {
|
|
|
219
256
|
},
|
|
220
257
|
tags: ['autodocs'],
|
|
221
258
|
argTypes: {},
|
|
222
|
-
} satisfies Meta<typeof Template
|
|
259
|
+
} satisfies Meta<typeof Template>
|
|
223
260
|
|
|
224
|
-
export default meta
|
|
261
|
+
export default meta
|
|
225
262
|
|
|
226
|
-
export const Default = Template.bind({})
|
|
227
|
-
export const WithAvatar = TemplateWithAvatar.bind({})
|
|
228
|
-
export const WithChildren = TemplateWithChildren.bind({})
|
|
229
|
-
export const Simplified = SimplifiedTemplate.bind({})
|
|
263
|
+
export const Default = Template.bind({})
|
|
264
|
+
export const WithAvatar = TemplateWithAvatar.bind({})
|
|
265
|
+
export const WithChildren = TemplateWithChildren.bind({})
|
|
266
|
+
export const Simplified = SimplifiedTemplate.bind({})
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { Paper } from '../components'
|
|
3
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Paper } from '../components'
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
4
4
|
|
|
5
|
-
import Grid from '@mui/material/Grid'
|
|
6
|
-
import Box from '@mui/material/Box'
|
|
7
|
-
import { ThemeProvider, styled } from '@mui/material/styles'
|
|
8
|
-
import { themes } from '../helpers'
|
|
5
|
+
import Grid from '@mui/material/Grid'
|
|
6
|
+
import Box from '@mui/material/Box'
|
|
7
|
+
import { ThemeProvider, styled } from '@mui/material/styles'
|
|
8
|
+
import { themes } from '../helpers'
|
|
9
9
|
|
|
10
10
|
const Item = styled(Paper)(({ theme }) => ({
|
|
11
11
|
...theme.typography.body2,
|
|
12
12
|
textAlign: 'center',
|
|
13
13
|
height: 60,
|
|
14
14
|
lineHeight: '60px',
|
|
15
|
-
}))
|
|
15
|
+
}))
|
|
16
16
|
|
|
17
17
|
const meta = {
|
|
18
18
|
title: 'Layout/Paper',
|
|
@@ -22,13 +22,13 @@ const meta = {
|
|
|
22
22
|
},
|
|
23
23
|
tags: ['autodocs'],
|
|
24
24
|
argTypes: {},
|
|
25
|
-
} satisfies Meta<typeof Paper
|
|
25
|
+
} satisfies Meta<typeof Paper>
|
|
26
26
|
|
|
27
|
-
export default meta
|
|
27
|
+
export default meta
|
|
28
28
|
|
|
29
|
-
type Story = StoryObj<typeof meta
|
|
29
|
+
type Story = StoryObj<typeof meta>
|
|
30
30
|
|
|
31
|
-
const defaultArgs = {}
|
|
31
|
+
const defaultArgs = {}
|
|
32
32
|
|
|
33
33
|
export const PaperElevations = () => (
|
|
34
34
|
<Grid container spacing={2}>
|
|
@@ -42,7 +42,7 @@ export const PaperElevations = () => (
|
|
|
42
42
|
gap: 2,
|
|
43
43
|
}}
|
|
44
44
|
>
|
|
45
|
-
{[0, 1, 2, 3, 4, 6, 8, 12, 16, 24].map(elevation => (
|
|
45
|
+
{[0, 1, 2, 3, 4, 6, 8, 12, 16, 24].map((elevation) => (
|
|
46
46
|
<Item key={elevation} elevation={elevation}>
|
|
47
47
|
{`elevation=${elevation}`}
|
|
48
48
|
</Item>
|
|
@@ -50,4 +50,4 @@ export const PaperElevations = () => (
|
|
|
50
50
|
</Box>
|
|
51
51
|
</Grid>
|
|
52
52
|
</Grid>
|
|
53
|
-
)
|
|
53
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Meta } from
|
|
2
|
-
import { ProductCard } from
|
|
3
|
-
import React from
|
|
1
|
+
import { Meta } from '@storybook/react'
|
|
2
|
+
import { ProductCard } from '../components/ProductCard/ProductCard'
|
|
3
|
+
import React from 'react'
|
|
4
4
|
|
|
5
5
|
const meta = {
|
|
6
6
|
title: 'Layout/ProductCard',
|
|
@@ -10,58 +10,130 @@ const meta = {
|
|
|
10
10
|
},
|
|
11
11
|
tags: ['autodocs'],
|
|
12
12
|
argTypes: {},
|
|
13
|
-
} satisfies Meta<typeof ProductCard
|
|
13
|
+
} satisfies Meta<typeof ProductCard>
|
|
14
14
|
|
|
15
|
-
export default meta
|
|
15
|
+
export default meta
|
|
16
16
|
|
|
17
|
-
export const BasicProductCard = () =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
export const BasicProductCard = () => (
|
|
18
|
+
<ProductCard
|
|
19
|
+
favorite={{
|
|
20
|
+
flagged: false,
|
|
21
|
+
onFlag: () => console.log('flagged'),
|
|
22
|
+
}}
|
|
23
|
+
title="Financeiro e Jurídico"
|
|
24
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
25
|
+
color="#FDF6E3"
|
|
26
|
+
icon={{
|
|
27
|
+
iconName: 'olosAnalytics',
|
|
28
|
+
iconColor: '#B16E4B',
|
|
29
|
+
bgColor: '#F6F07F',
|
|
30
|
+
scale: 'medium',
|
|
31
|
+
iconWidth: '36px',
|
|
32
|
+
iconHeight: '36px',
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
35
|
+
)
|
|
36
|
+
BasicProductCard.storyName = 'Basic Product Card'
|
|
28
37
|
|
|
29
|
-
export const DisabledProductCard = () =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
export const DisabledProductCard = () => (
|
|
39
|
+
<ProductCard
|
|
40
|
+
title="Financeiro e Jurídico"
|
|
41
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
42
|
+
color="#FDF6E3"
|
|
43
|
+
icon={{
|
|
44
|
+
iconName: 'olosCloud',
|
|
45
|
+
iconColor: '#B16E4B',
|
|
46
|
+
bgColor: '#F6F07F',
|
|
47
|
+
scale: 'medium',
|
|
48
|
+
iconWidth: '36px',
|
|
49
|
+
iconHeight: '36px',
|
|
50
|
+
}}
|
|
51
|
+
disabled
|
|
52
|
+
/>
|
|
53
|
+
)
|
|
54
|
+
DisabledProductCard.storyName = 'Disabled Product Card'
|
|
41
55
|
|
|
42
|
-
export const FlaggedProductCard = () =>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
export const FlaggedProductCard = () => (
|
|
57
|
+
<ProductCard
|
|
58
|
+
favorite={{
|
|
59
|
+
flagged: true,
|
|
60
|
+
onFlag: () => console.log('flagged')
|
|
61
|
+
}}
|
|
62
|
+
title="Financeiro e Jurídico"
|
|
63
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
64
|
+
color="#FDF6E3"
|
|
65
|
+
icon={{
|
|
66
|
+
iconName: 'olosAnywhere',
|
|
67
|
+
iconColor: '#B16E4B',
|
|
68
|
+
bgColor: '#F6F07F',
|
|
69
|
+
scale: 'medium',
|
|
70
|
+
iconWidth: '36px',
|
|
71
|
+
iconHeight: '36px',
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
74
|
+
)
|
|
52
75
|
|
|
53
|
-
FlaggedProductCard.storyName = 'Flagged Product Card'
|
|
76
|
+
FlaggedProductCard.storyName = 'Flagged Product Card'
|
|
54
77
|
|
|
55
|
-
export const NoBorderProductCard = () =>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
78
|
+
export const NoBorderProductCard = () => (
|
|
79
|
+
<ProductCard
|
|
80
|
+
title="Financeiro e Jurídico"
|
|
81
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
82
|
+
color="#FDF6E3"
|
|
83
|
+
icon={{
|
|
84
|
+
iconName: 'olosAnalytics',
|
|
85
|
+
iconColor: '#B16E4B',
|
|
86
|
+
bgColor: '#F6F07F',
|
|
87
|
+
scale: 'medium',
|
|
88
|
+
iconWidth: '36px',
|
|
89
|
+
iconHeight: '36px',
|
|
90
|
+
}}
|
|
91
|
+
hasBorder={false}
|
|
92
|
+
/>
|
|
93
|
+
)
|
|
94
|
+
NoBorderProductCard.storyName = 'No Border Product Card'
|
|
67
95
|
|
|
96
|
+
export const ProductCardGroup = () => (
|
|
97
|
+
<div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap', justifyContent: 'center', width: '1024px'}}>
|
|
98
|
+
<ProductCard
|
|
99
|
+
title="Financeiro e Jurídico"
|
|
100
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
101
|
+
color="#FDF6E3"
|
|
102
|
+
icon={{
|
|
103
|
+
iconName: 'olosAnalytics',
|
|
104
|
+
iconColor: '#B16E4B',
|
|
105
|
+
bgColor: '#F6F07F',
|
|
106
|
+
scale: 'medium',
|
|
107
|
+
iconWidth: '36px',
|
|
108
|
+
iconHeight: '36px',
|
|
109
|
+
}}
|
|
110
|
+
/>
|
|
111
|
+
<ProductCard
|
|
112
|
+
title="Financeiro e Jurídico"
|
|
113
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
114
|
+
color="#FDF6E3"
|
|
115
|
+
icon={{
|
|
116
|
+
iconName: 'olosCloud',
|
|
117
|
+
iconColor: '#B16E4B',
|
|
118
|
+
bgColor: '#F6F07F',
|
|
119
|
+
scale: 'medium',
|
|
120
|
+
iconWidth: '36px',
|
|
121
|
+
iconHeight: '36px',
|
|
122
|
+
}}
|
|
123
|
+
/>
|
|
124
|
+
<ProductCard
|
|
125
|
+
title="Financeiro e Jurídico"
|
|
126
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
127
|
+
color="#FDF6E3"
|
|
128
|
+
icon={{
|
|
129
|
+
iconName: 'olosAnywhere',
|
|
130
|
+
iconColor: '#B16E4B',
|
|
131
|
+
bgColor: '#F6F07F',
|
|
132
|
+
scale: 'medium',
|
|
133
|
+
iconWidth: '36px',
|
|
134
|
+
iconHeight: '36px',
|
|
135
|
+
}}
|
|
136
|
+
/>
|
|
137
|
+
</div>
|
|
138
|
+
)
|
|
139
|
+
ProductCardGroup.storyName = 'Product Card Group'
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
3
|
-
import { ProgressBar } from '../components'
|
|
4
|
-
import { ColorVariant } from '../types'
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
3
|
+
import { ProgressBar } from '../components'
|
|
4
|
+
import { ColorVariant } from '../types'
|
|
5
5
|
|
|
6
|
-
const colors: ColorVariant[] = [
|
|
6
|
+
const colors: ColorVariant[] = [
|
|
7
|
+
'inherit',
|
|
8
|
+
'primary',
|
|
9
|
+
'secondary',
|
|
10
|
+
'success',
|
|
11
|
+
'error',
|
|
12
|
+
'info',
|
|
13
|
+
'warning',
|
|
14
|
+
]
|
|
7
15
|
|
|
8
16
|
const meta = {
|
|
9
17
|
title: 'Display/ProgressBar',
|
|
@@ -13,15 +21,15 @@ const meta = {
|
|
|
13
21
|
},
|
|
14
22
|
tags: ['autodocs'],
|
|
15
23
|
argTypes: {},
|
|
16
|
-
} satisfies Meta<typeof ProgressBar
|
|
24
|
+
} satisfies Meta<typeof ProgressBar>
|
|
17
25
|
|
|
18
|
-
export default meta
|
|
26
|
+
export default meta
|
|
19
27
|
|
|
20
|
-
type Story = StoryObj<typeof meta
|
|
28
|
+
type Story = StoryObj<typeof meta>
|
|
21
29
|
|
|
22
30
|
const defaultArgs = {
|
|
23
31
|
disabled: false,
|
|
24
|
-
}
|
|
32
|
+
}
|
|
25
33
|
|
|
26
34
|
export const Playground: Story = {
|
|
27
35
|
args: {
|
|
@@ -30,7 +38,7 @@ export const Playground: Story = {
|
|
|
30
38
|
color: 'primary',
|
|
31
39
|
value: 10,
|
|
32
40
|
},
|
|
33
|
-
}
|
|
41
|
+
}
|
|
34
42
|
|
|
35
43
|
export const ProgressBarBasic = () => (
|
|
36
44
|
<div style={{ display: 'flex', gap: '1rem', width: '320px' }}>
|
|
@@ -38,9 +46,9 @@ export const ProgressBarBasic = () => (
|
|
|
38
46
|
<ProgressBar value={40} total={100} color="primary" />
|
|
39
47
|
</div>
|
|
40
48
|
</div>
|
|
41
|
-
)
|
|
49
|
+
)
|
|
42
50
|
|
|
43
|
-
ProgressBarBasic.storyName = 'ProgressBar Basic'
|
|
51
|
+
ProgressBarBasic.storyName = 'ProgressBar Basic'
|
|
44
52
|
|
|
45
53
|
export const ProgressBarTitle: Story = () => (
|
|
46
54
|
<div style={{ display: 'flex', gap: '1rem', width: '320px' }}>
|
|
@@ -48,9 +56,9 @@ export const ProgressBarTitle: Story = () => (
|
|
|
48
56
|
<ProgressBar value={10} label="Progress" total={100} />
|
|
49
57
|
</div>
|
|
50
58
|
</div>
|
|
51
|
-
)
|
|
59
|
+
)
|
|
52
60
|
|
|
53
|
-
ProgressBarTitle.storyName = 'ProgressBar With Title'
|
|
61
|
+
ProgressBarTitle.storyName = 'ProgressBar With Title'
|
|
54
62
|
|
|
55
63
|
export const ProgressBarColors: Story = () => (
|
|
56
64
|
<>
|
|
@@ -81,9 +89,9 @@ export const ProgressBarColors: Story = () => (
|
|
|
81
89
|
</div>
|
|
82
90
|
</div>
|
|
83
91
|
</>
|
|
84
|
-
)
|
|
92
|
+
)
|
|
85
93
|
|
|
86
|
-
ProgressBarColors.storyName = 'ProgressBar Colors'
|
|
94
|
+
ProgressBarColors.storyName = 'ProgressBar Colors'
|
|
87
95
|
|
|
88
96
|
export const ProgressBarCustomColors: Story = () => (
|
|
89
97
|
<>
|
|
@@ -106,11 +114,11 @@ export const ProgressBarCustomColors: Story = () => (
|
|
|
106
114
|
label="Custom Color Blue"
|
|
107
115
|
h={5}
|
|
108
116
|
hideValue
|
|
109
|
-
fSize=
|
|
117
|
+
fSize="12px"
|
|
110
118
|
/>
|
|
111
119
|
</div>
|
|
112
120
|
</div>
|
|
113
121
|
</>
|
|
114
|
-
)
|
|
122
|
+
)
|
|
115
123
|
|
|
116
|
-
ProgressBarCustomColors.storyName = 'ProgressBar Custom Colors'
|
|
124
|
+
ProgressBarCustomColors.storyName = 'ProgressBar Custom Colors'
|