@beeq/core 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beeq/beeq.css +1 -1
- package/dist/beeq/beeq.esm.js +1 -1
- package/dist/beeq/beeq.esm.js.map +1 -1
- package/dist/beeq/index.esm.js +1 -1
- package/dist/beeq/index.esm.js.map +1 -1
- package/dist/beeq/{p-01d532ae.entry.js → p-0f4ba6f9.entry.js} +2 -2
- package/dist/beeq/{p-2796cee3.entry.js → p-1b97db7b.entry.js} +2 -2
- package/dist/beeq/{p-2796cee3.entry.js.map → p-1b97db7b.entry.js.map} +1 -1
- package/dist/beeq/p-1c8b6eb4.js +6 -0
- package/dist/beeq/p-1c8b6eb4.js.map +1 -0
- package/dist/beeq/{p-a17900a9.entry.js → p-1d5b1c02.entry.js} +2 -2
- package/dist/beeq/{p-01cb76f9.entry.js → p-2a599238.entry.js} +2 -2
- package/dist/beeq/p-2f03d7b8.entry.js +6 -0
- package/dist/beeq/{p-ec9694e9.entry.js.map → p-2f03d7b8.entry.js.map} +1 -1
- package/dist/beeq/{p-36f66691.entry.js → p-39907ce1.entry.js} +2 -2
- package/dist/beeq/{p-5767c20b.entry.js → p-3d9f8f4c.entry.js} +2 -2
- package/dist/beeq/{p-f4ae510d.entry.js → p-42215cd4.entry.js} +2 -2
- package/dist/beeq/{p-f4ae510d.entry.js.map → p-42215cd4.entry.js.map} +1 -1
- package/dist/beeq/{p-a624bec3.entry.js → p-46f7c4c1.entry.js} +2 -2
- package/dist/beeq/p-50709b47.js +7 -0
- package/dist/beeq/p-50709b47.js.map +1 -0
- package/dist/beeq/{p-aecfae64.entry.js → p-533aaa93.entry.js} +2 -2
- package/dist/beeq/{p-cdfca19c.entry.js → p-58402996.entry.js} +2 -2
- package/dist/beeq/{p-cdfca19c.entry.js.map → p-58402996.entry.js.map} +1 -1
- package/dist/beeq/{p-8be0e23d.entry.js → p-63c1c8fc.entry.js} +2 -2
- package/dist/beeq/p-6a04c912.entry.js +6 -0
- package/dist/beeq/p-6a04c912.entry.js.map +1 -0
- package/dist/beeq/{p-b35be40e.entry.js → p-71f52777.entry.js} +2 -2
- package/dist/beeq/{p-1d4af402.entry.js → p-72a87f8b.entry.js} +2 -2
- package/dist/beeq/p-72a87f8b.entry.js.map +1 -0
- package/dist/beeq/{p-60ef2dd5.entry.js → p-79ad9f38.entry.js} +2 -2
- package/dist/beeq/{p-60ef2dd5.entry.js.map → p-79ad9f38.entry.js.map} +1 -1
- package/dist/beeq/{p-cafaec2d.entry.js → p-7a2583e7.entry.js} +2 -2
- package/dist/beeq/{p-1f4958a6.entry.js → p-91c11876.entry.js} +2 -2
- package/dist/beeq/{p-1f4958a6.entry.js.map → p-91c11876.entry.js.map} +1 -1
- package/dist/beeq/{p-c939d2c1.entry.js → p-963d0c4f.entry.js} +2 -2
- package/dist/beeq/{p-45f8500a.entry.js → p-98b445c2.entry.js} +2 -2
- package/dist/beeq/{p-76c0d5a2.entry.js → p-9d4cbf5d.entry.js} +2 -2
- package/dist/beeq/{p-b6709f16.entry.js → p-a0ac903c.entry.js} +2 -2
- package/dist/beeq/{p-39dd2bb7.entry.js → p-a82da834.entry.js} +2 -2
- package/dist/beeq/{p-39dd2bb7.entry.js.map → p-a82da834.entry.js.map} +1 -1
- package/dist/beeq/{p-b7f82611.entry.js → p-a9d715ff.entry.js} +2 -2
- package/dist/beeq/{p-c77868b1.entry.js → p-b11bc216.entry.js} +2 -2
- package/dist/beeq/{p-ed7b86bf.entry.js → p-bce94669.entry.js} +2 -2
- package/dist/beeq/p-bce94669.entry.js.map +1 -0
- package/dist/beeq/{p-722fecf7.entry.js → p-c4dcf2ed.entry.js} +2 -2
- package/dist/beeq/{p-8a3250c8.entry.js → p-c751eaae.entry.js} +2 -2
- package/dist/beeq/{p-882091e8.entry.js → p-ce4381eb.entry.js} +2 -2
- package/dist/beeq/{p-882091e8.entry.js.map → p-ce4381eb.entry.js.map} +1 -1
- package/dist/beeq/{p-9485b59c.entry.js → p-d9705a72.entry.js} +2 -2
- package/dist/beeq/{p-af35411d.entry.js → p-e058f266.entry.js} +2 -2
- package/dist/beeq/{p-af35411d.entry.js.map → p-e058f266.entry.js.map} +1 -1
- package/dist/beeq/{p-fe2bf708.entry.js → p-e730f8dc.entry.js} +2 -2
- package/dist/beeq/{p-fe2bf708.entry.js.map → p-e730f8dc.entry.js.map} +1 -1
- package/dist/beeq/p-ee80837c.entry.js +6 -0
- package/dist/beeq/p-ee80837c.entry.js.map +1 -0
- package/dist/beeq/p-f0b04dd5.entry.js +6 -0
- package/dist/beeq/p-f0b04dd5.entry.js.map +1 -0
- package/dist/beeq/p-f5c46b74.entry.js +6 -0
- package/dist/beeq/p-f5c46b74.entry.js.map +1 -0
- package/dist/beeq/p-fb1a243e.entry.js +6 -0
- package/dist/beeq/{p-d3667996.entry.js.map → p-fb1a243e.entry.js.map} +1 -1
- package/dist/beeq/{p-6f0f6b1d.entry.js → p-fb77966e.entry.js} +2 -2
- package/dist/beeq/{p-6f0f6b1d.entry.js.map → p-fb77966e.entry.js.map} +1 -1
- package/dist/beeq/{p-61800232.entry.js → p-ff5975d9.entry.js} +2 -2
- package/dist/beeq/{p-61800232.entry.js.map → p-ff5975d9.entry.js.map} +1 -1
- package/dist/cjs/beeq.cjs.js +3 -3
- package/dist/cjs/beeq.cjs.js.map +1 -1
- package/dist/cjs/bq-accordion-group.cjs.entry.js +3 -3
- package/dist/cjs/bq-accordion.cjs.entry.js +4 -4
- package/dist/cjs/bq-alert.cjs.entry.js +6 -6
- package/dist/cjs/bq-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-avatar.cjs.entry.js +5 -5
- package/dist/cjs/bq-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-badge.cjs.entry.js +4 -4
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +5 -5
- package/dist/cjs/bq-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/bq-button.cjs.entry.js +4 -4
- package/dist/cjs/bq-button.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-card.cjs.entry.js +4 -4
- package/dist/cjs/bq-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/bq-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-dialog.cjs.entry.js +5 -5
- package/dist/cjs/bq-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-divider.cjs.entry.js +4 -4
- package/dist/cjs/bq-drawer.cjs.entry.js +6 -6
- package/dist/cjs/bq-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-dropdown_3.cjs.entry.js +369 -0
- package/dist/cjs/bq-dropdown_3.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-empty-state.cjs.entry.js +6 -6
- package/dist/cjs/bq-icon.cjs.entry.js +3 -3
- package/dist/cjs/bq-input.cjs.entry.js +6 -6
- package/dist/cjs/bq-input.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-notification.cjs.entry.js +4 -4
- package/dist/cjs/bq-notification.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-option-group.cjs.entry.js +3 -3
- package/dist/cjs/bq-option.cjs.entry.js +13 -9
- package/dist/cjs/bq-option.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-panel.cjs.entry.js +3 -3
- package/dist/cjs/bq-progress.cjs.entry.js +6 -6
- package/dist/cjs/bq-progress.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/bq-radio.cjs.entry.js +4 -4
- package/dist/cjs/bq-select.cjs.entry.js +131 -19
- package/dist/cjs/bq-select.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-side-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-side-menu.cjs.entry.js +3 -3
- package/dist/cjs/bq-side-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-slider.cjs.entry.js +165 -157
- package/dist/cjs/bq-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-spinner.cjs.entry.js +6 -6
- package/dist/cjs/bq-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-status.cjs.entry.js +3 -3
- package/dist/cjs/bq-step-item.cjs.entry.js +6 -6
- package/dist/cjs/bq-steps.cjs.entry.js +3 -3
- package/dist/cjs/bq-switch.cjs.entry.js +4 -4
- package/dist/cjs/bq-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/bq-tab.cjs.entry.js +4 -4
- package/dist/cjs/bq-textarea.cjs.entry.js +5 -5
- package/dist/cjs/bq-toast.cjs.entry.js +3 -3
- package/dist/cjs/bq-tooltip.cjs.entry.js +5 -3
- package/dist/cjs/bq-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/event-7d21e426.js +20 -0
- package/dist/cjs/event-7d21e426.js.map +1 -0
- package/dist/cjs/{index-1e15a4d4.js → index-48cab8dd.js} +34 -11
- package/dist/cjs/index-48cab8dd.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/accordion/bq-accordion.js +2 -2
- package/dist/collection/components/accordion/scss/bq-accordion.css +1 -1
- package/dist/collection/components/accordion-group/bq-accordion-group.js +1 -1
- package/dist/collection/components/accordion-group/scss/bq-accordion-group.css +1 -1
- package/dist/collection/components/alert/bq-alert.js +4 -4
- package/dist/collection/components/alert/bq-alert.js.map +1 -1
- package/dist/collection/components/alert/scss/bq-alert.css +1 -1
- package/dist/collection/components/avatar/bq-avatar.js +3 -3
- package/dist/collection/components/avatar/bq-avatar.js.map +1 -1
- package/dist/collection/components/avatar/scss/bq-avatar.css +1 -1
- package/dist/collection/components/badge/bq-badge.js +2 -2
- package/dist/collection/components/badge/scss/bq-badge.css +1 -1
- package/dist/collection/components/breadcrumb/bq-breadcrumb.js +1 -1
- package/dist/collection/components/breadcrumb/scss/bq-breadcrumb.css +1 -1
- package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js +3 -3
- package/dist/collection/components/breadcrumb-item/scss/bq-breadcrumb-item.css +1 -1
- package/dist/collection/components/button/bq-button.js +2 -2
- package/dist/collection/components/button/bq-button.js.map +1 -1
- package/dist/collection/components/button/scss/bq-button.css +1 -1
- package/dist/collection/components/card/bq-card.js +2 -2
- package/dist/collection/components/card/scss/bq-card.css +1 -1
- package/dist/collection/components/checkbox/bq-checkbox.js +2 -2
- package/dist/collection/components/checkbox/bq-checkbox.js.map +1 -1
- package/dist/collection/components/checkbox/scss/bq-checkbox.css +1 -1
- package/dist/collection/components/dialog/bq-dialog.js +3 -3
- package/dist/collection/components/dialog/bq-dialog.js.map +1 -1
- package/dist/collection/components/dialog/scss/bq-dialog.css +1 -1
- package/dist/collection/components/divider/bq-divider.js +2 -2
- package/dist/collection/components/divider/scss/bq-divider.css +1 -1
- package/dist/collection/components/drawer/bq-drawer.js +4 -4
- package/dist/collection/components/drawer/bq-drawer.js.map +1 -1
- package/dist/collection/components/drawer/scss/bq-drawer.css +1 -1
- package/dist/collection/components/dropdown/bq-dropdown.js +1 -1
- package/dist/collection/components/dropdown/scss/bq-dropdown.css +1 -1
- package/dist/collection/components/empty-state/bq-empty-state.js +4 -4
- package/dist/collection/components/empty-state/scss/bq-empty-state.css +1 -1
- package/dist/collection/components/icon/bq-icon.js +1 -1
- package/dist/collection/components/icon/scss/bq-icon.css +1 -1
- package/dist/collection/components/input/bq-input.js +4 -4
- package/dist/collection/components/input/bq-input.js.map +1 -1
- package/dist/collection/components/input/scss/bq-input.css +1 -1
- package/dist/collection/components/notification/bq-notification.js +2 -2
- package/dist/collection/components/notification/bq-notification.js.map +1 -1
- package/dist/collection/components/notification/scss/bq-notification.css +1 -1
- package/dist/collection/components/option/bq-option.js +30 -8
- package/dist/collection/components/option/bq-option.js.map +1 -1
- package/dist/collection/components/option/scss/bq-option.css +1 -1
- package/dist/collection/components/option-group/bq-option-group.js +1 -1
- package/dist/collection/components/option-group/scss/bq-option-group.css +1 -1
- package/dist/collection/components/option-list/bq-option-list.js +5 -5
- package/dist/collection/components/option-list/bq-option-list.js.map +1 -1
- package/dist/collection/components/option-list/scss/bq-option-list.css +1 -1
- package/dist/collection/components/panel/bq-panel.js +1 -1
- package/dist/collection/components/panel/scss/bq-panel.css +1 -1
- package/dist/collection/components/progress/__tests__/bq-progress.e2e.js +3 -1
- package/dist/collection/components/progress/__tests__/bq-progress.e2e.js.map +1 -1
- package/dist/collection/components/progress/bq-progress.js +4 -4
- package/dist/collection/components/progress/bq-progress.js.map +1 -1
- package/dist/collection/components/progress/scss/bq-progress.css +1 -1
- package/dist/collection/components/radio/bq-radio.js +2 -2
- package/dist/collection/components/radio/scss/bq-radio.css +1 -1
- package/dist/collection/components/radio-group/bq-radio-group.js +1 -1
- package/dist/collection/components/radio-group/scss/bq-radio-group.css +1 -1
- package/dist/collection/components/select/bq-select.js +199 -26
- package/dist/collection/components/select/bq-select.js.map +1 -1
- package/dist/collection/components/select/scss/bq-select.css +1 -1
- package/dist/collection/components/side-menu/bq-side-menu.js +1 -1
- package/dist/collection/components/side-menu/scss/bq-side-menu.css +1 -1
- package/dist/collection/components/side-menu-item/scss/bq-side-menu-item.css +1 -1
- package/dist/collection/components/slider/__tests__/bq-slider.e2e.js +113 -0
- package/dist/collection/components/slider/__tests__/bq-slider.e2e.js.map +1 -0
- package/dist/collection/components/slider/bq-slider.js +262 -196
- package/dist/collection/components/slider/bq-slider.js.map +1 -1
- package/dist/collection/components/slider/bq-slider.types.js.map +1 -1
- package/dist/collection/components/slider/scss/bq-slider.css +1 -1
- package/dist/collection/components/spinner/bq-spinner.js +4 -4
- package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
- package/dist/collection/components/spinner/scss/bq-spinner.css +1 -1
- package/dist/collection/components/status/bq-status.js +1 -1
- package/dist/collection/components/status/scss/bq-status.css +1 -1
- package/dist/collection/components/step-item/bq-step-item.js +4 -4
- package/dist/collection/components/step-item/scss/bq-step-item.css +1 -1
- package/dist/collection/components/steps/bq-steps.js +1 -1
- package/dist/collection/components/steps/scss/bq-steps.css +1 -1
- package/dist/collection/components/switch/bq-switch.js +2 -2
- package/dist/collection/components/switch/bq-switch.js.map +1 -1
- package/dist/collection/components/switch/scss/bq-switch.css +1 -1
- package/dist/collection/components/tab/bq-tab.js +2 -2
- package/dist/collection/components/tab/scss/bq-tab.css +1 -1
- package/dist/collection/components/tab-group/bq-tab-group.js +1 -1
- package/dist/collection/components/tab-group/scss/bq-tab-group.css +1 -1
- package/dist/collection/components/tag/__tests__/bq-tag.e2e.js +9 -4
- package/dist/collection/components/tag/__tests__/bq-tag.e2e.js.map +1 -1
- package/dist/collection/components/tag/bq-tag.js +4 -3
- package/dist/collection/components/tag/bq-tag.js.map +1 -1
- package/dist/collection/components/tag/helper/index.js +1 -1
- package/dist/collection/components/tag/helper/index.js.map +1 -1
- package/dist/collection/components/tag/scss/bq-tag.css +1 -1
- package/dist/collection/components/textarea/bq-textarea.js +3 -3
- package/dist/collection/components/textarea/scss/bq-textarea.css +1 -1
- package/dist/collection/components/toast/bq-toast.js +1 -1
- package/dist/collection/components/toast/scss/bq-toast.css +1 -1
- package/dist/collection/components/tooltip/bq-tooltip.js +3 -1
- package/dist/collection/components/tooltip/bq-tooltip.js.map +1 -1
- package/dist/collection/components/tooltip/scss/bq-tooltip.css +1 -1
- package/dist/collection/shared/utils/event.js +15 -0
- package/dist/collection/shared/utils/event.js.map +1 -0
- package/dist/collection/shared/utils/index.js +1 -0
- package/dist/collection/shared/utils/index.js.map +1 -1
- package/dist/components/bq-accordion-group.js +2 -2
- package/dist/components/bq-accordion.js +3 -3
- package/dist/components/bq-alert.js +5 -5
- package/dist/components/bq-alert.js.map +1 -1
- package/dist/components/bq-avatar.js +4 -4
- package/dist/components/bq-avatar.js.map +1 -1
- package/dist/components/bq-badge2.js +3 -3
- package/dist/components/bq-breadcrumb-item.js +4 -4
- package/dist/components/bq-breadcrumb.js +2 -2
- package/dist/components/bq-button2.js +3 -3
- package/dist/components/bq-button2.js.map +1 -1
- package/dist/components/bq-card.js +3 -3
- package/dist/components/bq-checkbox.js +3 -3
- package/dist/components/bq-checkbox.js.map +1 -1
- package/dist/components/bq-dialog.js +4 -4
- package/dist/components/bq-dialog.js.map +1 -1
- package/dist/components/bq-divider2.js +3 -3
- package/dist/components/bq-drawer.js +5 -5
- package/dist/components/bq-drawer.js.map +1 -1
- package/dist/components/bq-dropdown2.js +2 -2
- package/dist/components/bq-empty-state.js +5 -5
- package/dist/components/bq-icon2.js +2 -2
- package/dist/components/bq-input.js +5 -5
- package/dist/components/bq-input.js.map +1 -1
- package/dist/components/bq-notification.js +3 -3
- package/dist/components/bq-notification.js.map +1 -1
- package/dist/components/bq-option-group.js +2 -2
- package/dist/components/bq-option-list2.js +17 -6
- package/dist/components/bq-option-list2.js.map +1 -1
- package/dist/components/bq-option.js +14 -9
- package/dist/components/bq-option.js.map +1 -1
- package/dist/components/bq-panel2.js +2 -2
- package/dist/components/bq-progress.js +5 -5
- package/dist/components/bq-progress.js.map +1 -1
- package/dist/components/bq-radio-group.js +2 -2
- package/dist/components/bq-radio.js +3 -3
- package/dist/components/bq-select.js +150 -29
- package/dist/components/bq-select.js.map +1 -1
- package/dist/components/bq-side-menu-item.js +1 -1
- package/dist/components/bq-side-menu-item.js.map +1 -1
- package/dist/components/bq-side-menu.js +2 -2
- package/dist/components/bq-side-menu.js.map +1 -1
- package/dist/components/bq-slider.js +184 -164
- package/dist/components/bq-slider.js.map +1 -1
- package/dist/components/bq-spinner.js +5 -5
- package/dist/components/bq-spinner.js.map +1 -1
- package/dist/components/bq-status.js +2 -2
- package/dist/components/bq-step-item.js +5 -5
- package/dist/components/bq-steps.js +2 -2
- package/dist/components/bq-switch.js +3 -3
- package/dist/components/bq-switch.js.map +1 -1
- package/dist/components/bq-tab-group.js +2 -2
- package/dist/components/bq-tab.js +3 -3
- package/dist/components/bq-tag.js +1 -249
- package/dist/components/bq-tag.js.map +1 -1
- package/dist/{esm/bq-tag.entry.js → components/bq-tag2.js} +61 -18
- package/dist/components/bq-tag2.js.map +1 -0
- package/dist/components/bq-textarea.js +4 -4
- package/dist/components/bq-toast.js +2 -2
- package/dist/components/bq-tooltip2.js +4 -2
- package/dist/components/bq-tooltip2.js.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/esm/beeq.js +4 -4
- package/dist/esm/beeq.js.map +1 -1
- package/dist/esm/bq-accordion-group.entry.js +3 -3
- package/dist/esm/bq-accordion.entry.js +4 -4
- package/dist/esm/bq-alert.entry.js +6 -6
- package/dist/esm/bq-alert.entry.js.map +1 -1
- package/dist/esm/bq-avatar.entry.js +5 -5
- package/dist/esm/bq-avatar.entry.js.map +1 -1
- package/dist/esm/bq-badge.entry.js +4 -4
- package/dist/esm/bq-breadcrumb-item.entry.js +5 -5
- package/dist/esm/bq-breadcrumb.entry.js +3 -3
- package/dist/esm/bq-button.entry.js +4 -4
- package/dist/esm/bq-button.entry.js.map +1 -1
- package/dist/esm/bq-card.entry.js +4 -4
- package/dist/esm/bq-checkbox.entry.js +4 -4
- package/dist/esm/bq-checkbox.entry.js.map +1 -1
- package/dist/esm/bq-dialog.entry.js +5 -5
- package/dist/esm/bq-dialog.entry.js.map +1 -1
- package/dist/esm/bq-divider.entry.js +4 -4
- package/dist/esm/bq-drawer.entry.js +6 -6
- package/dist/esm/bq-drawer.entry.js.map +1 -1
- package/dist/esm/bq-dropdown_3.entry.js +363 -0
- package/dist/esm/bq-dropdown_3.entry.js.map +1 -0
- package/dist/esm/bq-empty-state.entry.js +6 -6
- package/dist/esm/bq-icon.entry.js +3 -3
- package/dist/esm/bq-input.entry.js +6 -6
- package/dist/esm/bq-input.entry.js.map +1 -1
- package/dist/esm/bq-notification.entry.js +4 -4
- package/dist/esm/bq-notification.entry.js.map +1 -1
- package/dist/esm/bq-option-group.entry.js +3 -3
- package/dist/esm/bq-option.entry.js +13 -9
- package/dist/esm/bq-option.entry.js.map +1 -1
- package/dist/esm/bq-panel.entry.js +3 -3
- package/dist/esm/bq-progress.entry.js +6 -6
- package/dist/esm/bq-progress.entry.js.map +1 -1
- package/dist/esm/bq-radio-group.entry.js +3 -3
- package/dist/esm/bq-radio.entry.js +4 -4
- package/dist/esm/bq-select.entry.js +131 -19
- package/dist/esm/bq-select.entry.js.map +1 -1
- package/dist/esm/bq-side-menu-item.entry.js +2 -2
- package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
- package/dist/esm/bq-side-menu.entry.js +3 -3
- package/dist/esm/bq-side-menu.entry.js.map +1 -1
- package/dist/esm/bq-slider.entry.js +165 -157
- package/dist/esm/bq-slider.entry.js.map +1 -1
- package/dist/esm/bq-spinner.entry.js +6 -6
- package/dist/esm/bq-spinner.entry.js.map +1 -1
- package/dist/esm/bq-status.entry.js +3 -3
- package/dist/esm/bq-step-item.entry.js +6 -6
- package/dist/esm/bq-steps.entry.js +3 -3
- package/dist/esm/bq-switch.entry.js +4 -4
- package/dist/esm/bq-switch.entry.js.map +1 -1
- package/dist/esm/bq-tab-group.entry.js +3 -3
- package/dist/esm/bq-tab.entry.js +4 -4
- package/dist/esm/bq-textarea.entry.js +5 -5
- package/dist/esm/bq-toast.entry.js +3 -3
- package/dist/esm/bq-tooltip.entry.js +5 -3
- package/dist/esm/bq-tooltip.entry.js.map +1 -1
- package/dist/esm/event-9ce1db79.js +18 -0
- package/dist/esm/event-9ce1db79.js.map +1 -0
- package/dist/esm/{index-2d9fa67e.js → index-fe861cd3.js} +34 -11
- package/dist/esm/index-fe861cd3.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/hydrate/index.js +507 -318
- package/dist/types/components/option/bq-option.d.ts +3 -0
- package/dist/types/components/select/bq-select.d.ts +32 -3
- package/dist/types/components/side-menu-item/bq-side-menu-item.d.ts +1 -1
- package/dist/types/components/slider/bq-slider.d.ts +83 -36
- package/dist/types/components/slider/bq-slider.types.d.ts +1 -0
- package/dist/types/components/tag/bq-tag.d.ts +1 -0
- package/dist/types/components.d.ts +78 -28
- package/dist/types/home/runner/work/BEEQ/BEEQ/packages/beeq/.stencil/tailwind.config.d.ts +1 -0
- package/dist/types/shared/utils/event.d.ts +7 -0
- package/dist/types/shared/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/beeq/p-17d8cc6f.entry.js +0 -6
- package/dist/beeq/p-17d8cc6f.entry.js.map +0 -1
- package/dist/beeq/p-1d4af402.entry.js.map +0 -1
- package/dist/beeq/p-4d6f76f5.entry.js +0 -6
- package/dist/beeq/p-4d6f76f5.entry.js.map +0 -1
- package/dist/beeq/p-4f1011b6.js +0 -7
- package/dist/beeq/p-4f1011b6.js.map +0 -1
- package/dist/beeq/p-763745cd.entry.js +0 -6
- package/dist/beeq/p-763745cd.entry.js.map +0 -1
- package/dist/beeq/p-d3667996.entry.js +0 -6
- package/dist/beeq/p-ec9694e9.entry.js +0 -6
- package/dist/beeq/p-ed7b86bf.entry.js.map +0 -1
- package/dist/beeq/p-ee9b3eba.entry.js +0 -6
- package/dist/beeq/p-ee9b3eba.entry.js.map +0 -1
- package/dist/beeq/p-fbf29d8c.entry.js +0 -6
- package/dist/beeq/p-fbf29d8c.entry.js.map +0 -1
- package/dist/cjs/bq-dropdown_2.cjs.entry.js +0 -163
- package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-tag.cjs.entry.js +0 -218
- package/dist/cjs/bq-tag.cjs.entry.js.map +0 -1
- package/dist/cjs/index-1e15a4d4.js.map +0 -1
- package/dist/collection/components/slider/__test__/bq-slider.e2e.js +0 -113
- package/dist/collection/components/slider/__test__/bq-slider.e2e.js.map +0 -1
- package/dist/esm/bq-dropdown_2.entry.js +0 -158
- package/dist/esm/bq-dropdown_2.entry.js.map +0 -1
- package/dist/esm/bq-tag.entry.js.map +0 -1
- package/dist/esm/index-2d9fa67e.js.map +0 -1
- /package/dist/beeq/{p-01d532ae.entry.js.map → p-0f4ba6f9.entry.js.map} +0 -0
- /package/dist/beeq/{p-a17900a9.entry.js.map → p-1d5b1c02.entry.js.map} +0 -0
- /package/dist/beeq/{p-01cb76f9.entry.js.map → p-2a599238.entry.js.map} +0 -0
- /package/dist/beeq/{p-36f66691.entry.js.map → p-39907ce1.entry.js.map} +0 -0
- /package/dist/beeq/{p-5767c20b.entry.js.map → p-3d9f8f4c.entry.js.map} +0 -0
- /package/dist/beeq/{p-a624bec3.entry.js.map → p-46f7c4c1.entry.js.map} +0 -0
- /package/dist/beeq/{p-aecfae64.entry.js.map → p-533aaa93.entry.js.map} +0 -0
- /package/dist/beeq/{p-8be0e23d.entry.js.map → p-63c1c8fc.entry.js.map} +0 -0
- /package/dist/beeq/{p-b35be40e.entry.js.map → p-71f52777.entry.js.map} +0 -0
- /package/dist/beeq/{p-cafaec2d.entry.js.map → p-7a2583e7.entry.js.map} +0 -0
- /package/dist/beeq/{p-c939d2c1.entry.js.map → p-963d0c4f.entry.js.map} +0 -0
- /package/dist/beeq/{p-45f8500a.entry.js.map → p-98b445c2.entry.js.map} +0 -0
- /package/dist/beeq/{p-76c0d5a2.entry.js.map → p-9d4cbf5d.entry.js.map} +0 -0
- /package/dist/beeq/{p-b6709f16.entry.js.map → p-a0ac903c.entry.js.map} +0 -0
- /package/dist/beeq/{p-b7f82611.entry.js.map → p-a9d715ff.entry.js.map} +0 -0
- /package/dist/beeq/{p-c77868b1.entry.js.map → p-b11bc216.entry.js.map} +0 -0
- /package/dist/beeq/{p-722fecf7.entry.js.map → p-c4dcf2ed.entry.js.map} +0 -0
- /package/dist/beeq/{p-8a3250c8.entry.js.map → p-c751eaae.entry.js.map} +0 -0
- /package/dist/beeq/{p-9485b59c.entry.js.map → p-d9705a72.entry.js.map} +0 -0
|
@@ -3,203 +3,222 @@
|
|
|
3
3
|
* © https://beeq.design - Apache 2 License.
|
|
4
4
|
*/
|
|
5
5
|
import { h } from "@stencil/core";
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import { debounce, isNil, isString } from "../../shared/utils";
|
|
7
|
+
/**
|
|
8
|
+
* @part base - The component's base wrapper.
|
|
9
|
+
* @part container - The container of the slider.
|
|
10
|
+
* @part track-area - The track area of the slider.
|
|
11
|
+
* @part progress-area - The progress area of the slider.
|
|
12
|
+
* @part input-min - The input element for the value when the slider type is `single` or the minimum value when the slider type is `range`.
|
|
13
|
+
* @part input-max - The input element for the maximum value.
|
|
14
|
+
* @part label-start - The label for the value when the slider type is `single` or the minimum value when the slider type is `range`.
|
|
15
|
+
* @part label-end - The label for maximum value when the slider type is `range`.
|
|
16
|
+
*/
|
|
8
17
|
export class BqSlider {
|
|
9
18
|
constructor() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
if (value.hasOwnProperty('max') && value.max) {
|
|
28
|
-
if (this.gap && value.hasOwnProperty('min')) {
|
|
29
|
-
value.max = Math.max(value.max, value.min + this.gap);
|
|
30
|
-
}
|
|
31
|
-
this.value[1] = value.max;
|
|
32
|
-
this.maxRangeValue = value.max;
|
|
33
|
-
this.setElementValue(String(value.max), this.maxRangeInputElement);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
this.handleMinRangeInput = () => {
|
|
37
|
-
if (!this.isSingleSlider) {
|
|
38
|
-
const minRangeValue = Math.min(parseFloat(this.minRangeInputElement.value), parseFloat(this.maxRangeInputElement.value) - this.gap);
|
|
39
|
-
this.setPropValue({ min: minRangeValue });
|
|
40
|
-
}
|
|
41
|
-
this.setPropValue({ min: parseFloat(this.minRangeInputElement.value) });
|
|
42
|
-
this.updateProgressSize();
|
|
43
|
-
this.handleRangeInputChange();
|
|
19
|
+
// Listeners
|
|
20
|
+
// ==============
|
|
21
|
+
// Public methods API
|
|
22
|
+
// These methods are exposed on the host element.
|
|
23
|
+
// Always use two lines.
|
|
24
|
+
// Public Methods must be async.
|
|
25
|
+
// Requires JSDocs for public API documentation.
|
|
26
|
+
// ===============================================
|
|
27
|
+
// Local methods
|
|
28
|
+
// Internal business logic.
|
|
29
|
+
// These methods cannot be called from the host element.
|
|
30
|
+
// =======================================================
|
|
31
|
+
this.runUpdates = () => {
|
|
32
|
+
this.updateProgressTrack();
|
|
33
|
+
this.syncInputsValue();
|
|
34
|
+
this.setThumbPosition();
|
|
44
35
|
};
|
|
45
|
-
this.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
this.
|
|
51
|
-
this.updateProgressSize();
|
|
52
|
-
this.handleRangeInputChange();
|
|
36
|
+
this.calculateMinValue = (value) => {
|
|
37
|
+
var _a;
|
|
38
|
+
const isMaxValue = ((_a = this.maxValue) !== null && _a !== void 0 ? _a : value[1]) === this.max;
|
|
39
|
+
const isGapExceeded = value[0] + this.gap > this.max;
|
|
40
|
+
// Make sure that the min value gets adjusted according to the gap value
|
|
41
|
+
return isMaxValue || isGapExceeded ? this.max - this.gap : value[0];
|
|
53
42
|
};
|
|
54
|
-
this.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
100 - ((parseFloat(this.maxRangeInputElement.value) - this.min) / (this.max - this.min)) * 100 + '%';
|
|
61
|
-
}
|
|
62
|
-
this.progressDivElement.style.left = leftPercent;
|
|
63
|
-
this.progressDivElement.style.right = rightPercent;
|
|
43
|
+
this.calculateMaxValue = (value, minValue) => Math.max(value[1], minValue + this.gap);
|
|
44
|
+
this.setState = (newValue) => {
|
|
45
|
+
const isRangeType = this.isRangeType;
|
|
46
|
+
const value = this.stringToObject(newValue);
|
|
47
|
+
this.minValue = isRangeType ? this.calculateMinValue(value) : value;
|
|
48
|
+
this.maxValue = isRangeType ? this.calculateMaxValue(value, this.minValue) : this.minValue;
|
|
64
49
|
};
|
|
65
|
-
this.
|
|
66
|
-
if (!
|
|
50
|
+
this.setThumbPosition = () => {
|
|
51
|
+
if (!this.enableTooltip)
|
|
67
52
|
return;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
if (this.isSingleSlider) {
|
|
73
|
-
this.value = this.value[0];
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
if (this.value.length === 1) {
|
|
77
|
-
this.value[1] = this.value[0];
|
|
78
|
-
}
|
|
79
|
-
if (this.value.length > 1) {
|
|
80
|
-
this.value[0] = Math.min(this.value[0], this.value[1]);
|
|
81
|
-
this.value[1] = Math.max(this.value[0], this.value[1]);
|
|
82
|
-
}
|
|
53
|
+
// Destructure the returned object from this.thumbPosition() and assign the properties to this.minThumbPosition and this.maxThumbPosition
|
|
54
|
+
({ minThumbPosition: this.minThumbPosition, maxThumbPosition: this.maxThumbPosition } = this.thumbPosition());
|
|
83
55
|
};
|
|
84
|
-
this.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (
|
|
94
|
-
this.
|
|
56
|
+
this.syncInputsValue = () => {
|
|
57
|
+
var _a, _b;
|
|
58
|
+
(_a = this.inputMinElem) === null || _a === void 0 ? void 0 : _a.setAttribute('value', this.minValue.toString());
|
|
59
|
+
(_b = this.inputMaxElem) === null || _b === void 0 ? void 0 : _b.setAttribute('value', this.maxValue.toString());
|
|
60
|
+
};
|
|
61
|
+
this.stringToObject = (value) => (isString(value) ? JSON.parse(value) : value);
|
|
62
|
+
this.handleInputChange = (type, event) => {
|
|
63
|
+
const target = event.target;
|
|
64
|
+
const value = parseFloat(target.value);
|
|
65
|
+
if (type === 'min') {
|
|
66
|
+
this.minValue = this.isRangeType ? Math.min(value, this.maxValue - this.gap) : value;
|
|
95
67
|
}
|
|
96
|
-
if (
|
|
97
|
-
this.
|
|
68
|
+
else if (type === 'max') {
|
|
69
|
+
this.maxValue = this.isRangeType ? Math.max(value, this.minValue + this.gap) : value;
|
|
98
70
|
}
|
|
99
|
-
|
|
71
|
+
// Update the input value to reflect the clamped value
|
|
72
|
+
const reflectedValue = (type === 'min' ? this.minValue : this.maxValue).toString();
|
|
73
|
+
target.value = reflectedValue;
|
|
74
|
+
target.setAttribute('value', reflectedValue);
|
|
75
|
+
this.emitBqChange();
|
|
76
|
+
};
|
|
77
|
+
this.calculatePercent = (value) => {
|
|
78
|
+
const totalRange = Number(this.max) - Number(this.min);
|
|
79
|
+
return (value / totalRange) * 100;
|
|
100
80
|
};
|
|
101
|
-
this.
|
|
102
|
-
if (!
|
|
81
|
+
this.updateProgressTrack = () => {
|
|
82
|
+
if (!this.progressElem)
|
|
103
83
|
return;
|
|
104
|
-
|
|
105
|
-
|
|
84
|
+
// For range type, left starts from the `min` value and width is the difference between `max` and `min`.
|
|
85
|
+
// For non-range type, left starts from 0 and width is the `min` value.
|
|
86
|
+
const left = this.isRangeType ? this.calculatePercent(this.minValue) : 0;
|
|
87
|
+
const width = this.isRangeType
|
|
88
|
+
? this.calculatePercent(Number(this.maxValue) - Number(this.minValue))
|
|
89
|
+
: this.calculatePercent(this.minValue);
|
|
90
|
+
this.progressElem.style.left = `${left}%`;
|
|
91
|
+
this.progressElem.style.width = `${width}%`;
|
|
106
92
|
};
|
|
107
|
-
this.
|
|
108
|
-
if (!this.
|
|
109
|
-
return
|
|
110
|
-
|
|
93
|
+
this.calculateThumbPosition = (value) => {
|
|
94
|
+
if (!this.progressElem)
|
|
95
|
+
return;
|
|
96
|
+
// Get the width of the track area and the size of the input range thumb
|
|
97
|
+
const trackAreaWidth = this.trackElem.getBoundingClientRect().width;
|
|
98
|
+
// We need to also add 4px to the thumb size,
|
|
99
|
+
// this is because the thumb is 2px border (`border-2`)
|
|
100
|
+
const inputThumbSize = parseInt(getComputedStyle(this.el).getPropertyValue('--bq-slider--thumb-size'), 10) + 4;
|
|
101
|
+
const totalWidth = trackAreaWidth - inputThumbSize;
|
|
102
|
+
return ((value - this.min) / (this.max - this.min)) * totalWidth + inputThumbSize / 2;
|
|
111
103
|
};
|
|
112
|
-
this.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return
|
|
104
|
+
this.thumbPosition = () => {
|
|
105
|
+
const minThumbPosition = this.calculateThumbPosition(this.minValue);
|
|
106
|
+
const maxThumbPosition = this.isRangeType ? this.calculateThumbPosition(this.maxValue) : undefined;
|
|
107
|
+
return { minThumbPosition, maxThumbPosition };
|
|
116
108
|
};
|
|
117
|
-
this.
|
|
109
|
+
this.emitBqChange = () => {
|
|
110
|
+
var _a;
|
|
111
|
+
(_a = this.debounceBqChange) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
112
|
+
const value = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;
|
|
113
|
+
this.debounceBqChange = debounce(() => this.bqChange.emit({ value, el: this.el }), this.debounceTime);
|
|
114
|
+
this.debounceBqChange();
|
|
115
|
+
};
|
|
116
|
+
this.handleBlur = () => {
|
|
118
117
|
this.bqBlur.emit(this.el);
|
|
119
118
|
};
|
|
120
|
-
this.
|
|
119
|
+
this.handleFocus = () => {
|
|
121
120
|
this.bqFocus.emit(this.el);
|
|
122
121
|
};
|
|
123
|
-
this.
|
|
124
|
-
|
|
125
|
-
(_a = this.bqChangeDebounced) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
126
|
-
this.bqChangeDebounced = debounce(() => this.bqChange.emit({ value: this.value, el: this.el }), this.debounceTime);
|
|
127
|
-
this.bqChangeDebounced();
|
|
122
|
+
this.handleMouseDown = (event) => {
|
|
123
|
+
this.handleTooltipVisibility(event, 'remove');
|
|
128
124
|
};
|
|
129
|
-
this.
|
|
130
|
-
|
|
131
|
-
|
|
125
|
+
this.handleMouseUp = (event) => {
|
|
126
|
+
this.handleTooltipVisibility(event, 'add');
|
|
127
|
+
};
|
|
128
|
+
this.handleTooltipVisibility = (event, action) => {
|
|
129
|
+
if (!this.enableTooltip || this.tooltipAlwaysVisible)
|
|
130
|
+
return;
|
|
131
|
+
const target = event.target;
|
|
132
|
+
const tooltipElem = target === this.inputMinElem ? this.minTooltipElem : this.maxTooltipElem;
|
|
133
|
+
tooltipElem.classList[action]('hidden');
|
|
134
|
+
};
|
|
135
|
+
this.renderLabel = (value, position, css) => {
|
|
136
|
+
return (h("span", { class: {
|
|
137
|
+
[`${css} box-content block w-fit min-w-8 text-s font-medium leading-regular text-text-primary [font-variant:tabular-nums]`]: true,
|
|
138
|
+
hidden: position === 'start' ? !this.enableValueIndicator : !this.enableValueIndicator || !this.isRangeType,
|
|
139
|
+
}, part: `label-${position}` }, value.toFixed(this.decimalCount)));
|
|
140
|
+
};
|
|
141
|
+
this.renderInput = (type, value, refCallback) => {
|
|
142
|
+
return (h("input", { type: "range", class: {
|
|
143
|
+
'absolute top-1/2 w-full -translate-y-1/2 cursor-pointer appearance-none bg-transparent outline-none disabled:cursor-not-allowed': true,
|
|
144
|
+
'pointer-events-none': this.isRangeType,
|
|
145
|
+
}, disabled: this.disabled, min: this.min, max: this.max, step: this.step, ref: refCallback, onInput: (ev) => this.handleInputChange(type, ev), onBlur: this.handleBlur, onFocus: this.handleFocus, onMouseDown: this.handleMouseDown, onMouseUp: this.handleMouseUp, value: value, part: `input-${type}` }));
|
|
146
|
+
};
|
|
147
|
+
this.renderTooltip = (value, thumbPosition, refCallback) => (h("bq-tooltip", { class: {
|
|
148
|
+
'absolute [&::part(panel)]:absolute': true,
|
|
149
|
+
hidden: !this.isTooltipAlwaysVisible,
|
|
150
|
+
}, exportparts: "base,trigger,panel", alwaysVisible: true, distance: this.enableValueIndicator ? 6 : 16, style: { left: `${thumbPosition}px`, fontVariant: 'tabular-nums' }, ref: refCallback }, h("div", { class: "absolute size-1", slot: "trigger" }), value.toFixed(this.decimalCount)));
|
|
151
|
+
this.minValue = undefined;
|
|
152
|
+
this.maxValue = undefined;
|
|
153
|
+
this.minThumbPosition = undefined;
|
|
154
|
+
this.maxThumbPosition = undefined;
|
|
132
155
|
this.debounceTime = 0;
|
|
156
|
+
this.disabled = false;
|
|
157
|
+
this.enableValueIndicator = false;
|
|
133
158
|
this.gap = 0;
|
|
159
|
+
this.max = 100;
|
|
134
160
|
this.min = 0;
|
|
135
|
-
this.max = 0;
|
|
136
161
|
this.step = 1;
|
|
137
162
|
this.type = 'single';
|
|
138
|
-
this.valueIndicator = false;
|
|
139
163
|
this.value = undefined;
|
|
164
|
+
this.enableTooltip = false;
|
|
165
|
+
this.tooltipAlwaysVisible = false;
|
|
140
166
|
}
|
|
141
167
|
// Prop lifecycle events
|
|
142
168
|
// =======================
|
|
143
|
-
|
|
144
|
-
|
|
169
|
+
handleValuePropChange(newValue) {
|
|
170
|
+
this.setState(newValue);
|
|
171
|
+
this.emitBqChange();
|
|
145
172
|
}
|
|
146
|
-
|
|
147
|
-
this.
|
|
173
|
+
handleStepPropChange() {
|
|
174
|
+
this.minValue = Math.round(this.minValue / this.step) * this.step;
|
|
175
|
+
this.maxValue = Math.round(this.maxValue / this.step) * this.step;
|
|
176
|
+
}
|
|
177
|
+
handleGapChange(newValue) {
|
|
178
|
+
if (!this.isRangeType)
|
|
179
|
+
return;
|
|
180
|
+
// Use the this.value prop value when the component is initialized
|
|
181
|
+
// Otherwise, use the current this.min and this.max state values
|
|
182
|
+
const value = !isNil(this.min) && !isNil(this.max) ? [this.min, this.max] : this.stringToObject(this.value);
|
|
183
|
+
// If the gap is less than the min or greater than the max, set it to 0
|
|
184
|
+
this.gap = newValue < value[0] || newValue > value[1] ? 0 : newValue;
|
|
148
185
|
}
|
|
149
186
|
// Component lifecycle events
|
|
150
187
|
// Ordered by their natural call order
|
|
151
188
|
// =====================================
|
|
152
|
-
|
|
153
|
-
this.
|
|
189
|
+
connectedCallback() {
|
|
190
|
+
this.handleGapChange(this.gap);
|
|
191
|
+
this.setState(this.value);
|
|
192
|
+
this.handleStepPropChange();
|
|
154
193
|
}
|
|
155
194
|
componentDidLoad() {
|
|
156
|
-
this.
|
|
157
|
-
this.updateProgressSize();
|
|
195
|
+
this.runUpdates();
|
|
158
196
|
}
|
|
159
197
|
componentDidUpdate() {
|
|
160
|
-
this.
|
|
161
|
-
|
|
198
|
+
this.runUpdates();
|
|
199
|
+
}
|
|
200
|
+
get decimalCount() {
|
|
201
|
+
// Return the length of the decimal part of the step value.
|
|
202
|
+
return (this.step % 1).toFixed(10).split('.')[1].replace(/0+$/, '').length;
|
|
162
203
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
// Public methods API
|
|
166
|
-
// These methods are exposed on the host element.
|
|
167
|
-
// Always use two lines.
|
|
168
|
-
// Public Methods must be async.
|
|
169
|
-
// Requires JSDocs for public API documentation.
|
|
170
|
-
// ===============================================
|
|
171
|
-
// Local methods
|
|
172
|
-
// Internal business logic.
|
|
173
|
-
// These methods cannot be called from the host element.
|
|
174
|
-
// =======================================================
|
|
175
|
-
get isSingleSlider() {
|
|
176
|
-
return this.type === 'single';
|
|
204
|
+
get isRangeType() {
|
|
205
|
+
return this.type === 'range';
|
|
177
206
|
}
|
|
178
|
-
get
|
|
179
|
-
|
|
180
|
-
return this.step.toString().split('.')[1].length;
|
|
181
|
-
return 0;
|
|
207
|
+
get isTooltipAlwaysVisible() {
|
|
208
|
+
return this.tooltipAlwaysVisible && this.enableTooltip;
|
|
182
209
|
}
|
|
183
210
|
// render() function
|
|
184
211
|
// Always the last one in the class.
|
|
185
212
|
// ===================================
|
|
186
213
|
render() {
|
|
187
|
-
return (h("div", { key: '
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
'is-hidden': !this.valueIndicator,
|
|
192
|
-
'bq-slider__label mr-m': true,
|
|
193
|
-
} }, this.minRangeValue.toFixed(this.stepDecimalNumber))), h("div", { key: 'a14fc23c39517f3ea4bd0ddda11a63fed50e655c', class: "bq-slider__container" }, h("input", { key: '252acb6cb04eb40dbd2d770886e876a9e727d313', class: "bq-slider__input", type: "range", min: this.min, max: this.max, step: this.step, value: String(this.getMinRangeValue()), disabled: this.disabled, ref: (input) => (this.minRangeInputElement = input), onInput: this.handleMinRangeInput, onBlur: this.handleRangeInputBlur, onFocus: this.handleRangeInputFocus, "aria-label": "Min Range" }), !this.isSingleSlider && (h("input", { class: "bq-slider__input", type: "range", min: this.min, max: this.max, step: this.step, value: String(this.getMaxRangeValue()), disabled: this.disabled, ref: (input) => (this.maxRangeInputElement = input), onInput: this.handleMaxRangeInput, onBlur: this.handleRangeInputBlur, onFocus: this.handleRangeInputFocus, "aria-label": "Max Range" })), h("div", { key: '86f03de469ba7beb3cb0dda22cf27393bddae6f5', class: "progress", ref: (div) => (this.progressDivElement = div) })), !this.isSingleSlider && (h("span", { class: {
|
|
194
|
-
'is-hidden': !this.valueIndicator,
|
|
195
|
-
'bq-slider__label ml-m': true,
|
|
196
|
-
} }, this.maxRangeValue.toFixed(this.stepDecimalNumber))), this.isSingleSlider && (h("span", { class: {
|
|
197
|
-
'is-hidden': !this.valueIndicator,
|
|
198
|
-
'bq-slider__label ml-m': true,
|
|
199
|
-
} }, this.minRangeValue.toFixed(this.stepDecimalNumber)))));
|
|
214
|
+
return (h("div", { key: '9408f87c933fc29816396213661129f38da4d109', "aria-disabled": this.disabled ? 'true' : 'false', class: { 'flex w-full': true, 'cursor-not-allowed opacity-60': this.disabled }, part: "base" }, this.renderLabel(this.minValue, 'start', 'me-xs text-end'), h("div", { key: '2d85ff90ea6377d45ad4c7780eeefccf42a15cc3', class: "relative w-full", part: "container" }, h("span", { key: '5ef5178ec7673a75676f247faf5da969947d6af9', class: "absolute top-1/2 h-1 w-full -translate-y-1/2 rounded-xs bg-[--bq-slider--trackarea-color]", ref: (elem) => (this.trackElem = elem), part: "track-area" }), h("span", { key: '09cfc93bdace0a8e33a749d97f9a1770c2ac1d35', class: "absolute top-1/2 h-1 w-1/2 -translate-y-1/2 rounded-xs bg-[--bq-slider--progress-color]", ref: (elem) => (this.progressElem = elem), part: "progress-area" }), this.enableTooltip &&
|
|
215
|
+
this.renderTooltip(this.minValue, this.minThumbPosition, (elem) => (this.minTooltipElem = elem)), this.renderInput('min', this.minValue, (input) => (this.inputMinElem = input)), this.enableTooltip &&
|
|
216
|
+
this.isRangeType &&
|
|
217
|
+
this.renderTooltip(this.maxValue, this.maxThumbPosition, (elem) => (this.maxTooltipElem = elem)), this.isRangeType && this.renderInput('max', this.maxValue, (input) => (this.inputMaxElem = input))), this.renderLabel(this.maxValue, 'end', 'ms-xs text-start')));
|
|
200
218
|
}
|
|
201
219
|
static get is() { return "bq-slider"; }
|
|
202
220
|
static get encapsulation() { return "shadow"; }
|
|
221
|
+
static get delegatesFocus() { return true; }
|
|
203
222
|
static get originalStyleUrls() {
|
|
204
223
|
return {
|
|
205
224
|
"$": ["./scss/bq-slider.scss"]
|
|
@@ -212,6 +231,24 @@ export class BqSlider {
|
|
|
212
231
|
}
|
|
213
232
|
static get properties() {
|
|
214
233
|
return {
|
|
234
|
+
"debounceTime": {
|
|
235
|
+
"type": "number",
|
|
236
|
+
"mutable": false,
|
|
237
|
+
"complexType": {
|
|
238
|
+
"original": "number",
|
|
239
|
+
"resolved": "number",
|
|
240
|
+
"references": {}
|
|
241
|
+
},
|
|
242
|
+
"required": false,
|
|
243
|
+
"optional": false,
|
|
244
|
+
"docs": {
|
|
245
|
+
"tags": [],
|
|
246
|
+
"text": "The amount of time, in milliseconds, to wait to trigger the `bqChange` event after each value change."
|
|
247
|
+
},
|
|
248
|
+
"attribute": "debounce-time",
|
|
249
|
+
"reflect": true,
|
|
250
|
+
"defaultValue": "0"
|
|
251
|
+
},
|
|
215
252
|
"disabled": {
|
|
216
253
|
"type": "boolean",
|
|
217
254
|
"mutable": false,
|
|
@@ -224,33 +261,33 @@ export class BqSlider {
|
|
|
224
261
|
"optional": true,
|
|
225
262
|
"docs": {
|
|
226
263
|
"tags": [],
|
|
227
|
-
"text": "If `true` slider is disabled"
|
|
264
|
+
"text": "If `true` the slider is disabled."
|
|
228
265
|
},
|
|
229
266
|
"attribute": "disabled",
|
|
230
267
|
"reflect": true,
|
|
231
268
|
"defaultValue": "false"
|
|
232
269
|
},
|
|
233
|
-
"
|
|
234
|
-
"type": "
|
|
270
|
+
"enableValueIndicator": {
|
|
271
|
+
"type": "boolean",
|
|
235
272
|
"mutable": false,
|
|
236
273
|
"complexType": {
|
|
237
|
-
"original": "
|
|
238
|
-
"resolved": "
|
|
274
|
+
"original": "boolean",
|
|
275
|
+
"resolved": "boolean",
|
|
239
276
|
"references": {}
|
|
240
277
|
},
|
|
241
278
|
"required": false,
|
|
242
|
-
"optional":
|
|
279
|
+
"optional": true,
|
|
243
280
|
"docs": {
|
|
244
281
|
"tags": [],
|
|
245
|
-
"text": "
|
|
282
|
+
"text": "If `true` it will show the value label on a side of the slider track area"
|
|
246
283
|
},
|
|
247
|
-
"attribute": "
|
|
284
|
+
"attribute": "enable-value-indicator",
|
|
248
285
|
"reflect": true,
|
|
249
|
-
"defaultValue": "
|
|
286
|
+
"defaultValue": "false"
|
|
250
287
|
},
|
|
251
288
|
"gap": {
|
|
252
289
|
"type": "number",
|
|
253
|
-
"mutable":
|
|
290
|
+
"mutable": true,
|
|
254
291
|
"complexType": {
|
|
255
292
|
"original": "number",
|
|
256
293
|
"resolved": "number",
|
|
@@ -260,13 +297,13 @@ export class BqSlider {
|
|
|
260
297
|
"optional": false,
|
|
261
298
|
"docs": {
|
|
262
299
|
"tags": [],
|
|
263
|
-
"text": "A number representing the
|
|
300
|
+
"text": "A number representing the amount to remain between the minimum and maximum values (only for range type)."
|
|
264
301
|
},
|
|
265
302
|
"attribute": "gap",
|
|
266
303
|
"reflect": true,
|
|
267
304
|
"defaultValue": "0"
|
|
268
305
|
},
|
|
269
|
-
"
|
|
306
|
+
"max": {
|
|
270
307
|
"type": "number",
|
|
271
308
|
"mutable": false,
|
|
272
309
|
"complexType": {
|
|
@@ -278,13 +315,13 @@ export class BqSlider {
|
|
|
278
315
|
"optional": false,
|
|
279
316
|
"docs": {
|
|
280
317
|
"tags": [],
|
|
281
|
-
"text": "A number representing the
|
|
318
|
+
"text": "A number representing the max value of the slider."
|
|
282
319
|
},
|
|
283
|
-
"attribute": "
|
|
320
|
+
"attribute": "max",
|
|
284
321
|
"reflect": true,
|
|
285
|
-
"defaultValue": "
|
|
322
|
+
"defaultValue": "100"
|
|
286
323
|
},
|
|
287
|
-
"
|
|
324
|
+
"min": {
|
|
288
325
|
"type": "number",
|
|
289
326
|
"mutable": false,
|
|
290
327
|
"complexType": {
|
|
@@ -296,9 +333,9 @@ export class BqSlider {
|
|
|
296
333
|
"optional": false,
|
|
297
334
|
"docs": {
|
|
298
335
|
"tags": [],
|
|
299
|
-
"text": "A number representing the
|
|
336
|
+
"text": "A number representing the min value of the slider."
|
|
300
337
|
},
|
|
301
|
-
"attribute": "
|
|
338
|
+
"attribute": "min",
|
|
302
339
|
"reflect": true,
|
|
303
340
|
"defaultValue": "0"
|
|
304
341
|
},
|
|
@@ -314,7 +351,7 @@ export class BqSlider {
|
|
|
314
351
|
"optional": false,
|
|
315
352
|
"docs": {
|
|
316
353
|
"tags": [],
|
|
317
|
-
"text": "A number representing the step of the slider
|
|
354
|
+
"text": "A number representing the step of the slider.\n\u26A0\uFE0F Please notice that the value (or list of values if the slider type is `range`) will be rounded to the nearest multiple of `step`."
|
|
318
355
|
},
|
|
319
356
|
"attribute": "step",
|
|
320
357
|
"reflect": true,
|
|
@@ -344,7 +381,30 @@ export class BqSlider {
|
|
|
344
381
|
"reflect": true,
|
|
345
382
|
"defaultValue": "'single'"
|
|
346
383
|
},
|
|
347
|
-
"
|
|
384
|
+
"value": {
|
|
385
|
+
"type": "any",
|
|
386
|
+
"mutable": true,
|
|
387
|
+
"complexType": {
|
|
388
|
+
"original": "TSliderValue",
|
|
389
|
+
"resolved": "[number, number] | number | string",
|
|
390
|
+
"references": {
|
|
391
|
+
"TSliderValue": {
|
|
392
|
+
"location": "import",
|
|
393
|
+
"path": "./bq-slider.types",
|
|
394
|
+
"id": "../../packages/beeq/src/components/slider/bq-slider.types.ts::TSliderValue"
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"required": false,
|
|
399
|
+
"optional": false,
|
|
400
|
+
"docs": {
|
|
401
|
+
"tags": [],
|
|
402
|
+
"text": "The value of the slider.\n- If the slider type is `single`, the value is a number.\n- If the slider type is `range`, the value is an array of two numbers (the first number represents the `min` value and the second number represents the `max` value)."
|
|
403
|
+
},
|
|
404
|
+
"attribute": "value",
|
|
405
|
+
"reflect": true
|
|
406
|
+
},
|
|
407
|
+
"enableTooltip": {
|
|
348
408
|
"type": "boolean",
|
|
349
409
|
"mutable": false,
|
|
350
410
|
"complexType": {
|
|
@@ -353,43 +413,41 @@ export class BqSlider {
|
|
|
353
413
|
"references": {}
|
|
354
414
|
},
|
|
355
415
|
"required": false,
|
|
356
|
-
"optional":
|
|
416
|
+
"optional": false,
|
|
357
417
|
"docs": {
|
|
358
418
|
"tags": [],
|
|
359
|
-
"text": "If `true
|
|
419
|
+
"text": "If `true`, a tooltip will be shown displaying the progress value"
|
|
360
420
|
},
|
|
361
|
-
"attribute": "
|
|
421
|
+
"attribute": "enable-tooltip",
|
|
362
422
|
"reflect": true,
|
|
363
423
|
"defaultValue": "false"
|
|
364
424
|
},
|
|
365
|
-
"
|
|
366
|
-
"type": "
|
|
367
|
-
"mutable":
|
|
425
|
+
"tooltipAlwaysVisible": {
|
|
426
|
+
"type": "boolean",
|
|
427
|
+
"mutable": false,
|
|
368
428
|
"complexType": {
|
|
369
|
-
"original": "
|
|
370
|
-
"resolved": "
|
|
371
|
-
"references": {
|
|
372
|
-
"Array": {
|
|
373
|
-
"location": "global",
|
|
374
|
-
"id": "global::Array"
|
|
375
|
-
}
|
|
376
|
-
}
|
|
429
|
+
"original": "boolean",
|
|
430
|
+
"resolved": "boolean",
|
|
431
|
+
"references": {}
|
|
377
432
|
},
|
|
378
433
|
"required": false,
|
|
379
434
|
"optional": false,
|
|
380
435
|
"docs": {
|
|
381
436
|
"tags": [],
|
|
382
|
-
"text": "
|
|
437
|
+
"text": "If `true`, a tooltip will always display the progress value.\nIt relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true."
|
|
383
438
|
},
|
|
384
|
-
"attribute": "
|
|
385
|
-
"reflect": true
|
|
439
|
+
"attribute": "tooltip-always-visible",
|
|
440
|
+
"reflect": true,
|
|
441
|
+
"defaultValue": "false"
|
|
386
442
|
}
|
|
387
443
|
};
|
|
388
444
|
}
|
|
389
445
|
static get states() {
|
|
390
446
|
return {
|
|
391
|
-
"
|
|
392
|
-
"
|
|
447
|
+
"minValue": {},
|
|
448
|
+
"maxValue": {},
|
|
449
|
+
"minThumbPosition": {},
|
|
450
|
+
"maxThumbPosition": {}
|
|
393
451
|
};
|
|
394
452
|
}
|
|
395
453
|
static get events() {
|
|
@@ -404,12 +462,17 @@ export class BqSlider {
|
|
|
404
462
|
"text": "Handler to be called when change the value on range inputs"
|
|
405
463
|
},
|
|
406
464
|
"complexType": {
|
|
407
|
-
"original": "{ value:
|
|
408
|
-
"resolved": "{ value:
|
|
465
|
+
"original": "{ value: Exclude<TSliderValue, string>; el: HTMLBqSliderElement }",
|
|
466
|
+
"resolved": "{ value: number | [number, number]; el: HTMLBqSliderElement; }",
|
|
409
467
|
"references": {
|
|
410
|
-
"
|
|
468
|
+
"Exclude": {
|
|
411
469
|
"location": "global",
|
|
412
|
-
"id": "global::
|
|
470
|
+
"id": "global::Exclude"
|
|
471
|
+
},
|
|
472
|
+
"TSliderValue": {
|
|
473
|
+
"location": "import",
|
|
474
|
+
"path": "./bq-slider.types",
|
|
475
|
+
"id": "../../packages/beeq/src/components/slider/bq-slider.types.ts::TSliderValue"
|
|
413
476
|
},
|
|
414
477
|
"HTMLBqSliderElement": {
|
|
415
478
|
"location": "global",
|
|
@@ -462,11 +525,14 @@ export class BqSlider {
|
|
|
462
525
|
static get elementRef() { return "el"; }
|
|
463
526
|
static get watchers() {
|
|
464
527
|
return [{
|
|
465
|
-
"propName": "type",
|
|
466
|
-
"methodName": "handleTypePropChange"
|
|
467
|
-
}, {
|
|
468
528
|
"propName": "value",
|
|
469
529
|
"methodName": "handleValuePropChange"
|
|
530
|
+
}, {
|
|
531
|
+
"propName": "step",
|
|
532
|
+
"methodName": "handleStepPropChange"
|
|
533
|
+
}, {
|
|
534
|
+
"propName": "gap",
|
|
535
|
+
"methodName": "handleGapChange"
|
|
470
536
|
}];
|
|
471
537
|
}
|
|
472
538
|
}
|