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.
Files changed (90) hide show
  1. package/.storybook/main.ts +7 -0
  2. package/dist/esm/components/Box/interfaces.d.ts +1 -0
  3. package/dist/esm/components/Breadcrumb/index.d.ts +2 -2
  4. package/dist/esm/components/Breadcrumb/index.js +13 -9
  5. package/dist/esm/components/Breadcrumb/index.js.map +1 -1
  6. package/dist/esm/components/Breadcrumb/interface.d.ts +11 -6
  7. package/dist/esm/components/Breadcrumb/styles.d.ts +3 -3
  8. package/dist/esm/components/Breadcrumb/styles.js +3 -3
  9. package/dist/esm/components/Breadcrumb/styles.js.map +1 -1
  10. package/dist/esm/components/Icons.js +6 -7
  11. package/dist/esm/components/Icons.js.map +1 -1
  12. package/dist/esm/components/ProductCard/ProductCard.js +13 -11
  13. package/dist/esm/components/ProductCard/ProductCard.js.map +1 -1
  14. package/dist/esm/components/ProductCard/ProductCard.style.js +2 -2
  15. package/dist/esm/components/ProductCard/ProductCard.style.js.map +1 -1
  16. package/dist/esm/components/ServiceCard/ServiceCard.js +6 -6
  17. package/dist/esm/components/ServiceCard/ServiceCard.js.map +1 -1
  18. package/dist/esm/components/ServiceCard/ServiceCard.style.js +1 -1
  19. package/dist/esm/components/ServiceCard/ServiceCard.style.js.map +1 -1
  20. package/dist/esm/components/Svgs.d.ts +12 -0
  21. package/dist/esm/components/Svgs.js +36 -0
  22. package/dist/esm/components/Svgs.js.map +1 -1
  23. package/dist/esm/components/Typography/Text/interfaces.d.ts +1 -0
  24. package/dist/esm/components/Typography/Title/interfaces.d.ts +1 -0
  25. package/dist/esm/hooks/useClickOutside.d.ts +1 -1
  26. package/dist/esm/hooks/useClickOutside.js.map +1 -1
  27. package/dist/esm/interfaces/Icons.d.ts +4 -3
  28. package/dist/esm/interfaces/ProductCard.d.ts +15 -5
  29. package/dist/esm/interfaces/ServiceCard.d.ts +12 -4
  30. package/dist/esm/types/index.d.ts +3 -3
  31. package/dist/esm/types/index.js.map +1 -1
  32. package/package.json +24 -26
  33. package/src/components/Box/interfaces.ts +2 -0
  34. package/src/components/Breadcrumb/index.tsx +16 -11
  35. package/src/components/Breadcrumb/interface.ts +12 -6
  36. package/src/components/Breadcrumb/styles.tsx +10 -11
  37. package/src/components/Icons.tsx +12 -8
  38. package/src/components/ProductCard/ProductCard.style.ts +5 -2
  39. package/src/components/ProductCard/ProductCard.tsx +27 -27
  40. package/src/components/ServiceCard/ServiceCard.style.ts +0 -1
  41. package/src/components/ServiceCard/ServiceCard.tsx +6 -6
  42. package/src/components/Svgs.tsx +224 -2
  43. package/src/components/Typography/Text/interfaces.ts +3 -1
  44. package/src/components/Typography/Title/interfaces.ts +2 -0
  45. package/src/hooks/useClickOutside.tsx +1 -1
  46. package/src/index.ts +0 -2
  47. package/src/interfaces/Icons.ts +4 -3
  48. package/src/interfaces/ProductCard.ts +29 -20
  49. package/src/interfaces/ServiceCard.ts +19 -10
  50. package/src/stories/Accordion.stories.tsx +19 -19
  51. package/src/stories/Avatar.stories.tsx +32 -28
  52. package/src/stories/Badge.stories.tsx +17 -15
  53. package/src/stories/Box.stories.tsx +16 -12
  54. package/src/stories/Breadcrumb.stories.tsx +62 -18
  55. package/src/stories/Button.stories.tsx +24 -16
  56. package/src/stories/Card.stories.tsx +21 -13
  57. package/src/stories/ChatMessage.stories.tsx +10 -9
  58. package/src/stories/ChatMessageBalloon.stories.tsx +83 -66
  59. package/src/stories/CheckBox.stories.tsx +23 -23
  60. package/src/stories/DateInput.stories.tsx +15 -16
  61. package/src/stories/DatePicker.stories.tsx +17 -12
  62. package/src/stories/DropDown.stories.tsx +16 -16
  63. package/src/stories/IconButton.stories.tsx +45 -21
  64. package/src/stories/Modal.stories.tsx +49 -49
  65. package/src/stories/ModalStatus.stories.tsx +34 -18
  66. package/src/stories/MultiSelectInput.stories.tsx +30 -28
  67. package/src/stories/NormaChatMessageBalloon.stories.tsx +119 -82
  68. package/src/stories/Paper.stories.tsx +14 -14
  69. package/src/stories/ProductCard.stories.tsx +78 -9
  70. package/src/stories/ProgressBar.stories.tsx +27 -19
  71. package/src/stories/RadioGroup.stories.tsx +28 -21
  72. package/src/stories/RangerSlider.stories.tsx +43 -35
  73. package/src/stories/Select.stories.tsx +61 -33
  74. package/src/stories/SelectInput.stories.tsx +27 -25
  75. package/src/stories/ServiceCard.stories.tsx +43 -15
  76. package/src/stories/Table.stories.tsx +211 -276
  77. package/src/stories/Tabs.stories.tsx +17 -17
  78. package/src/stories/Tag.stories.tsx +22 -14
  79. package/src/stories/Text.stories.tsx +9 -9
  80. package/src/stories/TextField.stories.tsx +116 -35
  81. package/src/stories/TextInput.stories.tsx +14 -15
  82. package/src/stories/TimeLine.stories.tsx +22 -20
  83. package/src/stories/TimePicker.stories.tsx +54 -30
  84. package/src/stories/Title.stories.tsx +9 -9
  85. package/src/stories/UncontrolledTable.stories.tsx +196 -66
  86. package/src/stories/UncontrolledTabs.stories.tsx +28 -23
  87. package/src/types/index.ts +4 -3
  88. package/src/components/IconifyIcon.tsx +0 -25
  89. package/src/stories/IconifyIcon.stories.tsx +0 -31
  90. /package/src/stories/{Colors.stories.mdx → Colors.mdx} +0 -0
