@abgov/react-components 6.11.0 → 7.0.0-dev.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/index.d.ts +5 -0
- package/index.js +3084 -1074
- package/index.js.map +1 -1
- package/index.mjs +3680 -1670
- package/index.mjs.map +1 -1
- package/lib/app-header/app-header.d.ts +5 -2
- package/lib/app-header-menu/app-header-menu.d.ts +8 -7
- package/lib/badge/badge.d.ts +23 -18
- package/lib/button/button.d.ts +23 -0
- package/lib/calendar/calendar.d.ts +17 -0
- package/lib/callout/callout.d.ts +21 -2
- package/lib/checkbox/checkbox.d.ts +30 -2
- package/lib/checkbox-list/checkbox-list.d.ts +11 -8
- package/lib/date-picker/date-picker.d.ts +22 -0
- package/lib/drawer/drawer.d.ts +16 -0
- package/lib/dropdown/dropdown-item.d.ts +15 -0
- package/lib/dropdown/dropdown.d.ts +34 -2
- package/lib/file-upload-card/file-upload-card.d.ts +18 -0
- package/lib/file-upload-input/file-upload-input.d.ts +16 -0
- package/lib/filter-chip/filter-chip.d.ts +21 -1
- package/lib/footer/footer.d.ts +13 -1
- package/lib/footer-meta-section/footer-meta-section.d.ts +10 -0
- package/lib/footer-nav-section/footer-nav-section.d.ts +12 -0
- package/lib/form-item/form-item.d.ts +24 -2
- package/lib/input/input.d.ts +43 -2
- package/lib/link/link.d.ts +22 -3
- package/lib/menu-button/menu-button.d.ts +9 -52
- package/lib/modal/modal.d.ts +24 -1
- package/lib/notification/notification.d.ts +21 -2
- package/lib/pagination/pagination.d.ts +16 -0
- package/lib/push-drawer/push-drawer.d.ts +7 -6
- package/lib/radio-group/radio-group.d.ts +24 -2
- package/lib/radio-group/radio.d.ts +24 -1
- package/lib/side-menu/side-menu.d.ts +12 -1
- package/lib/side-menu-group/side-menu-group.d.ts +14 -1
- package/lib/side-menu-heading/side-menu-heading.d.ts +13 -1
- package/lib/table/table-sort-header.d.ts +15 -2
- package/lib/table/table.d.ts +22 -2
- package/lib/tabs/tabs.d.ts +22 -2
- package/lib/textarea/textarea.d.ts +29 -1
- package/{experimental → lib}/work-side-menu/work-side-menu.d.ts +3 -2
- package/{experimental → lib}/work-side-menu-group/work-side-menu-group.d.ts +6 -4
- package/{experimental → lib}/work-side-menu-item/work-side-menu-item.d.ts +5 -4
- package/lib/work-side-notification-item/work-side-notification-item.d.ts +31 -0
- package/lib/work-side-notification-panel/work-side-notification-panel.d.ts +25 -0
- package/package.json +1 -6
- package/experimental/badge/badge.d.ts +0 -33
- package/experimental/button/button.d.ts +0 -43
- package/experimental/calendar/calendar.d.ts +0 -30
- package/experimental/callout/callout.d.ts +0 -33
- package/experimental/checkbox/checkbox.d.ts +0 -52
- package/experimental/date-picker/date-picker.d.ts +0 -43
- package/experimental/drawer/drawer.d.ts +0 -31
- package/experimental/dropdown/dropdown-item.d.ts +0 -26
- package/experimental/dropdown/dropdown.d.ts +0 -62
- package/experimental/file-upload-card/file-upload-card.d.ts +0 -32
- package/experimental/file-upload-input/file-upload-input.d.ts +0 -27
- package/experimental/filter-chip/filter-chip.d.ts +0 -31
- package/experimental/footer/footer.d.ts +0 -24
- package/experimental/footer-meta-section/footer-meta-section.d.ts +0 -18
- package/experimental/footer-nav-section/footer-nav-section.d.ts +0 -22
- package/experimental/form-hook.d.ts +0 -8
- package/experimental/form-item/form-item.d.ts +0 -46
- package/experimental/index.d.ts +0 -32
- package/experimental/input/input.d.ts +0 -124
- package/experimental/link/link.d.ts +0 -32
- package/experimental/modal/modal.d.ts +0 -44
- package/experimental/notification/notification.d.ts +0 -31
- package/experimental/pagination/pagination.d.ts +0 -29
- package/experimental/radio-group/radio-group.d.ts +0 -40
- package/experimental/radio-group/radio.d.ts +0 -42
- package/experimental/side-menu/side-menu.d.ts +0 -19
- package/experimental/side-menu-group/side-menu-group.d.ts +0 -24
- package/experimental/side-menu-heading/side-menu-heading.d.ts +0 -23
- package/experimental/table/table-sort-header.d.ts +0 -20
- package/experimental/table/table.d.ts +0 -30
- package/experimental/tabs/tabs.d.ts +0 -27
- package/experimental/textarea/textarea.d.ts +0 -53
- package/experimental.js +0 -1245
- package/experimental.js.map +0 -1
- package/experimental.mjs +0 -1245
- package/experimental.mjs.map +0 -1
- package/parseISO-BHUUf1QW.mjs +0 -1693
- package/parseISO-BHUUf1QW.mjs.map +0 -1
- package/parseISO-Dj57mwuH.js +0 -1692
- package/parseISO-Dj57mwuH.js.map +0 -1
package/experimental.js
DELETED
|
@@ -1,1245 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const parseISO = require("./parseISO-Dj57mwuH.js");
|
|
5
|
-
const react = require("react");
|
|
6
|
-
function getIconValue(icon, iconType) {
|
|
7
|
-
if (icon !== void 0) {
|
|
8
|
-
return icon ? "true" : "false";
|
|
9
|
-
}
|
|
10
|
-
return iconType ? "true" : "false";
|
|
11
|
-
}
|
|
12
|
-
function GoabxBadge({
|
|
13
|
-
icon,
|
|
14
|
-
iconType,
|
|
15
|
-
size = "medium",
|
|
16
|
-
emphasis = "strong",
|
|
17
|
-
version = "2",
|
|
18
|
-
...rest
|
|
19
|
-
}) {
|
|
20
|
-
const _props = parseISO.transformProps({ size, emphasis, ...rest }, parseISO.lowercase);
|
|
21
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
|
-
"goa-badge",
|
|
23
|
-
{
|
|
24
|
-
icon: getIconValue(icon, iconType),
|
|
25
|
-
icontype: iconType,
|
|
26
|
-
..._props,
|
|
27
|
-
version,
|
|
28
|
-
size,
|
|
29
|
-
emphasis
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
function GoabxButton({
|
|
34
|
-
disabled,
|
|
35
|
-
onClick,
|
|
36
|
-
actionArgs,
|
|
37
|
-
actionArg,
|
|
38
|
-
children,
|
|
39
|
-
version = "2",
|
|
40
|
-
...rest
|
|
41
|
-
}) {
|
|
42
|
-
const el = react.useRef(null);
|
|
43
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
44
|
-
react.useEffect(() => {
|
|
45
|
-
if (!el.current) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (!onClick) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const current = el.current;
|
|
52
|
-
const listener = () => {
|
|
53
|
-
onClick == null ? void 0 : onClick();
|
|
54
|
-
};
|
|
55
|
-
current.addEventListener("_click", listener);
|
|
56
|
-
return () => {
|
|
57
|
-
current.removeEventListener("_click", listener);
|
|
58
|
-
};
|
|
59
|
-
}, [el, onClick]);
|
|
60
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
61
|
-
"goa-button",
|
|
62
|
-
{
|
|
63
|
-
ref: el,
|
|
64
|
-
disabled: disabled ? "true" : void 0,
|
|
65
|
-
"action-arg": actionArg,
|
|
66
|
-
"action-args": JSON.stringify(actionArgs),
|
|
67
|
-
..._props,
|
|
68
|
-
version,
|
|
69
|
-
children
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
function GoabxCalendar({
|
|
74
|
-
min,
|
|
75
|
-
max,
|
|
76
|
-
onChange,
|
|
77
|
-
name,
|
|
78
|
-
version = "2",
|
|
79
|
-
...rest
|
|
80
|
-
}) {
|
|
81
|
-
const ref = react.useRef(null);
|
|
82
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
83
|
-
react.useEffect(() => {
|
|
84
|
-
if (!ref.current) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
const current = ref.current;
|
|
88
|
-
const listener = (e) => {
|
|
89
|
-
onChange({
|
|
90
|
-
name: name || "",
|
|
91
|
-
value: e.detail.value
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
current.addEventListener("_change", listener);
|
|
95
|
-
return () => {
|
|
96
|
-
current.removeEventListener("_change", listener);
|
|
97
|
-
};
|
|
98
|
-
}, []);
|
|
99
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
100
|
-
"goa-calendar",
|
|
101
|
-
{
|
|
102
|
-
ref,
|
|
103
|
-
name,
|
|
104
|
-
min: min || void 0,
|
|
105
|
-
max: max || void 0,
|
|
106
|
-
version,
|
|
107
|
-
..._props
|
|
108
|
-
}
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
const GoabxCallout = ({
|
|
112
|
-
type = "information",
|
|
113
|
-
iconTheme = "outline",
|
|
114
|
-
size = "large",
|
|
115
|
-
ariaLive = "off",
|
|
116
|
-
emphasis = "medium",
|
|
117
|
-
children,
|
|
118
|
-
version = "2",
|
|
119
|
-
...rest
|
|
120
|
-
}) => {
|
|
121
|
-
const _props = parseISO.transformProps(
|
|
122
|
-
{ type, icontheme: iconTheme, size, arialive: ariaLive, emphasis, ...rest },
|
|
123
|
-
parseISO.lowercase
|
|
124
|
-
);
|
|
125
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-callout", { ..._props, version, children });
|
|
126
|
-
};
|
|
127
|
-
function GoabxCheckbox({
|
|
128
|
-
error,
|
|
129
|
-
checked,
|
|
130
|
-
indeterminate,
|
|
131
|
-
disabled,
|
|
132
|
-
value,
|
|
133
|
-
description,
|
|
134
|
-
reveal,
|
|
135
|
-
onChange,
|
|
136
|
-
name,
|
|
137
|
-
children,
|
|
138
|
-
size = "default",
|
|
139
|
-
version = "2",
|
|
140
|
-
...rest
|
|
141
|
-
}) {
|
|
142
|
-
const el = react.useRef(null);
|
|
143
|
-
const _props = parseISO.transformProps({ size, ...rest }, parseISO.lowercase);
|
|
144
|
-
react.useEffect(() => {
|
|
145
|
-
if (!el.current) {
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
const current = el.current;
|
|
149
|
-
const listener = (e) => {
|
|
150
|
-
const detail = e.detail;
|
|
151
|
-
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
152
|
-
};
|
|
153
|
-
current.addEventListener("_change", listener);
|
|
154
|
-
return () => {
|
|
155
|
-
current.removeEventListener("_change", listener);
|
|
156
|
-
};
|
|
157
|
-
}, [name, onChange]);
|
|
158
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
159
|
-
"goa-checkbox",
|
|
160
|
-
{
|
|
161
|
-
ref: el,
|
|
162
|
-
..._props,
|
|
163
|
-
name,
|
|
164
|
-
error: error ? "true" : void 0,
|
|
165
|
-
checked: checked ? "true" : void 0,
|
|
166
|
-
indeterminate: indeterminate ? "true" : void 0,
|
|
167
|
-
disabled: disabled ? "true" : void 0,
|
|
168
|
-
value: typeof value === "boolean" ? value ? "true" : void 0 : value,
|
|
169
|
-
description: typeof description === "string" ? description : void 0,
|
|
170
|
-
version,
|
|
171
|
-
children: [
|
|
172
|
-
children,
|
|
173
|
-
typeof description !== "string" && description && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "description", children: description }),
|
|
174
|
-
reveal && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "reveal", children: reveal })
|
|
175
|
-
]
|
|
176
|
-
}
|
|
177
|
-
);
|
|
178
|
-
}
|
|
179
|
-
function GoabxDatePicker({
|
|
180
|
-
value,
|
|
181
|
-
error,
|
|
182
|
-
min,
|
|
183
|
-
max,
|
|
184
|
-
disabled,
|
|
185
|
-
relative,
|
|
186
|
-
version = "2",
|
|
187
|
-
onChange,
|
|
188
|
-
...rest
|
|
189
|
-
}) {
|
|
190
|
-
const ref = react.useRef(null);
|
|
191
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
192
|
-
react.useEffect(() => {
|
|
193
|
-
if (value && typeof value !== "string") {
|
|
194
|
-
console.warn(
|
|
195
|
-
"Using a `Date` type for value is deprecated. Instead use a string of the format `yyyy-mm-dd`"
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
}, []);
|
|
199
|
-
react.useEffect(() => {
|
|
200
|
-
if (!ref.current) {
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
const current = ref.current;
|
|
204
|
-
const handleChange = (e) => {
|
|
205
|
-
const detail = e.detail;
|
|
206
|
-
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
207
|
-
};
|
|
208
|
-
if (onChange) {
|
|
209
|
-
current.addEventListener("_change", handleChange);
|
|
210
|
-
}
|
|
211
|
-
return () => {
|
|
212
|
-
if (onChange) {
|
|
213
|
-
current.removeEventListener("_change", handleChange);
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
}, [onChange]);
|
|
217
|
-
const formatValue = (val) => {
|
|
218
|
-
if (!val) return "";
|
|
219
|
-
if (val instanceof Date) {
|
|
220
|
-
return val.toISOString();
|
|
221
|
-
}
|
|
222
|
-
return val;
|
|
223
|
-
};
|
|
224
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
225
|
-
"goa-date-picker",
|
|
226
|
-
{
|
|
227
|
-
ref,
|
|
228
|
-
value: formatValue(value) || void 0,
|
|
229
|
-
error: error ? "true" : void 0,
|
|
230
|
-
disabled: disabled ? "true" : void 0,
|
|
231
|
-
min: formatValue(min) || void 0,
|
|
232
|
-
max: formatValue(max) || void 0,
|
|
233
|
-
relative: relative ? "true" : void 0,
|
|
234
|
-
version,
|
|
235
|
-
..._props
|
|
236
|
-
}
|
|
237
|
-
);
|
|
238
|
-
}
|
|
239
|
-
function GoabxDrawer({
|
|
240
|
-
position,
|
|
241
|
-
open,
|
|
242
|
-
heading,
|
|
243
|
-
maxSize,
|
|
244
|
-
testId,
|
|
245
|
-
actions,
|
|
246
|
-
children,
|
|
247
|
-
onClose,
|
|
248
|
-
version = "2"
|
|
249
|
-
}) {
|
|
250
|
-
const el = react.useRef(null);
|
|
251
|
-
react.useEffect(() => {
|
|
252
|
-
var _a;
|
|
253
|
-
if (!(el == null ? void 0 : el.current) || !onClose) {
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
(_a = el.current) == null ? void 0 : _a.addEventListener("_close", onClose);
|
|
257
|
-
return () => {
|
|
258
|
-
var _a2;
|
|
259
|
-
(_a2 = el.current) == null ? void 0 : _a2.removeEventListener("_close", onClose);
|
|
260
|
-
};
|
|
261
|
-
}, [el, onClose]);
|
|
262
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
263
|
-
"goa-drawer",
|
|
264
|
-
{
|
|
265
|
-
ref: el,
|
|
266
|
-
position,
|
|
267
|
-
open: open ? true : void 0,
|
|
268
|
-
heading: typeof heading === "string" ? heading : void 0,
|
|
269
|
-
maxsize: maxSize,
|
|
270
|
-
testid: testId,
|
|
271
|
-
version,
|
|
272
|
-
children: [
|
|
273
|
-
heading && typeof heading !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "heading", children: heading }),
|
|
274
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children: actions }),
|
|
275
|
-
children
|
|
276
|
-
]
|
|
277
|
-
}
|
|
278
|
-
);
|
|
279
|
-
}
|
|
280
|
-
function stringify(value) {
|
|
281
|
-
if (typeof value === "undefined") {
|
|
282
|
-
return "";
|
|
283
|
-
}
|
|
284
|
-
if (typeof value === "string") {
|
|
285
|
-
return value;
|
|
286
|
-
}
|
|
287
|
-
return JSON.stringify(value);
|
|
288
|
-
}
|
|
289
|
-
function GoabxDropdown({
|
|
290
|
-
value,
|
|
291
|
-
onChange,
|
|
292
|
-
disabled,
|
|
293
|
-
error,
|
|
294
|
-
filterable,
|
|
295
|
-
multiselect,
|
|
296
|
-
native,
|
|
297
|
-
relative,
|
|
298
|
-
children,
|
|
299
|
-
size = "default",
|
|
300
|
-
version = "2",
|
|
301
|
-
...rest
|
|
302
|
-
}) {
|
|
303
|
-
const el = react.useRef(null);
|
|
304
|
-
const _props = parseISO.transformProps({ size, ...rest }, parseISO.lowercase);
|
|
305
|
-
react.useEffect(() => {
|
|
306
|
-
if (!el.current) {
|
|
307
|
-
return;
|
|
308
|
-
}
|
|
309
|
-
const current = el.current;
|
|
310
|
-
const handler = (e) => {
|
|
311
|
-
const detail = e.detail;
|
|
312
|
-
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
313
|
-
};
|
|
314
|
-
if (onChange) {
|
|
315
|
-
current.addEventListener("_change", handler);
|
|
316
|
-
}
|
|
317
|
-
return () => {
|
|
318
|
-
if (onChange) {
|
|
319
|
-
current.removeEventListener("_change", handler);
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
}, [el, onChange]);
|
|
323
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
324
|
-
"goa-dropdown",
|
|
325
|
-
{
|
|
326
|
-
ref: el,
|
|
327
|
-
value: stringify(value),
|
|
328
|
-
disabled: disabled ? "true" : void 0,
|
|
329
|
-
error: error ? "true" : void 0,
|
|
330
|
-
filterable: filterable ? "true" : void 0,
|
|
331
|
-
multiselect: multiselect ? "true" : void 0,
|
|
332
|
-
native: native ? "true" : void 0,
|
|
333
|
-
relative: relative ? "true" : void 0,
|
|
334
|
-
..._props,
|
|
335
|
-
version,
|
|
336
|
-
children
|
|
337
|
-
}
|
|
338
|
-
);
|
|
339
|
-
}
|
|
340
|
-
function GoabxDropdownOption(props) {
|
|
341
|
-
react.useEffect(() => {
|
|
342
|
-
console.warn("GoabxDropdownOption is deprecated. Please use GoabxDropdownItem");
|
|
343
|
-
}, []);
|
|
344
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabxDropdownItem, { ...props });
|
|
345
|
-
}
|
|
346
|
-
function GoabxDropdownItem({
|
|
347
|
-
value,
|
|
348
|
-
label,
|
|
349
|
-
filter,
|
|
350
|
-
name,
|
|
351
|
-
mountType = "append"
|
|
352
|
-
}) {
|
|
353
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
354
|
-
"goa-dropdown-item",
|
|
355
|
-
{
|
|
356
|
-
value,
|
|
357
|
-
label,
|
|
358
|
-
filter,
|
|
359
|
-
name,
|
|
360
|
-
mount: mountType
|
|
361
|
-
}
|
|
362
|
-
);
|
|
363
|
-
}
|
|
364
|
-
function GoabxFileUploadCard({
|
|
365
|
-
onDelete,
|
|
366
|
-
onCancel,
|
|
367
|
-
filename,
|
|
368
|
-
version = "2",
|
|
369
|
-
...rest
|
|
370
|
-
}) {
|
|
371
|
-
const el = react.useRef(null);
|
|
372
|
-
const _props = parseISO.transformProps({ filename, ...rest }, parseISO.lowercase);
|
|
373
|
-
react.useEffect(() => {
|
|
374
|
-
if (!el.current) return;
|
|
375
|
-
const current = el.current;
|
|
376
|
-
const deleteHandler = (event) => onDelete == null ? void 0 : onDelete({ filename, event });
|
|
377
|
-
const cancelHandler = (event) => onCancel == null ? void 0 : onCancel({ filename, event });
|
|
378
|
-
current.addEventListener("_delete", deleteHandler);
|
|
379
|
-
current.addEventListener("_cancel", cancelHandler);
|
|
380
|
-
return () => {
|
|
381
|
-
current.removeEventListener("_delete", deleteHandler);
|
|
382
|
-
current.removeEventListener("_cancel", cancelHandler);
|
|
383
|
-
};
|
|
384
|
-
}, [el, onDelete, onCancel, filename]);
|
|
385
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-file-upload-card", { ref: el, ..._props, version });
|
|
386
|
-
}
|
|
387
|
-
function GoabxFileUploadInput({
|
|
388
|
-
onSelectFile,
|
|
389
|
-
version = "2",
|
|
390
|
-
...rest
|
|
391
|
-
}) {
|
|
392
|
-
const el = react.useRef(null);
|
|
393
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
394
|
-
react.useEffect(() => {
|
|
395
|
-
if (!el.current) return;
|
|
396
|
-
const current = el.current;
|
|
397
|
-
const handler = (e) => {
|
|
398
|
-
const detail = e.detail;
|
|
399
|
-
onSelectFile({ ...detail, event: e });
|
|
400
|
-
};
|
|
401
|
-
current.addEventListener("_selectFile", handler);
|
|
402
|
-
return () => {
|
|
403
|
-
current.removeEventListener("_selectFile", handler);
|
|
404
|
-
};
|
|
405
|
-
}, [el, onSelectFile]);
|
|
406
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-file-upload-input", { ref: el, ..._props, version });
|
|
407
|
-
}
|
|
408
|
-
const GoabxFilterChip = ({
|
|
409
|
-
iconTheme = "outline",
|
|
410
|
-
error,
|
|
411
|
-
onClick,
|
|
412
|
-
version = "2",
|
|
413
|
-
...rest
|
|
414
|
-
}) => {
|
|
415
|
-
const el = react.useRef(null);
|
|
416
|
-
const _props = parseISO.transformProps(
|
|
417
|
-
{ icontheme: iconTheme, ...rest },
|
|
418
|
-
parseISO.lowercase
|
|
419
|
-
);
|
|
420
|
-
react.useEffect(() => {
|
|
421
|
-
if (!el.current) return;
|
|
422
|
-
if (!onClick) return;
|
|
423
|
-
const current = el.current;
|
|
424
|
-
current.addEventListener("_click", onClick);
|
|
425
|
-
return () => {
|
|
426
|
-
current.removeEventListener("_click", onClick);
|
|
427
|
-
};
|
|
428
|
-
}, [el, onClick]);
|
|
429
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
430
|
-
"goa-filter-chip",
|
|
431
|
-
{
|
|
432
|
-
ref: el,
|
|
433
|
-
error: error ? "true" : void 0,
|
|
434
|
-
version,
|
|
435
|
-
..._props
|
|
436
|
-
}
|
|
437
|
-
);
|
|
438
|
-
};
|
|
439
|
-
function GoabxFormItem({
|
|
440
|
-
error,
|
|
441
|
-
helpText,
|
|
442
|
-
publicFormSummaryOrder,
|
|
443
|
-
children,
|
|
444
|
-
type = "",
|
|
445
|
-
version = "2",
|
|
446
|
-
...rest
|
|
447
|
-
}) {
|
|
448
|
-
const _props = parseISO.transformProps({ type, ...rest }, parseISO.lowercase);
|
|
449
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
450
|
-
"goa-form-item",
|
|
451
|
-
{
|
|
452
|
-
error: typeof error === "string" ? error : void 0,
|
|
453
|
-
helptext: typeof helpText === "string" ? helpText : void 0,
|
|
454
|
-
"public-form-summary-order": publicFormSummaryOrder,
|
|
455
|
-
..._props,
|
|
456
|
-
version,
|
|
457
|
-
children: [
|
|
458
|
-
error && typeof error !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "error", children: error }),
|
|
459
|
-
helpText && typeof helpText !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "helptext", children: helpText }),
|
|
460
|
-
children
|
|
461
|
-
]
|
|
462
|
-
}
|
|
463
|
-
);
|
|
464
|
-
}
|
|
465
|
-
function GoabxAppFooter({ children, ...rest }) {
|
|
466
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
467
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer", { ..._props, version: "2", children });
|
|
468
|
-
}
|
|
469
|
-
function GoabxAppFooterMetaSection({
|
|
470
|
-
children,
|
|
471
|
-
...rest
|
|
472
|
-
}) {
|
|
473
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
474
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer-meta-section", { slot: "meta", ..._props, children });
|
|
475
|
-
}
|
|
476
|
-
function GoabxAppFooterNavSection({
|
|
477
|
-
children,
|
|
478
|
-
...rest
|
|
479
|
-
}) {
|
|
480
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
481
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer-nav-section", { slot: "nav", ..._props, children });
|
|
482
|
-
}
|
|
483
|
-
function GoabxInput({
|
|
484
|
-
variant = "goa",
|
|
485
|
-
textAlign = "left",
|
|
486
|
-
size = "default",
|
|
487
|
-
focused,
|
|
488
|
-
disabled,
|
|
489
|
-
readonly,
|
|
490
|
-
error,
|
|
491
|
-
leadingContent,
|
|
492
|
-
trailingContent,
|
|
493
|
-
onTrailingIconClick,
|
|
494
|
-
onChange,
|
|
495
|
-
onFocus,
|
|
496
|
-
onBlur,
|
|
497
|
-
onKeyPress,
|
|
498
|
-
version = "2",
|
|
499
|
-
...rest
|
|
500
|
-
}) {
|
|
501
|
-
const ref = react.useRef(null);
|
|
502
|
-
const _props = parseISO.transformProps(
|
|
503
|
-
{ variant, textalign: textAlign, size, ...rest },
|
|
504
|
-
parseISO.lowercase
|
|
505
|
-
);
|
|
506
|
-
react.useEffect(() => {
|
|
507
|
-
if (!ref.current) {
|
|
508
|
-
return;
|
|
509
|
-
}
|
|
510
|
-
const current = ref.current;
|
|
511
|
-
const changeListener = (e) => {
|
|
512
|
-
const detail = e.detail;
|
|
513
|
-
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
514
|
-
};
|
|
515
|
-
const clickListener = () => {
|
|
516
|
-
onTrailingIconClick == null ? void 0 : onTrailingIconClick();
|
|
517
|
-
};
|
|
518
|
-
const focusListener = (e) => {
|
|
519
|
-
const detail = e.detail;
|
|
520
|
-
onFocus == null ? void 0 : onFocus({ ...detail, event: e });
|
|
521
|
-
};
|
|
522
|
-
const blurListener = (e) => {
|
|
523
|
-
const detail = e.detail;
|
|
524
|
-
onBlur == null ? void 0 : onBlur({ ...detail, event: e });
|
|
525
|
-
};
|
|
526
|
-
const keypressListener = (e) => {
|
|
527
|
-
const detail = e.detail;
|
|
528
|
-
onKeyPress == null ? void 0 : onKeyPress({ ...detail, event: e });
|
|
529
|
-
};
|
|
530
|
-
current.addEventListener("_change", changeListener);
|
|
531
|
-
current.addEventListener("_trailingIconClick", clickListener);
|
|
532
|
-
current.addEventListener("_focus", focusListener);
|
|
533
|
-
current.addEventListener("_blur", blurListener);
|
|
534
|
-
current.addEventListener("_keyPress", keypressListener);
|
|
535
|
-
return () => {
|
|
536
|
-
current.removeEventListener("_change", changeListener);
|
|
537
|
-
current.removeEventListener("_trailingIconClick", clickListener);
|
|
538
|
-
current.removeEventListener("_focus", focusListener);
|
|
539
|
-
current.removeEventListener("_blur", blurListener);
|
|
540
|
-
current.removeEventListener("_keyPress", keypressListener);
|
|
541
|
-
};
|
|
542
|
-
}, [ref, onChange, onTrailingIconClick, onFocus, onBlur, onKeyPress]);
|
|
543
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
544
|
-
"goa-input",
|
|
545
|
-
{
|
|
546
|
-
ref,
|
|
547
|
-
..._props,
|
|
548
|
-
focused: focused ? "true" : void 0,
|
|
549
|
-
disabled: disabled ? "true" : void 0,
|
|
550
|
-
readonly: readonly ? "true" : void 0,
|
|
551
|
-
error: error ? "true" : void 0,
|
|
552
|
-
handletrailingiconclick: onTrailingIconClick ? "true" : "false",
|
|
553
|
-
version,
|
|
554
|
-
children: [
|
|
555
|
-
leadingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "leadingContent", children: leadingContent }),
|
|
556
|
-
trailingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "trailingContent", children: trailingContent })
|
|
557
|
-
]
|
|
558
|
-
}
|
|
559
|
-
);
|
|
560
|
-
}
|
|
561
|
-
const onDateChangeHandler = (onChange) => {
|
|
562
|
-
return ({ name, value, event }) => {
|
|
563
|
-
if (!value) {
|
|
564
|
-
onChange == null ? void 0 : onChange({ name, value: "", event });
|
|
565
|
-
return;
|
|
566
|
-
}
|
|
567
|
-
if (typeof value === "string" && parseISO.isValid(new Date(value))) {
|
|
568
|
-
onChange == null ? void 0 : onChange({ name, value: parseISO.parseISO(value), event });
|
|
569
|
-
return;
|
|
570
|
-
}
|
|
571
|
-
if (parseISO.isValid(value)) {
|
|
572
|
-
onChange == null ? void 0 : onChange({ name, value, event });
|
|
573
|
-
return;
|
|
574
|
-
}
|
|
575
|
-
};
|
|
576
|
-
};
|
|
577
|
-
const onTimeChangeHandler = (onChange) => {
|
|
578
|
-
return ({ name, value, event }) => {
|
|
579
|
-
if (!value) {
|
|
580
|
-
onChange == null ? void 0 : onChange({ name, value: "", event });
|
|
581
|
-
return;
|
|
582
|
-
}
|
|
583
|
-
onChange == null ? void 0 : onChange({ name, value, event });
|
|
584
|
-
};
|
|
585
|
-
};
|
|
586
|
-
function toString(value, tmpl = "yyyy-MM-dd") {
|
|
587
|
-
if (!value) {
|
|
588
|
-
return "";
|
|
589
|
-
}
|
|
590
|
-
if (typeof value === "string") {
|
|
591
|
-
return parseISO.format(parseISO.parseISO(value), tmpl);
|
|
592
|
-
}
|
|
593
|
-
if (value.toISOString() === (/* @__PURE__ */ new Date(0)).toISOString()) {
|
|
594
|
-
return "";
|
|
595
|
-
}
|
|
596
|
-
return parseISO.format(value, tmpl);
|
|
597
|
-
}
|
|
598
|
-
function GoabxInputText(props) {
|
|
599
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabxInput, { ...props, type: "text" });
|
|
600
|
-
}
|
|
601
|
-
function GoabxInputPassword(props) {
|
|
602
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabxInput, { ...props, type: "password" });
|
|
603
|
-
}
|
|
604
|
-
function GoabxInputDate({
|
|
605
|
-
value,
|
|
606
|
-
min = "",
|
|
607
|
-
max = "",
|
|
608
|
-
...props
|
|
609
|
-
}) {
|
|
610
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
611
|
-
GoabxInput,
|
|
612
|
-
{
|
|
613
|
-
...props,
|
|
614
|
-
type: "date",
|
|
615
|
-
onChange: onDateChangeHandler(props.onChange),
|
|
616
|
-
min: toString(min),
|
|
617
|
-
max: toString(max),
|
|
618
|
-
value: toString(value)
|
|
619
|
-
}
|
|
620
|
-
);
|
|
621
|
-
}
|
|
622
|
-
function GoabxInputTime({
|
|
623
|
-
value,
|
|
624
|
-
min = "",
|
|
625
|
-
max = "",
|
|
626
|
-
...props
|
|
627
|
-
}) {
|
|
628
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
629
|
-
GoabxInput,
|
|
630
|
-
{
|
|
631
|
-
...props,
|
|
632
|
-
onChange: onTimeChangeHandler(props.onChange),
|
|
633
|
-
value,
|
|
634
|
-
type: "time"
|
|
635
|
-
}
|
|
636
|
-
);
|
|
637
|
-
}
|
|
638
|
-
function GoabxInputDateTime({
|
|
639
|
-
value,
|
|
640
|
-
min = "",
|
|
641
|
-
max = "",
|
|
642
|
-
...props
|
|
643
|
-
}) {
|
|
644
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
645
|
-
GoabxInput,
|
|
646
|
-
{
|
|
647
|
-
...props,
|
|
648
|
-
onChange: onDateChangeHandler(props.onChange),
|
|
649
|
-
value: toString(value, "yyyy-MM-dd'T'HH:mm"),
|
|
650
|
-
type: "datetime-local"
|
|
651
|
-
}
|
|
652
|
-
);
|
|
653
|
-
}
|
|
654
|
-
function GoabxInputEmail(props) {
|
|
655
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabxInput, { ...props, type: "email" });
|
|
656
|
-
}
|
|
657
|
-
function GoabxInputSearch(props) {
|
|
658
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabxInput, { ...props, type: "search", trailingIcon: "search" });
|
|
659
|
-
}
|
|
660
|
-
function GoabxInputUrl(props) {
|
|
661
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabxInput, { ...props, type: "url" });
|
|
662
|
-
}
|
|
663
|
-
function GoabxInputTel(props) {
|
|
664
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabxInput, { ...props, type: "tel" });
|
|
665
|
-
}
|
|
666
|
-
function GoabxInputFile(props) {
|
|
667
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
668
|
-
"input",
|
|
669
|
-
{
|
|
670
|
-
id: props.id,
|
|
671
|
-
name: props.name,
|
|
672
|
-
type: "file",
|
|
673
|
-
onChange: (e) => {
|
|
674
|
-
var _a;
|
|
675
|
-
return (_a = props.onChange) == null ? void 0 : _a.call(props, {
|
|
676
|
-
name: e.target.name,
|
|
677
|
-
value: e.target.value,
|
|
678
|
-
event: e.nativeEvent
|
|
679
|
-
});
|
|
680
|
-
},
|
|
681
|
-
style: { backgroundColor: "revert" }
|
|
682
|
-
}
|
|
683
|
-
);
|
|
684
|
-
}
|
|
685
|
-
function GoabxInputMonth(props) {
|
|
686
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabxInput, { ...props, type: "month" });
|
|
687
|
-
}
|
|
688
|
-
function GoabxInputNumber({
|
|
689
|
-
min = Number.MIN_VALUE,
|
|
690
|
-
max = Number.MAX_VALUE,
|
|
691
|
-
value,
|
|
692
|
-
textAlign = "right",
|
|
693
|
-
...props
|
|
694
|
-
}) {
|
|
695
|
-
const onNumberChange = ({ name, value: value2, event }) => {
|
|
696
|
-
var _a;
|
|
697
|
-
(_a = props.onChange) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2), event });
|
|
698
|
-
};
|
|
699
|
-
const onFocus = ({ name, value: value2, event }) => {
|
|
700
|
-
var _a;
|
|
701
|
-
(_a = props.onFocus) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2), event });
|
|
702
|
-
};
|
|
703
|
-
const onBlur = ({ name, value: value2, event }) => {
|
|
704
|
-
var _a;
|
|
705
|
-
(_a = props.onBlur) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2), event });
|
|
706
|
-
};
|
|
707
|
-
const onKeyPress = ({ name, value: value2, key, event }) => {
|
|
708
|
-
var _a;
|
|
709
|
-
(_a = props.onKeyPress) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2), key: parseInt(key), event });
|
|
710
|
-
};
|
|
711
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
712
|
-
GoabxInput,
|
|
713
|
-
{
|
|
714
|
-
...props,
|
|
715
|
-
onChange: onNumberChange,
|
|
716
|
-
min: min == null ? void 0 : min.toString(),
|
|
717
|
-
max: max == null ? void 0 : max.toString(),
|
|
718
|
-
value: value == null ? void 0 : value.toString(),
|
|
719
|
-
onFocus,
|
|
720
|
-
onBlur,
|
|
721
|
-
type: "number",
|
|
722
|
-
onKeyPress,
|
|
723
|
-
textAlign
|
|
724
|
-
}
|
|
725
|
-
);
|
|
726
|
-
}
|
|
727
|
-
function GoabxInputRange(props) {
|
|
728
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoabxInput, { ...props, type: "range" });
|
|
729
|
-
}
|
|
730
|
-
function GoabxLink({
|
|
731
|
-
actionArgs,
|
|
732
|
-
actionArg,
|
|
733
|
-
color = "interactive",
|
|
734
|
-
size = "medium",
|
|
735
|
-
children,
|
|
736
|
-
...rest
|
|
737
|
-
}) {
|
|
738
|
-
const _props = parseISO.transformProps({ color, size, ...rest }, parseISO.lowercase);
|
|
739
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
740
|
-
"goa-link",
|
|
741
|
-
{
|
|
742
|
-
"action-arg": actionArg,
|
|
743
|
-
"action-args": JSON.stringify(actionArgs),
|
|
744
|
-
..._props,
|
|
745
|
-
children
|
|
746
|
-
}
|
|
747
|
-
);
|
|
748
|
-
}
|
|
749
|
-
function GoabxModal({
|
|
750
|
-
heading,
|
|
751
|
-
children,
|
|
752
|
-
maxWidth,
|
|
753
|
-
open,
|
|
754
|
-
actions,
|
|
755
|
-
transition,
|
|
756
|
-
calloutVariant,
|
|
757
|
-
onClose,
|
|
758
|
-
testId,
|
|
759
|
-
version = "2"
|
|
760
|
-
}) {
|
|
761
|
-
const el = react.useRef(null);
|
|
762
|
-
react.useEffect(() => {
|
|
763
|
-
if (!el.current) {
|
|
764
|
-
return;
|
|
765
|
-
}
|
|
766
|
-
const current = el.current;
|
|
767
|
-
const listener = () => {
|
|
768
|
-
onClose == null ? void 0 : onClose();
|
|
769
|
-
};
|
|
770
|
-
current.addEventListener("_close", listener);
|
|
771
|
-
return () => {
|
|
772
|
-
current.removeEventListener("_close", listener);
|
|
773
|
-
};
|
|
774
|
-
}, [el, onClose]);
|
|
775
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
776
|
-
"goa-modal",
|
|
777
|
-
{
|
|
778
|
-
ref: el,
|
|
779
|
-
open: open ? "true" : void 0,
|
|
780
|
-
closable: onClose ? "true" : "false",
|
|
781
|
-
heading: typeof heading === "string" ? heading : void 0,
|
|
782
|
-
maxwidth: maxWidth,
|
|
783
|
-
transition,
|
|
784
|
-
calloutvariant: calloutVariant,
|
|
785
|
-
testid: testId,
|
|
786
|
-
version,
|
|
787
|
-
children: [
|
|
788
|
-
heading && typeof heading !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "heading", children: heading }),
|
|
789
|
-
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "actions", children: actions }),
|
|
790
|
-
children
|
|
791
|
-
]
|
|
792
|
-
}
|
|
793
|
-
);
|
|
794
|
-
}
|
|
795
|
-
const GoabxNotification = ({
|
|
796
|
-
type = "information",
|
|
797
|
-
emphasis = "high",
|
|
798
|
-
compact,
|
|
799
|
-
ariaLive,
|
|
800
|
-
maxContentWidth,
|
|
801
|
-
children,
|
|
802
|
-
testId,
|
|
803
|
-
onDismiss,
|
|
804
|
-
version = "2"
|
|
805
|
-
}) => {
|
|
806
|
-
const el = react.useRef(null);
|
|
807
|
-
react.useEffect(() => {
|
|
808
|
-
if (!el.current) {
|
|
809
|
-
return;
|
|
810
|
-
}
|
|
811
|
-
const current = el.current;
|
|
812
|
-
const listener = () => {
|
|
813
|
-
onDismiss == null ? void 0 : onDismiss();
|
|
814
|
-
};
|
|
815
|
-
current.addEventListener("_dismiss", listener);
|
|
816
|
-
return () => {
|
|
817
|
-
current.removeEventListener("_dismiss", listener);
|
|
818
|
-
};
|
|
819
|
-
}, [el, onDismiss]);
|
|
820
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
821
|
-
"goa-notification",
|
|
822
|
-
{
|
|
823
|
-
ref: el,
|
|
824
|
-
type,
|
|
825
|
-
testid: testId,
|
|
826
|
-
maxcontentwidth: maxContentWidth,
|
|
827
|
-
arialive: ariaLive,
|
|
828
|
-
emphasis,
|
|
829
|
-
compact: compact ? "true" : void 0,
|
|
830
|
-
version,
|
|
831
|
-
children
|
|
832
|
-
}
|
|
833
|
-
);
|
|
834
|
-
};
|
|
835
|
-
function GoabxPagination({
|
|
836
|
-
onChange,
|
|
837
|
-
version = "2",
|
|
838
|
-
...props
|
|
839
|
-
}) {
|
|
840
|
-
const ref = react.useRef(null);
|
|
841
|
-
react.useEffect(() => {
|
|
842
|
-
if (!ref.current) {
|
|
843
|
-
return;
|
|
844
|
-
}
|
|
845
|
-
const current = ref.current;
|
|
846
|
-
const changeListener = (e) => {
|
|
847
|
-
const detail = e.detail;
|
|
848
|
-
onChange(detail);
|
|
849
|
-
};
|
|
850
|
-
current.addEventListener("_change", changeListener);
|
|
851
|
-
return () => {
|
|
852
|
-
current.removeEventListener("_change", changeListener);
|
|
853
|
-
};
|
|
854
|
-
}, [ref, onChange]);
|
|
855
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
856
|
-
"goa-pagination",
|
|
857
|
-
{
|
|
858
|
-
ref,
|
|
859
|
-
itemcount: props.itemCount,
|
|
860
|
-
perpagecount: props.perPageCount,
|
|
861
|
-
pagenumber: props.pageNumber,
|
|
862
|
-
variant: props.variant,
|
|
863
|
-
mt: props.mt,
|
|
864
|
-
mb: props.mb,
|
|
865
|
-
ml: props.ml,
|
|
866
|
-
mr: props.mr,
|
|
867
|
-
testid: props.testId,
|
|
868
|
-
version
|
|
869
|
-
}
|
|
870
|
-
);
|
|
871
|
-
}
|
|
872
|
-
function GoabxRadioItem({
|
|
873
|
-
name,
|
|
874
|
-
label,
|
|
875
|
-
value,
|
|
876
|
-
description,
|
|
877
|
-
reveal,
|
|
878
|
-
revealAriaLabel,
|
|
879
|
-
maxWidth,
|
|
880
|
-
disabled,
|
|
881
|
-
checked,
|
|
882
|
-
error,
|
|
883
|
-
compact,
|
|
884
|
-
ariaLabel,
|
|
885
|
-
children,
|
|
886
|
-
version = "2",
|
|
887
|
-
mt,
|
|
888
|
-
mr,
|
|
889
|
-
mb,
|
|
890
|
-
ml
|
|
891
|
-
}) {
|
|
892
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
893
|
-
"goa-radio-item",
|
|
894
|
-
{
|
|
895
|
-
name,
|
|
896
|
-
label,
|
|
897
|
-
value,
|
|
898
|
-
description: typeof description === "string" ? description : void 0,
|
|
899
|
-
maxwidth: maxWidth,
|
|
900
|
-
error: error ? "true" : void 0,
|
|
901
|
-
disabled: disabled ? "true" : void 0,
|
|
902
|
-
checked: checked ? "true" : void 0,
|
|
903
|
-
compact: compact ? "true" : void 0,
|
|
904
|
-
arialabel: ariaLabel,
|
|
905
|
-
revealarialabel: revealAriaLabel,
|
|
906
|
-
mt,
|
|
907
|
-
mr,
|
|
908
|
-
mb,
|
|
909
|
-
ml,
|
|
910
|
-
version,
|
|
911
|
-
children: [
|
|
912
|
-
description && typeof description !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "description", children: description }),
|
|
913
|
-
reveal && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "reveal", children: reveal }),
|
|
914
|
-
children
|
|
915
|
-
]
|
|
916
|
-
}
|
|
917
|
-
);
|
|
918
|
-
}
|
|
919
|
-
function GoabxRadioGroup({
|
|
920
|
-
disabled,
|
|
921
|
-
error,
|
|
922
|
-
onChange,
|
|
923
|
-
name,
|
|
924
|
-
children,
|
|
925
|
-
size = "default",
|
|
926
|
-
version = "2",
|
|
927
|
-
...rest
|
|
928
|
-
}) {
|
|
929
|
-
const el = react.useRef(null);
|
|
930
|
-
const _props = parseISO.transformProps({ size, ...rest }, parseISO.lowercase);
|
|
931
|
-
react.useEffect(() => {
|
|
932
|
-
if (!el.current) return;
|
|
933
|
-
const listener = (e) => {
|
|
934
|
-
const detail = e.detail;
|
|
935
|
-
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
936
|
-
};
|
|
937
|
-
const currentEl = el.current;
|
|
938
|
-
if (onChange) {
|
|
939
|
-
currentEl.addEventListener("_change", listener);
|
|
940
|
-
}
|
|
941
|
-
return () => {
|
|
942
|
-
if (onChange) {
|
|
943
|
-
currentEl.removeEventListener("_change", listener);
|
|
944
|
-
}
|
|
945
|
-
};
|
|
946
|
-
}, [name, onChange]);
|
|
947
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
948
|
-
"goa-radio-group",
|
|
949
|
-
{
|
|
950
|
-
ref: el,
|
|
951
|
-
..._props,
|
|
952
|
-
name,
|
|
953
|
-
disabled: disabled ? "true" : void 0,
|
|
954
|
-
error: error ? "true" : void 0,
|
|
955
|
-
version,
|
|
956
|
-
children
|
|
957
|
-
}
|
|
958
|
-
);
|
|
959
|
-
}
|
|
960
|
-
function GoabxSideMenu({
|
|
961
|
-
testId,
|
|
962
|
-
children,
|
|
963
|
-
version = "2"
|
|
964
|
-
}) {
|
|
965
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-side-menu", { testid: testId, version, children });
|
|
966
|
-
}
|
|
967
|
-
function GoabxSideMenuGroup({
|
|
968
|
-
heading,
|
|
969
|
-
icon,
|
|
970
|
-
testId,
|
|
971
|
-
children,
|
|
972
|
-
mt,
|
|
973
|
-
mr,
|
|
974
|
-
mb,
|
|
975
|
-
ml,
|
|
976
|
-
version = "2"
|
|
977
|
-
}) {
|
|
978
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
979
|
-
"goa-side-menu-group",
|
|
980
|
-
{
|
|
981
|
-
heading,
|
|
982
|
-
icon,
|
|
983
|
-
testid: testId,
|
|
984
|
-
mt,
|
|
985
|
-
mr,
|
|
986
|
-
mb,
|
|
987
|
-
ml,
|
|
988
|
-
version,
|
|
989
|
-
children
|
|
990
|
-
}
|
|
991
|
-
);
|
|
992
|
-
}
|
|
993
|
-
function GoabxSideMenuHeading({
|
|
994
|
-
meta,
|
|
995
|
-
testId,
|
|
996
|
-
icon,
|
|
997
|
-
children,
|
|
998
|
-
version = "2"
|
|
999
|
-
}) {
|
|
1000
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("goa-side-menu-heading", { icon, testid: testId, version, children: [
|
|
1001
|
-
children,
|
|
1002
|
-
meta && /* @__PURE__ */ jsxRuntime.jsx("span", { slot: "meta", children: meta })
|
|
1003
|
-
] });
|
|
1004
|
-
}
|
|
1005
|
-
function GoabxTable({ onSort, version = "2", ...props }) {
|
|
1006
|
-
const ref = react.useRef(null);
|
|
1007
|
-
react.useEffect(() => {
|
|
1008
|
-
if (!ref.current) {
|
|
1009
|
-
return;
|
|
1010
|
-
}
|
|
1011
|
-
const current = ref.current;
|
|
1012
|
-
const sortListener = (e) => {
|
|
1013
|
-
const detail = e.detail;
|
|
1014
|
-
onSort == null ? void 0 : onSort(detail);
|
|
1015
|
-
};
|
|
1016
|
-
current.addEventListener("_sort", sortListener);
|
|
1017
|
-
return () => {
|
|
1018
|
-
current.removeEventListener("_sort", sortListener);
|
|
1019
|
-
};
|
|
1020
|
-
}, [ref, onSort]);
|
|
1021
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1022
|
-
"goa-table",
|
|
1023
|
-
{
|
|
1024
|
-
ref,
|
|
1025
|
-
width: props.width,
|
|
1026
|
-
variant: props.variant,
|
|
1027
|
-
striped: props.striped ? "true" : void 0,
|
|
1028
|
-
testid: props.testId,
|
|
1029
|
-
mt: props.mt,
|
|
1030
|
-
mb: props.mb,
|
|
1031
|
-
ml: props.ml,
|
|
1032
|
-
mr: props.mr,
|
|
1033
|
-
version,
|
|
1034
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%" }, children: props.children })
|
|
1035
|
-
}
|
|
1036
|
-
);
|
|
1037
|
-
}
|
|
1038
|
-
function GoabxTableSortHeader({
|
|
1039
|
-
children,
|
|
1040
|
-
...rest
|
|
1041
|
-
}) {
|
|
1042
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
1043
|
-
return /* @__PURE__ */ jsxRuntime.jsx("goa-table-sort-header", { ..._props, children });
|
|
1044
|
-
}
|
|
1045
|
-
function GoabxTabs({
|
|
1046
|
-
initialTab,
|
|
1047
|
-
children,
|
|
1048
|
-
testId,
|
|
1049
|
-
onChange,
|
|
1050
|
-
variant,
|
|
1051
|
-
version = "2"
|
|
1052
|
-
}) {
|
|
1053
|
-
const ref = react.useRef(null);
|
|
1054
|
-
react.useEffect(() => {
|
|
1055
|
-
const element = ref.current;
|
|
1056
|
-
if (element && onChange) {
|
|
1057
|
-
const handler = (event) => {
|
|
1058
|
-
const detail = event.detail;
|
|
1059
|
-
onChange(detail);
|
|
1060
|
-
};
|
|
1061
|
-
element.addEventListener("_change", handler);
|
|
1062
|
-
return () => {
|
|
1063
|
-
element.removeEventListener("_change", handler);
|
|
1064
|
-
};
|
|
1065
|
-
}
|
|
1066
|
-
}, [onChange]);
|
|
1067
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1068
|
-
"goa-tabs",
|
|
1069
|
-
{
|
|
1070
|
-
ref,
|
|
1071
|
-
initialtab: initialTab,
|
|
1072
|
-
testid: testId,
|
|
1073
|
-
variant,
|
|
1074
|
-
version,
|
|
1075
|
-
children
|
|
1076
|
-
}
|
|
1077
|
-
);
|
|
1078
|
-
}
|
|
1079
|
-
function GoabxTextArea({
|
|
1080
|
-
readOnly,
|
|
1081
|
-
disabled,
|
|
1082
|
-
error,
|
|
1083
|
-
onChange,
|
|
1084
|
-
onKeyPress,
|
|
1085
|
-
onBlur,
|
|
1086
|
-
version = "2",
|
|
1087
|
-
...rest
|
|
1088
|
-
}) {
|
|
1089
|
-
const el = react.useRef(null);
|
|
1090
|
-
const _props = parseISO.transformProps(rest, parseISO.lowercase);
|
|
1091
|
-
react.useEffect(() => {
|
|
1092
|
-
if (!el.current) {
|
|
1093
|
-
return;
|
|
1094
|
-
}
|
|
1095
|
-
const current = el.current;
|
|
1096
|
-
const changeListener = (e) => {
|
|
1097
|
-
const detail = e.detail;
|
|
1098
|
-
onChange == null ? void 0 : onChange({ ...detail, event: e });
|
|
1099
|
-
};
|
|
1100
|
-
const keypressListener = (e) => {
|
|
1101
|
-
const detail = e.detail;
|
|
1102
|
-
onKeyPress == null ? void 0 : onKeyPress({ ...detail, event: e });
|
|
1103
|
-
};
|
|
1104
|
-
const blurListener = (e) => {
|
|
1105
|
-
const detail = e.detail;
|
|
1106
|
-
onBlur == null ? void 0 : onBlur({ ...detail, event: e });
|
|
1107
|
-
};
|
|
1108
|
-
current.addEventListener("_change", changeListener);
|
|
1109
|
-
current.addEventListener("_keyPress", keypressListener);
|
|
1110
|
-
current.addEventListener("_blur", blurListener);
|
|
1111
|
-
return () => {
|
|
1112
|
-
current.removeEventListener("_change", changeListener);
|
|
1113
|
-
current.removeEventListener("_keyPress", keypressListener);
|
|
1114
|
-
current.removeEventListener("_blur", blurListener);
|
|
1115
|
-
};
|
|
1116
|
-
}, [el, onChange, onKeyPress, onBlur]);
|
|
1117
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1118
|
-
"goa-textarea",
|
|
1119
|
-
{
|
|
1120
|
-
ref: el,
|
|
1121
|
-
readOnly: readOnly ? "true" : void 0,
|
|
1122
|
-
disabled: disabled ? "true" : void 0,
|
|
1123
|
-
error: error ? "true" : void 0,
|
|
1124
|
-
version,
|
|
1125
|
-
..._props
|
|
1126
|
-
}
|
|
1127
|
-
);
|
|
1128
|
-
}
|
|
1129
|
-
function GoabxWorkSideMenu({
|
|
1130
|
-
heading,
|
|
1131
|
-
url,
|
|
1132
|
-
userName,
|
|
1133
|
-
userSecondaryText,
|
|
1134
|
-
testId,
|
|
1135
|
-
primaryContent,
|
|
1136
|
-
secondaryContent,
|
|
1137
|
-
accountContent,
|
|
1138
|
-
open,
|
|
1139
|
-
onToggle
|
|
1140
|
-
}) {
|
|
1141
|
-
const el = react.useRef(null);
|
|
1142
|
-
react.useEffect(() => {
|
|
1143
|
-
var _a;
|
|
1144
|
-
if (!(el == null ? void 0 : el.current) || !onToggle) {
|
|
1145
|
-
return;
|
|
1146
|
-
}
|
|
1147
|
-
(_a = el.current) == null ? void 0 : _a.addEventListener("_toggle", onToggle);
|
|
1148
|
-
return () => {
|
|
1149
|
-
var _a2;
|
|
1150
|
-
(_a2 = el.current) == null ? void 0 : _a2.removeEventListener("_toggle", onToggle);
|
|
1151
|
-
};
|
|
1152
|
-
}, [el, onToggle]);
|
|
1153
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1154
|
-
"goa-work-side-menu",
|
|
1155
|
-
{
|
|
1156
|
-
ref: el,
|
|
1157
|
-
heading,
|
|
1158
|
-
url,
|
|
1159
|
-
"user-name": userName,
|
|
1160
|
-
"user-secondary-text": userSecondaryText,
|
|
1161
|
-
open: open ? true : false,
|
|
1162
|
-
testid: testId,
|
|
1163
|
-
children: [
|
|
1164
|
-
primaryContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "primary", children: primaryContent }),
|
|
1165
|
-
secondaryContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "secondary", children: secondaryContent }),
|
|
1166
|
-
accountContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "account", children: accountContent })
|
|
1167
|
-
]
|
|
1168
|
-
}
|
|
1169
|
-
);
|
|
1170
|
-
}
|
|
1171
|
-
function GoabxWorkSideMenuItem(props) {
|
|
1172
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1173
|
-
"goa-work-side-menu-item",
|
|
1174
|
-
{
|
|
1175
|
-
label: props.label,
|
|
1176
|
-
url: props.url,
|
|
1177
|
-
badge: props.badge,
|
|
1178
|
-
current: props.current ? "true" : void 0,
|
|
1179
|
-
divider: props.divider ? "true" : void 0,
|
|
1180
|
-
icon: props.icon,
|
|
1181
|
-
testid: props.testId,
|
|
1182
|
-
type: props.type,
|
|
1183
|
-
children: props.children
|
|
1184
|
-
}
|
|
1185
|
-
);
|
|
1186
|
-
}
|
|
1187
|
-
function GoabxWorkSideMenuGroup(props) {
|
|
1188
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1189
|
-
"goa-work-side-menu-group",
|
|
1190
|
-
{
|
|
1191
|
-
heading: props.heading,
|
|
1192
|
-
icon: props.icon,
|
|
1193
|
-
testid: props.testId,
|
|
1194
|
-
children: props.children
|
|
1195
|
-
}
|
|
1196
|
-
);
|
|
1197
|
-
}
|
|
1198
|
-
exports.GoabxAppFooter = GoabxAppFooter;
|
|
1199
|
-
exports.GoabxAppFooterMetaSection = GoabxAppFooterMetaSection;
|
|
1200
|
-
exports.GoabxAppFooterNavSection = GoabxAppFooterNavSection;
|
|
1201
|
-
exports.GoabxBadge = GoabxBadge;
|
|
1202
|
-
exports.GoabxButton = GoabxButton;
|
|
1203
|
-
exports.GoabxCalendar = GoabxCalendar;
|
|
1204
|
-
exports.GoabxCallout = GoabxCallout;
|
|
1205
|
-
exports.GoabxCheckbox = GoabxCheckbox;
|
|
1206
|
-
exports.GoabxDatePicker = GoabxDatePicker;
|
|
1207
|
-
exports.GoabxDrawer = GoabxDrawer;
|
|
1208
|
-
exports.GoabxDropdown = GoabxDropdown;
|
|
1209
|
-
exports.GoabxDropdownItem = GoabxDropdownItem;
|
|
1210
|
-
exports.GoabxDropdownOption = GoabxDropdownOption;
|
|
1211
|
-
exports.GoabxFileUploadCard = GoabxFileUploadCard;
|
|
1212
|
-
exports.GoabxFileUploadInput = GoabxFileUploadInput;
|
|
1213
|
-
exports.GoabxFilterChip = GoabxFilterChip;
|
|
1214
|
-
exports.GoabxFormItem = GoabxFormItem;
|
|
1215
|
-
exports.GoabxInput = GoabxInput;
|
|
1216
|
-
exports.GoabxInputDate = GoabxInputDate;
|
|
1217
|
-
exports.GoabxInputDateTime = GoabxInputDateTime;
|
|
1218
|
-
exports.GoabxInputEmail = GoabxInputEmail;
|
|
1219
|
-
exports.GoabxInputFile = GoabxInputFile;
|
|
1220
|
-
exports.GoabxInputMonth = GoabxInputMonth;
|
|
1221
|
-
exports.GoabxInputNumber = GoabxInputNumber;
|
|
1222
|
-
exports.GoabxInputPassword = GoabxInputPassword;
|
|
1223
|
-
exports.GoabxInputRange = GoabxInputRange;
|
|
1224
|
-
exports.GoabxInputSearch = GoabxInputSearch;
|
|
1225
|
-
exports.GoabxInputTel = GoabxInputTel;
|
|
1226
|
-
exports.GoabxInputText = GoabxInputText;
|
|
1227
|
-
exports.GoabxInputTime = GoabxInputTime;
|
|
1228
|
-
exports.GoabxInputUrl = GoabxInputUrl;
|
|
1229
|
-
exports.GoabxLink = GoabxLink;
|
|
1230
|
-
exports.GoabxModal = GoabxModal;
|
|
1231
|
-
exports.GoabxNotification = GoabxNotification;
|
|
1232
|
-
exports.GoabxPagination = GoabxPagination;
|
|
1233
|
-
exports.GoabxRadioGroup = GoabxRadioGroup;
|
|
1234
|
-
exports.GoabxRadioItem = GoabxRadioItem;
|
|
1235
|
-
exports.GoabxSideMenu = GoabxSideMenu;
|
|
1236
|
-
exports.GoabxSideMenuGroup = GoabxSideMenuGroup;
|
|
1237
|
-
exports.GoabxSideMenuHeading = GoabxSideMenuHeading;
|
|
1238
|
-
exports.GoabxTable = GoabxTable;
|
|
1239
|
-
exports.GoabxTableSortHeader = GoabxTableSortHeader;
|
|
1240
|
-
exports.GoabxTabs = GoabxTabs;
|
|
1241
|
-
exports.GoabxTextArea = GoabxTextArea;
|
|
1242
|
-
exports.GoabxWorkSideMenu = GoabxWorkSideMenu;
|
|
1243
|
-
exports.GoabxWorkSideMenuGroup = GoabxWorkSideMenuGroup;
|
|
1244
|
-
exports.GoabxWorkSideMenuItem = GoabxWorkSideMenuItem;
|
|
1245
|
-
//# sourceMappingURL=experimental.js.map
|