@abgov/react-components 4.0.0-alpha.39 → 4.0.0-alpha.41

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.
@@ -45,20 +45,6 @@
45
45
 
46
46
  function noop() {}
47
47
 
48
- const _getContext = _async(function (name, attempts) {
49
- if (attempts > 10) {
50
- throw new Error(`Could not find context ${name}`);
51
- }
52
-
53
- return stores[name] ? stores[name] : _call(tick, function () {
54
- return _getContext(name, attempts + 1);
55
- });
56
- });
57
-
58
- const getContext = function getContext(name) {
59
- return _await(_getContext(name, 0));
60
- };
61
-
62
48
  const identity = x => x;
63
49
 
64
50
  function assign(tar, src) {
@@ -1830,10 +1816,10 @@
1830
1816
  let if_block1_anchor;
1831
1817
  let if_block0 =
1832
1818
  /*leadingicon*/
1833
- ctx[4] && create_if_block_2$7(ctx);
1819
+ ctx[3] && create_if_block_2$7(ctx);
1834
1820
  let if_block1 =
1835
1821
  /*trailingicon*/
1836
- ctx[5] && create_if_block_1$a(ctx);
1822
+ ctx[4] && create_if_block_1$a(ctx);
1837
1823
  return {
1838
1824
  c() {
1839
1825
  if (if_block0) if_block0.c();
@@ -1858,7 +1844,7 @@
1858
1844
  p(ctx, dirty) {
1859
1845
  if (
1860
1846
  /*leadingicon*/
1861
- ctx[4]) {
1847
+ ctx[3]) {
1862
1848
  if (if_block0) {
1863
1849
  if_block0.p(ctx, dirty);
1864
1850
  } else {
@@ -1873,7 +1859,7 @@
1873
1859
 
1874
1860
  if (
1875
1861
  /*trailingicon*/
1876
- ctx[5]) {
1862
+ ctx[4]) {
1877
1863
  if (if_block1) {
1878
1864
  if_block1.p(ctx, dirty);
1879
1865
  } else {
@@ -1897,7 +1883,7 @@
1897
1883
  }
1898
1884
 
1899
1885
  };
1900
- } // (55:2) {#if type === "start"}
1886
+ } // (53:2) {#if type === "start"}
1901
1887
 
1902
1888
 
1903
1889
  function create_if_block$h(ctx) {
@@ -1931,7 +1917,7 @@
1931
1917
  }
1932
1918
 
1933
1919
  };
1934
- } // (61:4) {#if leadingicon}
1920
+ } // (59:4) {#if leadingicon}
1935
1921
 
1936
1922
 
1937
1923
  function create_if_block_2$7(ctx) {
@@ -1942,10 +1928,10 @@
1942
1928
  set_custom_element_data(goa_icon, "id", "leading-icon");
1943
1929
  set_custom_element_data(goa_icon, "type",
1944
1930
  /*leadingicon*/
1945
- ctx[4]);
1931
+ ctx[3]);
1946
1932
  set_custom_element_data(goa_icon, "inverted",
1947
1933
  /*isButtonDark*/
1948
- ctx[7]);
1934
+ ctx[6]);
1949
1935
  },
1950
1936
 
1951
1937
  m(target, anchor) {
@@ -1955,18 +1941,18 @@
1955
1941
  p(ctx, dirty) {
1956
1942
  if (dirty &
1957
1943
  /*leadingicon*/
1958
- 16) {
1944
+ 8) {
1959
1945
  set_custom_element_data(goa_icon, "type",
1960
1946
  /*leadingicon*/
1961
- ctx[4]);
1947
+ ctx[3]);
1962
1948
  }
1963
1949
 
1964
1950
  if (dirty &
1965
1951
  /*isButtonDark*/
1966
- 128) {
1952
+ 64) {
1967
1953
  set_custom_element_data(goa_icon, "inverted",
1968
1954
  /*isButtonDark*/
1969
- ctx[7]);
1955
+ ctx[6]);
1970
1956
  }
1971
1957
  },
1972
1958
 
@@ -1975,7 +1961,7 @@
1975
1961
  }
1976
1962
 
1977
1963
  };
1978
- } // (67:4) {#if trailingicon}
1964
+ } // (65:4) {#if trailingicon}
1979
1965
 
1980
1966
 
1981
1967
  function create_if_block_1$a(ctx) {
@@ -1986,10 +1972,10 @@
1986
1972
  set_custom_element_data(goa_icon, "id", "trailing-icon");
1987
1973
  set_custom_element_data(goa_icon, "type",
1988
1974
  /*trailingicon*/
1989
- ctx[5]);
1975
+ ctx[4]);
1990
1976
  set_custom_element_data(goa_icon, "inverted",
1991
1977
  /*isButtonDark*/
1992
- ctx[7]);
1978
+ ctx[6]);
1993
1979
  },
1994
1980
 
1995
1981
  m(target, anchor) {
@@ -1999,18 +1985,18 @@
1999
1985
  p(ctx, dirty) {
2000
1986
  if (dirty &
2001
1987
  /*trailingicon*/
2002
- 32) {
1988
+ 16) {
2003
1989
  set_custom_element_data(goa_icon, "type",
2004
1990
  /*trailingicon*/
2005
- ctx[5]);
1991
+ ctx[4]);
2006
1992
  }
2007
1993
 
2008
1994
  if (dirty &
2009
1995
  /*isButtonDark*/
2010
- 128) {
1996
+ 64) {
2011
1997
  set_custom_element_data(goa_icon, "inverted",
2012
1998
  /*isButtonDark*/
2013
- ctx[7]);
1999
+ ctx[6]);
2014
2000
  }
2015
2001
  },
2016
2002
 
@@ -2048,21 +2034,18 @@
2048
2034
  ctx[1] + " " +
2049
2035
  /*variant*/
2050
2036
  ctx[2]));
2051
- attr(button, "title",
2052
- /*title*/
2053
- ctx[3]);
2054
2037
  button.disabled =
2055
2038
  /*isDisabled*/
2056
- ctx[8];
2039
+ ctx[7];
2057
2040
  attr(button, "data-testid",
2058
2041
  /*testid*/
2059
- ctx[6]);
2042
+ ctx[5]);
2060
2043
  toggle_class(button, "leading",
2061
2044
  /*leadingicon*/
2062
- ctx[4]);
2045
+ ctx[3]);
2063
2046
  toggle_class(button, "trailing",
2064
2047
  /*trailingicon*/
2065
- ctx[5] ||
2048
+ ctx[4] ||
2066
2049
  /*type*/
2067
2050
  ctx[0] === "start");
2068
2051
  },
@@ -2102,44 +2085,36 @@
2102
2085
  attr(button, "class", button_class_value);
2103
2086
  }
2104
2087
 
2105
- if (dirty &
2106
- /*title*/
2107
- 8) {
2108
- attr(button, "title",
2109
- /*title*/
2110
- ctx[3]);
2111
- }
2112
-
2113
2088
  if (dirty &
2114
2089
  /*isDisabled*/
2115
- 256) {
2090
+ 128) {
2116
2091
  button.disabled =
2117
2092
  /*isDisabled*/
2118
- ctx[8];
2093
+ ctx[7];
2119
2094
  }
2120
2095
 
2121
2096
  if (dirty &
2122
2097
  /*testid*/
2123
- 64) {
2098
+ 32) {
2124
2099
  attr(button, "data-testid",
2125
2100
  /*testid*/
2126
- ctx[6]);
2101
+ ctx[5]);
2127
2102
  }
2128
2103
 
2129
2104
  if (dirty &
2130
2105
  /*type, size, variant, leadingicon*/
2131
- 23) {
2106
+ 15) {
2132
2107
  toggle_class(button, "leading",
2133
2108
  /*leadingicon*/
2134
- ctx[4]);
2109
+ ctx[3]);
2135
2110
  }
2136
2111
 
2137
2112
  if (dirty &
2138
2113
  /*type, size, variant, trailingicon, type*/
2139
- 39) {
2114
+ 23) {
2140
2115
  toggle_class(button, "trailing",
2141
2116
  /*trailingicon*/
2142
- ctx[5] ||
2117
+ ctx[4] ||
2143
2118
  /*type*/
2144
2119
  ctx[0] === "start");
2145
2120
  }
@@ -2194,9 +2169,6 @@
2194
2169
  let {
2195
2170
  variant = "normal"
2196
2171
  } = $$props;
2197
- let {
2198
- title = ""
2199
- } = $$props;
2200
2172
  let {
2201
2173
  disabled = "false"
2202
2174
  } = $$props;
@@ -2227,28 +2199,27 @@
2227
2199
  if ('type' in $$props) $$invalidate(0, type = $$props.type);