@@ -1,12 +1,20 @@
1
- import React from 'react';
1
+ import React from 'react'
2
2
 
3
- import type { Meta } from '@storybook/react';
4
- import { Tag } from '../components';
5
- import { ColorVariant, TextFieldSizeVariant } from '../types';
3
+ import type { Meta } from '@storybook/react'
4
+ import { Tag } from '../components'
5
+ import { ColorVariant, TextFieldSizeVariant } from '../types'
6
6
 
7
- const colors: ColorVariant[] = ['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning'];
7
+ const colors: ColorVariant[] = [
8
+ 'inherit',
9
+ 'primary',
10
+ 'secondary',
11
+ 'success',
12
+ 'error',
13
+ 'info',
14
+ 'warning',
15
+ ]
8
16
 
9
- const sizes: TextFieldSizeVariant[] = ['small', 'medium'];
17
+ const sizes: TextFieldSizeVariant[] = ['small', 'medium']
10
18
 
11
19
  const meta = {
12
20
  title: 'Display/Tag',
@@ -16,9 +24,9 @@ const meta = {
16
24
  },
17
25
  tags: ['autodocs'],
18
26
  argTypes: {},
19
- } satisfies Meta<typeof Tag>;
27
+ } satisfies Meta<typeof Tag>
20
28
 
