@abgov/react-components 4.0.0-alpha.107 → 4.0.0-alpha.109

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.
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useRef, useEffect } from 'react';
3
3
  import { parseISO, format } from 'date-fns';
4
4
 
@@ -1024,6 +1024,476 @@ if (typeof HTMLElement === 'function') {
1024
1024
 
1025
1025
  };
1026
1026
  }
1027
+
1028
+ function calculateMargin(mt, mr, mb, ml) {
1029
+ return [mt && `margin-top:var(--goa-space-${mt});`, mr && `margin-right:var(--goa-space-${mr});`, mb && `margin-bottom:var(--goa-space-${mb});`, ml && `margin-left:var(--goa-space-${ml});`].join(" ");
1030
+ }
1031
+
1032
+ function injectCss(el, rootSelector, css, media) {
1033
+ const style = document.createElement("style");
1034
+
1035
+ const _css = Object.entries(css).map(entry => `${entry[0]}: ${entry[1]};`).join(" ");
1036
+
1037
+ if (media) {
1038
+ style.innerHTML = `@media (${media}) { ${rootSelector} {${_css}} }`;
1039
+ } else {
1040
+ style.innerHTML = `${rootSelector} {${_css}}`;
1041
+ }
1042
+
1043
+ el.appendChild(style);
1044
+ }
1045
+
1046
+ function toBoolean(value) {
1047
+ if (value === "false") {
1048
+ return false;
1049
+ }
1050
+
1051
+ if (value === "") {
1052
+ return true;
1053
+ }
1054
+
1055
+ return !!value;
1056
+ }
1057
+
1058
+ function fromBoolean(value) {
1059
+ return value ? "true" : "false";
1060
+ }
1061
+
1062
+ function validateRequired(componentName, props) {
1063
+ Object.entries(props).forEach(prop => {
1064
+ if (!prop[1]) {
1065
+ console.warn(`${componentName}: ${prop[0]} is required`);
1066
+ }
1067
+ });
1068
+ }
1069
+
1070
+ function typeValidator(message, values, required = false) {
1071
+ const validator = value => {
1072
+ if (!required && !value) {
1073
+ return;
1074
+ }
1075
+
1076
+ if (!values.includes(value)) {
1077
+ console.error(`[${value}] is an invalid ${message.toLowerCase()}`);
1078
+ }
1079
+ };
1080
+
1081
+ return [values, validator];
1082
+ }
1083
+ /* libs/web-components/src/components/accordion/Accordion.svelte generated by Svelte v3.51.0 */
1084
+
1085
+
1086
+ function create_fragment$H(ctx) {
1087
+ let div3;
1088
+ let details;
1089
+ let summary;
1090
+ let goa_icon;
1091
+ let goa_icon_fillcolor_value;
1092
+ let t0;
1093
+ let div1;
1094
+ let span0;
1095
+ let t1;
1096
+ let span0_class_value;
1097
+ let span0_data_testid_value;
1098
+ let t2;
1099
+ let span1;
1100
+ let t3;
1101
+ let t4;
1102
+ let div0;
1103
+ let summary_class_value;
1104
+ let t5;
1105
+ let div2;
1106
+ let div3_style_value;
1107
+ let mounted;
1108
+ let dispose;
1109
+ return {
1110
+ c() {
1111
+ div3 = element("div");
1112
+ details = element("details");
1113
+ summary = element("summary");
1114
+ goa_icon = element("goa-icon");
1115
+ t0 = space();
1116
+ div1 = element("div");
1117
+ span0 = element("span");
1118
+ t1 = text(
1119
+ /*heading*/
1120
+ ctx[0]);
1121
+ t2 = space();
1122
+ span1 = element("span");
1123
+ t3 = text(
1124
+ /*secondarytext*/
1125
+ ctx[1]);
1126
+ t4 = space();
1127
+ div0 = element("div");
1128
+ div0.innerHTML = `<slot name="headingcontent"></slot>`;
1129
+ t5 = space();
1130
+ div2 = element("div");
1131
+ div2.innerHTML = `<slot></slot>`;
1132
+ this.c = noop;
1133
+ set_custom_element_data(goa_icon, "type", "chevron-forward");
1134
+ set_custom_element_data(goa_icon, "fillcolor", goa_icon_fillcolor_value =
1135
+ /*_hovering*/
1136
+ ctx[8] ? "var(--goa-color-interactive-hover)" : "var(--goa-color-interactive-default)");
1137
+ attr(span0, "class", span0_class_value = "heading heading-" +
1138
+ /*headingsize*/
1139
+ ctx[2]);
1140
+ attr(span0, "data-testid", span0_data_testid_value = `${
1141
+ /*testid*/
1142
+ ctx[3]}-heading`);
1143
+ attr(span1, "class", "secondary-text");
1144
+ attr(div0, "class", "heading-content");
1145
+ attr(div1, "class", "title");
1146
+ attr(summary, "class", summary_class_value = `container-${
1147
+ /*headingsize*/
1148
+ ctx[2]}`);
1149
+ attr(div2, "class", "content");
1150
+ details.open =
1151
+ /*isOpen*/
1152
+ ctx[9];
1153
+ attr(div3, "style", div3_style_value = calculateMargin(
1154
+ /*mt*/
1155
+ ctx[4],
1156
+ /*mr*/
1157
+ ctx[5],
1158
+ /*mb*/
1159
+ ctx[6],
1160
+ /*ml*/
1161
+ ctx[7]));
1162
+ attr(div3, "class", `
1163
+ goa-accordion
1164
+ `);
1165
+ attr(div3, "data-testid",
1166
+ /*testid*/
1167
+ ctx[3]);
1168
+ },
1169
+
1170
+ m(target, anchor) {
1171
+ insert(target, div3, anchor);
1172
+ append(div3, details);
1173
+ append(details, summary);
1174
+ append(summary, goa_icon);
1175
+ append(summary, t0);
1176
+ append(summary, div1);
1177
+ append(div1, span0);
1178
+ append(span0, t1);
1179
+ append(div1, t2);
1180
+ append(div1, span1);
1181
+ append(span1, t3);
1182
+ append(div1, t4);
1183
+ append(div1, div0);
1184
+ append(details, t5);
1185
+ append(details, div2);
1186
+
1187
+ if (!mounted) {
1188
+ dispose = [listen(summary, "mouseover",
1189
+ /*mouseover_handler*/
1190
+ ctx[11]), listen(summary, "mouseout",
1191
+ /*mouseout_handler*/
1192
+ ctx[12]), listen(summary, "focus",
1193
+ /*focus_handler*/
1194
+ ctx[13]), listen(summary, "blur",
1195
+ /*blur_handler*/
1196
+ ctx[14])];
1197
+ mounted = true;
1198
+ }
1199
+ },
1200
+
1201
+ p(ctx, [dirty]) {
1202
+ if (dirty &
1203
+ /*_hovering*/
1204
+ 256 && goa_icon_fillcolor_value !== (goa_icon_fillcolor_value =
1205
+ /*_hovering*/
1206
+ ctx[8] ? "var(--goa-color-interactive-hover)" : "var(--goa-color-interactive-default)")) {
1207
+ set_custom_element_data(goa_icon, "fillcolor", goa_icon_fillcolor_value);
1208
+ }
1209
+
1210
+ if (dirty &
1211
+ /*heading*/
1212
+ 1) set_data(t1,
1213
+ /*heading*/
1214
+ ctx[0]);
1215
+
1216
+ if (dirty &
1217
+ /*headingsize*/
1218
+ 4 && span0_class_value !== (span0_class_value = "heading heading-" +
1219
+ /*headingsize*/
1220
+ ctx[2])) {
1221
+ attr(span0, "class", span0_class_value);
1222
+ }
1223
+
1224
+ if (dirty &
1225
+ /*testid*/
1226
+ 8 && span0_data_testid_value !== (span0_data_testid_value = `${
1227
+ /*testid*/
1228
+ ctx[3]}-heading`)) {
1229
+ attr(span0, "data-testid", span0_data_testid_value);
1230
+ }
1231
+
1232
+ if (dirty &
1233
+ /*secondarytext*/
1234
+ 2) set_data(t3,
1235
+ /*secondarytext*/
1236
+ ctx[1]);
1237
+
1238
+ if (dirty &
1239
+ /*headingsize*/
1240
+ 4 && summary_class_value !== (summary_class_value = `container-${
1241
+ /*headingsize*/
1242
+ ctx[2]}`)) {
1243
+ attr(summary, "class", summary_class_value);
1244
+ }
1245
+
1246
+ if (dirty &
1247
+ /*isOpen*/
1248
+ 512) {
1249
+ details.open =
1250
+ /*isOpen*/
1251
+ ctx[9];
1252
+ }
1253
+
1254
+ if (dirty &
1255
+ /*mt, mr, mb, ml*/
1256
+ 240 && div3_style_value !== (div3_style_value = calculateMargin(
1257
+ /*mt*/
1258
+ ctx[4],
1259
+ /*mr*/
1260
+ ctx[5],
1261
+ /*mb*/
1262
+ ctx[6],
1263
+ /*ml*/
1264
+ ctx[7]))) {
1265
+ attr(div3, "style", div3_style_value);
1266
+ }
1267
+
1268
+ if (dirty &
1269
+ /*testid*/
1270
+ 8) {
1271
+ attr(div3, "data-testid",
1272
+ /*testid*/
1273
+ ctx[3]);
1274
+ }
1275
+ },
1276
+
1277
+ i: noop,
1278
+ o: noop,
1279
+
1280
+ d(detaching) {
1281
+ if (detaching) detach(div3);
1282
+ mounted = false;
1283
+ run_all(dispose);
1284
+ }
1285
+
1286
+ };
1287
+ }
1288
+
1289
+ function instance$B($$self, $$props, $$invalidate) {
1290
+ let isOpen;
1291
+ const [HeadingSizes, validateHeadingSize] = typeValidator("Accordion heading size", ["small", "medium"]);
1292
+ let {
1293
+ open = "false"
1294
+ } = $$props;
1295
+ let {
1296
+ heading = ""
1297
+ } = $$props;
1298
+ let {
1299
+ secondarytext = ""
1300
+ } = $$props;
1301
+ let {
1302
+ headingsize = "small"
1303
+ } = $$props;
1304
+ let {
1305
+ testid = ""
1306
+ } = $$props;
1307
+ let {
1308
+ mt = null
1309
+ } = $$props;
1310
+ let {
1311
+ mr = null
1312
+ } = $$props;
1313
+ let {
1314
+ mb = "xs"
1315
+ } = $$props;
1316
+ let {
1317
+ ml = null
1318
+ } = $$props;
1319
+ let _hovering = false;
1320
+ onMount(() => {
1321
+ validateRequired("GoAAccordion", {
1322
+ heading
1323
+ });
1324
+ validateHeadingSize(headingsize);
1325
+ });
1326
+
1327
+ const mouseover_handler = () => $$invalidate(8, _hovering = true);
1328
+
1329
+ const mouseout_handler = () => $$invalidate(8, _hovering = false);
1330
+
1331
+ const focus_handler = () => $$invalidate(8, _hovering = false);
1332
+
1333
+ const blur_handler = () => $$invalidate(8, _hovering = false);
1334
+
1335
+ $$self.$$set = $$props => {
1336
+ if ('open' in $$props) $$invalidate(10, open = $$props.open);
1337
+ if ('heading' in $$props) $$invalidate(0, heading = $$props.heading);
1338
+ if ('secondarytext' in $$props) $$invalidate(1, secondarytext = $$props.secondarytext);
1339
+ if ('headingsize' in $$props) $$invalidate(2, headingsize = $$props.headingsize);
1340
+ if ('testid' in $$props) $$invalidate(3, testid = $$props.testid);
1341
+ if ('mt' in $$props) $$invalidate(4, mt = $$props.mt);
1342
+ if ('mr' in $$props) $$invalidate(5, mr = $$props.mr);
1343
+ if ('mb' in $$props) $$invalidate(6, mb = $$props.mb);
1344
+ if ('ml' in $$props) $$invalidate(7, ml = $$props.ml);
1345
+ };
1346
+
1347
+ $$self.$$.update = () => {
1348
+ if ($$self.$$.dirty &
1349
+ /*open*/
1350
+ 1024) {
1351
+ $$invalidate(9, isOpen = toBoolean(open));
1352
+ }
1353
+ };
1354
+
1355
+ return [heading, secondarytext, headingsize, testid, mt, mr, mb, ml, _hovering, isOpen, open, mouseover_handler, mouseout_handler, focus_handler, blur_handler];
1356
+ }
1357
+
1358
+ class Accordion extends SvelteElement {
1359
+ constructor(options) {
1360
+ super();
1361
+ this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4)}.goa-accordion,.goa-accordion *{box-sizing:border-box}summary{min-height:3.5rem;border-width:var(--goa-border-width-s);border-style:solid;border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);color:var(--goa-color-text-default);;;padding:0.875rem 1rem 0 0;cursor:pointer;list-style:none;display:flex;align-items:flex-start;position:relative}summary.container-medium{min-height:4rem}summary::marker,summary::-webkit-details-marker{display:none}summary .title{display:flex;align-items:center;flex:1}.title span{padding-bottom:var(--goa-space-3xs, 0)}summary .heading{font:var(--goa-typography-heading-s);padding-right:1rem}summary .secondary-text{font:var(--goa-typography-body-s);line-height:1.5rem;padding-right:1rem}summary .heading-content{flex:1
1362
+ }.content{border-bottom:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-left:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-right:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-bottom-left-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m);padding:1.5rem;padding-left:3.5rem;padding-right:2rem}summary goa-icon{padding:0.125rem 1rem}summary.container-medium goa-icon{padding:0.375rem 1rem}details[open] goa-icon{transform:rotate(90deg)}details[open] summary{border-bottom-left-radius:var(--goa-border-radius-none);border-bottom-right-radius:var(--goa-border-radius-none)}summary:hover{background-color:var(--goa-color-greyscale-200)}summary:focus,summary:active{background-color:var(--goa-color-greyscale-100);outline:none}summary:active::before,summary:focus::before{content:"";position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:var(--goa-border-width-l) solid var(--goa-color-interactive-focus);border-radius:4px}summary .heading.heading-medium{line-height:2rem;font:var(--goa-typography-heading-m)}@media(max-width: 640px){summary{align-items:flex-start}summary .title{flex-direction:column;align-items:flex-start}}</style>`;
1363
+ init(this, {
1364
+ target: this.shadowRoot,
1365
+ props: attribute_to_object(this.attributes),
1366
+ customElement: true
1367
+ }, instance$B, create_fragment$H, safe_not_equal, {
1368
+ open: 10,
1369
+ heading: 0,
1370
+ secondarytext: 1,
1371
+ headingsize: 2,
1372
+ testid: 3,
1373
+ mt: 4,
1374
+ mr: 5,
1375
+ mb: 6,
1376
+ ml: 7
1377
+ }, null);
1378
+
1379
+ if (options) {
1380
+ if (options.target) {
1381
+ insert(options.target, this, options.anchor);
1382
+ }
1383
+
1384
+ if (options.props) {
1385
+ this.$set(options.props);
1386
+ flush();
1387
+ }
1388
+ }
1389
+ }
1390
+
1391
+ static get observedAttributes() {
1392
+ return ["open", "heading", "secondarytext", "headingsize", "testid", "mt", "mr", "mb", "ml"];
1393
+ }
1394
+
1395
+ get open() {
1396
+ return this.$$.ctx[10];
1397
+ }
1398
+
1399
+ set open(open) {
1400
+ this.$$set({
1401
+ open
1402
+ });
1403
+ flush();
1404
+ }
1405
+
1406
+ get heading() {
1407
+ return this.$$.ctx[0];
1408
+ }
1409
+
1410
+ set heading(heading) {
1411
+ this.$$set({
1412
+ heading
1413
+ });
1414
+ flush();
1415
+ }
1416
+
1417
+ get secondarytext() {
1418
+ return this.$$.ctx[1];
1419
+ }
1420
+
1421
+ set secondarytext(secondarytext) {
1422
+ this.$$set({
1423
+ secondarytext
1424
+ });
1425
+ flush();
1426
+ }
1427
+
1428
+ get headingsize() {
1429
+ return this.$$.ctx[2];
1430
+ }
1431
+
1432
+ set headingsize(headingsize) {
1433
+ this.$$set({
1434
+ headingsize
1435
+ });
1436
+ flush();
1437
+ }
1438
+
1439
+ get testid() {
1440
+ return this.$$.ctx[3];
1441
+ }
1442
+
1443
+ set testid(testid) {
1444
+ this.$$set({
1445
+ testid
1446
+ });
1447
+ flush();
1448
+ }
1449
+
1450
+ get mt() {
1451
+ return this.$$.ctx[4];
1452
+ }
1453
+
1454
+ set mt(mt) {
1455
+ this.$$set({
1456
+ mt
1457
+ });
1458
+ flush();
1459
+ }
1460
+
1461
+ get mr() {
1462
+ return this.$$.ctx[5];
1463
+ }
1464
+
1465
+ set mr(mr) {
1466
+ this.$$set({
1467
+ mr
1468
+ });
1469
+ flush();
1470
+ }
1471
+
1472
+ get mb() {
1473
+ return this.$$.ctx[6];
1474
+ }
1475
+
1476
+ set mb(mb) {
1477
+ this.$$set({
1478
+ mb
1479
+ });
1480
+ flush();
1481
+ }
1482
+
1483
+ get ml() {
1484
+ return this.$$.ctx[7];
1485
+ }
1486
+
1487
+ set ml(ml) {
1488
+ this.$$set({
1489
+ ml
1490
+ });
1491
+ flush();
1492
+ }
1493
+
1494
+ }
1495
+
1496
+ customElements.define("goa-accordion", Accordion);
1027
1497
  /* libs/web-components/src/components/app-header/AppHeader.svelte generated by Svelte v3.51.0 */
1028
1498
 
1029
1499
  function create_else_block$4(ctx) {
@@ -1336,65 +1806,8 @@ class AppHeader extends SvelteElement {
1336
1806
  }
1337
1807
 
1338
1808
  customElements.define("goa-app-header", AppHeader);
1339
-
1340
- function calculateMargin(mt, mr, mb, ml) {
1341
- return [mt && `margin-top:var(--goa-space-${mt});`, mr && `margin-right:var(--goa-space-${mr});`, mb && `margin-bottom:var(--goa-space-${mb});`, ml && `margin-left:var(--goa-space-${ml});`].join(" ");
1342
- }
1343
-
1344
- function injectCss(el, rootSelector, css, media) {
1345
- const style = document.createElement("style");
1346
-
1347
- const _css = Object.entries(css).map(entry => `${entry[0]}: ${entry[1]};`).join(" ");
1348
-
1349
- if (media) {
1350
- style.innerHTML = `@media (${media}) { ${rootSelector} {${_css}} }`;
1351
- } else {
1352
- style.innerHTML = `${rootSelector} {${_css}}`;
1353
- }
1354
-
1355
- el.appendChild(style);
1356
- }
1357
-
1358
- function toBoolean(value) {
1359
- if (value === "false") {
1360
- return false;
1361
- }
1362
-
1363
- if (value === "") {
1364
- return true;
1365
- }
1366
-
1367
- return !!value;
1368
- }
1369
-
1370
- function fromBoolean(value) {
1371
- return value ? "true" : "false";
1372
- }
1373
-
1374
- function validateRequired(componentName, props) {
1375
- Object.entries(props).forEach(prop => {
1376
- if (!prop[1]) {
1377
- console.warn(`${componentName}: ${prop[0]} is required`);
1378
- }
1379
- });
1380
- }
1381
-
1382
- function typeValidator(message, values, required = false) {
1383
- const validator = value => {
1384
- if (!required && !value) {
1385
- return;
1386
- }
1387
-
1388
- if (!values.includes(value)) {
1389
- console.error(`[${value}] is an invalid ${message.toLowerCase()}`);
1390
- }
1391
- };
1392
-
1393
- return [values, validator];
1394
- }
1395
1809
  /* libs/web-components/src/components/badge/Badge.svelte generated by Svelte v3.51.0 */
1396
1810
 
1397
-
1398
1811
  function create_else_block$3(ctx) {
1399
1812
  let div;
1400
1813
  return {
@@ -12706,8 +13119,12 @@ function instance$a($$self, $$props, $$invalidate) {
12706
13119
  validateType(type);
12707
13120
  });
12708
13121
 
12709
- function close() {
13122
+ function close(e) {
12710
13123
  $$invalidate(1, show = false);
13124
+ e.target.dispatchEvent(new CustomEvent("_dismiss", {
13125
+ composed: true
13126
+ }));
13127
+ e.stopPropagation();
12711
13128
  }
12712
13129
 
12713
13130
  $$self.$$set = $$props => {
@@ -15775,7 +16192,7 @@ function instance$2($$self, $$props, $$invalidate) {
15775
16192
  class TextArea extends SvelteElement {
15776
16193
  constructor(options) {
15777
16194
  super();
15778
- this.shadowRoot.innerHTML = `<style>:host{--textarea-padding-vertical:0.625rem;--textarea-padding-horizontal:0.75rem;box-sizing:border-box;font-family:var(--goa-font-family-sans)}.container{position:relative;width:100%}@media(min-width: 640px){.container{max-width:var(--width)}}.goa-textarea{display:block;width:100%;box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--goa-color-greyscale-700);border-radius:3px;color:var(--goa-color-greyscale-black, #ccc);padding:var(--textarea-padding-vertical) var(--textarea-padding-horizontal);font-size:var(--goa-font-size-4);font-family:var(--goa-font-family-sans);min-width:100%}@media(min-width: 640px){.goa-textarea{min-width:0;width:var(--width)}}.goa-textarea[readonly]{cursor:pointer}.goa-textarea:hover{border-color:var(--goa-color-interactive-hover)}.goa-textarea:active,.goa-textarea:focus,.goa-textarea:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}.goa-textarea:disabled,.goa-textarea:disabled:hover,.goa-textarea:disabled:active,.goa-textarea:disabled:focus{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);cursor:default;box-shadow:none}.counter{position:absolute;right:0;padding-top:0.25rem;font-size:var(--goa-font-size-2)}.counter-error{color:var(--goa-color-interactive-error)
16195
+ this.shadowRoot.innerHTML = `<style>:host{--textarea-padding-vertical:0.625rem;--textarea-padding-horizontal:0.75rem;box-sizing:border-box;font-family:var(--goa-font-family-sans)}.container{position:relative;width:100%}@media(min-width: 640px){.container{max-width:var(--width)}}.goa-textarea{display:block;width:100%;box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--goa-color-greyscale-700);border-radius:3px;color:var(--goa-color-greyscale-black, #ccc);padding:var(--textarea-padding-vertical) var(--textarea-padding-horizontal);font-size:var(--goa-font-size-4);font-family:var(--goa-font-family-sans);min-width:100%;resize:vertical}@media(min-width: 640px){.goa-textarea{min-width:0;width:var(--width)}}.goa-textarea[readonly]{cursor:pointer}.goa-textarea:hover{border-color:var(--goa-color-interactive-hover)}.goa-textarea:active,.goa-textarea:focus,.goa-textarea:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}.goa-textarea:disabled,.goa-textarea:disabled:hover,.goa-textarea:disabled:active,.goa-textarea:disabled:focus{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);cursor:default;box-shadow:none}.counter{position:absolute;right:0;padding-top:0.25rem;font-size:var(--goa-font-size-2)}.counter-error{color:var(--goa-color-interactive-error)
15779
16196
  }.error:hover,.error:focus,.error{border:2px solid var(--goa-color-interactive-error)}</style>`;
15780
16197
  init(this, {
15781
16198
  target: this.shadowRoot,
@@ -16741,16 +17158,50 @@ class Pagination extends SvelteElement {
16741
17158
 
16742
17159
  customElements.define("goa-pagination", Pagination);
16743
17160
 
17161
+ const GoAAccordion = ({
17162
+ open,
17163
+ heading,
17164
+ headingSize,
17165
+ secondaryText,
17166
+ headingContent,
17167
+ testid,
17168
+ children,
17169
+ mt,
17170
+ mr,
17171
+ mb,
17172
+ ml
17173
+ }) => {
17174
+ return jsxs("goa-accordion", Object.assign({
17175
+ open: open,
17176
+ headingSize: headingSize,
17177
+ heading: heading,
17178
+ secondaryText: secondaryText,
17179
+ "data-testid": testid,
17180
+ mt: mt,
17181
+ mr: mr,
17182
+ mb: mb,
17183
+ ml: ml
17184
+ }, {
17185
+ children: [children, headingContent && jsx("div", Object.assign({
17186
+ slot: "headingcontent"
17187
+ }, {
17188
+ children: headingContent
17189
+ }), void 0)]
17190
+ }), void 0);
17191
+ };
17192
+
16744
17193
  const GoAAppHeader = ({
16745
17194
  heading,
16746
17195
  url,
16747
17196
  maxContentWidth,
17197
+ testId,
16748
17198
  children
16749
17199
  }) => {
16750
17200
  return jsx("goa-app-header", Object.assign({
16751
17201
  heading: heading,
16752
17202
  url: url,
16753
- maxcontentwidth: maxContentWidth
17203
+ maxcontentwidth: maxContentWidth,
17204
+ "data-testid": testId
16754
17205
  }, {
16755
17206
  children: children
16756
17207
  }), void 0);
@@ -16770,7 +17221,7 @@ const GoABadge = ({
16770
17221
  type: type,
16771
17222
  content: content,
16772
17223
  icon: icon,
16773
- testid: testId,
17224
+ "data-testid": testId,
16774
17225
  mt: mt,
16775
17226
  mr: mr,
16776
17227
  mb: mb,
@@ -16882,7 +17333,8 @@ function GoABlock(props) {
16882
17333
  mt: props.mt,
16883
17334
  mr: props.mr,
16884
17335
  mb: props.mb,
16885
- ml: props.ml
17336
+ ml: props.ml,
17337
+ "data-testid": props.testId
16886
17338
  }, {
16887
17339
  children: props.children
16888
17340
  }), void 0);
@@ -16891,6 +17343,7 @@ function GoABlock(props) {
16891
17343
  const GoAButtonGroup = ({
16892
17344
  alignment,
16893
17345
  gap,
17346
+ testId,
16894
17347
  children,
16895
17348
  mt,
16896
17349
  mr,
@@ -16903,7 +17356,8 @@ const GoAButtonGroup = ({
16903
17356
  mt: mt,
16904
17357
  mr: mr,
16905
17358
  mb: mb,
16906
- ml: ml
17359
+ ml: ml,
17360
+ "data-testid": testId
16907
17361
  }, {
16908
17362
  children: children
16909
17363
  }), void 0);
@@ -16916,6 +17370,7 @@ const GoAButton = ({
16916
17370
  variant,
16917
17371
  leadingIcon,
16918
17372
  trailingIcon,
17373
+ testId,
16919
17374
  children,
16920
17375
  onClick,
16921
17376
  mt,
@@ -16952,6 +17407,7 @@ const GoAButton = ({
16952
17407
  disabled: _disabled,
16953
17408
  leadingicon: leadingIcon,
16954
17409
  trailingicon: trailingIcon,
17410
+ "data-testid": testId,
16955
17411
  mt: mt,
16956
17412
  mr: mr,
16957
17413
  mb: mb,
@@ -16964,6 +17420,7 @@ const GoAButton = ({
16964
17420
  const GoACallout = ({
16965
17421
  heading,
16966
17422
  type: _type = "information",
17423
+ testId,
16967
17424
  children,
16968
17425
  mt,
16969
17426
  mr,
@@ -16976,7 +17433,8 @@ const GoACallout = ({
16976
17433
  mt: mt,
16977
17434
  mr: mr,
16978
17435
  mb: mb,
16979
- ml: ml
17436
+ ml: ml,
17437
+ "data-testid": testId
16980
17438
  }, {
16981
17439
  children: children
16982
17440
  }), void 0);
@@ -17047,7 +17505,8 @@ const GoAChip = ({
17047
17505
  mt,
17048
17506
  mr,
17049
17507
  mb,
17050
- ml
17508
+ ml,
17509
+ testId
17051
17510
  }) => {
17052
17511
  const el = useRef(null);
17053
17512
  useEffect(() => {
@@ -17074,7 +17533,8 @@ const GoAChip = ({
17074
17533
  mt: mt,
17075
17534
  mr: mr,
17076
17535
  mb: mb,
17077
- ml: ml
17536
+ ml: ml,
17537
+ "data-testid": testId
17078
17538
  }, void 0);
17079
17539
  };
17080
17540
 
@@ -17083,14 +17543,16 @@ const GoACircularProgress = ({
17083
17543
  message,
17084
17544
  progress,
17085
17545
  variant,
17086
- size
17546
+ size,
17547
+ testId
17087
17548
  }) => {
17088
17549
  return jsx("goa-circular-progress", {
17089
17550
  visible: visible ? "true" : "false",
17090
17551
  message: message,
17091
17552
  progress: progress,
17092
17553
  variant: variant,
17093
- size: size
17554
+ size: size,
17555
+ "data-testid": testId
17094
17556
  }, void 0);
17095
17557
  };
17096
17558
 
@@ -17104,7 +17566,8 @@ const GoAContainer = ({
17104
17566
  mt,
17105
17567
  mr,
17106
17568
  mb,
17107
- ml
17569
+ ml,
17570
+ testId
17108
17571
  }) => {
17109
17572
  return jsxs("goa-container", Object.assign({
17110
17573
  type: type,
@@ -17113,7 +17576,8 @@ const GoAContainer = ({
17113
17576
  mt: mt,
17114
17577
  mr: mr,
17115
17578
  mb: mb,
17116
- ml: ml
17579
+ ml: ml,
17580
+ "data-testid": testId
17117
17581
  }, {
17118
17582
  children: [title && jsx("div", Object.assign({
17119
17583
  slot: "title"
@@ -17132,7 +17596,8 @@ function GoADivider(props) {
17132
17596
  mt: props.mt,
17133
17597
  mr: props.mr,
17134
17598
  mb: props.mb,
17135
- ml: props.ml
17599
+ ml: props.ml,
17600
+ "data-testid": props.testId
17136
17601
  }, void 0);
17137
17602
  }
17138
17603
 
@@ -17188,7 +17653,7 @@ const GoADropdown = props => {
17188
17653
  multiselect: props.multiselect,
17189
17654
  native: props.native,
17190
17655
  placeholder: props.placeholder,
17191
- testid: props.testId,
17656
+ "data-testid": props.testId,
17192
17657
  width: props.width
17193
17658
  }, {
17194
17659
  children: props.children
@@ -17228,12 +17693,14 @@ function GoAAppFooterMetaSection({
17228
17693
  function GoAAppFooterNavSection({
17229
17694
  heading,
17230
17695
  maxColumnCount = 1,
17696
+ testId,
17231
17697
  children
17232
17698
  }) {
17233
17699
  return jsx("goa-app-footer-nav-section", Object.assign({
17234
17700
  slot: "nav",
17235
17701
  heading: heading,
17236
- maxcolumncount: maxColumnCount
17702
+ maxcolumncount: maxColumnCount,
17703
+ "data-testid": testId
17237
17704
  }, {
17238
17705
  children: children
17239
17706
  }), void 0);
@@ -17241,10 +17708,12 @@ function GoAAppFooterNavSection({
17241
17708
 
17242
17709
  function GoAAppFooter({
17243
17710
  maxContentWidth,
17244
- children
17711
+ children,
17712
+ testId
17245
17713
  }) {
17246
17714
  return jsx("goa-app-footer", Object.assign({
17247
- maxcontentwidth: maxContentWidth
17715
+ maxcontentwidth: maxContentWidth,
17716
+ "data-testid": testId
17248
17717
  }, {
17249
17718
  children: children
17250
17719
  }), void 0);
@@ -17259,7 +17728,8 @@ const GoAFormItem = ({
17259
17728
  mt,
17260
17729
  mr,
17261
17730
  mb,
17262
- ml
17731
+ ml,
17732
+ testId
17263
17733
  }) => {
17264
17734
  return jsx("goa-form-item", Object.assign({
17265
17735
  label: label,
@@ -17269,7 +17739,8 @@ const GoAFormItem = ({
17269
17739
  mt: mt,
17270
17740
  mr: mr,
17271
17741
  mb: mb,
17272
- ml: ml
17742
+ ml: ml,
17743
+ "data-testid": testId
17273
17744
  }, {
17274
17745
  children: children
17275
17746
  }), void 0);
@@ -17282,6 +17753,7 @@ const GoAGrid = ({
17282
17753
  mr,
17283
17754
  mb,
17284
17755
  ml,
17756
+ testId,
17285
17757
  children
17286
17758
  }) => {
17287
17759
  return jsx("goa-grid", Object.assign({
@@ -17290,7 +17762,8 @@ const GoAGrid = ({
17290
17762
  minchildwidth: minChildWidth,
17291
17763
  mr: mr,
17292
17764
  mb: mb,
17293
- ml: ml
17765
+ ml: ml,
17766
+ "data-testid": testId
17294
17767
  }, {
17295
17768
  children: children
17296
17769
  }), void 0);
@@ -17300,12 +17773,14 @@ const GoAHeroBanner = ({
17300
17773
  heading,
17301
17774
  backgroundUrl,
17302
17775
  minHeight,
17303
- children
17776
+ children,
17777
+ testId
17304
17778
  }) => {
17305
17779
  return jsx("goa-hero-banner", Object.assign({
17306
17780
  heading: heading,
17307
17781
  backgroundurl: backgroundUrl,
17308
- minheight: minHeight
17782
+ minheight: minHeight,
17783
+ "data-testid": testId
17309
17784
  }, {
17310
17785
  children: children
17311
17786
  }), void 0);
@@ -17328,6 +17803,7 @@ const GoAIconButton = ({
17328
17803
  onClick,
17329
17804
  size: _size = "medium",
17330
17805
  title,
17806
+ testId,
17331
17807
  children,
17332
17808
  mt,
17333
17809
  mr,
@@ -17365,7 +17841,8 @@ const GoAIconButton = ({
17365
17841
  mt: mt,
17366
17842
  mr: mr,
17367
17843
  mb: mb,
17368
- ml: ml
17844
+ ml: ml,
17845
+ "data-testid": testId
17369
17846
  }, {
17370
17847
  children: children
17371
17848
  }), void 0);
@@ -17378,7 +17855,8 @@ function GoAIcon({
17378
17855
  mt,
17379
17856
  mr,
17380
17857
  mb,
17381
- ml
17858
+ ml,
17859
+ testId
17382
17860
  }) {
17383
17861
  return jsx("goa-icon", {
17384
17862
  type: type,
@@ -17387,7 +17865,8 @@ function GoAIcon({
17387
17865
  mt: mt,
17388
17866
  mr: mr,
17389
17867
  mb: mb,
17390
- ml: ml
17868
+ ml: ml,
17869
+ "data-testid": testId
17391
17870
  }, void 0);
17392
17871
  }
17393
17872
 
@@ -17677,12 +18156,14 @@ const GoAInputRange = props => {
17677
18156
  const GoAMicrositeHeader = ({
17678
18157
  type,
17679
18158
  version,
17680
- feedbackUrl
18159
+ feedbackUrl,
18160
+ testId
17681
18161
  }) => {
17682
18162
  return jsx("goa-microsite-header", {
17683
18163
  type: type,
17684
18164
  version: version,
17685
- feedbackurl: feedbackUrl
18165
+ feedbackurl: feedbackUrl,
18166
+ "data-testid": testId
17686
18167
  }, void 0);
17687
18168
  };
17688
18169
 
@@ -17695,7 +18176,8 @@ const GoAModal = ({
17695
18176
  transition,
17696
18177
  type,
17697
18178
  calloutVariant,
17698
- onClose
18179
+ onClose,
18180
+ testId
17699
18181
  }) => {
17700
18182
  const el = useRef(null);
17701
18183
  useEffect(() => {
@@ -17727,7 +18209,8 @@ const GoAModal = ({
17727
18209
  scrollable: true,
17728
18210
  width: width,
17729
18211
  transition: transition,
17730
- calloutVariant: calloutVariant
18212
+ calloutVariant: calloutVariant,
18213
+ "data-testid": testId
17731
18214
  }, {
17732
18215
  children: [actions && jsx("div", Object.assign({
17733
18216
  slot: "actions"
@@ -17739,10 +18222,31 @@ const GoAModal = ({
17739
18222
 
17740
18223
  const GoANotification = ({
17741
18224
  type: _type = "information",
17742
- children
18225
+ children,
18226
+ testId,
18227
+ onDismiss
17743
18228
  }) => {
18229
+ const el = useRef(null);
18230
+ useEffect(() => {
18231
+ if (!el.current) {
18232
+ return;
18233
+ }
18234
+
18235
+ const current = el.current;
18236
+
18237
+ const listener = () => {
18238
+ onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
18239
+ };
18240
+
18241
+ current.addEventListener("_dismiss", listener);
18242
+ return () => {
18243
+ current.removeEventListener("_dismiss", listener);
18244
+ };
18245
+ }, [el, onDismiss]);
17744
18246
  return jsx("goa-notification", Object.assign({
17745
- type: _type
18247
+ ref: el,
18248
+ type: _type,
18249
+ "data-testid": testId
17746
18250
  }, {
17747
18251
  children: children
17748
18252
  }), void 0);
@@ -17756,7 +18260,8 @@ function GoAOneColumnLayout(props) {
17756
18260
 
17757
18261
  const GoAPageBlock = props => {
17758
18262
  return jsx("goa-page-block", Object.assign({
17759
- width: props.width
18263
+ width: props.width,
18264
+ "data-testid": props.testId
17760
18265
  }, {
17761
18266
  children: props.children
17762
18267
  }), void 0);
@@ -17869,7 +18374,8 @@ function GoAPagination(props) {
17869
18374
  mt: props.mt,
17870
18375
  mb: props.mb,
17871
18376
  ml: props.ml,
17872
- mr: props.mr
18377
+ mr: props.mr,
18378
+ "data-testid": props.testId
17873
18379
  }, void 0);
17874
18380
  }
17875
18381
 
@@ -17878,6 +18384,7 @@ const GoASkeleton = ({
17878
18384
  size,
17879
18385
  lineCount,
17880
18386
  type,
18387
+ testId,
17881
18388
  mt,
17882
18389
  mr,
17883
18390
  mb,
@@ -17891,14 +18398,16 @@ const GoASkeleton = ({
17891
18398
  mt: mt,
17892
18399
  mr: mr,
17893
18400
  mb: mb,
17894
- ml: ml
18401
+ ml: ml,
18402
+ "data-testid": testId
17895
18403
  }, void 0);
17896
18404
  };
17897
18405
 
17898
18406
  function GoASpacer(props) {
17899
18407
  return jsx("goa-spacer", {
17900
18408
  hspacing: props.hSpacing,
17901
- vspacing: props.vSpacing
18409
+ vspacing: props.vSpacing,
18410
+ "data-testid": props.testId
17902
18411
  }, void 0);
17903
18412
  }
17904
18413
 
@@ -17914,7 +18423,7 @@ const GoASpinner = ({
17914
18423
  size: size,
17915
18424
  progress: progress,
17916
18425
  invert: invert,
17917
- testid: testId
18426
+ "data-testid": testId
17918
18427
  }, void 0);
17919
18428
  };
17920
18429
 
@@ -17922,6 +18431,7 @@ function GoATable(props) {
17922
18431
  return jsx("goa-table", Object.assign({
17923
18432
  width: props.width,
17924
18433
  stickyheader: false,
18434
+ "data-testid": props.testId,
17925
18435
  mt: props.mt,
17926
18436
  mb: props.mb,
17927
18437
  ml: props.ml,
@@ -18015,4 +18525,4 @@ function GoATwoColumnLayout(props) {
18015
18525
  }), void 0);
18016
18526
  }
18017
18527
 
18018
- export { GoAAppFooter, GoAAppFooterMetaSection, GoAAppFooterNavSection, GoAAppHeader, GoABadge, GoABlock, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAChip, GoACircularProgress, GoAContainer, GoADivider, GoADropdown, GoADropdownItem, GoADropdownOption, GoAEmergencyBadge, GoAFormItem, GoAGrid, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAImportantBadge, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAMicrositeHeader, GoAModal, GoANotification, GoAOneColumnLayout, GoAPageBlock, GoAPagination, GoARadioGroup, GoARadioItem, GoASkeleton, GoASpacer, GoASpinner, GoASuccessBadge, GoATable, GoATextArea, GoATwoColumnLayout };
18528
+ export { GoAAccordion, GoAAppFooter, GoAAppFooterMetaSection, GoAAppFooterNavSection, GoAAppHeader, GoABadge, GoABlock, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAChip, GoACircularProgress, GoAContainer, GoADivider, GoADropdown, GoADropdownItem, GoADropdownOption, GoAEmergencyBadge, GoAFormItem, GoAGrid, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAImportantBadge, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAMicrositeHeader, GoAModal, GoANotification, GoAOneColumnLayout, GoAPageBlock, GoAPagination, GoARadioGroup, GoARadioItem, GoASkeleton, GoASpacer, GoASpinner, GoASuccessBadge, GoATable, GoATextArea, GoATwoColumnLayout };