@abgov/react-components 4.0.0-alpha.127 → 4.0.0-alpha.129

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.
@@ -6725,16 +6725,16 @@ customElements.define("goa-divider", Divider);
6725
6725
 
6726
6726
  function get_each_context_1(ctx, list, i) {
6727
6727
  const child_ctx = ctx.slice();
6728
- child_ctx[49] = list[i];
6729
- child_ctx[53] = i;
6728
+ child_ctx[48] = list[i];
6729
+ child_ctx[52] = i;
6730
6730
  return child_ctx;
6731
6731
  }
6732
6732
 
6733
6733
  function get_each_context$4(ctx, list, i) {
6734
6734
  const child_ctx = ctx.slice();
6735
- child_ctx[49] = list[i];
6735
+ child_ctx[48] = list[i];
6736
6736
  return child_ctx;
6737
- } // (256:2) {:else}
6737
+ } // (259:2) {:else}
6738
6738
 
6739
6739
 
6740
6740
  function create_else_block$5(ctx) {
@@ -6753,14 +6753,14 @@ function create_else_block$5(ctx) {
6753
6753
  let dispose;
6754
6754
  let if_block =
6755
6755
  /*_isMenuVisible*/
6756
- ctx[15] && create_if_block_1$7(ctx);
6756
+ ctx[17] && create_if_block_1$7(ctx);
6757
6757
  let each_value_1 =
6758
6758
  /*_options*/
6759
- ctx[13];
6759
+ ctx[12];
6760
6760
 
6761
6761
  const get_key = ctx =>
6762
6762
  /*index*/
6763
- ctx[53];
6763
+ ctx[52];
6764
6764
 
6765
6765
  for (let i = 0; i < each_value_1.length; i += 1) {
6766
6766
  let child_ctx = get_each_context_1(ctx, each_value_1, i);
@@ -6797,7 +6797,7 @@ function create_else_block$5(ctx) {
6797
6797
  set_custom_element_data(goa_input, "aria-controls", "menu");
6798
6798
  set_custom_element_data(goa_input, "aria-expanded",
6799
6799
  /*_isMenuVisible*/
6800
- ctx[15]);
6800
+ ctx[17]);
6801
6801
  set_custom_element_data(goa_input, "arialabel", goa_input_arialabel_value =
6802
6802
  /*arialabel*/
6803
6803
  ctx[1] ||
@@ -6812,7 +6812,7 @@ function create_else_block$5(ctx) {
6812
6812
  set_custom_element_data(goa_input, "type", "text");
6813
6813
  set_custom_element_data(goa_input, "value",
6814
6814
  /*_selectedLabel*/
6815
- ctx[14]);
6815
+ ctx[16]);
6816
6816
  set_custom_element_data(goa_input, "width", "100%");
6817
6817
  set_custom_element_data(goa_input, "name",
6818
6818
  /*name*/
@@ -6821,7 +6821,7 @@ function create_else_block$5(ctx) {
6821
6821
  attr(ul, "role", "listbox");
6822
6822
  attr(ul, "aria-activedescendant",
6823
6823
  /*_selectedLabel*/
6824
- ctx[14]);
6824
+ ctx[16]);
6825
6825
  attr(ul, "data-testid", "dropdown-menu");
6826
6826
  attr(ul, "tabindex", "0");
6827
6827
  attr(ul, "class", "dropdown-list");
@@ -6830,7 +6830,7 @@ function create_else_block$5(ctx) {
6830
6830
  ctx[3]}`);
6831
6831
  toggle_class(ul, "dropdown-active",
6832
6832
  /*_isMenuVisible*/
6833
- ctx[15]);
6833
+ ctx[17]);
6834
6834
  },
6835
6835
 
6836
6836
  m(target, anchor) {
@@ -6861,7 +6861,7 @@ function create_else_block$5(ctx) {
6861
6861
  p(ctx, dirty) {
6862
6862
  if (
6863
6863
  /*_isMenuVisible*/
6864
- ctx[15]) {
6864
+ ctx[17]) {
6865
6865
  if (if_block) {
6866
6866
  if_block.p(ctx, dirty);
6867
6867
  } else {
@@ -6908,10 +6908,10 @@ function create_else_block$5(ctx) {
6908
6908
 
6909
6909
  if (dirty[0] &
6910
6910
  /*_isMenuVisible*/
6911
- 32768) {
6911
+ 131072) {
6912
6912
  set_custom_element_data(goa_input, "aria-expanded",
6913
6913
  /*_isMenuVisible*/
6914
- ctx[15]);
6914
+ ctx[17]);
6915
6915
  }
6916
6916
 
6917
6917
  if (dirty[0] &
@@ -6934,10 +6934,10 @@ function create_else_block$5(ctx) {
6934
6934
 
6935
6935
  if (dirty[0] &
6936
6936
  /*_selectedLabel*/
6937
- 16384) {
6937
+ 65536) {
6938
6938
  set_custom_element_data(goa_input, "value",
6939
6939
  /*_selectedLabel*/
6940
- ctx[14]);
6940
+ ctx[16]);
6941
6941
  }
6942
6942
 
6943
6943
  if (dirty[0] &
@@ -6950,19 +6950,19 @@ function create_else_block$5(ctx) {
6950
6950
 
6951
6951
  if (dirty[0] &
6952
6952
  /*_options, _values, _highlightedIndex, onSelect*/
6953
- 67186688) {
6953
+ 67407872) {
6954
6954
  each_value_1 =
6955
6955
  /*_options*/
6956
- ctx[13];
6956
+ ctx[12];
6957
6957
  each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value_1, each_1_lookup, ul, destroy_block, create_each_block_1, null, get_each_context_1);
6958
6958
  }
6959
6959
 
6960
6960
  if (dirty[0] &
6961
6961
  /*_selectedLabel*/
6962
- 16384) {
6962
+ 65536) {
6963
6963
  attr(ul, "aria-activedescendant",
6964
6964
  /*_selectedLabel*/
6965
- ctx[14]);
6965
+ ctx[16]);
6966
6966
  }
6967
6967
 
6968
6968
  if (dirty[0] &
@@ -6975,10 +6975,10 @@ function create_else_block$5(ctx) {
6975
6975
 
6976
6976
  if (dirty[0] &
6977
6977
  /*_isMenuVisible*/
6978
- 32768) {
6978
+ 131072) {
6979
6979
  toggle_class(ul, "dropdown-active",
6980
6980
  /*_isMenuVisible*/
6981
- ctx[15]);
6981
+ ctx[17]);
6982
6982
  }
6983
6983
  },
6984
6984
 
@@ -7003,7 +7003,7 @@ function create_else_block$5(ctx) {
7003
7003
  }
7004
7004
 
7005
7005
  };
7006
- } // (237:2) {#if _native}
7006
+ } // (240:2) {#if _native}
7007
7007
 
7008
7008
 
7009
7009
  function create_if_block$f(ctx) {
@@ -7014,7 +7014,7 @@ function create_if_block$f(ctx) {
7014
7014
  let dispose;
7015
7015
  let each_value =
7016
7016
  /*_options*/
7017
- ctx[13];
7017
+ ctx[12];
7018
7018
  let each_blocks = [];
7019
7019
 
7020
7020
  for (let i = 0; i < each_value.length; i += 1) {
@@ -7032,7 +7032,7 @@ function create_if_block$f(ctx) {
7032
7032
 
7033
7033
  select.disabled =
7034
7034
  /*_disabled*/
7035
- ctx[21];
7035
+ ctx[22];
7036
7036
  attr(select, "aria-label", select_aria_label_value =
7037
7037
  /*arialabel*/
7038
7038
  ctx[1] ||
@@ -7066,10 +7066,10 @@ function create_if_block$f(ctx) {
7066
7066
  p(ctx, dirty) {
7067
7067
  if (dirty[0] &
7068
7068
  /*_options*/
7069
- 8192) {
7069
+ 4096) {
7070
7070
  each_value =
7071
7071
  /*_options*/
7072
- ctx[13];
7072
+ ctx[12];
7073
7073
  let i;
7074
7074
 
7075
7075
  for (i = 0; i < each_value.length; i += 1) {
@@ -7093,10 +7093,10 @@ function create_if_block$f(ctx) {
7093
7093
 
7094
7094
  if (dirty[0] &
7095
7095
  /*_disabled*/
7096
- 2097152) {
7096
+ 4194304) {
7097
7097
  select.disabled =
7098
7098
  /*_disabled*/
7099
- ctx[21];
7099
+ ctx[22];
7100
7100
  }
7101
7101
 
7102
7102
  if (dirty[0] &
@@ -7129,7 +7129,7 @@ function create_if_block$f(ctx) {
7129
7129
  }
7130
7130
 
7131
7131
  };
7132
- } // (257:4) {#if _isMenuVisible}
7132
+ } // (260:4) {#if _isMenuVisible}
7133
7133
 
7134
7134
 
7135
7135
  function create_if_block_1$7(ctx) {
@@ -7174,16 +7174,16 @@ function create_if_block_1$7(ctx) {
7174
7174
  }
7175
7175
 
7176
7176
  };
7177
- } // (300:6) {#each _options as option, index (index)}
7177
+ } // (303:6) {#each _options as option, index (index)}
7178
7178
 
7179
7179
 
7180
7180
  function create_each_block_1(key_1, ctx) {
7181
7181
  let li;
7182
7182
  let t0_value = (
7183
7183
  /*option*/
7184
- ctx[49].label ||
7184
+ ctx[48].label ||
7185
7185
  /*option*/
7186
- ctx[49].value) + "";
7186
+ ctx[48].value) + "";
7187
7187
  let t0;
7188
7188
  let t1;
7189
7189
  let li_id_value;
@@ -7201,7 +7201,7 @@ function create_each_block_1(key_1, ctx) {
7201
7201
  /*click_handler*/
7202
7202
  ctx[32](
7203
7203
  /*option*/
7204
- ctx[49])
7204
+ ctx[48])
7205
7205
  );
7206
7206
  }
7207
7207
 
@@ -7215,40 +7215,40 @@ function create_each_block_1(key_1, ctx) {
7215
7215
  t1 = space();
7216
7216
  attr(li, "id", li_id_value =
7217
7217
  /*option*/
7218
- ctx[49].label);
7218
+ ctx[48].label);
7219
7219
  attr(li, "role", "option");
7220
7220
  attr(li, "aria-label", li_aria_label_value =
7221
7221
  /*option*/
7222
- ctx[49].label ||
7222
+ ctx[48].label ||
7223
7223
  /*option*/
7224
- ctx[49].value);
7224
+ ctx[48].value);
7225
7225
  attr(li, "aria-selected", li_aria_selected_value =
7226
7226
  /*_values*/
7227
- ctx[12].includes(
7227
+ ctx[15].includes(
7228
7228
  /*option*/
7229
- ctx[49].value) ? "true" : "false");
7229
+ ctx[48].value) ? "true" : "false");
7230
7230
  attr(li, "class", "dropdown-item");
7231
7231
  attr(li, "data-testid", li_data_testid_value = `dropdown-item-${
7232
7232
  /*option*/
7233
- ctx[49].value}`);
7233
+ ctx[48].value}`);
7234
7234
  attr(li, "data-index", li_data_index_value =
7235
7235
  /*index*/
7236
- ctx[53]);
7236
+ ctx[52]);
7237
7237
  attr(li, "data-value", li_data_value_value =
7238
7238
  /*option*/
7239
- ctx[49].value);
7239
+ ctx[48].value);
7240
7240
  attr(li, "style", li_style_value = `display: ${"block"}`);
7241
7241
  toggle_class(li, "dropdown-item--disabled", false);
7242
7242
  toggle_class(li, "dropdown-item--tabbed",
7243
7243
  /*index*/
7244
- ctx[53] ===
7244
+ ctx[52] ===
7245
7245
  /*_highlightedIndex*/
7246
- ctx[16]);
7246
+ ctx[18]);
7247
7247
  toggle_class(li, "dropdown-item--selected",
7248
7248
  /*_values*/
7249
- ctx[12].includes(
7249
+ ctx[15].includes(
7250
7250
  /*option*/
7251
- ctx[49].value));
7251
+ ctx[48].value));
7252
7252
  this.first = li;