21
- export default meta;
29
+ export default meta
22
30
 
23
31
  export const TagBasic = () => {
24
32
  return (
@@ -26,8 +34,8 @@ export const TagBasic = () => {
26
34
  <Tag label="Chip Filled" color="primary" style={{ margin: 5 }} />
27
35
  <Tag label="Chip Outlined" outlined style={{ margin: 5 }} />
28
36
  </>
29
- );
30
- };
37
+ )
38
+ }
31
39
 
32
40
  export const TagColors = () => {
33
41
  return (
@@ -39,8 +47,8 @@ export const TagColors = () => {
39
47
  </div>
40
48
  ))}
41
49
  </>
42
- );
43
- };
50
+ )
51
+ }
44
52
 
45
53
  export const TagSizes = () => {
46
54
  return (
@@ -52,5 +60,5 @@ export const TagSizes = () => {
52
60
  </div>
53
61
  ))}
54
62
  </>
55
- );
56
- };
63
+ )
64
+ }
@@ -1,5 +1,5 @@
1
- import React from "react"
2
- import Text from '../components/Typography/Text';
1
+ import React from 'react'
2
+ import Text from '../components/Typography/Text'
3
3
 
4
4
  export default {
5
5
  title: 'Tipografia/Text',
@@ -8,9 +8,9 @@ export default {
8
8
  parameters: {
9
9
  layout: 'centered',
10
10
  },
11
- argTypes: {
11
+ argTypes: {
12
12
  children: {
13
- description: 'Adiciona um children.'
13
+ description: 'Adiciona um children.',
14
14
  },
15
15
  className: {
16
16
  description: 'Adicione uma classe.',
@@ -18,14 +18,14 @@ export default {
18
18
  size: {
19
19
  description: 'Adicione um tamanho.',
20
20
  options: ['small', 'medium', 'large'],
21
- control: { type: 'radio' }
21
+ control: { type: 'radio' },
22
22
  },
23
23
  type: {
24
24
  description: 'Adicione um tipo.',
25
25
  options: ['default', 'secondary', 'success', 'warning', 'danger', 'info'],
26
- control: { type: 'radio' }
26
+ control: { type: 'radio' },
27
27
  },
28
- }
28
+ },
29
29
  }
30
30
 
31
31
  export const Default = (args) => <Text {...args} />
@@ -34,5 +34,5 @@ Default.args = {
34
34
  children: 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
35
35
  className: '',
36
36
  size: 'default',
37
- type: ''
38
- }
37
+ type: '',
38
+ }
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ import React from 'react'
2
2
 
3
- import Box from '@mui/material/Box';
4
- import type { Meta, StoryObj } from '@storybook/react';
5
- import { TextField } from '../components';
3
+ import Box from '@mui/material/Box'
4
+ import type { Meta, StoryObj } from '@storybook/react'
5
+ import { TextField } from '../components'
6
6
 
7
7
  const meta = {
8
8
  title: 'Form/TextField',
@@ -12,15 +12,15 @@ const meta = {
12
12
  },
13
13
  tags: ['autodocs'],
14
14
  argTypes: {},
15
- } satisfies Meta<typeof TextField>;
15
+ } satisfies Meta<typeof TextField>
16
16
 
17
- export default meta;
17
+ export default meta
18
18
 
19
- type Story = StoryObj<typeof meta>;
19
+ type Story = StoryObj<typeof meta>
20
20
 
21
21
  const defaultArgs = {
22
22
  disabled: false,
23
- };
23
+ }
24
24
 
25
25
  export const Playground: Story = {
26
26
  args: {
@@ -29,7 +29,7 @@ export const Playground: Story = {
29
29
  color: 'primary',
30
30
  variant: 'standard',
31
31
  },
32
- };
32
+ }
33
33
 