2228
2200
  if ('size' in $$props) $$invalidate(1, size = $$props.size);
2229
2201
  if ('variant' in $$props) $$invalidate(2, variant = $$props.variant);
2230
- if ('title' in $$props) $$invalidate(3, title = $$props.title);
2231
- if ('disabled' in $$props) $$invalidate(9, disabled = $$props.disabled);
2232
- if ('leadingicon' in $$props) $$invalidate(4, leadingicon = $$props.leadingicon);
2233
- if ('trailingicon' in $$props) $$invalidate(5, trailingicon = $$props.trailingicon);
2234
- if ('testid' in $$props) $$invalidate(6, testid = $$props.testid);
2202
+ if ('disabled' in $$props) $$invalidate(8, disabled = $$props.disabled);
2203
+ if ('leadingicon' in $$props) $$invalidate(3, leadingicon = $$props.leadingicon);
2204
+ if ('trailingicon' in $$props) $$invalidate(4, trailingicon = $$props.trailingicon);
2205
+ if ('testid' in $$props) $$invalidate(5, testid = $$props.testid);
2235
2206
  };
2236
2207
 
2237
2208
  $$self.$$.update = () => {
2238
2209
  if ($$self.$$.dirty &
2239
2210
  /*disabled*/
2240
- 512) {
2241
- $$invalidate(8, isDisabled = toBoolean(disabled));
2211
+ 256) {
2212
+ $$invalidate(7, isDisabled = toBoolean(disabled));
2242
2213
  }
2243
2214
 
2244
2215
  if ($$self.$$.dirty &
2245
2216
  /*type*/
2246
2217
  1) {
2247
- $$invalidate(7, isButtonDark = type === "primary" || type === "start");
2218
+ $$invalidate(6, isButtonDark = type === "primary" || type === "start");
2248
2219
  }
2249
2220
  };
2250
2221
 
2251
- return [type, size, variant, title, leadingicon, trailingicon, testid, isButtonDark, isDisabled, disabled];
2222
+ return [type, size, variant, leadingicon, trailingicon, testid, isButtonDark, isDisabled, disabled];
2252
2223
  }
2253
2224
 
2254
2225
  class Button extends SvelteElement {
@@ -2264,11 +2235,10 @@
2264
2235
  type: 0,
2265
2236
  size: 1,
2266
2237
  variant: 2,
2267
- title: 3,
2268
- disabled: 9,
2269
- leadingicon: 4,
2270
- trailingicon: 5,
2271
- testid: 6
2238
+ disabled: 8,
2239
+ leadingicon: 3,
2240
+ trailingicon: 4,
2241
+ testid: 5
2272
2242
  }, null);
2273
2243
 
2274
2244
  if (options) {
@@ -2284,7 +2254,7 @@
2284
2254
  }
2285
2255
 
2286
2256
  static get observedAttributes() {
2287
- return ["type", "size", "variant", "title", "disabled", "leadingicon", "trailingicon", "testid"];
2257
+ return ["type", "size", "variant", "disabled", "leadingicon", "trailingicon", "testid"];
2288
2258
  }
2289
2259
 
2290
2260
  get type() {
@@ -2320,19 +2290,8 @@
2320
2290
  flush();
2321
2291
  }
2322
2292
 
2323
- get title() {
2324
- return this.$$.ctx[3];
2325
- }
2326
-
2327
- set title(title) {
2328
- this.$$set({
2329
- title
2330
- });
2331
- flush();
2332
- }
2333
-
2334
2293
  get disabled() {
2335
- return this.$$.ctx[9];
2294
+ return this.$$.ctx[8];
2336
2295
  }
2337
2296
 
2338
2297
  set disabled(disabled) {
@@ -2343,7 +2302,7 @@
2343
2302
  }
2344
2303
 
2345
2304
  get leadingicon() {
2346
- return this.$$.ctx[4];
2305
+ return this.$$.ctx[3];
2347
2306
  }
2348
2307
 
2349
2308
  set leadingicon(leadingicon) {
@@ -2354,7 +2313,7 @@
2354
2313
  }
2355
2314
 
2356
2315
  get trailingicon() {
2357
- return this.$$.ctx[5];
2316
+ return this.$$.ctx[4];
2358
2317
  }
2359
2318
 
2360
2319
  set trailingicon(trailingicon) {
@@ -2365,7 +2324,7 @@
2365
2324
  }
2366
2325
 
2367
2326
  get testid() {
2368
- return this.$$.ctx[6];
2327
+ return this.$$.ctx[5];
2369
2328
  }
2370
2329
 
2371
2330
  set testid(testid) {
@@ -4256,7 +4215,7 @@
4256
4215
 
4257
4216
  const stores = {};
4258
4217
 
4259
- class ContextStore {
4218
+ class ContextStoreInternal {
4260
4219
  constructor() {
4261
4220
  this.store = writable();
4262
4221
  }
@@ -4274,11 +4233,15 @@
4274
4233
  }
4275
4234
 
4276
4235
  function createContext(name) {
4277
- const ctx = new ContextStore();
4236
+ const ctx = new ContextStoreInternal();
4278
4237
  stores[name] = ctx;
4279
4238
  return ctx;
4280
4239
  }
4281
4240
 
4241
+ function getContext(name) {
4242
+ return stores[name];
4243
+ }
4244
+
4282
4245
  function deleteContext(name) {
4283
4246
  const store = stores[name];
4284
4247
  if (!store) return;
@@ -4290,10 +4253,10 @@
4290
4253
 
4291
4254
  function get_each_context$4(ctx, list, i) {
4292
4255
  const child_ctx = ctx.slice();
4293
- child_ctx[36] = list[i];
4294
- child_ctx[38] = i;
4256
+ child_ctx[39] = list[i];
4257
+ child_ctx[41] = i;
4295
4258
  return child_ctx;
4296
- } // (180:2) {#if isMenuVisible}
4259
+ } // (198:2) {#if isMenuVisible}
4297
4260
 
4298
4261
 
4299
4262
  function create_if_block$d(ctx) {
@@ -4338,14 +4301,16 @@
4338
4301
  }
4339
4302
 
4340
4303
  };
4341
- } // (216:4) {#each options as option, index (option.value)}
4304
+ } // (234:4) {#each options as option, index}
4342
4305
 
4343
4306
 
4344
- function create_each_block$4(key_1, ctx) {
4307
+ function create_each_block$4(ctx) {
4345
4308
  let li;
4346
- let t0_value =
4309
+ let t0_value = (
4310
+ /*option*/
4311
+ ctx[39].label ||
4347
4312
  /*option*/
4348
- ctx[36].label + "";
4313
+ ctx[39].value) + "";
4349
4314
  let t0;
4350
4315
  let t1;
4351
4316
  let li_aria_label_value;
@@ -4360,43 +4325,39 @@
4360
4325
  /*click_handler*/
4361
4326
  ctx[22](
4362
4327
  /*option*/
4363
- ctx[36])
4328
+ ctx[39])
4364
4329
  );
4365
4330
  }
4366
4331
 
4367
4332
  return {
4368
- key: key_1,
4369
- first: null,
4370
-
4371
4333
  c() {
4372
4334
  li = element("li");
4373
4335
  t0 = text(t0_value);
4374
4336
  t1 = space();
4375
4337
  attr(li, "aria-label", li_aria_label_value =
4376
4338
  /*option*/
4377
- ctx[36].label ||
4339
+ ctx[39].label ||
4378
4340
  /*option*/
4379
- ctx[36].value);
4341
+ ctx[39].value);
4380
4342
  attr(li, "data-testid", li_data_testid_value = `${
4381
4343
  /*option*/
4382
- ctx[36].value}-dropdown-item`);
4344
+ ctx[39].value}-dropdown-item`);
4383
4345
  attr(li, "data-index", li_data_index_value =
4384
4346
  /*index*/
4385
- ctx[38]);
4347
+ ctx[41]);
4386
4348
  attr(li, "class", "goa-dropdown-option");
4387
4349
  attr(li, "style", li_style_value = `display: ${"block"}`);
4388
4350
  toggle_class(li, "goa-dropdown-option--disabled", false);
4389
4351
  toggle_class(li, "goa-dropdown-option--tabbed",
4390
4352
  /*index*/
4391
- ctx[38] ===
4353
+ ctx[41] ===
4392
4354
  /*highlightedIndex*/
4393
4355
  ctx[13]);
4394
4356
  toggle_class(li, "goa-dropdown-option--selected",
4395
4357
  /*_values*/
4396
4358
  ctx[9].includes(
4397
4359
  /*option*/
4398
- ctx[36].value));
4399
- this.first = li;
4360
+ ctx[39].value));
4400
4361
  },
4401
4362
 
4402
4363
  m(target, anchor) {
@@ -4414,17 +4375,19 @@
4414
4375
  ctx = new_ctx;
4415
4376
  if (dirty[0] &
4416
4377
  /*options*/
4417
- 1024 && t0_value !== (t0_value =
4378
+ 1024 && t0_value !== (t0_value = (
4418
4379
  /*option*/
4419
- ctx[36].label + "")) set_data(t0, t0_value);
4380
+ ctx[39].label ||
4381
+ /*option*/
4382
+ ctx[39].value) + "")) set_data(t0, t0_value);
4420
4383
 
4421
4384
  if (dirty[0] &
4422
4385
  /*options*/
4423
4386
  1024 && li_aria_label_value !== (li_aria_label_value =
4424
4387
  /*option*/
4425
- ctx[36].label ||
4388
+ ctx[39].label ||
4426
4389
  /*option*/
4427
- ctx[36].value)) {
4390
+ ctx[39].value)) {
4428
4391
  attr(li, "aria-label", li_aria_label_value);
4429
4392
  }
4430
4393
 
@@ -4432,24 +4395,16 @@
4432
4395
  /*options*/
4433
4396
  1024 && li_data_testid_value !== (li_data_testid_value = `${
4434
4397
  /*option*/
4435
- ctx[36].value}-dropdown-item`)) {
4398
+ ctx[39].value}-dropdown-item`)) {
4436
4399
  attr(li, "data-testid", li_data_testid_value);
4437
4400
  }
