acai-ui 1.65.5
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/CHANGELOG.md +795 -0
- package/README.md +64 -0
- package/dist/acai-ui.css +14627 -0
- package/dist/components/actions/acai-ui-actions.d.ts +3 -0
- package/dist/components/async-select/acai-ui-async-select-interface.d.ts +48 -0
- package/dist/components/async-select/acai-ui-async-select-interface.d.ts.map +1 -0
- package/dist/components/async-select/acai-ui-async-select.d.ts +3 -0
- package/dist/components/badge/acai-ui-badge-interface.d.ts +20 -0
- package/dist/components/badge/acai-ui-badge-interface.d.ts.map +1 -0
- package/dist/components/badge/acai-ui-badge.d.ts +3 -0
- package/dist/components/banner/acai-ui-banner-interface.d.ts +16 -0
- package/dist/components/banner/acai-ui-banner-interface.d.ts.map +1 -0
- package/dist/components/banner/acai-ui-banner.d.ts +3 -0
- package/dist/components/button/acai-ui-button-interface.d.ts +21 -0
- package/dist/components/button/acai-ui-button-interface.d.ts.map +1 -0
- package/dist/components/button/acai-ui-button.d.ts +3 -0
- package/dist/components/card/acai-ui-card-interface.d.ts +14 -0
- package/dist/components/card/acai-ui-card-interface.d.ts.map +1 -0
- package/dist/components/card/acai-ui-card.d.ts +3 -0
- package/dist/components/chart/acai-ui-chart-interface.d.ts +190 -0
- package/dist/components/chart/acai-ui-chart-interface.d.ts.map +1 -0
- package/dist/components/chart/acai-ui-chart.d.ts +3 -0
- package/dist/components/chart/chart-a11y.d.ts +40 -0
- package/dist/components/chart/chart-a11y.d.ts.map +1 -0
- package/dist/components/chart/chart-caminhos.d.ts +91 -0
- package/dist/components/chart/chart-caminhos.d.ts.map +1 -0
- package/dist/components/chart/chart-cartesiano.d.ts +3 -0
- package/dist/components/chart/chart-dados.d.ts +74 -0
- package/dist/components/chart/chart-dados.d.ts.map +1 -0
- package/dist/components/chart/chart-escalas.d.ts +45 -0
- package/dist/components/chart/chart-escalas.d.ts.map +1 -0
- package/dist/components/chart/chart-formatar.d.ts +21 -0
- package/dist/components/chart/chart-formatar.d.ts.map +1 -0
- package/dist/components/chart/chart-gauge.d.ts +3 -0
- package/dist/components/chart/chart-headless.d.ts +29 -0
- package/dist/components/chart/chart-headless.d.ts.map +1 -0
- package/dist/components/chart/chart-imagem.d.ts +51 -0
- package/dist/components/chart/chart-imagem.d.ts.map +1 -0
- package/dist/components/chart/chart-layout.d.ts +59 -0
- package/dist/components/chart/chart-layout.d.ts.map +1 -0
- package/dist/components/chart/chart-legenda.d.ts +3 -0
- package/dist/components/chart/chart-pizza.d.ts +3 -0
- package/dist/components/chart/chart-plano.d.ts +201 -0
- package/dist/components/chart/chart-plano.d.ts.map +1 -0
- package/dist/components/chart/chart-rotulos.d.ts +10 -0
- package/dist/components/chart/chart-rotulos.d.ts.map +1 -0
- package/dist/components/chart/chart-tabela.d.ts +3 -0
- package/dist/components/chart/chart-ticks.d.ts +35 -0
- package/dist/components/chart/chart-ticks.d.ts.map +1 -0
- package/dist/components/checkbox/acai-ui-checkbox-interface.d.ts +16 -0
- package/dist/components/checkbox/acai-ui-checkbox-interface.d.ts.map +1 -0
- package/dist/components/checkbox/acai-ui-checkbox.d.ts +3 -0
- package/dist/components/chip/acai-ui-chip-interface.d.ts +17 -0
- package/dist/components/chip/acai-ui-chip-interface.d.ts.map +1 -0
- package/dist/components/chip/acai-ui-chip.d.ts +3 -0
- package/dist/components/code/acai-ui-code-interface.d.ts +44 -0
- package/dist/components/code/acai-ui-code-interface.d.ts.map +1 -0
- package/dist/components/code/acai-ui-code.d.ts +3 -0
- package/dist/components/code/dobras-json.d.ts +14 -0
- package/dist/components/code/dobras-json.d.ts.map +1 -0
- package/dist/components/confirm/acai-ui-confirm.d.ts +3 -0
- package/dist/components/container/acai-ui-container-interface.d.ts +29 -0
- package/dist/components/container/acai-ui-container-interface.d.ts.map +1 -0
- package/dist/components/container/acai-ui-container.d.ts +3 -0
- package/dist/components/date/acai-ui-date-interface.d.ts +19 -0
- package/dist/components/date/acai-ui-date-interface.d.ts.map +1 -0
- package/dist/components/date/acai-ui-date.d.ts +3 -0
- package/dist/components/date-range/acai-ui-date-range-interface.d.ts +27 -0
- package/dist/components/date-range/acai-ui-date-range-interface.d.ts.map +1 -0
- package/dist/components/date-range/acai-ui-date-range.d.ts +3 -0
- package/dist/components/datetime/acai-ui-datetime-interface.d.ts +10 -0
- package/dist/components/datetime/acai-ui-datetime-interface.d.ts.map +1 -0
- package/dist/components/datetime/acai-ui-datetime.d.ts +3 -0
- package/dist/components/dialog/acai-ui-dialog-interface.d.ts +17 -0
- package/dist/components/dialog/acai-ui-dialog-interface.d.ts.map +1 -0
- package/dist/components/dialog/acai-ui-dialog.d.ts +3 -0
- package/dist/components/divider/acai-ui-divider-interface.d.ts +5 -0
- package/dist/components/divider/acai-ui-divider-interface.d.ts.map +1 -0
- package/dist/components/divider/acai-ui-divider.d.ts +3 -0
- package/dist/components/drawer/acai-ui-drawer-interface.d.ts +97 -0
- package/dist/components/drawer/acai-ui-drawer-interface.d.ts.map +1 -0
- package/dist/components/drawer/acai-ui-drawer.d.ts +3 -0
- package/dist/components/drawer/drawer-sidebar-helper.d.ts +4 -0
- package/dist/components/drawer/drawer-sidebar-helper.d.ts.map +1 -0
- package/dist/components/dropdown/acai-ui-dropdown-interface.d.ts +35 -0
- package/dist/components/dropdown/acai-ui-dropdown-interface.d.ts.map +1 -0
- package/dist/components/dropdown/acai-ui-dropdown-item.d.ts +3 -0
- package/dist/components/dropdown/acai-ui-dropdown.d.ts +3 -0
- package/dist/components/error-log/acai-ui-error-log-interface.d.ts +59 -0
- package/dist/components/error-log/acai-ui-error-log-interface.d.ts.map +1 -0
- package/dist/components/error-log/acai-ui-error-log-json-tree.d.ts +3 -0
- package/dist/components/error-log/acai-ui-error-log-redigir.d.ts +28 -0
- package/dist/components/error-log/acai-ui-error-log-redigir.d.ts.map +1 -0
- package/dist/components/error-log/acai-ui-error-log.d.ts +3 -0
- package/dist/components/file/acai-ui-file-interface.d.ts +13 -0
- package/dist/components/file/acai-ui-file-interface.d.ts.map +1 -0
- package/dist/components/file/acai-ui-file.d.ts +3 -0
- package/dist/components/form/acai-ui-form-interface.d.ts +37 -0
- package/dist/components/form/acai-ui-form-interface.d.ts.map +1 -0
- package/dist/components/form/acai-ui-form.d.ts +3 -0
- package/dist/components/help/acai-ui-help-interface.d.ts +184 -0
- package/dist/components/help/acai-ui-help-interface.d.ts.map +1 -0
- package/dist/components/help/acai-ui-help.d.ts +3 -0
- package/dist/components/help/acai-ui-tour.d.ts +3 -0
- package/dist/components/help/tour-escolha.d.ts +62 -0
- package/dist/components/help/tour-escolha.d.ts.map +1 -0
- package/dist/components/help/tour-posicionar.d.ts +39 -0
- package/dist/components/help/tour-posicionar.d.ts.map +1 -0
- package/dist/components/help/tour-registry.d.ts +54 -0
- package/dist/components/help/tour-registry.d.ts.map +1 -0
- package/dist/components/help/use-tour-visto.d.ts +11 -0
- package/dist/components/help/use-tour-visto.d.ts.map +1 -0
- package/dist/components/icon/acai-ui-icon-interface.d.ts +12 -0
- package/dist/components/icon/acai-ui-icon-interface.d.ts.map +1 -0
- package/dist/components/icon/acai-ui-icon.d.ts +3 -0
- package/dist/components/index.d.ts +89 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/input/acai-ui-input-interface.d.ts +20 -0
- package/dist/components/input/acai-ui-input-interface.d.ts.map +1 -0
- package/dist/components/input/acai-ui-input.d.ts +3 -0
- package/dist/components/modal/acai-ui-modal-interface.d.ts +16 -0
- package/dist/components/modal/acai-ui-modal-interface.d.ts.map +1 -0
- package/dist/components/modal/acai-ui-modal.d.ts +3 -0
- package/dist/components/pagination/acai-ui-pagination-interface.d.ts +9 -0
- package/dist/components/pagination/acai-ui-pagination-interface.d.ts.map +1 -0
- package/dist/components/pagination/acai-ui-pagination.d.ts +3 -0
- package/dist/components/preferences/acai-ui-preferences-interface.d.ts +5 -0
- package/dist/components/preferences/acai-ui-preferences-interface.d.ts.map +1 -0
- package/dist/components/preferences/acai-ui-preferences.d.ts +3 -0
- package/dist/components/progress/acai-ui-progress-interface.d.ts +18 -0
- package/dist/components/progress/acai-ui-progress-interface.d.ts.map +1 -0
- package/dist/components/progress/acai-ui-progress.d.ts +3 -0
- package/dist/components/radio/acai-ui-radio-interface.d.ts +13 -0
- package/dist/components/radio/acai-ui-radio-interface.d.ts.map +1 -0
- package/dist/components/radio/acai-ui-radio.d.ts +3 -0
- package/dist/components/section/acai-ui-section.d.ts +3 -0
- package/dist/components/select/acai-ui-select-interface.d.ts +18 -0
- package/dist/components/select/acai-ui-select-interface.d.ts.map +1 -0
- package/dist/components/select/acai-ui-select.d.ts +3 -0
- package/dist/components/session-clock/acai-ui-session-clock.d.ts +3 -0
- package/dist/components/stepper/acai-ui-step-interface.d.ts +18 -0
- package/dist/components/stepper/acai-ui-step-interface.d.ts.map +1 -0
- package/dist/components/stepper/acai-ui-step.d.ts +3 -0
- package/dist/components/stepper/acai-ui-stepper-interface.d.ts +53 -0
- package/dist/components/stepper/acai-ui-stepper-interface.d.ts.map +1 -0
- package/dist/components/stepper/acai-ui-stepper.d.ts +3 -0
- package/dist/components/swagger/acai-ui-swagger-interface.d.ts +53 -0
- package/dist/components/swagger/acai-ui-swagger-interface.d.ts.map +1 -0
- package/dist/components/swagger/acai-ui-swagger-operacao.d.ts +3 -0
- package/dist/components/swagger/acai-ui-swagger-requisicao.d.ts +76 -0
- package/dist/components/swagger/acai-ui-swagger-requisicao.d.ts.map +1 -0
- package/dist/components/swagger/acai-ui-swagger-schema.d.ts +3 -0
- package/dist/components/swagger/acai-ui-swagger.d.ts +3 -0
- package/dist/components/swagger/openapi-normalizar.d.ts +51 -0
- package/dist/components/swagger/openapi-normalizar.d.ts.map +1 -0
- package/dist/components/swagger/openapi-tipos.d.ts +167 -0
- package/dist/components/swagger/openapi-tipos.d.ts.map +1 -0
- package/dist/components/table/acai-ui-table-interface.d.ts +47 -0
- package/dist/components/table/acai-ui-table-interface.d.ts.map +1 -0
- package/dist/components/table/acai-ui-table-justificativa.d.ts +3 -0
- package/dist/components/table/acai-ui-table.d.ts +3 -0
- package/dist/components/tabs/acai-ui-tab.d.ts +3 -0
- package/dist/components/tabs/acai-ui-tabs-interface.d.ts +32 -0
- package/dist/components/tabs/acai-ui-tabs-interface.d.ts.map +1 -0
- package/dist/components/tabs/acai-ui-tabs.d.ts +3 -0
- package/dist/components/time/acai-ui-time-interface.d.ts +15 -0
- package/dist/components/time/acai-ui-time-interface.d.ts.map +1 -0
- package/dist/components/time/acai-ui-time.d.ts +3 -0
- package/dist/components/toggle/acai-ui-toggle-interface.d.ts +12 -0
- package/dist/components/toggle/acai-ui-toggle-interface.d.ts.map +1 -0
- package/dist/components/toggle/acai-ui-toggle.d.ts +3 -0
- package/dist/components/tooltip/acai-ui-tooltip-interface.d.ts +9 -0
- package/dist/components/tooltip/acai-ui-tooltip-interface.d.ts.map +1 -0
- package/dist/components/tooltip/acai-ui-tooltip.d.ts +3 -0
- package/dist/components/user-menu/acai-ui-user-menu-interface.d.ts +14 -0
- package/dist/components/user-menu/acai-ui-user-menu-interface.d.ts.map +1 -0
- package/dist/components/user-menu/acai-ui-user-menu.d.ts +3 -0
- package/dist/components/validation/acai-ui-validation.d.ts +3 -0
- package/dist/constants/chart-paleta.d.ts +47 -0
- package/dist/constants/chart-paleta.d.ts.map +1 -0
- package/dist/constants/efeitos.d.ts +22 -0
- package/dist/constants/efeitos.d.ts.map +1 -0
- package/dist/constants/index.d.ts +13 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/lista-icons.d.ts +156 -0
- package/dist/constants/lista-icons.d.ts.map +1 -0
- package/dist/constants/medidas-espacos.d.ts +15 -0
- package/dist/constants/medidas-espacos.d.ts.map +1 -0
- package/dist/constants/radius.d.ts +15 -0
- package/dist/constants/radius.d.ts.map +1 -0
- package/dist/constants/status-badge.d.ts +17 -0
- package/dist/constants/status-badge.d.ts.map +1 -0
- package/dist/hooks/filtros-url-internos.d.ts +121 -0
- package/dist/hooks/filtros-url-internos.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +18 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/notify.d.ts +8 -0
- package/dist/hooks/notify.d.ts.map +1 -0
- package/dist/hooks/use-contador-sessao.d.ts +22 -0
- package/dist/hooks/use-contador-sessao.d.ts.map +1 -0
- package/dist/hooks/use-filtros-na-url.d.ts +110 -0
- package/dist/hooks/use-filtros-na-url.d.ts.map +1 -0
- package/dist/hooks/use-leitura-voz.d.ts +60 -0
- package/dist/hooks/use-leitura-voz.d.ts.map +1 -0
- package/dist/hooks/use-listagem-na-url.d.ts +185 -0
- package/dist/hooks/use-listagem-na-url.d.ts.map +1 -0
- package/dist/hooks/use-preferencias.d.ts +60 -0
- package/dist/hooks/use-preferencias.d.ts.map +1 -0
- package/dist/hooks/use-repasse-quasar.d.ts +42 -0
- package/dist/hooks/use-repasse-quasar.d.ts.map +1 -0
- package/dist/hooks/use-tamanho-elemento.d.ts +26 -0
- package/dist/hooks/use-tamanho-elemento.d.ts.map +1 -0
- package/dist/hooks/use-tela.d.ts +84 -0
- package/dist/hooks/use-tela.d.ts.map +1 -0
- package/dist/hooks/use-validacao-visual.d.ts +40 -0
- package/dist/hooks/use-validacao-visual.d.ts.map +1 -0
- package/dist/index.cjs +249 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +249 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index10.cjs +24 -0
- package/dist/index10.cjs.map +1 -0
- package/dist/index10.mjs +25 -0
- package/dist/index10.mjs.map +1 -0
- package/dist/index100.cjs +51 -0
- package/dist/index100.cjs.map +1 -0
- package/dist/index100.mjs +51 -0
- package/dist/index100.mjs.map +1 -0
- package/dist/index101.cjs +143 -0
- package/dist/index101.cjs.map +1 -0
- package/dist/index101.mjs +143 -0
- package/dist/index101.mjs.map +1 -0
- package/dist/index102.cjs +137 -0
- package/dist/index102.cjs.map +1 -0
- package/dist/index102.mjs +138 -0
- package/dist/index102.mjs.map +1 -0
- package/dist/index104.cjs +10 -0
- package/dist/index104.cjs.map +1 -0
- package/dist/index104.mjs +11 -0
- package/dist/index104.mjs.map +1 -0
- package/dist/index105.cjs +5 -0
- package/dist/index105.cjs.map +1 -0
- package/dist/index105.mjs +6 -0
- package/dist/index105.mjs.map +1 -0
- package/dist/index106.cjs +5 -0
- package/dist/index106.cjs.map +1 -0
- package/dist/index106.mjs +6 -0
- package/dist/index106.mjs.map +1 -0
- package/dist/index107.cjs +86 -0
- package/dist/index107.cjs.map +1 -0
- package/dist/index107.mjs +87 -0
- package/dist/index107.mjs.map +1 -0
- package/dist/index109.cjs +123 -0
- package/dist/index109.cjs.map +1 -0
- package/dist/index109.mjs +124 -0
- package/dist/index109.mjs.map +1 -0
- package/dist/index111.cjs +121 -0
- package/dist/index111.cjs.map +1 -0
- package/dist/index111.mjs +122 -0
- package/dist/index111.mjs.map +1 -0
- package/dist/index113.cjs +72 -0
- package/dist/index113.cjs.map +1 -0
- package/dist/index113.mjs +73 -0
- package/dist/index113.mjs.map +1 -0
- package/dist/index115.cjs +5 -0
- package/dist/index115.cjs.map +1 -0
- package/dist/index115.mjs +6 -0
- package/dist/index115.mjs.map +1 -0
- package/dist/index116.cjs +56 -0
- package/dist/index116.cjs.map +1 -0
- package/dist/index116.mjs +57 -0
- package/dist/index116.mjs.map +1 -0
- package/dist/index118.cjs +5 -0
- package/dist/index118.cjs.map +1 -0
- package/dist/index118.mjs +6 -0
- package/dist/index118.mjs.map +1 -0
- package/dist/index119.cjs +210 -0
- package/dist/index119.cjs.map +1 -0
- package/dist/index119.mjs +211 -0
- package/dist/index119.mjs.map +1 -0
- package/dist/index12.cjs +606 -0
- package/dist/index12.cjs.map +1 -0
- package/dist/index12.mjs +607 -0
- package/dist/index12.mjs.map +1 -0
- package/dist/index121.cjs +170 -0
- package/dist/index121.cjs.map +1 -0
- package/dist/index121.mjs +171 -0
- package/dist/index121.mjs.map +1 -0
- package/dist/index123.cjs +109 -0
- package/dist/index123.cjs.map +1 -0
- package/dist/index123.mjs +110 -0
- package/dist/index123.mjs.map +1 -0
- package/dist/index125.cjs +5 -0
- package/dist/index125.cjs.map +1 -0
- package/dist/index125.mjs +6 -0
- package/dist/index125.mjs.map +1 -0
- package/dist/index126.cjs +4 -0
- package/dist/index126.cjs.map +1 -0
- package/dist/index126.mjs +5 -0
- package/dist/index126.mjs.map +1 -0
- package/dist/index127.cjs +300 -0
- package/dist/index127.cjs.map +1 -0
- package/dist/index127.mjs +301 -0
- package/dist/index127.mjs.map +1 -0
- package/dist/index130.cjs +5 -0
- package/dist/index130.cjs.map +1 -0
- package/dist/index130.mjs +6 -0
- package/dist/index130.mjs.map +1 -0
- package/dist/index131.cjs +5 -0
- package/dist/index131.cjs.map +1 -0
- package/dist/index131.mjs +6 -0
- package/dist/index131.mjs.map +1 -0
- package/dist/index132.cjs +128 -0
- package/dist/index132.cjs.map +1 -0
- package/dist/index132.mjs +129 -0
- package/dist/index132.mjs.map +1 -0
- package/dist/index134.cjs +4 -0
- package/dist/index134.cjs.map +1 -0
- package/dist/index134.mjs +5 -0
- package/dist/index134.mjs.map +1 -0
- package/dist/index135.cjs +180 -0
- package/dist/index135.cjs.map +1 -0
- package/dist/index135.mjs +181 -0
- package/dist/index135.mjs.map +1 -0
- package/dist/index137.cjs +83 -0
- package/dist/index137.cjs.map +1 -0
- package/dist/index137.mjs +84 -0
- package/dist/index137.mjs.map +1 -0
- package/dist/index139.cjs +284 -0
- package/dist/index139.cjs.map +1 -0
- package/dist/index139.mjs +285 -0
- package/dist/index139.mjs.map +1 -0
- package/dist/index14.cjs +124 -0
- package/dist/index14.cjs.map +1 -0
- package/dist/index14.mjs +125 -0
- package/dist/index14.mjs.map +1 -0
- package/dist/index141.cjs +58 -0
- package/dist/index141.cjs.map +1 -0
- package/dist/index141.mjs +59 -0
- package/dist/index141.mjs.map +1 -0
- package/dist/index143.cjs +5 -0
- package/dist/index143.cjs.map +1 -0
- package/dist/index143.mjs +6 -0
- package/dist/index143.mjs.map +1 -0
- package/dist/index144.cjs +399 -0
- package/dist/index144.cjs.map +1 -0
- package/dist/index144.mjs +400 -0
- package/dist/index144.mjs.map +1 -0
- package/dist/index146.cjs +305 -0
- package/dist/index146.cjs.map +1 -0
- package/dist/index146.mjs +306 -0
- package/dist/index146.mjs.map +1 -0
- package/dist/index149.cjs +109 -0
- package/dist/index149.cjs.map +1 -0
- package/dist/index149.mjs +110 -0
- package/dist/index149.mjs.map +1 -0
- package/dist/index152.cjs +5 -0
- package/dist/index152.cjs.map +1 -0
- package/dist/index152.mjs +6 -0
- package/dist/index152.mjs.map +1 -0
- package/dist/index153.cjs +5 -0
- package/dist/index153.cjs.map +1 -0
- package/dist/index153.mjs +6 -0
- package/dist/index153.mjs.map +1 -0
- package/dist/index154.cjs +4 -0
- package/dist/index154.cjs.map +1 -0
- package/dist/index154.mjs +5 -0
- package/dist/index154.mjs.map +1 -0
- package/dist/index155.cjs +5 -0
- package/dist/index155.cjs.map +1 -0
- package/dist/index155.mjs +6 -0
- package/dist/index155.mjs.map +1 -0
- package/dist/index156.cjs +5 -0
- package/dist/index156.cjs.map +1 -0
- package/dist/index156.mjs +6 -0
- package/dist/index156.mjs.map +1 -0
- package/dist/index157.cjs +5 -0
- package/dist/index157.cjs.map +1 -0
- package/dist/index157.mjs +6 -0
- package/dist/index157.mjs.map +1 -0
- package/dist/index158.cjs +4 -0
- package/dist/index158.cjs.map +1 -0
- package/dist/index158.mjs +5 -0
- package/dist/index158.mjs.map +1 -0
- package/dist/index159.cjs +59 -0
- package/dist/index159.cjs.map +1 -0
- package/dist/index159.mjs +60 -0
- package/dist/index159.mjs.map +1 -0
- package/dist/index16.cjs +89 -0
- package/dist/index16.cjs.map +1 -0
- package/dist/index16.mjs +90 -0
- package/dist/index16.mjs.map +1 -0
- package/dist/index161.cjs +5 -0
- package/dist/index161.cjs.map +1 -0
- package/dist/index161.mjs +6 -0
- package/dist/index161.mjs.map +1 -0
- package/dist/index162.cjs +119 -0
- package/dist/index162.cjs.map +1 -0
- package/dist/index162.mjs +120 -0
- package/dist/index162.mjs.map +1 -0
- package/dist/index164.cjs +33 -0
- package/dist/index164.cjs.map +1 -0
- package/dist/index164.mjs +34 -0
- package/dist/index164.mjs.map +1 -0
- package/dist/index166.cjs +5 -0
- package/dist/index166.cjs.map +1 -0
- package/dist/index166.mjs +6 -0
- package/dist/index166.mjs.map +1 -0
- package/dist/index167.cjs +324 -0
- package/dist/index167.cjs.map +1 -0
- package/dist/index167.mjs +325 -0
- package/dist/index167.mjs.map +1 -0
- package/dist/index17.cjs +419 -0
- package/dist/index17.cjs.map +1 -0
- package/dist/index17.mjs +420 -0
- package/dist/index17.mjs.map +1 -0
- package/dist/index170.cjs +38 -0
- package/dist/index170.cjs.map +1 -0
- package/dist/index170.mjs +39 -0
- package/dist/index170.mjs.map +1 -0
- package/dist/index172.cjs +5 -0
- package/dist/index172.cjs.map +1 -0
- package/dist/index172.mjs +6 -0
- package/dist/index172.mjs.map +1 -0
- package/dist/index173.cjs +202 -0
- package/dist/index173.cjs.map +1 -0
- package/dist/index173.mjs +203 -0
- package/dist/index173.mjs.map +1 -0
- package/dist/index175.cjs +5 -0
- package/dist/index175.cjs.map +1 -0
- package/dist/index175.mjs +6 -0
- package/dist/index175.mjs.map +1 -0
- package/dist/index176.cjs +53 -0
- package/dist/index176.cjs.map +1 -0
- package/dist/index176.mjs +54 -0
- package/dist/index176.mjs.map +1 -0
- package/dist/index178.cjs +13 -0
- package/dist/index178.cjs.map +1 -0
- package/dist/index178.mjs +13 -0
- package/dist/index178.mjs.map +1 -0
- package/dist/index179.cjs +18 -0
- package/dist/index179.cjs.map +1 -0
- package/dist/index179.mjs +18 -0
- package/dist/index179.mjs.map +1 -0
- package/dist/index180.cjs +262 -0
- package/dist/index180.cjs.map +1 -0
- package/dist/index180.mjs +262 -0
- package/dist/index180.mjs.map +1 -0
- package/dist/index181.cjs +108 -0
- package/dist/index181.cjs.map +1 -0
- package/dist/index181.mjs +109 -0
- package/dist/index181.mjs.map +1 -0
- package/dist/index182.cjs +73 -0
- package/dist/index182.cjs.map +1 -0
- package/dist/index182.mjs +73 -0
- package/dist/index182.mjs.map +1 -0
- package/dist/index183.cjs +37 -0
- package/dist/index183.cjs.map +1 -0
- package/dist/index183.mjs +37 -0
- package/dist/index183.mjs.map +1 -0
- package/dist/index184.cjs +16 -0
- package/dist/index184.cjs.map +1 -0
- package/dist/index184.mjs +16 -0
- package/dist/index184.mjs.map +1 -0
- package/dist/index185.cjs +31 -0
- package/dist/index185.cjs.map +1 -0
- package/dist/index185.mjs +31 -0
- package/dist/index185.mjs.map +1 -0
- package/dist/index186.cjs +460 -0
- package/dist/index186.cjs.map +1 -0
- package/dist/index186.mjs +461 -0
- package/dist/index186.mjs.map +1 -0
- package/dist/index187.cjs +154 -0
- package/dist/index187.cjs.map +1 -0
- package/dist/index187.mjs +154 -0
- package/dist/index187.mjs.map +1 -0
- package/dist/index188.cjs +40 -0
- package/dist/index188.cjs.map +1 -0
- package/dist/index188.mjs +40 -0
- package/dist/index188.mjs.map +1 -0
- package/dist/index189.cjs +66 -0
- package/dist/index189.cjs.map +1 -0
- package/dist/index189.mjs +66 -0
- package/dist/index189.mjs.map +1 -0
- package/dist/index19.cjs +135 -0
- package/dist/index19.cjs.map +1 -0
- package/dist/index19.mjs +136 -0
- package/dist/index19.mjs.map +1 -0
- package/dist/index190.cjs +142 -0
- package/dist/index190.cjs.map +1 -0
- package/dist/index190.mjs +143 -0
- package/dist/index190.mjs.map +1 -0
- package/dist/index191.cjs +7 -0
- package/dist/index191.cjs.map +1 -0
- package/dist/index191.mjs +8 -0
- package/dist/index191.mjs.map +1 -0
- package/dist/index192.cjs +7 -0
- package/dist/index192.cjs.map +1 -0
- package/dist/index192.mjs +8 -0
- package/dist/index192.mjs.map +1 -0
- package/dist/index193.cjs +7 -0
- package/dist/index193.cjs.map +1 -0
- package/dist/index193.mjs +8 -0
- package/dist/index193.mjs.map +1 -0
- package/dist/index194.cjs +7 -0
- package/dist/index194.cjs.map +1 -0
- package/dist/index194.mjs +8 -0
- package/dist/index194.mjs.map +1 -0
- package/dist/index195.cjs +7 -0
- package/dist/index195.cjs.map +1 -0
- package/dist/index195.mjs +8 -0
- package/dist/index195.mjs.map +1 -0
- package/dist/index196.cjs +100 -0
- package/dist/index196.cjs.map +1 -0
- package/dist/index196.mjs +100 -0
- package/dist/index196.mjs.map +1 -0
- package/dist/index197.cjs +226 -0
- package/dist/index197.cjs.map +1 -0
- package/dist/index197.mjs +226 -0
- package/dist/index197.mjs.map +1 -0
- package/dist/index198.cjs +66 -0
- package/dist/index198.cjs.map +1 -0
- package/dist/index198.mjs +66 -0
- package/dist/index198.mjs.map +1 -0
- package/dist/index199.cjs +399 -0
- package/dist/index199.cjs.map +1 -0
- package/dist/index199.mjs +399 -0
- package/dist/index199.mjs.map +1 -0
- package/dist/index200.cjs +83 -0
- package/dist/index200.cjs.map +1 -0
- package/dist/index200.mjs +83 -0
- package/dist/index200.mjs.map +1 -0
- package/dist/index201.cjs +4 -0
- package/dist/index201.cjs.map +1 -0
- package/dist/index201.mjs +5 -0
- package/dist/index201.mjs.map +1 -0
- package/dist/index202.cjs +5 -0
- package/dist/index202.cjs.map +1 -0
- package/dist/index202.mjs +6 -0
- package/dist/index202.mjs.map +1 -0
- package/dist/index203.cjs +216 -0
- package/dist/index203.cjs.map +1 -0
- package/dist/index203.mjs +217 -0
- package/dist/index203.mjs.map +1 -0
- package/dist/index205.cjs +112 -0
- package/dist/index205.cjs.map +1 -0
- package/dist/index205.mjs +113 -0
- package/dist/index205.mjs.map +1 -0
- package/dist/index207.cjs +112 -0
- package/dist/index207.cjs.map +1 -0
- package/dist/index207.mjs +113 -0
- package/dist/index207.mjs.map +1 -0
- package/dist/index209.cjs +64 -0
- package/dist/index209.cjs.map +1 -0
- package/dist/index209.mjs +65 -0
- package/dist/index209.mjs.map +1 -0
- package/dist/index21.cjs +268 -0
- package/dist/index21.cjs.map +1 -0
- package/dist/index21.mjs +269 -0
- package/dist/index21.mjs.map +1 -0
- package/dist/index211.cjs +45 -0
- package/dist/index211.cjs.map +1 -0
- package/dist/index211.mjs +46 -0
- package/dist/index211.mjs.map +1 -0
- package/dist/index213.cjs +241 -0
- package/dist/index213.cjs.map +1 -0
- package/dist/index213.mjs +241 -0
- package/dist/index213.mjs.map +1 -0
- package/dist/index214.cjs +63 -0
- package/dist/index214.cjs.map +1 -0
- package/dist/index214.mjs +63 -0
- package/dist/index214.mjs.map +1 -0
- package/dist/index215.cjs +53 -0
- package/dist/index215.cjs.map +1 -0
- package/dist/index215.mjs +53 -0
- package/dist/index215.mjs.map +1 -0
- package/dist/index216.cjs +53 -0
- package/dist/index216.cjs.map +1 -0
- package/dist/index216.mjs +53 -0
- package/dist/index216.mjs.map +1 -0
- package/dist/index217.cjs +4 -0
- package/dist/index217.cjs.map +1 -0
- package/dist/index217.mjs +5 -0
- package/dist/index217.mjs.map +1 -0
- package/dist/index218.cjs +29 -0
- package/dist/index218.cjs.map +1 -0
- package/dist/index218.mjs +30 -0
- package/dist/index218.mjs.map +1 -0
- package/dist/index219.cjs +4 -0
- package/dist/index219.cjs.map +1 -0
- package/dist/index219.mjs +5 -0
- package/dist/index219.mjs.map +1 -0
- package/dist/index23.cjs +41 -0
- package/dist/index23.cjs.map +1 -0
- package/dist/index23.mjs +42 -0
- package/dist/index23.mjs.map +1 -0
- package/dist/index24.cjs +117 -0
- package/dist/index24.cjs.map +1 -0
- package/dist/index24.mjs +118 -0
- package/dist/index24.mjs.map +1 -0
- package/dist/index26.cjs +127 -0
- package/dist/index26.cjs.map +1 -0
- package/dist/index26.mjs +128 -0
- package/dist/index26.mjs.map +1 -0
- package/dist/index28.cjs +39 -0
- package/dist/index28.cjs.map +1 -0
- package/dist/index28.mjs +40 -0
- package/dist/index28.mjs.map +1 -0
- package/dist/index29.cjs +176 -0
- package/dist/index29.cjs.map +1 -0
- package/dist/index29.mjs +177 -0
- package/dist/index29.mjs.map +1 -0
- package/dist/index3.cjs +110 -0
- package/dist/index3.cjs.map +1 -0
- package/dist/index3.mjs +110 -0
- package/dist/index3.mjs.map +1 -0
- package/dist/index31.cjs +361 -0
- package/dist/index31.cjs.map +1 -0
- package/dist/index31.mjs +362 -0
- package/dist/index31.mjs.map +1 -0
- package/dist/index33.cjs +20 -0
- package/dist/index33.cjs.map +1 -0
- package/dist/index33.mjs +21 -0
- package/dist/index33.mjs.map +1 -0
- package/dist/index34.cjs +311 -0
- package/dist/index34.cjs.map +1 -0
- package/dist/index34.mjs +312 -0
- package/dist/index34.mjs.map +1 -0
- package/dist/index36.cjs +132 -0
- package/dist/index36.cjs.map +1 -0
- package/dist/index36.mjs +133 -0
- package/dist/index36.mjs.map +1 -0
- package/dist/index38.cjs +80 -0
- package/dist/index38.cjs.map +1 -0
- package/dist/index38.mjs +81 -0
- package/dist/index38.mjs.map +1 -0
- package/dist/index4.cjs +612 -0
- package/dist/index4.cjs.map +1 -0
- package/dist/index4.mjs +613 -0
- package/dist/index4.mjs.map +1 -0
- package/dist/index40.cjs +600 -0
- package/dist/index40.cjs.map +1 -0
- package/dist/index40.mjs +601 -0
- package/dist/index40.mjs.map +1 -0
- package/dist/index42.cjs +160 -0
- package/dist/index42.cjs.map +1 -0
- package/dist/index42.mjs +160 -0
- package/dist/index42.mjs.map +1 -0
- package/dist/index43.cjs +26 -0
- package/dist/index43.cjs.map +1 -0
- package/dist/index43.mjs +27 -0
- package/dist/index43.mjs.map +1 -0
- package/dist/index44.cjs +20 -0
- package/dist/index44.cjs.map +1 -0
- package/dist/index44.mjs +21 -0
- package/dist/index44.mjs.map +1 -0
- package/dist/index45.cjs +104 -0
- package/dist/index45.cjs.map +1 -0
- package/dist/index45.mjs +104 -0
- package/dist/index45.mjs.map +1 -0
- package/dist/index46.cjs +8 -0
- package/dist/index46.cjs.map +1 -0
- package/dist/index46.mjs +9 -0
- package/dist/index46.mjs.map +1 -0
- package/dist/index47.cjs +7 -0
- package/dist/index47.cjs.map +1 -0
- package/dist/index47.mjs +8 -0
- package/dist/index47.mjs.map +1 -0
- package/dist/index48.cjs +7 -0
- package/dist/index48.cjs.map +1 -0
- package/dist/index48.mjs +8 -0
- package/dist/index48.mjs.map +1 -0
- package/dist/index49.cjs +7 -0
- package/dist/index49.cjs.map +1 -0
- package/dist/index49.mjs +8 -0
- package/dist/index49.mjs.map +1 -0
- package/dist/index50.cjs +7 -0
- package/dist/index50.cjs.map +1 -0
- package/dist/index50.mjs +8 -0
- package/dist/index50.mjs.map +1 -0
- package/dist/index51.cjs +7 -0
- package/dist/index51.cjs.map +1 -0
- package/dist/index51.mjs +8 -0
- package/dist/index51.mjs.map +1 -0
- package/dist/index52.cjs +7 -0
- package/dist/index52.cjs.map +1 -0
- package/dist/index52.mjs +8 -0
- package/dist/index52.mjs.map +1 -0
- package/dist/index53.cjs +7 -0
- package/dist/index53.cjs.map +1 -0
- package/dist/index53.mjs +8 -0
- package/dist/index53.mjs.map +1 -0
- package/dist/index54.cjs +7 -0
- package/dist/index54.cjs.map +1 -0
- package/dist/index54.mjs +8 -0
- package/dist/index54.mjs.map +1 -0
- package/dist/index55.cjs +7 -0
- package/dist/index55.cjs.map +1 -0
- package/dist/index55.mjs +8 -0
- package/dist/index55.mjs.map +1 -0
- package/dist/index56.cjs +7 -0
- package/dist/index56.cjs.map +1 -0
- package/dist/index56.mjs +8 -0
- package/dist/index56.mjs.map +1 -0
- package/dist/index57.cjs +7 -0
- package/dist/index57.cjs.map +1 -0
- package/dist/index57.mjs +8 -0
- package/dist/index57.mjs.map +1 -0
- package/dist/index58.cjs +7 -0
- package/dist/index58.cjs.map +1 -0
- package/dist/index58.mjs +8 -0
- package/dist/index58.mjs.map +1 -0
- package/dist/index59.cjs +8 -0
- package/dist/index59.cjs.map +1 -0
- package/dist/index59.mjs +9 -0
- package/dist/index59.mjs.map +1 -0
- package/dist/index6.cjs +578 -0
- package/dist/index6.cjs.map +1 -0
- package/dist/index6.mjs +579 -0
- package/dist/index6.mjs.map +1 -0
- package/dist/index60.cjs +7 -0
- package/dist/index60.cjs.map +1 -0
- package/dist/index60.mjs +8 -0
- package/dist/index60.mjs.map +1 -0
- package/dist/index61.cjs +7 -0
- package/dist/index61.cjs.map +1 -0
- package/dist/index61.mjs +8 -0
- package/dist/index61.mjs.map +1 -0
- package/dist/index62.cjs +7 -0
- package/dist/index62.cjs.map +1 -0
- package/dist/index62.mjs +8 -0
- package/dist/index62.mjs.map +1 -0
- package/dist/index63.cjs +7 -0
- package/dist/index63.cjs.map +1 -0
- package/dist/index63.mjs +8 -0
- package/dist/index63.mjs.map +1 -0
- package/dist/index64.cjs +7 -0
- package/dist/index64.cjs.map +1 -0
- package/dist/index64.mjs +8 -0
- package/dist/index64.mjs.map +1 -0
- package/dist/index65.cjs +8 -0
- package/dist/index65.cjs.map +1 -0
- package/dist/index65.mjs +9 -0
- package/dist/index65.mjs.map +1 -0
- package/dist/index66.cjs +7 -0
- package/dist/index66.cjs.map +1 -0
- package/dist/index66.mjs +8 -0
- package/dist/index66.mjs.map +1 -0
- package/dist/index67.cjs +7 -0
- package/dist/index67.cjs.map +1 -0
- package/dist/index67.mjs +8 -0
- package/dist/index67.mjs.map +1 -0
- package/dist/index68.cjs +7 -0
- package/dist/index68.cjs.map +1 -0
- package/dist/index68.mjs +8 -0
- package/dist/index68.mjs.map +1 -0
- package/dist/index69.cjs +8 -0
- package/dist/index69.cjs.map +1 -0
- package/dist/index69.mjs +9 -0
- package/dist/index69.mjs.map +1 -0
- package/dist/index70.cjs +7 -0
- package/dist/index70.cjs.map +1 -0
- package/dist/index70.mjs +8 -0
- package/dist/index70.mjs.map +1 -0
- package/dist/index71.cjs +38 -0
- package/dist/index71.cjs.map +1 -0
- package/dist/index71.mjs +38 -0
- package/dist/index71.mjs.map +1 -0
- package/dist/index72.cjs +22 -0
- package/dist/index72.cjs.map +1 -0
- package/dist/index72.mjs +22 -0
- package/dist/index72.mjs.map +1 -0
- package/dist/index73.cjs +40 -0
- package/dist/index73.cjs.map +1 -0
- package/dist/index73.mjs +40 -0
- package/dist/index73.mjs.map +1 -0
- package/dist/index74.cjs +80 -0
- package/dist/index74.cjs.map +1 -0
- package/dist/index74.mjs +80 -0
- package/dist/index74.mjs.map +1 -0
- package/dist/index75.cjs +29 -0
- package/dist/index75.cjs.map +1 -0
- package/dist/index75.mjs +29 -0
- package/dist/index75.mjs.map +1 -0
- package/dist/index76.cjs +157 -0
- package/dist/index76.cjs.map +1 -0
- package/dist/index76.mjs +157 -0
- package/dist/index76.mjs.map +1 -0
- package/dist/index77.cjs +16 -0
- package/dist/index77.cjs.map +1 -0
- package/dist/index77.mjs +16 -0
- package/dist/index77.mjs.map +1 -0
- package/dist/index78.cjs +87 -0
- package/dist/index78.cjs.map +1 -0
- package/dist/index78.mjs +87 -0
- package/dist/index78.mjs.map +1 -0
- package/dist/index79.cjs +16 -0
- package/dist/index79.cjs.map +1 -0
- package/dist/index79.mjs +16 -0
- package/dist/index79.mjs.map +1 -0
- package/dist/index8.cjs +130 -0
- package/dist/index8.cjs.map +1 -0
- package/dist/index8.mjs +131 -0
- package/dist/index8.mjs.map +1 -0
- package/dist/index80.cjs +65 -0
- package/dist/index80.cjs.map +1 -0
- package/dist/index80.mjs +65 -0
- package/dist/index80.mjs.map +1 -0
- package/dist/index81.cjs +69 -0
- package/dist/index81.cjs.map +1 -0
- package/dist/index81.mjs +69 -0
- package/dist/index81.mjs.map +1 -0
- package/dist/index82.cjs +30 -0
- package/dist/index82.cjs.map +1 -0
- package/dist/index82.mjs +30 -0
- package/dist/index82.mjs.map +1 -0
- package/dist/index83.cjs +86 -0
- package/dist/index83.cjs.map +1 -0
- package/dist/index83.mjs +86 -0
- package/dist/index83.mjs.map +1 -0
- package/dist/index84.cjs +102 -0
- package/dist/index84.cjs.map +1 -0
- package/dist/index84.mjs +102 -0
- package/dist/index84.mjs.map +1 -0
- package/dist/index85.cjs +20 -0
- package/dist/index85.cjs.map +1 -0
- package/dist/index85.mjs +20 -0
- package/dist/index85.mjs.map +1 -0
- package/dist/index86.cjs +21 -0
- package/dist/index86.cjs.map +1 -0
- package/dist/index86.mjs +21 -0
- package/dist/index86.mjs.map +1 -0
- package/dist/index87.cjs +191 -0
- package/dist/index87.cjs.map +1 -0
- package/dist/index87.mjs +191 -0
- package/dist/index87.mjs.map +1 -0
- package/dist/index88.cjs +67 -0
- package/dist/index88.cjs.map +1 -0
- package/dist/index88.mjs +67 -0
- package/dist/index88.mjs.map +1 -0
- package/dist/index89.cjs +312 -0
- package/dist/index89.cjs.map +1 -0
- package/dist/index89.mjs +312 -0
- package/dist/index89.mjs.map +1 -0
- package/dist/index90.cjs +10 -0
- package/dist/index90.cjs.map +1 -0
- package/dist/index90.mjs +10 -0
- package/dist/index90.mjs.map +1 -0
- package/dist/index91.cjs +15 -0
- package/dist/index91.cjs.map +1 -0
- package/dist/index91.mjs +15 -0
- package/dist/index91.mjs.map +1 -0
- package/dist/index92.cjs +8 -0
- package/dist/index92.cjs.map +1 -0
- package/dist/index92.mjs +8 -0
- package/dist/index92.mjs.map +1 -0
- package/dist/index93.cjs +81 -0
- package/dist/index93.cjs.map +1 -0
- package/dist/index93.mjs +81 -0
- package/dist/index93.mjs.map +1 -0
- package/dist/index94.cjs +124 -0
- package/dist/index94.cjs.map +1 -0
- package/dist/index94.mjs +124 -0
- package/dist/index94.mjs.map +1 -0
- package/dist/index95.cjs +68 -0
- package/dist/index95.cjs.map +1 -0
- package/dist/index95.mjs +68 -0
- package/dist/index95.mjs.map +1 -0
- package/dist/index96.cjs +29 -0
- package/dist/index96.cjs.map +1 -0
- package/dist/index96.mjs +29 -0
- package/dist/index96.mjs.map +1 -0
- package/dist/index97.cjs +184 -0
- package/dist/index97.cjs.map +1 -0
- package/dist/index97.mjs +184 -0
- package/dist/index97.mjs.map +1 -0
- package/dist/index98.cjs +78 -0
- package/dist/index98.cjs.map +1 -0
- package/dist/index98.mjs +78 -0
- package/dist/index98.mjs.map +1 -0
- package/dist/index99.cjs +55 -0
- package/dist/index99.cjs.map +1 -0
- package/dist/index99.mjs +55 -0
- package/dist/index99.mjs.map +1 -0
- package/dist/plugin.d.ts +37 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/scss/_badge.scss +12 -0
- package/dist/scss/_breakpoints.scss +102 -0
- package/dist/scss/_color-utilities.scss +105 -0
- package/dist/scss/_controls.scss +135 -0
- package/dist/scss/_ds-input-base.scss +302 -0
- package/dist/scss/_ds-picker-m3.scss +179 -0
- package/dist/scss/_effects.scss +42 -0
- package/dist/scss/_overlays.scss +13 -0
- package/dist/scss/_radius.scss +24 -0
- package/dist/scss/_reset.scss +60 -0
- package/dist/scss/_scrollbar.scss +78 -0
- package/dist/scss/_spacing.scss +15 -0
- package/dist/scss/_themes.scss +493 -0
- package/dist/scss/_typography.scss +50 -0
- package/dist/scss/_utilities.scss +75 -0
- package/dist/scss/_variables.scss +143 -0
- package/dist/scss/api.scss +77 -0
- package/dist/scss/tokens.scss +13 -0
- package/dist/utils/date-utils.d.ts +48 -0
- package/dist/utils/date-utils.d.ts.map +1 -0
- package/dist/utils/dialog-utils.d.ts +17 -0
- package/dist/utils/dialog-utils.d.ts.map +1 -0
- package/dist/utils/file-utils.d.ts +20 -0
- package/dist/utils/file-utils.d.ts.map +1 -0
- package/dist/utils/filtro-input.d.ts +19 -0
- package/dist/utils/filtro-input.d.ts.map +1 -0
- package/dist/utils/form-rules.d.ts +74 -0
- package/dist/utils/form-rules.d.ts.map +1 -0
- package/dist/utils/formatadores.d.ts +15 -0
- package/dist/utils/formatadores.d.ts.map +1 -0
- package/dist/utils/gerador-id.d.ts +3 -0
- package/dist/utils/gerador-id.d.ts.map +1 -0
- package/dist/utils/hint-mensagem.d.ts +11 -0
- package/dist/utils/hint-mensagem.d.ts.map +1 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/limpar-campos.d.ts +6 -0
- package/dist/utils/limpar-campos.d.ts.map +1 -0
- package/dist/utils/masks.d.ts +16 -0
- package/dist/utils/masks.d.ts.map +1 -0
- package/dist/utils/medidas-util.d.ts +3 -0
- package/dist/utils/medidas-util.d.ts.map +1 -0
- package/dist/utils/normalizar-label.d.ts +2 -0
- package/dist/utils/normalizar-label.d.ts.map +1 -0
- package/dist/utils/scroll-elemento.d.ts +16 -0
- package/dist/utils/scroll-elemento.d.ts.map +1 -0
- package/dist/utils/validar-campo.d.ts +7 -0
- package/dist/utils/validar-campo.d.ts.map +1 -0
- package/dist/utils/validar-documentos.d.ts +12 -0
- package/dist/utils/validar-documentos.d.ts.map +1 -0
- package/dist/utils/vnode-slot.d.ts +43 -0
- package/dist/utils/vnode-slot.d.ts.map +1 -0
- package/package.json +100 -0
- package/src/components/actions/acai-ui-actions.vue +225 -0
- package/src/components/async-select/acai-ui-async-select-interface.ts +49 -0
- package/src/components/async-select/acai-ui-async-select.vue +409 -0
- package/src/components/badge/acai-ui-badge-interface.ts +19 -0
- package/src/components/badge/acai-ui-badge.vue +40 -0
- package/src/components/banner/acai-ui-banner-interface.ts +17 -0
- package/src/components/banner/acai-ui-banner-styles.scss +47 -0
- package/src/components/banner/acai-ui-banner.vue +85 -0
- package/src/components/button/acai-ui-button-interface.ts +21 -0
- package/src/components/button/acai-ui-button.vue +378 -0
- package/src/components/card/acai-ui-card-interface.ts +14 -0
- package/src/components/card/acai-ui-card-styles.scss +94 -0
- package/src/components/card/acai-ui-card.vue +148 -0
- package/src/components/chart/acai-ui-chart-interface.ts +226 -0
- package/src/components/chart/acai-ui-chart-styles.scss +141 -0
- package/src/components/chart/acai-ui-chart.vue +679 -0
- package/src/components/chart/chart-a11y.ts +184 -0
- package/src/components/chart/chart-caminhos.ts +466 -0
- package/src/components/chart/chart-cartesiano.vue +247 -0
- package/src/components/chart/chart-dados.ts +381 -0
- package/src/components/chart/chart-escalas.ts +141 -0
- package/src/components/chart/chart-formatar.ts +98 -0
- package/src/components/chart/chart-gauge.vue +152 -0
- package/src/components/chart/chart-headless.ts +130 -0
- package/src/components/chart/chart-imagem.ts +247 -0
- package/src/components/chart/chart-layout.ts +184 -0
- package/src/components/chart/chart-legenda.vue +103 -0
- package/src/components/chart/chart-pizza.vue +134 -0
- package/src/components/chart/chart-plano.ts +818 -0
- package/src/components/chart/chart-rotulos.ts +75 -0
- package/src/components/chart/chart-tabela.vue +116 -0
- package/src/components/chart/chart-ticks.ts +116 -0
- package/src/components/checkbox/acai-ui-checkbox-interface.ts +17 -0
- package/src/components/checkbox/acai-ui-checkbox.vue +114 -0
- package/src/components/chip/acai-ui-chip-interface.ts +19 -0
- package/src/components/chip/acai-ui-chip.vue +61 -0
- package/src/components/code/acai-ui-code-interface.ts +43 -0
- package/src/components/code/acai-ui-code-styles.scss +407 -0
- package/src/components/code/acai-ui-code.vue +595 -0
- package/src/components/code/dobras-json.ts +52 -0
- package/src/components/confirm/acai-ui-confirm.vue +230 -0
- package/src/components/container/acai-ui-container-interface.ts +34 -0
- package/src/components/container/acai-ui-container-styles.scss +122 -0
- package/src/components/container/acai-ui-container.vue +140 -0
- package/src/components/date/acai-ui-date-interface.ts +18 -0
- package/src/components/date/acai-ui-date.vue +191 -0
- package/src/components/date-range/acai-ui-date-range-interface.ts +27 -0
- package/src/components/date-range/acai-ui-date-range.vue +300 -0
- package/src/components/datetime/acai-ui-datetime-interface.ts +10 -0
- package/src/components/datetime/acai-ui-datetime.vue +203 -0
- package/src/components/datetime/data-hora-styles.scss +18 -0
- package/src/components/dialog/acai-ui-dialog-interface.ts +18 -0
- package/src/components/dialog/acai-ui-dialog.vue +168 -0
- package/src/components/divider/acai-ui-divider-interface.ts +4 -0
- package/src/components/divider/acai-ui-divider-styles.scss +42 -0
- package/src/components/divider/acai-ui-divider.vue +20 -0
- package/src/components/drawer/acai-ui-drawer-interface.ts +99 -0
- package/src/components/drawer/acai-ui-drawer-styles.scss +586 -0
- package/src/components/drawer/acai-ui-drawer.vue +802 -0
- package/src/components/drawer/drawer-sidebar-helper.ts +117 -0
- package/src/components/dropdown/acai-ui-dropdown-interface.ts +41 -0
- package/src/components/dropdown/acai-ui-dropdown-item.vue +36 -0
- package/src/components/dropdown/acai-ui-dropdown-styles.scss +90 -0
- package/src/components/dropdown/acai-ui-dropdown.vue +77 -0
- package/src/components/error-log/acai-ui-error-log-interface.ts +59 -0
- package/src/components/error-log/acai-ui-error-log-json-tree.vue +426 -0
- package/src/components/error-log/acai-ui-error-log-redigir.ts +74 -0
- package/src/components/error-log/acai-ui-error-log-styles.scss +137 -0
- package/src/components/error-log/acai-ui-error-log.vue +318 -0
- package/src/components/file/acai-ui-file-interface.ts +28 -0
- package/src/components/file/acai-ui-file.vue +85 -0
- package/src/components/file/arquivo-styles.scss +109 -0
- package/src/components/form/acai-ui-form-grid.scss +145 -0
- package/src/components/form/acai-ui-form-interface.ts +37 -0
- package/src/components/form/acai-ui-form-styles.scss +159 -0
- package/src/components/form/acai-ui-form-validation-modal.vue +216 -0
- package/src/components/form/acai-ui-form.vue +410 -0
- package/src/components/help/acai-ui-help-interface.ts +200 -0
- package/src/components/help/acai-ui-help-styles.scss +209 -0
- package/src/components/help/acai-ui-help.vue +259 -0
- package/src/components/help/acai-ui-tour-styles.scss +292 -0
- package/src/components/help/acai-ui-tour.vue +766 -0
- package/src/components/help/tour-escolha.ts +139 -0
- package/src/components/help/tour-posicionar.ts +148 -0
- package/src/components/help/tour-registry.ts +177 -0
- package/src/components/help/use-tour-visto.ts +81 -0
- package/src/components/icon/acai-ui-icon-interface.ts +12 -0
- package/src/components/icon/acai-ui-icon.vue +33 -0
- package/src/components/index.ts +149 -0
- package/src/components/input/acai-ui-input-interface.ts +20 -0
- package/src/components/input/acai-ui-input.vue +146 -0
- package/src/components/modal/acai-ui-modal-interface.ts +19 -0
- package/src/components/modal/acai-ui-modal-styles.scss +131 -0
- package/src/components/modal/acai-ui-modal.vue +83 -0
- package/src/components/pagination/acai-ui-pagination-interface.ts +8 -0
- package/src/components/pagination/acai-ui-pagination.vue +36 -0
- package/src/components/preferences/acai-ui-preferences-interface.ts +4 -0
- package/src/components/preferences/acai-ui-preferences-styles.scss +387 -0
- package/src/components/preferences/acai-ui-preferences.vue +349 -0
- package/src/components/progress/acai-ui-progress-interface.ts +20 -0
- package/src/components/progress/acai-ui-progress.vue +124 -0
- package/src/components/radio/acai-ui-radio-interface.ts +14 -0
- package/src/components/radio/acai-ui-radio.vue +78 -0
- package/src/components/section/acai-ui-section-styles.scss +93 -0
- package/src/components/section/acai-ui-section.vue +134 -0
- package/src/components/select/acai-ui-select-interface.ts +18 -0
- package/src/components/select/acai-ui-select.vue +322 -0
- package/src/components/session-clock/acai-ui-session-clock.vue +111 -0
- package/src/components/stepper/acai-ui-step-interface.ts +18 -0
- package/src/components/stepper/acai-ui-step.vue +37 -0
- package/src/components/stepper/acai-ui-stepper-interface.ts +56 -0
- package/src/components/stepper/acai-ui-stepper-styles.scss +222 -0
- package/src/components/stepper/acai-ui-stepper.vue +231 -0
- package/src/components/swagger/acai-ui-swagger-interface.ts +54 -0
- package/src/components/swagger/acai-ui-swagger-operacao.vue +372 -0
- package/src/components/swagger/acai-ui-swagger-requisicao.ts +272 -0
- package/src/components/swagger/acai-ui-swagger-schema.vue +36 -0
- package/src/components/swagger/acai-ui-swagger-styles.scss +883 -0
- package/src/components/swagger/acai-ui-swagger.vue +349 -0
- package/src/components/swagger/openapi-normalizar.ts +514 -0
- package/src/components/swagger/openapi-tipos.ts +198 -0
- package/src/components/table/acai-ui-table-interface.ts +60 -0
- package/src/components/table/acai-ui-table-justificativa.vue +135 -0
- package/src/components/table/acai-ui-table-styles.scss +293 -0
- package/src/components/table/acai-ui-table.vue +340 -0
- package/src/components/tabs/acai-ui-tab.vue +10 -0
- package/src/components/tabs/acai-ui-tabs-interface.ts +48 -0
- package/src/components/tabs/acai-ui-tabs-styles.scss +78 -0
- package/src/components/tabs/acai-ui-tabs.vue +137 -0
- package/src/components/time/acai-ui-time-interface.ts +14 -0
- package/src/components/time/acai-ui-time.vue +86 -0
- package/src/components/toggle/acai-ui-toggle-interface.ts +13 -0
- package/src/components/toggle/acai-ui-toggle.vue +162 -0
- package/src/components/tooltip/acai-ui-tooltip-interface.ts +11 -0
- package/src/components/tooltip/acai-ui-tooltip-styles.scss +104 -0
- package/src/components/tooltip/acai-ui-tooltip.vue +90 -0
- package/src/components/user-menu/acai-ui-user-menu-interface.ts +13 -0
- package/src/components/user-menu/acai-ui-user-menu-styles.scss +125 -0
- package/src/components/user-menu/acai-ui-user-menu.vue +139 -0
- package/src/components/validation/acai-ui-validation.vue +236 -0
- package/src/constants/chart-paleta.ts +162 -0
- package/src/constants/efeitos.ts +24 -0
- package/src/constants/index.ts +24 -0
- package/src/constants/lista-icons.ts +156 -0
- package/src/constants/medidas-espacos.ts +15 -0
- package/src/constants/radius.ts +15 -0
- package/src/constants/status-badge.ts +44 -0
- package/src/env.d.ts +7 -0
- package/src/hooks/filtros-url-internos.ts +497 -0
- package/src/hooks/index.ts +22 -0
- package/src/hooks/notify.ts +18 -0
- package/src/hooks/use-contador-sessao.ts +95 -0
- package/src/hooks/use-filtros-na-url.ts +174 -0
- package/src/hooks/use-leitura-voz.ts +346 -0
- package/src/hooks/use-listagem-na-url.ts +614 -0
- package/src/hooks/use-preferencias.ts +152 -0
- package/src/hooks/use-repasse-quasar.ts +63 -0
- package/src/hooks/use-tamanho-elemento.ts +107 -0
- package/src/hooks/use-tela.ts +114 -0
- package/src/hooks/use-validacao-visual.ts +189 -0
- package/src/index.ts +30 -0
- package/src/plugin.ts +134 -0
- package/src/scss/_badge.scss +12 -0
- package/src/scss/_breakpoints.scss +102 -0
- package/src/scss/_color-utilities.scss +105 -0
- package/src/scss/_controls.scss +135 -0
- package/src/scss/_ds-input-base.scss +302 -0
- package/src/scss/_ds-picker-m3.scss +179 -0
- package/src/scss/_effects.scss +42 -0
- package/src/scss/_overlays.scss +13 -0
- package/src/scss/_radius.scss +24 -0
- package/src/scss/_reset.scss +60 -0
- package/src/scss/_scrollbar.scss +78 -0
- package/src/scss/_spacing.scss +15 -0
- package/src/scss/_themes.scss +493 -0
- package/src/scss/_typography.scss +50 -0
- package/src/scss/_utilities.scss +75 -0
- package/src/scss/_variables.scss +143 -0
- package/src/scss/api.scss +77 -0
- package/src/scss/tokens.scss +13 -0
- package/src/styles-global.scss +30 -0
- package/src/utils/date-utils.ts +128 -0
- package/src/utils/dialog-utils.ts +59 -0
- package/src/utils/file-utils.ts +85 -0
- package/src/utils/filtro-input.ts +41 -0
- package/src/utils/form-rules.ts +202 -0
- package/src/utils/formatadores.ts +97 -0
- package/src/utils/gerador-id.ts +29 -0
- package/src/utils/hint-mensagem.ts +25 -0
- package/src/utils/index.ts +32 -0
- package/src/utils/limpar-campos.ts +94 -0
- package/src/utils/masks.ts +19 -0
- package/src/utils/medidas-util.ts +5 -0
- package/src/utils/normalizar-label.ts +9 -0
- package/src/utils/scroll-elemento.ts +34 -0
- package/src/utils/validar-campo.ts +27 -0
- package/src/utils/validar-documentos.ts +86 -0
- package/src/utils/vnode-slot.ts +74 -0
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
// Núcleo compartilhado de filtros na query string.
|
|
2
|
+
//
|
|
3
|
+
// Interno: NÃO é exportado no index da lib. Existe porque `useFiltrosNaUrl` e
|
|
4
|
+
// `useListagemNaUrl` precisam da MESMA regra de serialização — se cada um
|
|
5
|
+
// tivesse a sua, o link gerado por uma tela não abriria na outra, e a diferença
|
|
6
|
+
// só apareceria em produção.
|
|
7
|
+
//
|
|
8
|
+
// O que mora aqui é a parte PURA (molde → caminhos → texto → volta) mais o
|
|
9
|
+
// adaptador de URL. Política (quando gravar, o que disparar) fica em cada hook.
|
|
10
|
+
|
|
11
|
+
import { getCurrentInstance, watch } from 'vue'
|
|
12
|
+
|
|
13
|
+
/** Tipos que sobrevivem a uma query string. Sufixo `[]` = chave repetida. */
|
|
14
|
+
export type TipoFiltroUrl =
|
|
15
|
+
| 'string'
|
|
16
|
+
| 'number'
|
|
17
|
+
| 'boolean'
|
|
18
|
+
| 'date'
|
|
19
|
+
| 'string[]'
|
|
20
|
+
| 'number[]'
|
|
21
|
+
| 'boolean[]'
|
|
22
|
+
| 'date[]'
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Separador do caminho aninhado: `?periodo.from=2026-01-01`.
|
|
26
|
+
*
|
|
27
|
+
* Ponto, e não junção camelCase (`periodoFrom`), por dois motivos: é legal em
|
|
28
|
+
* query string sem escapar, e não corre o risco de colidir com um campo que se
|
|
29
|
+
* chame de verdade `periodoFrom`. Ler a URL também mostra a estrutura.
|
|
30
|
+
*/
|
|
31
|
+
export const SEPARADOR = '.'
|
|
32
|
+
|
|
33
|
+
type TipoEscalar = 'string' | 'number' | 'boolean' | 'date'
|
|
34
|
+
|
|
35
|
+
interface Descritor {
|
|
36
|
+
escalar: TipoEscalar
|
|
37
|
+
ehArray: boolean
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Marcador de "não deu pra converter" — distinto de `null`, que é valor válido. */
|
|
41
|
+
const INVALIDO = Symbol('invalido')
|
|
42
|
+
|
|
43
|
+
export function ehObjetoSimples(valor: unknown): valor is Record<string, unknown> {
|
|
44
|
+
return (
|
|
45
|
+
valor !== null && typeof valor === 'object' && !Array.isArray(valor) && !(valor instanceof Date)
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function descritorDeclarado(tipo: TipoFiltroUrl): Descritor {
|
|
50
|
+
const ehArray = tipo.endsWith('[]')
|
|
51
|
+
return { escalar: (ehArray ? tipo.slice(0, -2) : tipo) as TipoEscalar, ehArray }
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function escalarDoValor(valor: unknown): TipoEscalar {
|
|
55
|
+
if (typeof valor === 'number') return 'number'
|
|
56
|
+
if (typeof valor === 'boolean') return 'boolean'
|
|
57
|
+
if (valor instanceof Date) return 'date'
|
|
58
|
+
// Também o caso de `null`/`undefined`: não há tipo a inferir, e string é o que
|
|
59
|
+
// menos estraga. Quem precisa do tipo certo declara em `tipos`.
|
|
60
|
+
return 'string'
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function descritorDoValor(valor: unknown): Descritor {
|
|
64
|
+
if (Array.isArray(valor)) {
|
|
65
|
+
// Array vazio não tem elemento pra amostrar — os itens ficam string. A
|
|
66
|
+
// requisição sai igual (`ids=1&ids=2`, o backend converte); só o tipo em TS
|
|
67
|
+
// fica otimista. `tipos: { ids: 'number[]' }` resolve.
|
|
68
|
+
return { escalar: valor.length > 0 ? escalarDoValor(valor[0]) : 'string', ehArray: true }
|
|
69
|
+
}
|
|
70
|
+
return { escalar: escalarDoValor(valor), ehArray: false }
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Converte o texto da URL para o tipo resolvido.
|
|
75
|
+
*
|
|
76
|
+
* ⚠️ Nunca "converter se parecer número": matrícula, CEP e protocolo têm zero à
|
|
77
|
+
* esquerda, e `'00123'` viraria `123`. A conversão só acontece quando o tipo diz
|
|
78
|
+
* que aquele campo é número.
|
|
79
|
+
*/
|
|
80
|
+
function coagirEscalar(texto: string, escalar: TipoEscalar): unknown {
|
|
81
|
+
if (escalar === 'number') {
|
|
82
|
+
const numero = Number(texto)
|
|
83
|
+
return texto.trim() !== '' && Number.isFinite(numero) ? numero : INVALIDO
|
|
84
|
+
}
|
|
85
|
+
if (escalar === 'boolean') {
|
|
86
|
+
if (texto === 'true') return true
|
|
87
|
+
if (texto === 'false') return false
|
|
88
|
+
return INVALIDO
|
|
89
|
+
}
|
|
90
|
+
if (escalar === 'date') {
|
|
91
|
+
const data = new Date(texto)
|
|
92
|
+
return Number.isNaN(data.getTime()) ? INVALIDO : data
|
|
93
|
+
}
|
|
94
|
+
return texto
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function coagir(brutos: string[], descritor: Descritor): unknown {
|
|
98
|
+
if (descritor.ehArray) {
|
|
99
|
+
const itens = brutos
|
|
100
|
+
.map((bruto) => coagirEscalar(bruto, descritor.escalar))
|
|
101
|
+
.filter((item) => item !== INVALIDO)
|
|
102
|
+
return itens.length > 0 ? itens : INVALIDO
|
|
103
|
+
}
|
|
104
|
+
const primeiro = brutos[0]
|
|
105
|
+
return primeiro === undefined ? INVALIDO : coagirEscalar(primeiro, descritor.escalar)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function ehInvalido(valor: unknown): boolean {
|
|
109
|
+
return valor === INVALIDO
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Valor do filtro → texto da URL. `null` significa "não vai pra URL". */
|
|
113
|
+
export function paraTexto(valor: unknown): string | null {
|
|
114
|
+
if (valor === null || valor === undefined || valor === '') return null
|
|
115
|
+
if (valor instanceof Date) return Number.isNaN(valor.getTime()) ? null : valor.toISOString()
|
|
116
|
+
if (typeof valor === 'string') return valor
|
|
117
|
+
if (typeof valor === 'number') return Number.isFinite(valor) ? String(valor) : null
|
|
118
|
+
if (typeof valor === 'boolean') return String(valor)
|
|
119
|
+
return null
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Mesma regra de "vazio" do `limparCamposVazios`: `''`, `null`, `undefined` e
|
|
124
|
+
* array sem item aproveitável ficam fora. `false` e `0` são valores de verdade e
|
|
125
|
+
* entram.
|
|
126
|
+
*
|
|
127
|
+
* ⚠️ Escrito à mão em vez de chamar o `limparCamposVazios`, que era o óbvio: ele
|
|
128
|
+
* trata `Date` como objeto aninhado, e como `Date` não tem chave própria
|
|
129
|
+
* enumerável, o `Object.keys({}).length === 0` DERRUBA o campo. Um filtro de data
|
|
130
|
+
* desaparecia da URL sem aviso. Aqui `Date` é valor escalar.
|
|
131
|
+
*/
|
|
132
|
+
export function estaVazio(valor: unknown): boolean {
|
|
133
|
+
if (valor === null || valor === undefined || valor === '') return true
|
|
134
|
+
if (Array.isArray(valor)) {
|
|
135
|
+
return valor.every((item) => item === null || item === undefined || item === '')
|
|
136
|
+
}
|
|
137
|
+
return false
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* O valor está no default do molde?
|
|
142
|
+
*
|
|
143
|
+
* Vale como "vazio" pra efeito de URL: se o campo está do jeito que nasceu, não
|
|
144
|
+
* há nada a lembrar. Sem isso, uma listagem recém-aberta já escreve
|
|
145
|
+
* `?page=0&size=10&somenteAtivos=false` — a URL vira ruído antes de a pessoa
|
|
146
|
+
* pesquisar.
|
|
147
|
+
*
|
|
148
|
+
* Não se perde informação: chave ausente na URL cai no molde na hidratação, que
|
|
149
|
+
* é exatamente o mesmo valor.
|
|
150
|
+
*/
|
|
151
|
+
export function igualAoMolde(valor: unknown, molde: unknown): boolean {
|
|
152
|
+
if (valor instanceof Date && molde instanceof Date) return valor.getTime() === molde.getTime()
|
|
153
|
+
if (Array.isArray(valor) && Array.isArray(molde)) {
|
|
154
|
+
return valor.length === molde.length && valor.every((item, i) => item === molde[i])
|
|
155
|
+
}
|
|
156
|
+
return valor === molde
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const avisados = new Set<string>()
|
|
160
|
+
|
|
161
|
+
/** Só um nível de aninhamento tem serialização honesta em query string. */
|
|
162
|
+
export function avisarNaoSuportado(caminho: string, motivo: string): void {
|
|
163
|
+
if (!import.meta.env.DEV || avisados.has(caminho)) return
|
|
164
|
+
avisados.add(caminho)
|
|
165
|
+
console.warn(
|
|
166
|
+
`[acai-ui] filtros na URL: o filtro "${caminho}" ${motivo} e não vai pra URL. ` +
|
|
167
|
+
'Achate o campo, declare em `tipos`, ou use `excluir` pra silenciar este aviso.',
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Cópia que preserva o TIPO de cada campo, um nível adentro.
|
|
173
|
+
*
|
|
174
|
+
* Existe porque o molde é lido no `setup` e consultado depois: guardar a
|
|
175
|
+
* referência viva faria o molde mudar junto com o filtro, e a conversão passaria
|
|
176
|
+
* a se basear no que o usuário digitou em vez do valor inicial.
|
|
177
|
+
*/
|
|
178
|
+
export function clonarMolde<T extends object>(origem: T): T {
|
|
179
|
+
const saida: Record<string, unknown> = {}
|
|
180
|
+
for (const [chave, valor] of Object.entries(origem)) {
|
|
181
|
+
if (Array.isArray(valor)) saida[chave] = [...valor]
|
|
182
|
+
else if (valor instanceof Date) saida[chave] = new Date(valor.getTime())
|
|
183
|
+
else if (ehObjetoSimples(valor)) saida[chave] = { ...valor }
|
|
184
|
+
else saida[chave] = valor
|
|
185
|
+
}
|
|
186
|
+
return saida as T
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** Lê `periodo.from` (ou `nome`) de um objeto. Um nível só. */
|
|
190
|
+
export function lerEm(alvo: Record<string, unknown> | undefined, caminho: string): unknown {
|
|
191
|
+
if (!alvo) return undefined
|
|
192
|
+
const partes = caminho.split(SEPARADOR)
|
|
193
|
+
const raiz = alvo[partes[0] as string]
|
|
194
|
+
if (partes.length === 1) return raiz
|
|
195
|
+
return ehObjetoSimples(raiz) ? raiz[partes[1] as string] : undefined
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/** Contrato mínimo de leitura/escrita de URL. Duas implementações abaixo. */
|
|
199
|
+
export interface AdaptadorUrl {
|
|
200
|
+
ler: () => URLSearchParams
|
|
201
|
+
/** `push` cria entrada no histórico; `replace` substitui a atual. */
|
|
202
|
+
gravar: (params: URLSearchParams, modo: 'push' | 'replace') => void
|
|
203
|
+
/** Caminho da rota, sem query. É a chave do cache por tela. */
|
|
204
|
+
rota: () => string
|
|
205
|
+
/**
|
|
206
|
+
* Avisa quando a URL muda POR FORA (voltar/avançar, link, edição na barra).
|
|
207
|
+
* Devolve o desinscrito. Ausente onde não há como observar.
|
|
208
|
+
*/
|
|
209
|
+
observar?: (aoMudar: () => void) => () => void
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Shape do `$router` do vue-router que a gente usa. Declarado à mão porque a lib
|
|
214
|
+
* **não depende de vue-router** — ela apenas o aproveita quando ele existe.
|
|
215
|
+
*/
|
|
216
|
+
interface RouterCompativel {
|
|
217
|
+
/** Opcional de propósito — ver `ehRouterCompativel`. */
|
|
218
|
+
push?: (destino: { query: Record<string, string | string[]> }) => Promise<unknown> | unknown
|
|
219
|
+
replace: (destino: { query: Record<string, string | string[]> }) => Promise<unknown> | unknown
|
|
220
|
+
currentRoute: { value: { query: Record<string, unknown>; path?: string } }
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* `replace` + `currentRoute` bastam. `push` NÃO entra no teste: exigi-lo aqui
|
|
225
|
+
* derrubaria pro History qualquer shim de router que só implemente o que a lib
|
|
226
|
+
* usava até então — e cair no History por trás de um router deixa o
|
|
227
|
+
* `route.query` desatualizado, que é o pior desfecho possível. Sem `push`, o
|
|
228
|
+
* `gravar` degrada pra `replace` (perde histórico, mantém a URL correta).
|
|
229
|
+
*/
|
|
230
|
+
function ehRouterCompativel(alvo: unknown): alvo is RouterCompativel {
|
|
231
|
+
if (!alvo || typeof alvo !== 'object') return false
|
|
232
|
+
const candidato = alvo as Partial<RouterCompativel>
|
|
233
|
+
return typeof candidato.replace === 'function' && !!candidato.currentRoute
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** `URLSearchParams` → o formato de query do vue-router (repetida vira array). */
|
|
237
|
+
function paramsParaQuery(params: URLSearchParams): Record<string, string | string[]> {
|
|
238
|
+
const query: Record<string, string | string[]> = {}
|
|
239
|
+
for (const chave of new Set(params.keys())) {
|
|
240
|
+
const valores = params.getAll(chave)
|
|
241
|
+
query[chave] = valores.length > 1 ? valores : (valores[0] as string)
|
|
242
|
+
}
|
|
243
|
+
return query
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Descobre como mexer na URL.
|
|
248
|
+
*
|
|
249
|
+
* 🔴 Por que NÃO importar vue-router: a lib é agnóstica dele de propósito (quem
|
|
250
|
+
* usa só chip e input não pode ganhar peer dep). E por que não mexer direto no
|
|
251
|
+
* History quando ele existe: `history.replaceState` por trás do router deixa o
|
|
252
|
+
* `route.query` DESATUALIZADO — a URL diz uma coisa e a rota reativa diz outra,
|
|
253
|
+
* sem erro nenhum. Então: se o app instalou vue-router, `$router` está em
|
|
254
|
+
* `globalProperties` e a gente usa o dele. Se não, cai no History, onde não há
|
|
255
|
+
* router pra desincronizar.
|
|
256
|
+
*/
|
|
257
|
+
export function criarAdaptador(): AdaptadorUrl {
|
|
258
|
+
const router = getCurrentInstance()?.appContext.config.globalProperties.$router
|
|
259
|
+
|
|
260
|
+
if (ehRouterCompativel(router)) {
|
|
261
|
+
return {
|
|
262
|
+
ler: () => {
|
|
263
|
+
const params = new URLSearchParams()
|
|
264
|
+
for (const [chave, valor] of Object.entries(router.currentRoute.value.query)) {
|
|
265
|
+
if (Array.isArray(valor)) {
|
|
266
|
+
for (const item of valor) if (item != null) params.append(chave, String(item))
|
|
267
|
+
} else if (valor != null) {
|
|
268
|
+
params.append(chave, String(valor))
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return params
|
|
272
|
+
},
|
|
273
|
+
gravar: (params, modo) => {
|
|
274
|
+
const navegar = modo === 'push' && router.push ? router.push : router.replace
|
|
275
|
+
void Promise.resolve(navegar.call(router, { query: paramsParaQuery(params) })).catch(() => {
|
|
276
|
+
// Navegação redundante (mesma query) não é erro — só não fazer nada.
|
|
277
|
+
})
|
|
278
|
+
},
|
|
279
|
+
rota: () => router.currentRoute.value.path ?? '',
|
|
280
|
+
// `currentRoute` é um ref do vue-router: dá pra observar sem importar a
|
|
281
|
+
// biblioteca. Cobre voltar/avançar, link colado e edição na barra — tudo
|
|
282
|
+
// que muda a URL sem passar pelo hook.
|
|
283
|
+
observar: (aoMudar) => watch(() => router.currentRoute.value.query, aoMudar, { deep: true }),
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// ⚠️ Este ramo NÃO é o caminho do SSR de app real. A checagem do router vem
|
|
288
|
+
// antes, e no servidor o router existe — então app com vue-router (que é o
|
|
289
|
+
// caso de todos os consumidores) cai lá em cima, e cai certo: `ler()` e
|
|
290
|
+
// `rota()` do router funcionam no servidor e são o que permite o formulário
|
|
291
|
+
// renderizar já preenchido com os filtros da URL.
|
|
292
|
+
//
|
|
293
|
+
// O que NÃO pode acontecer no servidor é buscar e mexer em cache de módulo —
|
|
294
|
+
// e isso é barrado no `useListagemNaUrl`, não aqui. Ver `noServidor()` lá.
|
|
295
|
+
//
|
|
296
|
+
// Aqui é o fallback de ambiente sem window NEM router: teste de nó puro, ou
|
|
297
|
+
// consumidor que usa o hook sem router instalado.
|
|
298
|
+
if (typeof window === 'undefined') {
|
|
299
|
+
return { ler: () => new URLSearchParams(), gravar: () => undefined, rota: () => '' }
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
return {
|
|
303
|
+
ler: () => new URLSearchParams(window.location.search),
|
|
304
|
+
gravar: (params, modo) => {
|
|
305
|
+
const busca = params.toString()
|
|
306
|
+
const destino = `${window.location.pathname}${busca ? `?${busca}` : ''}${window.location.hash}`
|
|
307
|
+
if (modo === 'push') window.history.pushState(window.history.state, '', destino)
|
|
308
|
+
else window.history.replaceState(window.history.state, '', destino)
|
|
309
|
+
},
|
|
310
|
+
rota: () => window.location.pathname,
|
|
311
|
+
observar: (aoMudar) => {
|
|
312
|
+
window.addEventListener('popstate', aoMudar)
|
|
313
|
+
return () => window.removeEventListener('popstate', aoMudar)
|
|
314
|
+
},
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export interface OpcoesMapa {
|
|
319
|
+
excluir?: readonly string[]
|
|
320
|
+
tipos?: Readonly<Record<string, TipoFiltroUrl>>
|
|
321
|
+
prefixo?: string
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Mapa de um molde: quais caminhos este hook governa e como converter cada um.
|
|
326
|
+
*
|
|
327
|
+
* Governar é tudo: caminho fora daqui não é lido nem escrito — sem isso a URL
|
|
328
|
+
* viraria vetor de injeção (`?size=99999` descendo direto pro `executar()`).
|
|
329
|
+
*/
|
|
330
|
+
export interface MapaFiltros<T extends object> {
|
|
331
|
+
caminhos: string[]
|
|
332
|
+
molde: T
|
|
333
|
+
naUrl: (caminho: string) => string
|
|
334
|
+
descritorDe: (caminho: string) => Descritor
|
|
335
|
+
/**
|
|
336
|
+
* Remove da query as chaves marcadas em `excluir`.
|
|
337
|
+
*
|
|
338
|
+
* Não é o mesmo que "não escrever": aqui a chave é APAGADA mesmo que tenha
|
|
339
|
+
* chegado de fora. `excluir` marca dado pessoal, e uma chave dessas colada à
|
|
340
|
+
* mão na barra de endereço não pode sobreviver à primeira pesquisa — com
|
|
341
|
+
* `push`, ela seria copiada pra toda entrada seguinte do histórico.
|
|
342
|
+
*/
|
|
343
|
+
removerExcluidas: (params: URLSearchParams) => void
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export function criarMapa<T extends object>(molde: T, opcoes: OpcoesMapa = {}): MapaFiltros<T> {
|
|
347
|
+
const { excluir = [], tipos = {}, prefixo = '' } = opcoes
|
|
348
|
+
const excluidas = new Set(excluir)
|
|
349
|
+
const moldeBruto = molde as Record<string, unknown>
|
|
350
|
+
|
|
351
|
+
const estaExcluido = (caminho: string): boolean =>
|
|
352
|
+
excluidas.has(caminho) || excluidas.has(caminho.split(SEPARADOR)[0] as string)
|
|
353
|
+
|
|
354
|
+
const caminhos = (() => {
|
|
355
|
+
const encontrados: string[] = []
|
|
356
|
+
|
|
357
|
+
for (const [chave, valor] of Object.entries(molde)) {
|
|
358
|
+
if (!ehObjetoSimples(valor)) {
|
|
359
|
+
encontrados.push(chave)
|
|
360
|
+
continue
|
|
361
|
+
}
|
|
362
|
+
for (const [sub, subValor] of Object.entries(valor)) {
|
|
363
|
+
if (ehObjetoSimples(subValor)) {
|
|
364
|
+
avisarNaoSuportado(`${chave}${SEPARADOR}${sub}`, 'tem dois níveis de aninhamento')
|
|
365
|
+
continue
|
|
366
|
+
}
|
|
367
|
+
encontrados.push(`${chave}${SEPARADOR}${sub}`)
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// Declarado em `tipos` mas ausente do molde: entra. É o caso do campo que
|
|
372
|
+
// nasce `null` sem forma (um `periodo: null` de date-range, por exemplo).
|
|
373
|
+
for (const declarado of Object.keys(tipos)) {
|
|
374
|
+
if (!encontrados.includes(declarado)) encontrados.push(declarado)
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
return encontrados.filter((caminho) => !estaExcluido(caminho))
|
|
378
|
+
})()
|
|
379
|
+
|
|
380
|
+
return {
|
|
381
|
+
caminhos,
|
|
382
|
+
molde,
|
|
383
|
+
naUrl: (caminho) => `${prefixo}${caminho}`,
|
|
384
|
+
removerExcluidas: (params) => {
|
|
385
|
+
for (const excluida of excluidas) {
|
|
386
|
+
// A chave excluída pode ser a raiz (`periodo`) de folhas que estão na
|
|
387
|
+
// URL como `periodo.from` — daí varrer por prefixo, e não só igualdade.
|
|
388
|
+
const alvo = `${prefixo}${excluida}`
|
|
389
|
+
for (const chave of [...new Set(params.keys())]) {
|
|
390
|
+
if (chave === alvo || chave.startsWith(`${alvo}${SEPARADOR}`)) params.delete(chave)
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
descritorDe: (caminho) => {
|
|
395
|
+
const declarado = tipos[caminho]
|
|
396
|
+
return declarado ? descritorDeclarado(declarado) : descritorDoValor(lerEm(moldeBruto, caminho))
|
|
397
|
+
},
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Lê os caminhos governados de uma query. Devolve só o que a URL trouxe — chave
|
|
403
|
+
* ausente NÃO vira `undefined` no patch, senão hidratar apagaria o que já estava.
|
|
404
|
+
*/
|
|
405
|
+
export function lerDaUrl<T extends object>(
|
|
406
|
+
mapa: MapaFiltros<T>,
|
|
407
|
+
params: URLSearchParams,
|
|
408
|
+
atual: Record<string, unknown>,
|
|
409
|
+
): Record<string, unknown> {
|
|
410
|
+
const alteracoes: Record<string, unknown> = {}
|
|
411
|
+
// Patches por chave-raiz: hidratar `periodo.from` não pode apagar o `to` que
|
|
412
|
+
// já estava no filtro.
|
|
413
|
+
const aninhados = new Map<string, Record<string, unknown>>()
|
|
414
|
+
|
|
415
|
+
for (const caminho of mapa.caminhos) {
|
|
416
|
+
const brutos = params.getAll(mapa.naUrl(caminho))
|
|
417
|
+
if (brutos.length === 0) continue
|
|
418
|
+
|
|
419
|
+
const valor = coagir(brutos, mapa.descritorDe(caminho))
|
|
420
|
+
if (ehInvalido(valor)) continue
|
|
421
|
+
|
|
422
|
+
const partes = caminho.split(SEPARADOR)
|
|
423
|
+
if (partes.length === 1) {
|
|
424
|
+
alteracoes[partes[0] as string] = valor
|
|
425
|
+
continue
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
const raiz = partes[0] as string
|
|
429
|
+
let patch = aninhados.get(raiz)
|
|
430
|
+
if (!patch) {
|
|
431
|
+
const valorAtual = atual[raiz]
|
|
432
|
+
patch = ehObjetoSimples(valorAtual) ? { ...valorAtual } : {}
|
|
433
|
+
aninhados.set(raiz, patch)
|
|
434
|
+
}
|
|
435
|
+
patch[partes[1] as string] = valor
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
for (const [raiz, patch] of aninhados) alteracoes[raiz] = patch
|
|
439
|
+
return alteracoes
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Estado dos filtros → `URLSearchParams`, partindo da query ATUAL para não
|
|
444
|
+
* apagar chave alheia (`?aba=2` de outro componente na mesma rota).
|
|
445
|
+
*/
|
|
446
|
+
export function escreverNaUrl<T extends object>(
|
|
447
|
+
mapa: MapaFiltros<T>,
|
|
448
|
+
base: URLSearchParams,
|
|
449
|
+
estado: Record<string, unknown>,
|
|
450
|
+
): URLSearchParams {
|
|
451
|
+
const params = new URLSearchParams(base)
|
|
452
|
+
for (const caminho of mapa.caminhos) params.delete(mapa.naUrl(caminho))
|
|
453
|
+
|
|
454
|
+
const moldeBruto = mapa.molde as Record<string, unknown>
|
|
455
|
+
|
|
456
|
+
for (const caminho of mapa.caminhos) {
|
|
457
|
+
const valor = lerEm(estado, caminho)
|
|
458
|
+
// Mesma regra do payload: campo vazio não viaja.
|
|
459
|
+
if (estaVazio(valor)) continue
|
|
460
|
+
// Nem campo intocado: só o que a pessoa mudou merece estar na URL.
|
|
461
|
+
if (igualAoMolde(valor, lerEm(moldeBruto, caminho))) continue
|
|
462
|
+
|
|
463
|
+
if (Array.isArray(valor)) {
|
|
464
|
+
// Chave REPETIDA, não junção por vírgula: o `sort` do Spring é
|
|
465
|
+
// `['dataHoraCadastro,desc']` — o próprio valor tem vírgula, e juntar
|
|
466
|
+
// corromperia o par na volta.
|
|
467
|
+
for (const item of valor) {
|
|
468
|
+
const texto = paraTexto(item)
|
|
469
|
+
if (texto !== null) params.append(mapa.naUrl(caminho), texto)
|
|
470
|
+
}
|
|
471
|
+
continue
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if (ehObjetoSimples(valor)) {
|
|
475
|
+
avisarNaoSuportado(caminho, 'virou objeto depois da inicialização')
|
|
476
|
+
continue
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
const texto = paraTexto(valor)
|
|
480
|
+
if (texto !== null) params.append(mapa.naUrl(caminho), texto)
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
return params
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/** Só os caminhos governados, ordenados — serve de chave de cache e de comparação. */
|
|
487
|
+
export function assinatura<T extends object>(
|
|
488
|
+
mapa: MapaFiltros<T>,
|
|
489
|
+
params: URLSearchParams,
|
|
490
|
+
): string {
|
|
491
|
+
const pares: string[] = []
|
|
492
|
+
for (const caminho of mapa.caminhos) {
|
|
493
|
+
const chave = mapa.naUrl(caminho)
|
|
494
|
+
for (const valor of params.getAll(chave)) pares.push(`${chave}=${valor}`)
|
|
495
|
+
}
|
|
496
|
+
return pares.sort().join('&')
|
|
497
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { notificacao } from './notify'
|
|
2
|
+
export { useValidacaoVisual } from './use-validacao-visual'
|
|
3
|
+
export type { ErroValidacao, OpcoesValidacaoVisual, SeletoresValidacao } from './use-validacao-visual'
|
|
4
|
+
export { useContadorSessao } from './use-contador-sessao'
|
|
5
|
+
export type { OpcoesContadorSessao } from './use-contador-sessao'
|
|
6
|
+
export { usePreferencias } from './use-preferencias'
|
|
7
|
+
export type { PreferenciasAcaiUi, TemaAcaiUi, DaltonismoAcaiUi } from './use-preferencias'
|
|
8
|
+
export { useLeituraVoz } from './use-leitura-voz'
|
|
9
|
+
export type { IdLeitura, OpcoesFala } from './use-leitura-voz'
|
|
10
|
+
export { useTamanhoElemento } from './use-tamanho-elemento'
|
|
11
|
+
export type { TamanhoElemento, PadraoTamanho } from './use-tamanho-elemento'
|
|
12
|
+
export { useTela, BREAKPOINTS } from './use-tela'
|
|
13
|
+
export type { TelaAcaiUi } from './use-tela'
|
|
14
|
+
export { useFiltrosNaUrl } from './use-filtros-na-url'
|
|
15
|
+
export type { FiltrosNaUrl, OpcoesFiltrosNaUrl, TipoFiltroUrl } from './use-filtros-na-url'
|
|
16
|
+
export { useListagemNaUrl, invalidarListagens } from './use-listagem-na-url'
|
|
17
|
+
export type {
|
|
18
|
+
ListagemNaUrl,
|
|
19
|
+
OpcoesListagemNaUrl,
|
|
20
|
+
ParametrosListagem,
|
|
21
|
+
ResultadoListagem,
|
|
22
|
+
} from './use-listagem-na-url'
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Notify } from 'quasar'
|
|
2
|
+
|
|
3
|
+
interface NotificationModel {
|
|
4
|
+
message: string
|
|
5
|
+
color: 'positive' | 'negative' | 'warning'
|
|
6
|
+
timeout?: number
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const notificacao = ({ message, color, timeout = 5000 }: NotificationModel): void => {
|
|
10
|
+
Notify.create({
|
|
11
|
+
message: message,
|
|
12
|
+
color: color,
|
|
13
|
+
position: 'center',
|
|
14
|
+
timeout,
|
|
15
|
+
textColor: color === 'warning' ? 'black' : 'white',
|
|
16
|
+
actions: [{ label: 'Fechar', color: color === 'warning' ? 'black' : 'white' }],
|
|
17
|
+
})
|
|
18
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { computed, onBeforeUnmount, ref, toValue, watch, type MaybeRefOrGetter } from 'vue'
|
|
2
|
+
|
|
3
|
+
export interface OpcoesContadorSessao {
|
|
4
|
+
/** Minutos restantes a partir dos quais `emAlerta` fica true. Default 5. */
|
|
5
|
+
minutosAlerta?: number
|
|
6
|
+
/** Chamado UMA vez quando o tempo zera. */
|
|
7
|
+
aoExpirar?: () => void
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Contagem regressiva de sessão a partir de um instante de expiração.
|
|
12
|
+
* Aceita epoch em MILISSEGUNDOS ou `Date` (de um JWT: `exp * 1000`).
|
|
13
|
+
* Reativo — reinicia sozinho quando `expiraEm` muda; limpa o intervalo no unmount.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const { horasMinutos, emAlerta } = useContadorSessao(() => usuario.value?.exp ? usuario.value.exp * 1000 : null)
|
|
17
|
+
*/
|
|
18
|
+
export function useContadorSessao(
|
|
19
|
+
expiraEm: MaybeRefOrGetter<number | Date | null | undefined>,
|
|
20
|
+
opcoes: OpcoesContadorSessao = {},
|
|
21
|
+
) {
|
|
22
|
+
const minutosAlerta = opcoes.minutosAlerta ?? 5
|
|
23
|
+
|
|
24
|
+
const expiracaoMs = computed<number | null>(() => {
|
|
25
|
+
const v = toValue(expiraEm)
|
|
26
|
+
if (v instanceof Date) return v.getTime()
|
|
27
|
+
if (typeof v === 'number' && Number.isFinite(v)) return v
|
|
28
|
+
return null
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const restanteMs = ref<number | null>(null)
|
|
32
|
+
let intervalo: number | null = null
|
|
33
|
+
let expirouEmitido = false
|
|
34
|
+
|
|
35
|
+
function parar(): void {
|
|
36
|
+
if (intervalo === null) return
|
|
37
|
+
window.clearInterval(intervalo)
|
|
38
|
+
intervalo = null
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function tick(): void {
|
|
42
|
+
if (expiracaoMs.value === null) {
|
|
43
|
+
restanteMs.value = null
|
|
44
|
+
return
|
|
45
|
+
}
|
|
46
|
+
const restante = expiracaoMs.value - Date.now()
|
|
47
|
+
restanteMs.value = Math.max(0, restante)
|
|
48
|
+
if (restante <= 0) {
|
|
49
|
+
parar()
|
|
50
|
+
if (!expirouEmitido) {
|
|
51
|
+
expirouEmitido = true
|
|
52
|
+
opcoes.aoExpirar?.()
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
watch(
|
|
58
|
+
expiracaoMs,
|
|
59
|
+
(novo) => {
|
|
60
|
+
parar()
|
|
61
|
+
expirouEmitido = false
|
|
62
|
+
if (novo === null) {
|
|
63
|
+
restanteMs.value = null
|
|
64
|
+
return
|
|
65
|
+
}
|
|
66
|
+
tick()
|
|
67
|
+
intervalo = window.setInterval(tick, 1000)
|
|
68
|
+
},
|
|
69
|
+
{ immediate: true },
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
onBeforeUnmount(parar)
|
|
73
|
+
|
|
74
|
+
const doisDigitos = (n: number): string => String(n).padStart(2, '0')
|
|
75
|
+
|
|
76
|
+
/** Tempo restante em HH:MM (ex.: "03:42"). "--" quando não há expiração. */
|
|
77
|
+
const horasMinutos = computed(() => {
|
|
78
|
+
if (restanteMs.value === null) return '--'
|
|
79
|
+
const totalSegundos = Math.floor(restanteMs.value / 1000)
|
|
80
|
+
return `${doisDigitos(Math.floor(totalSegundos / 3600))}:${doisDigitos(Math.floor((totalSegundos % 3600) / 60))}`
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
/** Tempo restante em HH:MM:SS (ex.: "03:42:07"). */
|
|
84
|
+
const horasMinutosSegundos = computed(() => {
|
|
85
|
+
if (restanteMs.value === null) return '--'
|
|
86
|
+
const s = Math.floor(restanteMs.value / 1000)
|
|
87
|
+
return `${doisDigitos(Math.floor(s / 3600))}:${doisDigitos(Math.floor((s % 3600) / 60))}:${doisDigitos(s % 60)}`
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
const emAlerta = computed(
|
|
91
|
+
() => restanteMs.value !== null && restanteMs.value <= minutosAlerta * 60_000,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
return { restanteMs, horasMinutos, horasMinutosSegundos, emAlerta }
|
|
95
|
+
}
|