@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
@@ -40,7 +40,7 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
40
40
 
41
41
  patchBrowser().then(async (options) => {
42
42
  await appGlobals.globalScripts();
43
- 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);
43
+ 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);
44
44
  });
45
45
 
46
46
  exports.setNonce = index.setNonce;
@@ -54,6 +54,7 @@ const GovFormInput = class {
54
54
  this.autocomplete = undefined;
55
55
  this.autocorrect = undefined;
56
56
  this.spellcheck = undefined;
57
+ this.inputLang = undefined;
57
58
  this.type = undefined;
58
59
  this.inputType = "text";
59
60
  this.role = undefined;
@@ -99,9 +100,9 @@ const GovFormInput = class {
99
100
  }
100
101
  render() {
101
102
  const Tag = this.multiline ? Tags.TEXTAREA : Tags.INPUT;
102
- return (index.h(index.Host, { key: '882de587fbcd5dbe29f9be53017319e27e473b82', class: form.FormInputClass.root, size: this.size, variant: this.variant, type: this.type }, this.h.hasSlot("prefix") && index.h("slot", { key: 'a6d9aeb552da3b0eca325437b61141ec11b53e7d', name: "prefix" }), index.h("span", { key: '6396e695da2afee201ca00bea17befc74122d92c', class: "element" }, this.h.hasSlot("left-icon") && index.h("slot", { key: '9cafd86301233ce4263586b50e04a7aba345bec1', name: "left-icon" }), this.h.hasSlot("right-icon") && !(this.success || this.invalid) && index.h("slot", { key: 'ab345343e1909354be7867d6044a0091c7965578', name: "right-icon" }), this.success && !this.multiline &&
103
- index.h("gov-icon", { key: 'cd69e417608ffd0c9b4fc2d8fe386f1b358ad897', slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
104
- index.h("gov-icon", { key: '48f5138303b2e06d16c1b03991818083b6fef8a6', slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), index.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: template.toBoolAttrIfDefined(this.spellcheck), readonly: template.toBoolAttrIfDefined(this.readonly), autocomplete: template.toOnOffAttrIfDefined(this.autocomplete), autocorrect: template.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": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid), "aria-disabled": template.toBoolAttrIfDefined(this.disabled), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns, "aria-expanded": template.toBoolAttrIfDefined(this.wcagExpanded), "aria-autocomplete": this.wcagAutocomplete })), this.h.hasSlot("sufix") && index.h("slot", { key: '14d40dac468acf1b158660fb7383ff4ae89024c1', name: "sufix" })));
103
+ return (index.h(index.Host, { key: '1d217855ba964b9c637373529e2b677fb09f8034', class: form.FormInputClass.root, size: this.size, variant: this.variant, type: this.type }, this.h.hasSlot("prefix") && index.h("slot", { key: '75b989d2f4b70cf43e9a5315fdb6eb56af832118', name: "prefix" }), index.h("span", { key: '39f063be627ad300abe364adfa4a32b79a879773', class: "element" }, this.h.hasSlot("left-icon") && index.h("slot", { key: '84da6d8d05274f5a9760b871ffb89dec870122f8', name: "left-icon" }), this.h.hasSlot("right-icon") && !(this.success || this.invalid) && index.h("slot", { key: 'b8ede08c703cc88e526593cb5aac4a868293543c', name: "right-icon" }), this.success && !this.multiline &&
104
+ index.h("gov-icon", { key: '1dad15f0bbab72fef2f2d596fb2ce27b097eb3a4', slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
105
+ index.h("gov-icon", { key: '9d8ed110a2640133ecc462c6b06f1f5496fb61f7', slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), index.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: template.toBoolAttrIfDefined(this.spellcheck), lang: this.inputLang, readonly: template.toBoolAttrIfDefined(this.readonly), autocomplete: template.toOnOffAttrIfDefined(this.autocomplete), autocorrect: template.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": template.toBoolAttrIfDefined(this.required), "aria-invalid": template.toBoolAttrIfDefined(this.invalid), "aria-disabled": template.toBoolAttrIfDefined(this.disabled), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns, "aria-expanded": template.toBoolAttrIfDefined(this.wcagExpanded), "aria-autocomplete": this.wcagAutocomplete })), this.h.hasSlot("sufix") && index.h("slot", { key: '9746bac959c672b37d1c5529cbbe0da13ecf4ce8', name: "sufix" })));
105
106
  }
106
107
  onFocusHandler(e) {
107
108
  e.stopPropagation();
@@ -1 +1 @@
1
- {"file":"gov-form-input.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,oiZAAoiZ,CAAC;AAC7jZ,2BAAe,eAAe;;ACqB9B,IAAK,IAGJ;AAHD,WAAK,IAAI;IACR,uBAAe,CAAA;IACf,6BAAqB,CAAA;AACtB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAMY,YAAY;IAMxB;;;;;;;;;;uBAkBkD,WAAW;;oBAQhB,GAAG;;;;;wBAqBX,KAAK;wBAKL,KAAK;;;;;;;;;;;yBA6CuB,MAAM;;;;;;;;;QAhGtE,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,OAAO,GAAGC,qBAAQ,CAAC,UAAU,CAAC,CAAA;QACnC,IAAI,CAAC,CAAC,GAAGC,YAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACxB;IAsJD,eAAe,CAAC,QAAgB;QAC/BC,kBAAY,CAACC,sBAAiB,EAAE,QAAQ,EAAEC,mBAAc,CAAC,IAAI,CAAC,CAAA;KAC9D;IAGD,YAAY,CAAC,QAAgB;QAC5BF,kBAAY,CAACG,mBAAc,EAAE,QAAQ,EAAED,mBAAc,CAAC,IAAI,CAAC,CAAA;KAC3D;IAMD,aAAa;QACZ,IAAI,CAAC,gBAAgB,EAAE,CAAA;KACvB;IAEO,gBAAgB;QACvB,IAAI,CAA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,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAA;KACxB;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;IAMD,MAAM,YAAY;QACjBS,oBAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAET,mBAAc,CAAC,IAAI,CAAC,CAAA;QAC/ES,oBAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAET,mBAAc,CAAC,IAAI,CAAC,CAAA;QAC7ES,oBAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAET,mBAAc,CAAC,IAAI,CAAC,CAAA;QAChEU,yBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAEV,mBAAc,CAAC,IAAI,CAAC,CAAA;KAC/F;;;;;;;;;;;;;;","names":["govHost","createID","govForm","validateProp","FormInputVariants","FormInputClass","FormInputSizes","toBoolAttr","canValidateWcagOnRender","delay","h","Host","toBoolAttrIfDefined","toOnOffAttrIfDefined","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.scss?tag=gov-form-input","../../../packages/core/src/components/gov-form/input/gov-form-input.tsx"],"sourcesContent":["/*\n * Input\n */\n\n@import \"../input/gov-form-input-core.scss\";\n$class: \".gov-form-input\";\n\n#{$class} {\n\t@extend %form-input-core;\n\n\t// VARIANTS\n\t&[type=\"reset\"] {\n\t\tinput {\n\t\t\tborder-width: 0;\n\t\t\t&:focus {\n\t\t\t\toutline: none;\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\"\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"],"version":3}
1
+ {"file":"gov-form-input.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,oiZAAoiZ,CAAC;AAC7jZ,2BAAe,eAAe;;ACqB9B,IAAK,IAGJ;AAHD,WAAK,IAAI;IACR,uBAAe,CAAA;IACf,6BAAqB,CAAA;AACtB,CAAC,EAHI,IAAI,KAAJ,IAAI,QAGR;MAMY,YAAY;IAMxB;;;;;;;;;;uBAkBkD,WAAW;;oBAQhB,GAAG;;;;;wBAqBX,KAAK;wBAKL,KAAK;;;;;;;;;;;;yBAiDuB,MAAM;;;;;;;;;QApGtE,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,OAAO,GAAGC,qBAAQ,CAAC,UAAU,CAAC,CAAA;QACnC,IAAI,CAAC,CAAC,GAAGC,YAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KACxB;IA0JD,eAAe,CAAC,QAAgB;QAC/BC,kBAAY,CAACC,sBAAiB,EAAE,QAAQ,EAAEC,mBAAc,CAAC,IAAI,CAAC,CAAA;KAC9D;IAGD,YAAY,CAAC,QAAgB;QAC5BF,kBAAY,CAACG,mBAAc,EAAE,QAAQ,EAAED,mBAAc,CAAC,IAAI,CAAC,CAAA;KAC3D;IAMD,aAAa;QACZ,IAAI,CAAC,gBAAgB,EAAE,CAAA;KACvB;IAEO,gBAAgB;QACvB,IA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AC,KAAK,GAAG,EAAE,CAAA;QACf,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAA;KACxB;;;;IAMD,MAAM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;IAMD,MAAM,YAAY;QACjBS,oBAAe,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,EAAET,mBAAc,CAAC,IAAI,CAAC,CAAA;QAC/ES,oBAAe,CAAC,IAAI,CAAC,cAAc,EAAE,kBAAkB,EAAET,mBAAc,CAAC,IAAI,CAAC,CAAA;QAC7ES,oBAAe,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAET,mBAAc,CAAC,IAAI,CAAC,CAAA;QAChEU,yBAAoB,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAEV,mBAAc,CAAC,IAAI,CAAC,CAAA;KAC/F;;;;;;;;;;;;;;","names":["govHost","createID","govForm","validateProp","FormInputVariants","FormInputClass","FormInputSizes","toBoolAttr","canValidateWcagOnRender","delay","h","Host","toBoolAttrIfDefined","toOnOffAttrIfDefined","validateWcagRef","validateWcagLabelFor"],"sources":["../../../packages/core/src/components/gov-form/input/gov-form-input.scss?tag=gov-form-input","../../../packages/core/src/components/gov-form/input/gov-form-input.tsx"],"sourcesContent":["/*\n * Input\n */\n\n@import \"../input/gov-form-input-core.scss\";\n$class: \".gov-form-input\";\n\n#{$class} {\n\t@extend %form-input-core;\n\n\t// VARIANTS\n\t&[type=\"reset\"] {\n\t\tinput {\n\t\t\tborder-width: 0;\n\t\t\t&:focus {\n\t\t\t\toutline: none;\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\"\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"],"version":3}
@@ -18,7 +18,7 @@ const IconClass = {
18
18
  holder: 'gov-icon__holder',
19
19
  };
20
20
 
21
- const version = "4.0.8-rc12";
21
+ const version = "4.0.8-rc14";
22
22
 
23
23
  const dsVersion = () => {
24
24
  return version;
@@ -99,6 +99,7 @@ const GovPagination = class {
99
99
  this.current = 1;
100
100
  this.total = 0;
101
101
  this.inverse = undefined;
102
+ this.selectIdentifier = undefined;
102
103
  this.size = "m";
103
104
  this.variant = "primary";
104
105
  this.pageSize = 10;
@@ -115,6 +116,7 @@ const GovPagination = class {
115
116
  this.pagination = undefined;
116
117
  this.h = template.govHost(this.host);
117
118
  this.pageSelectId = string_utils.createID("GovPageSelect");
119
+ this.selectId = string_utils.createID("GovSelect");
118
120
  }
119
121
  validateType(newValue) {
120
122
  props.validateProp(PaginationTypes, newValue, PaginationClass.root);
@@ -170,7 +172,7 @@ const GovPagination = class {
170
172
  const ariaCurrent = template.toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined);
171
173
  return (index.h("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));
172
174
  };
173
- return (index.h(index.Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, index.h("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, index.h("ul", { class: PaginationClass.list }, index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, index.h("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }), this.labelStart)), index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, index.h("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }), this.labelPrev)), this.type == "select" ? (index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, index.h("span", { class: PaginationClass.inner }, index.h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), index.h("gov-form-select", { size: this.size, variant: this.variant, "wcag-labelled-by": this.pageSelectId, "on-gov-change": this.onSelectHandler.bind(this) }, array_utils.createArrayRange(1, this.pagination.totalPages).map(page => (index.h("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (index.h(Fragment.Fragment, null, this.pagination.pages.map(page => (index.h("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page, '')))), this.pagination.totalPages ? (index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, index.h("span", { class: PaginationClass.inner }, index.h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), index.h("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) }, index.h("option", { selected: true, hidden: true }, "..."), array_utils.createArrayRange(1, this.pagination.totalPages).map(page => (index.h("option", { value: page, selected: false }, page))))))) : null)), index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, index.h("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }), this.labelNext)), index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, index.h("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" }), this.labelEnd))))));
175
+ return (index.h(index.Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, index.h("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, index.h("ul", { class: PaginationClass.list }, index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, index.h("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }), this.labelStart)), index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, index.h("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }), this.labelPrev)), this.type == "select" ? (index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, index.h("span", { class: PaginationClass.inner }, index.h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), index.h("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) }, array_utils.createArrayRange(1, this.pagination.totalPages).map(page => (index.h("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (index.h(Fragment.Fragment, null, this.pagination.pages.map(page => (index.h("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page, '')))), this.pagination.totalPages ? (index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, index.h("span", { class: PaginationClass.inner }, index.h("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), index.h("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) }, index.h("option", { selected: true, hidden: true }, "..."), array_utils.createArrayRange(1, this.pagination.totalPages).map(page => (index.h("option", { value: page, selected: false }, page))))))) : null)), index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, index.h("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }), this.labelNext)), index.h("li", { class: template.prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, index.h("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" }), this.labelEnd))))));
174
176
  }
175
177
  onClickHandler(e, page) {
176
178
  e.stopPropagation();
@@ -1 +1 @@
1
- {"file":"gov-pagination.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;AAKO,MAAM,eAAe,GAAGA,UAAI,CAACC,WAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGjD,MAAM,kBAAkB,GAAGD,UAAI,CAACE,iBAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAA;AAG1E,IAAY,eAGX;AAHD,WAAY,eAAe;IAC1B,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;AAClB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAGM,MAAM,eAAe,GAAG;IAC9B,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,sBAAsB;IAC5B,SAAS,EAAE,6BAA6B;IACxC,QAAQ,EAAE,4B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AA;aACF;SACD;KACD;;;;IAMD,MAAM,YAAY;QACjBK,qBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,iBAAiB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;QAC7EC,sBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;KAC5E;;;;;;;;;;;;;;;;","names":["pick","Sizes","Variants","govHost","createID","validateProp","canValidateWcagOnRender","delay","toBoolAttrIfDefined","h","Host","prepareClasses","createArrayRange","Fragment","validateWcagProp","validateWcagLabel"],"sources":["../../../packages/core/src/components/gov-pagination/constants.ts","../../../packages/core/src/components/gov-pagination/pagination.ts","../../../packages/core/src/components/gov-pagination/gov-pagination.scss?tag=gov-pagination","../../../packages/core/src/components/gov-pagination/gov-pagination.tsx"],"sourcesContent":["import { Sizes } from '../../core/constants/sizes'\nimport { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const PaginationSizes = pick(Sizes, ['_S', '_M'])\nexport type PaginationSizeType = `${ValueOf<typeof PaginationSizes>}`\n\nexport const PaginationVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type PaginationVariantType = `${ValueOf<typeof PaginationVariants>}`\n\nexport enum PaginationTypes {\n\tBUTTON = 'button',\n\tSELECT = 'select',\n}\nexport type PaginationType = `${ValueOf<typeof PaginationTypes>}`\n\nexport const PaginationClass = {\n\troot: 'gov-pagination',\n\tlist: 'gov-pagination__list',\n\titem: 'gov-pagination__item',\n\titemArrow: 'gov-pagination__item--arrow',\n\titemMore: 'gov-pagination__item--more',\n\titemSelect: 'gov-pagination__item--select',\n\tinner: 'gov-pagination__inner',\n\tarrow: 'gov-pagination__arrow',\n}\n","export interface Pagination {\n\ttotalItems: number\n\tcurrentPage: number\n\tpageSize: number\n\ttotalPages: number\n\tstartPage: number\n\tendPage: number\n\tstartIndex: number\n\tendIndex: number\n\tpages: number[]\n}\n\nexport function paginate(totalItems: number, currentPage = 1, pageSize = 10, maxPages = 10): Pagination {\n\t// calculate total pages\n\tconst totalPages = Math.ceil(totalItems / pageSize)\n\n\t// ensure current page isn't out of range\n\tif (currentPage < 1) {\n\t\tcurrentPage = 1\n\t} else if (currentPage > totalPages) {\n\t\tcurrentPage = totalPages\n\t}\n\n\tlet startPage: number, endPage: number\n\tif (totalPages <= maxPages) {\n\t\t// total pages less than max so show all pages\n\t\tstartPage = 1\n\t\tendPage = totalPages\n\t} else {\n\t\t// total pages more than max so calculate start and end pages\n\t\tconst maxPagesBeforeCurrentPage = Math.floor(maxPages / 2)\n\t\tconst maxPagesAfterCurrentPage = Math.ceil(maxPages / 2) - 1\n\t\tif (currentPage <= maxPagesBeforeCurrentPage) {\n\t\t\t// current page near the start\n\t\t\tstartPage = 1\n\t\t\tendPage = maxPages\n\t\t} else if (currentPage + maxPagesAfterCurrentPage >= totalPages) {\n\t\t\t// current page near the end\n\t\t\tstartPage = totalPages - maxPages + 1\n\t\t\tendPage = totalPages\n\t\t} else {\n\t\t\t// current page somewhere in the middle\n\t\t\tstartPage = currentPage - maxPagesBeforeCurrentPage\n\t\t\tendPage = currentPage + maxPagesAfterCurrentPage\n\t\t}\n\t}\n\n\t// calculate start and end item indexes\n\tconst startIndex = (currentPage - 1) * pageSize\n\tconst endIndex = Math.min(startIndex + pageSize - 1, totalItems - 1)\n\n\t// create an array of pages to ng-repeat in the pager control\n\tconst pages = Array.from(Array(endPage + 1 - startPage).keys()).map(i => startPage + i)\n\n\t// return object with all pager properties required by the view\n\treturn {\n\t\ttotalItems: totalItems,\n\t\tcurrentPage: currentPage,\n\t\tpageSize: pageSize,\n\t\ttotalPages: totalPages,\n\t\tstartPage: startPage,\n\t\tendPage: endPage,\n\t\tstartIndex: startIndex,\n\t\tendIndex: endIndex,\n\t\tpages: pages,\n\t}\n}\n","/*\n * Pagination\n */\n\n$class: \".gov-pagination\";\n\n#{$class} {\n\t@include base();\n\t&__list {\n\t\t@extend %reset-ul;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex-wrap: wrap;\n\t\tfont-weight: bold;\n\t\ttext-align: center;\n\t}\n\t&__list &__item {\n\t\t@extend %reset-ul-li;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tmargin: 0;\n\t\tpadding: rem-calc(2);\n\t\tborder-radius: $border-radius;\n\t\toverflow: hidden;\n\t\t&--arrow {\n\t\t\tdisplay: flex;\n\t\t}\n\t\t&--select {\n\t\t\tz-index: 1;\n\t\t\tdisplay: flex;\n\t\t\toverflow: visible;\n\t\t\tpadding: rem-calc(0 16);\n\t\t}\n\t}\n\t&__arrow {\n\t\tmargin: 0;\n\t}\n\t&__item--more {\n\t\t.gov-form-select {\n\t\t\tselect {\n\t\t\t\tborder: none !important;\n\t\t\t\tpadding-right: rem-calc(12) !important;\n\t\t\t}\n\t\t\t.gov-icon {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n\t&__inner {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\talign-self: stretch;\n\t\twidth: 100%;\n\t\ttext-decoration: none;\n\t\t// Use hover styles from gov-button to active page button\n\t\t&[wcag-current=\"true\"] {\n\t\t\t@each $variant, $types in $button-variants {\n\t\t\t\t@each $type, $definitions in $types {\n\t\t\t\t\t&[type=\"#{$type}\"][variant=\"#{$variant}\"] {\n\t\t\t\t\t\t.element {\n\t\t\t\t\t\t\tbackground-color: deep-map-get($button-variants, $variant, $type, \"hover-bg\");\n\t\t\t\t\t\t\tcolor: deep-map-get($button-variants, $variant, $type, \"hover-color\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $pagination-sizes {\n\t\t&[size=\"#{$size}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__inner {\n\t\t\t\t\t@include typography(get(\"font\", $definitions));\n\t\t\t\t\tfont-weight: inherit;\n\t\t\t\t\t.element {\n\t\t\t\t\t\tmin-width: get(\"button-size\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import Fragment from \"../../helpers/Fragment\"\nimport {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tPaginationClass,\n\tPaginationSizes,\n\tPaginationSizeType,\n\tPaginationType,\n\tPaginationTypes,\n\tPaginationVariants,\n\tPaginationVariantType,\n} from \"./constants\"\nimport {govHost, prepareClasses, toBoolAttrIfDefined} from \"../../helpers/Dom/template\"\nimport {paginate, Pagination} from \"./pagination\"\nimport {validateWcagLabel, validateWcagProp} from \"../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../helpers/Dom/win\"\nimport {delay} from \"../../utils/utils\"\nimport {createID} from \"../../utils/string.utils\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {createArrayRange} from \"../../utils/array.utils\"\nimport {FormSelectEvent} from \"../gov-form/select/gov-form-select.types\"\nimport {PaginationEvent} from \"./gov-pagination.types\"\n\n@Component({\n\ttag: \"gov-pagination\",\n\tstyleUrl: \"gov-pagination.scss\",\n})\nexport class GovPagination {\n\tprivate h: GovHost\n\tprivate readonly pageSelectId: string\n\n\tprivate spreadSelectRef?: HTMLGovFormSelectElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.pageSelectId = createID(\"GovPageSelect\")\n\t}\n\n\t@Element() readonly host: HTMLGovPaginationElement\n\t/**\n\t * Pagination type\n\t */\n\t@Prop() readonly type: PaginationType = \"button\"\n\t/**\n\t * Currently displayed page\n\t */\n\t@Prop() readonly current: number = 1\n\t/**\n\t * Total count of entries\n\t */\n\t@Prop() readonly total: number = 0\n\t/**\n\t * Set on active page\n\t */\n\t@Prop() readonly inverse: boolean\n\t/**\n\t * Pagination's size\n\t */\n\t@Prop() readonly size?: PaginationSizeType = \"m\"\n\t/**\n\t * Style variation of the pagination.\n\t */\n\t@Prop() readonly variant?: PaginationVariantType = \"primary\"\n\t/**\n\t * Maximum number of entries per page\n\t */\n\t@Prop({attribute: \"page-size\"}) readonly pageSize: number = 10\n\t/**\n\t * Maximum pages displayed for selection\n\t */\n\t@Prop({attribute: \"max-pages\"}) readonly maxPages: number = 5\n\t/**\n\t * Setting a link to redirect to a given page.\n\t * The {PAGE} wildcard can be used in the link to replace the page number.\n\t * Note that in the case of paging through a link, it is always necessary to send to the component the current page where the user is.\n\t */\n\t@Prop() readonly link: string\n\t/**\n\t * Adds accessible label for the pagination that is only shown for screen readers.\n\t */\n\t@Prop({attribute: \"wcag-label\"}) readonly wcagLabel: string\n\t/**\n\t * Indicates the id of a component that labels the pagination.\n\t */\n\t@Prop({attribute: \"wcag-labelled-by\"}) readonly wcagLabelledBy: string\n\t/**\n\t * Adds accessible label for the page select\n\t */\n\t@Prop({attribute: \"wcag-select-label\"}) readonly wcagSelectLabel: string = \"Vybrat stranu\"\n\t/**\n\t * Adds accessible label for the page item\n\t */\n\t@Prop({attribute: \"wcag-page-label\"}) readonly wcagPageLabel: string = \"Strana\"\n\t/**\n\t * Description of the possibility to go back one page\n\t */\n\t@Prop({attribute: \"label-prev\"}) readonly labelPrev = 'Přejít o stranu zpět'\n\t/**\n\t * Description of the option to go to the top of paging\n\t */\n\t@Prop({attribute: \"label-start\"}) readonly labelStart = 'Přejít na začátek'\n\t/**\n\t * Description of the option to go to the end of paging\n\t */\n\t@Prop({attribute: \"label-next\"}) readonly labelNext = 'Přejít na další stranu'\n\t/**\n\t * Description of the option to move one page forward\n\t */\n\t@Prop({attribute: \"label-end\"}) readonly labelEnd = 'Přejít na konec'\n\t/**\n\t * Event called when changing the page with the current setting of the whole paging\n\t */\n\t@Event({eventName: \"gov-page\"}) govPage: EventEmitter<PaginationEvent>\n\n\t@State() pagination: Pagination\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(PaginationTypes, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(PaginationSizes, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(PaginationVariants, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"current\")\n\t@Watch(\"total\")\n\t@Watch(\"pageSize\")\n\t@Watch(\"maxPages\")\n\trecalculate(): void {\n\t\tthis.recalculatePagination(this.current)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.recalculatePagination(this.current)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateVariant(this.variant)\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 recalculatePagination(currentPage: number) {\n\t\tthis.pagination = paginate(this.total, currentPage, this.pageSize, this.maxPages)\n\t}\n\n\tprivate isActivePageClass(originalClass: string, page: number) {\n\t\tif (this.pagination.currentPage === page) {\n\t\t\treturn originalClass + \" is-active\"\n\t\t} else {\n\t\t\treturn originalClass\n\t\t}\n\t}\n\n\tprivate prepareLinkUrl(page: number) {\n\t\tif (this.link) {\n\t\t\treturn String(this.link).replace(\"{PAGE}\", String(page))\n\t\t}\n\t\treturn undefined\n\t}\n\n\tprivate resetSelectValue() {\n\t\tif (this.spreadSelectRef) {\n\t\t\tthis.spreadSelectRef.getRef()\n\t\t\t\t.then((el: HTMLSelectElement) => {\n\t\t\t\t\tel.value = '...'\n\t\t\t\t})\n\t\t}\n\t}\n\n\trender() {\n\t\tconst pageResolver = (page: number, content: any, description: string) => {\n\t\t\tconst isDisabled = page === -1\n\t\t\tconst ariaCurrent = toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined)\n\t\t\treturn (\n\t\t\t\t<gov-button\n\t\t\t\t\thref={this.prepareLinkUrl(page)}\n\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\ton-gov-click={(e) => this.onClickHandler(e, page)}\n\t\t\t\t\twcag-label={description ? description : page > -1 ? this.wcagPageLabel + \" \" + page : undefined}\n\t\t\t\t\twcag-current={ariaCurrent}\n\t\t\t\t\tclass={PaginationClass.inner}>\n\t\t\t\t\t{content}\n\t\t\t\t</gov-button>\n\t\t\t)\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(PaginationClass.root)} type={this.type} variant={this.variant} size={this.size}>\n\t\t\t\t<nav aria-label={this.wcagLabel} aria-labelledby={this.wcagLabelledBy}>\n\t\t\t\t\t<ul class={PaginationClass.list}>\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.currentPage > 1 ? 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-double-left\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelStart\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-left\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelPrev\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t{this.type == \"select\" ? (\n\t\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemSelect])}>\n\t\t\t\t\t\t\t\t<span class={PaginationClass.inner}>\n\t\t\t\t\t\t\t\t\t<span id={this.pageSelectId} hidden>\n\t\t\t\t\t\t\t\t\t\t{this.wcagSelectLabel}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<gov-form-select\n\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\t\t\t\twcag-labelled-by={this.pageSelectId}\n\t\t\t\t\t\t\t\t\t\ton-gov-change={this.onSelectHandler.bind(this)}>\n\t\t\t\t\t\t\t\t\t\t{createArrayRange(1, this.pagination.totalPages).map(page => (\n\t\t\t\t\t\t\t\t\t\t\t<option value={page} selected={this.pagination.currentPage === page}>\n\t\t\t\t\t\t\t\t\t\t\t\t{page}\n\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</gov-form-select>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t{this.pagination.pages.map(page => (\n\t\t\t\t\t\t\t\t\t<li class={this.isActivePageClass(PaginationClass.item, page)}>{pageResolver(page, page, '')}</li>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t{this.pagination.totalPages ? (\n\t\t\t\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemMore])}>\n\t\t\t\t\t\t\t\t\t<span class={PaginationClass.inner}>\n\t\t\t\t\t\t\t\t\t\t<span id={this.pageSelectId} hidden>\n\t\t\t\t\t\t\t\t\t\t\t{this.wcagSelectLabel}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<gov-form-select\n\t\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\t\t\t\t\twcag-labelled-by={this.pageSelectId}\n\t\t\t\t\t\t\t\t\t\t\tref={el => (this.spreadSelectRef = el as HTMLGovFormSelectElement)}\n\t\t\t\t\t\t\t\t\t\t\ton-gov-change={this.onSelectHandler.bind(this)}>\n\t\t\t\t\t\t\t\t\t\t\t<option selected hidden>...</option>\n\t\t\t\t\t\t\t\t\t\t\t{createArrayRange(1, this.pagination.totalPages).map(page => (\n\t\t\t\t\t\t\t\t\t\t\t\t<option value={page} selected={false}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{page}\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-select>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-right\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelNext\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-double-right\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelEnd\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: CustomEvent, page: number): void {\n\t\te.stopPropagation()\n\t\tthis.recalculatePagination(page)\n\t\tthis.govPage.emit({\n\t\t\tcomponent: PaginationClass.root,\n\t\t\tpagination: this.pagination\n\t\t})\n\t}\n\n\tprivate onSelectHandler(e: CustomEvent<FormSelectEvent>): void {\n\t\te.stopPropagation()\n\t\tconst value = e.detail.value\n\t\tconst page = parseInt(value)\n\t\tthis.resetSelectValue()\n\t\tif (isNaN(page) === false) {\n\t\t\tthis.recalculatePagination(page)\n\t\t\tif (this.link) {\n\t\t\t\twindow.location.href = this.prepareLinkUrl(page)\n\t\t\t} else {\n\t\t\t\tthis.govPage.emit({\n\t\t\t\t\tcomponent: PaginationClass.root,\n\t\t\t\t\tpagination: this.pagination\n\t\t\t\t})\n\t\t\t}\n\t\t}\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.wcagPageLabel, \"wcag-page-label\", PaginationClass.root)\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, PaginationClass.root)\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-pagination.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;AAKO,MAAM,eAAe,GAAGA,UAAI,CAACC,WAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAGjD,MAAM,kBAAkB,GAAGD,UAAI,CAACE,iBAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAA;AAG1E,IAAY,eAGX;AAHD,WAAY,eAAe;IAC1B,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;AAClB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAGM,MAAM,eAAe,GAAG;IAC9B,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,sBAAsB;IAC5B,SAAS,EAAE,6BAA6B;IACxC,QAAQ,EAAE,4BAA4B;IACtC,UAAU,EAAE,8BA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AC,IAAI,CAAC,CAAA;aAChD;iBAAM;gBACN,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;oBACjB,SAAS,EAAE,eAAe,CAAC,IAAI;oBAC/B,UAAU,EAAE,IAAI,CAAC,UAAU;iBAC3B,CAAC,CAAA;aACF;SACD;KACD;;;;IAMD,MAAM,YAAY;QACjBK,qBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,iBAAiB,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;QAC7EC,sBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,IAAI,CAAC,CAAA;KAC5E;;;;;;;;;;;;;;;;","names":["pick","Sizes","Variants","govHost","createID","validateProp","canValidateWcagOnRender","delay","toBoolAttrIfDefined","h","Host","prepareClasses","createArrayRange","Fragment","validateWcagProp","validateWcagLabel"],"sources":["../../../packages/core/src/components/gov-pagination/constants.ts","../../../packages/core/src/components/gov-pagination/pagination.ts","../../../packages/core/src/components/gov-pagination/gov-pagination.scss?tag=gov-pagination","../../../packages/core/src/components/gov-pagination/gov-pagination.tsx"],"sourcesContent":["import { Sizes } from '../../core/constants/sizes'\nimport { Variants } from '../../core/constants/variants'\nimport { pick } from '../../utils/utils'\nimport { ValueOf } from '../../types/interfaces'\n\nexport const PaginationSizes = pick(Sizes, ['_S', '_M'])\nexport type PaginationSizeType = `${ValueOf<typeof PaginationSizes>}`\n\nexport const PaginationVariants = pick(Variants, ['PRIMARY', 'SECONDARY'])\nexport type PaginationVariantType = `${ValueOf<typeof PaginationVariants>}`\n\nexport enum PaginationTypes {\n\tBUTTON = 'button',\n\tSELECT = 'select',\n}\nexport type PaginationType = `${ValueOf<typeof PaginationTypes>}`\n\nexport const PaginationClass = {\n\troot: 'gov-pagination',\n\tlist: 'gov-pagination__list',\n\titem: 'gov-pagination__item',\n\titemArrow: 'gov-pagination__item--arrow',\n\titemMore: 'gov-pagination__item--more',\n\titemSelect: 'gov-pagination__item--select',\n\tinner: 'gov-pagination__inner',\n\tarrow: 'gov-pagination__arrow',\n}\n","export interface Pagination {\n\ttotalItems: number\n\tcurrentPage: number\n\tpageSize: number\n\ttotalPages: number\n\tstartPage: number\n\tendPage: number\n\tstartIndex: number\n\tendIndex: number\n\tpages: number[]\n}\n\nexport function paginate(totalItems: number, currentPage = 1, pageSize = 10, maxPages = 10): Pagination {\n\t// calculate total pages\n\tconst totalPages = Math.ceil(totalItems / pageSize)\n\n\t// ensure current page isn't out of range\n\tif (currentPage < 1) {\n\t\tcurrentPage = 1\n\t} else if (currentPage > totalPages) {\n\t\tcurrentPage = totalPages\n\t}\n\n\tlet startPage: number, endPage: number\n\tif (totalPages <= maxPages) {\n\t\t// total pages less than max so show all pages\n\t\tstartPage = 1\n\t\tendPage = totalPages\n\t} else {\n\t\t// total pages more than max so calculate start and end pages\n\t\tconst maxPagesBeforeCurrentPage = Math.floor(maxPages / 2)\n\t\tconst maxPagesAfterCurrentPage = Math.ceil(maxPages / 2) - 1\n\t\tif (currentPage <= maxPagesBeforeCurrentPage) {\n\t\t\t// current page near the start\n\t\t\tstartPage = 1\n\t\t\tendPage = maxPages\n\t\t} else if (currentPage + maxPagesAfterCurrentPage >= totalPages) {\n\t\t\t// current page near the end\n\t\t\tstartPage = totalPages - maxPages + 1\n\t\t\tendPage = totalPages\n\t\t} else {\n\t\t\t// current page somewhere in the middle\n\t\t\tstartPage = currentPage - maxPagesBeforeCurrentPage\n\t\t\tendPage = currentPage + maxPagesAfterCurrentPage\n\t\t}\n\t}\n\n\t// calculate start and end item indexes\n\tconst startIndex = (currentPage - 1) * pageSize\n\tconst endIndex = Math.min(startIndex + pageSize - 1, totalItems - 1)\n\n\t// create an array of pages to ng-repeat in the pager control\n\tconst pages = Array.from(Array(endPage + 1 - startPage).keys()).map(i => startPage + i)\n\n\t// return object with all pager properties required by the view\n\treturn {\n\t\ttotalItems: totalItems,\n\t\tcurrentPage: currentPage,\n\t\tpageSize: pageSize,\n\t\ttotalPages: totalPages,\n\t\tstartPage: startPage,\n\t\tendPage: endPage,\n\t\tstartIndex: startIndex,\n\t\tendIndex: endIndex,\n\t\tpages: pages,\n\t}\n}\n","/*\n * Pagination\n */\n\n$class: \".gov-pagination\";\n\n#{$class} {\n\t@include base();\n\t&__list {\n\t\t@extend %reset-ul;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex-wrap: wrap;\n\t\tfont-weight: bold;\n\t\ttext-align: center;\n\t}\n\t&__list &__item {\n\t\t@extend %reset-ul-li;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tmargin: 0;\n\t\tpadding: rem-calc(2);\n\t\tborder-radius: $border-radius;\n\t\toverflow: hidden;\n\t\t&--arrow {\n\t\t\tdisplay: flex;\n\t\t}\n\t\t&--select {\n\t\t\tz-index: 1;\n\t\t\tdisplay: flex;\n\t\t\toverflow: visible;\n\t\t\tpadding: rem-calc(0 16);\n\t\t}\n\t}\n\t&__arrow {\n\t\tmargin: 0;\n\t}\n\t&__item--more {\n\t\t.gov-form-select {\n\t\t\tselect {\n\t\t\t\tborder: none !important;\n\t\t\t\tpadding-right: rem-calc(12) !important;\n\t\t\t}\n\t\t\t.gov-icon {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n\t&__inner {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\talign-self: stretch;\n\t\twidth: 100%;\n\t\ttext-decoration: none;\n\t\t// Use hover styles from gov-button to active page button\n\t\t&[wcag-current=\"true\"] {\n\t\t\t@each $variant, $types in $button-variants {\n\t\t\t\t@each $type, $definitions in $types {\n\t\t\t\t\t&[type=\"#{$type}\"][variant=\"#{$variant}\"] {\n\t\t\t\t\t\t.element {\n\t\t\t\t\t\t\tbackground-color: deep-map-get($button-variants, $variant, $type, \"hover-bg\");\n\t\t\t\t\t\t\tcolor: deep-map-get($button-variants, $variant, $type, \"hover-color\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $size, $definitions in $pagination-sizes {\n\t\t&[size=\"#{$size}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__inner {\n\t\t\t\t\t@include typography(get(\"font\", $definitions));\n\t\t\t\t\tfont-weight: inherit;\n\t\t\t\t\t.element {\n\t\t\t\t\t\tmin-width: get(\"button-size\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","import Fragment from \"../../helpers/Fragment\"\nimport {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {\n\tPaginationClass,\n\tPaginationSizes,\n\tPaginationSizeType,\n\tPaginationType,\n\tPaginationTypes,\n\tPaginationVariants,\n\tPaginationVariantType,\n} from \"./constants\"\nimport {govHost, prepareClasses, toBoolAttrIfDefined} from \"../../helpers/Dom/template\"\nimport {paginate, Pagination} from \"./pagination\"\nimport {validateWcagLabel, validateWcagProp} from \"../../helpers/Validate/wcag\"\nimport {canValidateWcagOnRender} from \"../../helpers/Dom/win\"\nimport {delay} from \"../../utils/utils\"\nimport {createID} from \"../../utils/string.utils\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {createArrayRange} from \"../../utils/array.utils\"\nimport {FormSelectEvent} from \"../gov-form/select/gov-form-select.types\"\nimport {PaginationEvent} from \"./gov-pagination.types\"\n\n@Component({\n\ttag: \"gov-pagination\",\n\tstyleUrl: \"gov-pagination.scss\",\n})\nexport class GovPagination {\n\tprivate h: GovHost\n\tprivate readonly pageSelectId: string\n\tprivate readonly selectId: string\n\n\tprivate spreadSelectRef?: HTMLGovFormSelectElement\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.pageSelectId = createID(\"GovPageSelect\")\n\t\tthis.selectId = createID(\"GovSelect\")\n\t}\n\n\t@Element() readonly host: HTMLGovPaginationElement\n\t/**\n\t * Pagination type\n\t */\n\t@Prop() readonly type: PaginationType = \"button\"\n\t/**\n\t * Currently displayed page\n\t */\n\t@Prop() readonly current: number = 1\n\t/**\n\t * Total count of entries\n\t */\n\t@Prop() readonly total: number = 0\n\t/**\n\t * Set on active page\n\t */\n\t@Prop() readonly inverse: boolean\n\t/**\n\t * Custom select identifier.\n\t */\n\t@Prop({attribute: 'select-identifier'}) readonly selectIdentifier: string\n\t/**\n\t * Pagination's size\n\t */\n\t@Prop() readonly size?: PaginationSizeType = \"m\"\n\t/**\n\t * Style variation of the pagination.\n\t */\n\t@Prop() readonly variant?: PaginationVariantType = \"primary\"\n\t/**\n\t * Maximum number of entries per page\n\t */\n\t@Prop({attribute: \"page-size\"}) readonly pageSize: number = 10\n\t/**\n\t * Maximum pages displayed for selection\n\t */\n\t@Prop({attribute: \"max-pages\"}) readonly maxPages: number = 5\n\t/**\n\t * Setting a link to redirect to a given page.\n\t * The {PAGE} wildcard can be used in the link to replace the page number.\n\t * Note that in the case of paging through a link, it is always necessary to send to the component the current page where the user is.\n\t */\n\t@Prop() readonly link: string\n\t/**\n\t * Adds accessible label for the pagination that is only shown for screen readers.\n\t */\n\t@Prop({attribute: \"wcag-label\"}) readonly wcagLabel: string\n\t/**\n\t * Indicates the id of a component that labels the pagination.\n\t */\n\t@Prop({attribute: \"wcag-labelled-by\"}) readonly wcagLabelledBy: string\n\t/**\n\t * Adds accessible label for the page select\n\t */\n\t@Prop({attribute: \"wcag-select-label\"}) readonly wcagSelectLabel: string = \"Vybrat stranu\"\n\t/**\n\t * Adds accessible label for the page item\n\t */\n\t@Prop({attribute: \"wcag-page-label\"}) readonly wcagPageLabel: string = \"Strana\"\n\t/**\n\t * Description of the possibility to go back one page\n\t */\n\t@Prop({attribute: \"label-prev\"}) readonly labelPrev = 'Přejít o stranu zpět'\n\t/**\n\t * Description of the option to go to the top of paging\n\t */\n\t@Prop({attribute: \"label-start\"}) readonly labelStart = 'Přejít na začátek'\n\t/**\n\t * Description of the option to go to the end of paging\n\t */\n\t@Prop({attribute: \"label-next\"}) readonly labelNext = 'Přejít na další stranu'\n\t/**\n\t * Description of the option to move one page forward\n\t */\n\t@Prop({attribute: \"label-end\"}) readonly labelEnd = 'Přejít na konec'\n\t/**\n\t * Event called when changing the page with the current setting of the whole paging\n\t */\n\t@Event({eventName: \"gov-page\"}) govPage: EventEmitter<PaginationEvent>\n\n\t@State() pagination: Pagination\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(PaginationTypes, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"size\")\n\tvalidateSize(newValue: string): void {\n\t\tvalidateProp(PaginationSizes, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(PaginationVariants, newValue, PaginationClass.root)\n\t}\n\n\t@Watch(\"current\")\n\t@Watch(\"total\")\n\t@Watch(\"pageSize\")\n\t@Watch(\"maxPages\")\n\trecalculate(): void {\n\t\tthis.recalculatePagination(this.current)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.recalculatePagination(this.current)\n\t\tthis.validateSize(this.size)\n\t\tthis.validateVariant(this.variant)\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 recalculatePagination(currentPage: number) {\n\t\tthis.pagination = paginate(this.total, currentPage, this.pageSize, this.maxPages)\n\t}\n\n\tprivate isActivePageClass(originalClass: string, page: number) {\n\t\tif (this.pagination.currentPage === page) {\n\t\t\treturn originalClass + \" is-active\"\n\t\t} else {\n\t\t\treturn originalClass\n\t\t}\n\t}\n\n\tprivate prepareLinkUrl(page: number) {\n\t\tif (this.link) {\n\t\t\treturn String(this.link).replace(\"{PAGE}\", String(page))\n\t\t}\n\t\treturn undefined\n\t}\n\n\tprivate resetSelectValue() {\n\t\tif (this.spreadSelectRef) {\n\t\t\tthis.spreadSelectRef.getRef()\n\t\t\t\t.then((el: HTMLSelectElement) => {\n\t\t\t\t\tel.value = '...'\n\t\t\t\t})\n\t\t}\n\t}\n\n\trender() {\n\t\tconst pageResolver = (page: number, content: any, description: string) => {\n\t\t\tconst isDisabled = page === -1\n\t\t\tconst ariaCurrent = toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined)\n\t\t\treturn (\n\t\t\t\t<gov-button\n\t\t\t\t\thref={this.prepareLinkUrl(page)}\n\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\ttype=\"base\"\n\t\t\t\t\tdisabled={isDisabled}\n\t\t\t\t\ton-gov-click={(e) => this.onClickHandler(e, page)}\n\t\t\t\t\twcag-label={description ? description : page > -1 ? this.wcagPageLabel + \" \" + page : undefined}\n\t\t\t\t\twcag-current={ariaCurrent}\n\t\t\t\t\tclass={PaginationClass.inner}>\n\t\t\t\t\t{content}\n\t\t\t\t</gov-button>\n\t\t\t)\n\t\t}\n\t\treturn (\n\t\t\t<Host class={this.h.classes(PaginationClass.root)} type={this.type} variant={this.variant} size={this.size}>\n\t\t\t\t<nav aria-label={this.wcagLabel} aria-labelledby={this.wcagLabelledBy}>\n\t\t\t\t\t<ul class={PaginationClass.list}>\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.currentPage > 1 ? 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-double-left\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelStart\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-left\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelPrev\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t{this.type == \"select\" ? (\n\t\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemSelect])}>\n\t\t\t\t\t\t\t\t<span class={PaginationClass.inner}>\n\t\t\t\t\t\t\t\t\t<span id={this.pageSelectId} hidden>\n\t\t\t\t\t\t\t\t\t\t{this.wcagSelectLabel}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<gov-form-select\n\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\t\t\t\tidentifier={this.selectIdentifier || this.selectId}\n\t\t\t\t\t\t\t\t\t\twcag-labelled-by={this.pageSelectId}\n\t\t\t\t\t\t\t\t\t\ton-gov-change={this.onSelectHandler.bind(this)}>\n\t\t\t\t\t\t\t\t\t\t{createArrayRange(1, this.pagination.totalPages).map(page => (\n\t\t\t\t\t\t\t\t\t\t\t<option value={page} selected={this.pagination.currentPage === page}>\n\t\t\t\t\t\t\t\t\t\t\t\t{page}\n\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</gov-form-select>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t{this.pagination.pages.map(page => (\n\t\t\t\t\t\t\t\t\t<li class={this.isActivePageClass(PaginationClass.item, page)}>{pageResolver(page, page, '')}</li>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t{this.pagination.totalPages ? (\n\t\t\t\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemMore])}>\n\t\t\t\t\t\t\t\t\t<span class={PaginationClass.inner}>\n\t\t\t\t\t\t\t\t\t\t<span id={this.pageSelectId} hidden>\n\t\t\t\t\t\t\t\t\t\t\t{this.wcagSelectLabel}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<gov-form-select\n\t\t\t\t\t\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\t\t\t\t\tidentifier={this.selectIdentifier || this.selectId}\n\t\t\t\t\t\t\t\t\t\t\twcag-labelled-by={this.pageSelectId}\n\t\t\t\t\t\t\t\t\t\t\tref={el => (this.spreadSelectRef = el as HTMLGovFormSelectElement)}\n\t\t\t\t\t\t\t\t\t\t\ton-gov-change={this.onSelectHandler.bind(this)}>\n\t\t\t\t\t\t\t\t\t\t\t<option selected hidden>...</option>\n\t\t\t\t\t\t\t\t\t\t\t{createArrayRange(1, this.pagination.totalPages).map(page => (\n\t\t\t\t\t\t\t\t\t\t\t\t<option value={page} selected={false}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{page}\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t</gov-form-select>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-right\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelNext\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<li class={prepareClasses([PaginationClass.item, PaginationClass.itemArrow])}>\n\t\t\t\t\t\t\t{pageResolver(\n\t\t\t\t\t\t\t\tthis.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1,\n\t\t\t\t\t\t\t\t<gov-icon class={PaginationClass.arrow} name=\"chevron-double-right\"></gov-icon>,\n\t\t\t\t\t\t\t\tthis.labelEnd\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate onClickHandler(e: CustomEvent, page: number): void {\n\t\te.stopPropagation()\n\t\tthis.recalculatePagination(page)\n\t\tthis.govPage.emit({\n\t\t\tcomponent: PaginationClass.root,\n\t\t\tpagination: this.pagination\n\t\t})\n\t}\n\n\tprivate onSelectHandler(e: CustomEvent<FormSelectEvent>): void {\n\t\te.stopPropagation()\n\t\tconst value = e.detail.value\n\t\tconst page = parseInt(value)\n\t\tthis.resetSelectValue()\n\t\tif (isNaN(page) === false) {\n\t\t\tthis.recalculatePagination(page)\n\t\t\tif (this.link) {\n\t\t\t\twindow.location.href = this.prepareLinkUrl(page)\n\t\t\t} else {\n\t\t\t\tthis.govPage.emit({\n\t\t\t\t\tcomponent: PaginationClass.root,\n\t\t\t\t\tpagination: this.pagination\n\t\t\t\t})\n\t\t\t}\n\t\t}\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.wcagPageLabel, \"wcag-page-label\", PaginationClass.root)\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, PaginationClass.root)\n\t}\n}\n"],"version":3}
@@ -25,8 +25,14 @@ const GovTabsItem = class {
25
25
  this.contentId = string_utils.createID('GovTabContent');
26
26
  this.triggerId = string_utils.createID('GovTabTrigger');
27
27
  }
28
+ rerenderParent() {
29
+ const element = this.h.getParent(constants.TabsClass.root);
30
+ if (element) {
31
+ element.rerender().catch();
32
+ }
33
+ }
28
34
  render() {
29
- return (index.h(index.Host, { key: '76d5b1152d766c4ec9f810e011cbb54fbb614b83', class: this.h.classes(constants.TabsItemClass.root), default: this.default }, index.h("div", { key: 'beffe50be2fe641def7fe2d1464dad4c00739072', class: constants.TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": template.toBoolAttrIfDefined(!this.isActive) }, index.h("slot", { key: 'd788632dcc88e04112068e3dcf17c52737770255' }))));
35
+ return (index.h(index.Host, { key: 'b316d961cabc1aed647deaa504ddca1184860f70', class: this.h.classes(constants.TabsItemClass.root), default: this.default }, index.h("div", { key: 'd73aa35cc5131b81eaceff6afab13250b2587aec', class: constants.TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": template.toBoolAttrIfDefined(!this.isActive) }, index.h("slot", { key: '4bdf7cd566204ab3ac1883a5194abce6526fc0f0' }))));
30
36
  }
31
37
  /**
32
38
  * Returns a unique tab content identifier
@@ -53,6 +59,11 @@ const GovTabsItem = class {
53
59
  this.isActive = status;
54
60
  }
55
61
  get host() { return index.getElement(this); }
62
+ static get watchers() { return {
63
+ "label": ["rerenderParent"],
64
+ "disabled": ["rerenderParent"],
65
+ "default": ["rerenderParent"]
66
+ }; }
56
67
  };
57
68
  GovTabsItem.style = GovTabsItemStyle0;
58
69
 
@@ -1 +1 @@
1
- {"file":"gov-tabs-item.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,cAAc,GAAG,2dAA2d,CAAC;AACnf,0BAAe,cAAc;;MCUhB,WAAW;IAKvB;;;;;wBAsBoD,KAAK;uBAIrB,KAAK;wBACrB,KAAK;QA1BxB,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,SAAS,GAAGC,qBAAQ,CAAC,eAAe,CAAC,CAAA;QAC1C,IAAI,CAAC,SAAS,GAAGA,qBAAQ,CAAC,eAAe,CAAC,CAAA;KAC1C;IAyBD,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACC,uBAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IACrEF,kEACC,KAAK,EAAEE,uBAAa,CAAC,KAAK,EAC1B,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,EACrC,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,qBACL,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,SAAS,iBAC5CC,4BAAmB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAEhDH,oEAAa,CACR,CACA,EACP;KACD;;;;IAMD,MAAM,aAAa;QAClB,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,CAAA;KACxC;;;;IAMD,MAAM,oBAAoB;QACzB,OAAO,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,SAAS,CAAA;KAC/C;;;;IAMD,MAAM,eAAe;QACpB,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;IAMD,MAAM,eAAe,CAAC,MAAe;QACpC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAA;KACtB;;;;;;;","names":["govHost","createID","h","Host","TabsItemClass","toBoolAttrIfDefined"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs-item.scss?tag=gov-tabs-item","../../../packages/core/src/components/gov-tabs/gov-tabs-item.tsx"],"sourcesContent":["/*\n * Tabs - Item\n */\n\n$class: \".gov-tabs-item\";\n\n#{$class} {\n\tcolor: $tabs-text-color;\n\t&__inner {\n\t\t@include reset-last-margin();\n\t}\n}\n","import { Component, Element, h, Host, Method, Prop, State } from \"@stencil/core\"\n\nimport { govHost, toBoolAttrIfDefined } from \"../../helpers/Dom/template\"\nimport { GovHost } from \"../../helpers/Dom/template.types\"\nimport { createID } from \"../../utils/string.utils\"\nimport { TabsItemClass } from \"./constants\"\n\n@Component({\n\ttag: 'gov-tabs-item',\n\tstyleUrl: 'gov-tabs-item.scss',\n})\nexport class GovTabsItem {\n\tprivate h: GovHost\n\tprivate readonly contentId: string\n\tprivate readonly triggerId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.contentId = createID('GovTabContent')\n\t\tthis.triggerId = createID('GovTabTrigger')\n\t}\n\n\t@Element() host: HTMLGovTabsItemElement\n\t/**\n\t * Custom tab item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Custom tab trigger item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly triggerIdentifier: string\n\t/**\n\t * Item name of the tab\n\t */\n\t@Prop({reflect: true}) readonly label: string\n\t/**\n\t * Item disable state\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Default selected tab\n\t */\n\t@Prop() readonly default: boolean = false\n\t@State() isActive = false\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TabsItemClass.root)} default={this.default}>\n\t\t\t\t<div\n\t\t\t\t\tclass={TabsItemClass.inner}\n\t\t\t\t\trole=\"tabpanel\"\n\t\t\t\t\tid={this.identifier || this.contentId}\n\t\t\t\t\thidden={!this.isActive}\n\t\t\t\t\taria-labelledby={this.triggerIdentifier || this.triggerId}\n\t\t\t\t\taria-hidden={toBoolAttrIfDefined(!this.isActive)}\n\t\t\t\t>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns a unique tab content identifier\n\t */\n\t@Method()\n\tasync getIdentifier(): Promise<string> {\n\t\treturn this.identifier || this.contentId\n\t}\n\n\t/**\n\t * Returns a unique tab trigger identifier\n\t */\n\t@Method()\n\tasync getTriggerIdentifier(): Promise<string> {\n\t\treturn this.triggerIdentifier || this.triggerId\n\t}\n\n\t/**\n\t * Returns a unique tab trigger identifier\n\t */\n\t@Method()\n\tasync getDisableState(): Promise<boolean> {\n\t\treturn this.disabled\n\t}\n\n\t/**\n\t * Set status of tab-item\n\t */\n\t@Method()\n\tasync setActiveStatus(status: boolean): Promise<void> {\n\t\tthis.isActive = status\n\t}\n}\n"],"version":3}
1
+ {"file":"gov-tabs-item.entry.cjs.js","mappings":";;;;;;;;;;;AAAA,MAAM,cAAc,GAAG,2dAA2d,CAAC;AACnf,0BAAe,cAAc;;MCUhB,WAAW;IAKvB;;;;;wBAsBoD,KAAK;uBAIrB,KAAK;wBACrB,KAAK;QA1BxB,IAAI,CAAC,CAAC,GAAGA,gBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,SAAS,GAAGC,qBAAQ,CAAC,eAAe,CAAC,CAAA;QAC1C,IAAI,CAAC,SAAS,GAAGA,qBAAQ,CAAC,eAAe,CAAC,CAAA;KAC1C;IA4BD,cAAc;QACb,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,CAACC,mBAAS,CAAC,IAAI,CAAuB,CAAC;QACvE,IAAI,OAAO,EAAE;YACZ,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAA;SAC1B;KACD;IAED,MAAM;QACL,QACCC,QAACC,UAAI,qDAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAACC,uBAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IACrEF,kEACC,KAAK,EAAEE,uBAAa,CAAC,KAAK,EAC1B,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,EACrC,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,qBACL,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,SAAS,iBAC5CC,4BAAmB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAEhDH,oEAAa,CACR,CACA,EACP;KACD;;;;IAMD,MAAM,aAAa;QAClB,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,CAAA;KACxC;;;;IAMD,MAAM,oBAAoB;QACzB,OAAO,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,SAAS,CAAA;KAC/C;;;;IAMD,MAAM,eAAe;QACpB,OAAO,IAAI,CAAC,QAAQ,CAAA;KACpB;;;;IAMD,MAAM,eAAe,CAAC,MAAe;QACpC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAA;KACtB;;;;;;;;;;;;","names":["govHost","createID","TabsClass","h","Host","TabsItemClass","toBoolAttrIfDefined"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs-item.scss?tag=gov-tabs-item","../../../packages/core/src/components/gov-tabs/gov-tabs-item.tsx"],"sourcesContent":["/*\n * Tabs - Item\n */\n\n$class: \".gov-tabs-item\";\n\n#{$class} {\n\tcolor: $tabs-text-color;\n\t&__inner {\n\t\t@include reset-last-margin();\n\t}\n}\n","import {Component, Element, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\n\nimport {govHost, toBoolAttrIfDefined} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {createID} from \"../../utils/string.utils\"\nimport {TabsClass, TabsItemClass} from \"./constants\"\n\n@Component({\n\ttag: 'gov-tabs-item',\n\tstyleUrl: 'gov-tabs-item.scss',\n})\nexport class GovTabsItem {\n\tprivate h: GovHost\n\tprivate readonly contentId: string\n\tprivate readonly triggerId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.contentId = createID('GovTabContent')\n\t\tthis.triggerId = createID('GovTabTrigger')\n\t}\n\n\t@Element() host: HTMLGovTabsItemElement\n\t/**\n\t * Custom tab item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly identifier: string\n\t/**\n\t * Custom tab trigger item identifier. Otherwise, it will be generated\n\t */\n\t@Prop() readonly triggerIdentifier: string\n\t/**\n\t * Item name of the tab\n\t */\n\t@Prop({reflect: true}) readonly label: string\n\t/**\n\t * Item disable state\n\t */\n\t@Prop({reflect: true}) readonly disabled: boolean = false\n\t/**\n\t * Default selected tab\n\t */\n\t@Prop() readonly default: boolean = false\n\t@State() isActive = false\n\n\t@Watch('label')\n\t@Watch('disabled')\n\t@Watch('default')\n\trerenderParent() {\n\t\tconst element = this.h.getParent(TabsClass.root) as HTMLGovTabsElement;\n\t\tif (element) {\n\t\t\telement.rerender().catch()\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={this.h.classes(TabsItemClass.root)} default={this.default}>\n\t\t\t\t<div\n\t\t\t\t\tclass={TabsItemClass.inner}\n\t\t\t\t\trole=\"tabpanel\"\n\t\t\t\t\tid={this.identifier || this.contentId}\n\t\t\t\t\thidden={!this.isActive}\n\t\t\t\t\taria-labelledby={this.triggerIdentifier || this.triggerId}\n\t\t\t\t\taria-hidden={toBoolAttrIfDefined(!this.isActive)}\n\t\t\t\t>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\t/**\n\t * Returns a unique tab content identifier\n\t */\n\t@Method()\n\tasync getIdentifier(): Promise<string> {\n\t\treturn this.identifier || this.contentId\n\t}\n\n\t/**\n\t * Returns a unique tab trigger identifier\n\t */\n\t@Method()\n\tasync getTriggerIdentifier(): Promise<string> {\n\t\treturn this.triggerIdentifier || this.triggerId\n\t}\n\n\t/**\n\t * Returns a unique tab trigger identifier\n\t */\n\t@Method()\n\tasync getDisableState(): Promise<boolean> {\n\t\treturn this.disabled\n\t}\n\n\t/**\n\t * Set status of tab-item\n\t */\n\t@Method()\n\tasync setActiveStatus(status: boolean): Promise<void> {\n\t\tthis.isActive = status\n\t}\n}\n"],"version":3}