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

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 (112) 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/gov-tooltip.cjs.entry.js +6 -4
  12. package/dist/cjs/gov-tooltip.cjs.entry.js.map +1 -1
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/collection/components/gov-form/input/gov-form-input.js +22 -4
  15. package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
  16. package/dist/collection/components/gov-pagination/gov-pagination.js +20 -1
  17. package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
  18. package/dist/collection/components/gov-tabs/gov-tabs-item.js +20 -2
  19. package/dist/collection/components/gov-tabs/gov-tabs-item.js.map +1 -1
  20. package/dist/collection/components/gov-tabs/gov-tabs.js +52 -43
  21. package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
  22. package/dist/collection/components/gov-tooltip/gov-tooltip.js +6 -4
  23. package/dist/collection/components/gov-tooltip/gov-tooltip.js.map +1 -1
  24. package/dist/components/gov-accordion-item.js +1 -1
  25. package/dist/components/gov-attachments-item.js +1 -1
  26. package/dist/components/gov-breadcrumbs.js +1 -1
  27. package/dist/components/gov-button.js +1 -1
  28. package/dist/components/gov-card.js +1 -1
  29. package/dist/components/gov-chip.js +1 -1
  30. package/dist/components/gov-form-autocomplete.js +1 -1
  31. package/dist/components/gov-form-checkbox.js +1 -1
  32. package/dist/components/gov-form-file.js +1 -1
  33. package/dist/components/gov-form-input.js +1 -1
  34. package/dist/components/gov-form-multi-select.js +1 -1
  35. package/dist/components/gov-form-select.js +1 -1
  36. package/dist/components/gov-icon.js +1 -1
  37. package/dist/components/gov-infobar.js +1 -1
  38. package/dist/components/gov-loading.js +1 -1
  39. package/dist/components/gov-modal.js +1 -1
  40. package/dist/components/gov-pagination.js +1 -1
  41. package/dist/components/gov-pagination.js.map +1 -1
  42. package/dist/components/gov-prompt.js +1 -1
  43. package/dist/components/gov-side-nav-item.js +1 -1
  44. package/dist/components/gov-tabs-item.js +1 -1
  45. package/dist/components/gov-tabs-item.js.map +1 -1
  46. package/dist/components/gov-tabs.js +1 -1
  47. package/dist/components/gov-tabs.js.map +1 -1
  48. package/dist/components/gov-tag.js +1 -1
  49. package/dist/components/gov-toast.js +1 -1
  50. package/dist/components/gov-tooltip-content.js +1 -1
  51. package/dist/components/gov-tooltip.js +1 -1
  52. package/dist/components/gov-tooltip.js.map +1 -1
  53. package/dist/components/gov-wizard-item.js +1 -1
  54. package/dist/components/{p-6b70bb05.js → p-206c135b.js} +2 -2
  55. package/dist/components/p-206c135b.js.map +1 -0
  56. package/dist/components/{p-44f0bc16.js → p-3b224410.js} +2 -2
  57. package/dist/components/{p-93748f78.js → p-65aa0e09.js} +2 -2
  58. package/dist/components/{p-4fa21d88.js → p-a2604cc2.js} +2 -2
  59. package/dist/components/{p-f5db4029.js → p-aae934b8.js} +2 -2
  60. package/dist/components/{p-24033114.js → p-b322d172.js} +2 -2
  61. package/dist/components/{p-659a5e9b.js → p-da84987f.js} +2 -2
  62. package/dist/core/core.esm.js +1 -1
  63. package/dist/core/core.esm.js.map +1 -1
  64. package/dist/core/{p-7b210966.entry.js → p-0d99a3d8.entry.js} +2 -2
  65. package/dist/core/p-0d99a3d8.entry.js.map +1 -0
  66. package/dist/core/p-31a7316b.entry.js +2 -0
  67. package/dist/core/p-31a7316b.entry.js.map +1 -0
  68. package/dist/core/p-56d42f3e.entry.js +2 -0
  69. package/dist/core/p-56d42f3e.entry.js.map +1 -0
  70. package/dist/core/{p-ea506584.entry.js → p-595737c1.entry.js} +2 -2
  71. package/dist/core/p-618df4db.entry.js +2 -0
  72. package/dist/core/p-618df4db.entry.js.map +1 -0
  73. package/dist/core/{p-6def30bc.entry.js → p-aa9b5731.entry.js} +2 -2
  74. package/dist/core/p-aa9b5731.entry.js.map +1 -0
  75. package/dist/esm/core.js +1 -1
  76. package/dist/esm/gov-form-input.entry.js +4 -3
  77. package/dist/esm/gov-form-input.entry.js.map +1 -1
  78. package/dist/esm/gov-icon.entry.js +1 -1
  79. package/dist/esm/gov-pagination.entry.js +3 -1
  80. package/dist/esm/gov-pagination.entry.js.map +1 -1
  81. package/dist/esm/gov-tabs-item.entry.js +13 -2
  82. package/dist/esm/gov-tabs-item.entry.js.map +1 -1
  83. package/dist/esm/gov-tabs.entry.js +34 -42
  84. package/dist/esm/gov-tabs.entry.js.map +1 -1
  85. package/dist/esm/gov-tooltip.entry.js +6 -4
  86. package/dist/esm/gov-tooltip.entry.js.map +1 -1
  87. package/dist/esm/loader.js +1 -1
  88. package/dist/hydrate/index.js +62 -51
  89. package/dist/hydrate/index.mjs +62 -51
  90. package/dist/types/components/gov-form/input/gov-form-input.d.ts +5 -1
  91. package/dist/types/components/gov-pagination/gov-pagination.d.ts +5 -0
  92. package/dist/types/components/gov-tabs/gov-tabs-item.d.ts +1 -0
  93. package/dist/types/components/gov-tabs/gov-tabs.d.ts +6 -4
  94. package/dist/types/components/gov-tooltip/gov-tooltip.d.ts +1 -0
  95. package/dist/types/components.d.ts +22 -2
  96. package/package.json +1 -1
  97. package/dist/components/p-6b70bb05.js.map +0 -1
  98. package/dist/core/p-24e32e0f.entry.js +0 -2
  99. package/dist/core/p-24e32e0f.entry.js.map +0 -1
  100. package/dist/core/p-6def30bc.entry.js.map +0 -1
  101. package/dist/core/p-7a0b3094.entry.js +0 -2
  102. package/dist/core/p-7a0b3094.entry.js.map +0 -1
  103. package/dist/core/p-7b210966.entry.js.map +0 -1
  104. package/dist/core/p-9ae7429a.entry.js +0 -2
  105. package/dist/core/p-9ae7429a.entry.js.map +0 -1
  106. /package/dist/components/{p-44f0bc16.js.map → p-3b224410.js.map} +0 -0
  107. /package/dist/components/{p-93748f78.js.map → p-65aa0e09.js.map} +0 -0
  108. /package/dist/components/{p-4fa21d88.js.map → p-a2604cc2.js.map} +0 -0
  109. /package/dist/components/{p-f5db4029.js.map → p-aae934b8.js.map} +0 -0
  110. /package/dist/components/{p-24033114.js.map → p-b322d172.js.map} +0 -0
  111. /package/dist/components/{p-659a5e9b.js.map → p-da84987f.js.map} +0 -0
  112. /package/dist/core/{p-ea506584.entry.js.map → p-595737c1.entry.js.map} +0 -0
