@ceed/ads 1.23.3 → 1.23.4
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/dist/components/data-display/Badge.md +71 -39
- package/dist/components/data-display/InfoSign.md +74 -98
- package/dist/components/data-display/Typography.md +310 -61
- package/dist/components/feedback/CircularProgress.md +257 -0
- package/dist/components/feedback/Skeleton.md +280 -0
- package/dist/components/feedback/llms.txt +2 -0
- package/dist/components/inputs/ButtonGroup.md +115 -106
- package/dist/components/inputs/Calendar.md +98 -459
- package/dist/components/inputs/CurrencyInput.md +181 -8
- package/dist/components/inputs/DatePicker.md +108 -436
- package/dist/components/inputs/DateRangePicker.md +130 -496
- package/dist/components/inputs/FilterMenu.md +169 -19
- package/dist/components/inputs/FilterableCheckboxGroup.md +119 -24
- package/dist/components/inputs/FormControl.md +368 -0
- package/dist/components/inputs/IconButton.md +137 -88
- package/dist/components/inputs/MonthPicker.md +95 -427
- package/dist/components/inputs/MonthRangePicker.md +89 -471
- package/dist/components/inputs/PercentageInput.md +183 -19
- package/dist/components/inputs/RadioButton.md +163 -35
- package/dist/components/inputs/RadioList.md +241 -0
- package/dist/components/inputs/RadioTileGroup.md +146 -62
- package/dist/components/inputs/Select.md +219 -328
- package/dist/components/inputs/Slider.md +334 -0
- package/dist/components/inputs/Switch.md +136 -376
- package/dist/components/inputs/Textarea.md +209 -11
- package/dist/components/inputs/Uploader/Uploader.md +145 -66
- package/dist/components/inputs/llms.txt +3 -0
- package/dist/components/navigation/Breadcrumbs.md +80 -322
- package/dist/components/navigation/Dropdown.md +92 -221
- package/dist/components/navigation/IconMenuButton.md +40 -502
- package/dist/components/navigation/InsetDrawer.md +68 -738
- package/dist/components/navigation/Link.md +39 -298
- package/dist/components/navigation/Menu.md +92 -285
- package/dist/components/navigation/MenuButton.md +55 -448
- package/dist/components/navigation/Pagination.md +47 -338
- package/dist/components/navigation/ProfileMenu.md +45 -268
- package/dist/components/navigation/Stepper.md +160 -28
- package/dist/components/navigation/Tabs.md +57 -316
- package/dist/components/surfaces/Sheet.md +150 -333
- package/dist/guides/ThemeProvider.md +116 -0
- package/dist/guides/llms.txt +9 -0
- package/dist/llms.txt +8 -0
- package/package.json +1 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Stepper
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
The Stepper component visually represents a multi-step process, guiding users through sequential tasks such as forms, onboarding flows, or checkout procedures. It clearly indicates the current step, completed steps, and remaining steps, giving users a sense of progress and orientation within a workflow.
|
|
6
|
+
|
|
7
|
+
Stepper supports both horizontal and vertical layouts, customizable colors, and flexible step content including labels, extra descriptions, and indicator numbers or icons. It is well suited for wizards, registration flows, order tracking, and any process that benefits from a clear step-by-step breakdown.
|
|
4
8
|
|
|
5
9
|
```text
|
|
6
10
|
// Unable to derive source for Default
|
|
@@ -10,99 +14,227 @@ Stepper 컴포넌트는 여러 단계로 구성된 프로세스를 시각적으
|
|
|
10
14
|
| ---------------------------- | ----------- | ------- |
|
|
11
15
|
| Controls resolved at runtime | — | — |
|
|
12
16
|
|
|
13
|
-
##
|
|
17
|
+
## Usage
|
|
14
18
|
|
|
15
19
|
```tsx
|
|
16
20
|
import { Stepper } from '@ceed/ads';
|
|
21
|
+
|
|
22
|
+
function OnboardingFlow() {
|
|
23
|
+
const [activeStep, setActiveStep] = useState(1);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<Stepper
|
|
27
|
+
steps={[
|
|
28
|
+
{ indicatorContent: 1, label: 'Account', extraContent: 'Create your account' },
|
|
29
|
+
{ indicatorContent: 2, label: 'Profile', extraContent: 'Set up your profile' },
|
|
30
|
+
{ indicatorContent: 3, label: 'Complete', extraContent: 'Review and finish' },
|
|
31
|
+
]}
|
|
32
|
+
activeStep={activeStep}
|
|
33
|
+
/>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
17
36
|
```
|
|
18
37
|
|
|
19
|
-
##
|
|
38
|
+
## Default
|
|
20
39
|
|
|
21
|
-
|
|
40
|
+
The default form of Stepper. It requires `steps` and `activeStep` as mandatory props. Each step can include `indicatorContent`, `label`, and `extraContent`.
|
|
22
41
|
|
|
23
42
|
```text
|
|
24
43
|
// Unable to derive source for Default
|
|
25
44
|
```
|
|
26
45
|
|
|
27
|
-
##
|
|
46
|
+
## Indicator Only
|
|
28
47
|
|
|
29
|
-
`label
|
|
48
|
+
Steps can be rendered with only the indicator, omitting `label` and `extraContent`. This is useful for compact layouts where full labels are not needed.
|
|
30
49
|
|
|
31
50
|
```text
|
|
32
51
|
// Unable to derive source for OnlyIndicator
|
|
33
52
|
```
|
|
34
53
|
|
|
35
|
-
##
|
|
54
|
+
## Orientation
|
|
36
55
|
|
|
37
|
-
###
|
|
56
|
+
### Horizontal
|
|
38
57
|
|
|
39
|
-
`orientation`
|
|
58
|
+
Set the `orientation` prop to `'horizontal'` to display the Stepper in a horizontal layout.
|
|
40
59
|
|
|
41
60
|
```text
|
|
42
61
|
// Unable to derive source for HorizontalOrientation
|
|
43
62
|
```
|
|
44
63
|
|
|
45
|
-
###
|
|
64
|
+
### Vertical
|
|
46
65
|
|
|
47
|
-
`orientation`
|
|
66
|
+
Set the `orientation` prop to `'vertical'` to display the Stepper vertically. This is the default orientation.
|
|
48
67
|
|
|
49
68
|
```text
|
|
50
69
|
// Unable to derive source for VerticalOrientation
|
|
51
70
|
```
|
|
52
71
|
|
|
53
|
-
##
|
|
72
|
+
## Step Orientation
|
|
54
73
|
|
|
55
|
-
###
|
|
74
|
+
### Horizontal Step Orientation
|
|
56
75
|
|
|
57
|
-
`stepOrientation`
|
|
76
|
+
Set `stepOrientation` to `'horizontal'` to place each step's content beside the indicator. This is the default step orientation.
|
|
58
77
|
|
|
59
78
|
```text
|
|
60
79
|
// Unable to derive source for HorizontalStepOrientation
|
|
61
80
|
```
|
|
62
81
|
|
|
63
|
-
###
|
|
82
|
+
### Vertical Step Orientation
|
|
64
83
|
|
|
65
|
-
`stepOrientation`
|
|
66
|
-
**주의**: `orientation`이 'vertical'로 설정된 경우, `stepOrientation`은 항상 'horizontal'로 강제 설정됩니다.
|
|
84
|
+
Set `stepOrientation` to `'vertical'` to place each step's content below the indicator. When `orientation` is `'horizontal'` and `stepOrientation` is `'vertical'`, content is automatically center-aligned.
|
|
67
85
|
|
|
68
|
-
`orientation
|
|
86
|
+
> **Note:** When `orientation` is set to `'vertical'`, the `stepOrientation` is always forced to `'horizontal'` regardless of the value provided.
|
|
69
87
|
|
|
70
88
|
```text
|
|
71
89
|
// Unable to derive source for VerticalStepOrientation
|
|
72
90
|
```
|
|
73
91
|
|
|
74
|
-
##
|
|
92
|
+
## Color Customization
|
|
75
93
|
|
|
76
|
-
###
|
|
94
|
+
### Active Color
|
|
77
95
|
|
|
78
|
-
`activeColor
|
|
96
|
+
Use `activeColor` and `activeLineColor` to change the color of active and completed steps and their connecting lines.
|
|
79
97
|
|
|
80
98
|
```text
|
|
81
99
|
// Unable to derive source for WithActiveColor
|
|
82
100
|
```
|
|
83
101
|
|
|
84
|
-
###
|
|
102
|
+
### Inactive Color
|
|
85
103
|
|
|
86
|
-
`inactiveColor
|
|
104
|
+
Use `inactiveColor` and `inactiveLineColor` to change the color of steps that have not yet been reached.
|
|
87
105
|
|
|
88
106
|
```text
|
|
89
107
|
// Unable to derive source for WithInactiveColor
|
|
90
108
|
```
|
|
91
109
|
|
|
92
|
-
##
|
|
110
|
+
## Step State
|
|
93
111
|
|
|
94
|
-
###
|
|
112
|
+
### All Steps Complete
|
|
95
113
|
|
|
96
|
-
`activeStep`
|
|
114
|
+
When the `activeStep` value exceeds the total number of steps, all steps are displayed as completed.
|
|
97
115
|
|
|
98
116
|
```text
|
|
99
117
|
// Unable to derive source for WithAllComplete
|
|
100
118
|
```
|
|
101
119
|
|
|
102
|
-
###
|
|
120
|
+
### All Steps Inactive
|
|
103
121
|
|
|
104
|
-
`activeStep`
|
|
122
|
+
When `activeStep` is set to `0`, all steps are displayed in the inactive state.
|
|
105
123
|
|
|
106
124
|
```text
|
|
107
125
|
// Unable to derive source for WithAllInactive
|
|
108
126
|
```
|
|
127
|
+
|
|
128
|
+
## Common Use Cases
|
|
129
|
+
|
|
130
|
+
### Form Wizard
|
|
131
|
+
|
|
132
|
+
```tsx
|
|
133
|
+
function FormWizard() {
|
|
134
|
+
const [activeStep, setActiveStep] = useState(1);
|
|
135
|
+
|
|
136
|
+
const steps = [
|
|
137
|
+
{ indicatorContent: 1, label: 'Personal Info', extraContent: 'Name and contact' },
|
|
138
|
+
{ indicatorContent: 2, label: 'Address', extraContent: 'Shipping details' },
|
|
139
|
+
{ indicatorContent: 3, label: 'Payment', extraContent: 'Billing information' },
|
|
140
|
+
{ indicatorContent: 4, label: 'Confirm', extraContent: 'Review your order' },
|
|
141
|
+
];
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<Box>
|
|
145
|
+
<Stepper steps={steps} activeStep={activeStep} orientation="horizontal" />
|
|
146
|
+
<Box sx={{ mt: 3 }}>
|
|
147
|
+
{/* Step content rendered here based on activeStep */}
|
|
148
|
+
<Stack direction="row" gap={1} sx={{ mt: 2 }}>
|
|
149
|
+
<Button
|
|
150
|
+
disabled={activeStep <= 1}
|
|
151
|
+
onClick={() => setActiveStep((prev) => prev - 1)}
|
|
152
|
+
>
|
|
153
|
+
Back
|
|
154
|
+
</Button>
|
|
155
|
+
<Button onClick={() => setActiveStep((prev) => prev + 1)}>
|
|
156
|
+
{activeStep >= steps.length ? 'Finish' : 'Next'}
|
|
157
|
+
</Button>
|
|
158
|
+
</Stack>
|
|
159
|
+
</Box>
|
|
160
|
+
</Box>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Order Tracking
|
|
166
|
+
|
|
167
|
+
```tsx
|
|
168
|
+
function OrderTracking({ currentStatus }) {
|
|
169
|
+
const statusToStep = { placed: 1, processing: 2, shipped: 3, delivered: 4 };
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
<Stepper
|
|
173
|
+
orientation="vertical"
|
|
174
|
+
activeStep={statusToStep[currentStatus]}
|
|
175
|
+
activeColor="success.500"
|
|
176
|
+
activeLineColor="success.500"
|
|
177
|
+
steps={[
|
|
178
|
+
{ indicatorContent: 1, label: 'Order Placed', extraContent: 'Jan 15, 2025' },
|
|
179
|
+
{ indicatorContent: 2, label: 'Processing', extraContent: 'Jan 16, 2025' },
|
|
180
|
+
{ indicatorContent: 3, label: 'Shipped', extraContent: 'In transit' },
|
|
181
|
+
{ indicatorContent: 4, label: 'Delivered', extraContent: 'Estimated Jan 20' },
|
|
182
|
+
]}
|
|
183
|
+
/>
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Compact Progress Indicator
|
|
189
|
+
|
|
190
|
+
```tsx
|
|
191
|
+
function CompactProgress({ currentStep, totalSteps }) {
|
|
192
|
+
const steps = Array.from({ length: totalSteps }, (_, i) => ({
|
|
193
|
+
indicatorContent: i + 1,
|
|
194
|
+
}));
|
|
195
|
+
|
|
196
|
+
return (
|
|
197
|
+
<Stepper
|
|
198
|
+
steps={steps}
|
|
199
|
+
activeStep={currentStep}
|
|
200
|
+
orientation="horizontal"
|
|
201
|
+
stepOrientation="vertical"
|
|
202
|
+
/>
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Best Practices
|
|
208
|
+
|
|
209
|
+
1. **Keep step count manageable**: Limit the number of steps to 3-7 for optimal user comprehension. If more steps are needed, consider grouping them.
|
|
210
|
+
|
|
211
|
+
```tsx
|
|
212
|
+
// ✅ Good: Concise steps
|
|
213
|
+
<Stepper steps={[step1, step2, step3, step4]} activeStep={2} />
|
|
214
|
+
|
|
215
|
+
// ❌ Bad: Too many steps overwhelm users
|
|
216
|
+
<Stepper steps={[s1, s2, s3, s4, s5, s6, s7, s8, s9, s10]} activeStep={3} />
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
2. **Use descriptive labels**: Provide clear, concise labels that tell users what each step involves.
|
|
220
|
+
|
|
221
|
+
```tsx
|
|
222
|
+
// ✅ Good: Descriptive labels
|
|
223
|
+
{ label: 'Shipping Address', extraContent: 'Where should we deliver?' }
|
|
224
|
+
|
|
225
|
+
// ❌ Bad: Vague labels
|
|
226
|
+
{ label: 'Step 2', extraContent: 'Continue' }
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
3. **Choose the right orientation**: Use horizontal for wide layouts with few steps, and vertical for narrow layouts or many steps.
|
|
230
|
+
|
|
231
|
+
4. **Indicate completion clearly**: Use `activeStep` values accurately. Setting `activeStep` higher than the step count signals completion of the entire flow.
|
|
232
|
+
|
|
233
|
+
5. **Use color meaningfully**: Apply `activeColor` to match your application's semantic palette (e.g., success green for completed tasks, primary blue for in-progress).
|
|
234
|
+
|
|
235
|
+
## Accessibility
|
|
236
|
+
|
|
237
|
+
- The Stepper uses semantic list markup, making the step sequence understandable by screen readers.
|
|
238
|
+
- Each step indicator and label is accessible to assistive technology, conveying both position and state.
|
|
239
|
+
- Use descriptive `label` and `extraContent` values so that users relying on screen readers can understand what each step represents.
|
|
240
|
+
- Avoid relying solely on color to communicate step status. The structural difference between active, completed, and inactive steps is also conveyed through visual indicators.
|