@andespindola/ui-core 0.1.1 → 0.3.0
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/{floating-ui.dom-BPemvNRD.js → floating-ui.dom-BZk7Blsu.js} +93 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ui-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/ui-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ui-alert.cjs.entry.js +40 -0
- package/dist/cjs/ui-avatar-group.cjs.entry.js +17 -0
- package/dist/cjs/ui-avatar.cjs.entry.js +2 -2
- package/dist/cjs/ui-badge.cjs.entry.js +7 -2
- package/dist/cjs/ui-breadcrumb-item.cjs.entry.js +23 -0
- package/dist/cjs/ui-breadcrumb.cjs.entry.js +17 -0
- package/dist/cjs/ui-button.cjs.entry.js +5 -3
- package/dist/cjs/ui-card.cjs.entry.js +1 -1
- package/dist/cjs/ui-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ui-combobox.cjs.entry.js +153 -0
- package/dist/cjs/ui-container.cjs.entry.js +26 -0
- package/dist/cjs/ui-date-picker.cjs.entry.js +171 -0
- package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ui-drawer.cjs.entry.js +1 -1
- package/dist/cjs/ui-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/ui-dropdown-menu.cjs.entry.js +2 -2
- package/dist/cjs/ui-field.cjs.entry.js +1 -1
- package/dist/cjs/ui-file-upload.cjs.entry.js +57 -0
- package/dist/cjs/ui-grid.cjs.entry.js +34 -0
- package/dist/cjs/ui-input.cjs.entry.js +10 -2
- package/dist/cjs/ui-label.cjs.entry.js +1 -1
- package/dist/cjs/ui-navbar.cjs.entry.js +17 -0
- package/dist/cjs/ui-pagination.cjs.entry.js +63 -0
- package/dist/cjs/ui-popover.cjs.entry.js +2 -2
- package/dist/cjs/ui-progress-circular.cjs.entry.js +44 -0
- package/dist/cjs/ui-progress.cjs.entry.js +1 -1
- package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-rating.cjs.entry.js +45 -0
- package/dist/cjs/ui-reveal.cjs.entry.js +1 -1
- package/dist/cjs/ui-scroll-progress.cjs.entry.js +1 -1
- package/dist/cjs/ui-section.cjs.entry.js +1 -1
- package/dist/cjs/ui-segmented.cjs.entry.js +31 -0
- package/dist/cjs/ui-select.cjs.entry.js +1 -1
- package/dist/cjs/ui-separator.cjs.entry.js +1 -1
- package/dist/cjs/ui-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ui-slider.cjs.entry.js +1 -1
- package/dist/cjs/ui-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ui-stack.cjs.entry.js +53 -0
- package/dist/cjs/ui-stat.cjs.entry.js +28 -0
- package/dist/cjs/ui-switch.cjs.entry.js +1 -1
- package/dist/cjs/ui-table.cjs.entry.js +25 -0
- package/dist/cjs/ui-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ui-theme-toggle.cjs.entry.js +1 -1
- package/dist/cjs/ui-toast.cjs.entry.js +1 -1
- package/dist/cjs/ui-toaster.cjs.entry.js +1 -1
- package/dist/cjs/ui-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/uikit.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +17 -0
- package/dist/collection/components/ui-accordion/ui-accordion.js +1 -1
- package/dist/collection/components/ui-accordion-item/ui-accordion-item.js +1 -1
- package/dist/collection/components/ui-alert/ui-alert.css +95 -0
- package/dist/collection/components/ui-alert/ui-alert.js +134 -0
- package/dist/collection/components/ui-avatar/ui-avatar.css +31 -0
- package/dist/collection/components/ui-avatar/ui-avatar.js +20 -1
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +22 -0
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +21 -0
- package/dist/collection/components/ui-badge/ui-badge.css +26 -0
- package/dist/collection/components/ui-badge/ui-badge.js +63 -1
- package/dist/collection/components/ui-breadcrumb/ui-breadcrumb.css +15 -0
- package/dist/collection/components/ui-breadcrumb/ui-breadcrumb.js +18 -0
- package/dist/collection/components/ui-breadcrumb-item/ui-breadcrumb-item.css +30 -0
- package/dist/collection/components/ui-breadcrumb-item/ui-breadcrumb-item.js +69 -0
- package/dist/collection/components/ui-button/ui-button.css +13 -1
- package/dist/collection/components/ui-button/ui-button.js +24 -2
- package/dist/collection/components/ui-card/ui-card.js +1 -1
- package/dist/collection/components/ui-checkbox/ui-checkbox.css +6 -2
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +1 -1
- package/dist/collection/components/ui-combobox/ui-combobox.css +93 -0
- package/dist/collection/components/ui-combobox/ui-combobox.js +248 -0
- package/dist/collection/components/ui-container/ui-container.css +38 -0
- package/dist/collection/components/ui-container/ui-container.js +79 -0
- package/dist/collection/components/ui-date-picker/ui-date-picker.css +176 -0
- package/dist/collection/components/ui-date-picker/ui-date-picker.js +243 -0
- package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
- package/dist/collection/components/ui-drawer/ui-drawer.js +1 -1
- package/dist/collection/components/ui-dropdown-item/ui-dropdown-item.js +1 -1
- package/dist/collection/components/ui-dropdown-menu/ui-dropdown-menu.js +1 -1
- package/dist/collection/components/ui-field/ui-field.js +1 -1
- package/dist/collection/components/ui-file-upload/ui-file-upload.css +79 -0
- package/dist/collection/components/ui-file-upload/ui-file-upload.js +151 -0
- package/dist/collection/components/ui-grid/ui-grid.css +8 -0
- package/dist/collection/components/ui-grid/ui-grid.js +106 -0
- package/dist/collection/components/ui-input/ui-input.css +65 -14
- package/dist/collection/components/ui-input/ui-input.js +29 -1
- package/dist/collection/components/ui-label/ui-label.js +1 -1
- package/dist/collection/components/ui-navbar/ui-navbar.css +36 -0
- package/dist/collection/components/ui-navbar/ui-navbar.js +18 -0
- package/dist/collection/components/ui-pagination/ui-pagination.css +59 -0
- package/dist/collection/components/ui-pagination/ui-pagination.js +147 -0
- package/dist/collection/components/ui-popover/ui-popover.js +1 -1
- package/dist/collection/components/ui-progress/ui-progress.js +1 -1
- package/dist/collection/components/ui-progress-circular/ui-progress-circular.css +46 -0
- package/dist/collection/components/ui-progress-circular/ui-progress-circular.js +171 -0
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
- package/dist/collection/components/ui-rating/ui-rating.css +52 -0
- package/dist/collection/components/ui-rating/ui-rating.js +134 -0
- package/dist/collection/components/ui-reveal/ui-reveal.js +1 -1
- package/dist/collection/components/ui-scroll-progress/ui-scroll-progress.js +1 -1
- package/dist/collection/components/ui-section/ui-section.js +1 -1
- package/dist/collection/components/ui-segmented/ui-segmented.css +46 -0
- package/dist/collection/components/ui-segmented/ui-segmented.js +99 -0
- package/dist/collection/components/ui-select/ui-select.js +1 -1
- package/dist/collection/components/ui-separator/ui-separator.js +1 -1
- package/dist/collection/components/ui-skeleton/ui-skeleton.js +1 -1
- package/dist/collection/components/ui-slider/ui-slider.js +1 -1
- package/dist/collection/components/ui-spinner/ui-spinner.js +1 -1
- package/dist/collection/components/ui-stack/ui-stack.css +8 -0
- package/dist/collection/components/ui-stack/ui-stack.js +184 -0
- package/dist/collection/components/ui-stat/ui-stat.css +69 -0
- package/dist/collection/components/ui-stat/ui-stat.js +118 -0
- package/dist/collection/components/ui-switch/ui-switch.js +1 -1
- package/dist/collection/components/ui-table/ui-table.css +46 -0
- package/dist/collection/components/ui-table/ui-table.js +119 -0
- package/dist/collection/components/ui-tabs/ui-tabs.js +2 -2
- package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
- package/dist/collection/components/ui-theme-toggle/ui-theme-toggle.js +1 -1
- package/dist/collection/components/ui-toast/ui-toast.js +1 -1
- package/dist/collection/components/ui-toaster/ui-toaster.js +1 -1
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +1 -1
- package/dist/components/{p-fApcMAzN.js → p-DDJE__UC.js} +1 -1
- package/dist/{uikit/p-CyBRmmbs.js → components/p-DDtwbwIl.js} +1 -1
- package/dist/components/{p-Bz9HyboB.js → p-DUT2Q8Df.js} +1 -1
- package/dist/components/ui-accordion-item.js +1 -1
- package/dist/components/ui-accordion.js +1 -1
- package/dist/components/ui-alert.d.ts +11 -0
- package/dist/components/ui-alert.js +1 -0
- package/dist/components/ui-avatar-group.d.ts +11 -0
- package/dist/components/ui-avatar-group.js +1 -0
- package/dist/components/ui-avatar.js +1 -1
- package/dist/components/ui-badge.js +1 -1
- package/dist/components/ui-breadcrumb-item.d.ts +11 -0
- package/dist/components/ui-breadcrumb-item.js +1 -0
- package/dist/components/ui-breadcrumb.d.ts +11 -0
- package/dist/components/ui-breadcrumb.js +1 -0
- package/dist/components/ui-button.js +1 -1
- package/dist/components/ui-card.js +1 -1
- package/dist/components/ui-checkbox.js +1 -1
- package/dist/components/ui-combobox.d.ts +11 -0
- package/dist/components/ui-combobox.js +1 -0
- package/dist/components/ui-container.d.ts +11 -0
- package/dist/components/ui-container.js +1 -0
- package/dist/components/ui-date-picker.d.ts +11 -0
- package/dist/components/ui-date-picker.js +1 -0
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-drawer.js +1 -1
- package/dist/components/ui-dropdown-item.js +1 -1
- package/dist/components/ui-dropdown-menu.js +1 -1
- package/dist/components/ui-field.js +1 -1
- package/dist/components/ui-file-upload.d.ts +11 -0
- package/dist/components/ui-file-upload.js +1 -0
- package/dist/components/ui-grid.d.ts +11 -0
- package/dist/components/ui-grid.js +1 -0
- package/dist/components/ui-input.js +1 -1
- package/dist/components/ui-label.js +1 -1
- package/dist/components/ui-loading-overlay.js +1 -1
- package/dist/components/ui-navbar.d.ts +11 -0
- package/dist/components/ui-navbar.js +1 -0
- package/dist/components/ui-pagination.d.ts +11 -0
- package/dist/components/ui-pagination.js +1 -0
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-progress-circular.d.ts +11 -0
- package/dist/components/ui-progress-circular.js +1 -0
- package/dist/components/ui-progress.js +1 -1
- package/dist/components/ui-radio-group.js +1 -1
- package/dist/components/ui-rating.d.ts +11 -0
- package/dist/components/ui-rating.js +1 -0
- package/dist/components/ui-reveal.js +1 -1
- package/dist/components/ui-scroll-progress.js +1 -1
- package/dist/components/ui-section.js +1 -1
- package/dist/components/ui-segmented.d.ts +11 -0
- package/dist/components/ui-segmented.js +1 -0
- package/dist/components/ui-select.js +1 -1
- package/dist/components/ui-separator.js +1 -1
- package/dist/components/ui-skeleton.js +1 -1
- package/dist/components/ui-slider.js +1 -1
- package/dist/components/ui-spinner.js +1 -1
- package/dist/components/ui-stack.d.ts +11 -0
- package/dist/components/ui-stack.js +1 -0
- package/dist/components/ui-stat.d.ts +11 -0
- package/dist/components/ui-stat.js +1 -0
- package/dist/components/ui-switch.js +1 -1
- package/dist/components/ui-table.d.ts +11 -0
- package/dist/components/ui-table.js +1 -0
- package/dist/components/ui-tabs.js +1 -1
- package/dist/components/ui-textarea.js +1 -1
- package/dist/components/ui-theme-toggle.js +1 -1
- package/dist/components/ui-toast.js +1 -1
- package/dist/components/ui-toaster.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/esm/{floating-ui.dom-CyBRmmbs.js → floating-ui.dom-DDtwbwIl.js} +93 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ui-accordion-item.entry.js +1 -1
- package/dist/esm/ui-accordion.entry.js +1 -1
- package/dist/esm/ui-alert.entry.js +38 -0
- package/dist/esm/ui-avatar-group.entry.js +15 -0
- package/dist/esm/ui-avatar.entry.js +2 -2
- package/dist/esm/ui-badge.entry.js +8 -3
- package/dist/esm/ui-breadcrumb-item.entry.js +21 -0
- package/dist/esm/ui-breadcrumb.entry.js +15 -0
- package/dist/esm/ui-button.entry.js +5 -3
- package/dist/esm/ui-card.entry.js +1 -1
- package/dist/esm/ui-checkbox.entry.js +2 -2
- package/dist/esm/ui-combobox.entry.js +151 -0
- package/dist/esm/ui-container.entry.js +24 -0
- package/dist/esm/ui-date-picker.entry.js +169 -0
- package/dist/esm/ui-dialog.entry.js +1 -1
- package/dist/esm/ui-drawer.entry.js +1 -1
- package/dist/esm/ui-dropdown-item.entry.js +1 -1
- package/dist/esm/ui-dropdown-menu.entry.js +2 -2
- package/dist/esm/ui-field.entry.js +1 -1
- package/dist/esm/ui-file-upload.entry.js +55 -0
- package/dist/esm/ui-grid.entry.js +32 -0
- package/dist/esm/ui-input.entry.js +10 -2
- package/dist/esm/ui-label.entry.js +1 -1
- package/dist/esm/ui-navbar.entry.js +15 -0
- package/dist/esm/ui-pagination.entry.js +61 -0
- package/dist/esm/ui-popover.entry.js +2 -2
- package/dist/esm/ui-progress-circular.entry.js +42 -0
- package/dist/esm/ui-progress.entry.js +1 -1
- package/dist/esm/ui-radio-group.entry.js +1 -1
- package/dist/esm/ui-rating.entry.js +43 -0
- package/dist/esm/ui-reveal.entry.js +1 -1
- package/dist/esm/ui-scroll-progress.entry.js +1 -1
- package/dist/esm/ui-section.entry.js +1 -1
- package/dist/esm/ui-segmented.entry.js +29 -0
- package/dist/esm/ui-select.entry.js +1 -1
- package/dist/esm/ui-separator.entry.js +1 -1
- package/dist/esm/ui-skeleton.entry.js +1 -1
- package/dist/esm/ui-slider.entry.js +1 -1
- package/dist/esm/ui-spinner.entry.js +1 -1
- package/dist/esm/ui-stack.entry.js +51 -0
- package/dist/esm/ui-stat.entry.js +26 -0
- package/dist/esm/ui-switch.entry.js +1 -1
- package/dist/esm/ui-table.entry.js +23 -0
- package/dist/esm/ui-tabs.entry.js +2 -2
- package/dist/esm/ui-textarea.entry.js +1 -1
- package/dist/esm/ui-theme-toggle.entry.js +1 -1
- package/dist/esm/ui-toast.entry.js +1 -1
- package/dist/esm/ui-toaster.entry.js +1 -1
- package/dist/esm/ui-tooltip.entry.js +2 -2
- package/dist/esm/uikit.js +1 -1
- package/dist/types/components/ui-alert/ui-alert.d.ts +17 -0
- package/dist/types/components/ui-avatar/ui-avatar.d.ts +2 -0
- package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +6 -0
- package/dist/types/components/ui-badge/ui-badge.d.ts +7 -0
- package/dist/types/components/ui-breadcrumb/ui-breadcrumb.d.ts +3 -0
- package/dist/types/components/ui-breadcrumb-item/ui-breadcrumb-item.d.ts +8 -0
- package/dist/types/components/ui-button/ui-button.d.ts +2 -0
- package/dist/types/components/ui-combobox/ui-combobox.d.ts +38 -0
- package/dist/types/components/ui-container/ui-container.d.ts +8 -0
- package/dist/types/components/ui-date-picker/ui-date-picker.d.ts +42 -0
- package/dist/types/components/ui-file-upload/ui-file-upload.d.ts +24 -0
- package/dist/types/components/ui-grid/ui-grid.d.ts +10 -0
- package/dist/types/components/ui-input/ui-input.d.ts +3 -0
- package/dist/types/components/ui-navbar/ui-navbar.d.ts +3 -0
- package/dist/types/components/ui-pagination/ui-pagination.d.ts +15 -0
- package/dist/types/components/ui-progress-circular/ui-progress-circular.d.ts +17 -0
- package/dist/types/components/ui-rating/ui-rating.d.ts +17 -0
- package/dist/types/components/ui-segmented/ui-segmented.d.ts +15 -0
- package/dist/types/components/ui-stack/ui-stack.d.ts +17 -0
- package/dist/types/components/ui-stat/ui-stat.d.ts +13 -0
- package/dist/types/components/ui-table/ui-table.d.ts +16 -0
- package/dist/types/components.d.ts +961 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/uikit/{p-8a238373.entry.js → p-008118af.entry.js} +1 -1
- package/dist/uikit/p-0715db16.entry.js +1 -0
- package/dist/uikit/p-10afa395.entry.js +1 -0
- package/dist/uikit/p-1449f229.entry.js +1 -0
- package/dist/uikit/p-1514ae37.entry.js +1 -0
- package/dist/uikit/{p-83159bfc.entry.js → p-1685191b.entry.js} +1 -1
- package/dist/uikit/p-1ef7948f.entry.js +1 -0
- package/dist/uikit/{p-e54139a1.entry.js → p-283e7623.entry.js} +1 -1
- package/dist/uikit/p-2d92ce04.entry.js +1 -0
- package/dist/uikit/{p-a0ccdb22.entry.js → p-3995852d.entry.js} +1 -1
- package/dist/uikit/p-3b1f92da.entry.js +1 -0
- package/dist/uikit/p-3fdfad2e.entry.js +1 -0
- package/dist/uikit/p-4044ebde.entry.js +1 -0
- package/dist/uikit/{p-9f0d4ae1.entry.js → p-413cfbc6.entry.js} +1 -1
- package/dist/uikit/p-45e80e73.entry.js +1 -0
- package/dist/uikit/p-4ba0e4bc.entry.js +1 -0
- package/dist/uikit/p-5951a496.entry.js +1 -0
- package/dist/uikit/p-5e0bc34a.entry.js +1 -0
- package/dist/uikit/{p-d8e7ae10.entry.js → p-60910c03.entry.js} +1 -1
- package/dist/uikit/{p-58ed99a2.entry.js → p-62881327.entry.js} +1 -1
- package/dist/uikit/p-6c51a216.entry.js +1 -0
- package/dist/uikit/p-6d363a02.entry.js +1 -0
- package/dist/uikit/{p-777c6902.entry.js → p-8535f5c9.entry.js} +1 -1
- package/dist/uikit/p-88238a16.entry.js +1 -0
- package/dist/uikit/{p-9aa557d1.entry.js → p-894fc85f.entry.js} +1 -1
- package/dist/uikit/p-8b882367.entry.js +1 -0
- package/dist/uikit/p-9310b73b.entry.js +1 -0
- package/dist/uikit/{p-4a1abc1c.entry.js → p-99b7e461.entry.js} +1 -1
- package/dist/uikit/p-9d8d420e.entry.js +1 -0
- package/dist/uikit/{p-97de6ea6.entry.js → p-9dbe7e12.entry.js} +1 -1
- package/dist/uikit/{p-29fe5b7f.entry.js → p-9f09fcec.entry.js} +1 -1
- package/dist/{components/p-CyBRmmbs.js → uikit/p-DDtwbwIl.js} +1 -1
- package/dist/uikit/{p-d6c9bfbc.entry.js → p-a3d819cd.entry.js} +1 -1
- package/dist/uikit/{p-777d8c7a.entry.js → p-b0f2b1c8.entry.js} +1 -1
- package/dist/uikit/{p-e0652ddf.entry.js → p-b7e30398.entry.js} +1 -1
- package/dist/uikit/p-bac2c523.entry.js +1 -0
- package/dist/uikit/p-bbc718ef.entry.js +1 -0
- package/dist/uikit/{p-b0aba484.entry.js → p-bdd30484.entry.js} +1 -1
- package/dist/uikit/{p-32df7fd0.entry.js → p-c1a9db7c.entry.js} +1 -1
- package/dist/uikit/p-c2138fb9.entry.js +1 -0
- package/dist/uikit/p-c94492ff.entry.js +1 -0
- package/dist/uikit/{p-38cbea54.entry.js → p-ccca2aeb.entry.js} +1 -1
- package/dist/uikit/p-d7ab158f.entry.js +1 -0
- package/dist/uikit/p-da807078.entry.js +1 -0
- package/dist/uikit/p-e2065caa.entry.js +1 -0
- package/dist/uikit/{p-9b43d670.entry.js → p-f2983e94.entry.js} +1 -1
- package/dist/uikit/p-f4344cce.entry.js +1 -0
- package/dist/uikit/{p-ed1111eb.entry.js → p-fb89d9a4.entry.js} +1 -1
- package/dist/uikit/p-fbe7806c.entry.js +1 -0
- package/dist/uikit/p-ffcd1faf.entry.js +1 -0
- package/dist/uikit/uikit.esm.js +1 -1
- package/package.json +8 -3
- package/dist/uikit/p-0096eefe.entry.js +0 -1
- package/dist/uikit/p-11350db1.entry.js +0 -1
- package/dist/uikit/p-128ae3e4.entry.js +0 -1
- package/dist/uikit/p-24edfe3e.entry.js +0 -1
- package/dist/uikit/p-280337b0.entry.js +0 -1
- package/dist/uikit/p-3c866608.entry.js +0 -1
- package/dist/uikit/p-5555523c.entry.js +0 -1
- package/dist/uikit/p-6fa4be86.entry.js +0 -1
- package/dist/uikit/p-7b2a9e68.entry.js +0 -1
- package/dist/uikit/p-9c57cf57.entry.js +0 -1
- package/dist/uikit/p-cf56c9ba.entry.js +0 -1
- package/dist/uikit/p-d13860dc.entry.js +0 -1
|
@@ -2,39 +2,90 @@
|
|
|
2
2
|
display: block;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.
|
|
5
|
+
.field {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 0.5rem;
|
|
6
9
|
width: 100%;
|
|
7
10
|
height: 2.75rem;
|
|
8
|
-
padding: 0
|
|
11
|
+
padding: 0 0.875rem;
|
|
9
12
|
border: 1px solid var(--ui-border);
|
|
10
13
|
border-radius: var(--ui-radius-sm);
|
|
11
14
|
background: var(--ui-panel);
|
|
12
|
-
color: var(--ui-foreground);
|
|
13
|
-
font-family: var(--ui-font-sans);
|
|
14
|
-
font-size: 0.875rem;
|
|
15
|
-
outline: none;
|
|
16
15
|
backdrop-filter: blur(22px);
|
|
17
16
|
transition: all var(--ui-duration) var(--ui-ease);
|
|
18
17
|
box-sizing: border-box;
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
.
|
|
22
|
-
color: var(--ui-
|
|
20
|
+
.field:hover:not(.disabled) {
|
|
21
|
+
border-color: var(--ui-border-strong);
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
.
|
|
24
|
+
.field:focus-within {
|
|
26
25
|
border-color: var(--ui-accent);
|
|
27
26
|
box-shadow: 0 0 0 2px var(--ui-ring);
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
.
|
|
29
|
+
.field.invalid {
|
|
30
|
+
border-color: var(--ui-danger);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.field.invalid:focus-within {
|
|
34
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--ui-danger) 40%, transparent);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.field.disabled {
|
|
31
38
|
opacity: 0.5;
|
|
32
39
|
pointer-events: none;
|
|
33
40
|
}
|
|
34
41
|
|
|
35
|
-
.input
|
|
36
|
-
|
|
42
|
+
.input {
|
|
43
|
+
flex: 1;
|
|
44
|
+
min-width: 0;
|
|
45
|
+
height: 100%;
|
|
46
|
+
border: none;
|
|
47
|
+
background: transparent;
|
|
48
|
+
color: var(--ui-foreground);
|
|
49
|
+
font-family: var(--ui-font-sans);
|
|
50
|
+
font-size: 0.875rem;
|
|
51
|
+
outline: none;
|
|
37
52
|
}
|
|
38
|
-
|
|
39
|
-
|
|
53
|
+
|
|
54
|
+
.input::placeholder {
|
|
55
|
+
color: var(--ui-text-faint);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Slots de prefixo/sufixo (ícones). Vazios não ocupam espaço. */
|
|
59
|
+
.affix {
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
color: var(--ui-text-muted);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.affix::slotted(svg),
|
|
66
|
+
::slotted([slot="prefix"]),
|
|
67
|
+
::slotted([slot="suffix"]) {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
color: var(--ui-text-muted);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.clear {
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
flex: none;
|
|
77
|
+
width: 1.25rem;
|
|
78
|
+
height: 1.25rem;
|
|
79
|
+
padding: 0;
|
|
80
|
+
border: none;
|
|
81
|
+
border-radius: var(--ui-radius-full);
|
|
82
|
+
background: var(--ui-chip);
|
|
83
|
+
color: var(--ui-text-muted);
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
transition: all var(--ui-duration) var(--ui-ease);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.clear:hover {
|
|
89
|
+
color: var(--ui-foreground);
|
|
90
|
+
background: var(--ui-panel-strong);
|
|
40
91
|
}
|
|
@@ -9,6 +9,8 @@ export class UiInput {
|
|
|
9
9
|
this.disabled = false;
|
|
10
10
|
/** Marca o campo como inválido (estilo + aria-invalid). */
|
|
11
11
|
this.invalid = false;
|
|
12
|
+
/** Exibe um botão para limpar o valor quando preenchido. */
|
|
13
|
+
this.clearable = false;
|
|
12
14
|
this.onInput = (event) => {
|
|
13
15
|
const target = event.target;
|
|
14
16
|
this.value = target.value;
|
|
@@ -17,9 +19,15 @@ export class UiInput {
|
|
|
17
19
|
this.onChange = (event) => {
|
|
18
20
|
this.uiChange.emit(event.target.value);
|
|
19
21
|
};
|
|
22
|
+
this.clear = () => {
|
|
23
|
+
this.value = "";
|
|
24
|
+
this.uiInput.emit("");
|
|
25
|
+
this.uiChange.emit("");
|
|
26
|
+
};
|
|
20
27
|
}
|
|
21
28
|
render() {
|
|
22
|
-
|
|
29
|
+
const showClear = this.clearable && !!this.value && !this.disabled;
|
|
30
|
+
return (h(Host, { key: 'cfe13feedab47ba88763ae727eb77ca15a0c52a3' }, h("div", { key: '7c79750f2ad87a55462a2416e9d46b4558f9b279', class: { field: true, invalid: this.invalid, disabled: this.disabled } }, h("span", { key: 'dafa1e0120f0de7a041ecfdb98db4203c1d67a28', class: "affix" }, h("slot", { key: '80aef681671784cd65f473975e441027d038c340', name: "prefix" })), h("input", { key: '8bad96710b4190784302fe9ce908f33aef0bc126', class: "input", type: this.type, value: this.value, name: this.name, placeholder: this.placeholder, disabled: this.disabled, "aria-invalid": this.invalid ? "true" : null, onInput: this.onInput, onChange: this.onChange }), showClear && (h("button", { key: '4b26604a6c1ff8004afa6ef0964490ba82553d61', class: "clear", type: "button", "aria-label": "Limpar", onClick: this.clear }, h("svg", { key: '87195594cef1db73b86f1117233fdef13ee9fa1a', viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" }, h("path", { key: '66be8eddf982847bf22f59f9113b66b4e47ca005', d: "M18 6 6 18M6 6l12 12" })))), h("span", { key: '749bf6ba578fd22b2d6c34b0fb7522f5a87a33e3', class: "affix" }, h("slot", { key: 'b226025774cedd33f915c6155061044b272d77a1', name: "suffix" })))));
|
|
23
31
|
}
|
|
24
32
|
static get is() { return "ui-input"; }
|
|
25
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -152,6 +160,26 @@ export class UiInput {
|
|
|
152
160
|
"setter": false,
|
|
153
161
|
"reflect": false,
|
|
154
162
|
"attribute": "name"
|
|
163
|
+
},
|
|
164
|
+
"clearable": {
|
|
165
|
+
"type": "boolean",
|
|
166
|
+
"mutable": false,
|
|
167
|
+
"complexType": {
|
|
168
|
+
"original": "boolean",
|
|
169
|
+
"resolved": "boolean",
|
|
170
|
+
"references": {}
|
|
171
|
+
},
|
|
172
|
+
"required": false,
|
|
173
|
+
"optional": false,
|
|
174
|
+
"docs": {
|
|
175
|
+
"tags": [],
|
|
176
|
+
"text": "Exibe um bot\u00E3o para limpar o valor quando preenchido."
|
|
177
|
+
},
|
|
178
|
+
"getter": false,
|
|
179
|
+
"setter": false,
|
|
180
|
+
"reflect": false,
|
|
181
|
+
"attribute": "clearable",
|
|
182
|
+
"defaultValue": "false"
|
|
155
183
|
}
|
|
156
184
|
};
|
|
157
185
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class UiLabel {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '45a53d43b29ba78ac9852334536e9d7cb93e9c3c' }, h("label", { key: 'f8209140ec401f7a055d398181a421f281307a9b', class: "label" }, h("slot", { key: '50ba3bbce082e8f0c402c7acb3cd25ce822e3728' }))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "ui-label"; }
|
|
7
7
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.navbar {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
gap: 1rem;
|
|
10
|
+
padding: 0.75rem 1.25rem;
|
|
11
|
+
background: var(--ui-panel-strong);
|
|
12
|
+
backdrop-filter: blur(22px);
|
|
13
|
+
border-bottom: 1px solid var(--ui-border);
|
|
14
|
+
font-family: var(--ui-font-sans);
|
|
15
|
+
color: var(--ui-text-soft);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.brand {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 0.5rem;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
color: var(--ui-foreground);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.center {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 1rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.actions {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
gap: 0.75rem;
|
|
36
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class UiNavbar {
|
|
3
|
+
render() {
|
|
4
|
+
return (h(Host, { key: 'db6c3b0a7eee0812d931d4fb4c8b5ce444749b5e' }, h("nav", { key: '990bc62b051ca9f24ee5be4bf4e383873e5d8269', class: "navbar" }, h("div", { key: '999b46029fb0e0b6f5a04942d9326b30f7b0e392', class: "brand" }, h("slot", { key: '189a4521a16efdec4eee5c433b17a71028f05c90', name: "brand" })), h("div", { key: 'b3e129ad603ed6d32ec676aab96cf39e51834dec', class: "center" }, h("slot", { key: 'dc1fff1b9c536df2d88b5e92a83634d1e3bca384' })), h("div", { key: '854fac1322e96c7c67bf204af17ea665494c0fc5', class: "actions" }, h("slot", { key: '0f07b817547c866df0137f8667790b3caa65bea8', name: "actions" })))));
|
|
5
|
+
}
|
|
6
|
+
static get is() { return "ui-navbar"; }
|
|
7
|
+
static get encapsulation() { return "shadow"; }
|
|
8
|
+
static get originalStyleUrls() {
|
|
9
|
+
return {
|
|
10
|
+
"$": ["ui-navbar.css"]
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
static get styleUrls() {
|
|
14
|
+
return {
|
|
15
|
+
"$": ["ui-navbar.css"]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.pagination {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 0.25rem;
|
|
9
|
+
font-family: var(--ui-font-sans);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.page {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
min-width: 2.25rem;
|
|
17
|
+
height: 2.25rem;
|
|
18
|
+
padding: 0 0.5rem;
|
|
19
|
+
border: 1px solid var(--ui-border);
|
|
20
|
+
border-radius: var(--ui-radius-sm);
|
|
21
|
+
background: transparent;
|
|
22
|
+
color: var(--ui-foreground);
|
|
23
|
+
font-family: var(--ui-font-sans);
|
|
24
|
+
font-size: 0.875rem;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
outline: none;
|
|
27
|
+
transition: all var(--ui-duration) var(--ui-ease);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.page:hover {
|
|
31
|
+
border-color: var(--ui-border-strong);
|
|
32
|
+
background: var(--ui-chip);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.page:focus-visible {
|
|
36
|
+
box-shadow: 0 0 0 2px var(--ui-ring);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.page:disabled {
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
opacity: 0.5;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.page.active {
|
|
45
|
+
background: var(--ui-accent);
|
|
46
|
+
color: var(--ui-accent-contrast);
|
|
47
|
+
border-color: var(--ui-accent);
|
|
48
|
+
box-shadow: var(--ui-shadow-sm);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ellipsis {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
min-width: 2.25rem;
|
|
56
|
+
height: 2.25rem;
|
|
57
|
+
color: var(--ui-text-faint);
|
|
58
|
+
font-size: 0.875rem;
|
|
59
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class UiPagination {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Total de páginas. */
|
|
5
|
+
this.total = 1;
|
|
6
|
+
/** Página atual. */
|
|
7
|
+
this.current = 1;
|
|
8
|
+
/** Quantidade de páginas ao redor da atual. */
|
|
9
|
+
this.siblings = 1;
|
|
10
|
+
this.clamp = (page) => Math.min(Math.max(page, 1), Math.max(this.total, 1));
|
|
11
|
+
this.go = (page) => {
|
|
12
|
+
const next = this.clamp(page);
|
|
13
|
+
if (next === this.current)
|
|
14
|
+
return;
|
|
15
|
+
this.current = next;
|
|
16
|
+
this.uiChange.emit(next);
|
|
17
|
+
};
|
|
18
|
+
this.buildRange = () => {
|
|
19
|
+
const total = Math.max(this.total, 1);
|
|
20
|
+
const current = this.clamp(this.current);
|
|
21
|
+
const siblings = Math.max(this.siblings, 0);
|
|
22
|
+
const start = Math.max(current - siblings, 1);
|
|
23
|
+
const end = Math.min(current + siblings, total);
|
|
24
|
+
const pages = new Set([1, total]);
|
|
25
|
+
for (let page = start; page <= end; page += 1)
|
|
26
|
+
pages.add(page);
|
|
27
|
+
const sorted = Array.from(pages)
|
|
28
|
+
.filter((page) => page >= 1 && page <= total)
|
|
29
|
+
.sort((a, b) => a - b);
|
|
30
|
+
const result = [];
|
|
31
|
+
let previous = 0;
|
|
32
|
+
for (const page of sorted) {
|
|
33
|
+
if (previous && page - previous > 1)
|
|
34
|
+
result.push("...");
|
|
35
|
+
result.push(page);
|
|
36
|
+
previous = page;
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
const total = Math.max(this.total, 1);
|
|
43
|
+
const current = this.clamp(this.current);
|
|
44
|
+
const entries = this.buildRange();
|
|
45
|
+
return (h(Host, { key: '23be36b9c734a9c43e9644337a58e4ede719215d' }, h("nav", { key: '618c7c85d1ea8f93bdd058d7ba4e61a62991e2d6', class: "pagination", role: "navigation", "aria-label": "Pagina\u00E7\u00E3o" }, h("button", { key: 'a9c0cac9d2b2fb6c61e9627158efd08f1e20f597', class: "page nav", type: "button", "aria-label": "P\u00E1gina anterior", disabled: current <= 1, onClick: () => this.go(current - 1) }, "\u2039"), entries.map((entry, index) => {
|
|
46
|
+
if (entry === "...") {
|
|
47
|
+
return (h("span", { key: `ellipsis-${index}`, class: "ellipsis", "aria-hidden": "true" }, "\u2026"));
|
|
48
|
+
}
|
|
49
|
+
const active = entry === current;
|
|
50
|
+
return (h("button", { key: entry, class: { page: true, active }, type: "button", "aria-label": `Página ${entry}`, "aria-current": active ? "page" : undefined, onClick: () => this.go(entry) }, entry));
|
|
51
|
+
}), h("button", { key: '38fb86bda60934768f24c117e8586acb35f88513', class: "page nav", type: "button", "aria-label": "Pr\u00F3xima p\u00E1gina", disabled: current >= total, onClick: () => this.go(current + 1) }, "\u203A"))));
|
|
52
|
+
}
|
|
53
|
+
static get is() { return "ui-pagination"; }
|
|
54
|
+
static get encapsulation() { return "shadow"; }
|
|
55
|
+
static get originalStyleUrls() {
|
|
56
|
+
return {
|
|
57
|
+
"$": ["ui-pagination.css"]
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
static get styleUrls() {
|
|
61
|
+
return {
|
|
62
|
+
"$": ["ui-pagination.css"]
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
static get properties() {
|
|
66
|
+
return {
|
|
67
|
+
"total": {
|
|
68
|
+
"type": "number",
|
|
69
|
+
"mutable": false,
|
|
70
|
+
"complexType": {
|
|
71
|
+
"original": "number",
|
|
72
|
+
"resolved": "number",
|
|
73
|
+
"references": {}
|
|
74
|
+
},
|
|
75
|
+
"required": false,
|
|
76
|
+
"optional": false,
|
|
77
|
+
"docs": {
|
|
78
|
+
"tags": [],
|
|
79
|
+
"text": "Total de p\u00E1ginas."
|
|
80
|
+
},
|
|
81
|
+
"getter": false,
|
|
82
|
+
"setter": false,
|
|
83
|
+
"reflect": false,
|
|
84
|
+
"attribute": "total",
|
|
85
|
+
"defaultValue": "1"
|
|
86
|
+
},
|
|
87
|
+
"current": {
|
|
88
|
+
"type": "number",
|
|
89
|
+
"mutable": true,
|
|
90
|
+
"complexType": {
|
|
91
|
+
"original": "number",
|
|
92
|
+
"resolved": "number",
|
|
93
|
+
"references": {}
|
|
94
|
+
},
|
|
95
|
+
"required": false,
|
|
96
|
+
"optional": false,
|
|
97
|
+
"docs": {
|
|
98
|
+
"tags": [],
|
|
99
|
+
"text": "P\u00E1gina atual."
|
|
100
|
+
},
|
|
101
|
+
"getter": false,
|
|
102
|
+
"setter": false,
|
|
103
|
+
"reflect": true,
|
|
104
|
+
"attribute": "current",
|
|
105
|
+
"defaultValue": "1"
|
|
106
|
+
},
|
|
107
|
+
"siblings": {
|
|
108
|
+
"type": "number",
|
|
109
|
+
"mutable": false,
|
|
110
|
+
"complexType": {
|
|
111
|
+
"original": "number",
|
|
112
|
+
"resolved": "number",
|
|
113
|
+
"references": {}
|
|
114
|
+
},
|
|
115
|
+
"required": false,
|
|
116
|
+
"optional": false,
|
|
117
|
+
"docs": {
|
|
118
|
+
"tags": [],
|
|
119
|
+
"text": "Quantidade de p\u00E1ginas ao redor da atual."
|
|
120
|
+
},
|
|
121
|
+
"getter": false,
|
|
122
|
+
"setter": false,
|
|
123
|
+
"reflect": false,
|
|
124
|
+
"attribute": "siblings",
|
|
125
|
+
"defaultValue": "1"
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
static get events() {
|
|
130
|
+
return [{
|
|
131
|
+
"method": "uiChange",
|
|
132
|
+
"name": "uiChange",
|
|
133
|
+
"bubbles": true,
|
|
134
|
+
"cancelable": true,
|
|
135
|
+
"composed": true,
|
|
136
|
+
"docs": {
|
|
137
|
+
"tags": [],
|
|
138
|
+
"text": "Emitido quando a p\u00E1gina muda."
|
|
139
|
+
},
|
|
140
|
+
"complexType": {
|
|
141
|
+
"original": "number",
|
|
142
|
+
"resolved": "number",
|
|
143
|
+
"references": {}
|
|
144
|
+
}
|
|
145
|
+
}];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -73,7 +73,7 @@ export class UiPopover {
|
|
|
73
73
|
this.cleanup = undefined;
|
|
74
74
|
}
|
|
75
75
|
render() {
|
|
76
|
-
return (h(Host, { key: '
|
|
76
|
+
return (h(Host, { key: '005686226a579c5a9968f9b99bc177bfc523f4bc' }, h("span", { key: '3c43cbdfd37c6ec5243c94069fb3e417fb4fde8b', class: "trigger", ref: (el) => (this.triggerEl = el), onClick: this.onTriggerClick }, h("slot", { key: 'bcc68719623c4035cb4b811d52d916c86b814657', name: "trigger" })), h("div", { key: '04865b639bcb5ba267d1ed3e0399f8b677c1befa', class: { panel: true, "is-open": this.open }, ref: (el) => (this.floatingEl = el) }, h("slot", { key: '2a518fa968650f9e844996b21d421f5e96834fbd' }))));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "ui-popover"; }
|
|
79
79
|
static get encapsulation() { return "shadow"; }
|
|
@@ -19,7 +19,7 @@ export class UiProgress {
|
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
21
|
const determinate = !this.isIndeterminate;
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '0d53e528a9a2176e683310c375ff63a3785b7bc6', role: "progressbar", "aria-valuenow": determinate ? String(this.value) : undefined, "aria-valuemin": determinate ? "0" : undefined, "aria-valuemax": determinate ? String(this.max) : undefined }, h("div", { key: '5e7511d189ebc53dfffa6f9aabf0c6d110d2ba0f', class: "track" }, h("div", { key: '7d68e2e258c8d31a46815a66416853ea31af1b79', class: { indicator: true, indeterminate: this.isIndeterminate }, style: determinate ? { width: `${this.percent}%` } : undefined }))));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "ui-progress"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
position: relative;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ring {
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ring.indeterminate {
|
|
13
|
+
animation: ui-progress-circular-spin 1s linear infinite;
|
|
14
|
+
transform-origin: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.track {
|
|
18
|
+
fill: none;
|
|
19
|
+
stroke: var(--ui-chip);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.indicator {
|
|
23
|
+
fill: none;
|
|
24
|
+
stroke: var(--ui-accent);
|
|
25
|
+
transform: rotate(-90deg);
|
|
26
|
+
transform-origin: center;
|
|
27
|
+
transition: stroke-dashoffset var(--ui-duration) var(--ui-ease);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.value {
|
|
31
|
+
position: absolute;
|
|
32
|
+
inset: 0;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
font-family: var(--ui-font-sans);
|
|
37
|
+
font-size: 0.8rem;
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
color: var(--ui-foreground);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes ui-progress-circular-spin {
|
|
43
|
+
to {
|
|
44
|
+
transform: rotate(360deg);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class UiProgressCircular {
|
|
3
|
+
constructor() {
|
|
4
|
+
/** Valor atual do progresso. `null` torna o componente indeterminado. */
|
|
5
|
+
this.value = null;
|
|
6
|
+
/** Valor máximo. */
|
|
7
|
+
this.max = 100;
|
|
8
|
+
/** Tamanho do anel (qualquer unidade CSS). */
|
|
9
|
+
this.size = "3rem";
|
|
10
|
+
/** Espessura do traço. */
|
|
11
|
+
this.strokeWidth = 4;
|
|
12
|
+
/** Força o estado indeterminado. */
|
|
13
|
+
this.indeterminate = false;
|
|
14
|
+
/** Exibe o percentual no centro quando determinado. */
|
|
15
|
+
this.showValue = false;
|
|
16
|
+
}
|
|
17
|
+
get isIndeterminate() {
|
|
18
|
+
return this.indeterminate || this.value === null;
|
|
19
|
+
}
|
|
20
|
+
get percent() {
|
|
21
|
+
if (this.value === null || this.max <= 0)
|
|
22
|
+
return 0;
|
|
23
|
+
const clamped = Math.min(Math.max(this.value, 0), this.max);
|
|
24
|
+
return clamped / this.max;
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
|
+
const determinate = !this.isIndeterminate;
|
|
28
|
+
const radius = 50 - this.strokeWidth;
|
|
29
|
+
const circumference = 2 * Math.PI * radius;
|
|
30
|
+
const dashoffset = determinate
|
|
31
|
+
? circumference * (1 - this.percent)
|
|
32
|
+
: circumference * 0.75;
|
|
33
|
+
return (h(Host, { key: '4201e2e660c07a1b3d5ad6e2a464b3dc4075308a', role: "progressbar", "aria-valuenow": determinate ? String(this.value) : undefined, "aria-valuemin": determinate ? "0" : undefined, "aria-valuemax": determinate ? String(this.max) : undefined, style: { width: this.size, height: this.size } }, h("svg", { key: 'fe9226a711cbdd751baf6fd06e8acef3af63349e', class: { ring: true, indeterminate: this.isIndeterminate }, width: this.size, height: this.size, viewBox: "0 0 100 100" }, h("circle", { key: 'c7dc8282a2295ac97009f575bb7f116d54b0f917', class: "track", cx: "50", cy: "50", r: String(radius), "stroke-width": String(this.strokeWidth) }), h("circle", { key: '04f88283dde12b1e6c2206f7421fb4fa72c6d569', class: "indicator", cx: "50", cy: "50", r: String(radius), "stroke-width": String(this.strokeWidth), "stroke-linecap": "round", "stroke-dasharray": String(circumference), "stroke-dashoffset": String(dashoffset) })), this.showValue && determinate ? (h("div", { class: "value" }, Math.round(this.percent * 100), "%")) : null));
|
|
34
|
+
}
|
|
35
|
+
static get is() { return "ui-progress-circular"; }
|
|
36
|
+
static get encapsulation() { return "shadow"; }
|
|
37
|
+
static get originalStyleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["ui-progress-circular.css"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static get styleUrls() {
|
|
43
|
+
return {
|
|
44
|
+
"$": ["ui-progress-circular.css"]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
static get properties() {
|
|
48
|
+
return {
|
|
49
|
+
"value": {
|
|
50
|
+
"type": "number",
|
|
51
|
+
"mutable": false,
|
|
52
|
+
"complexType": {
|
|
53
|
+
"original": "number | null",
|
|
54
|
+
"resolved": "null | number",
|
|
55
|
+
"references": {}
|
|
56
|
+
},
|
|
57
|
+
"required": false,
|
|
58
|
+
"optional": false,
|
|
59
|
+
"docs": {
|
|
60
|
+
"tags": [],
|
|
61
|
+
"text": "Valor atual do progresso. `null` torna o componente indeterminado."
|
|
62
|
+
},
|
|
63
|
+
"getter": false,
|
|
64
|
+
"setter": false,
|
|
65
|
+
"reflect": false,
|
|
66
|
+
"attribute": "value",
|
|
67
|
+
"defaultValue": "null"
|
|
68
|
+
},
|
|
69
|
+
"max": {
|
|
70
|
+
"type": "number",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "number",
|
|
74
|
+
"resolved": "number",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": "Valor m\u00E1ximo."
|
|
82
|
+
},
|
|
83
|
+
"getter": false,
|
|
84
|
+
"setter": false,
|
|
85
|
+
"reflect": false,
|
|
86
|
+
"attribute": "max",
|
|
87
|
+
"defaultValue": "100"
|
|
88
|
+
},
|
|
89
|
+
"size": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "string",
|
|
94
|
+
"resolved": "string",
|
|
95
|
+
"references": {}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": false,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": "Tamanho do anel (qualquer unidade CSS)."
|
|
102
|
+
},
|
|
103
|
+
"getter": false,
|
|
104
|
+
"setter": false,
|
|
105
|
+
"reflect": false,
|
|
106
|
+
"attribute": "size",
|
|
107
|
+
"defaultValue": "\"3rem\""
|
|
108
|
+
},
|
|
109
|
+
"strokeWidth": {
|
|
110
|
+
"type": "number",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "number",
|
|
114
|
+
"resolved": "number",
|
|
115
|
+
"references": {}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": false,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "Espessura do tra\u00E7o."
|
|
122
|
+
},
|
|
123
|
+
"getter": false,
|
|
124
|
+
"setter": false,
|
|
125
|
+
"reflect": false,
|
|
126
|
+
"attribute": "stroke-width",
|
|
127
|
+
"defaultValue": "4"
|
|
128
|
+
},
|
|
129
|
+
"indeterminate": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "boolean",
|
|
134
|
+
"resolved": "boolean",
|
|
135
|
+
"references": {}
|
|
136
|
+
},
|
|
137
|
+
"required": false,
|
|
138
|
+
"optional": false,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": "For\u00E7a o estado indeterminado."
|
|
142
|
+
},
|
|
143
|
+
"getter": false,
|
|
144
|
+
"setter": false,
|
|
145
|
+
"reflect": false,
|
|
146
|
+
"attribute": "indeterminate",
|
|
147
|
+
"defaultValue": "false"
|
|
148
|
+
},
|
|
149
|
+
"showValue": {
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"mutable": false,
|
|
152
|
+
"complexType": {
|
|
153
|
+
"original": "boolean",
|
|
154
|
+
"resolved": "boolean",
|
|
155
|
+
"references": {}
|
|
156
|
+
},
|
|
157
|
+
"required": false,
|
|
158
|
+
"optional": false,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": "Exibe o percentual no centro quando determinado."
|
|
162
|
+
},
|
|
163
|
+
"getter": false,
|
|
164
|
+
"setter": false,
|
|
165
|
+
"reflect": false,
|
|
166
|
+
"attribute": "show-value",
|
|
167
|
+
"defaultValue": "false"
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
}
|