@govbr-ds/webcomponents 2.1.1 → 2.1.2
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/README.md +0 -11
- package/cem/custom-elements.json +209 -8
- package/dist/cjs/br-cookiebar-link.cjs.entry.js +2 -1
- package/dist/cjs/br-date-picker_3.cjs.entry.js +2 -1
- package/dist/cjs/br-datetime-picker.cjs.entry.js +1 -2
- package/dist/cjs/br-dropdown_2.cjs.entry.js +252 -108
- package/dist/cjs/br-header-logo.cjs.entry.js +2 -1
- package/dist/cjs/br-icon.cjs.entry.js +1 -1
- package/dist/cjs/br-item.cjs.entry.js +25 -14
- package/dist/cjs/br-link.cjs.entry.js +2 -1
- package/dist/cjs/br-magic-button.cjs.entry.js +2 -1
- package/dist/cjs/br-menu-link.cjs.entry.js +2 -1
- package/dist/cjs/br-select-input_3.cjs.entry.js +45 -11
- package/dist/cjs/br-sign-in.cjs.entry.js +2 -1
- package/dist/cjs/br-slider.cjs.entry.js +1 -2
- package/dist/cjs/br-tag.cjs.entry.js +2 -3
- package/dist/cjs/br-upload.cjs.entry.js +2 -3
- package/dist/cjs/index-CRdcutym.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.js +2 -1
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +2 -1
- package/dist/collection/components/datetime-picker/datetime-picker.js +1 -2
- package/dist/collection/components/header/header-logo/header-logo.js +2 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/item/item.js +25 -14
- package/dist/collection/components/link/link.js +2 -1
- package/dist/collection/components/magic-button/magic-button.js +2 -1
- package/dist/collection/components/menu/menu-link/menu-link.js +2 -1
- package/dist/collection/components/select/select-input/select-input.js +2 -1
- package/dist/collection/components/select/select-list/select-list.js +17 -5
- package/dist/collection/components/select/select-option/select-option.js +28 -7
- package/dist/collection/components/select/select.js +226 -109
- package/dist/collection/components/select/select.utils.js +34 -0
- package/dist/collection/components/sign-in/sign-in.js +2 -1
- package/dist/collection/components/slider/slider.js +1 -2
- package/dist/collection/components/tag/tag.js +2 -3
- package/dist/collection/components/upload/upload.js +2 -3
- package/dist/collection/pages/scripts/component-controls.js +13 -4
- package/dist/collection/pages/scripts/menu.js +11 -2
- package/dist/collection/pages/scripts/pageLoader.js +3 -1
- package/dist/components/br-avatar.js +1 -1
- package/dist/components/br-breadcrumb.js +1 -1
- package/dist/components/br-carousel.js +1 -1
- package/dist/components/br-checkbox-group.js +1 -1
- package/dist/components/br-checkbox.js +1 -1
- package/dist/components/br-checkgroup.js +1 -1
- package/dist/components/br-collapse.js +1 -1
- package/dist/components/br-cookiebar-cookie.js +1 -1
- package/dist/components/br-cookiebar-group.js +1 -1
- package/dist/components/br-cookiebar-link.js +1 -1
- package/dist/components/br-cookiebar-note-group.js +1 -1
- package/dist/components/br-cookiebar.js +1 -1
- package/dist/components/br-date-picker.js +1 -1
- package/dist/components/br-datetime-input.js +1 -1
- package/dist/components/br-datetime-picker.js +1 -1
- package/dist/components/br-dropdown.js +1 -1
- package/dist/components/br-footer-category.js +1 -1
- package/dist/components/br-footer-item.js +1 -1
- package/dist/components/br-footer-social.js +1 -1
- package/dist/components/br-header-function.js +1 -1
- package/dist/components/br-header-link.js +1 -1
- package/dist/components/br-header-list.js +1 -1
- package/dist/components/br-header-logo.js +1 -1
- package/dist/components/br-header.js +1 -1
- package/dist/components/br-icon.js +1 -1
- package/dist/components/br-input.js +1 -1
- package/dist/components/br-item.js +1 -1
- package/dist/components/br-link.js +1 -1
- package/dist/components/br-list.js +1 -1
- package/dist/components/br-magic-button.js +1 -1
- package/dist/components/br-menu-header.js +1 -1
- package/dist/components/br-menu-item.js +1 -1
- package/dist/components/br-menu-link.js +1 -1
- package/dist/components/br-menu-list.js +1 -1
- package/dist/components/br-menu-social.js +1 -1
- package/dist/components/br-menu.js +1 -1
- package/dist/components/br-message.js +1 -1
- package/dist/components/br-modal.js +1 -1
- package/dist/components/br-notification-header.js +1 -1
- package/dist/components/br-notification-item.js +1 -1
- package/dist/components/br-pagination.js +1 -1
- package/dist/components/br-radio-group.js +1 -1
- package/dist/components/br-radio.js +1 -1
- package/dist/components/br-select-input.js +1 -1
- package/dist/components/br-select-list.js +1 -1
- package/dist/components/br-select-option.js +1 -1
- package/dist/components/br-select.js +1 -1
- package/dist/components/br-sign-in.js +1 -1
- package/dist/components/br-skip-link-item.js +1 -1
- package/dist/components/br-skip-link.js +1 -1
- package/dist/components/br-skiplink-item.js +1 -1
- package/dist/components/br-slider.js +1 -1
- package/dist/components/br-step-item.js +1 -1
- package/dist/components/br-switch.js +1 -1
- package/dist/components/br-tab.js +1 -1
- package/dist/components/br-table-cell.js +1 -1
- package/dist/components/br-table-header-cell.js +1 -1
- package/dist/components/br-tag.js +1 -1
- package/dist/components/br-textarea.js +1 -1
- package/dist/components/br-time-picker.js +1 -1
- package/dist/components/br-tooltip.js +1 -1
- package/dist/components/br-upload.js +1 -1
- package/dist/components/br-wizard.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-0IYmyaTi.js → p-34Jfn-U-.js} +1 -1
- package/dist/components/{p-41XwlWiS.js → p-B7Amgxkp.js} +1 -1
- package/dist/components/p-BKuMQJrQ.js +5 -0
- package/dist/components/{p-LmeJrLxH.js → p-BeE7R9nu.js} +1 -1
- package/dist/components/{p-C98-mHmV.js → p-Bo0QYHJO.js} +1 -1
- package/dist/components/{p-DYnkGWii.js → p-C2i2c_io.js} +1 -1
- package/dist/components/p-C7v0lVlX.js +5 -0
- package/dist/components/{p-D_CSvOY9.js → p-CMBsvswx.js} +1 -1
- package/dist/components/{p-Dkg2scYZ.js → p-CRrimdz6.js} +1 -1
- package/dist/components/{p-Bm0ECvfB.js → p-CWORw84-.js} +1 -1
- package/dist/components/p-CvUMXJCl.js +5 -0
- package/dist/components/{p-nJOJGpyl.js → p-DFUKDNck.js} +1 -1
- package/dist/components/p-DHicj0By.js +5 -0
- package/dist/components/{p-B-sbd1_h.js → p-DXjQyH6s.js} +1 -1
- package/dist/components/p-DmCxdB9P.js +5 -0
- package/dist/components/{p-DoXNfcTT.js → p-Dp0xy_3n.js} +1 -1
- package/dist/components/{p-DaeGwqw0.js → p-JAkkThgf.js} +1 -1
- package/dist/components/{p-aF8bGN3t.js → p-Ud-WB0hx.js} +1 -1
- package/dist/components/p-fpMNttbg.js +5 -0
- package/dist/components/{p-D9SpD3Ay.js → p-qYONSNcf.js} +1 -1
- package/dist/components/{p-CDZFuUlU.js → p-qhhHGJY1.js} +1 -1
- package/dist/components/p-ukNmfGNP.js +5 -0
- package/dist/components/p-xa8e1kSW.js +5 -0
- package/dist/esm/br-cookiebar-link.entry.js +2 -1
- package/dist/esm/br-date-picker_3.entry.js +2 -1
- package/dist/esm/br-datetime-picker.entry.js +1 -2
- package/dist/esm/br-dropdown_2.entry.js +252 -108
- package/dist/esm/br-header-logo.entry.js +2 -1
- package/dist/esm/br-icon.entry.js +1 -1
- package/dist/esm/br-item.entry.js +25 -14
- package/dist/esm/br-link.entry.js +2 -1
- package/dist/esm/br-magic-button.entry.js +2 -1
- package/dist/esm/br-menu-link.entry.js +2 -1
- package/dist/esm/br-select-input_3.entry.js +45 -11
- package/dist/esm/br-sign-in.entry.js +2 -1
- package/dist/esm/br-slider.entry.js +1 -2
- package/dist/esm/br-tag.entry.js +2 -3
- package/dist/esm/br-upload.entry.js +2 -3
- package/dist/esm/index-C2RBydfd.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/hydrate/index.js +356 -163
- package/dist/hydrate/index.mjs +356 -163
- package/dist/types/components/item/item.d.ts +1 -0
- package/dist/types/components/select/select-list/select-list.d.ts +1 -0
- package/dist/types/components/select/select-option/select-option.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +14 -0
- package/dist/types/components/select/select.types.d.ts +2 -0
- package/dist/types/components/select/select.utils.d.ts +13 -0
- package/dist/webcomponents/p-0777c7b1.entry.js +5 -0
- package/dist/webcomponents/p-18ee6175.entry.js +5 -0
- package/dist/webcomponents/p-1c303a4e.entry.js +5 -0
- package/dist/webcomponents/{p-60cc820c.entry.js → p-4c13221a.entry.js} +1 -1
- package/dist/webcomponents/p-51ce2c31.entry.js +5 -0
- package/dist/webcomponents/p-83ff4579.entry.js +5 -0
- package/dist/webcomponents/p-8e819355.entry.js +5 -0
- package/dist/webcomponents/p-92a9b9c4.entry.js +5 -0
- package/dist/webcomponents/p-a4ae72e3.entry.js +5 -0
- package/dist/webcomponents/p-a994c190.entry.js +5 -0
- package/dist/webcomponents/p-c949d993.entry.js +5 -0
- package/dist/webcomponents/p-f26038e2.entry.js +5 -0
- package/dist/webcomponents/{p-4fe12a72.entry.js → p-f303f6b3.entry.js} +1 -1
- package/dist/webcomponents/p-f85ee01c.entry.js +5 -0
- package/dist/webcomponents/{p-5b257a4b.entry.js → p-ffe0241e.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +3 -7
- package/dist/components/p-BW0_ORNA.js +0 -5
- package/dist/components/p-C3LQSQpc.js +0 -5
- package/dist/components/p-CRfi23Rd.js +0 -5
- package/dist/components/p-CUI5zWGf.js +0 -5
- package/dist/components/p-CxviDiCr.js +0 -5
- package/dist/components/p-DvrdmqoQ.js +0 -5
- package/dist/components/p-TFWd_UBV.js +0 -5
- package/dist/components/p-cfPt-vKA.js +0 -5
- package/dist/webcomponents/p-059c3d6c.entry.js +0 -5
- package/dist/webcomponents/p-0b8f39bc.entry.js +0 -5
- package/dist/webcomponents/p-1b138f1c.entry.js +0 -5
- package/dist/webcomponents/p-22443c08.entry.js +0 -5
- package/dist/webcomponents/p-6c5f6cb6.entry.js +0 -5
- package/dist/webcomponents/p-6f1c4425.entry.js +0 -5
- package/dist/webcomponents/p-7cf9f4e5.entry.js +0 -5
- package/dist/webcomponents/p-7e1856e4.entry.js +0 -5
- package/dist/webcomponents/p-bba9fc09.entry.js +0 -5
- package/dist/webcomponents/p-cedb8eea.entry.js +0 -5
- package/dist/webcomponents/p-dba376cb.entry.js +0 -5
- package/dist/webcomponents/p-e80a1eb0.entry.js +0 -5
package/dist/hydrate/index.mjs
CHANGED
|
@@ -11898,12 +11898,13 @@ class CookiebarLink {
|
|
|
11898
11898
|
};
|
|
11899
11899
|
}
|
|
11900
11900
|
render() {
|
|
11901
|
-
return (hAsync(Host, { key: '
|
|
11901
|
+
return (hAsync(Host, { key: '33b89d9f5976f6fa7254ee90272a910a0956d765' }, hAsync("div", { key: 'a74fa612a1722a391a36b8fd6602c020cb0e94ce', class: this.getCssClassMap() }, hAsync("a", { key: '69b897c73cfe66bb15120a4116de9203640d34f5', class: "cookiebar-link-anchor", href: this.href, target: this.target, rel: this.target === '_blank' ? 'noopener noreferrer' : undefined, onClick: this.handleClick, part: "link" }, this.name, this.target === '_blank' && (hAsync("br-icon", { key: '3dcd2d9b253a9623924a8e1c0f167532b65fcf2c', class: "external-icon", iconName: "fa6-solid:arrow-up-right-from-square", width: "12", height: "12", "aria-label": "(abre em nova aba)" }))))));
|
|
11902
11902
|
}
|
|
11903
|
+
static get delegatesFocus() { return true; }
|
|
11903
11904
|
get el() { return getElement(this); }
|
|
11904
11905
|
static get style() { return cookiebarLinkCss(); }
|
|
11905
11906
|
static get cmpMeta() { return {
|
|
11906
|
-
"$flags$":
|
|
11907
|
+
"$flags$": 25,
|
|
11907
11908
|
"$tagName$": "br-cookiebar-link",
|
|
11908
11909
|
"$members$": {
|
|
11909
11910
|
"customId": [513, "custom-id"],
|
|
@@ -22109,8 +22110,9 @@ class DatetimeInput {
|
|
|
22109
22110
|
* Renderização principal do componente.
|
|
22110
22111
|
*/
|
|
22111
22112
|
render() {
|
|
22112
|
-
return (hAsync(Host, { key: '
|
|
22113
|
+
return (hAsync(Host, { key: '47e77b0412286cf4f8fb35f9a1038a2e68f87266' }, hAsync("div", { key: '86b4dda4364fe1cbe111007a2b4f61435abc5cf4', class: this.getCssClassMap(), part: "container" }, this.renderInputField())));
|
|
22113
22114
|
}
|
|
22115
|
+
static get delegatesFocus() { return true; }
|
|
22114
22116
|
get el() { return getElement(this); }
|
|
22115
22117
|
static get watchers() { return {
|
|
22116
22118
|
"rangeValue": [{
|
|
@@ -22134,7 +22136,7 @@ class DatetimeInput {
|
|
|
22134
22136
|
}; }
|
|
22135
22137
|
static get style() { return datetimeInputCss(); }
|
|
22136
22138
|
static get cmpMeta() { return {
|
|
22137
|
-
"$flags$":
|
|
22139
|
+
"$flags$": 25,
|
|
22138
22140
|
"$tagName$": "br-datetime-input",
|
|
22139
22141
|
"$members$": {
|
|
22140
22142
|
"placeholder": [1],
|
|
@@ -23988,9 +23990,8 @@ class DatetimePicker {
|
|
|
23988
23990
|
* Renderização principal do componente.
|
|
23989
23991
|
*/
|
|
23990
23992
|
render() {
|
|
23991
|
-
return (hAsync(Host, { key: '
|
|
23993
|
+
return (hAsync(Host, { key: '906849439dfc93b18952963b95e35da332e5018b', onKeyDown: this.handlePickerKeydown, "aria-busy": this.isValidating ? 'true' : null, "aria-describedby": this.hasFeedbackSlot || this.customValidationMessage || this.validatorMessage ? this.feedbackId : null, "aria-errormessage": this.customValidationMessage || this.validatorMessage || this.hasFeedbackSlot ? this.feedbackId : null }, hAsync("div", { key: '8a77432dc84c6897d7ffb2e403f72d42e333230a', class: this.getCssClassMap(), part: "container" }, this.renderInputField(), this.renderPickerContent()), hAsync("div", { key: '1e3f4df6f301fbb54d76eea49848ec7910bc3f33', id: this.feedbackId, part: "feedback", hidden: !this.hasFeedbackSlot && !this.customValidationMessage && !this.validatorMessage }, hAsync("slot", { key: '7000d3c447c5bfa1f674c78024a1e58ca69652a3', name: "feedback", onSlotchange: (event) => (this.hasFeedbackSlot = hasAssignedSlotContent(event.currentTarget)) }), !this.hasFeedbackSlot && (this.customValidationMessage || this.validatorMessage) ? (hAsync("br-message", { state: "danger", message: this.customValidationMessage || this.validatorMessage })) : null)));
|
|
23992
23994
|
}
|
|
23993
|
-
static get delegatesFocus() { return true; }
|
|
23994
23995
|
static get formAssociated() { return true; }
|
|
23995
23996
|
get el() { return getElement(this); }
|
|
23996
23997
|
static get watchers() { return {
|
|
@@ -24039,7 +24040,7 @@ class DatetimePicker {
|
|
|
24039
24040
|
}; }
|
|
24040
24041
|
static get style() { return datetimePickerCss(); }
|
|
24041
24042
|
static get cmpMeta() { return {
|
|
24042
|
-
"$flags$":
|
|
24043
|
+
"$flags$": 329,
|
|
24043
24044
|
"$tagName$": "br-datetime-picker",
|
|
24044
24045
|
"$members$": {
|
|
24045
24046
|
"mode": [1537],
|
|
@@ -26940,8 +26941,9 @@ class HeaderLogo {
|
|
|
26940
26941
|
* @returns JSX do componente.
|
|
26941
26942
|
*/
|
|
26942
26943
|
render() {
|
|
26943
|
-
return (hAsync(Host, { key: '
|
|
26944
|
+
return (hAsync(Host, { key: '31a3b7c3feb28df1bb66fb38832ed93ffec8a47b' }, hAsync("slot", { key: 'c3c1b1c2ad499c63866fe44a72ee8ec1b9cd43d6' }, hAsync("div", { key: '1edc6208374cee19b27d47f1e760cd25601286be', id: this.customId, class: this.getCssClassMap(), part: "container" }, this.href && this.href.trim() !== '' ? (hAsync("a", { href: this.href, target: this.target, rel: this.target === '_blank' ? 'noopener noreferrer' : undefined, onClick: this.handleClick }, this.renderImageElement())) : (this.renderImageElement())))));
|
|
26944
26945
|
}
|
|
26946
|
+
static get delegatesFocus() { return true; }
|
|
26945
26947
|
get el() { return getElement(this); }
|
|
26946
26948
|
static get watchers() { return {
|
|
26947
26949
|
"isCompact": [{
|
|
@@ -26950,7 +26952,7 @@ class HeaderLogo {
|
|
|
26950
26952
|
}; }
|
|
26951
26953
|
static get style() { return headerLogoCss(); }
|
|
26952
26954
|
static get cmpMeta() { return {
|
|
26953
|
-
"$flags$":
|
|
26955
|
+
"$flags$": 281,
|
|
26954
26956
|
"$tagName$": "br-header-logo",
|
|
26955
26957
|
"$members$": {
|
|
26956
26958
|
"customId": [513, "custom-id"],
|
|
@@ -27416,7 +27418,7 @@ class Icon {
|
|
|
27416
27418
|
return {
|
|
27417
27419
|
role: isInformative || isFocusable ? 'img' : null,
|
|
27418
27420
|
'aria-label': this.label || null,
|
|
27419
|
-
tabindex: isFocusable ? 0 :
|
|
27421
|
+
tabindex: isFocusable ? 0 : null,
|
|
27420
27422
|
'aria-hidden': isInformative || isFocusable ? null : 'true',
|
|
27421
27423
|
focusable: isFocusable ? true : 'false',
|
|
27422
27424
|
};
|
|
@@ -28303,6 +28305,7 @@ class Item {
|
|
|
28303
28305
|
this.activate();
|
|
28304
28306
|
}
|
|
28305
28307
|
};
|
|
28308
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: mantém em uma transação os modos standalone, controlado, radio e checkbox.
|
|
28306
28309
|
this.handleClick = (event) => {
|
|
28307
28310
|
if (this.disabled) {
|
|
28308
28311
|
event.preventDefault();
|
|
@@ -28334,14 +28337,17 @@ class Item {
|
|
|
28334
28337
|
}
|
|
28335
28338
|
else {
|
|
28336
28339
|
// Armazena o estado anterior para emitir o evento apenas se houver mudança.
|
|
28337
|
-
const previousSelectedValue = this.selectedValue;
|
|
28338
|
-
|
|
28339
|
-
if (
|
|
28340
|
-
|
|
28340
|
+
const previousSelectedValue = this.hasControlledSelection ? Boolean(this.selected) : this.selectedValue;
|
|
28341
|
+
const nextSelected = !previousSelectedValue;
|
|
28342
|
+
if (!this.hasControlledSelection)
|
|
28343
|
+
this.selectedValue = nextSelected;
|
|
28344
|
+
if (previousSelectedValue !== nextSelected) {
|
|
28345
|
+
const detail = { selected: nextSelected };
|
|
28341
28346
|
this.brDidSelect.emit(detail);
|
|
28342
28347
|
this.brItemSelect.emit(detail);
|
|
28343
28348
|
}
|
|
28344
|
-
this.
|
|
28349
|
+
if (!this.hasControlledSelection)
|
|
28350
|
+
this.updateCheckboxes();
|
|
28345
28351
|
}
|
|
28346
28352
|
}
|
|
28347
28353
|
event.stopPropagation();
|
|
@@ -28405,7 +28411,6 @@ class Item {
|
|
|
28405
28411
|
*/
|
|
28406
28412
|
async setFocus() {
|
|
28407
28413
|
this.el?.focus();
|
|
28408
|
-
this.focusableElement?.focus();
|
|
28409
28414
|
}
|
|
28410
28415
|
/**
|
|
28411
28416
|
* Define o tabIndex do elemento interno.
|
|
@@ -28421,6 +28426,9 @@ class Item {
|
|
|
28421
28426
|
get effectiveSelected() {
|
|
28422
28427
|
return this.selected ?? this.isSelected;
|
|
28423
28428
|
}
|
|
28429
|
+
get hasControlledSelection() {
|
|
28430
|
+
return this.selected !== undefined;
|
|
28431
|
+
}
|
|
28424
28432
|
get effectiveInteractive() {
|
|
28425
28433
|
return (this.interactive ??
|
|
28426
28434
|
(this.isInteractive ||
|
|
@@ -28443,7 +28451,7 @@ class Item {
|
|
|
28443
28451
|
'br-item': true,
|
|
28444
28452
|
disabled: this.disabled,
|
|
28445
28453
|
active: this.effectiveActive,
|
|
28446
|
-
selected: this.selectedValue,
|
|
28454
|
+
selected: this.selected ?? this.selectedValue,
|
|
28447
28455
|
small: this.density === 'small',
|
|
28448
28456
|
medium: this.density === 'medium',
|
|
28449
28457
|
large: this.density === 'large',
|
|
@@ -28473,21 +28481,23 @@ class Item {
|
|
|
28473
28481
|
return {
|
|
28474
28482
|
...baseAttributes,
|
|
28475
28483
|
role: isInteractiveDiv ? 'button' : null,
|
|
28476
|
-
'aria-pressed': isInteractiveDiv ? String(this.selectedValue) : null,
|
|
28484
|
+
'aria-pressed': isInteractiveDiv ? String(this.selected ?? this.selectedValue) : null,
|
|
28477
28485
|
tabIndex: this.disabled || !isFocusableItem ? -1 : this.rovingTabIndex,
|
|
28478
28486
|
'aria-disabled': this.disabled ? 'true' : null,
|
|
28479
28487
|
'aria-current': this.effectiveActive ? 'true' : null,
|
|
28480
28488
|
'data-toggle': this.effectiveInteractive ? 'selection' : null,
|
|
28481
|
-
'is-selected': this.selectedValue ? true : null,
|
|
28489
|
+
'is-selected': (this.selected ?? this.selectedValue) ? true : null,
|
|
28482
28490
|
};
|
|
28483
28491
|
}
|
|
28484
28492
|
updateCheckboxSelectionState(emitEvent = true) {
|
|
28485
28493
|
if (this.hasRadios)
|
|
28486
28494
|
return;
|
|
28487
28495
|
const checkboxes = Array.from(this.el.querySelectorAll('br-checkbox'));
|
|
28488
|
-
|
|
28496
|
+
const nextSelected = checkboxes.some((checkbox) => checkbox.checked);
|
|
28497
|
+
if (!this.hasControlledSelection)
|
|
28498
|
+
this.selectedValue = nextSelected;
|
|
28489
28499
|
if (emitEvent && this.effectiveInteractive) {
|
|
28490
|
-
const detail = { selected:
|
|
28500
|
+
const detail = { selected: nextSelected };
|
|
28491
28501
|
this.brDidSelect.emit(detail);
|
|
28492
28502
|
this.brItemSelect.emit(detail);
|
|
28493
28503
|
}
|
|
@@ -28496,9 +28506,11 @@ class Item {
|
|
|
28496
28506
|
if (!this.hasRadios)
|
|
28497
28507
|
return;
|
|
28498
28508
|
const radios = Array.from(this.el.querySelectorAll('br-radio'));
|
|
28499
|
-
|
|
28509
|
+
const nextSelected = radios.some((radio) => radio.checked);
|
|
28510
|
+
if (!this.hasControlledSelection)
|
|
28511
|
+
this.selectedValue = nextSelected;
|
|
28500
28512
|
if (emitEvent && this.effectiveInteractive) {
|
|
28501
|
-
const detail = { selected:
|
|
28513
|
+
const detail = { selected: nextSelected };
|
|
28502
28514
|
this.brDidSelect.emit(detail);
|
|
28503
28515
|
this.brItemSelect.emit(detail);
|
|
28504
28516
|
}
|
|
@@ -28518,8 +28530,9 @@ class Item {
|
|
|
28518
28530
|
const TagType = this.getTagType();
|
|
28519
28531
|
const attributes = this.getAttributes();
|
|
28520
28532
|
const classList = this.getCssClassMap();
|
|
28521
|
-
return (hAsync(Host, { key: '
|
|
28533
|
+
return (hAsync(Host, { key: '0c2e8ad9198db23ff1c43bc1a48cabe478f4d207', tabindex: this.isInteractive || this.effectiveInteractive ? (this.disabled ? -1 : 0) : undefined }, hAsync(TagType, { key: 'd88d1732106bba4167118f16f2a27fdf3cf0f660', class: classList, ...attributes, tabindex: this.isInteractive || this.effectiveInteractive ? (this.disabled ? -1 : 0) : undefined, onClick: this.handleClick, onKeyDown: this.handleKeydown, id: this.customId, ref: (el) => (this.focusableElement = el), onMouseDown: this.handleMouseDown, part: "item" }, this.hasSlotStart || this.hasSlotEnd ? (hAsync("div", { class: "row align-items-center" }, this.hasSlotStart && (hAsync("div", { class: "col-auto" }, hAsync("slot", { name: "start" }))), hAsync("div", { class: "col" }, hAsync("slot", null)), this.hasSlotEnd && (hAsync("div", { class: "col-auto" }, hAsync("slot", { name: "end" }))))) : (hAsync("slot", null)))));
|
|
28522
28534
|
}
|
|
28535
|
+
static get delegatesFocus() { return true; }
|
|
28523
28536
|
get el() { return getElement(this); }
|
|
28524
28537
|
static get watchers() { return {
|
|
28525
28538
|
"isSelected": [{
|
|
@@ -28531,7 +28544,7 @@ class Item {
|
|
|
28531
28544
|
}; }
|
|
28532
28545
|
static get style() { return itemCss(); }
|
|
28533
28546
|
static get cmpMeta() { return {
|
|
28534
|
-
"$flags$":
|
|
28547
|
+
"$flags$": 281,
|
|
28535
28548
|
"$tagName$": "br-item",
|
|
28536
28549
|
"$members$": {
|
|
28537
28550
|
"disabled": [516],
|
|
@@ -28686,8 +28699,9 @@ class Link {
|
|
|
28686
28699
|
}
|
|
28687
28700
|
}
|
|
28688
28701
|
render() {
|
|
28689
|
-
return (hAsync(Host, { key: '
|
|
28702
|
+
return (hAsync(Host, { key: '3a2d7f49bfafc65412524d38a964a713ee1fe526' }, hAsync("a", { key: 'eddc87987df0418b5fdde03b39cadbc2db73762b', part: "anchor", class: { 'br-button': this.button }, href: this.disabled ? undefined : this.href, target: this.target, rel: this.getRel(), download: this.download, hreflang: this.hreflang, referrerPolicy: this.referrerPolicy, type: this.type, "aria-disabled": this.disabled ? 'true' : null, onClick: this.handleClick, ...this.getAnchorAttrs() }, hAsync("slot", { key: '74ece0d935b97cb91fd9d8df789f709dc3c5068d' }))));
|
|
28690
28703
|
}
|
|
28704
|
+
static get delegatesFocus() { return true; }
|
|
28691
28705
|
get el() { return getElement(this); }
|
|
28692
28706
|
static get watchers() { return {
|
|
28693
28707
|
"disabled": [{
|
|
@@ -28696,7 +28710,7 @@ class Link {
|
|
|
28696
28710
|
}; }
|
|
28697
28711
|
static get style() { return linkCss(); }
|
|
28698
28712
|
static get cmpMeta() { return {
|
|
28699
|
-
"$flags$":
|
|
28713
|
+
"$flags$": 281,
|
|
28700
28714
|
"$tagName$": "br-link",
|
|
28701
28715
|
"$members$": {
|
|
28702
28716
|
"href": [513],
|
|
@@ -29878,12 +29892,13 @@ class MagicButton {
|
|
|
29878
29892
|
*/
|
|
29879
29893
|
render() {
|
|
29880
29894
|
const effectiveAriaLabel = this.ariaLabel || this.label || (this.icon ? `Botão com ícone ${this.icon}` : 'Botão');
|
|
29881
|
-
return (hAsync(Host, { key: '
|
|
29895
|
+
return (hAsync(Host, { key: '0eec103c783b1ad5d02b3e5605b150e467dbb782', id: this.customId }, hAsync("div", { key: '53dae45267a14d4785b630dd4892277e3e869f37', class: this.getCssClassMap(), part: "container" }, hAsync("button", { key: 'f3e72b2e22d67473a9879c5bb6ba4912cca15be0', class: { 'br-button': true, ...this.getCircleClass() }, type: "button", "aria-label": effectiveAriaLabel, part: "button" }, this.icon && (hAsync("slot", { key: '409abad9354040b75650c0b104963c945601114c', name: "icon" }, hAsync("icon-base", { key: '5e8024b8568e054b8f6974bc5421db7990524c52', "attr:iconName": this.icon, class: this.getLabelIconClass() }))), this.label || hAsync("slot", { key: '6c2ccb7672ae15f36d02ec8036f047b31e716e9e' })))));
|
|
29882
29896
|
}
|
|
29897
|
+
static get delegatesFocus() { return true; }
|
|
29883
29898
|
get el() { return getElement(this); }
|
|
29884
29899
|
static get style() { return magicButtonCss(); }
|
|
29885
29900
|
static get cmpMeta() { return {
|
|
29886
|
-
"$flags$":
|
|
29901
|
+
"$flags$": 281,
|
|
29887
29902
|
"$tagName$": "br-magic-button",
|
|
29888
29903
|
"$members$": {
|
|
29889
29904
|
"customId": [513, "custom-id"],
|
|
@@ -31261,12 +31276,13 @@ class MenuLink {
|
|
|
31261
31276
|
};
|
|
31262
31277
|
}
|
|
31263
31278
|
render() {
|
|
31264
|
-
return (hAsync(Host, { key: '
|
|
31279
|
+
return (hAsync(Host, { key: '6c4c305cc78db8d5f5493f6b00884a475325aabd' }, hAsync("a", { key: 'd47a7f201e03bf6f6b0fd6fccce39db183d43765', href: this.href, target: this.target, rel: this.target === '_blank' ? 'noopener noreferrer' : undefined, onClick: this.handleClick, part: "link" }, hAsync("slot", { key: '8dca721902edbea3a7b6cd80779ec37032d78005', name: "url" }, hAsync("span", { key: 'c199d67e8dd3cec1e909a3b0d1f6506f00b29196', class: "mr-1" }, this.label ?? this.titulo)), hAsync("slot", { key: 'e7d1b3288faaf9af7921e11ba277ac79243b50d5', name: "icon" }, hAsync("br-icon", { key: '49e8a907a204059d40342b968bc27cb9481acd99', iconName: "fa6-solid:square-arrow-up-right", width: "12", height: "12", "aria-hidden": "true" })))));
|
|
31265
31280
|
}
|
|
31281
|
+
static get delegatesFocus() { return true; }
|
|
31266
31282
|
get el() { return getElement(this); }
|
|
31267
31283
|
static get style() { return menuLinkCss(); }
|
|
31268
31284
|
static get cmpMeta() { return {
|
|
31269
|
-
"$flags$":
|
|
31285
|
+
"$flags$": 281,
|
|
31270
31286
|
"$tagName$": "br-menu-link",
|
|
31271
31287
|
"$members$": {
|
|
31272
31288
|
"customId": [513, "custom-id"],
|
|
@@ -36150,6 +36166,37 @@ Scrim.FOCUSABLE_SELECTORS = [
|
|
|
36150
36166
|
'[tabindex]:not([tabindex="-1"])',
|
|
36151
36167
|
].join(',');
|
|
36152
36168
|
|
|
36169
|
+
function transitionSelection({ currentValues, multiple, value, selected, selectableValues = [], }) {
|
|
36170
|
+
const current = [...new Set(currentValues)];
|
|
36171
|
+
if (!multiple) {
|
|
36172
|
+
const values = selected && value ? [value] : [];
|
|
36173
|
+
return { values, changed: values.length !== current.length || values[0] !== current[0] };
|
|
36174
|
+
}
|
|
36175
|
+
if (!value && selectableValues.length > 0) {
|
|
36176
|
+
const values = selected ? [...new Set(selectableValues)] : [];
|
|
36177
|
+
return {
|
|
36178
|
+
values,
|
|
36179
|
+
changed: values.length !== current.length || values.some((item, index) => item !== current[index]),
|
|
36180
|
+
};
|
|
36181
|
+
}
|
|
36182
|
+
const next = new Set(current);
|
|
36183
|
+
if (selected)
|
|
36184
|
+
next.add(value);
|
|
36185
|
+
else
|
|
36186
|
+
next.delete(value);
|
|
36187
|
+
const values = [...next];
|
|
36188
|
+
return { values, changed: values.length !== current.length || values.some((item, index) => item !== current[index]) };
|
|
36189
|
+
}
|
|
36190
|
+
function transitionAllSelection(currentValues, selected, selectableValues) {
|
|
36191
|
+
return transitionSelection({
|
|
36192
|
+
currentValues,
|
|
36193
|
+
multiple: true,
|
|
36194
|
+
value: '',
|
|
36195
|
+
selected,
|
|
36196
|
+
selectableValues,
|
|
36197
|
+
});
|
|
36198
|
+
}
|
|
36199
|
+
|
|
36153
36200
|
const selectCss = () => `*,*::before,*::after{box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}code{font-family:monospace;font-size:1em}small{font-size:80%}img{border-style:none}button,input,select,textarea{font-family:inherit;font-size:100%;line-height:var(--font-line-height-medium);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{appearance:none}::-webkit-file-upload-button{appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:flex !important}}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.dropdown>.br-notification{left:auto;right:0}.dropdown .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--color-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x);background-color:var(--background-light);color:var(--color)}.dropdown .br-item:not(:last-child){border-bottom:1px solid var(--border-color)}.dropdown .br-item.selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.align-items-center{align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{flex:1 0 0%;min-width:8.3333333333%}.col-auto{flex:0 0 auto;width:auto}.col-2{flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.container-fluid,.container-lg{--grid-margin:var(--grid-portrait-margin);--grid-maxwidth:var(--grid-portrait-maxwidth);margin-left:auto;margin-right:auto;max-width:var(--grid-maxwidth);padding-left:var(--grid-margin);padding-right:var(--grid-margin);width:100%}.row{--grid-gutter:var(--grid-portrait-gutter);display:flex;flex-wrap:wrap;margin-left:calc(var(--grid-gutter)*-0.5);margin-right:calc(var(--grid-gutter)*-0.5)}@media (min-width: 576px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-sm) - var(--grid-tablet-margin))}}@media (min-width: 992px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tablet-margin)}.row{--grid-gutter:var(--grid-tablet-gutter)}.container{--grid-maxwidth:calc(var(--grid-breakpoint-md) - var(--grid-tablet-margin))}}@media (min-width: 1280px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-desktop-margin)}.row{--grid-gutter:var(--grid-desktop-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-lg) - var(--grid-desktop-margin))}}@media (min-width: 1600px){.container,.container-lg,.container-fluid{--grid-margin:var(--grid-tv-margin)}.row{--grid-gutter:var(--grid-tv-gutter)}.container,.container-lg{--grid-maxwidth:calc(var(--grid-breakpoint-xl) - var(--grid-tv-margin))}}.ease{animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-in-out{animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.mt-1{margin-top:var(--spacing-scale-half) !important}.mr-1{margin-right:var(--spacing-scale-half) !important}.mb-1{margin-bottom:var(--spacing-scale-half) !important}.ml-1{margin-left:var(--spacing-scale-half) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mb-4{margin-bottom:var(--spacing-scale-3x) !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}.highlight{background:var(--status-highlight-background) linear-gradient(var(--status-highlight-overlay), var(--status-highlight-overlay));color:var(--status-highlight-text);padding:0 var(--spacing-scale-half)}[disabled],.disabled{cursor:not-allowed;opacity:var(--disabled)}[disabled] *,.disabled *{pointer-events:none}.text-center{text-align:center !important}.text-right{text-align:right !important}.text-nowrap{white-space:nowrap !important}.text-uppercase{text-transform:uppercase !important}.text-bold{font-weight:700 !important}.text-base{font-size:var(--font-size-scale-base) !important}.text-down-01{font-size:var(--font-size-scale-down-01) !important}@media (min-width: 576px){.text-sm-center{text-align:center !important}.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}}p{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-2x);margin-top:0}p a{text-decoration:underline}@media (min-width: 576px){p{font-size:var(--font-size-scale-up-01)}}a{--focus-offset:var(--spacing-scale-half)}a:focus{outline:none}a.focus-visible,a:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}a:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}.main-content a{text-decoration:underline}button{cursor:pointer}img{max-width:100%;vertical-align:middle}h2,.h2{color:var(--color);font-size:var(--font-size-scale-up-03);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2xh);margin-top:var(--spacing-scale-3xh);padding-bottom:var(--spacing-scale-2xh)}@media (min-width: 576px){.h2,h2{font-size:var(--font-size-scale-up-05);font-weight:var(--font-weight-regular)}}ul,ol{margin-bottom:var(--spacing-scale-2x);margin-top:0;padding:0 0 0 var(--spacing-scale-5x)}table{--table-background:var(--background);--table-color:var(--color);--table-border-color:var(--gray-20);--table-border-style:solid;--table-border-width:1px;--table-hover:var(--color-rgb);--table-padding:var(--spacing-scale-3x);--table-font-weight:var(--font-weight-medium);--table-th-background:var(--background-alternative);--table-th-font-weight:var(--font-weight-semi-bold);--table-row-size:var(--spacing-scale-2x);border-collapse:collapse;width:100%}tr.selected,tr.is-selected{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}label,.label{color:var(--color);font-size:var(--font-size-scale-base);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half)}fieldset,.fieldset{border:var(--surface-width-none);margin-bottom:var(--spacing-scale-5x);margin-top:0;padding:0}legend,.legend{color:var(--color);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-semi-bold);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-2x);margin-top:var(--spacing-scale-2x)}::placeholder,.placeholder{color:var(--color-light);font-size:var(--font-size-scale-base);font-style:italic;font-weight:var(--font-weight-regular);line-height:var(--font-line-height-medium);margin-bottom:var(--spacing-scale-half);margin-top:var(--spacing-scale-half);opacity:1}input,textarea,.input{color:var(--color-light);font-size:var(--font-size-scale-up-01);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);margin-bottom:var(--spacing-scale-half)}.help{font-size:var(--font-size-scale-base)}code,.code{background:var(--gray-5);border-radius:4px;color:var(--gray-80);display:inline-block;font-family:monospace;font-size:var(--font-size-scale-base);font-weight:var(--font-weight-medium);line-height:var(--font-line-height-low);padding:var(--spacing-scale-half)}*[data-toggle=collapse]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}*[data-toggle=collapse]:focus{outline:none}*[data-toggle=collapse].focus-visible,*[data-toggle=collapse]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}.br-select{--select-divider:1px solid var(--color-secondary-04);--select-shadow:var(--surface-shadow-md)}.br-select .br-input input{padding-right:29px;text-overflow:ellipsis}.br-select .br-input input::after{bottom:0;padding:0 5px;position:absolute;right:0}.br-select{max-width:400px;min-width:100px;position:relative}.br-select .br-list{background:var(--bg-color);box-shadow:var(--select-shadow);display:none;margin-top:-2px;max-height:404px;overflow:auto;position:absolute;resize:none;width:100%;z-index:1}.br-select .br-list::-webkit-scrollbar{height:var(--spacing-scale-base);width:var(--spacing-scale-base)}.br-select .br-list::-webkit-scrollbar-track{background:var(--gray-10)}.br-select .br-list::-webkit-scrollbar-thumb{background:var(--gray-30)}.br-select .br-list:hover::-webkit-scrollbar-thumb{background:var(--gray-40)}.br-select .br-list:focus,.br-select .br-list:active{color:var(--color-secondary-09);outline:none}.br-select .br-list:hover::-webkit-scrollbar-thumb{background:var(--color-secondary-07)}.br-select .br-list[expanded]{display:block}.br-select .br-item{--color:var(--color-light);--color-rgb:var(--color-light-rgb);--text-color:var(--color-light);--interactive:var(--interactive-light);--interactive-rgb:var(--interactive-light-rgb);--visited:var(--visited-light);--hover:var(--hover-light);--pressed:var(--pressed-light);--focus-color:var(--focus-color-light);--focus:var(--focus-color-light);--item-padding-y:var(--spacing-scale-2x)}.br-select .br-item .content{padding:0}.br-select .br-item .br-checkbox,.br-select .br-item .br-radio{--item-padding-x:var(--spacing-scale-2x);--item-padding-y:var(--spacing-scale-2x)}.br-select .br-item .br-checkbox input:hover:not(:disabled)+label::before,.br-select .br-item .br-radio input:hover:not(:disabled)+label::before{background-image:none}.br-select .br-item .br-checkbox input+label,.br-select .br-item .br-radio input+label{padding-left:calc(var(--checkbox-padding) + var(--checkbox-size) + var(--item-padding-x))}.br-select .br-item .br-radio input+label{color:var(--text-color);display:block;height:auto;min-height:0;padding:var(--item-padding)}.br-select .br-item .br-radio input+label::before,.br-select .br-item .br-radio input+label::after{content:none}.br-select .br-item:not(:last-child){border-bottom:var(--select-divider)}.br-select .br-item:not([disabled]){--focus-offset:calc(var(--spacing-scale-half) * -1)}.br-select .br-item:not([disabled]):focus{outline:none}.br-select .br-item:not([disabled]).focus-visible,.br-select .br-item:not([disabled]):focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}.br-select .br-item:not([disabled]):not(:disabled):hover{background-image:linear-gradient(rgba(var(--color-rgb), var(--hover)), rgba(var(--color-rgb), var(--hover)))}.br-select .br-item.selected,.br-select .br-item[selected]{--color:var(--color-dark);--color-rgb:var(--color-dark-rgb);--text-color:var(--color-dark);--interactive:var(--interactive-dark);--interactive-rgb:var(--interactive-dark-rgb);--visited:var(--visited-dark);--hover:var(--hover-dark);--pressed:var(--pressed-dark);--focus-color:var(--focus-color-dark);--focus:var(--focus-color-dark)}.br-select .br-item.selected:focus,.br-select .br-item[selected]:focus{outline:none}.br-select .br-item.selected.focus-visible,.br-select .br-item.selected:focus-visible,.br-select .br-item[selected].focus-visible,.br-select .br-item[selected]:focus-visible{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}.br-select .br-item.selected:not(:disabled):hover,.br-select .br-item[selected]:not(:disabled):hover{background-image:linear-gradient(rgba(var(--color-rgb), var(--hover)), rgba(var(--color-rgb), var(--hover)))}.br-select .br-item.disabled{line-height:calc(var(--font-line-height-high)*2);padding-left:calc(var(--item-padding) + var(--spacing-scale-base))}.br-select.inverted .br-input,.br-select.inverted .br-input label,.br-select.dark-mode .br-input,.br-select.dark-mode .br-input label{--color:var(--color-dark);--focus-color:var(--focus-color-dark)}:host{display:inline-block}.br-select{min-width:100px;max-width:400px;position:relative}:host([multiple]) .br-select{min-width:200px}`;
|
|
36154
36201
|
|
|
36155
36202
|
let selectId = 0;
|
|
@@ -36351,6 +36398,7 @@ class Select {
|
|
|
36351
36398
|
this.validatorMessage = null;
|
|
36352
36399
|
this.hasFeedbackSlot = false;
|
|
36353
36400
|
this.hasValidationLoadingSlot = false;
|
|
36401
|
+
this.selectedValuesState = [];
|
|
36354
36402
|
this.customValidationMessage = '';
|
|
36355
36403
|
this.validationRunId = 0;
|
|
36356
36404
|
this.lastAnnouncedOpen = false;
|
|
@@ -36358,6 +36406,9 @@ class Select {
|
|
|
36358
36406
|
this.suppressValueChange = false;
|
|
36359
36407
|
this.hasImperativeOptions = false;
|
|
36360
36408
|
this.remoteSelectedOptions = new Map();
|
|
36409
|
+
this.selectionInitialized = false;
|
|
36410
|
+
this.selectedValues = [];
|
|
36411
|
+
this.suppressFocusOpen = false;
|
|
36361
36412
|
/**
|
|
36362
36413
|
* Sincroniza as opções declaradas no slot com a lista interna renderizada.
|
|
36363
36414
|
*
|
|
@@ -36368,10 +36419,11 @@ class Select {
|
|
|
36368
36419
|
this.syncOptionsFromSlot = (updateDisplayValue = true) => {
|
|
36369
36420
|
if (this.hasImperativeOptions)
|
|
36370
36421
|
return;
|
|
36371
|
-
const nodes = this.slotElement?.assignedNodes({ flatten: true }) ??
|
|
36422
|
+
const nodes = this.slotElement?.assignedNodes({ flatten: true }) ?? Array.from(this.el.childNodes);
|
|
36372
36423
|
const options = nodes.map((n) => this.nodeToOption(n)).filter((o) => Boolean(o));
|
|
36373
36424
|
// Envia opções para o br-select-list
|
|
36374
|
-
this.selectListElement
|
|
36425
|
+
if (this.selectListElement)
|
|
36426
|
+
this.selectListElement.options = this.getListOptions(options);
|
|
36375
36427
|
if (updateDisplayValue)
|
|
36376
36428
|
this.syncDisplayValue(options);
|
|
36377
36429
|
};
|
|
@@ -36401,6 +36453,10 @@ class Select {
|
|
|
36401
36453
|
this.setSelectionMode(this.effectiveMultiple);
|
|
36402
36454
|
const initialOptions = this.getHostOptions();
|
|
36403
36455
|
const propOptions = this.getOptionsProp();
|
|
36456
|
+
const sourceOptions = initialOptions.length === 0 && propOptions.length > 0 ? propOptions : initialOptions;
|
|
36457
|
+
this.setSelectedValues(this.valueFromPublicValue(this.value) ??
|
|
36458
|
+
sourceOptions.filter((option) => option.selected).map((option) => option.value));
|
|
36459
|
+
this.selectionInitialized = true;
|
|
36404
36460
|
if (initialOptions.length === 0 && propOptions.length > 0) {
|
|
36405
36461
|
this.pendingOptions = propOptions;
|
|
36406
36462
|
this.syncDisplayValue(propOptions);
|
|
@@ -36422,7 +36478,7 @@ class Select {
|
|
|
36422
36478
|
this.slotElement.addEventListener('slotchange', this.handleSlotChange);
|
|
36423
36479
|
}
|
|
36424
36480
|
if (this.pendingOptions && this.selectListElement) {
|
|
36425
|
-
this.selectListElement.
|
|
36481
|
+
this.selectListElement.options = this.getListOptions(this.pendingOptions);
|
|
36426
36482
|
this.pendingOptions = null;
|
|
36427
36483
|
}
|
|
36428
36484
|
this.isValueChangeReady = true;
|
|
@@ -36431,6 +36487,10 @@ class Select {
|
|
|
36431
36487
|
this.attachBlockingSurfaceListener();
|
|
36432
36488
|
this.updateValidity();
|
|
36433
36489
|
}
|
|
36490
|
+
componentDidRender() {
|
|
36491
|
+
this.syncNativeSelectSelection();
|
|
36492
|
+
this.updateValidity();
|
|
36493
|
+
}
|
|
36434
36494
|
disconnectedCallback() {
|
|
36435
36495
|
if (this.slotElement) {
|
|
36436
36496
|
this.slotElement.removeEventListener('slotchange', this.handleSlotChange);
|
|
@@ -36447,6 +36507,47 @@ class Select {
|
|
|
36447
36507
|
get effectiveOpen() {
|
|
36448
36508
|
return this.open ?? this.isOpen;
|
|
36449
36509
|
}
|
|
36510
|
+
valueFromPublicValue(value) {
|
|
36511
|
+
if (this.effectiveMultiple)
|
|
36512
|
+
return Array.isArray(value) ? [...new Set(value.filter(Boolean))] : null;
|
|
36513
|
+
return typeof value === 'string' && value ? [value] : null;
|
|
36514
|
+
}
|
|
36515
|
+
setSelectedValues(values) {
|
|
36516
|
+
const next = [...new Set(values.filter(Boolean))];
|
|
36517
|
+
if (!this.effectiveMultiple && next.length > 1)
|
|
36518
|
+
next.splice(1);
|
|
36519
|
+
if (this.selectedValues.length === next.length &&
|
|
36520
|
+
this.selectedValues.every((value, index) => value === next[index]))
|
|
36521
|
+
return;
|
|
36522
|
+
this.selectedValues = next;
|
|
36523
|
+
this.selectedValuesState = next;
|
|
36524
|
+
}
|
|
36525
|
+
get canonicalSelectedValues() {
|
|
36526
|
+
return this.selectedValues;
|
|
36527
|
+
}
|
|
36528
|
+
applyCanonicalSelection(options, values = this.canonicalSelectedValues) {
|
|
36529
|
+
if (!this.selectionInitialized)
|
|
36530
|
+
return options.map((option) => ({ ...option }));
|
|
36531
|
+
const selected = new Set(values);
|
|
36532
|
+
return options.map((option) => ({ ...option, selected: selected.has(option.value) }));
|
|
36533
|
+
}
|
|
36534
|
+
getListOptions(options) {
|
|
36535
|
+
const normalized = this.applyCanonicalSelection(options).filter((option) => option.value !== '__select_all__');
|
|
36536
|
+
if (!this.effectiveMultiple)
|
|
36537
|
+
return normalized;
|
|
36538
|
+
const selectable = normalized.filter((option) => !this.isSelectAllLabel(this.getOptionLabel(option)));
|
|
36539
|
+
const allSelected = selectable.length > 0 && selectable.every((option) => Boolean(option.selected));
|
|
36540
|
+
const anySelected = selectable.some((option) => Boolean(option.selected));
|
|
36541
|
+
return [
|
|
36542
|
+
{
|
|
36543
|
+
value: '__select_all__',
|
|
36544
|
+
label: allSelected ? this.unselectAllLabel : this.selectAllLabel,
|
|
36545
|
+
selected: allSelected,
|
|
36546
|
+
indeterminate: anySelected && !allSelected,
|
|
36547
|
+
},
|
|
36548
|
+
...selectable,
|
|
36549
|
+
];
|
|
36550
|
+
}
|
|
36450
36551
|
isDisabled() {
|
|
36451
36552
|
return isFormControlDisabled(this.disabled, this.formDisabled);
|
|
36452
36553
|
}
|
|
@@ -36519,6 +36620,8 @@ class Select {
|
|
|
36519
36620
|
}
|
|
36520
36621
|
handleSelectInputFocus() {
|
|
36521
36622
|
this.activeOptionIndex = -1;
|
|
36623
|
+
if (this.suppressFocusOpen)
|
|
36624
|
+
return;
|
|
36522
36625
|
if (this.filterable && !this.effectiveOpen) {
|
|
36523
36626
|
this.clearSearch();
|
|
36524
36627
|
void this.show();
|
|
@@ -36555,16 +36658,50 @@ class Select {
|
|
|
36555
36658
|
this.toggleOpenFromPointer();
|
|
36556
36659
|
}
|
|
36557
36660
|
handleSelectOptionStateChange(event) {
|
|
36558
|
-
this.syncSlottedOptionSelection(event.detail);
|
|
36559
|
-
this.rememberRemoteSelections(this.getCurrentOptions());
|
|
36560
|
-
this.syncDisplayValue();
|
|
36561
|
-
this.syncActiveOptionIndex(event.detail);
|
|
36562
36661
|
event.stopPropagation();
|
|
36563
|
-
const detail =
|
|
36662
|
+
const detail = event.detail;
|
|
36663
|
+
// Use a lista interna para preservar rótulos e opções remotas enquanto as
|
|
36664
|
+
// props projetadas aguardam a próxima renderização.
|
|
36665
|
+
const listOptions = this.getSelectListController()?.options;
|
|
36666
|
+
const sourceOptions = Array.isArray(listOptions) && listOptions.length > 0
|
|
36667
|
+
? listOptions.map((option) => ({ ...option }))
|
|
36668
|
+
: this.getCurrentOptions();
|
|
36669
|
+
// No modo simples, o evento é a decisão final da interação. A lista
|
|
36670
|
+
// virtualizada e as opções projetadas podem ainda conter o snapshot da
|
|
36671
|
+
// interação anterior durante cliques consecutivos; derivar a coleção a
|
|
36672
|
+
// partir do valor do evento evita que esse snapshot reapareça no valor
|
|
36673
|
+
// público ou no formulário.
|
|
36674
|
+
const selectableValues = sourceOptions
|
|
36675
|
+
.filter((option) => !this.isSelectAllLabel(this.getOptionLabel(option)))
|
|
36676
|
+
.map((option) => option.value);
|
|
36677
|
+
const transition = this.isSelectAllLabel(detail.label ?? detail.value)
|
|
36678
|
+
? transitionAllSelection(this.selectedValues, Boolean(detail.selected), selectableValues)
|
|
36679
|
+
: transitionSelection({
|
|
36680
|
+
currentValues: this.selectedValues,
|
|
36681
|
+
multiple: this.effectiveMultiple,
|
|
36682
|
+
value: detail.value,
|
|
36683
|
+
selected: Boolean(detail.selected),
|
|
36684
|
+
});
|
|
36685
|
+
this.setSelectedValues(transition.values);
|
|
36686
|
+
const options = this.applyCanonicalSelection(sourceOptions, transition.values);
|
|
36687
|
+
if (this.selectListElement)
|
|
36688
|
+
this.selectListElement.options = this.getListOptions(options);
|
|
36689
|
+
this.reflectRenderedListSelection(transition.values);
|
|
36690
|
+
this.syncSlottedOptionSelection(transition.values);
|
|
36691
|
+
this.rememberRemoteSelections(options);
|
|
36692
|
+
this.syncDisplayValue(options);
|
|
36693
|
+
this.syncActiveOptionIndex(event.detail);
|
|
36564
36694
|
this.emitStateChange(detail);
|
|
36565
36695
|
this.updateValidity();
|
|
36566
|
-
if (!
|
|
36567
|
-
|
|
36696
|
+
if (!transition.changed)
|
|
36697
|
+
return;
|
|
36698
|
+
if (!this.effectiveMultiple) {
|
|
36699
|
+
this.suppressFocusOpen = true;
|
|
36700
|
+
void this.selectInputElement?.setFocus?.();
|
|
36701
|
+
void this.close().finally(() => {
|
|
36702
|
+
this.suppressFocusOpen = false;
|
|
36703
|
+
});
|
|
36704
|
+
}
|
|
36568
36705
|
dispatchNativeFormEvent(this.el, 'input');
|
|
36569
36706
|
dispatchNativeFormEvent(this.el, 'change');
|
|
36570
36707
|
}
|
|
@@ -36781,7 +36918,7 @@ class Select {
|
|
|
36781
36918
|
this.suppressValueChange = true;
|
|
36782
36919
|
try {
|
|
36783
36920
|
if (this.selectListElement) {
|
|
36784
|
-
|
|
36921
|
+
this.selectListElement.options = this.getListOptions(nextOptions);
|
|
36785
36922
|
}
|
|
36786
36923
|
else {
|
|
36787
36924
|
this.pendingOptions = nextOptions;
|
|
@@ -36800,20 +36937,20 @@ class Select {
|
|
|
36800
36937
|
*/
|
|
36801
36938
|
async setOption(option) {
|
|
36802
36939
|
this.hasImperativeOptions = true;
|
|
36940
|
+
const currentOptions = this.getCurrentOptions();
|
|
36941
|
+
const index = currentOptions.findIndex((currentOption) => currentOption.value === option.value);
|
|
36942
|
+
const nextOptions = [...currentOptions];
|
|
36943
|
+
if (index === -1)
|
|
36944
|
+
nextOptions.push(option);
|
|
36945
|
+
else
|
|
36946
|
+
nextOptions[index] = option;
|
|
36803
36947
|
if (this.selectListElement) {
|
|
36804
|
-
|
|
36805
|
-
}
|
|
36806
|
-
else if (this.pendingOptions) {
|
|
36807
|
-
const index = this.pendingOptions.findIndex((currentOption) => currentOption.value === option.value);
|
|
36808
|
-
if (index !== -1)
|
|
36809
|
-
this.pendingOptions[index] = option;
|
|
36810
|
-
else
|
|
36811
|
-
this.pendingOptions.push(option);
|
|
36948
|
+
this.selectListElement.options = this.getListOptions(nextOptions);
|
|
36812
36949
|
}
|
|
36813
36950
|
else {
|
|
36814
|
-
this.pendingOptions =
|
|
36951
|
+
this.pendingOptions = nextOptions;
|
|
36815
36952
|
}
|
|
36816
|
-
this.syncDisplayValue();
|
|
36953
|
+
this.syncDisplayValue(nextOptions);
|
|
36817
36954
|
}
|
|
36818
36955
|
getHostOptions() {
|
|
36819
36956
|
return Array.from(this.el.childNodes)
|
|
@@ -36842,15 +36979,16 @@ class Select {
|
|
|
36842
36979
|
const rawLabel = el.getAttribute('label') ?? el.label ?? '';
|
|
36843
36980
|
let value = String(rawValue || '').trim();
|
|
36844
36981
|
let label = String(rawLabel || '').trim();
|
|
36982
|
+
const inner = this.extractInnerTextFromOption(el);
|
|
36983
|
+
const content = (el.innerHTML || '').trim();
|
|
36845
36984
|
const selected = el.hasAttribute('selected') || Boolean(el.selected);
|
|
36846
36985
|
if (!value) {
|
|
36847
|
-
const inner = this.extractInnerTextFromOption(el);
|
|
36848
36986
|
if (inner)
|
|
36849
36987
|
value = inner.trim();
|
|
36850
36988
|
}
|
|
36851
36989
|
if (!label)
|
|
36852
|
-
label = value;
|
|
36853
|
-
return { value: value || '', label: label || undefined, selected };
|
|
36990
|
+
label = inner?.trim() || value;
|
|
36991
|
+
return { value: value || '', label: label || undefined, selected, content: content || undefined };
|
|
36854
36992
|
}
|
|
36855
36993
|
extractInnerTextFromOption(el) {
|
|
36856
36994
|
const fromSlot = this.getAssignedSlotText(el);
|
|
@@ -36903,6 +37041,9 @@ class Select {
|
|
|
36903
37041
|
this.syncValue(resolvedOptions);
|
|
36904
37042
|
}
|
|
36905
37043
|
syncValue(options) {
|
|
37044
|
+
this.setSelectedValues(options
|
|
37045
|
+
.filter((option) => option.selected && !this.isSelectAllLabel(this.getOptionLabel(option)))
|
|
37046
|
+
.map((option) => option.value));
|
|
36906
37047
|
const nextValue = this.getSerializedValue(options);
|
|
36907
37048
|
this.syncFormState(options);
|
|
36908
37049
|
if (this.value === nextValue)
|
|
@@ -36942,15 +37083,18 @@ class Select {
|
|
|
36942
37083
|
}
|
|
36943
37084
|
applySelectedValue(value) {
|
|
36944
37085
|
const currentOptions = this.getCurrentOptions();
|
|
37086
|
+
const requestedValues = this.valueFromPublicValue(value) ?? [];
|
|
37087
|
+
this.setSelectedValues(requestedValues);
|
|
36945
37088
|
const options = currentOptions.map((option) => ({
|
|
36946
37089
|
...option,
|
|
36947
|
-
selected:
|
|
37090
|
+
selected: requestedValues.includes(option.value),
|
|
36948
37091
|
}));
|
|
36949
37092
|
this.isApplyingExternalValue = true;
|
|
36950
37093
|
if (this.selectListElement)
|
|
36951
|
-
|
|
37094
|
+
this.selectListElement.options = this.getListOptions(options);
|
|
36952
37095
|
else
|
|
36953
37096
|
this.pendingOptions = options;
|
|
37097
|
+
this.reflectRenderedListSelection(requestedValues);
|
|
36954
37098
|
this.value = value;
|
|
36955
37099
|
this.isApplyingExternalValue = false;
|
|
36956
37100
|
this.remoteSelectedOptions.clear();
|
|
@@ -36973,7 +37117,7 @@ class Select {
|
|
|
36973
37117
|
}
|
|
36974
37118
|
applyRemoteSelection(options) {
|
|
36975
37119
|
this.rememberRemoteSelections(this.getCurrentOptions());
|
|
36976
|
-
const selectedValues = new Set(
|
|
37120
|
+
const selectedValues = new Set(this.selectedValues);
|
|
36977
37121
|
const nextOptions = options.map((option) => ({
|
|
36978
37122
|
...option,
|
|
36979
37123
|
selected: selectedValues.has(option.value) || Boolean(option.selected),
|
|
@@ -37008,38 +37152,36 @@ class Select {
|
|
|
37008
37152
|
const selectedValues = selected.map((option) => option.value);
|
|
37009
37153
|
const formValue = this.effectiveMultiple ? JSON.stringify(selectedValues) : (selectedValues[0] ?? null);
|
|
37010
37154
|
safeSetFormValue(this.elementInternals, formValue);
|
|
37011
|
-
|
|
37012
|
-
|
|
37013
|
-
const selectedSet = new Set(selectedValues);
|
|
37014
|
-
const optionNodes = Array.from(this.nativeSelect.options);
|
|
37015
|
-
selectedSet.forEach((value) => {
|
|
37016
|
-
if (optionNodes.some((option) => option.value === value))
|
|
37017
|
-
return;
|
|
37018
|
-
const option = document.createElement('option');
|
|
37019
|
-
option.value = value;
|
|
37020
|
-
this.nativeSelect?.append(option);
|
|
37021
|
-
});
|
|
37022
|
-
optionNodes.forEach((option) => {
|
|
37023
|
-
if (option.value !== '' && !selectedSet.has(option.value))
|
|
37024
|
-
option.remove();
|
|
37025
|
-
else
|
|
37026
|
-
option.selected = selectedSet.has(option.value);
|
|
37027
|
-
});
|
|
37028
|
-
this.nativeSelect.value = selectedValues[0] ?? '';
|
|
37029
|
-
}
|
|
37030
|
-
this.updateValidity();
|
|
37155
|
+
this.syncNativeSelectSelection(selectedValues);
|
|
37156
|
+
this.updateValidity(selectedValues.length);
|
|
37031
37157
|
}
|
|
37032
|
-
|
|
37033
|
-
|
|
37158
|
+
syncNativeSelectSelection(values = this.getSelectedValues()) {
|
|
37159
|
+
const nativeSelect = this.getNativeSelect();
|
|
37160
|
+
if (!nativeSelect)
|
|
37161
|
+
return;
|
|
37162
|
+
const selectedValues = new Set(values);
|
|
37163
|
+
Array.from(nativeSelect.options).forEach((option) => {
|
|
37164
|
+
option.selected = option.value === '' ? selectedValues.size === 0 : selectedValues.has(option.value);
|
|
37165
|
+
});
|
|
37166
|
+
}
|
|
37167
|
+
getSelectedValues() {
|
|
37168
|
+
return [...this.selectedValues];
|
|
37169
|
+
}
|
|
37170
|
+
updateValidity(selectedCount = this.getSelectedValues().length) {
|
|
37171
|
+
const nativeSelect = this.getNativeSelect();
|
|
37172
|
+
if (!nativeSelect)
|
|
37034
37173
|
return;
|
|
37035
|
-
const selectedCount = this.getFormOptions(this.getCurrentOptions()).filter((option) => option.selected).length;
|
|
37036
37174
|
const selectionMessage = this.effectiveMultiple && this.minSelections > 0 && selectedCount < this.minSelections
|
|
37037
37175
|
? `Selecione pelo menos ${this.minSelections} opções.`
|
|
37038
37176
|
: this.effectiveMultiple && this.maxSelections > 0 && selectedCount > this.maxSelections
|
|
37039
37177
|
? `Selecione no máximo ${this.maxSelections} opções.`
|
|
37040
37178
|
: '';
|
|
37041
|
-
|
|
37042
|
-
syncNativeFormValidity(this.elementInternals,
|
|
37179
|
+
nativeSelect.setCustomValidity(this.customValidationMessage || this.validatorMessage || selectionMessage);
|
|
37180
|
+
syncNativeFormValidity(this.elementInternals, nativeSelect);
|
|
37181
|
+
}
|
|
37182
|
+
getNativeSelect() {
|
|
37183
|
+
return (this.el.shadowRoot?.querySelector('select[part="hidden-select"]') ??
|
|
37184
|
+
this.nativeSelect);
|
|
37043
37185
|
}
|
|
37044
37186
|
resolveValidator() {
|
|
37045
37187
|
return resolveFormValidator(this.validator);
|
|
@@ -37150,6 +37292,17 @@ class Select {
|
|
|
37150
37292
|
const index = this.getCurrentActiveIndex();
|
|
37151
37293
|
const option = options[index];
|
|
37152
37294
|
const nextSelected = this.effectiveMultiple ? !option?.selected : true;
|
|
37295
|
+
if (this.effectiveMultiple && index === 0 && option && !this.isSelectAllLabel(this.getOptionLabel(option))) {
|
|
37296
|
+
this.handleSelectOptionStateChange(new CustomEvent('brSelectOptionStateChange', {
|
|
37297
|
+
detail: {
|
|
37298
|
+
value: '__select_all__',
|
|
37299
|
+
label: this.selectAllLabel,
|
|
37300
|
+
selected: true,
|
|
37301
|
+
disabled: false,
|
|
37302
|
+
},
|
|
37303
|
+
}));
|
|
37304
|
+
return;
|
|
37305
|
+
}
|
|
37153
37306
|
const didSelect = await this.getSelectListController()?.setOptionSelected?.(index, nextSelected);
|
|
37154
37307
|
if (didSelect) {
|
|
37155
37308
|
this.activeOptionIndex = index;
|
|
@@ -37170,55 +37323,19 @@ class Select {
|
|
|
37170
37323
|
* Essa sincronização mantém as props/atributos das opções declaradas pelo consumidor em
|
|
37171
37324
|
* conformidade com o estado calculado internamente, inclusive no caso do "selecionar todos".
|
|
37172
37325
|
*/
|
|
37173
|
-
syncSlottedOptionSelection(
|
|
37174
|
-
|
|
37175
|
-
return;
|
|
37176
|
-
const slottedOptions = this.slotElement
|
|
37177
|
-
.assignedElements({ flatten: true })
|
|
37178
|
-
.filter((el) => el.tagName.toLowerCase() === 'br-select-option');
|
|
37326
|
+
syncSlottedOptionSelection(values = this.selectedValues) {
|
|
37327
|
+
const slottedOptions = Array.from(this.el.children).filter((el) => el.tagName.toLowerCase() === 'br-select-option');
|
|
37179
37328
|
if (slottedOptions.length === 0)
|
|
37180
37329
|
return;
|
|
37181
|
-
const
|
|
37182
|
-
const isSelectAll = this.isSelectAllLabel(detailLabel);
|
|
37183
|
-
if (this.effectiveMultiple && isSelectAll) {
|
|
37184
|
-
slottedOptions.forEach((option) => {
|
|
37185
|
-
const optionLabel = (option.label ?? option.value).trim();
|
|
37186
|
-
const isSelectAllOption = this.isSelectAllLabel(optionLabel);
|
|
37187
|
-
if (isSelectAllOption) {
|
|
37188
|
-
option.indeterminate = false;
|
|
37189
|
-
option.selected = Boolean(detail.selected);
|
|
37190
|
-
this.normalizeSelectAllState(option);
|
|
37191
|
-
if (option.selected)
|
|
37192
|
-
option.setAttribute('selected', '');
|
|
37193
|
-
else
|
|
37194
|
-
option.removeAttribute('selected');
|
|
37195
|
-
return;
|
|
37196
|
-
}
|
|
37197
|
-
option.selected = Boolean(detail.selected);
|
|
37198
|
-
if (option.selected)
|
|
37199
|
-
option.setAttribute('selected', '');
|
|
37200
|
-
else
|
|
37201
|
-
option.removeAttribute('selected');
|
|
37202
|
-
});
|
|
37203
|
-
return;
|
|
37204
|
-
}
|
|
37330
|
+
const selectedValues = new Set(values);
|
|
37205
37331
|
slottedOptions.forEach((option) => {
|
|
37206
|
-
const
|
|
37207
|
-
|
|
37208
|
-
|
|
37209
|
-
|
|
37210
|
-
}
|
|
37211
|
-
option.selected = nextSelected;
|
|
37212
|
-
if (nextSelected) {
|
|
37332
|
+
const resolved = this.optionElementToData(option).value;
|
|
37333
|
+
option.selected = selectedValues.has(resolved);
|
|
37334
|
+
option.indeterminate = false;
|
|
37335
|
+
if (option.selected)
|
|
37213
37336
|
option.setAttribute('selected', '');
|
|
37214
|
-
|
|
37215
|
-
else {
|
|
37216
|
-
option.removeAttribute('selected');
|
|
37217
|
-
}
|
|
37218
|
-
if (!this.effectiveMultiple && !isTarget) {
|
|
37219
|
-
option.selected = false;
|
|
37337
|
+
else
|
|
37220
37338
|
option.removeAttribute('selected');
|
|
37221
|
-
}
|
|
37222
37339
|
});
|
|
37223
37340
|
if (!this.effectiveMultiple)
|
|
37224
37341
|
return;
|
|
@@ -37241,6 +37358,17 @@ class Select {
|
|
|
37241
37358
|
option.removeAttribute('selected');
|
|
37242
37359
|
});
|
|
37243
37360
|
}
|
|
37361
|
+
reflectRenderedListSelection(values) {
|
|
37362
|
+
const renderedOptions = this.selectListElement?.shadowRoot?.querySelectorAll('br-select-option');
|
|
37363
|
+
if (!renderedOptions)
|
|
37364
|
+
return;
|
|
37365
|
+
const selectedValues = new Set(values);
|
|
37366
|
+
renderedOptions.forEach((option) => {
|
|
37367
|
+
if (this.isSelectAllLabel(option.label))
|
|
37368
|
+
return;
|
|
37369
|
+
option.selected = selectedValues.has(option.value);
|
|
37370
|
+
});
|
|
37371
|
+
}
|
|
37244
37372
|
isSelectAllLabel(label) {
|
|
37245
37373
|
return label === this.selectAllLabel || label === this.unselectAllLabel;
|
|
37246
37374
|
}
|
|
@@ -37321,6 +37449,7 @@ class Select {
|
|
|
37321
37449
|
* A precedência é: lista interna, opções pendentes, conteúdo do slot e, por último,
|
|
37322
37450
|
* os filhos atuais do host.
|
|
37323
37451
|
*/
|
|
37452
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: prioriza a precedência entre slot, lista e opções remotas.
|
|
37324
37453
|
getCurrentOptions() {
|
|
37325
37454
|
// As opções projetadas são a fonte canônica quando não há coleção
|
|
37326
37455
|
// imperativa: a lista virtualizada pode manter um snapshot enquanto o
|
|
@@ -37330,21 +37459,53 @@ class Select {
|
|
|
37330
37459
|
const slotOptions = nodes
|
|
37331
37460
|
.map((node) => this.nodeToOption(node))
|
|
37332
37461
|
.filter((option) => Boolean(option));
|
|
37333
|
-
if (slotOptions.length > 0)
|
|
37334
|
-
|
|
37462
|
+
if (slotOptions.length > 0) {
|
|
37463
|
+
const normalizedSlotOptions = this.applyCanonicalSelection(slotOptions);
|
|
37464
|
+
if (this.effectiveMultiple &&
|
|
37465
|
+
!normalizedSlotOptions.some((option) => this.isSelectAllLabel(this.getOptionLabel(option)))) {
|
|
37466
|
+
normalizedSlotOptions.unshift({
|
|
37467
|
+
value: '__select_all__',
|
|
37468
|
+
label: this.selectAllLabel,
|
|
37469
|
+
selected: false,
|
|
37470
|
+
indeterminate: false,
|
|
37471
|
+
});
|
|
37472
|
+
}
|
|
37473
|
+
return normalizedSlotOptions;
|
|
37474
|
+
}
|
|
37335
37475
|
}
|
|
37336
37476
|
const listOptions = this.getSelectListController()?.options;
|
|
37337
37477
|
if (Array.isArray(listOptions) && listOptions.length > 0) {
|
|
37338
37478
|
const normalizedListOptions = listOptions.map((option) => ({ ...option }));
|
|
37339
37479
|
const hasRealOptions = normalizedListOptions.some((option) => !this.isSelectAllLabel(this.getOptionLabel(option)));
|
|
37340
37480
|
if (hasRealOptions) {
|
|
37341
|
-
|
|
37481
|
+
if (this.effectiveMultiple &&
|
|
37482
|
+
!normalizedListOptions.some((option) => this.isSelectAllLabel(this.getOptionLabel(option)))) {
|
|
37483
|
+
normalizedListOptions.unshift({
|
|
37484
|
+
value: '__select_all__',
|
|
37485
|
+
label: this.selectAllLabel,
|
|
37486
|
+
selected: false,
|
|
37487
|
+
indeterminate: false,
|
|
37488
|
+
});
|
|
37489
|
+
}
|
|
37490
|
+
return this.applyCanonicalSelection(normalizedListOptions);
|
|
37342
37491
|
}
|
|
37343
37492
|
}
|
|
37344
37493
|
if (this.pendingOptions) {
|
|
37345
|
-
return this.pendingOptions
|
|
37494
|
+
return this.applyCanonicalSelection(this.pendingOptions);
|
|
37346
37495
|
}
|
|
37347
|
-
|
|
37496
|
+
const hostOptions = this.applyCanonicalSelection(this.getHostOptions());
|
|
37497
|
+
if (this.effectiveMultiple && hostOptions.length > 0) {
|
|
37498
|
+
return [
|
|
37499
|
+
{
|
|
37500
|
+
value: '__select_all__',
|
|
37501
|
+
label: this.selectAllLabel,
|
|
37502
|
+
selected: false,
|
|
37503
|
+
indeterminate: false,
|
|
37504
|
+
},
|
|
37505
|
+
...hostOptions,
|
|
37506
|
+
];
|
|
37507
|
+
}
|
|
37508
|
+
return hostOptions;
|
|
37348
37509
|
}
|
|
37349
37510
|
normalizeSearchText(value) {
|
|
37350
37511
|
return value
|
|
@@ -37394,7 +37555,7 @@ class Select {
|
|
|
37394
37555
|
return (hAsync("br-select-input", { part: "input", exportparts: "container:input-container, input:input-field, label:input-label, group:input-group, icon:input-icon, action:input-action, action-button:input-action-button", ref: (el) => (this.selectInputElement = el), "aria-activedescendant": this.getActiveDescendant(), "aria-controls": this.listboxId, "aria-disabled": String(this.isDisabled()), "aria-expanded": String(this.effectiveOpen), "aria-haspopup": "listbox", "aria-label": this.getAccessibleLabel(), "aria-required": String(this.required), borderless: this.borderless, "is-inline": this.effectiveInline, "is-open": this.effectiveOpen, label: this.label, name: this.name, placeholder: this.placeholder, required: this.required, disabled: this.isDisabled(), filterable: this.filterable, showSearchIcon: this.showSearchIcon, autocomplete: this.autocomplete, "input-width": this.inputWidth, role: "combobox", value: this.filterable && this.effectiveOpen ? this.searchTerm : this.getRenderedDisplayValue() }));
|
|
37395
37556
|
}
|
|
37396
37557
|
renderSelectList() {
|
|
37397
|
-
return (hAsync("br-select-list", { part: "list", exportparts: "list, option, checkbox, select-all, empty-option, option-checkbox, option-radio", "active-option-index": this.activeOptionIndex, "aria-label": this.getAccessibleLabel(), "aria-multiselectable": this.effectiveMultiple ? 'true' : 'false', id: this.listboxId, "visible-items": this.visibleItems, "item-height": this.itemHeight, overscan: this.overscan, "search-term": this.filterable && this.searchMode === 'local' ? this.searchTerm : '', role: "listbox", "select-all-label": this.selectAllLabel, "unselect-all-label": this.unselectAllLabel, ref: (el) => {
|
|
37558
|
+
return (hAsync("br-select-list", { part: "list", options: this.getCurrentOptions(), exportparts: "list, option, checkbox, select-all, empty-option, option-checkbox, option-radio", "active-option-index": this.activeOptionIndex, "aria-label": this.getAccessibleLabel(), "aria-multiselectable": this.effectiveMultiple ? 'true' : 'false', id: this.listboxId, "visible-items": this.visibleItems, "item-height": this.itemHeight, overscan: this.overscan, "search-term": this.filterable && this.searchMode === 'local' ? this.searchTerm : '', role: "listbox", "select-all-label": this.selectAllLabel, "unselect-all-label": this.unselectAllLabel, ref: (el) => {
|
|
37398
37559
|
this.selectListElement = el;
|
|
37399
37560
|
this.selectListElement.loading = this.loading;
|
|
37400
37561
|
this.setSelectionMode(this.effectiveMultiple);
|
|
@@ -37402,9 +37563,8 @@ class Select {
|
|
|
37402
37563
|
} }, hAsync("slot", null), hAsync("slot", { name: "loading", slot: "loading" })));
|
|
37403
37564
|
}
|
|
37404
37565
|
renderHiddenSelect() {
|
|
37405
|
-
const
|
|
37406
|
-
|
|
37407
|
-
.filter((option) => option.selected);
|
|
37566
|
+
const options = this.getFormOptions(this.getCurrentOptions()).filter((option) => !this.isSelectAllLabel(this.getOptionLabel(option)));
|
|
37567
|
+
const hasSelection = options.some((option) => option.selected);
|
|
37408
37568
|
return (hAsync("select", { ref: (el) => (this.nativeSelect = el), part: "hidden-select", name: this.name, autocomplete: this.autocomplete, multiple: this.effectiveMultiple, required: this.required, disabled: this.isDisabled(), tabIndex: -1, "aria-hidden": "true", style: {
|
|
37409
37569
|
position: 'absolute',
|
|
37410
37570
|
width: '1px',
|
|
@@ -37415,10 +37575,10 @@ class Select {
|
|
|
37415
37575
|
clip: 'rect(0, 0, 0, 0)',
|
|
37416
37576
|
whiteSpace: 'nowrap',
|
|
37417
37577
|
border: '0',
|
|
37418
|
-
}, onChange: (event) => event.preventDefault() }, hAsync("option", { value: "", selected:
|
|
37578
|
+
}, onChange: (event) => event.preventDefault() }, hAsync("option", { value: "", selected: !hasSelection }), options.map((option) => (hAsync("option", { key: option.value, value: option.value, selected: option.selected, disabled: option.disabled })))));
|
|
37419
37579
|
}
|
|
37420
37580
|
render() {
|
|
37421
|
-
return (hAsync(Host, { key: '
|
|
37581
|
+
return (hAsync(Host, { key: '9eab35d12b8b0fff68f16bb1e1ccc1209ea09687', "aria-busy": this.isValidating || this.loading ? 'true' : null }, hAsync("div", { key: '68747830dd29319dc044caa056ffc13fea834bea', class: this.getCssClassMap(), part: "container" }, this.renderSelectInput(), this.renderSelectList(), hAsync("div", { key: '825c7934402930816fba48f02d161d936c8a4e3e', part: "feedback", hidden: !this.hasFeedbackSlot && !this.validatorMessage }, hAsync("slot", { key: '10b2ee676c54b913b39b6523d3ebce462ed031e3', name: "feedback", onSlotchange: (event) => (this.hasFeedbackSlot = hasAssignedSlotContent(event.currentTarget)) }, this.validatorMessage)), hAsync("div", { key: '571a5a5e89ae14a91f8c88c0b1fb5e7341adb094', part: "validation-loading", hidden: !this.hasValidationLoadingSlot || !this.isValidating }, hAsync("slot", { key: 'e9647f09ce303d15a564707e1d3a060280de10a1', name: "validation-loading" })), this.renderHiddenSelect())));
|
|
37422
37582
|
}
|
|
37423
37583
|
static get formAssociated() { return true; }
|
|
37424
37584
|
get el() { return getElement(this); }
|
|
@@ -37494,6 +37654,7 @@ class Select {
|
|
|
37494
37654
|
"validatorMessage": [32],
|
|
37495
37655
|
"hasFeedbackSlot": [32],
|
|
37496
37656
|
"hasValidationLoadingSlot": [32],
|
|
37657
|
+
"selectedValuesState": [32],
|
|
37497
37658
|
"enable": [64],
|
|
37498
37659
|
"disable": [64],
|
|
37499
37660
|
"show": [64],
|
|
@@ -37644,15 +37805,16 @@ class SelectInput {
|
|
|
37644
37805
|
return (hAsync("br-icon", { "aria-hidden": "true", iconName: this.flipped ? 'fa-solid:angle-up' : 'fa-solid:angle-down', width: "16", height: "16", slot: "action" }));
|
|
37645
37806
|
}
|
|
37646
37807
|
render() {
|
|
37647
|
-
return (hAsync(Host, { key: '
|
|
37808
|
+
return (hAsync(Host, { key: 'be737b653173bc2a31e9065989dbe44c2bdac4a7' }, hAsync("div", { key: 'c2b733eb6a3973f50788019f86360b0000df9f34', class: this.getCssClassMap(), part: "container" }, hAsync("br-input", { key: '72882f4a77405e2a0bf04523d0dbf36a6a4e855d', "action-tab-index": -1, "action-label": this.flipped ? 'Fechar opções' : 'Abrir opções', autocomplete: this.autocomplete, borderless: this.borderless, "control-width": this.inputWidth, readonly: !this.filterable, "is-inline": this.isInline, label: this.label, name: this.name, placeholder: this.placeholder, required: this.required, ref: (el) => {
|
|
37648
37809
|
this.inputElement = el;
|
|
37649
37810
|
}, value: this.value, disabled: this.disabled, onClick: this.handleClick, onInput: this.handleInput, onFocus: this.handleFocus, exportparts: "container:input, label:label, input:input, group:group, icon:icon, action:action, action-button:action-button" }, this.showSearchIcon && this.renderSearchIcon(), this.renderDropdownIcon()))));
|
|
37650
37811
|
}
|
|
37812
|
+
static get delegatesFocus() { return true; }
|
|
37651
37813
|
static get formAssociated() { return true; }
|
|
37652
37814
|
get el() { return getElement(this); }
|
|
37653
37815
|
static get style() { return selectInputCss(); }
|
|
37654
37816
|
static get cmpMeta() { return {
|
|
37655
|
-
"$flags$":
|
|
37817
|
+
"$flags$": 89,
|
|
37656
37818
|
"$tagName$": "br-select-input",
|
|
37657
37819
|
"$members$": {
|
|
37658
37820
|
"borderless": [516],
|
|
@@ -37793,6 +37955,8 @@ class SelectList {
|
|
|
37793
37955
|
this.options = this.syncSelectAllOption(this.options);
|
|
37794
37956
|
}
|
|
37795
37957
|
handleOptionStateChange(event) {
|
|
37958
|
+
if (this.isControlledBySelect)
|
|
37959
|
+
return;
|
|
37796
37960
|
const detail = event.detail;
|
|
37797
37961
|
if (!detail?.value)
|
|
37798
37962
|
return;
|
|
@@ -37893,9 +38057,15 @@ class SelectList {
|
|
|
37893
38057
|
*/
|
|
37894
38058
|
async setMultiple(isMultiple) {
|
|
37895
38059
|
this.isMultiple = isMultiple;
|
|
37896
|
-
|
|
38060
|
+
if (!this.isControlledBySelect)
|
|
38061
|
+
this.options = this.normalizeOptionsForMode(this.options, isMultiple);
|
|
37897
38062
|
this.scheduleMeasureItemHeight();
|
|
37898
38063
|
}
|
|
38064
|
+
get isControlledBySelect() {
|
|
38065
|
+
const root = this.el.getRootNode();
|
|
38066
|
+
const host = root.host;
|
|
38067
|
+
return host?.tagName?.toLowerCase() === 'br-select';
|
|
38068
|
+
}
|
|
37899
38069
|
/**
|
|
37900
38070
|
* Retorna uma cópia das opções atualmente controladas pela lista.
|
|
37901
38071
|
*
|
|
@@ -38216,14 +38386,18 @@ class SelectList {
|
|
|
38216
38386
|
renderOption(option, index) {
|
|
38217
38387
|
const rowHeight = this.getRowHeight();
|
|
38218
38388
|
const optionPart = this.isSelectAllOption(option) ? 'option select-all' : 'option';
|
|
38219
|
-
return (hAsync("br-select-option", { part: optionPart, active: index === this.activeOptionIndex, "data-option-index": index, disabled: option.disabled, id: `${this.el.id || 'br-select-list'}-option-${index}`, indeterminate: option.indeterminate,
|
|
38389
|
+
return (hAsync("br-select-option", { part: optionPart, active: index === this.activeOptionIndex, "data-option-index": index, disabled: option.disabled, id: `${this.el.id || 'br-select-list'}-option-${index}`, indeterminate: option.indeterminate,
|
|
38390
|
+
// A seleção faz parte da identidade visual renderizada. Incluir o estado
|
|
38391
|
+
// na chave evita que uma opção virtual reutilizada retenha o snapshot
|
|
38392
|
+
// interno anterior do br-select-option/br-item.
|
|
38393
|
+
key: `${option.value}:${option.selected ? 'selected' : 'unselected'}`, label: option.label, selected: option.selected, "show-checkbox": this.isMultiple, style: {
|
|
38220
38394
|
boxSizing: 'border-box',
|
|
38221
38395
|
height: `${rowHeight}px`,
|
|
38222
38396
|
position: 'absolute',
|
|
38223
38397
|
top: `${index * rowHeight}px`,
|
|
38224
38398
|
left: '0',
|
|
38225
38399
|
right: '0',
|
|
38226
|
-
}, value: option.value }, option.label ?? option.value));
|
|
38400
|
+
}, value: option.value }, option.content ? hAsync("span", { innerHTML: option.content }) : (option.label ?? option.value)));
|
|
38227
38401
|
}
|
|
38228
38402
|
getVirtualScrollStyle() {
|
|
38229
38403
|
return {
|
|
@@ -38257,7 +38431,7 @@ class SelectList {
|
|
|
38257
38431
|
return (hAsync("div", { part: "loading", role: "status", "aria-live": "polite" }, hAsync("slot", { name: "loading" }, hAsync("br-loading", { size: "small", label: "Buscando op\u00E7\u00F5es" }))));
|
|
38258
38432
|
}
|
|
38259
38433
|
render() {
|
|
38260
|
-
return (hAsync(Host, { key: '
|
|
38434
|
+
return (hAsync(Host, { key: '537c7f312573570953b24e27fed7188a052c4bd5' }, hAsync("div", { key: 'aac978e5664c9dee21ba7a6763125fe7daf915d3', class: this.getCssClassMap(), part: "list", ref: (el) => (this.listElement = el), onScroll: this.handleScroll, style: this.getVirtualScrollStyle() }, this.loading ? this.renderLoading() : this.renderVirtualOptions())));
|
|
38261
38435
|
}
|
|
38262
38436
|
get el() { return getElement(this); }
|
|
38263
38437
|
static get watchers() { return {
|
|
@@ -38393,7 +38567,10 @@ class SelectOption {
|
|
|
38393
38567
|
if (this.isRedundantCheckboxReflection(event, current)) {
|
|
38394
38568
|
return;
|
|
38395
38569
|
}
|
|
38396
|
-
this.
|
|
38570
|
+
if (this.isControlledBySelect)
|
|
38571
|
+
this.emitStateChange(current);
|
|
38572
|
+
else
|
|
38573
|
+
this.applySelection(current);
|
|
38397
38574
|
};
|
|
38398
38575
|
}
|
|
38399
38576
|
componentDidLoad() {
|
|
@@ -38431,7 +38608,11 @@ class SelectOption {
|
|
|
38431
38608
|
async setSelectedState(selected) {
|
|
38432
38609
|
if (this.disabled)
|
|
38433
38610
|
return;
|
|
38434
|
-
|
|
38611
|
+
const nextSelected = typeof selected === 'boolean' ? selected : !this.selected;
|
|
38612
|
+
if (this.isControlledBySelect)
|
|
38613
|
+
this.emitStateChange(nextSelected);
|
|
38614
|
+
else
|
|
38615
|
+
this.applySelection(nextSelected);
|
|
38435
38616
|
}
|
|
38436
38617
|
isRedundantCheckboxReflection(event, nextSelected) {
|
|
38437
38618
|
if (!event)
|
|
@@ -38443,11 +38624,11 @@ class SelectOption {
|
|
|
38443
38624
|
return false;
|
|
38444
38625
|
return Boolean(nextSelected) === Boolean(this.selected);
|
|
38445
38626
|
}
|
|
38446
|
-
emitStateChange() {
|
|
38627
|
+
emitStateChange(selected = this.selected) {
|
|
38447
38628
|
const detail = {
|
|
38448
38629
|
disabled: this.disabled,
|
|
38449
38630
|
indeterminate: this.indeterminate,
|
|
38450
|
-
selected
|
|
38631
|
+
selected,
|
|
38451
38632
|
value: this.getResolvedValue(),
|
|
38452
38633
|
label: this.getResolvedLabel(),
|
|
38453
38634
|
};
|
|
@@ -38457,6 +38638,20 @@ class SelectOption {
|
|
|
38457
38638
|
this.lastStateChangeKey = nextKey;
|
|
38458
38639
|
this.brSelectOptionStateChange.emit(detail);
|
|
38459
38640
|
}
|
|
38641
|
+
get isControlledBySelect() {
|
|
38642
|
+
if (this.el.closest('br-select'))
|
|
38643
|
+
return true;
|
|
38644
|
+
let node = this.el;
|
|
38645
|
+
for (;;) {
|
|
38646
|
+
const root = node.getRootNode();
|
|
38647
|
+
const host = root.host;
|
|
38648
|
+
if (!host)
|
|
38649
|
+
return false;
|
|
38650
|
+
if (host.tagName.toLowerCase() === 'br-select')
|
|
38651
|
+
return true;
|
|
38652
|
+
node = host;
|
|
38653
|
+
}
|
|
38654
|
+
}
|
|
38460
38655
|
/**
|
|
38461
38656
|
* Centraliza a transição de seleção para manter emissão e limpeza de estado consistentes.
|
|
38462
38657
|
*
|
|
@@ -38523,7 +38718,7 @@ class SelectOption {
|
|
|
38523
38718
|
return this.normalizeText(this.el.textContent || '');
|
|
38524
38719
|
}
|
|
38525
38720
|
render() {
|
|
38526
|
-
return (hAsync(Host, { key: '
|
|
38721
|
+
return (hAsync(Host, { key: '3b20b8766d73d6a862765fb890028e6ff7374d96', part: "option", exportparts: "checkbox:checkbox, checkbox:option-checkbox", "aria-disabled": this.disabled ? 'true' : 'false', "aria-selected": this.selected ? 'true' : 'false', role: "option", onMouseEnter: () => {
|
|
38527
38722
|
this.el.dispatchEvent(new CustomEvent('brInternalSelectOptionHover', {
|
|
38528
38723
|
bubbles: true,
|
|
38529
38724
|
composed: true,
|
|
@@ -38535,7 +38730,7 @@ class SelectOption {
|
|
|
38535
38730
|
composed: true,
|
|
38536
38731
|
detail: { label: this.getResolvedLabel(), value: this.getResolvedValue() },
|
|
38537
38732
|
}));
|
|
38538
|
-
} }, hAsync("br-item", { key: '
|
|
38733
|
+
} }, hAsync("br-item", { key: '7b32b68bbc5541090e24d81e55602045bdbbba47', class: this.getCssClassMap(), disabled: this.disabled, active: this.active, selected: this.selected, "is-interactive": true, ref: (el) => (this.itemElement = el), onBrItemSelect: this.handleSelect }, this.showCheckbox && (hAsync("br-checkbox", { key: 'fd5426e02e229eaaa8b22d457329cce6acf59e51', exportparts: "input:checkbox, input:option-checkbox", slot: "start", checked: this.selected, disabled: this.disabled, indeterminate: this.indeterminate, name: this.getResolvedValue(), onCheckedChange: this.handleSelect })), hAsync("span", { key: '6185b2e6b60bf65059c321d4118d675859f9940e', class: "br-select-option-label" }, hAsync("slot", { key: 'c78020a423fe1ed34ef39f46301f71baf5b0cbd8' }, this.getResolvedLabel())))));
|
|
38539
38734
|
}
|
|
38540
38735
|
static get formAssociated() { return true; }
|
|
38541
38736
|
get el() { return getElement(this); }
|
|
@@ -38694,12 +38889,13 @@ class SignIn {
|
|
|
38694
38889
|
const TagType = this.getTagType();
|
|
38695
38890
|
const attributes = this.getAttributes();
|
|
38696
38891
|
const classList = this.getCssClassMap();
|
|
38697
|
-
return (hAsync(Host, { key: '
|
|
38892
|
+
return (hAsync(Host, { key: 'bf39bac1bfe99859a67ef858ca441b55e3e74e88', "aria-disabled": this.disabled ? 'true' : null }, hAsync(TagType, { key: 'b414dc1085f35a1058b8b8b5490c41380c3f696b', part: "button", class: classList, id: this.customId, ...attributes, onClick: this.handleClick, onFocus: this.handleFocus }, hAsync("slot", { key: '3d33a278e13e90572c6b97dbe435b7a9e3823e38', name: "icon" }, this.shape === 'circle' && hAsync("br-icon", { key: '3f8a31aac9196ffb6d5b6b99fa0077950fbe4b63', iconName: "fa6-solid:user", width: "12", height: "12" })), hAsync("span", { key: 'e3247ad0b75f87c162beb26dffe3f1828f477191', part: "content" }, hAsync("slot", { key: 'fa12d65243f404963e16e2e964b7d33c90055e6f' })), this.hasSlotContent('image') && (hAsync("span", { key: '51922b0c8786fd2d96814c6a576222330d3b7c72', part: "image" }, hAsync("slot", { key: 'b7052a2db95b25ec911ccd43fe70d0d0fc38ad9e', name: "image" }))))));
|
|
38698
38893
|
}
|
|
38894
|
+
static get delegatesFocus() { return true; }
|
|
38699
38895
|
get el() { return getElement(this); }
|
|
38700
38896
|
static get style() { return signInCss(); }
|
|
38701
38897
|
static get cmpMeta() { return {
|
|
38702
|
-
"$flags$":
|
|
38898
|
+
"$flags$": 281,
|
|
38703
38899
|
"$tagName$": "br-sign-in",
|
|
38704
38900
|
"$members$": {
|
|
38705
38901
|
"customId": [513, "custom-id"],
|
|
@@ -40021,9 +40217,8 @@ class Slider {
|
|
|
40021
40217
|
return (hAsync("div", { class: "slider-tick-labels", part: "tick-labels", "aria-hidden": "true" }, intermediateTicks.map((value) => (hAsync("span", { class: "slider-tick-label", part: "tick-label", style: this.effectiveVertical ? { bottom: `${this.percentOf(value)}%` } : { left: `${this.percentOf(value)}%` } }, value)))));
|
|
40022
40218
|
}
|
|
40023
40219
|
render() {
|
|
40024
|
-
return (hAsync(Host, { key: '
|
|
40220
|
+
return (hAsync(Host, { key: '26be711ad91a867e82e35d10e86508aa5af68557' }, hAsync("div", { key: '906052510af8d3a323ea8274b339ba264b745e25', class: this.getCssClassMap(), part: "base" }, hAsync("div", { key: '323ee79d4a4fc4d81e4a1b43c8fa6298d0f92916', class: "slider-layout", part: "layout" }, hAsync("div", { key: '113e5114161144af0466997b47108eb0e053af8e', class: "slider-body", part: "body" }, this.renderTrack(), this.renderReferences()), this.renderInput())), hAsync("div", { key: 'b8ce4c3cae026492ad1db1e03f5709988b42a13e', id: `${this.customId}-feedback`, part: "feedback", hidden: !this.hasFeedbackSlot && !this.customValidationMessage && !this.validatorMessage }, hAsync("slot", { key: 'e2564e6830476cb3d495807f4b15d600f5c7146e', name: "feedback", onSlotchange: (event) => (this.hasFeedbackSlot = hasAssignedSlotContent(event.currentTarget)) }), !this.hasFeedbackSlot && (this.customValidationMessage || this.validatorMessage) ? (hAsync("br-message", { state: "danger", message: this.customValidationMessage || this.validatorMessage })) : null)));
|
|
40025
40221
|
}
|
|
40026
|
-
static get delegatesFocus() { return true; }
|
|
40027
40222
|
static get formAssociated() { return true; }
|
|
40028
40223
|
get el() { return getElement(this); }
|
|
40029
40224
|
static get watchers() { return {
|
|
@@ -40039,7 +40234,7 @@ class Slider {
|
|
|
40039
40234
|
}; }
|
|
40040
40235
|
static get style() { return sliderCss(); }
|
|
40041
40236
|
static get cmpMeta() { return {
|
|
40042
|
-
"$flags$":
|
|
40237
|
+
"$flags$": 329,
|
|
40043
40238
|
"$tagName$": "br-slider",
|
|
40044
40239
|
"$members$": {
|
|
40045
40240
|
"customId": [513, "custom-id"],
|
|
@@ -43639,13 +43834,12 @@ class Tag {
|
|
|
43639
43834
|
}
|
|
43640
43835
|
render() {
|
|
43641
43836
|
const mainContent = this.renderMainTagContent();
|
|
43642
|
-
return (hAsync(Host, { key: '
|
|
43837
|
+
return (hAsync(Host, { key: '91853c64b346742509a16691c73e85a17fd8f45c' }, this.effectiveSelectable
|
|
43643
43838
|
? this.renderInteractionSelectTag()
|
|
43644
43839
|
: this.effectiveStatus
|
|
43645
43840
|
? this.renderStatusLayout(mainContent)
|
|
43646
|
-
: mainContent, hAsync("div", { key: '
|
|
43841
|
+
: mainContent, hAsync("div", { key: 'c1c56c9e60df4e728c2d3a48b3c776b951ee464a', id: `${this.customId}-feedback`, part: "feedback", hidden: !this.hasFeedbackSlot && !this.customValidationMessage && !this.validatorMessage }, hAsync("slot", { key: 'cbae6fdc39ec290b40370cb532ba0d2a06a194d2', name: "feedback", onSlotchange: (event) => (this.hasFeedbackSlot = hasAssignedSlotContent(event.currentTarget)) }), !this.hasFeedbackSlot && (this.customValidationMessage || this.validatorMessage) ? (hAsync("br-message", { state: "danger", message: this.customValidationMessage || this.validatorMessage })) : null)));
|
|
43647
43842
|
}
|
|
43648
|
-
static get delegatesFocus() { return true; }
|
|
43649
43843
|
static get formAssociated() { return true; }
|
|
43650
43844
|
get el() { return getElement(this); }
|
|
43651
43845
|
static get watchers() { return {
|
|
@@ -43664,7 +43858,7 @@ class Tag {
|
|
|
43664
43858
|
}; }
|
|
43665
43859
|
static get style() { return tagCss(); }
|
|
43666
43860
|
static get cmpMeta() { return {
|
|
43667
|
-
"$flags$":
|
|
43861
|
+
"$flags$": 329,
|
|
43668
43862
|
"$tagName$": "br-tag",
|
|
43669
43863
|
"$members$": {
|
|
43670
43864
|
"label": [513],
|
|
@@ -45862,16 +46056,15 @@ class Upload {
|
|
|
45862
46056
|
render() {
|
|
45863
46057
|
const hasFiles = (this.filesSelected && this.filesSelected.length > 0) ||
|
|
45864
46058
|
(this.parsedUploadFiles && this.parsedUploadFiles.length > 0);
|
|
45865
|
-
return (hAsync(Host, { key: '
|
|
46059
|
+
return (hAsync(Host, { key: 'b2354be16c7963909ce2939d1bd24e99475cc6ef', "aria-busy": this.uploading || this.isValidating ? 'true' : null }, hAsync("div", { key: '78808e8f2c3eacce3deb6542ab5e2d9d60bd7e7e', class: this.getCssClassMap(), id: this.customId, part: "container" }, hAsync("label", { key: '5881d7133d9118d3c9e1637932adfac7e58fb3b5', id: `label-${this.customId}`, class: "upload-label", htmlFor: `single-file-${this.customId}`, part: "label" }, hAsync("span", { key: '7e1c9a04a4f88c06007c2d16ee2df1a7d0ca1956' }, hAsync("slot", { key: '1043fac29600fdf581bf8a6fde3928a4b9140bdd', name: "label" }, this.label))), hAsync("input", { key: 'acc7aeb2294edb18ff1495ae335f71420f5f55d5', ref: (el) => {
|
|
45866
46060
|
this.nativeInput = el;
|
|
45867
46061
|
el.addEventListener('input', this.handleNativeInput);
|
|
45868
46062
|
}, class: "upload-input", id: `single-file-${this.customId}`, type: "file", onChange: this.handleInputChange, onCancel: this.handleNativeCancel, multiple: this.multiple, disabled: this.isDisabled(), required: this.required, accept: this.accept, capture: this.capture, "aria-labelledby": `label-${this.customId}`, "aria-busy": this.uploading || this.isValidating ? 'true' : null, "aria-describedby": this.hasFeedbackSlot || this.customValidationMessage || this.validatorMessage
|
|
45869
46063
|
? `${this.customId}-feedback`
|
|
45870
46064
|
: null, "aria-errormessage": this.customValidationMessage || this.validatorMessage || this.hasFeedbackSlot
|
|
45871
46065
|
? `${this.customId}-feedback`
|
|
45872
|
-
: null, part: "input" }), hAsync("button", { key: '
|
|
46066
|
+
: null, part: "input" }), hAsync("button", { key: 'd52437779c26e2e41a8fa944325385dca9fab5db', class: "upload-button", type: "button", disabled: this.isDisabled(), onClick: () => this.handleFileSelection(), onDragEnter: (event) => this.handleDragEnter(event), onDragLeave: (event) => this.handleDragLeave(event), onDrop: (event) => this.handleDrop(event), onDragOver: (event) => this.handleDragOver(event), "aria-describedby": `label-${this.customId}`, part: "button" }, hAsync("br-icon", { key: '5b9514f5bfdfa32c5bbf73443f215454d669a71e', iconName: "fa-solid:upload", width: "20", height: "20", "aria-hidden": "true" }), hAsync("slot", { key: '00684193f001d54a684261a9dca1e5c35ba2bcba' }, hAsync("span", { key: 'af97d6116a296ae574b5de7c0e26c78a783983b4' }, "Selecione o arquivo"))), hAsync("div", { key: '9db7490ea790b63348952dffc52dc67dd8c54a82', class: "upload-help", part: "helper" }, hAsync("slot", { key: 'f831bae068bae343d40067922c07431fce1e2295', name: "helper" }, this.multiple ? 'Clique ou arraste os arquivos para cima do componente Upload.' : null)), this.renderUploadStatus(), hAsync("slot", { key: 'e6cae25855b7e30f797d51aae53448fc8be7cbf5', name: "upload-list" }, hasFiles && (hAsync("br-list", { key: '90c912ba21f3dff6f9c28cf53886414aa0582c4a', id: `${this.customId}-list-files`, class: "upload-list", listRole: "list", density: "small", part: "file-list" }, this.renderFilesUploaded())))), this.renderUploadError(), this.renderFeedback()));
|
|
45873
46067
|
}
|
|
45874
|
-
static get delegatesFocus() { return true; }
|
|
45875
46068
|
static get formAssociated() { return true; }
|
|
45876
46069
|
get el() { return getElement(this); }
|
|
45877
46070
|
static get watchers() { return {
|
|
@@ -45890,7 +46083,7 @@ class Upload {
|
|
|
45890
46083
|
}; }
|
|
45891
46084
|
static get style() { return uploadCss(); }
|
|
45892
46085
|
static get cmpMeta() { return {
|
|
45893
|
-
"$flags$":
|
|
46086
|
+
"$flags$": 329,
|
|
45894
46087
|
"$tagName$": "br-upload",
|
|
45895
46088
|
"$members$": {
|
|
45896
46089
|
"customId": [513, "custom-id"],
|