4438
4401
 
4439
4402
  if (dirty[0] &
4440
- /*options*/
4441
- 1024 && li_data_index_value !== (li_data_index_value =
4442
- /*index*/
4443
- ctx[38])) {
4444
- attr(li, "data-index", li_data_index_value);
4445
- }
4446
-
4447
- if (dirty[0] &
4448
- /*options, highlightedIndex*/
4449
- 9216) {
4403
+ /*highlightedIndex*/
4404
+ 8192) {
4450
4405
  toggle_class(li, "goa-dropdown-option--tabbed",
4451
4406
  /*index*/
4452
- ctx[38] ===
4407
+ ctx[41] ===
4453
4408
  /*highlightedIndex*/
4454
4409
  ctx[13]);
4455
4410
  }
@@ -4461,7 +4416,7 @@
4461
4416
  /*_values*/
4462
4417
  ctx[9].includes(
4463
4418
  /*option*/
4464
- ctx[36].value));
4419
+ ctx[39].value));
4465
4420
  }
4466
4421
  },
4467
4422
 
@@ -4486,8 +4441,6 @@
4486
4441
  let ul;
4487
4442
  let slot;
4488
4443
  let t2;
4489
- let each_blocks = [];
4490
- let each_1_lookup = new Map();
4491
4444
  let ul_style_value;
4492
4445
  let div1_style_value;
4493
4446
  let mounted;
@@ -4498,15 +4451,10 @@
4498
4451
  let each_value =
4499
4452
  /*options*/
4500
4453
  ctx[10];
4501
-
4502
- const get_key = ctx =>
4503
- /*option*/
4504
- ctx[36].value;
4454
+ let each_blocks = [];
4505
4455
 
4506
4456
  for (let i = 0; i < each_value.length; i += 1) {
4507
- let child_ctx = get_each_context$4(ctx, each_value, i);
4508
- let key = get_key(child_ctx);
4509
- each_1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx));
4457
+ each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
4510
4458
  }
4511
4459
 
4512
4460
  return {
@@ -4694,7 +4642,25 @@
4694
4642
  each_value =
4695
4643
  /*options*/
4696
4644
  ctx[10];
4697
- each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, ul, destroy_block, create_each_block$4, null, get_each_context$4);
4645
+ let i;
4646
+
4647
+ for (i = 0; i < each_value.length; i += 1) {
4648
+ const child_ctx = get_each_context$4(ctx, each_value, i);
4649
+
4650
+ if (each_blocks[i]) {
4651
+ each_blocks[i].p(child_ctx, dirty);
4652
+ } else {
4653
+ each_blocks[i] = create_each_block$4(child_ctx);
4654
+ each_blocks[i].c();
4655
+ each_blocks[i].m(ul, null);
4656
+ }
4657
+ }
4658
+
4659
+ for (; i < each_blocks.length; i += 1) {
4660
+ each_blocks[i].d(1);
4661
+ }
4662
+
4663
+ each_blocks.length = each_value.length;
4698
4664
  }
4699
4665
 