@@ -4873,6 +4873,7 @@ class GovFormInput {
4873
4873
  this.autocomplete = undefined;
4874
4874
  this.autocorrect = undefined;
4875
4875
  this.spellcheck = undefined;
4876
+ this.inputLang = undefined;
4876
4877
  this.type = undefined;
4877
4878
  this.inputType = "text";
4878
4879
  this.role = undefined;
@@ -4918,9 +4919,9 @@ class GovFormInput {
4918
4919
  }
4919
4920
  render() {
4920
4921
  const Tag = this.multiline ? Tags$1.TEXTAREA : Tags$1.INPUT;
4921
- return (hAsync(Host, { key: '882de587fbcd5dbe29f9be53017319e27e473b82', class: FormInputClass.root, size: this.size, variant: this.variant, type: this.type }, this.h.hasSlot("prefix") && hAsync("slot", { key: 'a6d9aeb552da3b0eca325437b61141ec11b53e7d', name: "prefix" }), hAsync("span", { key: '6396e695da2afee201ca00bea17befc74122d92c', class: "element" }, this.h.hasSlot("left-icon") && hAsync("slot", { key: '9cafd86301233ce4263586b50e04a7aba345bec1', name: "left-icon" }), this.h.hasSlot("right-icon") && !(this.success || this.invalid) && hAsync("slot", { key: 'ab345343e1909354be7867d6044a0091c7965578', name: "right-icon" }), this.success && !this.multiline &&
4922
- hAsync("gov-icon", { key: 'cd69e417608ffd0c9b4fc2d8fe386f1b358ad897', slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
4923
- hAsync("gov-icon", { key: '48f5138303b2e06d16c1b03991818083b6fef8a6', slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), hAsync(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") && hAsync("slot", { key: '14d40dac468acf1b158660fb7383ff4ae89024c1', name: "sufix" })));
4922
+ return (hAsync(Host, { key: '1d217855ba964b9c637373529e2b677fb09f8034', class: FormInputClass.root, size: this.size, variant: this.variant, type: this.type }, this.h.hasSlot("prefix") && hAsync("slot", { key: '75b989d2f4b70cf43e9a5315fdb6eb56af832118', name: "prefix" }), hAsync("span", { key: '39f063be627ad300abe364adfa4a32b79a879773', class: "element" }, this.h.hasSlot("left-icon") && hAsync("slot", { key: '84da6d8d05274f5a9760b871ffb89dec870122f8', name: "left-icon" }), this.h.hasSlot("right-icon") && !(this.success || this.invalid) && hAsync("slot", { key: 'b8ede08c703cc88e526593cb5aac4a868293543c', name: "right-icon" }), this.success && !this.multiline &&
4923
+ hAsync("gov-icon", { key: '1dad15f0bbab72fef2f2d596fb2ce27b097eb3a4', slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
4924
+ hAsync("gov-icon", { key: '9d8ed110a2640133ecc462c6b06f1f5496fb61f7', slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), hAsync(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") && hAsync("slot", { key: '9746bac959c672b37d1c5529cbbe0da13ecf4ce8', name: "sufix" })));
4924
4925
  }
4925
4926
  onFocusHandler(e) {
4926
4927
  e.stopPropagation();
@@ -5032,6 +5033,7 @@ class GovFormInput {
5032
5033
  "autocomplete": [4],
5033
5034
  "autocorrect": [4],
5034
5035
  "spellcheck": [4],
5036
+ "inputLang": [1, "input-lang"],
5035
5037
  "type": [1],
5036
5038
  "inputType": [1, "input-type"],
5037
5039
  "role": [1],
@@ -6690,6 +6692,7 @@ class GovPagination {
6690
6692
  this.current = 1;
6691
6693
  this.total = 0;
6692
6694
  this.inverse = undefined;
6695
+ this.selectIdentifier = undefined;
6693
6696
  this.size = "m";
6694
6697
  this.variant = "primary";
6695
6698
  this.pageSize = 10;
@@ -6706,6 +6709,7 @@ class GovPagination {
6706
6709
  this.pagination = undefined;
6707
6710
  this.h = govHost(this.host);
6708
6711
  this.pageSelectId = createID("GovPageSelect");
6712
+ this.selectId = createID("GovSelect");
6709
6713
  }
6710
6714
  validateType(newValue) {
6711
6715
  validateProp(PaginationTypes, newValue, PaginationClass.root);
@@ -6761,7 +6765,7 @@ class GovPagination {
6761
6765
  const ariaCurrent = toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined);
6762
6766
  return (hAsync("gov-button", { href: this.prepareLinkUrl(page), variant: this.variant, size: this.size, type: "base", disabled: isDisabled, "on-gov-click": (e) => this.onClickHandler(e, page), "wcag-label": description ? description : page > -1 ? this.wcagPageLabel + " " + page : undefined, "wcag-current": ariaCurrent, class: PaginationClass.inner }, content));
6763
6767
  };
6764
- return (hAsync(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, hAsync("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, hAsync("ul", { class: PaginationClass.list }, hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }), this.labelStart)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }), this.labelPrev)), this.type == "select" ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, "wcag-labelled-by": this.pageSelectId, "on-gov-change": this.onSelectHandler.bind(this) }, createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (hAsync(Fragment, null, this.pagination.pages.map(page => (hAsync("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page, '')))), this.pagination.totalPages ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, "wcag-labelled-by": this.pageSelectId, ref: el => (this.spreadSelectRef = el), "on-gov-change": this.onSelectHandler.bind(this) }, hAsync("option", { selected: true, hidden: true }, "..."), createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: false }, page))))))) : null)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }), this.labelNext)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" }), this.labelEnd))))));
6768
+ return (hAsync(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, hAsync("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, hAsync("ul", { class: PaginationClass.list }, hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }), this.labelStart)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }), this.labelPrev)), this.type == "select" ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, identifier: this.selectIdentifier || this.selectId, "wcag-labelled-by": this.pageSelectId, "on-gov-change": this.onSelectHandler.bind(this) }, createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (hAsync(Fragment, null, this.pagination.pages.map(page => (hAsync("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page, '')))), this.pagination.totalPages ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, identifier: this.selectIdentifier || this.selectId, "wcag-labelled-by": this.pageSelectId, ref: el => (this.spreadSelectRef = el), "on-gov-change": this.onSelectHandler.bind(this) }, hAsync("option", { selected: true, hidden: true }, "..."), createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: false }, page))))))) : null)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }), this.labelNext)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" }), this.labelEnd))))));
6765
6769
  }