7253
7253
  },
7254
7254
 
@@ -7267,82 +7267,82 @@ function create_each_block_1(key_1, ctx) {
7267
7267
  ctx = new_ctx;
7268
7268
  if (dirty[0] &
7269
7269
  /*_options*/
7270
- 8192 && t0_value !== (t0_value = (
7270
+ 4096 && t0_value !== (t0_value = (
7271
7271
  /*option*/
7272
- ctx[49].label ||
7272
+ ctx[48].label ||
7273
7273
  /*option*/
7274
- ctx[49].value) + "")) set_data(t0, t0_value);
7274
+ ctx[48].value) + "")) set_data(t0, t0_value);
7275
7275
 
7276
7276
  if (dirty[0] &
7277
7277
  /*_options*/
7278
- 8192 && li_id_value !== (li_id_value =
7278
+ 4096 && li_id_value !== (li_id_value =
7279
7279
  /*option*/
7280
- ctx[49].label)) {
7280
+ ctx[48].label)) {
7281
7281
  attr(li, "id", li_id_value);
7282
7282
  }
7283
7283
 
7284
7284
  if (dirty[0] &
7285
7285
  /*_options*/
7286
- 8192 && li_aria_label_value !== (li_aria_label_value =
7286
+ 4096 && li_aria_label_value !== (li_aria_label_value =
7287
7287
  /*option*/
7288
- ctx[49].label ||
7288
+ ctx[48].label ||
7289
7289
  /*option*/
7290
- ctx[49].value)) {
7290
+ ctx[48].value)) {
7291
7291
  attr(li, "aria-label", li_aria_label_value);
7292
7292
  }