34
34
  export const TextFieldVariant = () => (
35
35
  <>
@@ -37,8 +37,8 @@ export const TextFieldVariant = () => (
37
37
  <TextField variant="filled" label="Variant Contained" />
38
38
  <TextField variant="outlined" label="Variant Outlined" />
39
39
  </>
40
- );
41
- TextFieldVariant.storyName = 'TextField Variants';
40
+ )
41
+ TextFieldVariant.storyName = 'TextField Variants'
42
42
 
43
43
  export const TextFieldValidation = () => (
44
44
  <div style={{ display: 'flex', gap: '1rem', margin: 15 }}>
@@ -61,7 +61,13 @@ export const TextFieldValidation = () => (
61
61
  />
62
62
  </div>
63
63
  <div>
64
- <TextField error id="filled-error" label="Error" defaultValue="Hello World" variant="filled" />
64
+ <TextField
65
+ error
66
+ id="filled-error"
67
+ label="Error"
68
+ defaultValue="Hello World"
69
+ variant="filled"
70
+ />
65
71
  <TextField
66
72
  error
67
73
  id="filled-error-helper-text"
@@ -72,7 +78,13 @@ export const TextFieldValidation = () => (
72
78
  />
73
79
  </div>
74
80
  <div>
75
- <TextField error id="standard-error" label="Error" defaultValue="Hello World" variant="standard" />
81
+ <TextField
82
+ error
83
+ id="standard-error"
84
+ label="Error"
85
+ defaultValue="Hello World"
86
+ variant="standard"
87
+ />
76
88
  <TextField
77
89
  error
78
90
  id="standard-error-helper-text"
@@ -84,8 +96,8 @@ export const TextFieldValidation = () => (
84
96
  </div>
85
97
  </Box>
86
98
  </div>
87
- );
88
- TextFieldValidation.storyName = 'TextField Validation';
99
+ )
100
+ TextFieldValidation.storyName = 'TextField Validation'
89
101
 
90
102
  export const TextFieldMultiline = () => (
91
103
  <div style={{ display: 'flex', gap: '1rem', margin: 15 }}>
@@ -99,11 +111,28 @@ export const TextFieldMultiline = () => (
99
111
  >
100
112
  <div>
101
113
  <TextField id="outlined-multiline-flexible" label="Multiline" multiline maxRows={4} />
102
- <TextField id="outlined-textarea" label="Multiline Placeholder" placeholder="Placeholder" multiline />
103
- <TextField id="outlined-multiline-static" label="Multiline" multiline rows={4} defaultValue="Default Value" />
114
+ <TextField
115
+ id="outlined-textarea"
116
+ label="Multiline Placeholder"
117
+ placeholder="Placeholder"
118
+ multiline
119
+ />
120
+ <TextField
121
+ id="outlined-multiline-static"
122
+ label="Multiline"
123
+ multiline
124
+ rows={4}
125
+ defaultValue="Default Value"
126
+ />
104
127
  </div>
105
128
  <div>
106
- <TextField id="filled-multiline-flexible" label="Multiline" multiline maxRows={4} variant="filled" />
129
+ <TextField
130
+ id="filled-multiline-flexible"
131
+ label="Multiline"
132
+ multiline
133
+ maxRows={4}
134
+ variant="filled"
135
+ />
107
136
  <TextField
108
137
  id="filled-textarea"
109
138
  label="Multiline Placeholder"
@@ -121,7 +150,13 @@ export const TextFieldMultiline = () => (
121
150
  />
122
151
  </div>
123
152
  <div>
124
- <TextField id="standard-multiline-flexible" label="Multiline" multiline maxRows={4} variant="standard" />
153
+ <TextField
154
+ id="standard-multiline-flexible"
155
+ label="Multiline"
156
+ multiline
157
+ maxRows={4}
158
+ variant="standard"
159
+ />
125
160
  <TextField
126
161
  id="standard-textarea"
127
162
  label="Multiline Placeholder"
@@ -140,8 +175,8 @@ export const TextFieldMultiline = () => (
140
175
  </div>
141
176
  </Box>
142
177
  </div>
143
- );
144
- TextFieldMultiline.storyName = 'TextField Multiline';
178
+ )
179
+ TextFieldMultiline.storyName = 'TextField Multiline'
145
180
 
146
181
  export const TextFieldSizes = () => (
147
182
  <div style={{ display: 'flex', gap: '1rem', margin: 15 }}>
@@ -158,17 +193,34 @@ export const TextFieldSizes = () => (
158
193
  <TextField label="Size" id="outlined-size-normal" defaultValue="Normal" />
159
194
  </div>
160
195
  <div>
161
- <TextField label="Size" id="filled-size-small" defaultValue="Small" variant="filled" size="small" />
196
+ <TextField
197
+ label="Size"
198
+ id="filled-size-small"
199
+ defaultValue="Small"
200
+ variant="filled"
201
+ size="small"
202
+ />
162
203
  <TextField label="Size" id="filled-size-normal" defaultValue="Normal" variant="filled" />
163
204
  </div>
164
205
  <div>
165
- <TextField label="Size" id="standard-size-small" defaultValue="Small" size="small" variant="standard" />
166
- <TextField label="Size" id="standard-size-normal" defaultValue="Normal" variant="standard" />
206
+ <TextField
207
+ label="Size"
208
+ id="standard-size-small"
209
+ defaultValue="Small"
210
+ size="small"
211
+ variant="standard"
212
+ />
213
+ <TextField
214
+ label="Size"
215
+ id="standard-size-normal"
216
+ defaultValue="Normal"
217
+ variant="standard"
218
+ />
167
219
  </div>
168
220
  </Box>
169
221
  </div>
170
- );
171
- TextFieldSizes.storyName = 'TextField Sizes';
222
+ )
223
+ TextFieldSizes.storyName = 'TextField Sizes'
172
224
 
173
225
  export const TextFieldColors = () => (
174
226
  <div style={{ display: 'flex', gap: '1rem', margin: 15 }}>
@@ -186,8 +238,8 @@ export const TextFieldColors = () => (
186
238
  <TextField label="Standard warning" variant="standard" color="warning" focused />
187
239
  </Box>
188
240
  </div>
189
- );
190
- TextFieldColors.storyName = 'TextField Colors';
241
+ )
242
+ TextFieldColors.storyName = 'TextField Colors'
191
243
 
192
244
  export const TextFieldProps = () => (
193
245
  <div style={{ display: 'flex', gap: '1rem', margin: 15 }}>
@@ -205,7 +257,12 @@ export const TextFieldProps = () => (
205
257
  <div>
206
258
  <TextField required id="outlined-required" label="Required" defaultValue="Hello World" />
207
259
  <TextField disabled id="outlined-disabled" label="Disabled" defaultValue="Hello World" />
208
- <TextField id="outlined-password-input" label="Password" type="password" autoComplete="current-password" />
260
+ <TextField
261
+ id="outlined-password-input"
262
+ label="Password"
263
+ type="password"
264
+ autoComplete="current-password"
265
+ />
209
266
  <TextField
210
267
  id="outlined-read-only-input"
211
268
  label="Read Only"
@@ -231,8 +288,20 @@ export const TextFieldProps = () => (
231
288
  />
232
289
  </div>
233
290
  <div>
234
- <TextField required id="filled-required" label="Required" defaultValue="Hello World" variant="filled" />
235
- <TextField disabled id="filled-disabled" label="Disabled" defaultValue="Hello World" variant="filled" />
291
+ <TextField
292
+ required
293
+ id="filled-required"
294
+ label="Required"
295
+ defaultValue="Hello World"
296
+ variant="filled"
297
+ />
298
+ <TextField
299
+ disabled
300
+ id="filled-disabled"
301
+ label="Disabled"
302
+ defaultValue="Hello World"
303
+ variant="filled"
304
+ />
236
305
  <TextField
237
306
  id="filled-password-input"
238
307
  label="Password"
@@ -268,8 +337,20 @@ export const TextFieldProps = () => (
268
337
  />
269
338
  </div>
270
339
  <div>
271
- <TextField required id="standard-required" label="Required" defaultValue="Hello World" variant="standard" />
272
- <TextField disabled id="standard-disabled" label="Disabled" defaultValue="Hello World" variant="standard" />
340
+ <TextField
341
+ required
342
+ id="standard-required"
343
+ label="Required"
344
+ defaultValue="Hello World"
345
+ variant="standard"
346
+ />
347
+ <TextField
348
+ disabled
349
+ id="standard-disabled"
350
+ label="Disabled"
351
+ defaultValue="Hello World"
352
+ variant="standard"
353
+ />
273
354
  <TextField
274
355
  id="standard-password-input"
275
356
  label="Password"
@@ -306,5 +387,5 @@ export const TextFieldProps = () => (
306
387
  </div>
307
388
  </Box>
308
389
  </div>
309
- );
310
- TextFieldProps.storyName = 'TextField Props';
390
+ )
391
+ TextFieldProps.storyName = 'TextField Props'
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import TextInput from '../components/TextInput';
1
+ import React from 'react'
2
+ import TextInput from '../components/TextInput'
3
3
 
4
4
  export default {
5
5
  title: 'Form/TextInput',
@@ -8,35 +8,34 @@ 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
  value: {
19
- description: 'Adicione um valor.'
19
+ description: 'Adicione um valor.',
20
20
  },
21
21
  onChange: {
22
- description: 'Função para capturar o valor quando alterado.'
22
+ description: 'Função para capturar o valor quando alterado.',
23
23
  },
24
24
  disabled: {
25
- description: 'Habilita ou desabilita.'
25
+ description: 'Habilita ou desabilita.',
26
26
  },
27
27
  placeholder: {
28
- description: 'Adicione um placeholder.'
28
+ description: 'Adicione um placeholder.',
29
29
  },
30
30
  name: {
31
- description: 'Adiciona um name'
31
+ description: 'Adiciona um name',
32
32
  },
33
33
  type: {
34
34
  description: 'Adiciona um type',
35
35
  options: ['text', 'password'],
36
- control: { type: 'radio' }
37
- }
38
- }
39
-
36
+ control: { type: 'radio' },
37
+ },
38
+ },
40
39
  }
41
40
 
42
41
  export const Default = (args) => <TextInput {...args} />
@@ -49,5 +48,5 @@ Default.args = {
49
48
  value: 'Valor do input',
50
49
  placeholder: 'Digite algo...',
51
50
  name: '',
52
- type: ''
53
- }
51
+ type: '',
52
+ }
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
- import { TimeLine, TimeLineData } from '../components/TimeLine/TimeLine';
3
- import type { Meta } from '@storybook/react';
4
- import { Stack } from '@mui/material';
1
+ import React from 'react'
2
+ import { TimeLine, TimeLineData } from '../components/TimeLine/TimeLine'
3
+ import type { Meta } from '@storybook/react'
4
+ import { Stack } from '@mui/material'
5
5
 
6
6
  const meta = {
7
7
  title: 'Layout/TimeLine',
@@ -11,7 +11,7 @@ const meta = {
11
11
  },
12
12
  tags: ['autodocs'],
13
13
  argTypes: {},
14
- } satisfies Meta<typeof TimeLine>;
14
+ } satisfies Meta<typeof TimeLine>
15
15
 
16
16
  const data: TimeLineData[] = [
17
17
  {
@@ -52,32 +52,34 @@ const data: TimeLineData[] = [
52
52
  date: '04/10/2024 às 10:00:00',
53
53
  description: 'Classificador Iniciado por Artur Mortari',
54
54
  },
55
- ];
55
+ ]
56
56
 
57
57
  export const TimeLineBasic = () => {
58
58
  return (
59
59
  <>
60
60
  <TimeLine data={data} />
61
61
  </>
62
- );
63
- };
62
+ )
63
+ }
64
64
 