6766
6770
  onClickHandler(e, page) {
6767
6771
  e.stopPropagation();
@@ -6815,6 +6819,7 @@ class GovPagination {
6815
6819
  "current": [2],
6816
6820
  "total": [2],
6817
6821
  "inverse": [4],
6822
+ "selectIdentifier": [1, "select-identifier"],
6818
6823
  "size": [1],
6819
6824
  "variant": [1],
6820
6825
  "pageSize": [2, "page-size"],
@@ -7560,7 +7565,7 @@ class GovTabs {
7560
7565
  registerInstance(this, hostRef);
7561
7566
  this.govChange = createEvent(this, "gov-change", 7);
7562
7567
  this.triggerRefs = {};
7563
- this.controller = [];
7568
+ this.controllers = [];
7564
7569
  this.focusIndex = 0;
7565
7570
  this.compactControls = false;
7566
7571
  this.type = "text";
@@ -7579,17 +7584,16 @@ class GovTabs {
7579
7584
  validateProp(TabVariants, newValue, TabsClass.root);
7580
7585
  }
7581
7586
  componentWillLoad() {
7582
- this.prepareDataSource();
7587
+ this.prepareControllers();
7583
7588
  }
7584
7589
  async componentDidRender() {
7585
7590
  if (canValidateWcagOnRender()) {
7586
7591
  await delay(500);
7587
7592
  await this.validateWcag();
7588
7593
  }
7589
- this.resizeObserver();
7590
7594
  }
7591
- prepareDataSource() {
7592
- this.controller = [];
7595
+ prepareControllers() {
7596
+ this.controllers = [];
7593
7597
  const promises = [];
7594
7598
  this.host.querySelectorAll(TabsItemClass.root).forEach((tab) => {
7595
7599
  const controlItem = Promise.all([
@@ -7611,49 +7615,36 @@ class GovTabs {
7611
7615
  promises.push(controlItem);
7612
7616
  });
7613
7617
  Promise.all(promises).then(controllers => {
7614
- let defaultTab = controllers.findIndex(controller => controller.default);
7615
- if (defaultTab === -1)
7616
- defaultTab = 0;
7617
- this.focusIndex = defaultTab;
7618
- controllers[defaultTab].active = true;
7619
- this.controller = [...controllers];
7618
+ let defaultTabIndex = controllers.findIndex(controller => controller.default);
7619
+ if (defaultTabIndex === -1)
7620
+ defaultTabIndex = 0;
7621
+ this.focusIndex = defaultTabIndex;
7622
+ controllers[defaultTabIndex].active = true;
7623
+ this.controllers = [...controllers];
7620
7624
  this.reRender();
7621
7625
  });
7622
7626
  }
7623
7627
  setActiveByIdentifier(identifier) {
7624
7628
  const temp = [];
7625
- this.controller.map(item => {
7629
+ this.controllers.map(item => {
7626
7630
  item.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier;
7627
7631
  temp.push(item);
7628
7632
  });
7629
- this.controller = [...temp];
7633
+ this.controllers = [...temp];
7630
7634
  }
7631
7635
  reRender() {
7632
- this.controller.map(control => {
7633
- control.element.setActiveStatus(control.active);
7636
+ this.controllers.map(control => {
7637
+ control.element.setActiveStatus(control.active).catch();
7634
7638
  });
7635
7639
  }
7636
- /*
7637
- private evaluateControls() {
7638
- this.compactControls = false
7639
- let sumOfWidth = this.tabsRef.querySelector("ul").offsetWidth
7640
- this.compactControls = this.tabsRef.offsetWidth < sumOfWidth
7641
- }
7642
- */
7643
- resizeObserver() {
7644
- const resizeObserver = new ResizeObserver(throttle(() => {
7645
- // this.evaluateControls()
7646
- }, 200));
7647
- resizeObserver.observe(this.tabsRef);
7648
- }
7649
7640
  render() {
7650
- return (hAsync(Host, { key: '561251fc7844ec9d11f72ff6e03ac6656b298ac9', class: this.h.classes(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) }, hAsync("div", { key: 'c5ecb113f0c39857a3d4eea506b08321b577f2b1', class: TabsClass.tabs, "aria-hidden": toBoolAttr(this.compactControls) }, hAsync("ul", { key: 'd1d1d166a43ddc69d35ec6c359dbab589e3c92fd', class: TabsClass.list }, this.controller.map(control => (hAsync("li", { class: TabsClass.item }, this.type == "text" ? (hAsync("button", { class: TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control), disabled: control.disabled, "aria-disabled": toBoolAttr(control.disabled), "aria-selected": toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active && !control.disabled ? 0 : -1, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.label)) : (hAsync("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))))))), hAsync("span", { key: '713c0bcfb6ff3377c77bff908b7e30ecd084d64f', id: this.formSelectId, hidden: true }, this.wcagSelectLabel), this.compactControls ? (hAsync("gov-form-select", { "wcag-labelled-by": this.formSelectId, "onGov-change": this.onChangeHandler.bind(this) }, this.controller.map(control => (hAsync("option", { value: control.triggerIdentifier, selected: control.active }, control.label))))) : null, hAsync("slot", { key: '176d4c69a319e1d0630db64ad853bd3358db865c' })));
7641
+ return (hAsync(Host, { key: 'fa6bb0777c56edcb61f5acfa4cac75fae2f8bb78', class: this.h.classes(TabsClass.root), variant: this.variant, type: this.type, role: "tablist", "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy, onKeyDown: this.onKeydownHandler.bind(this) }, hAsync("div", { key: '3e764b20b9a1e3221232d7567e45acae8701a963', class: TabsClass.tabs, "aria-hidden": toBoolAttr(this.compactControls) }, hAsync("ul", { key: 'adedeb20cd2d5608502410f1b843ba6293000e7c', class: TabsClass.list }, this.controllers.map(control => (hAsync("li", { class: TabsClass.item }, this.type == "text" ? (hAsync("button", { class: TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control), disabled: control.disabled, "aria-disabled": toBoolAttr(control.disabled), "aria-selected": toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active && !control.disabled ? 0 : -1, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.label)) : (hAsync("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))))))), hAsync("span", { key: '6d855cd5195673b6a13aaf4b357b74bdcfd0ef4d', id: this.formSelectId, hidden: true }, this.wcagSelectLabel), this.compactControls ? (hAsync("gov-form-select", { "wcag-labelled-by": this.formSelectId, "onGov-change": this.onChangeHandler.bind(this) }, this.controllers.map(control => (hAsync("option", { value: control.triggerIdentifier, selected: control.active }, control.label))))) : null, hAsync("slot", { key: 'd7ea30baebad93b05c1f978fcca0c19989be7227' })));
7651
7642
  }
7652
7643
  getCurrentTab() {
7653
- return this.controller.find(control => control.active) || null;
7644
+ return this.controllers.find(control => control.active) || null;
7654
7645
  }
7655
7646
  onSelectHandler(control) {
7656
- const index = this.controller.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);
7647
+ const index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);
7657
7648
  this.focusIndex = index;
7658
7649
  this.setActiveByIdentifier(control.triggerIdentifier);
7659
7650
  this.reRender();
@@ -7673,30 +7664,30 @@ class GovTabs {
7673
7664
  }
7674
7665
  goToPrevNext(keyCode) {
7675
7666
  if ([37, 38, 39, 40].includes(keyCode)) {
7676
- if (false === (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1)) {
7667
+ if (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {
7677
7668
  return;
7678
7669
  }
7679
- this.controller[this.focusIndex].active = false;
7670
+ this.controllers[this.focusIndex].active = false;
7680
7671
  if (keyCode === 39 || keyCode === 40) {
7681
7672
  this.focusIndex++;
7682
- if (this.focusIndex >= this.controller.length) {
7673
+ if (this.focusIndex >= this.controllers.length) {
7683
7674
  this.focusIndex = 0;
7684
7675
  }
7685
- if (this.controller[this.focusIndex].disabled) {
7676
+ if (this.controllers[this.focusIndex].disabled) {
7686
7677
  this.goToPrevNext(40);
7687
7678
  }
7688
7679
  }
7689
7680
  else if (keyCode === 37 || keyCode === 38) {
7690
7681
  this.focusIndex--;
7691
7682
  if (this.focusIndex < 0) {
7692
- this.focusIndex = this.controller.length - 1;
7683
+ this.focusIndex = this.controllers.length - 1;
7693
7684
  }
7694
- if (this.controller[this.focusIndex].disabled) {
7685
+ if (this.controllers[this.focusIndex].disabled) {
7695
7686
  this.goToPrevNext(38);
7696
7687
  }
7697
7688
  }
7698
- if (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1) {
7699
- const current = this.controller[this.focusIndex];
7689
+ if (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {
7690
+ const current = this.controllers[this.focusIndex];
7700
7691
  current.active = true;
7701
7692
  const trigger = this.triggerRefs[current.triggerIdentifier];
7702
7693
  if (trigger.nodeName.toLowerCase() === 'gov-chip') {
@@ -7705,7 +7696,7 @@ class GovTabs {
7705
7696
  else {
7706
7697
  this.triggerRefs[current.triggerIdentifier].focus();
7707
7698
  }
7708
- this.controller = [...this.controller];
7699
+ this.controllers = [...this.controllers];
7709
7700
  this.reRender();
7710
7701
  this.govChange.emit(this.getCurrentTab().element);
7711
7702
  }
@@ -7715,7 +7706,7 @@ class GovTabs {
7715
7706
  * Regenerate tabs controllers
7716
7707
  */
7717
7708
  async refresh() {
7718
- this.prepareDataSource();
7709
+ this.prepareControllers();
7719
7710
  }
7720
7711
  /**
7721
7712
  * Returns the currently selected tabs-item
@@ -7730,6 +7721,12 @@ class GovTabs {
7730
7721
  this.setActiveByIdentifier(identifier);
7731
7722
  this.reRender();
7732
7723
  }
7724
+ /**
7725
+ * Regenerate tabs controllers
7726
+ */
7727
+ async rerender() {
7728
+ this.prepareControllers();
7729
+ }
7733
7730
  /**
7734
7731
  * Validate the WCAG attributes of the component
7735
7732
  */
@@ -7753,12 +7750,13 @@ class GovTabs {
7753
7750
  "wcagLabel": [1, "wcag-label"],
7754
7751
  "wcagSelectLabel": [1, "wcag-select-label"],
7755
7752
  "wcagLabelledBy": [1, "wcag-labelled-by"],
7756
- "controller": [32],
7753
+ "controllers": [32],
7757
7754
  "focusIndex": [32],
7758
7755
  "compactControls": [32],
7759
7756
  "refresh": [64],
7760
7757
  "currentTab": [64],
7761
7758
  "setActiveTab": [64],
7759
+ "rerender": [64],
7762
7760
  "validateWcag": [64]
7763
7761
  },
7764
7762
  "$listeners$": undefined,
@@ -7783,8 +7781,14 @@ class GovTabsItem {
7783
7781
  this.contentId = createID('GovTabContent');
7784
7782
  this.triggerId = createID('GovTabTrigger');
7785
7783
  }
7784
+ rerenderParent() {
7785
+ const element = this.h.getParent(TabsClass.root);
7786
+ if (element) {
7787
+ element.rerender().catch();
7788
+ }
7789
+ }
7786
7790
  render() {
7787
- return (hAsync(Host, { key: '76d5b1152d766c4ec9f810e011cbb54fbb614b83', class: this.h.classes(TabsItemClass.root), default: this.default }, hAsync("div", { key: 'beffe50be2fe641def7fe2d1464dad4c00739072', class: TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": toBoolAttrIfDefined(!this.isActive) }, hAsync("slot", { key: 'd788632dcc88e04112068e3dcf17c52737770255' }))));
7791
+ return (hAsync(Host, { key: 'b316d961cabc1aed647deaa504ddca1184860f70', class: this.h.classes(TabsItemClass.root), default: this.default }, hAsync("div", { key: 'd73aa35cc5131b81eaceff6afab13250b2587aec', class: TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": toBoolAttrIfDefined(!this.isActive) }, hAsync("slot", { key: '4bdf7cd566204ab3ac1883a5194abce6526fc0f0' }))));
7788
7792
  }
7789
7793
  /**
7790
7794
  * Returns a unique tab content identifier
@@ -7811,6 +7815,11 @@ class GovTabsItem {
7811
7815
  this.isActive = status;
7812
7816
  }
7813
7817
  get host() { return getElement(this); }
7818
+ static get watchers() { return {
7819
+ "label": ["rerenderParent"],
7820
+ "disabled": ["rerenderParent"],
7821
+ "default": ["rerenderParent"]
7822
+ }; }
7814
7823
  static get style() { return GovTabsItemStyle0; }
7815
7824
  static get cmpMeta() { return {
7816
7825
  "$flags$": 4,
@@ -8117,12 +8126,14 @@ class GovTooltip {
8117
8126
  rerenderMessage() {
8118
8127
  this.createContentWrapper();
8119
8128
  }
8129
+ connectedCallback() {
8130
+ this.createContentWrapper();
8131
+ this.registerListeners();
8132
+ }
8120
8133
  componentWillLoad() {
8121
8134
  this.validateVariant(this.variant);
8122
8135
  this.validateSize(this.size);
8123
8136
  this.validatePosition(this.position);
8124
- this.createContentWrapper();
8125
- this.registerListeners();
8126
8137
  }
8127
8138
  componentDidUpdate() {
8128
8139
  this.createContentWrapper();
@@ -8279,11 +8290,11 @@ class GovTooltip {
8279
8290
  }
8280
8291
  render() {
8281
8292
  var _a;
8282
- return (hAsync(Host, { key: 'd16d7493cc470032d16e762e75c426c919b683d5', id: this.tooltipId, class: this.h.classes(TooltipClass.root), position: this.position }, hAsync("span", { key: 'd80316da39311fde00a00bb7867fd4c73864bd7e', role: 'button', tabindex: 0, onKeyPress: () => this.showTooltip(), onBlur: () => {
8293
+ return (hAsync(Host, { key: '79f1e7f55aa44da4cc08be8f388921c2c940d834', id: this.tooltipId, class: this.h.classes(TooltipClass.root), position: this.position }, hAsync("span", { key: '361c2997c12aa96a171ebb1558986b83990b5778', role: 'button', tabindex: 0, onKeyPress: () => this.showTooltip(), onBlur: () => {
8283
8294
  if (this.persist === false) {
8284
8295
  this.hideTooltip();
8285
8296
  }
8286
- }, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId }, hAsync("slot", { key: '1ccc180def543def370a189a5c10351fc166dcdd' }))));
8297
+ }, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId }, hAsync("slot", { key: 'bffc64135254b57fb4514a8afdc44bfe4b8f3015' }))));
8287
8298
  }
8288
8299
  /**
8289
8300
  * Showing the modal
@@ -4869,6 +4869,7 @@ class GovFormInput {
4869
4869
  this.autocomplete = undefined;
4870
4870
  this.autocorrect = undefined;
4871
4871
  this.spellcheck = undefined;
4872
+ this.inputLang = undefined;
4872
4873
  this.type = undefined;
4873
4874
  this.inputType = "text";
4874
4875
  this.role = undefined;
@@ -4914,9 +4915,9 @@ class GovFormInput {
4914
4915
  }
4915
4916
  render() {
4916
4917
  const Tag = this.multiline ? Tags$1.TEXTAREA : Tags$1.INPUT;
4917
- return (hAsync(Host, { key: '882de587fbcd5dbe29f9be53017319e27e473b82', class: FormInputClass.root, size: this.size, variant: this.variant, type: this.type }, this.h.hasSlot("prefix") && hAsync("slot", { key: 'a6d9aeb552da3b0eca325437b61141ec11b53e7d', name: "prefix" }), hAsync("span", { key: '6396e695da2afee201ca00bea17befc74122d92c', class: "element" }, this.h.hasSlot("left-icon") && hAsync("slot", { key: '9cafd86301233ce4263586b50e04a7aba345bec1', name: "left-icon" }), this.h.hasSlot("right-icon") && !(this.success || this.invalid) && hAsync("slot", { key: 'ab345343e1909354be7867d6044a0091c7965578', name: "right-icon" }), this.success && !this.multiline &&
4918
- hAsync("gov-icon", { key: 'cd69e417608ffd0c9b4fc2d8fe386f1b358ad897', slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
4919
- hAsync("gov-icon", { key: '48f5138303b2e06d16c1b03991818083b6fef8a6', slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), hAsync(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") && hAsync("slot", { key: '14d40dac468acf1b158660fb7383ff4ae89024c1', name: "sufix" })));
4918
+ return (hAsync(Host, { key: '1d217855ba964b9c637373529e2b677fb09f8034', class: FormInputClass.root, size: this.size, variant: this.variant, type: this.type }, this.h.hasSlot("prefix") && hAsync("slot", { key: '75b989d2f4b70cf43e9a5315fdb6eb56af832118', name: "prefix" }), hAsync("span", { key: '39f063be627ad300abe364adfa4a32b79a879773', class: "element" }, this.h.hasSlot("left-icon") && hAsync("slot", { key: '84da6d8d05274f5a9760b871ffb89dec870122f8', name: "left-icon" }), this.h.hasSlot("right-icon") && !(this.success || this.invalid) && hAsync("slot", { key: 'b8ede08c703cc88e526593cb5aac4a868293543c', name: "right-icon" }), this.success && !this.multiline &&
4919
+ hAsync("gov-icon", { key: '1dad15f0bbab72fef2f2d596fb2ce27b097eb3a4', slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
4920
+ hAsync("gov-icon", { key: '9d8ed110a2640133ecc462c6b06f1f5496fb61f7', slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), hAsync(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") && hAsync("slot", { key: '9746bac959c672b37d1c5529cbbe0da13ecf4ce8', name: "sufix" })));
4920
4921
  }
4921
4922
  onFocusHandler(e) {
4922
4923
  e.stopPropagation();
@@ -5028,6 +5029,7 @@ class GovFormInput {
5028
5029
  "autocomplete": [4],
5029
5030
  "autocorrect": [4],
5030
5031
  "spellcheck": [4],
5032
+ "inputLang": [1, "input-lang"],
5031
5033
  "type": [1],
5032
5034
  "inputType": [1, "input-type"],
5033
5035
  "role": [1],
@@ -6686,6 +6688,7 @@ class GovPagination {
6686
6688
  this.current = 1;
6687
6689
  this.total = 0;
6688
6690
  this.inverse = undefined;
6691
+ this.selectIdentifier = undefined;
6689
6692
  this.size = "m";
6690
6693
  this.variant = "primary";
6691
6694
  this.pageSize = 10;
@@ -6702,6 +6705,7 @@ class GovPagination {
6702
6705
  this.pagination = undefined;
6703
6706
  this.h = govHost(this.host);
6704
6707
  this.pageSelectId = createID("GovPageSelect");
6708
+ this.selectId = createID("GovSelect");
6705
6709
  }
6706
6710
  validateType(newValue) {
6707
6711
  validateProp(PaginationTypes, newValue, PaginationClass.root);
@@ -6757,7 +6761,7 @@ class GovPagination {
6757
6761
  const ariaCurrent = toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined);
6758
6762
  return (hAsync("gov-button", { href: this.prepareLinkUrl(page), variant: this.variant, size: this.size, type: "base", disabled: isDisabled, "on-gov-click": (e) => this.onClickHandler(e, page), "wcag-label": description ? description : page > -1 ? this.wcagPageLabel + " " + page : undefined, "wcag-current": ariaCurrent, class: PaginationClass.inner }, content));
6759
6763
  };
6760
- return (hAsync(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, hAsync("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, hAsync("ul", { class: PaginationClass.list }, hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }), this.labelStart)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }), this.labelPrev)), this.type == "select" ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, "wcag-labelled-by": this.pageSelectId, "on-gov-change": this.onSelectHandler.bind(this) }, createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (hAsync(Fragment, null, this.pagination.pages.map(page => (hAsync("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page, '')))), this.pagination.totalPages ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, "wcag-labelled-by": this.pageSelectId, ref: el => (this.spreadSelectRef = el), "on-gov-change": this.onSelectHandler.bind(this) }, hAsync("option", { selected: true, hidden: true }, "..."), createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: false }, page))))))) : null)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }), this.labelNext)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" }), this.labelEnd))))));
6764
+ return (hAsync(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, hAsync("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, hAsync("ul", { class: PaginationClass.list }, hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }), this.labelStart)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }), this.labelPrev)), this.type == "select" ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, identifier: this.selectIdentifier || this.selectId, "wcag-labelled-by": this.pageSelectId, "on-gov-change": this.onSelectHandler.bind(this) }, createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (hAsync(Fragment, null, this.pagination.pages.map(page => (hAsync("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page, '')))), this.pagination.totalPages ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, identifier: this.selectIdentifier || this.selectId, "wcag-labelled-by": this.pageSelectId, ref: el => (this.spreadSelectRef = el), "on-gov-change": this.onSelectHandler.bind(this) }, hAsync("option", { selected: true, hidden: true }, "..."), createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: false }, page))))))) : null)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }), this.labelNext)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" }), this.labelEnd))))));
6761
6765
  }
6762
6766
  onClickHandler(e, page) {
6763
6767
  e.stopPropagation();
@@ -6811,6 +6815,7 @@ class GovPagination {
6811
6815
  "current": [2],
6812
6816
  "total": [2],
6813
6817
  "inverse": [4],
6818
+ "selectIdentifier": [1, "select-identifier"],
6814
6819
  "size": [1],
6815
6820
  "variant": [1],
6816
6821
  "pageSize": [2, "page-size"],
@@ -7556,7 +7561,7 @@ class GovTabs {
7556
7561
  registerInstance(this, hostRef);
7557
7562
  this.govChange = createEvent(this, "gov-change", 7);
7558
7563
  this.triggerRefs = {};
7559
- this.controller = [];
7564
+ this.controllers = [];
7560
7565
  this.focusIndex = 0;
7561
7566
  this.compactControls = false;
7562
7567
  this.type = "text";
@@ -7575,17 +7580,16 @@ class GovTabs {
7575
7580
  validateProp(TabVariants, newValue, TabsClass.root);
7576
7581
  }
7577
7582
  componentWillLoad() {
7578
- this.prepareDataSource();
7583
+ this.prepareControllers();
7579
7584
  }
7580
7585
  async componentDidRender() {
7581
7586
  if (canValidateWcagOnRender()) {
7582
7587
  await delay(500);
7583
7588
  await this.validateWcag();
7584
7589
  }
7585
- this.resizeObserver();
7586
7590
  }
7587
- prepareDataSource() {
7588
- this.controller = [];
7591
+ prepareControllers() {
7592
+ this.controllers = [];
7589
7593
  const promises = [];
7590
7594
  this.host.querySelectorAll(TabsItemClass.root).forEach((tab) => {
7591
7595
  const controlItem = Promise.all([
@@ -7607,49 +7611,36 @@ class GovTabs {
7607
7611
  promises.push(controlItem);
7608
7612
  });
7609
7613
  Promise.all(promises).then(controllers => {
7610
- let defaultTab = controllers.findIndex(controller => controller.default);
7611
- if (defaultTab === -1)
7612
- defaultTab = 0;
7613
- this.focusIndex = defaultTab;
7614
- controllers[defaultTab].active = true;
7615
- this.controller = [...controllers];
7614
+ let defaultTabIndex = controllers.findIndex(controller => controller.default);
7615
+ if (defaultTabIndex === -1)
7616
+ defaultTabIndex = 0;
7617
+ this.focusIndex = defaultTabIndex;
7618
+ controllers[defaultTabIndex].active = true;
7619
+ this.controllers = [...controllers];
7616
7620
  this.reRender();
7617
7621
  });
7618
7622
  }
7619
7623
  setActiveByIdentifier(identifier) {
7620
7624
  const temp = [];
7621
- this.controller.map(item => {
7625
+ this.controllers.map(item => {
7622
7626
  item.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier;
7623
7627
  temp.push(item);
7624
7628
  });
7625
- this.controller = [...temp];
7629
+ this.controllers = [...temp];
7626
7630
  }
7627
7631
  reRender() {
7628
- this.controller.map(control => {
7629
- control.element.setActiveStatus(control.active);
7632
+ this.controllers.map(control => {
7633
+ control.element.setActiveStatus(control.active).catch();
7630
7634
  });
7631
7635
  }
7632
- /*
7633
- private evaluateControls() {
7634
- this.compactControls = false
7635
- let sumOfWidth = this.tabsRef.querySelector("ul").offsetWidth
7636
- this.compactControls = this.tabsRef.offsetWidth < sumOfWidth
7637
- }
7638
- */
7639
- resizeObserver() {
7640
- const resizeObserver = new ResizeObserver(throttle(() => {
7641
- // this.evaluateControls()
7642
- }, 200));
7643
- resizeObserver.observe(this.tabsRef);
7644
- }
7645
7636
  render() {
7646
- return (hAsync(Host, { key: '561251fc7844ec9d11f72ff6e03ac6656b298ac9', class: this.h.classes(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) }, hAsync("div", { key: 'c5ecb113f0c39857a3d4eea506b08321b577f2b1', class: TabsClass.tabs, "aria-hidden": toBoolAttr(this.compactControls) }, hAsync("ul", { key: 'd1d1d166a43ddc69d35ec6c359dbab589e3c92fd', class: TabsClass.list }, this.controller.map(control => (hAsync("li", { class: TabsClass.item }, this.type == "text" ? (hAsync("button", { class: TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control), disabled: control.disabled, "aria-disabled": toBoolAttr(control.disabled), "aria-selected": toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active && !control.disabled ? 0 : -1, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.label)) : (hAsync("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))))))), hAsync("span", { key: '713c0bcfb6ff3377c77bff908b7e30ecd084d64f', id: this.formSelectId, hidden: true }, this.wcagSelectLabel), this.compactControls ? (hAsync("gov-form-select", { "wcag-labelled-by": this.formSelectId, "onGov-change": this.onChangeHandler.bind(this) }, this.controller.map(control => (hAsync("option", { value: control.triggerIdentifier, selected: control.active }, control.label))))) : null, hAsync("slot", { key: '176d4c69a319e1d0630db64ad853bd3358db865c' })));
7637
+ return (hAsync(Host, { key: 'fa6bb0777c56edcb61f5acfa4cac75fae2f8bb78', class: this.h.classes(TabsClass.root), variant: this.variant, type: this.type, role: "tablist", "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy, onKeyDown: this.onKeydownHandler.bind(this) }, hAsync("div", { key: '3e764b20b9a1e3221232d7567e45acae8701a963', class: TabsClass.tabs, "aria-hidden": toBoolAttr(this.compactControls) }, hAsync("ul", { key: 'adedeb20cd2d5608502410f1b843ba6293000e7c', class: TabsClass.list }, this.controllers.map(control => (hAsync("li", { class: TabsClass.item }, this.type == "text" ? (hAsync("button", { class: TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control), disabled: control.disabled, "aria-disabled": toBoolAttr(control.disabled), "aria-selected": toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active && !control.disabled ? 0 : -1, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.label)) : (hAsync("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))))))), hAsync("span", { key: '6d855cd5195673b6a13aaf4b357b74bdcfd0ef4d', id: this.formSelectId, hidden: true }, this.wcagSelectLabel), this.compactControls ? (hAsync("gov-form-select", { "wcag-labelled-by": this.formSelectId, "onGov-change": this.onChangeHandler.bind(this) }, this.controllers.map(control => (hAsync("option", { value: control.triggerIdentifier, selected: control.active }, control.label))))) : null, hAsync("slot", { key: 'd7ea30baebad93b05c1f978fcca0c19989be7227' })));
7647
7638
  }
7648
7639
  getCurrentTab() {
7649
- return this.controller.find(control => control.active) || null;
7640
+ return this.controllers.find(control => control.active) || null;
7650
7641
  }
7651
7642
  onSelectHandler(control) {
7652
- const index = this.controller.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);
7643
+ const index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);
7653
7644
  this.focusIndex = index;
7654
7645
  this.setActiveByIdentifier(control.triggerIdentifier);
7655
7646
  this.reRender();
@@ -7669,30 +7660,30 @@ class GovTabs {
7669
7660
  }
7670
7661
  goToPrevNext(keyCode) {
7671
7662
  if ([37, 38, 39, 40].includes(keyCode)) {
7672
- if (false === (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1)) {
7663
+ if (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {
7673
7664
  return;
7674
7665
  }
7675
- this.controller[this.focusIndex].active = false;
7666
+ this.controllers[this.focusIndex].active = false;
7676
7667
  if (keyCode === 39 || keyCode === 40) {
7677
7668
  this.focusIndex++;
7678
- if (this.focusIndex >= this.controller.length) {
7669
+ if (this.focusIndex >= this.controllers.length) {
7679
7670
  this.focusIndex = 0;
7680
7671
  }
7681
- if (this.controller[this.focusIndex].disabled) {
7672
+ if (this.controllers[this.focusIndex].disabled) {
7682
7673
  this.goToPrevNext(40);
7683
7674
  }
7684
7675
  }
7685
7676
  else if (keyCode === 37 || keyCode === 38) {
7686
7677
  this.focusIndex--;
7687
7678
  if (this.focusIndex < 0) {
7688
- this.focusIndex = this.controller.length - 1;
7679
+ this.focusIndex = this.controllers.length - 1;
7689
7680
  }
7690
- if (this.controller[this.focusIndex].disabled) {
7681
+ if (this.controllers[this.focusIndex].disabled) {
7691
7682
  this.goToPrevNext(38);
7692
7683
  }
7693
7684
  }
7694
- if (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1) {
7695
- const current = this.controller[this.focusIndex];
7685
+ if (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {
7686
+ const current = this.controllers[this.focusIndex];
7696
7687
  current.active = true;
7697
7688
  const trigger = this.triggerRefs[current.triggerIdentifier];
7698
7689
  if (trigger.nodeName.toLowerCase() === 'gov-chip') {
@@ -7701,7 +7692,7 @@ class GovTabs {
7701
7692
  else {
7702
7693
  this.triggerRefs[current.triggerIdentifier].focus();
7703
7694
  }
7704
- this.controller = [...this.controller];
7695
+ this.controllers = [...this.controllers];
7705
7696
  this.reRender();
7706
7697
  this.govChange.emit(this.getCurrentTab().element);
7707
7698
  }
@@ -7711,7 +7702,7 @@ class GovTabs {
7711
7702
  * Regenerate tabs controllers
7712
7703
  */
7713
7704
  async refresh() {
7714
- this.prepareDataSource();
7705
+ this.prepareControllers();
7715
7706
  }
7716
7707
  /**
7717
7708
  * Returns the currently selected tabs-item
@@ -7726,6 +7717,12 @@ class GovTabs {
7726
7717
  this.setActiveByIdentifier(identifier);
7727
7718
  this.reRender();
7728
7719
  }
7720
+ /**
7721
+ * Regenerate tabs controllers
7722
+ */
7723
+ async rerender() {
7724
+ this.prepareControllers();
7725
+ }
7729
7726
  /**
7730
7727
  * Validate the WCAG attributes of the component
7731
7728
  */
@@ -7749,12 +7746,13 @@ class GovTabs {
7749
7746
  "wcagLabel": [1, "wcag-label"],
7750
7747
  "wcagSelectLabel": [1, "wcag-select-label"],
7751
7748
  "wcagLabelledBy": [1, "wcag-labelled-by"],
7752
- "controller": [32],
7749
+ "controllers": [32],
7753
7750
  "focusIndex": [32],
7754
7751
  "compactControls": [32],
7755
7752
  "refresh": [64],
7756
7753
  "currentTab": [64],
7757
7754
  "setActiveTab": [64],
7755
+ "rerender": [64],
7758
7756
  "validateWcag": [64]
7759
7757
  },
7760
7758
  "$listeners$": undefined,
@@ -7779,8 +7777,14 @@ class GovTabsItem {
7779
7777
  this.contentId = createID('GovTabContent');
7780
7778
  this.triggerId = createID('GovTabTrigger');
7781
7779
  }
7780
+ rerenderParent() {
7781
+ const element = this.h.getParent(TabsClass.root);
7782
+ if (element) {
7783
+ element.rerender().catch();
7784
+ }
7785
+ }
7782
7786
  render() {
7783
- return (hAsync(Host, { key: '76d5b1152d766c4ec9f810e011cbb54fbb614b83', class: this.h.classes(TabsItemClass.root), default: this.default }, hAsync("div", { key: 'beffe50be2fe641def7fe2d1464dad4c00739072', class: TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": toBoolAttrIfDefined(!this.isActive) }, hAsync("slot", { key: 'd788632dcc88e04112068e3dcf17c52737770255' }))));
7787
+ return (hAsync(Host, { key: 'b316d961cabc1aed647deaa504ddca1184860f70', class: this.h.classes(TabsItemClass.root), default: this.default }, hAsync("div", { key: 'd73aa35cc5131b81eaceff6afab13250b2587aec', class: TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": toBoolAttrIfDefined(!this.isActive) }, hAsync("slot", { key: '4bdf7cd566204ab3ac1883a5194abce6526fc0f0' }))));
7784
7788
  }
7785
7789
  /**
7786
7790
  * Returns a unique tab content identifier
@@ -7807,6 +7811,11 @@ class GovTabsItem {
7807
7811
  this.isActive = status;
7808
7812
  }
7809
7813
  get host() { return getElement(this); }
7814
+ static get watchers() { return {
7815
+ "label": ["rerenderParent"],
7816
+ "disabled": ["rerenderParent"],
7817
+ "default": ["rerenderParent"]
7818
+ }; }
7810
7819
  static get style() { return GovTabsItemStyle0; }
7811
7820
  static get cmpMeta() { return {
7812
7821
  "$flags$": 4,
@@ -8113,12 +8122,14 @@ class GovTooltip {
8113
8122
  rerenderMessage() {
8114
8123
  this.createContentWrapper();
8115
8124
  }
8125
+ connectedCallback() {
8126
+ this.createContentWrapper();
8127
+ this.registerListeners();
8128
+ }
8116
8129
  componentWillLoad() {
8117
8130
  this.validateVariant(this.variant);
8118
8131
  this.validateSize(this.size);
8119
8132
  this.validatePosition(this.position);
8120
- this.createContentWrapper();
8121
- this.registerListeners();
8122
8133
  }
8123
8134
  componentDidUpdate() {
8124
8135
  this.createContentWrapper();
@@ -8275,11 +8286,11 @@ class GovTooltip {
8275
8286
  }
8276
8287
  render() {
8277
8288
  var _a;
8278
- return (hAsync(Host, { key: 'd16d7493cc470032d16e762e75c426c919b683d5', id: this.tooltipId, class: this.h.classes(TooltipClass.root), position: this.position }, hAsync("span", { key: 'd80316da39311fde00a00bb7867fd4c73864bd7e', role: 'button', tabindex: 0, onKeyPress: () => this.showTooltip(), onBlur: () => {
8289
+ return (hAsync(Host, { key: '79f1e7f55aa44da4cc08be8f388921c2c940d834', id: this.tooltipId, class: this.h.classes(TooltipClass.root), position: this.position }, hAsync("span", { key: '361c2997c12aa96a171ebb1558986b83990b5778', role: 'button', tabindex: 0, onKeyPress: () => this.showTooltip(), onBlur: () => {
8279
8290
  if (this.persist === false) {
8280
8291
  this.hideTooltip();
8281
8292
  }
8282
- }, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId }, hAsync("slot", { key: '1ccc180def543def370a189a5c10351fc166dcdd' }))));
8293
+ }, "aria-describedby": (_a = this.identifier) !== null && _a !== void 0 ? _a : this.tooltipContentId }, hAsync("slot", { key: 'bffc64135254b57fb4514a8afdc44bfe4b8f3015' }))));
8283
8294
  }
8284
8295
  /**
8285
8296
  * Showing the modal