7293
7293
 
7294
7294
  if (dirty[0] &
7295
7295
  /*_values, _options*/
7296
- 12288 && li_aria_selected_value !== (li_aria_selected_value =
7296
+ 36864 && li_aria_selected_value !== (li_aria_selected_value =
7297
7297
  /*_values*/
7298
- ctx[12].includes(
7298
+ ctx[15].includes(
7299
7299
  /*option*/
7300
- ctx[49].value) ? "true" : "false")) {
7300
+ ctx[48].value) ? "true" : "false")) {
7301
7301
  attr(li, "aria-selected", li_aria_selected_value);
7302
7302
  }
7303
7303
 
7304
7304
  if (dirty[0] &
7305
7305
  /*_options*/
7306
- 8192 && li_data_testid_value !== (li_data_testid_value = `dropdown-item-${
7306
+ 4096 && li_data_testid_value !== (li_data_testid_value = `dropdown-item-${
7307
7307
  /*option*/
7308
- ctx[49].value}`)) {
7308
+ ctx[48].value}`)) {
7309
7309
  attr(li, "data-testid", li_data_testid_value);
7310
7310
  }
7311
7311
 
7312
7312
  if (dirty[0] &
7313
7313
  /*_options*/
7314
- 8192 && li_data_index_value !== (li_data_index_value =
7314
+ 4096 && li_data_index_value !== (li_data_index_value =
7315
7315
  /*index*/
7316
- ctx[53])) {
7316
+ ctx[52])) {
7317
7317
  attr(li, "data-index", li_data_index_value);
7318
7318
  }