4700
4666
  if (dirty[0] &
@@ -4738,13 +4704,9 @@
4738
4704
  d(detaching) {
4739
4705
  if (detaching) detach(div1);
4740
4706
  if (if_block) if_block.d();
4741
-
4742
- for (let i = 0; i < each_blocks.length; i += 1) {
4743
- each_blocks[i].d();
4744
- }
4707
+ destroy_each(each_blocks, detaching);
4745
4708
  /*ul_binding*/
4746
4709
 
4747
-
4748
4710
  ctx[23](null);
4749
4711
  /*div1_binding*/
4750
4712
 
@@ -4824,15 +4786,44 @@
4824
4786
  let menuEl;
4825
4787
  let ctx; // Hooks
4826
4788
 
4827
- onMount(_async(function () {
4828
- if (!name) {
4829
- console.error("goa-dropdown: missing the required `name` attribute. It must match the children's name attribute.");
4830
- return;
4831
- }
4789
+ onMount(() => {
4790
+ const maxAttempts = 10;
4791
+ let attempts = 0;
4792
+ const fn = setInterval(_async(function () {
4793
+ attempts++;
4832
4794
 
4795
+ if (name && el) {
4796
+ addEventListeners();
4797
+ parseValues();
4798
+ bindContext();
4799
+ clearInterval(fn);
4800
+ }
4801
+
4802
+ if (attempts > maxAttempts) {
4803
+ console.error("goa-dropdown: missing the required `name` attribute. It must match the children's name attribute.");
4804
+ clearInterval(fn);
4805
+ }
4806
+
4807
+ return _await();
4808
+ }), 10);
4809
+ });
4810
+ onDestroy(() => {
4811
+ removeEventListeners();
4812
+ deleteContext(name);
4813
+ }); // Functions
4814
+
4815
+ function addEventListeners() {
4833
4816
  el.addEventListener("focus", onFocus, true);
4834
- el.addEventListener("blur", onBlur, true); // parse and convert values to strings to avoid later type comparison issues
4817
+ el.addEventListener("blur", onBlur, true);
4818
+ }
4819
+
4820
+ function removeEventListeners() {
4821
+ el.removeEventListener("focus", onFocus, true);
4822
+ el.removeEventListener("blur", onBlur, true);
4823
+ }
4835
4824
 
4825
+ function parseValues() {
4826
+ // parse and convert values to strings to avoid later type comparison issues
4836
4827
  let rawValue;
4837
4828
 
4838
4829
  try {
@@ -4844,14 +4835,7 @@
4844
4835
  const rawValues = typeof rawValue === "object" ? rawValue : [rawValue]; // convert all values to strings to avoid later type comparison issues
4845
4836
 
4846
4837
  $$invalidate(9, _values = rawValues.map(val => `${val}`));
4847
- bindContext();
4848
- return _await();
4849
- }));
4850
- onDestroy(() => {
4851
- el.removeEventListener("focus", onFocus, true);
4852
- el.removeEventListener("blur", onBlur, true);
4853
- deleteContext(name);
4854
- }); // Functions
4838
+ }
4855
4839
 
4856
4840
  function bindContext() {
4857
4841
  ctx = createContext(name);
@@ -5213,24 +5197,26 @@
5213
5197
  label = ""
5214
5198
  } = $$props; // private
5215
5199
 
5216
- let ctx; // Hooks
5200
+ let ctx;
5201
+ onMount(() => {
5202
+ const fn = setInterval(() => {
5203
+ if (name && value) {
5204
+ ctx = getContext(name);
5217
5205
 
5218
- onMount(_async(function () {
5219
- if (!name) {
5220
- console.error("goa-dropdown-item: missing the required `name` attribute. It must match the parent's name attribute");
5221
- return;
5222
- }
5206
+ if (!ctx) {
5207
+ return;
5208
+ }
5223
5209
 
5224
- return _await(getContext(name), function (_getContext2) {
5225
- ctx = _getContext2;
5226
- ctx.notify({
5227
- type: BIND$1,
5228
- name,
5229
- label,
5230
- value
5231
- });
5232
- });
5233
- }));
5210
+ ctx.notify({
5211
+ type: BIND$1,
5212
+ name,
5213
+ label,
5214
+ value
5215
+ });
5216
+ clearInterval(fn);
5217
+ }
5218
+ }, 10);
5219
+ });
5234
5220
 
5235
5221
  $$self.$$set = $$props => {
5236
5222
  if ('name' in $$props) $$invalidate(0, name = $$props.name);
@@ -6626,7 +6612,40 @@
6626
6612
  customElements.define("goa-icon-button", IconButton);
6627
6613
  /* libs/web-components/src/components/input/Input.svelte generated by Svelte v3.49.0 */
6628
6614
 
6629
- function create_if_block_5(ctx) {
6615
+ function create_if_block_7(ctx) {
6616
+ let div;
6617
+ let t;
6618
+ return {
6619
+ c() {
6620
+ div = element("div");
6621
+ t = text(
6622
+ /*prefix*/
6623
+ ctx[13]);
6624
+ attr(div, "class", "prefix");
6625
+ },
6626
+
6627
+ m(target, anchor) {
6628
+ insert(target, div, anchor);
6629
+ append(div, t);
6630
+ },
6631
+
6632
+ p(ctx, dirty) {
6633
+ if (dirty &
6634
+ /*prefix*/
6635
+ 8192) set_data(t,
6636
+ /*prefix*/
6637
+ ctx[13]);
6638
+ },
6639
+
6640
+ d(detaching) {
6641
+ if (detaching) detach(div);
6642
+ }
6643
+
6644
+ };
6645
+ } // (81:4) {#if leadingicon}
6646
+
6647
+
6648
+ function create_if_block_6(ctx) {
6630
6649
  let goa_icon;
6631
6650
  return {
6632
6651
  c() {
@@ -6657,10 +6676,10 @@
6657
6676
  }
6658
6677
 
6659
6678
  };
6660
- } // (102:4) {#if trailingicon && !handlesTrailingIconClick}
6679
+ } // (110:4) {#if trailingicon && !handlesTrailingIconClick}
6661
6680
 
6662
6681
 
6663
- function create_if_block_4$1(ctx) {
6682
+ function create_if_block_5(ctx) {
6664
6683
  let goa_icon;
6665
6684
  return {
6666
6685
  c() {
@@ -6692,10 +6711,10 @@
6692
6711
  }
6693
6712
 
6694
6713
  };
6695
- } // (112:4) {#if trailingicon && handlesTrailingIconClick}
6714
+ } // (120:4) {#if trailingicon && handlesTrailingIconClick}
6696
6715
 
6697
6716
 
6698
- function create_if_block_3$3(ctx) {
6717
+ function create_if_block_4$1(ctx) {
6699
6718
  let goa_icon_button;
6700
6719
  let mounted;
6701
6720
  let dispose;
@@ -6704,7 +6723,7 @@
6704
6723
  goa_icon_button = element("goa-icon-button");
6705
6724
  set_custom_element_data(goa_icon_button, "disabled",
6706
6725
  /*isDisabled*/
6707
- ctx[16]);
6726
+ ctx[18]);
6708
6727
  set_custom_element_data(goa_icon_button, "variant", "nocolor");
6709
6728
  set_custom_element_data(goa_icon_button, "size", "medium");
6710
6729
  set_custom_element_data(goa_icon_button, "type",
@@ -6725,10 +6744,10 @@
6725
6744
  p(ctx, dirty) {
6726
6745
  if (dirty &
6727
6746
  /*isDisabled*/
6728
- 65536) {
6747
+ 262144) {
6729
6748
  set_custom_element_data(goa_icon_button, "disabled",
6730
6749
  /*isDisabled*/
6731
- ctx[16]);
6750
+ ctx[18]);
6732
6751
  }
6733
6752
 
6734
6753
  if (dirty &
@@ -6747,7 +6766,40 @@
6747
6766
  }
6748
6767
 
6749
6768
  };
6750
- } // (125:2) {#if showCounter}
6769
+ } // (131:4) {#if suffix}
6770
+
6771
+
6772
+ function create_if_block_3$3(ctx) {
6773
+ let span;
6774
+ let t;
6775
+ return {
6776
+ c() {
6777
+ span = element("span");
6778
+ t = text(
6779
+ /*suffix*/
6780
+ ctx[14]);
6781
+ attr(span, "class", "suffix");
6782
+ },
6783
+
6784
+ m(target, anchor) {
6785
+ insert(target, span, anchor);
6786
+ append(span, t);
6787
+ },
6788
+
6789
+ p(ctx, dirty) {
6790
+ if (dirty &
6791
+ /*suffix*/
6792
+ 16384) set_data(t,
6793
+ /*suffix*/
6794
+ ctx[14]);
6795
+ },
6796
+
6797
+ d(detaching) {
6798
+ if (detaching) detach(span);
6799
+ }
6800
+
6801
+ };
6802
+ } // (137:2) {#if showCounter}
6751
6803
 
6752
6804
 
6753
6805
  function create_if_block$a(ctx) {
@@ -6756,7 +6808,7 @@
6756
6808
  function select_block_type(ctx, dirty) {
6757
6809
  if (
6758
6810
  /*maxcharcount*/
6759
- ctx[13] > 0) return create_if_block_1$6;
6811
+ ctx[15] > 0) return create_if_block_1$6;
6760
6812
  if (
6761
6813
  /*value*/
6762
6814
  ctx[0].length > 0) return create_if_block_2$5;
@@ -6798,7 +6850,7 @@
6798
6850
  }
6799
6851
 
6800
6852
  };
6801
- } // (130:31)
6853
+ } // (142:31)
6802
6854
 
6803
6855
 
6804
6856
  function create_if_block_2$5(ctx) {
@@ -6832,7 +6884,7 @@
6832
6884
  }
6833
6885
 
6834
6886
  };
6835
- } // (126:4) {#if maxcharcount > 0}
6887
+ } // (138:4) {#if maxcharcount > 0}
6836
6888
 
6837
6889
 
6838
6890
  function create_if_block_1$6(ctx) {
@@ -6843,7 +6895,7 @@
6843
6895
  let t0;
6844
6896
  let t1_value = `/${
6845
6897
  /*maxcharcount*/
6846
- ctx[13]}` + "";
6898
+ ctx[15]}` + "";
6847
6899
  let t1;
6848
6900
  return {
6849
6901
  c() {
@@ -6855,7 +6907,7 @@
6855
6907
  /*value*/
6856
6908
  ctx[0].length >
6857
6909
  /*maxcharcount*/
6858
- ctx[13]);
6910
+ ctx[15]);
6859
6911
  },
6860
6912
 
6861
6913
  m(target, anchor) {
@@ -6872,18 +6924,18 @@
6872
6924
  ctx[0].length + "")) set_data(t0, t0_value);
6873
6925
  if (dirty &
6874
6926
  /*maxcharcount*/
6875
- 8192 && t1_value !== (t1_value = `/${
6927
+ 32768 && t1_value !== (t1_value = `/${
6876
6928
  /*maxcharcount*/
6877
- ctx[13]}` + "")) set_data(t1, t1_value);
6929
+ ctx[15]}` + "")) set_data(t1, t1_value);
6878
6930
 
6879
6931
  if (dirty &
6880
6932
  /*value, maxcharcount*/
6881
- 8193) {
6933
+ 32769) {
6882
6934
  toggle_class(div, "counter-error",
6883
6935
  /*value*/
6884
6936
  ctx[0].length >
6885
6937
  /*maxcharcount*/
6886
- ctx[13]);
6938
+ ctx[15]);
6887
6939
  }
6888
6940
  },
6889
6941
 
@@ -6898,46 +6950,58 @@
6898
6950
  let div1;
6899
6951
  let div0;
6900
6952
  let t0;
6953
+ let t1;
6901
6954
  let input;
6902
6955
  let input_class_value;
6903
6956
  let input_style_value;
6904
6957
  let input_aria_label_value;
6905
- let t1;
6906
6958
  let t2;
6907
- let div0_class_value;
6908
6959
  let t3;
6960
+ let t4;
6961
+ let div0_class_value;
6962
+ let t5;
6909
6963
  let div1_style_value;
6910
6964
  let mounted;
6911
6965
  let dispose;
6912
6966
  let if_block0 =
6913
- /*leadingicon*/
6914
- ctx[4] && create_if_block_5(ctx);
6967
+ /*prefix*/
6968
+ ctx[13] && create_if_block_7(ctx);
6915
6969
  let if_block1 =
6970
+ /*leadingicon*/
6971
+ ctx[4] && create_if_block_6(ctx);
6972
+ let if_block2 =
6916
6973
  /*trailingicon*/
6917
6974
  ctx[5] && !
6918
6975
  /*handlesTrailingIconClick*/
6919
- ctx[19] && create_if_block_4$1(ctx);
6920
- let if_block2 =
6976
+ ctx[21] && create_if_block_5(ctx);
6977
+ let if_block3 =
6921
6978
  /*trailingicon*/
6922
6979
  ctx[5] &&
6923
6980
  /*handlesTrailingIconClick*/
6924
- ctx[19] && create_if_block_3$3(ctx);
6925
- let if_block3 =
6981
+ ctx[21] && create_if_block_4$1(ctx);
6982
+ let if_block4 =
6983
+ /*suffix*/
6984
+ ctx[14] && create_if_block_3$3(ctx);
6985
+ let if_block5 =
6926
6986
  /*showCounter*/
6927
- ctx[15] && create_if_block$a(ctx);
6987
+ ctx[17] && create_if_block$a(ctx);
6928
6988
  return {
6929
6989
  c() {
6930
6990
  div1 = element("div");
6931
6991
  div0 = element("div");
6932
6992
  if (if_block0) if_block0.c();
6933
6993
  t0 = space();
6934
- input = element("input");
6935
- t1 = space();
6936
6994
  if (if_block1) if_block1.c();
6995
+ t1 = space();
6996
+ input = element("input");
6937
6997
  t2 = space();
6938
6998
  if (if_block2) if_block2.c();
6939
6999
  t3 = space();
6940
7000
  if (if_block3) if_block3.c();
7001
+ t4 = space();
7002
+ if (if_block4) if_block4.c();
7003
+ t5 = space();
7004
+ if (if_block5) if_block5.c();
6941
7005
  this.c = noop;
6942
7006
  attr(input, "class", input_class_value = `input--${
6943
7007
  /*variant*/
@@ -6947,10 +7011,10 @@
6947
7011
  ctx[5] ? "-0.5rem" : "0"}`);
6948
7012
  input.readOnly =
6949
7013
  /*isReadonly*/
6950
- ctx[18];
7014
+ ctx[20];
6951
7015
  input.disabled =
6952
7016
  /*isDisabled*/
6953
- ctx[16];
7017
+ ctx[18];
6954
7018
  attr(input, "data-testid",
6955
7019
  /*testid*/
6956
7020
  ctx[7]);
@@ -6985,7 +7049,7 @@
6985
7049
  goa-input
6986
7050
  ${
6987
7051
  /*isDisabled*/
6988
- ctx[16] ? "goa-input--disabled" : ""}
7052
+ ctx[18] ? "goa-input--disabled" : ""}
6989
7053
  variant--${
6990
7054
  /*variant*/
6991
7055
  ctx[6]}
@@ -6995,7 +7059,7 @@
6995
7059
  `);
