@ogcio/design-system-react 1.17.0 → 1.17.2
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/accordion/accordion-item.js +0 -1
- package/dist/alert/alert.d.ts +2 -1
- package/dist/alert/alert.js +32 -31
- package/dist/drawer/drawer.js +19 -12
- package/dist/icon-button/icon-button.js +18 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.js +100 -97
- package/dist/modal/modal.d.ts +2 -1
- package/dist/modal/modal.js +160 -148
- package/dist/progress-bar/progress-bar.d.ts +3 -2
- package/dist/progress-bar/progress-bar.js +18 -14
- package/dist/progress-stepper/progress-stepper.d.ts +5 -3
- package/dist/progress-stepper/progress-stepper.js +132 -121
- package/dist/progress-stepper/types.d.ts +16 -4
- package/dist/progress-stepper/types.js +12 -2
- package/dist/section-break/section-break.d.ts +2 -3
- package/dist/section-break/section-break.js +12 -12
- package/dist/styles.css +1 -1
- package/dist/utils/utilities.d.ts +1 -0
- package/dist/utils/utilities.js +25 -19
- package/package.json +2 -2
package/dist/modal/modal.js
CHANGED
|
@@ -1,240 +1,252 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as i, jsxs as
|
|
3
|
-
import { isValidElement as x, cloneElement as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { Button as
|
|
2
|
+
import { jsx as i, jsxs as f, Fragment as P } from "react/jsx-runtime";
|
|
3
|
+
import { isValidElement as x, cloneElement as N, useState as B, useRef as U, useMemo as W, Children as z, useId as G, useEffect as w } from "react";
|
|
4
|
+
import { createPortal as J } from "react-dom";
|
|
5
|
+
import { Button as D } from "../button/button.js";
|
|
6
6
|
import { cn as u } from "../cn.js";
|
|
7
|
-
import { Heading as
|
|
8
|
-
import { useAriaHider as
|
|
9
|
-
import { useFocusTrap as
|
|
10
|
-
import { Icon as
|
|
11
|
-
import { IconButton as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
import { Heading as Q } from "../heading/heading.js";
|
|
8
|
+
import { useAriaHider as X } from "../hooks/use-aria-hider.js";
|
|
9
|
+
import { useFocusTrap as Y } from "../hooks/use-focus-trap.js";
|
|
10
|
+
import { Icon as Z } from "../icon/icon.js";
|
|
11
|
+
import { IconButton as O } from "../icon-button/icon-button.js";
|
|
12
|
+
import { splitAriaProps as R } from "../utils/utilities.js";
|
|
13
|
+
const T = (r, t, e) => {
|
|
14
|
+
var o;
|
|
15
|
+
if (!x(e))
|
|
15
16
|
return !1;
|
|
16
|
-
const a =
|
|
17
|
-
return a ===
|
|
18
|
-
((
|
|
19
|
-
},
|
|
17
|
+
const a = e.type;
|
|
18
|
+
return a === r || // @ts-expect-error The TS error says there is no _owner but there is
|
|
19
|
+
((o = e == null ? void 0 : e._owner) == null ? void 0 : o.name) === t || a.componentType === t;
|
|
20
|
+
}, E = {
|
|
20
21
|
flat: 0,
|
|
21
22
|
secondary: 1,
|
|
22
23
|
primary: 2
|
|
23
|
-
},
|
|
24
|
-
label:
|
|
24
|
+
}, tt = ({
|
|
25
|
+
label: r,
|
|
25
26
|
size: t = "small",
|
|
26
|
-
...
|
|
27
|
+
...e
|
|
27
28
|
}) => {
|
|
28
29
|
let a = "sm";
|
|
29
|
-
return (t === "large" || t === "medium") && (a = "md"),
|
|
30
|
-
|
|
30
|
+
return (t === "large" || t === "medium") && (a = "md"), r ? /* @__PURE__ */ i(
|
|
31
|
+
D,
|
|
31
32
|
{
|
|
32
|
-
onClick:
|
|
33
|
+
onClick: e.onClick,
|
|
33
34
|
variant: "flat",
|
|
34
35
|
size: t,
|
|
35
36
|
appearance: "dark",
|
|
36
37
|
className: "gi-modal-icon",
|
|
37
|
-
"aria-label":
|
|
38
|
-
...
|
|
39
|
-
children: /* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
/* @__PURE__ */ i(
|
|
38
|
+
"aria-label": r,
|
|
39
|
+
...e,
|
|
40
|
+
children: /* @__PURE__ */ f(P, { children: [
|
|
41
|
+
r,
|
|
42
|
+
/* @__PURE__ */ i(Z, { icon: "close", size: a })
|
|
42
43
|
] })
|
|
43
44
|
}
|
|
44
45
|
) : /* @__PURE__ */ i(
|
|
45
|
-
|
|
46
|
+
O,
|
|
46
47
|
{
|
|
47
48
|
className: "gi-modal-icon",
|
|
48
49
|
icon: {
|
|
49
50
|
icon: "close"
|
|
50
51
|
},
|
|
51
52
|
"aria-label": "Close modal",
|
|
52
|
-
onClick:
|
|
53
|
+
onClick: e.onClick,
|
|
53
54
|
variant: "flat",
|
|
54
55
|
size: t,
|
|
55
56
|
appearance: "dark",
|
|
56
|
-
...
|
|
57
|
+
...e
|
|
57
58
|
}
|
|
58
59
|
);
|
|
59
|
-
},
|
|
60
|
-
closeButtonLabel:
|
|
60
|
+
}, et = ({
|
|
61
|
+
closeButtonLabel: r,
|
|
61
62
|
modalTitle: t,
|
|
62
|
-
closeOnClick:
|
|
63
|
+
closeOnClick: e,
|
|
63
64
|
onClose: a,
|
|
64
|
-
closeButtonSize:
|
|
65
|
-
}) => /* @__PURE__ */
|
|
65
|
+
closeButtonSize: o
|
|
66
|
+
}) => /* @__PURE__ */ f(
|
|
66
67
|
"div",
|
|
67
68
|
{
|
|
68
69
|
className: u({
|
|
69
|
-
"gi-py-4 xs:gi-py-6": !
|
|
70
|
-
"gi-py-2 xs:gi-py-4": !!
|
|
70
|
+
"gi-py-4 xs:gi-py-6": !r,
|
|
71
|
+
"gi-py-2 xs:gi-py-4": !!r
|
|
71
72
|
}),
|
|
72
73
|
children: [
|
|
73
74
|
t,
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
e && /* @__PURE__ */ i(
|
|
76
|
+
tt,
|
|
76
77
|
{
|
|
77
78
|
onClick: a,
|
|
78
|
-
label:
|
|
79
|
-
size:
|
|
79
|
+
label: r,
|
|
80
|
+
size: o
|
|
80
81
|
}
|
|
81
82
|
)
|
|
82
83
|
]
|
|
83
84
|
}
|
|
84
|
-
),
|
|
85
|
-
position:
|
|
85
|
+
), rt = ({
|
|
86
|
+
position: r = "center",
|
|
86
87
|
size: t = "lg",
|
|
87
|
-
closeOnClick:
|
|
88
|
+
closeOnClick: e = !0,
|
|
88
89
|
closeOnOverlayClick: a = !0,
|
|
89
|
-
isOpen:
|
|
90
|
-
onClose:
|
|
90
|
+
isOpen: o,
|
|
91
|
+
onClose: d,
|
|
91
92
|
closeButtonLabel: y,
|
|
92
|
-
className:
|
|
93
|
+
className: c,
|
|
93
94
|
children: p,
|
|
94
95
|
closeButtonSize: n,
|
|
95
96
|
closeOnEscape: s,
|
|
96
|
-
dataTestId:
|
|
97
|
-
...
|
|
97
|
+
dataTestId: m,
|
|
98
|
+
...v
|
|
98
99
|
}) => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
),
|
|
106
|
-
|
|
107
|
-
|
|
100
|
+
var A;
|
|
101
|
+
const M = U(null);
|
|
102
|
+
X(M.current, o);
|
|
103
|
+
const [H, S] = W(
|
|
104
|
+
() => R(v),
|
|
105
|
+
[v]
|
|
106
|
+
), k = z.toArray(p), g = k.find(
|
|
107
|
+
(l) => T(b, "ModalTitle", l)
|
|
108
|
+
), C = k.find(
|
|
109
|
+
(l) => T(F, "ModalFooter", l)
|
|
110
|
+
), $ = G(), L = ((A = g == null ? void 0 : g.props) == null ? void 0 : A.id) || `gi-modal-title-${$}`, V = g ? N(g, {
|
|
111
|
+
as: t === "sm" ? "h5" : "h4",
|
|
112
|
+
id: L
|
|
113
|
+
}) : null, _ = C ? N(C, {
|
|
108
114
|
dataModalSize: t
|
|
109
|
-
}) : null,
|
|
110
|
-
(l) => !
|
|
115
|
+
}) : null, q = k.filter(
|
|
116
|
+
(l) => !T(b, "ModalTitle", l) && !T(F, "ModalFooter", l)
|
|
111
117
|
);
|
|
112
|
-
|
|
113
|
-
if (!
|
|
118
|
+
w(() => {
|
|
119
|
+
if (!o || !s)
|
|
114
120
|
return;
|
|
115
|
-
const l = (
|
|
116
|
-
|
|
121
|
+
const l = (h) => {
|
|
122
|
+
h.key === "Escape" && (h.stopPropagation(), d());
|
|
117
123
|
};
|
|
118
124
|
return document.addEventListener("keydown", l), () => {
|
|
119
125
|
document.removeEventListener("keydown", l);
|
|
120
126
|
};
|
|
121
|
-
}, [
|
|
127
|
+
}, [o, s, d]), w(() => {
|
|
128
|
+
if (!o || !e || !a)
|
|
129
|
+
return;
|
|
130
|
+
const l = (h) => {
|
|
131
|
+
var j;
|
|
132
|
+
const I = (j = M.current) == null ? void 0 : j.querySelector(
|
|
133
|
+
".gi-modal-container-control"
|
|
134
|
+
);
|
|
135
|
+
I && (I.contains(h.target) || d());
|
|
136
|
+
};
|
|
137
|
+
return document.addEventListener("pointerdown", l, !0), () => document.removeEventListener("pointerdown", l, !0);
|
|
138
|
+
}, [o, e, a, d]);
|
|
139
|
+
const K = /* @__PURE__ */ i(
|
|
122
140
|
"div",
|
|
123
141
|
{
|
|
124
|
-
...
|
|
125
|
-
ref:
|
|
142
|
+
...S,
|
|
143
|
+
ref: M,
|
|
126
144
|
className: u("gi-modal", {
|
|
127
|
-
"gi-modal-open":
|
|
128
|
-
"gi-modal-close": !
|
|
145
|
+
"gi-modal-open": o,
|
|
146
|
+
"gi-modal-close": !o
|
|
129
147
|
}),
|
|
130
|
-
"data-testid":
|
|
131
|
-
onClick: (l) => {
|
|
132
|
-
l.currentTarget === l.target && o && a && m();
|
|
133
|
-
},
|
|
148
|
+
"data-testid": m || "modal",
|
|
134
149
|
tabIndex: -1,
|
|
135
|
-
children: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ f(
|
|
136
151
|
"div",
|
|
137
152
|
{
|
|
138
153
|
"data-testid": "modal-container",
|
|
139
154
|
role: "dialog",
|
|
140
155
|
"aria-modal": "true",
|
|
141
156
|
"aria-label": "dialog",
|
|
157
|
+
...H,
|
|
142
158
|
"data-size": t,
|
|
143
|
-
"data-position":
|
|
159
|
+
"data-position": r,
|
|
144
160
|
className: u(
|
|
145
161
|
"gi-modal-container-control",
|
|
146
162
|
{
|
|
147
|
-
"gi-modal-container": !
|
|
148
|
-
"gi-modal-container-center":
|
|
149
|
-
"gi-modal-container-left":
|
|
150
|
-
"gi-modal-container-right":
|
|
151
|
-
"gi-modal-container-bottom":
|
|
163
|
+
"gi-modal-container": !c,
|
|
164
|
+
"gi-modal-container-center": r === "center",
|
|
165
|
+
"gi-modal-container-left": r === "left",
|
|
166
|
+
"gi-modal-container-right": r === "right",
|
|
167
|
+
"gi-modal-container-bottom": r === "bottom"
|
|
152
168
|
},
|
|
153
|
-
|
|
169
|
+
c
|
|
154
170
|
),
|
|
155
171
|
children: [
|
|
156
172
|
/* @__PURE__ */ i(
|
|
157
|
-
|
|
173
|
+
et,
|
|
158
174
|
{
|
|
159
175
|
closeButtonLabel: y,
|
|
160
|
-
modalTitle:
|
|
161
|
-
closeOnClick:
|
|
162
|
-
onClose:
|
|
176
|
+
modalTitle: V,
|
|
177
|
+
closeOnClick: e,
|
|
178
|
+
onClose: d,
|
|
163
179
|
closeButtonSize: n
|
|
164
180
|
}
|
|
165
181
|
),
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
|
|
168
|
-
|
|
182
|
+
/* @__PURE__ */ f("div", { className: u({ "gi-pb-6": !C }), children: [
|
|
183
|
+
q,
|
|
184
|
+
_
|
|
169
185
|
] })
|
|
170
186
|
]
|
|
171
187
|
}
|
|
172
188
|
)
|
|
173
189
|
}
|
|
174
|
-
)
|
|
175
|
-
|
|
176
|
-
|
|
190
|
+
);
|
|
191
|
+
return /* @__PURE__ */ i(ot, { modalRef: M, isOpen: o, children: K });
|
|
192
|
+
}, b = ({ children: r, as: t = "h4", ...e }) => /* @__PURE__ */ i("div", { className: "gi-flex-1", id: e.id, "aria-label": r == null ? void 0 : r.toString(), children: /* @__PURE__ */ i(Q, { as: t, ...e, children: r }) });
|
|
193
|
+
Object.defineProperty(b, "componentType", {
|
|
177
194
|
value: "ModalTitle",
|
|
178
195
|
writable: !1,
|
|
179
196
|
enumerable: !1
|
|
180
197
|
});
|
|
181
|
-
|
|
182
|
-
const
|
|
183
|
-
children:
|
|
184
|
-
className: t
|
|
198
|
+
b.displayName = "ModalTitle";
|
|
199
|
+
const ft = ({
|
|
200
|
+
children: r,
|
|
201
|
+
className: t,
|
|
202
|
+
includeModalClass: e = !0
|
|
185
203
|
}) => /* @__PURE__ */ i(
|
|
186
204
|
"div",
|
|
187
205
|
{
|
|
188
|
-
id: "gi-modal-body",
|
|
189
206
|
"aria-label": "Modal content",
|
|
190
207
|
role: "document",
|
|
191
208
|
tabIndex: 0,
|
|
192
|
-
className: u(
|
|
193
|
-
|
|
194
|
-
"gi-modal-body": !t
|
|
195
|
-
},
|
|
196
|
-
t
|
|
197
|
-
),
|
|
198
|
-
children: e
|
|
209
|
+
className: u(e && "gi-modal-body", t),
|
|
210
|
+
children: r
|
|
199
211
|
}
|
|
200
|
-
),
|
|
201
|
-
className:
|
|
212
|
+
), F = ({
|
|
213
|
+
className: r,
|
|
202
214
|
children: t,
|
|
203
|
-
orientation:
|
|
215
|
+
orientation: e,
|
|
204
216
|
dataModalSize: a,
|
|
205
|
-
stacked:
|
|
217
|
+
stacked: o
|
|
206
218
|
}) => {
|
|
207
|
-
const
|
|
208
|
-
var s,
|
|
209
|
-
return x(n) && (n.type ===
|
|
219
|
+
const c = (Array.isArray(t) ? t : [t]).filter((n) => {
|
|
220
|
+
var s, m;
|
|
221
|
+
return x(n) && (n.type === D || ((s = n.type) == null ? void 0 : s.displayName) === "Button" || ((m = n.props) == null ? void 0 : m["data-button"]));
|
|
210
222
|
}).sort((n, s) => {
|
|
211
|
-
const
|
|
212
|
-
return (
|
|
223
|
+
const m = n.props.variant ?? "primary", v = s.props.variant ?? "primary";
|
|
224
|
+
return (E[m] || 0) - (E[v] || 0);
|
|
213
225
|
}), p = u({
|
|
214
|
-
"gi-justify-center sm:gi-justify-start": !
|
|
215
|
-
"gi-justify-center":
|
|
216
|
-
"gi-justify-start":
|
|
226
|
+
"gi-justify-center sm:gi-justify-start": !e && a !== "sm" && !o,
|
|
227
|
+
"gi-justify-center": e === "vertical" || a === "sm" || o,
|
|
228
|
+
"gi-justify-start": e === "horizontal"
|
|
217
229
|
});
|
|
218
230
|
return /* @__PURE__ */ i(
|
|
219
231
|
"div",
|
|
220
232
|
{
|
|
221
|
-
className: u(
|
|
222
|
-
"gi-pt-6":
|
|
223
|
-
"gi-modal-footer":
|
|
224
|
-
"gi-modal-footer-stacked":
|
|
233
|
+
className: u(r, {
|
|
234
|
+
"gi-pt-6": c.length === 0,
|
|
235
|
+
"gi-modal-footer": c.length,
|
|
236
|
+
"gi-modal-footer-stacked": o
|
|
225
237
|
}),
|
|
226
|
-
children:
|
|
238
|
+
children: c.length > 0 && /* @__PURE__ */ i(
|
|
227
239
|
"div",
|
|
228
240
|
{
|
|
229
|
-
"data-orientation":
|
|
241
|
+
"data-orientation": e || "unset",
|
|
230
242
|
"data-modal-size": a,
|
|
231
|
-
children:
|
|
243
|
+
children: c.map(
|
|
232
244
|
(n, s) => {
|
|
233
|
-
var
|
|
234
|
-
return
|
|
245
|
+
var m;
|
|
246
|
+
return N(n, {
|
|
235
247
|
key: n.key || n.props.id || n.props.dataTestid || `modal-footer-button-${s}`,
|
|
236
248
|
id: n.props.id || `modal-footer-button-${s}`,
|
|
237
|
-
className: u((
|
|
249
|
+
className: u((m = n == null ? void 0 : n.props) == null ? void 0 : m.className, p)
|
|
238
250
|
});
|
|
239
251
|
}
|
|
240
252
|
) || null
|
|
@@ -243,53 +255,53 @@ const rt = ({
|
|
|
243
255
|
}
|
|
244
256
|
);
|
|
245
257
|
};
|
|
246
|
-
Object.defineProperty(
|
|
258
|
+
Object.defineProperty(F, "componentType", {
|
|
247
259
|
value: "ModalFooter",
|
|
248
260
|
writable: !1,
|
|
249
261
|
enumerable: !1
|
|
250
262
|
});
|
|
251
|
-
|
|
252
|
-
const
|
|
253
|
-
children:
|
|
263
|
+
F.displayName = "ModalFooter";
|
|
264
|
+
const ot = ({
|
|
265
|
+
children: r,
|
|
254
266
|
modalRef: t,
|
|
255
|
-
isOpen:
|
|
267
|
+
isOpen: e
|
|
256
268
|
}) => {
|
|
257
|
-
const [a,
|
|
269
|
+
const [a, o] = B(!1);
|
|
258
270
|
return w(() => {
|
|
259
|
-
|
|
260
|
-
}, []),
|
|
271
|
+
o(!0);
|
|
272
|
+
}, []), Y(t == null ? void 0 : t.current, e && a, {
|
|
261
273
|
initialFocus: (t == null ? void 0 : t.current) ?? !0,
|
|
262
274
|
fallbackFocus: () => t == null ? void 0 : t.current
|
|
263
|
-
}), a ?
|
|
264
|
-
},
|
|
265
|
-
children:
|
|
275
|
+
}), a ? J(r, document.body) : null;
|
|
276
|
+
}, yt = ({
|
|
277
|
+
children: r,
|
|
266
278
|
triggerButton: t,
|
|
267
|
-
startsOpen:
|
|
279
|
+
startsOpen: e,
|
|
268
280
|
...a
|
|
269
281
|
}) => {
|
|
270
|
-
const [
|
|
282
|
+
const [o, d] = B(!!e), y = () => d(!0), c = () => d(!1), p = N(t, {
|
|
271
283
|
"data-testid": "modal-trigger-button-container",
|
|
272
284
|
"aria-haspopup": "dialog",
|
|
273
285
|
onClick: y
|
|
274
286
|
});
|
|
275
|
-
return /* @__PURE__ */
|
|
287
|
+
return /* @__PURE__ */ f(P, { children: [
|
|
276
288
|
p,
|
|
277
289
|
/* @__PURE__ */ i(
|
|
278
|
-
|
|
290
|
+
rt,
|
|
279
291
|
{
|
|
280
|
-
onClose:
|
|
292
|
+
onClose: c,
|
|
281
293
|
position: "center",
|
|
282
|
-
isOpen:
|
|
294
|
+
isOpen: o,
|
|
283
295
|
...a,
|
|
284
|
-
children:
|
|
296
|
+
children: r
|
|
285
297
|
}
|
|
286
298
|
)
|
|
287
299
|
] });
|
|
288
300
|
};
|
|
289
301
|
export {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
302
|
+
yt as Modal,
|
|
303
|
+
ft as ModalBody,
|
|
304
|
+
F as ModalFooter,
|
|
305
|
+
b as ModalTitle,
|
|
306
|
+
rt as ModalWrapper
|
|
295
307
|
};
|
|
@@ -3,5 +3,6 @@ export type ProgressBarProps = {
|
|
|
3
3
|
value?: number;
|
|
4
4
|
isIndeterminate?: boolean;
|
|
5
5
|
label?: string;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
dataTestid?: string;
|
|
7
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|
|
8
|
+
export declare function ProgressBar({ value, max, isIndeterminate, label, className, dataTestid, ...props }: ProgressBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { translate as
|
|
4
|
-
function
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as o } from "../cn.js";
|
|
3
|
+
import { translate as p } from "../i18n/utility.js";
|
|
4
|
+
function u({
|
|
5
5
|
value: s = 0,
|
|
6
6
|
max: e = 100,
|
|
7
7
|
isIndeterminate: r,
|
|
8
|
-
label:
|
|
8
|
+
label: i,
|
|
9
|
+
className: l,
|
|
10
|
+
dataTestid: t,
|
|
11
|
+
...n
|
|
9
12
|
}) {
|
|
10
|
-
const
|
|
11
|
-
return /* @__PURE__ */
|
|
13
|
+
const g = s * 100 / e;
|
|
14
|
+
return /* @__PURE__ */ c("div", { className: "gi-progress-bar-container", children: [
|
|
12
15
|
/* @__PURE__ */ a(
|
|
13
16
|
"div",
|
|
14
17
|
{
|
|
@@ -16,25 +19,26 @@ function d({
|
|
|
16
19
|
"aria-valuenow": r ? void 0 : s,
|
|
17
20
|
"aria-valuemin": 0,
|
|
18
21
|
"aria-valuemax": e,
|
|
19
|
-
"aria-label":
|
|
22
|
+
"aria-label": p("progressBar.progressBar", {
|
|
20
23
|
defaultValue: "Progress bar"
|
|
21
24
|
}),
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
className: o("gi-progress-bar", l),
|
|
26
|
+
"data-testid": t,
|
|
27
|
+
...n,
|
|
24
28
|
children: /* @__PURE__ */ a(
|
|
25
29
|
"div",
|
|
26
30
|
{
|
|
27
|
-
className:
|
|
31
|
+
className: o({
|
|
28
32
|
"gi-progress-bar-indeterminate": r
|
|
29
33
|
}),
|
|
30
|
-
style: r ? {} : { width: `${
|
|
34
|
+
style: r ? {} : { width: `${g}%` }
|
|
31
35
|
}
|
|
32
36
|
)
|
|
33
37
|
}
|
|
34
38
|
),
|
|
35
|
-
|
|
39
|
+
i && /* @__PURE__ */ a("span", { children: i })
|
|
36
40
|
] });
|
|
37
41
|
}
|
|
38
42
|
export {
|
|
39
|
-
|
|
43
|
+
u as ProgressBar
|
|
40
44
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { InnerStepProps, ProgressStepperProps, StepItemProps } from './types.js';
|
|
3
|
-
export declare const Step: ({ isCurrentStep, isCompleted, isLastStep, isDisabled, stepNumber, orientation, children, indicator, verticalSlot, defaultOpen, dataTestId, ariaLabel, verticalGap, }: InnerStepProps & {
|
|
2
|
+
import { InnerStepProps, ProgressStepperProps, StepItemProps, StepFillLevelType } from './types.js';
|
|
3
|
+
export declare const Step: ({ isCurrentStep, isCompleted, isLastStep, isDisabled, stepNumber, orientation, children, indicator, verticalSlot, defaultOpen, dataTestId, ariaLabel, verticalGap, fill, useFill, }: InnerStepProps & {
|
|
4
4
|
isDisabled?: boolean;
|
|
5
|
+
fill?: StepFillLevelType;
|
|
6
|
+
useFill?: boolean;
|
|
5
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export declare const StepItem: FC<StepItemProps>;
|
|
7
|
-
export declare const ProgressStepper: ({ children, currentStepIndex, orientation, indicator, completeAll, stepStates,
|
|
9
|
+
export declare const ProgressStepper: ({ children, currentStepIndex, orientation, indicator, completeAll, stepStates, className, verticalGap, ...props }: ProgressStepperProps) => import("react/jsx-runtime").JSX.Element;
|