@indico-data/design-system 3.0.9 → 3.1.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/.storybook/main.ts +3 -0
- package/lib/components/badge/types.d.ts +4 -0
- package/lib/components/button/types.d.ts +52 -2
- package/lib/components/card/Card.d.ts +5 -0
- package/lib/components/floatUI/types.d.ts +7 -0
- package/lib/components/forms/checkbox/Checkbox.d.ts +7 -0
- package/lib/components/forms/date/datePicker/types.d.ts +13 -0
- package/lib/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.d.ts +21 -0
- package/lib/components/forms/date/inputDatePicker/SingleInputDatePicker.d.ts +13 -0
- package/lib/components/forms/date/inputDateRangePicker/InputDateRangePicker.d.ts +14 -0
- package/lib/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.d.ts +14 -0
- package/lib/components/forms/numberInput/NumberInput.d.ts +4 -0
- package/lib/components/forms/passwordInput/PasswordInput.d.ts +1 -0
- package/lib/components/forms/radio/Radio.d.ts +6 -0
- package/lib/components/forms/select/Select.d.ts +10 -0
- package/lib/components/forms/textarea/Textarea.d.ts +7 -0
- package/lib/components/forms/timePicker/TimePicker.d.ts +5 -0
- package/lib/components/forms/toggle/Toggle.d.ts +7 -0
- package/lib/components/icons/types.d.ts +5 -0
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.d.ts +4 -0
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.d.ts +2 -0
- package/lib/components/menu/Menu.d.ts +1 -0
- package/lib/components/modal/types.d.ts +22 -0
- package/lib/components/pagination/types.d.ts +4 -0
- package/lib/components/pill/types.d.ts +3 -0
- package/lib/components/skeleton/Skeleton.d.ts +5 -0
- package/lib/components/stepper/types.d.ts +9 -0
- package/lib/components/table/types.d.ts +9 -0
- package/lib/components/tanstackTable/TankstackTable.types.d.ts +25 -0
- package/lib/components/tanstackTable/components/ActionBar/ActionBar.d.ts +4 -0
- package/lib/components/tooltip/Tooltip.d.ts +6 -0
- package/lib/components/truncate/types.d.ts +4 -0
- package/lib/index.css +10 -0
- package/lib/index.d.ts +277 -2
- package/lib/index.esm.css +10 -0
- package/lib/index.esm.js +124 -119
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +124 -119
- package/lib/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/badge/Badge.stories.tsx +0 -4
- package/src/components/badge/types.ts +4 -0
- package/src/components/button/Button.stories.tsx +5 -18
- package/src/components/button/types.ts +52 -2
- package/src/components/card/Card.stories.tsx +0 -5
- package/src/components/card/Card.tsx +5 -0
- package/src/components/floatUI/FloatUI.stories.tsx +0 -11
- package/src/components/floatUI/types.ts +7 -0
- package/src/components/forms/checkbox/Checkbox.stories.tsx +0 -7
- package/src/components/forms/checkbox/Checkbox.tsx +7 -0
- package/src/components/forms/date/datePicker/DatePicker.stories.tsx +0 -33
- package/src/components/forms/date/datePicker/styles/DatePicker.scss +10 -0
- package/src/components/forms/date/datePicker/types.ts +14 -0
- package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.stories.tsx +32 -19
- package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.tsx +31 -1
- package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.stories.tsx +27 -22
- package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.tsx +23 -2
- package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.stories.tsx +23 -32
- package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.tsx +24 -2
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.stories.tsx +23 -28
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.tsx +25 -1
- package/src/components/forms/numberInput/NumberInput.stories.tsx +0 -4
- package/src/components/forms/numberInput/NumberInput.tsx +4 -0
- package/src/components/forms/passwordInput/PasswordInput.stories.tsx +0 -1
- package/src/components/forms/passwordInput/PasswordInput.tsx +1 -0
- package/src/components/forms/radio/Radio.stories.tsx +0 -6
- package/src/components/forms/radio/Radio.tsx +6 -0
- package/src/components/forms/select/Select.stories.tsx +1 -14
- package/src/components/forms/select/Select.tsx +10 -0
- package/src/components/forms/textarea/Textarea.stories.tsx +0 -7
- package/src/components/forms/textarea/Textarea.tsx +7 -0
- package/src/components/forms/timePicker/TimePicker.stories.tsx +0 -5
- package/src/components/forms/timePicker/TimePicker.tsx +26 -1
- package/src/components/forms/timePicker/__tests__/TimePicker.test.tsx +4 -2
- package/src/components/forms/toggle/Toggle.stories.tsx +0 -7
- package/src/components/forms/toggle/Toggle.tsx +7 -0
- package/src/components/icons/Icon.stories.tsx +0 -7
- package/src/components/icons/types.ts +5 -0
- package/src/components/loading-indicators/BarSpinner/BarSpinner.stories.tsx +0 -5
- package/src/components/loading-indicators/BarSpinner/BarSpinner.tsx +4 -0
- package/src/components/loading-indicators/CirclePulse/CirclePulse.stories.tsx +0 -3
- package/src/components/loading-indicators/CirclePulse/CirclePulse.tsx +2 -0
- package/src/components/menu/Menu.stories.tsx +0 -3
- package/src/components/menu/Menu.tsx +1 -0
- package/src/components/modal/Modal.stories.tsx +1 -25
- package/src/components/modal/types.ts +22 -0
- package/src/components/pagination/Pagination.stories.tsx +0 -4
- package/src/components/pagination/types.ts +4 -0
- package/src/components/pill/Pill.stories.tsx +0 -3
- package/src/components/pill/types.ts +3 -0
- package/src/components/skeleton/Skeleton.stories.tsx +0 -7
- package/src/components/skeleton/Skeleton.tsx +5 -0
- package/src/components/stepper/Stepper.stories.tsx +0 -19
- package/src/components/stepper/types.ts +9 -0
- package/src/components/table/Table.stories.tsx +0 -35
- package/src/components/table/types.ts +9 -0
- package/src/components/tanstackTable/TankstackTable.types.ts +25 -0
- package/src/components/tanstackTable/TanstackTable.stories.tsx +0 -29
- package/src/components/tanstackTable/components/ActionBar/ActionBar.stories.tsx +0 -4
- package/src/components/tanstackTable/components/ActionBar/ActionBar.tsx +4 -0
- package/src/components/tooltip/Tooltip.stories.tsx +0 -8
- package/src/components/tooltip/Tooltip.tsx +6 -0
- package/src/components/truncate/Truncate.stories.tsx +0 -8
- package/src/components/truncate/types.ts +4 -0
|
@@ -16,7 +16,6 @@ const meta: Meta = {
|
|
|
16
16
|
argTypes: {
|
|
17
17
|
className: {
|
|
18
18
|
control: 'text',
|
|
19
|
-
description: 'Additional classes for the badge component',
|
|
20
19
|
table: {
|
|
21
20
|
category: 'Props',
|
|
22
21
|
type: {
|
|
@@ -26,7 +25,6 @@ const meta: Meta = {
|
|
|
26
25
|
},
|
|
27
26
|
children: {
|
|
28
27
|
control: false,
|
|
29
|
-
description: 'The content of the badge (superseded by the string prop)',
|
|
30
28
|
table: {
|
|
31
29
|
category: 'Props',
|
|
32
30
|
type: {
|
|
@@ -36,7 +34,6 @@ const meta: Meta = {
|
|
|
36
34
|
},
|
|
37
35
|
isOpen: {
|
|
38
36
|
control: false,
|
|
39
|
-
description: 'Whether the modal is open',
|
|
40
37
|
table: {
|
|
41
38
|
category: 'Props',
|
|
42
39
|
type: {
|
|
@@ -46,7 +43,6 @@ const meta: Meta = {
|
|
|
46
43
|
},
|
|
47
44
|
onRequestClose: {
|
|
48
45
|
control: false,
|
|
49
|
-
description: 'Callback function to be called when the modal is closed',
|
|
50
46
|
table: {
|
|
51
47
|
category: 'Props',
|
|
52
48
|
type: {
|
|
@@ -56,7 +52,6 @@ const meta: Meta = {
|
|
|
56
52
|
},
|
|
57
53
|
portalClassName: {
|
|
58
54
|
control: false,
|
|
59
|
-
description: 'Additional classes for the portal element',
|
|
60
55
|
table: {
|
|
61
56
|
category: 'Props',
|
|
62
57
|
type: {
|
|
@@ -66,7 +61,6 @@ const meta: Meta = {
|
|
|
66
61
|
},
|
|
67
62
|
overlayClassName: {
|
|
68
63
|
control: false,
|
|
69
|
-
description: 'Additional classes for the overlay element',
|
|
70
64
|
table: {
|
|
71
65
|
category: 'Props',
|
|
72
66
|
type: {
|
|
@@ -76,7 +70,6 @@ const meta: Meta = {
|
|
|
76
70
|
},
|
|
77
71
|
appElement: {
|
|
78
72
|
control: false,
|
|
79
|
-
description: 'The element to use as the app element',
|
|
80
73
|
table: {
|
|
81
74
|
category: 'Props',
|
|
82
75
|
type: {
|
|
@@ -86,7 +79,6 @@ const meta: Meta = {
|
|
|
86
79
|
},
|
|
87
80
|
shouldCloseOnOverlayClick: {
|
|
88
81
|
control: 'boolean',
|
|
89
|
-
description: 'Whether the modal should close when the overlay is clicked',
|
|
90
82
|
table: {
|
|
91
83
|
category: 'Props',
|
|
92
84
|
type: {
|
|
@@ -96,18 +88,15 @@ const meta: Meta = {
|
|
|
96
88
|
},
|
|
97
89
|
parentSelector: {
|
|
98
90
|
control: false,
|
|
99
|
-
description:
|
|
100
|
-
'The element to use as the parent element for the modal. If you have issues with styling, make sure you pass the correct root element here.',
|
|
101
91
|
table: {
|
|
102
92
|
category: 'Props',
|
|
103
93
|
type: {
|
|
104
|
-
summary: '
|
|
94
|
+
summary: 'function',
|
|
105
95
|
},
|
|
106
96
|
},
|
|
107
97
|
},
|
|
108
98
|
shouldCloseOnEsc: {
|
|
109
99
|
control: 'boolean',
|
|
110
|
-
description: 'Whether the modal should close when the escape key is pressed',
|
|
111
100
|
table: {
|
|
112
101
|
category: 'Props',
|
|
113
102
|
type: {
|
|
@@ -117,7 +106,6 @@ const meta: Meta = {
|
|
|
117
106
|
},
|
|
118
107
|
contentElement: {
|
|
119
108
|
control: false,
|
|
120
|
-
description: 'Custom content element for the modal',
|
|
121
109
|
table: {
|
|
122
110
|
category: 'Props',
|
|
123
111
|
type: {
|
|
@@ -127,7 +115,6 @@ const meta: Meta = {
|
|
|
127
115
|
},
|
|
128
116
|
overlayElement: {
|
|
129
117
|
control: false,
|
|
130
|
-
description: 'Custom overlay element for the modal',
|
|
131
118
|
table: {
|
|
132
119
|
category: 'Props',
|
|
133
120
|
type: {
|
|
@@ -138,7 +125,6 @@ const meta: Meta = {
|
|
|
138
125
|
position: {
|
|
139
126
|
control: 'select',
|
|
140
127
|
options: ['top', 'center'],
|
|
141
|
-
description: 'The position of the modal opens on the page',
|
|
142
128
|
table: {
|
|
143
129
|
category: 'Props',
|
|
144
130
|
type: {
|
|
@@ -153,7 +139,6 @@ const meta: Meta = {
|
|
|
153
139
|
},
|
|
154
140
|
title: {
|
|
155
141
|
control: 'text',
|
|
156
|
-
description: 'The title of the modal',
|
|
157
142
|
table: {
|
|
158
143
|
category: 'Props',
|
|
159
144
|
type: {
|
|
@@ -163,7 +148,6 @@ const meta: Meta = {
|
|
|
163
148
|
},
|
|
164
149
|
footer: {
|
|
165
150
|
control: false,
|
|
166
|
-
description: 'The footer of the modal. It accepts a React Component',
|
|
167
151
|
table: {
|
|
168
152
|
category: 'Props',
|
|
169
153
|
type: {
|
|
@@ -173,7 +157,6 @@ const meta: Meta = {
|
|
|
173
157
|
},
|
|
174
158
|
subtitle: {
|
|
175
159
|
control: 'text',
|
|
176
|
-
description: 'The subtitle of the modal',
|
|
177
160
|
table: {
|
|
178
161
|
category: 'Props',
|
|
179
162
|
type: {
|
|
@@ -183,7 +166,6 @@ const meta: Meta = {
|
|
|
183
166
|
},
|
|
184
167
|
maxWidthInPixels: {
|
|
185
168
|
control: 'number',
|
|
186
|
-
description: 'The maximum width of the modal in pixels',
|
|
187
169
|
table: {
|
|
188
170
|
category: 'Props',
|
|
189
171
|
type: {
|
|
@@ -193,7 +175,6 @@ const meta: Meta = {
|
|
|
193
175
|
},
|
|
194
176
|
confirmationButtonText: {
|
|
195
177
|
control: 'text',
|
|
196
|
-
description: 'The text of the confirmation button',
|
|
197
178
|
table: {
|
|
198
179
|
category: 'Confirmation Modal',
|
|
199
180
|
type: {
|
|
@@ -204,7 +185,6 @@ const meta: Meta = {
|
|
|
204
185
|
confirmationButtonVariant: {
|
|
205
186
|
control: 'select',
|
|
206
187
|
options: ['solid', 'outline', 'link', 'action', 'destructive', 'soft'],
|
|
207
|
-
description: 'The variant of the confirmation button. ',
|
|
208
188
|
table: {
|
|
209
189
|
category: 'Confirmation Modal',
|
|
210
190
|
type: {
|
|
@@ -214,7 +194,6 @@ const meta: Meta = {
|
|
|
214
194
|
},
|
|
215
195
|
cancelButtonText: {
|
|
216
196
|
control: 'text',
|
|
217
|
-
description: 'The text of the cancel button',
|
|
218
197
|
table: {
|
|
219
198
|
category: 'Confirmation Modal',
|
|
220
199
|
type: {
|
|
@@ -225,7 +204,6 @@ const meta: Meta = {
|
|
|
225
204
|
status: {
|
|
226
205
|
control: 'select',
|
|
227
206
|
options: ['info', 'success', 'error'],
|
|
228
|
-
description: 'The status of the modal. This will determine the color of the icon.',
|
|
229
207
|
table: {
|
|
230
208
|
category: 'Confirmation Modal',
|
|
231
209
|
type: {
|
|
@@ -236,7 +214,6 @@ const meta: Meta = {
|
|
|
236
214
|
icon: {
|
|
237
215
|
control: 'select',
|
|
238
216
|
options: Object.keys(indiconDefinitions),
|
|
239
|
-
description: 'The icon of the modal',
|
|
240
217
|
table: {
|
|
241
218
|
category: 'Confirmation Modal',
|
|
242
219
|
type: {
|
|
@@ -246,7 +223,6 @@ const meta: Meta = {
|
|
|
246
223
|
},
|
|
247
224
|
hasDontShowAgainCheckbox: {
|
|
248
225
|
control: 'boolean',
|
|
249
|
-
description: 'Whether the modal should have a checkbox to not show again',
|
|
250
226
|
table: {
|
|
251
227
|
category: 'Confirmation Modal',
|
|
252
228
|
type: {
|
|
@@ -2,23 +2,39 @@ import { ButtonVariants } from '../button/types';
|
|
|
2
2
|
import { IconName } from '../icons/types';
|
|
3
3
|
|
|
4
4
|
export interface ModalProps {
|
|
5
|
+
/** Additional classes for the badge component */
|
|
5
6
|
className?: string;
|
|
7
|
+
/** The content of the badge (superseded by the string prop) */
|
|
6
8
|
children?: React.ReactNode;
|
|
9
|
+
/** Whether the modal is open */
|
|
7
10
|
isOpen: boolean;
|
|
11
|
+
/** Callback function to be called when the modal is closed */
|
|
8
12
|
onRequestClose?: () => void;
|
|
13
|
+
/** Additional classes for the portal element */
|
|
9
14
|
portalClassName?: string;
|
|
15
|
+
/** Additional classes for the overlay element */
|
|
10
16
|
overlayClassName?: string;
|
|
17
|
+
/** The element to use as the app element */
|
|
11
18
|
appElement?: HTMLElement;
|
|
19
|
+
/** Whether the modal should close when the overlay is clicked */
|
|
12
20
|
shouldCloseOnOverlayClick?: boolean;
|
|
21
|
+
/** Whether the modal should close when the escape key is pressed */
|
|
13
22
|
shouldCloseOnEsc?: boolean;
|
|
14
23
|
testId?: string;
|
|
24
|
+
/** Custom content element for the modal */
|
|
15
25
|
contentElement?: (props: any, children: React.ReactNode) => React.ReactElement;
|
|
26
|
+
/** Custom overlay element for the modal */
|
|
16
27
|
overlayElement?: (props: any, contentElement: React.ReactElement) => React.ReactElement;
|
|
28
|
+
/** The position of the modal opens on the page */
|
|
17
29
|
position?: 'top' | 'center';
|
|
18
30
|
parentSelector?: () => HTMLElement;
|
|
31
|
+
/** The title of the modal */
|
|
19
32
|
title?: string;
|
|
33
|
+
/** The subtitle of the modal */
|
|
20
34
|
subtitle?: string;
|
|
35
|
+
/** The footer of the modal. It accepts a React Component */
|
|
21
36
|
footer?: React.ReactNode;
|
|
37
|
+
/** The maximum width of the modal in pixels */
|
|
22
38
|
maxWidthInPixels?: number;
|
|
23
39
|
}
|
|
24
40
|
|
|
@@ -29,10 +45,16 @@ export interface ConfirmationModalProps extends ModalProps {
|
|
|
29
45
|
dontShowAgain?: boolean;
|
|
30
46
|
}) => void | Promise<void> | Promise<boolean>;
|
|
31
47
|
onCancelRequest?: () => void | Promise<void> | Promise<boolean>;
|
|
48
|
+
/** Whether the modal should have a checkbox to not show again */
|
|
32
49
|
hasDontShowAgainCheckbox?: boolean;
|
|
50
|
+
/** The variant of the confirmation button. */
|
|
33
51
|
confirmationButtonVariant?: ButtonVariants;
|
|
52
|
+
/** The text of the confirmation button */
|
|
34
53
|
confirmationButtonText?: string;
|
|
54
|
+
/** The text of the cancel button */
|
|
35
55
|
cancelButtonText?: string;
|
|
56
|
+
/** The icon of the modal */
|
|
36
57
|
icon?: IconName;
|
|
58
|
+
/** The status of the modal. This will determine the color of the icon. */
|
|
37
59
|
status?: 'info' | 'success' | 'error';
|
|
38
60
|
}
|
|
@@ -9,7 +9,6 @@ const meta: Meta = {
|
|
|
9
9
|
argTypes: {
|
|
10
10
|
className: {
|
|
11
11
|
control: false,
|
|
12
|
-
description: 'The css class name for the pagination component',
|
|
13
12
|
table: {
|
|
14
13
|
category: 'Props',
|
|
15
14
|
type: {
|
|
@@ -19,7 +18,6 @@ const meta: Meta = {
|
|
|
19
18
|
},
|
|
20
19
|
totalPages: {
|
|
21
20
|
control: 'number',
|
|
22
|
-
description: 'The total number of pages to be displayed',
|
|
23
21
|
table: {
|
|
24
22
|
category: 'Props',
|
|
25
23
|
type: {
|
|
@@ -29,7 +27,6 @@ const meta: Meta = {
|
|
|
29
27
|
},
|
|
30
28
|
currentPage: {
|
|
31
29
|
control: 'number',
|
|
32
|
-
description: 'The current page displayed in the input field.',
|
|
33
30
|
table: {
|
|
34
31
|
category: 'Props',
|
|
35
32
|
type: {
|
|
@@ -39,7 +36,6 @@ const meta: Meta = {
|
|
|
39
36
|
},
|
|
40
37
|
onChange: {
|
|
41
38
|
action: 'change',
|
|
42
|
-
description: 'The callback function that is called when the page changes.',
|
|
43
39
|
table: {
|
|
44
40
|
category: 'Callbacks',
|
|
45
41
|
type: {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export interface PaginationProps {
|
|
2
|
+
/** The total number of pages to be displayed */
|
|
2
3
|
totalPages: number;
|
|
4
|
+
/** The current page displayed in the input field. */
|
|
3
5
|
currentPage?: number;
|
|
6
|
+
/** The css class name for the pagination component */
|
|
4
7
|
className?: string;
|
|
8
|
+
/** The callback function that is called when the page changes. */
|
|
5
9
|
onChange?: (value: number) => void;
|
|
6
10
|
}
|
|
@@ -17,7 +17,6 @@ const meta: Meta = {
|
|
|
17
17
|
},
|
|
18
18
|
children: {
|
|
19
19
|
control: 'text',
|
|
20
|
-
description: 'The content displayed inside the pill',
|
|
21
20
|
table: {
|
|
22
21
|
category: 'Props',
|
|
23
22
|
type: {
|
|
@@ -38,7 +37,6 @@ const meta: Meta = {
|
|
|
38
37
|
'pending',
|
|
39
38
|
'orange',
|
|
40
39
|
],
|
|
41
|
-
description: 'Applies a CSS class to change the style of the pill',
|
|
42
40
|
table: {
|
|
43
41
|
category: 'Props',
|
|
44
42
|
type: {
|
|
@@ -52,7 +50,6 @@ const meta: Meta = {
|
|
|
52
50
|
type: 'select',
|
|
53
51
|
options: ['sm', 'md', 'lg'],
|
|
54
52
|
},
|
|
55
|
-
description: 'Applies a CSS class to change the size of the pill',
|
|
56
53
|
table: {
|
|
57
54
|
category: 'Props',
|
|
58
55
|
type: {
|
|
@@ -5,8 +5,11 @@ export type PillSize = 'sm' | 'md' | 'lg';
|
|
|
5
5
|
export type PillColor = SemanticColor | 'neutral';
|
|
6
6
|
|
|
7
7
|
export interface PillProps {
|
|
8
|
+
/** The content displayed inside the pill */
|
|
8
9
|
children: React.ReactNode | React.ReactNode[];
|
|
10
|
+
/** Applies a CSS class to change the style of the pill */
|
|
9
11
|
color?: PillColor;
|
|
12
|
+
/** Applies a CSS class to change the size of the pill */
|
|
10
13
|
size?: PillSize;
|
|
11
14
|
className?: string;
|
|
12
15
|
}
|
|
@@ -8,7 +8,6 @@ const meta: Meta = {
|
|
|
8
8
|
argTypes: {
|
|
9
9
|
className: {
|
|
10
10
|
control: 'text',
|
|
11
|
-
description: 'Additional classes for the skeleton component',
|
|
12
11
|
table: {
|
|
13
12
|
category: 'Props',
|
|
14
13
|
type: {
|
|
@@ -18,8 +17,6 @@ const meta: Meta = {
|
|
|
18
17
|
},
|
|
19
18
|
height: {
|
|
20
19
|
control: 'number',
|
|
21
|
-
description:
|
|
22
|
-
'The height of the skeleton component, either in px (number) or a generic string (e.g. "20px", "50%", "100%")',
|
|
23
20
|
table: {
|
|
24
21
|
category: 'Props',
|
|
25
22
|
type: {
|
|
@@ -29,8 +26,6 @@ const meta: Meta = {
|
|
|
29
26
|
},
|
|
30
27
|
width: {
|
|
31
28
|
control: 'number',
|
|
32
|
-
description:
|
|
33
|
-
'The width of the skeleton component, either in px (number) or a generic string (e.g. "20px", "50%", "100%")',
|
|
34
29
|
table: {
|
|
35
30
|
category: 'Props',
|
|
36
31
|
type: {
|
|
@@ -40,7 +35,6 @@ const meta: Meta = {
|
|
|
40
35
|
},
|
|
41
36
|
isCircle: {
|
|
42
37
|
control: 'boolean',
|
|
43
|
-
description: 'Sets the skeleton component to be a circle',
|
|
44
38
|
table: {
|
|
45
39
|
category: 'Props',
|
|
46
40
|
type: {
|
|
@@ -51,7 +45,6 @@ const meta: Meta = {
|
|
|
51
45
|
},
|
|
52
46
|
isFullHeight: {
|
|
53
47
|
control: 'boolean',
|
|
54
|
-
description: 'Sets the skeleton component to be full height',
|
|
55
48
|
table: {
|
|
56
49
|
category: 'Props',
|
|
57
50
|
type: {
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
type Props = {
|
|
2
|
+
/** Additional classes for the skeleton component */
|
|
2
3
|
className?: string;
|
|
4
|
+
/** The height of the skeleton component, either in px (number) or a generic string (e.g. "20px", "50%", "100%") */
|
|
3
5
|
height?: number | string;
|
|
6
|
+
/** The width of the skeleton component, either in px (number) or a generic string (e.g. "20px", "50%", "100%") */
|
|
4
7
|
width?: number | string;
|
|
8
|
+
/** Sets the skeleton component to be a circle */
|
|
5
9
|
isCircle?: boolean;
|
|
10
|
+
/** Sets the skeleton component to be full height */
|
|
6
11
|
isFullHeight?: boolean;
|
|
7
12
|
};
|
|
8
13
|
|
|
@@ -17,7 +17,6 @@ const meta: Meta = {
|
|
|
17
17
|
argTypes: {
|
|
18
18
|
legendHeader: {
|
|
19
19
|
control: false,
|
|
20
|
-
description: 'The header content for the legend.',
|
|
21
20
|
table: {
|
|
22
21
|
category: 'Props',
|
|
23
22
|
type: {
|
|
@@ -27,7 +26,6 @@ const meta: Meta = {
|
|
|
27
26
|
},
|
|
28
27
|
legendFooter: {
|
|
29
28
|
control: false,
|
|
30
|
-
description: 'The footer content for the legend.',
|
|
31
29
|
table: {
|
|
32
30
|
category: 'Props',
|
|
33
31
|
type: {
|
|
@@ -37,7 +35,6 @@ const meta: Meta = {
|
|
|
37
35
|
},
|
|
38
36
|
steps: {
|
|
39
37
|
control: false,
|
|
40
|
-
description: 'An array of step objects that define the stepper navigation.',
|
|
41
38
|
table: {
|
|
42
39
|
category: 'Props',
|
|
43
40
|
type: {
|
|
@@ -46,7 +43,6 @@ const meta: Meta = {
|
|
|
46
43
|
},
|
|
47
44
|
},
|
|
48
45
|
label: {
|
|
49
|
-
description: 'Display text for the step in the sidebar/legend',
|
|
50
46
|
table: {
|
|
51
47
|
category: 'Step Properties',
|
|
52
48
|
type: {
|
|
@@ -56,8 +52,6 @@ const meta: Meta = {
|
|
|
56
52
|
control: false,
|
|
57
53
|
},
|
|
58
54
|
isCompleted: {
|
|
59
|
-
description:
|
|
60
|
-
'Indicates whether this step has been completed. Used to track progress and determine whether to enable subsequent steps.',
|
|
61
55
|
table: {
|
|
62
56
|
category: 'Step Properties',
|
|
63
57
|
type: {
|
|
@@ -68,8 +62,6 @@ const meta: Meta = {
|
|
|
68
62
|
control: false,
|
|
69
63
|
},
|
|
70
64
|
isNextDisabled: {
|
|
71
|
-
description:
|
|
72
|
-
'When true, the Next button will be disabled for this step. Set to true for steps that require completion before proceeding.',
|
|
73
65
|
table: {
|
|
74
66
|
category: 'Step Properties',
|
|
75
67
|
type: {
|
|
@@ -80,8 +72,6 @@ const meta: Meta = {
|
|
|
80
72
|
control: false,
|
|
81
73
|
},
|
|
82
74
|
isOptional: {
|
|
83
|
-
description:
|
|
84
|
-
'When true, the step can be skipped (the Next button remains enabled). Used for optional information or steps that are not required to complete the flow.',
|
|
85
75
|
table: {
|
|
86
76
|
category: 'Step Properties',
|
|
87
77
|
type: {
|
|
@@ -92,8 +82,6 @@ const meta: Meta = {
|
|
|
92
82
|
control: false,
|
|
93
83
|
},
|
|
94
84
|
isSidebarEnabled: {
|
|
95
|
-
description:
|
|
96
|
-
'When true, the step is clickable in the sidebar. Used for restricting navigation until previous steps are completed.',
|
|
97
85
|
table: {
|
|
98
86
|
category: 'Step Properties',
|
|
99
87
|
type: {
|
|
@@ -105,8 +93,6 @@ const meta: Meta = {
|
|
|
105
93
|
},
|
|
106
94
|
currentStep: {
|
|
107
95
|
control: false,
|
|
108
|
-
description:
|
|
109
|
-
'The current step of the stepper. This value should be an index of the steps array.',
|
|
110
96
|
table: {
|
|
111
97
|
category: 'Props',
|
|
112
98
|
type: {
|
|
@@ -117,7 +103,6 @@ const meta: Meta = {
|
|
|
117
103
|
},
|
|
118
104
|
onBackClick: {
|
|
119
105
|
control: false,
|
|
120
|
-
description: 'The function to call when the back button is clicked.',
|
|
121
106
|
table: {
|
|
122
107
|
category: 'Callbacks',
|
|
123
108
|
type: {
|
|
@@ -127,7 +112,6 @@ const meta: Meta = {
|
|
|
127
112
|
},
|
|
128
113
|
onFinishClick: {
|
|
129
114
|
control: false,
|
|
130
|
-
description: 'The function to call when the finish button is clicked.',
|
|
131
115
|
table: {
|
|
132
116
|
category: 'Callbacks',
|
|
133
117
|
type: {
|
|
@@ -137,7 +121,6 @@ const meta: Meta = {
|
|
|
137
121
|
},
|
|
138
122
|
onStepClick: {
|
|
139
123
|
control: false,
|
|
140
|
-
description: 'The function to call when a step is clicked ont he legend.',
|
|
141
124
|
table: {
|
|
142
125
|
category: 'Callbacks',
|
|
143
126
|
type: {
|
|
@@ -147,7 +130,6 @@ const meta: Meta = {
|
|
|
147
130
|
},
|
|
148
131
|
onNextClick: {
|
|
149
132
|
control: false,
|
|
150
|
-
description: 'The function to call when the next button is clicked.',
|
|
151
133
|
table: {
|
|
152
134
|
category: 'Callbacks',
|
|
153
135
|
type: {
|
|
@@ -157,7 +139,6 @@ const meta: Meta = {
|
|
|
157
139
|
},
|
|
158
140
|
children: {
|
|
159
141
|
control: false,
|
|
160
|
-
description: 'Any item passed to this component as a child will be rendered as a step.',
|
|
161
142
|
table: {
|
|
162
143
|
category: 'Props',
|
|
163
144
|
type: {
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface StepperProps {
|
|
4
|
+
/** An array of step objects that define the stepper navigation. */
|
|
4
5
|
steps: Step[];
|
|
5
6
|
currentStep?: number;
|
|
7
|
+
/** The header content for the legend. */
|
|
6
8
|
legendHeader?: ReactNode;
|
|
9
|
+
/** The footer content for the legend. */
|
|
7
10
|
legendFooter?: ReactNode;
|
|
11
|
+
/** The function to call when the back button is clicked. */
|
|
8
12
|
onBackClick: () => void;
|
|
13
|
+
/** The function to call when the next button is clicked. */
|
|
9
14
|
onNextClick: () => void;
|
|
15
|
+
/** The function to call when the finish button is clicked. */
|
|
10
16
|
onFinishClick: () => void;
|
|
17
|
+
/** Any item passed to this component as a child will be rendered as a step. */
|
|
11
18
|
children: React.ReactNode;
|
|
19
|
+
/** The function to call when a step is clicked ont he legend. */
|
|
12
20
|
onStepClick: (step: number) => void;
|
|
13
21
|
}
|
|
14
22
|
|
|
@@ -19,6 +27,7 @@ export interface StepperLegendProps {
|
|
|
19
27
|
}
|
|
20
28
|
|
|
21
29
|
export interface Step {
|
|
30
|
+
/** Display text for the step in the sidebar/legend */
|
|
22
31
|
label: string;
|
|
23
32
|
isCompleted?: boolean;
|
|
24
33
|
isNextDisabled?: boolean;
|