@gov-design-system-ce/components 4.0.8-rc12 → 4.0.8-rc13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/gov-form-input.cjs.entry.js +4 -3
- package/dist/cjs/gov-form-input.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-icon.cjs.entry.js +1 -1
- package/dist/cjs/gov-pagination.cjs.entry.js +3 -1
- package/dist/cjs/gov-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tabs-item.cjs.entry.js +12 -1
- package/dist/cjs/gov-tabs-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gov-tabs.cjs.entry.js +33 -41
- package/dist/cjs/gov-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/gov-form/input/gov-form-input.js +22 -4
- package/dist/collection/components/gov-form/input/gov-form-input.js.map +1 -1
- package/dist/collection/components/gov-pagination/gov-pagination.js +20 -1
- package/dist/collection/components/gov-pagination/gov-pagination.js.map +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs-item.js +20 -2
- package/dist/collection/components/gov-tabs/gov-tabs-item.js.map +1 -1
- package/dist/collection/components/gov-tabs/gov-tabs.js +52 -43
- package/dist/collection/components/gov-tabs/gov-tabs.js.map +1 -1
- package/dist/components/gov-accordion-item.js +1 -1
- package/dist/components/gov-attachments-item.js +1 -1
- package/dist/components/gov-breadcrumbs.js +1 -1
- package/dist/components/gov-button.js +1 -1
- package/dist/components/gov-card.js +1 -1
- package/dist/components/gov-chip.js +1 -1
- package/dist/components/gov-form-autocomplete.js +1 -1
- package/dist/components/gov-form-checkbox.js +1 -1
- package/dist/components/gov-form-file.js +1 -1
- package/dist/components/gov-form-input.js +1 -1
- package/dist/components/gov-form-multi-select.js +1 -1
- package/dist/components/gov-form-select.js +1 -1
- package/dist/components/gov-icon.js +1 -1
- package/dist/components/gov-infobar.js +1 -1
- package/dist/components/gov-loading.js +1 -1
- package/dist/components/gov-modal.js +1 -1
- package/dist/components/gov-pagination.js +1 -1
- package/dist/components/gov-pagination.js.map +1 -1
- package/dist/components/gov-prompt.js +1 -1
- package/dist/components/gov-side-nav-item.js +1 -1
- package/dist/components/gov-tabs-item.js +1 -1
- package/dist/components/gov-tabs-item.js.map +1 -1
- package/dist/components/gov-tabs.js +1 -1
- package/dist/components/gov-tabs.js.map +1 -1
- package/dist/components/gov-tag.js +1 -1
- package/dist/components/gov-toast.js +1 -1
- package/dist/components/gov-tooltip-content.js +1 -1
- package/dist/components/gov-wizard-item.js +1 -1
- package/dist/components/{p-659a5e9b.js → p-137f86d1.js} +2 -2
- package/dist/components/{p-93748f78.js → p-3605bf8d.js} +2 -2
- package/dist/components/{p-6b70bb05.js → p-479edf55.js} +2 -2
- package/dist/components/p-479edf55.js.map +1 -0
- package/dist/components/{p-f5db4029.js → p-84d0a332.js} +2 -2
- package/dist/components/{p-24033114.js → p-9c9fc4ae.js} +2 -2
- package/dist/components/{p-4fa21d88.js → p-d9dda24d.js} +2 -2
- package/dist/components/{p-44f0bc16.js → p-e01962d9.js} +2 -2
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/{p-7b210966.entry.js → p-0d99a3d8.entry.js} +2 -2
- package/dist/core/p-0d99a3d8.entry.js.map +1 -0
- package/dist/core/{p-ea506584.entry.js → p-10dbd2e1.entry.js} +2 -2
- package/dist/core/p-56d42f3e.entry.js +2 -0
- package/dist/core/p-56d42f3e.entry.js.map +1 -0
- package/dist/core/p-618df4db.entry.js +2 -0
- package/dist/core/p-618df4db.entry.js.map +1 -0
- package/dist/core/{p-6def30bc.entry.js → p-aa9b5731.entry.js} +2 -2
- package/dist/core/p-aa9b5731.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/gov-form-input.entry.js +4 -3
- package/dist/esm/gov-form-input.entry.js.map +1 -1
- package/dist/esm/gov-icon.entry.js +1 -1
- package/dist/esm/gov-pagination.entry.js +3 -1
- package/dist/esm/gov-pagination.entry.js.map +1 -1
- package/dist/esm/gov-tabs-item.entry.js +13 -2
- package/dist/esm/gov-tabs-item.entry.js.map +1 -1
- package/dist/esm/gov-tabs.entry.js +34 -42
- package/dist/esm/gov-tabs.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +56 -47
- package/dist/hydrate/index.mjs +56 -47
- package/dist/types/components/gov-form/input/gov-form-input.d.ts +5 -1
- package/dist/types/components/gov-pagination/gov-pagination.d.ts +5 -0
- package/dist/types/components/gov-tabs/gov-tabs-item.d.ts +1 -0
- package/dist/types/components/gov-tabs/gov-tabs.d.ts +6 -4
- package/dist/types/components.d.ts +22 -2
- package/package.json +1 -1
- package/dist/components/p-6b70bb05.js.map +0 -1
- package/dist/core/p-24e32e0f.entry.js +0 -2
- package/dist/core/p-24e32e0f.entry.js.map +0 -1
- package/dist/core/p-6def30bc.entry.js.map +0 -1
- package/dist/core/p-7b210966.entry.js.map +0 -1
- package/dist/core/p-9ae7429a.entry.js +0 -2
- package/dist/core/p-9ae7429a.entry.js.map +0 -1
- /package/dist/components/{p-659a5e9b.js.map → p-137f86d1.js.map} +0 -0
- /package/dist/components/{p-93748f78.js.map → p-3605bf8d.js.map} +0 -0
- /package/dist/components/{p-f5db4029.js.map → p-84d0a332.js.map} +0 -0
- /package/dist/components/{p-24033114.js.map → p-9c9fc4ae.js.map} +0 -0
- /package/dist/components/{p-4fa21d88.js.map → p-d9dda24d.js.map} +0 -0
- /package/dist/components/{p-44f0bc16.js.map → p-e01962d9.js.map} +0 -0
- /package/dist/core/{p-ea506584.entry.js.map → p-10dbd2e1.entry.js.map} +0 -0
package/dist/hydrate/index.mjs
CHANGED
|
@@ -4869,6 +4869,7 @@ class GovFormInput {
|
|
|
4869
4869
|
this.autocomplete = undefined;
|
|
4870
4870
|
this.autocorrect = undefined;
|
|
4871
4871
|
this.spellcheck = undefined;
|
|
4872
|
+
this.inputLang = undefined;
|
|
4872
4873
|
this.type = undefined;
|
|
4873
4874
|
this.inputType = "text";
|
|
4874
4875
|
this.role = undefined;
|
|
@@ -4914,9 +4915,9 @@ class GovFormInput {
|
|
|
4914
4915
|
}
|
|
4915
4916
|
render() {
|
|
4916
4917
|
const Tag = this.multiline ? Tags$1.TEXTAREA : Tags$1.INPUT;
|
|
4917
|
-
return (hAsync(Host, { key: '
|
|
4918
|
-
hAsync("gov-icon", { key: '
|
|
4919
|
-
hAsync("gov-icon", { key: '
|
|
4918
|
+
return (hAsync(Host, { key: '1d217855ba964b9c637373529e2b677fb09f8034', class: FormInputClass.root, size: this.size, variant: this.variant, type: this.type }, this.h.hasSlot("prefix") && hAsync("slot", { key: '75b989d2f4b70cf43e9a5315fdb6eb56af832118', name: "prefix" }), hAsync("span", { key: '39f063be627ad300abe364adfa4a32b79a879773', class: "element" }, this.h.hasSlot("left-icon") && hAsync("slot", { key: '84da6d8d05274f5a9760b871ffb89dec870122f8', name: "left-icon" }), this.h.hasSlot("right-icon") && !(this.success || this.invalid) && hAsync("slot", { key: 'b8ede08c703cc88e526593cb5aac4a868293543c', name: "right-icon" }), this.success && !this.multiline &&
|
|
4919
|
+
hAsync("gov-icon", { key: '1dad15f0bbab72fef2f2d596fb2ce27b097eb3a4', slot: "right-icon", class: "icon-validation", name: "check-lg" }), this.invalid && !this.multiline &&
|
|
4920
|
+
hAsync("gov-icon", { key: '9d8ed110a2640133ecc462c6b06f1f5496fb61f7', slot: "right-icon", class: "icon-validation", name: "exclamation-lg" }), hAsync(Tag, { key: '62ac8ee0c14c5289c377685fabf535947a43f4c5', type: this.inputType, disabled: this.disabled, id: this.identifier || this.inputId, name: this.name, onFocus: this.onFocusHandler.bind(this), onInput: this.onInputHandler.bind(this), onBlur: this.onBlurHandler.bind(this), onKeyUp: this.onKeyUpHandler.bind(this), onKeyDown: this.onKeyDownHandler.bind(this), ref: el => (this.inputRef = el), placeholder: this.placeholder, value: this.value, spellcheck: toBoolAttrIfDefined(this.spellcheck), lang: this.inputLang, readonly: toBoolAttrIfDefined(this.readonly), autocomplete: toOnOffAttrIfDefined(this.autocomplete), autocorrect: toOnOffAttrIfDefined(this.autocorrect), minlength: this.minlength, maxlength: this.maxlength, min: this.min, max: this.max, required: this.required, rows: this.rows, cols: this.cols, role: this.role, "aria-required": toBoolAttrIfDefined(this.required), "aria-invalid": toBoolAttrIfDefined(this.invalid), "aria-disabled": toBoolAttrIfDefined(this.disabled), "aria-describedby": this.wcagDescribedBy, "aria-labelledby": this.wcagLabelledBy, "aria-owns": this.wcagOwns, "aria-expanded": toBoolAttrIfDefined(this.wcagExpanded), "aria-autocomplete": this.wcagAutocomplete })), this.h.hasSlot("sufix") && hAsync("slot", { key: '9746bac959c672b37d1c5529cbbe0da13ecf4ce8', name: "sufix" })));
|
|
4920
4921
|
}
|
|
4921
4922
|
onFocusHandler(e) {
|
|
4922
4923
|
e.stopPropagation();
|
|
@@ -5028,6 +5029,7 @@ class GovFormInput {
|
|
|
5028
5029
|
"autocomplete": [4],
|
|
5029
5030
|
"autocorrect": [4],
|
|
5030
5031
|
"spellcheck": [4],
|
|
5032
|
+
"inputLang": [1, "input-lang"],
|
|
5031
5033
|
"type": [1],
|
|
5032
5034
|
"inputType": [1, "input-type"],
|
|
5033
5035
|
"role": [1],
|
|
@@ -6686,6 +6688,7 @@ class GovPagination {
|
|
|
6686
6688
|
this.current = 1;
|
|
6687
6689
|
this.total = 0;
|
|
6688
6690
|
this.inverse = undefined;
|
|
6691
|
+
this.selectIdentifier = undefined;
|
|
6689
6692
|
this.size = "m";
|
|
6690
6693
|
this.variant = "primary";
|
|
6691
6694
|
this.pageSize = 10;
|
|
@@ -6702,6 +6705,7 @@ class GovPagination {
|
|
|
6702
6705
|
this.pagination = undefined;
|
|
6703
6706
|
this.h = govHost(this.host);
|
|
6704
6707
|
this.pageSelectId = createID("GovPageSelect");
|
|
6708
|
+
this.selectId = createID("GovSelect");
|
|
6705
6709
|
}
|
|
6706
6710
|
validateType(newValue) {
|
|
6707
6711
|
validateProp(PaginationTypes, newValue, PaginationClass.root);
|
|
@@ -6757,7 +6761,7 @@ class GovPagination {
|
|
|
6757
6761
|
const ariaCurrent = toBoolAttrIfDefined(this.pagination.currentPage === page ? true : undefined);
|
|
6758
6762
|
return (hAsync("gov-button", { href: this.prepareLinkUrl(page), variant: this.variant, size: this.size, type: "base", disabled: isDisabled, "on-gov-click": (e) => this.onClickHandler(e, page), "wcag-label": description ? description : page > -1 ? this.wcagPageLabel + " " + page : undefined, "wcag-current": ariaCurrent, class: PaginationClass.inner }, content));
|
|
6759
6763
|
};
|
|
6760
|
-
return (hAsync(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, hAsync("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, hAsync("ul", { class: PaginationClass.list }, hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }), this.labelStart)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }), this.labelPrev)), this.type == "select" ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, "wcag-labelled-by": this.pageSelectId, "on-gov-change": this.onSelectHandler.bind(this) }, createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (hAsync(Fragment, null, this.pagination.pages.map(page => (hAsync("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page, '')))), this.pagination.totalPages ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, "wcag-labelled-by": this.pageSelectId, ref: el => (this.spreadSelectRef = el), "on-gov-change": this.onSelectHandler.bind(this) }, hAsync("option", { selected: true, hidden: true }, "..."), createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: false }, page))))))) : null)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }), this.labelNext)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" }), this.labelEnd))))));
|
|
6764
|
+
return (hAsync(Host, { class: this.h.classes(PaginationClass.root), type: this.type, variant: this.variant, size: this.size }, hAsync("nav", { "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy }, hAsync("ul", { class: PaginationClass.list }, hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.currentPage > 1 ? 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-left" }), this.labelStart)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.startPage < this.pagination.currentPage ? this.pagination.currentPage - 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-left" }), this.labelPrev)), this.type == "select" ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemSelect]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, identifier: this.selectIdentifier || this.selectId, "wcag-labelled-by": this.pageSelectId, "on-gov-change": this.onSelectHandler.bind(this) }, createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: this.pagination.currentPage === page }, page))))))) : (hAsync(Fragment, null, this.pagination.pages.map(page => (hAsync("li", { class: this.isActivePageClass(PaginationClass.item, page) }, pageResolver(page, page, '')))), this.pagination.totalPages ? (hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemMore]) }, hAsync("span", { class: PaginationClass.inner }, hAsync("span", { id: this.pageSelectId, hidden: true }, this.wcagSelectLabel), hAsync("gov-form-select", { size: this.size, variant: this.variant, identifier: this.selectIdentifier || this.selectId, "wcag-labelled-by": this.pageSelectId, ref: el => (this.spreadSelectRef = el), "on-gov-change": this.onSelectHandler.bind(this) }, hAsync("option", { selected: true, hidden: true }, "..."), createArrayRange(1, this.pagination.totalPages).map(page => (hAsync("option", { value: page, selected: false }, page))))))) : null)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.currentPage + 1 : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-right" }), this.labelNext)), hAsync("li", { class: prepareClasses([PaginationClass.item, PaginationClass.itemArrow]) }, pageResolver(this.pagination.totalPages > this.pagination.currentPage ? this.pagination.totalPages : -1, hAsync("gov-icon", { class: PaginationClass.arrow, name: "chevron-double-right" }), this.labelEnd))))));
|
|
6761
6765
|
}
|
|
6762
6766
|
onClickHandler(e, page) {
|
|
6763
6767
|
e.stopPropagation();
|
|
@@ -6811,6 +6815,7 @@ class GovPagination {
|
|
|
6811
6815
|
"current": [2],
|
|
6812
6816
|
"total": [2],
|
|
6813
6817
|
"inverse": [4],
|
|
6818
|
+
"selectIdentifier": [1, "select-identifier"],
|
|
6814
6819
|
"size": [1],
|
|
6815
6820
|
"variant": [1],
|
|
6816
6821
|
"pageSize": [2, "page-size"],
|
|
@@ -7556,7 +7561,7 @@ class GovTabs {
|
|
|
7556
7561
|
registerInstance(this, hostRef);
|
|
7557
7562
|
this.govChange = createEvent(this, "gov-change", 7);
|
|
7558
7563
|
this.triggerRefs = {};
|
|
7559
|
-
this.
|
|
7564
|
+
this.controllers = [];
|
|
7560
7565
|
this.focusIndex = 0;
|
|
7561
7566
|
this.compactControls = false;
|
|
7562
7567
|
this.type = "text";
|
|
@@ -7575,17 +7580,16 @@ class GovTabs {
|
|
|
7575
7580
|
validateProp(TabVariants, newValue, TabsClass.root);
|
|
7576
7581
|
}
|
|
7577
7582
|
componentWillLoad() {
|
|
7578
|
-
this.
|
|
7583
|
+
this.prepareControllers();
|
|
7579
7584
|
}
|
|
7580
7585
|
async componentDidRender() {
|
|
7581
7586
|
if (canValidateWcagOnRender()) {
|
|
7582
7587
|
await delay(500);
|
|
7583
7588
|
await this.validateWcag();
|
|
7584
7589
|
}
|
|
7585
|
-
this.resizeObserver();
|
|
7586
7590
|
}
|
|
7587
|
-
|
|
7588
|
-
this.
|
|
7591
|
+
prepareControllers() {
|
|
7592
|
+
this.controllers = [];
|
|
7589
7593
|
const promises = [];
|
|
7590
7594
|
this.host.querySelectorAll(TabsItemClass.root).forEach((tab) => {
|
|
7591
7595
|
const controlItem = Promise.all([
|
|
@@ -7607,49 +7611,36 @@ class GovTabs {
|
|
|
7607
7611
|
promises.push(controlItem);
|
|
7608
7612
|
});
|
|
7609
7613
|
Promise.all(promises).then(controllers => {
|
|
7610
|
-
let
|
|
7611
|
-
if (
|
|
7612
|
-
|
|
7613
|
-
this.focusIndex =
|
|
7614
|
-
controllers[
|
|
7615
|
-
this.
|
|
7614
|
+
let defaultTabIndex = controllers.findIndex(controller => controller.default);
|
|
7615
|
+
if (defaultTabIndex === -1)
|
|
7616
|
+
defaultTabIndex = 0;
|
|
7617
|
+
this.focusIndex = defaultTabIndex;
|
|
7618
|
+
controllers[defaultTabIndex].active = true;
|
|
7619
|
+
this.controllers = [...controllers];
|
|
7616
7620
|
this.reRender();
|
|
7617
7621
|
});
|
|
7618
7622
|
}
|
|
7619
7623
|
setActiveByIdentifier(identifier) {
|
|
7620
7624
|
const temp = [];
|
|
7621
|
-
this.
|
|
7625
|
+
this.controllers.map(item => {
|
|
7622
7626
|
item.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier;
|
|
7623
7627
|
temp.push(item);
|
|
7624
7628
|
});
|
|
7625
|
-
this.
|
|
7629
|
+
this.controllers = [...temp];
|
|
7626
7630
|
}
|
|
7627
7631
|
reRender() {
|
|
7628
|
-
this.
|
|
7629
|
-
control.element.setActiveStatus(control.active);
|
|
7632
|
+
this.controllers.map(control => {
|
|
7633
|
+
control.element.setActiveStatus(control.active).catch();
|
|
7630
7634
|
});
|
|
7631
7635
|
}
|
|
7632
|
-
/*
|
|
7633
|
-
private evaluateControls() {
|
|
7634
|
-
this.compactControls = false
|
|
7635
|
-
let sumOfWidth = this.tabsRef.querySelector("ul").offsetWidth
|
|
7636
|
-
this.compactControls = this.tabsRef.offsetWidth < sumOfWidth
|
|
7637
|
-
}
|
|
7638
|
-
*/
|
|
7639
|
-
resizeObserver() {
|
|
7640
|
-
const resizeObserver = new ResizeObserver(throttle(() => {
|
|
7641
|
-
// this.evaluateControls()
|
|
7642
|
-
}, 200));
|
|
7643
|
-
resizeObserver.observe(this.tabsRef);
|
|
7644
|
-
}
|
|
7645
7636
|
render() {
|
|
7646
|
-
return (hAsync(Host, { key: '
|
|
7637
|
+
return (hAsync(Host, { key: 'fa6bb0777c56edcb61f5acfa4cac75fae2f8bb78', class: this.h.classes(TabsClass.root), variant: this.variant, type: this.type, role: "tablist", "aria-label": this.wcagLabel, "aria-labelledby": this.wcagLabelledBy, onKeyDown: this.onKeydownHandler.bind(this) }, hAsync("div", { key: '3e764b20b9a1e3221232d7567e45acae8701a963', class: TabsClass.tabs, "aria-hidden": toBoolAttr(this.compactControls) }, hAsync("ul", { key: 'adedeb20cd2d5608502410f1b843ba6293000e7c', class: TabsClass.list }, this.controllers.map(control => (hAsync("li", { class: TabsClass.item }, this.type == "text" ? (hAsync("button", { class: TabsClass.btn, id: control.triggerIdentifier, role: "tab", onClick: () => this.onSelectHandler(control), disabled: control.disabled, "aria-disabled": toBoolAttr(control.disabled), "aria-selected": toBoolAttr(control.active), "aria-controls": control.contentIdentifier, tabindex: control.active && !control.disabled ? 0 : -1, ref: el => (this.triggerRefs[control.triggerIdentifier] = el) }, control.label)) : (hAsync("gov-chip", { role: "tab", tag: 'button', identifier: control.triggerIdentifier, "wcag-selected": control.active, "wcag-controls": control.contentIdentifier, focusable: control.active, disabled: control.disabled, variant: this.variant, inverse: !control.active, ref: el => (this.triggerRefs[control.triggerIdentifier] = el), "on-gov-click": () => this.onSelectHandler(control) }, control.label))))))), hAsync("span", { key: '6d855cd5195673b6a13aaf4b357b74bdcfd0ef4d', id: this.formSelectId, hidden: true }, this.wcagSelectLabel), this.compactControls ? (hAsync("gov-form-select", { "wcag-labelled-by": this.formSelectId, "onGov-change": this.onChangeHandler.bind(this) }, this.controllers.map(control => (hAsync("option", { value: control.triggerIdentifier, selected: control.active }, control.label))))) : null, hAsync("slot", { key: 'd7ea30baebad93b05c1f978fcca0c19989be7227' })));
|
|
7647
7638
|
}
|
|
7648
7639
|
getCurrentTab() {
|
|
7649
|
-
return this.
|
|
7640
|
+
return this.controllers.find(control => control.active) || null;
|
|
7650
7641
|
}
|
|
7651
7642
|
onSelectHandler(control) {
|
|
7652
|
-
const index = this.
|
|
7643
|
+
const index = this.controllers.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);
|
|
7653
7644
|
this.focusIndex = index;
|
|
7654
7645
|
this.setActiveByIdentifier(control.triggerIdentifier);
|
|
7655
7646
|
this.reRender();
|
|
@@ -7669,30 +7660,30 @@ class GovTabs {
|
|
|
7669
7660
|
}
|
|
7670
7661
|
goToPrevNext(keyCode) {
|
|
7671
7662
|
if ([37, 38, 39, 40].includes(keyCode)) {
|
|
7672
|
-
if (false === (this.focusIndex >= 0 && this.focusIndex <= this.
|
|
7663
|
+
if (false === (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1)) {
|
|
7673
7664
|
return;
|
|
7674
7665
|
}
|
|
7675
|
-
this.
|
|
7666
|
+
this.controllers[this.focusIndex].active = false;
|
|
7676
7667
|
if (keyCode === 39 || keyCode === 40) {
|
|
7677
7668
|
this.focusIndex++;
|
|
7678
|
-
if (this.focusIndex >= this.
|
|
7669
|
+
if (this.focusIndex >= this.controllers.length) {
|
|
7679
7670
|
this.focusIndex = 0;
|
|
7680
7671
|
}
|
|
7681
|
-
if (this.
|
|
7672
|
+
if (this.controllers[this.focusIndex].disabled) {
|
|
7682
7673
|
this.goToPrevNext(40);
|
|
7683
7674
|
}
|
|
7684
7675
|
}
|
|
7685
7676
|
else if (keyCode === 37 || keyCode === 38) {
|
|
7686
7677
|
this.focusIndex--;
|
|
7687
7678
|
if (this.focusIndex < 0) {
|
|
7688
|
-
this.focusIndex = this.
|
|
7679
|
+
this.focusIndex = this.controllers.length - 1;
|
|
7689
7680
|
}
|
|
7690
|
-
if (this.
|
|
7681
|
+
if (this.controllers[this.focusIndex].disabled) {
|
|
7691
7682
|
this.goToPrevNext(38);
|
|
7692
7683
|
}
|
|
7693
7684
|
}
|
|
7694
|
-
if (this.focusIndex >= 0 && this.focusIndex <= this.
|
|
7695
|
-
const current = this.
|
|
7685
|
+
if (this.focusIndex >= 0 && this.focusIndex <= this.controllers.length - 1) {
|
|
7686
|
+
const current = this.controllers[this.focusIndex];
|
|
7696
7687
|
current.active = true;
|
|
7697
7688
|
const trigger = this.triggerRefs[current.triggerIdentifier];
|
|
7698
7689
|
if (trigger.nodeName.toLowerCase() === 'gov-chip') {
|
|
@@ -7701,7 +7692,7 @@ class GovTabs {
|
|
|
7701
7692
|
else {
|
|
7702
7693
|
this.triggerRefs[current.triggerIdentifier].focus();
|
|
7703
7694
|
}
|
|
7704
|
-
this.
|
|
7695
|
+
this.controllers = [...this.controllers];
|
|
7705
7696
|
this.reRender();
|
|
7706
7697
|
this.govChange.emit(this.getCurrentTab().element);
|
|
7707
7698
|
}
|
|
@@ -7711,7 +7702,7 @@ class GovTabs {
|
|
|
7711
7702
|
* Regenerate tabs controllers
|
|
7712
7703
|
*/
|
|
7713
7704
|
async refresh() {
|
|
7714
|
-
this.
|
|
7705
|
+
this.prepareControllers();
|
|
7715
7706
|
}
|
|
7716
7707
|
/**
|
|
7717
7708
|
* Returns the currently selected tabs-item
|
|
@@ -7726,6 +7717,12 @@ class GovTabs {
|
|
|
7726
7717
|
this.setActiveByIdentifier(identifier);
|
|
7727
7718
|
this.reRender();
|
|
7728
7719
|
}
|
|
7720
|
+
/**
|
|
7721
|
+
* Regenerate tabs controllers
|
|
7722
|
+
*/
|
|
7723
|
+
async rerender() {
|
|
7724
|
+
this.prepareControllers();
|
|
7725
|
+
}
|
|
7729
7726
|
/**
|
|
7730
7727
|
* Validate the WCAG attributes of the component
|
|
7731
7728
|
*/
|
|
@@ -7749,12 +7746,13 @@ class GovTabs {
|
|
|
7749
7746
|
"wcagLabel": [1, "wcag-label"],
|
|
7750
7747
|
"wcagSelectLabel": [1, "wcag-select-label"],
|
|
7751
7748
|
"wcagLabelledBy": [1, "wcag-labelled-by"],
|
|
7752
|
-
"
|
|
7749
|
+
"controllers": [32],
|
|
7753
7750
|
"focusIndex": [32],
|
|
7754
7751
|
"compactControls": [32],
|
|
7755
7752
|
"refresh": [64],
|
|
7756
7753
|
"currentTab": [64],
|
|
7757
7754
|
"setActiveTab": [64],
|
|
7755
|
+
"rerender": [64],
|
|
7758
7756
|
"validateWcag": [64]
|
|
7759
7757
|
},
|
|
7760
7758
|
"$listeners$": undefined,
|
|
@@ -7779,8 +7777,14 @@ class GovTabsItem {
|
|
|
7779
7777
|
this.contentId = createID('GovTabContent');
|
|
7780
7778
|
this.triggerId = createID('GovTabTrigger');
|
|
7781
7779
|
}
|
|
7780
|
+
rerenderParent() {
|
|
7781
|
+
const element = this.h.getParent(TabsClass.root);
|
|
7782
|
+
if (element) {
|
|
7783
|
+
element.rerender().catch();
|
|
7784
|
+
}
|
|
7785
|
+
}
|
|
7782
7786
|
render() {
|
|
7783
|
-
return (hAsync(Host, { key: '
|
|
7787
|
+
return (hAsync(Host, { key: 'b316d961cabc1aed647deaa504ddca1184860f70', class: this.h.classes(TabsItemClass.root), default: this.default }, hAsync("div", { key: 'd73aa35cc5131b81eaceff6afab13250b2587aec', class: TabsItemClass.inner, role: "tabpanel", id: this.identifier || this.contentId, hidden: !this.isActive, "aria-labelledby": this.triggerIdentifier || this.triggerId, "aria-hidden": toBoolAttrIfDefined(!this.isActive) }, hAsync("slot", { key: '4bdf7cd566204ab3ac1883a5194abce6526fc0f0' }))));
|
|
7784
7788
|
}
|
|
7785
7789
|
/**
|
|
7786
7790
|
* Returns a unique tab content identifier
|
|
@@ -7807,6 +7811,11 @@ class GovTabsItem {
|
|
|
7807
7811
|
this.isActive = status;
|
|
7808
7812
|
}
|
|
7809
7813
|
get host() { return getElement(this); }
|
|
7814
|
+
static get watchers() { return {
|
|
7815
|
+
"label": ["rerenderParent"],
|
|
7816
|
+
"disabled": ["rerenderParent"],
|
|
7817
|
+
"default": ["rerenderParent"]
|
|
7818
|
+
}; }
|
|
7810
7819
|
static get style() { return GovTabsItemStyle0; }
|
|
7811
7820
|
static get cmpMeta() { return {
|
|
7812
7821
|
"$flags$": 4,
|
|
@@ -92,7 +92,11 @@ export declare class GovFormInput {
|
|
|
92
92
|
*/
|
|
93
93
|
readonly spellcheck: boolean;
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang
|
|
96
|
+
*/
|
|
97
|
+
readonly inputLang: string;
|
|
98
|
+
/**
|
|
99
|
+
* Defined the visual style of input
|
|
96
100
|
*/
|
|
97
101
|
readonly type?: Type;
|
|
98
102
|
/**
|
|
@@ -5,6 +5,7 @@ import { PaginationEvent } from "./gov-pagination.types";
|
|
|
5
5
|
export declare class GovPagination {
|
|
6
6
|
private h;
|
|
7
7
|
private readonly pageSelectId;
|
|
8
|
+
private readonly selectId;
|
|
8
9
|
private spreadSelectRef?;
|
|
9
10
|
constructor();
|
|
10
11
|
readonly host: HTMLGovPaginationElement;
|
|
@@ -24,6 +25,10 @@ export declare class GovPagination {
|
|
|
24
25
|
* Set on active page
|
|
25
26
|
*/
|
|
26
27
|
readonly inverse: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Custom select identifier.
|
|
30
|
+
*/
|
|
31
|
+
readonly selectIdentifier: string;
|
|
27
32
|
/**
|
|
28
33
|
* Pagination's size
|
|
29
34
|
*/
|
|
@@ -5,11 +5,10 @@ import { GovTabControllerItem } from "./gov-tabs.types";
|
|
|
5
5
|
export declare class GovTabs {
|
|
6
6
|
private h;
|
|
7
7
|
private triggerRefs;
|
|
8
|
-
private tabsRef?;
|
|
9
8
|
private readonly formSelectId;
|
|
10
9
|
constructor();
|
|
11
10
|
host: HTMLGovTabsElement;
|
|
12
|
-
|
|
11
|
+
controllers: GovTabControllerItem[];
|
|
13
12
|
focusIndex: number;
|
|
14
13
|
compactControls: boolean;
|
|
15
14
|
/**
|
|
@@ -44,10 +43,9 @@ export declare class GovTabs {
|
|
|
44
43
|
validateVariant(newValue: string): void;
|
|
45
44
|
componentWillLoad(): void;
|
|
46
45
|
componentDidRender(): Promise<void>;
|
|
47
|
-
private
|
|
46
|
+
private prepareControllers;
|
|
48
47
|
private setActiveByIdentifier;
|
|
49
48
|
private reRender;
|
|
50
|
-
private resizeObserver;
|
|
51
49
|
render(): any;
|
|
52
50
|
private getCurrentTab;
|
|
53
51
|
private onSelectHandler;
|
|
@@ -66,6 +64,10 @@ export declare class GovTabs {
|
|
|
66
64
|
* Regenerate tabs controllers
|
|
67
65
|
*/
|
|
68
66
|
setActiveTab(identifier: string): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Regenerate tabs controllers
|
|
69
|
+
*/
|
|
70
|
+
rerender(): Promise<void>;
|
|
69
71
|
/**
|
|
70
72
|
* Validate the WCAG attributes of the component
|
|
71
73
|
*/
|
|
@@ -896,6 +896,10 @@ export namespace Components {
|
|
|
896
896
|
* Custom input identifier.
|
|
897
897
|
*/
|
|
898
898
|
"identifier": string;
|
|
899
|
+
/**
|
|
900
|
+
* Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang
|
|
901
|
+
*/
|
|
902
|
+
"inputLang": string;
|
|
899
903
|
/**
|
|
900
904
|
* Same as original parameter
|
|
901
905
|
* @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
|
|
@@ -971,7 +975,7 @@ export namespace Components {
|
|
|
971
975
|
*/
|
|
972
976
|
"success": boolean;
|
|
973
977
|
/**
|
|
974
|
-
*
|
|
978
|
+
* Defined the visual style of input
|
|
975
979
|
*/
|
|
976
980
|
"type"?: Type;
|
|
977
981
|
/**
|
|
@@ -1545,6 +1549,10 @@ export namespace Components {
|
|
|
1545
1549
|
* Maximum number of entries per page
|
|
1546
1550
|
*/
|
|
1547
1551
|
"pageSize": number;
|
|
1552
|
+
/**
|
|
1553
|
+
* Custom select identifier.
|
|
1554
|
+
*/
|
|
1555
|
+
"selectIdentifier": string;
|
|
1548
1556
|
/**
|
|
1549
1557
|
* Pagination's size
|
|
1550
1558
|
*/
|
|
@@ -1810,6 +1818,10 @@ export namespace Components {
|
|
|
1810
1818
|
* Regenerate tabs controllers
|
|
1811
1819
|
*/
|
|
1812
1820
|
"refresh": () => Promise<void>;
|
|
1821
|
+
/**
|
|
1822
|
+
* Regenerate tabs controllers
|
|
1823
|
+
*/
|
|
1824
|
+
"rerender": () => Promise<void>;
|
|
1813
1825
|
/**
|
|
1814
1826
|
* Regenerate tabs controllers
|
|
1815
1827
|
*/
|
|
@@ -3772,6 +3784,10 @@ declare namespace LocalJSX {
|
|
|
3772
3784
|
* Custom input identifier.
|
|
3773
3785
|
*/
|
|
3774
3786
|
"identifier"?: string;
|
|
3787
|
+
/**
|
|
3788
|
+
* Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang
|
|
3789
|
+
*/
|
|
3790
|
+
"inputLang"?: string;
|
|
3775
3791
|
/**
|
|
3776
3792
|
* Same as original parameter
|
|
3777
3793
|
* @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
|
|
@@ -3863,7 +3879,7 @@ declare namespace LocalJSX {
|
|
|
3863
3879
|
*/
|
|
3864
3880
|
"success"?: boolean;
|
|
3865
3881
|
/**
|
|
3866
|
-
*
|
|
3882
|
+
* Defined the visual style of input
|
|
3867
3883
|
*/
|
|
3868
3884
|
"type"?: Type;
|
|
3869
3885
|
/**
|
|
@@ -4441,6 +4457,10 @@ declare namespace LocalJSX {
|
|
|
4441
4457
|
* Maximum number of entries per page
|
|
4442
4458
|
*/
|
|
4443
4459
|
"pageSize"?: number;
|
|
4460
|
+
/**
|
|
4461
|
+
* Custom select identifier.
|
|
4462
|
+
*/
|
|
4463
|
+
"selectIdentifier"?: string;
|
|
4444
4464
|
/**
|
|
4445
4465
|
* Pagination's size
|
|
4446
4466
|
*/
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@gov-design-system-ce/components",
|
|
3
3
|
"description": "This package includes Gov Design System Web Components and related utilities.",
|
|
4
4
|
"author": "Zdeněk Vítek",
|
|
5
|
-
"version": "4.0.8-
|
|
5
|
+
"version": "4.0.8-rc13",
|
|
6
6
|
"license": "EUPL v1.2 Licensed",
|
|
7
7
|
"main": "./dist/index.cjs.js",
|
|
8
8
|
"unpkg": "./dist/core/core.esm.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["govFormInputCss","GovFormInputStyle0","Tags","GovFormInput","proxyCustomElement","H","constructor","this","h","govHost","host","inputId","createID","f","govForm","validateVariant","newValue","validateProp","FormInputVariants","FormInputClass","root","validateSize","FormInputSizes","watchDisabled","passControlAttrs","passAttrToControl","size","toBoolAttr","invalid","multiline","TEXTAREA","INPUT","componentWillLoad","variant","passAttrToLabel","String","required","componentDidRender","canValidateWcagOnRender","delay","validateWcag","componentDidLoad","govHydrated","emit","render","Tag","Host","key","class","type","hasSlot","name","success","slot","inputType","disabled","id","identifier","onFocus","onFocusHandler","bind","onInput","onInputHandler","onBlur","onBlurHandler","onKeyUp","onKeyUpHandler","onKeyDown","onKeyDownHandler","ref","el","inputRef","placeholder","value","spellcheck","toBoolAttrIfDefined","readonly","autocomplete","toOnOffAttrIfDefined","autocorrect","minlength","maxlength","min","max","rows","cols","role","wcagDescribedBy","wcagLabelledBy","wcagOwns","wcagExpanded","wcagAutocomplete","e","stopPropagation","focused","govFocus","component","originalEvent","govBlur","govKeyUp","govKeyDown","target","govInput","setFocus","options","focus","setValue","clearValue","getRef","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"],"mappings":"iZAAA,MAAMA,EAAkB,28YACxB,MAAAC,EAAeD,ECqBf,IAAKE,GAAL,SAAKA,GACJA,EAAA,iBACAA,EAAA,sBACA,EAHD,CAAKA,MAAI,K,MASIC,EAAYC,EAAA,MAAAD,UAAAE,EAMxB,WAAAC,G,0TAkBkD,Y,iCAQL,I,mGAqBR,M,cAKA,M,+PA6C4B,O,mNAhGhEC,KAAKC,EAAIC,EAAQF,KAAKG,MACtBH,KAAKI,QAAUC,EAAS,YACxBL,KAAKM,EAAIC,EAAQP,KAAKC,E,CAuJvB,eAAAO,CAAgBC,GACfC,EAAaC,EAAmBF,EAAUG,EAAeC,K,CAI1D,YAAAC,CAAaL,GACZC,EAAaK,EAAgBN,EAAUG,EAAeC,K,CAOvD,aAAAG,GACChB,KAAKiB,kB,CAGE,gBAAAA,GACPjB,KAAKM,EAAEY,kBAAkB,OAAQlB,KAAKmB,MACtCnB,KAAKM,EAAEY,kBAAkB,UAAWE,EAAWpB,KAAKqB,UACpDrB,KAAKM,EAAEY,kBAAkB,OAAQlB,KAAKsB,UAAY3B,EAAK4B,SAAW5B,EAAK6B,M,CAGxE,iBAAAC,GACCzB,KAAKQ,gBAAgBR,KAAK0B,SAC1B1B,KAAKc,aAAad,KAAKmB,MACvBnB,KAAKiB,mBAELjB,KAAKM,EAAEqB,gBAAgB,WAAYC,OAAO5B,KAAK6B,U,CAGhD,wBAAMC,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNhC,KAAKiC,c,EAIb,gBAAAC,GACClC,KAAKmC,YAAYC,M,CAGlB,MAAAC,GACC,MAAMC,EAAMtC,KAAKsB,UAAY3B,EAAK4B,SAAW5B,EAAK6B,MAElD,OACCvB,EAACsC,EAAI,CAAAC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,CAASC,GACd,OAAOjG,KAAKgE,SAASkC,MAAMD,E,CAO5B,cAAME,CAASjC,GACdlE,KAAKkE,MAAQA,C,CAOd,gBAAMkC,GACLpG,KAAKkE,MAAQ,GACblE,KAAKgE,SAASE,MAAQ,E,CAOvB,YAAMmC,GACL,OAAOrG,KAAKgE,Q,CAOb,kBAAM/B,GACLqE,EAAgBtG,KAAKgF,gBAAiB,oBAAqBpE,EAAeC,MAC1EyF,EAAgBtG,KAAKiF,eAAgB,mBAAoBrE,EAAeC,MACxEyF,EAAgBtG,KAAKkF,SAAU,YAAatE,EAAeC,MAC3D0F,EAAqBvG,KAAKkD,YAAclD,KAAKI,QAASJ,KAAKiF,eAAgBrE,EAAeC,K","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as o,h as a,a as r,g as e}from"./p-0a5b0f7d.js";import{g as s,a as i}from"./p-4191acf2.js";import{c as n}from"./p-e618f1cb.js";import{v as c}from"./p-344c72d7.js";import{c as v,v as l}from"./p-92b7481f.js";import{c as b}from"./p-95d41a3b.js";import{d,t as g}from"./p-e0e2e9c1.js";import{T as h,a as p,b as m,c as f}from"./p-4faa3ba6.js";import"./p-e296ca83.js";import"./p-03dbb8b1.js";const y=".gov-tabs__list{margin:0;padding:0}.gov-tabs__list>.gov-tabs__item{margin:0;padding:0;background:none}.gov-tabs__list>.gov-tabs__item::before{display:none}.gov-spin-animation,.gov-pseudo-spin-animation::before{animation:spin 4s linear infinite}@keyframes spin{100%{transform:rotate(360deg)}}@keyframes countdown{to{transform:scaleX(0)}}@keyframes progress{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}.gov-tabs{position:relative;display:block;width:100%}.gov-tabs__list{display:flex;flex-wrap:wrap;margin:0rem 0rem 1.25rem}.gov-tabs__list>.gov-tabs__item{display:flex;margin:0}.gov-tabs__btn{font-weight:var(--gov-text-s-font-weight);font-size:var(--gov-text-s-font-size);line-height:var(--gov-text-s-line-height);letter-spacing:var(--gov-text-s-letter-spacing);display:inline-flex;vertical-align:middle;justify-content:center;align-items:center;border:0;background-color:transparent;text-align:center;text-decoration:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;padding:0.75rem 0rem 0.625rem;border-bottom:0.125rem solid transparent;font-weight:700;text-align:center;transition:150ms linear color, 150ms linear border-color}.gov-tabs__btn:focus{outline:none}.gov-tabs__btn:focus{outline:none}.gov-tabs__btn:focus-visible{border-radius:var(--gov-border-radius, 0.1875rem);outline:var(--gov-outline-width, 0.125rem) solid var(--gov-color-focus-base);outline-offset:0}.gov-tabs__btn[disabled]{cursor:not-allowed}.gov-tabs[type=text] .gov-tabs__list{gap:0.5rem 2rem;border-bottom:var(--gov-tabs-list-border-width, 0.0625rem solid var(--gov-color-secondary-500))}.gov-tabs[type=chip] .gov-tabs__list{gap:0.5rem 1rem}.gov-tabs[variant=primary][type=text] .gov-tabs__btn:not([disabled]){color:var(--gov-tabs-primary-color, var(--gov-color-primary))}@media not all and (pointer: coarse){.gov-tabs[variant=primary][type=text] .gov-tabs__btn:not([disabled]):hover{color:var(--gov-tabs-primary-color-hover, var(--gov-color-primary-800))}}.gov-tabs[variant=primary][type=text] .gov-tabs__btn[aria-selected=true]{border-bottom-color:var(--gov-tabs-primary-color-active, var(--gov-color-primary-800));color:var(--gov-tabs-primary-color-active, var(--gov-color-primary-800))}.gov-tabs[variant=secondary][type=text] .gov-tabs__btn:not([disabled]){color:var(--gov-tabs-secondary-color, var(--gov-color-secondary-700))}@media not all and (pointer: coarse){.gov-tabs[variant=secondary][type=text] .gov-tabs__btn:not([disabled]):hover{color:var(--gov-tabs-secondary-color-hover, var(--gov-color-secondary-900))}}.gov-tabs[variant=secondary][type=text] .gov-tabs__btn[aria-selected=true]{border-bottom-color:var(--gov-tabs-secondary-color-active, var(--gov-color-secondary-900));color:var(--gov-tabs-secondary-color-active, var(--gov-color-secondary-900))}.gov-tabs[variant=success][type=text] .gov-tabs__btn:not([disabled]){color:var(--gov-tabs-success-color, var(--gov-color-success-500))}@media not all and (pointer: coarse){.gov-tabs[variant=success][type=text] .gov-tabs__btn:not([disabled]):hover{color:var(--gov-tabs-success-color-hover, var(--gov-color-success-700))}}.gov-tabs[variant=success][type=text] .gov-tabs__btn[aria-selected=true]{border-bottom-color:var(--gov-tabs-success-color-active, var(--gov-color-success-700));color:var(--gov-tabs-success-color-active, var(--gov-color-success-700))}.gov-tabs[variant=warning][type=text] .gov-tabs__btn:not([disabled]){color:var(--gov-tabs-warning-color, var(--gov-color-warning-500))}@media not all and (pointer: coarse){.gov-tabs[variant=warning][type=text] .gov-tabs__btn:not([disabled]):hover{color:var(--gov-tabs-warning-color-hover, var(--gov-color-warning-700))}}.gov-tabs[variant=warning][type=text] .gov-tabs__btn[aria-selected=true]{border-bottom-color:var(--gov-tabs-warning-color-active, var(--gov-color-warning-700));color:var(--gov-tabs-warning-color-active, var(--gov-color-warning-700))}.gov-tabs[variant=error][type=text] .gov-tabs__btn:not([disabled]){color:var(--gov-tabs-error-color, var(--gov-color-error-400))}@media not all and (pointer: coarse){.gov-tabs[variant=error][type=text] .gov-tabs__btn:not([disabled]):hover{color:var(--gov-tabs-error-color-hover, var(--gov-color-error-600))}}.gov-tabs[variant=error][type=text] .gov-tabs__btn[aria-selected=true]{border-bottom-color:var(--gov-tabs-error-color-active, var(--gov-color-error-600));color:var(--gov-tabs-error-color-active, var(--gov-color-error-600))}.gov-tabs[orientation=vertical] .gov-tabs__btn{text-align:left}@media (min-width: 75em){.gov-tabs[orientation=vertical]{display:flex;flex-direction:row}.gov-tabs[orientation=vertical] .gov-tabs__list{flex-wrap:nowrap;flex-direction:column;width:-moz-max-content;width:max-content;max-width:30vw;margin-right:1.25rem;padding:0rem 0.5rem;border-bottom:none;border-right:var(--gov-tabs-list-border-width, 0.0625rem solid var(--gov-color-secondary-500))}.gov-tabs[orientation=vertical] .gov-tabs__item{justify-content:flex-end}.gov-tabs[orientation=vertical] .gov-tabs__btn{padding:0.5rem 0.75rem;text-align:right}}";const _=y;const u=class{constructor(a){t(this,a);this.govChange=o(this,"gov-change",7);this.triggerRefs={};this.controller=[];this.focusIndex=0;this.compactControls=false;this.type="text";this.variant="primary";this.orientation="horizontal";this.wcagLabel=undefined;this.wcagSelectLabel=undefined;this.wcagLabelledBy=undefined;this.h=s(this.host);this.formSelectId=b("GovFormSelect")}validateType(t){c(m,t,p.root)}validateVariant(t){c(f,t,p.root)}componentWillLoad(){this.prepareDataSource()}async componentDidRender(){if(n()){await d(500);await this.validateWcag()}this.resizeObserver()}prepareDataSource(){this.controller=[];const t=[];this.host.querySelectorAll(h.root).forEach((o=>{const a=Promise.all([o.getIdentifier(),o.getTriggerIdentifier(),o.getDisableState()]).then((([t,a,r])=>{const e=typeof o.getAttribute("default")==="string";return{label:o.getAttribute("label"),contentIdentifier:t,disabled:r,triggerIdentifier:a,element:o,active:false,default:e}}));t.push(a)}));Promise.all(t).then((t=>{let o=t.findIndex((t=>t.default));if(o===-1)o=0;this.focusIndex=o;t[o].active=true;this.controller=[...t];this.reRender()}))}setActiveByIdentifier(t){const o=[];this.controller.map((a=>{a.active=t===a.triggerIdentifier||t===a.contentIdentifier;o.push(a)}));this.controller=[...o]}reRender(){this.controller.map((t=>{t.element.setActiveStatus(t.active)}))}resizeObserver(){const t=new ResizeObserver(g((()=>{}),200));t.observe(this.tabsRef)}render(){return a(r,{key:"561251fc7844ec9d11f72ff6e03ac6656b298ac9",class:this.h.classes(p.root),variant:this.variant,type:this.type,role:"tablist",ref:t=>this.tabsRef=t,"aria-label":this.wcagLabel,"aria-labelledby":this.wcagLabelledBy,onKeyDown:this.onKeydownHandler.bind(this)},a("div",{key:"c5ecb113f0c39857a3d4eea506b08321b577f2b1",class:p.tabs,"aria-hidden":i(this.compactControls)},a("ul",{key:"d1d1d166a43ddc69d35ec6c359dbab589e3c92fd",class:p.list},this.controller.map((t=>a("li",{class:p.item},this.type=="text"?a("button",{class:p.btn,id:t.triggerIdentifier,role:"tab",onClick:()=>this.onSelectHandler(t),disabled:t.disabled,"aria-disabled":i(t.disabled),"aria-selected":i(t.active),"aria-controls":t.contentIdentifier,tabindex:t.active&&!t.disabled?0:-1,ref:o=>this.triggerRefs[t.triggerIdentifier]=o},t.label):a("gov-chip",{role:"tab",tag:"button",identifier:t.triggerIdentifier,"wcag-selected":t.active,"wcag-controls":t.contentIdentifier,focusable:t.active,disabled:t.disabled,variant:this.variant,inverse:!t.active,ref:o=>this.triggerRefs[t.triggerIdentifier]=o,"on-gov-click":()=>this.onSelectHandler(t)},t.label)))))),a("span",{key:"713c0bcfb6ff3377c77bff908b7e30ecd084d64f",id:this.formSelectId,hidden:true},this.wcagSelectLabel),this.compactControls?a("gov-form-select",{"wcag-labelled-by":this.formSelectId,"onGov-change":this.onChangeHandler.bind(this)},this.controller.map((t=>a("option",{value:t.triggerIdentifier,selected:t.active},t.label)))):null,a("slot",{key:"176d4c69a319e1d0630db64ad853bd3358db865c"}))}getCurrentTab(){return this.controller.find((t=>t.active))||null}onSelectHandler(t){const o=this.controller.findIndex((o=>o.triggerIdentifier===t.triggerIdentifier));this.focusIndex=o;this.setActiveByIdentifier(t.triggerIdentifier);this.reRender();this.govChange.emit(this.getCurrentTab().element)}onChangeHandler(t){const o=t.target.value;t.stopPropagation();this.setActiveByIdentifier(o);this.reRender();this.govChange.emit(this.getCurrentTab().element)}onKeydownHandler(t){const o=t.keyCode;t.stopPropagation();this.goToPrevNext(o)}goToPrevNext(t){if([37,38,39,40].includes(t)){if(false===(this.focusIndex>=0&&this.focusIndex<=this.controller.length-1)){return}this.controller[this.focusIndex].active=false;if(t===39||t===40){this.focusIndex++;if(this.focusIndex>=this.controller.length){this.focusIndex=0}if(this.controller[this.focusIndex].disabled){this.goToPrevNext(40)}}else if(t===37||t===38){this.focusIndex--;if(this.focusIndex<0){this.focusIndex=this.controller.length-1}if(this.controller[this.focusIndex].disabled){this.goToPrevNext(38)}}if(this.focusIndex>=0&&this.focusIndex<=this.controller.length-1){const t=this.controller[this.focusIndex];t.active=true;const o=this.triggerRefs[t.triggerIdentifier];if(o.nodeName.toLowerCase()==="gov-chip"){this.triggerRefs[t.triggerIdentifier].setFocus()}else{this.triggerRefs[t.triggerIdentifier].focus()}this.controller=[...this.controller];this.reRender();this.govChange.emit(this.getCurrentTab().element)}}}async refresh(){this.prepareDataSource()}async currentTab(){return this.getCurrentTab().element||null}async setActiveTab(t){this.setActiveByIdentifier(t);this.reRender()}async validateWcag(){v(this.wcagSelectLabel,"wcag-select-label",p.root);l(this.wcagLabel,this.wcagLabelledBy,p.root)}get host(){return e(this)}static get watchers(){return{type:["validateType"],variant:["validateVariant"]}}};u.style=_;export{u as gov_tabs};
|
|
2
|
-
//# sourceMappingURL=p-24e32e0f.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["govTabsCss","GovTabsStyle0","GovTabs","constructor","hostRef","this","triggerRefs","h","govHost","host","formSelectId","createID","validateType","newValue","validateProp","TabTypes","TabsClass","root","validateVariant","TabVariants","componentWillLoad","prepareDataSource","componentDidRender","canValidateWcagOnRender","delay","validateWcag","resizeObserver","controller","promises","querySelectorAll","TabsItemClass","forEach","tab","controlItem","Promise","all","getIdentifier","getTriggerIdentifier","getDisableState","then","identifier","triggerIdentifier","disabled","isDefault","getAttribute","label","contentIdentifier","element","active","default","push","controllers","defaultTab","findIndex","focusIndex","reRender","setActiveByIdentifier","temp","map","item","control","setActiveStatus","ResizeObserver","throttle","observe","tabsRef","render","Host","key","class","classes","variant","type","role","ref","el","wcagLabel","wcagLabelledBy","onKeyDown","onKeydownHandler","bind","tabs","toBoolAttr","compactControls","list","btn","id","onClick","onSelectHandler","tabindex","tag","focusable","inverse","hidden","wcagSelectLabel","onChangeHandler","value","selected","getCurrentTab","find","index","t","govChange","emit","e","triggerId","target","stopPropagation","keyCode","goToPrevNext","includes","length","current","trigger","nodeName","toLowerCase","setFocus","focus","refresh","currentTab","setActiveTab","validateWcagProp","validateWcagLabel"],"sources":["../../../packages/core/src/components/gov-tabs/gov-tabs.scss?tag=gov-tabs","../../../packages/core/src/components/gov-tabs/gov-tabs.tsx"],"sourcesContent":["/*\n * Tabs\n */\n\n$class: \".gov-tabs\";\n\n#{$class} {\n\t@include base();\n\t&__list {\n\t\t@extend %reset-ul;\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tmargin: rem-calc(0 0 20);\n\t}\n\t&__list > &__item {\n\t\t@extend %reset-ul-li;\n\t\tdisplay: flex;\n\t\tmargin: 0;\n\t}\n\t&__btn {\n\t\t@include typography($font-size-s);\n\t\t@include button-core();\n\t\t@include focus-outline();\n\t\tmargin: 0;\n\t\tpadding: rem-calc(12 0 10);\n\t\tborder-bottom: rem-calc(2) solid transparent;\n\t\tfont-weight: 700;\n\t\ttext-align: center;\n\t\ttransition: $t linear color, $t linear border-color;\n\t\t&[disabled] {\n\t\t\tcursor: not-allowed;\n\t\t}\n\t}\n\n\t// VARIANTS\n\t@each $type, $definitions in $tabs-types {\n\t\t&[type=\"#{$type}\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__list {\n\t\t\t\t\tgap: get(\"item-spacing\", $definitions);\n\t\t\t\t\t@if deep-map-check($definitions, \"border\") {\n\t\t\t\t\t\tborder-bottom: $tabs-list-border;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@each $variant, $definitions in $tabs-variants {\n\t\t&[variant=\"#{$variant}\"][type=\"text\"] {\n\t\t\t#{$class} {\n\t\t\t\t&__btn:not([disabled]) {\n\t\t\t\t\tcolor: get(\"color\", $definitions);\n\t\t\t\t\t@include hover() {\n\t\t\t\t\t\tcolor: get(\"color-hover\", $definitions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// STATES\n\t\t\t\t&__btn[aria-selected=\"true\"] {\n\t\t\t\t\tborder-bottom-color: get(\"color-active\", $definitions);\n\t\t\t\t\tcolor: get(\"color-active\", $definitions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t&[orientation=\"vertical\"] {\n\t\t#{$class}__btn {\n\t\t\ttext-align: left;\n\t\t}\n\t}\n\n\t// MQ\n\t@include mq($from: xl) {\n\t\t&[orientation=\"vertical\"] {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\n\t\t\t#{$class}__list {\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t\tflex-direction: column;\n\t\t\t\twidth: max-content;\n\t\t\t\tmax-width: 30vw;\n\t\t\t\tmargin-right: rem-calc(20);\n\t\t\t\tpadding: rem-calc(0 8);\n\t\t\t\tborder-bottom: none;\n\t\t\t\tborder-right: $tabs-list-border;\n\t\t\t}\n\n\t\t\t#{$class}__item {\n\t\t\t\tjustify-content: flex-end;\n\t\t\t}\n\n\t\t\t#{$class}__btn {\n\t\t\t\tpadding: rem-calc(8 12);\n\t\t\t\ttext-align: right;\n\t\t\t}\n\t\t}\n\t}\n}\n","import {Component, Element, Event, EventEmitter, h, Host, Method, Prop, State, Watch} from \"@stencil/core\"\n\nimport {govHost, toBoolAttr} from \"../../helpers/Dom/template\"\nimport {GovHost} from \"../../helpers/Dom/template.types\"\nimport {canValidateWcagOnRender} from \"../../helpers/Dom/win\"\nimport {validateProp} from \"../../helpers/Validate/props\"\nimport {validateWcagLabel, validateWcagProp} from \"../../helpers/Validate/wcag\"\nimport {Nullable} from \"../../types/interfaces\"\nimport {createID} from \"../../utils/string.utils\"\nimport {delay, throttle} from \"../../utils/utils\"\nimport {TabOrientationType, TabsClass, TabsItemClass, TabType, TabTypes, TabVariants, VariantType} from \"./constants\"\nimport {GovTabControllerItem} from \"./gov-tabs.types\"\n\n@Component({\n\ttag: \"gov-tabs\",\n\tstyleUrl: \"gov-tabs.scss\",\n})\nexport class GovTabs {\n\tprivate h: GovHost\n\tprivate triggerRefs: { [key: string]: HTMLButtonElement | HTMLGovChipElement } = {}\n\tprivate tabsRef?: HTMLDivElement\n\n\tprivate readonly formSelectId: string\n\n\tconstructor() {\n\t\tthis.h = govHost(this.host)\n\t\tthis.formSelectId = createID(\"GovFormSelect\")\n\t}\n\n\t@Element() host: HTMLGovTabsElement\n\t@State() controller: GovTabControllerItem[] = []\n\t@State() focusIndex = 0\n\t@State() compactControls = false\n\t/**\n\t * Tabs type\n\t */\n\t@Prop() readonly type: TabType = \"text\"\n\t/**\n\t * Style variation of the tab chips.\n\t */\n\t@Prop() readonly variant?: VariantType = \"primary\"\n\t/**\n\t * Tabs orientation\n\t */\n\t@Prop() readonly orientation: TabOrientationType = \"horizontal\"\n\t/**\n\t * Adds accessible label for the tabs that is only shown for screen readers.\n\t */\n\t@Prop({attribute: \"wcag-label\"}) readonly wcagLabel: string\n\t/**\n\t * Adds accessible label for the tabs select\n\t */\n\t@Prop({attribute: \"wcag-select-label\"}) readonly wcagSelectLabel: string\n\t/**\n\t * Indicates the id of a component that labels the tabs.\n\t */\n\t@Prop({attribute: \"wcag-labelled-by\"}) readonly wcagLabelledBy: string\n\t/**\n\t * Emitted when the tab is changed.\n\t */\n\t@Event({eventName: \"gov-change\"}) govChange: EventEmitter<HTMLGovTabsItemElement>\n\n\t@Watch(\"type\")\n\tvalidateType(newValue: string): void {\n\t\tvalidateProp(TabTypes, newValue, TabsClass.root)\n\t}\n\n\t@Watch(\"variant\")\n\tvalidateVariant(newValue: string): void {\n\t\tvalidateProp(TabVariants, newValue, TabsClass.root)\n\t}\n\n\tcomponentWillLoad() {\n\t\tthis.prepareDataSource()\n\t}\n\n\tasync componentDidRender() {\n\t\tif (canValidateWcagOnRender()) {\n\t\t\tawait delay(500)\n\t\t\tawait this.validateWcag()\n\t\t}\n\n\t\tthis.resizeObserver()\n\t}\n\n\tprivate prepareDataSource(): void {\n\t\tthis.controller = []\n\t\tconst promises: Promise<GovTabControllerItem>[] = []\n\t\tthis.host.querySelectorAll(TabsItemClass.root).forEach((tab: HTMLGovTabsItemElement) => {\n\t\t\tconst controlItem = Promise.all([\n\t\t\t\ttab.getIdentifier(),\n\t\t\t\ttab.getTriggerIdentifier(),\n\t\t\t\ttab.getDisableState()\n\t\t\t]).then(([identifier, triggerIdentifier, disabled]) => {\n\t\t\t\tconst isDefault = typeof tab.getAttribute(\"default\") === \"string\"\n\t\t\t\treturn {\n\t\t\t\t\tlabel: tab.getAttribute(\"label\"),\n\t\t\t\t\tcontentIdentifier: identifier,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\ttriggerIdentifier: triggerIdentifier,\n\t\t\t\t\telement: tab,\n\t\t\t\t\tactive: false,\n\t\t\t\t\tdefault: isDefault,\n\t\t\t\t}\n\t\t\t})\n\t\t\tpromises.push(controlItem)\n\t\t});\n\t\tPromise.all(promises).then(controllers => {\n\t\t\tlet defaultTab = controllers.findIndex(controller => controller.default)\n\t\t\tif (defaultTab === -1) defaultTab = 0\n\t\t\tthis.focusIndex = defaultTab\n\t\t\tcontrollers[defaultTab].active = true\n\t\t\tthis.controller = [...controllers]\n\t\t\tthis.reRender()\n\t\t})\n\t}\n\n\tprivate setActiveByIdentifier(identifier: string) {\n\t\tconst temp = []\n\t\tthis.controller.map(item => {\n\t\t\titem.active = identifier === item.triggerIdentifier || identifier === item.contentIdentifier\n\t\t\ttemp.push(item)\n\t\t})\n\t\tthis.controller = [...temp]\n\t}\n\n\tprivate reRender() {\n\t\tthis.controller.map(control => {\n\t\t\tcontrol.element.setActiveStatus(control.active)\n\t\t})\n\t}\n\n\t/*\n\tprivate evaluateControls() {\n\t\tthis.compactControls = false\n\t\tlet sumOfWidth = this.tabsRef.querySelector(\"ul\").offsetWidth\n\t\tthis.compactControls = this.tabsRef.offsetWidth < sumOfWidth\n\t}\n\t*/\n\n\tprivate resizeObserver() {\n\t\tconst resizeObserver = new ResizeObserver(\n\t\t\tthrottle(() => {\n\t\t\t\t// this.evaluateControls()\n\t\t\t}, 200),\n\t\t)\n\n\t\tresizeObserver.observe(this.tabsRef)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={this.h.classes(TabsClass.root)}\n\t\t\t\tvariant={this.variant}\n\t\t\t\ttype={this.type}\n\t\t\t\trole=\"tablist\"\n\t\t\t\tref={el => (this.tabsRef = el as HTMLDivElement)}\n\t\t\t\taria-label={this.wcagLabel}\n\t\t\t\taria-labelledby={this.wcagLabelledBy}\n\t\t\t\tonKeyDown={this.onKeydownHandler.bind(this)}\n\t\t\t>\n\t\t\t\t<div class={TabsClass.tabs} aria-hidden={toBoolAttr(this.compactControls)}>\n\t\t\t\t\t<ul class={TabsClass.list}>\n\t\t\t\t\t\t{this.controller.map(control => (\n\t\t\t\t\t\t\t<li class={TabsClass.item}>\n\t\t\t\t\t\t\t\t{this.type == \"text\" ? (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclass={TabsClass.btn}\n\t\t\t\t\t\t\t\t\t\tid={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\taria-disabled={toBoolAttr(control.disabled)}\n\t\t\t\t\t\t\t\t\t\taria-selected={toBoolAttr(control.active)}\n\t\t\t\t\t\t\t\t\t\taria-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\ttabindex={control.active && !control.disabled ? 0 : -1}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLButtonElement)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<gov-chip\n\t\t\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\t\t\ttag={'button'}\n\t\t\t\t\t\t\t\t\t\tidentifier={control.triggerIdentifier}\n\t\t\t\t\t\t\t\t\t\twcag-selected={control.active}\n\t\t\t\t\t\t\t\t\t\twcag-controls={control.contentIdentifier}\n\t\t\t\t\t\t\t\t\t\tfocusable={control.active}\n\t\t\t\t\t\t\t\t\t\tdisabled={control.disabled}\n\t\t\t\t\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\t\t\t\t\tinverse={!control.active}\n\t\t\t\t\t\t\t\t\t\tref={el => (this.triggerRefs[control.triggerIdentifier] = el as HTMLGovChipElement)}\n\t\t\t\t\t\t\t\t\t\ton-gov-click={() => this.onSelectHandler(control)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t\t\t</gov-chip>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\n\t\t\t\t<span id={this.formSelectId} hidden>\n\t\t\t\t\t{this.wcagSelectLabel}\n\t\t\t\t</span>\n\t\t\t\t{this.compactControls ? (\n\t\t\t\t\t<gov-form-select wcag-labelled-by={this.formSelectId} onGov-change={this.onChangeHandler.bind(this)}>\n\t\t\t\t\t\t{this.controller.map(control => (\n\t\t\t\t\t\t\t<option value={control.triggerIdentifier} selected={control.active}>\n\t\t\t\t\t\t\t\t{control.label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</gov-form-select>\n\t\t\t\t) : null}\n\n\t\t\t\t<slot></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n\n\tprivate getCurrentTab(): GovTabControllerItem | null {\n\t\treturn this.controller.find(control => control.active) || null\n\t}\n\n\tprivate onSelectHandler(control: GovTabControllerItem) {\n\t\tconst index = this.controller.findIndex(t => t.triggerIdentifier === control.triggerIdentifier);\n\t\tthis.focusIndex = index\n\t\tthis.setActiveByIdentifier(control.triggerIdentifier)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onChangeHandler(e: CustomEvent) {\n\t\tconst triggerId = (e.target as HTMLSelectElement).value\n\t\te.stopPropagation()\n\t\tthis.setActiveByIdentifier(triggerId)\n\t\tthis.reRender()\n\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t}\n\n\tprivate onKeydownHandler(e: KeyboardEvent) {\n\t\tconst keyCode = e.keyCode\n\n\t\te.stopPropagation()\n\t\tthis.goToPrevNext(keyCode)\n\t}\n\n\tprivate goToPrevNext(keyCode: number) {\n\t\tif ([37, 38, 39, 40].includes(keyCode)) {\n\t\t\tif (false === (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1)) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.controller[this.focusIndex].active = false\n\n\t\t\tif (keyCode === 39 || keyCode === 40) {\n\t\t\t\tthis.focusIndex++\n\t\t\t\tif (this.focusIndex >= this.controller.length) {\n\t\t\t\t\tthis.focusIndex = 0\n\t\t\t\t}\n\t\t\t\tif (this.controller[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(40)\n\t\t\t\t}\n\t\t\t} else if (keyCode === 37 || keyCode === 38) {\n\t\t\t\tthis.focusIndex--\n\t\t\t\tif (this.focusIndex < 0) {\n\t\t\t\t\tthis.focusIndex = this.controller.length - 1\n\t\t\t\t}\n\t\t\t\tif (this.controller[this.focusIndex].disabled) {\n\t\t\t\t\tthis.goToPrevNext(38)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.focusIndex >= 0 && this.focusIndex <= this.controller.length - 1) {\n\t\t\t\tconst current = this.controller[this.focusIndex]\n\t\t\t\tcurrent.active = true\n\t\t\t\tconst trigger = this.triggerRefs[current.triggerIdentifier]\n\t\t\t\tif (trigger.nodeName.toLowerCase() === 'gov-chip') {\n\t\t\t\t\t(this.triggerRefs[current.triggerIdentifier] as HTMLGovChipElement).setFocus()\n\t\t\t\t} else {\n\t\t\t\t\tthis.triggerRefs[current.triggerIdentifier].focus()\n\t\t\t\t}\n\n\t\t\t\tthis.controller = [...this.controller]\n\t\t\t\tthis.reRender()\n\t\t\t\tthis.govChange.emit(this.getCurrentTab().element)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync refresh(): Promise<void> {\n\t\tthis.prepareDataSource()\n\t}\n\n\t/**\n\t * Returns the currently selected tabs-item\n\t */\n\t@Method()\n\tasync currentTab(): Promise<Nullable<HTMLGovTabsItemElement>> {\n\t\treturn this.getCurrentTab().element || null\n\t}\n\n\t/**\n\t * Regenerate tabs controllers\n\t */\n\t@Method()\n\tasync setActiveTab(identifier: string): Promise<void> {\n\t\tthis.setActiveByIdentifier(identifier)\n\t\tthis.reRender()\n\t}\n\n\t/**\n\t * Validate the WCAG attributes of the component\n\t */\n\t@Method()\n\tasync validateWcag(): Promise<void> {\n\t\tvalidateWcagProp(this.wcagSelectLabel, \"wcag-select-label\", TabsClass.root)\n\t\tvalidateWcagLabel(this.wcagLabel, this.wcagLabelledBy, TabsClass.root)\n\t}\n}\n"],"mappings":"iZAAA,MAAMA,EAAa,wgKACnB,MAAAC,EAAeD,E,MCgBFE,EAAO,MAOnB,WAAAC,CAAAC,G,gDALQC,KAAAC,YAAyE,G,gBAWnC,G,gBACxB,E,qBACK,M,UAIM,O,aAIQ,U,iBAIU,a,sFAnBlDD,KAAKE,EAAIC,EAAQH,KAAKI,MACtBJ,KAAKK,aAAeC,EAAS,gB,CAqC9B,YAAAC,CAAaC,GACZC,EAAaC,EAAUF,EAAUG,EAAUC,K,CAI5C,eAAAC,CAAgBL,GACfC,EAAaK,EAAaN,EAAUG,EAAUC,K,CAG/C,iBAAAG,GACCf,KAAKgB,mB,CAGN,wBAAMC,GACL,GAAIC,IAA2B,OACxBC,EAAM,WACNnB,KAAKoB,c,CAGZpB,KAAKqB,gB,CAGE,iBAAAL,GACPhB,KAAKsB,WAAa,GAClB,MAAMC,EAA4C,GAClDvB,KAAKI,KAAKoB,iBAAiBC,EAAcb,MAAMc,SAASC,IAC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