@abgov/web-components 1.0.0-alpha.25 → 1.0.0-alpha.28

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.
@@ -976,7 +976,7 @@ function fromBoolean(value) {
976
976
 
977
977
  /* libs/web-components/src/components/badge/Badge.svelte generated by Svelte v3.44.3 */
978
978
 
979
- function create_else_block$4(ctx) {
979
+ function create_else_block$3(ctx) {
980
980
  let div;
981
981
 
982
982
  return {
@@ -1050,7 +1050,7 @@ function create_fragment$u(ctx) {
1050
1050
 
1051
1051
  function select_block_type(ctx, dirty) {
1052
1052
  if (/*showIcon*/ ctx[4]) return create_if_block_1$9;
1053
- return create_else_block$4;
1053
+ return create_else_block$3;
1054
1054
  }
1055
1055
 
1056
1056
  let current_block_type = select_block_type(ctx);
@@ -2080,46 +2080,7 @@ customElements.define("goa-card-image", CardImage);
2080
2080
 
2081
2081
  /* libs/web-components/src/components/checkbox/Checkbox.svelte generated by Svelte v3.44.3 */
2082
2082
 
2083
- function create_if_block$b(ctx) {
2084
- let if_block_anchor;
2085
-
2086
- function select_block_type(ctx, dirty) {
2087
- if (/*isIndeterminate*/ ctx[4]) return create_if_block_1$8;
2088
- return create_else_block$3;
2089
- }
2090
-
2091
- let current_block_type = select_block_type(ctx);
2092
- let if_block = current_block_type(ctx);
2093
-
2094
- return {
2095
- c() {
2096
- if_block.c();
2097
- if_block_anchor = empty();
2098
- },
2099
- m(target, anchor) {
2100
- if_block.m(target, anchor);
2101
- insert(target, if_block_anchor, anchor);
2102
- },
2103
- p(ctx, dirty) {
2104
- if (current_block_type !== (current_block_type = select_block_type(ctx))) {
2105
- if_block.d(1);
2106
- if_block = current_block_type(ctx);
2107
-
2108
- if (if_block) {
2109
- if_block.c();
2110
- if_block.m(if_block_anchor.parentNode, if_block_anchor);
2111
- }
2112
- }
2113
- },
2114
- d(detaching) {
2115
- if_block.d(detaching);
2116
- if (detaching) detach(if_block_anchor);
2117
- }
2118
- };
2119
- }
2120
-
2121
- // (54:6) {:else}
2122
- function create_else_block$3(ctx) {
2083
+ function create_if_block_1$8(ctx) {
2123
2084
  let svg;
2124
2085
  let path;
2125
2086
 
@@ -2129,6 +2090,7 @@ function create_else_block$3(ctx) {
2129
2090
  path = svg_element("path");
2130
2091
  attr(path, "d", "M5.09,9.64,1.27,5.82,0,7.09l5.09,5.09L16,1.27,14.73,0Z");
2131
2092
  attr(svg, "id", "checkmark");
2093
+ attr(svg, "data-testid", "checkmark");
2132
2094
  attr(svg, "xmlns", "http://www.w3.org/2000/svg");
2133
2095
  attr(svg, "viewBox", "0 0 16 12.18");
2134
2096
  },
@@ -2142,8 +2104,8 @@ function create_else_block$3(ctx) {
2142
2104
  };
2143
2105
  }
2144
2106
 
2145
- // (50:6) {#if isIndeterminate}
2146
- function create_if_block_1$8(ctx) {
2107
+ // (51:4) {#if isIndeterminate}
2108
+ function create_if_block$b(ctx) {
2147
2109
  let svg;
2148
2110
  let rect;
2149
2111
 
@@ -2154,6 +2116,7 @@ function create_if_block_1$8(ctx) {
2154
2116
  attr(rect, "width", "15");
2155
2117
  attr(rect, "height", "2");
2156
2118
  attr(svg, "id", "dashmark");
2119
+ attr(svg, "data-testid", "dashmark");
2157
2120
  attr(svg, "xmlns", "http://www.w3.org/2000/svg");
2158
2121
  attr(svg, "viewBox", "0 0 15 2");
2159
2122
  },
@@ -2179,7 +2142,14 @@ function create_fragment$l(ctx) {
2179
2142
  let t2;
2180
2143
  let mounted;
2181
2144
  let dispose;
2182
- let if_block = /*isChecked*/ ctx[3] && create_if_block$b(ctx);
2145
+
2146
+ function select_block_type(ctx, dirty) {
2147
+ if (/*isIndeterminate*/ ctx[6]) return create_if_block$b;
2148
+ if (/*isChecked*/ ctx[5]) return create_if_block_1$8;
2149
+ }
2150
+
2151
+ let current_block_type = select_block_type(ctx);
2152
+ let if_block = current_block_type && current_block_type(ctx);
2183
2153
 
2184
2154
  return {
2185
2155
  c() {
@@ -2191,22 +2161,24 @@ function create_fragment$l(ctx) {
2191
2161
  t1 = space();
2192
2162
  div1 = element("div");
2193
2163
  slot = element("slot");
2194
- t2 = text(/*text*/ ctx[1]);
2164
+ t2 = text(/*text*/ ctx[2]);
2195
2165
  this.c = noop;
2196
- attr(input, "id", /*id*/ ctx[7]);
2197
- attr(input, "name", /*name*/ ctx[0]);
2198
- input.checked = /*isChecked*/ ctx[3];
2199
- input.disabled = /*isDisabled*/ ctx[6];
2166
+ attr(input, "id", /*id*/ ctx[0]);
2167
+ attr(input, "data-testid", /*testid*/ ctx[4]);
2168
+ attr(input, "name", /*name*/ ctx[1]);
2169
+ input.checked = /*isChecked*/ ctx[5];
2170
+ input.disabled = /*isDisabled*/ ctx[8];
2200
2171
  attr(input, "type", "checkbox");
2201
- input.value = input_value_value = `${/*value*/ ctx[2]}`;
2172
+ input.value = input_value_value = `${/*value*/ ctx[3]}`;
2202
2173
  attr(div0, "class", "goa-checkbox-container");
2203
- toggle_class(div0, "goa-checkbox--selected", /*isChecked*/ ctx[3]);
2174
+ toggle_class(div0, "goa-checkbox--selected", /*isChecked*/ ctx[5]);
2204
2175
  attr(slot, "name", "main");
2205
2176
  attr(div1, "class", "goa-checkbox-text");
2206
- attr(label, "for", /*id*/ ctx[7]);
2177
+ attr(div1, "data-testid", "text");
2178
+ attr(label, "for", /*id*/ ctx[0]);
2207
2179
  attr(label, "class", "goa-checkbox");
2208
- toggle_class(label, "goa-checkbox--disabled", /*isDisabled*/ ctx[6]);
2209
- toggle_class(label, "goa-checkbox--error", /*isError*/ ctx[5]);
2180
+ toggle_class(label, "goa-checkbox--disabled", /*isDisabled*/ ctx[8]);
2181
+ toggle_class(label, "goa-checkbox--error", /*isError*/ ctx[7]);
2210
2182
  },
2211
2183
  m(target, anchor) {
2212
2184
  insert(target, label, anchor);
@@ -2220,67 +2192,72 @@ function create_fragment$l(ctx) {
2220
2192
  append(slot, t2);
2221
2193
 
2222
2194
  if (!mounted) {
2223
- dispose = listen(input, "change", /*onChange*/ ctx[8]);
2195
+ dispose = listen(input, "change", /*onChange*/ ctx[9]);
2224
2196
  mounted = true;
2225
2197
  }
2226
2198
  },
2227
2199
  p(ctx, [dirty]) {
2228
- if (dirty & /*id*/ 128) {
2229
- attr(input, "id", /*id*/ ctx[7]);
2200
+ if (dirty & /*id*/ 1) {
2201
+ attr(input, "id", /*id*/ ctx[0]);
2230
2202
  }
2231
2203
 
2232
- if (dirty & /*name*/ 1) {
2233
- attr(input, "name", /*name*/ ctx[0]);
2204
+ if (dirty & /*testid*/ 16) {
2205
+ attr(input, "data-testid", /*testid*/ ctx[4]);
2206
+ }
2207
+
2208
+ if (dirty & /*name*/ 2) {
2209
+ attr(input, "name", /*name*/ ctx[1]);
2234
2210
  }
2235
2211
 
2236
- if (dirty & /*isChecked*/ 8) {
2237
- input.checked = /*isChecked*/ ctx[3];
2212
+ if (dirty & /*isChecked*/ 32) {
2213
+ input.checked = /*isChecked*/ ctx[5];
2238
2214
  }
2239
2215
 
2240
- if (dirty & /*isDisabled*/ 64) {
2241
- input.disabled = /*isDisabled*/ ctx[6];
2216
+ if (dirty & /*isDisabled*/ 256) {
2217
+ input.disabled = /*isDisabled*/ ctx[8];
2242
2218
  }
2243
2219
 
2244
- if (dirty & /*value*/ 4 && input_value_value !== (input_value_value = `${/*value*/ ctx[2]}`)) {
2220
+ if (dirty & /*value*/ 8 && input_value_value !== (input_value_value = `${/*value*/ ctx[3]}`)) {
2245
2221
  input.value = input_value_value;
2246
2222
  }
2247
2223
 
2248
- if (/*isChecked*/ ctx[3]) {
2224
+ if (current_block_type !== (current_block_type = select_block_type(ctx))) {
2225
+ if (if_block) if_block.d(1);
2226
+ if_block = current_block_type && current_block_type(ctx);
2227
+
2249
2228
  if (if_block) {
2250
- if_block.p(ctx, dirty);
2251
- } else {
2252
- if_block = create_if_block$b(ctx);
2253
2229
  if_block.c();
2254
2230
  if_block.m(div0, null);
2255
2231
  }
2256
- } else if (if_block) {
2257
- if_block.d(1);
2258
- if_block = null;
2259
2232
  }
2260
2233
 
2261
- if (dirty & /*isChecked*/ 8) {
2262
- toggle_class(div0, "goa-checkbox--selected", /*isChecked*/ ctx[3]);
2234
+ if (dirty & /*isChecked*/ 32) {
2235
+ toggle_class(div0, "goa-checkbox--selected", /*isChecked*/ ctx[5]);
2263
2236
  }
2264
2237
 
2265
- if (dirty & /*text*/ 2) set_data(t2, /*text*/ ctx[1]);
2238
+ if (dirty & /*text*/ 4) set_data(t2, /*text*/ ctx[2]);
2266
2239
 
2267
- if (dirty & /*id*/ 128) {
2268
- attr(label, "for", /*id*/ ctx[7]);
2240
+ if (dirty & /*id*/ 1) {
2241
+ attr(label, "for", /*id*/ ctx[0]);
2269
2242
  }
2270
2243
 
2271
- if (dirty & /*isDisabled*/ 64) {
2272
- toggle_class(label, "goa-checkbox--disabled", /*isDisabled*/ ctx[6]);
2244
+ if (dirty & /*isDisabled*/ 256) {
2245
+ toggle_class(label, "goa-checkbox--disabled", /*isDisabled*/ ctx[8]);
2273
2246
  }
2274
2247
 
2275
- if (dirty & /*isError*/ 32) {
2276
- toggle_class(label, "goa-checkbox--error", /*isError*/ ctx[5]);
2248
+ if (dirty & /*isError*/ 128) {
2249
+ toggle_class(label, "goa-checkbox--error", /*isError*/ ctx[7]);
2277
2250
  }
2278
2251
  },
2279
2252
  i: noop,
2280
2253
  o: noop,
2281
2254
  d(detaching) {
2282
2255
  if (detaching) detach(label);
2283
- if (if_block) if_block.d();
2256
+
2257
+ if (if_block) {
2258
+ if_block.d();
2259
+ }
2260
+
2284
2261
  mounted = false;
2285
2262
  dispose();
2286
2263
  }
@@ -2288,18 +2265,18 @@ function create_fragment$l(ctx) {
2288
2265
  }
2289
2266
 
2290
2267
  function instance$k($$self, $$props, $$invalidate) {
2291
- let id;
2292
2268
  let isDisabled;
2293
2269
  let isError;
2294
2270
  let isChecked;
2295
2271
  let isIndeterminate;
2296
2272
  let { name } = $$props;
2273
+ let { id = "" } = $$props;
2297
2274
  let { text = "" } = $$props;
2298
2275
  let { value = "" } = $$props;
2299
2276
  let { checked } = $$props;
2300
2277
  let { disabled } = $$props;
2301
- let { indeterminate } = $$props;
2302
2278
  let { error } = $$props;
2279
+ let { testid = "" } = $$props;
2303
2280
 
2304
2281
  function onChange(e) {
2305
2282
  // An empty string is required as setting the second value to `null` caused the data to get
@@ -2320,50 +2297,49 @@ function instance$k($$self, $$props, $$invalidate) {
2320
2297
  }
2321
2298
 
2322
2299
  $$self.$$set = $$props => {
2323
- if ('name' in $$props) $$invalidate(0, name = $$props.name);
2324
- if ('text' in $$props) $$invalidate(1, text = $$props.text);
2325
- if ('value' in $$props) $$invalidate(2, value = $$props.value);
2326
- if ('checked' in $$props) $$invalidate(9, checked = $$props.checked);
2327
- if ('disabled' in $$props) $$invalidate(10, disabled = $$props.disabled);
2328
- if ('indeterminate' in $$props) $$invalidate(11, indeterminate = $$props.indeterminate);
2300
+ if ('name' in $$props) $$invalidate(1, name = $$props.name);
2301
+ if ('id' in $$props) $$invalidate(0, id = $$props.id);
2302
+ if ('text' in $$props) $$invalidate(2, text = $$props.text);
2303
+ if ('value' in $$props) $$invalidate(3, value = $$props.value);
2304
+ if ('checked' in $$props) $$invalidate(10, checked = $$props.checked);
2305
+ if ('disabled' in $$props) $$invalidate(11, disabled = $$props.disabled);
2329
2306
  if ('error' in $$props) $$invalidate(12, error = $$props.error);
2307
+ if ('testid' in $$props) $$invalidate(4, testid = $$props.testid);
2330
2308
  };
2331
2309
 
2332
2310
  $$self.$$.update = () => {
2333
- if ($$self.$$.dirty & /*name*/ 1) {
2334
- $$invalidate(7, id = `id-${name}`);
2311
+ if ($$self.$$.dirty & /*id, name*/ 3) {
2312
+ $$invalidate(0, id = id ? id : `id-${name}`);
2335
2313
  }
2336
2314
 
2337
- if ($$self.$$.dirty & /*disabled*/ 1024) {
2338
- $$invalidate(6, isDisabled = toBoolean(disabled));
2315
+ if ($$self.$$.dirty & /*disabled*/ 2048) {
2316
+ $$invalidate(8, isDisabled = toBoolean(disabled));
2339
2317
  }
2340
2318
 
2341
2319
  if ($$self.$$.dirty & /*error*/ 4096) {
2342
- $$invalidate(5, isError = toBoolean(error));
2343
- }
2344
-
2345
- if ($$self.$$.dirty & /*checked*/ 512) {
2346
- $$invalidate(3, isChecked = toBoolean(checked));
2320
+ $$invalidate(7, isError = toBoolean(error));
2347
2321
  }
2348
2322
 
2349
- if ($$self.$$.dirty & /*indeterminate*/ 2048) {
2350
- $$invalidate(4, isIndeterminate = toBoolean(indeterminate));
2323
+ if ($$self.$$.dirty & /*checked*/ 1024) {
2324
+ $$invalidate(5, isChecked = toBoolean(checked));
2351
2325
  }
2352
2326
  };
2353
2327
 
2328
+ $$invalidate(6, isIndeterminate = false); // Desighn review. To be built with TreeView Later
2329
+
2354
2330
  return [
2331
+ id,
2355
2332
  name,
2356
2333
  text,
2357
2334
  value,
2335
+ testid,
2358
2336
  isChecked,
2359
2337
  isIndeterminate,
2360
2338
  isError,
2361
2339
  isDisabled,
2362
- id,
2363
2340
  onChange,
2364
2341
  checked,
2365
2342
  disabled,
2366
- indeterminate,
2367
2343
  error
2368
2344
  ];
2369
2345
  }
@@ -2384,13 +2360,14 @@ class Checkbox extends SvelteElement {
2384
2360
  create_fragment$l,
2385
2361
  safe_not_equal,
2386
2362
  {
2387
- name: 0,
2388
- text: 1,
2389
- value: 2,
2390
- checked: 9,
2391
- disabled: 10,
2392
- indeterminate: 11,
2393
- error: 12
2363
+ name: 1,
2364
+ id: 0,
2365
+ text: 2,
2366
+ value: 3,
2367
+ checked: 10,
2368
+ disabled: 11,
2369
+ error: 12,
2370
+ testid: 4
2394
2371
  },
2395
2372
  null
2396
2373
  );
@@ -2408,11 +2385,11 @@ class Checkbox extends SvelteElement {
2408
2385
  }
2409
2386
 
2410
2387
  static get observedAttributes() {
2411
- return ["name", "text", "value", "checked", "disabled", "indeterminate", "error"];
2388
+ return ["name", "id", "text", "value", "checked", "disabled", "error", "testid"];
2412
2389
  }
2413
2390
 
2414
2391
  get name() {
2415
- return this.$$.ctx[0];
2392
+ return this.$$.ctx[1];
2416
2393
  }
2417
2394
 
2418
2395
  set name(name) {
@@ -2420,8 +2397,17 @@ class Checkbox extends SvelteElement {
2420
2397
  flush();
2421
2398
  }
2422
2399
 
2400
+ get id() {
2401
+ return this.$$.ctx[0];
2402
+ }
2403
+
2404
+ set id(id) {
2405
+ this.$$set({ id });
2406
+ flush();
2407
+ }
2408
+
2423
2409
  get text() {
2424
- return this.$$.ctx[1];
2410
+ return this.$$.ctx[2];
2425
2411
  }
2426
2412
 
2427
2413
  set text(text) {
@@ -2430,7 +2416,7 @@ class Checkbox extends SvelteElement {
2430
2416
  }
2431
2417
 
2432
2418
  get value() {
2433
- return this.$$.ctx[2];
2419
+ return this.$$.ctx[3];
2434
2420
  }
2435
2421
 
2436
2422
  set value(value) {
@@ -2439,7 +2425,7 @@ class Checkbox extends SvelteElement {
2439
2425
  }
2440
2426
 
2441
2427
  get checked() {
2442
- return this.$$.ctx[9];
2428
+ return this.$$.ctx[10];
2443
2429
  }
2444
2430
 
2445
2431
  set checked(checked) {
@@ -2448,7 +2434,7 @@ class Checkbox extends SvelteElement {
2448
2434
  }
2449
2435
 
2450
2436
  get disabled() {
2451
- return this.$$.ctx[10];
2437
+ return this.$$.ctx[11];
2452
2438
  }
2453
2439
 
2454
2440
  set disabled(disabled) {
@@ -2456,21 +2442,21 @@ class Checkbox extends SvelteElement {
2456
2442
  flush();
2457
2443
  }
2458
2444
 
2459
- get indeterminate() {
2460
- return this.$$.ctx[11];
2445
+ get error() {
2446
+ return this.$$.ctx[12];
2461
2447
  }
2462
2448
 
2463
- set indeterminate(indeterminate) {
2464
- this.$$set({ indeterminate });
2449
+ set error(error) {
2450
+ this.$$set({ error });
2465
2451
  flush();
2466
2452
  }
2467
2453
 
2468
- get error() {
2469
- return this.$$.ctx[12];
2454
+ get testid() {
2455
+ return this.$$.ctx[4];
2470
2456
  }
2471
2457
 
2472
- set error(error) {
2473
- this.$$set({ error });
2458
+ set testid(testid) {
2459
+ this.$$set({ testid });
2474
2460
  flush();
2475
2461
  }
2476
2462
  }
@@ -2655,7 +2641,7 @@ const messageChannel$1 = writable({});
2655
2641
 
2656
2642
  /* libs/web-components/src/components/dropdown/Dropdown.svelte generated by Svelte v3.44.3 */
2657
2643
 
2658
- function create_if_block_3$3(ctx) {
2644
+ function create_if_block_3$4(ctx) {
2659
2645
  let div;
2660
2646
  let div_data_testid_value;
2661
2647
  let mounted;
@@ -2853,7 +2839,7 @@ function create_fragment$j(ctx) {
2853
2839
  let t0;
2854
2840
  let div0;
2855
2841
  let t1;
2856
- let if_block0 = /*isMenuVisible*/ ctx[5] && create_if_block_3$3(ctx);
2842
+ let if_block0 = /*isMenuVisible*/ ctx[5] && create_if_block_3$4(ctx);
2857
2843
  let if_block1 = (!/*isMenuVisible*/ ctx[5] || !/*isAutoComplete*/ ctx[9]) && create_if_block_2$5(ctx);
2858
2844
  let if_block2 = /*isMenuVisible*/ ctx[5] && create_if_block$a(ctx);
2859
2845
 
@@ -2884,7 +2870,7 @@ function create_fragment$j(ctx) {
2884
2870
  if (if_block0) {
2885
2871
  if_block0.p(ctx, dirty);
2886
2872
  } else {
2887
- if_block0 = create_if_block_3$3(ctx);
2873
+ if_block0 = create_if_block_3$4(ctx);
2888
2874
  if_block0.c();
2889
2875
  if_block0.m(div1, t0);
2890
2876
  }
@@ -3708,7 +3694,7 @@ function create_if_block_2$4(ctx) {
3708
3694
  let label_1;
3709
3695
  let t0;
3710
3696
  let t1;
3711
- let if_block = /*isOptional*/ ctx[4] && create_if_block_3$2();
3697
+ let if_block = /*isOptional*/ ctx[4] && create_if_block_3$3();
3712
3698
 
3713
3699
  return {
3714
3700
  c() {
@@ -3729,7 +3715,7 @@ function create_if_block_2$4(ctx) {
3729
3715
 
3730
3716
  if (/*isOptional*/ ctx[4]) {
3731
3717
  if (if_block) ; else {
3732
- if_block = create_if_block_3$2();
3718
+ if_block = create_if_block_3$3();
3733
3719
  if_block.c();
3734
3720
  if_block.m(label_1, null);
3735
3721
  }
@@ -3750,7 +3736,7 @@ function create_if_block_2$4(ctx) {
3750
3736
  }
3751
3737
 
3752
3738
  // (18:6) {#if isOptional}
3753
- function create_if_block_3$2(ctx) {
3739
+ function create_if_block_3$3(ctx) {
3754
3740
  let em;
3755
3741
 
3756
3742
  return {
@@ -5279,17 +5265,18 @@ function create_if_block$6(ctx) {
5279
5265
  let div2;
5280
5266
  let div3_intro;
5281
5267
  let div3_outro;
5268
+ let div4_style_value;
5282
5269
  let noscroll_action;
5283
5270
  let div4_intro;
5284
5271
  let div4_outro;
5285
5272
  let current;
5286
5273
  let mounted;
5287
5274
  let dispose;
5288
- let if_block0 = /*title*/ ctx[0] && create_if_block_3$1(ctx);
5289
- let if_block1 = /*isClosable*/ ctx[4] && create_if_block_2$2();
5275
+ let if_block0 = /*title*/ ctx[0] && create_if_block_3$2(ctx);
5276
+ let if_block1 = /*isClosable*/ ctx[4] && create_if_block_2$2(ctx);
5290
5277
 
5291
5278
  function select_block_type(ctx, dirty) {
5292
- if (/*isScrollable*/ ctx[3]) return create_if_block_1$4;
5279
+ if (/*isScrollable*/ ctx[5]) return create_if_block_1$4;
5293
5280
  return create_else_block$2;
5294
5281
  }
5295
5282
 
@@ -5313,12 +5300,16 @@ function create_if_block$6(ctx) {
5313
5300
  t4 = space();
5314
5301
  div2 = element("div");
5315
5302
  div2.innerHTML = `<slot name="actions"></slot>`;
5303
+ attr(div0, "data-testid", "modal-overlay");
5316
5304
  attr(div0, "class", "modal-overlay");
5305
+ attr(div1, "data-testid", "modal-content");
5317
5306
  attr(div1, "class", "modal-content");
5307
+ attr(div2, "data-testid", "modal-actions");
5318
5308
  attr(div2, "class", "modal-actions");
5319
5309
  attr(div3, "class", "modal-pane");
5310
+ attr(div4, "data-testid", "modal");
5320
5311
  attr(div4, "class", "modal");
5321
- set_style(div4, "--scroll-offset", /*scrollOffset*/ ctx[2] + "px");
5312
+ attr(div4, "style", div4_style_value = "--scroll-offset: " + /*scrollOffset*/ ctx[3] + "px; " + (/*width*/ ctx[1] && `--width: ${/*width*/ ctx[1]};`) + ";");
5322
5313
  },
5323
5314
  m(target, anchor) {
5324
5315
  insert(target, div4, anchor);
@@ -5339,8 +5330,8 @@ function create_if_block$6(ctx) {
5339
5330
 
5340
5331
  if (!mounted) {
5341
5332
  dispose = [
5342
- listen(div0, "click", close),
5343
- action_destroyer(noscroll_action = noScroll.call(null, div4, { enable: /*isOpen*/ ctx[1] }))
5333
+ listen(div0, "click", /*close*/ ctx[6]),
5334
+ action_destroyer(noscroll_action = noScroll.call(null, div4, { enable: /*isOpen*/ ctx[2] }))
5344
5335
  ];
5345
5336
 
5346
5337
  mounted = true;
@@ -5351,7 +5342,7 @@ function create_if_block$6(ctx) {
5351
5342
  if (if_block0) {
5352
5343
  if_block0.p(ctx, dirty);
5353
5344
  } else {
5354
- if_block0 = create_if_block_3$1(ctx);
5345
+ if_block0 = create_if_block_3$2(ctx);
5355
5346
  if_block0.c();
5356
5347
  if_block0.m(div3, t1);
5357
5348
  }
@@ -5364,7 +5355,7 @@ function create_if_block$6(ctx) {
5364
5355
  if (if_block1) {
5365
5356
  if_block1.p(ctx, dirty);
5366
5357
  } else {
5367
- if_block1 = create_if_block_2$2();
5358
+ if_block1 = create_if_block_2$2(ctx);
5368
5359
  if_block1.c();
5369
5360
  if_block1.m(div3, t2);
5370
5361
  }
@@ -5383,11 +5374,11 @@ function create_if_block$6(ctx) {
5383
5374
  }
5384
5375
  }
5385
5376
 
5386
- if (!current || dirty & /*scrollOffset*/ 4) {
5387
- set_style(div4, "--scroll-offset", /*scrollOffset*/ ctx[2] + "px");
5377
+ if (!current || dirty & /*scrollOffset, width*/ 10 && div4_style_value !== (div4_style_value = "--scroll-offset: " + /*scrollOffset*/ ctx[3] + "px; " + (/*width*/ ctx[1] && `--width: ${/*width*/ ctx[1]};`) + ";")) {
5378
+ attr(div4, "style", div4_style_value);
5388
5379
  }
5389
5380
 
5390
- if (noscroll_action && is_function(noscroll_action.update) && dirty & /*isOpen*/ 2) noscroll_action.update.call(null, { enable: /*isOpen*/ ctx[1] });
5381
+ if (noscroll_action && is_function(noscroll_action.update) && dirty & /*isOpen*/ 4) noscroll_action.update.call(null, { enable: /*isOpen*/ ctx[2] });
5391
5382
  },
5392
5383
  i(local) {
5393
5384
  if (current) return;
@@ -5426,8 +5417,8 @@ function create_if_block$6(ctx) {
5426
5417
  };
5427
5418
  }
5428
5419
 
5429
- // (38:6) {#if title}
5430
- function create_if_block_3$1(ctx) {
5420
+ // (49:6) {#if title}
5421
+ function create_if_block_3$2(ctx) {
5431
5422
  let div;
5432
5423
  let t;
5433
5424
 
@@ -5435,6 +5426,7 @@ function create_if_block_3$1(ctx) {
5435
5426
  c() {
5436
5427
  div = element("div");
5437
5428
  t = text(/*title*/ ctx[0]);
5429
+ attr(div, "data-testid", "modal-title");
5438
5430
  attr(div, "class", "modal-title");
5439
5431
  },
5440
5432
  m(target, anchor) {
@@ -5450,7 +5442,7 @@ function create_if_block_3$1(ctx) {
5450
5442
  };
5451
5443
  }
5452
5444
 
5453
- // (41:6) {#if isClosable}
5445
+ // (52:6) {#if isClosable}
5454
5446
  function create_if_block_2$2(ctx) {
5455
5447
  let div;
5456
5448
  let goa_icon_button;
@@ -5461,6 +5453,7 @@ function create_if_block_2$2(ctx) {
5461
5453
  c() {
5462
5454
  div = element("div");
5463
5455
  goa_icon_button = element("goa-icon-button");
5456
+ set_custom_element_data(goa_icon_button, "testid", "modal-close-button");
5464
5457
  set_custom_element_data(goa_icon_button, "type", "close");
5465
5458
  attr(div, "class", "modal-close");
5466
5459
  },
@@ -5469,7 +5462,7 @@ function create_if_block_2$2(ctx) {
5469
5462
  append(div, goa_icon_button);
5470
5463
 
5471
5464
  if (!mounted) {
5472
- dispose = listen(goa_icon_button, "click", close);
5465
+ dispose = listen(goa_icon_button, "click", /*close*/ ctx[6]);
5473
5466
  mounted = true;
5474
5467
  }
5475
5468
  },
@@ -5482,7 +5475,7 @@ function create_if_block_2$2(ctx) {
5482
5475
  };
5483
5476
  }
5484
5477
 
5485
- // (51:8) {:else}
5478
+ // (62:8) {:else}
5486
5479
  function create_else_block$2(ctx) {
5487
5480
  let div;
5488
5481
 
@@ -5501,7 +5494,7 @@ function create_else_block$2(ctx) {
5501
5494
  };
5502
5495
  }
5503
5496
 
5504
- // (47:8) {#if isScrollable}
5497
+ // (58:8) {#if isScrollable}
5505
5498
  function create_if_block_1$4(ctx) {
5506
5499
  let goa_scrollable;
5507
5500
 
@@ -5525,7 +5518,7 @@ function create_if_block_1$4(ctx) {
5525
5518
  function create_fragment$b(ctx) {
5526
5519
  let if_block_anchor;
5527
5520
  let current;
5528
- let if_block = /*isOpen*/ ctx[1] && create_if_block$6(ctx);
5521
+ let if_block = /*isOpen*/ ctx[2] && create_if_block$6(ctx);
5529
5522
 
5530
5523
  return {
5531
5524
  c() {
@@ -5539,11 +5532,11 @@ function create_fragment$b(ctx) {
5539
5532
  current = true;
5540
5533
  },
5541
5534
  p(ctx, [dirty]) {
5542
- if (/*isOpen*/ ctx[1]) {
5535
+ if (/*isOpen*/ ctx[2]) {
5543
5536
  if (if_block) {
5544
5537
  if_block.p(ctx, dirty);
5545
5538
 
5546
- if (dirty & /*isOpen*/ 2) {
5539
+ if (dirty & /*isOpen*/ 4) {
5547
5540
  transition_in(if_block, 1);
5548
5541
  }
5549
5542
  } else {
@@ -5578,46 +5571,51 @@ function create_fragment$b(ctx) {
5578
5571
  };
5579
5572
  }
5580
5573
 
5581
- function close(e) {
5582
- e.target.dispatchEvent(new CustomEvent("_close", { composed: true }));
5583
- e.stopPropagation();
5584
- }
5585
-
5586
5574
  function instance$a($$self, $$props, $$invalidate) {
5587
5575
  let isClosable;
5588
5576
  let isScrollable;
5589
5577
  let isOpen;
5590
- console.log('here');
5591
5578
  let { title } = $$props;
5592
5579
  let { closable } = $$props;
5593
5580
  let { scrollable } = $$props;
5594
5581
  let { open } = $$props;
5582
+ let { width } = $$props;
5595
5583
  let scrollOffset = 0;
5596
5584
 
5585
+ function close(e) {
5586
+ if (!isClosable) {
5587
+ return;
5588
+ }
5589
+
5590
+ e.target.dispatchEvent(new CustomEvent("_close", { composed: true }));
5591
+ e.stopPropagation();
5592
+ }
5593
+
5597
5594
  $$self.$$set = $$props => {
5598
5595
  if ('title' in $$props) $$invalidate(0, title = $$props.title);
5599
- if ('closable' in $$props) $$invalidate(5, closable = $$props.closable);
5600
- if ('scrollable' in $$props) $$invalidate(6, scrollable = $$props.scrollable);
5601
- if ('open' in $$props) $$invalidate(7, open = $$props.open);
5596
+ if ('closable' in $$props) $$invalidate(7, closable = $$props.closable);
5597
+ if ('scrollable' in $$props) $$invalidate(8, scrollable = $$props.scrollable);
5598
+ if ('open' in $$props) $$invalidate(9, open = $$props.open);
5599
+ if ('width' in $$props) $$invalidate(1, width = $$props.width);
5602
5600
  };
5603
5601
 
5604
5602
  $$self.$$.update = () => {
5605
- if ($$self.$$.dirty & /*closable*/ 32) {
5603
+ if ($$self.$$.dirty & /*closable*/ 128) {
5606
5604
  $$invalidate(4, isClosable = toBoolean(closable));
5607
5605
  }
5608
5606
 
5609
- if ($$self.$$.dirty & /*scrollable*/ 64) {
5610
- $$invalidate(3, isScrollable = toBoolean(scrollable));
5607
+ if ($$self.$$.dirty & /*scrollable*/ 256) {
5608
+ $$invalidate(5, isScrollable = toBoolean(scrollable));
5611
5609
  }
5612
5610
 
5613
- if ($$self.$$.dirty & /*open*/ 128) {
5614
- $$invalidate(1, isOpen = toBoolean(open));
5611
+ if ($$self.$$.dirty & /*open*/ 512) {
5612
+ $$invalidate(2, isOpen = toBoolean(open));
5615
5613
  }
5616
5614
 
5617
- if ($$self.$$.dirty & /*isOpen*/ 2) {
5615
+ if ($$self.$$.dirty & /*isOpen*/ 4) {
5618
5616
  {
5619
5617
  if (isOpen) {
5620
- $$invalidate(2, scrollOffset = window.pageYOffset);
5618
+ $$invalidate(3, scrollOffset = window.pageYOffset);
5621
5619
  }
5622
5620
  }
5623
5621
  }
@@ -5625,10 +5623,12 @@ function instance$a($$self, $$props, $$invalidate) {
5625
5623
 
5626
5624
  return [
5627
5625
  title,
5626
+ width,
5628
5627
  isOpen,
5629
5628
  scrollOffset,
5630
- isScrollable,
5631
5629
  isClosable,
5630
+ isScrollable,
5631
+ close,
5632
5632
  closable,
5633
5633
  scrollable,
5634
5634
  open
@@ -5638,7 +5638,7 @@ function instance$a($$self, $$props, $$invalidate) {
5638
5638
  class Modal extends SvelteElement {
5639
5639
  constructor(options) {
5640
5640
  super();
5641
- this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.modal{font-family:var(--font-family);position:absolute;top:var(--scroll-offset, 0);left:0;display:flex;align-items:center;justify-content:center;height:100vh;width:100%;z-index:100}.modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.2);z-index:1000}.modal-pane{position:relative;background-color:#fff;z-index:1001;max-width:60ch;margin:1rem;box-shadow:var(--shadow-2);border-radius:4px;width:90%;max-height:90%}@media(min-width: 640px){.modal-pane{margin:1rem;max-height:80%;width:600px}}@media(min-width: 1024px){.modal-pane{width:65ch;max-height:80%}}.modal-actions{text-align:right;padding:0 1.75rem;margin:1.75rem 0;flex:1 1 auto}.modal-close{position:absolute;top:1rem;right:1rem}.modal-title{font-size:var(--fs-xl);padding-bottom:1rem;padding:0 1.75rem;margin:1.75rem 0;margin-right:40px;flex:0 0 auto}</style>`;
5641
+ this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.modal{font-family:var(--font-family);position:absolute;top:var(--scroll-offset, 0);left:0;display:flex;align-items:center;justify-content:center;height:100vh;width:100%;z-index:100}.modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.2);z-index:1000}.modal-pane{position:relative;background-color:#fff;z-index:1001;max-width:var(--width, 60ch);margin:1rem;box-shadow:var(--shadow-2);border-radius:4px;max-height:90%}@media(min-width: 640px){.modal-pane{max-height:80%}}.modal-actions{text-align:right;padding:0 1.75rem;margin:1.75rem 0;flex:1 1 auto}.modal-close{position:absolute;top:1rem;right:1rem}.modal-title{font-size:var(--fs-xl);padding-bottom:1rem;padding:0 1.75rem;margin:1.75rem 0;margin-right:40px;flex:0 0 auto}</style>`;
5642
5642
 
5643
5643
  init(
5644
5644
  this,
@@ -5652,9 +5652,10 @@ class Modal extends SvelteElement {
5652
5652
  safe_not_equal,
5653
5653
  {
5654
5654
  title: 0,
5655
- closable: 5,
5656
- scrollable: 6,
5657
- open: 7
5655
+ closable: 7,
5656
+ scrollable: 8,
5657
+ open: 9,
5658
+ width: 1
5658
5659
  },
5659
5660
  null
5660
5661
  );
@@ -5672,7 +5673,7 @@ class Modal extends SvelteElement {
5672
5673
  }
5673
5674
 
5674
5675
  static get observedAttributes() {
5675
- return ["title", "closable", "scrollable", "open"];
5676
+ return ["title", "closable", "scrollable", "open", "width"];
5676
5677
  }
5677
5678
 
5678
5679
  get title() {
@@ -5685,7 +5686,7 @@ class Modal extends SvelteElement {
5685
5686
  }
5686
5687
 
5687
5688
  get closable() {
5688
- return this.$$.ctx[5];
5689
+ return this.$$.ctx[7];
5689
5690
  }
5690
5691
 
5691
5692
  set closable(closable) {
@@ -5694,7 +5695,7 @@ class Modal extends SvelteElement {
5694
5695
  }
5695
5696
 
5696
5697
  get scrollable() {
5697
- return this.$$.ctx[6];
5698
+ return this.$$.ctx[8];
5698
5699
  }
5699
5700
 
5700
5701
  set scrollable(scrollable) {
@@ -5703,13 +5704,22 @@ class Modal extends SvelteElement {
5703
5704
  }
5704
5705
 
5705
5706
  get open() {
5706
- return this.$$.ctx[7];
5707
+ return this.$$.ctx[9];
5707
5708
  }
5708
5709
 
5709
5710
  set open(open) {
5710
5711
  this.$$set({ open });
5711
5712
  flush();
5712
5713
  }
5714
+
5715
+ get width() {
5716
+ return this.$$.ctx[1];
5717
+ }
5718
+
5719
+ set width(width) {
5720
+ this.$$set({ width });
5721
+ flush();
5722
+ }
5713
5723
  }
5714
5724
 
5715
5725
  customElements.define("goa-modal", Modal);
@@ -6061,7 +6071,7 @@ function create_else_block$1(ctx) {
6061
6071
  let goa_spinner;
6062
6072
  let goa_spinner_progress_value;
6063
6073
  let t;
6064
- let if_block = /*message*/ ctx[1] && create_if_block_3(ctx);
6074
+ let if_block = /*message*/ ctx[1] && create_if_block_3$1(ctx);
6065
6075
 
6066
6076
  return {
6067
6077
  c() {
@@ -6093,7 +6103,7 @@ function create_else_block$1(ctx) {
6093
6103
  if (if_block) {
6094
6104
  if_block.p(ctx, dirty);
6095
6105
  } else {
6096
- if_block = create_if_block_3(ctx);
6106
+ if_block = create_if_block_3$1(ctx);
6097
6107
  if_block.c();
6098
6108
  if_block.m(div, null);
6099
6109
  }
@@ -6202,7 +6212,7 @@ function create_if_block_1$3(ctx) {
6202
6212
  }
6203
6213
 
6204
6214
  // (30:6) {#if message}
6205
- function create_if_block_3(ctx) {
6215
+ function create_if_block_3$1(ctx) {
6206
6216
  let div;
6207
6217
  let t;
6208
6218
 
@@ -7019,7 +7029,7 @@ customElements.define("goa-scrollable", Scrollable);
7019
7029
 
7020
7030
  /* libs/web-components/src/components/service-level-header/ServiceLevelHeader.svelte generated by Svelte v3.44.3 */
7021
7031
 
7022
- function create_if_block_2(ctx) {
7032
+ function create_if_block_3(ctx) {
7023
7033
  let div0;
7024
7034
  let t0;
7025
7035
  let div1;
@@ -7048,7 +7058,7 @@ function create_if_block_2(ctx) {
7048
7058
  };
7049
7059
  }
7050
7060
 
7051
- // (27:2) {#if level !== "live"}
7061
+ // (28:2) {#if level !== "live"}
7052
7062
  function create_if_block_1$2(ctx) {
7053
7063
  let div0;
7054
7064
  let t0_value = capitalize(/*level*/ ctx[0]) + "";
@@ -7056,6 +7066,10 @@ function create_if_block_1$2(ctx) {
7056
7066
  let div0_class_value;
7057
7067
  let t1;
7058
7068
  let div1;
7069
+ let t2;
7070
+ let a;
7071
+ let t4;
7072
+ let if_block = /*feedbackurl*/ ctx[2] && create_if_block_2(ctx);
7059
7073
 
7060
7074
  return {
7061
7075
  c() {
@@ -7063,9 +7077,16 @@ function create_if_block_1$2(ctx) {
7063
7077
  t0 = text(t0_value);
7064
7078
  t1 = space();
7065
7079
  div1 = element("div");
7066
- div1.innerHTML = `This is a new <a href="https://www.alberta.ca/index.aspx" class="web-link">Alberta Government</a> service`;
7080
+ t2 = text("This is a new ");
7081
+ a = element("a");
7082
+ a.textContent = "Alberta Government";
7083
+ t4 = text(" service\n ");
7084
+ if (if_block) if_block.c();
7067
7085
  attr(div0, "data-testid", "level");
7068
7086
  attr(div0, "class", div0_class_value = "service-level service-level--" + /*level*/ ctx[0]?.toLowerCase());
7087
+ attr(a, "href", "https://www.alberta.ca/index.aspx");
7088
+ attr(a, "class", "web-link");
7089
+ attr(div1, "data-testid", "site-text");
7069
7090
  attr(div1, "class", "site-text");
7070
7091
  },
7071
7092
  m(target, anchor) {
@@ -7073,6 +7094,10 @@ function create_if_block_1$2(ctx) {
7073
7094
  append(div0, t0);
7074
7095
  insert(target, t1, anchor);
7075
7096
  insert(target, div1, anchor);
7097
+ append(div1, t2);
7098
+ append(div1, a);
7099
+ append(div1, t4);
7100
+ if (if_block) if_block.m(div1, null);
7076
7101
  },
7077
7102
  p(ctx, dirty) {
7078
7103
  if (dirty & /*level*/ 1 && t0_value !== (t0_value = capitalize(/*level*/ ctx[0]) + "")) set_data(t0, t0_value);
@@ -7080,16 +7105,64 @@ function create_if_block_1$2(ctx) {
7080
7105
  if (dirty & /*level*/ 1 && div0_class_value !== (div0_class_value = "service-level service-level--" + /*level*/ ctx[0]?.toLowerCase())) {
7081
7106
  attr(div0, "class", div0_class_value);
7082
7107
  }
7108
+
7109
+ if (/*feedbackurl*/ ctx[2]) {
7110
+ if (if_block) {
7111
+ if_block.p(ctx, dirty);
7112
+ } else {
7113
+ if_block = create_if_block_2(ctx);
7114
+ if_block.c();
7115
+ if_block.m(div1, null);
7116
+ }
7117
+ } else if (if_block) {
7118
+ if_block.d(1);
7119
+ if_block = null;
7120
+ }
7083
7121
  },
7084
7122
  d(detaching) {
7085
7123
  if (detaching) detach(div0);
7086
7124
  if (detaching) detach(t1);
7087
7125
  if (detaching) detach(div1);
7126
+ if (if_block) if_block.d();
7127
+ }
7128
+ };
7129
+ }
7130
+
7131
+ // (34:6) {#if feedbackurl}
7132
+ function create_if_block_2(ctx) {
7133
+ let span;
7134
+ let t0;
7135
+ let a;
7136
+ let t1;
7137
+
7138
+ return {
7139
+ c() {
7140
+ span = element("span");
7141
+ t0 = text("— help us improve it by giving ");
7142
+ a = element("a");
7143
+ t1 = text("feedback");
7144
+ attr(a, "href", /*feedbackurl*/ ctx[2]);
7145
+ attr(a, "class", "web-link");
7146
+ attr(span, "data-testid", "feedback");
7147
+ },
7148
+ m(target, anchor) {
7149
+ insert(target, span, anchor);
7150
+ append(span, t0);
7151
+ append(span, a);
7152
+ append(a, t1);
7153
+ },
7154
+ p(ctx, dirty) {
7155
+ if (dirty & /*feedbackurl*/ 4) {
7156
+ attr(a, "href", /*feedbackurl*/ ctx[2]);
7157
+ }
7158
+ },
7159
+ d(detaching) {
7160
+ if (detaching) detach(span);
7088
7161
  }
7089
7162
  };
7090
7163
  }
7091
7164
 
7092
- // (36:2) {#if version}
7165
+ // (40:2) {#if version}
7093
7166
  function create_if_block$3(ctx) {
7094
7167
  let div;
7095
7168
  let t;
@@ -7120,7 +7193,7 @@ function create_fragment$4(ctx) {
7120
7193
  let t1;
7121
7194
  let div;
7122
7195
  let t2;
7123
- let if_block0 = /*level*/ ctx[0] === "live" && create_if_block_2();
7196
+ let if_block0 = /*level*/ ctx[0] === "live" && create_if_block_3();
7124
7197
  let if_block1 = /*level*/ ctx[0] !== "live" && create_if_block_1$2(ctx);
7125
7198
  let if_block2 = /*version*/ ctx[1] && create_if_block$3(ctx);
7126
7199
 
@@ -7151,7 +7224,7 @@ function create_fragment$4(ctx) {
7151
7224
  p(ctx, [dirty]) {
7152
7225
  if (/*level*/ ctx[0] === "live") {
7153
7226
  if (if_block0) ; else {
7154
- if_block0 = create_if_block_2();
7227
+ if_block0 = create_if_block_3();
7155
7228
  if_block0.c();
7156
7229
  if_block0.m(header, t0);
7157
7230
  }
@@ -7205,13 +7278,15 @@ function capitalize(val) {
7205
7278
  function instance$4($$self, $$props, $$invalidate) {
7206
7279
  let { level } = $$props;
7207
7280
  let { version } = $$props;
7281
+ let { feedbackurl } = $$props;
7208
7282
 
7209
7283
  $$self.$$set = $$props => {
7210
7284
  if ('level' in $$props) $$invalidate(0, level = $$props.level);
7211
7285
  if ('version' in $$props) $$invalidate(1, version = $$props.version);
7286
+ if ('feedbackurl' in $$props) $$invalidate(2, feedbackurl = $$props.feedbackurl);
7212
7287
  };
7213
7288
 
7214
- return [level, version];
7289
+ return [level, version, feedbackurl];
7215
7290
  }
7216
7291
 
7217
7292
  class ServiceLevelHeader extends SvelteElement {
@@ -7229,7 +7304,7 @@ class ServiceLevelHeader extends SvelteElement {
7229
7304
  instance$4,
7230
7305
  create_fragment$4,
7231
7306
  safe_not_equal,
7232
- { level: 0, version: 1 },
7307
+ { level: 0, version: 1, feedbackurl: 2 },
7233
7308
  null
7234
7309
  );
7235
7310
 
@@ -7246,7 +7321,7 @@ class ServiceLevelHeader extends SvelteElement {
7246
7321
  }
7247
7322
 
7248
7323
  static get observedAttributes() {
7249
- return ["level", "version"];
7324
+ return ["level", "version", "feedbackurl"];
7250
7325
  }
7251
7326
 
7252
7327
  get level() {
@@ -7266,6 +7341,15 @@ class ServiceLevelHeader extends SvelteElement {
7266
7341
  this.$$set({ version });
7267
7342
  flush();
7268
7343
  }
7344
+
7345
+ get feedbackurl() {
7346
+ return this.$$.ctx[2];
7347
+ }
7348
+
7349
+ set feedbackurl(feedbackurl) {
7350
+ this.$$set({ feedbackurl });
7351
+ flush();
7352
+ }
7269
7353
  }
7270
7354
 
7271
7355
  customElements.define("goa-service-level-header", ServiceLevelHeader);