@ogcio/design-system-react 1.15.1 → 1.15.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/autocomplete/autocomplete.d.ts +5 -4
- package/dist/autocomplete/autocomplete.js +174 -138
- package/dist/autocomplete/types.d.ts +1 -0
- package/dist/autocomplete/use-autocomplete-controller.d.ts +3 -2
- package/dist/autocomplete/use-autocomplete-controller.js +90 -88
- package/dist/header/header.d.ts +1 -1
- package/dist/header/header.js +53 -56
- package/dist/header/types.d.ts +1 -0
- package/dist/hooks/use-aria-hider.js +1 -1
- package/dist/hooks/use-focus-trap.js +247 -242
- package/dist/input-text/input-text.d.ts +4 -4
- package/dist/input-text/input-text.js +68 -61
- package/dist/input-text/type.d.ts +4 -2
- package/dist/modal/modal.js +76 -75
- package/dist/progress-stepper/progress-stepper.d.ts +4 -2
- package/dist/progress-stepper/progress-stepper.js +103 -100
- package/dist/progress-stepper/types.d.ts +5 -0
- package/dist/select/select-menu.js +16 -14
- package/dist/select/select-next.js +187 -153
- package/dist/select/select-search.d.ts +12 -3
- package/dist/select/select-search.js +29 -21
- package/dist/styles.css +1 -1
- package/dist/text-input/text-input.d.ts +2 -2
- package/package.json +2 -2
|
@@ -4,10 +4,10 @@ export declare const InputText: import('react').ForwardRefExoticComponent<import
|
|
|
4
4
|
prefix?: React.ReactNode;
|
|
5
5
|
suffix?: React.ReactNode;
|
|
6
6
|
inputClassName?: string;
|
|
7
|
-
iconStart?: import('
|
|
7
|
+
iconStart?: import('react').ReactNode;
|
|
8
8
|
onIconStartClick?: () => void;
|
|
9
9
|
iconStartClassName?: string;
|
|
10
|
-
iconEnd?: import('
|
|
10
|
+
iconEnd?: import('react').ReactNode;
|
|
11
11
|
iconEndClassName?: string;
|
|
12
12
|
onIconEndClick?: () => void;
|
|
13
13
|
inputActionButton?: InputActionButtonProps;
|
|
@@ -22,10 +22,10 @@ export declare const InputTextTableCell: import('react').ForwardRefExoticCompone
|
|
|
22
22
|
prefix?: React.ReactNode;
|
|
23
23
|
suffix?: React.ReactNode;
|
|
24
24
|
inputClassName?: string;
|
|
25
|
-
iconStart?: import('
|
|
25
|
+
iconStart?: import('react').ReactNode;
|
|
26
26
|
onIconStartClick?: () => void;
|
|
27
27
|
iconStartClassName?: string;
|
|
28
|
-
iconEnd?: import('
|
|
28
|
+
iconEnd?: import('react').ReactNode;
|
|
29
29
|
iconEndClassName?: string;
|
|
30
30
|
onIconEndClick?: () => void;
|
|
31
31
|
inputActionButton?: InputActionButtonProps;
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as n, jsxs as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { cn as
|
|
2
|
+
import { jsx as n, jsxs as o } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as d, useRef as W, useImperativeHandle as _, useMemo as j } from "react";
|
|
4
|
+
import { cn as u } from "../cn.js";
|
|
5
5
|
import { Icon as m } from "../icon/icon.js";
|
|
6
|
-
import { IconButton as
|
|
7
|
-
import { Input as
|
|
8
|
-
const H =
|
|
9
|
-
({ onChange: a, ...
|
|
10
|
-
const
|
|
11
|
-
return
|
|
6
|
+
import { IconButton as O } from "../icon-button/icon-button.js";
|
|
7
|
+
import { Input as y } from "../primitives/input.js";
|
|
8
|
+
const H = d(
|
|
9
|
+
({ onChange: a, ...t }, r) => {
|
|
10
|
+
const e = W(null);
|
|
11
|
+
return _(r, () => e.current), /* @__PURE__ */ n(
|
|
12
12
|
p,
|
|
13
13
|
{
|
|
14
|
-
...
|
|
14
|
+
...t,
|
|
15
15
|
onChange: a,
|
|
16
|
-
ref:
|
|
16
|
+
ref: e,
|
|
17
17
|
inputActionButton: {
|
|
18
18
|
icon: "close",
|
|
19
19
|
onClick: () => {
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
target:
|
|
23
|
-
currentTarget:
|
|
20
|
+
e != null && e.current && (e.current.value = "", e.current.focus());
|
|
21
|
+
const f = {
|
|
22
|
+
target: e.current,
|
|
23
|
+
currentTarget: e.current,
|
|
24
24
|
__origin: "clear_button"
|
|
25
25
|
};
|
|
26
|
-
a && a(
|
|
26
|
+
a && a(f);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
|
-
), p =
|
|
32
|
+
), p = d(
|
|
33
33
|
({
|
|
34
34
|
prefix: a,
|
|
35
|
-
inputActionButton:
|
|
35
|
+
inputActionButton: t,
|
|
36
36
|
inputActionPosition: r = "beforeSuffix",
|
|
37
|
-
suffix:
|
|
38
|
-
halfFluid:
|
|
39
|
-
className:
|
|
40
|
-
type:
|
|
41
|
-
iconStart:
|
|
42
|
-
iconStartClassName:
|
|
37
|
+
suffix: e,
|
|
38
|
+
halfFluid: l = !1,
|
|
39
|
+
className: f,
|
|
40
|
+
type: g = "text",
|
|
41
|
+
iconStart: c,
|
|
42
|
+
iconStartClassName: I,
|
|
43
43
|
onIconStartClick: v,
|
|
44
44
|
iconEnd: s,
|
|
45
45
|
iconEndClassName: N,
|
|
@@ -50,48 +50,55 @@ const H = u(
|
|
|
50
50
|
containerProps: b,
|
|
51
51
|
...k
|
|
52
52
|
}, z) => {
|
|
53
|
-
const R =
|
|
53
|
+
const R = j(() => t && r === "beforeSuffix" ? /* @__PURE__ */ n(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
56
|
className: "gi-input-text-action-before-suffix",
|
|
57
|
-
"data-suffix": !!
|
|
57
|
+
"data-suffix": !!e,
|
|
58
58
|
"data-has-icon-end": !!s,
|
|
59
|
-
children: /* @__PURE__ */ n(x, { ...
|
|
59
|
+
children: /* @__PURE__ */ n(x, { ...t, disabled: i })
|
|
60
60
|
}
|
|
61
|
-
) : null, [
|
|
62
|
-
return /* @__PURE__ */
|
|
61
|
+
) : null, [t]);
|
|
62
|
+
return /* @__PURE__ */ o(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
|
-
className:
|
|
65
|
+
className: u(f, "gi-input-text-container"),
|
|
66
66
|
...b,
|
|
67
67
|
children: [
|
|
68
68
|
a && /* @__PURE__ */ n("div", { className: "gi-input-text-prefix", "data-disabled": i, children: a }),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ o(
|
|
70
70
|
"div",
|
|
71
71
|
{
|
|
72
|
-
className:
|
|
73
|
-
"gi-input-half-width":
|
|
72
|
+
className: u("gi-input-text-inner", {
|
|
73
|
+
"gi-input-half-width": l
|
|
74
74
|
}),
|
|
75
75
|
children: [
|
|
76
|
-
|
|
76
|
+
c && /* @__PURE__ */ n(
|
|
77
77
|
"div",
|
|
78
78
|
{
|
|
79
|
-
className:
|
|
79
|
+
className: u("gi-input-text-icon-start", I),
|
|
80
80
|
onClick: v,
|
|
81
81
|
"data-prefix": !!a,
|
|
82
|
-
children: /* @__PURE__ */ n(
|
|
82
|
+
children: typeof c == "string" ? /* @__PURE__ */ n(
|
|
83
|
+
m,
|
|
84
|
+
{
|
|
85
|
+
icon: c,
|
|
86
|
+
size: "md",
|
|
87
|
+
disabled: i
|
|
88
|
+
}
|
|
89
|
+
) : c
|
|
83
90
|
}
|
|
84
91
|
),
|
|
85
92
|
/* @__PURE__ */ n(
|
|
86
|
-
|
|
93
|
+
y,
|
|
87
94
|
{
|
|
88
|
-
type:
|
|
89
|
-
"data-icon-start": !!
|
|
95
|
+
type: g,
|
|
96
|
+
"data-icon-start": !!c,
|
|
90
97
|
"data-icon-end": !!s,
|
|
91
|
-
"data-end-element": !!
|
|
98
|
+
"data-end-element": !!t,
|
|
92
99
|
"data-prefix": !!a,
|
|
93
|
-
"data-suffix": !!
|
|
94
|
-
className:
|
|
100
|
+
"data-suffix": !!e,
|
|
101
|
+
className: u("gi-input-text", w),
|
|
95
102
|
ref: z,
|
|
96
103
|
disabled: i,
|
|
97
104
|
...k
|
|
@@ -100,62 +107,62 @@ const H = u(
|
|
|
100
107
|
s && /* @__PURE__ */ n(
|
|
101
108
|
"div",
|
|
102
109
|
{
|
|
103
|
-
className:
|
|
104
|
-
"data-end-element": !!
|
|
105
|
-
"data-suffix": !!
|
|
110
|
+
className: u("gi-input-text-icon-end", N),
|
|
111
|
+
"data-end-element": !!t && r === "afterSuffix",
|
|
112
|
+
"data-suffix": !!e,
|
|
106
113
|
onClick: T,
|
|
107
114
|
ref: C,
|
|
108
|
-
children: /* @__PURE__ */ n(m, { icon: s, size: "md", disabled: i })
|
|
115
|
+
children: typeof s == "string" ? /* @__PURE__ */ n(m, { icon: s, size: "md", disabled: i }) : s
|
|
109
116
|
}
|
|
110
117
|
),
|
|
111
118
|
R
|
|
112
119
|
]
|
|
113
120
|
}
|
|
114
121
|
),
|
|
115
|
-
|
|
116
|
-
|
|
122
|
+
t && r === "afterSuffix" && /* @__PURE__ */ n("div", { className: "gi-input-text-end-element", "data-suffix": !!e, children: /* @__PURE__ */ n(x, { ...t, disabled: i }) }),
|
|
123
|
+
e && /* @__PURE__ */ n("div", { className: "gi-input-text-suffix", "data-disabled": i, children: e })
|
|
117
124
|
]
|
|
118
125
|
}
|
|
119
126
|
);
|
|
120
127
|
}
|
|
121
128
|
), x = ({
|
|
122
129
|
onClick: a,
|
|
123
|
-
ariaLabel:
|
|
130
|
+
ariaLabel: t,
|
|
124
131
|
icon: r,
|
|
125
|
-
dataTestId:
|
|
126
|
-
...
|
|
132
|
+
dataTestId: e,
|
|
133
|
+
...l
|
|
127
134
|
}) => /* @__PURE__ */ n(
|
|
128
|
-
|
|
135
|
+
O,
|
|
129
136
|
{
|
|
130
|
-
...
|
|
137
|
+
...l,
|
|
131
138
|
icon: {
|
|
132
139
|
icon: r
|
|
133
140
|
},
|
|
134
|
-
"data-testid":
|
|
135
|
-
"aria-label":
|
|
141
|
+
"data-testid": e,
|
|
142
|
+
"aria-label": t || "",
|
|
136
143
|
onClick: a,
|
|
137
144
|
variant: "flat",
|
|
138
145
|
size: "small",
|
|
139
146
|
appearance: "dark"
|
|
140
147
|
}
|
|
141
|
-
), h =
|
|
142
|
-
({ type: a = "text", clearButtonEnabled:
|
|
148
|
+
), h = d(
|
|
149
|
+
({ type: a = "text", clearButtonEnabled: t, ...r }, e) => t || a === "search" ? /* @__PURE__ */ n(H, { ref: e, type: a, ...r }) : /* @__PURE__ */ n(p, { ref: e, type: a, ...r })
|
|
143
150
|
);
|
|
144
151
|
h.displayName = "InputText";
|
|
145
|
-
const
|
|
152
|
+
const F = d(({ type: a = "text", error: t, ...r }, e) => /* @__PURE__ */ n(
|
|
146
153
|
h,
|
|
147
154
|
{
|
|
148
155
|
...r,
|
|
149
156
|
containerProps: {
|
|
150
157
|
"data-table-cell": !0,
|
|
151
|
-
"data-table-cell-error-state":
|
|
158
|
+
"data-table-cell-error-state": t == null ? void 0 : t.toString()
|
|
152
159
|
},
|
|
153
|
-
ref:
|
|
160
|
+
ref: e,
|
|
154
161
|
type: a
|
|
155
162
|
}
|
|
156
163
|
));
|
|
157
164
|
export {
|
|
158
165
|
x as InputActionButton,
|
|
159
166
|
h as InputText,
|
|
160
|
-
|
|
167
|
+
F as InputTextTableCell
|
|
161
168
|
};
|
|
@@ -8,14 +8,15 @@ export type InputActionButtonProps = {
|
|
|
8
8
|
dataTestId?: string;
|
|
9
9
|
ref?: React.Ref<HTMLButtonElement>;
|
|
10
10
|
};
|
|
11
|
+
type IconProp = IconId | React.ReactNode;
|
|
11
12
|
export type InputTextProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
12
13
|
prefix?: React.ReactNode;
|
|
13
14
|
suffix?: React.ReactNode;
|
|
14
15
|
inputClassName?: string;
|
|
15
|
-
iconStart?:
|
|
16
|
+
iconStart?: IconProp;
|
|
16
17
|
onIconStartClick?: () => void;
|
|
17
18
|
iconStartClassName?: string;
|
|
18
|
-
iconEnd?:
|
|
19
|
+
iconEnd?: IconProp;
|
|
19
20
|
iconEndClassName?: string;
|
|
20
21
|
onIconEndClick?: () => void;
|
|
21
22
|
inputActionButton?: InputActionButtonProps;
|
|
@@ -30,3 +31,4 @@ export type InputTextTableCellProps = InputTextProps & {
|
|
|
30
31
|
error?: boolean;
|
|
31
32
|
disabled?: boolean;
|
|
32
33
|
};
|
|
34
|
+
export {};
|
package/dist/modal/modal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { isValidElement as j, cloneElement as y, useState as A, useRef as
|
|
2
|
+
import { jsx as l, jsxs as g, Fragment as F } from "react/jsx-runtime";
|
|
3
|
+
import { isValidElement as j, cloneElement as y, useState as A, useRef as O, Children as P, useEffect as w } from "react";
|
|
4
4
|
import { createPortal as H } from "react-dom";
|
|
5
5
|
import { Button as B } from "../button/button.js";
|
|
6
6
|
import { cn as m } from "../cn.js";
|
|
@@ -9,39 +9,39 @@ import { useAriaHider as V } from "../hooks/use-aria-hider.js";
|
|
|
9
9
|
import { useFocusTrap as _ } from "../hooks/use-focus-trap.js";
|
|
10
10
|
import { Icon as $ } from "../icon/icon.js";
|
|
11
11
|
import { IconButton as D } from "../icon-button/icon-button.js";
|
|
12
|
-
const
|
|
13
|
-
var
|
|
14
|
-
if (!j(
|
|
12
|
+
const f = (o, t, e) => {
|
|
13
|
+
var n;
|
|
14
|
+
if (!j(e))
|
|
15
15
|
return !1;
|
|
16
|
-
const r =
|
|
16
|
+
const r = e.type;
|
|
17
17
|
return r === o || // @ts-expect-error The TS error says there is no _owner but there is
|
|
18
|
-
((
|
|
18
|
+
((n = e == null ? void 0 : e._owner) == null ? void 0 : n.name) === t || r.componentType === t;
|
|
19
19
|
}, N = {
|
|
20
20
|
flat: 0,
|
|
21
21
|
secondary: 1,
|
|
22
22
|
primary: 2
|
|
23
23
|
}, W = ({
|
|
24
24
|
label: o,
|
|
25
|
-
size:
|
|
26
|
-
...
|
|
25
|
+
size: t = "small",
|
|
26
|
+
...e
|
|
27
27
|
}) => {
|
|
28
28
|
let r = "sm";
|
|
29
|
-
return (
|
|
29
|
+
return (t === "large" || t === "medium") && (r = "md"), o ? /* @__PURE__ */ l(
|
|
30
30
|
B,
|
|
31
31
|
{
|
|
32
|
-
onClick:
|
|
32
|
+
onClick: e.onClick,
|
|
33
33
|
variant: "flat",
|
|
34
|
-
size:
|
|
34
|
+
size: t,
|
|
35
35
|
appearance: "dark",
|
|
36
36
|
className: "gi-modal-icon",
|
|
37
37
|
"aria-label": o,
|
|
38
|
-
...
|
|
39
|
-
children: /* @__PURE__ */
|
|
38
|
+
...e,
|
|
39
|
+
children: /* @__PURE__ */ g(F, { children: [
|
|
40
40
|
o,
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ l($, { icon: "close", size: r })
|
|
42
42
|
] })
|
|
43
43
|
}
|
|
44
|
-
) : /* @__PURE__ */
|
|
44
|
+
) : /* @__PURE__ */ l(
|
|
45
45
|
D,
|
|
46
46
|
{
|
|
47
47
|
className: "gi-modal-icon",
|
|
@@ -49,19 +49,19 @@ const g = (o, e, t) => {
|
|
|
49
49
|
icon: "close"
|
|
50
50
|
},
|
|
51
51
|
"aria-label": "Close modal",
|
|
52
|
-
onClick:
|
|
52
|
+
onClick: e.onClick,
|
|
53
53
|
variant: "flat",
|
|
54
|
-
size:
|
|
54
|
+
size: t,
|
|
55
55
|
appearance: "dark",
|
|
56
|
-
...
|
|
56
|
+
...e
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
59
|
}, q = ({
|
|
60
60
|
position: o = "center",
|
|
61
|
-
size:
|
|
62
|
-
closeOnClick:
|
|
61
|
+
size: t = "lg",
|
|
62
|
+
closeOnClick: e = !0,
|
|
63
63
|
closeOnOverlayClick: r = !0,
|
|
64
|
-
isOpen:
|
|
64
|
+
isOpen: n,
|
|
65
65
|
onClose: u,
|
|
66
66
|
closeButtonLabel: d,
|
|
67
67
|
className: p,
|
|
@@ -70,40 +70,41 @@ const g = (o, e, t) => {
|
|
|
70
70
|
dataTestId: s,
|
|
71
71
|
...M
|
|
72
72
|
}) => {
|
|
73
|
-
const T =
|
|
74
|
-
V(T.current,
|
|
75
|
-
const b =
|
|
76
|
-
(c) =>
|
|
73
|
+
const T = O(null);
|
|
74
|
+
V(T.current, n);
|
|
75
|
+
const b = P.toArray(a), k = b.find(
|
|
76
|
+
(c) => f(v, "ModalTitle", c)
|
|
77
77
|
), h = b.find(
|
|
78
|
-
(c) =>
|
|
78
|
+
(c) => f(C, "ModalFooter", c)
|
|
79
79
|
), I = k ? y(k, {
|
|
80
|
-
as:
|
|
81
|
-
}) : null,
|
|
82
|
-
dataModalSize:
|
|
83
|
-
}) : null,
|
|
84
|
-
(c) => !
|
|
80
|
+
as: t === "sm" ? "h5" : "h4"
|
|
81
|
+
}) : null, x = h ? y(h, {
|
|
82
|
+
dataModalSize: t
|
|
83
|
+
}) : null, E = b.filter(
|
|
84
|
+
(c) => !f(v, "ModalTitle", c) && !f(C, "ModalFooter", c)
|
|
85
85
|
);
|
|
86
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ l(z, { modalRef: T, isOpen: n, children: /* @__PURE__ */ l(
|
|
87
87
|
"div",
|
|
88
88
|
{
|
|
89
89
|
...M,
|
|
90
90
|
ref: T,
|
|
91
91
|
className: m("gi-modal", {
|
|
92
|
-
"gi-modal-open":
|
|
93
|
-
"gi-modal-close": !
|
|
92
|
+
"gi-modal-open": n,
|
|
93
|
+
"gi-modal-close": !n
|
|
94
94
|
}),
|
|
95
95
|
"data-testid": s || "modal",
|
|
96
96
|
onClick: (c) => {
|
|
97
|
-
c.currentTarget === c.target &&
|
|
97
|
+
c.currentTarget === c.target && e && r && u();
|
|
98
98
|
},
|
|
99
|
-
|
|
99
|
+
tabIndex: -1,
|
|
100
|
+
children: /* @__PURE__ */ g(
|
|
100
101
|
"div",
|
|
101
102
|
{
|
|
102
103
|
"data-testid": "modal-container",
|
|
103
104
|
role: "dialog",
|
|
104
105
|
"aria-modal": "true",
|
|
105
106
|
"aria-label": "dialog",
|
|
106
|
-
"data-size":
|
|
107
|
+
"data-size": t,
|
|
107
108
|
"data-position": o,
|
|
108
109
|
className: m(
|
|
109
110
|
"gi-modal-container-control",
|
|
@@ -117,9 +118,9 @@ const g = (o, e, t) => {
|
|
|
117
118
|
p
|
|
118
119
|
),
|
|
119
120
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ g("div", { children: [
|
|
121
122
|
I,
|
|
122
|
-
|
|
123
|
+
e && /* @__PURE__ */ l(
|
|
123
124
|
W,
|
|
124
125
|
{
|
|
125
126
|
onClick: u,
|
|
@@ -128,26 +129,26 @@ const g = (o, e, t) => {
|
|
|
128
129
|
}
|
|
129
130
|
)
|
|
130
131
|
] }),
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
/* @__PURE__ */ g("div", { className: m({ "gi-pb-6": !h }), children: [
|
|
133
|
+
E,
|
|
134
|
+
x
|
|
134
135
|
] })
|
|
135
136
|
]
|
|
136
137
|
}
|
|
137
138
|
)
|
|
138
139
|
}
|
|
139
140
|
) });
|
|
140
|
-
}, v = ({ children: o, as:
|
|
141
|
+
}, v = ({ children: o, as: t = "h4", ...e }) => /* @__PURE__ */ l("div", { className: "gi-flex-1", id: e.id, "aria-label": o == null ? void 0 : o.toString(), children: /* @__PURE__ */ l(S, { as: t, ...e, children: o }) });
|
|
141
142
|
Object.defineProperty(v, "componentType", {
|
|
142
143
|
value: "ModalTitle",
|
|
143
144
|
writable: !1,
|
|
144
145
|
enumerable: !1
|
|
145
146
|
});
|
|
146
147
|
v.displayName = "ModalTitle";
|
|
147
|
-
const
|
|
148
|
+
const et = ({
|
|
148
149
|
children: o,
|
|
149
|
-
className:
|
|
150
|
-
}) => /* @__PURE__ */
|
|
150
|
+
className: t
|
|
151
|
+
}) => /* @__PURE__ */ l(
|
|
151
152
|
"div",
|
|
152
153
|
{
|
|
153
154
|
id: "gi-modal-body",
|
|
@@ -155,40 +156,40 @@ const te = ({
|
|
|
155
156
|
role: "document",
|
|
156
157
|
className: m(
|
|
157
158
|
{
|
|
158
|
-
"gi-modal-body": !
|
|
159
|
+
"gi-modal-body": !t
|
|
159
160
|
},
|
|
160
|
-
|
|
161
|
+
t
|
|
161
162
|
),
|
|
162
163
|
children: o
|
|
163
164
|
}
|
|
164
165
|
), C = ({
|
|
165
166
|
className: o,
|
|
166
|
-
children:
|
|
167
|
-
orientation:
|
|
167
|
+
children: t,
|
|
168
|
+
orientation: e,
|
|
168
169
|
dataModalSize: r
|
|
169
170
|
}) => {
|
|
170
|
-
const d = (Array.isArray(
|
|
171
|
+
const d = (Array.isArray(t) ? t : [t]).filter((a) => {
|
|
171
172
|
var i, s;
|
|
172
173
|
return j(a) && (a.type === B || ((i = a.type) == null ? void 0 : i.displayName) === "Button" || ((s = a.props) == null ? void 0 : s["data-button"]));
|
|
173
174
|
}).sort((a, i) => {
|
|
174
175
|
const s = a.props.variant ?? "primary", M = i.props.variant ?? "primary";
|
|
175
176
|
return (N[s] || 0) - (N[M] || 0);
|
|
176
177
|
}), p = m({
|
|
177
|
-
"gi-justify-center sm:gi-justify-start": !
|
|
178
|
-
"gi-justify-center":
|
|
179
|
-
"gi-justify-start":
|
|
178
|
+
"gi-justify-center sm:gi-justify-start": !e && r !== "sm",
|
|
179
|
+
"gi-justify-center": e === "vertical" || r === "sm",
|
|
180
|
+
"gi-justify-start": e === "horizontal"
|
|
180
181
|
});
|
|
181
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ l(
|
|
182
183
|
"div",
|
|
183
184
|
{
|
|
184
185
|
className: m(o, {
|
|
185
186
|
"gi-pt-6": d.length === 0,
|
|
186
187
|
"gi-modal-footer": d.length
|
|
187
188
|
}),
|
|
188
|
-
children: d.length > 0 && /* @__PURE__ */
|
|
189
|
+
children: d.length > 0 && /* @__PURE__ */ l(
|
|
189
190
|
"div",
|
|
190
191
|
{
|
|
191
|
-
"data-orientation":
|
|
192
|
+
"data-orientation": e || "unset",
|
|
192
193
|
"data-modal-size": r,
|
|
193
194
|
children: d.map(
|
|
194
195
|
(a, i) => {
|
|
@@ -213,35 +214,35 @@ Object.defineProperty(C, "componentType", {
|
|
|
213
214
|
C.displayName = "ModalFooter";
|
|
214
215
|
const z = ({
|
|
215
216
|
children: o,
|
|
216
|
-
modalRef:
|
|
217
|
-
isOpen:
|
|
217
|
+
modalRef: t,
|
|
218
|
+
isOpen: e
|
|
218
219
|
}) => {
|
|
219
|
-
const [r,
|
|
220
|
-
return
|
|
221
|
-
|
|
222
|
-
}, []), _(
|
|
223
|
-
initialFocus: !
|
|
224
|
-
fallbackFocus: () =>
|
|
220
|
+
const [r, n] = A(!1);
|
|
221
|
+
return w(() => {
|
|
222
|
+
n(!0);
|
|
223
|
+
}, []), _(t == null ? void 0 : t.current, e && r, {
|
|
224
|
+
initialFocus: (t == null ? void 0 : t.current) ?? !0,
|
|
225
|
+
fallbackFocus: () => t == null ? void 0 : t.current
|
|
225
226
|
}), r ? H(o, document.body) : null;
|
|
226
|
-
},
|
|
227
|
+
}, ot = ({
|
|
227
228
|
children: o,
|
|
228
|
-
triggerButton:
|
|
229
|
-
startsOpen:
|
|
229
|
+
triggerButton: t,
|
|
230
|
+
startsOpen: e,
|
|
230
231
|
...r
|
|
231
232
|
}) => {
|
|
232
|
-
const [
|
|
233
|
+
const [n, u] = A(!!e), d = () => u(!0), p = () => u(!1), a = y(t, {
|
|
233
234
|
"data-testid": "modal-trigger-button-container",
|
|
234
235
|
"aria-haspopup": "dialog",
|
|
235
236
|
onClick: d
|
|
236
237
|
});
|
|
237
|
-
return /* @__PURE__ */
|
|
238
|
+
return /* @__PURE__ */ g(F, { children: [
|
|
238
239
|
a,
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ l(
|
|
240
241
|
q,
|
|
241
242
|
{
|
|
242
243
|
onClose: p,
|
|
243
244
|
position: "center",
|
|
244
|
-
isOpen:
|
|
245
|
+
isOpen: n,
|
|
245
246
|
...r,
|
|
246
247
|
children: o
|
|
247
248
|
}
|
|
@@ -249,8 +250,8 @@ const z = ({
|
|
|
249
250
|
] });
|
|
250
251
|
};
|
|
251
252
|
export {
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
ot as Modal,
|
|
254
|
+
et as ModalBody,
|
|
254
255
|
C as ModalFooter,
|
|
255
256
|
v as ModalTitle,
|
|
256
257
|
q as ModalWrapper
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { InnerStepProps, ProgressStepperProps, StepItemProps } from './types.js';
|
|
3
|
-
export declare const Step: ({ isCurrentStep, isCompleted, isLastStep, stepNumber, orientation, children, indicator, verticalSlot, defaultOpen, dataTestId, ariaLabel, verticalGap, }: InnerStepProps
|
|
3
|
+
export declare const Step: ({ isCurrentStep, isCompleted, isLastStep, isDisabled, stepNumber, orientation, children, indicator, verticalSlot, defaultOpen, dataTestId, ariaLabel, verticalGap, }: InnerStepProps & {
|
|
4
|
+
isDisabled?: boolean;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
6
|
export declare const StepItem: FC<StepItemProps>;
|
|
5
|
-
export declare const ProgressStepper: ({ children, currentStepIndex, orientation, indicator, completeAll, dataTestId, className, verticalGap, }: ProgressStepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const ProgressStepper: ({ children, currentStepIndex, orientation, indicator, completeAll, stepStates, dataTestId, className, verticalGap, }: ProgressStepperProps) => import("react/jsx-runtime").JSX.Element;
|