7319
7319
 
7320
7320
  if (dirty[0] &
7321
7321
  /*_options*/
7322
- 8192 && li_data_value_value !== (li_data_value_value =
7322
+ 4096 && li_data_value_value !== (li_data_value_value =
7323
7323
  /*option*/
7324
- ctx[49].value)) {
7324
+ ctx[48].value)) {
7325
7325
  attr(li, "data-value", li_data_value_value);
7326
7326
  }
7327
7327
 
7328
7328
  if (dirty[0] &
7329
7329
  /*_options, _highlightedIndex*/
7330
- 73728) {
7330
+ 266240) {
7331
7331
  toggle_class(li, "dropdown-item--tabbed",
7332
7332
  /*index*/
7333
- ctx[53] ===
7333
+ ctx[52] ===
7334
7334
  /*_highlightedIndex*/
7335
- ctx[16]);
7335
+ ctx[18]);
7336
7336
  }
7337
7337
 
7338
7338
  if (dirty[0] &
7339
7339
  /*_values, _options*/
7340
- 12288) {
7340
+ 36864) {
7341
7341
  toggle_class(li, "dropdown-item--selected",
7342
7342
  /*_values*/
7343
- ctx[12].includes(
7343
+ ctx[15].includes(
7344
7344
  /*option*/
7345
- ctx[49].value));
7345
+ ctx[48].value));
7346
7346
  }
7347
7347
  },
7348
7348
 
@@ -7353,14 +7353,14 @@ function create_each_block_1(key_1, ctx) {
7353
7353
  }
7354
7354
 
7355
7355
  };