65
65
  export const TimeLineThemes = () => {
66
66
  return (
67
67
  <Stack direction="row" spacing={2}>
68
- {['primary', 'secondary', 'inherit', 'error', 'info', 'success', 'warning'].map((color, key) => (
69
- <TimeLine data={data} theme={color} key={key} />
70
- ))}
68
+ {['primary', 'secondary', 'inherit', 'error', 'info', 'success', 'warning'].map(
69
+ (color, key) => (
70
+ <TimeLine data={data} theme={color} key={key} />
71
+ ),
72
+ )}
71
73
  </Stack>
72
- );
73
- };
74
+ )
75
+ }
74
76
 
75
77
  export const TimeLineColor = () => {
76
- return (
77
- <>
78
- <TimeLine data={data} color='#9c27b0' />
79
- </>
80
- );
81
- };
78
+ return (
79
+ <>
80
+ <TimeLine data={data} color="#9c27b0" />
81
+ </>
82
+ )
83
+ }
82
84
 
83
- export default meta;
85
+ export default meta
@@ -1,21 +1,21 @@
1
- import React from 'react';
2
- import { DemoContainer } from '@mui/x-date-pickers/internals/demo';
3
- import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
4
- import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
5
- import { TimePicker } from '@mui/x-date-pickers/TimePicker';
6
- import { MobileTimePicker } from '@mui/x-date-pickers/MobileTimePicker';
7
- import { DesktopTimePicker } from '@mui/x-date-pickers/DesktopTimePicker';
8
- import type { Meta } from '@storybook/react';
9
- import dayjs, { Dayjs } from 'dayjs';
10
- import utc from 'dayjs/plugin/utc';
11
- import timezone from 'dayjs/plugin/timezone';
1
+ import React from 'react'
2
+ import { DemoContainer } from '@mui/x-date-pickers/internals/demo'
3
+ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'
4
+ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'
5
+ import { TimePicker } from '@mui/x-date-pickers/TimePicker'
6
+ import { MobileTimePicker } from '@mui/x-date-pickers/MobileTimePicker'
7
+ import { DesktopTimePicker } from '@mui/x-date-pickers/DesktopTimePicker'
8
+ import type { Meta } from '@storybook/react'
9
+ import dayjs, { Dayjs } from 'dayjs'
10
+ import utc from 'dayjs/plugin/utc'
11
+ import timezone from 'dayjs/plugin/timezone'
12
12
 
