@govbr-ds/webcomponents 2.1.2 → 2.2.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/README.md +87 -46
- package/cem/custom-elements.json +6367 -1134
- package/cem/webcomponents.html-custom-data.json +399 -286
- package/dist/cjs/br-avatar.cjs.entry.js +21 -14
- package/dist/cjs/br-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/br-breadcrumb.cjs.entry.js +49 -22
- package/dist/cjs/br-button_2.cjs.entry.js +72 -35
- package/dist/cjs/br-card.cjs.entry.js +6 -5
- package/dist/cjs/br-carousel-page.cjs.entry.js +3 -3
- package/dist/cjs/br-carousel.cjs.entry.js +77 -21
- package/dist/cjs/br-checkbox-group.cjs.entry.js +157 -27
- package/dist/cjs/br-checkbox.cjs.entry.js +85 -15
- package/dist/cjs/br-checkgroup.cjs.entry.js +5 -2
- package/dist/cjs/br-collapse_2.cjs.entry.js +85 -26
- package/dist/cjs/br-cookiebar-cookie.cjs.entry.js +4 -4
- package/dist/cjs/br-cookiebar-group.cjs.entry.js +4 -4
- package/dist/cjs/br-cookiebar-header.cjs.entry.js +4 -4
- package/dist/cjs/br-cookiebar-link.cjs.entry.js +14 -6
- package/dist/cjs/br-cookiebar-note-group.cjs.entry.js +3 -5
- package/dist/cjs/br-cookiebar-note.cjs.entry.js +4 -4
- package/dist/cjs/br-cookiebar.cjs.entry.js +38 -25
- package/dist/cjs/br-crumb.cjs.entry.js +2 -2
- package/dist/cjs/br-date-picker_3.cjs.entry.js +246 -88
- package/dist/cjs/br-datetime-picker.cjs.entry.js +115 -527
- package/dist/cjs/br-divider.cjs.entry.js +70 -17
- package/dist/cjs/br-dropdown_2.cjs.entry.js +304 -122
- package/dist/cjs/br-footer-category.cjs.entry.js +10 -6
- package/dist/cjs/br-footer-item.cjs.entry.js +9 -4
- package/dist/cjs/br-footer-legal.cjs.entry.js +4 -4
- package/dist/cjs/br-footer-logo.cjs.entry.js +22 -10
- package/dist/cjs/br-footer-social.cjs.entry.js +14 -6
- package/dist/cjs/br-footer.cjs.entry.js +16 -7
- package/dist/cjs/br-header-function.cjs.entry.js +28 -7
- package/dist/cjs/br-header-link.cjs.entry.js +25 -4
- package/dist/cjs/br-header-list.cjs.entry.js +6 -17
- package/dist/cjs/br-header-logo.cjs.entry.js +18 -7
- package/dist/cjs/br-header.cjs.entry.js +72 -17
- package/dist/cjs/br-icon.cjs.entry.js +160 -23
- package/dist/cjs/br-input.cjs.entry.js +130 -39
- package/dist/cjs/br-item.cjs.entry.js +96 -48
- package/dist/cjs/br-link.cjs.entry.js +20 -7
- package/dist/cjs/br-loading.cjs.entry.js +100 -38
- package/dist/cjs/br-magic-button.cjs.entry.js +26 -9
- package/dist/cjs/br-menu-group.cjs.entry.js +14 -3
- package/dist/cjs/br-menu-header.cjs.entry.js +4 -4
- package/dist/cjs/br-menu-info.cjs.entry.js +4 -4
- package/dist/cjs/br-menu-item.cjs.entry.js +27 -5
- package/dist/cjs/br-menu-link.cjs.entry.js +14 -6
- package/dist/cjs/br-menu-list.cjs.entry.js +23 -27
- package/dist/cjs/br-menu-logo.cjs.entry.js +4 -4
- package/dist/cjs/br-menu-social.cjs.entry.js +16 -6
- package/dist/cjs/br-menu.cjs.entry.js +41 -64
- package/dist/cjs/br-modal.cjs.entry.js +26 -40
- package/dist/cjs/br-notification-body.cjs.entry.js +4 -4
- package/dist/cjs/br-notification-header.cjs.entry.js +4 -4
- package/dist/cjs/br-notification-item.cjs.entry.js +14 -8
- package/dist/cjs/br-notification.cjs.entry.js +23 -8
- package/dist/cjs/br-pagination.cjs.entry.js +119 -87
- package/dist/cjs/br-radio-group.cjs.entry.js +106 -57
- package/dist/cjs/br-radio.cjs.entry.js +61 -11
- package/dist/cjs/br-scrim.cjs.entry.js +161 -67
- package/dist/cjs/br-select-input_3.cjs.entry.js +283 -90
- package/dist/cjs/br-sign-in.cjs.entry.js +34 -15
- package/dist/cjs/br-skip-link-item.cjs.entry.js +39 -2
- package/dist/cjs/br-skip-link.cjs.entry.js +50 -33
- package/dist/cjs/br-skiplink-item.cjs.entry.js +22 -6
- package/dist/cjs/br-slider.cjs.entry.js +521 -99
- package/dist/cjs/br-step_2.cjs.entry.js +98 -44
- package/dist/cjs/br-switch.cjs.entry.js +20 -11
- package/dist/cjs/br-tab-item.cjs.entry.js +38 -14
- package/dist/cjs/br-tab.cjs.entry.js +57 -44
- package/dist/cjs/br-table-body.cjs.entry.js +3 -3
- package/dist/cjs/br-table-cell.cjs.entry.js +30 -13
- package/dist/cjs/br-table-header-cell.cjs.entry.js +23 -7
- package/dist/cjs/br-table-header.cjs.entry.js +3 -3
- package/dist/cjs/br-table-row.cjs.entry.js +17 -3
- package/dist/cjs/br-table.cjs.entry.js +67 -21
- package/dist/cjs/br-tag.cjs.entry.js +48 -30
- package/dist/cjs/br-textarea.cjs.entry.js +117 -12
- package/dist/cjs/br-tooltip.cjs.entry.js +87 -41
- package/dist/cjs/br-upload.cjs.entry.js +83 -24
- package/dist/cjs/br-wizard-panel.cjs.entry.js +16 -3
- package/dist/cjs/br-wizard.cjs.entry.js +52 -28
- package/dist/cjs/{isValid-Fu3kaWNn.js → datetime-picker-props-validation-DmNKSXsy.js} +481 -4
- package/dist/cjs/{floating-ui-MBI1osio.js → floating-ui-B6nsdYUU.js} +24 -1
- package/dist/cjs/{floating-ui.dom-BUSTaaxR.js → floating-ui.dom-wzdGZjyG.js} +201 -113
- package/dist/cjs/{focus-DuywwJPR.js → focus-BhfJnFgJ.js} +21 -0
- package/dist/cjs/header-context-CdawuLsH.js +17 -0
- package/dist/cjs/id-DE4jSi-L.js +36 -0
- package/dist/cjs/{index-CRdcutym.js → index-CGgZBuyy.js} +68 -752
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/motion-CgIooxWS.js +29 -0
- package/dist/cjs/ownership-UnpufyCx.js +116 -0
- package/dist/cjs/prop-warning-xvEHQz8H.js +60 -0
- package/dist/cjs/props-D8dybmr0.js +124 -0
- package/dist/cjs/{swipe-BU8_XE9f.js → swipe-BGF-h9WY.js} +11 -1
- package/dist/cjs/webcomponents.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/avatar/avatar.css +1 -1
- package/dist/collection/components/avatar/avatar.js +48 -16
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +15 -3
- package/dist/collection/components/breadcrumb/breadcrumb.css +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +107 -22
- package/dist/collection/components/breadcrumb/crumb/crumb.js +14 -2
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/button/button.js +88 -24
- package/dist/collection/components/card/card.css +1 -1
- package/dist/collection/components/card/card.js +33 -5
- package/dist/collection/components/carousel/carousel-page/carousel-page.css +1 -1
- package/dist/collection/components/carousel/carousel-page/carousel-page.js +11 -4
- package/dist/collection/components/carousel/carousel.css +1 -1
- package/dist/collection/components/carousel/carousel.js +107 -21
- package/dist/collection/components/checkbox/checkbox.css +1 -1
- package/dist/collection/components/checkbox/checkbox.js +134 -20
- package/dist/collection/components/checkbox-group/checkbox-group.css +1 -1
- package/dist/collection/components/checkbox-group/checkbox-group.js +210 -30
- package/dist/collection/components/checkgroup/checkgroup.js +42 -4
- package/dist/collection/components/collapse/collapse.css +1 -1
- package/dist/collection/components/collapse/collapse.js +48 -8
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-cookie/cookiebar-cookie.js +17 -4
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-group/cookiebar-group.js +16 -7
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-header/cookiebar-header.js +15 -9
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-link/cookiebar-link.js +24 -8
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note/cookiebar-note.js +14 -4
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar-note-group/cookiebar-note-group.js +13 -5
- package/dist/collection/components/cookiebar/cookiebar.css +1 -1
- package/dist/collection/components/cookiebar/cookiebar.js +67 -32
- package/dist/collection/components/datetime-picker/date-picker/date-picker.css +1 -1
- package/dist/collection/components/datetime-picker/date-picker/date-picker.js +134 -35
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.css +1 -1
- package/dist/collection/components/datetime-picker/datetime-input/datetime-input.js +112 -22
- package/dist/collection/components/datetime-picker/datetime-picker-props-validation.js +13 -5
- package/dist/collection/components/datetime-picker/datetime-picker.css +1 -1
- package/dist/collection/components/datetime-picker/datetime-picker.js +158 -42
- package/dist/collection/components/datetime-picker/time-picker/time-picker.css +1 -1
- package/dist/collection/components/datetime-picker/time-picker/time-picker.js +78 -9
- package/dist/collection/components/divider/divider.css +1 -1
- package/dist/collection/components/divider/divider.js +101 -26
- package/dist/collection/components/dropdown/dropdown.css +1 -1
- package/dist/collection/components/dropdown/dropdown.js +166 -18
- package/dist/collection/components/footer/footer-category/footer-category.css +1 -1
- package/dist/collection/components/footer/footer-category/footer-category.js +23 -4
- package/dist/collection/components/footer/footer-item/footer-item.css +1 -1
- package/dist/collection/components/footer/footer-item/footer-item.js +21 -2
- package/dist/collection/components/footer/footer-legal/footer-legal.css +1 -1
- package/dist/collection/components/footer/footer-legal/footer-legal.js +16 -2
- package/dist/collection/components/footer/footer-logo/footer-logo.css +1 -1
- package/dist/collection/components/footer/footer-logo/footer-logo.js +35 -9
- package/dist/collection/components/footer/footer-social/footer-social.css +1 -1
- package/dist/collection/components/footer/footer-social/footer-social.js +26 -6
- package/dist/collection/components/footer/footer.css +1 -1
- package/dist/collection/components/footer/footer.js +48 -7
- package/dist/collection/components/header/header-context.js +13 -0
- package/dist/collection/components/header/header-function/header-function.css +1 -1
- package/dist/collection/components/header/header-function/header-function.js +51 -8
- package/dist/collection/components/header/header-link/header-link.css +1 -1
- package/dist/collection/components/header/header-link/header-link.js +52 -2
- package/dist/collection/components/header/header-list/header-list.css +1 -1
- package/dist/collection/components/header/header-list/header-list.js +20 -23
- package/dist/collection/components/header/header-logo/header-logo.css +1 -1
- package/dist/collection/components/header/header-logo/header-logo.js +33 -8
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/header/header.js +110 -24
- package/dist/collection/components/icon/default-icons-cache.js +111 -3
- package/dist/collection/components/icon/icon.css +1 -1
- package/dist/collection/components/icon/icon.js +80 -33
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/input/input.js +169 -54
- package/dist/collection/components/item/item.css +1 -1
- package/dist/collection/components/item/item.js +134 -51
- package/dist/collection/components/link/link.css +1 -1
- package/dist/collection/components/link/link.js +48 -15
- package/dist/collection/components/list/list.css +1 -1
- package/dist/collection/components/list/list.js +106 -25
- package/dist/collection/components/loading/loading.css +1 -1
- package/dist/collection/components/loading/loading.js +131 -43
- package/dist/collection/components/magic-button/magic-button.css +1 -1
- package/dist/collection/components/magic-button/magic-button.js +51 -9
- package/dist/collection/components/menu/menu-group/menu-group.css +1 -1
- package/dist/collection/components/menu/menu-group/menu-group.js +60 -2
- package/dist/collection/components/menu/menu-header/menu-header.css +1 -1
- package/dist/collection/components/menu/menu-header/menu-header.js +17 -2
- package/dist/collection/components/menu/menu-info/menu-info.css +1 -1
- package/dist/collection/components/menu/menu-info/menu-info.js +15 -2
- package/dist/collection/components/menu/menu-item/menu-item.css +1 -1
- package/dist/collection/components/menu/menu-item/menu-item.js +72 -8
- package/dist/collection/components/menu/menu-link/menu-link.css +1 -1
- package/dist/collection/components/menu/menu-link/menu-link.js +25 -4
- package/dist/collection/components/menu/menu-list/menu-list.css +1 -1
- package/dist/collection/components/menu/menu-list/menu-list.js +64 -29
- package/dist/collection/components/menu/menu-logo/menu-logo.css +1 -1
- package/dist/collection/components/menu/menu-logo/menu-logo.js +15 -2
- package/dist/collection/components/menu/menu-social/menu-social.css +1 -1
- package/dist/collection/components/menu/menu-social/menu-social.js +29 -7
- package/dist/collection/components/menu/menu.css +1 -1
- package/dist/collection/components/menu/menu.js +75 -68
- package/dist/collection/components/menu/menu.utils.js +8 -18
- package/dist/collection/components/message/message.css +1 -1
- package/dist/collection/components/message/message.js +50 -24
- package/dist/collection/components/modal/modal.css +1 -1
- package/dist/collection/components/modal/modal.js +54 -41
- package/dist/collection/components/notification/notification-body/notification-body.css +1 -1
- package/dist/collection/components/notification/notification-body/notification-body.js +13 -4
- package/dist/collection/components/notification/notification-header/notification-header.css +1 -1
- package/dist/collection/components/notification/notification-header/notification-header.js +13 -4
- package/dist/collection/components/notification/notification-item/notification-item.css +1 -1
- package/dist/collection/components/notification/notification-item/notification-item.js +23 -9
- package/dist/collection/components/notification/notification.css +1 -1
- package/dist/collection/components/notification/notification.js +54 -10
- package/dist/collection/components/pagination/pagination.css +1 -1
- package/dist/collection/components/pagination/pagination.js +161 -74
- package/dist/collection/components/radio/radio.css +1 -1
- package/dist/collection/components/radio/radio.js +109 -14
- package/dist/collection/components/radio-group/radio-group.css +1 -1
- package/dist/collection/components/radio-group/radio-group.js +153 -63
- package/dist/collection/components/scrim/scrim.css +1 -1
- package/dist/collection/components/scrim/scrim.js +215 -74
- package/dist/collection/components/scrim/scrim.utils.js +5 -51
- package/dist/collection/components/select/select-input/select-input.css +1 -1
- package/dist/collection/components/select/select-input/select-input.js +58 -5
- package/dist/collection/components/select/select-list/select-list.css +1 -1
- package/dist/collection/components/select/select-list/select-list.js +247 -52
- package/dist/collection/components/select/select-option/select-option.css +1 -1
- package/dist/collection/components/select/select-option/select-option.js +108 -46
- package/dist/collection/components/select/select.css +1 -1
- package/dist/collection/components/select/select.js +323 -118
- package/dist/collection/components/sign-in/sign-in.css +1 -1
- package/dist/collection/components/sign-in/sign-in.js +55 -16
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item-alias.js +112 -3
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.css +1 -1
- package/dist/collection/components/skip-link/skip-link-item/skip-link-item.js +58 -5
- package/dist/collection/components/skip-link/skip-link.css +1 -1
- package/dist/collection/components/skip-link/skip-link.js +78 -39
- package/dist/collection/components/slider/slider.css +1 -1
- package/dist/collection/components/slider/slider.js +530 -132
- package/dist/collection/components/slider/slider.utils.js +178 -0
- package/dist/collection/components/step/step-item/step-item.css +1 -1
- package/dist/collection/components/step/step-item/step-item.js +29 -12
- package/dist/collection/components/step/step.css +1 -1
- package/dist/collection/components/step/step.js +119 -44
- package/dist/collection/components/switch/switch.css +1 -1
- package/dist/collection/components/switch/switch.js +48 -15
- package/dist/collection/components/tab/tab-item/tab-item.css +1 -1
- package/dist/collection/components/tab/tab-item/tab-item.js +49 -14
- package/dist/collection/components/tab/tab.css +1 -1
- package/dist/collection/components/tab/tab.js +89 -46
- package/dist/collection/components/table/table-body/table-body.css +1 -1
- package/dist/collection/components/table/table-body/table-body.js +11 -7
- package/dist/collection/components/table/table-cell/table-cell.css +1 -1
- package/dist/collection/components/table/table-cell/table-cell.js +36 -17
- package/dist/collection/components/table/table-header/table-header.css +1 -1
- package/dist/collection/components/table/table-header/table-header.js +11 -7
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -1
- package/dist/collection/components/table/table-header-cell/table-header-cell.js +35 -13
- package/dist/collection/components/table/table-row/table-row.css +1 -1
- package/dist/collection/components/table/table-row/table-row.js +24 -7
- package/dist/collection/components/table/table.css +1 -1
- package/dist/collection/components/table/table.js +107 -31
- package/dist/collection/components/tag/tag.css +1 -1
- package/dist/collection/components/tag/tag.js +86 -36
- package/dist/collection/components/textarea/textarea.css +1 -1
- package/dist/collection/components/textarea/textarea.js +222 -19
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/tooltip/tooltip.js +134 -45
- package/dist/collection/components/upload/upload.css +1 -1
- package/dist/collection/components/upload/upload.js +135 -33
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.css +1 -1
- package/dist/collection/components/wizard/wizard-panel/wizard-panel.js +54 -3
- package/dist/collection/components/wizard/wizard.css +1 -1
- package/dist/collection/components/wizard/wizard.js +82 -28
- package/dist/collection/pages/scripts/component-controls-core.js +95 -0
- package/dist/collection/pages/scripts/component-controls.js +238 -153
- package/dist/collection/pages/scripts/dev-event-console.js +5 -1
- package/dist/collection/pages/scripts/menu.js +90 -5
- package/dist/collection/pages/scripts/pageLoader.js +1486 -586
- package/dist/collection/pages/scripts/pageloader-preview.js +787 -0
- package/dist/collection/pages/scripts/playground-core.js +173 -0
- package/dist/collection/shared/utils/cssVariables.js +2 -0
- package/dist/collection/shared/utils/date.js +8 -4
- package/dist/collection/shared/utils/floating-ui.js +24 -1
- package/dist/collection/shared/utils/focus.js +31 -0
- package/dist/collection/shared/utils/getRandom.js +16 -1
- package/dist/collection/shared/utils/helpers.js +4 -11
- package/dist/collection/shared/utils/id.js +23 -7
- package/dist/collection/shared/utils/index.js +6 -1
- package/dist/collection/shared/utils/isEmpty.js +5 -3
- package/dist/collection/shared/utils/motion.js +25 -0
- package/dist/collection/shared/utils/ownership.js +113 -0
- package/dist/collection/shared/utils/prop-warning.js +47 -0
- package/dist/collection/shared/utils/props.js +79 -0
- package/dist/collection/shared/utils/swipe.js +11 -1
- package/dist/collection/shared/utils/transition.js +3 -0
- package/dist/collection/shared/utils/virtual-scroll.js +24 -0
- package/dist/components/br-avatar.d.ts +1 -1
- package/dist/components/br-avatar.js +1 -1
- package/dist/components/br-breadcrumb-item.d.ts +1 -1
- package/dist/components/br-breadcrumb-item.js +1 -1
- package/dist/components/br-breadcrumb.d.ts +1 -1
- package/dist/components/br-breadcrumb.js +1 -1
- package/dist/components/br-button.d.ts +1 -1
- package/dist/components/br-button.js +1 -1
- package/dist/components/br-card.d.ts +1 -1
- package/dist/components/br-card.js +1 -1
- package/dist/components/br-carousel-page.d.ts +1 -1
- package/dist/components/br-carousel-page.js +1 -1
- package/dist/components/br-carousel.d.ts +1 -1
- package/dist/components/br-carousel.js +1 -1
- package/dist/components/br-checkbox-group.d.ts +1 -1
- package/dist/components/br-checkbox-group.js +1 -1
- package/dist/components/br-checkbox.d.ts +1 -1
- package/dist/components/br-checkbox.js +1 -1
- package/dist/components/br-checkgroup.d.ts +1 -1
- package/dist/components/br-checkgroup.js +1 -1
- package/dist/components/br-collapse.d.ts +1 -1
- package/dist/components/br-collapse.js +1 -1
- package/dist/components/br-cookiebar-cookie.d.ts +1 -1
- package/dist/components/br-cookiebar-cookie.js +1 -1
- package/dist/components/br-cookiebar-group.d.ts +1 -1
- package/dist/components/br-cookiebar-group.js +1 -1
- package/dist/components/br-cookiebar-header.d.ts +1 -1
- package/dist/components/br-cookiebar-header.js +1 -1
- package/dist/components/br-cookiebar-link.d.ts +1 -1
- package/dist/components/br-cookiebar-link.js +1 -1
- package/dist/components/br-cookiebar-note-group.d.ts +1 -1
- package/dist/components/br-cookiebar-note-group.js +1 -1
- package/dist/components/br-cookiebar-note.d.ts +1 -1
- package/dist/components/br-cookiebar-note.js +1 -1
- package/dist/components/br-cookiebar.d.ts +1 -1
- package/dist/components/br-cookiebar.js +1 -1
- package/dist/components/br-crumb.d.ts +1 -1
- package/dist/components/br-crumb.js +1 -1
- package/dist/components/br-date-picker.d.ts +1 -1
- package/dist/components/br-date-picker.js +1 -1
- package/dist/components/br-datetime-input.d.ts +1 -1
- package/dist/components/br-datetime-input.js +1 -1
- package/dist/components/br-datetime-picker.d.ts +1 -1
- package/dist/components/br-datetime-picker.js +1 -1
- package/dist/components/br-divider.d.ts +1 -1
- package/dist/components/br-divider.js +1 -1
- package/dist/components/br-dropdown.d.ts +1 -1
- package/dist/components/br-dropdown.js +1 -1
- package/dist/components/br-footer-category.d.ts +1 -1
- package/dist/components/br-footer-category.js +1 -1
- package/dist/components/br-footer-item.d.ts +1 -1
- package/dist/components/br-footer-item.js +1 -1
- package/dist/components/br-footer-legal.d.ts +1 -1
- package/dist/components/br-footer-legal.js +1 -1
- package/dist/components/br-footer-logo.d.ts +1 -1
- package/dist/components/br-footer-logo.js +1 -1
- package/dist/components/br-footer-social.d.ts +1 -1
- package/dist/components/br-footer-social.js +1 -1
- package/dist/components/br-footer.d.ts +1 -1
- package/dist/components/br-footer.js +1 -1
- package/dist/components/br-header-function.d.ts +1 -1
- package/dist/components/br-header-function.js +1 -1
- package/dist/components/br-header-link.d.ts +1 -1
- package/dist/components/br-header-link.js +1 -1
- package/dist/components/br-header-list.d.ts +1 -1
- package/dist/components/br-header-list.js +1 -1
- package/dist/components/br-header-logo.d.ts +1 -1
- package/dist/components/br-header-logo.js +1 -1
- package/dist/components/br-header.d.ts +1 -1
- package/dist/components/br-header.js +1 -1
- package/dist/components/br-icon.d.ts +1 -1
- package/dist/components/br-icon.js +1 -1
- package/dist/components/br-input.d.ts +1 -1
- package/dist/components/br-input.js +1 -1
- package/dist/components/br-item.d.ts +1 -1
- package/dist/components/br-item.js +1 -1
- package/dist/components/br-link.d.ts +1 -1
- package/dist/components/br-link.js +1 -1
- package/dist/components/br-list.d.ts +1 -1
- package/dist/components/br-list.js +1 -1
- package/dist/components/br-loading.d.ts +1 -1
- package/dist/components/br-loading.js +1 -1
- package/dist/components/br-magic-button.d.ts +1 -1
- package/dist/components/br-magic-button.js +1 -1
- package/dist/components/br-menu-group.d.ts +1 -1
- package/dist/components/br-menu-group.js +1 -1
- package/dist/components/br-menu-header.d.ts +1 -1
- package/dist/components/br-menu-header.js +1 -1
- package/dist/components/br-menu-info.d.ts +1 -1
- package/dist/components/br-menu-info.js +1 -1
- package/dist/components/br-menu-item.d.ts +1 -1
- package/dist/components/br-menu-item.js +1 -1
- package/dist/components/br-menu-link.d.ts +1 -1
- package/dist/components/br-menu-link.js +1 -1
- package/dist/components/br-menu-list.d.ts +1 -1
- package/dist/components/br-menu-list.js +1 -1
- package/dist/components/br-menu-logo.d.ts +1 -1
- package/dist/components/br-menu-logo.js +1 -1
- package/dist/components/br-menu-social.d.ts +1 -1
- package/dist/components/br-menu-social.js +1 -1
- package/dist/components/br-menu.d.ts +1 -1
- package/dist/components/br-menu.js +1 -1
- package/dist/components/br-message.d.ts +1 -1
- package/dist/components/br-message.js +1 -1
- package/dist/components/br-modal.d.ts +1 -1
- package/dist/components/br-modal.js +1 -1
- package/dist/components/br-notification-body.d.ts +1 -1
- package/dist/components/br-notification-body.js +1 -1
- package/dist/components/br-notification-header.d.ts +1 -1
- package/dist/components/br-notification-header.js +1 -1
- package/dist/components/br-notification-item.d.ts +1 -1
- package/dist/components/br-notification-item.js +1 -1
- package/dist/components/br-notification.d.ts +1 -1
- package/dist/components/br-notification.js +1 -1
- package/dist/components/br-pagination.d.ts +1 -1
- package/dist/components/br-pagination.js +1 -1
- package/dist/components/br-radio-group.d.ts +1 -1
- package/dist/components/br-radio-group.js +1 -1
- package/dist/components/br-radio.d.ts +1 -1
- package/dist/components/br-radio.js +1 -1
- package/dist/components/br-scrim.d.ts +1 -1
- package/dist/components/br-scrim.js +1 -1
- package/dist/components/br-select-input.d.ts +1 -1
- package/dist/components/br-select-input.js +1 -1
- package/dist/components/br-select-list.d.ts +1 -1
- package/dist/components/br-select-list.js +1 -1
- package/dist/components/br-select-option.d.ts +1 -1
- package/dist/components/br-select-option.js +1 -1
- package/dist/components/br-select.d.ts +1 -1
- package/dist/components/br-select.js +1 -1
- package/dist/components/br-sign-in.d.ts +1 -1
- package/dist/components/br-sign-in.js +1 -1
- package/dist/components/br-skip-link-item.d.ts +1 -1
- package/dist/components/br-skip-link-item.js +1 -1
- package/dist/components/br-skip-link.d.ts +1 -1
- package/dist/components/br-skip-link.js +1 -1
- package/dist/components/br-skiplink-item.d.ts +1 -1
- package/dist/components/br-skiplink-item.js +1 -1
- package/dist/components/br-slider.d.ts +1 -1
- package/dist/components/br-slider.js +1 -1
- package/dist/components/br-step-item.d.ts +1 -1
- package/dist/components/br-step-item.js +1 -1
- package/dist/components/br-step.d.ts +1 -1
- package/dist/components/br-step.js +1 -1
- package/dist/components/br-switch.d.ts +1 -1
- package/dist/components/br-switch.js +1 -1
- package/dist/components/br-tab-item.d.ts +1 -1
- package/dist/components/br-tab-item.js +1 -1
- package/dist/components/br-tab.d.ts +1 -1
- package/dist/components/br-tab.js +1 -1
- package/dist/components/br-table-body.d.ts +1 -1
- package/dist/components/br-table-body.js +1 -1
- package/dist/components/br-table-cell.d.ts +1 -1
- package/dist/components/br-table-cell.js +1 -1
- package/dist/components/br-table-header-cell.d.ts +1 -1
- package/dist/components/br-table-header-cell.js +1 -1
- package/dist/components/br-table-header.d.ts +1 -1
- package/dist/components/br-table-header.js +1 -1
- package/dist/components/br-table-row.d.ts +1 -1
- package/dist/components/br-table-row.js +1 -1
- package/dist/components/br-table.d.ts +1 -1
- package/dist/components/br-table.js +1 -1
- package/dist/components/br-tag.d.ts +1 -1
- package/dist/components/br-tag.js +1 -1
- package/dist/components/br-textarea.d.ts +1 -1
- package/dist/components/br-textarea.js +1 -1
- package/dist/components/br-time-picker.d.ts +1 -1
- package/dist/components/br-time-picker.js +1 -1
- package/dist/components/br-tooltip.d.ts +1 -1
- package/dist/components/br-tooltip.js +1 -1
- package/dist/components/br-upload.d.ts +1 -1
- package/dist/components/br-upload.js +1 -1
- package/dist/components/br-wizard-panel.d.ts +1 -1
- package/dist/components/br-wizard-panel.js +1 -1
- package/dist/components/br-wizard.d.ts +1 -1
- package/dist/components/br-wizard.js +1 -1
- package/dist/components/index.d.ts +89 -89
- package/dist/components/index.js +1 -1
- package/dist/components/p-B0o70fWP.js +5 -0
- package/dist/components/p-B96LROz9.js +5 -0
- package/dist/components/p-BDqef5-y.js +5 -0
- package/dist/components/p-BEJGB0Nd.js +5 -0
- package/dist/{webcomponents/p-Dmfk7eEe.js → components/p-BJZC_NuV.js} +1 -1
- package/dist/components/p-BJtdabsr.js +5 -0
- package/dist/components/p-BP5zMCxG.js +5 -0
- package/dist/components/p-BRaphxoP.js +5 -0
- package/dist/components/p-BUzBa9L1.js +5 -0
- package/dist/components/{p-DA5GS53D.js → p-BblZlUp2.js} +1 -1
- package/dist/components/p-Bc4nAk5i.js +5 -0
- package/dist/components/{p-C1yRmdso.js → p-BcqVlof7.js} +1 -1
- package/dist/components/p-BeJxz5TQ.js +5 -0
- package/dist/components/p-Bezou5CQ.js +5 -0
- package/dist/components/p-BrNh9KdF.js +5 -0
- package/dist/components/p-C5th2dxu.js +5 -0
- package/dist/components/p-CDtFCbKp.js +5 -0
- package/dist/components/p-CEdUp183.js +5 -0
- package/dist/components/p-CF7t0uxQ.js +5 -0
- package/dist/components/p-CFzHx6zV.js +5 -0
- package/dist/components/p-CG4em0S6.js +5 -0
- package/dist/components/p-CI4D3-pf.js +5 -0
- package/dist/components/p-CIrVPkVg.js +5 -0
- package/dist/components/p-CNwZRgyL.js +5 -0
- package/dist/components/p-CppRJiyC.js +5 -0
- package/dist/components/p-Cvk1Ggs5.js +5 -0
- package/dist/components/p-D12US39c.js +5 -0
- package/dist/components/p-D9Zo6FlV.js +5 -0
- package/dist/components/p-DGPJkJsj.js +5 -0
- package/dist/components/p-DSHbttu9.js +5 -0
- package/dist/components/p-DTGNra9m.js +5 -0
- package/dist/components/p-DWhzxlCx.js +5 -0
- package/dist/components/p-DX1wAFn4.js +5 -0
- package/dist/components/p-DiLI514I.js +5 -0
- package/dist/components/p-Dma14GVa.js +5 -0
- package/dist/components/p-DpRZ4B0d.js +5 -0
- package/dist/components/p-G35qEQZd.js +5 -0
- package/dist/components/p-Ho_IybzR.js +5 -0
- package/dist/components/p-SvVnvJdC.js +5 -0
- package/dist/components/p-emAWunES.js +5 -0
- package/dist/components/p-fB79wKCm.js +5 -0
- package/dist/components/p-k7p4QJ8a.js +5 -0
- package/dist/esm/br-avatar.entry.js +21 -14
- package/dist/esm/br-breadcrumb-item.entry.js +2 -2
- package/dist/esm/br-breadcrumb.entry.js +49 -22
- package/dist/esm/br-button_2.entry.js +72 -35
- package/dist/esm/br-card.entry.js +6 -5
- package/dist/esm/br-carousel-page.entry.js +3 -3
- package/dist/esm/br-carousel.entry.js +78 -22
- package/dist/esm/br-checkbox-group.entry.js +157 -27
- package/dist/esm/br-checkbox.entry.js +86 -16
- package/dist/esm/br-checkgroup.entry.js +5 -2
- package/dist/esm/br-collapse_2.entry.js +86 -27
- package/dist/esm/br-cookiebar-cookie.entry.js +4 -4
- package/dist/esm/br-cookiebar-group.entry.js +4 -4
- package/dist/esm/br-cookiebar-header.entry.js +4 -4
- package/dist/esm/br-cookiebar-link.entry.js +14 -6
- package/dist/esm/br-cookiebar-note-group.entry.js +3 -5
- package/dist/esm/br-cookiebar-note.entry.js +4 -4
- package/dist/esm/br-cookiebar.entry.js +39 -26
- package/dist/esm/br-crumb.entry.js +2 -2
- package/dist/esm/br-date-picker_3.entry.js +207 -49
- package/dist/esm/br-datetime-picker.entry.js +82 -494
- package/dist/esm/br-divider.entry.js +70 -17
- package/dist/esm/br-dropdown_2.entry.js +305 -123
- package/dist/esm/br-footer-category.entry.js +10 -6
- package/dist/esm/br-footer-item.entry.js +9 -4
- package/dist/esm/br-footer-legal.entry.js +4 -4
- package/dist/esm/br-footer-logo.entry.js +22 -10
- package/dist/esm/br-footer-social.entry.js +14 -6
- package/dist/esm/br-footer.entry.js +16 -7
- package/dist/esm/br-header-function.entry.js +28 -7
- package/dist/esm/br-header-link.entry.js +25 -4
- package/dist/esm/br-header-list.entry.js +7 -18
- package/dist/esm/br-header-logo.entry.js +18 -7
- package/dist/esm/br-header.entry.js +72 -17
- package/dist/esm/br-icon.entry.js +160 -23
- package/dist/esm/br-input.entry.js +132 -41
- package/dist/esm/br-item.entry.js +96 -48
- package/dist/esm/br-link.entry.js +20 -7
- package/dist/esm/br-loading.entry.js +100 -38
- package/dist/esm/br-magic-button.entry.js +26 -9
- package/dist/esm/br-menu-group.entry.js +14 -3
- package/dist/esm/br-menu-header.entry.js +4 -4
- package/dist/esm/br-menu-info.entry.js +4 -4
- package/dist/esm/br-menu-item.entry.js +27 -5
- package/dist/esm/br-menu-link.entry.js +14 -6
- package/dist/esm/br-menu-list.entry.js +23 -27
- package/dist/esm/br-menu-logo.entry.js +4 -4
- package/dist/esm/br-menu-social.entry.js +16 -6
- package/dist/esm/br-menu.entry.js +42 -65
- package/dist/esm/br-modal.entry.js +26 -40
- package/dist/esm/br-notification-body.entry.js +4 -4
- package/dist/esm/br-notification-header.entry.js +4 -4
- package/dist/esm/br-notification-item.entry.js +14 -8
- package/dist/esm/br-notification.entry.js +24 -9
- package/dist/esm/br-pagination.entry.js +119 -87
- package/dist/esm/br-radio-group.entry.js +107 -58
- package/dist/esm/br-radio.entry.js +62 -12
- package/dist/esm/br-scrim.entry.js +161 -67
- package/dist/esm/br-select-input_3.entry.js +283 -90
- package/dist/esm/br-sign-in.entry.js +34 -15
- package/dist/esm/br-skip-link-item.entry.js +39 -2
- package/dist/esm/br-skip-link.entry.js +50 -33
- package/dist/esm/br-skiplink-item.entry.js +22 -6
- package/dist/esm/br-slider.entry.js +519 -97
- package/dist/esm/br-step_2.entry.js +98 -44
- package/dist/esm/br-switch.entry.js +21 -12
- package/dist/esm/br-tab-item.entry.js +38 -14
- package/dist/esm/br-tab.entry.js +57 -44
- package/dist/esm/br-table-body.entry.js +3 -3
- package/dist/esm/br-table-cell.entry.js +30 -13
- package/dist/esm/br-table-header-cell.entry.js +23 -7
- package/dist/esm/br-table-header.entry.js +3 -3
- package/dist/esm/br-table-row.entry.js +17 -3
- package/dist/esm/br-table.entry.js +68 -22
- package/dist/esm/br-tag.entry.js +49 -31
- package/dist/esm/br-textarea.entry.js +118 -13
- package/dist/esm/br-tooltip.entry.js +88 -42
- package/dist/esm/br-upload.entry.js +84 -25
- package/dist/esm/br-wizard-panel.entry.js +16 -3
- package/dist/esm/br-wizard.entry.js +52 -28
- package/dist/esm/{datetime-picker-constants-Bfm58jO6.js → datetime-picker-constants-BtRPYRvA.js} +1 -1
- package/dist/esm/{isValid-DIUZX1qS.js → datetime-picker-props-validation-BeTcUTnE.js} +476 -5
- package/dist/esm/{event-DFN_so7I.js → event-CfuJQ1DY.js} +1 -1
- package/dist/esm/{floating-ui-BavFwMnx.js → floating-ui-CskvaxD5.js} +24 -1
- package/dist/esm/{floating-ui.dom-DIK54tTj.js → floating-ui.dom-D9Zo6FlV.js} +201 -114
- package/dist/esm/{focus-DxZJrIyL.js → focus-CNwZRgyL.js} +20 -1
- package/dist/esm/header-context-BEJGB0Nd.js +15 -0
- package/dist/esm/id-BeJxz5TQ.js +34 -0
- package/dist/esm/{index-Bo-2igoO.js → index-BQPOWxe5.js} +1 -1
- package/dist/esm/{index-C2RBydfd.js → index-Dcn7tRST.js} +68 -752
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/motion-DWhzxlCx.js +27 -0
- package/dist/esm/ownership-CDtFCbKp.js +111 -0
- package/dist/esm/prop-warning-BlGV-x0w.js +56 -0
- package/dist/esm/props-D07GjR4_.js +116 -0
- package/dist/esm/{swipe-Dmfk7eEe.js → swipe-BJZC_NuV.js} +11 -1
- package/dist/esm/webcomponents.js +4 -4
- package/dist/hydrate/index.js +7370 -2603
- package/dist/hydrate/index.mjs +7370 -2603
- package/dist/loader/index.d.ts +1 -1
- package/dist/types/components/avatar/avatar.d.ts +34 -4
- package/dist/types/components/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +14 -2
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +66 -5
- package/dist/types/components/breadcrumb/crumb/crumb.d.ts +13 -1
- package/dist/types/components/button/button.d.ts +45 -9
- package/dist/types/components/card/card.d.ts +31 -3
- package/dist/types/components/carousel/carousel-page/carousel-page.d.ts +10 -3
- package/dist/types/components/carousel/carousel.d.ts +46 -3
- package/dist/types/components/checkbox/checkbox.d.ts +59 -6
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +47 -5
- package/dist/types/components/checkgroup/checkgroup.d.ts +27 -5
- package/dist/types/components/collapse/collapse.d.ts +33 -4
- package/dist/types/components/cookiebar/cookiebar-cookie/cookiebar-cookie.d.ts +16 -3
- package/dist/types/components/cookiebar/cookiebar-group/cookiebar-group.d.ts +15 -6
- package/dist/types/components/cookiebar/cookiebar-header/cookiebar-header.d.ts +14 -8
- package/dist/types/components/cookiebar/cookiebar-link/cookiebar-link.d.ts +16 -5
- package/dist/types/components/cookiebar/cookiebar-note/cookiebar-note.d.ts +13 -3
- package/dist/types/components/cookiebar/cookiebar-note-group/cookiebar-note-group.d.ts +13 -3
- package/dist/types/components/cookiebar/cookiebar.d.ts +35 -10
- package/dist/types/components/datetime-picker/date-picker/date-picker.d.ts +63 -7
- package/dist/types/components/datetime-picker/datetime-input/datetime-input.d.ts +51 -9
- package/dist/types/components/datetime-picker/datetime-picker-props-validation.d.ts +4 -2
- package/dist/types/components/datetime-picker/datetime-picker.d.ts +118 -12
- package/dist/types/components/datetime-picker/time-picker/time-picker.d.ts +38 -4
- package/dist/types/components/divider/divider.d.ts +45 -8
- package/dist/types/components/dropdown/dropdown.d.ts +41 -3
- package/dist/types/components/footer/footer-category/footer-category.d.ts +16 -1
- package/dist/types/components/footer/footer-item/footer-item.d.ts +17 -1
- package/dist/types/components/footer/footer-legal/footer-legal.d.ts +15 -1
- package/dist/types/components/footer/footer-logo/footer-logo.d.ts +21 -2
- package/dist/types/components/footer/footer-social/footer-social.d.ts +20 -3
- package/dist/types/components/footer/footer.d.ts +39 -3
- package/dist/types/components/header/header-context.d.ts +1 -0
- package/dist/types/components/header/header-function/header-function.d.ts +24 -2
- package/dist/types/components/header/header-link/header-link.d.ts +22 -1
- package/dist/types/components/header/header-list/header-list.d.ts +16 -8
- package/dist/types/components/header/header-logo/header-logo.d.ts +20 -1
- package/dist/types/components/header/header.d.ts +45 -7
- package/dist/types/components/icon/icon.d.ts +44 -13
- package/dist/types/components/input/input.d.ts +65 -15
- package/dist/types/components/item/item.d.ts +38 -5
- package/dist/types/components/link/link.d.ts +41 -9
- package/dist/types/components/list/list.d.ts +58 -8
- package/dist/types/components/loading/loading.d.ts +48 -8
- package/dist/types/components/magic-button/magic-button.d.ts +37 -3
- package/dist/types/components/menu/menu-group/menu-group.d.ts +19 -1
- package/dist/types/components/menu/menu-header/menu-header.d.ts +16 -1
- package/dist/types/components/menu/menu-info/menu-info.d.ts +14 -1
- package/dist/types/components/menu/menu-item/menu-item.d.ts +27 -3
- package/dist/types/components/menu/menu-link/menu-link.d.ts +17 -1
- package/dist/types/components/menu/menu-list/menu-list.d.ts +22 -4
- package/dist/types/components/menu/menu-logo/menu-logo.d.ts +14 -1
- package/dist/types/components/menu/menu-social/menu-social.d.ts +21 -2
- package/dist/types/components/menu/menu.d.ts +42 -9
- package/dist/types/components/menu/menu.utils.d.ts +2 -6
- package/dist/types/components/message/message.d.ts +38 -9
- package/dist/types/components/modal/modal.d.ts +34 -4
- package/dist/types/components/notification/notification-body/notification-body.d.ts +12 -3
- package/dist/types/components/notification/notification-header/notification-header.d.ts +12 -3
- package/dist/types/components/notification/notification-item/notification-item.d.ts +15 -3
- package/dist/types/components/notification/notification.d.ts +36 -5
- package/dist/types/components/pagination/pagination.d.ts +56 -20
- package/dist/types/components/radio/radio.d.ts +49 -4
- package/dist/types/components/radio-group/radio-group.d.ts +52 -10
- package/dist/types/components/scrim/scrim.d.ts +72 -11
- package/dist/types/components/scrim/scrim.utils.d.ts +2 -17
- package/dist/types/components/select/select-input/select-input.d.ts +22 -4
- package/dist/types/components/select/select-list/select-list.d.ts +51 -5
- package/dist/types/components/select/select-option/select-option.d.ts +31 -8
- package/dist/types/components/select/select.d.ts +152 -13
- package/dist/types/components/select/select.types.d.ts +5 -0
- package/dist/types/components/sign-in/sign-in.d.ts +30 -3
- package/dist/types/components/skip-link/skip-link-item/skip-link-item-alias.d.ts +15 -2
- package/dist/types/components/skip-link/skip-link-item/skip-link-item.d.ts +22 -1
- package/dist/types/components/skip-link/skip-link.d.ts +37 -3
- package/dist/types/components/slider/slider.d.ts +147 -21
- package/dist/types/components/slider/slider.types.d.ts +7 -2
- package/dist/types/components/slider/slider.utils.d.ts +27 -0
- package/dist/types/components/step/step-item/step-item.d.ts +15 -3
- package/dist/types/components/step/step.d.ts +47 -12
- package/dist/types/components/switch/switch.d.ts +39 -6
- package/dist/types/components/tab/tab-item/tab-item.d.ts +20 -4
- package/dist/types/components/tab/tab.d.ts +41 -11
- package/dist/types/components/table/table-body/table-body.d.ts +10 -6
- package/dist/types/components/table/table-cell/table-cell.d.ts +10 -6
- package/dist/types/components/table/table-header/table-header.d.ts +10 -6
- package/dist/types/components/table/table-header-cell/table-header-cell.d.ts +18 -6
- package/dist/types/components/table/table-row/table-row.d.ts +11 -6
- package/dist/types/components/table/table.d.ts +49 -11
- package/dist/types/components/tag/tag.d.ts +55 -7
- package/dist/types/components/textarea/textarea.d.ts +75 -5
- package/dist/types/components/textarea/textarea.types.d.ts +4 -0
- package/dist/types/components/tooltip/tooltip.d.ts +46 -8
- package/dist/types/components/upload/upload.d.ts +78 -10
- package/dist/types/components/wizard/wizard-panel/wizard-panel.d.ts +20 -2
- package/dist/types/components/wizard/wizard.d.ts +44 -7
- package/dist/types/components.d.ts +5825 -1352
- package/dist/types/shared/utils/floating-ui.d.ts +4 -0
- package/dist/types/shared/utils/focus.d.ts +14 -0
- package/dist/types/shared/utils/getRandom.d.ts +1 -0
- package/dist/types/shared/utils/id.d.ts +1 -1
- package/dist/types/shared/utils/index.d.ts +6 -1
- package/dist/types/shared/utils/motion.d.ts +14 -0
- package/dist/types/shared/utils/ownership.d.ts +33 -0
- package/dist/types/shared/utils/prop-warning.d.ts +7 -0
- package/dist/types/shared/utils/props.d.ts +38 -0
- package/dist/types/shared/utils/swipe.d.ts +5 -0
- package/dist/types/shared/utils/virtual-scroll.d.ts +25 -0
- package/dist/types/stencil-public-runtime.d.ts +12 -0
- package/dist/webcomponents/index.esm.js +1 -1
- package/dist/webcomponents/p-01baafce.entry.js +5 -0
- package/dist/webcomponents/p-01fb0754.entry.js +5 -0
- package/dist/webcomponents/p-030c02f8.entry.js +5 -0
- package/dist/webcomponents/p-03359c92.entry.js +5 -0
- package/dist/webcomponents/p-09770c98.entry.js +5 -0
- package/dist/webcomponents/p-0b9714f1.entry.js +5 -0
- package/dist/webcomponents/p-12aa36a8.entry.js +5 -0
- package/dist/webcomponents/p-130b6e06.entry.js +5 -0
- package/dist/webcomponents/p-144f8c8d.entry.js +5 -0
- package/dist/webcomponents/p-14fe22e2.entry.js +5 -0
- package/dist/webcomponents/p-1ff9210a.entry.js +5 -0
- package/dist/webcomponents/p-2605cdc3.entry.js +5 -0
- package/dist/webcomponents/p-27afaec9.entry.js +5 -0
- package/dist/webcomponents/p-2a50e42d.entry.js +5 -0
- package/dist/webcomponents/p-327f034f.entry.js +5 -0
- package/dist/webcomponents/p-342650b8.entry.js +5 -0
- package/dist/webcomponents/p-38f6a78b.entry.js +5 -0
- package/dist/webcomponents/p-3920fe3a.entry.js +5 -0
- package/dist/webcomponents/p-3ae97345.entry.js +5 -0
- package/dist/webcomponents/p-3cce767c.entry.js +5 -0
- package/dist/webcomponents/p-3df6c5d2.entry.js +5 -0
- package/dist/webcomponents/p-3e287899.entry.js +5 -0
- package/dist/webcomponents/p-3e5580ba.entry.js +5 -0
- package/dist/webcomponents/p-403637dd.entry.js +5 -0
- package/dist/webcomponents/p-435c8ef2.entry.js +5 -0
- package/dist/webcomponents/p-59da5b55.entry.js +5 -0
- package/dist/webcomponents/p-5dd4314c.entry.js +5 -0
- package/dist/webcomponents/p-646af6a5.entry.js +5 -0
- package/dist/webcomponents/p-670e8fec.entry.js +5 -0
- package/dist/webcomponents/p-68046544.entry.js +5 -0
- package/dist/webcomponents/p-68ec76b8.entry.js +5 -0
- package/dist/webcomponents/p-6c0ea20c.entry.js +5 -0
- package/dist/webcomponents/p-6c2fe5e4.entry.js +5 -0
- package/dist/webcomponents/p-707df9b9.entry.js +5 -0
- package/dist/webcomponents/p-72b839fe.entry.js +5 -0
- package/dist/webcomponents/p-73dcc05b.entry.js +5 -0
- package/dist/webcomponents/p-7acf20d3.entry.js +5 -0
- package/dist/webcomponents/p-7b01bddb.entry.js +5 -0
- package/dist/webcomponents/p-7cd38850.entry.js +5 -0
- package/dist/webcomponents/p-82454383.entry.js +5 -0
- package/dist/webcomponents/p-91e959a8.entry.js +5 -0
- package/dist/webcomponents/p-964c01e6.entry.js +5 -0
- package/dist/webcomponents/p-9858e42a.entry.js +5 -0
- package/dist/webcomponents/p-9c4200b0.entry.js +5 -0
- package/dist/webcomponents/p-9d9c87b1.entry.js +5 -0
- package/dist/webcomponents/p-B0PbhaxL.js +5 -0
- package/dist/webcomponents/p-BEJGB0Nd.js +5 -0
- package/dist/{components/p-Dmfk7eEe.js → webcomponents/p-BJZC_NuV.js} +1 -1
- package/dist/webcomponents/p-BJtdabsr.js +5 -0
- package/dist/webcomponents/p-BeJxz5TQ.js +5 -0
- package/dist/webcomponents/p-BlGV-x0w.js +5 -0
- package/dist/webcomponents/{p-Bfm58jO6.js → p-BtRPYRvA.js} +1 -1
- package/dist/webcomponents/p-CDtFCbKp.js +5 -0
- package/dist/webcomponents/p-CNwZRgyL.js +5 -0
- package/dist/webcomponents/{p-DFN_so7I.js → p-CfuJQ1DY.js} +1 -1
- package/dist/webcomponents/p-D9Zo6FlV.js +5 -0
- package/dist/webcomponents/{p-BhMVJQ4-.js → p-DV-iW9Aj.js} +1 -1
- package/dist/webcomponents/p-DWhzxlCx.js +5 -0
- package/dist/webcomponents/p-Dcn7tRST.js +7 -0
- package/dist/webcomponents/p-EbtQZm5s.js +5 -0
- package/dist/webcomponents/p-a0931550.entry.js +5 -0
- package/dist/webcomponents/p-a212fd85.entry.js +5 -0
- package/dist/webcomponents/p-a2e75143.entry.js +5 -0
- package/dist/webcomponents/p-a3bb98c9.entry.js +5 -0
- package/dist/webcomponents/p-a8b5dba0.entry.js +5 -0
- package/dist/webcomponents/p-aa909443.entry.js +5 -0
- package/dist/webcomponents/p-abaf2365.entry.js +5 -0
- package/dist/webcomponents/p-aeb16645.entry.js +5 -0
- package/dist/webcomponents/p-b287c384.entry.js +5 -0
- package/dist/webcomponents/p-b506b0a1.entry.js +5 -0
- package/dist/webcomponents/p-b520c08c.entry.js +5 -0
- package/dist/webcomponents/p-b94c3f84.entry.js +5 -0
- package/dist/webcomponents/p-bda62f90.entry.js +5 -0
- package/dist/webcomponents/p-c201ae16.entry.js +5 -0
- package/dist/webcomponents/p-c7e899a1.entry.js +5 -0
- package/dist/webcomponents/p-c8b7bbab.entry.js +5 -0
- package/dist/webcomponents/p-cbf3e251.entry.js +5 -0
- package/dist/webcomponents/{p-7f7506f0.entry.js → p-cff24492.entry.js} +1 -1
- package/dist/webcomponents/p-d35cf5b4.entry.js +5 -0
- package/dist/webcomponents/p-d45ffe9c.entry.js +5 -0
- package/dist/webcomponents/p-d719a4af.entry.js +5 -0
- package/dist/webcomponents/p-d826c052.entry.js +5 -0
- package/dist/webcomponents/p-da21a60d.entry.js +5 -0
- package/dist/webcomponents/p-de0c7f26.entry.js +5 -0
- package/dist/webcomponents/p-e20188c0.entry.js +5 -0
- package/dist/webcomponents/p-e27882e1.entry.js +5 -0
- package/dist/webcomponents/p-e3de5bb3.entry.js +5 -0
- package/dist/webcomponents/p-e624ff04.entry.js +5 -0
- package/dist/webcomponents/p-ed5af0e4.entry.js +5 -0
- package/dist/webcomponents/p-edc6da0e.entry.js +5 -0
- package/dist/webcomponents/p-f24fcf3d.entry.js +5 -0
- package/dist/webcomponents/p-f52ef0dc.entry.js +5 -0
- package/dist/webcomponents/{p-12286e73.entry.js → p-f558d7b9.entry.js} +1 -1
- package/dist/webcomponents/p-fcab1428.entry.js +5 -0
- package/dist/webcomponents/p-fe1729a7.entry.js +5 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +18 -3
- package/dist/cjs/clamp-Co_hWptd.js +0 -25
- package/dist/cjs/id-CjRFMzf6.js +0 -20
- package/dist/cjs/props-CScmBvKd.js +0 -24
- package/dist/collection/pages/components/cookiebar/index.js +0 -26
- package/dist/collection/pages/components/link/index.js +0 -29
- package/dist/collection/pages/components/pagination/index.js +0 -12
- package/dist/collection/pages/components/slider/index.js +0 -18
- package/dist/components/p-34Jfn-U-.js +0 -5
- package/dist/components/p-6OdfnwnK.js +0 -5
- package/dist/components/p-B7Amgxkp.js +0 -5
- package/dist/components/p-BKuMQJrQ.js +0 -5
- package/dist/components/p-BPJpHGOW.js +0 -5
- package/dist/components/p-Bb-nLtTG.js +0 -5
- package/dist/components/p-BeE7R9nu.js +0 -5
- package/dist/components/p-BkS6ujyf.js +0 -5
- package/dist/components/p-Bo0QYHJO.js +0 -5
- package/dist/components/p-C2i2c_io.js +0 -5
- package/dist/components/p-C7v0lVlX.js +0 -5
- package/dist/components/p-CMBsvswx.js +0 -5
- package/dist/components/p-CRrimdz6.js +0 -5
- package/dist/components/p-CWORw84-.js +0 -5
- package/dist/components/p-CvUMXJCl.js +0 -5
- package/dist/components/p-D6zroLx5.js +0 -5
- package/dist/components/p-DBP6K_aq.js +0 -5
- package/dist/components/p-DCrVo-8T.js +0 -5
- package/dist/components/p-DFUKDNck.js +0 -5
- package/dist/components/p-DHicj0By.js +0 -5
- package/dist/components/p-DIK54tTj.js +0 -5
- package/dist/components/p-DQRSHR-D.js +0 -5
- package/dist/components/p-DRVMm1Py.js +0 -5
- package/dist/components/p-DWPmUV72.js +0 -5
- package/dist/components/p-DXjQyH6s.js +0 -5
- package/dist/components/p-DmCxdB9P.js +0 -5
- package/dist/components/p-Dp0xy_3n.js +0 -5
- package/dist/components/p-DxZJrIyL.js +0 -5
- package/dist/components/p-JAkkThgf.js +0 -5
- package/dist/components/p-Ud-WB0hx.js +0 -5
- package/dist/components/p-fpMNttbg.js +0 -5
- package/dist/components/p-gvnfuTjd.js +0 -5
- package/dist/components/p-qYONSNcf.js +0 -5
- package/dist/components/p-qhhHGJY1.js +0 -5
- package/dist/components/p-ttI0nvv_.js +0 -5
- package/dist/components/p-ukNmfGNP.js +0 -5
- package/dist/components/p-xa8e1kSW.js +0 -5
- package/dist/esm/clamp-gvnfuTjd.js +0 -23
- package/dist/esm/id-BkS6ujyf.js +0 -18
- package/dist/esm/props-DRVMm1Py.js +0 -22
- package/dist/webcomponents/p-0196804a.entry.js +0 -5
- package/dist/webcomponents/p-0410186a.entry.js +0 -5
- package/dist/webcomponents/p-0415ef22.entry.js +0 -5
- package/dist/webcomponents/p-0777c7b1.entry.js +0 -5
- package/dist/webcomponents/p-0caa4d12.entry.js +0 -5
- package/dist/webcomponents/p-0d4f718d.entry.js +0 -5
- package/dist/webcomponents/p-0e84c9e8.entry.js +0 -5
- package/dist/webcomponents/p-147ac8d3.entry.js +0 -5
- package/dist/webcomponents/p-1580beee.entry.js +0 -5
- package/dist/webcomponents/p-18ee6175.entry.js +0 -5
- package/dist/webcomponents/p-1bca4499.entry.js +0 -5
- package/dist/webcomponents/p-1c303a4e.entry.js +0 -5
- package/dist/webcomponents/p-1d6b0b6f.entry.js +0 -5
- package/dist/webcomponents/p-1d8cb8fd.entry.js +0 -5
- package/dist/webcomponents/p-224daaac.entry.js +0 -5
- package/dist/webcomponents/p-28426d2a.entry.js +0 -5
- package/dist/webcomponents/p-2abd2da0.entry.js +0 -5
- package/dist/webcomponents/p-2fdc51ae.entry.js +0 -5
- package/dist/webcomponents/p-30c428b6.entry.js +0 -5
- package/dist/webcomponents/p-36bbea4e.entry.js +0 -5
- package/dist/webcomponents/p-3907ebfa.entry.js +0 -5
- package/dist/webcomponents/p-39a16f9d.entry.js +0 -5
- package/dist/webcomponents/p-3ebbd2f5.entry.js +0 -5
- package/dist/webcomponents/p-3ef7eac8.entry.js +0 -5
- package/dist/webcomponents/p-45356e9a.entry.js +0 -5
- package/dist/webcomponents/p-46513db4.entry.js +0 -5
- package/dist/webcomponents/p-4c13221a.entry.js +0 -5
- package/dist/webcomponents/p-51ce2c31.entry.js +0 -5
- package/dist/webcomponents/p-52df61cb.entry.js +0 -5
- package/dist/webcomponents/p-569134cf.entry.js +0 -5
- package/dist/webcomponents/p-5ce7db4a.entry.js +0 -5
- package/dist/webcomponents/p-5f373708.entry.js +0 -5
- package/dist/webcomponents/p-5f6afb79.entry.js +0 -5
- package/dist/webcomponents/p-5fc7ba4c.entry.js +0 -5
- package/dist/webcomponents/p-66006312.entry.js +0 -5
- package/dist/webcomponents/p-66b13fd9.entry.js +0 -5
- package/dist/webcomponents/p-6OdfnwnK.js +0 -5
- package/dist/webcomponents/p-750799b7.entry.js +0 -5
- package/dist/webcomponents/p-756ff2ad.entry.js +0 -5
- package/dist/webcomponents/p-765bfe27.entry.js +0 -5
- package/dist/webcomponents/p-7ab96c11.entry.js +0 -5
- package/dist/webcomponents/p-7c2ff8b4.entry.js +0 -5
- package/dist/webcomponents/p-7fb03a49.entry.js +0 -5
- package/dist/webcomponents/p-82200563.entry.js +0 -5
- package/dist/webcomponents/p-83ff4579.entry.js +0 -5
- package/dist/webcomponents/p-85f8063b.entry.js +0 -5
- package/dist/webcomponents/p-8b558233.entry.js +0 -5
- package/dist/webcomponents/p-8e6c2767.entry.js +0 -5
- package/dist/webcomponents/p-8e819355.entry.js +0 -5
- package/dist/webcomponents/p-92a9b9c4.entry.js +0 -5
- package/dist/webcomponents/p-966ad32f.entry.js +0 -5
- package/dist/webcomponents/p-9679d230.entry.js +0 -5
- package/dist/webcomponents/p-96dd663b.entry.js +0 -5
- package/dist/webcomponents/p-98843fa3.entry.js +0 -5
- package/dist/webcomponents/p-9a375eff.entry.js +0 -5
- package/dist/webcomponents/p-9b358cff.entry.js +0 -5
- package/dist/webcomponents/p-9f7558c7.entry.js +0 -5
- package/dist/webcomponents/p-BkS6ujyf.js +0 -5
- package/dist/webcomponents/p-C2RBydfd.js +0 -6
- package/dist/webcomponents/p-CO5cOQQU.js +0 -5
- package/dist/webcomponents/p-DIK54tTj.js +0 -5
- package/dist/webcomponents/p-DRVMm1Py.js +0 -5
- package/dist/webcomponents/p-DxZJrIyL.js +0 -5
- package/dist/webcomponents/p-a382e115.entry.js +0 -5
- package/dist/webcomponents/p-a4ae72e3.entry.js +0 -5
- package/dist/webcomponents/p-a994c190.entry.js +0 -5
- package/dist/webcomponents/p-a9ff7c25.entry.js +0 -5
- package/dist/webcomponents/p-c0b0f531.entry.js +0 -5
- package/dist/webcomponents/p-c211af17.entry.js +0 -5
- package/dist/webcomponents/p-c492d926.entry.js +0 -5
- package/dist/webcomponents/p-c4cfe599.entry.js +0 -5
- package/dist/webcomponents/p-c846e784.entry.js +0 -5
- package/dist/webcomponents/p-c949d993.entry.js +0 -5
- package/dist/webcomponents/p-d1e899cd.entry.js +0 -5
- package/dist/webcomponents/p-d38d82cc.entry.js +0 -5
- package/dist/webcomponents/p-e0ce536a.entry.js +0 -5
- package/dist/webcomponents/p-e1331288.entry.js +0 -5
- package/dist/webcomponents/p-e360a463.entry.js +0 -5
- package/dist/webcomponents/p-f078f972.entry.js +0 -5
- package/dist/webcomponents/p-f26038e2.entry.js +0 -5
- package/dist/webcomponents/p-f303f6b3.entry.js +0 -5
- package/dist/webcomponents/p-f6318e94.entry.js +0 -5
- package/dist/webcomponents/p-f85ee01c.entry.js +0 -5
- package/dist/webcomponents/p-fcd4ae48.entry.js +0 -5
- package/dist/webcomponents/p-ffe0241e.entry.js +0 -5
- package/dist/webcomponents/p-gvnfuTjd.js +0 -5
|
@@ -8,19 +8,53 @@ import { clampNumber } from "../../shared/utils/clamp";
|
|
|
8
8
|
import { dispatchNativeFormEvent, getEventTarget, isEventTargetInside, redispatchNativeFormEvent, } from "../../shared/utils/event";
|
|
9
9
|
import { getFormValidationState, isFormControlDisabled, setFormValidity, } from "../../shared/utils/form";
|
|
10
10
|
import { generateUniqueId } from "../../shared/utils/id";
|
|
11
|
+
import { reportInvalidPropValue } from "../../shared/utils/prop-warning";
|
|
12
|
+
import { resolveAllowedPropValue, resolveNumberPropValue } from "../../shared/utils/props";
|
|
11
13
|
import { createRafBatcher } from "../../shared/utils/raf-batcher";
|
|
12
14
|
import { hasAssignedSlotContent } from "../../shared/utils/slot";
|
|
13
15
|
import { resolveFormValidator, runFormValidator } from "../../shared/utils/validator";
|
|
16
|
+
import { buildGradientCss, interpolateGradientColor, normalizeSteps, parseGradientStops, } from "./slider.utils";
|
|
17
|
+
const SLIDER_ORIENTATIONS = ['horizontal', 'vertical'];
|
|
14
18
|
/**
|
|
15
|
-
*
|
|
19
|
+
* O componente `br-slider` é o controle deslizante do GovBR-DS, desenvolvido para permitir que a pessoa usuária selecione um valor numérico único ou uma faixa contínua de valores dentro de um intervalo delimitado.
|
|
16
20
|
*
|
|
17
|
-
* Para
|
|
21
|
+
* ### Para que serve
|
|
18
22
|
*
|
|
19
|
-
*
|
|
23
|
+
* - **Seleção numérica fluida:** Permite escolher valores deslizando uma alça (thumb) ao longo de uma trilha graduada, com atualização em tempo real.
|
|
24
|
+
* - **Modo simples e composto (faixa / range):** Suporta uma única alça para valor individual ou duas alças para delimitação de intervalo mínimo e máximo (ex.: faixa de preços, período de anos).
|
|
25
|
+
* - **Entrada numérica sincronizada:** Oferece campo de entrada numérico integrado opcional para digitação exata com sincronização bidirecional.
|
|
26
|
+
* - **Acessibilidade WAI-ARIA:** Suporta controle total por teclado (setas direcionais, Page Up, Page Down, Home e End) e comunica valores atuais via `aria-valuenow`.
|
|
27
|
+
*
|
|
28
|
+
* ### Quando utilizar
|
|
29
|
+
*
|
|
30
|
+
* - **Utilize quando:**
|
|
31
|
+
* - O usuário precisar definir grandezas graduais onde a exploração intuitiva seja mais conveniente do que a digitação manual isolada.
|
|
32
|
+
* - Para filtros de faixa de valores (ex.: "De R$ 100 até R$ 500").
|
|
33
|
+
* - **Evite e prefira outro componente quando:**
|
|
34
|
+
* - A precisão exata for estritamente necessária e o intervalo for arbitrário (prefira `br-input` numérico).
|
|
35
|
+
* - O valor for uma escolha categórica sem escala quantitativa (prefira `br-select` ou `br-radio`).
|
|
36
|
+
*
|
|
37
|
+
* ### Estrutura e Slots
|
|
38
|
+
*
|
|
39
|
+
* O `br-slider` possui estrutura rica com slots de referência, validação e customização da alça:
|
|
40
|
+
* - `ref-start`: Slot para customização do rótulo de início da trilha.
|
|
41
|
+
* - `ref-end`: Slot para customização do rótulo de fim da trilha.
|
|
42
|
+
* - `feedback`: Slot para mensagens de validação (como `br-message`).
|
|
43
|
+
* - `thumb-icon`: Slot para ícone personalizado na alça de controle em modo simples.
|
|
44
|
+
* - `thumb-start-icon`: Slot para ícone na alça inicial em modo composto (`range`).
|
|
45
|
+
* - `thumb-end-icon`: Slot para ícone na alça final em modo composto (`range`).
|
|
46
|
+
*
|
|
47
|
+
* Para a documentação completa de design, incluindo diretrizes de acessibilidade e especificações visuais, consulte o [Design System do GovBR](https://www.gov.br/ds/components/slider?tab=designer).
|
|
48
|
+
*
|
|
49
|
+
|
|
50
|
+
* @category Formulários, Seleção
|
|
20
51
|
* @status stable
|
|
21
52
|
* @slot ref-start - Conteúdo exibido como referência inicial abaixo da trilha.
|
|
22
53
|
* @slot ref-end - Conteúdo exibido como referência final abaixo da trilha.
|
|
23
54
|
* @slot feedback - Mensagem de validação, normalmente um `br-message`.
|
|
55
|
+
* @slot thumb-icon - Ícone customizado na alça de controle em modo simples.
|
|
56
|
+
* @slot thumb-start-icon - Ícone customizado na alça inicial em modo composto.
|
|
57
|
+
* @slot thumb-end-icon - Ícone customizado na alça final em modo composto.
|
|
24
58
|
*
|
|
25
59
|
* @part base - Contêiner principal do slider.
|
|
26
60
|
* @part layout - Contêiner de layout do slider.
|
|
@@ -42,6 +76,8 @@ import { resolveFormValidator, runFormValidator } from "../../shared/utils/valid
|
|
|
42
76
|
* @part input-wrapper - Contêiner do campo numérico.
|
|
43
77
|
* @part input - Campo numérico sincronizado com o slider.
|
|
44
78
|
* @part feedback - Contêiner da mensagem de validação.
|
|
79
|
+
* @part steps - Contêiner das marcações de passos customizados.
|
|
80
|
+
* @part step - Botão indicador de passo customizado individual.
|
|
45
81
|
*/
|
|
46
82
|
export class Slider {
|
|
47
83
|
constructor() {
|
|
@@ -59,6 +95,9 @@ export class Slider {
|
|
|
59
95
|
*/
|
|
60
96
|
this.hasRefStart = false;
|
|
61
97
|
this.hasFeedbackSlot = false;
|
|
98
|
+
this.hasThumbIconSlot = false;
|
|
99
|
+
this.hasThumbStartIconSlot = false;
|
|
100
|
+
this.hasThumbEndIconSlot = false;
|
|
62
101
|
this.customValidationMessage = '';
|
|
63
102
|
this.validatorMessage = null;
|
|
64
103
|
this.isValidating = false;
|
|
@@ -68,24 +107,26 @@ export class Slider {
|
|
|
68
107
|
*/
|
|
69
108
|
this.customId = generateUniqueId();
|
|
70
109
|
/**
|
|
71
|
-
* Valor mínimo aceito pelo slider.
|
|
110
|
+
* Valor mínimo aceito pelo slider. Valores inválidos usam `0`.
|
|
72
111
|
*/
|
|
73
112
|
this.min = 0;
|
|
74
113
|
/**
|
|
75
|
-
* Valor máximo aceito pelo slider.
|
|
114
|
+
* Valor máximo aceito pelo slider. Deve ser maior que `min`; valores inválidos usam `100` e relações inválidas usam `min + 100`.
|
|
76
115
|
*/
|
|
77
116
|
this.max = 100;
|
|
78
117
|
/**
|
|
79
|
-
* Incremento aplicado a cada passo.
|
|
118
|
+
* Incremento aplicado a cada passo. Deve ser maior que `0`; valores inválidos usam `1`.
|
|
80
119
|
*/
|
|
81
120
|
this.step = 1;
|
|
82
121
|
/**
|
|
83
|
-
* Valor atual do slider (alça inicial no modo composto).
|
|
122
|
+
* Valor atual do slider (alça inicial no modo composto). Valores não finitos usam o limite mínimo;
|
|
123
|
+
* valores fora do intervalo são limitados.
|
|
84
124
|
*/
|
|
85
125
|
this.value = 0;
|
|
86
126
|
/**
|
|
87
127
|
* Valor da alça final no modo composto (`range`).
|
|
88
|
-
* Quando não fornecido em modo composto, assume o valor de `max`.
|
|
128
|
+
* Quando não fornecido em modo composto, assume o valor de `max`. Valores não finitos usam `max`,
|
|
129
|
+
* valores fora do intervalo são limitados.
|
|
89
130
|
* @deprecated Use `rangeValue`.
|
|
90
131
|
*/
|
|
91
132
|
this.valueEnd = NaN;
|
|
@@ -93,11 +134,6 @@ export class Slider {
|
|
|
93
134
|
* Desativa o slider, tornando-o não interativo.
|
|
94
135
|
*/
|
|
95
136
|
this.disabled = false;
|
|
96
|
-
/**
|
|
97
|
-
* Densidade da alça de controle.
|
|
98
|
-
* `small` = 16px (desktop compacto), `medium` = 20px (desktop padrão), `large` = 24px (mobile).
|
|
99
|
-
*/
|
|
100
|
-
this.density = 'medium';
|
|
101
137
|
/**
|
|
102
138
|
* Exibe o slider na orientação vertical.
|
|
103
139
|
* @deprecated Use `orientation`.
|
|
@@ -113,8 +149,11 @@ export class Slider {
|
|
|
113
149
|
*/
|
|
114
150
|
this.showLabel = false;
|
|
115
151
|
/**
|
|
116
|
-
* Exibe
|
|
117
|
-
*
|
|
152
|
+
* Exibe um `br-input` numérico sincronizado com a alça.
|
|
153
|
+
* No modo `range`, exibe um campo para o início e outro para o fim; na
|
|
154
|
+
* orientação horizontal ficam nas extremidades esquerda e direita, e na
|
|
155
|
+
* vertical ficam acima e abaixo da trilha. Quando ativo, a etiqueta de valor
|
|
156
|
+
* não é exibida.
|
|
118
157
|
*/
|
|
119
158
|
this.showInput = false;
|
|
120
159
|
/**
|
|
@@ -132,7 +171,14 @@ export class Slider {
|
|
|
132
171
|
* Quando ativo, sobrescreve o conteúdo dos slots `ref-start` e `ref-end`.
|
|
133
172
|
*/
|
|
134
173
|
this.showBounds = false;
|
|
135
|
-
|
|
174
|
+
/**
|
|
175
|
+
* Densidade visual do componente.
|
|
176
|
+
* Altera exclusivamente as dimensões da alça de controle (thumb).
|
|
177
|
+
* Valores aceitos: 'small' (16px), 'medium' (20px - padrão), 'large' (24px).
|
|
178
|
+
* 'high' e 'low' são aceitos como sinônimos de 'small' e 'large'.
|
|
179
|
+
*/
|
|
180
|
+
this.density = 'medium';
|
|
181
|
+
this.inputEditing = null;
|
|
136
182
|
this.draggingThumb = 'start';
|
|
137
183
|
this.tickValuesCacheKey = '';
|
|
138
184
|
this.tickValuesCache = [];
|
|
@@ -187,31 +233,65 @@ export class Slider {
|
|
|
187
233
|
dispatchNativeFormEvent(this.el, 'change');
|
|
188
234
|
void this.validate();
|
|
189
235
|
};
|
|
190
|
-
this.handleInputInput = (event) => {
|
|
191
|
-
this.inputEditing =
|
|
192
|
-
const
|
|
236
|
+
this.handleInputInput = (event, thumb) => {
|
|
237
|
+
this.inputEditing = thumb;
|
|
238
|
+
const input = event.currentTarget;
|
|
239
|
+
const parsed = Number.parseFloat(input.value ?? '');
|
|
193
240
|
if (!Number.isNaN(parsed)) {
|
|
194
|
-
const
|
|
195
|
-
if (
|
|
196
|
-
this.
|
|
197
|
-
this.brDidChangeValue.emit(this.value);
|
|
241
|
+
const { current, min, max } = this.getInputValueState(thumb);
|
|
242
|
+
if (parsed >= min && parsed <= max && parsed !== current) {
|
|
243
|
+
this.updateValueFromInput(thumb, parsed);
|
|
198
244
|
}
|
|
199
245
|
}
|
|
200
246
|
redispatchNativeFormEvent(this.el, event, 'input');
|
|
201
247
|
};
|
|
202
|
-
this.
|
|
203
|
-
|
|
204
|
-
const
|
|
205
|
-
const
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
248
|
+
this.handleInputChange = (event, thumb) => {
|
|
249
|
+
event.stopPropagation();
|
|
250
|
+
const input = event.currentTarget;
|
|
251
|
+
const { current, min, max } = this.getInputValueState(thumb);
|
|
252
|
+
const parsed = Number.parseFloat(input.value ?? '');
|
|
253
|
+
const next = Number.isNaN(parsed) ? current : this.snapToStep(this.clamp(parsed, max, min));
|
|
254
|
+
this.inputEditing = null;
|
|
255
|
+
if (next !== current)
|
|
256
|
+
this.updateValueFromInput(thumb, next);
|
|
257
|
+
input.value = String(next);
|
|
212
258
|
dispatchNativeFormEvent(this.el, 'change');
|
|
213
259
|
void this.validate();
|
|
214
260
|
};
|
|
261
|
+
this.handleStepClick = (val) => {
|
|
262
|
+
if (this.isDisabled())
|
|
263
|
+
return;
|
|
264
|
+
if (this.range) {
|
|
265
|
+
const distStart = Math.abs(val - this.value);
|
|
266
|
+
const distEnd = Math.abs(val - this.valueEnd);
|
|
267
|
+
if (distStart <= distEnd) {
|
|
268
|
+
if (val !== this.value) {
|
|
269
|
+
this.value = val;
|
|
270
|
+
this.brDidChangeValue.emit(this.value);
|
|
271
|
+
this.syncRangeValue();
|
|
272
|
+
dispatchNativeFormEvent(this.el, 'input');
|
|
273
|
+
dispatchNativeFormEvent(this.el, 'change');
|
|
274
|
+
void this.validate();
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
else if (val !== this.valueEnd) {
|
|
278
|
+
this.valueEnd = val;
|
|
279
|
+
this.brDidChangeValueEnd.emit(this.valueEnd);
|
|
280
|
+
this.syncRangeValue();
|
|
281
|
+
dispatchNativeFormEvent(this.el, 'input');
|
|
282
|
+
dispatchNativeFormEvent(this.el, 'change');
|
|
283
|
+
void this.validate();
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
else if (val !== this.value) {
|
|
287
|
+
this.value = val;
|
|
288
|
+
this.brDidChangeValue.emit(this.value);
|
|
289
|
+
this.syncRangeValue();
|
|
290
|
+
dispatchNativeFormEvent(this.el, 'input');
|
|
291
|
+
dispatchNativeFormEvent(this.el, 'change');
|
|
292
|
+
void this.validate();
|
|
293
|
+
}
|
|
294
|
+
};
|
|
215
295
|
}
|
|
216
296
|
formDisabledCallback(disabled) {
|
|
217
297
|
this.formDisabled = disabled;
|
|
@@ -233,16 +313,43 @@ export class Slider {
|
|
|
233
313
|
if (this.range && !Number.isNaN(end))
|
|
234
314
|
this.valueEnd = end;
|
|
235
315
|
}
|
|
316
|
+
get effectiveMin() {
|
|
317
|
+
return resolveNumberPropValue(this.el, 'min', this.min, Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, 0);
|
|
318
|
+
}
|
|
319
|
+
get effectiveMax() {
|
|
320
|
+
const min = this.effectiveMin;
|
|
321
|
+
const max = resolveNumberPropValue(this.el, 'max', this.max, Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, 100);
|
|
322
|
+
if (max > min)
|
|
323
|
+
return max;
|
|
324
|
+
reportInvalidPropValue(this.el, 'max', this.max, 'O valor deve ser maior que "min".', `Aplicando o fallback ${min + 100}.`);
|
|
325
|
+
return min + 100;
|
|
326
|
+
}
|
|
327
|
+
get effectiveStep() {
|
|
328
|
+
const step = resolveNumberPropValue(this.el, 'step', this.step, 0, Number.MAX_SAFE_INTEGER, 1);
|
|
329
|
+
if (step > 0)
|
|
330
|
+
return step;
|
|
331
|
+
reportInvalidPropValue(this.el, 'step', this.step, 'O valor deve ser maior que 0.', 'Aplicando o fallback 1.');
|
|
332
|
+
return 1;
|
|
333
|
+
}
|
|
334
|
+
get effectiveValue() {
|
|
335
|
+
return resolveNumberPropValue(this.el, 'value', this.value, this.effectiveMin, this.effectiveMax, this.effectiveMin);
|
|
336
|
+
}
|
|
337
|
+
get effectiveValueEnd() {
|
|
338
|
+
if (!this.range || Number.isNaN(this.valueEnd))
|
|
339
|
+
return this.effectiveMax;
|
|
340
|
+
return resolveNumberPropValue(this.el, 'valueEnd', this.valueEnd, this.effectiveMin, this.effectiveMax, this.effectiveMax);
|
|
341
|
+
}
|
|
236
342
|
onValueChange(newValue) {
|
|
237
|
-
const
|
|
238
|
-
const
|
|
343
|
+
const normalized = this.effectiveValue;
|
|
344
|
+
const numericMax = this.range ? this.effectiveValueEnd : this.effectiveMax;
|
|
345
|
+
const clamped = this.clamp(normalized, numericMax);
|
|
239
346
|
if (clamped !== newValue) {
|
|
240
347
|
this.value = clamped;
|
|
241
348
|
return;
|
|
242
349
|
}
|
|
243
350
|
this.elementInternals?.setFormValue(this.getFormValue());
|
|
244
|
-
if (this.
|
|
245
|
-
this.
|
|
351
|
+
if (this.inputStartEl && this.inputEditing !== 'start') {
|
|
352
|
+
this.inputStartEl.value = String(clamped);
|
|
246
353
|
}
|
|
247
354
|
this.syncRangeValue();
|
|
248
355
|
this.updateValidity();
|
|
@@ -250,28 +357,35 @@ export class Slider {
|
|
|
250
357
|
onValueEndChange(newValue) {
|
|
251
358
|
if (!this.range)
|
|
252
359
|
return;
|
|
253
|
-
const clamped = this.clamp(
|
|
360
|
+
const clamped = this.clamp(this.effectiveValueEnd, this.effectiveMax, this.effectiveValue);
|
|
254
361
|
if (clamped !== newValue) {
|
|
255
362
|
this.valueEnd = clamped;
|
|
256
363
|
return;
|
|
257
364
|
}
|
|
258
365
|
this.elementInternals?.setFormValue(this.getFormValue());
|
|
366
|
+
if (this.inputEndEl && this.inputEditing !== 'end') {
|
|
367
|
+
this.inputEndEl.value = String(clamped);
|
|
368
|
+
}
|
|
259
369
|
this.syncRangeValue();
|
|
260
370
|
this.updateValidity();
|
|
261
371
|
}
|
|
262
372
|
onRangeValueChange(newValue) {
|
|
263
373
|
if (!this.range || !newValue)
|
|
264
374
|
return;
|
|
375
|
+
if (typeof newValue !== 'object' || !Number.isFinite(newValue.start) || !Number.isFinite(newValue.end)) {
|
|
376
|
+
reportInvalidPropValue(this.el, 'rangeValue', newValue, 'Informe um objeto com `start` e `end` numéricos finitos.', 'Mantendo o último intervalo efetivo.');
|
|
377
|
+
this.syncRangeValue();
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
265
380
|
if (newValue.start !== this.value)
|
|
266
381
|
this.value = newValue.start;
|
|
267
382
|
if (newValue.end !== this.valueEnd)
|
|
268
383
|
this.valueEnd = newValue.end;
|
|
269
384
|
}
|
|
270
385
|
componentWillLoad() {
|
|
271
|
-
this.value = this.
|
|
386
|
+
this.value = this.effectiveValue;
|
|
272
387
|
if (this.range) {
|
|
273
|
-
|
|
274
|
-
this.valueEnd = Math.max(this.value, this.clamp(endVal));
|
|
388
|
+
this.valueEnd = Math.max(this.value, this.effectiveValueEnd);
|
|
275
389
|
}
|
|
276
390
|
this.elementInternals?.setFormValue(this.getFormValue());
|
|
277
391
|
this.initialValue = this.value;
|
|
@@ -280,23 +394,31 @@ export class Slider {
|
|
|
280
394
|
}
|
|
281
395
|
componentDidLoad() {
|
|
282
396
|
this.hasFeedbackSlot = this.el.querySelector('[slot="feedback"]') !== null;
|
|
397
|
+
this.hasThumbIconSlot = this.el.querySelector('[slot="thumb-icon"]') !== null;
|
|
398
|
+
this.hasThumbStartIconSlot = this.el.querySelector('[slot="thumb-start-icon"]') !== null;
|
|
399
|
+
this.hasThumbEndIconSlot = this.el.querySelector('[slot="thumb-end-icon"]') !== null;
|
|
283
400
|
const root = this.el.shadowRoot;
|
|
284
401
|
if (root) {
|
|
402
|
+
const slotMap = {
|
|
403
|
+
'ref-start': (filled) => (this.hasRefStart = filled),
|
|
404
|
+
'ref-end': (filled) => (this.hasRefEnd = filled),
|
|
405
|
+
'thumb-icon': (filled) => (this.hasThumbIconSlot = filled),
|
|
406
|
+
'thumb-start-icon': (filled) => (this.hasThumbStartIconSlot = filled),
|
|
407
|
+
'thumb-end-icon': (filled) => (this.hasThumbEndIconSlot = filled),
|
|
408
|
+
};
|
|
285
409
|
root.querySelectorAll('slot[name]').forEach((slot) => {
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
else if (slot.name === 'ref-end')
|
|
291
|
-
this.hasRefEnd = filled;
|
|
292
|
-
};
|
|
410
|
+
const handler = slotMap[slot.name];
|
|
411
|
+
if (!handler)
|
|
412
|
+
return;
|
|
413
|
+
const update = () => handler(slot.assignedNodes({ flatten: true }).length > 0);
|
|
293
414
|
update();
|
|
294
415
|
slot.addEventListener('slotchange', update);
|
|
295
416
|
});
|
|
296
417
|
}
|
|
297
|
-
if (this.
|
|
298
|
-
this.
|
|
299
|
-
|
|
418
|
+
if (this.inputStartEl)
|
|
419
|
+
this.inputStartEl.value = String(this.value);
|
|
420
|
+
if (this.inputEndEl)
|
|
421
|
+
this.inputEndEl.value = String(this.valueEnd);
|
|
300
422
|
requestAnimationFrame(() => this.setupLabelAutoUpdate());
|
|
301
423
|
}
|
|
302
424
|
componentDidUpdate() {
|
|
@@ -347,7 +469,10 @@ export class Slider {
|
|
|
347
469
|
return getFormValidationState(this.elementInternals);
|
|
348
470
|
}
|
|
349
471
|
get effectiveVertical() {
|
|
350
|
-
|
|
472
|
+
if (this.orientation === undefined)
|
|
473
|
+
return this.vertical;
|
|
474
|
+
const orientation = resolveAllowedPropValue(this.el, 'orientation', this.orientation, SLIDER_ORIENTATIONS, 'horizontal');
|
|
475
|
+
return orientation === 'vertical';
|
|
351
476
|
}
|
|
352
477
|
setupLabelAutoUpdate() {
|
|
353
478
|
const showValueLabel = this.showLabel && !this.showInput;
|
|
@@ -423,32 +548,82 @@ export class Slider {
|
|
|
423
548
|
return;
|
|
424
549
|
this.rangeValue = { start: this.value, end: this.valueEnd };
|
|
425
550
|
}
|
|
426
|
-
|
|
551
|
+
get normalizedSteps() {
|
|
552
|
+
return normalizeSteps(this.steps, this.effectiveMin, this.effectiveMax);
|
|
553
|
+
}
|
|
554
|
+
get hasGradient() {
|
|
555
|
+
return (this.gradient === true ||
|
|
556
|
+
(typeof this.gradient === 'string' && this.gradient !== 'false' && this.gradient.trim() !== ''));
|
|
557
|
+
}
|
|
558
|
+
get gradientStops() {
|
|
559
|
+
return parseGradientStops(this.gradient ?? false);
|
|
560
|
+
}
|
|
561
|
+
getGradientColorAt(val) {
|
|
562
|
+
if (!this.hasGradient)
|
|
563
|
+
return undefined;
|
|
564
|
+
const pct = this.percentOf(val);
|
|
565
|
+
return interpolateGradientColor(this.gradientStops, pct);
|
|
566
|
+
}
|
|
567
|
+
getGradientCss(direction) {
|
|
568
|
+
return buildGradientCss(this.gradientStops, direction);
|
|
569
|
+
}
|
|
570
|
+
clamp(value, max = this.effectiveMax, min = this.effectiveMin) {
|
|
427
571
|
return clampNumber(value, min, max, min);
|
|
428
572
|
}
|
|
429
573
|
snapToStep(value) {
|
|
430
|
-
const
|
|
574
|
+
const steps = this.normalizedSteps;
|
|
575
|
+
if (steps.length > 0) {
|
|
576
|
+
let closest = steps[0].value;
|
|
577
|
+
let minDiff = Math.abs(value - closest);
|
|
578
|
+
for (const s of steps) {
|
|
579
|
+
const diff = Math.abs(value - s.value);
|
|
580
|
+
if (diff < minDiff) {
|
|
581
|
+
minDiff = diff;
|
|
582
|
+
closest = s.value;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
return this.clamp(closest);
|
|
586
|
+
}
|
|
587
|
+
const stepped = Math.round((value - this.effectiveMin) / this.effectiveStep) * this.effectiveStep + this.effectiveMin;
|
|
431
588
|
return this.clamp(Number(stepped.toFixed(10)));
|
|
432
589
|
}
|
|
433
590
|
percent() {
|
|
434
591
|
return this.percentOf(this.value);
|
|
435
592
|
}
|
|
436
593
|
percentOf(val) {
|
|
437
|
-
if (this.
|
|
594
|
+
if (this.effectiveMax === this.effectiveMin)
|
|
438
595
|
return 0;
|
|
439
|
-
return ((val - this.
|
|
596
|
+
return ((val - this.effectiveMin) / (this.effectiveMax - this.effectiveMin)) * 100;
|
|
597
|
+
}
|
|
598
|
+
applyGradientToFilledStyle(style, pctStart, span) {
|
|
599
|
+
if (!this.hasGradient)
|
|
600
|
+
return;
|
|
601
|
+
const dir = this.effectiveVertical ? 'to top' : 'to right';
|
|
602
|
+
style.background = this.getGradientCss(dir);
|
|
603
|
+
if (span <= 0)
|
|
604
|
+
return;
|
|
605
|
+
const bgSize = `${(10000 / span).toFixed(2)}%`;
|
|
606
|
+
style.backgroundSize = this.effectiveVertical ? `100% ${bgSize}` : `${bgSize} 100%`;
|
|
607
|
+
if (pctStart > 0) {
|
|
608
|
+
const bgPos = `${((-pctStart * 100) / span).toFixed(2)}%`;
|
|
609
|
+
style.backgroundPosition = this.effectiveVertical ? `0% ${bgPos}` : `${bgPos} 0%`;
|
|
610
|
+
}
|
|
440
611
|
}
|
|
441
612
|
getFilledStyle() {
|
|
442
613
|
if (!this.range) {
|
|
443
614
|
const pct = this.percent();
|
|
444
|
-
|
|
615
|
+
const style = this.effectiveVertical ? { height: `${pct}%` } : { width: `${pct}%` };
|
|
616
|
+
this.applyGradientToFilledStyle(style, 0, pct);
|
|
617
|
+
return style;
|
|
445
618
|
}
|
|
446
619
|
const pctStart = this.percent();
|
|
447
620
|
const pctEnd = this.percentOf(this.valueEnd);
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
621
|
+
const span = pctEnd - pctStart;
|
|
622
|
+
const style = this.effectiveVertical
|
|
623
|
+
? { bottom: `${pctStart}%`, height: `${span}%` }
|
|
624
|
+
: { left: `${pctStart}%`, width: `${span}%` };
|
|
625
|
+
this.applyGradientToFilledStyle(style, pctStart, span);
|
|
626
|
+
return style;
|
|
452
627
|
}
|
|
453
628
|
getTrackMaskStyle() {
|
|
454
629
|
if (!this.showTicks || !this.getTickValues().length)
|
|
@@ -468,18 +643,21 @@ export class Slider {
|
|
|
468
643
|
return { 'mask-image': gradient, '-webkit-mask-image': gradient };
|
|
469
644
|
}
|
|
470
645
|
getTickValues() {
|
|
471
|
-
|
|
646
|
+
if (this.normalizedSteps.length > 0) {
|
|
647
|
+
return this.normalizedSteps.map((s) => s.value);
|
|
648
|
+
}
|
|
649
|
+
const cacheKey = `${this.effectiveMin}|${this.effectiveMax}|${this.effectiveStep}`;
|
|
472
650
|
if (cacheKey === this.tickValuesCacheKey)
|
|
473
651
|
return this.tickValuesCache;
|
|
474
652
|
this.tickValuesCacheKey = cacheKey;
|
|
475
|
-
if (this.
|
|
653
|
+
if (this.effectiveMax <= this.effectiveMin || this.effectiveStep <= 0 || !Number.isFinite(this.effectiveStep)) {
|
|
476
654
|
this.tickValuesCache = [];
|
|
477
655
|
return this.tickValuesCache;
|
|
478
656
|
}
|
|
479
|
-
const count = Math.floor((this.
|
|
480
|
-
const hasUnalignedMax = Number((this.
|
|
657
|
+
const count = Math.floor((this.effectiveMax - this.effectiveMin) / this.effectiveStep);
|
|
658
|
+
const hasUnalignedMax = Number((this.effectiveMax - this.effectiveMin) / this.effectiveStep) % 1 !== 0;
|
|
481
659
|
const valueCount = count + 1 + (hasUnalignedMax ? 1 : 0);
|
|
482
|
-
const getValueAt = (index) => index <= count ? Number((this.
|
|
660
|
+
const getValueAt = (index) => index <= count ? Number((this.effectiveMin + index * this.effectiveStep).toFixed(10)) : this.effectiveMax;
|
|
483
661
|
if (valueCount > Slider.MAX_VISUAL_TICKS) {
|
|
484
662
|
// ponytail: limita somente o DOM visual; os valores selecionáveis permanecem ilimitados.
|
|
485
663
|
const sampled = new Set([getValueAt(0), getValueAt(valueCount - 1)]);
|
|
@@ -495,23 +673,23 @@ export class Slider {
|
|
|
495
673
|
}
|
|
496
674
|
getValueFromX(clientX, rect = this.trackEl?.getBoundingClientRect()) {
|
|
497
675
|
if (!this.trackEl)
|
|
498
|
-
return this.
|
|
676
|
+
return this.effectiveMin;
|
|
499
677
|
if (!rect)
|
|
500
|
-
return this.
|
|
678
|
+
return this.effectiveMin;
|
|
501
679
|
if (rect.width === 0)
|
|
502
|
-
return this.
|
|
680
|
+
return this.effectiveMin;
|
|
503
681
|
const ratio = clampNumber((clientX - rect.left) / rect.width, 0, 1, 0);
|
|
504
|
-
return this.
|
|
682
|
+
return this.effectiveMin + ratio * (this.effectiveMax - this.effectiveMin);
|
|
505
683
|
}
|
|
506
684
|
getValueFromY(clientY, rect = this.trackEl?.getBoundingClientRect()) {
|
|
507
685
|
if (!this.trackEl)
|
|
508
|
-
return this.
|
|
686
|
+
return this.effectiveMin;
|
|
509
687
|
if (!rect)
|
|
510
|
-
return this.
|
|
688
|
+
return this.effectiveMin;
|
|
511
689
|
if (rect.height === 0)
|
|
512
|
-
return this.
|
|
690
|
+
return this.effectiveMin;
|
|
513
691
|
const ratio = clampNumber((rect.bottom - clientY) / rect.height, 0, 1, 0);
|
|
514
|
-
return this.
|
|
692
|
+
return this.effectiveMin + ratio * (this.effectiveMax - this.effectiveMin);
|
|
515
693
|
}
|
|
516
694
|
nearerThumb(rawValue) {
|
|
517
695
|
const distToStart = Math.abs(rawValue - this.value);
|
|
@@ -537,22 +715,72 @@ export class Slider {
|
|
|
537
715
|
}
|
|
538
716
|
}
|
|
539
717
|
}
|
|
718
|
+
getInputValueState(thumb) {
|
|
719
|
+
const isEnd = thumb === 'end';
|
|
720
|
+
return {
|
|
721
|
+
current: isEnd ? this.valueEnd : this.value,
|
|
722
|
+
min: isEnd ? this.value : this.effectiveMin,
|
|
723
|
+
max: isEnd ? this.effectiveMax : this.range ? this.valueEnd : this.effectiveMax,
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
updateValueFromInput(thumb, value) {
|
|
727
|
+
if (thumb === 'end') {
|
|
728
|
+
this.valueEnd = value;
|
|
729
|
+
this.brDidChangeValueEnd.emit(this.valueEnd);
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
this.value = value;
|
|
733
|
+
this.brDidChangeValue.emit(this.value);
|
|
734
|
+
}
|
|
735
|
+
calculateNextStepValue(key, current, min, max) {
|
|
736
|
+
const steps = this.normalizedSteps;
|
|
737
|
+
const currentIndex = steps.findIndex((s) => s.value === current);
|
|
738
|
+
switch (key) {
|
|
739
|
+
case 'ArrowRight':
|
|
740
|
+
case 'ArrowUp': {
|
|
741
|
+
const nextIdx = currentIndex >= 0 ? Math.min(steps.length - 1, currentIndex + 1) : 0;
|
|
742
|
+
return this.clamp(steps[nextIdx].value, max, min);
|
|
743
|
+
}
|
|
744
|
+
case 'ArrowLeft':
|
|
745
|
+
case 'ArrowDown': {
|
|
746
|
+
const prevIdx = currentIndex >= 0 ? Math.max(0, currentIndex - 1) : 0;
|
|
747
|
+
return this.clamp(steps[prevIdx].value, max, min);
|
|
748
|
+
}
|
|
749
|
+
case 'Home':
|
|
750
|
+
return min;
|
|
751
|
+
case 'End':
|
|
752
|
+
return max;
|
|
753
|
+
case 'PageUp': {
|
|
754
|
+
const jumpIdx = Math.min(steps.length - 1, (currentIndex >= 0 ? currentIndex : 0) + 2);
|
|
755
|
+
return this.clamp(steps[jumpIdx].value, max, min);
|
|
756
|
+
}
|
|
757
|
+
case 'PageDown': {
|
|
758
|
+
const jumpIdx = Math.max(0, (currentIndex >= 0 ? currentIndex : 0) - 2);
|
|
759
|
+
return this.clamp(steps[jumpIdx].value, max, min);
|
|
760
|
+
}
|
|
761
|
+
default:
|
|
762
|
+
return null;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
540
765
|
calculateNextSliderValue(key, current, min, max) {
|
|
766
|
+
if (this.normalizedSteps.length > 0) {
|
|
767
|
+
return this.calculateNextStepValue(key, current, min, max);
|
|
768
|
+
}
|
|
541
769
|
switch (key) {
|
|
542
770
|
case 'ArrowRight':
|
|
543
771
|
case 'ArrowUp':
|
|
544
|
-
return Math.min(max, current + this.
|
|
772
|
+
return Math.min(max, current + this.effectiveStep);
|
|
545
773
|
case 'ArrowLeft':
|
|
546
774
|
case 'ArrowDown':
|
|
547
|
-
return Math.max(min, current - this.
|
|
775
|
+
return Math.max(min, current - this.effectiveStep);
|
|
548
776
|
case 'Home':
|
|
549
777
|
return min;
|
|
550
778
|
case 'End':
|
|
551
779
|
return max;
|
|
552
780
|
case 'PageUp':
|
|
553
|
-
return Math.min(max, current + this.
|
|
781
|
+
return Math.min(max, current + this.effectiveStep * 10);
|
|
554
782
|
case 'PageDown':
|
|
555
|
-
return Math.max(min, current - this.
|
|
783
|
+
return Math.max(min, current - this.effectiveStep * 10);
|
|
556
784
|
default:
|
|
557
785
|
return null;
|
|
558
786
|
}
|
|
@@ -561,12 +789,12 @@ export class Slider {
|
|
|
561
789
|
if (this.isDisabled())
|
|
562
790
|
return;
|
|
563
791
|
const target = event.composedPath?.()[0] || getEventTarget(event);
|
|
564
|
-
if (
|
|
792
|
+
if (isEventTargetInside(event, this.inputStartEl) || isEventTargetInside(event, this.inputEndEl))
|
|
565
793
|
return;
|
|
566
794
|
const isEnd = this.range && target === this.thumbEndEl;
|
|
567
795
|
const currentValue = isEnd ? this.valueEnd : this.value;
|
|
568
|
-
const keyMin = isEnd ? this.value : this.
|
|
569
|
-
const keyMax = isEnd ? this.
|
|
796
|
+
const keyMin = isEnd ? this.value : this.effectiveMin;
|
|
797
|
+
const keyMax = isEnd ? this.effectiveMax : this.range ? this.valueEnd : this.effectiveMax;
|
|
570
798
|
const next = this.calculateNextSliderValue(event.key, currentValue, keyMin, keyMax);
|
|
571
799
|
if (next === null)
|
|
572
800
|
return;
|
|
@@ -602,13 +830,14 @@ export class Slider {
|
|
|
602
830
|
return isFormControlDisabled(this.disabled, this.formDisabled);
|
|
603
831
|
}
|
|
604
832
|
updateValidity() {
|
|
605
|
-
const stepMismatch = this.
|
|
606
|
-
Math.abs((this.value - this.
|
|
833
|
+
const stepMismatch = this.effectiveStep > 0 &&
|
|
834
|
+
Math.abs((this.value - this.effectiveMin) / this.effectiveStep -
|
|
835
|
+
Math.round((this.value - this.effectiveMin) / this.effectiveStep)) > 1e-9;
|
|
607
836
|
const invalidRange = this.range && this.value > this.valueEnd;
|
|
608
837
|
const flags = {
|
|
609
838
|
customError: this.customValidationMessage !== '' || Boolean(this.validatorMessage) || invalidRange,
|
|
610
|
-
rangeOverflow: this.value > this.
|
|
611
|
-
rangeUnderflow: this.value < this.
|
|
839
|
+
rangeOverflow: this.value > this.effectiveMax || (this.range && this.valueEnd > this.effectiveMax),
|
|
840
|
+
rangeUnderflow: this.value < this.effectiveMin || (this.range && this.valueEnd < this.effectiveMin),
|
|
612
841
|
stepMismatch,
|
|
613
842
|
};
|
|
614
843
|
const message = this.customValidationMessage ||
|
|
@@ -643,38 +872,90 @@ export class Slider {
|
|
|
643
872
|
}
|
|
644
873
|
renderValueLabel(thumb) {
|
|
645
874
|
const isEnd = thumb === 'end';
|
|
646
|
-
|
|
875
|
+
const val = isEnd ? this.valueEnd : this.value;
|
|
876
|
+
const stepMatch = this.normalizedSteps.find((s) => s.value === val);
|
|
877
|
+
const displayText = stepMatch?.label ?? String(val);
|
|
878
|
+
const color = this.getGradientColorAt(val);
|
|
879
|
+
const labelStyle = color ? { backgroundColor: color } : undefined;
|
|
880
|
+
const arrowStyle = color ? { backgroundColor: color } : undefined;
|
|
881
|
+
return (h("div", { class: "slider-value-label", part: "value-label", ref: (el) => this.setValueLabelElement(thumb, el), "aria-hidden": "true", style: labelStyle }, displayText, h("span", { class: "slider-value-label-arrow", part: "value-label-arrow", ref: (el) => this.setValueLabelArrowElement(thumb, el), style: arrowStyle })));
|
|
647
882
|
}
|
|
648
883
|
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: mantém as variantes visuais do thumb em um único ponto.
|
|
649
884
|
renderThumb(thumb, style) {
|
|
650
885
|
const isEnd = thumb === 'end';
|
|
886
|
+
const iconName = isEnd ? (this.thumbEndIcon ?? this.thumbIcon) : (this.thumbStartIcon ?? this.thumbIcon);
|
|
887
|
+
const slotName = isEnd ? 'thumb-end-icon' : this.range ? 'thumb-start-icon' : 'thumb-icon';
|
|
888
|
+
const hasSlot = isEnd
|
|
889
|
+
? this.hasThumbEndIconSlot
|
|
890
|
+
: this.range
|
|
891
|
+
? this.hasThumbStartIconSlot
|
|
892
|
+
: this.hasThumbIconSlot || this.hasThumbStartIconSlot;
|
|
893
|
+
const hasIcon = Boolean(iconName || hasSlot);
|
|
651
894
|
return (h("div", { class: {
|
|
652
895
|
'slider-thumb': true,
|
|
653
896
|
'slider-thumb--start': !isEnd,
|
|
654
897
|
'slider-thumb--end': isEnd,
|
|
655
898
|
'slider-thumb--active': this.dragging && this.draggingThumb === thumb,
|
|
656
|
-
|
|
899
|
+
'slider-thumb--has-icon': hasIcon,
|
|
900
|
+
}, part: `thumb thumb-${thumb}`, ref: (el) => this.setThumbElement(thumb, el), id: isEnd ? `${this.customId}-end` : this.customId, role: "slider", tabIndex: this.isDisabled() ? -1 : 0, "aria-valuemin": isEnd ? String(this.value) : String(this.effectiveMin), "aria-valuemax": isEnd ? String(this.effectiveMax) : this.range ? String(this.valueEnd) : String(this.effectiveMax), "aria-valuenow": isEnd ? String(this.valueEnd) : String(this.value), "aria-disabled": this.isDisabled() ? 'true' : 'false', "aria-label": isEnd ? `${this.label ?? ''} fim`.trim() : this.range ? `${this.label ?? ''} início`.trim() : this.label, "aria-orientation": this.effectiveVertical ? 'vertical' : 'horizontal', "aria-busy": this.isValidating ? 'true' : null, "aria-describedby": this.hasFeedbackSlot || this.customValidationMessage || this.validatorMessage
|
|
657
901
|
? `${this.customId}-feedback`
|
|
658
902
|
: null, "aria-errormessage": this.customValidationMessage || this.validatorMessage || this.hasFeedbackSlot
|
|
659
903
|
? `${this.customId}-feedback`
|
|
660
|
-
: null, style: style }));
|
|
904
|
+
: null, style: style }, h("slot", { name: slotName }, iconName && h("br-icon", { iconName: iconName, class: "slider-thumb-icon", "aria-hidden": "true" }))));
|
|
661
905
|
}
|
|
662
906
|
renderReferences() {
|
|
663
907
|
const hasRefs = this.hasRefStart || this.hasRefEnd || this.showBounds;
|
|
664
|
-
return (h("div", { class: { 'slider-refs': true, 'slider-refs--hidden': !hasRefs }, part: "references" }, h("span", { class: "ref-start", part: "reference-start" }, h("slot", { name: "ref-start" }), this.showBounds && (h("span", { class: "ref-bound", part: "reference-bound" }, this.
|
|
908
|
+
return (h("div", { class: { 'slider-refs': true, 'slider-refs--hidden': !hasRefs }, part: "references" }, h("span", { class: "ref-start", part: "reference-start" }, h("slot", { name: "ref-start" }), this.showBounds && (h("span", { class: "ref-bound", part: "reference-bound" }, this.effectiveMin))), h("span", { class: "ref-end", part: "reference-end" }, this.showBounds && (h("span", { class: "ref-bound", part: "reference-bound" }, this.effectiveMax)), h("slot", { name: "ref-end" }))));
|
|
665
909
|
}
|
|
666
|
-
|
|
910
|
+
setInputElement(thumb, element) {
|
|
911
|
+
if (thumb === 'end') {
|
|
912
|
+
this.inputEndEl = element;
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
this.inputStartEl = element;
|
|
916
|
+
}
|
|
917
|
+
renderInput(thumb) {
|
|
667
918
|
if (!this.showInput)
|
|
668
919
|
return undefined;
|
|
669
|
-
|
|
920
|
+
const isEnd = thumb === 'end';
|
|
921
|
+
const value = isEnd ? this.valueEnd : this.value;
|
|
922
|
+
const min = isEnd ? this.value : this.effectiveMin;
|
|
923
|
+
const max = isEnd ? this.effectiveMax : this.range ? this.valueEnd : this.effectiveMax;
|
|
924
|
+
const label = isEnd ? `${this.label ?? 'Valor'} fim` : this.range ? `${this.label ?? 'Valor'} início` : this.label;
|
|
925
|
+
return (h("div", { class: { 'slider-input-wrapper': true, [`slider-input-wrapper--${thumb}`]: true }, part: "input-wrapper" }, h("br-input", { controlWidth: "80px", density: "small", exportparts: "input", class: "slider-input", type: "number", min: min, max: max, step: this.effectiveStep, disabled: this.isDisabled(), "aria-label": label, "aria-describedby": this.hasFeedbackSlot || this.customValidationMessage || this.validatorMessage
|
|
670
926
|
? `${this.customId}-feedback`
|
|
671
927
|
: null, "aria-errormessage": this.customValidationMessage || this.validatorMessage || this.hasFeedbackSlot
|
|
672
928
|
? `${this.customId}-feedback`
|
|
673
|
-
: null, onInput: this.handleInputInput,
|
|
929
|
+
: null, value: String(value), ref: (el) => this.setInputElement(thumb, el), onInput: (event) => this.handleInputInput(event, thumb), onChange: (event) => this.handleInputChange(event, thumb), onBlur: () => {
|
|
930
|
+
this.inputEditing = null;
|
|
931
|
+
} })));
|
|
932
|
+
}
|
|
933
|
+
renderSteps() {
|
|
934
|
+
return (h("div", { class: "slider-steps", part: "steps", "aria-hidden": "true" }, this.normalizedSteps.map((step) => {
|
|
935
|
+
const pct = this.percentOf(step.value);
|
|
936
|
+
const isSelected = this.range
|
|
937
|
+
? step.value >= this.value && step.value <= this.valueEnd
|
|
938
|
+
: step.value === this.value;
|
|
939
|
+
const posStyle = this.effectiveVertical ? { bottom: `${pct}%` } : { left: `${pct}%` };
|
|
940
|
+
return (h("button", { type: "button", class: {
|
|
941
|
+
'slider-step': true,
|
|
942
|
+
'slider-step--active': isSelected,
|
|
943
|
+
}, part: `step step-${step.value}`, style: posStyle, disabled: this.isDisabled(), tabIndex: -1, onClick: () => this.handleStepClick(step.value) }, step.icon && h("br-icon", { iconName: step.icon, class: "slider-step-icon", "aria-hidden": "true" }), step.label && h("span", { class: "slider-step-label" }, step.label)));
|
|
944
|
+
})));
|
|
674
945
|
}
|
|
675
946
|
renderTrack() {
|
|
676
947
|
const trackMask = this.getTrackMaskStyle();
|
|
677
|
-
|
|
948
|
+
const startColor = this.getGradientColorAt(this.value);
|
|
949
|
+
const endColor = this.range ? this.getGradientColorAt(this.valueEnd) : undefined;
|
|
950
|
+
const startThumbStyle = {
|
|
951
|
+
...this.getThumbStyle(this.value),
|
|
952
|
+
...(startColor ? { backgroundColor: startColor, color: startColor } : {}),
|
|
953
|
+
};
|
|
954
|
+
const endThumbStyle = {
|
|
955
|
+
...this.getThumbStyle(this.valueEnd),
|
|
956
|
+
...(endColor ? { backgroundColor: endColor, color: endColor } : {}),
|
|
957
|
+
};
|
|
958
|
+
return (h("div", { class: "slider-track", part: "track", ref: (el) => (this.trackEl = el), onPointerDown: this.handlePointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerUp }, h("div", { class: "slider-track-visual", part: "track-visual", style: trackMask }, h("div", { class: "slider-filled-track", part: "filled-track", style: this.getFilledStyle() })), this.showTicks && this.showTickLabels && this.renderTickLabels(), this.shouldShowValueLabel() && this.renderValueLabel('start'), this.shouldShowValueLabel() && this.range && this.renderValueLabel('end'), this.renderThumb('start', startThumbStyle), this.range && this.renderThumb('end', endThumbStyle)));
|
|
678
959
|
}
|
|
679
960
|
renderTickLabels() {
|
|
680
961
|
const tickValues = this.getTickValues();
|
|
@@ -682,7 +963,7 @@ export class Slider {
|
|
|
682
963
|
return (h("div", { class: "slider-tick-labels", part: "tick-labels", "aria-hidden": "true" }, intermediateTicks.map((value) => (h("span", { class: "slider-tick-label", part: "tick-label", style: this.effectiveVertical ? { bottom: `${this.percentOf(value)}%` } : { left: `${this.percentOf(value)}%` } }, value)))));
|
|
683
964
|
}
|
|
684
965
|
render() {
|
|
685
|
-
return (h(Host, { key: '
|
|
966
|
+
return (h(Host, { key: '7c7f82026393c762b721269c20498c85efd9a6b3', style: { opacity: this.isDisabled() ? '1' : undefined } }, this.label && h("div", { key: '2195d6599d5fd68b42d47d3737bb621f2d095c0a', class: "slider-label" }, this.label), h("div", { key: '9e6ac187a1b53d2db04aaa8e60612e5d06e85fa8', class: this.getCssClassMap(), part: "base" }, h("div", { key: 'f001d13512efcf6fab5837261ffd80254888b6fc', class: "slider-layout", part: "layout" }, this.range && this.renderInput('start'), h("div", { key: '7d0975449e6b3d69d4ca9b6e14130e5ef9b3ca72', class: "slider-body", part: "body" }, this.renderTrack(), this.normalizedSteps.length > 0 && this.renderSteps(), this.renderReferences()), this.range ? this.renderInput('end') : this.renderInput('start'))), h("div", { key: '2e72a57e643f887282c9222cefac6a4106e32751', id: `${this.customId}-feedback`, part: "feedback", hidden: !this.hasFeedbackSlot && !this.customValidationMessage && !this.validatorMessage }, h("slot", { key: 'f1e9157b6202558e2e26b550a052cb94b089823d', name: "feedback", onSlotchange: (event) => (this.hasFeedbackSlot = hasAssignedSlotContent(event.currentTarget)) }), !this.hasFeedbackSlot && (this.customValidationMessage || this.validatorMessage) ? (h("br-message", { state: "danger", message: this.customValidationMessage || this.validatorMessage })) : null)));
|
|
686
967
|
}
|
|
687
968
|
static get is() { return "br-slider"; }
|
|
688
969
|
static get encapsulation() { return "shadow"; }
|
|
@@ -769,7 +1050,7 @@ export class Slider {
|
|
|
769
1050
|
"optional": false,
|
|
770
1051
|
"docs": {
|
|
771
1052
|
"tags": [],
|
|
772
|
-
"text": "Valor m\u00EDnimo aceito pelo slider."
|
|
1053
|
+
"text": "Valor m\u00EDnimo aceito pelo slider. Valores inv\u00E1lidos usam `0`."
|
|
773
1054
|
},
|
|
774
1055
|
"getter": false,
|
|
775
1056
|
"setter": false,
|
|
@@ -789,7 +1070,7 @@ export class Slider {
|
|
|
789
1070
|
"optional": false,
|
|
790
1071
|
"docs": {
|
|
791
1072
|
"tags": [],
|
|
792
|
-
"text": "Valor m\u00E1ximo aceito pelo slider."
|
|
1073
|
+
"text": "Valor m\u00E1ximo aceito pelo slider. Deve ser maior que `min`; valores inv\u00E1lidos usam `100` e rela\u00E7\u00F5es inv\u00E1lidas usam `min + 100`."
|
|
793
1074
|
},
|
|
794
1075
|
"getter": false,
|
|
795
1076
|
"setter": false,
|
|
@@ -809,7 +1090,7 @@ export class Slider {
|
|
|
809
1090
|
"optional": false,
|
|
810
1091
|
"docs": {
|
|
811
1092
|
"tags": [],
|
|
812
|
-
"text": "Incremento aplicado a cada passo."
|
|
1093
|
+
"text": "Incremento aplicado a cada passo. Deve ser maior que `0`; valores inv\u00E1lidos usam `1`."
|
|
813
1094
|
},
|
|
814
1095
|
"getter": false,
|
|
815
1096
|
"setter": false,
|
|
@@ -835,8 +1116,11 @@ export class Slider {
|
|
|
835
1116
|
"required": false,
|
|
836
1117
|
"optional": true,
|
|
837
1118
|
"docs": {
|
|
838
|
-
"tags": [
|
|
839
|
-
|
|
1119
|
+
"tags": [{
|
|
1120
|
+
"name": "example",
|
|
1121
|
+
"text": "```js\nconst slider = document.querySelector('br-slider');\nslider.validator = (value) => {\n const minimum = typeof value === 'number' ? value : value.start;\n return minimum >= 18 ? null : 'O valor inicial deve ser pelo menos 18';\n};\n```"
|
|
1122
|
+
}],
|
|
1123
|
+
"text": "Regra s\u00EDncrona ou ass\u00EDncrona aplicada ao n\u00FAmero ou intervalo selecionado.\nNo modo `range`, recebe um objeto com `start` e `end`."
|
|
840
1124
|
},
|
|
841
1125
|
"getter": false,
|
|
842
1126
|
"setter": false
|
|
@@ -853,7 +1137,7 @@ export class Slider {
|
|
|
853
1137
|
"optional": false,
|
|
854
1138
|
"docs": {
|
|
855
1139
|
"tags": [],
|
|
856
|
-
"text": "Valor atual do slider (al\u00E7a inicial no modo composto)."
|
|
1140
|
+
"text": "Valor atual do slider (al\u00E7a inicial no modo composto). Valores n\u00E3o finitos usam o limite m\u00EDnimo;\nvalores fora do intervalo s\u00E3o limitados."
|
|
857
1141
|
},
|
|
858
1142
|
"getter": false,
|
|
859
1143
|
"setter": false,
|
|
@@ -876,7 +1160,7 @@ export class Slider {
|
|
|
876
1160
|
"name": "deprecated",
|
|
877
1161
|
"text": "Use `rangeValue`."
|
|
878
1162
|
}],
|
|
879
|
-
"text": "Valor da al\u00E7a final no modo composto (`range`).\nQuando n\u00E3o fornecido em modo composto, assume o valor de `max`."
|
|
1163
|
+
"text": "Valor da al\u00E7a final no modo composto (`range`).\nQuando n\u00E3o fornecido em modo composto, assume o valor de `max`. Valores n\u00E3o finitos usam `max`,\nvalores fora do intervalo s\u00E3o limitados."
|
|
880
1164
|
},
|
|
881
1165
|
"getter": false,
|
|
882
1166
|
"setter": false,
|
|
@@ -902,8 +1186,11 @@ export class Slider {
|
|
|
902
1186
|
"required": false,
|
|
903
1187
|
"optional": true,
|
|
904
1188
|
"docs": {
|
|
905
|
-
"tags": [
|
|
906
|
-
|
|
1189
|
+
"tags": [{
|
|
1190
|
+
"name": "example",
|
|
1191
|
+
"text": "```js\nconst slider = document.querySelector('br-slider');\nslider.range = true;\nslider.rangeValue = { start: 20, end: 80 };\n```"
|
|
1192
|
+
}],
|
|
1193
|
+
"text": "Valor estruturado das duas al\u00E7as no modo `range`.\nDeve conter `start` e `end` finitos; valores inv\u00E1lidos mant\u00EAm o \u00FAltimo valor efetivo.\nPasse o objeto por property binding."
|
|
907
1194
|
},
|
|
908
1195
|
"getter": false,
|
|
909
1196
|
"setter": false
|
|
@@ -928,33 +1215,6 @@ export class Slider {
|
|
|
928
1215
|
"attribute": "disabled",
|
|
929
1216
|
"defaultValue": "false"
|
|
930
1217
|
},
|
|
931
|
-
"density": {
|
|
932
|
-
"type": "string",
|
|
933
|
-
"mutable": false,
|
|
934
|
-
"complexType": {
|
|
935
|
-
"original": "SliderDensity",
|
|
936
|
-
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
937
|
-
"references": {
|
|
938
|
-
"SliderDensity": {
|
|
939
|
-
"location": "import",
|
|
940
|
-
"path": "./slider.types",
|
|
941
|
-
"id": "src/components/slider/slider.types.ts::SliderDensity",
|
|
942
|
-
"referenceLocation": "SliderDensity"
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
},
|
|
946
|
-
"required": false,
|
|
947
|
-
"optional": false,
|
|
948
|
-
"docs": {
|
|
949
|
-
"tags": [],
|
|
950
|
-
"text": "Densidade da al\u00E7a de controle.\n`small` = 16px (desktop compacto), `medium` = 20px (desktop padr\u00E3o), `large` = 24px (mobile)."
|
|
951
|
-
},
|
|
952
|
-
"getter": false,
|
|
953
|
-
"setter": false,
|
|
954
|
-
"reflect": true,
|
|
955
|
-
"attribute": "density",
|
|
956
|
-
"defaultValue": "'medium'"
|
|
957
|
-
},
|
|
958
1218
|
"vertical": {
|
|
959
1219
|
"type": "boolean",
|
|
960
1220
|
"mutable": false,
|
|
@@ -990,7 +1250,7 @@ export class Slider {
|
|
|
990
1250
|
"optional": true,
|
|
991
1251
|
"docs": {
|
|
992
1252
|
"tags": [],
|
|
993
|
-
"text": "Orienta\u00E7\u00E3o can\u00F4nica. Quando informada, tem preced\u00EAncia sobre `vertical`."
|
|
1253
|
+
"text": "Orienta\u00E7\u00E3o can\u00F4nica. Quando informada, tem preced\u00EAncia sobre `vertical`; valores inv\u00E1lidos usam `horizontal`."
|
|
994
1254
|
},
|
|
995
1255
|
"getter": false,
|
|
996
1256
|
"setter": false,
|
|
@@ -1049,7 +1309,7 @@ export class Slider {
|
|
|
1049
1309
|
"optional": false,
|
|
1050
1310
|
"docs": {
|
|
1051
1311
|
"tags": [],
|
|
1052
|
-
"text": "Exibe
|
|
1312
|
+
"text": "Exibe um `br-input` num\u00E9rico sincronizado com a al\u00E7a.\nNo modo `range`, exibe um campo para o in\u00EDcio e outro para o fim; na\norienta\u00E7\u00E3o horizontal ficam nas extremidades esquerda e direita, e na\nvertical ficam acima e abaixo da trilha. Quando ativo, a etiqueta de valor\nn\u00E3o \u00E9 exibida."
|
|
1053
1313
|
},
|
|
1054
1314
|
"getter": false,
|
|
1055
1315
|
"setter": false,
|
|
@@ -1116,6 +1376,141 @@ export class Slider {
|
|
|
1116
1376
|
"reflect": true,
|
|
1117
1377
|
"attribute": "show-bounds",
|
|
1118
1378
|
"defaultValue": "false"
|
|
1379
|
+
},
|
|
1380
|
+
"density": {
|
|
1381
|
+
"type": "string",
|
|
1382
|
+
"mutable": false,
|
|
1383
|
+
"complexType": {
|
|
1384
|
+
"original": "SliderDensity",
|
|
1385
|
+
"resolved": "\"high\" | \"large\" | \"low\" | \"medium\" | \"small\"",
|
|
1386
|
+
"references": {
|
|
1387
|
+
"SliderDensity": {
|
|
1388
|
+
"location": "import",
|
|
1389
|
+
"path": "./slider.types",
|
|
1390
|
+
"id": "src/components/slider/slider.types.ts::SliderDensity",
|
|
1391
|
+
"referenceLocation": "SliderDensity"
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
"required": false,
|
|
1396
|
+
"optional": true,
|
|
1397
|
+
"docs": {
|
|
1398
|
+
"tags": [],
|
|
1399
|
+
"text": "Densidade visual do componente.\nAltera exclusivamente as dimens\u00F5es da al\u00E7a de controle (thumb).\nValores aceitos: 'small' (16px), 'medium' (20px - padr\u00E3o), 'large' (24px).\n'high' e 'low' s\u00E3o aceitos como sin\u00F4nimos de 'small' e 'large'."
|
|
1400
|
+
},
|
|
1401
|
+
"getter": false,
|
|
1402
|
+
"setter": false,
|
|
1403
|
+
"reflect": true,
|
|
1404
|
+
"attribute": "density",
|
|
1405
|
+
"defaultValue": "'medium'"
|
|
1406
|
+
},
|
|
1407
|
+
"thumbIcon": {
|
|
1408
|
+
"type": "string",
|
|
1409
|
+
"mutable": false,
|
|
1410
|
+
"complexType": {
|
|
1411
|
+
"original": "string",
|
|
1412
|
+
"resolved": "string",
|
|
1413
|
+
"references": {}
|
|
1414
|
+
},
|
|
1415
|
+
"required": false,
|
|
1416
|
+
"optional": true,
|
|
1417
|
+
"docs": {
|
|
1418
|
+
"tags": [],
|
|
1419
|
+
"text": "Nome do \u00EDcone a ser exibido no interior da al\u00E7a de controle (thumb).\nNo modo `range`, aplica-se a ambas as al\u00E7as caso `thumbStartIcon` ou `thumbEndIcon` n\u00E3o sejam especificados.\nExemplo: 'fa-solid:arrows-left-right', 'fa-solid:circle'."
|
|
1420
|
+
},
|
|
1421
|
+
"getter": false,
|
|
1422
|
+
"setter": false,
|
|
1423
|
+
"reflect": true,
|
|
1424
|
+
"attribute": "thumb-icon"
|
|
1425
|
+
},
|
|
1426
|
+
"thumbStartIcon": {
|
|
1427
|
+
"type": "string",
|
|
1428
|
+
"mutable": false,
|
|
1429
|
+
"complexType": {
|
|
1430
|
+
"original": "string",
|
|
1431
|
+
"resolved": "string",
|
|
1432
|
+
"references": {}
|
|
1433
|
+
},
|
|
1434
|
+
"required": false,
|
|
1435
|
+
"optional": true,
|
|
1436
|
+
"docs": {
|
|
1437
|
+
"tags": [],
|
|
1438
|
+
"text": "Nome do \u00EDcone da al\u00E7a inicial (no modo `range`, al\u00E7a \u00E0 esquerda/inferior)."
|
|
1439
|
+
},
|
|
1440
|
+
"getter": false,
|
|
1441
|
+
"setter": false,
|
|
1442
|
+
"reflect": true,
|
|
1443
|
+
"attribute": "thumb-start-icon"
|
|
1444
|
+
},
|
|
1445
|
+
"thumbEndIcon": {
|
|
1446
|
+
"type": "string",
|
|
1447
|
+
"mutable": false,
|
|
1448
|
+
"complexType": {
|
|
1449
|
+
"original": "string",
|
|
1450
|
+
"resolved": "string",
|
|
1451
|
+
"references": {}
|
|
1452
|
+
},
|
|
1453
|
+
"required": false,
|
|
1454
|
+
"optional": true,
|
|
1455
|
+
"docs": {
|
|
1456
|
+
"tags": [],
|
|
1457
|
+
"text": "Nome do \u00EDcone da al\u00E7a final (no modo `range`, al\u00E7a \u00E0 direita/superior)."
|
|
1458
|
+
},
|
|
1459
|
+
"getter": false,
|
|
1460
|
+
"setter": false,
|
|
1461
|
+
"reflect": true,
|
|
1462
|
+
"attribute": "thumb-end-icon"
|
|
1463
|
+
},
|
|
1464
|
+
"gradient": {
|
|
1465
|
+
"type": "any",
|
|
1466
|
+
"mutable": false,
|
|
1467
|
+
"complexType": {
|
|
1468
|
+
"original": "string | boolean",
|
|
1469
|
+
"resolved": "boolean | string",
|
|
1470
|
+
"references": {}
|
|
1471
|
+
},
|
|
1472
|
+
"required": false,
|
|
1473
|
+
"optional": true,
|
|
1474
|
+
"docs": {
|
|
1475
|
+
"tags": [],
|
|
1476
|
+
"text": "Habilita gradiente de cores na trilha e sincroniza dinamicamente a cor da al\u00E7a (thumb)\ne da etiqueta de valor (tooltip) com a cor correspondente \u00E0 posi\u00E7\u00E3o atual.\nPode ser um booleano (usa gradiente padr\u00E3o verde -> amarelo -> vermelho)\nou uma string com cores/gradiente customizado (ex.: '#168821, #ffcd07, #e52207' ou 'linear-gradient(...)')."
|
|
1477
|
+
},
|
|
1478
|
+
"getter": false,
|
|
1479
|
+
"setter": false,
|
|
1480
|
+
"reflect": true,
|
|
1481
|
+
"attribute": "gradient"
|
|
1482
|
+
},
|
|
1483
|
+
"steps": {
|
|
1484
|
+
"type": "string",
|
|
1485
|
+
"mutable": false,
|
|
1486
|
+
"complexType": {
|
|
1487
|
+
"original": "SliderStep[] | string",
|
|
1488
|
+
"resolved": "SliderStep[] | string",
|
|
1489
|
+
"references": {
|
|
1490
|
+
"SliderStep": {
|
|
1491
|
+
"location": "import",
|
|
1492
|
+
"path": "./slider.types",
|
|
1493
|
+
"id": "src/components/slider/slider.types.ts::SliderStep",
|
|
1494
|
+
"referenceLocation": "SliderStep"
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
},
|
|
1498
|
+
"required": false,
|
|
1499
|
+
"optional": true,
|
|
1500
|
+
"docs": {
|
|
1501
|
+
"tags": [{
|
|
1502
|
+
"name": "example",
|
|
1503
|
+
"text": "```html\n<br-slider\n steps='[{\"value\": 1, \"label\": \"P\u00E9ssimo\", \"icon\": \"fa-solid:face-frown\"}, {\"value\": 5, \"label\": \"Excelente\", \"icon\": \"fa-solid:face-laugh\"}]'\n></br-slider>\n```"
|
|
1504
|
+
}, {
|
|
1505
|
+
"name": "example",
|
|
1506
|
+
"text": "```js\nconst slider = document.querySelector('br-slider');\nslider.steps = [\n { value: 1, label: 'P\u00E9ssimo', icon: 'fa-solid:face-frown' },\n { value: 5, label: 'Excelente', icon: 'fa-solid:face-laugh' },\n];\n```"
|
|
1507
|
+
}],
|
|
1508
|
+
"text": "Lista de passos customizados para o slider.\nCada passo pode definir `value`, `label` (texto exibido no tooltip e/ou abaixo da trilha)\ne `icon` (nome do \u00EDcone exibido abaixo da marca\u00E7\u00E3o do passo).\nAceita array de objetos `SliderStep[]`, array de strings `string[]`, ou string JSON."
|
|
1509
|
+
},
|
|
1510
|
+
"getter": false,
|
|
1511
|
+
"setter": false,
|
|
1512
|
+
"reflect": false,
|
|
1513
|
+
"attribute": "steps"
|
|
1119
1514
|
}
|
|
1120
1515
|
};
|
|
1121
1516
|
}
|
|
@@ -1126,6 +1521,9 @@ export class Slider {
|
|
|
1126
1521
|
"hasRefEnd": {},
|
|
1127
1522
|
"hasRefStart": {},
|
|
1128
1523
|
"hasFeedbackSlot": {},
|
|
1524
|
+
"hasThumbIconSlot": {},
|
|
1525
|
+
"hasThumbStartIconSlot": {},
|
|
1526
|
+
"hasThumbEndIconSlot": {},
|
|
1129
1527
|
"customValidationMessage": {},
|
|
1130
1528
|
"validatorMessage": {},
|
|
1131
1529
|
"isValidating": {}
|