7356
- } // (246:6) {#each _options as option}
7356
+ } // (249:6) {#each _options as option}
7357
7357
 
7358
7358
 
7359
7359
  function create_each_block$4(ctx) {
7360
7360
  let option;
7361
7361
  let t0_value =
7362
7362
  /*option*/
7363
- ctx[49].label + "";
7363
+ ctx[48].label + "";
7364
7364
  let t0;
7365
7365
  let t1;
7366
7366
  let option_selected_value;
@@ -7373,14 +7373,14 @@ function create_each_block$4(ctx) {
7373
7373
  t1 = space();
7374
7374
  option.selected = option_selected_value =
7375
7375
  /*option*/
7376
- ctx[49].selected;
7376
+ ctx[48].selected;
7377
7377
  option.__value = option_value_value =
7378
7378
  /*option*/
7379
- ctx[49].value;
7379
+ ctx[48].value;
7380
7380
  option.value = option.__value;
7381
7381
  attr(option, "aria-label", option_aria_label_value =
7382
7382
  /*option*/
7383
- ctx[49].label);
7383
+ ctx[48].label);
7384
7384
  },
7385
7385
 
7386
7386
  m(target, anchor) {
@@ -7392,32 +7392,32 @@ function create_each_block$4(ctx) {
7392
7392
  p(ctx, dirty) {
7393
7393
  if (dirty[0] &
7394
7394
  /*_options*/
7395
- 8192 && t0_value !== (t0_value =
7395
+ 4096 && t0_value !== (t0_value =
7396
7396
  /*option*/
7397
- ctx[49].label + "")) set_data(t0, t0_value);
7397
+ ctx[48].label + "")) set_data(t0, t0_value);
7398
7398
 
7399
7399
  if (dirty[0] &
7400
7400
  /*_options*/
7401
- 8192 && option_selected_value !== (option_selected_value =
7401
+ 4096 && option_selected_value !== (option_selected_value =
7402
7402
  /*option*/
7403
- ctx[49].selected)) {
7403
+ ctx[48].selected)) {
7404
7404
  option.selected = option_selected_value;
7405
7405
  }
7406
7406
 
7407
7407
  if (dirty[0] &
7408
7408
  /*_options*/
7409
- 8192 && option_value_value !== (option_value_value =
7409
+ 4096 && option_value_value !== (option_value_value =
7410
7410
  /*option*/
7411
- ctx[49].value)) {
7411
+ ctx[48].value)) {
7412
7412
  option.__value = option_value_value;
7413
7413
  option.value = option.__value;
7414
7414
  }
7415
7415
 
7416
7416
  if (dirty[0] &
7417
7417
  /*_options*/
7418
- 8192 && option_aria_label_value !== (option_aria_label_value =
7418
+ 4096 && option_aria_label_value !== (option_aria_label_value =
7419
7419
  /*option*/
7420
- ctx[49].label)) {
7420
+ ctx[48].label)) {
7421
7421
  attr(option, "aria-label", option_aria_label_value);
7422
7422
  }
7423
7423
  },
@@ -7437,7 +7437,7 @@ function create_fragment$v(ctx) {
7437
7437
  function select_block_type(ctx, dirty) {
7438
7438
  if (
7439
7439
  /*_native*/
7440
- ctx[22]) return create_if_block$f;
7440
+ ctx[14]) return create_if_block$f;
7441
7441
  return create_else_block$5;
7442
7442
  }
7443
7443
 
@@ -7466,11 +7466,11 @@ function create_fragment$v(ctx) {
7466
7466
  /*width*/
7467
7467
  ctx[5] ||
7468
7468
  /*_computedWidth*/
7469
- ctx[17]}
7469
+ ctx[19]}
7470
7470
  `);
7471
7471
  toggle_class(div, "dropdown-native",
7472
7472
  /*_native*/
7473
- ctx[22]);
7473
+ ctx[14]);
7474
7474
  },
7475
7475
 
7476
7476
  m(target, anchor) {
@@ -7504,7 +7504,7 @@ function create_fragment$v(ctx) {
7504
7504
 
7505
7505
  if (dirty[0] &
7506
7506
  /*mt, mr, mb, ml, width, _computedWidth*/
7507
- 134944 && div_style_value !== (div_style_value = `
7507
+ 528160 && div_style_value !== (div_style_value = `
7508
7508
  ${calculateMargin(
7509
7509
  /*mt*/
7510
7510
  ctx[8],
@@ -7518,17 +7518,17 @@ function create_fragment$v(ctx) {
7518
7518
  /*width*/
7519
7519
  ctx[5] ||
7520
7520
  /*_computedWidth*/
7521
- ctx[17]}
7521
+ ctx[19]}
7522
7522
  `)) {
7523
7523
  attr(div, "style", div_style_value);
7524
7524
  }