13
- import 'dayjs/locale/pt-br';
14
- import 'dayjs/locale/en';
15
- import 'dayjs/locale/es';
13
+ import 'dayjs/locale/pt-br'
14
+ import 'dayjs/locale/en'
15
+ import 'dayjs/locale/es'
16
16
 
17
- dayjs.extend(utc);
18
- dayjs.extend(timezone);
17
+ dayjs.extend(utc)
18
+ dayjs.extend(timezone)
19
19
 
20
20
  const meta = {
21
21
  title: 'Form/TimePicker',
@@ -25,9 +25,9 @@ const meta = {
25
25
  },
26
26
  tags: ['autodocs'],
27
27
  argTypes: {},
28
- } satisfies Meta<typeof TimePicker>;
28
+ } satisfies Meta<typeof TimePicker>
29
29
 
30
- export default meta;
30
+ export default meta
31
31
 
32
32
  export const BasicDatePicker = () => (
33
33
  <LocalizationProvider dateAdapter={AdapterDayjs}>
@@ -35,34 +35,50 @@ export const BasicDatePicker = () => (
35
35
  <TimePicker label="TimePicker" />
36
36
  </DemoContainer>
37
37
  </LocalizationProvider>
38
- );
38
+ )
39
39
 
40
- BasicDatePicker.storyName = 'TimePicker Basic';
40
+ BasicDatePicker.storyName = 'TimePicker Basic'
41
41
 