6996
7060
  toggle_class(div0, "error",
6997
7061
  /*isError*/
6998
- ctx[17]);
7062
+ ctx[19]);
6999
7063
  attr(div1, "class", "container");
7000
7064
  attr(div1, "style", div1_style_value = `
7001
7065
  --width: ${
@@ -7009,35 +7073,39 @@
7009
7073
  append(div1, div0);
7010
7074
  if (if_block0) if_block0.m(div0, null);
7011
7075
  append(div0, t0);
7076
+ if (if_block1) if_block1.m(div0, null);
7077
+ append(div0, t1);
7012
7078
  append(div0, input);
7013
7079
  /*input_binding*/
7014
7080
 
7015
- ctx[28](input);
7016
- append(div0, t1);
7017
- if (if_block1) if_block1.m(div0, null);
7081
+ ctx[30](input);
7018
7082
  append(div0, t2);
7019
7083
  if (if_block2) if_block2.m(div0, null);
7020
- append(div1, t3);
7021
- if (if_block3) if_block3.m(div1, null);
7084
+ append(div0, t3);
7085
+ if (if_block3) if_block3.m(div0, null);
7086
+ append(div0, t4);
7087
+ if (if_block4) if_block4.m(div0, null);
7088
+ append(div1, t5);
7089
+ if (if_block5) if_block5.m(div1, null);
7022
7090
 
7023
7091
  if (!mounted) {
7024
7092
  dispose = [listen(input, "keyup",
7025
7093
  /*onKeyUp*/
7026
- ctx[20]), listen(input, "change",
7094
+ ctx[22]), listen(input, "change",
7027
7095
  /*onKeyUp*/
7028
- ctx[20])];
7096
+ ctx[22])];
7029
7097
  mounted = true;
7030
7098
  }
7031
7099
  },
7032
7100
 
7033
7101
  p(ctx, [dirty]) {
7034
7102
  if (
7035
- /*leadingicon*/
7036
- ctx[4]) {
7103
+ /*prefix*/
7104
+ ctx[13]) {
7037
7105
  if (if_block0) {
7038
7106
  if_block0.p(ctx, dirty);
7039
7107
  } else {
7040
- if_block0 = create_if_block_5(ctx);
7108
+ if_block0 = create_if_block_7(ctx);
7041
7109
  if_block0.c();
7042
7110
  if_block0.m(div0, t0);
7043
7111
  }
@@ -7046,6 +7114,21 @@
7046
7114
  if_block0 = null;
7047
7115
  }
7048
7116
 
7117
+ if (
7118
+ /*leadingicon*/
7119
+ ctx[4]) {
7120
+ if (if_block1) {
7121
+ if_block1.p(ctx, dirty);
7122
+ } else {
7123
+ if_block1 = create_if_block_6(ctx);
7124
+ if_block1.c();
7125
+ if_block1.m(div0, t1);
7126
+ }
7127
+ } else if (if_block1) {
7128
+ if_block1.d(1);
7129
+ if_block1 = null;
7130
+ }
7131
+
7049
7132
  if (dirty &
7050
7133
  /*variant*/
7051
7134
  64 && input_class_value !== (input_class_value = `input--${
@@ -7064,18 +7147,18 @@
7064
7147
 
7065
7148
  if (dirty &
7066
7149
  /*isReadonly*/
7067
- 262144) {
7150
+ 1048576) {
7068
7151
  input.readOnly =
7069
7152
  /*isReadonly*/
7070
- ctx[18];
7153
+ ctx[20];
7071
7154
  }
7072
7155
 
7073
7156
  if (dirty &
7074
7157
  /*isDisabled*/
7075
- 65536) {
7158
+ 262144) {
7076
7159
  input.disabled =
7077
7160
  /*isDisabled*/
7078
- ctx[16];
7161
+ ctx[18];
7079
7162
  }
7080
7163
 
7081
7164
  if (dirty &
@@ -7158,43 +7241,58 @@
7158
7241
  /*trailingicon*/
7159
7242
  ctx[5] && !
7160
7243
  /*handlesTrailingIconClick*/
7161
- ctx[19]) {
7162
- if (if_block1) {
7163
- if_block1.p(ctx, dirty);
7244
+ ctx[21]) {
7245
+ if (if_block2) {
7246
+ if_block2.p(ctx, dirty);
7164
7247
  } else {
7165
- if_block1 = create_if_block_4$1(ctx);
7166
- if_block1.c();
7167
- if_block1.m(div0, t2);
7248
+ if_block2 = create_if_block_5(ctx);
7249
+ if_block2.c();
7250
+ if_block2.m(div0, t3);
7168
7251
  }
7169
- } else if (if_block1) {
7170
- if_block1.d(1);
7171
- if_block1 = null;
7252
+ } else if (if_block2) {
7253
+ if_block2.d(1);
7254
+ if_block2 = null;
7172
7255
  }
7173
7256
 
7174
7257
  if (
7175
7258
  /*trailingicon*/
7176
7259
  ctx[5] &&
7177
7260
  /*handlesTrailingIconClick*/
7178
- ctx[19]) {
7179
- if (if_block2) {
7180
- if_block2.p(ctx, dirty);
7261
+ ctx[21]) {
7262
+ if (if_block3) {
7263
+ if_block3.p(ctx, dirty);
7181
7264
  } else {
7182
- if_block2 = create_if_block_3$3(ctx);
7183
- if_block2.c();
7184
- if_block2.m(div0, null);
7265
+ if_block3 = create_if_block_4$1(ctx);
7266
+ if_block3.c();
7267
+ if_block3.m(div0, t4);
7185
7268
  }
7186
- } else if (if_block2) {
7187
- if_block2.d(1);
7188
- if_block2 = null;
7269
+ } else if (if_block3) {
7270
+ if_block3.d(1);
7271
+ if_block3 = null;
7272
+ }
7273
+
7274
+ if (
7275
+ /*suffix*/
7276
+ ctx[14]) {
7277
+ if (if_block4) {
7278
+ if_block4.p(ctx, dirty);
7279
+ } else {
7280
+ if_block4 = create_if_block_3$3(ctx);
7281
+ if_block4.c();
7282
+ if_block4.m(div0, null);
7283
+ }
7284
+ } else if (if_block4) {
7285
+ if_block4.d(1);
7286
+ if_block4 = null;
7189
7287
  }
7190
7288
 
7191
7289
  if (dirty &
7192
7290
  /*isDisabled, variant, type*/
7193
- 65602 && div0_class_value !== (div0_class_value = `
7291
+ 262210 && div0_class_value !== (div0_class_value = `
7194
7292
  goa-input
7195
7293
  ${
7196
7294
  /*isDisabled*/
7197
- ctx[16] ? "goa-input--disabled" : ""}
7295
+ ctx[18] ? "goa-input--disabled" : ""}
7198
7296
  variant--${
7199
7297
  /*variant*/
7200
7298
  ctx[6]}
@@ -7207,25 +7305,25 @@
7207
7305
 
7208
7306
  if (dirty &
7209
7307
  /*isDisabled, variant, type, isError*/
7210
- 196674) {
7308
+ 786498) {
7211
7309
  toggle_class(div0, "error",
7212
7310
  /*isError*/
7213
- ctx[17]);
7311
+ ctx[19]);
7214
7312
  }
7215
7313
 
7216
7314
  if (
7217
7315
  /*showCounter*/
7218
- ctx[15]) {
7219
- if (if_block3) {
7220
- if_block3.p(ctx, dirty);
7316
+ ctx[17]) {
7317
+ if (if_block5) {
7318
+ if_block5.p(ctx, dirty);
7221
7319
  } else {
7222
- if_block3 = create_if_block$a(ctx);
7223
- if_block3.c();
7224
- if_block3.m(div1, null);
7320
+ if_block5 = create_if_block$a(ctx);
7321
+ if_block5.c();
7322
+ if_block5.m(div1, null);
7225
7323
  }
7226
- } else if (if_block3) {
7227
- if_block3.d(1);
7228
- if_block3 = null;
7324
+ } else if (if_block5) {
7325
+ if_block5.d(1);
7326
+ if_block5 = null;
7229
7327
  }
7230
7328
 
7231
7329
  if (dirty &
@@ -7245,12 +7343,14 @@
7245
7343
  d(detaching) {
7246
7344
  if (detaching) detach(div1);
7247
7345
  if (if_block0) if_block0.d();
7346
+ if (if_block1) if_block1.d();
7248
7347
  /*input_binding*/
7249
7348
 
7250
- ctx[28](null);
7251
- if (if_block1) if_block1.d();
7349
+ ctx[30](null);
7252
7350
  if (if_block2) if_block2.d();
7253
7351
  if (if_block3) if_block3.d();
7352
+ if (if_block4) if_block4.d();
7353
+ if (if_block5) if_block5.d();
7254
7354
  mounted = false;
7255
7355
  run_all(dispose);
7256
7356
  }
@@ -7325,6 +7425,12 @@
7325
7425
  let {
7326
7426
  step = null
7327
7427
  } = $$props;
7428
+ let {
7429
+ prefix = ""
7430
+ } = $$props;
7431
+ let {
7432
+ suffix = ""
7433
+ } = $$props;
7328
7434
  let {
7329
7435
  showcounter = "false"
7330
7436
  } = $$props;
@@ -7349,7 +7455,7 @@
7349
7455
  function input_binding($$value) {
7350
7456
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
7351
7457
  inputEl = $$value;
7352
- $$invalidate(14, inputEl);
7458
+ $$invalidate(16, inputEl);
7353
7459
  });
7354
7460
  }
7355
7461
 
@@ -7361,61 +7467,63 @@
7361
7467
  if ('leadingicon' in $$props) $$invalidate(4, leadingicon = $$props.leadingicon);
7362
7468
  if ('trailingicon' in $$props) $$invalidate(5, trailingicon = $$props.trailingicon);
7363
7469
  if ('variant' in $$props) $$invalidate(6, variant = $$props.variant);
7364
- if ('disabled' in $$props) $$invalidate(21, disabled = $$props.disabled);
7365
- if ('handletrailingiconclick' in $$props) $$invalidate(22, handletrailingiconclick = $$props.handletrailingiconclick);
7366
- if ('focused' in $$props) $$invalidate(23, focused = $$props.focused);
7367
- if ('readonly' in $$props) $$invalidate(24, readonly = $$props.readonly);
7368
- if ('error' in $$props) $$invalidate(25, error = $$props.error);
7470
+ if ('disabled' in $$props) $$invalidate(23, disabled = $$props.disabled);
7471
+ if ('handletrailingiconclick' in $$props) $$invalidate(24, handletrailingiconclick = $$props.handletrailingiconclick);
7472
+ if ('focused' in $$props) $$invalidate(25, focused = $$props.focused);
7473
+ if ('readonly' in $$props) $$invalidate(26, readonly = $$props.readonly);
7474
+ if ('error' in $$props) $$invalidate(27, error = $$props.error);
7369
7475
  if ('testid' in $$props) $$invalidate(7, testid = $$props.testid);
7370
7476
  if ('width' in $$props) $$invalidate(8, width = $$props.width);
7371
7477
  if ('arialabel' in $$props) $$invalidate(9, arialabel = $$props.arialabel);
7372
7478
  if ('min' in $$props) $$invalidate(10, min = $$props.min);
7373
7479
  if ('max' in $$props) $$invalidate(11, max = $$props.max);
7374
7480
  if ('step' in $$props) $$invalidate(12, step = $$props.step);
7375
- if ('showcounter' in $$props) $$invalidate(26, showcounter = $$props.showcounter);
7376
- if ('maxcharcount' in $$props) $$invalidate(13, maxcharcount = $$props.maxcharcount);
7481
+ if ('prefix' in $$props) $$invalidate(13, prefix = $$props.prefix);
7482
+ if ('suffix' in $$props) $$invalidate(14, suffix = $$props.suffix);
7483
+ if ('showcounter' in $$props) $$invalidate(28, showcounter = $$props.showcounter);
7484
+ if ('maxcharcount' in $$props) $$invalidate(15, maxcharcount = $$props.maxcharcount);
7377
7485
  };
7378
7486
 
7379
7487
  $$self.$$.update = () => {
7380
7488
  if ($$self.$$.dirty &
7381
7489
  /*handletrailingiconclick*/
7382
- 4194304) {
7383
- $$invalidate(19, handlesTrailingIconClick = toBoolean(handletrailingiconclick));
7490
+ 16777216) {
7491
+ $$invalidate(21, handlesTrailingIconClick = toBoolean(handletrailingiconclick));
7384
7492
  }
7385
7493
 
7386
7494
  if ($$self.$$.dirty &
7387
7495
  /*focused*/
7388
- 8388608) {
7389
- $$invalidate(27, isFocused = toBoolean(focused));
7496
+ 33554432) {
7497
+ $$invalidate(29, isFocused = toBoolean(focused));
7390
7498
  }
7391
7499
 
7392
7500
  if ($$self.$$.dirty &
7393
7501
  /*readonly*/
7394
- 16777216) {
7395
- $$invalidate(18, isReadonly = toBoolean(readonly));
7502
+ 67108864) {
7503
+ $$invalidate(20, isReadonly = toBoolean(readonly));
7396
7504
  }
7397
7505
 
7398
7506
  if ($$self.$$.dirty &
7399
7507
  /*error*/
7400
- 33554432) {
7401
- $$invalidate(17, isError = toBoolean(error));
7508
+ 134217728) {
7509
+ $$invalidate(19, isError = toBoolean(error));
7402
7510
  }
7403
7511
 
7404
7512
  if ($$self.$$.dirty &
7405
7513
  /*disabled*/
7406
- 2097152) {
7407
- $$invalidate(16, isDisabled = toBoolean(disabled));
7514
+ 8388608) {
7515
+ $$invalidate(18, isDisabled = toBoolean(disabled));
7408
7516
  }
7409
7517
 
7410
7518
  if ($$self.$$.dirty &
7411
7519
  /*showcounter*/
7412
- 67108864) {
7413
- $$invalidate(15, showCounter = toBoolean(showcounter));
7520
+ 268435456) {
7521
+ $$invalidate(17, showCounter = toBoolean(showcounter));
7414
7522
  }
7415
7523
 
7416
7524
  if ($$self.$$.dirty &
7417
7525
  /*isFocused, inputEl*/
7418
- 134234112) {
7526
+ 536936448) {
7419
7527
  if (isFocused && inputEl) {
7420
7528
  setTimeout(() => inputEl.focus(), 1);
7421
7529
  }
@@ -7423,7 +7531,7 @@
7423
7531
 
7424
7532
  if ($$self.$$.dirty &
7425
7533
  /*inputEl, type*/
7426
- 16386) {
7534
+ 65538) {
7427
7535
  if (inputEl && type === "search") {
7428
7536
  inputEl.addEventListener("search", e => {
7429
7537
  onKeyUp(e);
@@ -7432,13 +7540,13 @@
7432
7540
  }
7433
7541
  };
7434
7542
 
7435
- return [value, type, name, placeholder, leadingicon, trailingicon, variant, testid, width, arialabel, min, max, step, maxcharcount, inputEl, showCounter, isDisabled, isError, isReadonly, handlesTrailingIconClick, onKeyUp, disabled, handletrailingiconclick, focused, readonly, error, showcounter, isFocused, input_binding];
7543
+ return [value, type, name, placeholder, leadingicon, trailingicon, variant, testid, width, arialabel, min, max, step, prefix, suffix, maxcharcount, inputEl, showCounter, isDisabled, isError, isReadonly, handlesTrailingIconClick, onKeyUp, disabled, handletrailingiconclick, focused, readonly, error, showcounter, isFocused, input_binding];
7436
7544
  }
7437
7545
 
7438
7546
  class Input extends SvelteElement {
7439
7547
  constructor(options) {
7440
7548
  super();
7441
- this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.container{position:relative;width:100%}@media(min-width: 640px){.container{width:var(--width)}}.goa-input,.goa-input *{box-sizing:border-box}.goa-input{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--color-gray-600);border-radius:var(--input-border-radius);background:white;display:inline-flex;align-items:center;vertical-align:middle;min-width:100%}.goa-input:hover{border-color:var(--goa-color-interactive--hover)}.goa-input:active,.goa-input:focus,.goa-input:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive--focus)}.goa-input.type--range{border:none}.goa-input.type--range:active,.goa-input.type--range:focus,.goa-input.type--range:focus-within{box-shadow:none}.goa-input-leading-icon{margin-left:0.5rem}.goa-input-trailing-icon{margin-right:0.5rem}input{display:inline-block;color:var(--goa-color-text);font-size:var(--input-font-size);padding:var(--input-padding);line-height:calc(40px - calc(var(--input-padding) * 2));background-color:transparent;width:0;flex:1 1 auto}input[type=date],input[type="datetime-local"],input[type=number]{font-family:var(--font-family)}input[readonly]{cursor:pointer}.goa-input-leading-icon+input{padding-left:0.5rem}input,input:focus,input:hover,input:active{outline:none;border:none}.goa-input--disabled,.goa-input--disabled:hover,.goa-input--disabled:active,.goa-input--disabled:focus{background-color:var(--color-gray-100);border-color:var(--color-gray-200);cursor:default;box-shadow:none}.goa-input--disabled input,.goa-input--disabled input:hover,.goa-input--disabled input:active,.goa-input--disabled input:focus{color:var(--goa-color-text-secondary)}.goa-input--disabled input:hover{cursor:default !important}input.input--goa{display:block;border:none;flex:1 1 auto}.variant--bare{border:none}.variant--bare:focus,.variant--bare:active,.variant--bare:focus-within{box-shadow:none}.counter{position:absolute;padding-top:0.25rem;right:0;font-size:var(--fs-sm)}.counter-error{color:var(--goa-color-interactive--error)}.error:hover,.error:focus,.error{border:2px solid var(--goa-color-interactive--error)}input[type="search" i]:enabled:read-write:-webkit-any(:focus, :hover)::-webkit-search-cancel-button{position:relative;right:var(--search-icon-offset);cursor:pointer;-webkit-appearance:none;height:1.2rem;width:1.2rem;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23333" d="M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"/></svg>')
7549
+ this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.container{position:relative;width:100%}@media(min-width: 640px){.container{width:var(--width)}}.goa-input,.goa-input *{box-sizing:border-box}.goa-input{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--color-gray-600);border-radius:var(--input-border-radius);background:white;display:inline-flex;align-items:stretch;vertical-align:middle;min-width:100%}.goa-input:hover{border-color:var(--goa-color-interactive--hover)}.goa-input:active,.goa-input:focus,.goa-input:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive--focus)}.goa-input.type--range{border:none}.goa-input.type--range:active,.goa-input.type--range:focus,.goa-input.type--range:focus-within{box-shadow:none}.goa-input-leading-icon{margin-left:0.5rem}.goa-input-trailing-icon{margin-right:0.5rem}input{display:inline-block;color:var(--goa-color-text);font-size:var(--input-font-size);padding:var(--input-padding);line-height:calc(40px - calc(var(--input-padding) * 2));background-color:transparent;width:0;flex:1 1 auto}input[type=date],input[type="datetime-local"],input[type=number]{font-family:var(--font-family)}input[readonly]{cursor:pointer}.goa-input-leading-icon+input{padding-left:0.5rem}input,input:focus,input:hover,input:active{outline:none;border:none}.goa-input--disabled,.goa-input--disabled:hover,.goa-input--disabled:active,.goa-input--disabled:focus{background-color:var(--color-gray-100);border-color:var(--color-gray-200);cursor:default;box-shadow:none}.goa-input--disabled input,.goa-input--disabled input:hover,.goa-input--disabled input:active,.goa-input--disabled input:focus{color:var(--goa-color-text-secondary)}.goa-input--disabled input:hover{cursor:default !important}.prefix,.suffix{background-color:var(--color-gray-100);padding:0 0.75rem;display:flex;align-items:center}.prefix{border-top-left-radius:var(--input-border-radius);border-bottom-left-radius:var(--input-border-radius);border-right:1px solid var(--color-gray-600)}.suffix{border-top-right-radius:var(--input-border-radius);border-bottom-right-radius:var(--input-border-radius);border-left:1px solid var(--color-gray-600)}input.input--goa{display:block;border:none;flex:1 1 auto}.variant--bare{border:none}.variant--bare:focus,.variant--bare:active,.variant--bare:focus-within{box-shadow:none}.counter{position:absolute;padding-top:0.25rem;right:0;font-size:var(--fs-sm)}.counter-error{color:var(--goa-color-interactive--error)}.error:hover,.error:focus,.error{border:2px solid var(--goa-color-interactive--error)}input[type="search" i]:enabled:read-write:-webkit-any(:focus, :hover)::-webkit-search-cancel-button{position:relative;right:var(--search-icon-offset);cursor:pointer;-webkit-appearance:none;height:1.2rem;width:1.2rem;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23333" d="M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"/></svg>')
7442
7550
  center center no-repeat}</style>`;
7443
7551
  init(this, {
7444
7552
  target: this.shadowRoot,
@@ -7452,19 +7560,21 @@
7452
7560
  leadingicon: 4,
7453
7561
  trailingicon: 5,
7454
7562
  variant: 6,
7455
- disabled: 21,
7456
- handletrailingiconclick: 22,
7457
- focused: 23,
7458
- readonly: 24,
7459
- error: 25,
7563
+ disabled: 23,
7564
+ handletrailingiconclick: 24,
7565
+ focused: 25,
7566
+ readonly: 26,
7567
+ error: 27,
7460
7568
  testid: 7,
7461
7569
  width: 8,
7462
7570
  arialabel: 9,
7463
7571
  min: 10,
7464
7572
  max: 11,
7465
7573
  step: 12,
7466
- showcounter: 26,
7467
- maxcharcount: 13
7574
+ prefix: 13,
7575
+ suffix: 14,
7576
+ showcounter: 28,
7577
+ maxcharcount: 15
7468
7578
  }, null);
7469
7579
 
7470
7580
  if (options) {
@@ -7480,7 +7590,7 @@
7480
7590
  }
7481
7591
 
7482
7592
  static get observedAttributes() {
7483
- return ["type", "name", "value", "placeholder", "leadingicon", "trailingicon", "variant", "disabled", "handletrailingiconclick", "focused", "readonly", "error", "testid", "width", "arialabel", "min", "max", "step", "showcounter", "maxcharcount"];
7593
+ return ["type", "name", "value", "placeholder", "leadingicon", "trailingicon", "variant", "disabled", "handletrailingiconclick", "focused", "readonly", "error", "testid", "width", "arialabel", "min", "max", "step", "prefix", "suffix", "showcounter", "maxcharcount"];
7484
7594
  }
7485
7595
 
7486
7596
  get type() {
@@ -7561,7 +7671,7 @@
7561
7671
  }
7562
7672
 
7563
7673
  get disabled() {
7564
- return this.$$.ctx[21];
7674
+ return this.$$.ctx[23];
7565
7675
  }
7566
7676
 
7567
7677
  set disabled(disabled) {
@@ -7572,7 +7682,7 @@
7572
7682
  }
7573
7683
 
7574
7684
  get handletrailingiconclick() {
7575
- return this.$$.ctx[22];
7685
+ return this.$$.ctx[24];
7576
7686
  }
7577
7687
 
7578
7688
  set handletrailingiconclick(handletrailingiconclick) {
@@ -7583,7 +7693,7 @@
7583
7693
  }
7584
7694
 
7585
7695
  get focused() {
7586
- return this.$$.ctx[23];
7696
+ return this.$$.ctx[25];
7587
7697
  }
7588
7698
 
7589
7699
  set focused(focused) {
@@ -7594,7 +7704,7 @@
7594
7704
  }
7595
7705
 
7596
7706
  get readonly() {
7597
- return this.$$.ctx[24];
7707
+ return this.$$.ctx[26];
7598
7708
  }
7599
7709
 
7600
7710
  set readonly(readonly) {
@@ -7605,7 +7715,7 @@
7605
7715
  }
7606
7716
 
7607
7717
  get error() {
7608
- return this.$$.ctx[25];
7718
+ return this.$$.ctx[27];
7609
7719
  }
7610
7720
 
7611
7721
  set error(error) {
@@ -7681,8 +7791,30 @@
7681
7791
  flush();
7682
7792
  }
7683
7793
 
7794
+ get prefix() {
7795
+ return this.$$.ctx[13];
7796
+ }
7797
+
7798
+ set prefix(prefix) {
7799
+ this.$$set({
7800
+ prefix
7801
+ });
7802
+ flush();
7803
+ }
7804
+
7805
+ get suffix() {
7806
+ return this.$$.ctx[14];
7807
+ }
7808
+
7809
+ set suffix(suffix) {
7810
+ this.$$set({
7811
+ suffix
7812
+ });
7813
+ flush();
7814
+ }
7815
+
7684
7816
  get showcounter() {
7685
- return this.$$.ctx[26];
7817
+ return this.$$.ctx[28];
7686
7818
  }
7687
7819
 
7688
7820
  set showcounter(showcounter) {
@@ -7693,7 +7825,7 @@
7693
7825
  }
7694
7826
 
7695
7827
  get maxcharcount() {
7696
- return this.$$.ctx[13];
7828
+ return this.$$.ctx[15];
7697
7829
  }
7698
7830
 
7699
7831
  set maxcharcount(maxcharcount) {
@@ -9235,7 +9367,7 @@
9235
9367
  const child_ctx = ctx.slice();
9236
9368
  child_ctx[14] = list[i];
9237
9369
  return child_ctx;
9238
- } // (55:2) {#each options as option (option.value) }
9370
+ } // (63:2) {#each options as option (option.value) }
9239
9371
 
9240
9372
 
9241
9373
  function create_each_block$3(key_1, ctx) {
@@ -9530,20 +9662,31 @@
9530
9662
  let ctx;
9531
9663
  let el;
9532
9664
  onMount(() => {
9533
- if (!name) {
9534
- console.error("goa-radio: missing the required `name` attribute. It must match the children's name attribute.");
9535
- return;
9536
- }
9537
-
9538
- ctx = createContext(name);
9539
- ctx.subscribe(msg => {
9540
- switch (msg === null || msg === void 0 ? void 0 : msg.type) {
9541
- case BIND:
9542
- {
9543
- $$invalidate(4, options = [...options, msg]);
9665
+ const maxAttempts = 10;
9666
+ let attempts = 0;
9667
+ const fn = setInterval(_async(function () {
9668
+ attempts++;
9669
+
9670
+ if (name) {
9671
+ ctx = createContext(name);
9672
+ ctx.subscribe(msg => {
9673
+ switch (msg === null || msg === void 0 ? void 0 : msg.type) {
9674
+ case BIND:
9675
+ {
9676
+ $$invalidate(4, options = [...options, msg]);
9677
+ }
9544
9678
  }
9679
+ });
9680
+ clearInterval(fn);
9545
9681
  }
9546
- });
9682
+
9683
+ if (attempts > maxAttempts) {
9684
+ console.error("goa-radio: missing the required `name` attribute. It must match the children's name attribute.");
9685
+ clearInterval(fn);
9686
+ }
9687
+
9688
+ return _await();
9689
+ }), 10);
9547
9690
  });
9548
9691
 
9549
9692
  function onChange(newValue) {
@@ -9726,21 +9869,33 @@
9726
9869
  name
9727
9870
  } = $$props;
9728
9871
  let ctx;
9729
- onMount(_async(function () {
9730
- if (!name) {
9731
- console.error("goa-radio-item: missing the required `name` attribute. It must match the parent's name attribute.");
9732
- return;
9733
- }
9872
+ onMount(() => {
9873
+ const maxAttempts = 10;
9874
+ let attempts = 0;
9875
+ const fn = setInterval(() => {
9876
+ attempts++;
9734
9877
 
9735
- return _await(getContext(name), function (_getContext3) {
9736
- ctx = _getContext3;
9737
- ctx.notify({
9738
- type: BIND,
9739
- value,
9740
- label
9741
- });
9742
- });
9743
- }));
9878
+ if (name) {
9879
+ ctx = getContext(name);
9880
+
9881
+ if (!ctx) {
9882
+ return;
9883
+ }
9884
+
9885
+ ctx.notify({
9886
+ type: BIND,
9887
+ value,
9888
+ label
9889
+ });
9890
+ clearInterval(fn);
9891
+ }
9892
+
9893
+ if (attempts > maxAttempts) {
9894
+ console.error("goa-radio-item: missing the required `name` attribute. It must match the parent's name attribute.");
9895
+ clearInterval(fn);
9896
+ }
9897
+ }, 10);
9898
+ });
9744
9899
 
9745
9900
  $$self.$$set = $$props => {
9746
9901
  if ('value' in $$props) $$invalidate(0, value = $$props.value);
@@ -10001,7 +10156,7 @@
10001
10156
  t0 = space();
10002
10157
  div1 = element("div");
10003
10158
  div1.innerHTML = `An official site of the <a href="https://www.alberta.ca/index.aspx">Alberta Government</a>`;
10004
- attr(div0, "class", "service-level service-level--live");
10159
+ attr(div0, "class", "service-type service-type--live");
10005
10160
  attr(div1, "data-testid", "type");
10006
10161
  attr(div1, "class", "site-text");
10007
10162
  },
@@ -10049,7 +10204,7 @@
10049
10204
  t4 = text(" service\n ");
10050
10205
  if (if_block) if_block.c();
10051
10206
  attr(div0, "data-testid", "type");
10052
- attr(div0, "class", div0_class_value = "service-level service-level--" +
10207
+ attr(div0, "class", div0_class_value = "service-type service-type--" +
10053
10208
  /*type*/
10054
10209
  ctx[0].toLowerCase());
10055
10210
  attr(a, "href", "https://www.alberta.ca/index.aspx");
@@ -10077,7 +10232,7 @@
10077
10232
 
10078
10233
  if (dirty &
10079
10234
  /*type*/
10080
- 1 && div0_class_value !== (div0_class_value = "service-level service-level--" +
10235
+ 1 && div0_class_value !== (div0_class_value = "service-type service-type--" +
10081
10236
  /*type*/
10082
10237
  ctx[0].toLowerCase())) {
10083
10238
  attr(div0, "class", div0_class_value);
@@ -13914,6 +14069,8 @@
13914
14069
  min = _a.min,
13915
14070
  max = _a.max,
13916
14071
  step = _a.step,
14072
+ prefix = _a.prefix,
14073
+ suffix = _a.suffix,
13917
14074
  onTrailingIconClick = _a.onTrailingIconClick,
13918
14075
  onChange = _a.onChange;
13919
14076
  var ref = react.useRef(null);
@@ -13961,6 +14118,8 @@
13961
14118
  min: min,
13962
14119
  max: max,
13963
14120
  step: step,
14121
+ prefix: prefix,
14122
+ suffix: suffix,
13964
14123
  showcounter: showCounter,
13965
14124
  maxcharcount: maxCharCount,
13966
14125
  handletrailingiconclick: !!onTrailingIconClick
@@ -14123,8 +14282,7 @@
14123
14282
  styleInject(css_248z$1);
14124
14283
 
14125
14284
  var GoAButton = function GoAButton(_a) {
14126
- var title = _a.title,
14127
- _b = _a.disabled,
14285
+ var _b = _a.disabled,
14128
14286
  disabled = _b === void 0 ? false : _b,
14129
14287
  _c = _a.type,
14130
14288
  type = _c === void 0 ? 'primary' : _c,
@@ -14158,7 +14316,6 @@
14158
14316
  size: size,
14159
14317
  variant: variant,
14160
14318
  disabled: disabled,
14161
- title: title,
14162
14319
  leadingicon: leadingIcon,
14163
14320
  trailingicon: trailingIcon
14164
14321
  }, {