7525
7525
 
7526
7526
  if (dirty[0] &
7527
7527
  /*_native*/
7528
- 4194304) {
7528
+ 16384) {
7529
7529
  toggle_class(div, "dropdown-native",
7530
7530
  /*_native*/
7531
- ctx[22]);
7531
+ ctx[14]);
7532
7532
  }
7533
7533
  },
7534
7534
 
@@ -7546,6 +7546,20 @@ function create_fragment$v(ctx) {
7546
7546
  };
7547
7547
  }
7548
7548
 
7549
+ function parseValues(selectedValue) {
7550
+ let rawValue;
7551
+
7552
+ try {
7553
+ rawValue = JSON.parse(selectedValue || "[]");
7554
+ } catch (e) {
7555
+ rawValue = [selectedValue];
7556
+ }
7557
+
7558
+ const rawValues = typeof rawValue === "object" ? rawValue : [rawValue]; // convert all values to strings to avoid later type comparison issues
7559
+
7560
+ return rawValues.map(val => `${val}`);
7561
+ }
7562
+
7549
7563
  function instance$s($$self, $$props, $$invalidate) {
7550
7564
  let _disabled;
7551
7565
 
@@ -7616,23 +7630,13 @@ function instance$s($$self, $$props, $$invalidate) {
7616
7630
  let _selectEl;
7617
7631
 
7618
7632
  onMount(async () => {
7619
- await tick();
7620
- $$invalidate(12, _values = parseValues());
7621
- $$invalidate(13, _options = getOptions());
7622
-
7623
- if (!_native) {
7624
- $$invalidate(17, _computedWidth = getCustomDropdownWidth(_options));
7625
- addKeyboardEventListeners();
7626
- setHighlightedIndexToSelected();
7627
- } // watch for DOM changes within the slot => dynamic binding
7628
-
7629
-
7633
+ // watch for DOM changes within the slot => dynamic binding
7630
7634
  const slot = _el.querySelector("slot");
7631
7635
 
7632
7636
  slot === null || slot === void 0 ? void 0 : slot.addEventListener("slotchange", _e => {
7633
- $$invalidate(14, _selectedLabel = "");
7634
- $$invalidate(12, _values = parseValues());
7635
- $$invalidate(13, _options = getOptions());
7637
+ $$invalidate(16, _selectedLabel = "");
7638
+ $$invalidate(15, _values = parseValues(value));
7639
+ $$invalidate(12, _options = getOptions());
7636
7640
  });
7637
7641
  });
7638
7642
  onDestroy(() => {
@@ -7665,8 +7669,8 @@ function instance$s($$self, $$props, $$invalidate) {
7665
7669
  const selected = _values.includes(value);
7666
7670
 
7667
7671
  if (selected) {
7668
- $$invalidate(14, _selectedLabel = label);
7669
- $$invalidate(12, _values = [value]);
7672
+ $$invalidate(16, _selectedLabel = label);
7673
+ $$invalidate(15, _values = [value]);
7670
7674
  }
7671
7675
 
7672
7676
  return {
@@ -7707,21 +7711,6 @@ function instance$s($$self, $$props, $$invalidate) {
7707
7711
  _el.removeEventListener("focus", onFocus, true);
7708
7712
 
7709
7713
  _el.removeEventListener("blur", onBlur, true);
7710
- } // parse and convert values to strings to avoid later type comparison issues
7711
-
7712
-
7713
- function parseValues() {
7714
- let rawValue;
7715
-
7716
- try {
7717
- rawValue = JSON.parse(value || "[]");
7718
- } catch (e) {
7719
- rawValue = [value];
7720
- }
7721
-
7722
- const rawValues = typeof rawValue === "object" ? rawValue : [rawValue]; // convert all values to strings to avoid later type comparison issues
7723
-
7724
- return rawValues.map(val => `${val}`);
7725
7714
  }
7726
7715
 
7727
7716
  async function showMenu() {
@@ -7729,7 +7718,7 @@ function instance$s($$self, $$props, $$invalidate) {
7729
7718
  return;
7730
7719
  }
7731
7720
 
7732
- $$invalidate(15, _isMenuVisible = true);
7721
+ $$invalidate(17, _isMenuVisible = true);
7733
7722
  await tick(); // hide menu on blur
7734
7723
 
7735
7724
  _menuEl.addEventListener("blur", closeMenu); // bind up/down arrows to navigate options
@@ -7744,11 +7733,11 @@ function instance$s($$self, $$props, $$invalidate) {
7744
7733
  _menuEl.removeEventListener("mouseover", onHighlight);
7745
7734
 
7746
7735
  setHighlightedIndexToSelected();
7747
- $$invalidate(15, _isMenuVisible = false);
7736
+ $$invalidate(17, _isMenuVisible = false);
7748
7737
  }
7749
7738
 
7750
7739
  function setHighlightedIndexToSelected() {
7751
- $$invalidate(16, _highlightedIndex = _options.findIndex(option => _values.includes(option.value)));
7740
+ $$invalidate(18, _highlightedIndex = _options.findIndex(option => _values.includes(option.value)));
7752
7741
  } // Event handlers
7753
7742
 
7754
7743
  /**
@@ -7758,7 +7747,7 @@ function instance$s($$self, $$props, $$invalidate) {
7758
7747
 
7759
7748
  function onSelect(value, label, close) {
7760
7749
  if (_disabled) return;
7761
- $$invalidate(14, _selectedLabel = label);
7750
+ $$invalidate(16, _selectedLabel = label);
7762
7751
  let detail;
7763
7752
 
7764
7753
  if (_multiselect) {
@@ -7769,7 +7758,7 @@ function instance$s($$self, $$props, $$invalidate) {
7769
7758
  values: _values
7770
7759
  };
7771
7760
  } else {
7772
- $$invalidate(12, _values = [value]);
7761
+ $$invalidate(15, _values = [value]);
7773
7762
  detail = {
7774
7763
  name,
7775
7764
  value
@@ -7825,14 +7814,14 @@ function instance$s($$self, $$props, $$invalidate) {
7825
7814
 
7826
7815
  function _handleArrowDown() {
7827
7816
  if (_highlightedIndex < _options.length - 1) {
7828
- $$invalidate(16, _highlightedIndex++, _highlightedIndex);
7817
+ $$invalidate(18, _highlightedIndex++, _highlightedIndex);
7829
7818
  onSelect(_options[_highlightedIndex].value, _options[_highlightedIndex].label, false);
7830
7819
  }
7831
7820
  }
7832
7821
 
7833
7822
  function _handleArrowUp() {
7834
7823
  if (_highlightedIndex > 0) {
7835
- $$invalidate(16, _highlightedIndex--, _highlightedIndex);
7824
+ $$invalidate(18, _highlightedIndex--, _highlightedIndex);
7836
7825
  onSelect(_options[_highlightedIndex].value, _options[_highlightedIndex].label, false);
7837
7826
  }
7838
7827
  } // add required bindings to component
@@ -7848,7 +7837,7 @@ function instance$s($$self, $$props, $$invalidate) {
7848
7837
  }
7849
7838
 
7850
7839
  function onHighlight(e) {
7851
- $$invalidate(16, _highlightedIndex = Number(e.target.dataset.index));
7840
+ $$invalidate(18, _highlightedIndex = Number(e.target.dataset.index));
7852
7841
  }
7853
7842
 
7854
7843
  function onNativeSelect(e) {
@@ -7860,8 +7849,8 @@ function instance$s($$self, $$props, $$invalidate) {
7860
7849
  function select_binding($$value) {
7861
7850
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
7862
7851
  _selectEl = $$value;
7863
- $$invalidate(20, _selectEl);
7864
- $$invalidate(13, _options);
7852
+ $$invalidate(21, _selectEl);
7853
+ ((($$invalidate(12, _options), $$invalidate(13, _el)), $$invalidate(28, value)), $$invalidate(14, _native)), $$invalidate(30, native);
7865
7854
  });
7866
7855
  }
7867
7856
 
@@ -7870,14 +7859,14 @@ function instance$s($$self, $$props, $$invalidate) {
7870
7859
  function ul_binding($$value) {
7871
7860
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
7872
7861
  _menuEl = $$value;
7873
- $$invalidate(19, _menuEl);
7862
+ $$invalidate(20, _menuEl);
7874
7863
  });
7875
7864
  }
7876
7865
 
7877
7866
  function div_binding($$value) {
7878
7867
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
7879
7868
  _el = $$value;
7880
- $$invalidate(18, _el);
7869
+ $$invalidate(13, _el);
7881
7870
  });
7882
7871
  }
7883
7872
 
@@ -7903,7 +7892,7 @@ function instance$s($$self, $$props, $$invalidate) {
7903
7892
  if ($$self.$$.dirty[0] &
7904
7893
  /*disabled*/
7905
7894
  64) {
7906
- $$invalidate(21, _disabled = toBoolean(disabled));
7895
+ $$invalidate(22, _disabled = toBoolean(disabled));
7907
7896
  }
7908
7897
 
7909
7898
  if ($$self.$$.dirty[0] &
@@ -7921,11 +7910,28 @@ function instance$s($$self, $$props, $$invalidate) {
7921
7910
  if ($$self.$$.dirty[0] &
7922
7911
  /*native*/
7923
7912
  1073741824) {
7924
- $$invalidate(22, _native = toBoolean(native));
7913
+ $$invalidate(14, _native = toBoolean(native));
7914
+ }
7915
+
7916
+ if ($$self.$$.dirty[0] &
7917
+ /*_el, value, _native, _options*/
7918
+ 268464128) {
7919
+ {
7920
+ if (_el) {
7921
+ $$invalidate(15, _values = parseValues(value));
7922
+ $$invalidate(12, _options = getOptions());
7923
+
7924
+ if (!_native) {
7925
+ $$invalidate(19, _computedWidth = getCustomDropdownWidth(_options));
7926
+ addKeyboardEventListeners();
7927
+ setHighlightedIndexToSelected();
7928
+ }
7929
+ }
7930
+ }
7925
7931
  }
7926
7932
  };
7927
7933
 
7928
- return [name, arialabel, leadingicon, maxheight, placeholder, width, disabled, error, mt, mr, mb, ml, _values, _options, _selectedLabel, _isMenuVisible, _highlightedIndex, _computedWidth, _el, _menuEl, _selectEl, _disabled, _native, _error, showMenu, closeMenu, onSelect, onNativeSelect, value, multiselect, native, select_binding, click_handler, ul_binding, div_binding];
7934
+ return [name, arialabel, leadingicon, maxheight, placeholder, width, disabled, error, mt, mr, mb, ml, _options, _el, _native, _values, _selectedLabel, _isMenuVisible, _highlightedIndex, _computedWidth, _menuEl, _selectEl, _disabled, _error, showMenu, closeMenu, onSelect, onNativeSelect, value, multiselect, native, select_binding, click_handler, ul_binding, div_binding];
7929
7935
  }
7930
7936
 
7931
7937
  class Dropdown extends SvelteElement {
@@ -20104,6 +20110,7 @@ const GoACircularProgress = ({
20104
20110
 
20105
20111
  const GoAContainer = ({
20106
20112
  accent,
20113
+ heading,
20107
20114
  title,
20108
20115
  padding,
20109
20116
  children,
@@ -20115,6 +20122,7 @@ const GoAContainer = ({
20115
20122
  ml,
20116
20123
  testId
20117
20124
  }) => {
20125
+ const headingContent = heading || title;
20118
20126
  return jsxs("goa-container", Object.assign({
20119
20127
  type: type,
20120
20128
  padding: padding,
@@ -20125,15 +20133,15 @@ const GoAContainer = ({
20125
20133
  ml: ml,
20126
20134
  "data-testid": testId
20127
20135
  }, {
20128
- children: [title && jsx("div", Object.assign({
20136
+ children: [headingContent && jsx("div", Object.assign({
20129
20137
  slot: "title"
20130
20138
  }, {
20131
- children: title
20132
- }), void 0), actions && jsx("div", Object.assign({
20139
+ children: headingContent
20140
+ }), void 0), children, actions && jsx("div", Object.assign({
20133
20141
  slot: "actions"
20134
20142
  }, {
20135
20143
  children: actions
20136
- }), void 0), children]
20144
+ }), void 0)]
20137
20145
  }), void 0);
20138
20146
  };
20139
20147