42
42
  export const TimePickerVariants = () => (
43
43
  <LocalizationProvider dateAdapter={AdapterDayjs}>
44
44
  <DemoContainer components={['TimePicker', 'MobileTimePicker', 'DesktopTimePicker']}>
45
45
  <div style={{ width: '480px', marginBottom: 30 }}>
46
- <TimePicker sx={{ minWidth: 275 }} label="TimePicker Responsive" timezone="America/Sao_Paulo" />
46
+ <TimePicker
47
+ sx={{ minWidth: 275 }}
48
+ label="TimePicker Responsive"
49
+ timezone="America/Sao_Paulo"
50
+ />
47
51
  </div>
48
52
  <div style={{ width: '480px', marginBottom: 30 }}>
49
- <MobileTimePicker sx={{ minWidth: 275 }} label="TimePicker Mobile" timezone="America/Sao_Paulo" />
53
+ <MobileTimePicker
54
+ sx={{ minWidth: 275 }}
55
+ label="TimePicker Mobile"
56
+ timezone="America/Sao_Paulo"
57
+ />
50
58
  </div>
51
59
  <div style={{ width: '480px', marginBottom: 30 }}>
52
- <DesktopTimePicker sx={{ minWidth: 275 }} label="TimePicker Desktop" timezone="America/Sao_Paulo" />
60
+ <DesktopTimePicker
61
+ sx={{ minWidth: 275 }}
62
+ label="TimePicker Desktop"
63
+ timezone="America/Sao_Paulo"
64
+ />
53
65
  </div>
54
66
  </DemoContainer>
55
67
  </LocalizationProvider>
56
- );
68
+ )
57
69
 
