@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.
@@ -3010,7 +3010,7 @@ function create_if_block_1$9(ctx) {
3010
3010
  }
3011
3011
 
3012
3012
  };
3013
- } // (51:4) {#if isIndeterminate}
3013
+ } // (59:4) {#if isIndeterminate}
3014
3014
 
3015
3015
 
3016
3016
  function create_if_block$f(ctx) {
@@ -3267,22 +3267,27 @@ function instance$t($$self, $$props, $$invalidate) {
3267
3267
  value = ""
3268
3268
  } = $$props;
3269
3269
  let {
3270
- disabled
3270
+ disabled = "false"
3271
3271
  } = $$props;
3272
3272
  let {
3273
- error
3273
+ error = "false"
3274
3274
  } = $$props;
3275
3275
  let {
3276
3276
  testid = ""
3277
- } = $$props;
3277
+ } = $$props; // Private
3278
+
3279
+ let _value;
3280
+
3281
+ onMount(() => {
3282
+ // hold on to the initial value to prevent losing it on check changes
3283
+ _value = value;
3284
+ });
3278
3285
 
3279
3286
  function onChange(e) {
3280
3287
  // An empty string is required as setting the second value to `null` caused the data to get
3281
3288
  // out of sync with the events.
3282
3289
  const newCheckStatus = !isChecked;
3283
-
3284
- const _value = newCheckStatus ? `${value || "checked"}` : ""; // set the local state
3285
-
3290
+ const newValue = newCheckStatus ? `${_value || "checked"}` : ""; // set the local state
3286
3291
 
3287
3292
  $$invalidate(9, checked = fromBoolean(newCheckStatus));
3288
3293
  e.target.dispatchEvent(new CustomEvent("_change", {
@@ -3290,7 +3295,7 @@ function instance$t($$self, $$props, $$invalidate) {
3290
3295
  detail: {
3291
3296
  name,
3292
3297
  checked: newCheckStatus,
3293
- value: _value
3298
+ value: newValue
3294
3299
  }
3295
3300
  }));
3296
3301
  }
@@ -3309,6 +3314,7 @@ function instance$t($$self, $$props, $$invalidate) {
3309
3314
  if ($$self.$$.dirty &
3310
3315
  /*disabled*/
3311
3316
  1024) {
3317
+ // Binding
3312
3318
  $$invalidate(7, isDisabled = toBoolean(disabled));
3313
3319
  }
3314
3320
 
@@ -4819,7 +4825,7 @@ function get_each_context$4(ctx, list, i) {
4819
4825
  child_ctx[39] = list[i];
4820
4826
  child_ctx[41] = i;
4821
4827
  return child_ctx;
4822
- } // (201:2) {#if isMenuVisible}
4828
+ } // (204:2) {#if isMenuVisible}
4823
4829
 
4824
4830
 
4825
4831
  function create_if_block$c(ctx) {
@@ -4842,7 +4848,7 @@ function create_if_block$c(ctx) {
4842
4848
  if (!mounted) {
4843
4849
  dispose = listen(div, "click",
4844
4850
  /*closeMenu*/
4845
- ctx[18]);
4851
+ ctx[17]);
4846
4852
  mounted = true;
4847
4853
  }
4848
4854
  },
@@ -4864,7 +4870,7 @@ function create_if_block$c(ctx) {
4864
4870
  }
4865
4871
 
4866
4872
  };
4867
- } // (242:4) {#each options as option, index}
4873
+ } // (243:4) {#each options as option, index}
4868
4874
 
4869
4875
 
