@gov-design-system-ce/components 4.0.8-rc12 → 4.0.8-rc13

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.
Files changed (99) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/gov-form-input.cjs.entry.js +4 -3
  3. package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gov-icon.cjs.entry.js +1 -1
  5. package/dist/cjs/gov-pagination.cjs.entry.js +3 -1
  6. package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
  7. package/dist/cjs/gov-tabs-item.cjs.entry.js +12 -1
  8. package/dist/cjs/gov-tabs-item.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gov-tabs.cjs.entry.js +33 -41
  10. package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/collection/components/gov-form/input/gov-form-input.js +22 -4
  13. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  14. package/dist/collection/components/gov-pagination/gov-pagination.js +20 -1
  15. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  16. package/dist/collection/components/gov-tabs/gov-tabs-item.js +20 -2
  17. package/dist/collection/components/gov-tabs/gov-tabs-item.js.map +1 -1
  18. package/dist/collection/components/gov-tabs/gov-tabs.js +52 -43
  19. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  20. package/dist/components/gov-accordion-item.js +1 -1
  21. package/dist/components/gov-attachments-item.js +1 -1
  22. package/dist/components/gov-breadcrumbs.js +1 -1
  23. package/dist/components/gov-button.js +1 -1
  24. package/dist/components/gov-card.js +1 -1
  25. package/dist/components/gov-chip.js +1 -1
  26. package/dist/components/gov-form-autocomplete.js +1 -1
  27. package/dist/components/gov-form-checkbox.js +1 -1
  28. package/dist/components/gov-form-file.js +1 -1
  29. package/dist/components/gov-form-input.js +1 -1
  30. package/dist/components/gov-form-multi-select.js +1 -1
  31. package/dist/components/gov-form-select.js +1 -1
  32. package/dist/components/gov-icon.js +1 -1
  33. package/dist/components/gov-infobar.js +1 -1
  34. package/dist/components/gov-loading.js +1 -1
  35. package/dist/components/gov-modal.js +1 -1
  36. package/dist/components/gov-pagination.js +1 -1
  37. package/dist/components/gov-pagination.js.map +1 -1
  38. package/dist/components/gov-prompt.js +1 -1
  39. package/dist/components/gov-side-nav-item.js +1 -1
  40. package/dist/components/gov-tabs-item.js +1 -1
  41. package/dist/components/gov-tabs-item.js.map +1 -1
  42. package/dist/components/gov-tabs.js +1 -1
  43. package/dist/components/gov-tabs.js.map +1 -1
  44. package/dist/components/gov-tag.js +1 -1
  45. package/dist/components/gov-toast.js +1 -1
  46. package/dist/components/gov-tooltip-content.js +1 -1
  47. package/dist/components/gov-wizard-item.js +1 -1
  48. package/dist/components/{p-659a5e9b.js → p-137f86d1.js} +2 -2
  49. package/dist/components/{p-93748f78.js → p-3605bf8d.js} +2 -2
  50. package/dist/components/{p-6b70bb05.js → p-479edf55.js} +2 -2
  51. package/dist/components/p-479edf55.js.map +1 -0
  52. package/dist/components/{p-f5db4029.js → p-84d0a332.js} +2 -2
  53. package/dist/components/{p-24033114.js → p-9c9fc4ae.js} +2 -2
  54. package/dist/components/{p-4fa21d88.js → p-d9dda24d.js} +2 -2
  55. package/dist/components/{p-44f0bc16.js → p-e01962d9.js} +2 -2
  56. package/dist/core/core.esm.js +1 -1
  57. package/dist/core/core.esm.js.map +1 -1
  58. package/dist/core/{p-7b210966.entry.js → p-0d99a3d8.entry.js} +2 -2
  59. package/dist/core/p-0d99a3d8.entry.js.map +1 -0
  60. package/dist/core/{p-ea506584.entry.js → p-10dbd2e1.entry.js} +2 -2
  61. package/dist/core/p-56d42f3e.entry.js +2 -0
  62. package/dist/core/p-56d42f3e.entry.js.map +1 -0
  63. package/dist/core/p-618df4db.entry.js +2 -0
  64. package/dist/core/p-618df4db.entry.js.map +1 -0
  65. package/dist/core/{p-6def30bc.entry.js → p-aa9b5731.entry.js} +2 -2
  66. package/dist/core/p-aa9b5731.entry.js.map +1 -0
  67. package/dist/esm/core.js +1 -1
  68. package/dist/esm/gov-form-input.entry.js +4 -3
  69. package/dist/esm/gov-form-input.entry.js.map +1 -1
  70. package/dist/esm/gov-icon.entry.js +1 -1
  71. package/dist/esm/gov-pagination.entry.js +3 -1
  72. package/dist/esm/gov-pagination.entry.js.map +1 -1
  73. package/dist/esm/gov-tabs-item.entry.js +13 -2
  74. package/dist/esm/gov-tabs-item.entry.js.map +1 -1
  75. package/dist/esm/gov-tabs.entry.js +34 -42
  76. package/dist/esm/gov-tabs.entry.js.map +1 -1
  77. package/dist/esm/loader.js +1 -1
  78. package/dist/hydrate/index.js +56 -47
  79. package/dist/hydrate/index.mjs +56 -47
  80. package/dist/types/components/gov-form/input/gov-form-input.d.ts +5 -1
  81. package/dist/types/components/gov-pagination/gov-pagination.d.ts +5 -0
  82. package/dist/types/components/gov-tabs/gov-tabs-item.d.ts +1 -0
  83. package/dist/types/components/gov-tabs/gov-tabs.d.ts +6 -4
  84. package/dist/types/components.d.ts +22 -2
  85. package/package.json +1 -1
  86. package/dist/components/p-6b70bb05.js.map +0 -1
  87. package/dist/core/p-24e32e0f.entry.js +0 -2
  88. package/dist/core/p-24e32e0f.entry.js.map +0 -1
  89. package/dist/core/p-6def30bc.entry.js.map +0 -1
  90. package/dist/core/p-7b210966.entry.js.map +0 -1
  91. package/dist/core/p-9ae7429a.entry.js +0 -2
  92. package/dist/core/p-9ae7429a.entry.js.map +0 -1
  93. /package/dist/components/{p-659a5e9b.js.map → p-137f86d1.js.map} +0 -0
  94. /package/dist/components/{p-93748f78.js.map → p-3605bf8d.js.map} +0 -0
  95. /package/dist/components/{p-f5db4029.js.map → p-84d0a332.js.map} +0 -0
  96. /package/dist/components/{p-24033114.js.map → p-9c9fc4ae.js.map} +0 -0
  97. /package/dist/components/{p-4fa21d88.js.map → p-d9dda24d.js.map} +0 -0
  98. /package/dist/components/{p-44f0bc16.js.map → p-e01962d9.js.map} +0 -0
  99. /package/dist/core/{p-ea506584.entry.js.map → p-10dbd2e1.entry.js.map} +0 -0