58
- TimePickerVariants.storyName = 'TimePicker Variants';
70
+ TimePickerVariants.storyName = 'TimePicker Variants'
59
71
 
60
72
  export const TimePickerLanguage = () => (
61
73
  <>
62
74
  <div style={{ width: '480px', marginBottom: 30 }}>
63
75
  <LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale={'pt-br'}>
64
76
  <DemoContainer components={['TimePicker']}>
65
- <TimePicker sx={{ minWidth: 275 }} label="TimePicker Brazil" timezone="America/Sao_Paulo" />
77
+ <TimePicker
78
+ sx={{ minWidth: 275 }}
79
+ label="TimePicker Brazil"
80
+ timezone="America/Sao_Paulo"
81
+ />
66
82
  </DemoContainer>
67
83
  </LocalizationProvider>
68
84
  </div>
@@ -70,18 +86,26 @@ export const TimePickerLanguage = () => (
70
86
  <div style={{ width: '480px', marginBottom: 30 }}>
71
87
  <LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale={'en'}>
72
88
  <DemoContainer components={['TimePicker']}>
73
- <TimePicker sx={{ minWidth: 275 }} label="TimePicker English" timezone="America/Sao_Paulo" />
89
+ <TimePicker
90
+ sx={{ minWidth: 275 }}
91
+ label="TimePicker English"
92
+ timezone="America/Sao_Paulo"
93
+ />
74
94
  </DemoContainer>
75
95
  </LocalizationProvider>
76
96
  </div>
77
97
  <div style={{ width: '480px', marginBottom: 30 }}>
78
98
  <LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale={'es'}>
79
99
  <DemoContainer components={['TimePicker']}>
80
- <TimePicker sx={{ minWidth: 275 }} label="TimePicker Spain" timezone="America/Sao_Paulo" />
100
+ <TimePicker
101
+ sx={{ minWidth: 275 }}
102
+ label="TimePicker Spain"
103
+ timezone="America/Sao_Paulo"
104
+ />
81
105
  </DemoContainer>
82
106
  </LocalizationProvider>
83
107
  </div>
84
108
  </>
85
- );
109
+ )
86
110
 
87
- TimePickerLanguage.storyName = 'TimePicker Languages';
111
+ TimePickerLanguage.storyName = 'TimePicker Languages'