@abgov/react-components 4.0.0-alpha.76 → 4.0.0-alpha.78

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.
@@ -3051,7 +3051,7 @@
3051
3051
  }
3052
3052
 
3053
3053
  };
3054
- } // (51:4) {#if isIndeterminate}
3054
+ } // (59:4) {#if isIndeterminate}
3055
3055
 
3056
3056
 
3057
3057
  function create_if_block$f(ctx) {
@@ -3308,22 +3308,27 @@
3308
3308
  value = ""
3309
3309
  } = $$props;
3310
3310
  let {
3311
- disabled
3311
+ disabled = "false"
3312
3312
  } = $$props;
3313
3313
  let {
3314
- error
3314
+ error = "false"
3315
3315
  } = $$props;
3316
3316
  let {
3317
3317
  testid = ""
3318
- } = $$props;
3318
+ } = $$props; // Private
3319
+
3320
+ let _value;
3321
+
3322
+ onMount(() => {
3323
+ // hold on to the initial value to prevent losing it on check changes
3324
+ _value = value;
3325
+ });
3319
3326
 
3320
3327
  function onChange(e) {
3321
3328
  // An empty string is required as setting the second value to `null` caused the data to get
3322
3329
  // out of sync with the events.
3323
3330
  const newCheckStatus = !isChecked;
3324
-
3325
- const _value = newCheckStatus ? `${value || "checked"}` : ""; // set the local state
3326
-
3331
+ const newValue = newCheckStatus ? `${_value || "checked"}` : ""; // set the local state
3327
3332
 
3328
3333
  $$invalidate(9, checked = fromBoolean(newCheckStatus));
3329
3334
  e.target.dispatchEvent(new CustomEvent("_change", {
@@ -3331,7 +3336,7 @@
3331
3336
  detail: {
3332
3337
  name,
3333
3338
  checked: newCheckStatus,
3334
- value: _value
3339
+ value: newValue
3335
3340
  }
3336
3341
  }));
3337
3342
  }
@@ -3350,6 +3355,7 @@
3350
3355
  if ($$self.$$.dirty &
3351
3356
  /*disabled*/
3352
3357
  1024) {
3358
+ // Binding
3353
3359
  $$invalidate(7, isDisabled = toBoolean(disabled));
3354
3360
  }
3355
3361
 
@@ -4861,7 +4867,7 @@
4861
4867
  child_ctx[39] = list[i];
4862
4868
  child_ctx[41] = i;
4863
4869
  return child_ctx;
4864
- } // (201:2) {#if isMenuVisible}
4870
+ } // (204:2) {#if isMenuVisible}
4865
4871
 
4866
4872
 
4867
4873
  function create_if_block$c(ctx) {
@@ -4884,7 +4890,7 @@
4884
4890
  if (!mounted) {
4885
4891
  dispose = listen(div, "click",
4886
4892
  /*closeMenu*/
4887
- ctx[18]);
4893
+ ctx[17]);
4888
4894
  mounted = true;
4889
4895
  }
4890
4896
  },
@@ -4906,7 +4912,7 @@
4906
4912
  }
4907
4913
 
4908
4914
  };
4909
- } // (242:4) {#each options as option, index}
4915
+ } // (243:4) {#each options as option, index}
4910
4916
 
4911
4917
 