4870
4876
  function create_each_block$4(ctx) {
@@ -4887,7 +4893,7 @@ function create_each_block$4(ctx) {
4887
4893
  function click_handler() {
4888
4894
  return (
4889
4895
  /*click_handler*/
4890
- ctx[22](
4896
+ ctx[21](
4891
4897
  /*option*/
4892
4898
  ctx[39])
4893
4899
  );
@@ -4908,13 +4914,13 @@ function create_each_block$4(ctx) {
4908
4914
  ctx[39].value);
4909
4915
  attr(li, "aria-selected", li_aria_selected_value =
4910
4916
  /*_values*/
4911
- ctx[9].includes(
4917
+ ctx[8].includes(
4912
4918
  /*option*/
4913
4919
  ctx[39].value) ? "true" : "false");
4914
4920
  attr(li, "class", "goa-dropdown-option");
4915
- attr(li, "data-testid", li_data_testid_value = `${
4921
+ attr(li, "data-testid", li_data_testid_value = `dropdown-item-${
4916
4922
  /*option*/
4917
- ctx[39].value}-dropdown-item`);
4923
+ ctx[39].value}`);
4918
4924
  attr(li, "data-index", li_data_index_value =
4919
4925
  /*index*/
4920
4926
  ctx[41]);
@@ -4924,10 +4930,10 @@ function create_each_block$4(ctx) {
4924
4930
  /*index*/
4925
4931
  ctx[41] ===
4926
4932
  /*highlightedIndex*/
4927
- ctx[13]);
4933
+ ctx[12]);
4928
4934
  toggle_class(li, "goa-dropdown-option--selected",
4929
4935
  /*_values*/
4930
- ctx[9].includes(
4936
+ ctx[8].includes(
4931
4937
  /*option*/
4932
4938
  ctx[39].value));
4933
4939
  },
@@ -4946,7 +4952,7 @@ function create_each_block$4(ctx) {
4946
4952
  ctx = new_ctx;
4947
4953
  if (dirty[0] &
4948
4954
  /*options*/
4949
- 1024 && t_value !== (t_value = (
4955
+ 512 && t_value !== (t_value = (
4950
4956
  /*option*/
4951
4957
  ctx[39].label ||
4952
4958
  /*option*/
@@ -4954,7 +4960,7 @@ function create_each_block$4(ctx) {
4954
4960
 
4955
4961
  if (dirty[0] &
4956
4962
  /*options*/
4957
- 1024 && li_id_value !== (li_id_value =
4963
+ 512 && li_id_value !== (li_id_value =
4958
4964
  /*option*/
4959
4965
  ctx[39].label)) {
4960
4966
  attr(li, "id", li_id_value);
@@ -4962,7 +4968,7 @@ function create_each_block$4(ctx) {
4962
4968
 
4963
4969
  if (dirty[0] &
4964
4970
  /*options*/
4965
- 1024 && li_aria_label_value !== (li_aria_label_value =
4971
+ 512 && li_aria_label_value !== (li_aria_label_value =
4966
4972
  /*option*/
4967
4973
  ctx[39].label ||
4968
4974
  /*option*/
@@ -4972,9 +4978,9 @@ function create_each_block$4(ctx) {
4972
4978
 
4973
4979
  if (dirty[0] &
4974
4980
  /*_values, options*/
4975
- 1536 && li_aria_selected_value !== (li_aria_selected_value =
4981
+ 768 && li_aria_selected_value !== (li_aria_selected_value =
4976
4982
  /*_values*/
4977
- ctx[9].includes(
4983
+ ctx[8].includes(
4978
4984
  /*option*/
4979
4985
  ctx[39].value) ? "true" : "false")) {
4980
4986
  attr(li, "aria-selected", li_aria_selected_value);
@@ -4982,28 +4988,28 @@ function create_each_block$4(ctx) {
4982
4988
 
4983
4989
  if (dirty[0] &
4984
4990
  /*options*/
4985
- 1024 && li_data_testid_value !== (li_data_testid_value = `${
4991
+ 512 && li_data_testid_value !== (li_data_testid_value = `dropdown-item-${
4986
4992
  /*option*/
4987
- ctx[39].value}-dropdown-item`)) {
4993
+ ctx[39].value}`)) {
4988
4994
  attr(li, "data-testid", li_data_testid_value);
4989
4995
  }
4990
4996
 
4991
4997
  if (dirty[0] &
4992
4998
  /*highlightedIndex*/
4993
- 8192) {
4999
+ 4096) {
4994
5000
  toggle_class(li, "goa-dropdown-option--tabbed",
4995
5001
  /*index*/
4996
5002
  ctx[41] ===
4997
5003
  /*highlightedIndex*/
4998
- ctx[13]);
5004
+ ctx[12]);
4999
5005
  }
5000
5006
 
5001
5007
  if (dirty[0] &
5002
5008
  /*_values, options*/
5003
- 1536) {
5009
+ 768) {
5004
5010
  toggle_class(li, "goa-dropdown-option--selected",
5005
5011
  /*_values*/
5006
- ctx[9].includes(
5012
+ ctx[8].includes(
5007
5013
  /*option*/
5008
5014
  ctx[39].value));
5009
5015
  }
@@ -5019,27 +5025,26 @@ function create_each_block$4(ctx) {
5019
5025
  }
5020
5026
 
5021
5027
  function create_fragment$r(ctx) {
5022
- let div1;
5028
+ let div;
5023
5029
  let t0;
5024
- let div0;
5025
5030
  let goa_input;
5026
- let goa_input_id_value;
5031
+ let goa_input_data_testid_value;
5027
5032
  let goa_input_aria_label_value;
5028
- let div0_data_testid_value;
5029
5033
  let t1;
5030
5034
  let ul;
5031
5035
  let t2;
5032
5036
  let slot;
5033
5037
  let ul_style_value;
5034
- let div1_style_value;
5038
+ let div_data_testid_value;
5039
+ let div_style_value;
5035
5040
  let mounted;
5036
5041
  let dispose;
5037
5042
  let if_block =
5038
5043
  /*isMenuVisible*/
5039
- ctx[12] && create_if_block$c(ctx);
5044
+ ctx[11] && create_if_block$c(ctx);
5040
5045
  let each_value =
5041
5046
  /*options*/
5042
- ctx[10];
5047
+ ctx[9];
5043
5048
  let each_blocks = [];
5044
5049
 
5045
5050
  for (let i = 0; i < each_value.length; i += 1) {
@@ -5048,10 +5053,9 @@ function create_fragment$r(ctx) {
5048
5053
 
5049
5054
  return {
5050
5055
  c() {
5051
- div1 = element("div");
5056
+ div = element("div");
5052
5057
  if (if_block) if_block.c();
5053
5058
  t0 = space();
5054
- div0 = element("div");
5055
5059
  goa_input = element("goa-input");
5056
5060
  t1 = space();
5057
5061
  ul = element("ul");
@@ -5065,10 +5069,10 @@ function create_fragment$r(ctx) {
5065
5069
  this.c = noop;
5066
5070
  set_custom_element_data(goa_input, "error",
5067
5071
  /*error*/
5068
- ctx[8]);
5072
+ ctx[7]);
5069
5073
  set_custom_element_data(goa_input, "disabled",
5070
5074
  /*disabled*/
5071
- ctx[7]);
5075
+ ctx[6]);
5072
5076
  set_custom_element_data(goa_input, "leadingicon",
5073
5077
  /*leadingicon*/
5074
5078
  ctx[2]);
@@ -5076,7 +5080,7 @@ function create_fragment$r(ctx) {
5076
5080
  /*placeholder*/
5077
5081
  ctx[4]);
5078
5082
  set_custom_element_data(goa_input, "width", "100%");
5079
- set_custom_element_data(goa_input, "id", goa_input_id_value = `${
5083
+ set_custom_element_data(goa_input, "data-testid", goa_input_data_testid_value = `${
5080
5084
  /*name*/
5081
5085
  ctx[0]}-dropdown-input`);
5082
5086
  set_custom_element_data(goa_input, "role", "combobox");
@@ -5087,22 +5091,19 @@ function create_fragment$r(ctx) {
5087
5091
  ctx[0]);
5088
5092
  set_custom_element_data(goa_input, "aria-expanded",
5089
5093
  /*isMenuVisible*/
5090
- ctx[12]);
5094
+ ctx[11]);
5091
5095
  set_custom_element_data(goa_input, "aria-controls", "menu");
5092
5096
  set_custom_element_data(goa_input, "readonly", "");
5093
5097
  set_custom_element_data(goa_input, "trailingicon", "chevron-down");
5094
5098
  set_custom_element_data(goa_input, "type", "text");
5095
5099
  set_custom_element_data(goa_input, "value",
5096
5100
  /*selectedLabel*/
5097
- ctx[11]);
5098
- attr(div0, "data-testid", div0_data_testid_value = `${
5099
- /*name*/
5100
- ctx[0]}-dropdown`);
5101
+ ctx[10]);
5101
5102
  attr(ul, "id", "menu");
5102
5103
  attr(ul, "role", "listbox");
5103
5104
  attr(ul, "aria-activedescendant",
5104
5105
  /*selectedLabel*/
5105
- ctx[11]);
5106
+ ctx[10]);
5106
5107
  attr(ul, "data-testid", "dropdown-menu");
5107
5108
  attr(ul, "tabindex", "0");
5108
5109
  attr(ul, "class", "goa-dropdown-list");
@@ -5111,26 +5112,25 @@ function create_fragment$r(ctx) {
5111
5112
  ctx[3]}`);
5112
5113
  toggle_class(ul, "dropdown-active",
5113
5114
  /*isMenuVisible*/
5114
- ctx[12]);
5115
- attr(div1, "data-testid",
5116
- /*testid*/
5117
- ctx[5]);
5118
- attr(div1, "class", "goa-dropdown-box");
5119
- attr(div1, "style", div1_style_value = `--width: ${
5115
+ ctx[11]);
5116
+ attr(div, "data-testid", div_data_testid_value = `${
5117
+ /*name*/
5118
+ ctx[0]}-dropdown`);
5119
+ attr(div, "class", "goa-dropdown-box");
5120
+ attr(div, "style", div_style_value = `--width: ${
5120
5121
  /*width*/
5121
- ctx[6] ||
5122
+ ctx[5] ||
5122
5123
  /*computedWidth*/
5123
- ctx[14]}`);
5124
+ ctx[13]}`);
5124
5125
  },
5125
5126
 
5126
5127
  m(target, anchor) {
5127
- insert(target, div1, anchor);
5128
- if (if_block) if_block.m(div1, null);
5129
- append(div1, t0);
5130
- append(div1, div0);
5131
- append(div0, goa_input);
5132
- append(div1, t1);
5133
- append(div1, ul);
5128
+ insert(target, div, anchor);
5129
+ if (if_block) if_block.m(div, null);
5130
+ append(div, t0);
5131
+ append(div, goa_input);
5132
+ append(div, t1);
5133
+ append(div, ul);
5134
5134
 
5135
5135
  for (let i = 0; i < each_blocks.length; i += 1) {
5136
5136
  each_blocks[i].m(ul, null);
@@ -5140,15 +5140,15 @@ function create_fragment$r(ctx) {
5140
5140
  append(ul, slot);
5141
5141
  /*ul_binding*/
5142
5142
 
5143
- ctx[23](ul);
5144
- /*div1_binding*/
5143
+ ctx[22](ul);
5144
+ /*div_binding*/
5145
5145
 
5146
- ctx[24](div1);
5146
+ ctx[23](div);
5147
5147
 
5148
5148
  if (!mounted) {
5149
5149
  dispose = listen(goa_input, "click",
5150
5150
  /*showMenu*/
5151
- ctx[17]);
5151
+ ctx[16]);
5152
5152
  mounted = true;
5153
5153
  }
5154
5154
  },
@@ -5156,13 +5156,13 @@ function create_fragment$r(ctx) {
5156
5156
  p(ctx, dirty) {
5157
5157
  if (
5158
5158
  /*isMenuVisible*/
5159
- ctx[12]) {
5159
+ ctx[11]) {
5160
5160
  if (if_block) {
5161
5161
  if_block.p(ctx, dirty);
5162
5162
  } else {
5163
5163
  if_block = create_if_block$c(ctx);
5164
5164
  if_block.c();
5165
- if_block.m(div1, t0);
5165
+ if_block.m(div, t0);
5166
5166
  }
5167
5167
  } else if (if_block) {
5168
5168
  if_block.d(1);
@@ -5171,18 +5171,18 @@ function create_fragment$r(ctx) {
5171
5171
 
5172
5172
  if (dirty[0] &
5173
5173
  /*error*/
5174
- 256) {
5174
+ 128) {
5175
5175
  set_custom_element_data(goa_input, "error",
5176
5176
  /*error*/
5177
- ctx[8]);
5177
+ ctx[7]);
5178
5178
  }
5179
5179
 
5180
5180
  if (dirty[0] &
5181
5181
  /*disabled*/
5182
- 128) {
5182
+ 64) {
5183
5183
  set_custom_element_data(goa_input, "disabled",
5184
5184
  /*disabled*/
5185
- ctx[7]);
5185
+ ctx[6]);
5186
5186
  }
5187
5187
 
5188
5188
  if (dirty[0] &
@@ -5203,10 +5203,10 @@ function create_fragment$r(ctx) {
5203
5203
 
5204
5204
  if (dirty[0] &
5205
5205
  /*name*/
5206
- 1 && goa_input_id_value !== (goa_input_id_value = `${
5206
+ 1 && goa_input_data_testid_value !== (goa_input_data_testid_value = `${
5207
5207
  /*name*/
5208
5208
  ctx[0]}-dropdown-input`)) {
5209
- set_custom_element_data(goa_input, "id", goa_input_id_value);
5209
+ set_custom_element_data(goa_input, "data-testid", goa_input_data_testid_value);
5210
5210
  }
5211
5211
 
5212
5212
  if (dirty[0] &
@@ -5221,34 +5221,26 @@ function create_fragment$r(ctx) {
5221
5221
 
5222
5222
  if (dirty[0] &
5223
5223
  /*isMenuVisible*/
5224
- 4096) {
5224
+ 2048) {
5225
5225
  set_custom_element_data(goa_input, "aria-expanded",
5226
5226
  /*isMenuVisible*/
5227
- ctx[12]);
5227
+ ctx[11]);
5228
5228
  }
5229
5229
 
5230
5230
  if (dirty[0] &
5231
5231
  /*selectedLabel*/
5232
- 2048) {
5232
+ 1024) {
5233
5233
  set_custom_element_data(goa_input, "value",
5234
5234
  /*selectedLabel*/
5235
- ctx[11]);
5236
- }
5237
-
5238
- if (dirty[0] &
5239
- /*name*/
5240
- 1 && div0_data_testid_value !== (div0_data_testid_value = `${
5241
- /*name*/
5242
- ctx[0]}-dropdown`)) {
5243
- attr(div0, "data-testid", div0_data_testid_value);
5235
+ ctx[10]);
5244
5236
  }
5245
5237
 
5246
5238
  if (dirty[0] &
5247
5239
  /*options, _values, highlightedIndex, onSelect*/
5248
- 534016) {
5240
+ 267008) {
5249
5241
  each_value =
5250
5242
  /*options*/
5251
- ctx[10];
5243
+ ctx[9];
5252
5244
  let i;
5253
5245
 
5254
5246
  for (i = 0; i < each_value.length; i += 1) {
@@ -5272,10 +5264,10 @@ function create_fragment$r(ctx) {
5272
5264
 
5273
5265
  if (dirty[0] &
5274
5266
  /*selectedLabel*/
5275
- 2048) {
5267
+ 1024) {
5276
5268
  attr(ul, "aria-activedescendant",
5277
5269
  /*selectedLabel*/
5278
- ctx[11]);
5270
+ ctx[10]);
5279
5271
  }
5280
5272
 
5281
5273
  if (dirty[0] &
@@ -5288,28 +5280,28 @@ function create_fragment$r(ctx) {
5288
5280
 
5289
5281
  if (dirty[0] &
5290
5282
  /*isMenuVisible*/
5291
- 4096) {
5283
+ 2048) {
5292
5284
  toggle_class(ul, "dropdown-active",
5293
5285
  /*isMenuVisible*/
5294
- ctx[12]);
5286
+ ctx[11]);
5295
5287
  }
5296
5288
 
5297
5289
  if (dirty[0] &
5298
- /*testid*/
5299
- 32) {
5300
- attr(div1, "data-testid",
5301
- /*testid*/
5302
- ctx[5]);
5290
+ /*name*/
5291
+ 1 && div_data_testid_value !== (div_data_testid_value = `${
5292
+ /*name*/
5293
+ ctx[0]}-dropdown`)) {
5294
+ attr(div, "data-testid", div_data_testid_value);
5303
5295
  }
5304
5296
 
5305
5297
  if (dirty[0] &
5306
5298
  /*width, computedWidth*/
5307
- 16448 && div1_style_value !== (div1_style_value = `--width: ${
5299
+ 8224 && div_style_value !== (div_style_value = `--width: ${
5308
5300
  /*width*/
5309
- ctx[6] ||
5301
+ ctx[5] ||
5310
5302
  /*computedWidth*/
5311
- ctx[14]}`)) {
5312
- attr(div1, "style", div1_style_value);
5303
+ ctx[13]}`)) {
5304
+ attr(div, "style", div_style_value);
5313
5305
  }
5314
5306
  },
5315
5307
 
@@ -5317,15 +5309,15 @@ function create_fragment$r(ctx) {
5317
5309
  o: noop,
5318
5310
 
5319
5311
  d(detaching) {
5320
- if (detaching) detach(div1);
5312
+ if (detaching) detach(div);
5321
5313
  if (if_block) if_block.d();
5322
5314
  destroy_each(each_blocks, detaching);
5323
5315
  /*ul_binding*/
5324
5316
 
5325
- ctx[23](null);
5326
- /*div1_binding*/
5317
+ ctx[22](null);
5318
+ /*div_binding*/
5327
5319
 
5328
- ctx[24](null);
5320
+ ctx[23](null);
5329
5321
  mounted = false;
5330
5322
  dispose();
5331
5323
  }
@@ -5358,9 +5350,6 @@ function instance$p($$self, $$props, $$invalidate) {
5358
5350
  let {
5359
5351
  placeholder = ""
5360
5352
  } = $$props;
5361
- let {
5362
- testid = ""
5363
- } = $$props;
5364
5353
  let {
5365
5354
  width = ""
5366
5355
  } = $$props;
@@ -5431,7 +5420,7 @@ function instance$p($$self, $$props, $$invalidate) {
5431
5420
 
5432
5421
  const rawValues = typeof rawValue === "object" ? rawValue : [rawValue]; // convert all values to strings to avoid later type comparison issues
5433
5422
 
5434
- $$invalidate(9, _values = rawValues.map(val => `${val}`));
5423
+ $$invalidate(8, _values = rawValues.map(val => `${val}`));
5435
5424
  }
5436
5425
 
5437
5426
  function bindContext() {
@@ -5444,17 +5433,17 @@ function instance$p($$self, $$props, $$invalidate) {
5444
5433
 
5445
5434
  const selected = _values.includes(_data.value);
5446
5435
 
5447
- $$invalidate(10, options = [...options, Object.assign(Object.assign({}, _data), {
5436
+ $$invalidate(9, options = [...options, Object.assign(Object.assign({}, _data), {
5448
5437
  selected
5449
5438
  })]);
5450
5439
 
5451
5440
  if (selected) {
5452
- $$invalidate(11, selectedLabel = _data.label);
5441
+ $$invalidate(10, selectedLabel = _data.label);
5453
5442
  }
5454
5443
 
5455
5444
  if (!width && maxLetterCount < _data.label.length) {
5456
5445
  maxLetterCount = _data.label.length;
5457
- $$invalidate(14, computedWidth = `${Math.max(20, maxLetterCount + 12)}ch`);
5446
+ $$invalidate(13, computedWidth = `${Math.max(20, maxLetterCount + 12)}ch`);
5458
5447
  }
5459
5448
 
5460
5449
  setHighlightedIndexToSelected();
@@ -5469,32 +5458,30 @@ function instance$p($$self, $$props, $$invalidate) {
5469
5458
  return;
5470
5459
  }
5471
5460
 
5472
- $$invalidate(12, isMenuVisible = true);
5461
+ $$invalidate(11, isMenuVisible = true);
5473
5462
  await tick(); // hide menu on blur
5474
5463
 
5475
5464
  menuEl.addEventListener("blur", closeMenu);
5476
5465
  menuEl.focus(); // bind up/down arrows to navigate options
5477
5466
 
5478
- menuEl.addEventListener("keydown", onMenuKeyDown);
5479
5467
  menuEl.addEventListener("mouseover", onHighlight);
5480
5468
  }
5481
5469
 
5482
5470
  function closeMenu() {
5483
5471
  menuEl.removeEventListener("blur", closeMenu);
5484
- menuEl.removeEventListener("keydown", onMenuKeyDown);
5485
5472
  menuEl.removeEventListener("mouseover", onHighlight);
5486
5473
  setHighlightedIndexToSelected();
5487
- $$invalidate(12, isMenuVisible = false);
5474
+ $$invalidate(11, isMenuVisible = false);
5488
5475
  }
5489
5476
 
5490
5477
  function setHighlightedIndexToSelected() {
5491
- $$invalidate(13, highlightedIndex = options.findIndex(option => _values.includes(option.value)));
5478
+ $$invalidate(12, highlightedIndex = options.findIndex(option => _values.includes(option.value)));
5492
5479
  } // Event handlers
5493
5480
 
5494
5481
 
5495
5482
  function onSelect(val, label, close) {
5496
5483
  if (_disabled) return;
5497
- $$invalidate(11, selectedLabel = label);
5484
+ $$invalidate(10, selectedLabel = label);
5498
5485
 
5499
5486
  if (_multiselect) {
5500
5487
  _values.push(val);
@@ -5507,7 +5494,7 @@ function instance$p($$self, $$props, $$invalidate) {
5507
5494
  }
5508
5495
  }));
5509
5496
  } else {
5510
- $$invalidate(9, _values = [val]);
5497
+ $$invalidate(8, _values = [val]);
5511
5498
  el.dispatchEvent(new CustomEvent("_change", {
5512
5499
  composed: true,
5513
5500
  detail: {
@@ -5525,57 +5512,66 @@ function instance$p($$self, $$props, $$invalidate) {
5525
5512
  const onInputKeyDown = e => {
5526
5513
  switch (e.key) {
5527
5514
  case " ":
5528
- showMenu();
5515
+ case "Enter":
5516
+ isMenuVisible ? closeMenu() : showMenu();
5529
5517
  e.preventDefault();
5530
5518
  break;
5531
- }
5532
- }; // add required bindings to component
5533
-
5534
-
5535
- function onFocus() {
5536
- el.addEventListener("keydown", onInputKeyDown);
5537
- } // remove all bindings from component
5538
-
5539
-
5540
- function onBlur() {
5541
- el.removeEventListener("keydown", onInputKeyDown);
5542
- }
5543
-
5544
- function onMenuKeyDown(e) {
5545
- switch (e.key) {
5546
- case "ArrowUp":
5547
- if (highlightedIndex > 0) {
5548
- $$invalidate(13, highlightedIndex--, highlightedIndex);
5549
- onSelect(options[highlightedIndex].value, options[highlightedIndex].label, false);
5550
- }
5551
5519
 
5520
+ case "Escape":
5521
+ isMenuVisible && closeMenu();
5552
5522
  e.preventDefault();
5553
5523
  break;
5554
5524
 
5555
5525
  case "ArrowDown":
5556
- if (highlightedIndex < options.length - 1) {
5557
- $$invalidate(13, highlightedIndex++, highlightedIndex);
5558
- onSelect(options[highlightedIndex].value, options[highlightedIndex].label, false);
5526
+ if (e.altKey) {
5527
+ isMenuVisible ? closeMenu() : showMenu();
5528
+ break;
5559
5529
  }
5560
5530
 
5561
- e.preventDefault();
5562
- break;
5531
+ _handleArrowDown();
5563
5532
 
5564
- case "Tab":
5565
- case "Enter":
5566
- closeMenu();
5567
5533
  e.preventDefault();
5568
5534
  break;
5569
5535
 
5570
- case "Escape":
5571
- closeMenu();
5536
+ case "ArrowUp":
5537
+ if (e.altKey) {
5538
+ isMenuVisible ? closeMenu() : showMenu();
5539
+ break;
5540
+ }
5541
+
5542
+ _handleArrowUp();
5543
+
5572
5544
  e.preventDefault();
5573
5545
  break;
5574
5546
  }
5547
+ };
5548
+
5549
+ function _handleArrowDown() {
5550
+ if (highlightedIndex < options.length - 1) {
5551
+ $$invalidate(12, highlightedIndex++, highlightedIndex);
5552
+ onSelect(options[highlightedIndex].value, options[highlightedIndex].label, false);
5553
+ }
5554
+ }
5555
+
5556
+ function _handleArrowUp() {
5557
+ if (highlightedIndex > 0) {
5558
+ $$invalidate(12, highlightedIndex--, highlightedIndex);
5559
+ onSelect(options[highlightedIndex].value, options[highlightedIndex].label, false);
5560
+ }
5561
+ } // add required bindings to component
5562
+
5563
+
5564
+ function onFocus() {
5565
+ el.addEventListener("keydown", onInputKeyDown);
5566
+ } // remove all bindings from component
5567
+
5568
+
5569
+ function onBlur() {
5570
+ el.removeEventListener("keydown", onInputKeyDown);
5575
5571
  }
5576
5572
 
5577
5573
  function onHighlight(e) {
5578
- $$invalidate(13, highlightedIndex = Number(e.target.dataset.index));
5574
+ $$invalidate(12, highlightedIndex = Number(e.target.dataset.index));
5579
5575
  }
5580
5576
 
5581
5577
  const click_handler = option => onSelect(option.value, option.label, true);
@@ -5583,46 +5579,45 @@ function instance$p($$self, $$props, $$invalidate) {
5583
5579
  function ul_binding($$value) {
5584
5580
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
5585
5581
  menuEl = $$value;
5586
- $$invalidate(16, menuEl);
5582
+ $$invalidate(15, menuEl);
5587
5583
  });
5588
5584
  }
5589
5585
 
5590
- function div1_binding($$value) {
5586
+ function div_binding($$value) {
5591
5587
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
5592
5588
  el = $$value;
5593
- $$invalidate(15, el);
5589
+ $$invalidate(14, el);
5594
5590
  });
5595
5591
  }
5596
5592
 
5597
5593
  $$self.$$set = $$props => {
5598
5594
  if ('name' in $$props) $$invalidate(0, name = $$props.name);
5599
5595
  if ('arialabel' in $$props) $$invalidate(1, arialabel = $$props.arialabel);
5600
- if ('value' in $$props) $$invalidate(20, value = $$props.value);
5596
+ if ('value' in $$props) $$invalidate(19, value = $$props.value);
5601
5597
  if ('leadingicon' in $$props) $$invalidate(2, leadingicon = $$props.leadingicon);
5602
5598
  if ('maxheight' in $$props) $$invalidate(3, maxheight = $$props.maxheight);
5603
5599
  if ('placeholder' in $$props) $$invalidate(4, placeholder = $$props.placeholder);
5604
- if ('testid' in $$props) $$invalidate(5, testid = $$props.testid);
5605
- if ('width' in $$props) $$invalidate(6, width = $$props.width);
5606
- if ('disabled' in $$props) $$invalidate(7, disabled = $$props.disabled);
5607
- if ('error' in $$props) $$invalidate(8, error = $$props.error);
5608
- if ('multiselect' in $$props) $$invalidate(21, multiselect = $$props.multiselect);
5600
+ if ('width' in $$props) $$invalidate(5, width = $$props.width);
5601
+ if ('disabled' in $$props) $$invalidate(6, disabled = $$props.disabled);
5602
+ if ('error' in $$props) $$invalidate(7, error = $$props.error);
5603
+ if ('multiselect' in $$props) $$invalidate(20, multiselect = $$props.multiselect);
5609
5604
  };
5610
5605
 
5611
5606
  $$self.$$.update = () => {
5612
5607
  if ($$self.$$.dirty[0] &
5613
5608
  /*disabled*/
5614
- 128) {
5609
+ 64) {
5615
5610
  _disabled = toBoolean(disabled);
5616
5611
  }
5617
5612
 
5618
5613
  if ($$self.$$.dirty[0] &
5619
5614
  /*multiselect*/
5620
- 2097152) {
5615
+ 1048576) {
5621
5616
  _multiselect = toBoolean(multiselect);
5622
5617
  }
5623
5618
  };
5624
5619
 
5625
- 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];
5620
+ 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];
5626
5621
  }
5627
5622
 
5628
5623
  class Dropdown extends SvelteElement {
@@ -5636,15 +5631,14 @@ class Dropdown extends SvelteElement {
5636
5631
  }, instance$p, create_fragment$r, safe_not_equal, {
5637
5632
  name: 0,
5638
5633
  arialabel: 1,
5639
- value: 20,
5634
+ value: 19,
5640
5635
  leadingicon: 2,
5641
5636
  maxheight: 3,
5642
5637
  placeholder: 4,
5643
- testid: 5,
5644
- width: 6,
5645
- disabled: 7,
5646
- error: 8,
5647
- multiselect: 21
5638
+ width: 5,
5639
+ disabled: 6,
5640
+ error: 7,
5641
+ multiselect: 20
5648
5642
  }, null, [-1, -1]);
5649
5643
 
5650
5644
  if (options) {
@@ -5660,7 +5654,7 @@ class Dropdown extends SvelteElement {
5660
5654
  }
5661
5655
 
5662
5656
  static get observedAttributes() {
5663
- return ["name", "arialabel", "value", "leadingicon", "maxheight", "placeholder", "testid", "width", "disabled", "error", "multiselect"];
5657
+ return ["name", "arialabel", "value", "leadingicon", "maxheight", "placeholder", "width", "disabled", "error", "multiselect"];
5664
5658
  }
5665
5659
 
5666
5660
  get name() {
@@ -5686,7 +5680,7 @@ class Dropdown extends SvelteElement {
5686
5680
  }
5687
5681
 
5688
5682
  get value() {
5689
- return this.$$.ctx[20];
5683
+ return this.$$.ctx[19];
5690
5684
  }
5691
5685
 
5692
5686
  set value(value) {
@@ -5729,19 +5723,8 @@ class Dropdown extends SvelteElement {
5729
5723
  flush();
5730
5724
  }
5731
5725
 
5732
- get testid() {
5733
- return this.$$.ctx[5];
5734
- }
5735
-
5736
- set testid(testid) {
5737
- this.$$set({
5738
- testid
5739
- });
5740
- flush();
5741
- }
5742
-
5743
5726
  get width() {
5744
- return this.$$.ctx[6];
5727
+ return this.$$.ctx[5];
5745
5728
  }
5746
5729
 
5747
5730
  set width(width) {
@@ -5752,7 +5735,7 @@ class Dropdown extends SvelteElement {
5752
5735
  }
5753
5736
 
5754
5737
  get disabled() {
5755
- return this.$$.ctx[7];
5738
+ return this.$$.ctx[6];
5756
5739
  }
5757
5740
 
5758
5741
  set disabled(disabled) {
@@ -5763,7 +5746,7 @@ class Dropdown extends SvelteElement {
5763
5746
  }
5764
5747
 
5765
5748
  get error() {
5766
- return this.$$.ctx[8];
5749
+ return this.$$.ctx[7];
5767
5750
  }
5768
5751
 
5769
5752
  set error(error) {
@@ -5774,7 +5757,7 @@ class Dropdown extends SvelteElement {
5774
5757
  }
5775
5758
 
5776
5759
  get multiselect() {
5777
- return this.$$.ctx[21];
5760
+ return this.$$.ctx[20];
5778
5761
  }
5779
5762
 
5780
5763
  set multiselect(multiselect) {
@@ -7158,9 +7141,14 @@ function create_if_block_2$5(ctx) {
7158
7141
  let div;
7159
7142
  let t0;
7160
7143
  let t1;
7161
- let if_block =
7162
- /*isOptional*/
7163
- ctx[3] && create_if_block_3$3();
7144
+ let show_if =
7145
+ /*requirement*/
7146
+ ctx[3] &&
7147
+ /*REQUIREMENT_TYPES*/
7148
+ ctx[4].includes(
7149
+ /*requirement*/
7150
+ ctx[3]);
7151
+ let if_block = show_if && create_if_block_3$3(ctx);
7164
7152
  return {
7165
7153
  c() {
7166
7154
  div = element("div");
@@ -7185,12 +7173,21 @@ function create_if_block_2$5(ctx) {
7185
7173
  1) set_data(t0,
7186
7174
  /*label*/
7187
7175
  ctx[0]);
7176
+ if (dirty &
7177
+ /*requirement*/
7178
+ 8) show_if =
7179
+ /*requirement*/
7180
+ ctx[3] &&
7181
+ /*REQUIREMENT_TYPES*/
7182
+ ctx[4].includes(
7183
+ /*requirement*/
7184
+ ctx[3]);
7188
7185
 
7189
- if (
7190
- /*isOptional*/
7191
- ctx[3]) {
7192
- if (if_block) ;else {
7193
- if_block = create_if_block_3$3();
7186
+ if (show_if) {
7187
+ if (if_block) {
7188
+ if_block.p(ctx, dirty);
7189
+ } else {
7190
+ if_block = create_if_block_3$3(ctx);
7194
7191
  if_block.c();
7195
7192
  if_block.m(div, null);
7196
7193
  }
@@ -7206,19 +7203,37 @@ function create_if_block_2$5(ctx) {
7206
7203
  }
7207
7204
 
7208
7205
  };
7209
- } // (18:6) {#if isOptional}
7206
+ } // (28:6) {#if requirement && REQUIREMENT_TYPES.includes(requirement)}
7210
7207
 
7211
7208
 
7212
7209
  function create_if_block_3$3(ctx) {
7213
7210
  let em;
7211
+ let t0;
7212
+ let t1;
7213
+ let t2;
7214
7214
  return {
7215
7215
  c() {
7216
7216
  em = element("em");
7217
- em.textContent = "(optional)";
7217
+ t0 = text("(");
7218
+ t1 = text(
7219
+ /*requirement*/
7220
+ ctx[3]);
7221
+ t2 = text(")");
7218
7222
  },
7219
7223
 
7220
7224
  m(target, anchor) {
7221
7225
  insert(target, em, anchor);
7226
+ append(em, t0);
7227
+ append(em, t1);
7228
+ append(em, t2);
7229
+ },
7230
+
7231
+ p(ctx, dirty) {
7232
+ if (dirty &
7233
+ /*requirement*/
7234
+ 8) set_data(t1,
7235
+ /*requirement*/
7236
+ ctx[3]);
7222
7237
  },
7223
7238
 
7224
7239
  d(detaching) {
@@ -7226,7 +7241,7 @@ function create_if_block_3$3(ctx) {
7226
7241
  }
7227
7242
 
7228
7243
  };
7229
- } // (26:2) {#if error}
7244
+ } // (36:2) {#if error}
7230
7245
 
7231
7246
 
7232
7247
  function create_if_block_1$6(ctx) {
@@ -7259,7 +7274,7 @@ function create_if_block_1$6(ctx) {
7259
7274
  }
7260
7275
 
7261
7276
  };
7262
- } // (29:2) {#if helptext}
7277
+ } // (39:2) {#if helptext}
7263
7278
 
7264
7279
 
7265
7280
  function create_if_block$9(ctx) {
@@ -7397,7 +7412,12 @@ function create_fragment$j(ctx) {
7397
7412
  }
7398
7413
 
7399
7414
  function instance$h($$self, $$props, $$invalidate) {
7400
- let isOptional;
7415
+ const REQUIREMENT_TYPES = ["optional", "required", ""]; // type check function
7416
+
7417
+ function isRequirementType(value) {
7418
+ return REQUIREMENT_TYPES.includes(value);
7419
+ }
7420
+
7401
7421
  let {
7402
7422
  label = ""
7403
7423
  } = $$props;
@@ -7408,25 +7428,22 @@ function instance$h($$self, $$props, $$invalidate) {
7408
7428
  error = ""
7409
7429
  } = $$props;
7410
7430
  let {
7411
- optional = "false"
7431
+ requirement = ""
7412
7432
  } = $$props;
7433
+ onMount(() => {
7434
+ if (!isRequirementType(requirement)) {
7435
+ throw "Invalid requirement type";
7436
+ }
7437
+ });
7413
7438
 
7414
7439
  $$self.$$set = $$props => {
7415
7440
  if ('label' in $$props) $$invalidate(0, label = $$props.label);
7416
7441
  if ('helptext' in $$props) $$invalidate(1, helptext = $$props.helptext);
7417
7442
  if ('error' in $$props) $$invalidate(2, error = $$props.error);
7418
- if ('optional' in $$props) $$invalidate(4, optional = $$props.optional);
7419
- };
7420
-
7421
- $$self.$$.update = () => {
7422
- if ($$self.$$.dirty &
7423
- /*optional*/
7424
- 16) {
7425
- $$invalidate(3, isOptional = toBoolean(optional));
7426
- }
7443
+ if ('requirement' in $$props) $$invalidate(3, requirement = $$props.requirement);
7427
7444
  };
7428
7445
 
7429
- return [label, helptext, error, isOptional, optional];
7446
+ return [label, helptext, error, requirement, REQUIREMENT_TYPES];
7430
7447
  }
7431
7448
 
7432
7449
  class FormItem extends SvelteElement {
@@ -7441,7 +7458,7 @@ class FormItem extends SvelteElement {
7441
7458
  label: 0,
7442
7459
  helptext: 1,
7443
7460
  error: 2,
7444
- optional: 4
7461
+ requirement: 3
7445
7462
  }, null);
7446
7463
 
7447
7464
  if (options) {
@@ -7457,7 +7474,7 @@ class FormItem extends SvelteElement {
7457
7474
  }
7458
7475
 
7459
7476
  static get observedAttributes() {
7460
- return ["label", "helptext", "error", "optional"];
7477
+ return ["label", "helptext", "error", "requirement"];
7461
7478
  }
7462
7479
 
7463
7480
  get label() {
@@ -7493,13 +7510,13 @@ class FormItem extends SvelteElement {
7493
7510
  flush();
7494
7511
  }
7495
7512
 
7496
- get optional() {
7497
- return this.$$.ctx[4];
7513
+ get requirement() {
7514
+ return this.$$.ctx[3];
7498
7515
  }
7499
7516
 
7500
- set optional(optional) {
7517
+ set requirement(requirement) {
7501
7518
  this.$$set({
7502
- optional
7519
+ requirement
7503
7520
  });
7504
7521
  flush();
7505
7522
  }
@@ -8367,7 +8384,7 @@ class Icon extends SvelteElement {
8367
8384
  customElements.define("goa-icon", Icon);
8368
8385
  /* libs/web-components/src/components/input/Input.svelte generated by Svelte v3.51.0 */
8369
8386
 
8370
- function create_if_block_7(ctx) {
8387
+ function create_if_block_4(ctx) {
8371
8388
  let div;
8372
8389
  let t;
8373
8390
  return {
@@ -8385,7 +8402,7 @@ function create_if_block_7(ctx) {
8385
8402
  },
8386
8403
 
8387
8404
  p(ctx, dirty) {
8388
- if (dirty[0] &
8405
+ if (dirty &
8389
8406
  /*prefix*/
8390
8407
  16384) set_data(t,
8391
8408
  /*prefix*/
@@ -8397,10 +8414,10 @@ function create_if_block_7(ctx) {
8397
8414
  }
8398
8415
 
8399
8416
  };
8400
- } // (82:4) {#if leadingicon}
8417
+ } // (78:4) {#if leadingicon}
8401
8418
 
8402
8419
 
8403
- function create_if_block_6(ctx) {
8420
+ function create_if_block_3$2(ctx) {
8404
8421
  let goa_icon;
8405
8422
  return {
8406
8423
  c() {
@@ -8417,7 +8434,7 @@ function create_if_block_6(ctx) {
8417
8434
  },
8418
8435
 
8419
8436
  p(ctx, dirty) {
8420
- if (dirty[0] &
8437
+ if (dirty &
8421
8438
  /*leadingicon*/
8422
8439
  32) {
8423
8440
  set_custom_element_data(goa_icon, "type",
@@ -8431,10 +8448,10 @@ function create_if_block_6(ctx) {
8431
8448
  }
8432
8449
 
8433
8450
  };
8434
- } // (112:4) {#if trailingicon && !handlesTrailingIconClick}
8451
+ } // (108:4) {#if trailingicon && !handlesTrailingIconClick}
8435
8452
 
8436
8453
 
8437
- function create_if_block_5(ctx) {
8454
+ function create_if_block_2$4(ctx) {
8438
8455
  let goa_icon;
8439
8456
  return {
8440
8457
  c() {
@@ -8452,7 +8469,7 @@ function create_if_block_5(ctx) {
8452
8469
  },
8453
8470
 
8454
8471
  p(ctx, dirty) {
8455
- if (dirty[0] &
8472
+ if (dirty &
8456
8473
  /*trailingicon*/
8457
8474
  64) {
8458
8475
  set_custom_element_data(goa_icon, "type",
@@ -8466,10 +8483,10 @@ function create_if_block_5(ctx) {
8466
8483
  }
8467
8484
 
8468
8485
  };
8469
- } // (122:4) {#if trailingicon && handlesTrailingIconClick}
8486
+ } // (118:4) {#if trailingicon && handlesTrailingIconClick}
8470
8487
 
8471
8488
 
8472
- function create_if_block_4(ctx) {
8489
+ function create_if_block_1$5(ctx) {
8473
8490
  let goa_icon_button;
8474
8491
  let mounted;
8475
8492
  let dispose;
@@ -8478,7 +8495,7 @@ function create_if_block_4(ctx) {
8478
8495
  goa_icon_button = element("goa-icon-button");
8479
8496
  set_custom_element_data(goa_icon_button, "disabled",
8480
8497
  /*isDisabled*/
8481
- ctx[19]);
8498
+ ctx[17]);
8482
8499
  set_custom_element_data(goa_icon_button, "variant", "nocolor");
8483
8500
  set_custom_element_data(goa_icon_button, "size", "medium");
8484
8501
  set_custom_element_data(goa_icon_button, "icon",
@@ -8497,15 +8514,15 @@ function create_if_block_4(ctx) {
8497
8514
  },
8498
8515
 
8499
8516
  p(ctx, dirty) {
8500
- if (dirty[0] &
8517
+ if (dirty &
8501
8518
  /*isDisabled*/
8502
- 524288) {
8519
+ 131072) {
8503
8520
  set_custom_element_data(goa_icon_button, "disabled",
8504
8521
  /*isDisabled*/
8505
- ctx[19]);
8522
+ ctx[17]);
8506
8523
  }
8507
8524
 
8508
- if (dirty[0] &
8525
+ if (dirty &
8509
8526
  /*trailingicon*/
8510
8527
  64) {
8511
8528
  set_custom_element_data(goa_icon_button, "icon",
@@ -8521,10 +8538,10 @@ function create_if_block_4(ctx) {
8521
8538
  }
8522
8539
 
8523
8540
  };
8524
- } // (133:4) {#if suffix}
8541
+ } // (129:4) {#if suffix}
8525
8542
 
8526
8543
 
8527
- function create_if_block_3$2(ctx) {
8544
+ function create_if_block$7(ctx) {
8528
8545
  let span;
8529
8546
  let t;
8530
8547
  return {
@@ -8542,7 +8559,7 @@ function create_if_block_3$2(ctx) {
8542
8559
  },
8543
8560
 
8544
8561
  p(ctx, dirty) {
8545
- if (dirty[0] &
8562
+ if (dirty &
8546
8563
  /*suffix*/
8547
8564
  32768) set_data(t,
8548
8565
  /*suffix*/
@@ -8553,151 +8570,6 @@ function create_if_block_3$2(ctx) {
8553
8570
  if (detaching) detach(span);
8554
8571
  }
8555
8572
 
8556
- };
8557
- } // (139:2) {#if showCounter}
8558
-
8559
-
8560
- function create_if_block$7(ctx) {
8561
- let if_block_anchor;
8562
-
8563
- function select_block_type(ctx, dirty) {
8564
- if (
8565
- /*maxcharcount*/
8566
- ctx[16] > 0) return create_if_block_1$5;
8567
- if (
8568
- /*value*/
8569
- ctx[0].length > 0) return create_if_block_2$4;
8570
- }
8571
-
8572
- let current_block_type = select_block_type(ctx);
8573
- let if_block = current_block_type && current_block_type(ctx);
8574
- return {
8575
- c() {
8576
- if (if_block) if_block.c();
8577
- if_block_anchor = empty();
8578
- },
8579
-
8580
- m(target, anchor) {
8581
- if (if_block) if_block.m(target, anchor);
8582
- insert(target, if_block_anchor, anchor);
8583
- },
8584
-
8585
- p(ctx, dirty) {
8586
- if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
8587
- if_block.p(ctx, dirty);
8588
- } else {
8589
- if (if_block) if_block.d(1);
8590
- if_block = current_block_type && current_block_type(ctx);
8591
-
8592
- if (if_block) {
8593
- if_block.c();
8594
- if_block.m(if_block_anchor.parentNode, if_block_anchor);
8595
- }
8596
- }
8597
- },
8598
-
8599
- d(detaching) {
8600
- if (if_block) {
8601
- if_block.d(detaching);
8602
- }
8603
-
8604
- if (detaching) detach(if_block_anchor);
8605
- }
8606
-
8607
- };
8608
- } // (144:31)
8609
-
8610
-
8611
- function create_if_block_2$4(ctx) {
8612
- let div;
8613
- let t_value =
8614
- /*value*/
8615
- ctx[0].length + "";
8616
- let t;
8617
- return {
8618
- c() {
8619
- div = element("div");
8620
- t = text(t_value);
8621
- attr(div, "class", "counter");
8622
- },
8623
-
8624
- m(target, anchor) {
8625
- insert(target, div, anchor);
8626
- append(div, t);
8627
- },
8628
-
8629
- p(ctx, dirty) {
8630
- if (dirty[0] &
8631
- /*value*/
8632
- 1 && t_value !== (t_value =
8633
- /*value*/
8634
- ctx[0].length + "")) set_data(t, t_value);
8635
- },
8636
-
8637
- d(detaching) {
8638
- if (detaching) detach(div);
8639
- }
8640
-
8641
- };
8642
- } // (140:4) {#if maxcharcount > 0}
8643
-
8644
-
8645
- function create_if_block_1$5(ctx) {
8646
- let div;
8647
- let t0_value =
8648
- /*value*/
8649
- ctx[0].length + "";
8650
- let t0;
8651
- let t1_value = `/${
8652
- /*maxcharcount*/
8653
- ctx[16]}` + "";
8654
- let t1;
8655
- return {
8656
- c() {
8657
- div = element("div");
8658
- t0 = text(t0_value);
8659
- t1 = text(t1_value);
8660
- attr(div, "class", "counter");
8661
- toggle_class(div, "counter-error",
8662
- /*value*/
8663
- ctx[0].length >
8664
- /*maxcharcount*/
8665
- ctx[16]);
8666
- },
8667
-
8668
- m(target, anchor) {
8669
- insert(target, div, anchor);
8670
- append(div, t0);
8671
- append(div, t1);
8672
- },
8673
-
8674
- p(ctx, dirty) {
8675
- if (dirty[0] &
8676
- /*value*/
8677
- 1 && t0_value !== (t0_value =
8678
- /*value*/
8679
- ctx[0].length + "")) set_data(t0, t0_value);
8680
- if (dirty[0] &
8681
- /*maxcharcount*/
8682
- 65536 && t1_value !== (t1_value = `/${
8683
- /*maxcharcount*/
8684
- ctx[16]}` + "")) set_data(t1, t1_value);
8685
-
8686
- if (dirty[0] &
8687
- /*value, maxcharcount*/
8688
- 65537) {
8689
- toggle_class(div, "counter-error",
8690
- /*value*/
8691
- ctx[0].length >
8692
- /*maxcharcount*/
8693
- ctx[16]);
8694
- }
8695
- },
8696
-
8697
- d(detaching) {
8698
- if (detaching) detach(div);
8699
- }
8700
-
8701
8573
  };
8702
8574
  }
8703
8575
 
@@ -8714,32 +8586,28 @@ function create_fragment$f(ctx) {
8714
8586
  let t3;
8715
8587
  let t4;
8716
8588
  let div0_class_value;
8717
- let t5;
8718
8589
  let div1_style_value;
8719
8590
  let mounted;
8720
8591
  let dispose;
8721
8592
  let if_block0 =
8722
8593
  /*prefix*/
8723
- ctx[14] && create_if_block_7(ctx);
8594
+ ctx[14] && create_if_block_4(ctx);
8724
8595
  let if_block1 =
8725
8596
  /*leadingicon*/
8726
- ctx[5] && create_if_block_6(ctx);
8597
+ ctx[5] && create_if_block_3$2(ctx);
8727
8598
  let if_block2 =
8728
8599
  /*trailingicon*/
8729
8600
  ctx[6] && !
8730
8601
  /*handlesTrailingIconClick*/
8731
- ctx[22] && create_if_block_5(ctx);
8602
+ ctx[20] && create_if_block_2$4(ctx);
8732
8603
  let if_block3 =
8733
8604
  /*trailingicon*/
8734
8605
  ctx[6] &&
8735
8606
  /*handlesTrailingIconClick*/
8736
- ctx[22] && create_if_block_4(ctx);
8607
+ ctx[20] && create_if_block_1$5(ctx);
8737
8608
  let if_block4 =
8738
8609
  /*suffix*/
8739
- ctx[15] && create_if_block_3$2(ctx);
8740
- let if_block5 =
8741
- /*showCounter*/
8742
- ctx[18] && create_if_block$7(ctx);
8610
+ ctx[15] && create_if_block$7(ctx);
8743
8611
  return {
8744
8612
  c() {
8745
8613
  div1 = element("div");
@@ -8755,8 +8623,6 @@ function create_fragment$f(ctx) {
8755
8623
  if (if_block3) if_block3.c();
8756
8624
  t4 = space();
8757
8625
  if (if_block4) if_block4.c();
8758
- t5 = space();
8759
- if (if_block5) if_block5.c();
8760
8626
  this.c = noop;
8761
8627
  attr(input, "class", input_class_value = `input--${
8762
8628
  /*variant*/
@@ -8766,10 +8632,10 @@ function create_fragment$f(ctx) {
8766
8632
  ctx[6] ? "-0.5rem" : "0"}`);
8767
8633
  input.readOnly =
8768
8634
  /*isReadonly*/
8769
- ctx[21];
8635
+ ctx[19];
8770
8636
  input.disabled =
8771
8637
  /*isDisabled*/
8772
- ctx[19];
8638
+ ctx[17];
8773
8639
  attr(input, "data-testid",
8774
8640
  /*testid*/
8775
8641
  ctx[8]);
@@ -8807,7 +8673,7 @@ function create_fragment$f(ctx) {
8807
8673
  goa-input
8808
8674
  ${
8809
8675
  /*isDisabled*/
8810
- ctx[19] ? "goa-input--disabled" : ""}
8676
+ ctx[17] ? "goa-input--disabled" : ""}
8811
8677
  variant--${
8812
8678
  /*variant*/
8813
8679
  ctx[7]}
@@ -8817,7 +8683,7 @@ function create_fragment$f(ctx) {
8817
8683
  `);
8818
8684
  toggle_class(div0, "error",
8819
8685
  /*isError*/
8820
- ctx[20]);
8686
+ ctx[18]);
8821
8687
  attr(div1, "class", "container");
8822
8688
  attr(div1, "style", div1_style_value = `
8823
8689
  --width: ${
@@ -8836,34 +8702,32 @@ function create_fragment$f(ctx) {
8836
8702
  append(div0, input);
8837
8703
  /*input_binding*/
8838
8704
 
8839
- ctx[31](input);
8705
+ ctx[28](input);
8840
8706
  append(div0, t2);
8841
8707
  if (if_block2) if_block2.m(div0, null);
8842
8708
  append(div0, t3);
8843
8709
  if (if_block3) if_block3.m(div0, null);
8844
8710
  append(div0, t4);
8845
8711
  if (if_block4) if_block4.m(div0, null);
8846
- append(div1, t5);
8847
- if (if_block5) if_block5.m(div1, null);
8848
8712
 
8849
8713
  if (!mounted) {
8850
8714
  dispose = [listen(input, "keyup",
8851
8715
  /*onKeyUp*/
8852
- ctx[23]), listen(input, "change",
8716
+ ctx[21]), listen(input, "change",
8853
8717
  /*onKeyUp*/
8854
- ctx[23])];
8718
+ ctx[21])];
8855
8719
  mounted = true;
8856
8720
  }
8857
8721
  },
8858
8722
 
8859
- p(ctx, dirty) {
8723
+ p(ctx, [dirty]) {
8860
8724
  if (
8861
8725
  /*prefix*/
8862
8726
  ctx[14]) {
8863
8727
  if (if_block0) {
8864
8728
  if_block0.p(ctx, dirty);
8865
8729
  } else {
8866
- if_block0 = create_if_block_7(ctx);
8730
+ if_block0 = create_if_block_4(ctx);
8867
8731
  if_block0.c();
8868
8732
  if_block0.m(div0, t0);
8869
8733
  }
@@ -8878,7 +8742,7 @@ function create_fragment$f(ctx) {
8878
8742
  if (if_block1) {
8879
8743
  if_block1.p(ctx, dirty);
8880
8744
  } else {
8881
- if_block1 = create_if_block_6(ctx);
8745
+ if_block1 = create_if_block_3$2(ctx);
8882
8746
  if_block1.c();
8883
8747
  if_block1.m(div0, t1);
8884
8748
  }
@@ -8887,7 +8751,7 @@ function create_fragment$f(ctx) {
8887
8751
  if_block1 = null;
8888
8752
  }
8889
8753
 
8890
- if (dirty[0] &
8754
+ if (dirty &
8891
8755
  /*variant*/
8892
8756
  128 && input_class_value !== (input_class_value = `input--${
8893
8757
  /*variant*/
@@ -8895,7 +8759,7 @@ function create_fragment$f(ctx) {
8895
8759
  attr(input, "class", input_class_value);
8896
8760
  }
8897
8761
 
8898
- if (dirty[0] &
8762
+ if (dirty &
8899
8763
  /*trailingicon*/
8900
8764
  64 && input_style_value !== (input_style_value = `--search-icon-offset: ${
8901
8765
  /*trailingicon*/
@@ -8903,23 +8767,23 @@ function create_fragment$f(ctx) {
8903
8767
  attr(input, "style", input_style_value);
8904
8768
  }
8905
8769
 
8906
- if (dirty[0] &
8770
+ if (dirty &
8907
8771
  /*isReadonly*/
8908
- 2097152) {
8772
+ 524288) {
8909
8773
  input.readOnly =
8910
8774
  /*isReadonly*/
8911
- ctx[21];
8775
+ ctx[19];
8912
8776
  }
8913
8777
 
8914
- if (dirty[0] &
8778
+ if (dirty &
8915
8779
  /*isDisabled*/
8916
- 524288) {
8780
+ 131072) {
8917
8781
  input.disabled =
8918
8782
  /*isDisabled*/
8919
- ctx[19];
8783
+ ctx[17];
8920
8784
  }
8921
8785
 
8922
- if (dirty[0] &
8786
+ if (dirty &
8923
8787
  /*testid*/
8924
8788
  256) {
8925
8789
  attr(input, "data-testid",
@@ -8927,7 +8791,7 @@ function create_fragment$f(ctx) {
8927
8791
  ctx[8]);
8928
8792
  }
8929
8793
 
8930
- if (dirty[0] &
8794
+ if (dirty &
8931
8795
  /*autocapitalize*/
8932
8796
  8) {
8933
8797
  attr(input, "autocapitalize",
@@ -8935,7 +8799,7 @@ function create_fragment$f(ctx) {
8935
8799
  ctx[3]);
8936
8800
  }
8937
8801
 
8938
- if (dirty[0] &
8802
+ if (dirty &
8939
8803
  /*name*/
8940
8804
  4) {
8941
8805
  attr(input, "name",
@@ -8943,7 +8807,7 @@ function create_fragment$f(ctx) {
8943
8807
  ctx[2]);
8944
8808
  }
8945
8809
 
8946
- if (dirty[0] &
8810
+ if (dirty &
8947
8811
  /*type*/
8948
8812
  2) {
8949
8813
  attr(input, "type",
@@ -8951,7 +8815,7 @@ function create_fragment$f(ctx) {
8951
8815
  ctx[1]);
8952
8816
  }
8953
8817
 
8954
- if (dirty[0] &
8818
+ if (dirty &
8955
8819
  /*value*/
8956
8820
  1 && input.value !==
8957
8821
  /*value*/
@@ -8961,7 +8825,7 @@ function create_fragment$f(ctx) {
8961
8825
  ctx[0];
8962
8826
  }
8963
8827
 
8964
- if (dirty[0] &
8828
+ if (dirty &
8965
8829
  /*placeholder*/
8966
8830
  16) {
8967
8831
  attr(input, "placeholder",
@@ -8969,7 +8833,7 @@ function create_fragment$f(ctx) {
8969
8833
  ctx[4]);
8970
8834
  }
8971
8835
 
8972
- if (dirty[0] &
8836
+ if (dirty &
8973
8837
  /*min*/
8974
8838
  2048) {
8975
8839
  attr(input, "min",
@@ -8977,7 +8841,7 @@ function create_fragment$f(ctx) {
8977
8841
  ctx[11]);
8978
8842
  }
8979
8843
 
8980
- if (dirty[0] &
8844
+ if (dirty &
8981
8845
  /*max*/
8982
8846
  4096) {
8983
8847
  attr(input, "max",
@@ -8985,7 +8849,7 @@ function create_fragment$f(ctx) {
8985
8849
  ctx[12]);
8986
8850
  }
8987
8851
 
8988
- if (dirty[0] &
8852
+ if (dirty &
8989
8853
  /*step*/
8990
8854
  8192) {
8991
8855
  attr(input, "step",
@@ -8993,7 +8857,7 @@ function create_fragment$f(ctx) {
8993
8857
  ctx[13]);
8994
8858
  }
8995
8859
 
8996
- if (dirty[0] &
8860
+ if (dirty &
8997
8861
  /*arialabel, name*/
8998
8862
  1028 && input_aria_label_value !== (input_aria_label_value =
8999
8863
  /*arialabel*/
@@ -9007,11 +8871,11 @@ function create_fragment$f(ctx) {
9007
8871
  /*trailingicon*/
9008
8872
  ctx[6] && !
9009
8873
  /*handlesTrailingIconClick*/
9010
- ctx[22]) {
8874
+ ctx[20]) {
9011
8875
  if (if_block2) {
9012
8876
  if_block2.p(ctx, dirty);
9013
8877
  } else {
9014
- if_block2 = create_if_block_5(ctx);
8878
+ if_block2 = create_if_block_2$4(ctx);
9015
8879
  if_block2.c();
9016
8880
  if_block2.m(div0, t3);
9017
8881
  }
@@ -9024,11 +8888,11 @@ function create_fragment$f(ctx) {
9024
8888
  /*trailingicon*/
9025
8889
  ctx[6] &&
9026
8890
  /*handlesTrailingIconClick*/
9027
- ctx[22]) {
8891
+ ctx[20]) {
9028
8892
  if (if_block3) {
9029
8893
  if_block3.p(ctx, dirty);
9030
8894
  } else {
9031
- if_block3 = create_if_block_4(ctx);
8895
+ if_block3 = create_if_block_1$5(ctx);
9032
8896
  if_block3.c();
9033
8897
  if_block3.m(div0, t4);
9034
8898
  }
@@ -9043,7 +8907,7 @@ function create_fragment$f(ctx) {
9043
8907
  if (if_block4) {
9044
8908
  if_block4.p(ctx, dirty);
9045
8909
  } else {
9046
- if_block4 = create_if_block_3$2(ctx);
8910
+ if_block4 = create_if_block$7(ctx);
9047
8911
  if_block4.c();
9048
8912
  if_block4.m(div0, null);
9049
8913
  }
@@ -9052,13 +8916,13 @@ function create_fragment$f(ctx) {
9052
8916
  if_block4 = null;
9053
8917
  }
9054
8918
 
9055
- if (dirty[0] &
8919
+ if (dirty &
9056
8920
  /*isDisabled, variant, type*/
9057
- 524418 && div0_class_value !== (div0_class_value = `
8921
+ 131202 && div0_class_value !== (div0_class_value = `
9058
8922
  goa-input
9059
8923
  ${
9060
8924
  /*isDisabled*/
9061
- ctx[19] ? "goa-input--disabled" : ""}
8925
+ ctx[17] ? "goa-input--disabled" : ""}
9062
8926
  variant--${
9063
8927
  /*variant*/
9064
8928
  ctx[7]}
@@ -9069,30 +8933,15 @@ function create_fragment$f(ctx) {
9069
8933
  attr(div0, "class", div0_class_value);
9070
8934
  }
9071
8935
 
9072
- if (dirty[0] &
8936
+ if (dirty &
9073
8937
  /*isDisabled, variant, type, isError*/
9074
- 1572994) {
8938
+ 393346) {
9075
8939
  toggle_class(div0, "error",
9076
8940
  /*isError*/
9077
- ctx[20]);
9078
- }
9079
-
9080
- if (
9081
- /*showCounter*/
9082
- ctx[18]) {
9083
- if (if_block5) {
9084
- if_block5.p(ctx, dirty);
9085
- } else {
9086
- if_block5 = create_if_block$7(ctx);
9087
- if_block5.c();
9088
- if_block5.m(div1, null);
9089
- }
9090
- } else if (if_block5) {
9091
- if_block5.d(1);
9092
- if_block5 = null;
8941
+ ctx[18]);
9093
8942
  }
9094
8943
 
9095
- if (dirty[0] &
8944
+ if (dirty &
9096
8945
  /*width*/
9097
8946
  512 && div1_style_value !== (div1_style_value = `
9098
8947
  --width: ${
@@ -9112,11 +8961,10 @@ function create_fragment$f(ctx) {
9112
8961
  if (if_block1) if_block1.d();
9113
8962
  /*input_binding*/
9114
8963
 
9115
- ctx[31](null);
8964
+ ctx[28](null);
9116
8965
  if (if_block2) if_block2.d();
9117
8966
  if (if_block3) if_block3.d();
9118
8967
  if (if_block4) if_block4.d();
9119
- if (if_block5) if_block5.d();
9120
8968
  mounted = false;
9121
8969
  run_all(dispose);
9122
8970
  }
@@ -9136,7 +8984,6 @@ function instance$d($$self, $$props, $$invalidate) {
9136
8984
  let isReadonly;
9137
8985
  let isError;
9138
8986
  let isDisabled;
9139
- let showCounter;
9140
8987
  let {
9141
8988
  type = "text"
9142
8989
  } = $$props;
@@ -9200,12 +9047,6 @@ function instance$d($$self, $$props, $$invalidate) {
9200
9047
  let {
9201
9048
  suffix = ""
9202
9049
  } = $$props;
9203
- let {
9204
- showcounter = "false"
9205
- } = $$props;
9206
- let {
9207
- maxcharcount = 0
9208
- } = $$props;
9209
9050
  let inputEl;
9210
9051
 
9211
9052
  function onKeyUp(e) {
@@ -9224,7 +9065,7 @@ function instance$d($$self, $$props, $$invalidate) {
9224
9065
  function input_binding($$value) {
9225
9066
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
9226
9067
  inputEl = $$value;
9227
- $$invalidate(17, inputEl);
9068
+ $$invalidate(16, inputEl);
9228
9069
  });
9229
9070
  }
9230
9071
 
@@ -9237,11 +9078,11 @@ function instance$d($$self, $$props, $$invalidate) {
9237
9078
  if ('leadingicon' in $$props) $$invalidate(5, leadingicon = $$props.leadingicon);
9238
9079
  if ('trailingicon' in $$props) $$invalidate(6, trailingicon = $$props.trailingicon);
9239
9080
  if ('variant' in $$props) $$invalidate(7, variant = $$props.variant);
9240
- if ('disabled' in $$props) $$invalidate(24, disabled = $$props.disabled);
9241
- if ('handletrailingiconclick' in $$props) $$invalidate(25, handletrailingiconclick = $$props.handletrailingiconclick);
9242
- if ('focused' in $$props) $$invalidate(26, focused = $$props.focused);
9243
- if ('readonly' in $$props) $$invalidate(27, readonly = $$props.readonly);
9244
- if ('error' in $$props) $$invalidate(28, error = $$props.error);
9081
+ if ('disabled' in $$props) $$invalidate(22, disabled = $$props.disabled);
9082
+ if ('handletrailingiconclick' in $$props) $$invalidate(23, handletrailingiconclick = $$props.handletrailingiconclick);
9083
+ if ('focused' in $$props) $$invalidate(24, focused = $$props.focused);
9084
+ if ('readonly' in $$props) $$invalidate(25, readonly = $$props.readonly);
9085
+ if ('error' in $$props) $$invalidate(26, error = $$props.error);
9245
9086
  if ('testid' in $$props) $$invalidate(8, testid = $$props.testid);
9246
9087
  if ('width' in $$props) $$invalidate(9, width = $$props.width);
9247
9088
  if ('arialabel' in $$props) $$invalidate(10, arialabel = $$props.arialabel);
@@ -9250,58 +9091,50 @@ function instance$d($$self, $$props, $$invalidate) {
9250
9091
  if ('step' in $$props) $$invalidate(13, step = $$props.step);
9251
9092
  if ('prefix' in $$props) $$invalidate(14, prefix = $$props.prefix);
9252
9093
  if ('suffix' in $$props) $$invalidate(15, suffix = $$props.suffix);
9253
- if ('showcounter' in $$props) $$invalidate(29, showcounter = $$props.showcounter);
9254
- if ('maxcharcount' in $$props) $$invalidate(16, maxcharcount = $$props.maxcharcount);
9255
9094
  };
9256
9095
 
9257
9096
  $$self.$$.update = () => {
9258
- if ($$self.$$.dirty[0] &
9097
+ if ($$self.$$.dirty &
9259
9098
  /*handletrailingiconclick*/
9260
- 33554432) {
9261
- $$invalidate(22, handlesTrailingIconClick = toBoolean(handletrailingiconclick));
9099
+ 8388608) {
9100
+ $$invalidate(20, handlesTrailingIconClick = toBoolean(handletrailingiconclick));
9262
9101
  }
9263
9102
 
9264
- if ($$self.$$.dirty[0] &
9103
+ if ($$self.$$.dirty &
9265
9104
  /*focused*/
9266
- 67108864) {
9267
- $$invalidate(30, isFocused = toBoolean(focused));
9105
+ 16777216) {
9106
+ $$invalidate(27, isFocused = toBoolean(focused));
9268
9107
  }
9269
9108
 
9270
- if ($$self.$$.dirty[0] &
9109
+ if ($$self.$$.dirty &
9271
9110
  /*readonly*/
9272
- 134217728) {
9273
- $$invalidate(21, isReadonly = toBoolean(readonly));
9111
+ 33554432) {
9112
+ $$invalidate(19, isReadonly = toBoolean(readonly));
9274
9113
  }
9275
9114
 
9276
- if ($$self.$$.dirty[0] &
9115
+ if ($$self.$$.dirty &
9277
9116
  /*error*/
9278
- 268435456) {
9279
- $$invalidate(20, isError = toBoolean(error));
9117
+ 67108864) {
9118
+ $$invalidate(18, isError = toBoolean(error));
9280
9119
  }
9281
9120
 
9282
- if ($$self.$$.dirty[0] &
9121
+ if ($$self.$$.dirty &
9283
9122
  /*disabled*/
9284
- 16777216) {
9285
- $$invalidate(19, isDisabled = toBoolean(disabled));
9123
+ 4194304) {
9124
+ $$invalidate(17, isDisabled = toBoolean(disabled));
9286
9125
  }
9287
9126
 
9288
- if ($$self.$$.dirty[0] &
9289
- /*showcounter*/
9290
- 536870912) {
9291
- $$invalidate(18, showCounter = toBoolean(showcounter));
9292
- }
9293
-
9294
- if ($$self.$$.dirty[0] &
9127
+ if ($$self.$$.dirty &
9295
9128
  /*isFocused, inputEl*/
9296
- 1073872896) {
9129
+ 134283264) {
9297
9130
  if (isFocused && inputEl) {
9298
9131
  setTimeout(() => inputEl.focus(), 1);
9299
9132
  }
9300
9133
  }
9301
9134
 
9302
- if ($$self.$$.dirty[0] &
9135
+ if ($$self.$$.dirty &
9303
9136
  /*inputEl, type*/
9304
- 131074) {
9137
+ 65538) {
9305
9138
  if (inputEl && type === "search") {
9306
9139
  inputEl.addEventListener("search", e => {
9307
9140
  onKeyUp(e);
@@ -9310,13 +9143,13 @@ function instance$d($$self, $$props, $$invalidate) {
9310
9143
  }
9311
9144
  };
9312
9145
 
9313
- 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];
9146
+ 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];
9314
9147
  }
9315
9148
 
9316
9149
  class Input extends SvelteElement {
9317
9150
  constructor(options) {
9318
9151
  super();
9319
- 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>')
9152
+ 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>')
9320
9153
  center center no-repeat}</style>`;
9321
9154
  init(this, {
9322
9155
  target: this.shadowRoot,
@@ -9331,11 +9164,11 @@ class Input extends SvelteElement {
9331
9164
  leadingicon: 5,
9332
9165
  trailingicon: 6,
9333
9166
  variant: 7,
9334
- disabled: 24,
9335
- handletrailingiconclick: 25,
9336
- focused: 26,
9337
- readonly: 27,
9338
- error: 28,
9167
+ disabled: 22,
9168
+ handletrailingiconclick: 23,
9169
+ focused: 24,
9170
+ readonly: 25,
9171
+ error: 26,
9339
9172
  testid: 8,
9340
9173
  width: 9,
9341
9174
  arialabel: 10,
@@ -9343,10 +9176,8 @@ class Input extends SvelteElement {
9343
9176
  max: 12,
9344
9177
  step: 13,
9345
9178
  prefix: 14,
9346
- suffix: 15,
9347
- showcounter: 29,
9348
- maxcharcount: 16
9349
- }, null, [-1, -1]);
9179
+ suffix: 15
9180
+ }, null);
9350
9181
 
9351
9182
  if (options) {
9352
9183
  if (options.target) {
@@ -9361,7 +9192,7 @@ class Input extends SvelteElement {
9361
9192
  }
9362
9193
 
9363
9194
  static get observedAttributes() {
9364
- return ["type", "name", "value", "autocapitalize", "placeholder", "leadingicon", "trailingicon", "variant", "disabled", "handletrailingiconclick", "focused", "readonly", "error", "testid", "width", "arialabel", "min", "max", "step", "prefix", "suffix", "showcounter", "maxcharcount"];
9195
+ return ["type", "name", "value", "autocapitalize", "placeholder", "leadingicon", "trailingicon", "variant", "disabled", "handletrailingiconclick", "focused", "readonly", "error", "testid", "width", "arialabel", "min", "max", "step", "prefix", "suffix"];
9365
9196
  }
9366
9197
 
9367
9198
  get type() {
@@ -9453,7 +9284,7 @@ class Input extends SvelteElement {
9453
9284
  }
9454
9285
 
9455
9286
  get disabled() {
9456
- return this.$$.ctx[24];
9287
+ return this.$$.ctx[22];
9457
9288
  }
9458
9289
 
9459
9290
  set disabled(disabled) {
@@ -9464,7 +9295,7 @@ class Input extends SvelteElement {
9464
9295
  }
9465
9296
 
9466
9297
  get handletrailingiconclick() {
9467
- return this.$$.ctx[25];
9298
+ return this.$$.ctx[23];
9468
9299
  }
9469
9300
 
9470
9301
  set handletrailingiconclick(handletrailingiconclick) {
@@ -9475,7 +9306,7 @@ class Input extends SvelteElement {
9475
9306
  }
9476
9307
 
9477
9308
  get focused() {
9478
- return this.$$.ctx[26];
9309
+ return this.$$.ctx[24];
9479
9310
  }
9480
9311
 
9481
9312
  set focused(focused) {
@@ -9486,7 +9317,7 @@ class Input extends SvelteElement {
9486
9317
  }
9487
9318
 
9488
9319
  get readonly() {
9489
- return this.$$.ctx[27];
9320
+ return this.$$.ctx[25];
9490
9321
  }
9491
9322
 
9492
9323
  set readonly(readonly) {
@@ -9497,7 +9328,7 @@ class Input extends SvelteElement {
9497
9328
  }
9498
9329
 
9499
9330
  get error() {
9500
- return this.$$.ctx[28];
9331
+ return this.$$.ctx[26];
9501
9332
  }
9502
9333
 
9503
9334
  set error(error) {
@@ -9595,28 +9426,6 @@ class Input extends SvelteElement {
9595
9426
  flush();
9596
9427
  }
9597
9428
 
9598
- get showcounter() {
9599
- return this.$$.ctx[29];
9600
- }
9601
-
9602
- set showcounter(showcounter) {
9603
- this.$$set({
9604
- showcounter
9605
- });
9606
- flush();
9607
- }
9608
-
9609
- get maxcharcount() {
9610
- return this.$$.ctx[16];
9611
- }
9612
-
9613
- set maxcharcount(maxcharcount) {
9614
- this.$$set({
9615
- maxcharcount
9616
- });
9617
- flush();
9618
- }
9619
-
9620
9429
  }
9621
9430
 
9622
9431
  customElements.define("goa-input", Input);
@@ -14642,13 +14451,13 @@ const GoAFormItem = ({
14642
14451
  children,
14643
14452
  helpText,
14644
14453
  error,
14645
- optional,
14454
+ requirement,
14646
14455
  label
14647
14456
  }) => {
14648
14457
  return jsx("goa-form-item", Object.assign({
14649
14458
  label: label,
14650
14459
  error: error,
14651
- optional: optional ? "true" : "false",
14460
+ requirement: requirement,
14652
14461
  helptext: helpText
14653
14462
  }, {
14654
14463
  children: children
@@ -14774,8 +14583,6 @@ const GoAInput = ({
14774
14583
  placeholder,
14775
14584
  error,
14776
14585
  width,
14777
- showCounter,
14778
- maxCharCount,
14779
14586
  testId,
14780
14587
  min,
14781
14588
  max,
@@ -14834,8 +14641,6 @@ const GoAInput = ({
14834
14641
  step: step,
14835
14642
  prefix: prefix,
14836
14643
  suffix: suffix,
14837
- showcounter: showCounter,
14838
- maxcharcount: maxCharCount,
14839
14644
  handletrailingiconclick: !!onTrailingIconClick
14840
14645
  }, void 0);
14841
14646
  };