@@ -21,7 +21,7 @@ const GovTabs = class {
21
21
  index.registerInstance(this, hostRef);
22
22
  this.govChange = index.createEvent(this, "gov-change", 7);
23
23
  this.triggerRefs = {};
24
- this.controller = [];
24
+ this.controllers = [];
25
25
  this.focusIndex = 0;
26
26
  this.compactControls = false;
27
27
  this.type = "text";
@@ -40,17 +40,16 @@ const GovTabs = class {
40
40
  props.validateProp(constants.TabVariants, newValue, constants.TabsClass.root);
41
41
  }
42
42
  componentWillLoad() {
43
- this.prepareDataSource();
43
+ this.prepareControllers();
44
44
  }
45
45
  async componentDidRender() {
46
46
  if (win.canValidateWcagOnRender()) {
47
47
  await utils.delay(500);
48
48
  await this.validateWcag();
49
49
  }
50
- this.resizeObserver();
51
50
  }
52
- prepareDataSource() {
53
- this.controller = [];
51
+ prepareControllers() {
52
+ this.controllers = [];
54
53
  const promises = [];
55
54
  this.host.querySelectorAll(constants.TabsItemClass.root).forEach((tab) => {
56
55
  const controlItem = Promise.all([
@@ -72,49 +71,36 @@ const GovTabs = class {
72
71
  promises.push(controlItem);
73
72
  });
74
73
  Promise.all(promises).then(controllers => {
75
- let defaultTab = controllers.findIndex(controller => controller.default);
76
- if (defaultTab === -1)
77
- defaultTab = 0;
78
- this.focusIndex = defaultTab;
79
- controllers[defaultTab].active = true;
80
- this.controller = [...controllers];
74
+ let defaultTabIndex = controllers.findIndex(controller => controller.default);
75
+ if (defaultTabIndex === -1)
76
+ defaultTabIndex = 0;
77
+ this.focusIndex = defaultTabIndex;
78
+ controllers[defaultTabIndex].active = true;
79
+ this.controllers = [...controllers];
81
80
  this.reRender();
82
81
  });
83
82
  }
84
83
  setActiveByIdentifier(identifier) {
85
84
  const temp = [];
86
- this.controller.map(item => {
85
+ this.controllers.map(item => {
87
86
  item.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier;
88
87
  temp.push(item);
89
88
  });
90
- this.controller = [...temp];
89
+ this.controllers = [...temp];
91
90
  }
92
91
  reRender() {
93
- this.controller.map(control => {
94
- control.element.setActiveStatus(control.active);
92
+ this.controllers.map(control => {
93
+ control.element.setActiveStatus(control.active).catch();
95
94
  });
96
95
  }
97
- /*
98
- private evaluateControls() {
99
- this.compactControls = false
100
- let sumOfWidth = this.tabsRef.querySelector("ul").offsetWidth
101
- this.compactControls = this.tabsRef.offsetWidth < sumOfWidth
102
- }
103
- */
104
- resizeObserver() {
105
- const resizeObserver = new ResizeObserver(utils.throttle(() => {
106
- // this.evaluateControls()
107
- }, 200));
108
- resizeObserver.observe(this.tabsRef);
109
- }
110
96
  render() {
111
- return (index.h(index.Host, { key: '561251fc7844ec9d11f72ff6e03ac6656b298ac9', class: this.h.classes(constants.TabsClass.root), variant: this.variant, type: this.type, role: "tablist", ref: el => (this.tabsRef = el), "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy, onKeyDown: this.onKeydownHandler.bind(this) }, index.h("div", { key: 'c5ecb113f0c39857a3d4eea506b08321b577f2b1', class: constants.TabsClass.tabs, "aria-hidden": template.toBoolAttr(this.compactControls) }, index.h("ul", { key: 'd1d1d166a43ddc69d35ec6c359dbab589e3c92fd', class: constants.TabsClass.list }, this.controller.map(control => (index.h("li", { class: constants.TabsClass.item }, this.type == "text" ? (index.h("button", { class: constants.TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control), disabled: control.disabled, "aria-disabled": template.toBoolAttr(control.disabled), "aria-selected": template.toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active && !control.disabled ? 0 : -1, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.label)) : (index.h("gov-chip", { role: "tab", tag: 'button', identifier: control.triggerIdentifier, "wcag-selected": control.active, "wcag-controls": control.contentIdentifier, focusable: control.active, disabled: control.disabled, variant: this.variant, inverse: !control.active, ref: el => (this.triggerRefs[control.triggerIdentifier] = el), "on-gov-click": () => this.onSelectHandler(control) }, control.label))))))), index.h("span", { key: '713c0bcfb6ff3377c77bff908b7e30ecd084d64f', id: this.formSelectId, hidden: true }, this.wcagSelectLabel), this.compactControls ? (index.h("gov-form-select", { "wcag-labelled-by": this.formSelectId, "onGov-change": this.onChangeHandler.bind(this) }, this.controller.map(control => (index.h("option", { value: control.triggerIdentifier, selected: control.active }, control.label))))) : null, index.h("slot", { key: '176d4c69a319e1d0630db64ad853bd3358db865c' })));
97
+ return (index.h(index.Host, { key: 'fa6bb0777c56edcb61f5acfa4cac75fae2f8bb78', class: this.h.classes(constants.TabsClass.root), variant: this.variant, type: this.type, role: "tablist", "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy, onKeyDown: this.onKeydownHandler.bind(this) }, index.h("div", { key: '3e764b20b9a1e3221232d7567e45acae8701a963', class: constants.TabsClass.tabs, "aria-hidden": template.toBoolAttr(this.compactControls) }, index.h("ul", { key: 'adedeb20cd2d5608502410f1b843ba6293000e7c', class: constants.TabsClass.list }, this.controllers.map(control => (index.h("li", { class: constants.TabsClass.item }, this.type == "text" ? (index.h("button", { class: constants.TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control), disabled: control.disabled, "aria-disabled": template.toBoolAttr(control.disabled), "aria-selected": template.toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active && !control.disabled ? 0 : -1, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.label)) : (index.h("gov-chip", { role: "tab", tag: 'button', identifier: control.triggerIdentifier, "wcag-selected": control.active, "wcag-controls": control.contentIdentifier, focusable: control.active, disabled: control.disabled, variant: this.variant, inverse: !control.active, ref: el => (this.triggerRefs[control.triggerIdentifier] = el), "on-gov-click": () => this.onSelectHandler(control) }, control.label))))))), index.h("span", { key: '6d855cd5195673b6a13aaf4b357b74bdcfd0ef4d', id: this.formSelectId, hidden: true }, this.wcagSelectLabel), this.compactControls ? (index.h("gov-form-select", { "wcag-labelled-by": this.formSelectId, "onGov-change": this.onChangeHandler.bind(this) }, this.controllers.map(control => (index.h("option", { value: control.triggerIdentifier, selected: control.active }, control.label))))) : null, index.h("slot", { key: 'd7ea30baebad93b05c1f978fcca0c19989be7227' })));
112
98
  }
113
99
  getCurrentTab() {
114
- return this.controller.find(control => control.active) || null;
100
+ return this.controllers.find(control => control.active) || null;
115
101
  }
116
102
  onSelectHandler(control) {
117
- const index = this.controller.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);
103
+ const index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);
118
104
  this.focusIndex = index;
119
105
  this.setActiveByIdentifier(control.triggerIdentifier);
120
106
  this.reRender();
@@ -134,30 +120,30 @@ const GovTabs = class {
134
120
  }
135
121
  goToPrevNext(keyCode) {
136
122
  if ([37, 38, 39, 40].includes(keyCode)) {
137
- if (false === (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1)) {
123
+ if (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {
138
124
  return;
139
125
  }
140
- this.controller[this.focusIndex].active = false;
126
+ this.controllers[this.focusIndex].active = false;
141
127
  if (keyCode === 39 || keyCode === 40) {
142
128
  this.focusIndex++;
143
- if (this.focusIndex >= this.controller.length) {
129
+ if (this.focusIndex >= this.controllers.length) {
144
130
  this.focusIndex = 0;
145
131
  }
146
- if (this.controller[this.focusIndex].disabled) {
132
+ if (this.controllers[this.focusIndex].disabled) {
147
133
  this.goToPrevNext(40);
148
134
  }
149
135
  }
150
136
  else if (keyCode === 37 || keyCode === 38) {
151
137
  this.focusIndex--;
152
138
  if (this.focusIndex < 0) {
153
- this.focusIndex = this.controller.length - 1;
139
+ this.focusIndex = this.controllers.length - 1;
154
140
  }
155
- if (this.controller[this.focusIndex].disabled) {
141
+ if (this.controllers[this.focusIndex].disabled) {
156
142
  this.goToPrevNext(38);
157
143
  }
158
144
  }
159
- if (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1) {
160
- const current = this.controller[this.focusIndex];
145
+ if (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {
146
+ const current = this.controllers[this.focusIndex];
161
147
  current.active = true;
162
148
  const trigger = this.triggerRefs[current.triggerIdentifier];
163
149
  if (trigger.nodeName.toLowerCase() === 'gov-chip') {
@@ -166,7 +152,7 @@ const GovTabs = class {
166
152
  else {
167
153
  this.triggerRefs[current.triggerIdentifier].focus();
168
154
  }
169
- this.controller = [...this.controller];
155
+ this.controllers = [...this.controllers];
170
156
  this.reRender();
171
157
  this.govChange.emit(this.getCurrentTab().element);
172
158
  }
@@ -176,7 +162,7 @@ const GovTabs = class {
176
162
  * Regenerate tabs controllers
177
163
  */
178
164
  async refresh() {
179
- this.prepareDataSource();
165
+ this.prepareControllers();
180
166
  }
181
167
  /**
182
168
  * Returns the currently selected tabs-item
@@ -191,6 +177,12 @@ const GovTabs = class {
191
177
  this.setActiveByIdentifier(identifier);
192
178
  this.reRender();
193
179
  }
180
+ /**
181
+ * Regenerate tabs controllers
182
+ */
183
+ async rerender() {
184
+ this.prepareControllers();
185
+ }
194
186
  /**
195
187
  * Validate the WCAG attributes of the component
196
188
  */
@@ -1 +1 @@
1
- {"file":"gov-tabs.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,UAAU,GAAG,ugKAAugK,CAAC;AAC3hK,sBAAe,UAAU;;MCgBZ,OAAO;IAOnB;;;QALQ,gBAAW,GAA8D,EAAE,CAAA;0BAWrC,EAAE;0BAC1B,CAAC;+BACI,KAAK;oBAIC,MAAM;uBAIE,SAAS;2BAIC,YAAY;;;;QAnB9D,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,YAAY,GAAGC,qBAAQ,CAAC,eAAe,CAAC,CAAA;KAC7C;IAoCD,YAAY,CAAC,QAAgB;QAC5BC,kBAAY,CAACC,kBAAQ,EAAE,QAAQ,EAAEC,mBAAS,CAAC,IAAI,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;;;;IAMD,MAAM,OAAO;QACZ,IAAI,CAAC,iBAAiB,EAAE,CAAA;KACxB;;;;IAMD,MAAM,UAAU;QACf,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,IAAI,IAAI,CAAA;KAC3C;;;;IAMD,MAAM,YAAY,CAAC,UAAkB;QACpC,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAA;QACtC,IAAI,CAAC,QAAQ,EAAE,CAAA;KACf;;;;IAMD,MAAM,YAAY;QACjBG,qBAAgB,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAET,mBAAS,CAAC,IAAI,CAAC,CAAA;QAC3EU,sBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAEV,mBAAS,CAAC,IAAI,CAAC,CAAA;KACtE;;;;;;;;;;;","names":["govHost","createID","validateProp","TabTypes","TabsClass","TabVariants","canValidateWcagOnRender","delay","TabsItemClass","throttle","h","Host","toBoolAttr","validateWcagProp","validateWcagLabel"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.scss?tag=gov-tabs","../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["/*\n * Tabs\n */\n\n$class: \".gov-tabs\";\n\n#{$class} {\n\t@include base();\n\t&__list {\n\t\t@extend %reset-ul;\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tmargin: rem-calc(0 0 20);\n\t}\n\t&__list > &__item {\n\t\t@extend %reset-ul-li;\n\t\tdisplay: flex;\n\t\tmargin: 0;\n\t}\n\t&__btn {\n\t\t@include typography($font-size-s);\n\t\t@include button-core();\n\t\t@include focus-outline();\n\t\tmargin: 0;\n\t\tpadding: rem-calc(12 0 10);\n\t\tborder-bottom: rem-calc(2) solid transparent;\n\t\tfont-weight: 700;\n\t\ttext-align: center;\n\t\ttransition: $t linear color, $t linear border-color;\n\t\t&[disabled] {\n\t\t\tcursor: not-allowed;\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $type, $definitions in $tabs-types {\n\t\t&[type=\"#{$type}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__list {\n\t\t\t\t\tgap: get(\"item-spacing\", $definitions);\n\t\t\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\t\t\tborder-bottom: $tabs-list-border;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $tabs-variants {\n\t\t&[variant=\"#{$variant}\"][type=\"text\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__btn:not([disabled]) {\n\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t\t@include hover() {\n\t\t\t\t\t\tcolor: get(\"color-hover\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// STATES\n\t\t\t\t&__btn[aria-selected=\"true\"] {\n\t\t\t\t\tborder-bottom-color: get(\"color-active\", $definitions);\n\t\t\t\t\tcolor: get(\"color-active\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t&[orientation=\"vertical\"] {\n\t\t#{$class}__btn {\n\t\t\ttext-align: left;\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: xl) {\n\t\t&[orientation=\"vertical\"] {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\n\t\t\t#{$class}__list {\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t\tflex-direction: column;\n\t\t\t\twidth: max-content;\n\t\t\t\tmax-width: 30vw;\n\t\t\t\tmargin-right: rem-calc(20);\n\t\t\t\tpadding: rem-calc(0 8);\n\t\t\t\tborder-bottom: none;\n\t\t\t\tborder-right: $tabs-list-border;\n\t\t\t}\n\n\t\t\t#{$class}__item {\n\t\t\t\tjustify-content: flex-end;\n\t\t\t}\n\n\t\t\t#{$class}__btn {\n\t\t\t\tpadding: rem-calc(8 12);\n\t\t\t\ttext-align: right;\n\t\t\t}\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\n\nimport {govHost, toBoolAttr} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {canValidateWcagOnRender} from \"../../helpers/Dom/win\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {validateWcagLabel, validateWcagProp} from \"../../helpers/Validate/wcag\"\nimport {Nullable} from \"../../types/interfaces\"\nimport {createID} from \"../../utils/string.utils\"\nimport {delay, throttle} from \"../../utils/utils\"\nimport {TabOrientationType, TabsClass, TabsItemClass, TabType, TabTypes, TabVariants, VariantType} from \"./constants\"\nimport {GovTabControllerItem} from \"./gov-tabs.types\"\n\n@Component({\n\ttag: \"gov-tabs\",\n\tstyleUrl: \"gov-tabs.scss\",\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: { [key: string]: HTMLButtonElement | HTMLGovChipElement } = {}\n\tprivate tabsRef?: HTMLDivElement\n\n\tprivate readonly formSelectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.formSelectId = createID(\"GovFormSelect\")\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t@State() controller: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() compactControls = false\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = \"text\"\n\t/**\n\t * Style variation of the tab chips.\n\t */\n\t@Prop() readonly variant?: VariantType = \"primary\"\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = \"horizontal\"\n\t/**\n\t * Adds accessible label for the tabs that is only shown for screen readers.\n\t */\n\t@Prop({attribute: \"wcag-label\"}) readonly wcagLabel: string\n\t/**\n\t * Adds accessible label for the tabs select\n\t */\n\t@Prop({attribute: \"wcag-select-label\"}) readonly wcagSelectLabel: string\n\t/**\n\t * Indicates the id of a component that labels the tabs.\n\t */\n\t@Prop({attribute: \"wcag-labelled-by\"}) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(TabVariants, newValue, TabsClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareDataSource()\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\n\t\tthis.resizeObserver()\n\t}\n\n\tprivate prepareDataSource(): void {\n\t\tthis.controller = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([\n\t\t\t\ttab.getIdentifier(),\n\t\t\t\ttab.getTriggerIdentifier(),\n\t\t\t\ttab.getDisableState()\n\t\t\t]).then(([identifier, triggerIdentifier, disabled]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute(\"default\") === \"string\"\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute(\"label\"),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t});\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tlet defaultTab = controllers.findIndex(controller => controller.default)\n\t\t\tif (defaultTab === -1) defaultTab = 0\n\t\t\tthis.focusIndex = defaultTab\n\t\t\tcontrollers[defaultTab].active = true\n\t\t\tthis.controller = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controller.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controller = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controller.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active)\n\t\t})\n\t}\n\n\t/*\n\tprivate evaluateControls() {\n\t\tthis.compactControls = false\n\t\tlet sumOfWidth = this.tabsRef.querySelector(\"ul\").offsetWidth\n\t\tthis.compactControls = this.tabsRef.offsetWidth < sumOfWidth\n\t}\n\t*/\n\n\tprivate resizeObserver() {\n\t\tconst resizeObserver = new ResizeObserver(\n\t\t\tthrottle(() => {\n\t\t\t\t// this.evaluateControls()\n\t\t\t}, 200),\n\t\t)\n\n\t\tresizeObserver.observe(this.tabsRef)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tvariant={this.variant}\n\t\t\t\ttype={this.type}\n\t\t\t\trole=\"tablist\"\n\t\t\t\tref={el => (this.tabsRef = el as HTMLDivElement)}\n\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs} aria-hidden={toBoolAttr(this.compactControls)}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controller.map(control => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == \"text\" ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\taria-disabled={toBoolAttr(control.disabled)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active && !control.disabled ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-chip\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttag={'button'}\n\t\t\t\t\t\t\t\t\t\tidentifier={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\twcag-selected={control.active}\n\t\t\t\t\t\t\t\t\t\twcag-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\tfocusable={control.active}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\t\t\t\tinverse={!control.active}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLGovChipElement)}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</gov-chip>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\n\t\t\t\t<span id={this.formSelectId} hidden>\n\t\t\t\t\t{this.wcagSelectLabel}\n\t\t\t\t</span>\n\t\t\t\t{this.compactControls ? (\n\t\t\t\t\t<gov-form-select wcag-labelled-by={this.formSelectId} onGov-change={this.onChangeHandler.bind(this)}>\n\t\t\t\t\t\t{this.controller.map(control => (\n\t\t\t\t\t\t\t<option value={control.triggerIdentifier} selected={control.active}>\n\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</gov-form-select>\n\t\t\t\t) : null}\n\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controller.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem) {\n\t\tconst index = this.controller.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onChangeHandler(e: CustomEvent) {\n\t\tconst triggerId = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.setActiveByIdentifier(triggerId)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\n\t\te.stopPropagation()\n\t\tthis.goToPrevNext(keyCode)\n\t}\n\n\tprivate goToPrevNext(keyCode: number) {\n\t\tif ([37, 38, 39, 40].includes(keyCode)) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.controller[this.focusIndex].active = false\n\n\t\t\tif (keyCode === 39 || keyCode === 40) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controller.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t\tif (this.controller[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(40)\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37 || keyCode === 38) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controller.length - 1\n\t\t\t\t}\n\t\t\t\tif (this.controller[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(38)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1) {\n\t\t\t\tconst current = this.controller[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tconst trigger = this.triggerRefs[current.triggerIdentifier]\n\t\t\t\tif (trigger.nodeName.toLowerCase() === 'gov-chip') {\n\t\t\t\t\t(this.triggerRefs[current.triggerIdentifier] as HTMLGovChipElement).setFocus()\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\t}\n\n\t\t\t\tthis.controller = [...this.controller]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareDataSource()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagProp(this.wcagSelectLabel, \"wcag-select-label\", TabsClass.root)\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, TabsClass.root)\n\t}\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,CAAC,CAAC,KAAK,EAAE,CAAA;iBACnD;gBAED,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAA;gBACxC,IAAI,CAAC,QAAQ,EAAE,CAAA;gBACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,CAAA;aACjD;SACD;KACD;;;;IAMD,MAAM,OAAO;QACZ,IAAI,CAAC,kBAAkB,EAAE,CAAA;KACzB;;;;IAMD,MAAM,UAAU;QACf,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC,OAAO,IAAI,IAAI,CAAA;KAC3C;;;;IAMD,MAAM,YAAY,CAAC,UAAkB;QACpC,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAA;QACtC,IAAI,CAAC,QAAQ,EAAE,CAAA;KACf;;;;IAMD,MAAM,QAAQ;QACb,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC1B;;;;IAMD,MAAM,YAAY;QACjBG,qBAAgB,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAER,mBAAS,CAAC,IAAI,CAAC,CAAA;QAC3ES,sBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAET,mBAAS,CAAC,IAAI,CAAC,CAAA;KACtE;;;;;;;;;;;","names":["govHost","createID","validateProp","TabTypes","TabsClass","TabVariants","canValidateWcagOnRender","delay","TabsItemClass","h","Host","toBoolAttr","validateWcagProp","validateWcagLabel"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.scss?tag=gov-tabs","../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["/*\n * Tabs\n */\n\n$class: \".gov-tabs\";\n\n#{$class} {\n\t@include base();\n\t&__list {\n\t\t@extend %reset-ul;\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tmargin: rem-calc(0 0 20);\n\t}\n\t&__list > &__item {\n\t\t@extend %reset-ul-li;\n\t\tdisplay: flex;\n\t\tmargin: 0;\n\t}\n\t&__btn {\n\t\t@include typography($font-size-s);\n\t\t@include button-core();\n\t\t@include focus-outline();\n\t\tmargin: 0;\n\t\tpadding: rem-calc(12 0 10);\n\t\tborder-bottom: rem-calc(2) solid transparent;\n\t\tfont-weight: 700;\n\t\ttext-align: center;\n\t\ttransition: $t linear color, $t linear border-color;\n\t\t&[disabled] {\n\t\t\tcursor: not-allowed;\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $type, $definitions in $tabs-types {\n\t\t&[type=\"#{$type}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__list {\n\t\t\t\t\tgap: get(\"item-spacing\", $definitions);\n\t\t\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\t\t\tborder-bottom: $tabs-list-border;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $tabs-variants {\n\t\t&[variant=\"#{$variant}\"][type=\"text\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__btn:not([disabled]) {\n\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t\t@include hover() {\n\t\t\t\t\t\tcolor: get(\"color-hover\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// STATES\n\t\t\t\t&__btn[aria-selected=\"true\"] {\n\t\t\t\t\tborder-bottom-color: get(\"color-active\", $definitions);\n\t\t\t\t\tcolor: get(\"color-active\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t&[orientation=\"vertical\"] {\n\t\t#{$class}__btn {\n\t\t\ttext-align: left;\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: xl) {\n\t\t&[orientation=\"vertical\"] {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\n\t\t\t#{$class}__list {\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t\tflex-direction: column;\n\t\t\t\twidth: max-content;\n\t\t\t\tmax-width: 30vw;\n\t\t\t\tmargin-right: rem-calc(20);\n\t\t\t\tpadding: rem-calc(0 8);\n\t\t\t\tborder-bottom: none;\n\t\t\t\tborder-right: $tabs-list-border;\n\t\t\t}\n\n\t\t\t#{$class}__item {\n\t\t\t\tjustify-content: flex-end;\n\t\t\t}\n\n\t\t\t#{$class}__btn {\n\t\t\t\tpadding: rem-calc(8 12);\n\t\t\t\ttext-align: right;\n\t\t\t}\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\n\nimport {govHost, toBoolAttr} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {canValidateWcagOnRender} from \"../../helpers/Dom/win\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {validateWcagLabel, validateWcagProp} from \"../../helpers/Validate/wcag\"\nimport {Nullable} from \"../../types/interfaces\"\nimport {createID} from \"../../utils/string.utils\"\nimport {delay} from \"../../utils/utils\"\nimport {TabOrientationType, TabsClass, TabsItemClass, TabType, TabTypes, TabVariants, VariantType} from \"./constants\"\nimport {GovTabControllerItem} from \"./gov-tabs.types\"\n\n@Component({\n\ttag: \"gov-tabs\",\n\tstyleUrl: \"gov-tabs.scss\",\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: Record<string, HTMLButtonElement | HTMLGovChipElement> = {}\n\n\tprivate readonly formSelectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.formSelectId = createID(\"GovFormSelect\")\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t@State() controllers: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() compactControls = false\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = \"text\"\n\t/**\n\t * Style variation of the tab chips.\n\t */\n\t@Prop() readonly variant?: VariantType = \"primary\"\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = \"horizontal\"\n\t/**\n\t * Adds accessible label for the tabs that is only shown for screen readers.\n\t */\n\t@Prop({attribute: \"wcag-label\"}) readonly wcagLabel: string\n\t/**\n\t * Adds accessible label for the tabs select\n\t */\n\t@Prop({attribute: \"wcag-select-label\"}) readonly wcagSelectLabel: string\n\t/**\n\t * Indicates the id of a component that labels the tabs.\n\t */\n\t@Prop({attribute: \"wcag-labelled-by\"}) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(TabVariants, newValue, TabsClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareControllers()\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tprivate prepareControllers(): void {\n\t\tthis.controllers = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([\n\t\t\t\ttab.getIdentifier(),\n\t\t\t\ttab.getTriggerIdentifier(),\n\t\t\t\ttab.getDisableState()\n\t\t\t]).then(([identifier, triggerIdentifier, disabled]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute(\"default\") === \"string\"\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute(\"label\"),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t});\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tlet defaultTabIndex = controllers.findIndex(controller => controller.default)\n\t\t\tif (defaultTabIndex === -1) defaultTabIndex = 0\n\t\t\tthis.focusIndex = defaultTabIndex\n\t\t\tcontrollers[defaultTabIndex].active = true\n\t\t\tthis.controllers = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controllers.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controllers = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controllers.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active).catch()\n\t\t})\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tvariant={this.variant}\n\t\t\t\ttype={this.type}\n\t\t\t\trole=\"tablist\"\n\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs} aria-hidden={toBoolAttr(this.compactControls)}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controllers.map(control => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == \"text\" ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\taria-disabled={toBoolAttr(control.disabled)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active && !control.disabled ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-chip\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttag={'button'}\n\t\t\t\t\t\t\t\t\t\tidentifier={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\twcag-selected={control.active}\n\t\t\t\t\t\t\t\t\t\twcag-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\tfocusable={control.active}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\t\t\t\tinverse={!control.active}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLGovChipElement)}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</gov-chip>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\n\t\t\t\t<span id={this.formSelectId} hidden>\n\t\t\t\t\t{this.wcagSelectLabel}\n\t\t\t\t</span>\n\t\t\t\t{this.compactControls ? (\n\t\t\t\t\t<gov-form-select wcag-labelled-by={this.formSelectId} onGov-change={this.onChangeHandler.bind(this)}>\n\t\t\t\t\t\t{this.controllers.map(control => (\n\t\t\t\t\t\t\t<option value={control.triggerIdentifier} selected={control.active}>\n\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</gov-form-select>\n\t\t\t\t) : null}\n\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controllers.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem) {\n\t\tconst index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onChangeHandler(e: CustomEvent) {\n\t\tconst triggerId = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.setActiveByIdentifier(triggerId)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\n\t\te.stopPropagation()\n\t\tthis.goToPrevNext(keyCode)\n\t}\n\n\tprivate goToPrevNext(keyCode: number) {\n\t\tif ([37, 38, 39, 40].includes(keyCode)) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.controllers[this.focusIndex].active = false\n\n\t\t\tif (keyCode === 39 || keyCode === 40) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controllers.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(40)\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37 || keyCode === 38) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controllers.length - 1\n\t\t\t\t}\n\t\t\t\tif (this.controllers[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(38)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {\n\t\t\t\tconst current = this.controllers[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tconst trigger = this.triggerRefs[current.triggerIdentifier]\n\t\t\t\tif (trigger.nodeName.toLowerCase() === 'gov-chip') {\n\t\t\t\t\t(this.triggerRefs[current.triggerIdentifier] as HTMLGovChipElement).setFocus()\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\t}\n\n\t\t\t\tthis.controllers = [...this.controllers]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareControllers()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync rerender(): Promise<void> {\n\t\tthis.prepareControllers();\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagProp(this.wcagSelectLabel, \"wcag-select-label\", TabsClass.root)\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, TabsClass.root)\n\t}\n}\n"],"version":3}
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy(JSON.parse("[[\"gov-form-file.cjs\",[[4,\"gov-form-file\",{\"expanded\":[4],\"required\":[4],\"disabled\":[4],\"resetAfterPick\":[4,\"reset-after-pick\"],\"ignoreFileDuplicationCheck\":[4,\"ignore-file-duplication-check\"],\"displayAttachments\":[4,\"display-attachments\"],\"name\":[1],\"accept\":[1],\"multiple\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"identifier\":[1],\"invalid\":[4],\"errorSize\":[1,\"error-size\"],\"errorAccept\":[1,\"error-accept\"],\"attachmentsLabel\":[1,\"attachments-label\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagAttachmentsLabel\":[1,\"wcag-attachments-label\"],\"files\":[32],\"getRef\":[64],\"getAreaRef\":[64],\"reset\":[64],\"validateWcag\":[64]},null,{\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"]}]]],[\"gov-form-multi-select.cjs\",[[4,\"gov-form-multi-select\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"placeholder\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"hideSelectedList\":[4,\"hide-selected-list\"],\"required\":[4],\"disabled\":[4],\"invalid\":[4],\"success\":[4],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"valueState\":[32],\"selectedOptionsState\":[32],\"optionsState\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\",\"watchDisabled\"],\"options\":[\"watchOptions\"],\"value\":[\"watchValue\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"],\"success\":[\"watchDisabled\"]}]]],[\"gov-modal.cjs\",[[4,\"gov-modal\",{\"open\":[1028],\"blockClose\":[4,\"block-close\"],\"blockBackdropClose\":[4,\"block-backdrop-close\"],\"blockButtonClose\":[4,\"block-button-close\"],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]},null,{\"labelTag\":[\"validateLabelTag\"],\"open\":[\"watchOpen\"]}]]],[\"gov-pagination.cjs\",[[0,\"gov-pagination\",{\"type\":[1],\"current\":[2],\"total\":[2],\"inverse\":[4],\"size\":[1],\"variant\":[1],\"pageSize\":[2,\"page-size\"],\"maxPages\":[2,\"max-pages\"],\"link\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagPageLabel\":[1,\"wcag-page-label\"],\"labelPrev\":[1,\"label-prev\"],\"labelStart\":[1,\"label-start\"],\"labelNext\":[1,\"label-next\"],\"labelEnd\":[1,\"label-end\"],\"pagination\":[32],\"validateWcag\":[64]},null,{\"type\":[\"validateType\"],\"size\":[\"validateSize\"],\"variant\":[\"validateVariant\"],\"current\":[\"recalculate\"],\"total\":[\"recalculate\"],\"pageSize\":[\"recalculate\"],\"maxPages\":[\"recalculate\"]}]]],[\"gov-prompt.cjs\",[[4,\"gov-prompt\",{\"open\":[1028],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]},null,{\"labelTag\":[\"validateLabelTag\"],\"open\":[\"watchOpen\"]}]]],[\"gov-tabs.cjs\",[[4,\"gov-tabs\",{\"type\":[1],\"variant\":[1],\"orientation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"controller\":[32],\"focusIndex\":[32],\"compactControls\":[32],\"refresh\":[64],\"currentTab\":[64],\"setActiveTab\":[64],\"validateWcag\":[64]},null,{\"type\":[\"validateType\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-breadcrumbs.cjs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labeled-by\"],\"wcagToggleLabel\":[1,\"wcag-toggle-label\"],\"collapsed\":[32],\"toggleOption\":[32],\"validateWcag\":[64]}]]],[\"gov-infobar.cjs\",[[4,\"gov-infobar\",{\"headline\":[1],\"variant\":[1],\"role\":[1],\"inverse\":[4],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagToggleLabel\":[1,\"wcag-toggle-label\"],\"closable\":[4],\"toggleContent\":[32],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"]}]]],[\"gov-loading.cjs\",[[4,\"gov-loading\"]]],[\"gov-side-nav-item.cjs\",[[4,\"gov-side-nav-item\",{\"inverse\":[4],\"compact\":[4],\"identifier\":[1],\"count\":[4],\"label\":[1],\"disabled\":[4],\"href\":[1],\"isExpanded\":[4,\"is-expanded\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]},null,{\"label\":[\"validateLabel\"]}]]],[\"gov-toast.cjs\",[[4,\"gov-toast\",{\"variant\":[1],\"gravity\":[1],\"position\":[1],\"type\":[1],\"time\":[2],\"closeLabel\":[1,\"close-label\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"destroy\":[64]},null,{\"variant\":[\"validateVariant\"]}]]],[\"gov-tooltip-content.cjs\",[[4,\"gov-tooltip-content\",{\"variant\":[1],\"size\":[1],\"persist\":[4],\"isVisible\":[1028,\"is-visible\"],\"parentId\":[1,\"parent-id\"]},null,{\"isVisible\":[\"visibleContent\"]}]]],[\"gov-accordion-item.cjs\",[[4,\"gov-accordion-item\",{\"variant\":[1],\"identifier\":[1],\"size\":[1],\"disabled\":[4],\"isExpanded\":[1028,\"is-expanded\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]},null,{\"size\":[\"validateSize\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-card.cjs\",[[4,\"gov-card\",{\"promotion\":[4],\"label\":[1],\"collapsible\":[4],\"expanded\":[4],\"headlineTag\":[1,\"headline-tag\"],\"wcagTriggerLabel\":[1,\"wcag-trigger-label\"],\"wcagTriggerLabelledBy\":[1,\"wcag-trigger-labelled-by\"],\"isExpanded\":[32],\"open\":[64],\"close\":[64],\"validateWcag\":[64]},null,{\"headlineTag\":[\"validateHeadlineTag\"]}]]],[\"gov-form-checkbox.cjs\",[[4,\"gov-form-checkbox\",{\"value\":[1],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"noLabel\":[4,\"no-label\"],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\",\"watchDisabled\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"]}]]],[\"gov-tag.cjs\",[[4,\"gov-tag\",{\"inverse\":[4],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"size\":[513],\"variant\":[513]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\"]}]]],[\"gov-wizard-item.cjs\",[[4,\"gov-wizard-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"collapsible\":[4],\"annotation\":[1],\"label\":[1],\"disabled\":[4],\"isExpanded\":[1028,\"is-expanded\"],\"labelTag\":[1,\"label-tag\"],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]},null,{\"label\":[\"validateLabel\"],\"labelTag\":[\"validateTriggerTag\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-accordion.cjs\",[[4,\"gov-accordion\",{\"size\":[1],\"variant\":[1],\"noBorder\":[4,\"no-border\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-container.cjs\",[[4,\"gov-container\",{\"slottedChildren\":[64]}]]],[\"gov-control-group.cjs\",[[4,\"gov-control-group\",{\"variant\":[1],\"noBorder\":[4,\"no-border\"]},null,{\"variant\":[\"validateVariant\"]}]]],[\"gov-cookiebar.cjs\",[[4,\"gov-cookiebar\"]]],[\"gov-dropdown.cjs\",[[4,\"gov-dropdown\",{\"identifier\":[1],\"open\":[1028],\"position\":[1],\"getState\":[64],\"setOpen\":[64]}]]],[\"gov-empty.cjs\",[[4,\"gov-empty\"]]],[\"gov-error-code.cjs\",[[4,\"gov-error-code\"]]],[\"gov-form-checkbox-group.cjs\",[[4,\"gov-form-checkbox-group\",{\"gap\":[1],\"orientation\":[1],\"value\":[1025]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-control.cjs\",[[4,\"gov-form-control\",{\"gap\":[1],\"identifier\":[1],\"invalid\":[4],\"disabled\":[4],\"success\":[4],\"fieldset\":[4],\"size\":[1]}]]],[\"gov-form-group.cjs\",[[4,\"gov-form-group\",{\"gap\":[1],\"orientation\":[1]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-label.cjs\",[[4,\"gov-form-label\",{\"identifier\":[1],\"size\":[1],\"required\":[4],\"legend\":[4]}]]],[\"gov-form-password-power.cjs\",[[4,\"gov-form-password-power\",{\"power\":[514]}]]],[\"gov-form-radio.cjs\",[[4,\"gov-form-radio\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\",\"watchDisabled\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"]}]]],[\"gov-form-radio-group.cjs\",[[4,\"gov-form-radio-group\",{\"gap\":[1],\"orientation\":[1],\"value\":[1025]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-search.cjs\",[[4,\"gov-form-search\",{\"variant\":[513]}]]],[\"gov-form-switch.cjs\",[[4,\"gov-form-switch\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\",\"watchDisabled\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"]}]]],[\"gov-grid.cjs\",[[4,\"gov-grid\",{\"alignX\":[1,\"align-x\"],\"alignY\":[1,\"align-y\"]}]]],[\"gov-grid-item.cjs\",[[4,\"gov-grid-item\",{\"size\":[1],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]}]]],[\"gov-layout.cjs\",[[4,\"gov-layout\",{\"type\":[1],\"variant\":[1],\"inverse\":[4]}]]],[\"gov-layout-column.cjs\",[[4,\"gov-layout-column\"]]],[\"gov-message.cjs\",[[4,\"gov-message\",{\"variant\":[1]},null,{\"variant\":[\"validateVariant\"]}]]],[\"gov-nav.cjs\",[[4,\"gov-nav\",{\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-nav-item.cjs\",[[4,\"gov-nav-item\",{\"href\":[1],\"isExpandedState\":[32]},null,{\"href\":[\"validateHref\"]}]]],[\"gov-side-nav.cjs\",[[4,\"gov-side-nav\",{\"inverse\":[4],\"compact\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-skeleton.cjs\",[[0,\"gov-skeleton\",{\"variant\":[1],\"count\":[2],\"shape\":[1],\"width\":[1],\"height\":[1],\"animation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"],\"shape\":[\"validateShape\"],\"animation\":[\"validateAnimation\"]}]]],[\"gov-spacer.cjs\",[[0,\"gov-spacer\",{\"size\":[1],\"breakpoint\":[1]},null,{\"size\":[\"validateSize\"],\"breakpoint\":[\"validateBreakpoint\"]}]]],[\"gov-statsbar.cjs\",[[4,\"gov-statsbar\",{\"iconPosition\":[1,\"icon-position\"],\"variant\":[1]},null,{\"iconPosition\":[\"validateIconPosition\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-statsbar-item.cjs\",[[4,\"gov-statsbar-item\",{\"iconPosition\":[1,\"icon-position\"]},null,{\"iconPosition\":[\"validateIconPosition\"]}]]],[\"gov-stepper.cjs\",[[4,\"gov-stepper\",{\"size\":[1]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-stepper-item.cjs\",[[4,\"gov-stepper-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"label\":[1],\"annotation\":[1],\"triggerTag\":[1,\"trigger-tag\"],\"isExpandedState\":[32],\"currentState\":[64]},null,{\"label\":[\"validateLabel\"],\"triggerTag\":[\"validateTriggerTag\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-tabs-item.cjs\",[[4,\"gov-tabs-item\",{\"identifier\":[1],\"triggerIdentifier\":[1,\"trigger-identifier\"],\"label\":[513],\"disabled\":[516],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"getDisableState\":[64],\"setActiveStatus\":[64]}]]],[\"gov-tile.cjs\",[[4,\"gov-tile\",{\"href\":[513],\"target\":[1],\"getTriggerRef\":[64]}]]],[\"gov-tiles.cjs\",[[4,\"gov-tiles\",{\"columns\":[2],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-tooltip.cjs\",[[4,\"gov-tooltip\",{\"variant\":[1],\"size\":[1],\"position\":[1025],\"message\":[1],\"identifier\":[1],\"icon\":[516],\"persist\":[32],\"show\":[64],\"hide\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\"],\"position\":[\"validatePosition\"],\"message\":[\"rerenderMessage\"]}]]],[\"gov-wizard.cjs\",[[4,\"gov-wizard\",{\"size\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-icon.cjs\",[[0,\"gov-icon\",{\"name\":[1],\"type\":[1],\"iconData\":[32],\"visible\":[32],\"error\":[32]},null,{\"name\":[\"loadIconPathData\"]}]]],[\"gov-form-input.cjs\",[[4,\"gov-form-input\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"name\":[1],\"multiline\":[4],\"rows\":[2],\"cols\":[2],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"minlength\":[2],\"maxlength\":[2],\"min\":[8],\"max\":[8],\"autocomplete\":[4],\"autocorrect\":[4],\"spellcheck\":[4],\"type\":[1],\"inputType\":[1,\"input-type\"],\"role\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagAutocomplete\":[1,\"wcag-autocomplete\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"focused\":[32],\"setFocus\":[64],\"setValue\":[64],\"clearValue\":[64],\"getRef\":[64],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\",\"watchDisabled\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"],\"type\":[\"watchDisabled\"]}]]],[\"gov-form-autocomplete.cjs\",[[4,\"gov-form-autocomplete\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"nameKey\":[1,\"name-key\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"invalid\":[4],\"minlength\":[2],\"maxlength\":[2],\"throttleTime\":[2,\"throttle-time\"],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"processing\":[32],\"arrowCounter\":[32],\"list\":[32],\"setFocus\":[64],\"setBlur\":[64],\"setOptions\":[64],\"clearValue\":[64],\"setProcessing\":[64],\"setSearchCallback\":[64],\"setTemplateResolver\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\"],\"options\":[\"watchOptions\"]}]]],[\"gov-chip.cjs\",[[4,\"gov-chip\",{\"inverse\":[4],\"disabled\":[4],\"href\":[1],\"target\":[1],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"size\":[1],\"tag\":[1],\"variant\":[1],\"focusable\":[4],\"identifier\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagSelected\":[4,\"wcag-selected\"],\"getTriggerRef\":[64],\"getTriggerIdentifier\":[64],\"setFocus\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\"]}]]],[\"gov-form-select.cjs\",[[4,\"gov-form-select\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"success\":[4],\"disabled\":[4],\"invalid\":[4],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"optionsState\":[32],\"setFocus\":[64],\"getRef\":[64],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\",\"watchDisabled\"],\"options\":[\"watchOptions\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"],\"value\":[\"watchValue\"]}]]],[\"gov-attachments_3.cjs\",[[4,\"gov-attachments-item\",{\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagRemoveLabelledBy\":[1,\"wcag-remove-labelled-by\"],\"validateWcag\":[64]}],[4,\"gov-attachments\",{\"label\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}],[4,\"gov-form-message\",{\"variant\":[1],\"identifier\":[64]},null,{\"variant\":[\"validateVariant\"]}]]],[\"gov-backdrop.cjs\",[[0,\"gov-backdrop\",{\"inverse\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-button.cjs\",[[4,\"gov-button\",{\"variant\":[513],\"size\":[513],\"type\":[513],\"expanded\":[516],\"inverse\":[516],\"name\":[1],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"disabled\":[516],\"nativeType\":[1,\"native-type\"],\"href\":[1],\"target\":[1],\"download\":[4],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"loading\":[1],\"focusable\":[4],\"identifier\":[1],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagDescription\":[1,\"wcag-description\"],\"wcagDetails\":[1,\"wcag-details\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagHasPopup\":[1,\"wcag-has-popup\"],\"wcagPressed\":[4,\"wcag-pressed\"],\"wcagCurrent\":[1,\"wcag-current\"],\"setFocus\":[64],\"getTriggerRef\":[64],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"],\"type\":[\"validateType\"],\"size\":[\"validateSize\"],\"nativeType\":[\"validateNativeType\"]}]]]]"), options);
11
+ return index.bootstrapLazy(JSON.parse("[[\"gov-form-file.cjs\",[[4,\"gov-form-file\",{\"expanded\":[4],\"required\":[4],\"disabled\":[4],\"resetAfterPick\":[4,\"reset-after-pick\"],\"ignoreFileDuplicationCheck\":[4,\"ignore-file-duplication-check\"],\"displayAttachments\":[4,\"display-attachments\"],\"name\":[1],\"accept\":[1],\"multiple\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"identifier\":[1],\"invalid\":[4],\"errorSize\":[1,\"error-size\"],\"errorAccept\":[1,\"error-accept\"],\"attachmentsLabel\":[1,\"attachments-label\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagAttachmentsLabel\":[1,\"wcag-attachments-label\"],\"files\":[32],\"getRef\":[64],\"getAreaRef\":[64],\"reset\":[64],\"validateWcag\":[64]},null,{\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"]}]]],[\"gov-form-multi-select.cjs\",[[4,\"gov-form-multi-select\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"placeholder\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"hideSelectedList\":[4,\"hide-selected-list\"],\"required\":[4],\"disabled\":[4],\"invalid\":[4],\"success\":[4],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"valueState\":[32],\"selectedOptionsState\":[32],\"optionsState\":[32],\"setFocus\":[64],\"setValue\":[64],\"getRef\":[64],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\",\"watchDisabled\"],\"options\":[\"watchOptions\"],\"value\":[\"watchValue\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"],\"success\":[\"watchDisabled\"]}]]],[\"gov-modal.cjs\",[[4,\"gov-modal\",{\"open\":[1028],\"blockClose\":[4,\"block-close\"],\"blockBackdropClose\":[4,\"block-backdrop-close\"],\"blockButtonClose\":[4,\"block-button-close\"],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]},null,{\"labelTag\":[\"validateLabelTag\"],\"open\":[\"watchOpen\"]}]]],[\"gov-pagination.cjs\",[[0,\"gov-pagination\",{\"type\":[1],\"current\":[2],\"total\":[2],\"inverse\":[4],\"selectIdentifier\":[1,\"select-identifier\"],\"size\":[1],\"variant\":[1],\"pageSize\":[2,\"page-size\"],\"maxPages\":[2,\"max-pages\"],\"link\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagPageLabel\":[1,\"wcag-page-label\"],\"labelPrev\":[1,\"label-prev\"],\"labelStart\":[1,\"label-start\"],\"labelNext\":[1,\"label-next\"],\"labelEnd\":[1,\"label-end\"],\"pagination\":[32],\"validateWcag\":[64]},null,{\"type\":[\"validateType\"],\"size\":[\"validateSize\"],\"variant\":[\"validateVariant\"],\"current\":[\"recalculate\"],\"total\":[\"recalculate\"],\"pageSize\":[\"recalculate\"],\"maxPages\":[\"recalculate\"]}]]],[\"gov-prompt.cjs\",[[4,\"gov-prompt\",{\"open\":[1028],\"label\":[1],\"role\":[1],\"labelTag\":[1,\"label-tag\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagCloseLabelledBy\":[1,\"wcag-close-labelled-by\"],\"show\":[64],\"hide\":[64],\"validateWcag\":[64]},null,{\"labelTag\":[\"validateLabelTag\"],\"open\":[\"watchOpen\"]}]]],[\"gov-tabs.cjs\",[[4,\"gov-tabs\",{\"type\":[1],\"variant\":[1],\"orientation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagSelectLabel\":[1,\"wcag-select-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"controllers\":[32],\"focusIndex\":[32],\"compactControls\":[32],\"refresh\":[64],\"currentTab\":[64],\"setActiveTab\":[64],\"rerender\":[64],\"validateWcag\":[64]},null,{\"type\":[\"validateType\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-breadcrumbs.cjs\",[[4,\"gov-breadcrumbs\",{\"collapsible\":[4],\"isExpanded\":[4,\"is-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labeled-by\"],\"wcagToggleLabel\":[1,\"wcag-toggle-label\"],\"collapsed\":[32],\"toggleOption\":[32],\"validateWcag\":[64]}]]],[\"gov-infobar.cjs\",[[4,\"gov-infobar\",{\"headline\":[1],\"variant\":[1],\"role\":[1],\"inverse\":[4],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"wcagToggleLabel\":[1,\"wcag-toggle-label\"],\"closable\":[4],\"toggleContent\":[32],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"]}]]],[\"gov-loading.cjs\",[[4,\"gov-loading\"]]],[\"gov-side-nav-item.cjs\",[[4,\"gov-side-nav-item\",{\"inverse\":[4],\"compact\":[4],\"identifier\":[1],\"count\":[4],\"label\":[1],\"disabled\":[4],\"href\":[1],\"isExpanded\":[4,\"is-expanded\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]},null,{\"label\":[\"validateLabel\"]}]]],[\"gov-toast.cjs\",[[4,\"gov-toast\",{\"variant\":[1],\"gravity\":[1],\"position\":[1],\"type\":[1],\"time\":[2],\"closeLabel\":[1,\"close-label\"],\"wcagCloseLabel\":[1,\"wcag-close-label\"],\"destroy\":[64]},null,{\"variant\":[\"validateVariant\"]}]]],[\"gov-tooltip-content.cjs\",[[4,\"gov-tooltip-content\",{\"variant\":[1],\"size\":[1],\"persist\":[4],\"isVisible\":[1028,\"is-visible\"],\"parentId\":[1,\"parent-id\"]},null,{\"isVisible\":[\"visibleContent\"]}]]],[\"gov-accordion-item.cjs\",[[4,\"gov-accordion-item\",{\"variant\":[1],\"identifier\":[1],\"size\":[1],\"disabled\":[4],\"isExpanded\":[1028,\"is-expanded\"],\"isExpandedState\":[32],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]},null,{\"size\":[\"validateSize\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-card.cjs\",[[4,\"gov-card\",{\"promotion\":[4],\"label\":[1],\"collapsible\":[4],\"expanded\":[4],\"headlineTag\":[1,\"headline-tag\"],\"wcagTriggerLabel\":[1,\"wcag-trigger-label\"],\"wcagTriggerLabelledBy\":[1,\"wcag-trigger-labelled-by\"],\"isExpanded\":[32],\"open\":[64],\"close\":[64],\"validateWcag\":[64]},null,{\"headlineTag\":[\"validateHeadlineTag\"]}]]],[\"gov-form-checkbox.cjs\",[[4,\"gov-form-checkbox\",{\"value\":[1],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"noLabel\":[4,\"no-label\"],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\",\"watchDisabled\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"]}]]],[\"gov-tag.cjs\",[[4,\"gov-tag\",{\"inverse\":[4],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"size\":[513],\"variant\":[513]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\"]}]]],[\"gov-wizard-item.cjs\",[[4,\"gov-wizard-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"collapsible\":[4],\"annotation\":[1],\"label\":[1],\"disabled\":[4],\"isExpanded\":[1028,\"is-expanded\"],\"labelTag\":[1,\"label-tag\"],\"open\":[64],\"close\":[64],\"toggle\":[64],\"currentState\":[64]},null,{\"label\":[\"validateLabel\"],\"labelTag\":[\"validateTriggerTag\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-accordion.cjs\",[[4,\"gov-accordion\",{\"size\":[1],\"variant\":[1],\"noBorder\":[4,\"no-border\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-container.cjs\",[[4,\"gov-container\",{\"slottedChildren\":[64]}]]],[\"gov-control-group.cjs\",[[4,\"gov-control-group\",{\"variant\":[1],\"noBorder\":[4,\"no-border\"]},null,{\"variant\":[\"validateVariant\"]}]]],[\"gov-cookiebar.cjs\",[[4,\"gov-cookiebar\"]]],[\"gov-dropdown.cjs\",[[4,\"gov-dropdown\",{\"identifier\":[1],\"open\":[1028],\"position\":[1],\"getState\":[64],\"setOpen\":[64]}]]],[\"gov-empty.cjs\",[[4,\"gov-empty\"]]],[\"gov-error-code.cjs\",[[4,\"gov-error-code\"]]],[\"gov-form-checkbox-group.cjs\",[[4,\"gov-form-checkbox-group\",{\"gap\":[1],\"orientation\":[1],\"value\":[1025]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-control.cjs\",[[4,\"gov-form-control\",{\"gap\":[1],\"identifier\":[1],\"invalid\":[4],\"disabled\":[4],\"success\":[4],\"fieldset\":[4],\"size\":[1]}]]],[\"gov-form-group.cjs\",[[4,\"gov-form-group\",{\"gap\":[1],\"orientation\":[1]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-label.cjs\",[[4,\"gov-form-label\",{\"identifier\":[1],\"size\":[1],\"required\":[4],\"legend\":[4]}]]],[\"gov-form-password-power.cjs\",[[4,\"gov-form-password-power\",{\"power\":[514]}]]],[\"gov-form-radio.cjs\",[[4,\"gov-form-radio\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\",\"watchDisabled\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"]}]]],[\"gov-form-radio-group.cjs\",[[4,\"gov-form-radio-group\",{\"gap\":[1],\"orientation\":[1],\"value\":[1025]},null,{\"gap\":[\"validateGap\"],\"orientation\":[\"validateOrientation\"]}]]],[\"gov-form-search.cjs\",[[4,\"gov-form-search\",{\"variant\":[513]}]]],[\"gov-form-switch.cjs\",[[4,\"gov-form-switch\",{\"value\":[1],\"noLabel\":[4,\"no-label\"],\"checked\":[1540],\"required\":[4],\"disabled\":[4],\"name\":[1],\"size\":[1],\"identifier\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"getRef\":[64],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\",\"watchDisabled\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"]}]]],[\"gov-grid.cjs\",[[4,\"gov-grid\",{\"alignX\":[1,\"align-x\"],\"alignY\":[1,\"align-y\"]}]]],[\"gov-grid-item.cjs\",[[4,\"gov-grid-item\",{\"size\":[1],\"sizeSm\":[1,\"size-sm\"],\"sizeMd\":[1,\"size-md\"],\"sizeLg\":[1,\"size-lg\"],\"sizeXl\":[1,\"size-xl\"]}]]],[\"gov-layout.cjs\",[[4,\"gov-layout\",{\"type\":[1],\"variant\":[1],\"inverse\":[4]}]]],[\"gov-layout-column.cjs\",[[4,\"gov-layout-column\"]]],[\"gov-message.cjs\",[[4,\"gov-message\",{\"variant\":[1]},null,{\"variant\":[\"validateVariant\"]}]]],[\"gov-nav.cjs\",[[4,\"gov-nav\",{\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-nav-item.cjs\",[[4,\"gov-nav-item\",{\"href\":[1],\"isExpandedState\":[32]},null,{\"href\":[\"validateHref\"]}]]],[\"gov-side-nav.cjs\",[[4,\"gov-side-nav\",{\"inverse\":[4],\"compact\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-skeleton.cjs\",[[0,\"gov-skeleton\",{\"variant\":[1],\"count\":[2],\"shape\":[1],\"width\":[1],\"height\":[1],\"animation\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"],\"shape\":[\"validateShape\"],\"animation\":[\"validateAnimation\"]}]]],[\"gov-spacer.cjs\",[[0,\"gov-spacer\",{\"size\":[1],\"breakpoint\":[1]},null,{\"size\":[\"validateSize\"],\"breakpoint\":[\"validateBreakpoint\"]}]]],[\"gov-statsbar.cjs\",[[4,\"gov-statsbar\",{\"iconPosition\":[1,\"icon-position\"],\"variant\":[1]},null,{\"iconPosition\":[\"validateIconPosition\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-statsbar-item.cjs\",[[4,\"gov-statsbar-item\",{\"iconPosition\":[1,\"icon-position\"]},null,{\"iconPosition\":[\"validateIconPosition\"]}]]],[\"gov-stepper.cjs\",[[4,\"gov-stepper\",{\"size\":[1]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-stepper-item.cjs\",[[4,\"gov-stepper-item\",{\"variant\":[1],\"size\":[1],\"identifier\":[1],\"label\":[1],\"annotation\":[1],\"triggerTag\":[1,\"trigger-tag\"],\"isExpandedState\":[32],\"currentState\":[64]},null,{\"label\":[\"validateLabel\"],\"triggerTag\":[\"validateTriggerTag\"],\"variant\":[\"validateVariant\"]}]]],[\"gov-tabs-item.cjs\",[[4,\"gov-tabs-item\",{\"identifier\":[1],\"triggerIdentifier\":[1,\"trigger-identifier\"],\"label\":[513],\"disabled\":[516],\"default\":[4],\"isActive\":[32],\"getIdentifier\":[64],\"getTriggerIdentifier\":[64],\"getDisableState\":[64],\"setActiveStatus\":[64]},null,{\"label\":[\"rerenderParent\"],\"disabled\":[\"rerenderParent\"],\"default\":[\"rerenderParent\"]}]]],[\"gov-tile.cjs\",[[4,\"gov-tile\",{\"href\":[513],\"target\":[1],\"getTriggerRef\":[64]}]]],[\"gov-tiles.cjs\",[[4,\"gov-tiles\",{\"columns\":[2],\"noBorder\":[4,\"no-border\"]}]]],[\"gov-tooltip.cjs\",[[4,\"gov-tooltip\",{\"variant\":[1],\"size\":[1],\"position\":[1025],\"message\":[1],\"identifier\":[1],\"icon\":[516],\"persist\":[32],\"show\":[64],\"hide\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\"],\"position\":[\"validatePosition\"],\"message\":[\"rerenderMessage\"]}]]],[\"gov-wizard.cjs\",[[4,\"gov-wizard\",{\"size\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]},null,{\"size\":[\"validateSize\"]}]]],[\"gov-icon.cjs\",[[0,\"gov-icon\",{\"name\":[1],\"type\":[1],\"iconData\":[32],\"visible\":[32],\"error\":[32]},null,{\"name\":[\"loadIconPathData\"]}]]],[\"gov-form-input.cjs\",[[4,\"gov-form-input\",{\"value\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"name\":[1],\"multiline\":[4],\"rows\":[2],\"cols\":[2],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"minlength\":[2],\"maxlength\":[2],\"min\":[8],\"max\":[8],\"autocomplete\":[4],\"autocorrect\":[4],\"spellcheck\":[4],\"inputLang\":[1,\"input-lang\"],\"type\":[1],\"inputType\":[1,\"input-type\"],\"role\":[1],\"invalid\":[4],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagAutocomplete\":[1,\"wcag-autocomplete\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"focused\":[32],\"setFocus\":[64],\"setValue\":[64],\"clearValue\":[64],\"getRef\":[64],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\",\"watchDisabled\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"],\"type\":[\"watchDisabled\"]}]]],[\"gov-form-autocomplete.cjs\",[[4,\"gov-form-autocomplete\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"variant\":[1],\"success\":[4],\"size\":[1],\"nameKey\":[1,\"name-key\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"invalid\":[4],\"minlength\":[2],\"maxlength\":[2],\"throttleTime\":[2,\"throttle-time\"],\"messageEmpty\":[1,\"message-empty\"],\"messageLoading\":[1,\"message-loading\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"processing\":[32],\"arrowCounter\":[32],\"list\":[32],\"setFocus\":[64],\"setBlur\":[64],\"setOptions\":[64],\"clearValue\":[64],\"setProcessing\":[64],\"setSearchCallback\":[64],\"setTemplateResolver\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\"],\"options\":[\"watchOptions\"]}]]],[\"gov-chip.cjs\",[[4,\"gov-chip\",{\"inverse\":[4],\"disabled\":[4],\"href\":[1],\"target\":[1],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"size\":[1],\"tag\":[1],\"variant\":[1],\"focusable\":[4],\"identifier\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagSelected\":[4,\"wcag-selected\"],\"getTriggerRef\":[64],\"getTriggerIdentifier\":[64],\"setFocus\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\"]}]]],[\"gov-form-select.cjs\",[[4,\"gov-form-select\",{\"value\":[1537],\"options\":[1537],\"identifier\":[1],\"variant\":[1],\"size\":[1],\"name\":[1],\"required\":[4],\"success\":[4],\"disabled\":[4],\"invalid\":[4],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"focused\":[32],\"optionsState\":[32],\"setFocus\":[64],\"getRef\":[64],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"],\"size\":[\"validateSize\",\"watchDisabled\"],\"options\":[\"watchOptions\"],\"disabled\":[\"watchDisabled\"],\"invalid\":[\"watchDisabled\"],\"value\":[\"watchValue\"]}]]],[\"gov-attachments_3.cjs\",[[4,\"gov-attachments-item\",{\"wcagRemoveLabel\":[1,\"wcag-remove-label\"],\"wcagRemoveLabelledBy\":[1,\"wcag-remove-labelled-by\"],\"validateWcag\":[64]}],[4,\"gov-attachments\",{\"label\":[1],\"wcagLabel\":[1,\"wcag-label\"],\"validateWcag\":[64]}],[4,\"gov-form-message\",{\"variant\":[1],\"identifier\":[64]},null,{\"variant\":[\"validateVariant\"]}]]],[\"gov-backdrop.cjs\",[[0,\"gov-backdrop\",{\"inverse\":[4],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"validateWcag\":[64]}]]],[\"gov-button.cjs\",[[4,\"gov-button\",{\"variant\":[513],\"size\":[513],\"type\":[513],\"expanded\":[516],\"inverse\":[516],\"name\":[1],\"iconLeft\":[1,\"icon-left\"],\"iconRight\":[1,\"icon-right\"],\"disabled\":[516],\"nativeType\":[1,\"native-type\"],\"href\":[1],\"target\":[1],\"download\":[4],\"hreflang\":[1],\"referrerpolicy\":[1],\"rel\":[1],\"loading\":[1],\"focusable\":[4],\"identifier\":[1],\"wcagActiveDescendant\":[1,\"wcag-active-descendant\"],\"wcagControls\":[1,\"wcag-controls\"],\"wcagDescribedBy\":[1,\"wcag-described-by\"],\"wcagDescription\":[1,\"wcag-description\"],\"wcagDetails\":[1,\"wcag-details\"],\"wcagExpanded\":[4,\"wcag-expanded\"],\"wcagLabel\":[1,\"wcag-label\"],\"wcagLabelledBy\":[1,\"wcag-labelled-by\"],\"wcagOwns\":[1,\"wcag-owns\"],\"wcagHasPopup\":[1,\"wcag-has-popup\"],\"wcagPressed\":[4,\"wcag-pressed\"],\"wcagCurrent\":[1,\"wcag-current\"],\"setFocus\":[64],\"getTriggerRef\":[64],\"validateWcag\":[64]},null,{\"variant\":[\"validateVariant\"],\"type\":[\"validateType\"],\"size\":[\"validateSize\"],\"nativeType\":[\"validateNativeType\"]}]]]]"), options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -34,6 +34,7 @@ export class GovFormInput {
34
34
  this.autocomplete = undefined;
35
35
  this.autocorrect = undefined;
36
36
  this.spellcheck = undefined;
37
+ this.inputLang = undefined;
37
38
  this.type = undefined;
38
39
  this.inputType = "text";
39
40
  this.role = undefined;
@@ -79,9 +80,9 @@ export class GovFormInput {
79
80
  }
80
81
  render() {
81
82
  const Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT;
82
- return (h(Host, { key: '882de587fbcd5dbe29f9be53017319e27e473b82', class: FormInputClass.root, size: this.size, variant: this.variant, type: this.type }, this.h.hasSlot("prefix") && h("slot", { key: 'a6d9aeb552da3b0eca325437b61141ec11b53e7d', name: "prefix" }), h("span", { key: '6396e695da2afee201ca00bea17befc74122d92c', class: "element" }, this.h.hasSlot("left-icon") && h("slot", { key: '9cafd86301233ce4263586b50e04a7aba345bec1', name: "left-icon" }), this.h.hasSlot("right-icon") && !(this.success || this.invalid) && h("slot", { key: 'ab345343e1909354be7867d6044a0091c7965578', name: "right-icon" }), this.success && !this.multiline &&
83
- h("gov-icon", { key: 'cd69e417608ffd0c9b4fc2d8fe386f1b358ad897', slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
84
- h("gov-icon", { key: '48f5138303b2e06d16c1b03991818083b6fef8a6', slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), h(Tag, { key: '3d9f187d937186f0fd56a8caa31f9bcbd41dd0ce', type: this.inputType, disabled: this.disabled, id: this.identifier || this.inputId, name: this.name, onFocus: this.onFocusHandler.bind(this), onInput: this.onInputHandler.bind(this), onBlur: this.onBlurHandler.bind(this), onKeyUp: this.onKeyUpHandler.bind(this), onKeyDown: this.onKeyDownHandler.bind(this), ref: el => (this.inputRef = el), placeholder: this.placeholder, value: this.value, spellcheck: toBoolAttrIfDefined(this.spellcheck), readonly: toBoolAttrIfDefined(this.readonly), autocomplete: toOnOffAttrIfDefined(this.autocomplete), autocorrect: toOnOffAttrIfDefined(this.autocorrect), minlength: this.minlength, maxlength: this.maxlength, min: this.min, max: this.max, required: this.required, rows: this.rows, cols: this.cols, role: this.role, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns, "aria-expanded": toBoolAttrIfDefined(this.wcagExpanded), "aria-autocomplete": this.wcagAutocomplete })), this.h.hasSlot("sufix") && h("slot", { key: '14d40dac468acf1b158660fb7383ff4ae89024c1', name: "sufix" })));
83
+ return (h(Host, { key: '1d217855ba964b9c637373529e2b677fb09f8034', class: FormInputClass.root, size: this.size, variant: this.variant, type: this.type }, this.h.hasSlot("prefix") && h("slot", { key: '75b989d2f4b70cf43e9a5315fdb6eb56af832118', name: "prefix" }), h("span", { key: '39f063be627ad300abe364adfa4a32b79a879773', class: "element" }, this.h.hasSlot("left-icon") && h("slot", { key: '84da6d8d05274f5a9760b871ffb89dec870122f8', name: "left-icon" }), this.h.hasSlot("right-icon") && !(this.success || this.invalid) && h("slot", { key: 'b8ede08c703cc88e526593cb5aac4a868293543c', name: "right-icon" }), this.success && !this.multiline &&
84
+ h("gov-icon", { key: '1dad15f0bbab72fef2f2d596fb2ce27b097eb3a4', slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
85
+ h("gov-icon", { key: '9d8ed110a2640133ecc462c6b06f1f5496fb61f7', slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), h(Tag, { key: '62ac8ee0c14c5289c377685fabf535947a43f4c5', type: this.inputType, disabled: this.disabled, id: this.identifier || this.inputId, name: this.name, onFocus: this.onFocusHandler.bind(this), onInput: this.onInputHandler.bind(this), onBlur: this.onBlurHandler.bind(this), onKeyUp: this.onKeyUpHandler.bind(this), onKeyDown: this.onKeyDownHandler.bind(this), ref: el => (this.inputRef = el), placeholder: this.placeholder, value: this.value, spellcheck: toBoolAttrIfDefined(this.spellcheck), lang: this.inputLang, readonly: toBoolAttrIfDefined(this.readonly), autocomplete: toOnOffAttrIfDefined(this.autocomplete), autocorrect: toOnOffAttrIfDefined(this.autocorrect), minlength: this.minlength, maxlength: this.maxlength, min: this.min, max: this.max, required: this.required, rows: this.rows, cols: this.cols, role: this.role, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns, "aria-expanded": toBoolAttrIfDefined(this.wcagExpanded), "aria-autocomplete": this.wcagAutocomplete })), this.h.hasSlot("sufix") && h("slot", { key: '9746bac959c672b37d1c5529cbbe0da13ecf4ce8', name: "sufix" })));
85
86
  }
86
87
  onFocusHandler(e) {
87
88
  e.stopPropagation();
@@ -529,6 +530,23 @@ export class GovFormInput {
529
530
  "attribute": "spellcheck",
530
531
  "reflect": false
531
532
  },
533
+ "inputLang": {
534
+ "type": "string",
535
+ "mutable": false,
536
+ "complexType": {
537
+ "original": "string",
538
+ "resolved": "string",
539
+ "references": {}
540
+ },
541
+ "required": false,
542
+ "optional": false,
543
+ "docs": {
544
+ "tags": [],
545
+ "text": "Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang"
546
+ },
547
+ "attribute": "input-lang",
548
+ "reflect": false
549
+ },
532
550
  "type": {
533
551
  "type": "string",
534
552
  "mutable": false,
@@ -547,7 +565,7 @@ export class GovFormInput {
547
565
  "optional": true,
548
566
  "docs": {
549
567
  "tags": [],
550
- "text": "Defineds the visual style of input"
568
+ "text": "Defined the visual style of input"
551
569
  },
552
570
  "attribute": "type",
553
571
  "reflect": false
@@ -1 +1 @@
1
- {"version":3,"file":"gov-form-input.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/input/gov-form-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AAC1G,OAAO,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAA;AAEjD,OAAO,EAAC,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAC,MAAM,+BAA+B,CAAA;AAE5G,OAAO,EAAC,uBAAuB,EAAC,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAAC,oBAAoB,EAAE,eAAe,EAAC,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AACpD,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAA;AAC1C,OAAO,EACN,cAAc,EACd,cAAc,EAEd,iBAAiB,EAGjB,IAAI,GACJ,MAAM,aAAa,CAAA;AAIpB,IAAK,IAGJ;AAHD,WAAK,IAAI;IACR,uBAAe,CAAA;IACf,6BAAqB,CAAA;AACtB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;AAMD,MAAM,OAAO,YAAY;IAMxB;;;uBAkBkD,WAAW;;oBAQhB,GAAG;;;;;wBAqBX,KAAK;w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I,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,CAAA;IAChG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {validateWcagLabelFor, validateWcagRef} from \"../../../helpers/Validate/wcag\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {delay} from \"../../../utils/utils\"\nimport {\n\tFormInputClass,\n\tFormInputSizes,\n\tFormInputSizesType,\n\tFormInputVariants,\n\tFormInputVariantType,\n\tInputType,\n\tType,\n} from \"./constants\"\nimport {FormInputEvent} from \"./gov-form-input.types\"\nimport {Nullable} from \"../../../types/interfaces\"\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n\tstyleUrl: \"gov-form-input.scss\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: FormInputVariantType = \"secondary\"\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck\n\t */\n\t@Prop() readonly spellcheck: boolean\n\t/**\n\t * Defineds the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop({attribute: \"input-type\"}) readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<string>\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: \"wcag-described-by\"}) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({attribute: \"wcag-labelled-by\"}) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: \"wcag-owns\"}) readonly wcagOwns: string\n\t/**\n\t * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value.\n\t */\n\t@Prop({attribute: \"wcag-autocomplete\"}) readonly wcagAutocomplete: string\n\t/**\n\t * Attribute is set on an element to indicate if a control is expanded or collapsed\n\t */\n\t@Prop({attribute: \"wcag-expanded\"}) readonly wcagExpanded: boolean\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-input\"}) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keyup\"}) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-hydrated\"}) govHydrated: EventEmitter<void>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keydown\"}) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormInputVariants, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"type\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.passControlAttrs()\n\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.govHydrated.emit();\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} variant={this.variant} type={this.type}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\"/>}\n\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && !(this.success || this.invalid) && <slot name=\"right-icon\"/>}\n\n\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\tspellcheck={toBoolAttrIfDefined(this.spellcheck)}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\t\taria-autocomplete={this.wcagAutocomplete}\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, \"wcag-owns\", FormInputClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root)\n\t}\n}\n"]}
1
+ {"version":3,"file":"gov-form-input.js","sourceRoot":"","sources":["../../../../../../../src/components/gov-form/input/gov-form-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,eAAe,CAAA;AAC1G,OAAO,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAA;AAEjD,OAAO,EAAC,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAC,MAAM,+BAA+B,CAAA;AAE5G,OAAO,EAAC,uBAAuB,EAAC,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAAC,oBAAoB,EAAE,eAAe,EAAC,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAA;AACpD,OAAO,EAAC,KAAK,EAAC,MAAM,sBAAsB,CAAA;AAC1C,OAAO,EACN,cAAc,EACd,cAAc,EAEd,iBAAiB,EAGjB,IAAI,GACJ,MAAM,aAAa,CAAA;AAIpB,IAAK,IAGJ;AAHD,WAAK,IAAI;IACR,uBAAe,CAAA;IACf,6BAAqB,CAAA;AACtB,CAAC,EAHI,IAAI,KAA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["import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {govForm} from \"../../../helpers/Dom/form\"\nimport {GovForm} from \"../../../helpers/Dom/form.types\"\nimport {govHost, toBoolAttr, toBoolAttrIfDefined, toOnOffAttrIfDefined} from \"../../../helpers/Dom/template\"\nimport {GovHost} from \"../../../helpers/Dom/template.types\"\nimport {canValidateWcagOnRender} from \"../../../helpers/Dom/win\"\nimport {validateProp} from \"../../../helpers/Validate/props\"\nimport {validateWcagLabelFor, validateWcagRef} from \"../../../helpers/Validate/wcag\"\nimport {createID} from \"../../../utils/string.utils\"\nimport {delay} from \"../../../utils/utils\"\nimport {\n\tFormInputClass,\n\tFormInputSizes,\n\tFormInputSizesType,\n\tFormInputVariants,\n\tFormInputVariantType,\n\tInputType,\n\tType,\n} from \"./constants\"\nimport {FormInputEvent} from \"./gov-form-input.types\"\nimport {Nullable} from \"../../../types/interfaces\"\n\nenum Tags {\n\tINPUT = \"input\",\n\tTEXTAREA = \"textarea\",\n}\n\n@Component({\n\ttag: \"gov-form-input\",\n\tstyleUrl: \"gov-form-input.scss\",\n})\nexport class GovFormInput {\n\tprivate f: GovForm\n\tprivate readonly h: GovHost\n\tprivate inputRef?: HTMLInputElement\n\tprivate readonly inputId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.inputId = createID(\"GovInput\")\n\t\tthis.f = govForm(this.h)\n\t}\n\n\t@Element() host: HTMLGovFormInputElement\n\t/**\n\t * Value of input\n\t */\n\t@Prop({reflect: true, mutable: true}) value: string\n\t/**\n\t * Custom input identifier.\n\t */\n\t@Prop({attribute: \"identifier\"}) readonly identifier: string\n\t/**\n\t * Style variation of the form input.\n\t */\n\t@Prop() readonly variant?: FormInputVariantType = \"secondary\"\n\t/**\n\t * Indicates the entered value of child form element does conform to the format expected by the application.\n\t */\n\t@Prop() readonly success: boolean\n\t/**\n\t * Input’s size.\n\t */\n\t@Prop() readonly size?: FormInputSizesType = \"m\"\n\t/**\n\t * Name of the input.\n\t */\n\t@Prop() readonly name: string\n\t/**\n\t * Generates a texarea for the possibility of multiple lines\n\t */\n\t@Prop() readonly multiline: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows\n\t */\n\t@Prop() readonly rows: number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols\n\t */\n\t@Prop() readonly cols: number\n\t/**\n\t * Set whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them.\n\t * When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.\n\t */\n\t@Prop() readonly required: boolean = false\n\t/**\n\t * Makes the input component disabled.\n\t * This prevents users from being able to interact with the select, and conveys its inactive state to assistive technologies.\n\t */\n\t@Prop() readonly disabled: boolean = false\n\t/**\n\t * Text that appears in the form control when it has no value set\n\t */\n\t@Prop() readonly placeholder: string\n\t/**\n\t * The value is not editable\n\t */\n\t@Prop() readonly readonly: boolean\n\t/**\n\t * Minimum length (number of characters) of value\n\t */\n\t@Prop() readonly minlength: number\n\t/**\n\t * Maximum length (number of characters) of value\n\t */\n\t@Prop() readonly maxlength: number\n\t/**\n\t * Minimum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly min?: string | number\n\t/**\n\t * Maximum value that is acceptable and valid for the input containing the attribute\n\t */\n\t@Prop() readonly max?: string | number\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete\n\t */\n\t@Prop() readonly autocomplete: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect\n\t */\n\t@Prop() readonly autocorrect: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck\n\t */\n\t@Prop() readonly spellcheck: boolean\n\t/**\n\t * Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang\n\t */\n\t@Prop({attribute: \"input-lang\"}) readonly inputLang: string\n\t/**\n\t * Defined the visual style of input\n\t */\n\t@Prop() readonly type?: Type\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n\t */\n\t@Prop({attribute: \"input-type\"}) readonly inputType: InputType = \"text\"\n\t/**\n\t * Same as original parameter\n\t * @link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/input_role\n\t */\n\t@Prop() readonly role: Nullable<string>\n\t/**\n\t * Indicates the entered value does not conform to the format expected by the application.\n\t */\n\t@Prop() readonly invalid: boolean\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: \"wcag-described-by\"}) readonly wcagDescribedBy: string\n\t/**\n\t * Indicates the id of a component that labels the input.\n\t */\n\t@Prop({attribute: \"wcag-labelled-by\"}) readonly wcagLabelledBy: string\n\t/**\n\t * Indicates the id of a component that describes the input.\n\t */\n\t@Prop({attribute: \"wcag-owns\"}) readonly wcagOwns: string\n\t/**\n\t * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value.\n\t */\n\t@Prop({attribute: \"wcag-autocomplete\"}) readonly wcagAutocomplete: string\n\t/**\n\t * Attribute is set on an element to indicate if a control is expanded or collapsed\n\t */\n\t@Prop({attribute: \"wcag-expanded\"}) readonly wcagExpanded: boolean\n\t/**\n\t * Emitted when the input has focus.\n\t */\n\t@Event({eventName: \"gov-focus\"}) govFocus: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input loses focus.\n\t */\n\t@Event({eventName: \"gov-blur\"}) govBlur: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-input\"}) govInput: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keyup\"}) govKeyUp: EventEmitter<FormInputEvent>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-hydrated\"}) govHydrated: EventEmitter<void>\n\t/**\n\t * Emitted when the input change value.\n\t */\n\t@Event({eventName: \"gov-keydown\"}) govKeyDown: EventEmitter<FormInputEvent>\n\t@State() focused: boolean\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(FormInputVariants, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(FormInputSizes, newValue, FormInputClass.root)\n\t}\n\n\t@Watch(\"disabled\")\n\t@Watch(\"invalid\")\n\t@Watch(\"type\")\n\t@Watch(\"size\")\n\twatchDisabled(): void {\n\t\tthis.passControlAttrs()\n\t}\n\n\tprivate passControlAttrs() {\n\t\tthis.f.passAttrToControl(\"size\", this.size)\n\t\tthis.f.passAttrToControl(\"invalid\", toBoolAttr(this.invalid))\n\t\tthis.f.passAttrToControl(\"type\", this.multiline ? Tags.TEXTAREA : Tags.INPUT)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.validateVariant(this.variant)\n\t\tthis.validateSize(this.size)\n\t\tthis.passControlAttrs()\n\n\t\tthis.f.passAttrToLabel(\"required\", String(this.required))\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis.govHydrated.emit();\n\t}\n\n\trender() {\n\t\tconst Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT\n\n\t\treturn (\n\t\t\t<Host class={FormInputClass.root} size={this.size} variant={this.variant} type={this.type}>\n\t\t\t\t{this.h.hasSlot(\"prefix\") && <slot name=\"prefix\"></slot>}\n\t\t\t\t<span class=\"element\">\n\t\t\t\t\t{this.h.hasSlot(\"left-icon\") && <slot name=\"left-icon\"/>}\n\n\t\t\t\t\t{this.h.hasSlot(\"right-icon\") && !(this.success || this.invalid) && <slot name=\"right-icon\"/>}\n\n\t\t\t\t\t{this.success && !this.multiline &&\n\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"check-lg\"></gov-icon>}\n\t\t\t\t\t{this.invalid && !this.multiline &&\n\t\t\t\t\t\t<gov-icon slot=\"right-icon\" class=\"icon-validation\" name=\"exclamation-lg\"></gov-icon>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\ttype={this.inputType}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tid={this.identifier || this.inputId}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\tonFocus={this.onFocusHandler.bind(this)}\n\t\t\t\t\t\tonInput={this.onInputHandler.bind(this)}\n\t\t\t\t\t\tonBlur={this.onBlurHandler.bind(this)}\n\t\t\t\t\t\tonKeyUp={this.onKeyUpHandler.bind(this)}\n\t\t\t\t\t\tonKeyDown={this.onKeyDownHandler.bind(this)}\n\t\t\t\t\t\tref={el => (this.inputRef = el as HTMLInputElement)}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\tvalue={this.value}\n\t\t\t\t\t\tspellcheck={toBoolAttrIfDefined(this.spellcheck)}\n\t\t\t\t\t\tlang={this.inputLang}\n\t\t\t\t\t\treadonly={toBoolAttrIfDefined(this.readonly)}\n\t\t\t\t\t\tautocomplete={toOnOffAttrIfDefined(this.autocomplete)}\n\t\t\t\t\t\tautocorrect={toOnOffAttrIfDefined(this.autocorrect)}\n\t\t\t\t\t\tminlength={this.minlength}\n\t\t\t\t\t\tmaxlength={this.maxlength}\n\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\trows={this.rows}\n\t\t\t\t\t\tcols={this.cols}\n\t\t\t\t\t\trole={this.role}\n\t\t\t\t\t\taria-required={toBoolAttrIfDefined(this.required)}\n\t\t\t\t\t\taria-invalid={toBoolAttrIfDefined(this.invalid)}\n\t\t\t\t\t\taria-disabled={toBoolAttrIfDefined(this.disabled)}\n\t\t\t\t\t\taria-describedby={this.wcagDescribedBy}\n\t\t\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\t\t\taria-owns={this.wcagOwns}\n\t\t\t\t\t\taria-expanded={toBoolAttrIfDefined(this.wcagExpanded)}\n\t\t\t\t\t\taria-autocomplete={this.wcagAutocomplete}\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t\t{this.h.hasSlot(\"sufix\") && <slot name=\"sufix\"></slot>}\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onFocusHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = true\n\t\tthis.govFocus.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onBlurHandler(e: FocusEvent) {\n\t\te.stopPropagation()\n\t\tthis.focused = false\n\t\tthis.govBlur.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyUpHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyUp.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onKeyDownHandler(e: KeyboardEvent) {\n\t\te.stopPropagation()\n\t\tthis.govKeyDown.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\tprivate onInputHandler(e: InputEvent) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\te.stopPropagation()\n\t\tthis.govInput.emit({\n\t\t\tcomponent: FormInputClass.root,\n\t\t\tvalue: this.value,\n\t\t\toriginalEvent: e,\n\t\t})\n\t}\n\n\t/**\n\t * Returns the current state of the component\n\t */\n\t@Method()\n\tasync setFocus(options?: FocusOptions): Promise<void> {\n\t\treturn this.inputRef.focus(options)\n\t}\n\n\t/**\n\t * Sets the ordered value of the element\n\t */\n\t@Method()\n\tasync setValue(value: string): Promise<void> {\n\t\tthis.value = value\n\t}\n\n\t/**\n\t * Clears input value\n\t */\n\t@Method()\n\tasync clearValue(): Promise<void> {\n\t\tthis.value = \"\"\n\t\tthis.inputRef.value = \"\"\n\t}\n\n\t/**\n\t * Returns an instance of the native html input element\n\t */\n\t@Method()\n\tasync getRef(): Promise<HTMLInputElement> {\n\t\treturn this.inputRef\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagRef(this.wcagDescribedBy, \"wcag-described-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagLabelledBy, \"wcag-labelled-by\", FormInputClass.root)\n\t\tvalidateWcagRef(this.wcagOwns, \"wcag-owns\", FormInputClass.root)\n\t\tvalidateWcagLabelFor(this.identifier || this.inputId, this.wcagLabelledBy, FormInputClass.root)\n\t}\n}\n"]}