@abgov/web-components 1.0.0-alpha.23 → 1.0.0-alpha.26

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.
@@ -780,7 +780,7 @@ function create_fragment$w(ctx) {
780
780
  class PageBlock extends SvelteElement {
781
781
  constructor(options) {
782
782
  super();
783
- this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.page-content{max-width:100%;margin:0 auto;padding:0 1.75rem}@media(min-width: 1200px){.page-content{max-width:1440px}}</style>`;
783
+ this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.page-content{max-width:var(--page-width-max);margin:0 auto;padding:0 1.75rem}</style>`;
784
784
 
785
785
  init(
786
786
  this,
@@ -883,7 +883,7 @@ function create_fragment$v(ctx) {
883
883
  }
884
884
 
885
885
  function instance$r($$self, $$props, $$invalidate) {
886
- let { url } = $$props;
886
+ let { url = "#" } = $$props;
887
887
  let { title } = $$props;
888
888
  let { testid = "" } = $$props;
889
889
 
@@ -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]);
2202
+ }
2203
+
2204
+ if (dirty & /*testid*/ 16) {
2205
+ attr(input, "data-testid", /*testid*/ ctx[4]);
2230
2206
  }
2231
2207
 
2232
- if (dirty & /*name*/ 1) {
2233
- attr(input, "name", /*name*/ ctx[0]);
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
  }
@@ -5279,6 +5265,7 @@ 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;
@@ -5286,10 +5273,10 @@ function create_if_block$6(ctx) {
5286
5273
  let mounted;
5287
5274
  let dispose;
5288
5275
  let if_block0 = /*title*/ ctx[0] && create_if_block_3$1(ctx);
5289
- let if_block1 = /*isClosable*/ ctx[4] && create_if_block_2$2();
5276
+ let if_block1 = /*isClosable*/ ctx[5] && create_if_block_2$2();
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[4]) return create_if_block_1$4;
5293
5280
  return create_else_block$2;
5294
5281
  }
5295
5282
 
@@ -5318,7 +5305,7 @@ function create_if_block$6(ctx) {
5318
5305
  attr(div2, "class", "modal-actions");
5319
5306
  attr(div3, "class", "modal-pane");
5320
5307
  attr(div4, "class", "modal");
5321
- set_style(div4, "--scroll-offset", /*scrollOffset*/ ctx[2] + "px");
5308
+ attr(div4, "style", div4_style_value = "--scroll-offset: " + /*scrollOffset*/ ctx[3] + "px; " + (/*width*/ ctx[1] && `--width: ${/*width*/ ctx[1]};`) + ";");
5322
5309
  },
5323
5310
  m(target, anchor) {
5324
5311
  insert(target, div4, anchor);
@@ -5340,7 +5327,7 @@ function create_if_block$6(ctx) {
5340
5327
  if (!mounted) {
5341
5328
  dispose = [
5342
5329
  listen(div0, "click", close),
5343
- action_destroyer(noscroll_action = noScroll.call(null, div4, { enable: /*isOpen*/ ctx[1] }))
5330
+ action_destroyer(noscroll_action = noScroll.call(null, div4, { enable: /*isOpen*/ ctx[2] }))
5344
5331
  ];
5345
5332
 
5346
5333
  mounted = true;
@@ -5360,7 +5347,7 @@ function create_if_block$6(ctx) {
5360
5347
  if_block0 = null;
5361
5348
  }
5362
5349
 
5363
- if (/*isClosable*/ ctx[4]) {
5350
+ if (/*isClosable*/ ctx[5]) {
5364
5351
  if (if_block1) {
5365
5352
  if_block1.p(ctx, dirty);
5366
5353
  } else {
@@ -5383,11 +5370,11 @@ function create_if_block$6(ctx) {
5383
5370
  }
5384
5371
  }
5385
5372
 
5386
- if (!current || dirty & /*scrollOffset*/ 4) {
5387
- set_style(div4, "--scroll-offset", /*scrollOffset*/ ctx[2] + "px");
5373
+ 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]};`) + ";")) {
5374
+ attr(div4, "style", div4_style_value);
5388
5375
  }
5389
5376
 
5390
- if (noscroll_action && is_function(noscroll_action.update) && dirty & /*isOpen*/ 2) noscroll_action.update.call(null, { enable: /*isOpen*/ ctx[1] });
5377
+ if (noscroll_action && is_function(noscroll_action.update) && dirty & /*isOpen*/ 4) noscroll_action.update.call(null, { enable: /*isOpen*/ ctx[2] });
5391
5378
  },
5392
5379
  i(local) {
5393
5380
  if (current) return;
@@ -5426,7 +5413,7 @@ function create_if_block$6(ctx) {
5426
5413
  };
5427
5414
  }
5428
5415
 
5429
- // (38:6) {#if title}
5416
+ // (45:6) {#if title}
5430
5417
  function create_if_block_3$1(ctx) {
5431
5418
  let div;
5432
5419
  let t;
@@ -5450,7 +5437,7 @@ function create_if_block_3$1(ctx) {
5450
5437
  };
5451
5438
  }
5452
5439
 
5453
- // (41:6) {#if isClosable}
5440
+ // (48:6) {#if isClosable}
5454
5441
  function create_if_block_2$2(ctx) {
5455
5442
  let div;
5456
5443
  let goa_icon_button;
@@ -5482,7 +5469,7 @@ function create_if_block_2$2(ctx) {
5482
5469
  };
5483
5470
  }
5484
5471
 
5485
- // (51:8) {:else}
5472
+ // (58:8) {:else}
5486
5473
  function create_else_block$2(ctx) {
5487
5474
  let div;
5488
5475
 
@@ -5501,7 +5488,7 @@ function create_else_block$2(ctx) {
5501
5488
  };
5502
5489
  }
5503
5490
 
5504
- // (47:8) {#if isScrollable}
5491
+ // (54:8) {#if isScrollable}
5505
5492
  function create_if_block_1$4(ctx) {
5506
5493
  let goa_scrollable;
5507
5494
 
@@ -5525,7 +5512,7 @@ function create_if_block_1$4(ctx) {
5525
5512
  function create_fragment$b(ctx) {
5526
5513
  let if_block_anchor;
5527
5514
  let current;
5528
- let if_block = /*isOpen*/ ctx[1] && create_if_block$6(ctx);
5515
+ let if_block = /*isOpen*/ ctx[2] && create_if_block$6(ctx);
5529
5516
 
5530
5517
  return {
5531
5518
  c() {
@@ -5539,11 +5526,11 @@ function create_fragment$b(ctx) {
5539
5526
  current = true;
5540
5527
  },
5541
5528
  p(ctx, [dirty]) {
5542
- if (/*isOpen*/ ctx[1]) {
5529
+ if (/*isOpen*/ ctx[2]) {
5543
5530
  if (if_block) {
5544
5531
  if_block.p(ctx, dirty);
5545
5532
 
5546
- if (dirty & /*isOpen*/ 2) {
5533
+ if (dirty & /*isOpen*/ 4) {
5547
5534
  transition_in(if_block, 1);
5548
5535
  }
5549
5536
  } else {
@@ -5587,37 +5574,38 @@ function instance$a($$self, $$props, $$invalidate) {
5587
5574
  let isClosable;
5588
5575
  let isScrollable;
5589
5576
  let isOpen;
5590
- console.log('here');
5591
5577
  let { title } = $$props;
5592
5578
  let { closable } = $$props;
5593
5579
  let { scrollable } = $$props;
5594
5580
  let { open } = $$props;
5581
+ let { width } = $$props;
5595
5582
  let scrollOffset = 0;
5596
5583
 
5597
5584
  $$self.$$set = $$props => {
5598
5585
  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);
5586
+ if ('closable' in $$props) $$invalidate(6, closable = $$props.closable);
5587
+ if ('scrollable' in $$props) $$invalidate(7, scrollable = $$props.scrollable);
5588
+ if ('open' in $$props) $$invalidate(8, open = $$props.open);
5589
+ if ('width' in $$props) $$invalidate(1, width = $$props.width);
5602
5590
  };
5603
5591
 
5604
5592
  $$self.$$.update = () => {
5605
- if ($$self.$$.dirty & /*closable*/ 32) {
5606
- $$invalidate(4, isClosable = toBoolean(closable));
5593
+ if ($$self.$$.dirty & /*closable*/ 64) {
5594
+ $$invalidate(5, isClosable = toBoolean(closable));
5607
5595
  }
5608
5596
 
5609
- if ($$self.$$.dirty & /*scrollable*/ 64) {
5610
- $$invalidate(3, isScrollable = toBoolean(scrollable));
5597
+ if ($$self.$$.dirty & /*scrollable*/ 128) {
5598
+ $$invalidate(4, isScrollable = toBoolean(scrollable));
5611
5599
  }
5612
5600
 
5613
- if ($$self.$$.dirty & /*open*/ 128) {
5614
- $$invalidate(1, isOpen = toBoolean(open));
5601
+ if ($$self.$$.dirty & /*open*/ 256) {
5602
+ $$invalidate(2, isOpen = toBoolean(open));
5615
5603
  }
5616
5604
 
5617
- if ($$self.$$.dirty & /*isOpen*/ 2) {
5605
+ if ($$self.$$.dirty & /*isOpen*/ 4) {
5618
5606
  {
5619
5607
  if (isOpen) {
5620
- $$invalidate(2, scrollOffset = window.pageYOffset);
5608
+ $$invalidate(3, scrollOffset = window.pageYOffset);
5621
5609
  }
5622
5610
  }
5623
5611
  }
@@ -5625,6 +5613,7 @@ function instance$a($$self, $$props, $$invalidate) {
5625
5613
 
5626
5614
  return [
5627
5615
  title,
5616
+ width,
5628
5617
  isOpen,
5629
5618
  scrollOffset,
5630
5619
  isScrollable,
@@ -5638,7 +5627,7 @@ function instance$a($$self, $$props, $$invalidate) {
5638
5627
  class Modal extends SvelteElement {
5639
5628
  constructor(options) {
5640
5629
  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>`;
5630
+ 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
5631
 
5643
5632
  init(
5644
5633
  this,
@@ -5652,9 +5641,10 @@ class Modal extends SvelteElement {
5652
5641
  safe_not_equal,
5653
5642
  {
5654
5643
  title: 0,
5655
- closable: 5,
5656
- scrollable: 6,
5657
- open: 7
5644
+ closable: 6,
5645
+ scrollable: 7,
5646
+ open: 8,
5647
+ width: 1
5658
5648
  },
5659
5649
  null
5660
5650
  );
@@ -5672,7 +5662,7 @@ class Modal extends SvelteElement {
5672
5662
  }
5673
5663
 
5674
5664
  static get observedAttributes() {
5675
- return ["title", "closable", "scrollable", "open"];
5665
+ return ["title", "closable", "scrollable", "open", "width"];
5676
5666
  }
5677
5667
 
5678
5668
  get title() {
@@ -5685,7 +5675,7 @@ class Modal extends SvelteElement {
5685
5675
  }
5686
5676
 
5687
5677
  get closable() {
5688
- return this.$$.ctx[5];
5678
+ return this.$$.ctx[6];
5689
5679
  }
5690
5680
 
5691
5681
  set closable(closable) {
@@ -5694,7 +5684,7 @@ class Modal extends SvelteElement {
5694
5684
  }
5695
5685
 
5696
5686
  get scrollable() {
5697
- return this.$$.ctx[6];
5687
+ return this.$$.ctx[7];
5698
5688
  }
5699
5689
 
5700
5690
  set scrollable(scrollable) {
@@ -5703,13 +5693,22 @@ class Modal extends SvelteElement {
5703
5693
  }
5704
5694
 
5705
5695
  get open() {
5706
- return this.$$.ctx[7];
5696
+ return this.$$.ctx[8];
5707
5697
  }
5708
5698
 
5709
5699
  set open(open) {
5710
5700
  this.$$set({ open });
5711
5701
  flush();
5712
5702
  }
5703
+
5704
+ get width() {
5705
+ return this.$$.ctx[1];
5706
+ }
5707
+
5708
+ set width(width) {
5709
+ this.$$set({ width });
5710
+ flush();
5711
+ }
5713
5712
  }
5714
5713
 
5715
5714
  customElements.define("goa-modal", Modal);