jaci-ui 0.5.0 → 0.6.1
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/CHANGELOG.md +12 -0
- package/README.md +49 -2
- package/dist/components/navigation/index.d.cts +2 -1
- package/dist/components/navigation/index.d.ts +2 -1
- package/dist/components/navigation/navbar-namespace.cjs +26 -0
- package/dist/components/navigation/navbar-namespace.cjs.map +1 -0
- package/dist/components/navigation/navbar-namespace.d.cts +25 -0
- package/dist/components/navigation/navbar-namespace.d.ts +25 -0
- package/dist/components/navigation/navbar-namespace.js +26 -0
- package/dist/components/navigation/navbar-namespace.js.map +1 -0
- package/dist/components/navigation/navigation.cjs +2 -13
- package/dist/components/navigation/navigation.cjs.map +1 -1
- package/dist/components/navigation/navigation.d.cts +2 -13
- package/dist/components/navigation/navigation.d.ts +2 -13
- package/dist/components/navigation/navigation.js +2 -13
- package/dist/components/navigation/navigation.js.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.cjs +3 -3
- package/dist/components/navigation-menu/navigation-menu.cjs.map +1 -1
- package/dist/components/navigation-menu/navigation-menu.js +3 -3
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
- package/dist/components/sidebar/sidebar.cjs +59 -11
- package/dist/components/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/sidebar/sidebar.d.cts +13 -0
- package/dist/components/sidebar/sidebar.d.ts +13 -0
- package/dist/components/sidebar/sidebar.js +59 -13
- package/dist/components/sidebar/sidebar.js.map +1 -1
- package/dist/components/stepper/index.d.cts +2 -0
- package/dist/components/stepper/index.d.ts +2 -0
- package/dist/components/stepper/stepper.cjs +341 -0
- package/dist/components/stepper/stepper.cjs.map +1 -0
- package/dist/components/stepper/stepper.d.cts +52 -0
- package/dist/components/stepper/stepper.d.ts +52 -0
- package/dist/components/stepper/stepper.js +330 -0
- package/dist/components/stepper/stepper.js.map +1 -0
- package/dist/components/toast/toast.cjs +3 -1
- package/dist/components/toast/toast.cjs.map +1 -1
- package/dist/components/toast/toast.js +3 -1
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/index.cjs +15 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +4 -2
- package/dist/styled-system/recipes/sidebar.cjs +3 -0
- package/dist/styled-system/recipes/sidebar.cjs.map +1 -1
- package/dist/styled-system/recipes/sidebar.js +3 -0
- package/dist/styled-system/recipes/sidebar.js.map +1 -1
- package/dist/styled-system/recipes/stepper.cjs +53 -0
- package/dist/styled-system/recipes/stepper.cjs.map +1 -0
- package/dist/styled-system/recipes/stepper.js +53 -0
- package/dist/styled-system/recipes/stepper.js.map +1 -0
- package/dist/styles.css +365 -17
- package/package.json +1 -1
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_cx = require("../../styled-system/css/cx.cjs");
|
|
3
|
+
const require_stepper = require("../../styled-system/recipes/stepper.cjs");
|
|
4
|
+
let react = require("react");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
//#region src/components/stepper/stepper.tsx
|
|
7
|
+
const StepperContext = (0, react.createContext)(null);
|
|
8
|
+
const StepperItemContext = (0, react.createContext)(null);
|
|
9
|
+
function useStepperContext() {
|
|
10
|
+
const context = (0, react.useContext)(StepperContext);
|
|
11
|
+
if (!context) throw new Error("Stepper parts must be rendered inside Stepper.Root.");
|
|
12
|
+
return context;
|
|
13
|
+
}
|
|
14
|
+
function useStepperItemContext() {
|
|
15
|
+
const context = (0, react.useContext)(StepperItemContext);
|
|
16
|
+
if (!context) throw new Error("This Stepper part must be rendered inside Stepper.Item.");
|
|
17
|
+
return context;
|
|
18
|
+
}
|
|
19
|
+
const StepperRoot = (0, react.forwardRef)(function StepperRoot({ allowStepSelect = true, "aria-label": ariaLabel, children, className, defaultValue, disabled = false, form, linear = false, name, onValueChange, orientation = "horizontal", value: controlledValue, ...props }, ref) {
|
|
20
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, react.useState)(defaultValue);
|
|
21
|
+
const [records, setRecords] = (0, react.useState)([]);
|
|
22
|
+
const activeValue = controlledValue ?? uncontrolledValue ?? records[0]?.value;
|
|
23
|
+
const register = (0, react.useCallback)((record) => {
|
|
24
|
+
setRecords((current) => {
|
|
25
|
+
const index = current.findIndex((item) => item.value === record.value);
|
|
26
|
+
if (index === -1) return [...current, record];
|
|
27
|
+
const currentRecord = current[index];
|
|
28
|
+
if (!currentRecord) return current;
|
|
29
|
+
if (currentRecord.disabled === record.disabled && currentRecord.status === record.status) return current;
|
|
30
|
+
const next = current.slice();
|
|
31
|
+
next[index] = record;
|
|
32
|
+
return next;
|
|
33
|
+
});
|
|
34
|
+
}, []);
|
|
35
|
+
const unregister = (0, react.useCallback)((valueToRemove) => {
|
|
36
|
+
setRecords((current) => current.filter((item) => item.value !== valueToRemove));
|
|
37
|
+
}, []);
|
|
38
|
+
const goTo = (0, react.useCallback)((nextValue, options) => {
|
|
39
|
+
if (disabled) return;
|
|
40
|
+
const targetIndex = records.findIndex((item) => item.value === nextValue);
|
|
41
|
+
const activeIndex = records.findIndex((item) => item.value === activeValue);
|
|
42
|
+
const target = records[targetIndex];
|
|
43
|
+
if (!target || target.disabled) return;
|
|
44
|
+
if (nextValue === activeValue) return;
|
|
45
|
+
if (!allowStepSelect && !options?.fromNavigation && nextValue !== activeValue) return;
|
|
46
|
+
if (linear && activeIndex >= 0 && targetIndex > activeIndex + 1) return;
|
|
47
|
+
if (controlledValue === void 0) setUncontrolledValue(nextValue);
|
|
48
|
+
onValueChange?.(nextValue);
|
|
49
|
+
}, [
|
|
50
|
+
activeValue,
|
|
51
|
+
allowStepSelect,
|
|
52
|
+
controlledValue,
|
|
53
|
+
disabled,
|
|
54
|
+
linear,
|
|
55
|
+
onValueChange,
|
|
56
|
+
records
|
|
57
|
+
]);
|
|
58
|
+
const move = (0, react.useCallback)((direction) => {
|
|
59
|
+
let index = records.findIndex((item) => item.value === activeValue) + direction;
|
|
60
|
+
while (index >= 0 && index < records.length && records[index]?.disabled) index += direction;
|
|
61
|
+
const target = records[index];
|
|
62
|
+
if (target) goTo(target.value, { fromNavigation: true });
|
|
63
|
+
}, [
|
|
64
|
+
activeValue,
|
|
65
|
+
goTo,
|
|
66
|
+
records
|
|
67
|
+
]);
|
|
68
|
+
const moveToBoundary = (0, react.useCallback)((direction) => {
|
|
69
|
+
const target = (direction === -1 ? records : records.slice().reverse()).find((record) => !record.disabled);
|
|
70
|
+
if (target) goTo(target.value, { fromNavigation: true });
|
|
71
|
+
}, [goTo, records]);
|
|
72
|
+
const getStatus = (0, react.useCallback)((itemValue, explicitStatus, itemDisabled = false) => {
|
|
73
|
+
if (itemDisabled || disabled) return "disabled";
|
|
74
|
+
if (explicitStatus) return explicitStatus;
|
|
75
|
+
const itemIndex = records.findIndex((item) => item.value === itemValue);
|
|
76
|
+
const activeIndex = records.findIndex((item) => item.value === activeValue);
|
|
77
|
+
if (itemValue === activeValue || activeIndex < 0 && itemIndex === 0) return "current";
|
|
78
|
+
if (itemIndex >= 0 && activeIndex >= 0 && itemIndex < activeIndex) return "complete";
|
|
79
|
+
return "upcoming";
|
|
80
|
+
}, [
|
|
81
|
+
activeValue,
|
|
82
|
+
disabled,
|
|
83
|
+
records
|
|
84
|
+
]);
|
|
85
|
+
const context = (0, react.useMemo)(() => ({
|
|
86
|
+
activeValue,
|
|
87
|
+
allowStepSelect,
|
|
88
|
+
disabled,
|
|
89
|
+
getStatus,
|
|
90
|
+
goTo,
|
|
91
|
+
linear,
|
|
92
|
+
move,
|
|
93
|
+
moveToBoundary,
|
|
94
|
+
orientation,
|
|
95
|
+
register,
|
|
96
|
+
unregister
|
|
97
|
+
}), [
|
|
98
|
+
activeValue,
|
|
99
|
+
allowStepSelect,
|
|
100
|
+
disabled,
|
|
101
|
+
getStatus,
|
|
102
|
+
goTo,
|
|
103
|
+
linear,
|
|
104
|
+
move,
|
|
105
|
+
moveToBoundary,
|
|
106
|
+
orientation,
|
|
107
|
+
register,
|
|
108
|
+
unregister
|
|
109
|
+
]);
|
|
110
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepperContext.Provider, {
|
|
111
|
+
value: context,
|
|
112
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("nav", {
|
|
113
|
+
...props,
|
|
114
|
+
"aria-label": ariaLabel ?? "Progress",
|
|
115
|
+
className: require_cx.cx(require_stepper.stepper({ orientation }).root, className),
|
|
116
|
+
"data-jaci-component": "stepper",
|
|
117
|
+
"data-orientation": orientation,
|
|
118
|
+
"data-slot": "stepper",
|
|
119
|
+
"data-state": disabled ? "disabled" : "active",
|
|
120
|
+
ref,
|
|
121
|
+
children: [children, name ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
122
|
+
"aria-hidden": "true",
|
|
123
|
+
name,
|
|
124
|
+
type: "hidden",
|
|
125
|
+
value: activeValue ?? "",
|
|
126
|
+
form
|
|
127
|
+
}) : null]
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
const StepperList = (0, react.forwardRef)(function StepperList({ className, ...props }, ref) {
|
|
132
|
+
const { orientation } = useStepperContext();
|
|
133
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", {
|
|
134
|
+
...props,
|
|
135
|
+
className: require_cx.cx(require_stepper.stepper({ orientation }).list, className),
|
|
136
|
+
"data-slot": "stepper-list",
|
|
137
|
+
ref
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
const StepperItem = (0, react.forwardRef)(function StepperItem({ children, className, disabled = false, status, value, ...props }, ref) {
|
|
141
|
+
const context = useStepperContext();
|
|
142
|
+
const resolvedStatus = context.getStatus(value, status, disabled);
|
|
143
|
+
(0, react.useEffect)(() => {
|
|
144
|
+
const record = {
|
|
145
|
+
disabled: disabled || status === "disabled",
|
|
146
|
+
value
|
|
147
|
+
};
|
|
148
|
+
if (status !== void 0) record.status = status;
|
|
149
|
+
context.register(record);
|
|
150
|
+
return () => context.unregister(value);
|
|
151
|
+
}, [
|
|
152
|
+
context.register,
|
|
153
|
+
context.unregister,
|
|
154
|
+
disabled,
|
|
155
|
+
status,
|
|
156
|
+
value
|
|
157
|
+
]);
|
|
158
|
+
const itemContext = (0, react.useMemo)(() => ({
|
|
159
|
+
disabled: disabled || context.disabled || resolvedStatus === "disabled",
|
|
160
|
+
status: resolvedStatus,
|
|
161
|
+
value
|
|
162
|
+
}), [
|
|
163
|
+
context.disabled,
|
|
164
|
+
disabled,
|
|
165
|
+
resolvedStatus,
|
|
166
|
+
value
|
|
167
|
+
]);
|
|
168
|
+
const styles = require_stepper.stepper({
|
|
169
|
+
orientation: context.orientation,
|
|
170
|
+
status: resolvedStatus
|
|
171
|
+
});
|
|
172
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepperItemContext.Provider, {
|
|
173
|
+
value: itemContext,
|
|
174
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
175
|
+
...props,
|
|
176
|
+
"aria-disabled": itemContext.disabled || void 0,
|
|
177
|
+
className: require_cx.cx(styles.item, className),
|
|
178
|
+
"data-disabled": itemContext.disabled || void 0,
|
|
179
|
+
"data-jaci-component": "stepper-item",
|
|
180
|
+
"data-slot": "stepper-item",
|
|
181
|
+
"data-status": resolvedStatus,
|
|
182
|
+
"data-value": value,
|
|
183
|
+
ref,
|
|
184
|
+
children
|
|
185
|
+
})
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
const StepperTrigger = (0, react.forwardRef)(function StepperTrigger({ className, onClick, onKeyDown, type = "button", ...props }, ref) {
|
|
189
|
+
const context = useStepperContext();
|
|
190
|
+
const item = useStepperItemContext();
|
|
191
|
+
const styles = require_stepper.stepper({
|
|
192
|
+
orientation: context.orientation,
|
|
193
|
+
status: item.status
|
|
194
|
+
});
|
|
195
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
196
|
+
...props,
|
|
197
|
+
"aria-current": item.status === "current" ? "step" : void 0,
|
|
198
|
+
"aria-disabled": item.disabled || !context.allowStepSelect && item.status !== "current" || void 0,
|
|
199
|
+
className: require_cx.cx(styles.trigger, className),
|
|
200
|
+
"data-disabled": item.disabled || void 0,
|
|
201
|
+
"data-slot": "stepper-trigger",
|
|
202
|
+
"data-status": item.status,
|
|
203
|
+
disabled: context.disabled || item.disabled,
|
|
204
|
+
onClick: (event) => {
|
|
205
|
+
if (!event.defaultPrevented) context.goTo(item.value);
|
|
206
|
+
onClick?.(event);
|
|
207
|
+
},
|
|
208
|
+
onKeyDown: (event) => {
|
|
209
|
+
const isForwardKey = context.orientation === "horizontal" && event.key === "ArrowRight" || context.orientation === "vertical" && event.key === "ArrowDown";
|
|
210
|
+
const isBackwardKey = context.orientation === "horizontal" && event.key === "ArrowLeft" || context.orientation === "vertical" && event.key === "ArrowUp";
|
|
211
|
+
if (isForwardKey) {
|
|
212
|
+
event.preventDefault();
|
|
213
|
+
context.move(1);
|
|
214
|
+
} else if (isBackwardKey) {
|
|
215
|
+
event.preventDefault();
|
|
216
|
+
context.move(-1);
|
|
217
|
+
} else if (event.key === "Home") {
|
|
218
|
+
event.preventDefault();
|
|
219
|
+
context.moveToBoundary(-1);
|
|
220
|
+
} else if (event.key === "End") {
|
|
221
|
+
event.preventDefault();
|
|
222
|
+
context.moveToBoundary(1);
|
|
223
|
+
}
|
|
224
|
+
onKeyDown?.(event);
|
|
225
|
+
},
|
|
226
|
+
ref,
|
|
227
|
+
type
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
const StepperIndicator = (0, react.forwardRef)(function StepperIndicator({ children, className, ...props }, ref) {
|
|
231
|
+
const { orientation } = useStepperContext();
|
|
232
|
+
const item = useStepperItemContext();
|
|
233
|
+
const styles = require_stepper.stepper({
|
|
234
|
+
orientation,
|
|
235
|
+
status: item.status
|
|
236
|
+
});
|
|
237
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
238
|
+
...props,
|
|
239
|
+
"aria-hidden": props["aria-hidden"] ?? true,
|
|
240
|
+
className: require_cx.cx(styles.indicator, className),
|
|
241
|
+
"data-slot": "stepper-indicator",
|
|
242
|
+
"data-status": item.status,
|
|
243
|
+
ref,
|
|
244
|
+
children: children ?? (item.status === "complete" ? "✓" : "")
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
function createSpanSlot(slot) {
|
|
248
|
+
return (0, react.forwardRef)(function StepperSlot({ className, ...props }, ref) {
|
|
249
|
+
const { orientation } = useStepperContext();
|
|
250
|
+
const styles = require_stepper.stepper({
|
|
251
|
+
orientation,
|
|
252
|
+
status: useStepperItemContext().status
|
|
253
|
+
});
|
|
254
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
255
|
+
...props,
|
|
256
|
+
className: require_cx.cx(styles[slot], className),
|
|
257
|
+
"data-slot": `stepper-${slot}`,
|
|
258
|
+
ref
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
const StepperTitle = createSpanSlot("title");
|
|
263
|
+
const StepperDescription = createSpanSlot("description");
|
|
264
|
+
const StepperContent = (0, react.forwardRef)(function StepperContent({ className, hidden, ...props }, ref) {
|
|
265
|
+
const item = useStepperItemContext();
|
|
266
|
+
const { orientation } = useStepperContext();
|
|
267
|
+
const styles = require_stepper.stepper({
|
|
268
|
+
orientation,
|
|
269
|
+
status: item.status
|
|
270
|
+
});
|
|
271
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
272
|
+
...props,
|
|
273
|
+
className: require_cx.cx(styles.content, className),
|
|
274
|
+
"data-slot": "stepper-content",
|
|
275
|
+
hidden: hidden ?? item.status !== "current",
|
|
276
|
+
ref
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
const StepperSeparator = createSpanSlot("separator");
|
|
280
|
+
const StepperPrevious = (0, react.forwardRef)(function StepperPrevious({ children = "Previous", className, disabled: disabledProp, ...props }, ref) {
|
|
281
|
+
const context = useStepperContext();
|
|
282
|
+
const styles = require_stepper.stepper({ orientation: context.orientation });
|
|
283
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
284
|
+
...props,
|
|
285
|
+
className: require_cx.cx(styles.previous, className),
|
|
286
|
+
"data-slot": "stepper-previous",
|
|
287
|
+
disabled: disabledProp || context.disabled,
|
|
288
|
+
onClick: (event) => {
|
|
289
|
+
context.move(-1);
|
|
290
|
+
props.onClick?.(event);
|
|
291
|
+
},
|
|
292
|
+
ref,
|
|
293
|
+
type: props.type ?? "button",
|
|
294
|
+
children
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
const StepperNext = (0, react.forwardRef)(function StepperNext({ children = "Next", className, disabled: disabledProp, ...props }, ref) {
|
|
298
|
+
const context = useStepperContext();
|
|
299
|
+
const styles = require_stepper.stepper({ orientation: context.orientation });
|
|
300
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
301
|
+
...props,
|
|
302
|
+
className: require_cx.cx(styles.next, className),
|
|
303
|
+
"data-slot": "stepper-next",
|
|
304
|
+
disabled: disabledProp || context.disabled,
|
|
305
|
+
onClick: (event) => {
|
|
306
|
+
context.move(1);
|
|
307
|
+
props.onClick?.(event);
|
|
308
|
+
},
|
|
309
|
+
ref,
|
|
310
|
+
type: props.type ?? "button",
|
|
311
|
+
children
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
const Stepper = {
|
|
315
|
+
Root: StepperRoot,
|
|
316
|
+
List: StepperList,
|
|
317
|
+
Item: StepperItem,
|
|
318
|
+
Trigger: StepperTrigger,
|
|
319
|
+
Indicator: StepperIndicator,
|
|
320
|
+
Title: StepperTitle,
|
|
321
|
+
Description: StepperDescription,
|
|
322
|
+
Content: StepperContent,
|
|
323
|
+
Separator: StepperSeparator,
|
|
324
|
+
Previous: StepperPrevious,
|
|
325
|
+
Next: StepperNext
|
|
326
|
+
};
|
|
327
|
+
//#endregion
|
|
328
|
+
exports.Stepper = Stepper;
|
|
329
|
+
exports.StepperContent = StepperContent;
|
|
330
|
+
exports.StepperDescription = StepperDescription;
|
|
331
|
+
exports.StepperIndicator = StepperIndicator;
|
|
332
|
+
exports.StepperItem = StepperItem;
|
|
333
|
+
exports.StepperList = StepperList;
|
|
334
|
+
exports.StepperNext = StepperNext;
|
|
335
|
+
exports.StepperPrevious = StepperPrevious;
|
|
336
|
+
exports.StepperRoot = StepperRoot;
|
|
337
|
+
exports.StepperSeparator = StepperSeparator;
|
|
338
|
+
exports.StepperTitle = StepperTitle;
|
|
339
|
+
exports.StepperTrigger = StepperTrigger;
|
|
340
|
+
|
|
341
|
+
//# sourceMappingURL=stepper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper.cjs","names":["cx","stepper"],"sources":["../../../src/components/stepper/stepper.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { stepper } from \"../../styled-system/recipes\";\n\nexport type StepperOrientation = \"horizontal\" | \"vertical\";\nexport type StepperStatus = \"current\" | \"complete\" | \"upcoming\" | \"disabled\";\n\ninterface StepRecord {\n value: string;\n disabled: boolean;\n status?: StepperStatus;\n}\n\ninterface StepperContextValue {\n activeValue: string | undefined;\n allowStepSelect: boolean;\n disabled: boolean;\n getStatus: (value: string, status?: StepperStatus, disabled?: boolean) => StepperStatus;\n goTo: (value: string, options?: { fromNavigation?: boolean }) => void;\n linear: boolean;\n orientation: StepperOrientation;\n register: (record: StepRecord) => void;\n unregister: (value: string) => void;\n move: (direction: -1 | 1) => void;\n moveToBoundary: (direction: -1 | 1) => void;\n}\n\ninterface StepperItemContextValue {\n disabled: boolean;\n status: StepperStatus;\n value: string;\n}\n\nconst StepperContext = createContext<StepperContextValue | null>(null);\nconst StepperItemContext = createContext<StepperItemContextValue | null>(null);\n\nfunction useStepperContext() {\n const context = useContext(StepperContext);\n if (!context) throw new Error(\"Stepper parts must be rendered inside Stepper.Root.\");\n return context;\n}\n\nfunction useStepperItemContext() {\n const context = useContext(StepperItemContext);\n if (!context) throw new Error(\"This Stepper part must be rendered inside Stepper.Item.\");\n return context;\n}\n\nexport interface StepperRootProps extends Omit<ComponentPropsWithoutRef<\"nav\">, \"children\"> {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n orientation?: StepperOrientation;\n linear?: boolean;\n allowStepSelect?: boolean;\n disabled?: boolean;\n name?: string;\n form?: string;\n children?: ReactNode;\n}\n\nexport const StepperRoot = forwardRef<HTMLElement, StepperRootProps>(function StepperRoot(\n {\n allowStepSelect = true,\n \"aria-label\": ariaLabel,\n children,\n className,\n defaultValue,\n disabled = false,\n form,\n linear = false,\n name,\n onValueChange,\n orientation = \"horizontal\",\n value: controlledValue,\n ...props\n },\n ref,\n) {\n const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);\n const [records, setRecords] = useState<StepRecord[]>([]);\n const activeValue = controlledValue ?? uncontrolledValue ?? records[0]?.value;\n\n const register = useCallback((record: StepRecord) => {\n setRecords((current) => {\n const index = current.findIndex((item) => item.value === record.value);\n if (index === -1) return [...current, record];\n const currentRecord = current[index];\n if (!currentRecord) return current;\n if (currentRecord.disabled === record.disabled && currentRecord.status === record.status) {\n return current;\n }\n const next = current.slice();\n next[index] = record;\n return next;\n });\n }, []);\n\n const unregister = useCallback((valueToRemove: string) => {\n setRecords((current) => current.filter((item) => item.value !== valueToRemove));\n }, []);\n\n const goTo = useCallback(\n (nextValue: string, options?: { fromNavigation?: boolean }) => {\n if (disabled) return;\n const targetIndex = records.findIndex((item) => item.value === nextValue);\n const activeIndex = records.findIndex((item) => item.value === activeValue);\n const target = records[targetIndex];\n if (!target || target.disabled) return;\n if (nextValue === activeValue) return;\n if (!allowStepSelect && !options?.fromNavigation && nextValue !== activeValue) return;\n if (linear && activeIndex >= 0 && targetIndex > activeIndex + 1) return;\n if (controlledValue === undefined) setUncontrolledValue(nextValue);\n onValueChange?.(nextValue);\n },\n [activeValue, allowStepSelect, controlledValue, disabled, linear, onValueChange, records],\n );\n\n const move = useCallback(\n (direction: -1 | 1) => {\n const activeIndex = records.findIndex((item) => item.value === activeValue);\n let index = activeIndex + direction;\n while (index >= 0 && index < records.length && records[index]?.disabled) index += direction;\n const target = records[index];\n if (target) goTo(target.value, { fromNavigation: true });\n },\n [activeValue, goTo, records],\n );\n\n const moveToBoundary = useCallback(\n (direction: -1 | 1) => {\n const candidates = direction === -1 ? records : records.slice().reverse();\n const target = candidates.find((record) => !record.disabled);\n if (target) goTo(target.value, { fromNavigation: true });\n },\n [goTo, records],\n );\n\n const getStatus = useCallback(\n (itemValue: string, explicitStatus?: StepperStatus, itemDisabled = false) => {\n if (itemDisabled || disabled) return \"disabled\";\n if (explicitStatus) return explicitStatus;\n const itemIndex = records.findIndex((item) => item.value === itemValue);\n const activeIndex = records.findIndex((item) => item.value === activeValue);\n if (itemValue === activeValue || (activeIndex < 0 && itemIndex === 0)) return \"current\";\n if (itemIndex >= 0 && activeIndex >= 0 && itemIndex < activeIndex) return \"complete\";\n return \"upcoming\";\n },\n [activeValue, disabled, records],\n );\n\n const context = useMemo(\n () => ({\n activeValue,\n allowStepSelect,\n disabled,\n getStatus,\n goTo,\n linear,\n move,\n moveToBoundary,\n orientation,\n register,\n unregister,\n }),\n [\n activeValue,\n allowStepSelect,\n disabled,\n getStatus,\n goTo,\n linear,\n move,\n moveToBoundary,\n orientation,\n register,\n unregister,\n ],\n );\n\n return (\n <StepperContext.Provider value={context}>\n <nav\n {...props}\n aria-label={ariaLabel ?? \"Progress\"}\n className={cx(stepper({ orientation }).root, className)}\n data-jaci-component=\"stepper\"\n data-orientation={orientation}\n data-slot=\"stepper\"\n data-state={disabled ? \"disabled\" : \"active\"}\n ref={ref}\n >\n {children}\n {name ? (\n <input\n aria-hidden=\"true\"\n name={name}\n type=\"hidden\"\n value={activeValue ?? \"\"}\n form={form}\n />\n ) : null}\n </nav>\n </StepperContext.Provider>\n );\n});\n\nexport type StepperListProps = ComponentPropsWithoutRef<\"ol\">;\nexport const StepperList = forwardRef<HTMLOListElement, StepperListProps>(function StepperList(\n { className, ...props },\n ref,\n) {\n const { orientation } = useStepperContext();\n return (\n <ol\n {...props}\n className={cx(stepper({ orientation }).list, className)}\n data-slot=\"stepper-list\"\n ref={ref}\n />\n );\n});\n\nexport interface StepperItemProps extends ComponentPropsWithoutRef<\"li\"> {\n value: string;\n status?: StepperStatus;\n disabled?: boolean;\n}\n\nexport const StepperItem = forwardRef<HTMLLIElement, StepperItemProps>(function StepperItem(\n { children, className, disabled = false, status, value, ...props },\n ref,\n) {\n const context = useStepperContext();\n const resolvedStatus = context.getStatus(value, status, disabled);\n useEffect(() => {\n const record: StepRecord = { disabled: disabled || status === \"disabled\", value };\n if (status !== undefined) record.status = status;\n context.register(record);\n return () => context.unregister(value);\n }, [context.register, context.unregister, disabled, status, value]);\n const itemContext = useMemo<StepperItemContextValue>(\n () => ({\n disabled: disabled || context.disabled || resolvedStatus === \"disabled\",\n status: resolvedStatus,\n value,\n }),\n [context.disabled, disabled, resolvedStatus, value],\n );\n const styles = stepper({ orientation: context.orientation, status: resolvedStatus });\n\n return (\n <StepperItemContext.Provider value={itemContext}>\n <li\n {...props}\n aria-disabled={itemContext.disabled || undefined}\n className={cx(styles.item, className)}\n data-disabled={itemContext.disabled || undefined}\n data-jaci-component=\"stepper-item\"\n data-slot=\"stepper-item\"\n data-status={resolvedStatus}\n data-value={value}\n ref={ref}\n >\n {children}\n </li>\n </StepperItemContext.Provider>\n );\n});\n\nexport type StepperTriggerProps = ComponentPropsWithoutRef<\"button\">;\nexport const StepperTrigger = forwardRef<HTMLButtonElement, StepperTriggerProps>(\n function StepperTrigger({ className, onClick, onKeyDown, type = \"button\", ...props }, ref) {\n const context = useStepperContext();\n const item = useStepperItemContext();\n const styles = stepper({ orientation: context.orientation, status: item.status });\n return (\n <button\n {...props}\n aria-current={item.status === \"current\" ? \"step\" : undefined}\n aria-disabled={\n item.disabled || (!context.allowStepSelect && item.status !== \"current\") || undefined\n }\n className={cx(styles.trigger, className)}\n data-disabled={item.disabled || undefined}\n data-slot=\"stepper-trigger\"\n data-status={item.status}\n disabled={context.disabled || item.disabled}\n onClick={(event) => {\n if (!event.defaultPrevented) context.goTo(item.value);\n onClick?.(event);\n }}\n onKeyDown={(event) => {\n const isForwardKey =\n (context.orientation === \"horizontal\" && event.key === \"ArrowRight\") ||\n (context.orientation === \"vertical\" && event.key === \"ArrowDown\");\n const isBackwardKey =\n (context.orientation === \"horizontal\" && event.key === \"ArrowLeft\") ||\n (context.orientation === \"vertical\" && event.key === \"ArrowUp\");\n if (isForwardKey) {\n event.preventDefault();\n context.move(1);\n } else if (isBackwardKey) {\n event.preventDefault();\n context.move(-1);\n } else if (event.key === \"Home\") {\n event.preventDefault();\n context.moveToBoundary(-1);\n } else if (event.key === \"End\") {\n event.preventDefault();\n context.moveToBoundary(1);\n }\n onKeyDown?.(event);\n }}\n ref={ref}\n type={type}\n />\n );\n },\n);\n\nexport type StepperIndicatorProps = ComponentPropsWithoutRef<\"span\">;\nexport const StepperIndicator = forwardRef<HTMLSpanElement, StepperIndicatorProps>(\n function StepperIndicator({ children, className, ...props }, ref) {\n const { orientation } = useStepperContext();\n const item = useStepperItemContext();\n const styles = stepper({ orientation, status: item.status });\n return (\n <span\n {...props}\n aria-hidden={props[\"aria-hidden\"] ?? true}\n className={cx(styles.indicator, className)}\n data-slot=\"stepper-indicator\"\n data-status={item.status}\n ref={ref}\n >\n {children ?? (item.status === \"complete\" ? \"✓\" : \"\")}\n </span>\n );\n },\n);\n\nfunction createSpanSlot(slot: \"title\" | \"description\" | \"separator\") {\n return forwardRef<HTMLSpanElement, ComponentPropsWithoutRef<\"span\">>(function StepperSlot(\n { className, ...props },\n ref,\n ) {\n const { orientation } = useStepperContext();\n const item = useStepperItemContext();\n const styles = stepper({ orientation, status: item.status });\n return (\n <span\n {...props}\n className={cx(styles[slot], className)}\n data-slot={`stepper-${slot}`}\n ref={ref}\n />\n );\n });\n}\n\nexport const StepperTitle = createSpanSlot(\"title\");\nexport const StepperDescription = createSpanSlot(\"description\");\n\nexport const StepperContent = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function StepperContent({ className, hidden, ...props }, ref) {\n const item = useStepperItemContext();\n const { orientation } = useStepperContext();\n const styles = stepper({ orientation, status: item.status });\n return (\n <div\n {...props}\n className={cx(styles.content, className)}\n data-slot=\"stepper-content\"\n hidden={hidden ?? item.status !== \"current\"}\n ref={ref}\n />\n );\n },\n);\n\nexport const StepperSeparator = createSpanSlot(\"separator\");\n\nexport interface StepperNavigationButtonProps extends ComponentPropsWithoutRef<\"button\"> {\n children?: ReactNode;\n}\n\nexport const StepperPrevious = forwardRef<HTMLButtonElement, StepperNavigationButtonProps>(\n function StepperPrevious(\n { children = \"Previous\", className, disabled: disabledProp, ...props },\n ref,\n ) {\n const context = useStepperContext();\n const styles = stepper({ orientation: context.orientation });\n return (\n <button\n {...props}\n className={cx(styles.previous, className)}\n data-slot=\"stepper-previous\"\n disabled={disabledProp || context.disabled}\n onClick={(event) => {\n context.move(-1);\n props.onClick?.(event);\n }}\n ref={ref}\n type={props.type ?? \"button\"}\n >\n {children}\n </button>\n );\n },\n);\n\nexport const StepperNext = forwardRef<HTMLButtonElement, StepperNavigationButtonProps>(\n function StepperNext({ children = \"Next\", className, disabled: disabledProp, ...props }, ref) {\n const context = useStepperContext();\n const styles = stepper({ orientation: context.orientation });\n return (\n <button\n {...props}\n className={cx(styles.next, className)}\n data-slot=\"stepper-next\"\n disabled={disabledProp || context.disabled}\n onClick={(event) => {\n context.move(1);\n props.onClick?.(event);\n }}\n ref={ref}\n type={props.type ?? \"button\"}\n >\n {children}\n </button>\n );\n },\n);\n\nexport const Stepper = {\n Root: StepperRoot,\n List: StepperList,\n Item: StepperItem,\n Trigger: StepperTrigger,\n Indicator: StepperIndicator,\n Title: StepperTitle,\n Description: StepperDescription,\n Content: StepperContent,\n Separator: StepperSeparator,\n Previous: StepperPrevious,\n Next: StepperNext,\n};\n"],"mappings":";;;;;;AA6CA,MAAM,kBAAA,GAAA,MAAA,cAAA,CAA2D,IAAI;AACrE,MAAM,sBAAA,GAAA,MAAA,cAAA,CAAmE,IAAI;AAE7E,SAAS,oBAAoB;CAC3B,MAAM,WAAA,GAAA,MAAA,WAAA,CAAqB,cAAc;CACzC,IAAI,CAAC,SAAS,MAAM,IAAI,MAAM,qDAAqD;CACnF,OAAO;AACT;AAEA,SAAS,wBAAwB;CAC/B,MAAM,WAAA,GAAA,MAAA,WAAA,CAAqB,kBAAkB;CAC7C,IAAI,CAAC,SAAS,MAAM,IAAI,MAAM,yDAAyD;CACvF,OAAO;AACT;AAeA,MAAa,eAAA,GAAA,MAAA,WAAA,CAAwD,SAAS,YAC5E,EACE,kBAAkB,MAClB,cAAc,WACd,UACA,WACA,cACA,WAAW,OACX,MACA,SAAS,OACT,MACA,eACA,cAAc,cACd,OAAO,iBACP,GAAG,SAEL,KACA;CACA,MAAM,CAAC,mBAAmB,yBAAA,GAAA,MAAA,SAAA,CAAiC,YAAY;CACvE,MAAM,CAAC,SAAS,eAAA,GAAA,MAAA,SAAA,CAAqC,CAAC,CAAC;CACvD,MAAM,cAAc,mBAAmB,qBAAqB,QAAQ,EAAE,EAAE;CAExE,MAAM,YAAA,GAAA,MAAA,YAAA,EAAwB,WAAuB;EACnD,YAAY,YAAY;GACtB,MAAM,QAAQ,QAAQ,WAAW,SAAS,KAAK,UAAU,OAAO,KAAK;GACrE,IAAI,UAAU,IAAI,OAAO,CAAC,GAAG,SAAS,MAAM;GAC5C,MAAM,gBAAgB,QAAQ;GAC9B,IAAI,CAAC,eAAe,OAAO;GAC3B,IAAI,cAAc,aAAa,OAAO,YAAY,cAAc,WAAW,OAAO,QAChF,OAAO;GAET,MAAM,OAAO,QAAQ,MAAM;GAC3B,KAAK,S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ts
|
|
3
|
+
type StepperOrientation = "horizontal" | "vertical";
|
|
4
|
+
type StepperStatus = "current" | "complete" | "upcoming" | "disabled";
|
|
5
|
+
interface StepperRootProps extends Omit<ComponentPropsWithoutRef<"nav">, "children"> {
|
|
6
|
+
value?: string;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
onValueChange?: (value: string) => void;
|
|
9
|
+
orientation?: StepperOrientation;
|
|
10
|
+
linear?: boolean;
|
|
11
|
+
allowStepSelect?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
name?: string;
|
|
14
|
+
form?: string;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
declare const StepperRoot: import("react").ForwardRefExoticComponent<StepperRootProps & import("react").RefAttributes<HTMLElement>>;
|
|
18
|
+
declare const StepperList: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & import("react").RefAttributes<HTMLOListElement>>;
|
|
19
|
+
interface StepperItemProps extends ComponentPropsWithoutRef<"li"> {
|
|
20
|
+
value: string;
|
|
21
|
+
status?: StepperStatus;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const StepperItem: import("react").ForwardRefExoticComponent<StepperItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
25
|
+
type StepperTriggerProps = ComponentPropsWithoutRef<"button">;
|
|
26
|
+
declare const StepperTrigger: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
declare const StepperIndicator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
28
|
+
declare const StepperTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
29
|
+
declare const StepperDescription: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
30
|
+
declare const StepperContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
|
+
declare const StepperSeparator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
32
|
+
interface StepperNavigationButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
declare const StepperPrevious: import("react").ForwardRefExoticComponent<StepperNavigationButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
36
|
+
declare const StepperNext: import("react").ForwardRefExoticComponent<StepperNavigationButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
37
|
+
declare const Stepper: {
|
|
38
|
+
Root: import("react").ForwardRefExoticComponent<StepperRootProps & import("react").RefAttributes<HTMLElement>>;
|
|
39
|
+
List: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & import("react").RefAttributes<HTMLOListElement>>;
|
|
40
|
+
Item: import("react").ForwardRefExoticComponent<StepperItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
41
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
42
|
+
Indicator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
43
|
+
Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
44
|
+
Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
45
|
+
Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
+
Separator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
47
|
+
Previous: import("react").ForwardRefExoticComponent<StepperNavigationButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
Next: import("react").ForwardRefExoticComponent<StepperNavigationButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { Stepper, StepperContent, StepperDescription, StepperIndicator, StepperItem, StepperItemProps, StepperList, StepperNavigationButtonProps, StepperNext, StepperOrientation, StepperPrevious, StepperRoot, StepperRootProps, StepperSeparator, StepperStatus, StepperTitle, StepperTrigger, StepperTriggerProps };
|
|
52
|
+
//# sourceMappingURL=stepper.d.cts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
2
|
+
//#region src/components/stepper/stepper.d.ts
|
|
3
|
+
type StepperOrientation = "horizontal" | "vertical";
|
|
4
|
+
type StepperStatus = "current" | "complete" | "upcoming" | "disabled";
|
|
5
|
+
interface StepperRootProps extends Omit<ComponentPropsWithoutRef<"nav">, "children"> {
|
|
6
|
+
value?: string;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
onValueChange?: (value: string) => void;
|
|
9
|
+
orientation?: StepperOrientation;
|
|
10
|
+
linear?: boolean;
|
|
11
|
+
allowStepSelect?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
name?: string;
|
|
14
|
+
form?: string;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
declare const StepperRoot: import("react").ForwardRefExoticComponent<StepperRootProps & import("react").RefAttributes<HTMLElement>>;
|
|
18
|
+
declare const StepperList: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & import("react").RefAttributes<HTMLOListElement>>;
|
|
19
|
+
interface StepperItemProps extends ComponentPropsWithoutRef<"li"> {
|
|
20
|
+
value: string;
|
|
21
|
+
status?: StepperStatus;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const StepperItem: import("react").ForwardRefExoticComponent<StepperItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
25
|
+
type StepperTriggerProps = ComponentPropsWithoutRef<"button">;
|
|
26
|
+
declare const StepperTrigger: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
declare const StepperIndicator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
28
|
+
declare const StepperTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
29
|
+
declare const StepperDescription: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
30
|
+
declare const StepperContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
|
+
declare const StepperSeparator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
32
|
+
interface StepperNavigationButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
declare const StepperPrevious: import("react").ForwardRefExoticComponent<StepperNavigationButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
36
|
+
declare const StepperNext: import("react").ForwardRefExoticComponent<StepperNavigationButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
37
|
+
declare const Stepper: {
|
|
38
|
+
Root: import("react").ForwardRefExoticComponent<StepperRootProps & import("react").RefAttributes<HTMLElement>>;
|
|
39
|
+
List: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & import("react").RefAttributes<HTMLOListElement>>;
|
|
40
|
+
Item: import("react").ForwardRefExoticComponent<StepperItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
41
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
42
|
+
Indicator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
43
|
+
Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
44
|
+
Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
45
|
+
Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
+
Separator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
47
|
+
Previous: import("react").ForwardRefExoticComponent<StepperNavigationButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
Next: import("react").ForwardRefExoticComponent<StepperNavigationButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
49
|
+
};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { Stepper, StepperContent, StepperDescription, StepperIndicator, StepperItem, StepperItemProps, StepperList, StepperNavigationButtonProps, StepperNext, StepperOrientation, StepperPrevious, StepperRoot, StepperRootProps, StepperSeparator, StepperStatus, StepperTitle, StepperTrigger, StepperTriggerProps };
|
|
52
|
+
//# sourceMappingURL=stepper.d.ts.map
|