@konstructio/ui 0.1.2-alpha.54 → 0.1.2-alpha.55
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/Button/Button.variants.js +7 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +34 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +118 -0
- package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +92 -0
- package/dist/components/ButtonGroup/ButtonGroup.variants.d.ts +13 -0
- package/dist/components/ButtonGroup/ButtonGroup.variants.js +31 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.d.ts +3 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +263 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.types.d.ts +21 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.d.ts +26 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +89 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/index.d.ts +2 -0
- package/dist/components/ButtonGroup/components/ButtonGroupItem/index.js +4 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.d.ts +3 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +45 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +8 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.d.ts +2 -0
- package/dist/components/ButtonGroup/components/ButtonGroupLabel/index.js +4 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.d.ts +3 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +37 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +6 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.d.ts +2 -0
- package/dist/components/ButtonGroup/components/ButtonGroupMessage/index.js +4 -0
- package/dist/components/ButtonGroup/components/index.d.ts +3 -0
- package/dist/components/ButtonGroup/components/index.js +8 -0
- package/dist/components/ButtonGroup/hooks/index.d.ts +2 -0
- package/dist/components/ButtonGroup/hooks/index.js +4 -0
- package/dist/components/ButtonGroup/hooks/useButtonGroup.d.ts +3 -0
- package/dist/components/ButtonGroup/hooks/useButtonGroup.js +67 -0
- package/dist/components/ButtonGroup/hooks/useButtonGroup.types.d.ts +18 -0
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +11 -11
- package/dist/components/Drawer/Drawer.d.ts +36 -0
- package/dist/components/Drawer/Drawer.js +134 -0
- package/dist/components/Drawer/Drawer.types.d.ts +65 -0
- package/dist/components/Drawer/Drawer.variants.d.ts +8 -0
- package/dist/components/Drawer/Drawer.variants.js +92 -0
- package/dist/components/Drawer/components/Body/Body.d.ts +3 -0
- package/dist/components/Drawer/components/Body/Body.js +24 -0
- package/dist/components/Drawer/components/Body/Body.types.d.ts +7 -0
- package/dist/components/Drawer/components/Body/index.d.ts +2 -0
- package/dist/components/Drawer/components/Body/index.js +4 -0
- package/dist/components/Drawer/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Drawer/components/Footer/Footer.js +26 -0
- package/dist/components/Drawer/components/Footer/Footer.types.d.ts +7 -0
- package/dist/components/Drawer/components/Footer/index.d.ts +2 -0
- package/dist/components/Drawer/components/Footer/index.js +4 -0
- package/dist/components/Drawer/components/Header/Header.d.ts +3 -0
- package/dist/components/Drawer/components/Header/Header.js +27 -0
- package/dist/components/Drawer/components/Header/Header.types.d.ts +9 -0
- package/dist/components/Drawer/components/Header/index.d.ts +2 -0
- package/dist/components/Drawer/components/Header/index.js +4 -0
- package/dist/components/Drawer/components/index.d.ts +3 -0
- package/dist/components/Drawer/components/index.js +8 -0
- package/dist/components/Drawer/constants/index.d.ts +6 -0
- package/dist/components/Drawer/constants/index.js +9 -0
- package/dist/components/Drawer/contexts/Drawer.context.d.ts +7 -0
- package/dist/components/Drawer/contexts/Drawer.context.js +6 -0
- package/dist/components/Drawer/contexts/index.d.ts +2 -0
- package/dist/components/Drawer/contexts/index.js +5 -0
- package/dist/components/Drawer/hooks/index.d.ts +2 -0
- package/dist/components/Drawer/hooks/index.js +4 -0
- package/dist/components/Drawer/hooks/useDrawer.d.ts +2 -0
- package/dist/components/Drawer/hooks/useDrawer.js +66 -0
- package/dist/components/Drawer/hooks/useDrawer.types.d.ts +30 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.js +116 -116
- package/dist/components/RadioGroup/RadioGroup.js +34 -33
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +3 -1
- package/dist/components/Stepper/Stepper.js +29 -25
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.d.ts +1 -2
- package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +96 -91
- package/dist/components/Stepper/components/StepConnector/StepConnector.d.ts +1 -2
- package/dist/components/Stepper/components/StepConnector/StepConnector.js +10 -9
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.d.ts +1 -2
- package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +13 -19
- package/dist/components/Stepper/components/StepItem/StepItem.d.ts +1 -2
- package/dist/components/Stepper/components/StepItem/StepItem.js +6 -5
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.d.ts +1 -2
- package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +65 -60
- package/dist/components/Stepper/constants/index.d.ts +3 -0
- package/dist/components/Stepper/constants/index.js +13 -0
- package/dist/components/Stepper/hooks/index.d.ts +1 -0
- package/dist/components/Stepper/hooks/index.js +4 -0
- package/dist/components/Stepper/hooks/useStepItemLogic.d.ts +2 -0
- package/dist/components/Stepper/hooks/useStepItemLogic.js +27 -0
- package/dist/components/Stepper/hooks/useStepItemLogic.types.d.ts +16 -0
- package/dist/components/Stepper/utils/index.d.ts +3 -0
- package/dist/components/Stepper/utils/index.js +13 -0
- package/dist/components/Tooltip/Tooltip.variants.d.ts +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +113 -109
- package/dist/index.js +115 -111
- package/dist/package.json +18 -17
- package/dist/{proxy-Drz23HDt.js → proxy-i19-YB39.js} +1044 -1035
- package/dist/styles.css +1 -1
- package/package.json +15 -16
|
@@ -1,92 +1,97 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { cn as
|
|
4
|
-
import { stepIndicatorVariants as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { memo as H } from "react";
|
|
3
|
+
import { cn as o } from "../../../../utils/index.js";
|
|
4
|
+
import { stepIndicatorVariants as v, stepLabelVariants as C, stepDescriptionVariants as k, stepContentVariants as g, stepVariants as I } from "../../Stepper.variants.js";
|
|
5
|
+
import { getStepAriaLabel as x } from "../../utils/index.js";
|
|
6
|
+
import { StepConnector as w } from "../StepConnector/StepConnector.js";
|
|
7
|
+
import { StepIndicatorContent as S } from "../StepIndicatorContent/StepIndicatorContent.js";
|
|
8
|
+
import { useStepItemLogic as y } from "../../hooks/useStepItemLogic.js";
|
|
9
|
+
const K = ({
|
|
10
|
+
classNames: r,
|
|
9
11
|
clickable: D,
|
|
10
|
-
icons:
|
|
11
|
-
index:
|
|
12
|
-
isLast:
|
|
13
|
-
showConnector:
|
|
12
|
+
icons: m,
|
|
13
|
+
index: c,
|
|
14
|
+
isLast: p,
|
|
15
|
+
showConnector: b,
|
|
14
16
|
size: a,
|
|
15
|
-
step:
|
|
16
|
-
variant:
|
|
17
|
-
onClick:
|
|
17
|
+
step: i,
|
|
18
|
+
variant: t,
|
|
19
|
+
onClick: V
|
|
18
20
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const {
|
|
22
|
+
isClickable: l,
|
|
23
|
+
isDisabled: h,
|
|
24
|
+
LabelComponent: s,
|
|
25
|
+
status: e,
|
|
26
|
+
handleClick: u,
|
|
27
|
+
handleKeyDown: f
|
|
28
|
+
} = y({ clickable: D, step: i, onClick: V });
|
|
29
|
+
return t === "horizontal" ? /* @__PURE__ */ d("div", { className: "flex items-center", children: [
|
|
30
|
+
/* @__PURE__ */ d(
|
|
26
31
|
"div",
|
|
27
32
|
{
|
|
28
|
-
className:
|
|
29
|
-
|
|
33
|
+
className: o(
|
|
34
|
+
I({
|
|
30
35
|
orientation: "horizontal",
|
|
31
|
-
variant:
|
|
36
|
+
variant: t,
|
|
32
37
|
clickable: l
|
|
33
38
|
}),
|
|
34
|
-
|
|
39
|
+
r?.stepWrapper
|
|
35
40
|
),
|
|
36
41
|
role: l ? "button" : void 0,
|
|
37
42
|
tabIndex: l ? 0 : void 0,
|
|
38
|
-
onClick:
|
|
39
|
-
onKeyDown:
|
|
43
|
+
onClick: u,
|
|
44
|
+
onKeyDown: f,
|
|
40
45
|
"aria-current": e === "active" ? "step" : void 0,
|
|
41
|
-
"aria-disabled":
|
|
42
|
-
"aria-label":
|
|
46
|
+
...h && { "aria-disabled": !0 },
|
|
47
|
+
"aria-label": x(c, i.label, e),
|
|
43
48
|
children: [
|
|
44
49
|
/* @__PURE__ */ n(
|
|
45
50
|
"div",
|
|
46
51
|
{
|
|
47
|
-
className:
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
className: o(
|
|
53
|
+
v({ status: e, size: a }),
|
|
54
|
+
r?.indicator
|
|
50
55
|
),
|
|
51
56
|
"aria-hidden": "true",
|
|
52
57
|
children: /* @__PURE__ */ n(
|
|
53
|
-
|
|
58
|
+
S,
|
|
54
59
|
{
|
|
55
60
|
status: e,
|
|
56
|
-
index:
|
|
61
|
+
index: c,
|
|
57
62
|
size: a,
|
|
58
|
-
icons:
|
|
59
|
-
className:
|
|
63
|
+
icons: m,
|
|
64
|
+
className: r?.indicatorContent
|
|
60
65
|
}
|
|
61
66
|
)
|
|
62
67
|
}
|
|
63
68
|
),
|
|
64
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ d(
|
|
65
70
|
"div",
|
|
66
71
|
{
|
|
67
|
-
className:
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
className: o(
|
|
73
|
+
g({ variant: t }),
|
|
74
|
+
r?.content
|
|
70
75
|
),
|
|
71
76
|
children: [
|
|
72
|
-
|
|
73
|
-
|
|
77
|
+
i.label && /* @__PURE__ */ n(
|
|
78
|
+
s,
|
|
74
79
|
{
|
|
75
|
-
className:
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
className: o(
|
|
81
|
+
C({ status: e, size: a, variant: t }),
|
|
82
|
+
r?.label
|
|
78
83
|
),
|
|
79
|
-
children:
|
|
84
|
+
children: i.label
|
|
80
85
|
}
|
|
81
86
|
),
|
|
82
|
-
|
|
87
|
+
i.description && /* @__PURE__ */ n(
|
|
83
88
|
"span",
|
|
84
89
|
{
|
|
85
|
-
className:
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
className: o(
|
|
91
|
+
k({ status: e, size: a, variant: t }),
|
|
92
|
+
r?.description
|
|
88
93
|
),
|
|
89
|
-
children:
|
|
94
|
+
children: i.description
|
|
90
95
|
}
|
|
91
96
|
)
|
|
92
97
|
]
|
|
@@ -95,81 +100,81 @@ const L = ({
|
|
|
95
100
|
]
|
|
96
101
|
}
|
|
97
102
|
),
|
|
98
|
-
!
|
|
103
|
+
!p && b && /* @__PURE__ */ n(
|
|
99
104
|
"div",
|
|
100
105
|
{
|
|
101
|
-
className:
|
|
106
|
+
className: o(
|
|
102
107
|
"h-0.5 w-7.5 mx-2 transition-colors duration-200",
|
|
103
108
|
e === "completed" || e === "active" ? "bg-aurora-500" : e === "error" ? "bg-red-700 dark:bg-red-600" : "bg-slate-300 dark:bg-metal-400",
|
|
104
|
-
|
|
109
|
+
r?.connector
|
|
105
110
|
),
|
|
106
111
|
role: "presentation",
|
|
107
112
|
"aria-hidden": "true"
|
|
108
113
|
}
|
|
109
114
|
)
|
|
110
|
-
] }) : /* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */
|
|
115
|
+
] }) : /* @__PURE__ */ d("div", { className: "flex flex-1 items-start", children: [
|
|
116
|
+
/* @__PURE__ */ d(
|
|
112
117
|
"div",
|
|
113
118
|
{
|
|
114
|
-
className:
|
|
115
|
-
|
|
119
|
+
className: o(
|
|
120
|
+
I({
|
|
116
121
|
orientation: "horizontal",
|
|
117
|
-
variant:
|
|
122
|
+
variant: t,
|
|
118
123
|
clickable: l
|
|
119
124
|
}),
|
|
120
|
-
|
|
125
|
+
r?.stepWrapper
|
|
121
126
|
),
|
|
122
127
|
role: l ? "button" : void 0,
|
|
123
128
|
tabIndex: l ? 0 : void 0,
|
|
124
|
-
onClick:
|
|
125
|
-
onKeyDown:
|
|
129
|
+
onClick: u,
|
|
130
|
+
onKeyDown: f,
|
|
126
131
|
"aria-current": e === "active" ? "step" : void 0,
|
|
127
|
-
"aria-disabled":
|
|
128
|
-
"aria-label":
|
|
132
|
+
...h && { "aria-disabled": !0 },
|
|
133
|
+
"aria-label": x(c, i.label, e),
|
|
129
134
|
children: [
|
|
130
135
|
/* @__PURE__ */ n(
|
|
131
136
|
"div",
|
|
132
137
|
{
|
|
133
|
-
className:
|
|
134
|
-
|
|
135
|
-
|
|
138
|
+
className: o(
|
|
139
|
+
v({ status: e, size: a }),
|
|
140
|
+
r?.indicator
|
|
136
141
|
),
|
|
137
142
|
"aria-hidden": "true",
|
|
138
143
|
children: /* @__PURE__ */ n(
|
|
139
|
-
|
|
144
|
+
S,
|
|
140
145
|
{
|
|
141
146
|
status: e,
|
|
142
|
-
index:
|
|
147
|
+
index: c,
|
|
143
148
|
size: a,
|
|
144
|
-
icons:
|
|
145
|
-
className:
|
|
149
|
+
icons: m,
|
|
150
|
+
className: r?.indicatorContent
|
|
146
151
|
}
|
|
147
152
|
)
|
|
148
153
|
}
|
|
149
154
|
),
|
|
150
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ d(
|
|
151
156
|
"div",
|
|
152
157
|
{
|
|
153
|
-
className:
|
|
158
|
+
className: o(g({ variant: t }), r?.content),
|
|
154
159
|
children: [
|
|
155
|
-
|
|
156
|
-
|
|
160
|
+
i.label && /* @__PURE__ */ n(
|
|
161
|
+
s,
|
|
157
162
|
{
|
|
158
|
-
className:
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
className: o(
|
|
164
|
+
C({ status: e, size: a, variant: t }),
|
|
165
|
+
r?.label
|
|
161
166
|
),
|
|
162
|
-
children:
|
|
167
|
+
children: i.label
|
|
163
168
|
}
|
|
164
169
|
),
|
|
165
|
-
|
|
170
|
+
i.description && /* @__PURE__ */ n(
|
|
166
171
|
"span",
|
|
167
172
|
{
|
|
168
|
-
className:
|
|
169
|
-
|
|
170
|
-
|
|
173
|
+
className: o(
|
|
174
|
+
k({ status: e, size: a, variant: t }),
|
|
175
|
+
r?.description
|
|
171
176
|
),
|
|
172
|
-
children:
|
|
177
|
+
children: i.description
|
|
173
178
|
}
|
|
174
179
|
)
|
|
175
180
|
]
|
|
@@ -178,18 +183,18 @@ const L = ({
|
|
|
178
183
|
]
|
|
179
184
|
}
|
|
180
185
|
),
|
|
181
|
-
!
|
|
182
|
-
|
|
186
|
+
!p && b && /* @__PURE__ */ n(
|
|
187
|
+
w,
|
|
183
188
|
{
|
|
184
189
|
orientation: "horizontal",
|
|
185
190
|
status: e,
|
|
186
191
|
size: a,
|
|
187
|
-
variant:
|
|
188
|
-
className:
|
|
192
|
+
variant: t,
|
|
193
|
+
className: o("mt-6.5", r?.connector)
|
|
189
194
|
}
|
|
190
195
|
)
|
|
191
196
|
] });
|
|
192
|
-
};
|
|
197
|
+
}, F = H(K);
|
|
193
198
|
export {
|
|
194
|
-
|
|
199
|
+
F as HorizontalStepItem
|
|
195
200
|
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { memo as i } from "react";
|
|
3
|
+
import { cn as p } from "../../../../utils/index.js";
|
|
4
|
+
import { stepConnectorVariants as s } from "../../Stepper.variants.js";
|
|
5
|
+
const a = ({
|
|
5
6
|
className: o,
|
|
6
7
|
orientation: r,
|
|
7
8
|
size: t,
|
|
8
9
|
status: e,
|
|
9
10
|
variant: n
|
|
10
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ m(
|
|
11
12
|
"div",
|
|
12
13
|
{
|
|
13
|
-
className:
|
|
14
|
-
|
|
14
|
+
className: p(
|
|
15
|
+
s({
|
|
15
16
|
orientation: r,
|
|
16
17
|
size: t,
|
|
17
18
|
status: e,
|
|
@@ -22,7 +23,7 @@ const d = ({
|
|
|
22
23
|
role: "presentation",
|
|
23
24
|
"aria-hidden": "true"
|
|
24
25
|
}
|
|
25
|
-
);
|
|
26
|
+
), l = i(a);
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
l as StepConnector
|
|
28
29
|
};
|
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as c } from "react";
|
|
2
3
|
import { cn as d } from "../../../../utils/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { CHECK_ICON_SIZE_MAP as m, ICON_SIZE_MAP as p } from "../../constants/index.js";
|
|
5
|
+
import { c as f } from "../../../../createLucideIcon-CP-mMPfa.js";
|
|
6
|
+
import { ExclamationIcon as h } from "../../../../assets/icons/components/Exclamation.js";
|
|
7
|
+
const a = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], I = f("check", a), u = ({
|
|
6
8
|
className: r,
|
|
7
|
-
icons:
|
|
8
|
-
index:
|
|
9
|
-
size:
|
|
9
|
+
icons: t,
|
|
10
|
+
index: i,
|
|
11
|
+
size: o,
|
|
10
12
|
status: n
|
|
11
|
-
}) => n === "completed" ?
|
|
12
|
-
|
|
13
|
+
}) => n === "completed" ? t?.completed ? /* @__PURE__ */ e("span", { className: r, children: t.completed }) : /* @__PURE__ */ e(
|
|
14
|
+
I,
|
|
13
15
|
{
|
|
14
|
-
className: d(
|
|
15
|
-
sm: "h-3 w-3",
|
|
16
|
-
md: "h-4 w-4",
|
|
17
|
-
lg: "h-6 w-6"
|
|
18
|
-
}[t], r),
|
|
16
|
+
className: d(m[o], r),
|
|
19
17
|
strokeWidth: 2.5,
|
|
20
18
|
"aria-hidden": "true"
|
|
21
19
|
}
|
|
22
|
-
) : n === "error" ?
|
|
23
|
-
sm: "sm",
|
|
24
|
-
md: "md",
|
|
25
|
-
lg: "lg"
|
|
26
|
-
}[t], className: r }) : /* @__PURE__ */ e("span", { className: r, "aria-hidden": "true", children: c + 1 });
|
|
20
|
+
) : n === "error" ? t?.error ? /* @__PURE__ */ e("span", { className: r, children: t.error }) : /* @__PURE__ */ e(h, { size: p[o], className: r }) : /* @__PURE__ */ e("span", { className: r, "aria-hidden": "true", children: i + 1 }), x = c(u);
|
|
27
21
|
export {
|
|
28
|
-
|
|
22
|
+
x as StepIndicatorContent
|
|
29
23
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as r } from "react";
|
|
3
|
+
import { HorizontalStepItem as e } from "../HorizontalStepItem/HorizontalStepItem.js";
|
|
4
|
+
import { VerticalStepItem as m } from "../VerticalStepItem/VerticalStepItem.js";
|
|
5
|
+
const i = (t) => t.orientation === "horizontal" || t.variant === "horizontal" ? /* @__PURE__ */ o(e, { ...t }) : /* @__PURE__ */ o(m, { ...t }), I = r(i);
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
I as StepItem
|
|
7
8
|
};
|
|
@@ -1,89 +1,94 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { cn as
|
|
4
|
-
import { stepIndicatorVariants as
|
|
5
|
-
import {
|
|
1
|
+
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { memo as V } from "react";
|
|
3
|
+
import { cn as a } from "../../../../utils/index.js";
|
|
4
|
+
import { stepIndicatorVariants as I, stepLabelVariants as S, stepDescriptionVariants as k, stepContentVariants as v, stepVariants as w } from "../../Stepper.variants.js";
|
|
5
|
+
import { getStepAriaLabel as D } from "../../utils/index.js";
|
|
6
|
+
import { StepConnector as L } from "../StepConnector/StepConnector.js";
|
|
6
7
|
import { StepIndicatorContent as g } from "../StepIndicatorContent/StepIndicatorContent.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import { useStepItemLogic as j } from "../../hooks/useStepItemLogic.js";
|
|
9
|
+
const y = ({
|
|
10
|
+
classNames: e,
|
|
11
|
+
clickable: d,
|
|
12
|
+
icons: s,
|
|
11
13
|
index: p,
|
|
12
|
-
isLast:
|
|
13
|
-
showConnector:
|
|
14
|
-
size:
|
|
15
|
-
step:
|
|
16
|
-
variant:
|
|
17
|
-
onClick:
|
|
14
|
+
isLast: m,
|
|
15
|
+
showConnector: b,
|
|
16
|
+
size: i,
|
|
17
|
+
step: r,
|
|
18
|
+
variant: o,
|
|
19
|
+
onClick: f
|
|
18
20
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const {
|
|
22
|
+
isClickable: l,
|
|
23
|
+
isDisabled: C,
|
|
24
|
+
LabelComponent: h,
|
|
25
|
+
status: t,
|
|
26
|
+
handleClick: u,
|
|
27
|
+
handleKeyDown: x
|
|
28
|
+
} = j({ clickable: d, step: r, onClick: f });
|
|
29
|
+
return /* @__PURE__ */ c("div", { className: o === "stacked" ? "flex flex-col items-center" : "flex flex-col", children: [
|
|
30
|
+
/* @__PURE__ */ c(
|
|
26
31
|
"div",
|
|
27
32
|
{
|
|
28
|
-
className:
|
|
29
|
-
|
|
33
|
+
className: a(
|
|
34
|
+
w({
|
|
30
35
|
orientation: "vertical",
|
|
31
|
-
variant:
|
|
32
|
-
clickable:
|
|
36
|
+
variant: o,
|
|
37
|
+
clickable: l
|
|
33
38
|
}),
|
|
34
|
-
|
|
39
|
+
e?.stepWrapper
|
|
35
40
|
),
|
|
36
|
-
role:
|
|
37
|
-
tabIndex:
|
|
38
|
-
onClick:
|
|
41
|
+
role: l ? "button" : void 0,
|
|
42
|
+
tabIndex: l ? 0 : void 0,
|
|
43
|
+
onClick: u,
|
|
39
44
|
onKeyDown: x,
|
|
40
45
|
"aria-current": t === "active" ? "step" : void 0,
|
|
41
|
-
"aria-disabled":
|
|
42
|
-
"aria-label":
|
|
46
|
+
...C && { "aria-disabled": !0 },
|
|
47
|
+
"aria-label": D(p, r.label, t),
|
|
43
48
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ n(
|
|
45
50
|
"div",
|
|
46
51
|
{
|
|
47
|
-
className:
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
className: a(
|
|
53
|
+
I({ status: t, size: i }),
|
|
54
|
+
e?.indicator
|
|
50
55
|
),
|
|
51
56
|
"aria-hidden": "true",
|
|
52
|
-
children: /* @__PURE__ */
|
|
57
|
+
children: /* @__PURE__ */ n(
|
|
53
58
|
g,
|
|
54
59
|
{
|
|
55
60
|
status: t,
|
|
56
61
|
index: p,
|
|
57
|
-
size:
|
|
58
|
-
icons:
|
|
59
|
-
className:
|
|
62
|
+
size: i,
|
|
63
|
+
icons: s,
|
|
64
|
+
className: e?.indicatorContent
|
|
60
65
|
}
|
|
61
66
|
)
|
|
62
67
|
}
|
|
63
68
|
),
|
|
64
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ c(
|
|
65
70
|
"div",
|
|
66
71
|
{
|
|
67
|
-
className:
|
|
72
|
+
className: a(v({ variant: o }), e?.content),
|
|
68
73
|
children: [
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
r.label && /* @__PURE__ */ n(
|
|
75
|
+
h,
|
|
71
76
|
{
|
|
72
|
-
className:
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
className: a(
|
|
78
|
+
S({ status: t, size: i, variant: o }),
|
|
79
|
+
e?.label
|
|
75
80
|
),
|
|
76
|
-
children:
|
|
81
|
+
children: r.label
|
|
77
82
|
}
|
|
78
83
|
),
|
|
79
|
-
|
|
84
|
+
r.description && /* @__PURE__ */ n(
|
|
80
85
|
"span",
|
|
81
86
|
{
|
|
82
|
-
className:
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
className: a(
|
|
88
|
+
k({ status: t, size: i, variant: o }),
|
|
89
|
+
e?.description
|
|
85
90
|
),
|
|
86
|
-
children:
|
|
91
|
+
children: r.description
|
|
87
92
|
}
|
|
88
93
|
)
|
|
89
94
|
]
|
|
@@ -92,18 +97,18 @@ const q = ({
|
|
|
92
97
|
]
|
|
93
98
|
}
|
|
94
99
|
),
|
|
95
|
-
!
|
|
96
|
-
|
|
100
|
+
!m && b && /* @__PURE__ */ n(
|
|
101
|
+
L,
|
|
97
102
|
{
|
|
98
103
|
orientation: "vertical",
|
|
99
104
|
status: t,
|
|
100
|
-
size:
|
|
101
|
-
variant:
|
|
102
|
-
className:
|
|
105
|
+
size: i,
|
|
106
|
+
variant: o,
|
|
107
|
+
className: e?.connector
|
|
103
108
|
}
|
|
104
109
|
)
|
|
105
110
|
] });
|
|
106
|
-
};
|
|
111
|
+
}, H = V(y);
|
|
107
112
|
export {
|
|
108
|
-
|
|
113
|
+
H as VerticalStepItem
|
|
109
114
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useStepItemLogic } from './useStepItemLogic';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { S as b } from "../../../index-BvoZGpli.js";
|
|
2
|
+
import { useCallback as s } from "react";
|
|
3
|
+
function m({
|
|
4
|
+
clickable: c,
|
|
5
|
+
onClick: t,
|
|
6
|
+
step: n
|
|
7
|
+
}) {
|
|
8
|
+
const i = n.status ?? "pending", l = n.disabled || i === "active", r = !!(n.onClick || t), o = c && !l && r, f = typeof n.label == "string" ? "span" : b, e = s(() => {
|
|
9
|
+
o && (n.onClick ? n.onClick() : t && t());
|
|
10
|
+
}, [o, n.onClick, t]), u = s(
|
|
11
|
+
(a) => {
|
|
12
|
+
o && (a.key === "Enter" || a.key === " ") && (a.preventDefault(), e());
|
|
13
|
+
},
|
|
14
|
+
[o, e]
|
|
15
|
+
);
|
|
16
|
+
return {
|
|
17
|
+
isClickable: o,
|
|
18
|
+
isDisabled: l,
|
|
19
|
+
LabelComponent: f,
|
|
20
|
+
status: i,
|
|
21
|
+
handleClick: e,
|
|
22
|
+
handleKeyDown: u
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
m as useStepItemLogic
|
|
27
|
+
};
|