norma-library 0.4.9 → 0.5.0
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/.babelrc.json +1 -1
- package/.husky/commit-msg +4 -0
- package/.prettierignore +11 -0
- package/.prettierrc.json +20 -0
- package/CHANGELOG.md +0 -0
- package/CONTRIBUTING.md +0 -0
- package/README.md +42 -0
- package/commitlint.config.js +1 -0
- package/dist/Button/index.d.ts +9 -0
- package/dist/Button/types.d.ts +18 -0
- package/dist/Card/Card.d.ts +3 -0
- package/dist/Card/CardHeader.d.ts +3 -0
- package/dist/Card/index.d.ts +4 -0
- package/dist/Card/styles.d.ts +546 -0
- package/dist/Card/types.d.ts +8 -0
- package/dist/esm/components/Accordion.d.ts +2 -2
- package/dist/esm/components/Accordion.js +8 -8
- package/dist/esm/components/Accordion.js.map +1 -1
- package/dist/esm/components/Avatar.d.ts +2 -2
- package/dist/esm/components/Avatar.js +7 -7
- package/dist/esm/components/Avatar.js.map +1 -1
- package/dist/esm/components/Badge.d.ts +2 -2
- package/dist/esm/components/Badge.js +5 -5
- package/dist/esm/components/Badge.js.map +1 -1
- package/dist/esm/components/Button.d.ts +2 -2
- package/dist/esm/components/Button.js +10 -10
- package/dist/esm/components/Button.js.map +1 -1
- package/dist/esm/components/Card.d.ts +3 -3
- package/dist/esm/components/Card.js +8 -8
- package/dist/esm/components/Card.js.map +1 -1
- package/dist/esm/components/ChatMessage.d.ts +2 -2
- package/dist/esm/components/ChatMessage.js +35 -35
- package/dist/esm/components/ChatMessage.js.map +1 -1
- package/dist/esm/components/CheckBox.d.ts +2 -2
- package/dist/esm/components/CheckBox.js +5 -5
- package/dist/esm/components/CheckBox.js.map +1 -1
- package/dist/esm/components/DataGrid/base/dropdown.d.ts +2 -2
- package/dist/esm/components/DataGrid/base/dropdown.js +32 -32
- package/dist/esm/components/DataGrid/base/dropdown.js.map +1 -1
- package/dist/esm/components/DataGrid/base/number-filter.d.ts +2 -2
- package/dist/esm/components/DataGrid/base/number-filter.js +21 -21
- package/dist/esm/components/DataGrid/base/sorting.d.ts +2 -2
- package/dist/esm/components/DataGrid/base/sorting.js +1 -1
- package/dist/esm/components/DataGrid/base/sorting.js.map +1 -1
- package/dist/esm/components/DataGrid/icons.d.ts +1 -1
- package/dist/esm/components/DataGrid/icons.js +1 -1
- package/dist/esm/components/DataGrid/icons.js.map +1 -1
- package/dist/esm/components/DataGrid/index.d.ts +2 -2
- package/dist/esm/components/DataGrid/index.js +35 -44
- package/dist/esm/components/DataGrid/index.js.map +1 -1
- package/dist/esm/components/DataGrid/shared.d.ts +1 -1
- package/dist/esm/components/DataGrid/shared.js +19 -32
- package/dist/esm/components/DataGrid/shared.js.map +1 -1
- package/dist/esm/components/DataGrid/styled.d.ts +2 -2
- package/dist/esm/components/DataGrid/styled.js +35 -35
- package/dist/esm/components/DataGrid/styled.js.map +1 -1
- package/dist/esm/components/DatePicker.d.ts +5 -5
- package/dist/esm/components/DatePicker.js +37 -37
- package/dist/esm/components/DatePicker.js.map +1 -1
- package/dist/esm/components/DropDown.d.ts +2 -2
- package/dist/esm/components/DropDown.js +6 -6
- package/dist/esm/components/DropDown.js.map +1 -1
- package/dist/esm/components/IconButton.d.ts +2 -2
- package/dist/esm/components/IconButton.js +7 -7
- package/dist/esm/components/IconButton.js.map +1 -1
- package/dist/esm/components/Icons.d.ts +2 -2
- package/dist/esm/components/Icons.js +10 -10
- package/dist/esm/components/Icons.js.map +1 -1
- package/dist/esm/components/Modal.d.ts +2 -2
- package/dist/esm/components/Modal.js +8 -8
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/components/Paper.d.ts +2 -2
- package/dist/esm/components/Paper.js +5 -5
- package/dist/esm/components/Paper.js.map +1 -1
- package/dist/esm/components/ProgressBar.d.ts +2 -2
- package/dist/esm/components/ProgressBar.js +11 -11
- package/dist/esm/components/ProgressBar.js.map +1 -1
- package/dist/esm/components/RadioGroup.d.ts +2 -2
- package/dist/esm/components/RadioGroup.js +7 -7
- package/dist/esm/components/RadioGroup.js.map +1 -1
- package/dist/esm/components/RangerSlider.d.ts +2 -2
- package/dist/esm/components/RangerSlider.js +31 -31
- package/dist/esm/components/RangerSlider.js.map +1 -1
- package/dist/esm/components/Select.d.ts +2 -2
- package/dist/esm/components/Select.js +14 -14
- package/dist/esm/components/Select.js.map +1 -1
- package/dist/esm/components/Svgs.d.ts +1 -1
- package/dist/esm/components/Svgs.js +1 -1
- package/dist/esm/components/Svgs.js.map +1 -1
- package/dist/esm/components/Tabs.d.ts +2 -2
- package/dist/esm/components/Tabs.js +25 -26
- package/dist/esm/components/Tabs.js.map +1 -1
- package/dist/esm/components/Tag.d.ts +2 -2
- package/dist/esm/components/Tag.js +8 -8
- package/dist/esm/components/Tag.js.map +1 -1
- package/dist/esm/components/TextField.d.ts +2 -2
- package/dist/esm/components/TextField.js +8 -8
- package/dist/esm/components/TextField.js.map +1 -1
- package/dist/esm/components/TimeLine.d.ts +2 -2
- package/dist/esm/components/TimeLine.js +20 -20
- package/dist/esm/components/TimeLine.js.map +1 -1
- package/dist/esm/components/TimePicker.d.ts +8 -8
- package/dist/esm/components/TimePicker.js +43 -43
- package/dist/esm/components/TimePicker.js.map +1 -1
- package/dist/esm/components/index.d.ts +23 -23
- package/dist/esm/components/index.js +23 -23
- package/dist/esm/helpers/alignments.js +7 -7
- package/dist/esm/helpers/borders.js +11 -11
- package/dist/esm/helpers/colors.js +41 -41
- package/dist/esm/helpers/index.d.ts +5 -5
- package/dist/esm/helpers/index.js +5 -5
- package/dist/esm/helpers/sizes.d.ts +1 -1
- package/dist/esm/helpers/sizes.js +39 -39
- package/dist/esm/helpers/sizes.js.map +1 -1
- package/dist/esm/index.d.ts +17 -17
- package/dist/esm/index.js +17 -17
- package/dist/esm/interfaces/Accordion.d.ts +3 -3
- package/dist/esm/interfaces/Avatar.d.ts +6 -6
- package/dist/esm/interfaces/Badge.d.ts +7 -7
- package/dist/esm/interfaces/Button.d.ts +5 -5
- package/dist/esm/interfaces/Card.d.ts +3 -3
- package/dist/esm/interfaces/ChatMessage.d.ts +1 -1
- package/dist/esm/interfaces/CheckBox.d.ts +10 -10
- package/dist/esm/interfaces/DataGrid.d.ts +4 -4
- package/dist/esm/interfaces/DatePicker.d.ts +3 -3
- package/dist/esm/interfaces/DropDown.d.ts +4 -4
- package/dist/esm/interfaces/IconButton.d.ts +5 -5
- package/dist/esm/interfaces/Icons.d.ts +3 -3
- package/dist/esm/interfaces/Modal.d.ts +3 -3
- package/dist/esm/interfaces/Paper.d.ts +4 -4
- package/dist/esm/interfaces/ProgressBar.d.ts +5 -5
- package/dist/esm/interfaces/RadioGroup.d.ts +4 -4
- package/dist/esm/interfaces/RangerSlider.d.ts +8 -8
- package/dist/esm/interfaces/Select.d.ts +3 -3
- package/dist/esm/interfaces/Tabs.d.ts +3 -3
- package/dist/esm/interfaces/Tag.d.ts +5 -5
- package/dist/esm/interfaces/TextField.d.ts +12 -12
- package/dist/esm/interfaces/TimeLine.d.ts +3 -3
- package/dist/esm/interfaces/TimePicker.d.ts +3 -3
- package/dist/esm/interfaces/index.d.ts +23 -23
- package/dist/esm/interfaces/index.js +23 -23
- package/dist/esm/types/index.d.ts +41 -41
- package/dist/esm/types/index.js +2 -2
- package/dist/esm/types/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +6992 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +266 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/docs/index.md +118 -0
- package/package.json +64 -8
- package/src/components/Accordion.tsx +47 -64
- package/src/components/Avatar.tsx +22 -29
- package/src/components/Badge.tsx +19 -22
- package/src/components/Button.tsx +12 -19
- package/src/components/Card.tsx +44 -47
- package/src/components/ChatMessage.tsx +87 -89
- package/src/components/CheckBox.tsx +8 -19
- package/src/components/DataGrid/allData.json +2918 -2918
- package/src/components/DataGrid/base/dropdown.tsx +212 -235
- package/src/components/DataGrid/base/number-filter.tsx +43 -43
- package/src/components/DataGrid/base/sorting.tsx +29 -35
- package/src/components/DataGrid/icons.tsx +53 -61
- package/src/components/DataGrid/index.tsx +254 -319
- package/src/components/DataGrid/shared.ts +154 -179
- package/src/components/DataGrid/styled.ts +96 -102
- package/src/components/DataGrid/styles/dropdown.module.css +86 -86
- package/src/components/DataGrid/styles/number-filter.module.css +16 -16
- package/src/components/DataGrid/styles/styles.module.css +107 -107
- package/src/components/DatePicker.tsx +73 -84
- package/src/components/DropDown.tsx +31 -38
- package/src/components/IconButton.tsx +12 -29
- package/src/components/Icons.tsx +82 -87
- package/src/components/Modal.tsx +114 -123
- package/src/components/Paper.tsx +19 -22
- package/src/components/ProgressBar.tsx +54 -63
- package/src/components/RadioGroup.tsx +47 -55
- package/src/components/RangerSlider.tsx +70 -81
- package/src/components/Select.tsx +82 -98
- package/src/components/Svgs.tsx +498 -522
- package/src/components/Tabs.tsx +111 -140
- package/src/components/Tag.tsx +37 -45
- package/src/components/TextField.tsx +11 -22
- package/src/components/TimeLine.tsx +93 -103
- package/src/components/TimePicker.tsx +84 -95
- package/src/components/index.ts +23 -23
- package/src/helpers/alignments.ts +7 -7
- package/src/helpers/borders.ts +11 -11
- package/src/helpers/colors.ts +42 -42
- package/src/helpers/index.ts +5 -5
- package/src/helpers/sizes.ts +39 -46
- package/src/index.ts +17 -17
- package/src/interfaces/Accordion.ts +12 -12
- package/src/interfaces/Avatar.tsx +15 -18
- package/src/interfaces/Badge.ts +19 -32
- package/src/interfaces/Button.ts +5 -10
- package/src/interfaces/Card.ts +11 -11
- package/src/interfaces/ChatMessage.ts +12 -12
- package/src/interfaces/CheckBox.ts +12 -18
- package/src/interfaces/DataGrid.ts +46 -51
- package/src/interfaces/DatePicker.ts +13 -13
- package/src/interfaces/DropDown.ts +14 -14
- package/src/interfaces/IconButton.ts +5 -10
- package/src/interfaces/Icons.ts +17 -17
- package/src/interfaces/Modal.ts +15 -15
- package/src/interfaces/Paper.ts +12 -12
- package/src/interfaces/ProgressBar.ts +18 -25
- package/src/interfaces/RadioGroup.ts +22 -28
- package/src/interfaces/RangerSlider.ts +21 -32
- package/src/interfaces/Select.ts +17 -17
- package/src/interfaces/Tabs.ts +19 -24
- package/src/interfaces/Tag.ts +17 -17
- package/src/interfaces/TextField.ts +14 -34
- package/src/interfaces/TimeLine.ts +11 -16
- package/src/interfaces/TimePicker.ts +13 -13
- package/src/interfaces/index.ts +23 -23
- package/src/sample-data.json +178 -178
- package/src/stories/Accordion.stories.tsx +65 -65
- package/src/stories/Avatar.stories.tsx +123 -139
- package/src/stories/Badge.stories.tsx +39 -47
- package/src/stories/Button.stories.tsx +18 -26
- package/src/stories/Card.stories.tsx +40 -55
- package/src/stories/ChatMessage.stories.tsx +84 -85
- package/src/stories/CheckBox.stories.tsx +17 -23
- package/src/stories/DataGrid.stories.tsx +28 -28
- package/src/stories/DatePicker.stories.tsx +50 -77
- package/src/stories/DropDown.stories.tsx +57 -57
- package/src/stories/IconButton.stories.tsx +78 -114
- package/src/stories/Modal.stories.tsx +190 -190
- package/src/stories/Paper.stories.tsx +53 -53
- package/src/stories/ProgressBar.stories.tsx +95 -139
- package/src/stories/RadioGroup.stories.tsx +21 -28
- package/src/stories/RangerSlider.stories.tsx +58 -68
- package/src/stories/Select.stories.tsx +100 -128
- package/src/stories/Tabs.stories.tsx +62 -62
- package/src/stories/Tag.stories.tsx +56 -74
- package/src/stories/TextField.stories.tsx +54 -189
- package/src/stories/TimeLine.stories.tsx +35 -43
- package/src/stories/TimePicker.stories.tsx +87 -113
- package/src/types/index.ts +90 -155
- package/tsconfig.json +1 -1
- package/buildcache/front-end +0 -1
- package/norma-library.tar +0 -0
- package/postcss.config.js +0 -6
- package/tailwind.config.js +0 -58
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import Box from
|
|
4
|
-
import type { Meta, StoryObj } from
|
|
5
|
-
import { TextField } from
|
|
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
|
-
title:
|
|
8
|
+
title: 'Form/TextField',
|
|
9
9
|
component: TextField,
|
|
10
10
|
parameters: {
|
|
11
|
-
layout:
|
|
11
|
+
layout: 'centered',
|
|
12
12
|
},
|
|
13
|
-
tags: [
|
|
13
|
+
tags: ['autodocs'],
|
|
14
14
|
argTypes: {},
|
|
15
15
|
} satisfies Meta<typeof TextField>;
|
|
16
16
|
|
|
@@ -24,10 +24,10 @@ const defaultArgs = {
|
|
|
24
24
|
|
|
25
25
|
export const Playground: Story = {
|
|
26
26
|
args: {
|
|
27
|
-
label:
|
|
28
|
-
id:
|
|
29
|
-
color:
|
|
30
|
-
variant:
|
|
27
|
+
label: 'Nome',
|
|
28
|
+
id: 'input-demo',
|
|
29
|
+
color: 'primary',
|
|
30
|
+
variant: 'standard',
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -38,25 +38,20 @@ export const TextFieldVariant = () => (
|
|
|
38
38
|
<TextField variant="outlined" label="Variant Outlined" />
|
|
39
39
|
</>
|
|
40
40
|
);
|
|
41
|
-
TextFieldVariant.storyName =
|
|
41
|
+
TextFieldVariant.storyName = 'TextField Variants';
|
|
42
42
|
|
|
43
43
|
export const TextFieldValidation = () => (
|
|
44
|
-
<div style={{ display:
|
|
44
|
+
<div style={{ display: 'flex', gap: '1rem', margin: 15 }}>
|
|
45
45
|
<Box
|
|
46
46
|
component="form"
|
|
47
47
|
sx={{
|
|
48
|
-
|
|
48
|
+
'& .MuiTextField-root': { m: 1, width: '100%' },
|
|
49
49
|
}}
|
|
50
50
|
noValidate
|
|
51
51
|
autoComplete="off"
|
|
52
52
|
>
|
|
53
53
|
<div>
|
|
54
|
-
<TextField
|
|
55
|
-
error
|
|
56
|
-
id="outlined-error"
|
|
57
|
-
label="Error"
|
|
58
|
-
defaultValue="Hello World"
|
|
59
|
-
/>
|
|
54
|
+
<TextField error id="outlined-error" label="Error" defaultValue="Hello World" />
|
|
60
55
|
<TextField
|
|
61
56
|
error
|
|
62
57
|
id="outlined-error-helper-text"
|
|
@@ -66,13 +61,7 @@ export const TextFieldValidation = () => (
|
|
|
66
61
|
/>
|
|
67
62
|
</div>
|
|
68
63
|
<div>
|
|
69
|
-
<TextField
|
|
70
|
-
error
|
|
71
|
-
id="filled-error"
|
|
72
|
-
label="Error"
|
|
73
|
-
defaultValue="Hello World"
|
|
74
|
-
variant="filled"
|
|
75
|
-
/>
|
|
64
|
+
<TextField error id="filled-error" label="Error" defaultValue="Hello World" variant="filled" />
|
|
76
65
|
<TextField
|
|
77
66
|
error
|
|
78
67
|
id="filled-error-helper-text"
|
|
@@ -83,13 +72,7 @@ export const TextFieldValidation = () => (
|
|
|
83
72
|
/>
|
|
84
73
|
</div>
|
|
85
74
|
<div>
|
|
86
|
-
<TextField
|
|
87
|
-
error
|
|
88
|
-
id="standard-error"
|
|
89
|
-
label="Error"
|
|
90
|
-
defaultValue="Hello World"
|
|
91
|
-
variant="standard"
|
|
92
|
-
/>
|
|
75
|
+
<TextField error id="standard-error" label="Error" defaultValue="Hello World" variant="standard" />
|
|
93
76
|
<TextField
|
|
94
77
|
error
|
|
95
78
|
id="standard-error-helper-text"
|
|
@@ -102,47 +85,25 @@ export const TextFieldValidation = () => (
|
|
|
102
85
|
</Box>
|
|
103
86
|
</div>
|
|
104
87
|
);
|
|
105
|
-
TextFieldValidation.storyName =
|
|
88
|
+
TextFieldValidation.storyName = 'TextField Validation';
|
|
106
89
|
|
|
107
90
|
export const TextFieldMultiline = () => (
|
|
108
|
-
<div style={{ display:
|
|
91
|
+
<div style={{ display: 'flex', gap: '1rem', margin: 15 }}>
|
|
109
92
|
<Box
|
|
110
93
|
component="form"
|
|
111
94
|
sx={{
|
|
112
|
-
|
|
95
|
+
'& .MuiTextField-root': { m: 1, width: '100%' },
|
|
113
96
|
}}
|
|
114
97
|
noValidate
|
|
115
98
|
autoComplete="off"
|
|
116
99
|
>
|
|
117
100
|
<div>
|
|
118
|
-
<TextField
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
multiline
|
|
122
|
-
maxRows={4}
|
|
123
|
-
/>
|
|
124
|
-
<TextField
|
|
125
|
-
id="outlined-textarea"
|
|
126
|
-
label="Multiline Placeholder"
|
|
127
|
-
placeholder="Placeholder"
|
|
128
|
-
multiline
|
|
129
|
-
/>
|
|
130
|
-
<TextField
|
|
131
|
-
id="outlined-multiline-static"
|
|
132
|
-
label="Multiline"
|
|
133
|
-
multiline
|
|
134
|
-
rows={4}
|
|
135
|
-
defaultValue="Default Value"
|
|
136
|
-
/>
|
|
101
|
+
<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" />
|
|
137
104
|
</div>
|
|
138
105
|
<div>
|
|
139
|
-
<TextField
|
|
140
|
-
id="filled-multiline-flexible"
|
|
141
|
-
label="Multiline"
|
|
142
|
-
multiline
|
|
143
|
-
maxRows={4}
|
|
144
|
-
variant="filled"
|
|
145
|
-
/>
|
|
106
|
+
<TextField id="filled-multiline-flexible" label="Multiline" multiline maxRows={4} variant="filled" />
|
|
146
107
|
<TextField
|
|
147
108
|
id="filled-textarea"
|
|
148
109
|
label="Multiline Placeholder"
|
|
@@ -160,13 +121,7 @@ export const TextFieldMultiline = () => (
|
|
|
160
121
|
/>
|
|
161
122
|
</div>
|
|
162
123
|
<div>
|
|
163
|
-
<TextField
|
|
164
|
-
id="standard-multiline-flexible"
|
|
165
|
-
label="Multiline"
|
|
166
|
-
multiline
|
|
167
|
-
maxRows={4}
|
|
168
|
-
variant="standard"
|
|
169
|
-
/>
|
|
124
|
+
<TextField id="standard-multiline-flexible" label="Multiline" multiline maxRows={4} variant="standard" />
|
|
170
125
|
<TextField
|
|
171
126
|
id="standard-textarea"
|
|
172
127
|
label="Multiline Placeholder"
|
|
@@ -186,127 +141,71 @@ export const TextFieldMultiline = () => (
|
|
|
186
141
|
</Box>
|
|
187
142
|
</div>
|
|
188
143
|
);
|
|
189
|
-
TextFieldMultiline.storyName =
|
|
144
|
+
TextFieldMultiline.storyName = 'TextField Multiline';
|
|
190
145
|
|
|
191
146
|
export const TextFieldSizes = () => (
|
|
192
|
-
<div style={{ display:
|
|
147
|
+
<div style={{ display: 'flex', gap: '1rem', margin: 15 }}>
|
|
193
148
|
<Box
|
|
194
149
|
component="form"
|
|
195
150
|
sx={{
|
|
196
|
-
|
|
151
|
+
'& .MuiTextField-root': { m: 1, width: '100%' },
|
|
197
152
|
}}
|
|
198
153
|
noValidate
|
|
199
154
|
autoComplete="off"
|
|
200
155
|
>
|
|
201
156
|
<div>
|
|
202
|
-
<TextField
|
|
203
|
-
|
|
204
|
-
id="outlined-size-small"
|
|
205
|
-
defaultValue="Small"
|
|
206
|
-
size="small"
|
|
207
|
-
/>
|
|
208
|
-
<TextField
|
|
209
|
-
label="Size"
|
|
210
|
-
id="outlined-size-normal"
|
|
211
|
-
defaultValue="Normal"
|
|
212
|
-
/>
|
|
157
|
+
<TextField label="Size" id="outlined-size-small" defaultValue="Small" size="small" />
|
|
158
|
+
<TextField label="Size" id="outlined-size-normal" defaultValue="Normal" />
|
|
213
159
|
</div>
|
|
214
160
|
<div>
|
|
215
|
-
<TextField
|
|
216
|
-
|
|
217
|
-
id="filled-size-small"
|
|
218
|
-
defaultValue="Small"
|
|
219
|
-
variant="filled"
|
|
220
|
-
size="small"
|
|
221
|
-
/>
|
|
222
|
-
<TextField
|
|
223
|
-
label="Size"
|
|
224
|
-
id="filled-size-normal"
|
|
225
|
-
defaultValue="Normal"
|
|
226
|
-
variant="filled"
|
|
227
|
-
/>
|
|
161
|
+
<TextField label="Size" id="filled-size-small" defaultValue="Small" variant="filled" size="small" />
|
|
162
|
+
<TextField label="Size" id="filled-size-normal" defaultValue="Normal" variant="filled" />
|
|
228
163
|
</div>
|
|
229
164
|
<div>
|
|
230
|
-
<TextField
|
|
231
|
-
|
|
232
|
-
id="standard-size-small"
|
|
233
|
-
defaultValue="Small"
|
|
234
|
-
size="small"
|
|
235
|
-
variant="standard"
|
|
236
|
-
/>
|
|
237
|
-
<TextField
|
|
238
|
-
label="Size"
|
|
239
|
-
id="standard-size-normal"
|
|
240
|
-
defaultValue="Normal"
|
|
241
|
-
variant="standard"
|
|
242
|
-
/>
|
|
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" />
|
|
243
167
|
</div>
|
|
244
168
|
</Box>
|
|
245
169
|
</div>
|
|
246
170
|
);
|
|
247
|
-
TextFieldSizes.storyName =
|
|
171
|
+
TextFieldSizes.storyName = 'TextField Sizes';
|
|
248
172
|
|
|
249
173
|
export const TextFieldColors = () => (
|
|
250
|
-
<div style={{ display:
|
|
174
|
+
<div style={{ display: 'flex', gap: '1rem', margin: 15 }}>
|
|
251
175
|
<Box
|
|
252
176
|
component="form"
|
|
253
177
|
sx={{
|
|
254
|
-
|
|
178
|
+
'& > :not(style)': { m: 1, width: '100%' },
|
|
255
179
|
}}
|
|
256
180
|
noValidate
|
|
257
181
|
autoComplete="off"
|
|
258
182
|
>
|
|
259
183
|
<TextField label="Outlined Primary" color="primary" focused />
|
|
260
184
|
<TextField label="Outlined secondary" color="secondary" focused />
|
|
261
|
-
<TextField
|
|
262
|
-
|
|
263
|
-
variant="filled"
|
|
264
|
-
color="success"
|
|
265
|
-
focused
|
|
266
|
-
/>
|
|
267
|
-
<TextField
|
|
268
|
-
label="Standard warning"
|
|
269
|
-
variant="standard"
|
|
270
|
-
color="warning"
|
|
271
|
-
focused
|
|
272
|
-
/>
|
|
185
|
+
<TextField label="Filled success" variant="filled" color="success" focused />
|
|
186
|
+
<TextField label="Standard warning" variant="standard" color="warning" focused />
|
|
273
187
|
</Box>
|
|
274
188
|
</div>
|
|
275
189
|
);
|
|
276
|
-
TextFieldColors.storyName =
|
|
190
|
+
TextFieldColors.storyName = 'TextField Colors';
|
|
277
191
|
|
|
278
192
|
export const TextFieldProps = () => (
|
|
279
|
-
<div style={{ display:
|
|
193
|
+
<div style={{ display: 'flex', gap: '1rem', margin: 15 }}>
|
|
280
194
|
<Box
|
|
281
195
|
component="form"
|
|
282
196
|
sx={{
|
|
283
|
-
|
|
284
|
-
display:
|
|
285
|
-
gap:
|
|
197
|
+
'& .MuiTextField-root': { m: 1, width: '100%' },
|
|
198
|
+
display: 'flex',
|
|
199
|
+
gap: '1rem',
|
|
286
200
|
margin: 15,
|
|
287
201
|
}}
|
|
288
202
|
noValidate
|
|
289
203
|
autoComplete="off"
|
|
290
204
|
>
|
|
291
205
|
<div>
|
|
292
|
-
<TextField
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
label="Required"
|
|
296
|
-
defaultValue="Hello World"
|
|
297
|
-
/>
|
|
298
|
-
<TextField
|
|
299
|
-
disabled
|
|
300
|
-
id="outlined-disabled"
|
|
301
|
-
label="Disabled"
|
|
302
|
-
defaultValue="Hello World"
|
|
303
|
-
/>
|
|
304
|
-
<TextField
|
|
305
|
-
id="outlined-password-input"
|
|
306
|
-
label="Password"
|
|
307
|
-
type="password"
|
|
308
|
-
autoComplete="current-password"
|
|
309
|
-
/>
|
|
206
|
+
<TextField required id="outlined-required" label="Required" defaultValue="Hello World" />
|
|
207
|
+
<TextField disabled id="outlined-disabled" label="Disabled" defaultValue="Hello World" />
|
|
208
|
+
<TextField id="outlined-password-input" label="Password" type="password" autoComplete="current-password" />
|
|
310
209
|
<TextField
|
|
311
210
|
id="outlined-read-only-input"
|
|
312
211
|
label="Read Only"
|
|
@@ -332,20 +231,8 @@ export const TextFieldProps = () => (
|
|
|
332
231
|
/>
|
|
333
232
|
</div>
|
|
334
233
|
<div>
|
|
335
|
-
<TextField
|
|
336
|
-
|
|
337
|
-
id="filled-required"
|
|
338
|
-
label="Required"
|
|
339
|
-
defaultValue="Hello World"
|
|
340
|
-
variant="filled"
|
|
341
|
-
/>
|
|
342
|
-
<TextField
|
|
343
|
-
disabled
|
|
344
|
-
id="filled-disabled"
|
|
345
|
-
label="Disabled"
|
|
346
|
-
defaultValue="Hello World"
|
|
347
|
-
variant="filled"
|
|
348
|
-
/>
|
|
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" />
|
|
349
236
|
<TextField
|
|
350
237
|
id="filled-password-input"
|
|
351
238
|
label="Password"
|
|
@@ -371,12 +258,7 @@ export const TextFieldProps = () => (
|
|
|
371
258
|
}}
|
|
372
259
|
variant="filled"
|
|
373
260
|
/>
|
|
374
|
-
<TextField
|
|
375
|
-
id="filled-search"
|
|
376
|
-
label="Search field"
|
|
377
|
-
type="search"
|
|
378
|
-
variant="filled"
|
|
379
|
-
/>
|
|
261
|
+
<TextField id="filled-search" label="Search field" type="search" variant="filled" />
|
|
380
262
|
<TextField
|
|
381
263
|
id="filled-helperText"
|
|
382
264
|
label="Helper text"
|
|
@@ -386,20 +268,8 @@ export const TextFieldProps = () => (
|
|
|
386
268
|
/>
|
|
387
269
|
</div>
|
|
388
270
|
<div>
|
|
389
|
-
<TextField
|
|
390
|
-
|
|
391
|
-
id="standard-required"
|
|
392
|
-
label="Required"
|
|
393
|
-
defaultValue="Hello World"
|
|
394
|
-
variant="standard"
|
|
395
|
-
/>
|
|
396
|
-
<TextField
|
|
397
|
-
disabled
|
|
398
|
-
id="standard-disabled"
|
|
399
|
-
label="Disabled"
|
|
400
|
-
defaultValue="Hello World"
|
|
401
|
-
variant="standard"
|
|
402
|
-
/>
|
|
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" />
|
|
403
273
|
<TextField
|
|
404
274
|
id="standard-password-input"
|
|
405
275
|
label="Password"
|
|
@@ -425,12 +295,7 @@ export const TextFieldProps = () => (
|
|
|
425
295
|
}}
|
|
426
296
|
variant="standard"
|
|
427
297
|
/>
|
|
428
|
-
<TextField
|
|
429
|
-
id="standard-search"
|
|
430
|
-
label="Search field"
|
|
431
|
-
type="search"
|
|
432
|
-
variant="standard"
|
|
433
|
-
/>
|
|
298
|
+
<TextField id="standard-search" label="Search field" type="search" variant="standard" />
|
|
434
299
|
<TextField
|
|
435
300
|
id="standard-helperText"
|
|
436
301
|
label="Helper text"
|
|
@@ -442,4 +307,4 @@ export const TextFieldProps = () => (
|
|
|
442
307
|
</Box>
|
|
443
308
|
</div>
|
|
444
309
|
);
|
|
445
|
-
TextFieldProps.storyName =
|
|
310
|
+
TextFieldProps.storyName = 'TextField Props';
|
|
@@ -1,43 +1,35 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
|
|
3
|
-
import type { Meta } from
|
|
4
|
-
import { TimeLine } from
|
|
5
|
-
import { Stack } from
|
|
6
|
-
|
|
7
|
-
const meta = {
|
|
8
|
-
title:
|
|
9
|
-
component: TimeLine,
|
|
10
|
-
parameters: {
|
|
11
|
-
layout:
|
|
12
|
-
},
|
|
13
|
-
tags: [
|
|
14
|
-
argTypes: {},
|
|
15
|
-
} satisfies Meta<typeof TimeLine>;
|
|
16
|
-
|
|
17
|
-
export default meta;
|
|
18
|
-
|
|
19
|
-
export const TimeLineBasic = () => {
|
|
20
|
-
return (
|
|
21
|
-
<>
|
|
22
|
-
<TimeLine />
|
|
23
|
-
</>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const TimeLineColors = () => {
|
|
28
|
-
return (
|
|
29
|
-
<Stack direction="row" spacing={2}>
|
|
30
|
-
{[
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"success",
|
|
37
|
-
"warning",
|
|
38
|
-
].map((color, key) => (
|
|
39
|
-
<TimeLine color={color} key={key} />
|
|
40
|
-
))}
|
|
41
|
-
</Stack>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { Meta } from '@storybook/react';
|
|
4
|
+
import { TimeLine } from '../components';
|
|
5
|
+
import { Stack } from '@mui/material';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Display/TimeLine',
|
|
9
|
+
component: TimeLine,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
},
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
argTypes: {},
|
|
15
|
+
} satisfies Meta<typeof TimeLine>;
|
|
16
|
+
|
|
17
|
+
export default meta;
|
|
18
|
+
|
|
19
|
+
export const TimeLineBasic = () => {
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
<TimeLine />
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const TimeLineColors = () => {
|
|
28
|
+
return (
|
|
29
|
+
<Stack direction="row" spacing={2}>
|
|
30
|
+
{['primary', 'secondary', 'inherit', 'error', 'info', 'success', 'warning'].map((color, key) => (
|
|
31
|
+
<TimeLine color={color} key={key} />
|
|
32
|
+
))}
|
|
33
|
+
</Stack>
|
|
34
|
+
);
|
|
35
|
+
};
|