@govbr-ds/webcomponents 2.0.0-next.61 → 2.0.0-next.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/br-checkbox.br-input.br-radio.entry.cjs.js.map +1 -1
- package/dist/cjs/br-checkbox_3.cjs.entry.js +17 -28
- package/dist/cjs/br-collapse.br-list.entry.cjs.js.map +1 -1
- package/dist/cjs/br-collapse_2.cjs.entry.js +10 -15
- package/dist/cjs/br-datetime-picker.cjs.entry.js +18 -31
- package/dist/cjs/br-datetime-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/br-dropdown.br-select.entry.cjs.js.map +1 -1
- package/dist/cjs/br-dropdown_2.cjs.entry.js +73 -56
- package/dist/cjs/br-header-list.cjs.entry.js +6 -13
- package/dist/cjs/br-header-list.entry.cjs.js.map +1 -1
- package/dist/cjs/br-header.cjs.entry.js +2 -5
- package/dist/cjs/br-header.entry.cjs.js.map +1 -1
- package/dist/cjs/br-item.cjs.entry.js +3 -6
- package/dist/cjs/br-item.entry.cjs.js.map +1 -1
- package/dist/cjs/br-message.cjs.entry.js +13 -16
- package/dist/cjs/br-message.entry.cjs.js.map +1 -1
- package/dist/cjs/br-modal.cjs.entry.js +123 -24
- package/dist/cjs/br-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/br-scrim.cjs.entry.js +108 -25
- package/dist/cjs/br-scrim.entry.cjs.js.map +1 -1
- package/dist/cjs/br-skip-link.cjs.entry.js +24 -29
- package/dist/cjs/br-skip-link.entry.cjs.js.map +1 -1
- package/dist/cjs/br-skiplink-item.cjs.entry.js +32 -37
- package/dist/cjs/br-skiplink-item.entry.cjs.js.map +1 -1
- package/dist/cjs/br-step.br-step-item.entry.cjs.js.map +1 -1
- package/dist/cjs/br-step_2.cjs.entry.js +33 -56
- package/dist/cjs/br-switch.cjs.entry.js +3 -6
- package/dist/cjs/br-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/br-textarea.cjs.entry.js +5 -8
- package/dist/cjs/br-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/br-tooltip.cjs.entry.js +1 -2
- package/dist/cjs/br-tooltip.entry.cjs.js.map +1 -1
- package/dist/cjs/br-wizard-panel.cjs.entry.js +6 -13
- package/dist/cjs/br-wizard-panel.entry.cjs.js.map +1 -1
- package/dist/cjs/br-wizard.cjs.entry.js +147 -182
- package/dist/cjs/br-wizard.entry.cjs.js.map +1 -1
- package/dist/cjs/{floating-ui-D_WzFT9x.js → floating-ui-CkTJEp-y.js} +11 -15
- package/dist/{esm/floating-ui-DBIzWbO2.js.map → cjs/floating-ui-CkTJEp-y.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +9 -16
- package/dist/collection/components/checkbox/checkbox.js.map +1 -1
- package/dist/collection/components/collapse/collapse.js +10 -15
- package/dist/collection/components/collapse/collapse.js.map +1 -1
- package/dist/collection/components/datetime-picker/datetime-picker.js +18 -31
- package/dist/collection/components/datetime-picker/datetime-picker.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.js +13 -20
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/header/header-list/header-list.js +6 -13
- package/dist/collection/components/header/header-list/header-list.js.map +1 -1
- package/dist/collection/components/header/header.js +2 -5
- package/dist/collection/components/header/header.js.map +1 -1
- package/dist/collection/components/item/item.js +3 -6
- package/dist/collection/components/item/item.js.map +1 -1
- package/dist/collection/components/message/message.js +13 -16
- package/dist/collection/components/message/message.js.map +1 -1
- package/dist/collection/components/modal/modal.js +156 -46
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/radio/radio.js +8 -13
- package/dist/collection/components/radio/radio.js.map +1 -1
- package/dist/collection/components/scrim/scrim.js +108 -25
- package/dist/collection/components/scrim/scrim.js.map +1 -1
- package/dist/collection/components/select/select.js +79 -36
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js +32 -37
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js.map +1 -1
- package/dist/collection/components/skip-link/skip-link.js +24 -29
- package/dist/collection/components/skip-link/skip-link.js.map +1 -1
- package/dist/collection/components/step/step-item/step-item.js +13 -26
- package/dist/collection/components/step/step-item/step-item.js.map +1 -1
- package/dist/collection/components/step/step.js +20 -31
- package/dist/collection/components/step/step.js.map +1 -1
- package/dist/collection/components/switch/switch.js +3 -6
- package/dist/collection/components/switch/switch.js.map +1 -1
- package/dist/collection/components/textarea/textarea.js +5 -8
- package/dist/collection/components/textarea/textarea.js.map +1 -1
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.js +6 -13
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.js.map +1 -1
- package/dist/collection/components/wizard/wizard.js +147 -182
- package/dist/collection/components/wizard/wizard.js.map +1 -1
- package/dist/collection/pages/components/modal/index.js +1 -53
- package/dist/collection/utils/floating-ui.js +9 -12
- package/dist/collection/utils/floating-ui.js.map +1 -1
- package/dist/components/br-breadcrumb.js +3 -3
- package/dist/components/br-checkbox.js +4 -4
- package/dist/components/br-checkgroup.js +1 -1
- package/dist/components/br-collapse.js +4 -4
- package/dist/components/br-datetime-picker.js +1981 -1995
- package/dist/components/br-datetime-picker.js.map +1 -1
- package/dist/components/br-dropdown.js +1 -1
- package/dist/components/br-footer-category.js +3 -3
- package/dist/components/br-footer-item.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 +31 -39
- package/dist/components/br-header-list.js.map +1 -1
- package/dist/components/br-header.js +63 -67
- package/dist/components/br-header.js.map +1 -1
- package/dist/components/br-item.js +1 -1
- package/dist/components/br-list.js +3 -3
- package/dist/components/br-message.js +28 -32
- package/dist/components/br-message.js.map +1 -1
- package/dist/components/br-modal.js +140 -49
- package/dist/components/br-modal.js.map +1 -1
- package/dist/components/br-pagination.js +7 -7
- package/dist/components/br-radio.js +1 -1
- package/dist/components/br-scrim.js +112 -43
- package/dist/components/br-scrim.js.map +1 -1
- package/dist/components/br-select.js +3 -3
- package/dist/components/br-skip-link.js +38 -44
- package/dist/components/br-skip-link.js.map +1 -1
- package/dist/components/br-skiplink-item.js +55 -61
- package/dist/components/br-skiplink-item.js.map +1 -1
- package/dist/components/br-step-item.js +4 -4
- package/dist/components/br-step.js +4 -4
- package/dist/components/br-switch.js +12 -16
- package/dist/components/br-switch.js.map +1 -1
- package/dist/components/br-textarea.js +14 -18
- package/dist/components/br-textarea.js.map +1 -1
- package/dist/components/br-tooltip.js +1 -1
- package/dist/components/br-wizard-panel.js +13 -21
- package/dist/components/br-wizard-panel.js.map +1 -1
- package/dist/components/br-wizard.js +190 -228
- package/dist/components/br-wizard.js.map +1 -1
- package/dist/components/{p-Cc75U9ZX.js → p-B_YesJM8.js} +26 -34
- package/dist/components/{p-Cc75U9ZX.js.map → p-B_YesJM8.js.map} +1 -1
- package/dist/components/{p-xFn46pdm.js → p-Bc03PTAW.js} +27 -39
- package/dist/components/{p-xFn46pdm.js.map → p-Bc03PTAW.js.map} +1 -1
- package/dist/components/{p-DzKEfDGA.js → p-Bri6ECVa.js} +27 -33
- package/dist/components/{p-DzKEfDGA.js.map → p-Bri6ECVa.js.map} +1 -1
- package/dist/components/{p-BZ8BetvD.js → p-CJSXIVVe.js} +17 -23
- package/dist/components/{p-BZ8BetvD.js.map → p-CJSXIVVe.js.map} +1 -1
- package/dist/components/{p-D9c7NikS.js → p-CWRBs6PD.js} +24 -38
- package/dist/components/{p-D9c7NikS.js.map → p-CWRBs6PD.js.map} +1 -1
- package/dist/components/{p-D0dPo1K5.js → p-CwtLw60M.js} +12 -16
- package/dist/components/{p-D0dPo1K5.js.map → p-CwtLw60M.js.map} +1 -1
- package/dist/components/{p-z1PVVVFI.js → p-DW63EY0U.js} +27 -35
- package/dist/components/{p-z1PVVVFI.js.map → p-DW63EY0U.js.map} +1 -1
- package/dist/components/{p-7kxAU6Gr.js → p-DdjKNpU3.js} +92 -72
- package/dist/components/p-DdjKNpU3.js.map +1 -0
- package/dist/{webcomponents/p-B4au_byv.js → components/p-k0WZfTfL.js} +121 -124
- package/dist/components/{p-B4au_byv.js.map → p-k0WZfTfL.js.map} +1 -1
- package/dist/components/{p-OKkBxn1z.js → p-lIb35q2K.js} +3 -3
- package/dist/custom-elements.json +1613 -430
- package/dist/esm/br-checkbox.br-input.br-radio.entry.js.map +1 -1
- package/dist/esm/br-checkbox_3.entry.js +17 -28
- package/dist/esm/br-collapse.br-list.entry.js.map +1 -1
- package/dist/esm/br-collapse_2.entry.js +10 -15
- package/dist/esm/br-datetime-picker.entry.js +18 -31
- package/dist/esm/br-datetime-picker.entry.js.map +1 -1
- package/dist/esm/br-dropdown.br-select.entry.js.map +1 -1
- package/dist/esm/br-dropdown_2.entry.js +73 -56
- package/dist/esm/br-header-list.entry.js +6 -13
- package/dist/esm/br-header-list.entry.js.map +1 -1
- package/dist/esm/br-header.entry.js +2 -5
- package/dist/esm/br-header.entry.js.map +1 -1
- package/dist/esm/br-item.entry.js +3 -6
- package/dist/esm/br-item.entry.js.map +1 -1
- package/dist/esm/br-message.entry.js +13 -16
- package/dist/esm/br-message.entry.js.map +1 -1
- package/dist/esm/br-modal.entry.js +123 -24
- package/dist/esm/br-modal.entry.js.map +1 -1
- package/dist/esm/br-scrim.entry.js +108 -25
- package/dist/esm/br-scrim.entry.js.map +1 -1
- package/dist/esm/br-skip-link.entry.js +24 -29
- package/dist/esm/br-skip-link.entry.js.map +1 -1
- package/dist/esm/br-skiplink-item.entry.js +32 -37
- package/dist/esm/br-skiplink-item.entry.js.map +1 -1
- package/dist/esm/br-step.br-step-item.entry.js.map +1 -1
- package/dist/esm/br-step_2.entry.js +33 -56
- package/dist/esm/br-switch.entry.js +3 -6
- package/dist/esm/br-switch.entry.js.map +1 -1
- package/dist/esm/br-textarea.entry.js +5 -8
- package/dist/esm/br-textarea.entry.js.map +1 -1
- package/dist/esm/br-tooltip.entry.js +1 -2
- package/dist/esm/br-tooltip.entry.js.map +1 -1
- package/dist/esm/br-wizard-panel.entry.js +6 -13
- package/dist/esm/br-wizard-panel.entry.js.map +1 -1
- package/dist/esm/br-wizard.entry.js +147 -182
- package/dist/esm/br-wizard.entry.js.map +1 -1
- package/dist/esm/{floating-ui-DBIzWbO2.js → floating-ui-k0WZfTfL.js} +11 -15
- package/dist/{cjs/floating-ui-D_WzFT9x.js.map → esm/floating-ui-k0WZfTfL.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/hydrate/index.js +634 -578
- package/dist/hydrate/index.mjs +634 -578
- package/dist/types/components/modal/modal.d.ts +46 -4
- package/dist/types/components/scrim/scrim.d.ts +39 -1
- package/dist/types/components/select/select.d.ts +5 -0
- package/dist/types/components.d.ts +21 -11
- package/dist/webcomponents/br-checkbox.br-input.br-radio.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-collapse.br-list.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-datetime-picker.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-dropdown.br-select.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-header-list.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-header.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-item.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-message.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-modal.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-scrim.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-skip-link.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-skiplink-item.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-step.br-step-item.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-switch.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-textarea.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-tooltip.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-wizard-panel.entry.esm.js.map +1 -1
- package/dist/webcomponents/br-wizard.entry.esm.js.map +1 -1
- package/dist/webcomponents/{p-2fe329d6.entry.js → p-10e25a32.entry.js} +28 -34
- package/dist/webcomponents/p-10e25a32.entry.js.map +1 -0
- package/dist/webcomponents/{p-097912c2.entry.js → p-1991135d.entry.js} +30 -36
- package/dist/webcomponents/p-1991135d.entry.js.map +1 -0
- package/dist/webcomponents/{p-61e5421b.entry.js → p-27eb10f9.entry.js} +57 -61
- package/dist/webcomponents/p-27eb10f9.entry.js.map +1 -0
- package/dist/webcomponents/{p-5070161f.entry.js → p-30af66b3.entry.js} +45 -51
- package/dist/webcomponents/p-30af66b3.entry.js.map +1 -0
- package/dist/webcomponents/{p-9464b692.entry.js → p-336071a5.entry.js} +2 -4
- package/dist/webcomponents/p-336071a5.entry.js.map +1 -0
- package/dist/webcomponents/{p-8a034433.entry.js → p-462c5647.entry.js} +20 -24
- package/dist/webcomponents/p-462c5647.entry.js.map +1 -0
- package/dist/webcomponents/{p-d674cee3.entry.js → p-46dfc3ee.entry.js} +12 -16
- package/dist/webcomponents/p-46dfc3ee.entry.js.map +1 -0
- package/dist/webcomponents/{p-821b896c.entry.js → p-56aabe89.entry.js} +36 -44
- package/dist/webcomponents/p-56aabe89.entry.js.map +1 -0
- package/dist/webcomponents/{p-a615baaa.entry.js → p-5710a3e9.entry.js} +41 -65
- package/dist/webcomponents/p-5710a3e9.entry.js.map +1 -0
- package/dist/webcomponents/{p-1799a082.entry.js → p-6a9d2a0b.entry.js} +1996 -2010
- package/dist/webcomponents/p-6a9d2a0b.entry.js.map +1 -0
- package/dist/webcomponents/{p-8ad1f003.entry.js → p-83001853.entry.js} +175 -213
- package/dist/webcomponents/p-83001853.entry.js.map +1 -0
- package/dist/webcomponents/{p-28dba962.entry.js → p-90401ecd.entry.js} +124 -34
- package/dist/webcomponents/p-90401ecd.entry.js.map +1 -0
- package/dist/webcomponents/{p-e7b38c63.entry.js → p-a2eec4fb.entry.js} +112 -43
- package/dist/webcomponents/p-a2eec4fb.entry.js.map +1 -0
- package/dist/webcomponents/{p-d6475852.entry.js → p-c1b0a116.entry.js} +11 -19
- package/dist/webcomponents/p-c1b0a116.entry.js.map +1 -0
- package/dist/webcomponents/{p-c90a089a.entry.js → p-ca2d95f7.entry.js} +96 -83
- package/dist/webcomponents/p-ca2d95f7.entry.js.map +1 -0
- package/dist/webcomponents/{p-7ff6698f.entry.js → p-cfa86a23.entry.js} +10 -14
- package/dist/webcomponents/p-cfa86a23.entry.js.map +1 -0
- package/dist/webcomponents/{p-abc0ecbe.entry.js → p-e5875d3d.entry.js} +10 -14
- package/dist/webcomponents/p-e5875d3d.entry.js.map +1 -0
- package/dist/webcomponents/{p-0bfb0edf.entry.js → p-f2ea0d7e.entry.js} +133 -145
- package/dist/webcomponents/p-f2ea0d7e.entry.js.map +1 -0
- package/dist/{components/p-B4au_byv.js → webcomponents/p-k0WZfTfL.js} +121 -124
- package/dist/webcomponents/{p-B4au_byv.js.map → p-k0WZfTfL.js.map} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/dist/webcomponents.html-custom-data.json +1708 -349
- package/package.json +1 -1
- package/dist/cjs/tslib.es6-CF44W9Bn.js +0 -42
- package/dist/cjs/tslib.es6-CF44W9Bn.js.map +0 -1
- package/dist/components/p-7kxAU6Gr.js.map +0 -1
- package/dist/components/p-DIPMDb5E.js +0 -55
- package/dist/components/p-DIPMDb5E.js.map +0 -1
- package/dist/esm/tslib.es6-DIPMDb5E.js +0 -40
- package/dist/esm/tslib.es6-DIPMDb5E.js.map +0 -1
- package/dist/webcomponents/p-097912c2.entry.js.map +0 -1
- package/dist/webcomponents/p-0bfb0edf.entry.js.map +0 -1
- package/dist/webcomponents/p-1799a082.entry.js.map +0 -1
- package/dist/webcomponents/p-28dba962.entry.js.map +0 -1
- package/dist/webcomponents/p-2fe329d6.entry.js.map +0 -1
- package/dist/webcomponents/p-5070161f.entry.js.map +0 -1
- package/dist/webcomponents/p-61e5421b.entry.js.map +0 -1
- package/dist/webcomponents/p-7ff6698f.entry.js.map +0 -1
- package/dist/webcomponents/p-821b896c.entry.js.map +0 -1
- package/dist/webcomponents/p-8a034433.entry.js.map +0 -1
- package/dist/webcomponents/p-8ad1f003.entry.js.map +0 -1
- package/dist/webcomponents/p-9464b692.entry.js.map +0 -1
- package/dist/webcomponents/p-DIPMDb5E.js +0 -55
- package/dist/webcomponents/p-DIPMDb5E.js.map +0 -1
- package/dist/webcomponents/p-a615baaa.entry.js.map +0 -1
- package/dist/webcomponents/p-abc0ecbe.entry.js.map +0 -1
- package/dist/webcomponents/p-c90a089a.entry.js.map +0 -1
- package/dist/webcomponents/p-d6475852.entry.js.map +0 -1
- package/dist/webcomponents/p-d674cee3.entry.js.map +0 -1
- package/dist/webcomponents/p-e7b38c63.entry.js.map +0 -1
- /package/dist/components/{p-OKkBxn1z.js.map → p-lIb35q2K.js.map} +0 -0
package/dist/hydrate/index.mjs
CHANGED
|
@@ -4122,38 +4122,6 @@ class Button {
|
|
|
4122
4122
|
}; }
|
|
4123
4123
|
}
|
|
4124
4124
|
|
|
4125
|
-
/******************************************************************************
|
|
4126
|
-
Copyright (c) Microsoft Corporation.
|
|
4127
|
-
|
|
4128
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
4129
|
-
purpose with or without fee is hereby granted.
|
|
4130
|
-
|
|
4131
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
4132
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
4133
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
4134
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
4135
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
4136
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
4137
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
4138
|
-
***************************************************************************** */
|
|
4139
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
4143
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4144
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4145
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
4146
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
4147
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
4148
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4149
|
-
});
|
|
4150
|
-
}
|
|
4151
|
-
|
|
4152
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
4153
|
-
var e = new Error(message);
|
|
4154
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
4155
|
-
};
|
|
4156
|
-
|
|
4157
4125
|
const checkboxCss = "*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}:host{line-height:var(--font-line-height-medium);-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}body{margin:0}main{display:block}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}a{background-color:rgba(0,0,0,0)}b,strong{font-weight:bolder}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]{-webkit-appearance:button;-moz-appearance:button;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}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.d-none{display:none !important}.d-flex{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important}@media (min-width: 576px){.d-sm-block{display:block !important}.d-sm-flex{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important}}.justify-content-start{-webkit-box-pack:start !important;-ms-flex-pack:start !important;justify-content:flex-start !important}.justify-content-end{-webkit-box-pack:end !important;-ms-flex-pack:end !important;justify-content:flex-end !important}.justify-content-center{-webkit-box-pack:center !important;-ms-flex-pack:center !important;justify-content:center !important}.align-items-center{-webkit-box-align:center !important;-ms-flex-align:center !important;align-items:center !important}.col,[class*=col-]{padding-left:calc(var(--grid-gutter)*.5);padding-right:calc(var(--grid-gutter)*.5);width:100%}.col{-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%;min-width:8.3333333333%}.col-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto}.col-2{-ms-flex-preferred-size:16.6666666667%;flex-basis:16.6666666667%;max-width:16.6666666667%}.container,.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:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;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{--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))}.col-sm-4{-ms-flex-preferred-size:33.3333333333%;flex-basis:33.3333333333%;max-width:33.3333333333%}}@media (min-width: 992px){.container,.container-lg{--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{--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))}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}}@media (min-width: 1600px){.container,.container-lg{--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))}}.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}.mr-n2{margin-right:calc(var(--spacing-scale-base)*-1) !important}.ml-2{margin-left:var(--spacing-scale-base) !important}.mx-3{margin-left:var(--spacing-scale-2x) !important;margin-right:var(--spacing-scale-2x) !important}.mr-auto{margin-right:auto !important}.ml-auto{margin-left:auto !important}.pt-half{padding-top:var(--spacing-scale-half) !important}.py-3{padding-bottom:var(--spacing-scale-2x) !important;padding-top:var(--spacing-scale-2x) !important}.py-4{padding-bottom:var(--spacing-scale-3x) !important;padding-top:var(--spacing-scale-3x) !important}@media (min-width: 576px){.ml-sm-0{margin-left:var(--spacing-scale-default) !important}}body{--bg-color:var(--background);--bg-color-rgb:var(--background-rgb);--bg-color-hsl:var(--background-hsl);--font-size:var(--font-size-scale-base);--font-weight:var(--font-weight-regular);--link-color:var(--interactive);--link-color-rgb:var(--interactive-rgb);--link-color-hsl:var(--interactive-hsl);--line-height:var(--font-line-height-medium);--text-color:var(--color);--text-color-rgb:var(--color-rgb);--text-color-hsl:var(--color-hsl);background:var(--bg-color);color:var(--text-color);font-family:var(--font-family-base);font-size:var(--font-size);font-weight:var(--font-weight);line-height:var(--line-height)}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{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:-webkit-gradient(linear, left top, left bottom, from(rgba(var(--interactive-rgb), var(--hover))), to(rgba(var(--interactive-rgb), var(--hover))));background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}a:not(:disabled):active{background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(var(--interactive-rgb), var(--pressed))), to(rgba(var(--interactive-rgb), var(--pressed))));background-image:linear-gradient(rgba(var(--interactive-rgb), var(--pressed)), rgba(var(--interactive-rgb), var(--pressed)))}a{color:var(--interactive);text-decoration:none}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%}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)}::-webkit-input-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}::-moz-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}::-ms-input-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}::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)}.text-pure-0{color:var(--pure-0) !important}.bg-interactive{--background:var(--interactive);background:var(--interactive) !important}.text-primary-default{color:var(--color-primary-default) !important}.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-medium{font-weight:500 !important}.text-bold{font-weight:700 !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}}.ease{-webkit-animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1);animation-timing-function:cubic-bezier(0.25, 0.1, 0.25, 1)}.ease-in-out{-webkit-animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1);animation-timing-function:cubic-bezier(0.42, 0, 0.58, 1)}.fab{--icon-size:var(--icon-size-base);display:inline-block;font-size:var(--icon-size);text-align:center;width:calc(var(--icon-size) + 8px)}.highlight{background:var(--status-highlight-background) -webkit-gradient(linear, left top, left bottom, from(var(--status-highlight-overlay)), to(var(--status-highlight-overlay)));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}[data-toggle=dropdown]+*{position:absolute}.dropdown{position:relative}.dropdown [data-toggle=dropdown]+*{-webkit-box-shadow:var(--surface-shadow-sm);box-shadow:var(--surface-shadow-sm);left:0;position:absolute;top:100%}.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)}*[data-toggle=collapse]:not(:disabled):hover{background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(var(--interactive-rgb), var(--hover))), to(rgba(var(--interactive-rgb), var(--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{outline-color:var(--focus);outline-offset:var(--focus-offset);outline-style:var(--focus-style);outline-width:var(--focus-width)}.br-checkbox{--checkbox-padding:var(--spacing-scale-base);--checkbox-size:24px;display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.br-checkbox+.br-checkbox{margin-top:var(--spacing-scale-base)}.br-checkbox input{margin:0;opacity:0;position:absolute}.br-checkbox input+label{cursor:pointer;display:inline-block;margin-bottom:0;min-height:var(--checkbox-size);min-width:var(--checkbox-size);padding-left:calc(var(--spacing-scale-base) + var(--checkbox-size));position:relative}.br-checkbox input+label::before{background:var(--background-light);border:1px solid var(--border-color);border-radius:4px;content:\"\";height:var(--checkbox-size);left:0;position:absolute;width:var(--checkbox-size)}.br-checkbox input+label:empty{padding:0}.br-checkbox label{font-weight:var(--font-weight-medium)}.br-checkbox.hidden-label label{padding-left:calc(var(--checkbox-size) + var(--surface-width-md)*2);text-indent:-10000px;white-space:nowrap;width:0}.br-checkbox input:checked+label::after,.br-checkbox input:indeterminate+label::after{border:solid var(--selected);border-width:0 3px 3px 0;content:\"\";height:var(--icon-size-sm);left:8px;position:absolute;top:4px;-webkit-transform:rotate(45deg);transform:rotate(45deg);width:8px}.br-checkbox input[indeterminate]+label::before,.br-checkbox input:indeterminate+label::before{--interactive-rgb:var(--color-rgb);background:var(--selected);border-color:var(--selected)}.br-checkbox input[indeterminate]:hover:not(:disabled)+label::before,.br-checkbox input:indeterminate:hover:not(:disabled)+label::before{--interactive-rgb:var(--color-dark-rgb)}.br-checkbox input[indeterminate]:checked+label::after,.br-checkbox input[indeterminate]+label::after,.br-checkbox input:indeterminate:checked+label::after,.br-checkbox input:indeterminate+label::after{border-color:var(--background-light);border-width:0 0 3px;top:2px;-webkit-transform:none;transform:none}.br-checkbox.invalid input+label::before,.br-checkbox[invalid] input+label::before{--border-color:var(--danger)}.br-checkbox.invalid input:focus-visible:checked+label::before,.br-checkbox.invalid input:focus-visible+label::before,.br-checkbox[invalid] input:focus-visible:checked+label::before,.br-checkbox[invalid] input:focus-visible+label::before{--border-color:var(--focus-color)}.br-checkbox.invalid input:checked+label::before,.br-checkbox[invalid] input:checked+label::before{--border-color:var(--danger)}.br-checkbox.valid input+label::before,.br-checkbox[valid] input+label::before{--border-color:var(--success)}.br-checkbox.valid input:focus-visible:checked+label::before,.br-checkbox.valid input:focus-visible+label::before,.br-checkbox[valid] input:focus-visible:checked+label::before,.br-checkbox[valid] input:focus-visible+label::before{--border-color:var(--focus-color)}.br-checkbox.valid input:checked+label::before,.br-checkbox[valid] input:checked+label::before{--border-color:var(--success)}.br-checkbox.small input+label,.br-checkbox[small] input+label{line-height:var(--spacing-scale-2xh);min-height:var(--spacing-scale-2xh)}.br-checkbox.small input+label::before,.br-checkbox[small] input+label::before{height:var(--spacing-scale-2xh);width:var(--spacing-scale-2xh)}.br-checkbox.small input:checked+label::after,.br-checkbox[small] input:checked+label::after{border-width:0 2px 2px 0;height:var(--icon-size-sm);left:7px;top:4px;width:6px}.br-checkbox.small input[indeterminate]+label::after,.br-checkbox.small input:indeterminate+label::after,.br-checkbox[small] input[indeterminate]+label::after,.br-checkbox[small] input:indeterminate+label::after{border-color:var(--background-light);border-width:0 0 3px;left:7px;top:1px;-webkit-transform:none;transform:none;width:6px}.br-checkbox input:invalid+label::before{--border-color:var(--danger)}.br-checkbox input:focus-visible:checked+label::before,.br-checkbox input:focus-visible+label::before{border-color:var(--focus) !important;-webkit-box-shadow:0 0 0 var(--surface-width-md) var(--focus);box-shadow:0 0 0 var(--surface-width-md) var(--focus);outline:none}.br-checkbox input:hover:not(:disabled)+label::before{--interactive-rgb:var(--interactive-light-rgb);background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(var(--interactive-rgb), var(--hover))), to(rgba(var(--interactive-rgb), var(--hover))));background-image:linear-gradient(rgba(var(--interactive-rgb), var(--hover)), rgba(var(--interactive-rgb), var(--hover)))}.br-checkbox:not(.disabled) input:disabled+label{cursor:not-allowed;opacity:var(--disabled)}.br-checkbox:not(.disabled) input:disabled+label *{pointer-events:none}.br-checkbox.inverted,.br-checkbox.inverted label,.br-checkbox.dark-mode,.br-checkbox.dark-mode label{color:var(--color-dark)}:host{display:inline-block}:host .br-checkbox{--checkbox-padding:var(--spacing-scale-half);--checkbox-size:24px;display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}:host .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;border:0}";
|
|
4158
4126
|
|
|
4159
4127
|
/**
|
|
@@ -4259,30 +4227,24 @@ class Checkbox {
|
|
|
4259
4227
|
* Define o estado indeterminado do checkbox.
|
|
4260
4228
|
* @param value Novo valor para o estado indeterminado.
|
|
4261
4229
|
*/
|
|
4262
|
-
setIndeterminate(value) {
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
this.indeterminateChange.emit(this.indeterminate);
|
|
4267
|
-
});
|
|
4230
|
+
async setIndeterminate(value) {
|
|
4231
|
+
this.indeterminate = value;
|
|
4232
|
+
this.updateIndeterminate(value);
|
|
4233
|
+
this.indeterminateChange.emit(this.indeterminate);
|
|
4268
4234
|
}
|
|
4269
4235
|
/**
|
|
4270
4236
|
* Inverte o valor da prop `checked`
|
|
4271
4237
|
*/
|
|
4272
|
-
toggleChecked() {
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
this.checkedChange.emit(this.checked);
|
|
4276
|
-
});
|
|
4238
|
+
async toggleChecked() {
|
|
4239
|
+
this.checked = !this.checked;
|
|
4240
|
+
this.checkedChange.emit(this.checked);
|
|
4277
4241
|
}
|
|
4278
4242
|
/**
|
|
4279
4243
|
* Define o número de checkboxes filhos em um grupo de checkboxes.
|
|
4280
4244
|
* @param value Número de checkboxes filhos.
|
|
4281
4245
|
*/
|
|
4282
|
-
setNumberOfChildren(value) {
|
|
4283
|
-
|
|
4284
|
-
this.numberOfChildren = value;
|
|
4285
|
-
});
|
|
4246
|
+
async setNumberOfChildren(value) {
|
|
4247
|
+
this.numberOfChildren = value;
|
|
4286
4248
|
}
|
|
4287
4249
|
render() {
|
|
4288
4250
|
return (hAsync(Host, { key: '9b59d349f3bc58cf43e668035d8c9d4778e74cdc' }, hAsync("div", { key: '58cd8b77fc77dcad639a79e8284d521d2f0bd940', class: this.getCssClassMap() }, hAsync("input", { key: '155fa67ad05467008162c1fe1fd429afe8291a1d', type: "checkbox", id: this.customId, name: this.name, checked: this.checked, disabled: this.disabled, value: this.value, onChange: this.handleCheckedChange, ref: (el) => el && (el.indeterminate = this.indeterminate), "aria-checked": this.getAriaCheckedValue(), "aria-describedby": this.numberOfChildren > 0 ? 'children-number' : null }), hAsync("label", { key: 'ca122a41698c6123d2726400f6e521f0053821d0', htmlFor: this.customId, class: this.hasHiddenLabel ? 'visually-hidden' : undefined }, this.slotDefault ? hAsync("slot", null) : this.label)), this.isFather ? (hAsync("span", { id: "children-number", class: "sr-only" }, "N\u00FAmero de op\u00E7\u00F5es: ", this.numberOfChildren)) : null));
|
|
@@ -4569,24 +4531,20 @@ class Collapse {
|
|
|
4569
4531
|
/**
|
|
4570
4532
|
* Abre o collapse programaticamente.
|
|
4571
4533
|
*/
|
|
4572
|
-
openCollapse() {
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
this.brDidOpen.emit({ id: this.customId, accordionGroup: this.accordionGroup });
|
|
4579
|
-
});
|
|
4534
|
+
async openCollapse() {
|
|
4535
|
+
this.open = true;
|
|
4536
|
+
this.syncDetailsWithOpen();
|
|
4537
|
+
// Fecha outros do mesmo grupo antes de emitir evento
|
|
4538
|
+
this.closeOthersInGroup();
|
|
4539
|
+
this.brDidOpen.emit({ id: this.customId, accordionGroup: this.accordionGroup });
|
|
4580
4540
|
}
|
|
4581
4541
|
/**
|
|
4582
4542
|
* Fecha o collapse programaticamente.
|
|
4583
4543
|
*/
|
|
4584
|
-
closeCollapse() {
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
this.brDidClose.emit({ id: this.customId, accordionGroup: this.accordionGroup });
|
|
4589
|
-
});
|
|
4544
|
+
async closeCollapse() {
|
|
4545
|
+
this.open = false;
|
|
4546
|
+
this.syncDetailsWithOpen();
|
|
4547
|
+
this.brDidClose.emit({ id: this.customId, accordionGroup: this.accordionGroup });
|
|
4590
4548
|
}
|
|
4591
4549
|
/**
|
|
4592
4550
|
* Fecha outros collapses abertos no mesmo accordion, buscando apenas no pai imediato.
|
|
@@ -27161,57 +27119,45 @@ class DatetimePicker {
|
|
|
27161
27119
|
/**
|
|
27162
27120
|
* Fecha o dropdown do calendário.
|
|
27163
27121
|
*/
|
|
27164
|
-
close() {
|
|
27165
|
-
|
|
27166
|
-
this.isOpen = false;
|
|
27167
|
-
});
|
|
27122
|
+
async close() {
|
|
27123
|
+
this.isOpen = false;
|
|
27168
27124
|
}
|
|
27169
27125
|
/**
|
|
27170
27126
|
* Retorna a data atualmente selecionada no datetime-picker.
|
|
27171
27127
|
*/
|
|
27172
|
-
getValue() {
|
|
27173
|
-
return
|
|
27174
|
-
return this.currentSelectedDate;
|
|
27175
|
-
});
|
|
27128
|
+
async getValue() {
|
|
27129
|
+
return this.currentSelectedDate;
|
|
27176
27130
|
}
|
|
27177
27131
|
/**
|
|
27178
27132
|
* Abre o dropdown do calendário.
|
|
27179
27133
|
*/
|
|
27180
|
-
open() {
|
|
27181
|
-
|
|
27182
|
-
this.isOpen = true;
|
|
27183
|
-
});
|
|
27134
|
+
async open() {
|
|
27135
|
+
this.isOpen = true;
|
|
27184
27136
|
}
|
|
27185
27137
|
/**
|
|
27186
27138
|
* Reseta o estado interno do componente para os valores iniciais.
|
|
27187
27139
|
*/
|
|
27188
|
-
reset() {
|
|
27189
|
-
|
|
27190
|
-
this.resetInternal();
|
|
27191
|
-
});
|
|
27140
|
+
async reset() {
|
|
27141
|
+
this.resetInternal();
|
|
27192
27142
|
}
|
|
27193
27143
|
/**
|
|
27194
27144
|
* Define a data selecionada no datetime-picker.
|
|
27195
27145
|
* @param value Data a ser definida ou null para resetar o valor
|
|
27196
27146
|
*/
|
|
27197
|
-
setValue(value) {
|
|
27198
|
-
|
|
27199
|
-
|
|
27200
|
-
|
|
27201
|
-
|
|
27202
|
-
|
|
27203
|
-
|
|
27204
|
-
|
|
27205
|
-
this.currentSelectedDate = date;
|
|
27206
|
-
});
|
|
27147
|
+
async setValue(value) {
|
|
27148
|
+
if (value === null) {
|
|
27149
|
+
this.resetInternal();
|
|
27150
|
+
return;
|
|
27151
|
+
}
|
|
27152
|
+
const date = new Date(value);
|
|
27153
|
+
this.currentBaseDate = date;
|
|
27154
|
+
this.currentSelectedDate = date;
|
|
27207
27155
|
}
|
|
27208
27156
|
/**
|
|
27209
27157
|
* Alterna o estado do dropdown do calendário entre aberto e fechado.
|
|
27210
27158
|
*/
|
|
27211
|
-
toggle() {
|
|
27212
|
-
|
|
27213
|
-
this.isOpen = !this.isOpen;
|
|
27214
|
-
});
|
|
27159
|
+
async toggle() {
|
|
27160
|
+
this.isOpen = !this.isOpen;
|
|
27215
27161
|
}
|
|
27216
27162
|
/**
|
|
27217
27163
|
* Manipulador de reset do formulário.
|
|
@@ -29778,18 +29724,16 @@ class FloatingUIManager {
|
|
|
29778
29724
|
* Além disso, define o atributo de dados `data-placement` no elemento de conteúdo para refletir a posição atual.
|
|
29779
29725
|
* @returns {Promise<void>} Uma promessa que resolve quando a posição é atualizada.
|
|
29780
29726
|
*/
|
|
29781
|
-
updatePosition() {
|
|
29782
|
-
|
|
29783
|
-
|
|
29784
|
-
|
|
29785
|
-
|
|
29786
|
-
middleware: this.buildMiddleware(),
|
|
29787
|
-
});
|
|
29788
|
-
this.updateTooltipPosition(data);
|
|
29789
|
-
this.updateArrowPosition(data);
|
|
29790
|
-
this.setPlacementDataAttribute(data);
|
|
29791
|
-
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.call(this, data);
|
|
29727
|
+
async updatePosition() {
|
|
29728
|
+
var _a;
|
|
29729
|
+
const data = await computePosition(this.triggerElement, this.contentElement, {
|
|
29730
|
+
placement: this.placement,
|
|
29731
|
+
middleware: this.buildMiddleware(),
|
|
29792
29732
|
});
|
|
29733
|
+
this.updateTooltipPosition(data);
|
|
29734
|
+
this.updateArrowPosition(data);
|
|
29735
|
+
this.setPlacementDataAttribute(data);
|
|
29736
|
+
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.call(this, data);
|
|
29793
29737
|
}
|
|
29794
29738
|
/**
|
|
29795
29739
|
* Constrói os middlewares necessários para o Floating UI.
|
|
@@ -30248,22 +30192,18 @@ class Dropdown {
|
|
|
30248
30192
|
* Define a propriedade `isOpen` como verdadeira e retorna o novo estado.
|
|
30249
30193
|
* Este método pode ser chamado externamente.
|
|
30250
30194
|
*/
|
|
30251
|
-
open() {
|
|
30252
|
-
|
|
30253
|
-
|
|
30254
|
-
return { isOpen: this.isOpen };
|
|
30255
|
-
});
|
|
30195
|
+
async open() {
|
|
30196
|
+
this.isOpen = true;
|
|
30197
|
+
return { isOpen: this.isOpen };
|
|
30256
30198
|
}
|
|
30257
30199
|
/**
|
|
30258
30200
|
* Esconde o dropdown.
|
|
30259
30201
|
* Define a propriedade `isOpen` como falsa e retorna o novo estado.
|
|
30260
30202
|
* Este método pode ser chamado externamente.
|
|
30261
30203
|
*/
|
|
30262
|
-
hide() {
|
|
30263
|
-
|
|
30264
|
-
|
|
30265
|
-
return { isOpen: this.isOpen };
|
|
30266
|
-
});
|
|
30204
|
+
async hide() {
|
|
30205
|
+
this.isOpen = false;
|
|
30206
|
+
return { isOpen: this.isOpen };
|
|
30267
30207
|
}
|
|
30268
30208
|
/**
|
|
30269
30209
|
* Foca em um elemento específico com suporte a componentes personalizados
|
|
@@ -30319,15 +30259,13 @@ class Dropdown {
|
|
|
30319
30259
|
* Define o foco no elemento interno do componente.
|
|
30320
30260
|
* Este método pode ser chamado externamente para garantir que o foco seja aplicado ao elemento correto.
|
|
30321
30261
|
*/
|
|
30322
|
-
setFocus() {
|
|
30323
|
-
|
|
30324
|
-
|
|
30325
|
-
|
|
30326
|
-
|
|
30327
|
-
|
|
30328
|
-
|
|
30329
|
-
}
|
|
30330
|
-
});
|
|
30262
|
+
async setFocus() {
|
|
30263
|
+
if (this.focusableElement !== null && this.focusableElement !== undefined) {
|
|
30264
|
+
this.focusableElement.focus();
|
|
30265
|
+
}
|
|
30266
|
+
else {
|
|
30267
|
+
this.focusOnTriggerElement();
|
|
30268
|
+
}
|
|
30331
30269
|
}
|
|
30332
30270
|
render() {
|
|
30333
30271
|
return (hAsync(Host, { key: 'ace8369063aaebea08e9dda7ceaee5df229a247e', "is-open": this.isOpen, placement: this.placement, "prevent-auto-dismiss": this.preventAutoDismiss }, hAsync("div", { key: '21f85062c8490852b88ef55c948d332678088137', class: this.getCssClassMap(), id: this.customId }, hAsync("div", { key: '58e55ee7fe8445682a08d117f412593640198c84', id: "trigger", onClick: this.toggle, "aria-controls": "target", "aria-haspopup": "true", "aria-expanded": this.isOpen ? 'true' : 'false' }, hAsync("slot", { key: '0f95c368ec27b2eb71eea1ef4a5fdaa0b9587af5', name: "trigger" })), hAsync("div", { key: '2eb72f2596b06376979e9b8ead83b1a07ad8ada8', id: "target", "aria-hidden": this.isOpen ? 'false' : 'true' }, hAsync("slot", { key: 'b231bb498abfa1d98572ae22385eabdfc20d0620', name: "target" })))));
|
|
@@ -31265,10 +31203,8 @@ class Header {
|
|
|
31265
31203
|
* Reinicializa o estado das listas do cabeçalho, disparando o evento de redimensionamento.
|
|
31266
31204
|
* Pode ser chamado externamente para forçar a atualização das listas.
|
|
31267
31205
|
*/
|
|
31268
|
-
resetHeaderList() {
|
|
31269
|
-
|
|
31270
|
-
this.handleListResize();
|
|
31271
|
-
});
|
|
31206
|
+
async resetHeaderList() {
|
|
31207
|
+
this.handleListResize();
|
|
31272
31208
|
}
|
|
31273
31209
|
/**
|
|
31274
31210
|
* Manipula as mudanças de breakpoint.
|
|
@@ -31884,27 +31820,21 @@ class HeaderList {
|
|
|
31884
31820
|
/**
|
|
31885
31821
|
* Fecha a lista.
|
|
31886
31822
|
*/
|
|
31887
|
-
closeList() {
|
|
31888
|
-
|
|
31889
|
-
this.showList = false;
|
|
31890
|
-
});
|
|
31823
|
+
async closeList() {
|
|
31824
|
+
this.showList = false;
|
|
31891
31825
|
}
|
|
31892
31826
|
/**
|
|
31893
31827
|
* Verifica se a lista está aberta.
|
|
31894
31828
|
* @returns Um booleano indicando se a lista está aberta.
|
|
31895
31829
|
*/
|
|
31896
|
-
isListOpen() {
|
|
31897
|
-
return
|
|
31898
|
-
return this.showList;
|
|
31899
|
-
});
|
|
31830
|
+
async isListOpen() {
|
|
31831
|
+
return this.showList;
|
|
31900
31832
|
}
|
|
31901
31833
|
/**
|
|
31902
31834
|
* Abre a lista.
|
|
31903
31835
|
*/
|
|
31904
|
-
openList() {
|
|
31905
|
-
|
|
31906
|
-
this.showList = true;
|
|
31907
|
-
});
|
|
31836
|
+
async openList() {
|
|
31837
|
+
this.showList = true;
|
|
31908
31838
|
}
|
|
31909
31839
|
/**
|
|
31910
31840
|
* Adiciona os listeners ao botão de disparo.
|
|
@@ -35140,11 +35070,9 @@ class Item {
|
|
|
35140
35070
|
* Define o foco no elemento interno do componente.
|
|
35141
35071
|
* Este método pode ser chamado externamente para garantir que o foco seja aplicado ao elemento correto.
|
|
35142
35072
|
*/
|
|
35143
|
-
setFocus() {
|
|
35144
|
-
|
|
35145
|
-
|
|
35146
|
-
(_a = this.focusableElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
35147
|
-
});
|
|
35073
|
+
async setFocus() {
|
|
35074
|
+
var _a;
|
|
35075
|
+
(_a = this.focusableElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
35148
35076
|
}
|
|
35149
35077
|
render() {
|
|
35150
35078
|
const TagType = this.getTagType();
|
|
@@ -36919,22 +36847,20 @@ class Message {
|
|
|
36919
36847
|
}
|
|
36920
36848
|
};
|
|
36921
36849
|
}
|
|
36922
|
-
componentDidLoad() {
|
|
36923
|
-
|
|
36924
|
-
|
|
36925
|
-
|
|
36926
|
-
|
|
36927
|
-
|
|
36928
|
-
|
|
36929
|
-
|
|
36930
|
-
|
|
36931
|
-
button === null || button === void 0 ? void 0 : button.focus();
|
|
36932
|
-
}
|
|
36933
|
-
}
|
|
36934
|
-
if (this.isClosable && this.autoRemove) {
|
|
36935
|
-
this.el.addEventListener('keydown', this.handleKeyDown);
|
|
36850
|
+
async componentDidLoad() {
|
|
36851
|
+
var _a, _b;
|
|
36852
|
+
if (this.isClosable && !this.isFeedback) {
|
|
36853
|
+
this.previousFocus = document.activeElement;
|
|
36854
|
+
await new Promise((resolve) => setTimeout(resolve, 150));
|
|
36855
|
+
const closeButton = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('br-button');
|
|
36856
|
+
if (closeButton != null) {
|
|
36857
|
+
const button = (_b = closeButton.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('button');
|
|
36858
|
+
button === null || button === void 0 ? void 0 : button.focus();
|
|
36936
36859
|
}
|
|
36937
|
-
}
|
|
36860
|
+
}
|
|
36861
|
+
if (this.isClosable && this.autoRemove) {
|
|
36862
|
+
this.el.addEventListener('keydown', this.handleKeyDown);
|
|
36863
|
+
}
|
|
36938
36864
|
}
|
|
36939
36865
|
disconnectedCallback() {
|
|
36940
36866
|
if (this.isClosable && !this.autoRemove) {
|
|
@@ -37012,7 +36938,9 @@ const modalCss = "*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:
|
|
|
37012
36938
|
class Modal {
|
|
37013
36939
|
constructor(hostRef) {
|
|
37014
36940
|
registerInstance(this, hostRef);
|
|
36941
|
+
this.brModalOpen = createEvent(this, "brModalOpen", 7);
|
|
37015
36942
|
this.brModalClose = createEvent(this, "brModalClose", 7);
|
|
36943
|
+
this.brModalBeforeClose = createEvent(this, "brModalBeforeClose", 7);
|
|
37016
36944
|
if (hostRef.$hostElement$["s-ei"]) {
|
|
37017
36945
|
this.elementInternals = hostRef.$hostElement$["s-ei"];
|
|
37018
36946
|
}
|
|
@@ -37027,32 +36955,132 @@ class Modal {
|
|
|
37027
36955
|
this.customId = Helpers.generateUniqueId('modal');
|
|
37028
36956
|
/** Controla a visibilidade do modal. */
|
|
37029
36957
|
this.show = false;
|
|
37030
|
-
/**
|
|
36958
|
+
/**
|
|
36959
|
+
* Define o comportamento de fechamento do modal.
|
|
36960
|
+
*
|
|
36961
|
+
* - `true`: O modal fecha automaticamente ao clicar no botão fechar.
|
|
36962
|
+
* - `false`: O modal emite `brModalBeforeClose` mas não fecha, permitindo a implementação de lógica customizada (validação, confirmação, etc.) antes do fechamento. O desenvolvedor deve
|
|
36963
|
+
* controlar manualmente o fechamento.
|
|
36964
|
+
*/
|
|
37031
36965
|
this.autoClose = false;
|
|
37032
36966
|
/**
|
|
37033
36967
|
* Define o tamanho (largura) do modal.
|
|
37034
36968
|
*/
|
|
37035
36969
|
this.size = 'medium';
|
|
37036
|
-
/** Se `true`, exibe um fundo escurecido (scrim) atrás do modal. */
|
|
37037
|
-
this.scrim = false;
|
|
37038
36970
|
/** Se `true`, habilita a rolagem interna do conteúdo do modal. */
|
|
37039
36971
|
this.scrollable = false;
|
|
37040
36972
|
/**
|
|
37041
36973
|
* Define o alinhamento do conteúdo do rodapé (slot="footer").
|
|
37042
36974
|
*/
|
|
37043
36975
|
this.alignFooter = 'center';
|
|
36976
|
+
this.isOpeningParentScrim = false;
|
|
36977
|
+
/**
|
|
36978
|
+
* Handler para evento brScrimOpen do parent scrim
|
|
36979
|
+
* Quando scrim abre programaticamente, a modal deve abrir também
|
|
36980
|
+
*/
|
|
36981
|
+
this.handleParentScrimOpen = () => {
|
|
36982
|
+
const parentScrim = this.el.closest('br-scrim');
|
|
36983
|
+
if (parentScrim === null)
|
|
36984
|
+
return;
|
|
36985
|
+
if (!this.show) {
|
|
36986
|
+
this.show = true;
|
|
36987
|
+
}
|
|
36988
|
+
};
|
|
36989
|
+
/**
|
|
36990
|
+
* Handler para evento brScrimClose do parent scrim
|
|
36991
|
+
* Se autoClose=true, fecha a modal junto com o scrim
|
|
36992
|
+
* Se autoClose=false, não faz nada (modal permanece aberta)
|
|
36993
|
+
*/
|
|
36994
|
+
this.handleParentScrimClose = () => {
|
|
36995
|
+
const parentScrim = this.el.closest('br-scrim');
|
|
36996
|
+
if (parentScrim === null)
|
|
36997
|
+
return;
|
|
36998
|
+
if (this.autoClose && this.show) {
|
|
36999
|
+
this.show = false;
|
|
37000
|
+
}
|
|
37001
|
+
};
|
|
37044
37002
|
this.handleClose = () => {
|
|
37045
|
-
this.
|
|
37003
|
+
this.brModalBeforeClose.emit();
|
|
37046
37004
|
if (this.autoClose) {
|
|
37047
37005
|
this.show = false;
|
|
37048
|
-
// Se o modal está dentro de um br-scrim, fecha o scrim também
|
|
37049
|
-
const parentScrim = this.el.closest('br-scrim');
|
|
37050
|
-
if (parentScrim) {
|
|
37051
|
-
parentScrim.close();
|
|
37052
|
-
}
|
|
37053
37006
|
}
|
|
37054
37007
|
};
|
|
37055
37008
|
}
|
|
37009
|
+
handleShowChange(newValue, oldValue) {
|
|
37010
|
+
if (newValue) {
|
|
37011
|
+
this.brModalOpen.emit();
|
|
37012
|
+
this.openParentScrim();
|
|
37013
|
+
}
|
|
37014
|
+
else if (oldValue === true) {
|
|
37015
|
+
this.brModalClose.emit();
|
|
37016
|
+
this.closeParentScrim();
|
|
37017
|
+
}
|
|
37018
|
+
}
|
|
37019
|
+
closeParentScrim() {
|
|
37020
|
+
const parentScrim = this.el.closest('br-scrim');
|
|
37021
|
+
if (parentScrim && typeof parentScrim.close === 'function') {
|
|
37022
|
+
parentScrim.close();
|
|
37023
|
+
}
|
|
37024
|
+
}
|
|
37025
|
+
componentWillLoad() {
|
|
37026
|
+
if (!this.show) {
|
|
37027
|
+
const parentScrim = this.el.closest('br-scrim');
|
|
37028
|
+
if (parentScrim !== null && parentScrim.isOpen) {
|
|
37029
|
+
this.show = true;
|
|
37030
|
+
}
|
|
37031
|
+
}
|
|
37032
|
+
}
|
|
37033
|
+
componentDidLoad() {
|
|
37034
|
+
this.listenToParentScrimEvents();
|
|
37035
|
+
if (this.show) {
|
|
37036
|
+
this.openParentScrim();
|
|
37037
|
+
}
|
|
37038
|
+
}
|
|
37039
|
+
disconnectedCallback() {
|
|
37040
|
+
this.isOpeningParentScrim = false;
|
|
37041
|
+
this.removeParentScrimEventListeners();
|
|
37042
|
+
}
|
|
37043
|
+
/**
|
|
37044
|
+
* Adiciona listeners para eventos do parent scrim
|
|
37045
|
+
*/
|
|
37046
|
+
listenToParentScrimEvents() {
|
|
37047
|
+
const parentScrim = this.el.closest('br-scrim');
|
|
37048
|
+
if (parentScrim !== null) {
|
|
37049
|
+
parentScrim.addEventListener('brScrimOpen', this.handleParentScrimOpen);
|
|
37050
|
+
parentScrim.addEventListener('brScrimClose', this.handleParentScrimClose);
|
|
37051
|
+
}
|
|
37052
|
+
}
|
|
37053
|
+
/**
|
|
37054
|
+
* Remove listeners de eventos do parent scrim
|
|
37055
|
+
*/
|
|
37056
|
+
removeParentScrimEventListeners() {
|
|
37057
|
+
const parentScrim = this.el.closest('br-scrim');
|
|
37058
|
+
if (parentScrim !== null) {
|
|
37059
|
+
parentScrim.removeEventListener('brScrimOpen', this.handleParentScrimOpen);
|
|
37060
|
+
parentScrim.removeEventListener('brScrimClose', this.handleParentScrimClose);
|
|
37061
|
+
}
|
|
37062
|
+
}
|
|
37063
|
+
openParentScrim() {
|
|
37064
|
+
if (this.isOpeningParentScrim)
|
|
37065
|
+
return;
|
|
37066
|
+
const parentScrim = this.el.closest('br-scrim');
|
|
37067
|
+
if (parentScrim && !parentScrim.isOpen) {
|
|
37068
|
+
this.isOpeningParentScrim = true;
|
|
37069
|
+
Promise.resolve()
|
|
37070
|
+
.then(() => {
|
|
37071
|
+
try {
|
|
37072
|
+
return parentScrim.open();
|
|
37073
|
+
}
|
|
37074
|
+
catch (error) {
|
|
37075
|
+
console.warn('br-modal: Erro ao abrir scrim pai:', error);
|
|
37076
|
+
throw error;
|
|
37077
|
+
}
|
|
37078
|
+
})
|
|
37079
|
+
.finally(() => {
|
|
37080
|
+
this.isOpeningParentScrim = false;
|
|
37081
|
+
});
|
|
37082
|
+
}
|
|
37083
|
+
}
|
|
37056
37084
|
get titleId() {
|
|
37057
37085
|
return `${this.customId}-title`;
|
|
37058
37086
|
}
|
|
@@ -37069,32 +37097,30 @@ class Modal {
|
|
|
37069
37097
|
/**
|
|
37070
37098
|
* Método público para abrir o modal
|
|
37071
37099
|
*/
|
|
37072
|
-
open() {
|
|
37073
|
-
|
|
37074
|
-
|
|
37075
|
-
});
|
|
37100
|
+
async open() {
|
|
37101
|
+
this.show = true;
|
|
37102
|
+
this.openParentScrim();
|
|
37076
37103
|
}
|
|
37077
37104
|
/**
|
|
37078
37105
|
* Método público para fechar o modal
|
|
37079
37106
|
*/
|
|
37080
|
-
close() {
|
|
37081
|
-
|
|
37082
|
-
|
|
37083
|
-
|
|
37084
|
-
|
|
37085
|
-
if (parentScrim) {
|
|
37086
|
-
parentScrim.close();
|
|
37087
|
-
}
|
|
37088
|
-
});
|
|
37107
|
+
async close() {
|
|
37108
|
+
if (!this.autoClose) {
|
|
37109
|
+
return;
|
|
37110
|
+
}
|
|
37111
|
+
this.show = false;
|
|
37089
37112
|
}
|
|
37090
37113
|
render() {
|
|
37091
37114
|
if (!this.show) {
|
|
37092
37115
|
return null;
|
|
37093
37116
|
}
|
|
37094
|
-
return (hAsync(Host, null, hAsync("div", { class: this.getCssClassMap(), role: "dialog", "aria-modal": "true", "aria-labelledby": this.titleId, "aria-describedby": this.contentId }, hAsync("div", { class: "br-modal-header" }, hAsync("div", { class: "modal-title", id: this.titleId }, hAsync("slot", { name: "header" }, this.titleText)), hAsync("slot", { name: "close-button" }, hAsync("br-button", { class: "close", shape: "circle", density: "small", "aria-label": "Fechar", onClick: this.handleClose }, hAsync("br-icon", { "icon-name": "fa-solid:times" })))), hAsync("div", { id: this.contentId, class: "br-modal-body" }, hAsync("slot", null)), hAsync("div", { class: `br-modal-footer ${this.alignFooter ? `justify-content-${this.alignFooter}` : ''}` }, hAsync("slot", { name: "footer" })))));
|
|
37117
|
+
return (hAsync(Host, null, hAsync("div", { class: this.getCssClassMap(), role: "dialog", "aria-modal": "true", "aria-labelledby": this.titleId, "aria-describedby": this.contentId }, hAsync("div", { class: "br-modal-header" }, hAsync("div", { class: "modal-title", id: this.titleId }, hAsync("slot", { name: "header" }, this.titleText)), hAsync("slot", { name: "close-button" }, hAsync("br-button", { class: "close", shape: "circle", density: "small", "aria-label": "Fechar", onClick: this.handleClose }, hAsync("br-icon", { "icon-name": "fa-solid:times" })))), hAsync("div", { id: this.contentId, class: "br-modal-body" }, hAsync("slot", null)), hAsync("div", { class: `br-modal-footer ${this.alignFooter !== undefined ? `justify-content-${this.alignFooter}` : ''}` }, hAsync("slot", { name: "footer" })))));
|
|
37095
37118
|
}
|
|
37096
37119
|
static get formAssociated() { return true; }
|
|
37097
37120
|
get el() { return getElement(this); }
|
|
37121
|
+
static get watchers() { return {
|
|
37122
|
+
"show": ["handleShowChange"]
|
|
37123
|
+
}; }
|
|
37098
37124
|
static get style() { return modalCss; }
|
|
37099
37125
|
static get cmpMeta() { return {
|
|
37100
37126
|
"$flags$": 329,
|
|
@@ -37106,7 +37132,6 @@ class Modal {
|
|
|
37106
37132
|
"autoClose": [516, "auto-close"],
|
|
37107
37133
|
"initialFocusSelector": [1, "initial-focus-selector"],
|
|
37108
37134
|
"size": [513],
|
|
37109
|
-
"scrim": [516],
|
|
37110
37135
|
"scrollable": [516],
|
|
37111
37136
|
"alignFooter": [513, "align-footer"],
|
|
37112
37137
|
"open": [64],
|
|
@@ -37114,7 +37139,7 @@ class Modal {
|
|
|
37114
37139
|
},
|
|
37115
37140
|
"$listeners$": undefined,
|
|
37116
37141
|
"$lazyBundleId$": "-",
|
|
37117
|
-
"$attrsToReflect$": [["customId", "custom-id"], ["show", "show"], ["autoClose", "auto-close"], ["size", "size"], ["
|
|
37142
|
+
"$attrsToReflect$": [["customId", "custom-id"], ["show", "show"], ["autoClose", "auto-close"], ["size", "size"], ["scrollable", "scrollable"], ["alignFooter", "align-footer"]]
|
|
37118
37143
|
}; }
|
|
37119
37144
|
}
|
|
37120
37145
|
|
|
@@ -37686,19 +37711,15 @@ class Radio {
|
|
|
37686
37711
|
/**
|
|
37687
37712
|
* Inverte o valor da prop `checked`
|
|
37688
37713
|
*/
|
|
37689
|
-
toggleChecked() {
|
|
37690
|
-
|
|
37691
|
-
this.checked = !this.checked;
|
|
37692
|
-
});
|
|
37714
|
+
async toggleChecked() {
|
|
37715
|
+
this.checked = !this.checked;
|
|
37693
37716
|
}
|
|
37694
|
-
setFocus() {
|
|
37695
|
-
|
|
37696
|
-
|
|
37697
|
-
|
|
37698
|
-
|
|
37699
|
-
|
|
37700
|
-
}
|
|
37701
|
-
});
|
|
37717
|
+
async setFocus() {
|
|
37718
|
+
var _a;
|
|
37719
|
+
const input = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('input');
|
|
37720
|
+
if (input) {
|
|
37721
|
+
input.focus();
|
|
37722
|
+
}
|
|
37702
37723
|
}
|
|
37703
37724
|
getCssClassMap() {
|
|
37704
37725
|
return {
|
|
@@ -37844,6 +37865,29 @@ class Scrim {
|
|
|
37844
37865
|
this.previouslyFocusedElement = null;
|
|
37845
37866
|
this.focusTimeoutId = null;
|
|
37846
37867
|
this.restoreFocusTimeoutId = null;
|
|
37868
|
+
// ======================================================================
|
|
37869
|
+
// GERENCIAMENTO DE COMPONENTES FILHOS
|
|
37870
|
+
// ======================================================================
|
|
37871
|
+
/**
|
|
37872
|
+
* Handler para evento brModalOpen emitido por modal filha
|
|
37873
|
+
*/
|
|
37874
|
+
this.handleModalOpen = (event) => {
|
|
37875
|
+
const modalElement = event.target;
|
|
37876
|
+
if (!this.isDirectChild(modalElement))
|
|
37877
|
+
return;
|
|
37878
|
+
if (!this.isOpen) {
|
|
37879
|
+
this.open();
|
|
37880
|
+
}
|
|
37881
|
+
};
|
|
37882
|
+
/**
|
|
37883
|
+
* Handler para evento brModalClose emitido por modal filha
|
|
37884
|
+
*/
|
|
37885
|
+
this.handleModalClose = (event) => {
|
|
37886
|
+
const modalElement = event.target;
|
|
37887
|
+
if (!this.isDirectChild(modalElement))
|
|
37888
|
+
return;
|
|
37889
|
+
this.close();
|
|
37890
|
+
};
|
|
37847
37891
|
this.handleActivatorClick = () => {
|
|
37848
37892
|
this.toggle();
|
|
37849
37893
|
};
|
|
@@ -37861,6 +37905,10 @@ class Scrim {
|
|
|
37861
37905
|
const reference = (_a = this.scrollOrigin) !== null && _a !== void 0 ? _a : this.lastScrollTop;
|
|
37862
37906
|
if (Math.abs(currentScroll - reference) > this.scrollThreshold) {
|
|
37863
37907
|
this.scrollOrigin = null;
|
|
37908
|
+
// Não fecha se tiver modal filha com autoClose=false ou não definido
|
|
37909
|
+
if (this.hasModalWithAutoClose()) {
|
|
37910
|
+
return;
|
|
37911
|
+
}
|
|
37864
37912
|
this.isOpen = false;
|
|
37865
37913
|
this.handleOpenChange(false);
|
|
37866
37914
|
return;
|
|
@@ -37896,7 +37944,9 @@ class Scrim {
|
|
|
37896
37944
|
}
|
|
37897
37945
|
if (event.key === 'Escape' && !this.disableCloseOnClick) {
|
|
37898
37946
|
event.preventDefault();
|
|
37899
|
-
this.
|
|
37947
|
+
if (!this.hasModalWithAutoClose()) {
|
|
37948
|
+
this.isOpen = false;
|
|
37949
|
+
}
|
|
37900
37950
|
}
|
|
37901
37951
|
};
|
|
37902
37952
|
// Intercepta TODOS os eventos de clique globalmente quando scrim está ativo
|
|
@@ -37930,11 +37980,15 @@ class Scrim {
|
|
|
37930
37980
|
}, 0);
|
|
37931
37981
|
}
|
|
37932
37982
|
};
|
|
37933
|
-
|
|
37934
|
-
|
|
37935
|
-
|
|
37983
|
+
/**
|
|
37984
|
+
* Handler para clique na máscara do scrim
|
|
37985
|
+
* Fecha o scrim se disableCloseOnClick for false e não houver modal filha com autoClose=false
|
|
37986
|
+
*/
|
|
37936
37987
|
this.handleMaskClick = (_event) => {
|
|
37937
37988
|
if (!this.disableCloseOnClick) {
|
|
37989
|
+
if (this.hasModalWithAutoClose()) {
|
|
37990
|
+
return;
|
|
37991
|
+
}
|
|
37938
37992
|
this.close();
|
|
37939
37993
|
}
|
|
37940
37994
|
};
|
|
@@ -37942,7 +37996,7 @@ class Scrim {
|
|
|
37942
37996
|
// ======================================================================
|
|
37943
37997
|
// LIFECYCLE HOOKS E WATCHERS
|
|
37944
37998
|
// ======================================================================
|
|
37945
|
-
handleOpenChange(newValue) {
|
|
37999
|
+
async handleOpenChange(newValue) {
|
|
37946
38000
|
// Cancelar qualquer timeout anterior
|
|
37947
38001
|
if (this.focusTimeoutId !== null) {
|
|
37948
38002
|
clearTimeout(this.focusTimeoutId);
|
|
@@ -38000,6 +38054,7 @@ class Scrim {
|
|
|
38000
38054
|
this.setupActivator();
|
|
38001
38055
|
this.setupActivatorSlotClick();
|
|
38002
38056
|
this.addContentEventListener();
|
|
38057
|
+
this.listenToModalEvents();
|
|
38003
38058
|
if (this.isActive) {
|
|
38004
38059
|
this.applyScrollStrategy();
|
|
38005
38060
|
this.addGlobalEventInterception();
|
|
@@ -38033,7 +38088,6 @@ class Scrim {
|
|
|
38033
38088
|
clearTimeout(this.restoreFocusTimeoutId);
|
|
38034
38089
|
this.restoreFocusTimeoutId = null;
|
|
38035
38090
|
}
|
|
38036
|
-
// Remover event listeners
|
|
38037
38091
|
window.removeEventListener('scroll', this.handleScrollClose);
|
|
38038
38092
|
window.removeEventListener('scroll', this.handleBlockScroll);
|
|
38039
38093
|
if (this.contentRef !== null) {
|
|
@@ -38042,6 +38096,58 @@ class Scrim {
|
|
|
38042
38096
|
this.removeActivatorClickListener();
|
|
38043
38097
|
this.cleanupActivatorSlotClick();
|
|
38044
38098
|
this.removeGlobalEventInterception();
|
|
38099
|
+
this.removeModalEventListener();
|
|
38100
|
+
}
|
|
38101
|
+
/**
|
|
38102
|
+
* Verifica se um elemento é filho direto deste scrim (não nested)
|
|
38103
|
+
*/
|
|
38104
|
+
isDirectChild(element) {
|
|
38105
|
+
const children = this.getDirectChildren();
|
|
38106
|
+
return children.some((child) => child === element || child.contains(element));
|
|
38107
|
+
}
|
|
38108
|
+
/**
|
|
38109
|
+
* Adiciona listeners para eventos brModalOpen e brModalClose das modais filhas
|
|
38110
|
+
*/
|
|
38111
|
+
listenToModalEvents() {
|
|
38112
|
+
this.el.addEventListener('brModalOpen', this.handleModalOpen);
|
|
38113
|
+
this.el.addEventListener('brModalClose', this.handleModalClose);
|
|
38114
|
+
}
|
|
38115
|
+
/**
|
|
38116
|
+
* Remove listeners dos eventos da modal
|
|
38117
|
+
*/
|
|
38118
|
+
removeModalEventListener() {
|
|
38119
|
+
this.el.removeEventListener('brModalOpen', this.handleModalOpen);
|
|
38120
|
+
this.el.removeEventListener('brModalClose', this.handleModalClose);
|
|
38121
|
+
}
|
|
38122
|
+
/**
|
|
38123
|
+
* Retorna os elementos filhos diretos do scrim via slot padrão
|
|
38124
|
+
*/
|
|
38125
|
+
getDirectChildren() {
|
|
38126
|
+
const shadowRoot = this.el.shadowRoot;
|
|
38127
|
+
if (shadowRoot === null)
|
|
38128
|
+
return [];
|
|
38129
|
+
const slot = shadowRoot.querySelector('slot:not([name])');
|
|
38130
|
+
if (slot === null)
|
|
38131
|
+
return [];
|
|
38132
|
+
return slot.assignedElements();
|
|
38133
|
+
}
|
|
38134
|
+
/**
|
|
38135
|
+
* Busca uma modal filha direta do scrim
|
|
38136
|
+
*/
|
|
38137
|
+
findModalChild() {
|
|
38138
|
+
var _a;
|
|
38139
|
+
const children = this.getDirectChildren();
|
|
38140
|
+
const modalElement = children.find((child) => child.tagName === 'BR-MODAL');
|
|
38141
|
+
return (_a = modalElement) !== null && _a !== void 0 ? _a : null;
|
|
38142
|
+
}
|
|
38143
|
+
/**
|
|
38144
|
+
* Verifica se há uma modal filha com autoClose=false (padrão ou explícito)
|
|
38145
|
+
* Retorna true se:
|
|
38146
|
+
* - Existe modal filha E autoClose não é explicitamente true
|
|
38147
|
+
*/
|
|
38148
|
+
hasModalWithAutoClose() {
|
|
38149
|
+
const modal = this.findModalChild();
|
|
38150
|
+
return modal !== null && modal.autoClose !== true;
|
|
38045
38151
|
}
|
|
38046
38152
|
// ======================================================================
|
|
38047
38153
|
// GERENCIAMENTO DO ACTIVATOR (ELEMENTO ACIONADOR)
|
|
@@ -38230,7 +38336,11 @@ class Scrim {
|
|
|
38230
38336
|
return elements.filter((el) => el.offsetWidth > 0 && el.offsetHeight > 0 && getComputedStyle(el).visibility !== 'hidden');
|
|
38231
38337
|
}
|
|
38232
38338
|
shouldHandleEscape(event) {
|
|
38233
|
-
|
|
38339
|
+
if ((event.key === 'Escape' || event.key === 'Esc') && this.isActive && !this.disableCloseOnClick) {
|
|
38340
|
+
// Não fecha se tiver modal filha com autoClose=false ou não definido
|
|
38341
|
+
return !this.hasModalWithAutoClose();
|
|
38342
|
+
}
|
|
38343
|
+
return false;
|
|
38234
38344
|
}
|
|
38235
38345
|
handleTabNavigation(event) {
|
|
38236
38346
|
const focusableElements = this.getFocusableElements();
|
|
@@ -38291,6 +38401,9 @@ class Scrim {
|
|
|
38291
38401
|
document.removeEventListener('focus', this.handleGlobalFocus, true);
|
|
38292
38402
|
document.removeEventListener('focusin', this.handleGlobalFocus, true);
|
|
38293
38403
|
}
|
|
38404
|
+
// ======================================================================
|
|
38405
|
+
// UTILITÁRIOS
|
|
38406
|
+
// ======================================================================
|
|
38294
38407
|
getCssClassMap() {
|
|
38295
38408
|
return {
|
|
38296
38409
|
'br-scrim': true,
|
|
@@ -38311,37 +38424,29 @@ class Scrim {
|
|
|
38311
38424
|
/**
|
|
38312
38425
|
* Define o limite de rolagem para o fechamento automático do scrim.
|
|
38313
38426
|
*/
|
|
38314
|
-
setScrollThreshold(threshold) {
|
|
38315
|
-
|
|
38316
|
-
this.scrollThreshold = threshold;
|
|
38317
|
-
});
|
|
38427
|
+
async setScrollThreshold(threshold) {
|
|
38428
|
+
this.scrollThreshold = threshold;
|
|
38318
38429
|
}
|
|
38319
38430
|
/**
|
|
38320
38431
|
* Método público para exibir o scrim
|
|
38321
38432
|
*/
|
|
38322
|
-
open() {
|
|
38323
|
-
|
|
38324
|
-
this.isOpen = true;
|
|
38325
|
-
});
|
|
38433
|
+
async open() {
|
|
38434
|
+
this.isOpen = true;
|
|
38326
38435
|
}
|
|
38327
38436
|
/**
|
|
38328
38437
|
* Método público para esconder o scrim
|
|
38329
38438
|
*/
|
|
38330
|
-
close() {
|
|
38331
|
-
|
|
38332
|
-
this.isOpen = false;
|
|
38333
|
-
});
|
|
38439
|
+
async close() {
|
|
38440
|
+
this.isOpen = false;
|
|
38334
38441
|
}
|
|
38335
38442
|
/**
|
|
38336
38443
|
* Método público para alternar o estado de exibição do scrim
|
|
38337
38444
|
*/
|
|
38338
|
-
toggle() {
|
|
38339
|
-
|
|
38340
|
-
this.isOpen = !this.isActive;
|
|
38341
|
-
});
|
|
38445
|
+
async toggle() {
|
|
38446
|
+
this.isOpen = !this.isActive;
|
|
38342
38447
|
}
|
|
38343
38448
|
render() {
|
|
38344
|
-
return (hAsync(Host, { key: '
|
|
38449
|
+
return (hAsync(Host, { key: '249de7af4056263464615cbe086b419f74b8981b' }, hAsync("slot", { key: '1698faa6b492e1ec594eba8425f20582a2af0e4a', name: "activator" }), hAsync("div", { key: 'adedf3eb84f3d8f79ac9bb19209022301453c019', class: this.getCssClassMap(), id: this.customId, role: "dialog", "aria-modal": "true", "aria-label": this.ariaLabel || 'Conteúdo do diálogo', "data-visible": this.isActive ? 'true' : 'false' }, hAsync("div", { key: 'ef7408a6672fabf4d2f79bc7922f301fd102652e', class: "mask", onClick: this.handleMaskClick }), hAsync("div", { key: '91ffb1a84478f09fc90cefbb97180c5db13dba5c', ref: (el) => (this.contentRef = el), id: `${this.customId}-content`, class: "content", tabIndex: -1, onKeyDown: this.handleKeyDown }, hAsync("slot", { key: '0600ac804980446103154cebf83389ac92e44d9d' })))));
|
|
38345
38450
|
}
|
|
38346
38451
|
static get formAssociated() { return true; }
|
|
38347
38452
|
get el() { return getElement(this); }
|
|
@@ -38455,6 +38560,11 @@ class Select {
|
|
|
38455
38560
|
* Útil para casos contextuais como paginação.
|
|
38456
38561
|
*/
|
|
38457
38562
|
this.isInline = false;
|
|
38563
|
+
/**
|
|
38564
|
+
* Desabilita a interação com o componente `br-select`.
|
|
38565
|
+
* Quando `true`, o input e as opções ficam desabilitados e não respondem a cliques ou teclas.
|
|
38566
|
+
*/
|
|
38567
|
+
this.disabled = false;
|
|
38458
38568
|
/**
|
|
38459
38569
|
* Propaga para o input interno a remoção da borda quando desfocado.
|
|
38460
38570
|
*/
|
|
@@ -38770,17 +38880,44 @@ class Select {
|
|
|
38770
38880
|
renderInput() {
|
|
38771
38881
|
// Se estiver focado, mostramos EXATAMENTE o que está sendo digitado (searchTerm), mesmo que seja vazio.
|
|
38772
38882
|
// Se não estiver focado, mostramos o termo de busca (se houver) ou o valor selecionado (inputValue).
|
|
38773
|
-
const displayValue = this.isFocused ? this.searchTerm :
|
|
38774
|
-
return (hAsync("br-input", { exportparts: "label", value: displayValue, label: this.label, isInline: this.isInline, controlWidth: this.inputWidth, borderless: this.borderless, placeholder: this.placeholder, actionLabel: this.isExpanded ? 'Recolher lista de opções' : 'Exibir lista de opções', actionTabIndex: -1, readonly: false,
|
|
38883
|
+
const displayValue = this.isFocused ? this.searchTerm : this.searchTerm || this.inputValue;
|
|
38884
|
+
return (hAsync("br-input", { exportparts: "label", value: displayValue, label: this.label, isInline: this.isInline, controlWidth: this.inputWidth, borderless: this.borderless, placeholder: this.placeholder, actionLabel: this.isExpanded ? 'Recolher lista de opções' : 'Exibir lista de opções', actionTabIndex: -1, readonly: false, disabled: this.disabled, onClick: () => {
|
|
38885
|
+
if (!this.disabled)
|
|
38886
|
+
this.toggleOpen();
|
|
38887
|
+
}, onInput: (event) => this.handleSearchInput(event), onFocus: () => this.handleSearchFocus(), onBlur: (event) => this.handleSearchBlur(event), onKeyDown: (event) => {
|
|
38888
|
+
if (!this.disabled)
|
|
38889
|
+
this.handleKeydownOnInput(event);
|
|
38890
|
+
} }, this.showSearchIcon && hAsync("br-icon", { slot: "icon", "icon-name": "fa-solid:search", "aria-hidden": "true" }), hAsync("br-icon", { slot: "action", "icon-name": this.isExpanded ? 'fa-solid:angle-up' : 'fa-solid:angle-down', height: "16", "aria-hidden": "true" })));
|
|
38775
38891
|
}
|
|
38776
38892
|
renderSelectAllCheckbox() {
|
|
38777
|
-
return (hAsync("div", { class: `br-item highlighted ${this.isAllSelected ? 'selected' : ''}`, "data-all": "data-all", tabindex: "-1", role: "option", "aria-selected": this.isAllSelected,
|
|
38893
|
+
return (hAsync("div", { class: `br-item highlighted ${this.isAllSelected ? 'selected' : ''} ${this.disabled ? 'disabled' : ''}`, "data-all": "data-all", tabindex: "-1", role: "option", "aria-selected": this.isAllSelected, "aria-disabled": this.disabled, onKeyDown: (event) => {
|
|
38894
|
+
if (!this.disabled)
|
|
38895
|
+
this.handleSelectAllKeyDown(event);
|
|
38896
|
+
}, onClick: () => {
|
|
38897
|
+
if (!this.disabled)
|
|
38898
|
+
this.toggleSelectAll();
|
|
38899
|
+
} }, hAsync("br-checkbox", { name: `checkbox-${this.customId}`, label: this.isAllSelected ? this.unselectAllLabel : this.selectAllLabel, checked: this.isAllSelected, indeterminate: this.isIndeterminate, disabled: this.disabled, onClick: (e) => e.stopPropagation(), onCheckedChange: () => {
|
|
38900
|
+
if (!this.disabled)
|
|
38901
|
+
this.toggleSelectAll();
|
|
38902
|
+
} })));
|
|
38778
38903
|
}
|
|
38779
38904
|
renderOptions() {
|
|
38780
38905
|
if (this.filteredOptions.length === 0) {
|
|
38781
38906
|
return (hAsync("div", { class: "br-item empty", role: "option", "aria-selected": "false", tabindex: -1 }, "Nenhum resultado encontrado"));
|
|
38782
38907
|
}
|
|
38783
|
-
return this.filteredOptions.map((option, index) => (hAsync("div", { class: `br-item ${option.selected ? 'selected' : ''}`, key: `${option.label}-${this.customId}`, role: "option", tabindex: this.focusedIndex === index ? 0 : -1, "aria-selected": option.selected, "
|
|
38908
|
+
return this.filteredOptions.map((option, index) => (hAsync("div", { class: `br-item ${option.selected ? 'selected' : ''} ${this.disabled ? 'disabled' : ''}`, key: `${option.label}-${this.customId}`, role: "option", tabindex: this.disabled ? -1 : this.focusedIndex === index ? 0 : -1, "aria-selected": option.selected, "aria-disabled": this.disabled, "data-value": option.value, onClick: () => {
|
|
38909
|
+
if (!this.disabled)
|
|
38910
|
+
this.handleSelectionByValue(option.value);
|
|
38911
|
+
}, onKeyDown: (event) => {
|
|
38912
|
+
if (!this.disabled)
|
|
38913
|
+
this.handleKeydownOnItem(event, index);
|
|
38914
|
+
}, onMouseOver: () => this.emitHoverFromOption(option), onPointerOver: () => this.emitHoverFromOption(option), onFocus: () => this.emitHoverFromOption(option) }, this.isMultiple ? (hAsync("br-checkbox", { name: `checkbox-${index}-${this.customId}`, label: option.label || option.value, checked: option.selected === true, disabled: this.disabled, onClick: (e) => e.stopPropagation(), onCheckedChange: () => {
|
|
38915
|
+
if (!this.disabled)
|
|
38916
|
+
this.handleSelectionByValue(option.value);
|
|
38917
|
+
} })) : (hAsync("br-radio", { exportparts: "radio-input, radio-label", name: `radio-${index}-${this.customId}`, label: option.label || option.value, checked: option.selected === true, disabled: this.disabled, onClick: (e) => e.stopPropagation(), onCheckedChange: () => {
|
|
38918
|
+
if (!this.disabled)
|
|
38919
|
+
this.handleSelectionByValue(option.value);
|
|
38920
|
+
} })))));
|
|
38784
38921
|
}
|
|
38785
38922
|
/**
|
|
38786
38923
|
* Determina um id para o radio.
|
|
@@ -38792,50 +38929,42 @@ class Select {
|
|
|
38792
38929
|
/**
|
|
38793
38930
|
* Inverte o valor da prop `isOpen`
|
|
38794
38931
|
*/
|
|
38795
|
-
toggleOpen() {
|
|
38796
|
-
|
|
38797
|
-
this.isExpanded = !this.isExpanded;
|
|
38798
|
-
});
|
|
38932
|
+
async toggleOpen() {
|
|
38933
|
+
this.isExpanded = !this.isExpanded;
|
|
38799
38934
|
}
|
|
38800
38935
|
/**
|
|
38801
38936
|
* Limpa todas as opções selecionadas.
|
|
38802
38937
|
*/
|
|
38803
|
-
clear() {
|
|
38804
|
-
|
|
38805
|
-
|
|
38806
|
-
|
|
38807
|
-
|
|
38808
|
-
|
|
38809
|
-
|
|
38810
|
-
|
|
38811
|
-
|
|
38812
|
-
|
|
38813
|
-
|
|
38814
|
-
|
|
38815
|
-
|
|
38816
|
-
|
|
38817
|
-
|
|
38818
|
-
}
|
|
38819
|
-
});
|
|
38938
|
+
async clear() {
|
|
38939
|
+
const updatedOptions = this.parsedOptions.map((option) => (Object.assign(Object.assign({}, option), { selected: false })));
|
|
38940
|
+
this.parsedOptions = updatedOptions;
|
|
38941
|
+
const newValue = this.isMultiple ? [] : undefined;
|
|
38942
|
+
this.selectedValue = newValue;
|
|
38943
|
+
this.value = newValue;
|
|
38944
|
+
this.updateSelectedOptions();
|
|
38945
|
+
this.updateSelectedAllState();
|
|
38946
|
+
this.valueChange.emit(newValue);
|
|
38947
|
+
try {
|
|
38948
|
+
this.elementInternals.setFormValue(JSON.stringify(newValue !== null && newValue !== void 0 ? newValue : (this.isMultiple ? [] : null)));
|
|
38949
|
+
}
|
|
38950
|
+
catch (_a) {
|
|
38951
|
+
// Ignora erro em testes onde setFormValue não é implementado
|
|
38952
|
+
}
|
|
38820
38953
|
}
|
|
38821
38954
|
/**
|
|
38822
38955
|
* Retorna o valor selecionado.
|
|
38823
38956
|
* @returns {Promise<string | string[]>} O valor atual.
|
|
38824
38957
|
*/
|
|
38825
|
-
getValue() {
|
|
38826
|
-
return
|
|
38827
|
-
return this.value;
|
|
38828
|
-
});
|
|
38958
|
+
async getValue() {
|
|
38959
|
+
return this.value;
|
|
38829
38960
|
}
|
|
38830
38961
|
/**
|
|
38831
38962
|
* Define o valor do componente.
|
|
38832
38963
|
* @param {string | string[]} newValue O novo valor a ser definido.
|
|
38833
38964
|
*/
|
|
38834
|
-
setValue(newValue) {
|
|
38835
|
-
|
|
38836
|
-
|
|
38837
|
-
// O @Watch('value') cuidará da sincronização
|
|
38838
|
-
});
|
|
38965
|
+
async setValue(newValue) {
|
|
38966
|
+
this.value = newValue;
|
|
38967
|
+
// O @Watch('value') cuidará da sincronização
|
|
38839
38968
|
}
|
|
38840
38969
|
getCssClassMap() {
|
|
38841
38970
|
return {
|
|
@@ -38867,7 +38996,7 @@ class Select {
|
|
|
38867
38996
|
this.filteredOptions = this.getFilteredOptions('');
|
|
38868
38997
|
}
|
|
38869
38998
|
render() {
|
|
38870
|
-
return (hAsync("div", { key: '
|
|
38999
|
+
return (hAsync("div", { key: '94bc55d4369cb86db9253fef83ab491f90998dd5', class: this.getCssClassMap(), id: this.getComputedId(), "aria-disabled": this.disabled }, this.renderInput(), this.isExpanded && (hAsync("br-list", { key: 'fb5d789013c6a1c7e858161c1a370b746f4c9e1e', tabindex: -1, onKeyDown: (event) => this.handleKeydownOnList(event), style: this.inputWidth !== undefined ? { width: this.inputWidth } : undefined }, this.isMultiple && this.renderSelectAllCheckbox(), this.renderOptions()))));
|
|
38871
39000
|
}
|
|
38872
39001
|
static get formAssociated() { return true; }
|
|
38873
39002
|
get el() { return getElement(this); }
|
|
@@ -38891,6 +39020,7 @@ class Select {
|
|
|
38891
39020
|
"isOpen": [516, "is-open"],
|
|
38892
39021
|
"isInline": [516, "is-inline"],
|
|
38893
39022
|
"inputWidth": [513, "input-width"],
|
|
39023
|
+
"disabled": [516],
|
|
38894
39024
|
"borderless": [516],
|
|
38895
39025
|
"customId": [513, "custom-id"],
|
|
38896
39026
|
"value": [1025],
|
|
@@ -38911,7 +39041,7 @@ class Select {
|
|
|
38911
39041
|
},
|
|
38912
39042
|
"$listeners$": undefined,
|
|
38913
39043
|
"$lazyBundleId$": "-",
|
|
38914
|
-
"$attrsToReflect$": [["label", "label"], ["placeholder", "placeholder"], ["isMultiple", "is-multiple"], ["options", "options"], ["selectAllLabel", "select-all-label"], ["unselectAllLabel", "unselect-all-label"], ["showSearchIcon", "show-search-icon"], ["isOpen", "is-open"], ["isInline", "is-inline"], ["inputWidth", "input-width"], ["borderless", "borderless"], ["customId", "custom-id"]]
|
|
39044
|
+
"$attrsToReflect$": [["label", "label"], ["placeholder", "placeholder"], ["isMultiple", "is-multiple"], ["options", "options"], ["selectAllLabel", "select-all-label"], ["unselectAllLabel", "unselect-all-label"], ["showSearchIcon", "show-search-icon"], ["isOpen", "is-open"], ["isInline", "is-inline"], ["inputWidth", "input-width"], ["disabled", "disabled"], ["borderless", "borderless"], ["customId", "custom-id"]]
|
|
38915
39045
|
}; }
|
|
38916
39046
|
}
|
|
38917
39047
|
let selectId = 0;
|
|
@@ -39299,40 +39429,36 @@ class SkipLink {
|
|
|
39299
39429
|
/**
|
|
39300
39430
|
* Oculta o componente programaticamente.
|
|
39301
39431
|
*/
|
|
39302
|
-
hide() {
|
|
39303
|
-
|
|
39304
|
-
|
|
39305
|
-
|
|
39306
|
-
|
|
39307
|
-
|
|
39308
|
-
|
|
39309
|
-
|
|
39310
|
-
return Promise.resolve();
|
|
39311
|
-
});
|
|
39432
|
+
async hide() {
|
|
39433
|
+
const focusedElement = this.el.querySelector(':focus');
|
|
39434
|
+
if (focusedElement instanceof HTMLElement) {
|
|
39435
|
+
focusedElement.blur();
|
|
39436
|
+
}
|
|
39437
|
+
this.isVisible = false;
|
|
39438
|
+
this.brDidHide.emit();
|
|
39439
|
+
return Promise.resolve();
|
|
39312
39440
|
}
|
|
39313
39441
|
/**
|
|
39314
39442
|
* Exibe o componente programaticamente.
|
|
39315
39443
|
*/
|
|
39316
|
-
show() {
|
|
39317
|
-
|
|
39318
|
-
|
|
39319
|
-
|
|
39320
|
-
|
|
39321
|
-
|
|
39322
|
-
if (firstItem
|
|
39323
|
-
|
|
39324
|
-
|
|
39325
|
-
|
|
39326
|
-
|
|
39327
|
-
|
|
39328
|
-
|
|
39329
|
-
focusableElement.focus();
|
|
39330
|
-
}
|
|
39444
|
+
async show() {
|
|
39445
|
+
var _a;
|
|
39446
|
+
this.isVisible = true;
|
|
39447
|
+
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
39448
|
+
const firstItem = this.el.querySelector('br-skiplink-item');
|
|
39449
|
+
if (firstItem !== null) {
|
|
39450
|
+
if (typeof firstItem.itemFocus === 'function') {
|
|
39451
|
+
await firstItem.itemFocus();
|
|
39452
|
+
}
|
|
39453
|
+
else {
|
|
39454
|
+
const focusableElement = (_a = firstItem.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('a, button');
|
|
39455
|
+
if (focusableElement !== null) {
|
|
39456
|
+
focusableElement.focus();
|
|
39331
39457
|
}
|
|
39332
39458
|
}
|
|
39333
|
-
|
|
39334
|
-
|
|
39335
|
-
|
|
39459
|
+
}
|
|
39460
|
+
this.brDidShow.emit();
|
|
39461
|
+
return Promise.resolve();
|
|
39336
39462
|
}
|
|
39337
39463
|
getEffectivePosition() {
|
|
39338
39464
|
if (this.isSmallScreen) {
|
|
@@ -39434,51 +39560,47 @@ class SkipLinkItem {
|
|
|
39434
39560
|
/**
|
|
39435
39561
|
* Move o foco para este item.
|
|
39436
39562
|
*/
|
|
39437
|
-
itemFocus() {
|
|
39438
|
-
|
|
39439
|
-
|
|
39440
|
-
|
|
39441
|
-
|
|
39442
|
-
|
|
39443
|
-
|
|
39444
|
-
|
|
39445
|
-
|
|
39446
|
-
|
|
39447
|
-
|
|
39448
|
-
|
|
39449
|
-
return;
|
|
39450
|
-
}
|
|
39563
|
+
async itemFocus() {
|
|
39564
|
+
var _a;
|
|
39565
|
+
const brItemElement = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('br-item');
|
|
39566
|
+
if (brItemElement !== null) {
|
|
39567
|
+
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
39568
|
+
const brItemShadowRoot = brItemElement.shadowRoot;
|
|
39569
|
+
if (brItemShadowRoot !== null) {
|
|
39570
|
+
const focusableElement = brItemShadowRoot.querySelector('a, button');
|
|
39571
|
+
if (focusableElement !== null) {
|
|
39572
|
+
focusableElement.focus();
|
|
39573
|
+
this.brSkiplinkItemFocus.emit({ itemId: this.customId });
|
|
39574
|
+
return;
|
|
39451
39575
|
}
|
|
39452
|
-
brItemElement.focus();
|
|
39453
|
-
this.brSkiplinkItemFocus.emit({ itemId: this.customId });
|
|
39454
39576
|
}
|
|
39455
|
-
|
|
39577
|
+
brItemElement.focus();
|
|
39578
|
+
this.brSkiplinkItemFocus.emit({ itemId: this.customId });
|
|
39579
|
+
}
|
|
39456
39580
|
}
|
|
39457
39581
|
/**
|
|
39458
39582
|
* Navega para o target definido.
|
|
39459
39583
|
* Move o foco para o elemento alvo e ajusta a rolagem da página se necessário.
|
|
39460
39584
|
*/
|
|
39461
|
-
navigateToTarget() {
|
|
39462
|
-
|
|
39463
|
-
|
|
39464
|
-
|
|
39465
|
-
|
|
39466
|
-
|
|
39467
|
-
|
|
39468
|
-
|
|
39469
|
-
this.
|
|
39470
|
-
|
|
39471
|
-
|
|
39472
|
-
});
|
|
39473
|
-
}
|
|
39474
|
-
else {
|
|
39475
|
-
console.warn(`Skip Link: Target element "${this.target}" not found`);
|
|
39476
|
-
}
|
|
39585
|
+
async navigateToTarget() {
|
|
39586
|
+
try {
|
|
39587
|
+
const targetElement = document.querySelector(this.target);
|
|
39588
|
+
if (targetElement !== null) {
|
|
39589
|
+
targetElement.setAttribute('tabindex', '-1');
|
|
39590
|
+
targetElement.focus();
|
|
39591
|
+
targetElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
39592
|
+
this.brSkiplinkItemClick.emit({
|
|
39593
|
+
itemId: this.customId,
|
|
39594
|
+
target: this.target,
|
|
39595
|
+
});
|
|
39477
39596
|
}
|
|
39478
|
-
|
|
39479
|
-
console.
|
|
39597
|
+
else {
|
|
39598
|
+
console.warn(`Skip Link: Target element "${this.target}" not found`);
|
|
39480
39599
|
}
|
|
39481
|
-
}
|
|
39600
|
+
}
|
|
39601
|
+
catch (error) {
|
|
39602
|
+
console.error('Skip Link: Error navigating to target', error);
|
|
39603
|
+
}
|
|
39482
39604
|
}
|
|
39483
39605
|
/**
|
|
39484
39606
|
* Listener para cliques no item.
|
|
@@ -39753,14 +39875,12 @@ class Step {
|
|
|
39753
39875
|
elements.setContent(indicatorContent.toString());
|
|
39754
39876
|
});
|
|
39755
39877
|
}
|
|
39756
|
-
setStepItemsContentType() {
|
|
39757
|
-
|
|
39758
|
-
|
|
39759
|
-
|
|
39760
|
-
|
|
39761
|
-
|
|
39762
|
-
elements.setAttribute('aria-setsize', `${slotItems.length}`);
|
|
39763
|
-
});
|
|
39878
|
+
async setStepItemsContentType() {
|
|
39879
|
+
const slotItems = Array.from(this.el.getElementsByTagName('br-step-item'));
|
|
39880
|
+
await Promise.all(slotItems.map((element) => element.setContentType(this.contentType)));
|
|
39881
|
+
slotItems.forEach((elements, index) => {
|
|
39882
|
+
elements.setAttribute('aria-posinset', `${index + 1}`);
|
|
39883
|
+
elements.setAttribute('aria-setsize', `${slotItems.length}`);
|
|
39764
39884
|
});
|
|
39765
39885
|
}
|
|
39766
39886
|
setStepItemsMode(mode) {
|
|
@@ -39806,44 +39926,36 @@ class Step {
|
|
|
39806
39926
|
*
|
|
39807
39927
|
* Método disponibilizado via API do elemento que controla o componente Step, responsável por avançar para o próximo passo e atualizar o valor do estado activeStep
|
|
39808
39928
|
*/
|
|
39809
|
-
ProceedToNextStep() {
|
|
39810
|
-
|
|
39811
|
-
|
|
39812
|
-
|
|
39813
|
-
|
|
39814
|
-
this.stepItems[this.activeStep].removeAttribute('disabled');
|
|
39815
|
-
}
|
|
39929
|
+
async ProceedToNextStep() {
|
|
39930
|
+
if (this.activeStep + 1 < this.stepItems.length) {
|
|
39931
|
+
this.activeStep = this.activeStep + 1;
|
|
39932
|
+
if (this.progressionType === 'linear') {
|
|
39933
|
+
this.stepItems[this.activeStep].removeAttribute('disabled');
|
|
39816
39934
|
}
|
|
39817
|
-
}
|
|
39935
|
+
}
|
|
39818
39936
|
}
|
|
39819
39937
|
/**
|
|
39820
39938
|
*
|
|
39821
39939
|
* Método disponibilizado via API do elemento que controla o componente Step, responsável por retornar ao passo anterior e atualizar o valor do estado activeStep
|
|
39822
39940
|
*/
|
|
39823
|
-
BackToPreviousStep() {
|
|
39824
|
-
|
|
39825
|
-
|
|
39826
|
-
|
|
39827
|
-
}
|
|
39828
|
-
});
|
|
39941
|
+
async BackToPreviousStep() {
|
|
39942
|
+
if (this.activeStep - 1 >= 0) {
|
|
39943
|
+
this.activeStep = this.activeStep - 1;
|
|
39944
|
+
}
|
|
39829
39945
|
}
|
|
39830
39946
|
/**
|
|
39831
39947
|
*
|
|
39832
39948
|
* Método disponibilizado via API do elemento que integra um componente externo ao componente Step, permitindo sinalizar validações ou destacar a etapa com estado ativo.
|
|
39833
39949
|
*/
|
|
39834
|
-
StepValidation(validationStatus) {
|
|
39835
|
-
|
|
39836
|
-
this.stepItems[this.activeStep].setAttribute('highlight', validationStatus);
|
|
39837
|
-
});
|
|
39950
|
+
async StepValidation(validationStatus) {
|
|
39951
|
+
this.stepItems[this.activeStep].setAttribute('highlight', validationStatus);
|
|
39838
39952
|
}
|
|
39839
39953
|
/**
|
|
39840
39954
|
*
|
|
39841
39955
|
* Método disponibilizado via API do elemento que permite a um componente externo obter a etapa com o estado ativo do componente Step.
|
|
39842
39956
|
*/
|
|
39843
|
-
GetActiveStep() {
|
|
39844
|
-
return
|
|
39845
|
-
return this.activeStep;
|
|
39846
|
-
});
|
|
39957
|
+
async GetActiveStep() {
|
|
39958
|
+
return this.activeStep;
|
|
39847
39959
|
}
|
|
39848
39960
|
getCssClassMap() {
|
|
39849
39961
|
return {
|
|
@@ -40017,55 +40129,43 @@ class StepItem {
|
|
|
40017
40129
|
*
|
|
40018
40130
|
* Método disponibilizado via api do elemento que indica a posição do step item, ele serve para setar o state stepItemPositionStatus do componente
|
|
40019
40131
|
*/
|
|
40020
|
-
setStepItemPositionStatus(value) {
|
|
40021
|
-
|
|
40022
|
-
this.stepItemPositionStatus = value;
|
|
40023
|
-
});
|
|
40132
|
+
async setStepItemPositionStatus(value) {
|
|
40133
|
+
this.stepItemPositionStatus = value;
|
|
40024
40134
|
}
|
|
40025
40135
|
/**
|
|
40026
40136
|
* Método que define a orientação do stepItem e controla a exibição da linha do tempo após o componente.
|
|
40027
40137
|
*/
|
|
40028
|
-
handleShowTimeLine(value, layout) {
|
|
40029
|
-
|
|
40030
|
-
|
|
40031
|
-
this.stepLayout = layout;
|
|
40032
|
-
});
|
|
40138
|
+
async handleShowTimeLine(value, layout) {
|
|
40139
|
+
this.showTimeLine = value;
|
|
40140
|
+
this.stepLayout = layout;
|
|
40033
40141
|
}
|
|
40034
40142
|
/**
|
|
40035
40143
|
*
|
|
40036
40144
|
* Método disponibilizado via api do elemento que atribui o valor ao estado que define onde o label, o texto de destaque, irá ficar localizado
|
|
40037
40145
|
*/
|
|
40038
|
-
setLabelPosition(value) {
|
|
40039
|
-
|
|
40040
|
-
this.labelPosition = value;
|
|
40041
|
-
});
|
|
40146
|
+
async setLabelPosition(value) {
|
|
40147
|
+
this.labelPosition = value;
|
|
40042
40148
|
}
|
|
40043
40149
|
/**
|
|
40044
40150
|
*
|
|
40045
40151
|
* Método disponibilizado via api do elemento que atribui o valor que irá definir o tipo de conteúdo apresentado dentro do componente stepItem
|
|
40046
40152
|
*/
|
|
40047
|
-
setContentType(value) {
|
|
40048
|
-
|
|
40049
|
-
this.contentType = value;
|
|
40050
|
-
});
|
|
40153
|
+
async setContentType(value) {
|
|
40154
|
+
this.contentType = value;
|
|
40051
40155
|
}
|
|
40052
40156
|
/**
|
|
40053
40157
|
*
|
|
40054
40158
|
* Método disponibilizado via api do elemento que atribui o valor que irá definir o modo como o componente irá se comportar e exibir seu estilo.
|
|
40055
40159
|
*/
|
|
40056
|
-
setMode(value) {
|
|
40057
|
-
|
|
40058
|
-
this.mode = value;
|
|
40059
|
-
});
|
|
40160
|
+
async setMode(value) {
|
|
40161
|
+
this.mode = value;
|
|
40060
40162
|
}
|
|
40061
40163
|
/**
|
|
40062
40164
|
*
|
|
40063
40165
|
* Método disponibilizado via api do elemento que atribui o valor que irá ser exibido dentro do componente stepItem
|
|
40064
40166
|
*/
|
|
40065
|
-
setContent(value) {
|
|
40066
|
-
|
|
40067
|
-
this.content = value;
|
|
40068
|
-
});
|
|
40167
|
+
async setContent(value) {
|
|
40168
|
+
this.content = value;
|
|
40069
40169
|
}
|
|
40070
40170
|
getStepContainerClassMap() {
|
|
40071
40171
|
return {
|
|
@@ -40248,11 +40348,9 @@ class Switch {
|
|
|
40248
40348
|
/**
|
|
40249
40349
|
* Inverte o valor da prop `checked`
|
|
40250
40350
|
*/
|
|
40251
|
-
toggleChecked() {
|
|
40252
|
-
|
|
40253
|
-
|
|
40254
|
-
this.checkedChange.emit(this.checked);
|
|
40255
|
-
});
|
|
40351
|
+
async toggleChecked() {
|
|
40352
|
+
this.checked = !this.checked;
|
|
40353
|
+
this.checkedChange.emit(this.checked);
|
|
40256
40354
|
}
|
|
40257
40355
|
/**
|
|
40258
40356
|
* Verifica se o componente tem texto visível (via slot ou label)
|
|
@@ -41380,13 +41478,11 @@ class Textarea {
|
|
|
41380
41478
|
* Define um novo valor para o textarea.
|
|
41381
41479
|
* @param newValue - O novo valor a ser definido.
|
|
41382
41480
|
*/
|
|
41383
|
-
setValue(newValue) {
|
|
41384
|
-
|
|
41385
|
-
|
|
41386
|
-
|
|
41387
|
-
|
|
41388
|
-
this.valueChange.emit(this.value);
|
|
41389
|
-
});
|
|
41481
|
+
async setValue(newValue) {
|
|
41482
|
+
var _a;
|
|
41483
|
+
this.value = newValue;
|
|
41484
|
+
this.currentLength = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
41485
|
+
this.valueChange.emit(this.value);
|
|
41390
41486
|
}
|
|
41391
41487
|
/**
|
|
41392
41488
|
* Retorna os ids para o atributo aria-describedby do textarea
|
|
@@ -42551,7 +42647,7 @@ class Wizard {
|
|
|
42551
42647
|
* Se for a última etapa, valida e emite evento de conclusão.
|
|
42552
42648
|
* Caso contrário, avança para a próxima etapa.
|
|
42553
42649
|
*/
|
|
42554
|
-
this.handleNext = () =>
|
|
42650
|
+
this.handleNext = async () => {
|
|
42555
42651
|
if (this.currentStep === this.panels.length) {
|
|
42556
42652
|
// Última etapa: validar antes de completar
|
|
42557
42653
|
const eventResult = this.brWizardBeforeStepChange.emit(this.currentStep);
|
|
@@ -42561,16 +42657,16 @@ class Wizard {
|
|
|
42561
42657
|
}
|
|
42562
42658
|
}
|
|
42563
42659
|
else {
|
|
42564
|
-
|
|
42660
|
+
await this.nextStep();
|
|
42565
42661
|
}
|
|
42566
|
-
}
|
|
42662
|
+
};
|
|
42567
42663
|
/**
|
|
42568
42664
|
* Handler do botão "Voltar".
|
|
42569
42665
|
* Navega para a etapa anterior.
|
|
42570
42666
|
*/
|
|
42571
|
-
this.handlePrevious = () =>
|
|
42572
|
-
|
|
42573
|
-
}
|
|
42667
|
+
this.handlePrevious = async () => {
|
|
42668
|
+
await this.previousStep();
|
|
42669
|
+
};
|
|
42574
42670
|
/**
|
|
42575
42671
|
* Handler do botão "Cancelar".
|
|
42576
42672
|
* Emite evento de cancelamento do wizard.
|
|
@@ -42593,12 +42689,10 @@ class Wizard {
|
|
|
42593
42689
|
* Observa mudanças na etapa inicial.
|
|
42594
42690
|
* Reinicializa o wizard quando a prop initialStep é alterada externamente.
|
|
42595
42691
|
*/
|
|
42596
|
-
handleInitialStepChange() {
|
|
42597
|
-
|
|
42598
|
-
|
|
42599
|
-
|
|
42600
|
-
this.updatePanels();
|
|
42601
|
-
});
|
|
42692
|
+
async handleInitialStepChange() {
|
|
42693
|
+
this.setInitialStep();
|
|
42694
|
+
await this.syncWithBrStep();
|
|
42695
|
+
this.updatePanels();
|
|
42602
42696
|
}
|
|
42603
42697
|
/**
|
|
42604
42698
|
* Observa mudanças na etapa atual (fonte única de verdade).
|
|
@@ -42606,15 +42700,13 @@ class Wizard {
|
|
|
42606
42700
|
* @param newStep - Nova etapa
|
|
42607
42701
|
* @param oldStep - Etapa anterior
|
|
42608
42702
|
*/
|
|
42609
|
-
handleCurrentStepChange(newStep, oldStep) {
|
|
42610
|
-
|
|
42611
|
-
|
|
42612
|
-
|
|
42613
|
-
|
|
42614
|
-
|
|
42615
|
-
|
|
42616
|
-
}
|
|
42617
|
-
});
|
|
42703
|
+
async handleCurrentStepChange(newStep, oldStep) {
|
|
42704
|
+
if (newStep !== oldStep) {
|
|
42705
|
+
await this.syncWithBrStep();
|
|
42706
|
+
this.updatePanels();
|
|
42707
|
+
this.announceStepChange(newStep, oldStep);
|
|
42708
|
+
this.setFocusOnActivePanel();
|
|
42709
|
+
}
|
|
42618
42710
|
}
|
|
42619
42711
|
// ========================================
|
|
42620
42712
|
// LISTENERS
|
|
@@ -42624,31 +42716,27 @@ class Wizard {
|
|
|
42624
42716
|
* Redescobre os painéis e ressincroniza o estado.
|
|
42625
42717
|
* @param event - Evento slotchange
|
|
42626
42718
|
*/
|
|
42627
|
-
handleSlotChange(event) {
|
|
42628
|
-
|
|
42629
|
-
|
|
42630
|
-
|
|
42631
|
-
|
|
42632
|
-
this.updatePanels();
|
|
42633
|
-
});
|
|
42719
|
+
async handleSlotChange(event) {
|
|
42720
|
+
const slot = event.target;
|
|
42721
|
+
this.discoverPanelsFromSlot(slot);
|
|
42722
|
+
await this.syncWithBrStep();
|
|
42723
|
+
this.updatePanels();
|
|
42634
42724
|
}
|
|
42635
42725
|
/**
|
|
42636
42726
|
* Detecta quando o br-step muda de etapa ativa.
|
|
42637
42727
|
* Valida e sincroniza a navegação com o componente interno br-step.
|
|
42638
42728
|
* @param event - Evento customizado do br-step
|
|
42639
42729
|
*/
|
|
42640
|
-
handleStepChange(event) {
|
|
42641
|
-
|
|
42642
|
-
|
|
42643
|
-
|
|
42644
|
-
|
|
42645
|
-
|
|
42646
|
-
|
|
42647
|
-
|
|
42648
|
-
|
|
42649
|
-
|
|
42650
|
-
}
|
|
42651
|
-
});
|
|
42730
|
+
async handleStepChange(event) {
|
|
42731
|
+
if (this.isSyncingWithStep) {
|
|
42732
|
+
return;
|
|
42733
|
+
}
|
|
42734
|
+
const requestedStep = event.detail.activeStep + 1;
|
|
42735
|
+
const success = await this.navigateToStep(requestedStep);
|
|
42736
|
+
if (!success) {
|
|
42737
|
+
event.stopPropagation();
|
|
42738
|
+
await this.syncWithBrStep();
|
|
42739
|
+
}
|
|
42652
42740
|
}
|
|
42653
42741
|
// ========================================
|
|
42654
42742
|
// LIFECYCLE HOOKS
|
|
@@ -42664,24 +42752,22 @@ class Wizard {
|
|
|
42664
42752
|
* Lifecycle: carrega painéis e configura estado inicial.
|
|
42665
42753
|
* Sincroniza com br-step, atualiza painéis e configura detecção mobile.
|
|
42666
42754
|
*/
|
|
42667
|
-
componentDidLoad() {
|
|
42668
|
-
|
|
42669
|
-
|
|
42670
|
-
|
|
42671
|
-
|
|
42672
|
-
|
|
42673
|
-
|
|
42674
|
-
|
|
42675
|
-
this.panels = slotPanels;
|
|
42676
|
-
}
|
|
42677
|
-
}
|
|
42678
|
-
yield this.syncWithBrStep();
|
|
42679
|
-
this.updatePanels();
|
|
42680
|
-
this.setupMobileDetection();
|
|
42681
|
-
if (this.isMobile) {
|
|
42682
|
-
this.collapsed = true;
|
|
42755
|
+
async componentDidLoad() {
|
|
42756
|
+
var _a;
|
|
42757
|
+
const slot = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot');
|
|
42758
|
+
if (slot !== null && typeof slot !== 'undefined') {
|
|
42759
|
+
const assignedElements = slot.assignedElements();
|
|
42760
|
+
const slotPanels = assignedElements.filter((el) => el.tagName.toLowerCase() === 'br-wizard-panel');
|
|
42761
|
+
if (slotPanels.length !== this.panels.length) {
|
|
42762
|
+
this.panels = slotPanels;
|
|
42683
42763
|
}
|
|
42684
|
-
}
|
|
42764
|
+
}
|
|
42765
|
+
await this.syncWithBrStep();
|
|
42766
|
+
this.updatePanels();
|
|
42767
|
+
this.setupMobileDetection();
|
|
42768
|
+
if (this.isMobile) {
|
|
42769
|
+
this.collapsed = true;
|
|
42770
|
+
}
|
|
42685
42771
|
}
|
|
42686
42772
|
/**
|
|
42687
42773
|
* Lifecycle: limpa listeners quando componente é removido.
|
|
@@ -42699,20 +42785,16 @@ class Wizard {
|
|
|
42699
42785
|
* Executa validação via evento `brWizardBeforeStepChange` antes de navegar.
|
|
42700
42786
|
* @returns Promise<boolean> - true se navegou com sucesso, false se bloqueado
|
|
42701
42787
|
*/
|
|
42702
|
-
nextStep() {
|
|
42703
|
-
return
|
|
42704
|
-
return yield this.navigateToStep(this.currentStep + 1);
|
|
42705
|
-
});
|
|
42788
|
+
async nextStep() {
|
|
42789
|
+
return await this.navigateToStep(this.currentStep + 1);
|
|
42706
42790
|
}
|
|
42707
42791
|
/**
|
|
42708
42792
|
* Volta para a etapa anterior.
|
|
42709
42793
|
* Não executa validação ao retornar.
|
|
42710
42794
|
* @returns Promise<boolean> - true se navegou com sucesso, false se bloqueado
|
|
42711
42795
|
*/
|
|
42712
|
-
previousStep() {
|
|
42713
|
-
return
|
|
42714
|
-
return yield this.navigateToStep(this.currentStep - 1);
|
|
42715
|
-
});
|
|
42796
|
+
async previousStep() {
|
|
42797
|
+
return await this.navigateToStep(this.currentStep - 1);
|
|
42716
42798
|
}
|
|
42717
42799
|
/**
|
|
42718
42800
|
* Navega para uma etapa específica.
|
|
@@ -42720,67 +42802,53 @@ class Wizard {
|
|
|
42720
42802
|
* @param stepNumber - Número da etapa de destino (numeração começa em 1)
|
|
42721
42803
|
* @returns Promise<boolean> - true se navegou com sucesso, false se bloqueado
|
|
42722
42804
|
*/
|
|
42723
|
-
goToStep(stepNumber) {
|
|
42724
|
-
return
|
|
42725
|
-
return yield this.navigateToStep(stepNumber);
|
|
42726
|
-
});
|
|
42805
|
+
async goToStep(stepNumber) {
|
|
42806
|
+
return await this.navigateToStep(stepNumber);
|
|
42727
42807
|
}
|
|
42728
42808
|
/**
|
|
42729
42809
|
* Retorna à primeira etapa do wizard.
|
|
42730
42810
|
* Não executa validação (útil para reiniciar o fluxo).
|
|
42731
42811
|
* @returns Promise<void>
|
|
42732
42812
|
*/
|
|
42733
|
-
reset() {
|
|
42734
|
-
|
|
42735
|
-
yield this.navigateToStep(1, true);
|
|
42736
|
-
});
|
|
42813
|
+
async reset() {
|
|
42814
|
+
await this.navigateToStep(1, true);
|
|
42737
42815
|
}
|
|
42738
42816
|
/**
|
|
42739
42817
|
* Retorna o elemento HTML do painel ativo no momento.
|
|
42740
42818
|
* @returns Promise<HTMLElement | null>
|
|
42741
42819
|
*/
|
|
42742
|
-
getCurrentStep() {
|
|
42743
|
-
return
|
|
42744
|
-
return this.panels[this.currentStep - 1] || null;
|
|
42745
|
-
});
|
|
42820
|
+
async getCurrentStep() {
|
|
42821
|
+
return this.panels[this.currentStep - 1] || null;
|
|
42746
42822
|
}
|
|
42747
42823
|
/**
|
|
42748
42824
|
* Retorna todos os painéis do wizard.
|
|
42749
42825
|
* @returns Promise<HTMLElement[]>
|
|
42750
42826
|
*/
|
|
42751
|
-
getAllSteps() {
|
|
42752
|
-
return
|
|
42753
|
-
return [...this.panels];
|
|
42754
|
-
});
|
|
42827
|
+
async getAllSteps() {
|
|
42828
|
+
return [...this.panels];
|
|
42755
42829
|
}
|
|
42756
42830
|
/**
|
|
42757
42831
|
* Retorna um painel específico pelo índice.
|
|
42758
42832
|
* @param stepNumber - Número da etapa (numeração começa em 1)
|
|
42759
42833
|
* @returns Promise<HTMLElement | null>
|
|
42760
42834
|
*/
|
|
42761
|
-
getStepByIndex(stepNumber) {
|
|
42762
|
-
return
|
|
42763
|
-
return this.panels[stepNumber - 1] || null;
|
|
42764
|
-
});
|
|
42835
|
+
async getStepByIndex(stepNumber) {
|
|
42836
|
+
return this.panels[stepNumber - 1] || null;
|
|
42765
42837
|
}
|
|
42766
42838
|
/**
|
|
42767
42839
|
* Retorna o índice (número) da etapa atual.
|
|
42768
42840
|
* A numeração começa em 1 (primeira etapa = 1, segunda = 2, etc).
|
|
42769
42841
|
* @returns Promise<number>
|
|
42770
42842
|
*/
|
|
42771
|
-
getCurrentStepIndex() {
|
|
42772
|
-
return
|
|
42773
|
-
return this.currentStep;
|
|
42774
|
-
});
|
|
42843
|
+
async getCurrentStepIndex() {
|
|
42844
|
+
return this.currentStep;
|
|
42775
42845
|
}
|
|
42776
42846
|
/**
|
|
42777
42847
|
* Retorna o número total de etapas do wizard.
|
|
42778
42848
|
* @returns Promise<number>
|
|
42779
42849
|
*/
|
|
42780
|
-
getTotalSteps() {
|
|
42781
|
-
return
|
|
42782
|
-
return this.panels.length;
|
|
42783
|
-
});
|
|
42850
|
+
async getTotalSteps() {
|
|
42851
|
+
return this.panels.length;
|
|
42784
42852
|
}
|
|
42785
42853
|
// ========================================
|
|
42786
42854
|
// NAVEGAÇÃO E VALIDAÇÃO
|
|
@@ -42796,64 +42864,62 @@ class Wizard {
|
|
|
42796
42864
|
* @param skipValidation - Se true, pula validação (útil para reset/programático)
|
|
42797
42865
|
* @returns Promise<boolean> - true se navegou com sucesso, false se bloqueado
|
|
42798
42866
|
*/
|
|
42799
|
-
navigateToStep(
|
|
42800
|
-
|
|
42801
|
-
|
|
42802
|
-
|
|
42803
|
-
|
|
42804
|
-
|
|
42805
|
-
|
|
42806
|
-
|
|
42867
|
+
async navigateToStep(targetStep, skipValidation = false) {
|
|
42868
|
+
/**
|
|
42869
|
+
* VALIDAÇÕES BÁSICAS
|
|
42870
|
+
* 1. Verifica se targetStep está dentro dos limites válidos
|
|
42871
|
+
* 2. Se já estamos na etapa alvo, retorna sucesso imediatamente
|
|
42872
|
+
*/
|
|
42873
|
+
if (targetStep < 1 || targetStep > this.panels.length) {
|
|
42874
|
+
return false;
|
|
42875
|
+
}
|
|
42876
|
+
if (targetStep === this.currentStep) {
|
|
42877
|
+
return true;
|
|
42878
|
+
}
|
|
42879
|
+
/**
|
|
42880
|
+
* MODO LINEAR: RESTRIÇÕES
|
|
42881
|
+
* No modo linear, não é permitido pular para etapas futuras não visitadas.
|
|
42882
|
+
* É possível voltar, mas não avançar além da próxima etapa sequencial.
|
|
42883
|
+
*/
|
|
42884
|
+
if (this.progressionType === 'linear') {
|
|
42885
|
+
if (targetStep > this.currentStep + 1) {
|
|
42886
|
+
const message = `Não é possível pular etapas. Complete a etapa ${this.currentStep + 1} antes de avançar.`;
|
|
42887
|
+
this.announceToScreenReader(message);
|
|
42888
|
+
this.brWizardNavigationBlocked.emit('linear-progression');
|
|
42807
42889
|
return false;
|
|
42808
42890
|
}
|
|
42809
|
-
|
|
42810
|
-
|
|
42811
|
-
|
|
42812
|
-
|
|
42813
|
-
|
|
42814
|
-
|
|
42815
|
-
|
|
42816
|
-
|
|
42817
|
-
|
|
42818
|
-
|
|
42819
|
-
|
|
42820
|
-
|
|
42821
|
-
|
|
42822
|
-
|
|
42823
|
-
}
|
|
42824
|
-
}
|
|
42891
|
+
}
|
|
42892
|
+
/**
|
|
42893
|
+
* VALIDAÇÃO CUSTOMIZADA
|
|
42894
|
+
* Emite evento brWizardBeforeStepChange APENAS se:
|
|
42895
|
+
* 1. Não estamos pulando validação (skipValidation=false)
|
|
42896
|
+
* 2. Estamos AVANÇANDO (targetStep > currentStep)
|
|
42897
|
+
*
|
|
42898
|
+
* Observações:
|
|
42899
|
+
* - Voltar não precisa validar
|
|
42900
|
+
* - Validação se aplica a ambos os modos (linear e nonlinear)
|
|
42901
|
+
*/
|
|
42902
|
+
const shouldValidate = !skipValidation && targetStep > this.currentStep;
|
|
42903
|
+
if (shouldValidate) {
|
|
42904
|
+
const eventResult = this.brWizardBeforeStepChange.emit(targetStep);
|
|
42825
42905
|
/**
|
|
42826
|
-
*
|
|
42827
|
-
*
|
|
42828
|
-
* 1. Não estamos pulando validação (skipValidation=false)
|
|
42829
|
-
* 2. Estamos AVANÇANDO (targetStep > currentStep)
|
|
42830
|
-
*
|
|
42831
|
-
* Observações:
|
|
42832
|
-
* - Voltar não precisa validar
|
|
42833
|
-
* - Validação se aplica a ambos os modos (linear e nonlinear)
|
|
42906
|
+
* Se preventDefault() foi chamado no listener do evento,
|
|
42907
|
+
* bloqueia a navegação e retorna false
|
|
42834
42908
|
*/
|
|
42835
|
-
|
|
42836
|
-
|
|
42837
|
-
|
|
42838
|
-
|
|
42839
|
-
|
|
42840
|
-
* bloqueia a navegação e retorna false
|
|
42841
|
-
*/
|
|
42842
|
-
if (eventResult.defaultPrevented) {
|
|
42843
|
-
const message = 'Não é possível avançar. Verifique os campos obrigatórios da etapa atual.';
|
|
42844
|
-
this.announceToScreenReader(message);
|
|
42845
|
-
this.brWizardNavigationBlocked.emit('validation-failed');
|
|
42846
|
-
return false;
|
|
42847
|
-
}
|
|
42909
|
+
if (eventResult.defaultPrevented) {
|
|
42910
|
+
const message = 'Não é possível avançar. Verifique os campos obrigatórios da etapa atual.';
|
|
42911
|
+
this.announceToScreenReader(message);
|
|
42912
|
+
this.brWizardNavigationBlocked.emit('validation-failed');
|
|
42913
|
+
return false;
|
|
42848
42914
|
}
|
|
42849
|
-
|
|
42850
|
-
|
|
42851
|
-
|
|
42852
|
-
|
|
42853
|
-
|
|
42854
|
-
|
|
42855
|
-
|
|
42856
|
-
|
|
42915
|
+
}
|
|
42916
|
+
/**
|
|
42917
|
+
* EXECUTA NAVEGAÇÃO
|
|
42918
|
+
* Atualiza o estado interno e emite evento de confirmação
|
|
42919
|
+
*/
|
|
42920
|
+
this.currentStep = targetStep;
|
|
42921
|
+
this.brWizardStepChange.emit(this.currentStep);
|
|
42922
|
+
return true;
|
|
42857
42923
|
}
|
|
42858
42924
|
// ========================================
|
|
42859
42925
|
// SINCRONIZAÇÃO COM BR-STEP
|
|
@@ -42864,35 +42930,33 @@ class Wizard {
|
|
|
42864
42930
|
* O br-step já gerencia completamente os atributos 'active' via componentShouldUpdate
|
|
42865
42931
|
* e requestAnimationFrame, então apenas chamamos os métodos de navegação dele.
|
|
42866
42932
|
*/
|
|
42867
|
-
syncWithBrStep() {
|
|
42868
|
-
|
|
42869
|
-
|
|
42870
|
-
|
|
42871
|
-
|
|
42872
|
-
|
|
42873
|
-
|
|
42874
|
-
|
|
42875
|
-
|
|
42876
|
-
|
|
42877
|
-
|
|
42878
|
-
|
|
42879
|
-
|
|
42880
|
-
|
|
42881
|
-
|
|
42882
|
-
yield this.stepRef.ProceedToNextStep();
|
|
42883
|
-
}
|
|
42933
|
+
async syncWithBrStep() {
|
|
42934
|
+
if (this.stepRef === null)
|
|
42935
|
+
return;
|
|
42936
|
+
if (typeof this.stepRef.GetActiveStep !== 'function') {
|
|
42937
|
+
return;
|
|
42938
|
+
}
|
|
42939
|
+
this.isSyncingWithStep = true;
|
|
42940
|
+
try {
|
|
42941
|
+
const targetStepIndex = this.currentStep - 1;
|
|
42942
|
+
const currentActiveStep = await this.stepRef.GetActiveStep();
|
|
42943
|
+
if (currentActiveStep !== targetStepIndex) {
|
|
42944
|
+
const diff = targetStepIndex - currentActiveStep;
|
|
42945
|
+
if (diff > 0) {
|
|
42946
|
+
for (let i = 0; i < diff; i++) {
|
|
42947
|
+
await this.stepRef.ProceedToNextStep();
|
|
42884
42948
|
}
|
|
42885
|
-
|
|
42886
|
-
|
|
42887
|
-
|
|
42888
|
-
|
|
42949
|
+
}
|
|
42950
|
+
else {
|
|
42951
|
+
for (let i = 0; i < Math.abs(diff); i++) {
|
|
42952
|
+
await this.stepRef.BackToPreviousStep();
|
|
42889
42953
|
}
|
|
42890
42954
|
}
|
|
42891
42955
|
}
|
|
42892
|
-
|
|
42893
|
-
|
|
42894
|
-
|
|
42895
|
-
}
|
|
42956
|
+
}
|
|
42957
|
+
finally {
|
|
42958
|
+
this.isSyncingWithStep = false;
|
|
42959
|
+
}
|
|
42896
42960
|
}
|
|
42897
42961
|
// ========================================
|
|
42898
42962
|
// GERENCIAMENTO DE PAINÉIS
|
|
@@ -42909,16 +42973,14 @@ class Wizard {
|
|
|
42909
42973
|
* Atualiza estados de todos os painéis.
|
|
42910
42974
|
* Define o índice e o estado ativo de cada painel.
|
|
42911
42975
|
*/
|
|
42912
|
-
updatePanels() {
|
|
42913
|
-
|
|
42914
|
-
|
|
42915
|
-
|
|
42916
|
-
|
|
42917
|
-
|
|
42918
|
-
|
|
42919
|
-
|
|
42920
|
-
}
|
|
42921
|
-
});
|
|
42976
|
+
async updatePanels() {
|
|
42977
|
+
for (let idx = 0; idx < this.panels.length; idx++) {
|
|
42978
|
+
const panel = this.panels[idx];
|
|
42979
|
+
const stepNumber = idx + 1;
|
|
42980
|
+
const isActive = stepNumber === this.currentStep;
|
|
42981
|
+
await panel.setIndex(stepNumber);
|
|
42982
|
+
await panel.setActive(isActive);
|
|
42983
|
+
}
|
|
42922
42984
|
}
|
|
42923
42985
|
/**
|
|
42924
42986
|
* Define etapa inicial baseada na prop initialStep.
|
|
@@ -43199,28 +43261,22 @@ class WizardPanel {
|
|
|
43199
43261
|
* Define se o painel está ativo
|
|
43200
43262
|
* @internal Método interno chamado apenas pelo wizard pai
|
|
43201
43263
|
*/
|
|
43202
|
-
setActive(value) {
|
|
43203
|
-
|
|
43204
|
-
this.active = value;
|
|
43205
|
-
});
|
|
43264
|
+
async setActive(value) {
|
|
43265
|
+
this.active = value;
|
|
43206
43266
|
}
|
|
43207
43267
|
/**
|
|
43208
43268
|
* Define o índice do painel
|
|
43209
43269
|
* @internal Método interno chamado apenas pelo wizard pai
|
|
43210
43270
|
*/
|
|
43211
|
-
setIndex(value) {
|
|
43212
|
-
|
|
43213
|
-
this.index = value;
|
|
43214
|
-
});
|
|
43271
|
+
async setIndex(value) {
|
|
43272
|
+
this.index = value;
|
|
43215
43273
|
}
|
|
43216
43274
|
/**
|
|
43217
43275
|
* Retorna se o painel está ativo
|
|
43218
43276
|
* @internal Método interno para o wizard pai consultar o estado
|
|
43219
43277
|
*/
|
|
43220
|
-
isActive() {
|
|
43221
|
-
return
|
|
43222
|
-
return this.active;
|
|
43223
|
-
});
|
|
43278
|
+
async isActive() {
|
|
43279
|
+
return this.active;
|
|
43224
43280
|
}
|
|
43225
43281
|
render() {
|
|
43226
43282
|
const hostAttrs = Object.assign({}, (this.active && { active: 'true' }));
|