@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.js
CHANGED
|
@@ -11900,12 +11900,13 @@ class CookiebarLink {
|
|
|
11900
11900
|
};
|
|
11901
11901
|
}
|
|
11902
11902
|
render() {
|
|
11903
|
-
return (hAsync(Host, { key: '
|
|
11903
|
+
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)" }))))));
|
|
11904
11904
|
}
|
|
11905
|
+
static get delegatesFocus() { return true; }
|
|
11905
11906
|
get el() { return getElement(this); }
|
|
11906
11907
|
static get style() { return cookiebarLinkCss(); }
|
|
11907
11908
|
static get cmpMeta() { return {
|
|
11908
|
-
"$flags$":
|
|
11909
|
+
"$flags$": 25,
|
|
11909
11910
|
"$tagName$": "br-cookiebar-link",
|
|
11910
11911
|
"$members$": {
|
|
11911
11912
|
"customId": [513, "custom-id"],
|
|
@@ -22111,8 +22112,9 @@ class DatetimeInput {
|
|
|
22111
22112
|
* Renderização principal do componente.
|
|
22112
22113
|
*/
|
|
22113
22114
|
render() {
|
|
22114
|
-
return (hAsync(Host, { key: '
|
|
22115
|
+
return (hAsync(Host, { key: '47e77b0412286cf4f8fb35f9a1038a2e68f87266' }, hAsync("div", { key: '86b4dda4364fe1cbe111007a2b4f61435abc5cf4', class: this.getCssClassMap(), part: "container" }, this.renderInputField())));
|
|
22115
22116
|
}
|
|
22117
|
+
static get delegatesFocus() { return true; }
|
|
22116
22118
|
get el() { return getElement(this); }
|
|
22117
22119
|
static get watchers() { return {
|
|
22118
22120
|
"rangeValue": [{
|
|
@@ -22136,7 +22138,7 @@ class DatetimeInput {
|
|
|
22136
22138
|
}; }
|
|
22137
22139
|
static get style() { return datetimeInputCss(); }
|
|
22138
22140
|
static get cmpMeta() { return {
|
|
22139
|
-
"$flags$":
|
|
22141
|
+
"$flags$": 25,
|
|
22140
22142
|
"$tagName$": "br-datetime-input",
|
|
22141
22143
|
"$members$": {
|
|
22142
22144
|
"placeholder": [1],
|
|
@@ -23990,9 +23992,8 @@ class DatetimePicker {
|
|
|
23990
23992
|
* Renderização principal do componente.
|
|
23991
23993
|
*/
|
|
23992
23994
|
render() {
|
|
23993
|
-
return (hAsync(Host, { key: '
|
|
23995
|
+
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)));
|
|
23994
23996
|
}
|
|
23995
|
-
static get delegatesFocus() { return true; }
|
|
23996
23997
|
static get formAssociated() { return true; }
|
|
23997
23998
|
get el() { return getElement(this); }
|
|
23998
23999
|
static get watchers() { return {
|
|
@@ -24041,7 +24042,7 @@ class DatetimePicker {
|
|
|
24041
24042
|
}; }
|
|
24042
24043
|
static get style() { return datetimePickerCss(); }
|
|
24043
24044
|
static get cmpMeta() { return {
|
|
24044
|
-
"$flags$":
|
|
24045
|
+
"$flags$": 329,
|
|
24045
24046
|
"$tagName$": "br-datetime-picker",
|
|
24046
24047
|
"$members$": {
|
|
24047
24048
|
"mode": [1537],
|
|
@@ -26942,8 +26943,9 @@ class HeaderLogo {
|
|
|
26942
26943
|
* @returns JSX do componente.
|
|
26943
26944
|
*/
|
|
26944
26945
|
render() {
|
|
26945
|
-
return (hAsync(Host, { key: '
|
|
26946
|
+
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())))));
|
|
26946
26947
|
}
|
|
26948
|
+
static get delegatesFocus() { return true; }
|
|
26947
26949
|
get el() { return getElement(this); }
|
|
26948
26950
|
static get watchers() { return {
|
|
26949
26951
|
"isCompact": [{
|
|
@@ -26952,7 +26954,7 @@ class HeaderLogo {
|
|
|
26952
26954
|
}; }
|
|
26953
26955
|
static get style() { return headerLogoCss(); }
|
|
26954
26956
|
static get cmpMeta() { return {
|
|
26955
|
-
"$flags$":
|
|
26957
|
+
"$flags$": 281,
|
|
26956
26958
|
"$tagName$": "br-header-logo",
|
|
26957
26959
|
"$members$": {
|
|
26958
26960
|
"customId": [513, "custom-id"],
|
|
@@ -27418,7 +27420,7 @@ class Icon {
|
|
|
27418
27420
|
return {
|
|
27419
27421
|
role: isInformative || isFocusable ? 'img' : null,
|
|
27420
27422
|
'aria-label': this.label || null,
|
|
27421
|
-
tabindex: isFocusable ? 0 :
|
|
27423
|
+
tabindex: isFocusable ? 0 : null,
|
|
27422
27424
|
'aria-hidden': isInformative || isFocusable ? null : 'true',
|
|
27423
27425
|
focusable: isFocusable ? true : 'false',
|
|
27424
27426
|
};
|
|
@@ -28305,6 +28307,7 @@ class Item {
|
|
|
28305
28307
|
this.activate();
|
|
28306
28308
|
}
|
|
28307
28309
|
};
|
|
28310
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: mantém em uma transação os modos standalone, controlado, radio e checkbox.
|
|
28308
28311
|
this.handleClick = (event) => {
|
|
28309
28312
|
if (this.disabled) {
|
|
28310
28313
|
event.preventDefault();
|
|
@@ -28336,14 +28339,17 @@ class Item {
|
|
|
28336
28339
|
}
|
|
28337
28340
|
else {
|
|
28338
28341
|
// Armazena o estado anterior para emitir o evento apenas se houver mudança.
|
|
28339
|
-
const previousSelectedValue = this.selectedValue;
|
|
28340
|
-
|
|
28341
|
-
if (
|
|
28342
|
-
|
|
28342
|
+
const previousSelectedValue = this.hasControlledSelection ? Boolean(this.selected) : this.selectedValue;
|
|
28343
|
+
const nextSelected = !previousSelectedValue;
|
|
28344
|
+
if (!this.hasControlledSelection)
|
|
28345
|
+
this.selectedValue = nextSelected;
|
|
28346
|
+
if (previousSelectedValue !== nextSelected) {
|
|
28347
|
+
const detail = { selected: nextSelected };
|
|
28343
28348
|
this.brDidSelect.emit(detail);
|
|
28344
28349
|
this.brItemSelect.emit(detail);
|
|
28345
28350
|
}
|
|
28346
|
-
this.
|
|
28351
|
+
if (!this.hasControlledSelection)
|
|
28352
|
+
this.updateCheckboxes();
|
|
28347
28353
|
}
|
|
28348
28354
|
}
|
|
28349
28355
|
event.stopPropagation();
|
|
@@ -28407,7 +28413,6 @@ class Item {
|
|
|
28407
28413
|
*/
|
|
28408
28414
|
async setFocus() {
|
|
28409
28415
|
this.el?.focus();
|
|
28410
|
-
this.focusableElement?.focus();
|
|
28411
28416
|
}
|
|
28412
28417
|
/**
|
|
28413
28418
|
* Define o tabIndex do elemento interno.
|
|
@@ -28423,6 +28428,9 @@ class Item {
|
|
|
28423
28428
|
get effectiveSelected() {
|
|
28424
28429
|
return this.selected ?? this.isSelected;
|
|
28425
28430
|
}
|
|
28431
|
+
get hasControlledSelection() {
|
|
28432
|
+
return this.selected !== undefined;
|
|
28433
|
+
}
|
|
28426
28434
|
get effectiveInteractive() {
|
|
28427
28435
|
return (this.interactive ??
|
|
28428
28436
|
(this.isInteractive ||
|
|
@@ -28445,7 +28453,7 @@ class Item {
|
|
|
28445
28453
|
'br-item': true,
|
|
28446
28454
|
disabled: this.disabled,
|
|
28447
28455
|
active: this.effectiveActive,
|
|
28448
|
-
selected: this.selectedValue,
|
|
28456
|
+
selected: this.selected ?? this.selectedValue,
|
|
28449
28457
|
small: this.density === 'small',
|
|
28450
28458
|
medium: this.density === 'medium',
|
|
28451
28459
|
large: this.density === 'large',
|
|
@@ -28475,21 +28483,23 @@ class Item {
|
|
|
28475
28483
|
return {
|
|
28476
28484
|
...baseAttributes,
|
|
28477
28485
|
role: isInteractiveDiv ? 'button' : null,
|
|
28478
|
-
'aria-pressed': isInteractiveDiv ? String(this.selectedValue) : null,
|
|
28486
|
+
'aria-pressed': isInteractiveDiv ? String(this.selected ?? this.selectedValue) : null,
|
|
28479
28487
|
tabIndex: this.disabled || !isFocusableItem ? -1 : this.rovingTabIndex,
|
|
28480
28488
|
'aria-disabled': this.disabled ? 'true' : null,
|
|
28481
28489
|
'aria-current': this.effectiveActive ? 'true' : null,
|
|
28482
28490
|
'data-toggle': this.effectiveInteractive ? 'selection' : null,
|
|
28483
|
-
'is-selected': this.selectedValue ? true : null,
|
|
28491
|
+
'is-selected': (this.selected ?? this.selectedValue) ? true : null,
|
|
28484
28492
|
};
|
|
28485
28493
|
}
|
|
28486
28494
|
updateCheckboxSelectionState(emitEvent = true) {
|
|
28487
28495
|
if (this.hasRadios)
|
|
28488
28496
|
return;
|
|
28489
28497
|
const checkboxes = Array.from(this.el.querySelectorAll('br-checkbox'));
|
|
28490
|
-
|
|
28498
|
+
const nextSelected = checkboxes.some((checkbox) => checkbox.checked);
|
|
28499
|
+
if (!this.hasControlledSelection)
|
|
28500
|
+
this.selectedValue = nextSelected;
|
|
28491
28501
|
if (emitEvent && this.effectiveInteractive) {
|
|
28492
|
-
const detail = { selected:
|
|
28502
|
+
const detail = { selected: nextSelected };
|
|
28493
28503
|
this.brDidSelect.emit(detail);
|
|
28494
28504
|
this.brItemSelect.emit(detail);
|
|
28495
28505
|
}
|
|
@@ -28498,9 +28508,11 @@ class Item {
|
|
|
28498
28508
|
if (!this.hasRadios)
|
|
28499
28509
|
return;
|
|
28500
28510
|
const radios = Array.from(this.el.querySelectorAll('br-radio'));
|
|
28501
|
-
|
|
28511
|
+
const nextSelected = radios.some((radio) => radio.checked);
|
|
28512
|
+
if (!this.hasControlledSelection)
|
|
28513
|
+
this.selectedValue = nextSelected;
|
|
28502
28514
|
if (emitEvent && this.effectiveInteractive) {
|
|
28503
|
-
const detail = { selected:
|
|
28515
|
+
const detail = { selected: nextSelected };
|
|
28504
28516
|
this.brDidSelect.emit(detail);
|
|
28505
28517
|
this.brItemSelect.emit(detail);
|
|
28506
28518
|
}
|
|
@@ -28520,8 +28532,9 @@ class Item {
|
|
|
28520
28532
|
const TagType = this.getTagType();
|
|
28521
28533
|
const attributes = this.getAttributes();
|
|
28522
28534
|
const classList = this.getCssClassMap();
|
|
28523
|
-
return (hAsync(Host, { key: '
|
|
28535
|
+
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)))));
|
|
28524
28536
|
}
|
|
28537
|
+
static get delegatesFocus() { return true; }
|
|
28525
28538
|
get el() { return getElement(this); }
|
|
28526
28539
|
static get watchers() { return {
|
|
28527
28540
|
"isSelected": [{
|
|
@@ -28533,7 +28546,7 @@ class Item {
|
|
|
28533
28546
|
}; }
|
|
28534
28547
|
static get style() { return itemCss(); }
|
|
28535
28548
|
static get cmpMeta() { return {
|
|
28536
|
-
"$flags$":
|
|
28549
|
+
"$flags$": 281,
|
|
28537
28550
|
"$tagName$": "br-item",
|
|
28538
28551
|
"$members$": {
|
|
28539
28552
|
"disabled": [516],
|
|
@@ -28688,8 +28701,9 @@ class Link {
|
|
|
28688
28701
|
}
|
|
28689
28702
|
}
|
|
28690
28703
|
render() {
|
|
28691
|
-
return (hAsync(Host, { key: '
|
|
28704
|
+
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' }))));
|
|
28692
28705
|
}
|
|
28706
|
+
static get delegatesFocus() { return true; }
|
|
28693
28707
|
get el() { return getElement(this); }
|
|
28694
28708
|
static get watchers() { return {
|
|
28695
28709
|
"disabled": [{
|
|
@@ -28698,7 +28712,7 @@ class Link {
|
|
|
28698
28712
|
}; }
|
|
28699
28713
|
static get style() { return linkCss(); }
|
|
28700
28714
|
static get cmpMeta() { return {
|
|
28701
|
-
"$flags$":
|
|
28715
|
+
"$flags$": 281,
|
|
28702
28716
|
"$tagName$": "br-link",
|
|
28703
28717
|
"$members$": {
|
|
28704
28718
|
"href": [513],
|
|
@@ -29880,12 +29894,13 @@ class MagicButton {
|
|
|
29880
29894
|
*/
|
|
29881
29895
|
render() {
|
|
29882
29896
|
const effectiveAriaLabel = this.ariaLabel || this.label || (this.icon ? `Botão com ícone ${this.icon}` : 'Botão');
|
|
29883
|
-
return (hAsync(Host, { key: '
|
|
29897
|
+
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' })))));
|
|
29884
29898
|
}
|
|
29899
|
+
static get delegatesFocus() { return true; }
|
|
29885
29900
|
get el() { return getElement(this); }
|
|
29886
29901
|
static get style() { return magicButtonCss(); }
|
|
29887
29902
|
static get cmpMeta() { return {
|
|
29888
|
-
"$flags$":
|
|
29903
|
+
"$flags$": 281,
|
|
29889
29904
|
"$tagName$": "br-magic-button",
|
|
29890
29905
|
"$members$": {
|
|
29891
29906
|
"customId": [513, "custom-id"],
|
|
@@ -31263,12 +31278,13 @@ class MenuLink {
|
|
|
31263
31278
|
};
|
|
31264
31279
|
}
|
|
31265
31280
|
render() {
|
|
31266
|
-
return (hAsync(Host, { key: '
|
|
31281
|
+
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" })))));
|
|
31267
31282
|
}
|
|
31283
|
+
static get delegatesFocus() { return true; }
|
|
31268
31284
|
get el() { return getElement(this); }
|
|
31269
31285
|
static get style() { return menuLinkCss(); }
|
|
31270
31286
|
static get cmpMeta() { return {
|
|
31271
|
-
"$flags$":
|
|
31287
|
+
"$flags$": 281,
|
|
31272
31288
|
"$tagName$": "br-menu-link",
|
|
31273
31289
|
"$members$": {
|
|
31274
31290
|
"customId": [513, "custom-id"],
|
|
@@ -36152,6 +36168,37 @@ Scrim.FOCUSABLE_SELECTORS = [
|
|
|
36152
36168
|
'[tabindex]:not([tabindex="-1"])',
|
|
36153
36169
|
].join(',');
|
|
36154
36170
|
|
|
36171
|
+
function transitionSelection({ currentValues, multiple, value, selected, selectableValues = [], }) {
|
|
36172
|
+
const current = [...new Set(currentValues)];
|
|
36173
|
+
if (!multiple) {
|
|
36174
|
+
const values = selected && value ? [value] : [];
|
|
36175
|
+
return { values, changed: values.length !== current.length || values[0] !== current[0] };
|
|
36176
|
+
}
|
|
36177
|
+
if (!value && selectableValues.length > 0) {
|
|
36178
|
+
const values = selected ? [...new Set(selectableValues)] : [];
|
|
36179
|
+
return {
|
|
36180
|
+
values,
|
|
36181
|
+
changed: values.length !== current.length || values.some((item, index) => item !== current[index]),
|
|
36182
|
+
};
|
|
36183
|
+
}
|
|
36184
|
+
const next = new Set(current);
|
|
36185
|
+
if (selected)
|
|
36186
|
+
next.add(value);
|
|
36187
|
+
else
|
|
36188
|
+
next.delete(value);
|
|
36189
|
+
const values = [...next];
|
|
36190
|
+
return { values, changed: values.length !== current.length || values.some((item, index) => item !== current[index]) };
|
|
36191
|
+
}
|
|
36192
|
+
function transitionAllSelection(currentValues, selected, selectableValues) {
|
|
36193
|
+
return transitionSelection({
|
|
36194
|
+
currentValues,
|
|
36195
|
+
multiple: true,
|
|
36196
|
+
value: '',
|
|
36197
|
+
selected,
|
|
36198
|
+
selectableValues,
|
|
36199
|
+
});
|
|
36200
|
+
}
|
|
36201
|
+
|
|
36155
36202
|
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}`;
|
|
36156
36203
|
|
|
36157
36204
|
let selectId = 0;
|
|
@@ -36353,6 +36400,7 @@ class Select {
|
|
|
36353
36400
|
this.validatorMessage = null;
|
|
36354
36401
|
this.hasFeedbackSlot = false;
|
|
36355
36402
|
this.hasValidationLoadingSlot = false;
|
|
36403
|
+
this.selectedValuesState = [];
|
|
36356
36404
|
this.customValidationMessage = '';
|
|
36357
36405
|
this.validationRunId = 0;
|
|
36358
36406
|
this.lastAnnouncedOpen = false;
|
|
@@ -36360,6 +36408,9 @@ class Select {
|
|
|
36360
36408
|
this.suppressValueChange = false;
|
|
36361
36409
|
this.hasImperativeOptions = false;
|
|
36362
36410
|
this.remoteSelectedOptions = new Map();
|
|
36411
|
+
this.selectionInitialized = false;
|
|
36412
|
+
this.selectedValues = [];
|
|
36413
|
+
this.suppressFocusOpen = false;
|
|
36363
36414
|
/**
|
|
36364
36415
|
* Sincroniza as opções declaradas no slot com a lista interna renderizada.
|
|
36365
36416
|
*
|
|
@@ -36370,10 +36421,11 @@ class Select {
|
|
|
36370
36421
|
this.syncOptionsFromSlot = (updateDisplayValue = true) => {
|
|
36371
36422
|
if (this.hasImperativeOptions)
|
|
36372
36423
|
return;
|
|
36373
|
-
const nodes = this.slotElement?.assignedNodes({ flatten: true }) ??
|
|
36424
|
+
const nodes = this.slotElement?.assignedNodes({ flatten: true }) ?? Array.from(this.el.childNodes);
|
|
36374
36425
|
const options = nodes.map((n) => this.nodeToOption(n)).filter((o) => Boolean(o));
|
|
36375
36426
|
// Envia opções para o br-select-list
|
|
36376
|
-
this.selectListElement
|
|
36427
|
+
if (this.selectListElement)
|
|
36428
|
+
this.selectListElement.options = this.getListOptions(options);
|
|
36377
36429
|
if (updateDisplayValue)
|
|
36378
36430
|
this.syncDisplayValue(options);
|
|
36379
36431
|
};
|
|
@@ -36403,6 +36455,10 @@ class Select {
|
|
|
36403
36455
|
this.setSelectionMode(this.effectiveMultiple);
|
|
36404
36456
|
const initialOptions = this.getHostOptions();
|
|
36405
36457
|
const propOptions = this.getOptionsProp();
|
|
36458
|
+
const sourceOptions = initialOptions.length === 0 && propOptions.length > 0 ? propOptions : initialOptions;
|
|
36459
|
+
this.setSelectedValues(this.valueFromPublicValue(this.value) ??
|
|
36460
|
+
sourceOptions.filter((option) => option.selected).map((option) => option.value));
|
|
36461
|
+
this.selectionInitialized = true;
|
|
36406
36462
|
if (initialOptions.length === 0 && propOptions.length > 0) {
|
|
36407
36463
|
this.pendingOptions = propOptions;
|
|
36408
36464
|
this.syncDisplayValue(propOptions);
|
|
@@ -36424,7 +36480,7 @@ class Select {
|
|
|
36424
36480
|
this.slotElement.addEventListener('slotchange', this.handleSlotChange);
|
|
36425
36481
|
}
|
|
36426
36482
|
if (this.pendingOptions && this.selectListElement) {
|
|
36427
|
-
this.selectListElement.
|
|
36483
|
+
this.selectListElement.options = this.getListOptions(this.pendingOptions);
|
|
36428
36484
|
this.pendingOptions = null;
|
|
36429
36485
|
}
|
|
36430
36486
|
this.isValueChangeReady = true;
|
|
@@ -36433,6 +36489,10 @@ class Select {
|
|
|
36433
36489
|
this.attachBlockingSurfaceListener();
|
|
36434
36490
|
this.updateValidity();
|
|
36435
36491
|
}
|
|
36492
|
+
componentDidRender() {
|
|
36493
|
+
this.syncNativeSelectSelection();
|
|
36494
|
+
this.updateValidity();
|
|
36495
|
+
}
|
|
36436
36496
|
disconnectedCallback() {
|
|
36437
36497
|
if (this.slotElement) {
|
|
36438
36498
|
this.slotElement.removeEventListener('slotchange', this.handleSlotChange);
|
|
@@ -36449,6 +36509,47 @@ class Select {
|
|
|
36449
36509
|
get effectiveOpen() {
|
|
36450
36510
|
return this.open ?? this.isOpen;
|
|
36451
36511
|
}
|
|
36512
|
+
valueFromPublicValue(value) {
|
|
36513
|
+
if (this.effectiveMultiple)
|
|
36514
|
+
return Array.isArray(value) ? [...new Set(value.filter(Boolean))] : null;
|
|
36515
|
+
return typeof value === 'string' && value ? [value] : null;
|
|
36516
|
+
}
|
|
36517
|
+
setSelectedValues(values) {
|
|
36518
|
+
const next = [...new Set(values.filter(Boolean))];
|
|
36519
|
+
if (!this.effectiveMultiple && next.length > 1)
|
|
36520
|
+
next.splice(1);
|
|
36521
|
+
if (this.selectedValues.length === next.length &&
|
|
36522
|
+
this.selectedValues.every((value, index) => value === next[index]))
|
|
36523
|
+
return;
|
|
36524
|
+
this.selectedValues = next;
|
|
36525
|
+
this.selectedValuesState = next;
|
|
36526
|
+
}
|
|
36527
|
+
get canonicalSelectedValues() {
|
|
36528
|
+
return this.selectedValues;
|
|
36529
|
+
}
|
|
36530
|
+
applyCanonicalSelection(options, values = this.canonicalSelectedValues) {
|
|
36531
|
+
if (!this.selectionInitialized)
|
|
36532
|
+
return options.map((option) => ({ ...option }));
|
|
36533
|
+
const selected = new Set(values);
|
|
36534
|
+
return options.map((option) => ({ ...option, selected: selected.has(option.value) }));
|
|
36535
|
+
}
|
|
36536
|
+
getListOptions(options) {
|
|
36537
|
+
const normalized = this.applyCanonicalSelection(options).filter((option) => option.value !== '__select_all__');
|
|
36538
|
+
if (!this.effectiveMultiple)
|
|
36539
|
+
return normalized;
|
|
36540
|
+
const selectable = normalized.filter((option) => !this.isSelectAllLabel(this.getOptionLabel(option)));
|
|
36541
|
+
const allSelected = selectable.length > 0 && selectable.every((option) => Boolean(option.selected));
|
|
36542
|
+
const anySelected = selectable.some((option) => Boolean(option.selected));
|
|
36543
|
+
return [
|
|
36544
|
+
{
|
|
36545
|
+
value: '__select_all__',
|
|
36546
|
+
label: allSelected ? this.unselectAllLabel : this.selectAllLabel,
|
|
36547
|
+
selected: allSelected,
|
|
36548
|
+
indeterminate: anySelected && !allSelected,
|
|
36549
|
+
},
|
|
36550
|
+
...selectable,
|
|
36551
|
+
];
|
|
36552
|
+
}
|
|
36452
36553
|
isDisabled() {
|
|
36453
36554
|
return isFormControlDisabled(this.disabled, this.formDisabled);
|
|
36454
36555
|
}
|
|
@@ -36521,6 +36622,8 @@ class Select {
|
|
|
36521
36622
|
}
|
|
36522
36623
|
handleSelectInputFocus() {
|
|
36523
36624
|
this.activeOptionIndex = -1;
|
|
36625
|
+
if (this.suppressFocusOpen)
|
|
36626
|
+
return;
|
|
36524
36627
|
if (this.filterable && !this.effectiveOpen) {
|
|
36525
36628
|
this.clearSearch();
|
|
36526
36629
|
void this.show();
|
|
@@ -36557,16 +36660,50 @@ class Select {
|
|
|
36557
36660
|
this.toggleOpenFromPointer();
|
|
36558
36661
|
}
|
|
36559
36662
|
handleSelectOptionStateChange(event) {
|
|
36560
|
-
this.syncSlottedOptionSelection(event.detail);
|
|
36561
|
-
this.rememberRemoteSelections(this.getCurrentOptions());
|
|
36562
|
-
this.syncDisplayValue();
|
|
36563
|
-
this.syncActiveOptionIndex(event.detail);
|
|
36564
36663
|
event.stopPropagation();
|
|
36565
|
-
const detail =
|
|
36664
|
+
const detail = event.detail;
|
|
36665
|
+
// Use a lista interna para preservar rótulos e opções remotas enquanto as
|
|
36666
|
+
// props projetadas aguardam a próxima renderização.
|
|
36667
|
+
const listOptions = this.getSelectListController()?.options;
|
|
36668
|
+
const sourceOptions = Array.isArray(listOptions) && listOptions.length > 0
|
|
36669
|
+
? listOptions.map((option) => ({ ...option }))
|
|
36670
|
+
: this.getCurrentOptions();
|
|
36671
|
+
// No modo simples, o evento é a decisão final da interação. A lista
|
|
36672
|
+
// virtualizada e as opções projetadas podem ainda conter o snapshot da
|
|
36673
|
+
// interação anterior durante cliques consecutivos; derivar a coleção a
|
|
36674
|
+
// partir do valor do evento evita que esse snapshot reapareça no valor
|
|
36675
|
+
// público ou no formulário.
|
|
36676
|
+
const selectableValues = sourceOptions
|
|
36677
|
+
.filter((option) => !this.isSelectAllLabel(this.getOptionLabel(option)))
|
|
36678
|
+
.map((option) => option.value);
|
|
36679
|
+
const transition = this.isSelectAllLabel(detail.label ?? detail.value)
|
|
36680
|
+
? transitionAllSelection(this.selectedValues, Boolean(detail.selected), selectableValues)
|
|
36681
|
+
: transitionSelection({
|
|
36682
|
+
currentValues: this.selectedValues,
|
|
36683
|
+
multiple: this.effectiveMultiple,
|
|
36684
|
+
value: detail.value,
|
|
36685
|
+
selected: Boolean(detail.selected),
|
|
36686
|
+
});
|
|
36687
|
+
this.setSelectedValues(transition.values);
|
|
36688
|
+
const options = this.applyCanonicalSelection(sourceOptions, transition.values);
|
|
36689
|
+
if (this.selectListElement)
|
|
36690
|
+
this.selectListElement.options = this.getListOptions(options);
|
|
36691
|
+
this.reflectRenderedListSelection(transition.values);
|
|
36692
|
+
this.syncSlottedOptionSelection(transition.values);
|
|
36693
|
+
this.rememberRemoteSelections(options);
|
|
36694
|
+
this.syncDisplayValue(options);
|
|
36695
|
+
this.syncActiveOptionIndex(event.detail);
|
|
36566
36696
|
this.emitStateChange(detail);
|
|
36567
36697
|
this.updateValidity();
|
|
36568
|
-
if (!
|
|
36569
|
-
|
|
36698
|
+
if (!transition.changed)
|
|
36699
|
+
return;
|
|
36700
|
+
if (!this.effectiveMultiple) {
|
|
36701
|
+
this.suppressFocusOpen = true;
|
|
36702
|
+
void this.selectInputElement?.setFocus?.();
|
|
36703
|
+
void this.close().finally(() => {
|
|
36704
|
+
this.suppressFocusOpen = false;
|
|
36705
|
+
});
|
|
36706
|
+
}
|
|
36570
36707
|
dispatchNativeFormEvent(this.el, 'input');
|
|
36571
36708
|
dispatchNativeFormEvent(this.el, 'change');
|
|
36572
36709
|
}
|
|
@@ -36783,7 +36920,7 @@ class Select {
|
|
|
36783
36920
|
this.suppressValueChange = true;
|
|
36784
36921
|
try {
|
|
36785
36922
|
if (this.selectListElement) {
|
|
36786
|
-
|
|
36923
|
+
this.selectListElement.options = this.getListOptions(nextOptions);
|
|
36787
36924
|
}
|
|
36788
36925
|
else {
|
|
36789
36926
|
this.pendingOptions = nextOptions;
|
|
@@ -36802,20 +36939,20 @@ class Select {
|
|
|
36802
36939
|
*/
|
|
36803
36940
|
async setOption(option) {
|
|
36804
36941
|
this.hasImperativeOptions = true;
|
|
36942
|
+
const currentOptions = this.getCurrentOptions();
|
|
36943
|
+
const index = currentOptions.findIndex((currentOption) => currentOption.value === option.value);
|
|
36944
|
+
const nextOptions = [...currentOptions];
|
|
36945
|
+
if (index === -1)
|
|
36946
|
+
nextOptions.push(option);
|
|
36947
|
+
else
|
|
36948
|
+
nextOptions[index] = option;
|
|
36805
36949
|
if (this.selectListElement) {
|
|
36806
|
-
|
|
36807
|
-
}
|
|
36808
|
-
else if (this.pendingOptions) {
|
|
36809
|
-
const index = this.pendingOptions.findIndex((currentOption) => currentOption.value === option.value);
|
|
36810
|
-
if (index !== -1)
|
|
36811
|
-
this.pendingOptions[index] = option;
|
|
36812
|
-
else
|
|
36813
|
-
this.pendingOptions.push(option);
|
|
36950
|
+
this.selectListElement.options = this.getListOptions(nextOptions);
|
|
36814
36951
|
}
|
|
36815
36952
|
else {
|
|
36816
|
-
this.pendingOptions =
|
|
36953
|
+
this.pendingOptions = nextOptions;
|
|
36817
36954
|
}
|
|
36818
|
-
this.syncDisplayValue();
|
|
36955
|
+
this.syncDisplayValue(nextOptions);
|
|
36819
36956
|
}
|
|
36820
36957
|
getHostOptions() {
|
|
36821
36958
|
return Array.from(this.el.childNodes)
|
|
@@ -36844,15 +36981,16 @@ class Select {
|
|
|
36844
36981
|
const rawLabel = el.getAttribute('label') ?? el.label ?? '';
|
|
36845
36982
|
let value = String(rawValue || '').trim();
|
|
36846
36983
|
let label = String(rawLabel || '').trim();
|
|
36984
|
+
const inner = this.extractInnerTextFromOption(el);
|
|
36985
|
+
const content = (el.innerHTML || '').trim();
|
|
36847
36986
|
const selected = el.hasAttribute('selected') || Boolean(el.selected);
|
|
36848
36987
|
if (!value) {
|
|
36849
|
-
const inner = this.extractInnerTextFromOption(el);
|
|
36850
36988
|
if (inner)
|
|
36851
36989
|
value = inner.trim();
|
|
36852
36990
|
}
|
|
36853
36991
|
if (!label)
|
|
36854
|
-
label = value;
|
|
36855
|
-
return { value: value || '', label: label || undefined, selected };
|
|
36992
|
+
label = inner?.trim() || value;
|
|
36993
|
+
return { value: value || '', label: label || undefined, selected, content: content || undefined };
|
|
36856
36994
|
}
|
|
36857
36995
|
extractInnerTextFromOption(el) {
|
|
36858
36996
|
const fromSlot = this.getAssignedSlotText(el);
|
|
@@ -36905,6 +37043,9 @@ class Select {
|
|
|
36905
37043
|
this.syncValue(resolvedOptions);
|
|
36906
37044
|
}
|
|
36907
37045
|
syncValue(options) {
|
|
37046
|
+
this.setSelectedValues(options
|
|
37047
|
+
.filter((option) => option.selected && !this.isSelectAllLabel(this.getOptionLabel(option)))
|
|
37048
|
+
.map((option) => option.value));
|
|
36908
37049
|
const nextValue = this.getSerializedValue(options);
|
|
36909
37050
|
this.syncFormState(options);
|
|
36910
37051
|
if (this.value === nextValue)
|
|
@@ -36944,15 +37085,18 @@ class Select {
|
|
|
36944
37085
|
}
|
|
36945
37086
|
applySelectedValue(value) {
|
|
36946
37087
|
const currentOptions = this.getCurrentOptions();
|
|
37088
|
+
const requestedValues = this.valueFromPublicValue(value) ?? [];
|
|
37089
|
+
this.setSelectedValues(requestedValues);
|
|
36947
37090
|
const options = currentOptions.map((option) => ({
|
|
36948
37091
|
...option,
|
|
36949
|
-
selected:
|
|
37092
|
+
selected: requestedValues.includes(option.value),
|
|
36950
37093
|
}));
|
|
36951
37094
|
this.isApplyingExternalValue = true;
|
|
36952
37095
|
if (this.selectListElement)
|
|
36953
|
-
|
|
37096
|
+
this.selectListElement.options = this.getListOptions(options);
|
|
36954
37097
|
else
|
|
36955
37098
|
this.pendingOptions = options;
|
|
37099
|
+
this.reflectRenderedListSelection(requestedValues);
|
|
36956
37100
|
this.value = value;
|
|
36957
37101
|
this.isApplyingExternalValue = false;
|
|
36958
37102
|
this.remoteSelectedOptions.clear();
|
|
@@ -36975,7 +37119,7 @@ class Select {
|
|
|
36975
37119
|
}
|
|
36976
37120
|
applyRemoteSelection(options) {
|
|
36977
37121
|
this.rememberRemoteSelections(this.getCurrentOptions());
|
|
36978
|
-
const selectedValues = new Set(
|
|
37122
|
+
const selectedValues = new Set(this.selectedValues);
|
|
36979
37123
|
const nextOptions = options.map((option) => ({
|
|
36980
37124
|
...option,
|
|
36981
37125
|
selected: selectedValues.has(option.value) || Boolean(option.selected),
|
|
@@ -37010,38 +37154,36 @@ class Select {
|
|
|
37010
37154
|
const selectedValues = selected.map((option) => option.value);
|
|
37011
37155
|
const formValue = this.effectiveMultiple ? JSON.stringify(selectedValues) : (selectedValues[0] ?? null);
|
|
37012
37156
|
safeSetFormValue(this.elementInternals, formValue);
|
|
37013
|
-
|
|
37014
|
-
|
|
37015
|
-
const selectedSet = new Set(selectedValues);
|
|
37016
|
-
const optionNodes = Array.from(this.nativeSelect.options);
|
|
37017
|
-
selectedSet.forEach((value) => {
|
|
37018
|
-
if (optionNodes.some((option) => option.value === value))
|
|
37019
|
-
return;
|
|
37020
|
-
const option = document.createElement('option');
|
|
37021
|
-
option.value = value;
|
|
37022
|
-
this.nativeSelect?.append(option);
|
|
37023
|
-
});
|
|
37024
|
-
optionNodes.forEach((option) => {
|
|
37025
|
-
if (option.value !== '' && !selectedSet.has(option.value))
|
|
37026
|
-
option.remove();
|
|
37027
|
-
else
|
|
37028
|
-
option.selected = selectedSet.has(option.value);
|
|
37029
|
-
});
|
|
37030
|
-
this.nativeSelect.value = selectedValues[0] ?? '';
|
|
37031
|
-
}
|
|
37032
|
-
this.updateValidity();
|
|
37157
|
+
this.syncNativeSelectSelection(selectedValues);
|
|
37158
|
+
this.updateValidity(selectedValues.length);
|
|
37033
37159
|
}
|
|
37034
|
-
|
|
37035
|
-
|
|
37160
|
+
syncNativeSelectSelection(values = this.getSelectedValues()) {
|
|
37161
|
+
const nativeSelect = this.getNativeSelect();
|
|
37162
|
+
if (!nativeSelect)
|
|
37163
|
+
return;
|
|
37164
|
+
const selectedValues = new Set(values);
|
|
37165
|
+
Array.from(nativeSelect.options).forEach((option) => {
|
|
37166
|
+
option.selected = option.value === '' ? selectedValues.size === 0 : selectedValues.has(option.value);
|
|
37167
|
+
});
|
|
37168
|
+
}
|
|
37169
|
+
getSelectedValues() {
|
|
37170
|
+
return [...this.selectedValues];
|
|
37171
|
+
}
|
|
37172
|
+
updateValidity(selectedCount = this.getSelectedValues().length) {
|
|
37173
|
+
const nativeSelect = this.getNativeSelect();
|
|
37174
|
+
if (!nativeSelect)
|
|
37036
37175
|
return;
|
|
37037
|
-
const selectedCount = this.getFormOptions(this.getCurrentOptions()).filter((option) => option.selected).length;
|
|
37038
37176
|
const selectionMessage = this.effectiveMultiple && this.minSelections > 0 && selectedCount < this.minSelections
|
|
37039
37177
|
? `Selecione pelo menos ${this.minSelections} opções.`
|
|
37040
37178
|
: this.effectiveMultiple && this.maxSelections > 0 && selectedCount > this.maxSelections
|
|
37041
37179
|
? `Selecione no máximo ${this.maxSelections} opções.`
|
|
37042
37180
|
: '';
|
|
37043
|
-
|
|
37044
|
-
syncNativeFormValidity(this.elementInternals,
|
|
37181
|
+
nativeSelect.setCustomValidity(this.customValidationMessage || this.validatorMessage || selectionMessage);
|
|
37182
|
+
syncNativeFormValidity(this.elementInternals, nativeSelect);
|
|
37183
|
+
}
|
|
37184
|
+
getNativeSelect() {
|
|
37185
|
+
return (this.el.shadowRoot?.querySelector('select[part="hidden-select"]') ??
|
|
37186
|
+
this.nativeSelect);
|
|
37045
37187
|
}
|
|
37046
37188
|
resolveValidator() {
|
|
37047
37189
|
return resolveFormValidator(this.validator);
|
|
@@ -37152,6 +37294,17 @@ class Select {
|
|
|
37152
37294
|
const index = this.getCurrentActiveIndex();
|
|
37153
37295
|
const option = options[index];
|
|
37154
37296
|
const nextSelected = this.effectiveMultiple ? !option?.selected : true;
|
|
37297
|
+
if (this.effectiveMultiple && index === 0 && option && !this.isSelectAllLabel(this.getOptionLabel(option))) {
|
|
37298
|
+
this.handleSelectOptionStateChange(new CustomEvent('brSelectOptionStateChange', {
|
|
37299
|
+
detail: {
|
|
37300
|
+
value: '__select_all__',
|
|
37301
|
+
label: this.selectAllLabel,
|
|
37302
|
+
selected: true,
|
|
37303
|
+
disabled: false,
|
|
37304
|
+
},
|
|
37305
|
+
}));
|
|
37306
|
+
return;
|
|
37307
|
+
}
|
|
37155
37308
|
const didSelect = await this.getSelectListController()?.setOptionSelected?.(index, nextSelected);
|
|
37156
37309
|
if (didSelect) {
|
|
37157
37310
|
this.activeOptionIndex = index;
|
|
@@ -37172,55 +37325,19 @@ class Select {
|
|
|
37172
37325
|
* Essa sincronização mantém as props/atributos das opções declaradas pelo consumidor em
|
|
37173
37326
|
* conformidade com o estado calculado internamente, inclusive no caso do "selecionar todos".
|
|
37174
37327
|
*/
|
|
37175
|
-
syncSlottedOptionSelection(
|
|
37176
|
-
|
|
37177
|
-
return;
|
|
37178
|
-
const slottedOptions = this.slotElement
|
|
37179
|
-
.assignedElements({ flatten: true })
|
|
37180
|
-
.filter((el) => el.tagName.toLowerCase() === 'br-select-option');
|
|
37328
|
+
syncSlottedOptionSelection(values = this.selectedValues) {
|
|
37329
|
+
const slottedOptions = Array.from(this.el.children).filter((el) => el.tagName.toLowerCase() === 'br-select-option');
|
|
37181
37330
|
if (slottedOptions.length === 0)
|
|
37182
37331
|
return;
|
|
37183
|
-
const
|
|
37184
|
-
const isSelectAll = this.isSelectAllLabel(detailLabel);
|
|
37185
|
-
if (this.effectiveMultiple && isSelectAll) {
|
|
37186
|
-
slottedOptions.forEach((option) => {
|
|
37187
|
-
const optionLabel = (option.label ?? option.value).trim();
|
|
37188
|
-
const isSelectAllOption = this.isSelectAllLabel(optionLabel);
|
|
37189
|
-
if (isSelectAllOption) {
|
|
37190
|
-
option.indeterminate = false;
|
|
37191
|
-
option.selected = Boolean(detail.selected);
|
|
37192
|
-
this.normalizeSelectAllState(option);
|
|
37193
|
-
if (option.selected)
|
|
37194
|
-
option.setAttribute('selected', '');
|
|
37195
|
-
else
|
|
37196
|
-
option.removeAttribute('selected');
|
|
37197
|
-
return;
|
|
37198
|
-
}
|
|
37199
|
-
option.selected = Boolean(detail.selected);
|
|
37200
|
-
if (option.selected)
|
|
37201
|
-
option.setAttribute('selected', '');
|
|
37202
|
-
else
|
|
37203
|
-
option.removeAttribute('selected');
|
|
37204
|
-
});
|
|
37205
|
-
return;
|
|
37206
|
-
}
|
|
37332
|
+
const selectedValues = new Set(values);
|
|
37207
37333
|
slottedOptions.forEach((option) => {
|
|
37208
|
-
const
|
|
37209
|
-
|
|
37210
|
-
|
|
37211
|
-
|
|
37212
|
-
}
|
|
37213
|
-
option.selected = nextSelected;
|
|
37214
|
-
if (nextSelected) {
|
|
37334
|
+
const resolved = this.optionElementToData(option).value;
|
|
37335
|
+
option.selected = selectedValues.has(resolved);
|
|
37336
|
+
option.indeterminate = false;
|
|
37337
|
+
if (option.selected)
|
|
37215
37338
|
option.setAttribute('selected', '');
|
|
37216
|
-
|
|
37217
|
-
else {
|
|
37218
|
-
option.removeAttribute('selected');
|
|
37219
|
-
}
|
|
37220
|
-
if (!this.effectiveMultiple && !isTarget) {
|
|
37221
|
-
option.selected = false;
|
|
37339
|
+
else
|
|
37222
37340
|
option.removeAttribute('selected');
|
|
37223
|
-
}
|
|
37224
37341
|
});
|
|
37225
37342
|
if (!this.effectiveMultiple)
|
|
37226
37343
|
return;
|
|
@@ -37243,6 +37360,17 @@ class Select {
|
|
|
37243
37360
|
option.removeAttribute('selected');
|
|
37244
37361
|
});
|
|
37245
37362
|
}
|
|
37363
|
+
reflectRenderedListSelection(values) {
|
|
37364
|
+
const renderedOptions = this.selectListElement?.shadowRoot?.querySelectorAll('br-select-option');
|
|
37365
|
+
if (!renderedOptions)
|
|
37366
|
+
return;
|
|
37367
|
+
const selectedValues = new Set(values);
|
|
37368
|
+
renderedOptions.forEach((option) => {
|
|
37369
|
+
if (this.isSelectAllLabel(option.label))
|
|
37370
|
+
return;
|
|
37371
|
+
option.selected = selectedValues.has(option.value);
|
|
37372
|
+
});
|
|
37373
|
+
}
|
|
37246
37374
|
isSelectAllLabel(label) {
|
|
37247
37375
|
return label === this.selectAllLabel || label === this.unselectAllLabel;
|
|
37248
37376
|
}
|
|
@@ -37323,6 +37451,7 @@ class Select {
|
|
|
37323
37451
|
* A precedência é: lista interna, opções pendentes, conteúdo do slot e, por último,
|
|
37324
37452
|
* os filhos atuais do host.
|
|
37325
37453
|
*/
|
|
37454
|
+
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: prioriza a precedência entre slot, lista e opções remotas.
|
|
37326
37455
|
getCurrentOptions() {
|
|
37327
37456
|
// As opções projetadas são a fonte canônica quando não há coleção
|
|
37328
37457
|
// imperativa: a lista virtualizada pode manter um snapshot enquanto o
|
|
@@ -37332,21 +37461,53 @@ class Select {
|
|
|
37332
37461
|
const slotOptions = nodes
|
|
37333
37462
|
.map((node) => this.nodeToOption(node))
|
|
37334
37463
|
.filter((option) => Boolean(option));
|
|
37335
|
-
if (slotOptions.length > 0)
|
|
37336
|
-
|
|
37464
|
+
if (slotOptions.length > 0) {
|
|
37465
|
+
const normalizedSlotOptions = this.applyCanonicalSelection(slotOptions);
|
|
37466
|
+
if (this.effectiveMultiple &&
|
|
37467
|
+
!normalizedSlotOptions.some((option) => this.isSelectAllLabel(this.getOptionLabel(option)))) {
|
|
37468
|
+
normalizedSlotOptions.unshift({
|
|
37469
|
+
value: '__select_all__',
|
|
37470
|
+
label: this.selectAllLabel,
|
|
37471
|
+
selected: false,
|
|
37472
|
+
indeterminate: false,
|
|
37473
|
+
});
|
|
37474
|
+
}
|
|
37475
|
+
return normalizedSlotOptions;
|
|
37476
|
+
}
|
|
37337
37477
|
}
|
|
37338
37478
|
const listOptions = this.getSelectListController()?.options;
|
|
37339
37479
|
if (Array.isArray(listOptions) && listOptions.length > 0) {
|
|
37340
37480
|
const normalizedListOptions = listOptions.map((option) => ({ ...option }));
|
|
37341
37481
|
const hasRealOptions = normalizedListOptions.some((option) => !this.isSelectAllLabel(this.getOptionLabel(option)));
|
|
37342
37482
|
if (hasRealOptions) {
|
|
37343
|
-
|
|
37483
|
+
if (this.effectiveMultiple &&
|
|
37484
|
+
!normalizedListOptions.some((option) => this.isSelectAllLabel(this.getOptionLabel(option)))) {
|
|
37485
|
+
normalizedListOptions.unshift({
|
|
37486
|
+
value: '__select_all__',
|
|
37487
|
+
label: this.selectAllLabel,
|
|
37488
|
+
selected: false,
|
|
37489
|
+
indeterminate: false,
|
|
37490
|
+
});
|
|
37491
|
+
}
|
|
37492
|
+
return this.applyCanonicalSelection(normalizedListOptions);
|
|
37344
37493
|
}
|
|
37345
37494
|
}
|
|
37346
37495
|
if (this.pendingOptions) {
|
|
37347
|
-
return this.pendingOptions
|
|
37496
|
+
return this.applyCanonicalSelection(this.pendingOptions);
|
|
37348
37497
|
}
|
|
37349
|
-
|
|
37498
|
+
const hostOptions = this.applyCanonicalSelection(this.getHostOptions());
|
|
37499
|
+
if (this.effectiveMultiple && hostOptions.length > 0) {
|
|
37500
|
+
return [
|
|
37501
|
+
{
|
|
37502
|
+
value: '__select_all__',
|
|
37503
|
+
label: this.selectAllLabel,
|
|
37504
|
+
selected: false,
|
|
37505
|
+
indeterminate: false,
|
|
37506
|
+
},
|
|
37507
|
+
...hostOptions,
|
|
37508
|
+
];
|
|
37509
|
+
}
|
|
37510
|
+
return hostOptions;
|
|
37350
37511
|
}
|
|
37351
37512
|
normalizeSearchText(value) {
|
|
37352
37513
|
return value
|
|
@@ -37396,7 +37557,7 @@ class Select {
|
|
|
37396
37557
|
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() }));
|
|
37397
37558
|
}
|
|
37398
37559
|
renderSelectList() {
|
|
37399
|
-
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) => {
|
|
37560
|
+
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) => {
|
|
37400
37561
|
this.selectListElement = el;
|
|
37401
37562
|
this.selectListElement.loading = this.loading;
|
|
37402
37563
|
this.setSelectionMode(this.effectiveMultiple);
|
|
@@ -37404,9 +37565,8 @@ class Select {
|
|
|
37404
37565
|
} }, hAsync("slot", null), hAsync("slot", { name: "loading", slot: "loading" })));
|
|
37405
37566
|
}
|
|
37406
37567
|
renderHiddenSelect() {
|
|
37407
|
-
const
|
|
37408
|
-
|
|
37409
|
-
.filter((option) => option.selected);
|
|
37568
|
+
const options = this.getFormOptions(this.getCurrentOptions()).filter((option) => !this.isSelectAllLabel(this.getOptionLabel(option)));
|
|
37569
|
+
const hasSelection = options.some((option) => option.selected);
|
|
37410
37570
|
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: {
|
|
37411
37571
|
position: 'absolute',
|
|
37412
37572
|
width: '1px',
|
|
@@ -37417,10 +37577,10 @@ class Select {
|
|
|
37417
37577
|
clip: 'rect(0, 0, 0, 0)',
|
|
37418
37578
|
whiteSpace: 'nowrap',
|
|
37419
37579
|
border: '0',
|
|
37420
|
-
}, onChange: (event) => event.preventDefault() }, hAsync("option", { value: "", selected:
|
|
37580
|
+
}, 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 })))));
|
|
37421
37581
|
}
|
|
37422
37582
|
render() {
|
|
37423
|
-
return (hAsync(Host, { key: '
|
|
37583
|
+
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())));
|
|
37424
37584
|
}
|
|
37425
37585
|
static get formAssociated() { return true; }
|
|
37426
37586
|
get el() { return getElement(this); }
|
|
@@ -37496,6 +37656,7 @@ class Select {
|
|
|
37496
37656
|
"validatorMessage": [32],
|
|
37497
37657
|
"hasFeedbackSlot": [32],
|
|
37498
37658
|
"hasValidationLoadingSlot": [32],
|
|
37659
|
+
"selectedValuesState": [32],
|
|
37499
37660
|
"enable": [64],
|
|
37500
37661
|
"disable": [64],
|
|
37501
37662
|
"show": [64],
|
|
@@ -37646,15 +37807,16 @@ class SelectInput {
|
|
|
37646
37807
|
return (hAsync("br-icon", { "aria-hidden": "true", iconName: this.flipped ? 'fa-solid:angle-up' : 'fa-solid:angle-down', width: "16", height: "16", slot: "action" }));
|
|
37647
37808
|
}
|
|
37648
37809
|
render() {
|
|
37649
|
-
return (hAsync(Host, { key: '
|
|
37810
|
+
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) => {
|
|
37650
37811
|
this.inputElement = el;
|
|
37651
37812
|
}, 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()))));
|
|
37652
37813
|
}
|
|
37814
|
+
static get delegatesFocus() { return true; }
|
|
37653
37815
|
static get formAssociated() { return true; }
|
|
37654
37816
|
get el() { return getElement(this); }
|
|
37655
37817
|
static get style() { return selectInputCss(); }
|
|
37656
37818
|
static get cmpMeta() { return {
|
|
37657
|
-
"$flags$":
|
|
37819
|
+
"$flags$": 89,
|
|
37658
37820
|
"$tagName$": "br-select-input",
|
|
37659
37821
|
"$members$": {
|
|
37660
37822
|
"borderless": [516],
|
|
@@ -37795,6 +37957,8 @@ class SelectList {
|
|
|
37795
37957
|
this.options = this.syncSelectAllOption(this.options);
|
|
37796
37958
|
}
|
|
37797
37959
|
handleOptionStateChange(event) {
|
|
37960
|
+
if (this.isControlledBySelect)
|
|
37961
|
+
return;
|
|
37798
37962
|
const detail = event.detail;
|
|
37799
37963
|
if (!detail?.value)
|
|
37800
37964
|
return;
|
|
@@ -37895,9 +38059,15 @@ class SelectList {
|
|
|
37895
38059
|
*/
|
|
37896
38060
|
async setMultiple(isMultiple) {
|
|
37897
38061
|
this.isMultiple = isMultiple;
|
|
37898
|
-
|
|
38062
|
+
if (!this.isControlledBySelect)
|
|
38063
|
+
this.options = this.normalizeOptionsForMode(this.options, isMultiple);
|
|
37899
38064
|
this.scheduleMeasureItemHeight();
|
|
37900
38065
|
}
|
|
38066
|
+
get isControlledBySelect() {
|
|
38067
|
+
const root = this.el.getRootNode();
|
|
38068
|
+
const host = root.host;
|
|
38069
|
+
return host?.tagName?.toLowerCase() === 'br-select';
|
|
38070
|
+
}
|
|
37901
38071
|
/**
|
|
37902
38072
|
* Retorna uma cópia das opções atualmente controladas pela lista.
|
|
37903
38073
|
*
|
|
@@ -38218,14 +38388,18 @@ class SelectList {
|
|
|
38218
38388
|
renderOption(option, index) {
|
|
38219
38389
|
const rowHeight = this.getRowHeight();
|
|
38220
38390
|
const optionPart = this.isSelectAllOption(option) ? 'option select-all' : 'option';
|
|
38221
|
-
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,
|
|
38391
|
+
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,
|
|
38392
|
+
// A seleção faz parte da identidade visual renderizada. Incluir o estado
|
|
38393
|
+
// na chave evita que uma opção virtual reutilizada retenha o snapshot
|
|
38394
|
+
// interno anterior do br-select-option/br-item.
|
|
38395
|
+
key: `${option.value}:${option.selected ? 'selected' : 'unselected'}`, label: option.label, selected: option.selected, "show-checkbox": this.isMultiple, style: {
|
|
38222
38396
|
boxSizing: 'border-box',
|
|
38223
38397
|
height: `${rowHeight}px`,
|
|
38224
38398
|
position: 'absolute',
|
|
38225
38399
|
top: `${index * rowHeight}px`,
|
|
38226
38400
|
left: '0',
|
|
38227
38401
|
right: '0',
|
|
38228
|
-
}, value: option.value }, option.label ?? option.value));
|
|
38402
|
+
}, value: option.value }, option.content ? hAsync("span", { innerHTML: option.content }) : (option.label ?? option.value)));
|
|
38229
38403
|
}
|
|
38230
38404
|
getVirtualScrollStyle() {
|
|
38231
38405
|
return {
|
|
@@ -38259,7 +38433,7 @@ class SelectList {
|
|
|
38259
38433
|
return (hAsync("div", { part: "loading", role: "status", "aria-live": "polite" }, hAsync("slot", { name: "loading" }, hAsync("br-loading", { size: "small", label: "Buscando op\u00E7\u00F5es" }))));
|
|
38260
38434
|
}
|
|
38261
38435
|
render() {
|
|
38262
|
-
return (hAsync(Host, { key: '
|
|
38436
|
+
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())));
|
|
38263
38437
|
}
|
|
38264
38438
|
get el() { return getElement(this); }
|
|
38265
38439
|
static get watchers() { return {
|
|
@@ -38395,7 +38569,10 @@ class SelectOption {
|
|
|
38395
38569
|
if (this.isRedundantCheckboxReflection(event, current)) {
|
|
38396
38570
|
return;
|
|
38397
38571
|
}
|
|
38398
|
-
this.
|
|
38572
|
+
if (this.isControlledBySelect)
|
|
38573
|
+
this.emitStateChange(current);
|
|
38574
|
+
else
|
|
38575
|
+
this.applySelection(current);
|
|
38399
38576
|
};
|
|
38400
38577
|
}
|
|
38401
38578
|
componentDidLoad() {
|
|
@@ -38433,7 +38610,11 @@ class SelectOption {
|
|
|
38433
38610
|
async setSelectedState(selected) {
|
|
38434
38611
|
if (this.disabled)
|
|
38435
38612
|
return;
|
|
38436
|
-
|
|
38613
|
+
const nextSelected = typeof selected === 'boolean' ? selected : !this.selected;
|
|
38614
|
+
if (this.isControlledBySelect)
|
|
38615
|
+
this.emitStateChange(nextSelected);
|
|
38616
|
+
else
|
|
38617
|
+
this.applySelection(nextSelected);
|
|
38437
38618
|
}
|
|
38438
38619
|
isRedundantCheckboxReflection(event, nextSelected) {
|
|
38439
38620
|
if (!event)
|
|
@@ -38445,11 +38626,11 @@ class SelectOption {
|
|
|
38445
38626
|
return false;
|
|
38446
38627
|
return Boolean(nextSelected) === Boolean(this.selected);
|
|
38447
38628
|
}
|
|
38448
|
-
emitStateChange() {
|
|
38629
|
+
emitStateChange(selected = this.selected) {
|
|
38449
38630
|
const detail = {
|
|
38450
38631
|
disabled: this.disabled,
|
|
38451
38632
|
indeterminate: this.indeterminate,
|
|
38452
|
-
selected
|
|
38633
|
+
selected,
|
|
38453
38634
|
value: this.getResolvedValue(),
|
|
38454
38635
|
label: this.getResolvedLabel(),
|
|
38455
38636
|
};
|
|
@@ -38459,6 +38640,20 @@ class SelectOption {
|
|
|
38459
38640
|
this.lastStateChangeKey = nextKey;
|
|
38460
38641
|
this.brSelectOptionStateChange.emit(detail);
|
|
38461
38642
|
}
|
|
38643
|
+
get isControlledBySelect() {
|
|
38644
|
+
if (this.el.closest('br-select'))
|
|
38645
|
+
return true;
|
|
38646
|
+
let node = this.el;
|
|
38647
|
+
for (;;) {
|
|
38648
|
+
const root = node.getRootNode();
|
|
38649
|
+
const host = root.host;
|
|
38650
|
+
if (!host)
|
|
38651
|
+
return false;
|
|
38652
|
+
if (host.tagName.toLowerCase() === 'br-select')
|
|
38653
|
+
return true;
|
|
38654
|
+
node = host;
|
|
38655
|
+
}
|
|
38656
|
+
}
|
|
38462
38657
|
/**
|
|
38463
38658
|
* Centraliza a transição de seleção para manter emissão e limpeza de estado consistentes.
|
|
38464
38659
|
*
|
|
@@ -38525,7 +38720,7 @@ class SelectOption {
|
|
|
38525
38720
|
return this.normalizeText(this.el.textContent || '');
|
|
38526
38721
|
}
|
|
38527
38722
|
render() {
|
|
38528
|
-
return (hAsync(Host, { key: '
|
|
38723
|
+
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: () => {
|
|
38529
38724
|
this.el.dispatchEvent(new CustomEvent('brInternalSelectOptionHover', {
|
|
38530
38725
|
bubbles: true,
|
|
38531
38726
|
composed: true,
|
|
@@ -38537,7 +38732,7 @@ class SelectOption {
|
|
|
38537
38732
|
composed: true,
|
|
38538
38733
|
detail: { label: this.getResolvedLabel(), value: this.getResolvedValue() },
|
|
38539
38734
|
}));
|
|
38540
|
-
} }, hAsync("br-item", { key: '
|
|
38735
|
+
} }, 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())))));
|
|
38541
38736
|
}
|
|
38542
38737
|
static get formAssociated() { return true; }
|
|
38543
38738
|
get el() { return getElement(this); }
|
|
@@ -38696,12 +38891,13 @@ class SignIn {
|
|
|
38696
38891
|
const TagType = this.getTagType();
|
|
38697
38892
|
const attributes = this.getAttributes();
|
|
38698
38893
|
const classList = this.getCssClassMap();
|
|
38699
|
-
return (hAsync(Host, { key: '
|
|
38894
|
+
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" }))))));
|
|
38700
38895
|
}
|
|
38896
|
+
static get delegatesFocus() { return true; }
|
|
38701
38897
|
get el() { return getElement(this); }
|
|
38702
38898
|
static get style() { return signInCss(); }
|
|
38703
38899
|
static get cmpMeta() { return {
|
|
38704
|
-
"$flags$":
|
|
38900
|
+
"$flags$": 281,
|
|
38705
38901
|
"$tagName$": "br-sign-in",
|
|
38706
38902
|
"$members$": {
|
|
38707
38903
|
"customId": [513, "custom-id"],
|
|
@@ -40023,9 +40219,8 @@ class Slider {
|
|
|
40023
40219
|
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)))));
|
|
40024
40220
|
}
|
|
40025
40221
|
render() {
|
|
40026
|
-
return (hAsync(Host, { key: '
|
|
40222
|
+
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)));
|
|
40027
40223
|
}
|
|
40028
|
-
static get delegatesFocus() { return true; }
|
|
40029
40224
|
static get formAssociated() { return true; }
|
|
40030
40225
|
get el() { return getElement(this); }
|
|
40031
40226
|
static get watchers() { return {
|
|
@@ -40041,7 +40236,7 @@ class Slider {
|
|
|
40041
40236
|
}; }
|
|
40042
40237
|
static get style() { return sliderCss(); }
|
|
40043
40238
|
static get cmpMeta() { return {
|
|
40044
|
-
"$flags$":
|
|
40239
|
+
"$flags$": 329,
|
|
40045
40240
|
"$tagName$": "br-slider",
|
|
40046
40241
|
"$members$": {
|
|
40047
40242
|
"customId": [513, "custom-id"],
|
|
@@ -43641,13 +43836,12 @@ class Tag {
|
|
|
43641
43836
|
}
|
|
43642
43837
|
render() {
|
|
43643
43838
|
const mainContent = this.renderMainTagContent();
|
|
43644
|
-
return (hAsync(Host, { key: '
|
|
43839
|
+
return (hAsync(Host, { key: '91853c64b346742509a16691c73e85a17fd8f45c' }, this.effectiveSelectable
|
|
43645
43840
|
? this.renderInteractionSelectTag()
|
|
43646
43841
|
: this.effectiveStatus
|
|
43647
43842
|
? this.renderStatusLayout(mainContent)
|
|
43648
|
-
: mainContent, hAsync("div", { key: '
|
|
43843
|
+
: 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)));
|
|
43649
43844
|
}
|
|
43650
|
-
static get delegatesFocus() { return true; }
|
|
43651
43845
|
static get formAssociated() { return true; }
|
|
43652
43846
|
get el() { return getElement(this); }
|
|
43653
43847
|
static get watchers() { return {
|
|
@@ -43666,7 +43860,7 @@ class Tag {
|
|
|
43666
43860
|
}; }
|
|
43667
43861
|
static get style() { return tagCss(); }
|
|
43668
43862
|
static get cmpMeta() { return {
|
|
43669
|
-
"$flags$":
|
|
43863
|
+
"$flags$": 329,
|
|
43670
43864
|
"$tagName$": "br-tag",
|
|
43671
43865
|
"$members$": {
|
|
43672
43866
|
"label": [513],
|
|
@@ -45864,16 +46058,15 @@ class Upload {
|
|
|
45864
46058
|
render() {
|
|
45865
46059
|
const hasFiles = (this.filesSelected && this.filesSelected.length > 0) ||
|
|
45866
46060
|
(this.parsedUploadFiles && this.parsedUploadFiles.length > 0);
|
|
45867
|
-
return (hAsync(Host, { key: '
|
|
46061
|
+
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) => {
|
|
45868
46062
|
this.nativeInput = el;
|
|
45869
46063
|
el.addEventListener('input', this.handleNativeInput);
|
|
45870
46064
|
}, 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
|
|
45871
46065
|
? `${this.customId}-feedback`
|
|
45872
46066
|
: null, "aria-errormessage": this.customValidationMessage || this.validatorMessage || this.hasFeedbackSlot
|
|
45873
46067
|
? `${this.customId}-feedback`
|
|
45874
|
-
: null, part: "input" }), hAsync("button", { key: '
|
|
46068
|
+
: 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()));
|
|
45875
46069
|
}
|
|
45876
|
-
static get delegatesFocus() { return true; }
|
|
45877
46070
|
static get formAssociated() { return true; }
|
|
45878
46071
|
get el() { return getElement(this); }
|
|
45879
46072
|
static get watchers() { return {
|
|
@@ -45892,7 +46085,7 @@ class Upload {
|
|
|
45892
46085
|
}; }
|
|
45893
46086
|
static get style() { return uploadCss(); }
|
|
45894
46087
|
static get cmpMeta() { return {
|
|
45895
|
-
"$flags$":
|
|
46088
|
+
"$flags$": 329,
|
|
45896
46089
|
"$tagName$": "br-upload",
|
|
45897
46090
|
"$members$": {
|
|
45898
46091
|
"customId": [513, "custom-id"],
|