@abgov/react-components 6.10.0 → 6.11.0-dev.10

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