@ogcio/design-system-react 1.15.1 → 1.15.3
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 +176 -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/popover/popover.js +560 -524
- 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 +65 -65
- package/dist/select/select-next.js +189 -153
- package/dist/select/select-search.d.ts +12 -3
- package/dist/select/select-search.js +29 -21
- package/dist/select/types.d.ts +0 -3
- package/dist/styles.css +1 -1
- package/dist/text-input/text-input.d.ts +2 -2
- package/dist/toast/toast.js +6 -9
- package/package.json +2 -2
|
@@ -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;
|
|
@@ -1,111 +1,113 @@
|
|
|
1
|
-
import { jsxs as v, jsx as
|
|
2
|
-
import { Children as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { ProgressStepperIndicator as
|
|
6
|
-
const
|
|
1
|
+
import { jsxs as v, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Children as k } from "react";
|
|
3
|
+
import { cn as H } from "../cn.js";
|
|
4
|
+
import { Icon as L } from "../icon/icon.js";
|
|
5
|
+
import { ProgressStepperIndicator as u } from "./types.js";
|
|
6
|
+
const V = (e) => `calc(100% + ${e * 4 - 36}px)`, B = ({
|
|
7
7
|
isNextStep: e,
|
|
8
8
|
orientation: t = "horizontal",
|
|
9
|
-
isCurrentStep:
|
|
10
|
-
isCompleted:
|
|
9
|
+
isCurrentStep: a,
|
|
10
|
+
isCompleted: c,
|
|
11
11
|
verticalGap: l
|
|
12
12
|
}) => {
|
|
13
|
-
const
|
|
13
|
+
const s = t === "vertical" ? { height: V(l) } : void 0;
|
|
14
14
|
return /* @__PURE__ */ v(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
"data-orientation": t,
|
|
18
18
|
"data-next": e,
|
|
19
|
-
"data-completed":
|
|
20
|
-
"data-current":
|
|
19
|
+
"data-completed": c,
|
|
20
|
+
"data-current": a,
|
|
21
21
|
className: "gi-progress-stepper-step-connector",
|
|
22
22
|
"aria-hidden": "true",
|
|
23
|
-
style:
|
|
23
|
+
style: s,
|
|
24
24
|
children: [
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
|
|
25
|
+
/* @__PURE__ */ o("span", {}),
|
|
26
|
+
a ? /* @__PURE__ */ o("span", {}) : null
|
|
27
27
|
]
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
|
-
},
|
|
31
|
-
[
|
|
32
|
-
completed: /* @__PURE__ */
|
|
30
|
+
}, I = (e) => ({
|
|
31
|
+
[u.Hashtag]: {
|
|
32
|
+
completed: /* @__PURE__ */ o(L, { icon: "check" }),
|
|
33
33
|
current: () => "#",
|
|
34
34
|
next: () => "#"
|
|
35
35
|
},
|
|
36
|
-
[
|
|
37
|
-
completed: /* @__PURE__ */
|
|
38
|
-
current: (
|
|
39
|
-
next: (
|
|
36
|
+
[u.Number]: {
|
|
37
|
+
completed: /* @__PURE__ */ o(L, { icon: "check" }),
|
|
38
|
+
current: (a) => a,
|
|
39
|
+
next: (a) => a
|
|
40
40
|
}
|
|
41
|
-
})[e],
|
|
42
|
-
const { current: l, completed:
|
|
43
|
-
e ||
|
|
41
|
+
})[e], q = (e, t, a, c) => {
|
|
42
|
+
const { current: l, completed: s, next: i } = I(
|
|
43
|
+
e || u.Hashtag
|
|
44
44
|
);
|
|
45
|
-
return
|
|
46
|
-
},
|
|
45
|
+
return a ? s : c ? l(t) : i(t);
|
|
46
|
+
}, x = ({
|
|
47
47
|
isCurrentStep: e,
|
|
48
48
|
isCompleted: t,
|
|
49
|
-
isLastStep:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
isLastStep: a,
|
|
50
|
+
isDisabled: c = !1,
|
|
51
|
+
stepNumber: l,
|
|
52
|
+
orientation: s,
|
|
53
|
+
children: i,
|
|
54
|
+
indicator: d,
|
|
54
55
|
verticalSlot: n,
|
|
55
|
-
defaultOpen:
|
|
56
|
-
dataTestId:
|
|
57
|
-
ariaLabel:
|
|
58
|
-
verticalGap:
|
|
56
|
+
defaultOpen: g,
|
|
57
|
+
dataTestId: b,
|
|
58
|
+
ariaLabel: h,
|
|
59
|
+
verticalGap: m
|
|
59
60
|
}) => {
|
|
60
|
-
const
|
|
61
|
-
return /* @__PURE__ */ v("div", { className:
|
|
61
|
+
const f = !t && !e, r = s === "vertical" && (e || g || t), p = !!i;
|
|
62
|
+
return /* @__PURE__ */ v("div", { className: `gi-relative ${c ? "gi-disabled" : ""}`, children: [
|
|
62
63
|
/* @__PURE__ */ v(
|
|
63
64
|
"div",
|
|
64
65
|
{
|
|
65
66
|
className: "gi-progress-stepper-step-container",
|
|
66
|
-
"data-orientation":
|
|
67
|
+
"data-orientation": s,
|
|
67
68
|
"data-current": e,
|
|
68
69
|
"data-completed": t,
|
|
69
|
-
"data-
|
|
70
|
-
"data-
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
70
|
+
"data-disabled": c,
|
|
71
|
+
"data-next": f,
|
|
72
|
+
"data-indicator": d,
|
|
73
|
+
"aria-labelledby": `step-label-${l}`,
|
|
74
|
+
"data-testid": b || `step-label-${l}`,
|
|
75
|
+
"aria-label": p ? void 0 : h,
|
|
74
76
|
children: [
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
/* @__PURE__ */ o("div", { className: "gi-progress-stepper-step", "data-indicator": d, children: q(
|
|
78
|
+
d || u.Hashtag,
|
|
79
|
+
l,
|
|
78
80
|
t,
|
|
79
81
|
e
|
|
80
82
|
) }),
|
|
81
|
-
p && /* @__PURE__ */
|
|
83
|
+
p && /* @__PURE__ */ o(
|
|
82
84
|
"div",
|
|
83
85
|
{
|
|
84
86
|
className: "gi-progress-stepper-step-label",
|
|
85
|
-
"data-orientation":
|
|
86
|
-
id: `step-label-${
|
|
87
|
-
children:
|
|
87
|
+
"data-orientation": s,
|
|
88
|
+
id: `step-label-${l}`,
|
|
89
|
+
children: i
|
|
88
90
|
}
|
|
89
91
|
)
|
|
90
92
|
]
|
|
91
93
|
}
|
|
92
94
|
),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
a ? null : /* @__PURE__ */ o(
|
|
96
|
+
B,
|
|
95
97
|
{
|
|
96
98
|
isCurrentStep: e,
|
|
97
|
-
isNextStep:
|
|
99
|
+
isNextStep: f,
|
|
98
100
|
isCompleted: t,
|
|
99
|
-
orientation:
|
|
100
|
-
stepNumber:
|
|
101
|
-
verticalGap:
|
|
101
|
+
orientation: s,
|
|
102
|
+
stepNumber: l,
|
|
103
|
+
verticalGap: m
|
|
102
104
|
}
|
|
103
105
|
),
|
|
104
|
-
|
|
106
|
+
r && n && /* @__PURE__ */ o(
|
|
105
107
|
"div",
|
|
106
108
|
{
|
|
107
|
-
"data-testid": `vertical-step-slot-${
|
|
108
|
-
className:
|
|
109
|
+
"data-testid": `vertical-step-slot-${l - 1}`,
|
|
110
|
+
className: H("gi-ml-10", {
|
|
109
111
|
"gi-pt-5": p,
|
|
110
112
|
"-gi-mt-[34px]": !p && n
|
|
111
113
|
}),
|
|
@@ -113,78 +115,79 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
|
|
|
113
115
|
}
|
|
114
116
|
)
|
|
115
117
|
] });
|
|
116
|
-
},
|
|
118
|
+
}, M = () => null, Q = ({
|
|
117
119
|
children: e,
|
|
118
120
|
currentStepIndex: t = 0,
|
|
119
|
-
orientation:
|
|
120
|
-
indicator:
|
|
121
|
+
orientation: a = "horizontal",
|
|
122
|
+
indicator: c = "number",
|
|
121
123
|
completeAll: l,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
+
stepStates: s,
|
|
125
|
+
dataTestId: i,
|
|
126
|
+
className: d,
|
|
124
127
|
verticalGap: n = 14
|
|
125
128
|
}) => {
|
|
126
|
-
var
|
|
127
|
-
const
|
|
129
|
+
var h, m;
|
|
130
|
+
const g = (m = (h = e[t]) == null ? void 0 : h.props) == null ? void 0 : m.children, b = a === "horizontal" && g;
|
|
128
131
|
return /* @__PURE__ */ v(
|
|
129
132
|
"div",
|
|
130
133
|
{
|
|
131
134
|
role: "presentation",
|
|
132
|
-
className:
|
|
133
|
-
"gi-flex":
|
|
135
|
+
className: H("gi-w-full", {
|
|
136
|
+
"gi-flex": a === "vertical"
|
|
134
137
|
}),
|
|
135
138
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ o(
|
|
137
140
|
"div",
|
|
138
141
|
{
|
|
139
142
|
"data-testid": "progress-stepper",
|
|
140
|
-
className:
|
|
143
|
+
className: H(
|
|
141
144
|
"gi-progress-stepper",
|
|
142
145
|
{
|
|
143
|
-
[`gi-gap-${n}`]:
|
|
146
|
+
[`gi-gap-${n}`]: a === "vertical"
|
|
144
147
|
},
|
|
145
|
-
|
|
148
|
+
d
|
|
146
149
|
),
|
|
147
|
-
"data-orientation":
|
|
150
|
+
"data-orientation": a,
|
|
148
151
|
role: "list",
|
|
149
152
|
"aria-live": "polite",
|
|
150
|
-
children:
|
|
151
|
-
var
|
|
153
|
+
children: k.map(e, (f, r) => {
|
|
154
|
+
var w, y;
|
|
152
155
|
const {
|
|
153
156
|
label: p = "",
|
|
154
|
-
defaultOpen:
|
|
155
|
-
ariaLabel:
|
|
156
|
-
} =
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
B,
|
|
157
|
+
defaultOpen: O,
|
|
158
|
+
ariaLabel: P
|
|
159
|
+
} = f.props;
|
|
160
|
+
let $, N, z;
|
|
161
|
+
s && s[r] ? ($ = !!s[r].current, N = !!s[r].completed, z = !!s[r].disabled) : ($ = !l && t === r, N = l || r < t, z = !1);
|
|
162
|
+
const j = r === e.length - 1;
|
|
163
|
+
return /* @__PURE__ */ o("div", { className: "gi-w-full", role: "listitem", children: /* @__PURE__ */ o(
|
|
164
|
+
x,
|
|
163
165
|
{
|
|
164
|
-
stepNumber:
|
|
165
|
-
isCurrentStep:
|
|
166
|
-
isCompleted:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
166
|
+
stepNumber: r + 1,
|
|
167
|
+
isCurrentStep: $,
|
|
168
|
+
isCompleted: N,
|
|
169
|
+
isDisabled: z,
|
|
170
|
+
orientation: a,
|
|
171
|
+
isLastStep: j,
|
|
172
|
+
verticalSlot: (y = (w = e[r]) == null ? void 0 : w.props) == null ? void 0 : y.children,
|
|
173
|
+
defaultOpen: O,
|
|
174
|
+
indicator: c,
|
|
175
|
+
dataTestId: i,
|
|
176
|
+
ariaLabel: P,
|
|
174
177
|
verticalGap: n,
|
|
175
178
|
children: p
|
|
176
179
|
},
|
|
177
|
-
|
|
180
|
+
i || `progress-stepper-step-${r}`
|
|
178
181
|
) });
|
|
179
182
|
})
|
|
180
183
|
}
|
|
181
184
|
),
|
|
182
|
-
|
|
185
|
+
b && /* @__PURE__ */ o(
|
|
183
186
|
"div",
|
|
184
187
|
{
|
|
185
188
|
className: "gi-h-full",
|
|
186
189
|
"data-testid": `horizontal-step-slot-${t}`,
|
|
187
|
-
children:
|
|
190
|
+
children: g
|
|
188
191
|
}
|
|
189
192
|
)
|
|
190
193
|
]
|
|
@@ -192,7 +195,7 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
|
|
|
192
195
|
);
|
|
193
196
|
};
|
|
194
197
|
export {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
+
Q as ProgressStepper,
|
|
199
|
+
x as Step,
|
|
200
|
+
M as StepItem
|
|
198
201
|
};
|
|
@@ -23,6 +23,11 @@ export type ProgressStepperProps = {
|
|
|
23
23
|
indicator?: ProgressStepperIndicatorType;
|
|
24
24
|
className?: string;
|
|
25
25
|
verticalGap?: number;
|
|
26
|
+
stepStates?: {
|
|
27
|
+
completed?: boolean;
|
|
28
|
+
current?: boolean;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
}[];
|
|
26
31
|
};
|
|
27
32
|
export type InnerStepProps = {
|
|
28
33
|
children: string;
|
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { translate as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { InputText as
|
|
8
|
-
import { Label as
|
|
9
|
-
import { Spinner as
|
|
10
|
-
const
|
|
11
|
-
({ children: o, className: i, onChange: s, enableSearch: r, isLoading: c, showNoData:
|
|
12
|
-
const [l,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const R = P.toArray(o).filter(
|
|
17
|
-
(a) => V(a)
|
|
2
|
+
import { jsxs as N, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as F, useState as $, useEffect as R, Children as z, isValidElement as A, cloneElement as v } from "react";
|
|
4
|
+
import { cn as P } from "../cn.js";
|
|
5
|
+
import { translate as K } from "../i18n/utility.js";
|
|
6
|
+
import { Icon as q } from "../icon/icon.js";
|
|
7
|
+
import { InputText as H } from "../input-text/input-text.js";
|
|
8
|
+
import { Label as J } from "../label/label.js";
|
|
9
|
+
import { Spinner as Q } from "../spinner/spinner.js";
|
|
10
|
+
const re = F(
|
|
11
|
+
({ children: o, className: i, onChange: s, enableSearch: r, isLoading: c, showNoData: d }, g) => {
|
|
12
|
+
const [l, O] = $(""), [S, w] = $([]);
|
|
13
|
+
R(() => {
|
|
14
|
+
const u = z.toArray(o).filter(
|
|
15
|
+
(a) => A(a)
|
|
18
16
|
).map((a) => {
|
|
19
|
-
var L, M,
|
|
20
|
-
const
|
|
21
|
-
switch (
|
|
17
|
+
var x, L, M, I, T, k;
|
|
18
|
+
const B = (x = a == null ? void 0 : a.type) == null ? void 0 : x.componentType, b = l.toLowerCase();
|
|
19
|
+
switch (B) {
|
|
22
20
|
case "SelectMenuOption": {
|
|
23
21
|
const e = a;
|
|
24
22
|
if (typeof e.props.value == "string") {
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
return
|
|
23
|
+
const D = ((I = (M = (L = e == null ? void 0 : e.props) == null ? void 0 : L.children) == null ? void 0 : M.toString()) == null ? void 0 : I.toLowerCase()) || "", E = (k = (T = e == null ? void 0 : e.props) == null ? void 0 : T.value) == null ? void 0 : k.toLowerCase();
|
|
24
|
+
if (D.includes(b) || E.includes(b))
|
|
25
|
+
return v(e, {
|
|
28
26
|
onChange: s,
|
|
29
27
|
enableSearch: r
|
|
30
28
|
});
|
|
@@ -32,114 +30,116 @@ const se = H(
|
|
|
32
30
|
break;
|
|
33
31
|
}
|
|
34
32
|
case "SelectMenuGroupItem": {
|
|
35
|
-
const e = a,
|
|
33
|
+
const e = a, G = z.toArray(
|
|
36
34
|
e.props.children
|
|
37
|
-
).filter((t) =>
|
|
35
|
+
).filter((t) => A(t)).map((t) => {
|
|
38
36
|
var p;
|
|
39
|
-
return ((p = t == null ? void 0 : t.type) == null ? void 0 : p.componentType) === "SelectMenuOption" ?
|
|
37
|
+
return ((p = t == null ? void 0 : t.type) == null ? void 0 : p.componentType) === "SelectMenuOption" ? v(t, { onChange: s }) : null;
|
|
40
38
|
}).filter(
|
|
41
39
|
(t) => t !== null
|
|
42
40
|
).filter((t) => {
|
|
43
|
-
var
|
|
44
|
-
const p = ((
|
|
45
|
-
return (p == null ? void 0 : p.includes(l.toLowerCase())) || (
|
|
41
|
+
var j, C, V;
|
|
42
|
+
const p = ((C = (j = t.props.children) == null ? void 0 : j.toString()) == null ? void 0 : C.toLowerCase()) || "", f = ((V = t.props.value) == null ? void 0 : V.toLowerCase()) || "";
|
|
43
|
+
return (p == null ? void 0 : p.includes(l.toLowerCase())) || (f == null ? void 0 : f.includes(l.toLowerCase()));
|
|
46
44
|
});
|
|
47
|
-
return
|
|
48
|
-
children:
|
|
45
|
+
return G.length > 0 || l === "" ? v(e, {
|
|
46
|
+
children: G
|
|
49
47
|
}) : null;
|
|
50
48
|
}
|
|
51
49
|
default:
|
|
52
50
|
return null;
|
|
53
51
|
}
|
|
54
52
|
}).filter(Boolean);
|
|
55
|
-
w(
|
|
53
|
+
w(u);
|
|
56
54
|
}, [o, l, s]);
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
|
|
55
|
+
const y = (m) => {
|
|
56
|
+
O(m.target.value);
|
|
57
|
+
}, h = () => c ? /* @__PURE__ */ n("div", { className: "gi-select-menu-loading", children: /* @__PURE__ */ n(Q, { size: "md" }) }) : d ? /* @__PURE__ */ n("div", { className: "gi-select-menu-option-not-found", children: K("autocomplete.noData", {
|
|
58
|
+
defaultValue: "No data found."
|
|
59
|
+
}) }) : /* @__PURE__ */ n("ul", { children: S });
|
|
60
|
+
return /* @__PURE__ */ N("div", { ref: g, className: P("gi-select-menu-container", i), children: [
|
|
61
61
|
r && /* @__PURE__ */ n("div", { className: "gi-select-menu-input-container", children: /* @__PURE__ */ n(
|
|
62
|
-
|
|
62
|
+
H,
|
|
63
63
|
{
|
|
64
64
|
tabIndex: 0,
|
|
65
|
-
placeholder:
|
|
65
|
+
placeholder: K("input.search"),
|
|
66
66
|
iconEnd: "search",
|
|
67
|
-
onChange:
|
|
67
|
+
onChange: y,
|
|
68
68
|
value: l
|
|
69
69
|
}
|
|
70
70
|
) }),
|
|
71
|
-
/* @__PURE__ */ n("div", { className: "gi-select-menu-option-container", children:
|
|
71
|
+
/* @__PURE__ */ n("div", { className: "gi-select-menu-option-container", children: h() })
|
|
72
72
|
] });
|
|
73
73
|
}
|
|
74
|
-
),
|
|
74
|
+
), U = ({
|
|
75
75
|
children: o,
|
|
76
76
|
value: i,
|
|
77
77
|
selected: s,
|
|
78
78
|
onChange: r,
|
|
79
79
|
disabled: c,
|
|
80
|
-
dataTestid:
|
|
80
|
+
dataTestid: d,
|
|
81
81
|
className: g,
|
|
82
82
|
hidden: l,
|
|
83
|
-
enableSearch:
|
|
84
|
-
isHighlighted:
|
|
85
|
-
index:
|
|
86
|
-
...
|
|
83
|
+
enableSearch: O,
|
|
84
|
+
isHighlighted: S,
|
|
85
|
+
index: w,
|
|
86
|
+
...y
|
|
87
87
|
}) => {
|
|
88
|
-
const
|
|
88
|
+
const h = (u) => {
|
|
89
89
|
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), r == null || r(i));
|
|
90
|
-
},
|
|
90
|
+
}, m = () => {
|
|
91
91
|
c || r == null || r(i);
|
|
92
92
|
};
|
|
93
|
-
return l ? null : /* @__PURE__ */
|
|
93
|
+
return l ? null : /* @__PURE__ */ N(
|
|
94
94
|
"li",
|
|
95
95
|
{
|
|
96
96
|
role: "option",
|
|
97
97
|
tabIndex: c ? -1 : 0,
|
|
98
|
-
"data-index":
|
|
98
|
+
"data-index": w,
|
|
99
99
|
"aria-selected": s,
|
|
100
100
|
"aria-label": o == null ? void 0 : o.toString(),
|
|
101
101
|
"aria-disabled": c,
|
|
102
|
-
onKeyDown:
|
|
103
|
-
onClick:
|
|
104
|
-
className:
|
|
102
|
+
onKeyDown: h,
|
|
103
|
+
onClick: m,
|
|
104
|
+
className: P(
|
|
105
105
|
"gi-select-option-item",
|
|
106
106
|
{
|
|
107
107
|
"gi-select-option-item-disabled": c,
|
|
108
|
-
"gi-select-option-item-highlighted":
|
|
108
|
+
"gi-select-option-item-highlighted": S
|
|
109
109
|
},
|
|
110
110
|
g
|
|
111
111
|
),
|
|
112
|
-
"data-search-enabled":
|
|
113
|
-
"data-testid":
|
|
114
|
-
...
|
|
112
|
+
"data-search-enabled": O,
|
|
113
|
+
"data-testid": d || `option-${i}`,
|
|
114
|
+
...y,
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ n("span", { className: "gi-text-sm", children: o }),
|
|
117
|
-
s && /* @__PURE__ */ n(
|
|
117
|
+
s && /* @__PURE__ */ n(q, { icon: "check" })
|
|
118
118
|
]
|
|
119
119
|
},
|
|
120
120
|
`${o}-${i}`
|
|
121
121
|
);
|
|
122
122
|
};
|
|
123
|
-
Object.defineProperty(
|
|
123
|
+
Object.defineProperty(U, "componentType", {
|
|
124
124
|
value: "SelectMenuOption",
|
|
125
125
|
writable: !1,
|
|
126
126
|
enumerable: !1
|
|
127
127
|
});
|
|
128
|
-
const
|
|
128
|
+
const W = ({
|
|
129
129
|
children: o,
|
|
130
130
|
label: i,
|
|
131
131
|
...s
|
|
132
|
-
}) => /* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */ n(
|
|
132
|
+
}) => /* @__PURE__ */ N("div", { ...s, role: "group", className: "gi-px-3", children: [
|
|
133
|
+
/* @__PURE__ */ n(J, { text: i, size: "sm", className: "gi-font-bold gi-pb-1" }),
|
|
134
134
|
o
|
|
135
135
|
] });
|
|
136
|
-
Object.defineProperty(
|
|
136
|
+
Object.defineProperty(W, "componentType", {
|
|
137
137
|
value: "SelectMenuGroupItem",
|
|
138
138
|
writable: !1,
|
|
139
139
|
enumerable: !1
|
|
140
140
|
});
|
|
141
141
|
export {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
re as SelectMenu,
|
|
143
|
+
W as SelectMenuGroupItem,
|
|
144
|
+
U as SelectMenuOption
|
|
145
145
|
};
|