4912
4918
  function create_each_block$4(ctx) {
@@ -4929,7 +4935,7 @@
4929
4935
  function click_handler() {
4930
4936
  return (
4931
4937
  /*click_handler*/
4932
- ctx[22](
4938
+ ctx[21](
4933
4939
  /*option*/
4934
4940
  ctx[39])
4935
4941
  );
@@ -4950,13 +4956,13 @@
4950
4956
  ctx[39].value);
4951
4957
  attr(li, "aria-selected", li_aria_selected_value =
4952
4958
  /*_values*/
4953
- ctx[9].includes(
4959
+ ctx[8].includes(
4954
4960
  /*option*/
4955
4961
  ctx[39].value) ? "true" : "false");
4956
4962
  attr(li, "class", "goa-dropdown-option");
4957
- attr(li, "data-testid", li_data_testid_value = `${
4963
+ attr(li, "data-testid", li_data_testid_value = `dropdown-item-${
4958
4964
  /*option*/
4959
- ctx[39].value}-dropdown-item`);
4965
+ ctx[39].value}`);
4960
4966
  attr(li, "data-index", li_data_index_value =
4961
4967
  /*index*/
4962
4968
  ctx[41]);
@@ -4966,10 +4972,10 @@
4966
4972
  /*index*/
4967
4973
  ctx[41] ===
4968
4974
  /*highlightedIndex*/
4969
- ctx[13]);
4975
+ ctx[12]);
4970
4976
  toggle_class(li, "goa-dropdown-option--selected",
4971
4977
  /*_values*/
4972
- ctx[9].includes(
4978
+ ctx[8].includes(
4973
4979
  /*option*/
4974
4980
  ctx[39].value));
4975
4981
  },
@@ -4988,7 +4994,7 @@
4988
4994
  ctx = new_ctx;
4989
4995
  if (dirty[0] &
4990
4996
  /*options*/
4991
- 1024 && t_value !== (t_value = (
4997
+ 512 && t_value !== (t_value = (
4992
4998
  /*option*/
4993
4999
  ctx[39].label ||
4994
5000
  /*option*/
@@ -4996,7 +5002,7 @@
4996
5002
 
4997
5003
  if (dirty[0] &
4998
5004
  /*options*/
4999
- 1024 && li_id_value !== (li_id_value =
5005
+ 512 && li_id_value !== (li_id_value =
5000
5006
  /*option*/
5001
5007
  ctx[39].label)) {
5002
5008
  attr(li, "id", li_id_value);
@@ -5004,7 +5010,7 @@
5004
5010
 
5005
5011
  if (dirty[0] &
5006
5012
  /*options*/
5007
- 1024 && li_aria_label_value !== (li_aria_label_value =
5013
+ 512 && li_aria_label_value !== (li_aria_label_value =
5008
5014
  /*option*/
5009
5015
  ctx[39].label ||
5010
5016
  /*option*/
@@ -5014,9 +5020,9 @@
5014
5020
 
5015
5021
  if (dirty[0] &
5016
5022
  /*_values, options*/
5017
- 1536 && li_aria_selected_value !== (li_aria_selected_value =
5023
+ 768 && li_aria_selected_value !== (li_aria_selected_value =
5018
5024
  /*_values*/
5019
- ctx[9].includes(
5025
+ ctx[8].includes(
5020
5026
  /*option*/
5021
5027
  ctx[39].value) ? "true" : "false")) {
5022
5028
  attr(li, "aria-selected", li_aria_selected_value);
@@ -5024,28 +5030,28 @@
5024
5030
 
5025
5031
  if (dirty[0] &
5026
5032
  /*options*/
5027
- 1024 && li_data_testid_value !== (li_data_testid_value = `${
5033
+ 512 && li_data_testid_value !== (li_data_testid_value = `dropdown-item-${
5028
5034
  /*option*/
5029
- ctx[39].value}-dropdown-item`)) {
5035
+ ctx[39].value}`)) {
5030
5036
  attr(li, "data-testid", li_data_testid_value);
5031
5037
  }
5032
5038
 
5033
5039
  if (dirty[0] &
5034
5040
  /*highlightedIndex*/
5035
- 8192) {
5041
+ 4096) {
5036
5042
  toggle_class(li, "goa-dropdown-option--tabbed",
5037
5043
  /*index*/
5038
5044
  ctx[41] ===
5039
5045
  /*highlightedIndex*/
5040
- ctx[13]);
5046
+ ctx[12]);
5041
5047
  }
5042
5048
 
5043
5049
  if (dirty[0] &
5044
5050
  /*_values, options*/
5045
- 1536) {
5051
+ 768) {
5046
5052
  toggle_class(li, "goa-dropdown-option--selected",
5047
5053
  /*_values*/
5048
- ctx[9].includes(
5054
+ ctx[8].includes(
5049
5055
  /*option*/
5050
5056
  ctx[39].value));
5051
5057
  }
@@ -5061,27 +5067,26 @@
5061
5067
  }
5062
5068
 
5063
5069
  function create_fragment$r(ctx) {
5064
- let div1;
5070
+ let div;
5065
5071
  let t0;
5066
- let div0;
5067
5072
  let goa_input;
5068
- let goa_input_id_value;
5073
+ let goa_input_data_testid_value;
5069
5074
  let goa_input_aria_label_value;
5070
- let div0_data_testid_value;
5071
5075
  let t1;
5072
5076
  let ul;
5073
5077
  let t2;
5074
5078
  let slot;
5075
5079
  let ul_style_value;
5076
- let div1_style_value;
5080
+ let div_data_testid_value;
5081
+ let div_style_value;
5077
5082
  let mounted;
5078
5083
  let dispose;
5079
5084
  let if_block =
5080
5085
  /*isMenuVisible*/
5081
- ctx[12] && create_if_block$c(ctx);
5086
+ ctx[11] && create_if_block$c(ctx);
5082
5087
  let each_value =
5083
5088
  /*options*/
5084
- ctx[10];
5089
+ ctx[9];
5085
5090
  let each_blocks = [];
5086
5091
 
5087
5092
  for (let i = 0; i < each_value.length; i += 1) {
@@ -5090,10 +5095,9 @@
5090
5095
 
5091
5096
  return {
5092
5097
  c() {
5093
- div1 = element("div");
5098
+ div = element("div");
5094
5099
  if (if_block) if_block.c();
5095
5100
  t0 = space();
5096
- div0 = element("div");
5097
5101
  goa_input = element("goa-input");
5098
5102
  t1 = space();
5099
5103
  ul = element("ul");
@@ -5107,10 +5111,10 @@
5107
5111
  this.c = noop;
5108
5112
  set_custom_element_data(goa_input, "error",
5109
5113
  /*error*/
5110
- ctx[8]);
5114
+ ctx[7]);
5111
5115
  set_custom_element_data(goa_input, "disabled",
5112
5116
  /*disabled*/
5113
- ctx[7]);
5117
+ ctx[6]);
5114
5118
  set_custom_element_data(goa_input, "leadingicon",
5115
5119
  /*leadingicon*/
5116
5120
  ctx[2]);
@@ -5118,7 +5122,7 @@
5118
5122
  /*placeholder*/
5119
5123
  ctx[4]);
5120
5124
  set_custom_element_data(goa_input, "width", "100%");
5121
- set_custom_element_data(goa_input, "id", goa_input_id_value = `${
5125
+ set_custom_element_data(goa_input, "data-testid", goa_input_data_testid_value = `${
5122
5126
  /*name*/
5123
5127
  ctx[0]}-dropdown-input`);
5124
5128
  set_custom_element_data(goa_input, "role", "combobox");
@@ -5129,22 +5133,19 @@
5129
5133
  ctx[0]);
5130
5134
  set_custom_element_data(goa_input, "aria-expanded",
5131
5135
  /*isMenuVisible*/
5132
- ctx[12]);
5136
+ ctx[11]);
5133
5137
  set_custom_element_data(goa_input, "aria-controls", "menu");
5134
5138
  set_custom_element_data(goa_input, "readonly", "");
5135
5139
  set_custom_element_data(goa_input, "trailingicon", "chevron-down");
5136
5140
  set_custom_element_data(goa_input, "type", "text");
5137
5141
  set_custom_element_data(goa_input, "value",
5138
5142
  /*selectedLabel*/
5139
- ctx[11]);
5140
- attr(div0, "data-testid", div0_data_testid_value = `${
5141
- /*name*/
5142
- ctx[0]}-dropdown`);
5143
+ ctx[10]);
5143
5144
  attr(ul, "id", "menu");
5144
5145
  attr(ul, "role", "listbox");
5145
5146
  attr(ul, "aria-activedescendant",
5146
5147
  /*selectedLabel*/
5147
- ctx[11]);
5148
+ ctx[10]);
5148
5149
  attr(ul, "data-testid", "dropdown-menu");
5149
5150
  attr(ul, "tabindex", "0");
5150
5151
  attr(ul, "class", "goa-dropdown-list");
@@ -5153,26 +5154,25 @@
5153
5154
  ctx[3]}`);
5154
5155
  toggle_class(ul, "dropdown-active",
5155
5156
  /*isMenuVisible*/
5156
- ctx[12]);
5157
- attr(div1, "data-testid",
5158
- /*testid*/
5159
- ctx[5]);
5160
- attr(div1, "class", "goa-dropdown-box");
5161
- attr(div1, "style", div1_style_value = `--width: ${
5157
+ ctx[11]);
5158
+ attr(div, "data-testid", div_data_testid_value = `${
5159
+ /*name*/
5160
+ ctx[0]}-dropdown`);
5161
+ attr(div, "class", "goa-dropdown-box");
5162
+ attr(div, "style", div_style_value = `--width: ${
5162
5163
  /*width*/
5163
- ctx[6] ||
5164
+ ctx[5] ||
5164
5165
  /*computedWidth*/
5165
- ctx[14]}`);
5166
+ ctx[13]}`);
5166
5167
  },
5167
5168
 
5168
5169
  m(target, anchor) {
5169
- insert(target, div1, anchor);
5170
- if (if_block) if_block.m(div1, null);
5171
- append(div1, t0);
5172
- append(div1, div0);
5173
- append(div0, goa_input);
5174
- append(div1, t1);
5175
- append(div1, ul);
5170
+ insert(target, div, anchor);
5171
+ if (if_block) if_block.m(div, null);
5172
+ append(div, t0);
5173
+ append(div, goa_input);
5174
+ append(div, t1);
5175
+ append(div, ul);
5176
5176
 
5177
5177
  for (let i = 0; i < each_blocks.length; i += 1) {
5178
5178
  each_blocks[i].m(ul, null);
@@ -5182,15 +5182,15 @@
5182
5182
  append(ul, slot);
5183
5183
  /*ul_binding*/
5184
5184
 
5185
- ctx[23](ul);
5186
- /*div1_binding*/
5185
+ ctx[22](ul);
5186
+ /*div_binding*/
5187
5187
 
5188
- ctx[24](div1);
5188
+ ctx[23](div);
5189
5189
 
5190
5190
  if (!mounted) {
5191
5191
  dispose = listen(goa_input, "click",
5192
5192
  /*showMenu*/
5193
- ctx[17]);
5193
+ ctx[16]);
5194
5194
  mounted = true;
5195
5195
  }
5196
5196
  },
@@ -5198,13 +5198,13 @@
5198
5198
  p(ctx, dirty) {
5199
5199
  if (
5200
5200
  /*isMenuVisible*/
5201
- ctx[12]) {
5201
+ ctx[11]) {
5202
5202
  if (if_block) {
5203
5203
  if_block.p(ctx, dirty);
5204
5204
  } else {
5205
5205
  if_block = create_if_block$c(ctx);
5206
5206
  if_block.c();
5207
- if_block.m(div1, t0);
5207
+ if_block.m(div, t0);
5208
5208
  }
5209
5209
  } else if (if_block) {
5210
5210
  if_block.d(1);
@@ -5213,18 +5213,18 @@
5213
5213
 
5214
5214
  if (dirty[0] &
5215
5215
  /*error*/
5216
- 256) {
5216
+ 128) {
5217
5217
  set_custom_element_data(goa_input, "error",
5218
5218
  /*error*/
5219
- ctx[8]);
5219
+ ctx[7]);
5220
5220
  }
5221
5221
 
5222
5222
  if (dirty[0] &
5223
5223
  /*disabled*/
5224
- 128) {
5224
+ 64) {
5225
5225
  set_custom_element_data(goa_input, "disabled",
5226
5226
  /*disabled*/
5227
- ctx[7]);
5227
+ ctx[6]);
5228
5228
  }
5229
5229
 
5230
5230
  if (dirty[0] &
@@ -5245,10 +5245,10 @@
5245
5245
 
5246
5246
  if (dirty[0] &
5247
5247
  /*name*/
5248
- 1 && goa_input_id_value !== (goa_input_id_value = `${
5248
+ 1 && goa_input_data_testid_value !== (goa_input_data_testid_value = `${
5249
5249
  /*name*/
5250
5250
  ctx[0]}-dropdown-input`)) {
5251
- set_custom_element_data(goa_input, "id", goa_input_id_value);
5251
+ set_custom_element_data(goa_input, "data-testid", goa_input_data_testid_value);
5252
5252
  }
5253
5253
 
5254
5254
  if (dirty[0] &
@@ -5263,34 +5263,26 @@
5263
5263
 
5264
5264
  if (dirty[0] &
5265
5265
  /*isMenuVisible*/
5266
- 4096) {
5266
+ 2048) {
5267
5267
  set_custom_element_data(goa_input, "aria-expanded",
5268
5268
  /*isMenuVisible*/
5269
- ctx[12]);
5269
+ ctx[11]);
5270
5270
  }
5271
5271
 
5272
5272
  if (dirty[0] &
5273
5273
  /*selectedLabel*/
5274
- 2048) {
5274
+ 1024) {
5275
5275
  set_custom_element_data(goa_input, "value",
5276
5276
  /*selectedLabel*/
5277
- ctx[11]);
5278
- }
5279
-
5280
- if (dirty[0] &
5281
- /*name*/
5282
- 1 && div0_data_testid_value !== (div0_data_testid_value = `${
5283
- /*name*/
5284
- ctx[0]}-dropdown`)) {
5285
- attr(div0, "data-testid", div0_data_testid_value);
5277
+ ctx[10]);
5286
5278
  }
5287
5279
 
5288
5280
  if (dirty[0] &
5289
5281
  /*options, _values, highlightedIndex, onSelect*/
5290
- 534016) {
5282
+ 267008) {
5291
5283
  each_value =
5292
5284
  /*options*/
5293
- ctx[10];
5285
+ ctx[9];
5294
5286
  let i;
5295
5287
 
5296
5288
  for (i = 0; i < each_value.length; i += 1) {
@@ -5314,10 +5306,10 @@
5314
5306
 
5315
5307
  if (dirty[0] &
5316
5308
  /*selectedLabel*/
5317
- 2048) {
5309
+ 1024) {
5318
5310
  attr(ul, "aria-activedescendant",
5319
5311
  /*selectedLabel*/
5320
- ctx[11]);
5312
+ ctx[10]);
5321
5313
  }
5322
5314
 
5323
5315
  if (dirty[0] &
@@ -5330,28 +5322,28 @@
5330
5322
 
5331
5323
  if (dirty[0] &
5332
5324
  /*isMenuVisible*/
5333
- 4096) {
5325
+ 2048) {
5334
5326
  toggle_class(ul, "dropdown-active",
5335
5327
  /*isMenuVisible*/
5336
- ctx[12]);
5328
+ ctx[11]);
5337
5329
  }
5338
5330
 
5339
5331
  if (dirty[0] &
5340
- /*testid*/
5341
- 32) {
5342
- attr(div1, "data-testid",
5343
- /*testid*/
5344
- ctx[5]);
5332
+ /*name*/
5333
+ 1 && div_data_testid_value !== (div_data_testid_value = `${
5334
+ /*name*/
5335
+ ctx[0]}-dropdown`)) {
5336
+ attr(div, "data-testid", div_data_testid_value);
5345
5337
  }
5346
5338
 
5347
5339
  if (dirty[0] &
5348
5340
  /*width, computedWidth*/
5349
- 16448 && div1_style_value !== (div1_style_value = `--width: ${
5341
+ 8224 && div_style_value !== (div_style_value = `--width: ${
5350
5342
  /*width*/
5351
- ctx[6] ||
5343
+ ctx[5] ||
5352
5344
  /*computedWidth*/
5353
- ctx[14]}`)) {
5354
- attr(div1, "style", div1_style_value);
5345
+ ctx[13]}`)) {
5346
+ attr(div, "style", div_style_value);
5355
5347
  }
5356
5348
  },
5357
5349
 
@@ -5359,15 +5351,15 @@
5359
5351
  o: noop,
5360
5352
 
5361
5353
  d(detaching) {
5362
- if (detaching) detach(div1);
5354
+ if (detaching) detach(div);
5363
5355
  if (if_block) if_block.d();
5364
5356
  destroy_each(each_blocks, detaching);
5365
5357
  /*ul_binding*/
5366
5358
 
5367
- ctx[23](null);
5368
- /*div1_binding*/
5359
+ ctx[22](null);
5360
+ /*div_binding*/
5369
5361
 
5370
- ctx[24](null);
5362
+ ctx[23](null);
5371
5363
  mounted = false;
5372
5364
  dispose();
5373
5365
  }
@@ -5383,13 +5375,12 @@
5383
5375
  return;
5384
5376
  }
5385
5377
 
5386
- $$invalidate(12, isMenuVisible = true);
5378
+ $$invalidate(11, isMenuVisible = true);
5387
5379
  return _call(tick, function () {
5388
5380
  // hide menu on blur
5389
5381
  menuEl.addEventListener("blur", closeMenu);
5390
5382
  menuEl.focus(); // bind up/down arrows to navigate options
5391
5383
 
5392
- menuEl.addEventListener("keydown", onMenuKeyDown);
5393
5384
  menuEl.addEventListener("mouseover", onHighlight);
5394
5385
  });
5395
5386
  });
@@ -5416,9 +5407,6 @@
5416
5407
  let {
5417
5408
  placeholder = ""
5418
5409
  } = $$props;
5419
- let {
5420
- testid = ""
5421
- } = $$props;
5422
5410
  let {
5423
5411
  width = ""
5424
5412
  } = $$props;
@@ -5491,7 +5479,7 @@
5491
5479
 
5492
5480
  const rawValues = typeof rawValue === "object" ? rawValue : [rawValue]; // convert all values to strings to avoid later type comparison issues
5493
5481
 
5494
- $$invalidate(9, _values = rawValues.map(val => `${val}`));
5482
+ $$invalidate(8, _values = rawValues.map(val => `${val}`));
5495
5483
  }
5496
5484
 
5497
5485
  function bindContext() {
@@ -5504,17 +5492,17 @@
5504
5492
 
5505
5493
  const selected = _values.includes(_data.value);
5506
5494
 
5507
- $$invalidate(10, options = [...options, Object.assign(Object.assign({}, _data), {
5495
+ $$invalidate(9, options = [...options, Object.assign(Object.assign({}, _data), {
5508
5496
  selected
5509
5497
  })]);
5510
5498
 
5511
5499
  if (selected) {
5512
- $$invalidate(11, selectedLabel = _data.label);
5500
+ $$invalidate(10, selectedLabel = _data.label);
5513
5501
  }
5514
5502
 
5515
5503
  if (!width && maxLetterCount < _data.label.length) {
5516
5504
  maxLetterCount = _data.label.length;
5517
- $$invalidate(14, computedWidth = `${Math.max(20, maxLetterCount + 12)}ch`);
5505
+ $$invalidate(13, computedWidth = `${Math.max(20, maxLetterCount + 12)}ch`);
5518
5506
  }
5519
5507
 
5520
5508
  setHighlightedIndexToSelected();
@@ -5526,20 +5514,19 @@
5526
5514
 
5527
5515
  function closeMenu() {
5528
5516
  menuEl.removeEventListener("blur", closeMenu);
5529
- menuEl.removeEventListener("keydown", onMenuKeyDown);
5530
5517
  menuEl.removeEventListener("mouseover", onHighlight);
5531
5518
  setHighlightedIndexToSelected();
5532
- $$invalidate(12, isMenuVisible = false);
5519
+ $$invalidate(11, isMenuVisible = false);
5533
5520
  }
5534
5521
 
5535
5522
  function setHighlightedIndexToSelected() {
5536
- $$invalidate(13, highlightedIndex = options.findIndex(option => _values.includes(option.value)));
5523
+ $$invalidate(12, highlightedIndex = options.findIndex(option => _values.includes(option.value)));
5537
5524
  } // Event handlers
5538
5525
 
5539
5526
 
5540
5527
  function onSelect(val, label, close) {
5541
5528
  if (_disabled) return;
5542
- $$invalidate(11, selectedLabel = label);
5529
+ $$invalidate(10, selectedLabel = label);
5543
5530
 
5544
5531
  if (_multiselect) {
5545
5532
  _values.push(val);
@@ -5552,7 +5539,7 @@
5552
5539
  }
5553
5540
  }));
5554
5541
  } else {
5555
- $$invalidate(9, _values = [val]);
5542
+ $$invalidate(8, _values = [val]);
5556
5543
  el.dispatchEvent(new CustomEvent("_change", {
5557
5544
  composed: true,
5558
5545
  detail: {
@@ -5570,57 +5557,66 @@
5570
5557
  const onInputKeyDown = e => {
5571
5558
  switch (e.key) {
5572
5559
  case " ":
5573
- showMenu();
5560
+ case "Enter":
5561
+ isMenuVisible ? closeMenu() : showMenu();
5574
5562
  e.preventDefault();
5575
5563
  break;
5576
- }
5577
- }; // add required bindings to component
5578
-
5579
-
5580
- function onFocus() {
5581
- el.addEventListener("keydown", onInputKeyDown);
5582
- } // remove all bindings from component
5583
-
5584
-
5585
- function onBlur() {
5586
- el.removeEventListener("keydown", onInputKeyDown);
5587
- }
5588
-
5589
- function onMenuKeyDown(e) {
5590
- switch (e.key) {
5591
- case "ArrowUp":
5592
- if (highlightedIndex > 0) {
5593
- $$invalidate(13, highlightedIndex--, highlightedIndex);
5594
- onSelect(options[highlightedIndex].value, options[highlightedIndex].label, false);
5595
- }
5596
5564
 
5565
+ case "Escape":
5566
+ isMenuVisible && closeMenu();
5597
5567
  e.preventDefault();
5598
5568
  break;
5599
5569
 
5600
5570
  case "ArrowDown":
5601
- if (highlightedIndex < options.length - 1) {
5602
- $$invalidate(13, highlightedIndex++, highlightedIndex);
5603
- onSelect(options[highlightedIndex].value, options[highlightedIndex].label, false);
5571
+ if (e.altKey) {
5572
+ isMenuVisible ? closeMenu() : showMenu();
5573
+ break;
5604
5574
  }
5605
5575
 
5606
- e.preventDefault();
5607
- break;
5576
+ _handleArrowDown();
5608
5577
 
5609
- case "Tab":
5610
- case "Enter":
5611
- closeMenu();
5612
5578
  e.preventDefault();
5613
5579
  break;
5614
5580
 
5615
- case "Escape":
5616
- closeMenu();
5581
+ case "ArrowUp":
5582
+ if (e.altKey) {
5583
+ isMenuVisible ? closeMenu() : showMenu();
5584
+ break;
5585
+ }
5586
+
5587
+ _handleArrowUp();
5588
+
5617
5589
  e.preventDefault();
5618
5590
  break;
5619
5591
  }
5592
+ };
5593
+
5594
+ function _handleArrowDown() {
5595
+ if (highlightedIndex < options.length - 1) {
5596
+ $$invalidate(12, highlightedIndex++, highlightedIndex);
5597
+ onSelect(options[highlightedIndex].value, options[highlightedIndex].label, false);
5598
+ }
5599
+ }
5600
+
5601
+ function _handleArrowUp() {
5602
+ if (highlightedIndex > 0) {
5603
+ $$invalidate(12, highlightedIndex--, highlightedIndex);
5604
+ onSelect(options[highlightedIndex].value, options[highlightedIndex].label, false);
5605
+ }
5606
+ } // add required bindings to component
5607
+
5608
+
5609
+ function onFocus() {
5610
+ el.addEventListener("keydown", onInputKeyDown);
5611
+ } // remove all bindings from component
5612
+
5613
+
5614
+ function onBlur() {
5615
+ el.removeEventListener("keydown", onInputKeyDown);
5620
5616
  }
5621
5617
 
5622
5618
  function onHighlight(e) {
5623
- $$invalidate(13, highlightedIndex = Number(e.target.dataset.index));
5619
+ $$invalidate(12, highlightedIndex = Number(e.target.dataset.index));
5624
5620
  }
5625
5621
 
5626
5622
  const click_handler = option => onSelect(option.value, option.label, true);
@@ -5628,46 +5624,45 @@
5628
5624
  function ul_binding($$value) {
5629
5625
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
5630
5626
  menuEl = $$value;
5631
- $$invalidate(16, menuEl);
5627
+ $$invalidate(15, menuEl);
5632
5628
  });
5633
5629
  }
5634
5630
 
5635
- function div1_binding($$value) {
5631
+ function div_binding($$value) {
5636
5632
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
5637
5633
  el = $$value;
5638
- $$invalidate(15, el);
5634
+ $$invalidate(14, el);
5639
5635
  });
5640
5636
  }
5641
5637
 
5642
5638
  $$self.$$set = $$props => {
5643
5639
  if ('name' in $$props) $$invalidate(0, name = $$props.name);
5644
5640
  if ('arialabel' in $$props) $$invalidate(1, arialabel = $$props.arialabel);
5645
- if ('value' in $$props) $$invalidate(20, value = $$props.value);
5641
+ if ('value' in $$props) $$invalidate(19, value = $$props.value);
5646
5642
  if ('leadingicon' in $$props) $$invalidate(2, leadingicon = $$props.leadingicon);
5647
5643
  if ('maxheight' in $$props) $$invalidate(3, maxheight = $$props.maxheight);
5648
5644
  if ('placeholder' in $$props) $$invalidate(4, placeholder = $$props.placeholder);
5649
- if ('testid' in $$props) $$invalidate(5, testid = $$props.testid);
5650
- if ('width' in $$props) $$invalidate(6, width = $$props.width);
5651
- if ('disabled' in $$props) $$invalidate(7, disabled = $$props.disabled);
5652
- if ('error' in $$props) $$invalidate(8, error = $$props.error);
5653
- if ('multiselect' in $$props) $$invalidate(21, multiselect = $$props.multiselect);
5645
+ if ('width' in $$props) $$invalidate(5, width = $$props.width);
5646
+ if ('disabled' in $$props) $$invalidate(6, disabled = $$props.disabled);
5647
+ if ('error' in $$props) $$invalidate(7, error = $$props.error);
5648
+ if ('multiselect' in $$props) $$invalidate(20, multiselect = $$props.multiselect);
5654
5649
  };
5655
5650
 
5656
5651
  $$self.$$.update = () => {
5657
5652
  if ($$self.$$.dirty[0] &
5658
5653
  /*disabled*/
5659
- 128) {
5654
+ 64) {
5660
5655
  _disabled = toBoolean(disabled);
5661
5656
  }
5662
5657
 
5663
5658
  if ($$self.$$.dirty[0] &
5664
5659
  /*multiselect*/
5665
- 2097152) {
5660
+ 1048576) {
5666
5661
  _multiselect = toBoolean(multiselect);
5667
5662
  }
5668
5663
  };
5669
5664
 
5670
- return [name, arialabel, leadingicon, maxheight, placeholder, testid, width, disabled, error, _values, options, selectedLabel, isMenuVisible, highlightedIndex, computedWidth, el, menuEl, showMenu, closeMenu, onSelect, value, multiselect, click_handler, ul_binding, div1_binding];
5665
+ return [name, arialabel, leadingicon, maxheight, placeholder, width, disabled, error, _values, options, selectedLabel, isMenuVisible, highlightedIndex, computedWidth, el, menuEl, showMenu, closeMenu, onSelect, value, multiselect, click_handler, ul_binding, div_binding];
5671
5666
  }
5672
5667
 
5673
5668
  class Dropdown extends SvelteElement {
@@ -5681,15 +5676,14 @@
5681
5676
  }, instance$p, create_fragment$r, safe_not_equal, {
5682
5677
  name: 0,
5683
5678
  arialabel: 1,
5684
- value: 20,
5679
+ value: 19,
5685
5680
  leadingicon: 2,
5686
5681
  maxheight: 3,
5687
5682
  placeholder: 4,
5688
- testid: 5,
5689
- width: 6,
5690
- disabled: 7,
5691
- error: 8,
5692
- multiselect: 21
5683
+ width: 5,
5684
+ disabled: 6,
5685
+ error: 7,
5686
+ multiselect: 20
5693
5687
  }, null, [-1, -1]);
5694
5688
 
5695
5689
  if (options) {
@@ -5705,7 +5699,7 @@
5705
5699
  }
5706
5700
 
5707
5701
  static get observedAttributes() {
5708
- return ["name", "arialabel", "value", "leadingicon", "maxheight", "placeholder", "testid", "width", "disabled", "error", "multiselect"];
5702
+ return ["name", "arialabel", "value", "leadingicon", "maxheight", "placeholder", "width", "disabled", "error", "multiselect"];
5709
5703
  }
5710
5704
 
5711
5705
  get name() {
@@ -5731,7 +5725,7 @@
5731
5725
  }
5732
5726
 
5733
5727
  get value() {
5734
- return this.$$.ctx[20];
5728
+ return this.$$.ctx[19];
5735
5729
  }
5736
5730
 
5737
5731
  set value(value) {
@@ -5774,19 +5768,8 @@
5774
5768
  flush();
5775
5769
  }
5776
5770
 
5777
- get testid() {
5778
- return this.$$.ctx[5];
5779
- }
5780
-
5781
- set testid(testid) {
5782
- this.$$set({
5783
- testid
5784
- });
5785
- flush();
5786
- }
5787
-
5788
5771
  get width() {
5789
- return this.$$.ctx[6];
5772
+ return this.$$.ctx[5];
5790
5773
  }
5791
5774
 
5792
5775
  set width(width) {
@@ -5797,7 +5780,7 @@
5797
5780
  }
5798
5781
 
5799
5782
  get disabled() {
5800
- return this.$$.ctx[7];
5783
+ return this.$$.ctx[6];
5801
5784
  }
5802
5785
 
5803
5786
  set disabled(disabled) {
@@ -5808,7 +5791,7 @@
5808
5791
  }
5809
5792
 
5810
5793
  get error() {
5811
- return this.$$.ctx[8];
5794
+ return this.$$.ctx[7];
5812
5795
  }
5813
5796
 
5814
5797
  set error(error) {
@@ -5819,7 +5802,7 @@
5819
5802
  }
5820
5803
 
5821
5804
  get multiselect() {
5822
- return this.$$.ctx[21];
5805
+ return this.$$.ctx[20];
5823
5806
  }
5824
5807
 
5825
5808
  set multiselect(multiselect) {
@@ -7205,9 +7188,14 @@
7205
7188
  let div;
7206
7189
  let t0;
7207
7190
  let t1;
7208
- let if_block =
7209
- /*isOptional*/
7210
- ctx[3] && create_if_block_3$3();
7191
+ let show_if =
7192
+ /*requirement*/
7193
+ ctx[3] &&
7194
+ /*REQUIREMENT_TYPES*/
7195
+ ctx[4].includes(
7196
+ /*requirement*/
7197
+ ctx[3]);
7198
+ let if_block = show_if && create_if_block_3$3(ctx);
7211
7199
  return {
7212
7200
  c() {
7213
7201
  div = element("div");
@@ -7232,12 +7220,21 @@
7232
7220
  1) set_data(t0,
7233
7221
  /*label*/
7234
7222
  ctx[0]);
7223
+ if (dirty &
7224
+ /*requirement*/
7225
+ 8) show_if =
7226
+ /*requirement*/
7227
+ ctx[3] &&
7228
+ /*REQUIREMENT_TYPES*/
7229
+ ctx[4].includes(
7230
+ /*requirement*/
7231
+ ctx[3]);
7235
7232
 
7236
- if (
7237
- /*isOptional*/
7238
- ctx[3]) {
7239
- if (if_block) ;else {
7240
- if_block = create_if_block_3$3();
7233
+ if (show_if) {
7234
+ if (if_block) {
7235
+ if_block.p(ctx, dirty);
7236
+ } else {
7237
+ if_block = create_if_block_3$3(ctx);
7241
7238
  if_block.c();
7242
7239
  if_block.m(div, null);
7243
7240
  }
@@ -7253,19 +7250,37 @@
7253
7250
  }
7254
7251
 
7255
7252
  };
7256
- } // (18:6) {#if isOptional}
7253
+ } // (28:6) {#if requirement && REQUIREMENT_TYPES.includes(requirement)}
7257
7254
 
7258
7255
 
7259
7256
  function create_if_block_3$3(ctx) {
7260
7257
  let em;
7258
+ let t0;
7259
+ let t1;
7260
+ let t2;
7261
7261
  return {
7262
7262
  c() {
7263
7263
  em = element("em");
7264
- em.textContent = "(optional)";
7264
+ t0 = text("(");
7265
+ t1 = text(
7266
+ /*requirement*/
7267
+ ctx[3]);
7268
+ t2 = text(")");
7265
7269
  },
7266
7270
 
7267
7271
  m(target, anchor) {
7268
7272
  insert(target, em, anchor);
7273
+ append(em, t0);
7274
+ append(em, t1);
7275
+ append(em, t2);
7276
+ },
7277
+
7278
+ p(ctx, dirty) {
7279
+ if (dirty &
7280
+ /*requirement*/
7281
+ 8) set_data(t1,
7282
+ /*requirement*/
7283
+ ctx[3]);
7269
7284
  },
7270
7285
 
7271
7286
  d(detaching) {
@@ -7273,7 +7288,7 @@
7273
7288
  }
7274
7289
 
7275
7290
  };
7276
- } // (26:2) {#if error}
7291
+ } // (36:2) {#if error}
7277
7292
 
7278
7293
 
7279
7294
  function create_if_block_1$6(ctx) {
@@ -7306,7 +7321,7 @@
7306
7321
  }
7307
7322
 
7308
7323
  };
7309
- } // (29:2) {#if helptext}
7324
+ } // (39:2) {#if helptext}
7310
7325
 
7311
7326
 
7312
7327
  function create_if_block$9(ctx) {
@@ -7444,7 +7459,12 @@
7444
7459
  }
7445
7460
 
7446
7461
  function instance$h($$self, $$props, $$invalidate) {
7447
- let isOptional;
7462
+ const REQUIREMENT_TYPES = ["optional", "required", ""]; // type check function
7463
+
7464
+ function isRequirementType(value) {
7465
+ return REQUIREMENT_TYPES.includes(value);
7466
+ }
7467
+
7448
7468
  let {
7449
7469
  label = ""
7450
7470
  } = $$props;
@@ -7455,25 +7475,22 @@
7455
7475
  error = ""
7456
7476
  } = $$props;
7457
7477
  let {
7458
- optional = "false"
7478
+ requirement = ""
7459
7479
  } = $$props;
7480
+ onMount(() => {
7481
+ if (!isRequirementType(requirement)) {
7482
+ throw "Invalid requirement type";
7483
+ }
7484
+ });
7460
7485
 
7461
7486
  $$self.$$set = $$props => {
7462
7487
  if ('label' in $$props) $$invalidate(0, label = $$props.label);
7463
7488
  if ('helptext' in $$props) $$invalidate(1, helptext = $$props.helptext);
7464
7489
  if ('error' in $$props) $$invalidate(2, error = $$props.error);
7465
- if ('optional' in $$props) $$invalidate(4, optional = $$props.optional);
7490
+ if ('requirement' in $$props) $$invalidate(3, requirement = $$props.requirement);
7466
7491
  };
7467
7492
 
7468
- $$self.$$.update = () => {
7469
- if ($$self.$$.dirty &
7470
- /*optional*/
7471
- 16) {
7472
- $$invalidate(3, isOptional = toBoolean(optional));
7473
- }
7474
- };
7475
-
7476
- return [label, helptext, error, isOptional, optional];
7493
+ return [label, helptext, error, requirement, REQUIREMENT_TYPES];
7477
7494
  }
7478
7495
 
7479
7496
  class FormItem extends SvelteElement {
@@ -7488,7 +7505,7 @@
7488
7505
  label: 0,
7489
7506
  helptext: 1,
7490
7507
  error: 2,
7491
- optional: 4
7508
+ requirement: 3
7492
7509
  }, null);
7493
7510
 
7494
7511
  if (options) {
@@ -7504,7 +7521,7 @@
7504
7521
  }
7505
7522
 
7506
7523
  static get observedAttributes() {
7507
- return ["label", "helptext", "error", "optional"];
7524
+ return ["label", "helptext", "error", "requirement"];
7508
7525
  }
7509
7526
 
7510
7527
  get label() {
@@ -7540,13 +7557,13 @@
7540
7557
  flush();
7541
7558
  }
7542
7559
 
7543
- get optional() {
7544
- return this.$$.ctx[4];
7560
+ get requirement() {
7561
+ return this.$$.ctx[3];
7545
7562
  }
7546
7563
 
7547
- set optional(optional) {
7564
+ set requirement(requirement) {
7548
7565
  this.$$set({
7549
- optional
7566
+ requirement
7550
7567
  });
7551
7568
  flush();
7552
7569
  }
@@ -8414,7 +8431,7 @@
8414
8431
  customElements.define("goa-icon", Icon);
8415
8432
  /* libs/web-components/src/components/input/Input.svelte generated by Svelte v3.51.0 */
8416
8433
 
8417
- function create_if_block_7(ctx) {
8434
+ function create_if_block_4(ctx) {
8418
8435
  let div;
8419
8436
  let t;
8420
8437
  return {
@@ -8432,7 +8449,7 @@
8432
8449
  },
8433
8450
 
8434
8451
  p(ctx, dirty) {
8435
- if (dirty[0] &
8452
+ if (dirty &
8436
8453
  /*prefix*/
8437
8454
  16384) set_data(t,
8438
8455
  /*prefix*/
@@ -8444,10 +8461,10 @@
8444
8461
  }
8445
8462
 
8446
8463
  };
8447
- } // (82:4) {#if leadingicon}
8464
+ } // (78:4) {#if leadingicon}
8448
8465
 
8449
8466
 
8450
- function create_if_block_6(ctx) {
8467
+ function create_if_block_3$2(ctx) {
8451
8468
  let goa_icon;
8452
8469
  return {
8453
8470
  c() {
@@ -8464,7 +8481,7 @@
8464
8481
  },
8465
8482
 
8466
8483
  p(ctx, dirty) {
8467
- if (dirty[0] &
8484
+ if (dirty &
8468
8485
  /*leadingicon*/
8469
8486
  32) {
8470
8487
  set_custom_element_data(goa_icon, "type",
@@ -8478,10 +8495,10 @@
8478
8495
  }
8479
8496
 
8480
8497
  };
8481
- } // (112:4) {#if trailingicon && !handlesTrailingIconClick}
8498
+ } // (108:4) {#if trailingicon && !handlesTrailingIconClick}
8482
8499
 
8483
8500
 
8484
- function create_if_block_5(ctx) {
8501
+ function create_if_block_2$4(ctx) {
8485
8502
  let goa_icon;
8486
8503
  return {
8487
8504
  c() {
@@ -8499,7 +8516,7 @@
8499
8516
  },
8500
8517
 
8501
8518
  p(ctx, dirty) {
8502
- if (dirty[0] &
8519
+ if (dirty &
8503
8520
  /*trailingicon*/
8504
8521
  64) {
8505
8522
  set_custom_element_data(goa_icon, "type",
@@ -8513,10 +8530,10 @@
8513
8530
  }
8514
8531
 
8515
8532
  };
8516
- } // (122:4) {#if trailingicon && handlesTrailingIconClick}
8533
+ } // (118:4) {#if trailingicon && handlesTrailingIconClick}
8517
8534
 
8518
8535
 
8519
- function create_if_block_4(ctx) {
8536
+ function create_if_block_1$5(ctx) {
8520
8537
  let goa_icon_button;
8521
8538
  let mounted;
8522
8539
  let dispose;
@@ -8525,7 +8542,7 @@
8525
8542
  goa_icon_button = element("goa-icon-button");
8526
8543
  set_custom_element_data(goa_icon_button, "disabled",
8527
8544
  /*isDisabled*/
8528
- ctx[19]);
8545
+ ctx[17]);
8529
8546
  set_custom_element_data(goa_icon_button, "variant", "nocolor");
8530
8547
  set_custom_element_data(goa_icon_button, "size", "medium");
8531
8548
  set_custom_element_data(goa_icon_button, "icon",
@@ -8544,15 +8561,15 @@
8544
8561
  },
8545
8562
 
8546
8563
  p(ctx, dirty) {
8547
- if (dirty[0] &
8564
+ if (dirty &
8548
8565
  /*isDisabled*/
8549
- 524288) {
8566
+ 131072) {
8550
8567
  set_custom_element_data(goa_icon_button, "disabled",
8551
8568
  /*isDisabled*/
8552
- ctx[19]);
8569
+ ctx[17]);
8553
8570
  }
8554
8571
 
8555
- if (dirty[0] &
8572
+ if (dirty &
8556
8573
  /*trailingicon*/
8557
8574
  64) {
8558
8575
  set_custom_element_data(goa_icon_button, "icon",
@@ -8568,10 +8585,10 @@
8568
8585
  }
8569
8586
 
8570
8587
  };
8571
- } // (133:4) {#if suffix}
8588
+ } // (129:4) {#if suffix}
8572
8589
 
8573
8590
 
8574
- function create_if_block_3$2(ctx) {
8591
+ function create_if_block$7(ctx) {
8575
8592
  let span;
8576
8593
  let t;
8577
8594
  return {
@@ -8589,7 +8606,7 @@
8589
8606
  },
8590
8607
 
8591
8608
  p(ctx, dirty) {
8592
- if (dirty[0] &
8609
+ if (dirty &
8593
8610
  /*suffix*/
8594
8611
  32768) set_data(t,
8595
8612
  /*suffix*/
@@ -8600,151 +8617,6 @@
8600
8617
  if (detaching) detach(span);
8601
8618
  }
8602
8619
 
8603
- };
8604
- } // (139:2) {#if showCounter}
8605
-
8606
-
8607
- function create_if_block$7(ctx) {
8608
- let if_block_anchor;
8609
-
8610
- function select_block_type(ctx, dirty) {
8611
- if (
8612
- /*maxcharcount*/
8613
- ctx[16] > 0) return create_if_block_1$5;
8614
- if (
8615
- /*value*/
8616
- ctx[0].length > 0) return create_if_block_2$4;
8617
- }
8618
-
8619
- let current_block_type = select_block_type(ctx);
8620
- let if_block = current_block_type && current_block_type(ctx);
8621
- return {
8622
- c() {
8623
- if (if_block) if_block.c();
8624
- if_block_anchor = empty();
8625
- },
8626
-
8627
- m(target, anchor) {
8628
- if (if_block) if_block.m(target, anchor);
8629
- insert(target, if_block_anchor, anchor);
8630
- },
8631
-
8632
- p(ctx, dirty) {
8633
- if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
8634
- if_block.p(ctx, dirty);
8635
- } else {
8636
- if (if_block) if_block.d(1);
8637
- if_block = current_block_type && current_block_type(ctx);
8638
-
8639
- if (if_block) {
8640
- if_block.c();
8641
- if_block.m(if_block_anchor.parentNode, if_block_anchor);
8642
- }
8643
- }
8644
- },
8645
-
8646
- d(detaching) {
8647
- if (if_block) {
8648
- if_block.d(detaching);
8649
- }
8650
-
8651
- if (detaching) detach(if_block_anchor);
8652
- }
8653
-
8654
- };
8655
- } // (144:31)
8656
-
8657
-
8658
- function create_if_block_2$4(ctx) {
8659
- let div;
8660
- let t_value =
8661
- /*value*/
8662
- ctx[0].length + "";
8663
- let t;
8664
- return {
8665
- c() {
8666
- div = element("div");
8667
- t = text(t_value);
8668
- attr(div, "class", "counter");
8669
- },
8670
-
8671
- m(target, anchor) {
8672
- insert(target, div, anchor);
8673
- append(div, t);
8674
- },
8675
-
8676
- p(ctx, dirty) {
8677
- if (dirty[0] &
8678
- /*value*/
8679
- 1 && t_value !== (t_value =
8680
- /*value*/
8681
- ctx[0].length + "")) set_data(t, t_value);
8682
- },
8683
-
8684
- d(detaching) {
8685
- if (detaching) detach(div);
8686
- }
8687
-
8688
- };
8689
- } // (140:4) {#if maxcharcount > 0}
8690
-
8691
-
8692
- function create_if_block_1$5(ctx) {
8693
- let div;
8694
- let t0_value =
8695
- /*value*/
8696
- ctx[0].length + "";
8697
- let t0;
8698
- let t1_value = `/${
8699
- /*maxcharcount*/
8700
- ctx[16]}` + "";
8701
- let t1;
8702
- return {
8703
- c() {
8704
- div = element("div");
8705
- t0 = text(t0_value);
8706
- t1 = text(t1_value);
8707
- attr(div, "class", "counter");
8708
- toggle_class(div, "counter-error",
8709
- /*value*/
8710
- ctx[0].length >
8711
- /*maxcharcount*/
8712
- ctx[16]);
8713
- },
8714
-
8715
- m(target, anchor) {
8716
- insert(target, div, anchor);
8717
- append(div, t0);
8718
- append(div, t1);
8719
- },
8720
-
8721
- p(ctx, dirty) {
8722
- if (dirty[0] &
8723
- /*value*/
8724
- 1 && t0_value !== (t0_value =
8725
- /*value*/
8726
- ctx[0].length + "")) set_data(t0, t0_value);
8727
- if (dirty[0] &
8728
- /*maxcharcount*/
8729
- 65536 && t1_value !== (t1_value = `/${
8730
- /*maxcharcount*/
8731
- ctx[16]}` + "")) set_data(t1, t1_value);
8732
-
8733
- if (dirty[0] &
8734
- /*value, maxcharcount*/
8735
- 65537) {
8736
- toggle_class(div, "counter-error",
8737
- /*value*/
8738
- ctx[0].length >
8739
- /*maxcharcount*/
8740
- ctx[16]);
8741
- }
8742
- },
8743
-
8744
- d(detaching) {
8745
- if (detaching) detach(div);
8746
- }
8747
-
8748
8620
  };
8749
8621
  }
8750
8622
 
@@ -8761,32 +8633,28 @@
8761
8633
  let t3;
8762
8634
  let t4;
8763
8635
  let div0_class_value;
8764
- let t5;
8765
8636
  let div1_style_value;
8766
8637
  let mounted;
8767
8638
  let dispose;
8768
8639
  let if_block0 =
8769
8640
  /*prefix*/
8770
- ctx[14] && create_if_block_7(ctx);
8641
+ ctx[14] && create_if_block_4(ctx);
8771
8642
  let if_block1 =
8772
8643
  /*leadingicon*/
8773
- ctx[5] && create_if_block_6(ctx);
8644
+ ctx[5] && create_if_block_3$2(ctx);
8774
8645
  let if_block2 =
8775
8646
  /*trailingicon*/
8776
8647
  ctx[6] && !
8777
8648
  /*handlesTrailingIconClick*/
8778
- ctx[22] && create_if_block_5(ctx);
8649
+ ctx[20] && create_if_block_2$4(ctx);
8779
8650
  let if_block3 =
8780
8651
  /*trailingicon*/
8781
8652
  ctx[6] &&
8782
8653
  /*handlesTrailingIconClick*/
8783
- ctx[22] && create_if_block_4(ctx);
8654
+ ctx[20] && create_if_block_1$5(ctx);
8784
8655
  let if_block4 =
8785
8656
  /*suffix*/
8786
- ctx[15] && create_if_block_3$2(ctx);
8787
- let if_block5 =
8788
- /*showCounter*/
8789
- ctx[18] && create_if_block$7(ctx);
8657
+ ctx[15] && create_if_block$7(ctx);
8790
8658
  return {
8791
8659
  c() {
8792
8660
  div1 = element("div");
@@ -8802,8 +8670,6 @@
8802
8670
  if (if_block3) if_block3.c();
8803
8671
  t4 = space();
8804
8672
  if (if_block4) if_block4.c();
8805
- t5 = space();
8806
- if (if_block5) if_block5.c();
8807
8673
  this.c = noop;
8808
8674
  attr(input, "class", input_class_value = `input--${
8809
8675
  /*variant*/
@@ -8813,10 +8679,10 @@
8813
8679
  ctx[6] ? "-0.5rem" : "0"}`);
8814
8680
  input.readOnly =
8815
8681
  /*isReadonly*/
8816
- ctx[21];
8682
+ ctx[19];
8817
8683
  input.disabled =
8818
8684
  /*isDisabled*/
8819
- ctx[19];
8685
+ ctx[17];
8820
8686
  attr(input, "data-testid",
8821
8687
  /*testid*/
8822
8688
  ctx[8]);
@@ -8854,7 +8720,7 @@
8854
8720
  goa-input
8855
8721
  ${
8856
8722
  /*isDisabled*/
8857
- ctx[19] ? "goa-input--disabled" : ""}
8723
+ ctx[17] ? "goa-input--disabled" : ""}
8858
8724
  variant--${
8859
8725
  /*variant*/
8860
8726
  ctx[7]}
@@ -8864,7 +8730,7 @@
8864
8730
  `);
8865
8731
  toggle_class(div0, "error",
8866
8732
  /*isError*/
8867
- ctx[20]);
8733
+ ctx[18]);
8868
8734
  attr(div1, "class", "container");
8869
8735
  attr(div1, "style", div1_style_value = `
8870
8736
  --width: ${
@@ -8883,34 +8749,32 @@
8883
8749
  append(div0, input);
8884
8750
  /*input_binding*/
8885
8751
 
8886
- ctx[31](input);
8752
+ ctx[28](input);
8887
8753
  append(div0, t2);
8888
8754
  if (if_block2) if_block2.m(div0, null);
8889
8755
  append(div0, t3);
8890
8756
  if (if_block3) if_block3.m(div0, null);
8891
8757
  append(div0, t4);
8892
8758
  if (if_block4) if_block4.m(div0, null);
8893
- append(div1, t5);
8894
- if (if_block5) if_block5.m(div1, null);
8895
8759
 
8896
8760
  if (!mounted) {
8897
8761
  dispose = [listen(input, "keyup",
8898
8762
  /*onKeyUp*/
8899
- ctx[23]), listen(input, "change",
8763
+ ctx[21]), listen(input, "change",
8900
8764
  /*onKeyUp*/
8901
- ctx[23])];
8765
+ ctx[21])];
8902
8766
  mounted = true;
8903
8767
  }
8904
8768
  },
8905
8769
 
8906
- p(ctx, dirty) {
8770
+ p(ctx, [dirty]) {
8907
8771
  if (
8908
8772
  /*prefix*/
8909
8773
  ctx[14]) {
8910
8774
  if (if_block0) {
8911
8775
  if_block0.p(ctx, dirty);
8912
8776
  } else {
8913
- if_block0 = create_if_block_7(ctx);
8777
+ if_block0 = create_if_block_4(ctx);
8914
8778
  if_block0.c();
8915
8779
  if_block0.m(div0, t0);
8916
8780
  }
@@ -8925,7 +8789,7 @@
8925
8789
  if (if_block1) {
8926
8790
  if_block1.p(ctx, dirty);
8927
8791
  } else {
8928
- if_block1 = create_if_block_6(ctx);
8792
+ if_block1 = create_if_block_3$2(ctx);
8929
8793
  if_block1.c();
8930
8794
  if_block1.m(div0, t1);
8931
8795
  }
@@ -8934,7 +8798,7 @@
8934
8798
  if_block1 = null;
8935
8799
  }
8936
8800
 
8937
- if (dirty[0] &
8801
+ if (dirty &
8938
8802
  /*variant*/
8939
8803
  128 && input_class_value !== (input_class_value = `input--${
8940
8804
  /*variant*/
@@ -8942,7 +8806,7 @@
8942
8806
  attr(input, "class", input_class_value);
8943
8807
  }
8944
8808
 
8945
- if (dirty[0] &
8809
+ if (dirty &
8946
8810
  /*trailingicon*/
8947
8811
  64 && input_style_value !== (input_style_value = `--search-icon-offset: ${
8948
8812
  /*trailingicon*/
@@ -8950,23 +8814,23 @@
8950
8814
  attr(input, "style", input_style_value);
8951
8815
  }
8952
8816
 
8953
- if (dirty[0] &
8817
+ if (dirty &
8954
8818
  /*isReadonly*/
8955
- 2097152) {
8819
+ 524288) {
8956
8820
  input.readOnly =
8957
8821
  /*isReadonly*/
8958
- ctx[21];
8822
+ ctx[19];
8959
8823
  }
8960
8824
 
8961
- if (dirty[0] &
8825
+ if (dirty &
8962
8826
  /*isDisabled*/
8963
- 524288) {
8827
+ 131072) {
8964
8828
  input.disabled =
8965
8829
  /*isDisabled*/
8966
- ctx[19];
8830
+ ctx[17];
8967
8831
  }
8968
8832
 
8969
- if (dirty[0] &
8833
+ if (dirty &
8970
8834
  /*testid*/
8971
8835
  256) {
8972
8836
  attr(input, "data-testid",
@@ -8974,7 +8838,7 @@
8974
8838
  ctx[8]);
8975
8839
  }
8976
8840
 
8977
- if (dirty[0] &
8841
+ if (dirty &
8978
8842
  /*autocapitalize*/
8979
8843
  8) {
8980
8844
  attr(input, "autocapitalize",
@@ -8982,7 +8846,7 @@
8982
8846
  ctx[3]);
8983
8847
  }
8984
8848
 
8985
- if (dirty[0] &
8849
+ if (dirty &
8986
8850
  /*name*/
8987
8851
  4) {
8988
8852
  attr(input, "name",
@@ -8990,7 +8854,7 @@
8990
8854
  ctx[2]);
8991
8855
  }
8992
8856
 
8993
- if (dirty[0] &
8857
+ if (dirty &
8994
8858
  /*type*/
8995
8859
  2) {
8996
8860
  attr(input, "type",
@@ -8998,7 +8862,7 @@
8998
8862
  ctx[1]);
8999
8863
  }
9000
8864
 
9001
- if (dirty[0] &
8865
+ if (dirty &
9002
8866
  /*value*/
9003
8867
  1 && input.value !==
9004
8868
  /*value*/
@@ -9008,7 +8872,7 @@
9008
8872
  ctx[0];
9009
8873
  }
9010
8874
 
9011
- if (dirty[0] &
8875
+ if (dirty &
9012
8876
  /*placeholder*/
9013
8877
  16) {
9014
8878
  attr(input, "placeholder",
@@ -9016,7 +8880,7 @@
9016
8880
  ctx[4]);
9017
8881
  }
9018
8882
 
9019
- if (dirty[0] &
8883
+ if (dirty &
9020
8884
  /*min*/
9021
8885
  2048) {
9022
8886
  attr(input, "min",
@@ -9024,7 +8888,7 @@
9024
8888
  ctx[11]);
9025
8889
  }
9026
8890
 
9027
- if (dirty[0] &
8891
+ if (dirty &
9028
8892
  /*max*/
9029
8893
  4096) {
9030
8894
  attr(input, "max",
@@ -9032,7 +8896,7 @@
9032
8896
  ctx[12]);
9033
8897
  }
9034
8898
 
9035
- if (dirty[0] &
8899
+ if (dirty &
9036
8900
  /*step*/
9037
8901
  8192) {
9038
8902
  attr(input, "step",
@@ -9040,7 +8904,7 @@
9040
8904
  ctx[13]);
9041
8905
  }
9042
8906
 
9043
- if (dirty[0] &
8907
+ if (dirty &
9044
8908
  /*arialabel, name*/
9045
8909
  1028 && input_aria_label_value !== (input_aria_label_value =
9046
8910
  /*arialabel*/
@@ -9054,11 +8918,11 @@
9054
8918
  /*trailingicon*/
9055
8919
  ctx[6] && !
9056
8920
  /*handlesTrailingIconClick*/
9057
- ctx[22]) {
8921
+ ctx[20]) {
9058
8922
  if (if_block2) {
9059
8923
  if_block2.p(ctx, dirty);
9060
8924
  } else {
9061
- if_block2 = create_if_block_5(ctx);
8925
+ if_block2 = create_if_block_2$4(ctx);
9062
8926
  if_block2.c();
9063
8927
  if_block2.m(div0, t3);
9064
8928
  }
@@ -9071,11 +8935,11 @@
9071
8935
  /*trailingicon*/
9072
8936
  ctx[6] &&
9073
8937
  /*handlesTrailingIconClick*/
9074
- ctx[22]) {
8938
+ ctx[20]) {
9075
8939
  if (if_block3) {
9076
8940
  if_block3.p(ctx, dirty);
9077
8941
  } else {
9078
- if_block3 = create_if_block_4(ctx);
8942
+ if_block3 = create_if_block_1$5(ctx);
9079
8943
  if_block3.c();
9080
8944
  if_block3.m(div0, t4);
9081
8945
  }
@@ -9090,7 +8954,7 @@
9090
8954
  if (if_block4) {
9091
8955
  if_block4.p(ctx, dirty);
9092
8956
  } else {
9093
- if_block4 = create_if_block_3$2(ctx);
8957
+ if_block4 = create_if_block$7(ctx);
9094
8958
  if_block4.c();
9095
8959
  if_block4.m(div0, null);
9096
8960
  }
@@ -9099,13 +8963,13 @@
9099
8963
  if_block4 = null;
9100
8964
  }
9101
8965
 
9102
- if (dirty[0] &
8966
+ if (dirty &
9103
8967
  /*isDisabled, variant, type*/
9104
- 524418 && div0_class_value !== (div0_class_value = `
8968
+ 131202 && div0_class_value !== (div0_class_value = `
9105
8969
  goa-input
9106
8970
  ${
9107
8971
  /*isDisabled*/
9108
- ctx[19] ? "goa-input--disabled" : ""}
8972
+ ctx[17] ? "goa-input--disabled" : ""}
9109
8973
  variant--${
9110
8974
  /*variant*/
9111
8975
  ctx[7]}
@@ -9116,30 +8980,15 @@
9116
8980
  attr(div0, "class", div0_class_value);
9117
8981
  }
9118
8982
 
9119
- if (dirty[0] &
8983
+ if (dirty &
9120
8984
  /*isDisabled, variant, type, isError*/
9121
- 1572994) {
8985
+ 393346) {
9122
8986
  toggle_class(div0, "error",
9123
8987
  /*isError*/
9124
- ctx[20]);
9125
- }
9126
-
9127
- if (
9128
- /*showCounter*/
9129
- ctx[18]) {
9130
- if (if_block5) {
9131
- if_block5.p(ctx, dirty);
9132
- } else {
9133
- if_block5 = create_if_block$7(ctx);
9134
- if_block5.c();
9135
- if_block5.m(div1, null);
9136
- }
9137
- } else if (if_block5) {
9138
- if_block5.d(1);
9139
- if_block5 = null;
8988
+ ctx[18]);
9140
8989
  }
9141
8990
 
9142
- if (dirty[0] &
8991
+ if (dirty &
9143
8992
  /*width*/
9144
8993
  512 && div1_style_value !== (div1_style_value = `
9145
8994
  --width: ${
@@ -9159,11 +9008,10 @@
9159
9008
  if (if_block1) if_block1.d();
9160
9009
  /*input_binding*/
9161
9010
 
9162
- ctx[31](null);
9011
+ ctx[28](null);
9163
9012
  if (if_block2) if_block2.d();
9164
9013
  if (if_block3) if_block3.d();
9165
9014
  if (if_block4) if_block4.d();
9166
- if (if_block5) if_block5.d();
9167
9015
  mounted = false;
9168
9016
  run_all(dispose);
9169
9017
  }
@@ -9183,7 +9031,6 @@
9183
9031
  let isReadonly;
9184
9032
  let isError;
9185
9033
  let isDisabled;
9186
- let showCounter;
9187
9034
  let {
9188
9035
  type = "text"
9189
9036
  } = $$props;
@@ -9247,12 +9094,6 @@
9247
9094
  let {
9248
9095
  suffix = ""
9249
9096
  } = $$props;
9250
- let {
9251
- showcounter = "false"
9252
- } = $$props;
9253
- let {
9254
- maxcharcount = 0
9255
- } = $$props;
9256
9097
  let inputEl;
9257
9098
 
9258
9099
  function onKeyUp(e) {
@@ -9271,7 +9112,7 @@
9271
9112
  function input_binding($$value) {
9272
9113
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
9273
9114
  inputEl = $$value;
9274
- $$invalidate(17, inputEl);
9115
+ $$invalidate(16, inputEl);
9275
9116
  });
9276
9117
  }
9277
9118
 
@@ -9284,11 +9125,11 @@
9284
9125
  if ('leadingicon' in $$props) $$invalidate(5, leadingicon = $$props.leadingicon);
9285
9126
  if ('trailingicon' in $$props) $$invalidate(6, trailingicon = $$props.trailingicon);
9286
9127
  if ('variant' in $$props) $$invalidate(7, variant = $$props.variant);
9287
- if ('disabled' in $$props) $$invalidate(24, disabled = $$props.disabled);
9288
- if ('handletrailingiconclick' in $$props) $$invalidate(25, handletrailingiconclick = $$props.handletrailingiconclick);
9289
- if ('focused' in $$props) $$invalidate(26, focused = $$props.focused);
9290
- if ('readonly' in $$props) $$invalidate(27, readonly = $$props.readonly);
9291
- if ('error' in $$props) $$invalidate(28, error = $$props.error);
9128
+ if ('disabled' in $$props) $$invalidate(22, disabled = $$props.disabled);
9129
+ if ('handletrailingiconclick' in $$props) $$invalidate(23, handletrailingiconclick = $$props.handletrailingiconclick);
9130
+ if ('focused' in $$props) $$invalidate(24, focused = $$props.focused);
9131
+ if ('readonly' in $$props) $$invalidate(25, readonly = $$props.readonly);
9132
+ if ('error' in $$props) $$invalidate(26, error = $$props.error);
9292
9133
  if ('testid' in $$props) $$invalidate(8, testid = $$props.testid);
9293
9134
  if ('width' in $$props) $$invalidate(9, width = $$props.width);
9294
9135
  if ('arialabel' in $$props) $$invalidate(10, arialabel = $$props.arialabel);
@@ -9297,58 +9138,50 @@
9297
9138
  if ('step' in $$props) $$invalidate(13, step = $$props.step);
9298
9139
  if ('prefix' in $$props) $$invalidate(14, prefix = $$props.prefix);
9299
9140
  if ('suffix' in $$props) $$invalidate(15, suffix = $$props.suffix);
9300
- if ('showcounter' in $$props) $$invalidate(29, showcounter = $$props.showcounter);
9301
- if ('maxcharcount' in $$props) $$invalidate(16, maxcharcount = $$props.maxcharcount);
9302
9141
  };
9303
9142
 
9304
9143
  $$self.$$.update = () => {
9305
- if ($$self.$$.dirty[0] &
9144
+ if ($$self.$$.dirty &
9306
9145
  /*handletrailingiconclick*/
9307
- 33554432) {
9308
- $$invalidate(22, handlesTrailingIconClick = toBoolean(handletrailingiconclick));
9146
+ 8388608) {
9147
+ $$invalidate(20, handlesTrailingIconClick = toBoolean(handletrailingiconclick));
9309
9148
  }
9310
9149
 
9311
- if ($$self.$$.dirty[0] &
9150
+ if ($$self.$$.dirty &
9312
9151
  /*focused*/
9313
- 67108864) {
9314
- $$invalidate(30, isFocused = toBoolean(focused));
9152
+ 16777216) {
9153
+ $$invalidate(27, isFocused = toBoolean(focused));
9315
9154
  }
9316
9155
 
9317
- if ($$self.$$.dirty[0] &
9156
+ if ($$self.$$.dirty &
9318
9157
  /*readonly*/
9319
- 134217728) {
9320
- $$invalidate(21, isReadonly = toBoolean(readonly));
9158
+ 33554432) {
9159
+ $$invalidate(19, isReadonly = toBoolean(readonly));
9321
9160
  }
9322
9161
 
9323
- if ($$self.$$.dirty[0] &
9162
+ if ($$self.$$.dirty &
9324
9163
  /*error*/
9325
- 268435456) {
9326
- $$invalidate(20, isError = toBoolean(error));
9164
+ 67108864) {
9165
+ $$invalidate(18, isError = toBoolean(error));
9327
9166
  }
9328
9167
 
9329
- if ($$self.$$.dirty[0] &
9168
+ if ($$self.$$.dirty &
9330
9169
  /*disabled*/
9331
- 16777216) {
9332
- $$invalidate(19, isDisabled = toBoolean(disabled));
9170
+ 4194304) {
9171
+ $$invalidate(17, isDisabled = toBoolean(disabled));
9333
9172
  }
9334
9173
 
9335
- if ($$self.$$.dirty[0] &
9336
- /*showcounter*/
9337
- 536870912) {
9338
- $$invalidate(18, showCounter = toBoolean(showcounter));
9339
- }
9340
-
9341
- if ($$self.$$.dirty[0] &
9174
+ if ($$self.$$.dirty &
9342
9175
  /*isFocused, inputEl*/
9343
- 1073872896) {
9176
+ 134283264) {
9344
9177
  if (isFocused && inputEl) {
9345
9178
  setTimeout(() => inputEl.focus(), 1);
9346
9179
  }
9347
9180
  }
9348
9181
 
9349
- if ($$self.$$.dirty[0] &
9182
+ if ($$self.$$.dirty &
9350
9183
  /*inputEl, type*/
9351
- 131074) {
9184
+ 65538) {
9352
9185
  if (inputEl && type === "search") {
9353
9186
  inputEl.addEventListener("search", e => {
9354
9187
  onKeyUp(e);
@@ -9357,13 +9190,13 @@
9357
9190
  }
9358
9191
  };
9359
9192
 
9360
- return [value, type, name, autocapitalize, 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];
9193
+ return [value, type, name, autocapitalize, placeholder, leadingicon, trailingicon, variant, testid, width, arialabel, min, max, step, prefix, suffix, inputEl, isDisabled, isError, isReadonly, handlesTrailingIconClick, onKeyUp, disabled, handletrailingiconclick, focused, readonly, error, isFocused, input_binding];
9361
9194
  }
9362
9195
 
9363
9196
  class Input extends SvelteElement {
9364
9197
  constructor(options) {
9365
9198
  super();
9366
- this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box}.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=text],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>')
9199
+ this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box}.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=text],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}.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>')
9367
9200
  center center no-repeat}</style>`;
9368
9201
  init(this, {
9369
9202
  target: this.shadowRoot,
@@ -9378,11 +9211,11 @@
9378
9211
  leadingicon: 5,
9379
9212
  trailingicon: 6,
9380
9213
  variant: 7,
9381
- disabled: 24,
9382
- handletrailingiconclick: 25,
9383
- focused: 26,
9384
- readonly: 27,
9385
- error: 28,
9214
+ disabled: 22,
9215
+ handletrailingiconclick: 23,
9216
+ focused: 24,
9217
+ readonly: 25,
9218
+ error: 26,
9386
9219
  testid: 8,
9387
9220
  width: 9,
9388
9221
  arialabel: 10,
@@ -9390,10 +9223,8 @@
9390
9223
  max: 12,
9391
9224
  step: 13,
9392
9225
  prefix: 14,
9393
- suffix: 15,
9394
- showcounter: 29,
9395
- maxcharcount: 16
9396
- }, null, [-1, -1]);
9226
+ suffix: 15
9227
+ }, null);
9397
9228
 
9398
9229
  if (options) {
9399
9230
  if (options.target) {
@@ -9408,7 +9239,7 @@
9408
9239
  }
9409
9240
 
9410
9241
  static get observedAttributes() {
9411
- return ["type", "name", "value", "autocapitalize", "placeholder", "leadingicon", "trailingicon", "variant", "disabled", "handletrailingiconclick", "focused", "readonly", "error", "testid", "width", "arialabel", "min", "max", "step", "prefix", "suffix", "showcounter", "maxcharcount"];
9242
+ return ["type", "name", "value", "autocapitalize", "placeholder", "leadingicon", "trailingicon", "variant", "disabled", "handletrailingiconclick", "focused", "readonly", "error", "testid", "width", "arialabel", "min", "max", "step", "prefix", "suffix"];
9412
9243
  }
9413
9244
 
9414
9245
  get type() {
@@ -9500,7 +9331,7 @@
9500
9331
  }
9501
9332
 
9502
9333
  get disabled() {
9503
- return this.$$.ctx[24];
9334
+ return this.$$.ctx[22];
9504
9335
  }
9505
9336
 
9506
9337
  set disabled(disabled) {
@@ -9511,7 +9342,7 @@
9511
9342
  }
9512
9343
 
9513
9344
  get handletrailingiconclick() {
9514
- return this.$$.ctx[25];
9345
+ return this.$$.ctx[23];
9515
9346
  }
9516
9347
 
9517
9348
  set handletrailingiconclick(handletrailingiconclick) {
@@ -9522,7 +9353,7 @@
9522
9353
  }
9523
9354
 
9524
9355
  get focused() {
9525
- return this.$$.ctx[26];
9356
+ return this.$$.ctx[24];
9526
9357
  }
9527
9358
 
9528
9359
  set focused(focused) {
@@ -9533,7 +9364,7 @@
9533
9364
  }
9534
9365
 
9535
9366
  get readonly() {
9536
- return this.$$.ctx[27];
9367
+ return this.$$.ctx[25];
9537
9368
  }
9538
9369
 
9539
9370
  set readonly(readonly) {
@@ -9544,7 +9375,7 @@
9544
9375
  }
9545
9376
 
9546
9377
  get error() {
9547
- return this.$$.ctx[28];
9378
+ return this.$$.ctx[26];
9548
9379
  }
9549
9380
 
9550
9381
  set error(error) {
@@ -9642,28 +9473,6 @@
9642
9473
  flush();
9643
9474
  }
9644
9475
 
9645
- get showcounter() {
9646
- return this.$$.ctx[29];
9647
- }
9648
-
9649
- set showcounter(showcounter) {
9650
- this.$$set({
9651
- showcounter
9652
- });
9653
- flush();
9654
- }
9655
-
9656
- get maxcharcount() {
9657
- return this.$$.ctx[16];
9658
- }
9659
-
9660
- set maxcharcount(maxcharcount) {
9661
- this.$$set({
9662
- maxcharcount
9663
- });
9664
- flush();
9665
- }
9666
-
9667
9476
  }
9668
9477
 
9669
9478
  customElements.define("goa-input", Input);
@@ -14717,12 +14526,12 @@
14717
14526
  var children = _a.children,
14718
14527
  helpText = _a.helpText,
14719
14528
  error = _a.error,
14720
- optional = _a.optional,
14529
+ requirement = _a.requirement,
14721
14530
  label = _a.label;
14722
14531
  return jsxRuntime.jsx("goa-form-item", __assign({
14723
14532
  label: label,
14724
14533
  error: error,
14725
- optional: optional ? "true" : "false",
14534
+ requirement: requirement,
14726
14535
  helptext: helpText
14727
14536
  }, {
14728
14537
  children: children
@@ -14822,8 +14631,6 @@
14822
14631
  placeholder = _a.placeholder,
14823
14632
  error = _a.error,
14824
14633
  width = _a.width,
14825
- showCounter = _a.showCounter,
14826
- maxCharCount = _a.maxCharCount,
14827
14634
  testId = _a.testId,
14828
14635
  min = _a.min,
14829
14636
  max = _a.max,
@@ -14880,8 +14687,6 @@
14880
14687
  step: step,
14881
14688
  prefix: prefix,
14882
14689
  suffix: suffix,
14883
- showcounter: showCounter,
14884
- maxcharcount: maxCharCount,
14885
14690
  handletrailingiconclick: !!onTrailingIconClick
14886
14691
  }, void 0);
14887
14692
  };