@syscore/ui-library 2.0.0-beta-publish-workflow-beta.19 → 2.0.0-beta-publish-workflow-beta.21
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/client/components/ui/button.tsx +4 -0
- package/client/components/ui/progress.tsx +9 -3
- package/client/components/ui/select.tsx +87 -45
- package/client/components/ui/stepper.tsx +4 -1
- package/client/global.css +69 -2
- package/dist/client/components/ui/button.js +2 -0
- package/dist/client/components/ui/progress.js +2 -2
- package/dist/client/components/ui/select.js +82 -36
- package/dist/client/components/ui/stepper.js +3 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -6
- package/dist/ui/index.js +1 -3
- package/package.json +1 -1
|
@@ -70,6 +70,8 @@ export interface ButtonProps
|
|
|
70
70
|
iconGap?: "tight" | "normal";
|
|
71
71
|
/** Default `"asymmetric"` reduces padding only on the icon's side. `"symmetric"` keeps both sides equal to the size variant's own padding. */
|
|
72
72
|
iconPadding?: "asymmetric" | "symmetric";
|
|
73
|
+
/** Stretches the button to its container's width — e.g. a Continue/Back pair that should read as the same size as a full-width CTA on another step. */
|
|
74
|
+
fullWidth?: boolean;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
const sizeTextClasses: Record<string, string> = {
|
|
@@ -91,6 +93,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
91
93
|
iconPosition = "leading",
|
|
92
94
|
iconGap = "tight",
|
|
93
95
|
iconPadding = "asymmetric",
|
|
96
|
+
fullWidth = false,
|
|
94
97
|
children,
|
|
95
98
|
style,
|
|
96
99
|
...props
|
|
@@ -109,6 +112,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
109
112
|
Icon && iconPadding === "asymmetric" && iconPosition === "leading" && "button--has-icon-leading",
|
|
110
113
|
Icon && iconPadding === "asymmetric" && iconPosition === "trailing" && "button--has-icon-trailing",
|
|
111
114
|
Icon && iconGap === "normal" && "button--icon-gap-normal",
|
|
115
|
+
fullWidth && "button--full-width",
|
|
112
116
|
ftMadeFont && "font-ftMade",
|
|
113
117
|
mazzardSoftFont && "font-mazzardSoft",
|
|
114
118
|
className,
|
|
@@ -3,13 +3,19 @@ import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "@/lib/utils";
|
|
5
5
|
|
|
6
|
+
interface ProgressProps
|
|
7
|
+
extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {
|
|
8
|
+
/** "default" (16px, the original size) or "small" (4px — inline/compact contexts, e.g. next to an upload trigger). */
|
|
9
|
+
size?: "default" | "small";
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
const Progress = React.forwardRef<
|
|
7
13
|
React.ElementRef<typeof ProgressPrimitive.Root>,
|
|
8
|
-
|
|
9
|
-
>(({ className, value, ...props }, ref) => (
|
|
14
|
+
ProgressProps
|
|
15
|
+
>(({ className, value, size = "default", ...props }, ref) => (
|
|
10
16
|
<ProgressPrimitive.Root
|
|
11
17
|
ref={ref}
|
|
12
|
-
className={cn("progress", className)}
|
|
18
|
+
className={cn("progress", size === "small" && "progress--small", className)}
|
|
13
19
|
{...props}
|
|
14
20
|
>
|
|
15
21
|
<ProgressPrimitive.Indicator
|
|
@@ -31,54 +31,98 @@ const SelectTrigger = React.forwardRef<
|
|
|
31
31
|
));
|
|
32
32
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
|
36
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
|
|
37
|
-
>(({ className, ...props }, ref) => (
|
|
38
|
-
<SelectPrimitive.ScrollUpButton
|
|
39
|
-
ref={ref}
|
|
40
|
-
className={cn("select-scroll-button select-scroll-up", className)}
|
|
41
|
-
{...props}
|
|
42
|
-
>
|
|
43
|
-
<UtilityChevronDown />
|
|
44
|
-
</SelectPrimitive.ScrollUpButton>
|
|
45
|
-
));
|
|
46
|
-
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
34
|
+
type ScrollDirection = "up" | "down";
|
|
47
35
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
36
|
+
function SelectScrollButton({
|
|
37
|
+
direction,
|
|
38
|
+
viewportRef,
|
|
39
|
+
visible,
|
|
40
|
+
onScrolled,
|
|
41
|
+
}: {
|
|
42
|
+
direction: ScrollDirection;
|
|
43
|
+
viewportRef: React.RefObject<HTMLDivElement>;
|
|
44
|
+
visible: boolean;
|
|
45
|
+
onScrolled: () => void;
|
|
46
|
+
}) {
|
|
47
|
+
if (!visible) return null;
|
|
48
|
+
|
|
49
|
+
const scrollOneItem = () => {
|
|
50
|
+
const viewport = viewportRef.current;
|
|
51
|
+
if (!viewport) return;
|
|
52
|
+
const item = viewport.querySelector<HTMLElement>('[role="option"]');
|
|
53
|
+
const step = item?.offsetHeight ?? 32;
|
|
54
|
+
viewport.scrollBy({ top: direction === "up" ? -step : step });
|
|
55
|
+
onScrolled();
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<button
|
|
60
|
+
type="button"
|
|
61
|
+
tabIndex={-1}
|
|
62
|
+
aria-label={direction === "up" ? "Scroll up one option" : "Scroll down one option"}
|
|
63
|
+
className={cn("select-scroll-button", `select-scroll-button--${direction}`)}
|
|
64
|
+
onClick={scrollOneItem}
|
|
65
|
+
>
|
|
66
|
+
<UtilityChevronDown />
|
|
67
|
+
</button>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
62
70
|
|
|
63
71
|
const SelectContent = React.forwardRef<
|
|
64
72
|
React.ElementRef<typeof SelectPrimitive.Content>,
|
|
65
73
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
|
|
66
|
-
>(({ className, children, position = "popper", ...props }, ref) =>
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
>(({ className, children, position = "popper", ...props }, ref) => {
|
|
75
|
+
const viewportRef = React.useRef<HTMLDivElement>(null);
|
|
76
|
+
const [canScrollUp, setCanScrollUp] = React.useState(false);
|
|
77
|
+
const [canScrollDown, setCanScrollDown] = React.useState(false);
|
|
78
|
+
|
|
79
|
+
const updateScrollState = React.useCallback(() => {
|
|
80
|
+
const viewport = viewportRef.current;
|
|
81
|
+
if (!viewport) return;
|
|
82
|
+
setCanScrollUp(viewport.scrollTop > 0);
|
|
83
|
+
setCanScrollDown(
|
|
84
|
+
viewport.scrollTop + viewport.clientHeight < viewport.scrollHeight - 1,
|
|
85
|
+
);
|
|
86
|
+
}, []);
|
|
87
|
+
|
|
88
|
+
// The viewport's size isn't settled until Radix finishes positioning the
|
|
89
|
+
// open popup, so the first check runs a tick after mount.
|
|
90
|
+
React.useEffect(() => {
|
|
91
|
+
const raf = requestAnimationFrame(updateScrollState);
|
|
92
|
+
return () => cancelAnimationFrame(raf);
|
|
93
|
+
}, [updateScrollState, children]);
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<SelectPrimitive.Portal>
|
|
97
|
+
<SelectPrimitive.Content
|
|
98
|
+
ref={ref}
|
|
99
|
+
className={cn("select-content", className)}
|
|
100
|
+
position={position}
|
|
101
|
+
{...props}
|
|
102
|
+
>
|
|
103
|
+
<SelectScrollButton
|
|
104
|
+
direction="up"
|
|
105
|
+
viewportRef={viewportRef}
|
|
106
|
+
visible={canScrollUp}
|
|
107
|
+
onScrolled={updateScrollState}
|
|
108
|
+
/>
|
|
109
|
+
<SelectPrimitive.Viewport
|
|
110
|
+
ref={viewportRef}
|
|
111
|
+
className="select-viewport"
|
|
112
|
+
onScroll={updateScrollState}
|
|
113
|
+
>
|
|
114
|
+
{children}
|
|
115
|
+
</SelectPrimitive.Viewport>
|
|
116
|
+
<SelectScrollButton
|
|
117
|
+
direction="down"
|
|
118
|
+
viewportRef={viewportRef}
|
|
119
|
+
visible={canScrollDown}
|
|
120
|
+
onScrolled={updateScrollState}
|
|
121
|
+
/>
|
|
122
|
+
</SelectPrimitive.Content>
|
|
123
|
+
</SelectPrimitive.Portal>
|
|
124
|
+
);
|
|
125
|
+
});
|
|
82
126
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
83
127
|
|
|
84
128
|
const SelectLabel = React.forwardRef<
|
|
@@ -128,6 +172,4 @@ export {
|
|
|
128
172
|
SelectLabel,
|
|
129
173
|
SelectItem,
|
|
130
174
|
SelectSeparator,
|
|
131
|
-
SelectScrollUpButton,
|
|
132
|
-
SelectScrollDownButton,
|
|
133
175
|
};
|
|
@@ -87,7 +87,8 @@ const Stepper = React.forwardRef<HTMLDivElement, StepperProps>(
|
|
|
87
87
|
>
|
|
88
88
|
{steps.map((step, index) => {
|
|
89
89
|
const status = getStatus(index, currentStep);
|
|
90
|
-
|
|
90
|
+
|
|
91
|
+
const isClickable = !!onStepClick && status !== "upcoming";
|
|
91
92
|
const isLast = index === steps.length - 1;
|
|
92
93
|
|
|
93
94
|
return (
|
|
@@ -95,9 +96,11 @@ const Stepper = React.forwardRef<HTMLDivElement, StepperProps>(
|
|
|
95
96
|
key={index}
|
|
96
97
|
role="listitem"
|
|
97
98
|
aria-current={status === "current" ? "step" : undefined}
|
|
99
|
+
onClick={() => isClickable && onStepClick(index)}
|
|
98
100
|
className={cn(
|
|
99
101
|
"stepper-item",
|
|
100
102
|
`stepper-item--${status}`,
|
|
103
|
+
isClickable && "stepper-item--clickable",
|
|
101
104
|
orientation === "horizontal" && !isLast && "stepper-item--with-connector",
|
|
102
105
|
)}
|
|
103
106
|
>
|
package/client/global.css
CHANGED
|
@@ -919,6 +919,11 @@ body {
|
|
|
919
919
|
outline: none;
|
|
920
920
|
}
|
|
921
921
|
|
|
922
|
+
.button--full-width {
|
|
923
|
+
display: flex;
|
|
924
|
+
width: 100%;
|
|
925
|
+
}
|
|
926
|
+
|
|
922
927
|
.button:focus-visible {
|
|
923
928
|
outline: none;
|
|
924
929
|
box-shadow:
|
|
@@ -4713,6 +4718,10 @@ body {
|
|
|
4713
4718
|
transition: transform 0.15s ease-in-out;
|
|
4714
4719
|
}
|
|
4715
4720
|
|
|
4721
|
+
.progress--small {
|
|
4722
|
+
height: 0.25rem;
|
|
4723
|
+
}
|
|
4724
|
+
|
|
4716
4725
|
/* Slider Styles */
|
|
4717
4726
|
.slider {
|
|
4718
4727
|
position: relative;
|
|
@@ -6091,11 +6100,22 @@ body {
|
|
|
6091
6100
|
|
|
6092
6101
|
.select-scroll-button {
|
|
6093
6102
|
display: flex;
|
|
6094
|
-
cursor:
|
|
6103
|
+
cursor: pointer;
|
|
6095
6104
|
align-items: center;
|
|
6096
6105
|
justify-content: center;
|
|
6106
|
+
width: 100%;
|
|
6097
6107
|
padding-top: 0.25rem;
|
|
6098
6108
|
padding-bottom: 0.25rem;
|
|
6109
|
+
background: none;
|
|
6110
|
+
border: none;
|
|
6111
|
+
}
|
|
6112
|
+
|
|
6113
|
+
.select-scroll-button:hover {
|
|
6114
|
+
opacity: 0.7;
|
|
6115
|
+
}
|
|
6116
|
+
|
|
6117
|
+
.select-scroll-button--up svg {
|
|
6118
|
+
transform: rotate(180deg);
|
|
6099
6119
|
}
|
|
6100
6120
|
|
|
6101
6121
|
.select-scroll-up svg {
|
|
@@ -6148,7 +6168,28 @@ body {
|
|
|
6148
6168
|
}
|
|
6149
6169
|
|
|
6150
6170
|
.select-viewport {
|
|
6151
|
-
/*
|
|
6171
|
+
/* Thin, always-visible scrollbar: the default native scrollbar nearly
|
|
6172
|
+
disappears against the dark .select-content background (team feedback
|
|
6173
|
+
2026-10-29), leaving no indication that more options exist below. */
|
|
6174
|
+
scrollbar-width: thin;
|
|
6175
|
+
scrollbar-color: var(--color-gray-400, #9397a1) transparent;
|
|
6176
|
+
}
|
|
6177
|
+
|
|
6178
|
+
.select-viewport::-webkit-scrollbar {
|
|
6179
|
+
width: 8px;
|
|
6180
|
+
}
|
|
6181
|
+
|
|
6182
|
+
.select-viewport::-webkit-scrollbar-track {
|
|
6183
|
+
background: transparent;
|
|
6184
|
+
}
|
|
6185
|
+
|
|
6186
|
+
.select-viewport::-webkit-scrollbar-thumb {
|
|
6187
|
+
border-radius: 8px;
|
|
6188
|
+
background-color: var(--color-gray-400, #9397a1);
|
|
6189
|
+
}
|
|
6190
|
+
|
|
6191
|
+
.select-viewport::-webkit-scrollbar-thumb:hover {
|
|
6192
|
+
background-color: var(--color-gray-200, #dedfe3);
|
|
6152
6193
|
}
|
|
6153
6194
|
|
|
6154
6195
|
.select-label {
|
|
@@ -12420,6 +12461,19 @@ body {
|
|
|
12420
12461
|
opacity: 0.8;
|
|
12421
12462
|
}
|
|
12422
12463
|
|
|
12464
|
+
/* Hovering anywhere on a clickable step — not just the circle or the
|
|
12465
|
+
title text — gives the same feedback, so the "+"/check icon and the
|
|
12466
|
+
empty space around it read as interactive too. */
|
|
12467
|
+
.stepper-item--clickable {
|
|
12468
|
+
cursor: pointer;
|
|
12469
|
+
}
|
|
12470
|
+
.stepper-item--clickable:hover .stepper-indicator {
|
|
12471
|
+
opacity: 0.8;
|
|
12472
|
+
}
|
|
12473
|
+
.stepper-item--clickable:hover .stepper-title {
|
|
12474
|
+
text-decoration: underline;
|
|
12475
|
+
}
|
|
12476
|
+
|
|
12423
12477
|
.stepper-indicator-number {
|
|
12424
12478
|
line-height: 1;
|
|
12425
12479
|
}
|
|
@@ -14241,6 +14295,19 @@ body {
|
|
|
14241
14295
|
opacity: 0.8;
|
|
14242
14296
|
}
|
|
14243
14297
|
|
|
14298
|
+
/* Hovering anywhere on a clickable step — not just the circle or the
|
|
14299
|
+
title text — gives the same feedback, so the "+"/check icon and the
|
|
14300
|
+
empty space around it read as interactive too. */
|
|
14301
|
+
.stepper-item--clickable {
|
|
14302
|
+
cursor: pointer;
|
|
14303
|
+
}
|
|
14304
|
+
.stepper-item--clickable:hover .stepper-indicator {
|
|
14305
|
+
opacity: 0.8;
|
|
14306
|
+
}
|
|
14307
|
+
.stepper-item--clickable:hover .stepper-title {
|
|
14308
|
+
text-decoration: underline;
|
|
14309
|
+
}
|
|
14310
|
+
|
|
14244
14311
|
.stepper-indicator-number {
|
|
14245
14312
|
line-height: 1;
|
|
14246
14313
|
}
|
|
@@ -62,6 +62,7 @@ const Button = React.forwardRef(
|
|
|
62
62
|
iconPosition = "leading",
|
|
63
63
|
iconGap = "tight",
|
|
64
64
|
iconPadding = "asymmetric",
|
|
65
|
+
fullWidth = false,
|
|
65
66
|
children,
|
|
66
67
|
style,
|
|
67
68
|
...props
|
|
@@ -76,6 +77,7 @@ const Button = React.forwardRef(
|
|
|
76
77
|
Icon && iconPadding === "asymmetric" && iconPosition === "leading" && "button--has-icon-leading",
|
|
77
78
|
Icon && iconPadding === "asymmetric" && iconPosition === "trailing" && "button--has-icon-trailing",
|
|
78
79
|
Icon && iconGap === "normal" && "button--icon-gap-normal",
|
|
80
|
+
fullWidth && "button--full-width",
|
|
79
81
|
ftMadeFont && "font-ftMade",
|
|
80
82
|
mazzardSoftFont && "font-mazzardSoft",
|
|
81
83
|
className
|
|
@@ -2,11 +2,11 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
4
4
|
import { cn } from "../../lib/utils.js";
|
|
5
|
-
const Progress = React.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5
|
+
const Progress = React.forwardRef(({ className, value, size = "default", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6
6
|
ProgressPrimitive.Root,
|
|
7
7
|
{
|
|
8
8
|
ref,
|
|
9
|
-
className: cn("progress", className),
|
|
9
|
+
className: cn("progress", size === "small" && "progress--small", className),
|
|
10
10
|
...props,
|
|
11
11
|
children: /* @__PURE__ */ jsx(
|
|
12
12
|
ProgressPrimitive.Indicator,
|
|
@@ -19,40 +19,88 @@ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref)
|
|
|
19
19
|
}
|
|
20
20
|
));
|
|
21
21
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
)
|
|
22
|
+
function SelectScrollButton({
|
|
23
|
+
direction,
|
|
24
|
+
viewportRef,
|
|
25
|
+
visible,
|
|
26
|
+
onScrolled
|
|
27
|
+
}) {
|
|
28
|
+
if (!visible) return null;
|
|
29
|
+
const scrollOneItem = () => {
|
|
30
|
+
const viewport = viewportRef.current;
|
|
31
|
+
if (!viewport) return;
|
|
32
|
+
const item = viewport.querySelector('[role="option"]');
|
|
33
|
+
const step = (item == null ? void 0 : item.offsetHeight) ?? 32;
|
|
34
|
+
viewport.scrollBy({ top: direction === "up" ? -step : step });
|
|
35
|
+
onScrolled();
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
"button",
|
|
39
|
+
{
|
|
40
|
+
type: "button",
|
|
41
|
+
tabIndex: -1,
|
|
42
|
+
"aria-label": direction === "up" ? "Scroll up one option" : "Scroll down one option",
|
|
43
|
+
className: cn("select-scroll-button", `select-scroll-button--${direction}`),
|
|
44
|
+
onClick: scrollOneItem,
|
|
45
|
+
children: /* @__PURE__ */ jsx(UtilityChevronDown, {})
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
|
|
50
|
+
const viewportRef = React.useRef(null);
|
|
51
|
+
const [canScrollUp, setCanScrollUp] = React.useState(false);
|
|
52
|
+
const [canScrollDown, setCanScrollDown] = React.useState(false);
|
|
53
|
+
const updateScrollState = React.useCallback(() => {
|
|
54
|
+
const viewport = viewportRef.current;
|
|
55
|
+
if (!viewport) return;
|
|
56
|
+
setCanScrollUp(viewport.scrollTop > 0);
|
|
57
|
+
setCanScrollDown(
|
|
58
|
+
viewport.scrollTop + viewport.clientHeight < viewport.scrollHeight - 1
|
|
59
|
+
);
|
|
60
|
+
}, []);
|
|
61
|
+
React.useEffect(() => {
|
|
62
|
+
const raf = requestAnimationFrame(updateScrollState);
|
|
63
|
+
return () => cancelAnimationFrame(raf);
|
|
64
|
+
}, [updateScrollState, children]);
|
|
65
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
66
|
+
SelectPrimitive.Content,
|
|
67
|
+
{
|
|
68
|
+
ref,
|
|
69
|
+
className: cn("select-content", className),
|
|
70
|
+
position,
|
|
71
|
+
...props,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
SelectScrollButton,
|
|
75
|
+
{
|
|
76
|
+
direction: "up",
|
|
77
|
+
viewportRef,
|
|
78
|
+
visible: canScrollUp,
|
|
79
|
+
onScrolled: updateScrollState
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
SelectPrimitive.Viewport,
|
|
84
|
+
{
|
|
85
|
+
ref: viewportRef,
|
|
86
|
+
className: "select-viewport",
|
|
87
|
+
onScroll: updateScrollState,
|
|
88
|
+
children
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ jsx(
|
|
92
|
+
SelectScrollButton,
|
|
93
|
+
{
|
|
94
|
+
direction: "down",
|
|
95
|
+
viewportRef,
|
|
96
|
+
visible: canScrollDown,
|
|
97
|
+
onScrolled: updateScrollState
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
) });
|
|
103
|
+
});
|
|
56
104
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
57
105
|
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
58
106
|
SelectPrimitive.Label,
|
|
@@ -88,8 +136,6 @@ export {
|
|
|
88
136
|
SelectGroup,
|
|
89
137
|
SelectItem,
|
|
90
138
|
SelectLabel,
|
|
91
|
-
SelectScrollDownButton,
|
|
92
|
-
SelectScrollUpButton,
|
|
93
139
|
SelectSeparator,
|
|
94
140
|
SelectTrigger,
|
|
95
141
|
SelectValue
|
|
@@ -50,16 +50,18 @@ const Stepper = React.forwardRef(
|
|
|
50
50
|
),
|
|
51
51
|
children: steps.map((step, index) => {
|
|
52
52
|
const status = getStatus(index, currentStep);
|
|
53
|
-
const isClickable = !!onStepClick && status
|
|
53
|
+
const isClickable = !!onStepClick && status !== "upcoming";
|
|
54
54
|
const isLast = index === steps.length - 1;
|
|
55
55
|
return /* @__PURE__ */ jsxs(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
58
|
role: "listitem",
|
|
59
59
|
"aria-current": status === "current" ? "step" : void 0,
|
|
60
|
+
onClick: () => isClickable && onStepClick(index),
|
|
60
61
|
className: cn(
|
|
61
62
|
"stepper-item",
|
|
62
63
|
`stepper-item--${status}`,
|
|
64
|
+
isClickable && "stepper-item--clickable",
|
|
63
65
|
orientation === "horizontal" && !isLast && "stepper-item--with-connector"
|
|
64
66
|
),
|
|
65
67
|
children: [
|