norma-library 0.6.85 → 0.6.87
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/Icons.js +6 -7
- package/dist/esm/components/Icons.js.map +1 -1
- package/dist/esm/components/ProductCard/ProductCard.js +13 -11
- package/dist/esm/components/ProductCard/ProductCard.js.map +1 -1
- package/dist/esm/components/ProductCard/ProductCard.style.js +2 -2
- package/dist/esm/components/ProductCard/ProductCard.style.js.map +1 -1
- package/dist/esm/components/ServiceCard/ServiceCard.js +6 -6
- package/dist/esm/components/ServiceCard/ServiceCard.js.map +1 -1
- package/dist/esm/components/ServiceCard/ServiceCard.style.js +1 -1
- package/dist/esm/components/ServiceCard/ServiceCard.style.js.map +1 -1
- package/dist/esm/components/Svgs.d.ts +12 -0
- package/dist/esm/components/Svgs.js +36 -0
- package/dist/esm/components/Svgs.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/Icons.d.ts +4 -3
- package/dist/esm/interfaces/ProductCard.d.ts +15 -5
- package/dist/esm/interfaces/ServiceCard.d.ts +12 -4
- package/dist/esm/types/index.d.ts +3 -3
- package/dist/esm/types/index.js.map +1 -1
- package/package.json +24 -26
- 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/Icons.tsx +12 -8
- package/src/components/ProductCard/ProductCard.style.ts +5 -2
- package/src/components/ProductCard/ProductCard.tsx +27 -27
- package/src/components/ServiceCard/ServiceCard.style.ts +0 -1
- package/src/components/ServiceCard/ServiceCard.tsx +6 -6
- package/src/components/Svgs.tsx +224 -2
- 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/index.ts +0 -2
- package/src/interfaces/Icons.ts +4 -3
- package/src/interfaces/ProductCard.ts +29 -20
- package/src/interfaces/ServiceCard.ts +19 -10
- 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 +78 -9
- 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 +43 -15
- 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/types/index.ts +4 -3
- package/src/components/IconifyIcon.tsx +0 -25
- package/src/stories/IconifyIcon.stories.tsx +0 -31
- /package/src/stories/{Colors.stories.mdx → Colors.mdx} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import MultiSelectInput from '../components/MultiSelectInput'
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import MultiSelectInput from '../components/MultiSelectInput'
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Form/MultiSelectInput',
|
|
@@ -8,84 +8,86 @@ export default {
|
|
|
8
8
|
parameters: {
|
|
9
9
|
layout: 'centered',
|
|
10
10
|
},
|
|
11
|
-
argTypes: {
|
|
11
|
+
argTypes: {
|
|
12
12
|
className: {
|
|
13
13
|
description: 'Adicione uma classe.',
|
|
14
14
|
},
|
|
15
15
|
label: {
|
|
16
|
-
description: 'Adicione uma label.'
|
|
16
|
+
description: 'Adicione uma label.',
|
|
17
17
|
},
|
|
18
18
|
onChange: {
|
|
19
|
-
description: 'Função para capturar o valor quando alterado.'
|
|
19
|
+
description: 'Função para capturar o valor quando alterado.',
|
|
20
20
|
},
|
|
21
21
|
placeholder: {
|
|
22
|
-
description: 'Adicione um placeholder.'
|
|
22
|
+
description: 'Adicione um placeholder.',
|
|
23
23
|
},
|
|
24
24
|
options: {
|
|
25
|
-
description: 'Lista de valores a ser exibido.'
|
|
25
|
+
description: 'Lista de valores a ser exibido.',
|
|
26
26
|
},
|
|
27
27
|
value: {
|
|
28
|
-
description: 'Valor selecionado.'
|
|
28
|
+
description: 'Valor selecionado.',
|
|
29
29
|
},
|
|
30
30
|
isSearchable: {
|
|
31
|
-
description: 'Habilita a função de buscar um valor.'
|
|
31
|
+
description: 'Habilita a função de buscar um valor.',
|
|
32
32
|
},
|
|
33
33
|
isClearable: {
|
|
34
|
-
description: 'Habilita a função de limpar o item selecionado.'
|
|
34
|
+
description: 'Habilita a função de limpar o item selecionado.',
|
|
35
35
|
},
|
|
36
36
|
disabled: {
|
|
37
|
-
description: 'Habilita ou desabilita.'
|
|
38
|
-
}
|
|
39
|
-
}
|
|
37
|
+
description: 'Habilita ou desabilita.',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export const Default = (args) => {
|
|
43
43
|
const options = [
|
|
44
44
|
{
|
|
45
45
|
label: 'options 1',
|
|
46
|
-
value: 'value 1'
|
|
46
|
+
value: 'value 1',
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
label: 'options 2',
|
|
50
|
-
value: 'value 2'
|
|
50
|
+
value: 'value 2',
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
label: 'options 3',
|
|
54
|
-
value: 'value 3'
|
|
54
|
+
value: 'value 3',
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
label: 'options 4',
|
|
58
|
-
value: 'value 4'
|
|
58
|
+
value: 'value 4',
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
label: 'options 5',
|
|
62
|
-
value: 'value 5'
|
|
62
|
+
value: 'value 5',
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
label: 'options 6',
|
|
66
|
-
value: 'value 6'
|
|
67
|
-
}
|
|
66
|
+
value: 'value 6',
|
|
67
|
+
},
|
|
68
68
|
]
|
|
69
69
|
const [selectedValue, setSelectedValue] = useState<any>(options[0])
|
|
70
70
|
return (
|
|
71
|
-
<div
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
<div
|
|
72
|
+
style={{
|
|
73
|
+
width: 300,
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
76
|
+
<MultiSelectInput
|
|
75
77
|
options={options}
|
|
76
78
|
value={selectedValue}
|
|
77
|
-
onChange={(value) => setSelectedValue(value)}
|
|
78
|
-
{...args}
|
|
79
|
+
onChange={(value) => setSelectedValue(value)}
|
|
80
|
+
{...args}
|
|
79
81
|
/>
|
|
80
82
|
</div>
|
|
81
83
|
)
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
Default.args = {
|
|
86
|
+
Default.args = {
|
|
85
87
|
className: '',
|
|
86
88
|
label: 'Selecione:',
|
|
87
89
|
placeholder: 'Selecione uma opção',
|
|
88
90
|
disabled: false,
|
|
89
91
|
isSearchable: false,
|
|
90
92
|
isClearable: false,
|
|
91
|
-
}
|
|
93
|
+
}
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import type { Meta } from '@storybook/react'
|
|
3
|
-
import { IconButton, NormaChatMessageBalloon } from '../components'
|
|
4
|
-
import { useChatMessageBalloon } from '../components/NormaChatMessageBalloon/hook'
|
|
5
|
-
import { Avatar, Box, Typography } from '@mui/material'
|
|
6
|
-
import {
|
|
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
|
-
<
|
|
188
|
+
<Icons icon={TagFacesOutlined} scale="medium" color="black" />
|
|
157
189
|
</IconButton>
|
|
158
190
|
<IconButton>
|
|
159
|
-
<
|
|
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
|
-
<
|
|
234
|
+
<Icons icon={TagFacesOutlined} scale="medium" color="black" />
|
|
198
235
|
</IconButton>
|
|
199
236
|
<IconButton>
|
|
200
|
-
<
|
|
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,13 +10,82 @@ 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
|
-
|
|
17
|
+
export const BasicProductCard = () => (
|
|
18
|
+
<ProductCard
|
|
19
|
+
flaggable
|
|
20
|
+
title="Financeiro e Jurídico"
|
|
21
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
22
|
+
color="#FDF6E3"
|
|
23
|
+
icon={{
|
|
24
|
+
iconName: 'olosAnalytics',
|
|
25
|
+
iconColor: '#B16E4B',
|
|
26
|
+
bgColor: '#F6F07F',
|
|
27
|
+
scale: 'medium',
|
|
28
|
+
iconWidth: '36px',
|
|
29
|
+
iconHeight: '36px',
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
BasicProductCard.storyName = 'Basic Product Card'
|
|
19
34
|
|
|
20
|
-
export const DisabledProductCard = () =>
|
|
35
|
+
export const DisabledProductCard = () => (
|
|
36
|
+
<ProductCard
|
|
37
|
+
flaggable
|
|
38
|
+
title="Financeiro e Jurídico"
|
|
39
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
40
|
+
color="#FDF6E3"
|
|
41
|
+
icon={{
|
|
42
|
+
iconName: 'olosCloud',
|
|
43
|
+
iconColor: '#B16E4B',
|
|
44
|
+
bgColor: '#F6F07F',
|
|
45
|
+
scale: 'medium',
|
|
46
|
+
iconWidth: '36px',
|
|
47
|
+
iconHeight: '36px',
|
|
48
|
+
}}
|
|
49
|
+
disabled
|
|
50
|
+
/>
|
|
51
|
+
)
|
|
52
|
+
DisabledProductCard.storyName = 'Disabled Product Card'
|
|
21
53
|
|
|
22
|
-
export const
|
|
54
|
+
export const FlaggedProductCard = () => (
|
|
55
|
+
<ProductCard
|
|
56
|
+
flaggable
|
|
57
|
+
flagged
|
|
58
|
+
title="Financeiro e Jurídico"
|
|
59
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
60
|
+
color="#FDF6E3"
|
|
61
|
+
icon={{
|
|
62
|
+
iconName: 'olosAnywhere',
|
|
63
|
+
iconColor: '#B16E4B',
|
|
64
|
+
bgColor: '#F6F07F',
|
|
65
|
+
scale: 'medium',
|
|
66
|
+
iconWidth: '36px',
|
|
67
|
+
iconHeight: '36px',
|
|
68
|
+
}}
|
|
69
|
+
/>
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
FlaggedProductCard.storyName = 'Flagged Product Card'
|
|
73
|
+
|
|
74
|
+
export const NoBorderProductCard = () => (
|
|
75
|
+
<ProductCard
|
|
76
|
+
flaggable
|
|
77
|
+
title="Financeiro e Jurídico"
|
|
78
|
+
description="Novas possibilidades de análise de desempenho operacional, elasticidade e segurança."
|
|
79
|
+
color="#FDF6E3"
|
|
80
|
+
icon={{
|
|
81
|
+
iconName: 'olosAnalytics',
|
|
82
|
+
iconColor: '#B16E4B',
|
|
83
|
+
bgColor: '#F6F07F',
|
|
84
|
+
scale: 'medium',
|
|
85
|
+
iconWidth: '36px',
|
|
86
|
+
iconHeight: '36px',
|
|
87
|
+
}}
|
|
88
|
+
hasBorder={false}
|
|
89
|
+
/>
|
|
90
|
+
)
|
|
91
|
+
NoBorderProductCard.storyName = 'No Border Product Card'
|