@beeq/core 1.11.2 → 1.12.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.esm.js +1 -1
- package/dist/beeq/beeq.esm.js.map +1 -1
- package/dist/beeq/index.esm.js +1 -1
- package/dist/beeq/p-039f7907.entry.js +6 -0
- package/dist/beeq/p-039f7907.entry.js.map +1 -0
- package/dist/beeq/{p-eb47c1ae.entry.js → p-043a472a.entry.js} +2 -2
- package/dist/beeq/p-043a472a.entry.js.map +1 -0
- package/dist/beeq/p-1b988f57.entry.js +6 -0
- package/dist/beeq/p-1b988f57.entry.js.map +1 -0
- package/dist/beeq/p-20de0359.entry.js +6 -0
- package/dist/beeq/p-20de0359.entry.js.map +1 -0
- package/dist/beeq/p-22e2de76.entry.js +6 -0
- package/dist/beeq/p-22e2de76.entry.js.map +1 -0
- package/dist/beeq/p-258e890f.entry.js +6 -0
- package/dist/beeq/p-258e890f.entry.js.map +1 -0
- package/dist/beeq/p-28c6cdbc.entry.js +6 -0
- package/dist/beeq/p-28c6cdbc.entry.js.map +1 -0
- package/dist/beeq/p-3c491238.entry.js +6 -0
- package/dist/beeq/p-3c491238.entry.js.map +1 -0
- package/dist/beeq/{p-cd53041f.entry.js → p-47404d61.entry.js} +2 -2
- package/dist/beeq/p-47404d61.entry.js.map +1 -0
- package/dist/beeq/p-50cbee50.entry.js +6 -0
- package/dist/beeq/p-50cbee50.entry.js.map +1 -0
- package/dist/beeq/{p-b88b2573.entry.js → p-52334e53.entry.js} +2 -2
- package/dist/{cjs/bq-tab.entry.cjs.js.map → beeq/p-52334e53.entry.js.map} +1 -1
- package/dist/beeq/p-552d3e73.entry.js +6 -0
- package/dist/beeq/p-552d3e73.entry.js.map +1 -0
- package/dist/{components/p-CXUO6Zub.js → beeq/p-55b686b4.entry.js} +2 -2
- package/dist/beeq/p-55b686b4.entry.js.map +1 -0
- package/dist/beeq/p-59cb331c.entry.js +6 -0
- package/dist/beeq/p-59cb331c.entry.js.map +1 -0
- package/dist/beeq/p-5e186220.entry.js +6 -0
- package/dist/beeq/p-5e186220.entry.js.map +1 -0
- package/dist/beeq/p-63f1dcd2.entry.js +6 -0
- package/dist/beeq/p-63f1dcd2.entry.js.map +1 -0
- package/dist/beeq/{p-662578a2.entry.js → p-6cac6da2.entry.js} +2 -2
- package/dist/beeq/p-6cac6da2.entry.js.map +1 -0
- package/dist/beeq/p-76d65605.entry.js +6 -0
- package/dist/beeq/p-76d65605.entry.js.map +1 -0
- package/dist/beeq/p-8379d440.entry.js +6 -0
- package/dist/beeq/p-8379d440.entry.js.map +1 -0
- package/dist/{components/p-B5XEhmuc.js → beeq/p-8a5e127b.entry.js} +2 -2
- package/dist/beeq/p-8a5e127b.entry.js.map +1 -0
- package/dist/beeq/{p-84e62655.entry.js → p-8cd20d85.entry.js} +2 -2
- package/dist/beeq/p-8cd20d85.entry.js.map +1 -0
- package/dist/beeq/{p-cb0639d5.entry.js → p-8e9d8445.entry.js} +2 -2
- package/dist/beeq/p-8e9d8445.entry.js.map +1 -0
- package/dist/{components/p-DHdYy1q5.js → beeq/p-8fd716b1.entry.js} +2 -2
- package/dist/beeq/p-8fd716b1.entry.js.map +1 -0
- package/dist/beeq/p-904e521c.entry.js +6 -0
- package/dist/beeq/p-904e521c.entry.js.map +1 -0
- package/dist/beeq/p-90b0fef1.entry.js +6 -0
- package/dist/beeq/p-90b0fef1.entry.js.map +1 -0
- package/dist/beeq/p-96a79f9b.entry.js +6 -0
- package/dist/beeq/p-96a79f9b.entry.js.map +1 -0
- package/dist/beeq/p-BIw6Ac7W.js +7 -0
- package/dist/beeq/p-BIw6Ac7W.js.map +1 -0
- package/dist/beeq/p-BRMw_HGf.js +6 -0
- package/dist/beeq/p-BRMw_HGf.js.map +1 -0
- package/dist/beeq/p-C33fRBEf.js +6 -0
- package/dist/beeq/p-C33fRBEf.js.map +1 -0
- package/dist/beeq/p-CpKQ7XUL.js +6 -0
- package/dist/beeq/p-CpKQ7XUL.js.map +1 -0
- package/dist/beeq/p-D1A0LpG_.js +6 -0
- package/dist/beeq/{p-BxgDLPzX.js.map → p-D1A0LpG_.js.map} +1 -1
- package/dist/beeq/p-a09d8901.entry.js +6 -0
- package/dist/beeq/p-a09d8901.entry.js.map +1 -0
- package/dist/beeq/p-a7a74198.entry.js +6 -0
- package/dist/beeq/p-a7a74198.entry.js.map +1 -0
- package/dist/beeq/p-a9cc76af.entry.js +6 -0
- package/dist/beeq/p-a9cc76af.entry.js.map +1 -0
- package/dist/beeq/p-b4a612db.entry.js +6 -0
- package/dist/beeq/p-b4a612db.entry.js.map +1 -0
- package/dist/beeq/{p-dc5aa386.entry.js → p-b7de07f5.entry.js} +2 -2
- package/dist/beeq/p-b7de07f5.entry.js.map +1 -0
- package/dist/beeq/p-be1b3e87.entry.js +6 -0
- package/dist/beeq/p-be1b3e87.entry.js.map +1 -0
- package/dist/beeq/p-c414e7c0.entry.js +6 -0
- package/dist/beeq/p-c414e7c0.entry.js.map +1 -0
- package/dist/beeq/p-d4ffd9f1.entry.js +6 -0
- package/dist/beeq/p-d4ffd9f1.entry.js.map +1 -0
- package/dist/{components/p-16lKXCDk.js → beeq/p-dfd80d40.entry.js} +2 -2
- package/dist/beeq/p-dfd80d40.entry.js.map +1 -0
- package/dist/beeq/{p-0bf5e367.entry.js → p-e394c440.entry.js} +2 -2
- package/dist/beeq/p-e394c440.entry.js.map +1 -0
- package/dist/beeq/p-e39e3d9c.entry.js +6 -0
- package/dist/beeq/{bq-switch.entry.esm.js.map → p-e39e3d9c.entry.js.map} +1 -1
- package/dist/beeq/p-ecef6efa.entry.js +6 -0
- package/dist/beeq/p-ecef6efa.entry.js.map +1 -0
- package/dist/beeq/p-f477b7ac.entry.js +6 -0
- package/dist/beeq/p-f477b7ac.entry.js.map +1 -0
- package/dist/beeq.html-custom-data.json +103 -48
- package/dist/cjs/beeq.cjs.js +5 -3
- package/dist/cjs/beeq.cjs.js.map +1 -1
- package/dist/cjs/bq-accordion-group.cjs.entry.js +20 -9
- package/dist/cjs/bq-accordion-group.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-accordion.cjs.entry.js +31 -20
- package/dist/cjs/bq-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-alert.cjs.entry.js +31 -20
- package/dist/cjs/bq-alert.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-avatar.cjs.entry.js +32 -19
- package/dist/cjs/bq-avatar.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-badge.cjs.entry.js +17 -12
- package/dist/cjs/bq-badge.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +7 -4
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-breadcrumb.cjs.entry.js +11 -8
- package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-button_2.cjs.entry.js +63 -30
- package/dist/cjs/bq-button_2.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-card.cjs.entry.js +15 -10
- package/dist/cjs/bq-card.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-checkbox.cjs.entry.js +16 -9
- package/dist/cjs/bq-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-date-picker.cjs.entry.js +189 -137
- package/dist/cjs/bq-date-picker.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-dialog.cjs.entry.js +29 -20
- package/dist/cjs/bq-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-divider.cjs.entry.js +29 -20
- package/dist/cjs/{bq-divider.entry.cjs.js.map → bq-divider.cjs.entry.js.map} +1 -1
- package/dist/cjs/bq-drawer.cjs.entry.js +33 -24
- package/dist/cjs/bq-drawer.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-dropdown_2.cjs.entry.js +37 -18
- package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-empty-state.cjs.entry.js +34 -29
- package/dist/cjs/bq-empty-state.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-input.cjs.entry.js +31 -26
- package/dist/cjs/bq-input.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-notification.cjs.entry.js +29 -18
- package/dist/cjs/bq-notification.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-option-group.cjs.entry.js +7 -4
- package/dist/cjs/bq-option-group.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-option-list_2.cjs.entry.js +25 -18
- package/dist/cjs/bq-option-list_2.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-option.cjs.entry.js +20 -17
- package/dist/cjs/bq-option.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-page-title.cjs.entry.js +16 -13
- package/dist/cjs/bq-page-title.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-progress.cjs.entry.js +30 -19
- package/dist/cjs/bq-progress.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-radio-group.cjs.entry.js +33 -12
- package/dist/cjs/bq-radio-group.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-radio.cjs.entry.js +14 -11
- package/dist/cjs/bq-radio.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-select.cjs.entry.js +56 -34
- package/dist/cjs/bq-select.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-side-menu-item.cjs.entry.js +11 -8
- package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-side-menu.cjs.entry.js +13 -8
- package/dist/cjs/bq-side-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-slider.cjs.entry.js +38 -29
- package/dist/cjs/bq-slider.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-spinner.cjs.entry.js +25 -16
- package/dist/cjs/bq-spinner.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-status.cjs.entry.js +10 -5
- package/dist/cjs/bq-status.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-step-item.cjs.entry.js +37 -19
- package/dist/cjs/bq-step-item.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-steps.cjs.entry.js +34 -10
- package/dist/cjs/bq-steps.cjs.entry.js.map +1 -0
- package/dist/cjs/{bq-steps.types-D4B3f19X.js → bq-steps.types-BvbHJAPO.js} +4 -2
- package/dist/cjs/bq-steps.types-BvbHJAPO.js.map +1 -0
- package/dist/cjs/bq-switch.cjs.entry.js +18 -13
- package/dist/cjs/bq-switch.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-tab-group.cjs.entry.js +29 -16
- package/dist/cjs/bq-tab-group.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-tab.cjs.entry.js +19 -10
- package/dist/cjs/bq-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-textarea.cjs.entry.js +28 -21
- package/dist/cjs/bq-textarea.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-toast.cjs.entry.js +19 -8
- package/dist/cjs/bq-toast.cjs.entry.js.map +1 -0
- package/dist/cjs/bq-tooltip.cjs.entry.js +28 -15
- package/dist/cjs/bq-tooltip.cjs.entry.js.map +1 -0
- package/dist/{collection/shared/utils/date.js → cjs/form-COLxwVaW.js} +146 -3
- package/dist/cjs/form-COLxwVaW.js.map +1 -0
- package/dist/cjs/index-C09ZVaB4.js +154 -0
- package/dist/cjs/index-C09ZVaB4.js.map +1 -0
- package/dist/cjs/{index-g8MkV15i.js → index-Cnm84YLJ.js} +294 -365
- package/dist/cjs/index-Cnm84YLJ.js.map +1 -0
- package/dist/cjs/index.cjs.js +13 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{isHTMLElement-DMA6t4n4.js → isHTMLElement-CtkOWsTF.js} +3 -3
- package/dist/{esm/isHTMLElement-BxgDLPzX.js.map → cjs/isHTMLElement-CtkOWsTF.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +4 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/accordion/bq-accordion.js +18 -16
- package/dist/collection/components/accordion/bq-accordion.js.map +1 -1
- package/dist/collection/components/accordion-group/bq-accordion-group.js +6 -4
- package/dist/collection/components/accordion-group/bq-accordion-group.js.map +1 -1
- package/dist/collection/components/alert/bq-alert.js +20 -17
- 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 +18 -15
- package/dist/collection/components/avatar/bq-avatar.js.map +1 -1
- package/dist/collection/components/badge/bq-badge.js +12 -10
- package/dist/collection/components/badge/bq-badge.js.map +1 -1
- package/dist/collection/components/breadcrumb/bq-breadcrumb.js +7 -6
- package/dist/collection/components/breadcrumb/bq-breadcrumb.js.map +1 -1
- package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js +2 -2
- package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js.map +1 -1
- package/dist/collection/components/button/bq-button.js +93 -36
- 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 +12 -9
- package/dist/collection/components/card/bq-card.js.map +1 -1
- package/dist/collection/components/checkbox/bq-checkbox.js +5 -5
- package/dist/collection/components/checkbox/bq-checkbox.js.map +1 -1
- package/dist/collection/components/date-picker/bq-date-picker.js +113 -102
- package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
- package/dist/collection/components/date-picker/bq-date-picker.types.js +1 -0
- package/dist/collection/components/date-picker/bq-date-picker.types.js.map +1 -1
- package/dist/collection/components/date-picker/helper/constants.js +23 -0
- package/dist/collection/components/date-picker/helper/constants.js.map +1 -0
- package/dist/collection/components/date-picker/{helper → libs}/callyLibrary.js +57 -38
- package/dist/collection/components/date-picker/libs/callyLibrary.js.map +1 -0
- package/dist/collection/components/date-picker/scss/bq-date-picker.css +1 -1
- package/dist/collection/components/dialog/bq-dialog.js +21 -18
- 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 +22 -18
- package/dist/collection/components/divider/bq-divider.js.map +1 -1
- package/dist/collection/components/divider/scss/bq-divider.css +1 -1
- package/dist/collection/components/drawer/bq-drawer.js +24 -21
- 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 +4 -3
- package/dist/collection/components/dropdown/bq-dropdown.js.map +1 -1
- package/dist/collection/components/empty-state/bq-empty-state.js +28 -27
- package/dist/collection/components/empty-state/bq-empty-state.js.map +1 -1
- package/dist/collection/components/icon/bq-icon.js +5 -3
- package/dist/collection/components/icon/bq-icon.js.map +1 -1
- package/dist/collection/components/input/bq-input.js +28 -25
- 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 +17 -14
- 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 +16 -15
- package/dist/collection/components/option/bq-option.js.map +1 -1
- package/dist/collection/components/option-group/bq-option-group.js +2 -2
- package/dist/collection/components/option-group/bq-option-group.js.map +1 -1
- package/dist/collection/components/option-list/bq-option-list.js +2 -2
- package/dist/collection/components/option-list/bq-option-list.js.map +1 -1
- package/dist/collection/components/page-title/bq-page-title.js +11 -11
- package/dist/collection/components/page-title/bq-page-title.js.map +1 -1
- package/dist/collection/components/panel/bq-panel.js +5 -4
- package/dist/collection/components/panel/bq-panel.js.map +1 -1
- package/dist/collection/components/progress/bq-progress.js +20 -16
- package/dist/collection/components/progress/bq-progress.js.map +1 -1
- package/dist/collection/components/radio/bq-radio.js +10 -9
- package/dist/collection/components/radio/bq-radio.js.map +1 -1
- package/dist/collection/components/radio-group/bq-radio-group.js +5 -3
- package/dist/collection/components/radio-group/bq-radio-group.js.map +1 -1
- package/dist/collection/components/select/bq-select.js +48 -29
- 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 +8 -6
- package/dist/collection/components/side-menu/bq-side-menu.js.map +1 -1
- package/dist/collection/components/side-menu-item/bq-side-menu-item.js +6 -6
- package/dist/collection/components/side-menu-item/bq-side-menu-item.js.map +1 -1
- package/dist/collection/components/slider/bq-slider.js +30 -27
- package/dist/collection/components/slider/bq-slider.js.map +1 -1
- package/dist/collection/components/spinner/bq-spinner.js +14 -12
- package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
- package/dist/collection/components/status/bq-status.js +4 -3
- package/dist/collection/components/status/bq-status.js.map +1 -1
- package/dist/collection/components/step-item/bq-step-item.js +105 -17
- package/dist/collection/components/step-item/bq-step-item.js.map +1 -1
- package/dist/collection/components/step-item/scss/bq-step-item.css +1 -1
- package/dist/collection/components/steps/bq-steps.js +55 -8
- package/dist/collection/components/steps/bq-steps.js.map +1 -1
- package/dist/collection/components/steps/bq-steps.types.js +1 -0
- package/dist/collection/components/steps/bq-steps.types.js.map +1 -1
- package/dist/collection/components/steps/scss/bq-steps.css +1 -1
- package/dist/collection/components/switch/bq-switch.js +15 -12
- package/dist/collection/components/switch/bq-switch.js.map +1 -1
- package/dist/collection/components/tab/bq-tab.js +11 -8
- package/dist/collection/components/tab/bq-tab.js.map +1 -1
- package/dist/collection/components/tab-group/bq-tab-group.js +15 -11
- package/dist/collection/components/tab-group/bq-tab-group.js.map +1 -1
- package/dist/collection/components/tag/bq-tag.js +19 -14
- package/dist/collection/components/tag/bq-tag.js.map +1 -1
- package/dist/collection/components/tag/scss/bq-tag.css +1 -1
- package/dist/collection/components/textarea/bq-textarea.js +22 -19
- package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
- package/dist/collection/components/toast/bq-toast.js +9 -5
- package/dist/collection/components/toast/bq-toast.js.map +1 -1
- package/dist/collection/components/tooltip/bq-tooltip.js +10 -9
- package/dist/collection/components/tooltip/bq-tooltip.js.map +1 -1
- package/dist/collection/shared/utils/date/dateFormatting.js +86 -0
- package/dist/collection/shared/utils/date/dateFormatting.js.map +1 -0
- package/dist/{cjs/date-C-h2CBps.js → collection/shared/utils/date/dateParsing.js} +19 -8
- package/dist/collection/shared/utils/date/dateParsing.js.map +1 -0
- package/dist/collection/shared/utils/date/index.js +7 -0
- package/dist/collection/shared/utils/date/index.js.map +1 -0
- package/dist/collection/shared/utils/form.js +35 -0
- package/dist/collection/shared/utils/form.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/collection/shared/utils/isHTMLElement.js +1 -1
- package/dist/collection/shared/utils/isHTMLElement.js.map +1 -1
- package/dist/components/bq-accordion-group.js +1 -1
- package/dist/components/bq-accordion-group.js.map +1 -1
- package/dist/components/bq-accordion.js +1 -1
- package/dist/components/bq-accordion.js.map +1 -1
- package/dist/components/bq-alert.js +1 -1
- package/dist/components/bq-alert.js.map +1 -1
- package/dist/components/bq-avatar.js +1 -1
- package/dist/components/bq-avatar.js.map +1 -1
- package/dist/components/bq-badge.js +1 -1
- package/dist/components/bq-breadcrumb-item.js +1 -1
- package/dist/components/bq-breadcrumb-item.js.map +1 -1
- package/dist/components/bq-breadcrumb.js +1 -1
- package/dist/components/bq-breadcrumb.js.map +1 -1
- package/dist/components/bq-button.js +1 -1
- package/dist/components/bq-card.js +1 -1
- package/dist/components/bq-card.js.map +1 -1
- package/dist/components/bq-checkbox.js +1 -1
- package/dist/components/bq-checkbox.js.map +1 -1
- package/dist/components/bq-date-picker.js +1 -1
- package/dist/components/bq-date-picker.js.map +1 -1
- package/dist/components/bq-dialog.js +1 -1
- package/dist/components/bq-dialog.js.map +1 -1
- package/dist/components/bq-divider.js +1 -1
- package/dist/components/bq-drawer.js +1 -1
- package/dist/components/bq-drawer.js.map +1 -1
- package/dist/components/bq-dropdown.js +1 -1
- package/dist/components/bq-empty-state.js +1 -1
- package/dist/components/bq-empty-state.js.map +1 -1
- package/dist/components/bq-icon.js +1 -1
- package/dist/components/bq-input.js +1 -1
- package/dist/components/bq-input.js.map +1 -1
- package/dist/components/bq-notification.js +1 -1
- package/dist/components/bq-notification.js.map +1 -1
- package/dist/components/bq-option-group.js +1 -1
- package/dist/components/bq-option-group.js.map +1 -1
- package/dist/components/bq-option-list.js +1 -1
- package/dist/components/bq-option.js +1 -1
- package/dist/components/bq-option.js.map +1 -1
- package/dist/components/bq-page-title.js +1 -1
- package/dist/components/bq-page-title.js.map +1 -1
- package/dist/components/bq-panel.js +1 -1
- package/dist/components/bq-progress.js +1 -1
- package/dist/components/bq-progress.js.map +1 -1
- package/dist/components/bq-radio-group.js +1 -1
- package/dist/components/bq-radio-group.js.map +1 -1
- package/dist/components/bq-radio.js +1 -1
- package/dist/components/bq-radio.js.map +1 -1
- package/dist/components/bq-select.js +1 -1
- 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 +1 -1
- package/dist/components/bq-side-menu.js.map +1 -1
- package/dist/components/bq-slider.js +1 -1
- package/dist/components/bq-slider.js.map +1 -1
- package/dist/components/bq-spinner.js +1 -1
- package/dist/components/bq-spinner.js.map +1 -1
- package/dist/components/bq-status.js +1 -1
- package/dist/components/bq-status.js.map +1 -1
- package/dist/components/bq-step-item.js +1 -1
- package/dist/components/bq-step-item.js.map +1 -1
- package/dist/components/bq-steps.js +1 -1
- package/dist/components/bq-steps.js.map +1 -1
- package/dist/components/bq-switch.js +1 -1
- package/dist/components/bq-switch.js.map +1 -1
- package/dist/components/bq-tab-group.js +1 -1
- package/dist/components/bq-tab-group.js.map +1 -1
- package/dist/components/bq-tab.js +1 -1
- package/dist/components/bq-tab.js.map +1 -1
- package/dist/components/bq-tag.js +1 -1
- package/dist/components/bq-textarea.js +1 -1
- package/dist/components/bq-textarea.js.map +1 -1
- package/dist/components/bq-toast.js +1 -1
- package/dist/components/bq-toast.js.map +1 -1
- package/dist/components/bq-tooltip.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/{beeq/p-4647a0fb.entry.js → components/p-B93kqFqH.js} +2 -2
- package/dist/components/p-B93kqFqH.js.map +1 -0
- package/dist/components/p-BRMw_HGf.js +6 -0
- package/dist/components/p-BRMw_HGf.js.map +1 -0
- package/dist/components/p-BcmnHFqE.js +6 -0
- package/dist/components/p-BcmnHFqE.js.map +1 -0
- package/dist/components/p-Bi6ozE0v.js +6 -0
- package/dist/components/p-Bi6ozE0v.js.map +1 -0
- package/dist/{beeq/p-b1d2e472.entry.js → components/p-C6pBQ61U.js} +2 -2
- package/dist/components/p-C6pBQ61U.js.map +1 -0
- package/dist/components/{p-DGysEMss.js → p-CCQ_5HvV.js} +2 -2
- package/dist/components/p-CCQ_5HvV.js.map +1 -0
- package/dist/components/p-D1A0LpG_.js +6 -0
- package/dist/components/{p-BxgDLPzX.js.map → p-D1A0LpG_.js.map} +1 -1
- package/dist/components/p-DhVt1fuD.js +6 -0
- package/dist/components/p-DhVt1fuD.js.map +1 -0
- package/dist/components/p-SKH1pCPg.js +6 -0
- package/dist/components/p-SKH1pCPg.js.map +1 -0
- package/dist/components/{p-A6e1tN-B.js → p-plkW8XNd.js} +2 -2
- package/dist/components/p-plkW8XNd.js.map +1 -0
- package/dist/components/p-qVvRSuP7.js +6 -0
- package/dist/components/p-qVvRSuP7.js.map +1 -0
- package/dist/components/p-yO5LAmkd.js +6 -0
- package/dist/components/p-yO5LAmkd.js.map +1 -0
- package/dist/custom-elements.json +1543 -811
- package/dist/esm/beeq.js +6 -4
- package/dist/esm/beeq.js.map +1 -1
- package/dist/esm/bq-accordion-group.entry.js +20 -9
- package/dist/esm/bq-accordion-group.entry.js.map +1 -1
- package/dist/esm/bq-accordion.entry.js +31 -20
- package/dist/esm/bq-accordion.entry.js.map +1 -1
- package/dist/esm/bq-alert.entry.js +31 -20
- package/dist/esm/bq-alert.entry.js.map +1 -1
- package/dist/esm/bq-avatar.entry.js +32 -19
- package/dist/esm/bq-avatar.entry.js.map +1 -1
- package/dist/esm/bq-badge.entry.js +17 -12
- package/dist/esm/bq-badge.entry.js.map +1 -1
- package/dist/esm/bq-breadcrumb-item.entry.js +7 -4
- package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/bq-breadcrumb.entry.js +11 -8
- package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
- package/dist/esm/bq-button_2.entry.js +63 -30
- package/dist/esm/bq-button_2.entry.js.map +1 -0
- package/dist/esm/bq-card.entry.js +15 -10
- package/dist/esm/bq-card.entry.js.map +1 -1
- package/dist/esm/bq-checkbox.entry.js +16 -9
- package/dist/esm/bq-checkbox.entry.js.map +1 -1
- package/dist/esm/bq-date-picker.entry.js +188 -136
- package/dist/esm/bq-date-picker.entry.js.map +1 -1
- package/dist/esm/bq-dialog.entry.js +29 -20
- package/dist/esm/bq-dialog.entry.js.map +1 -1
- package/dist/esm/bq-divider.entry.js +29 -20
- package/dist/esm/bq-divider.entry.js.map +1 -1
- package/dist/esm/bq-drawer.entry.js +33 -24
- package/dist/esm/bq-drawer.entry.js.map +1 -1
- package/dist/esm/bq-dropdown_2.entry.js +35 -16
- package/dist/esm/bq-dropdown_2.entry.js.map +1 -0
- package/dist/esm/bq-empty-state.entry.js +34 -29
- package/dist/esm/bq-empty-state.entry.js.map +1 -1
- package/dist/esm/bq-input.entry.js +31 -26
- package/dist/esm/bq-input.entry.js.map +1 -1
- package/dist/esm/bq-notification.entry.js +29 -18
- package/dist/esm/bq-notification.entry.js.map +1 -1
- package/dist/esm/bq-option-group.entry.js +7 -4
- package/dist/esm/bq-option-group.entry.js.map +1 -1
- package/dist/esm/bq-option-list_2.entry.js +25 -18
- package/dist/esm/bq-option-list_2.entry.js.map +1 -0
- package/dist/esm/bq-option.entry.js +20 -17
- package/dist/esm/bq-option.entry.js.map +1 -1
- package/dist/esm/bq-page-title.entry.js +16 -13
- package/dist/esm/bq-page-title.entry.js.map +1 -1
- package/dist/esm/bq-progress.entry.js +30 -19
- package/dist/esm/bq-progress.entry.js.map +1 -1
- package/dist/esm/bq-radio-group.entry.js +33 -12
- package/dist/esm/bq-radio-group.entry.js.map +1 -1
- package/dist/esm/bq-radio.entry.js +14 -11
- package/dist/esm/bq-radio.entry.js.map +1 -1
- package/dist/esm/bq-select.entry.js +53 -31
- package/dist/esm/bq-select.entry.js.map +1 -1
- package/dist/esm/bq-side-menu-item.entry.js +11 -8
- package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
- package/dist/esm/bq-side-menu.entry.js +13 -8
- package/dist/esm/bq-side-menu.entry.js.map +1 -1
- package/dist/esm/bq-slider.entry.js +38 -29
- package/dist/esm/bq-slider.entry.js.map +1 -1
- package/dist/esm/bq-spinner.entry.js +25 -16
- package/dist/esm/bq-spinner.entry.js.map +1 -1
- package/dist/esm/bq-status.entry.js +10 -5
- package/dist/esm/bq-status.entry.js.map +1 -1
- package/dist/esm/bq-step-item.entry.js +37 -19
- package/dist/esm/bq-step-item.entry.js.map +1 -1
- package/dist/esm/bq-steps.entry.js +34 -10
- package/dist/esm/bq-steps.entry.js.map +1 -1
- package/dist/esm/bq-steps.types-BRMw_HGf.js +12 -0
- package/dist/esm/bq-steps.types-BRMw_HGf.js.map +1 -0
- package/dist/esm/bq-switch.entry.js +18 -13
- package/dist/esm/bq-switch.entry.js.map +1 -1
- package/dist/esm/bq-tab-group.entry.js +29 -16
- package/dist/esm/bq-tab-group.entry.js.map +1 -1
- package/dist/esm/bq-tab.entry.js +19 -10
- package/dist/esm/bq-tab.entry.js.map +1 -1
- package/dist/esm/bq-textarea.entry.js +28 -21
- package/dist/esm/bq-textarea.entry.js.map +1 -1
- package/dist/esm/bq-toast.entry.js +19 -8
- package/dist/esm/bq-toast.entry.js.map +1 -1
- package/dist/esm/bq-tooltip.entry.js +28 -15
- package/dist/esm/bq-tooltip.entry.js.map +1 -1
- package/dist/esm/{date-igOoibr-.js → form-DLjuE3KX.js} +132 -3
- package/dist/esm/form-DLjuE3KX.js.map +1 -0
- package/dist/esm/{index-BOf9EC3C.js → index-BIw6Ac7W.js} +295 -365
- package/dist/esm/index-BIw6Ac7W.js.map +1 -0
- package/dist/esm/index-C33fRBEf.js +151 -0
- package/dist/esm/index-C33fRBEf.js.map +1 -0
- package/dist/esm/index.js +4 -2
- package/dist/esm/{isHTMLElement-BxgDLPzX.js → isHTMLElement-D1A0LpG_.js} +3 -3
- package/dist/{cjs/isHTMLElement-DMA6t4n4.js.map → esm/isHTMLElement-D1A0LpG_.js.map} +1 -1
- package/dist/esm/loader.js +5 -3
- package/dist/hydrate/index.d.ts +12 -0
- package/dist/hydrate/index.js +6360 -2418
- package/dist/hydrate/index.mjs +6359 -2419
- package/dist/stencil.config.js +1 -0
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/components/accordion/bq-accordion.d.ts +1 -1
- package/dist/types/components/accordion-group/bq-accordion-group.d.ts +1 -1
- package/dist/types/components/alert/bq-alert.d.ts +2 -2
- package/dist/types/components/avatar/bq-avatar.d.ts +1 -1
- package/dist/types/components/badge/bq-badge.d.ts +1 -1
- package/dist/types/components/breadcrumb/bq-breadcrumb.d.ts +1 -1
- package/dist/types/components/breadcrumb-item/bq-breadcrumb-item.d.ts +1 -1
- package/dist/types/components/button/bq-button.d.ts +18 -15
- package/dist/types/components/card/bq-card.d.ts +1 -1
- package/dist/types/components/checkbox/bq-checkbox.d.ts +1 -1
- package/dist/types/components/date-picker/bq-date-picker.d.ts +63 -18
- package/dist/types/components/date-picker/bq-date-picker.types.d.ts +31 -5
- package/dist/types/components/date-picker/helper/constants.d.ts +18 -0
- package/dist/types/components/date-picker/libs/callyLibrary.d.ts +15 -0
- package/dist/types/components/dialog/bq-dialog.d.ts +1 -1
- package/dist/types/components/divider/bq-divider.d.ts +1 -1
- package/dist/types/components/drawer/bq-drawer.d.ts +1 -1
- package/dist/types/components/dropdown/bq-dropdown.d.ts +1 -1
- package/dist/types/components/empty-state/bq-empty-state.d.ts +1 -1
- package/dist/types/components/icon/bq-icon.d.ts +1 -1
- package/dist/types/components/input/bq-input.d.ts +1 -1
- package/dist/types/components/notification/bq-notification.d.ts +1 -1
- package/dist/types/components/option/bq-option.d.ts +1 -1
- package/dist/types/components/option-group/bq-option-group.d.ts +1 -1
- package/dist/types/components/option-list/bq-option-list.d.ts +1 -1
- package/dist/types/components/page-title/bq-page-title.d.ts +1 -1
- package/dist/types/components/panel/bq-panel.d.ts +1 -1
- package/dist/types/components/progress/bq-progress.d.ts +1 -1
- package/dist/types/components/radio/bq-radio.d.ts +1 -1
- package/dist/types/components/radio-group/bq-radio-group.d.ts +1 -1
- package/dist/types/components/select/bq-select.d.ts +2 -1
- package/dist/types/components/side-menu/bq-side-menu.d.ts +1 -1
- package/dist/types/components/side-menu-item/bq-side-menu-item.d.ts +1 -1
- package/dist/types/components/slider/bq-slider.d.ts +1 -1
- package/dist/types/components/spinner/bq-spinner.d.ts +1 -1
- package/dist/types/components/status/bq-status.d.ts +1 -1
- package/dist/types/components/step-item/bq-step-item.d.ts +12 -2
- package/dist/types/components/steps/bq-steps.d.ts +6 -2
- package/dist/types/components/steps/bq-steps.types.d.ts +2 -0
- package/dist/types/components/switch/bq-switch.d.ts +1 -1
- package/dist/types/components/tab/bq-tab.d.ts +1 -1
- package/dist/types/components/tab-group/bq-tab-group.d.ts +1 -1
- package/dist/types/components/tag/bq-tag.d.ts +1 -1
- package/dist/types/components/textarea/bq-textarea.d.ts +1 -1
- package/dist/types/components/toast/bq-toast.d.ts +1 -1
- package/dist/types/components/tooltip/bq-tooltip.d.ts +1 -1
- package/dist/types/components.d.ts +114 -27
- package/dist/types/shared/utils/date/dateFormatting.d.ts +29 -0
- package/dist/types/shared/utils/{date.d.ts → date/dateParsing.d.ts} +16 -2
- package/dist/types/shared/utils/date/index.d.ts +2 -0
- package/dist/types/shared/utils/form.d.ts +28 -0
- package/dist/types/shared/utils/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +87 -4
- package/package.json +3 -2
- package/dist/beeq/bq-accordion-group.entry.esm.js.map +0 -1
- package/dist/beeq/bq-accordion.entry.esm.js.map +0 -1
- package/dist/beeq/bq-alert.entry.esm.js.map +0 -1
- package/dist/beeq/bq-avatar.entry.esm.js.map +0 -1
- package/dist/beeq/bq-badge.entry.esm.js.map +0 -1
- package/dist/beeq/bq-breadcrumb-item.entry.esm.js.map +0 -1
- package/dist/beeq/bq-breadcrumb.entry.esm.js.map +0 -1
- package/dist/beeq/bq-button.bq-icon.entry.esm.js.map +0 -1
- package/dist/beeq/bq-card.entry.esm.js.map +0 -1
- package/dist/beeq/bq-checkbox.entry.esm.js.map +0 -1
- package/dist/beeq/bq-date-picker.entry.esm.js.map +0 -1
- package/dist/beeq/bq-dialog.entry.esm.js.map +0 -1
- package/dist/beeq/bq-divider.entry.esm.js.map +0 -1
- package/dist/beeq/bq-drawer.entry.esm.js.map +0 -1
- package/dist/beeq/bq-dropdown.bq-panel.entry.esm.js.map +0 -1
- package/dist/beeq/bq-empty-state.entry.esm.js.map +0 -1
- package/dist/beeq/bq-input.entry.esm.js.map +0 -1
- package/dist/beeq/bq-notification.entry.esm.js.map +0 -1
- package/dist/beeq/bq-option-group.entry.esm.js.map +0 -1
- package/dist/beeq/bq-option-list.bq-tag.entry.esm.js.map +0 -1
- package/dist/beeq/bq-option.entry.esm.js.map +0 -1
- package/dist/beeq/bq-page-title.entry.esm.js.map +0 -1
- package/dist/beeq/bq-progress.entry.esm.js.map +0 -1
- package/dist/beeq/bq-radio-group.entry.esm.js.map +0 -1
- package/dist/beeq/bq-radio.entry.esm.js.map +0 -1
- package/dist/beeq/bq-select.entry.esm.js.map +0 -1
- package/dist/beeq/bq-side-menu-item.entry.esm.js.map +0 -1
- package/dist/beeq/bq-side-menu.entry.esm.js.map +0 -1
- package/dist/beeq/bq-slider.entry.esm.js.map +0 -1
- package/dist/beeq/bq-spinner.entry.esm.js.map +0 -1
- package/dist/beeq/bq-status.entry.esm.js.map +0 -1
- package/dist/beeq/bq-step-item.entry.esm.js.map +0 -1
- package/dist/beeq/bq-steps.entry.esm.js.map +0 -1
- package/dist/beeq/bq-tab-group.entry.esm.js.map +0 -1
- package/dist/beeq/bq-tab.entry.esm.js.map +0 -1
- package/dist/beeq/bq-textarea.entry.esm.js.map +0 -1
- package/dist/beeq/bq-toast.entry.esm.js.map +0 -1
- package/dist/beeq/bq-tooltip.entry.esm.js.map +0 -1
- package/dist/beeq/loader.esm.js.map +0 -1
- package/dist/beeq/p-0bf5e367.entry.js.map +0 -1
- package/dist/beeq/p-16defa87.entry.js +0 -6
- package/dist/beeq/p-16defa87.entry.js.map +0 -1
- package/dist/beeq/p-17de1ba4.entry.js +0 -6
- package/dist/beeq/p-17de1ba4.entry.js.map +0 -1
- package/dist/beeq/p-1df8fe61.entry.js +0 -6
- package/dist/beeq/p-1df8fe61.entry.js.map +0 -1
- package/dist/beeq/p-24749f67.entry.js +0 -6
- package/dist/beeq/p-24749f67.entry.js.map +0 -1
- package/dist/beeq/p-38add122.entry.js +0 -6
- package/dist/beeq/p-38add122.entry.js.map +0 -1
- package/dist/beeq/p-454fa535.entry.js +0 -6
- package/dist/beeq/p-454fa535.entry.js.map +0 -1
- package/dist/beeq/p-4647a0fb.entry.js.map +0 -1
- package/dist/beeq/p-4725a142.entry.js +0 -6
- package/dist/beeq/p-4725a142.entry.js.map +0 -1
- package/dist/beeq/p-51351eed.entry.js +0 -6
- package/dist/beeq/p-51351eed.entry.js.map +0 -1
- package/dist/beeq/p-5b0a56e7.entry.js +0 -6
- package/dist/beeq/p-5b0a56e7.entry.js.map +0 -1
- package/dist/beeq/p-5c23324d.entry.js +0 -6
- package/dist/beeq/p-5c23324d.entry.js.map +0 -1
- package/dist/beeq/p-5df7df5d.entry.js +0 -6
- package/dist/beeq/p-5df7df5d.entry.js.map +0 -1
- package/dist/beeq/p-5e8c8e90.entry.js +0 -6
- package/dist/beeq/p-5e8c8e90.entry.js.map +0 -1
- package/dist/beeq/p-662578a2.entry.js.map +0 -1
- package/dist/beeq/p-6ae2ca4b.entry.js +0 -6
- package/dist/beeq/p-6ae2ca4b.entry.js.map +0 -1
- package/dist/beeq/p-7ca73c06.entry.js +0 -6
- package/dist/beeq/p-7ca73c06.entry.js.map +0 -1
- package/dist/beeq/p-84e62655.entry.js.map +0 -1
- package/dist/beeq/p-93d6f4f0.entry.js +0 -6
- package/dist/beeq/p-93d6f4f0.entry.js.map +0 -1
- package/dist/beeq/p-9585221e.entry.js +0 -6
- package/dist/beeq/p-9585221e.entry.js.map +0 -1
- package/dist/beeq/p-9c9a83f8.entry.js +0 -6
- package/dist/beeq/p-9c9a83f8.entry.js.map +0 -1
- package/dist/beeq/p-9e9baa82.entry.js +0 -6
- package/dist/beeq/p-9e9baa82.entry.js.map +0 -1
- package/dist/beeq/p-BOf9EC3C.js +0 -7
- package/dist/beeq/p-BOf9EC3C.js.map +0 -1
- package/dist/beeq/p-BxgDLPzX.js +0 -6
- package/dist/beeq/p-DEUOprS4.js +0 -6
- package/dist/beeq/p-DEUOprS4.js.map +0 -1
- package/dist/beeq/p-b1d2e472.entry.js.map +0 -1
- package/dist/beeq/p-b7efb629.entry.js +0 -6
- package/dist/beeq/p-b7efb629.entry.js.map +0 -1
- package/dist/beeq/p-b88b2573.entry.js.map +0 -1
- package/dist/beeq/p-bfca08f5.entry.js +0 -6
- package/dist/beeq/p-bfca08f5.entry.js.map +0 -1
- package/dist/beeq/p-c63b89d2.entry.js +0 -6
- package/dist/beeq/p-c63b89d2.entry.js.map +0 -1
- package/dist/beeq/p-ca93325b.entry.js +0 -6
- package/dist/beeq/p-ca93325b.entry.js.map +0 -1
- package/dist/beeq/p-cb0639d5.entry.js.map +0 -1
- package/dist/beeq/p-cd53041f.entry.js.map +0 -1
- package/dist/beeq/p-d31e8b6a.entry.js +0 -6
- package/dist/beeq/p-d31e8b6a.entry.js.map +0 -1
- package/dist/beeq/p-d8118f0b.entry.js +0 -6
- package/dist/beeq/p-d8118f0b.entry.js.map +0 -1
- package/dist/beeq/p-d9c5ab1d.entry.js +0 -6
- package/dist/beeq/p-d9c5ab1d.entry.js.map +0 -1
- package/dist/beeq/p-dc5aa386.entry.js.map +0 -1
- package/dist/beeq/p-dcda1181.entry.js +0 -6
- package/dist/beeq/p-dcda1181.entry.js.map +0 -1
- package/dist/beeq/p-eaa8c123.entry.js +0 -6
- package/dist/beeq/p-eaa8c123.entry.js.map +0 -1
- package/dist/beeq/p-eb47c1ae.entry.js.map +0 -1
- package/dist/beeq/p-eb6eac82.entry.js +0 -6
- package/dist/beeq/p-eb6eac82.entry.js.map +0 -1
- package/dist/beeq/p-f691f00c.entry.js +0 -6
- package/dist/beeq/p-f691f00c.entry.js.map +0 -1
- package/dist/beeq/p-igOoibr-.js +0 -6
- package/dist/beeq/p-igOoibr-.js.map +0 -1
- package/dist/cjs/bq-accordion-group.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-accordion.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-alert.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-avatar.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-badge.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-breadcrumb-item.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-breadcrumb.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-button.bq-icon.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-card.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-checkbox.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-date-picker.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-dialog.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-drawer.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-dropdown.bq-panel.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-empty-state.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-input.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-notification.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-option-group.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-option-list.bq-tag.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-option.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-page-title.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-progress.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-radio-group.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-radio.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-select.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-side-menu-item.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-side-menu.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-slider.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-spinner.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-status.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-step-item.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-steps.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-steps.types-D4B3f19X.js.map +0 -1
- package/dist/cjs/bq-switch.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-tab-group.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-textarea.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-toast.entry.cjs.js.map +0 -1
- package/dist/cjs/bq-tooltip.entry.cjs.js.map +0 -1
- package/dist/cjs/date-C-h2CBps.js.map +0 -1
- package/dist/cjs/index-g8MkV15i.js.map +0 -1
- package/dist/collection/components/date-picker/helper/callyLibrary.js.map +0 -1
- package/dist/collection/shared/utils/date.js.map +0 -1
- package/dist/components/p-16lKXCDk.js.map +0 -1
- package/dist/components/p-A6e1tN-B.js.map +0 -1
- package/dist/components/p-B5XEhmuc.js.map +0 -1
- package/dist/components/p-BxgDLPzX.js +0 -6
- package/dist/components/p-CIV0haMJ.js +0 -6
- package/dist/components/p-CIV0haMJ.js.map +0 -1
- package/dist/components/p-CXUO6Zub.js.map +0 -1
- package/dist/components/p-D14_9VoZ.js +0 -6
- package/dist/components/p-D14_9VoZ.js.map +0 -1
- package/dist/components/p-DEUOprS4.js +0 -6
- package/dist/components/p-DEUOprS4.js.map +0 -1
- package/dist/components/p-DGysEMss.js.map +0 -1
- package/dist/components/p-DHdYy1q5.js.map +0 -1
- package/dist/components/p-DokL_HVP.js +0 -6
- package/dist/components/p-DokL_HVP.js.map +0 -1
- package/dist/components/p-eRUe5rRq.js +0 -6
- package/dist/components/p-eRUe5rRq.js.map +0 -1
- package/dist/esm/bq-button.bq-icon.entry.js.map +0 -1
- package/dist/esm/bq-dropdown.bq-panel.entry.js.map +0 -1
- package/dist/esm/bq-option-list.bq-tag.entry.js.map +0 -1
- package/dist/esm/bq-steps.types-DEUOprS4.js +0 -11
- package/dist/esm/bq-steps.types-DEUOprS4.js.map +0 -1
- package/dist/esm/date-igOoibr-.js.map +0 -1
- package/dist/esm/index-BOf9EC3C.js.map +0 -1
- package/dist/types/components/date-picker/helper/callyLibrary.d.ts +0 -11
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bq-side-menu-item.entry.cjs.js","sources":["../../packages/beeq/src/components/side-menu-item/scss/bq-side-menu-item.scss?tag=bq-side-menu-item&encapsulation=shadow","../../packages/beeq/src/components/side-menu-item/bq-side-menu-item.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Side menu item styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-side-menu-item.variables';\n\n:host {\n @apply flex;\n}\n\n.bq-side-menu__item {\n @apply flex flex-grow items-center gap-x-s rounded-s border-none px-[var(--bq-side-menu-item--paddingX)] py-[var(--bq-side-menu-item--paddingY)] no-underline transition-colors duration-150;\n\n // Default state\n @apply bg-[var(--bq-side-menu-item--bg-default)] text-m text-[color:var(--bq-side-menu-item--text-default)];\n\n // Focus state\n @apply [&:not(.disabled)]:focus-visible:focus;\n\n // Hover state\n @apply [&:not(.disabled)]:hover:cursor-pointer;\n @apply [&:not(.disabled,.active)]:hover:text-m [&:not(.disabled,.active)]:hover:bg-hover-ui-alt [&:not(.disabled,.active)]:hover:text-hover-primary;\n}\n\n.bq-side-menu__item.active {\n // Active state\n @apply bg-[var(--bq-side-menu-item--bg-active)] text-m text-[color:var(--bq-side-menu-item--text-active)];\n}\n\n.bq-side-menu__item.disabled {\n @apply opacity-60 hover:cursor-not-allowed;\n}\n\n.bq-side-menu__item.is-collapsed {\n @apply justify-center gap-0;\n\n .bq-side-menu__item--label,\n .bq-side-menu__item--suffix {\n @apply sr-only scale-0;\n }\n}\n\n.bq-side-menu__item--label,\n.bq-side-menu__item--suffix {\n @apply transition-all duration-300 ease-in-out;\n}\n","import type { EventEmitter } from '@stencil/core';\nimport { Component, Element, Event, h, Prop, State } from '@stencil/core';\n\nimport { getTextContent } from '../../shared/utils';\n\n/**\n * Represents the default side menu item for standard navigation elements, providing a clean and straightforward way to display menu options.\n *\n * @example How to use it\n * ```html\n * <bq-side-menu-item>\n * <bq-icon name=\"star-four\" slot=\"prefix\"></bq-icon>\n * Menu item\n * <bq-badge slot=\"suffix\">5</bq-badge>\n * </bq-side-menu-item>\n * ```\n * @documentation https://www.beeq.design/3d466e231/p/99822d-side-menu/b/09d7b1\n * @status stable\n *\n * @dependency bq-tooltip\n *\n * @attr {boolean} active - If `true`, the menu item will be shown as active/selected.\n * @attr {boolean} collapse - If `true`, the item label and suffix will be hidden and the `width` will be reduced according to its parent.\n * @attr {boolean} disabled - If `true`, the menu item will be disabled (no interaction allowed).\n *\n * @event bqBlur - Handler to be called when the button loses focus.\n * @event bqClick - Handler to be called when the button gets focused.\n * @event bqFocus - Handler to be called when the button is clicked.\n *\n * @slot prefix - The prefix part of menu item.\n * @slot - The content of the menu item.\n * @slot suffix - The suffix part of menu item.\n *\n * @part base - The component wrapper container inside the shadow DOM\n * @part label - The label slot\n * @part prefix - The prefix slot\n * @part suffix - The suffix slot\n * @part panel - The `<div>` container that holds the tooltip content (when the side menu is collapsed)\n * @part trigger - The `<div>` container that holds the element which displays tooltip on hover (when the side menu is collapsed)\n *\n * @cssprop --bq-side-menu-item--bg-default - Side menu item default background color\n * @cssprop --bq-side-menu-item--bg-active - Side menu item active background color\n * @cssprop --bq-side-menu-item--text-default - Side menu item default text color\n * @cssprop --bq-side-menu-item--text-active - Side menu item active text color\n * @cssprop --bq-side-menu-item--paddingX - Side menu item vertical padding\n * @cssprop --bq-side-menu-item--paddingY - Side menu item horizontal padding\n */\n@Component({\n tag: 'bq-side-menu-item',\n styleUrl: './scss/bq-side-menu-item.scss',\n shadow: true,\n})\nexport class BqSideMenuItem {\n // Own Properties\n // ====================\n\n private labelElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSideMenuItemElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() textContent: string;\n\n // Public Property API\n // ========================\n\n /** If true, the menu item will be shown as active/selected. */\n @Prop() active: boolean = false;\n\n /** If true, the item label and suffix will be hidden and the `width` will be reduced according to its parent. */\n @Prop() collapse: boolean = false;\n\n /** If true, the menu item will be disabled (no interaction allowed) */\n @Prop() disabled: boolean = false;\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the button loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSideMenuItemElement>;\n\n /** Handler to be called when the button is clicked */\n @Event() bqFocus: EventEmitter<HTMLBqSideMenuItemElement>;\n\n /** Handler to be called when button gets focus */\n @Event() bqClick: EventEmitter<HTMLBqSideMenuItemElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleSlotChange = () => {\n if (!this.labelElem) return;\n this.textContent = getTextContent(this.labelElem.querySelector('slot'));\n };\n\n handleBlur = (ev: Event) => {\n if (this.disabled) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n this.bqBlur.emit(this.el);\n };\n\n handleFocus = (ev: Event) => {\n if (this.disabled) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n this.bqFocus.emit(this.el);\n };\n\n handleClick = (ev: Event) => {\n if (this.disabled || this.active) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n this.bqClick.emit(this.el);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n private menuItem = () => (\n <button\n aria-disabled={this.disabled ? 'true' : 'false'}\n class={{\n 'bq-side-menu__item': true,\n active: this.active,\n disabled: this.disabled,\n 'is-collapsed': this.collapse,\n }}\n onBlur={this.handleBlur}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n part=\"base\"\n role=\"menuitem\"\n slot=\"trigger\"\n tabindex={this.disabled ? -1 : 0}\n type=\"button\"\n >\n <div class=\"bq-side-menu__item--prefix flex items-center\" part=\"prefix\">\n <slot name=\"prefix\" />\n </div>\n <div\n class=\"bq-side-menu__item--label overflow-hidden text-ellipsis whitespace-nowrap\"\n ref={(labelElem) => {\n this.labelElem = labelElem;\n }}\n >\n <slot onSlotchange={this.handleSlotChange} />\n </div>\n <div class=\"bq-side-menu__item--suffix ml-auto flex items-center\" part=\"suffix\">\n <slot name=\"suffix\" />\n </div>\n </button>\n );\n\n render() {\n return !this.collapse ? (\n this.menuItem()\n ) : (\n <bq-tooltip class=\"bq-side-menu__item--tooltip block\" exportparts=\"trigger, panel\" placement=\"right\">\n {this.textContent}\n {this.menuItem()}\n </bq-tooltip>\n );\n }\n}\n"],"names":["getTextContent","h"],"mappings":";;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,o/vBAAo/vB;;MCoDjgwB,cAAc,GAAA,MAAA;;;;;;;;;AAIjB,IAAA,SAAS;;;;;AAWR,IAAA,WAAW;;;;IAMZ,MAAM,GAAY,KAAK;;IAGvB,QAAQ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ACL,CACd;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bq-side-menu.entry.cjs.js","sources":["../../packages/beeq/src/components/side-menu/scss/bq-side-menu.scss?tag=bq-side-menu&encapsulation=shadow","../../packages/beeq/src/components/side-menu/bq-side-menu.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Side menu styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-side-menu.variables';\n\n:host {\n @apply flex overflow-hidden;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Aside container */\n/* -------------------------------------------------------------------------- */\n\n.bq-side-menu {\n @apply fixed flex h-dynamic-vh grow flex-col bg-[--bq-side-menu--bg-color] is-[--bq-side-menu--width] inset-bs-0 inset-is-0;\n @apply border-0 border-e-s border-solid border-[color:--bq-side-menu--border-color];\n @apply transition-[background-color,width] duration-150;\n @include hide-scrollbar;\n}\n\n.bq-side-menu.is-collapsed {\n @apply is-[--bq-side-menu--width-collapse];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Logo container */\n/* -------------------------------------------------------------------------- */\n\n.bq-side-menu--logo {\n @apply sticky top-0 z-[1] p-xs;\n @apply box-content flex items-center bg-[--bq-side-menu--bg-color] text-[color:--bq-side-menu--brand-color];\n}\n\n/* -------------------------------------------------------------------------- */\n/* APPEARANCE */\n/* -------------------------------------------------------------------------- */\n\n/**\n * The following change the default values of some CSS custom properties\n * to make it complain with the side menu appearance selected\n */\n\n:host([size='small']) {\n ::slotted(bq-side-menu-item) {\n --bq-side-menu-item--paddingY: theme(space.s);\n }\n}\n\n:host([appearance='brand']) {\n --bq-focus: theme(stroke.alt);\n --bq-side-menu--bg-color: theme(backgroundColor.ui.brand);\n --bq-side-menu--brand-color: theme(stroke.inverse);\n --bq-side-menu--border-color: theme(stroke.brand);\n\n ::slotted(bq-side-menu-item) {\n --bq-side-menu-item--bg-hover: color-mix(in srgb, var(--bq-ui--brand), var(--bq-hover) 20%);\n\n --bq-side-menu-item--text-default: theme(textColor.alt);\n --bq-side-menu-item--text-hover: theme(textColor.alt);\n }\n\n .bq-side-menu--footer ::slotted([slot='footer']) {\n --bq-ui--secondary: theme(colors.transparent);\n --bq-button--icon-color: theme(textColor.alt);\n --bq-button-hover--icon-color: theme(textColor.primary);\n }\n}\n\n:host([appearance='inverse']) {\n --bq-side-menu--bg-color: theme(backgroundColor.ui.inverse);\n --bq-side-menu--brand-color: theme(stroke.inverse);\n --bq-side-menu--border-color: theme(backgroundColor.ui.inverse);\n\n ::slotted(bq-side-menu-item) {\n --bq-side-menu-item--bg-hover: color-mix(in srgb, var(--bq-ui--inverse), var(--bq-hover) 20%);\n --bq-side-menu-item--bg-active: color-mix(in srgb, var(--bq-ui--alt), var(--bq-active) 20%);\n\n --bq-side-menu-item--text-default: theme(textColor.inverse);\n --bq-side-menu-item--text-hover: theme(textColor.inverse);\n --bq-side-menu-item--text-active: theme(textColor.primary);\n }\n\n .bq-side-menu--footer ::slotted([slot='footer']) {\n --bq-ui--secondary: theme(colors.transparent);\n --bq-button--icon-color: theme(textColor.inverse);\n --bq-button-hover--icon-color: theme(textColor.primary);\n }\n}\n","import type { EventEmitter } from '@stencil/core';\nimport { Component, Event, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { isClient, isHTMLElement } from '../../shared/utils';\nimport type { TSideMenuAppearance, TSideMenuSize } from './bq-side-menu.types';\n\n/**\n *The default side menu serves as a versatile container for organizing and displaying navigation elements,\n * with default side menu items providing a clean and straightforward way to represent individual menu options.\n * Together, they form the foundation for building structured and intuitive side menu layouts.\n *\n * @example How to use it\n * ```html\n * <bq-side-menu>\n * <div slot=\"logo\">\n * <h1>Your Logo</h1>\n * </div>\n * <bq-side-menu-item active>\n * <bq-icon name=\"home\" slot=\"prefix\"></bq-icon>\n * Home\n * </bq-side-menu-item>\n * <bq-side-menu-item>\n * <bq-icon name=\"settings\" slot=\"prefix\"></bq-icon>\n * Settings\n * </bq-side-menu-item>\n * <bq-side-menu-item disabled>\n * <bq-icon name=\"help\" slot=\"prefix\"></bq-icon>\n * Help\n * </bq-side-menu-item>\n * </bq-side-menu>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/99822d-side-menu/b/09d7b1\n * @status stable\n *\n * @attr {\"brand\" | \"default\" | \"inverse\"} appearance - It sets a predefined appearance of the side menu.\n * @attr {boolean} collapse - If `true`, the container will reduce its width.\n * @attr {\"medium\" | \"small\"} - size - It sets the size of the navigation menu items.\n *\n * @method toggleCollapse - Method to be called to toggle the collapse state of the side menu.\n *\n * @event bqCollapse - Callback handler to be called when the Side menu changes its width from expanded to collapse and vice versa.\n * @event bqSelect - Callback handler to be called when the active/selected menu item changes.\n *\n * @slot logo - The section for displaying the logo or brand in the side menu.\n * @slot The main section that holds all menu items.\n * @slot footer - The section for adding footer content to the side menu.\n *\n * @part base - HTML `<aside>` root container\n * @part footer - HTML `<div>` element that holds the footer\n * @part logo - HTML `<div>` element that holds the logo\n * @part nav - HTML `<nav>` element that holds the navigation items\n *\n * @cssprop --bq-side-menu--bg-color - Side menu background color\n * @cssprop --bq-side-menu--brand-color - Side menu logo color\n * @cssprop --bq-side-menu--border-color - Side menu border color\n */\n@Component({\n tag: 'bq-side-menu',\n styleUrl: './scss/bq-side-menu.scss',\n shadow: true,\n})\nexport class BqSideMenu {\n // Own Properties\n // ====================\n\n private menuItemCssSelector = 'bq-side-menu-item';\n\n private bodyCss = 'bq-body--side-menu';\n private bodyCssExpand = 'bq-body--side-menu__expand';\n private bodyCssCollapse = 'bq-body--side-menu__collapse';\n\n private menuElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private documentBody: HTMLBodyElement;\n\n // Public Property API\n // ========================\n\n /** It sets a predefined appearance of the side menu */\n @Prop({ reflect: true }) appearance: TSideMenuAppearance = 'default';\n\n /** If true, the container will reduce its width */\n @Prop({ reflect: true }) collapse: boolean = false;\n\n /** It sets the size of the navigation menu items */\n @Prop({ reflect: true }) size: TSideMenuSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('collapse')\n onCollapsePropChange() {\n this.handleCollapse();\n this.bqCollapse.emit({ collapse: this.collapse });\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the Side menu changes its width from expanded to collapse and vice versa */\n @Event() bqCollapse: EventEmitter<{ collapse: boolean }>;\n\n /** Callback handler to be called when the active/selected menu item changes */\n @Event() bqSelect: EventEmitter<HTMLBqSideMenuItemElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n if (!isClient()) return;\n\n this.documentBody = document.querySelector('body');\n this.documentBody.classList.add(this.bodyCss);\n this.handleCollapse();\n }\n\n disconnectedCallback() {\n this.cleanDocumentBodyClass();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqClick', { passive: true })\n onMenuItemClick(event: Event) {\n const { target: item } = event;\n if (!isHTMLElement(item, 'bq-side-menu-item')) return;\n\n this.menuItems.forEach((menuItem: HTMLBqSideMenuItemElement) => {\n menuItem.active = !menuItem.disabled && menuItem === item;\n });\n this.bqSelect.emit(item);\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Toggle the collapse state of the side menu */\n @Method()\n async toggleCollapse() {\n this.collapse = !this.collapse;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private get menuItems() {\n if (!this.menuElem) return [];\n\n const slot = this.menuElem.querySelector('slot');\n return [...slot.assignedElements({ flatten: true })].filter(\n (el: HTMLBqSideMenuItemElement) => el.tagName.toLowerCase() === this.menuItemCssSelector,\n ) as [HTMLBqSideMenuItemElement];\n }\n\n private handleCollapse = () => {\n if (!this.menuItems.length) return;\n\n this.menuItems.forEach((menuItem: HTMLBqSideMenuItemElement) => {\n menuItem.collapse = this.collapse;\n });\n if (this.collapse) {\n this.collapseDocumentBody();\n } else {\n this.expandDocumentBody();\n }\n };\n\n private collapseDocumentBody = () => {\n if (!this.collapse) return;\n\n this.documentBody.classList.remove(this.bodyCssExpand);\n this.documentBody.classList.add(this.bodyCssCollapse);\n };\n\n private expandDocumentBody = () => {\n if (this.collapse) return;\n\n this.documentBody.classList.remove(this.bodyCssCollapse);\n this.documentBody.classList.add(this.bodyCssExpand);\n };\n\n private cleanDocumentBodyClass = () => {\n this.documentBody.classList.remove(this.bodyCss, this.bodyCssCollapse, this.bodyCssExpand);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <aside class={{ 'bq-side-menu overflow-y-auto': true, 'is-collapsed': this.collapse }} part=\"base\">\n {/* Company logo and name */}\n <div class={{ 'bq-side-menu--logo': true, 'is-collapsed': this.collapse }} part=\"logo\">\n <slot name=\"logo\" />\n </div>\n {/* Navigation content */}\n <nav\n class=\"bq-side-menu--nav flex flex-col gap-y-xs px-xs pt-xs2\"\n part=\"nav\"\n ref={(navElem) => {\n this.menuElem = navElem;\n }}\n >\n <slot />\n </nav>\n {/* Footer */}\n <div\n class=\"bq-side-menu--footer sticky inset-be-0 m-bs-[auto] flex justify-center bg-[var(--bq-side-menu--bg-color)] p-xs\"\n part=\"footer\"\n >\n <slot name=\"footer\"></slot>\n </div>\n </aside>\n );\n }\n}\n"],"names":["isClient","isHTMLElement","h"],"mappings":";;;;;;;;;;AAAA,MAAM,aAAa,GAAG,2xuBAA2xuB;;MC8DpyuB,UAAU,GAAA,MAAA;;;;;;;;IAIb,mBAAmB,GAAG,mBAAmB;IAEzC,OAAO,GAAG,oBAAoB;IAC9B,aAAa,GAAG,4BAA4B;IAC5C,eAAe,GAAG,8BAA8B;AAEhD,IAAA,QAAQ;;;;;;AASC,IAAA,YAAY;;;;IAMJ,UAAU,GAAwB,SAAS;;IAG3C,QAAQ,GAAY,KAAK;;IAGzB,IAAI,GAAkB,QAAQ;;;IAMvD,oBAAoB,GAAA;QAClB,IAA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,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAC,MAAM,EAAA,EAEhGA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAC,MAAM,EAAA,EACpFA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,MAAM,EAAA,CAAG,CAChB,EAENA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,uDAAuD,EAC7D,IAAI,EAAC,KAAK,EACV,GAAG,EAAE,CAAC,OAAO,KAAI;AACf,gBAAA,IAAI,CAAC,QAAQ,GAAG,OAAO;aACxB,EAAA,EAEDA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,EAENA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,gHAAgH,EACtH,IAAI,EAAC,QAAQ,EAAA,EAEbA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACA;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bq-slider.entry.cjs.js","sources":["../../packages/beeq/src/components/slider/scss/bq-slider.scss?tag=bq-slider&encapsulation=shadow","../../packages/beeq/src/components/slider/bq-slider.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Slider styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-slider.variables';\n\n@layer components {\n .thumb {\n @apply pointer-events-auto box-content size-[--bq-slider--thumb-size] cursor-pointer appearance-none rounded-full border-m border-solid border-brand bg-ui-primary;\n @apply transition-[background-color,border-color,box-shadow] duration-300;\n }\n\n .thumb-focus {\n @apply focus;\n }\n\n .thumb-hover {\n @apply border-hover-brand;\n }\n\n .thumb-active {\n @apply cursor-grabbing bg-active-ui-brand border-active-brand;\n }\n}\n\n:host {\n @apply block is-full;\n}\n\n/* ---------------------- Webkit (Chrome, Safari, Edge) --------------------- */\n\ninput[type='range']::-webkit-slider-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-webkit-slider-runnable-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-webkit-slider-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-webkit-slider-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-webkit-slider-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-webkit-slider-thumb {\n @apply cursor-not-allowed;\n}\n\n/* ---------------------------- Mozilla (Firefox) --------------------------- */\n\ninput[type='range']::-moz-range-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-moz-range-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-moz-range-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-moz-range-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-moz-range-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-moz-range-thumb {\n @apply cursor-not-allowed;\n}\n","import type { EventEmitter } from '@stencil/core';\nimport { AttachInternals, Component, Element, Event, h, Prop, State, Watch } from '@stencil/core';\n\nimport { clamp, debounce, isNil, isString, type TDebounce } from '../../shared/utils';\nimport type { TSliderType, TSliderValue } from './bq-slider.types';\n\n/**\n * Sliders provide a visual representation of adjustable content, enabling users to change values by dragging a handle along a horizontal track.\n *\n * @example How to use it\n * ```html\n * <bq-slider max=\"100\" value=\"30\"></bq-slider>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/509cbc-slider/b/09d7b1\n * @status stable\n *\n * @dependency bq-tooltip\n *\n * @attr {number} debounce-time - The amount of time, in milliseconds, to wait to trigger the bqChange event after each value change.\n * @attr {boolean} disabled - If `true` the slider is disabled.\n * @attr {boolean} enable-tooltip - If `true`, a tooltip will be shown displaying the progress value.\n * @attr {boolean} enable-value-indicator - If `true` it will show the value label on the side of the slider track area.\n * @attr {number} gap - A number representing the amount to remain between the minimum and maximum values (only for range type).\n * @attr {number} max - A number representing the max value of the slider.\n * @attr {number} min - A number representing the min value of the slider.\n * @attr {number} step - A number represents the step of the slider. ⚠️ Please notice that the value (or list of values if the slider type is range) will be rounded to the nearest multiple of step.\n * @attr {boolean} tooltip-always-visible - If `true`, a tooltip will always display the progress value. It relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true.\n * @attr {\"range\" | \"single\"} type - It defines the type of slider to display.\n * @attr {\"[number, number]\" | \"number\" | \"string\"} value - The value of the slider. 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).\n *\n * @event bqBlur - Handler to be called when the slider loses focus.\n * @event bqChange - Handler to be called when changing the value on range inputs.\n * @event bqFocus - Handler to be called when the slider gets focused.\n *\n * @part base - The component's base wrapper.\n * @part container - The container of the slider.\n * @part track-area - The track area of the slider.\n * @part progress-area - The progress area of the slider.\n * @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`.\n * @part input-max - The input element for the maximum value.\n * @part label-start - The label for the value when the slider type is `single` or the minimum value when the slider type is `range`.\n * @part label-end - The label for maximum value when the slider type is `range`.\n *\n * @cssprop --bq-slider--size - The height of the slider track/progress area\n * @cssprop --bq-slider--border-radius - Slider border radius\n * @cssprop --bq-slider--thumb-size - Slider hover thumb size\n * @cssprop --bq-slider--progress-color - Slider progress background color\n * @cssprop --bq-slider--trackarea-color - Slider track background color\n */\n@Component({\n tag: 'bq-slider',\n styleUrl: './scss/bq-slider.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSlider {\n // Own Properties\n // ====================\n\n private inputMinElem: HTMLInputElement;\n private inputMaxElem: HTMLInputElement;\n private minTooltipElem: HTMLBqTooltipElement;\n private maxTooltipElem: HTMLBqTooltipElement;\n private progressElem: HTMLSpanElement;\n private trackElem: HTMLSpanElement;\n private debounceBqChange: TDebounce<void>;\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals!: ElementInternals;\n @Element() el!: HTMLBqSliderElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n /**\n * The `minValue` state is the only value when the slider type is `single`\n * and the minimum value when the slider type is `range`.\n */\n @State() minValue: number;\n /** The `maxValue` state is only used when the slider type is `range`. */\n @State() maxValue: number;\n /** It hold the left position of the Thumb for the value or the minimum value (if the slider type is `range`) */\n @State() minThumbPosition: number;\n /** It hold the left position of the Thumb for the maximum value (if the slider type is `range`) */\n @State() maxThumbPosition: number;\n\n // Public Property API\n // ========================\n\n /** The amount of time, in milliseconds, to wait to trigger the `bqChange` event after each value change. */\n @Prop({ reflect: true }) debounceTime = 0;\n\n /** If `true` the slider is disabled. */\n @Prop({ reflect: true }) disabled? = false;\n\n /** If `true` it will show the value label on a side of the slider track area */\n @Prop({ reflect: true }) enableValueIndicator? = false;\n\n /** A number representing the amount to remain between the minimum and maximum values (only for range type). */\n @Prop({ reflect: true, mutable: true }) gap = 0;\n\n /** A number representing the max value of the slider. */\n @Prop({ reflect: true }) max = 100;\n\n /** A number representing the min value of the slider. */\n @Prop({ reflect: true }) min = 0;\n\n /** Name of the form control. Submitted with the form as part of a name/value pair */\n @Prop({ reflect: true }) name: string;\n\n /**\n * A number representing the step of the slider.\n * ⚠️ Please notice that the value (or list of values if the slider type is `range`) will be rounded to the nearest multiple of `step`.\n */\n @Prop({ reflect: true }) step = 1;\n\n /** It defines the type of slider to display */\n @Prop({ reflect: true }) type: TSliderType = 'single';\n\n /**\n * 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).\n */\n @Prop({ reflect: true, mutable: true }) value: TSliderValue;\n\n /** If `true`, a tooltip will be shown displaying the progress value */\n @Prop({ reflect: true }) enableTooltip: boolean = false;\n\n /**\n * If `true`, a tooltip will always display the progress value.\n * It relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true.\n */\n @Prop({ reflect: true }) tooltipAlwaysVisible: boolean = false;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValuePropChange(newValue: TSliderValue) {\n this.setState(newValue);\n this.emitBqChange();\n }\n\n @Watch('step')\n handleStepPropChange() {\n this.minValue = Math.round(this.minValue / this.step) * this.step;\n this.maxValue = Math.round(this.maxValue / this.step) * this.step;\n }\n\n @Watch('gap')\n handleGapChange(newValue: number) {\n if (!this.isRangeType) return;\n // Use the this.value prop value when the component is initialized\n // Otherwise, use the current this.min and this.max state values\n const value = !isNil(this.min) && !isNil(this.max) ? [this.min, this.max] : this.stringToObject(this.value);\n // If the gap is less than the min or greater than the max, set it to 0\n this.gap = newValue < value[0] || newValue > value[1] ? 0 : newValue;\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when change the value on range inputs */\n @Event() bqChange: EventEmitter<{ value: Exclude<TSliderValue, string>; el: HTMLBqSliderElement }>;\n\n /** Handler to be called when the slider loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSliderElement>;\n\n /** Handler to be called when the slider gets focused */\n @Event() bqFocus: EventEmitter<HTMLBqSliderElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.init();\n }\n\n componentDidLoad() {\n this.runUpdates();\n }\n\n componentDidUpdate() {\n this.runUpdates();\n }\n\n formAssociatedCallback() {\n this.internals?.setFormValue(`${this.value}`);\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private init = () => {\n this.handleGapChange(this.gap);\n this.setState(this.value);\n this.handleStepPropChange();\n };\n\n private runUpdates = () => {\n this.updateProgressTrack();\n this.syncInputsValue();\n this.setThumbPosition();\n };\n\n private setState = (newValue: TSliderValue) => {\n const isRangeType = this.isRangeType;\n const value = this.stringToObject(newValue);\n\n this.minValue = isRangeType ? clamp(value[0], this.min, this.max - this.gap) : value;\n this.maxValue = isRangeType ? clamp(value[1], this.minValue + this.gap, this.max) : this.minValue;\n };\n\n private setThumbPosition = () => {\n if (!this.enableTooltip) return;\n\n // Destructure the returned object from this.thumbPosition() and assign the properties to this.minThumbPosition and this.maxThumbPosition\n ({ minThumbPosition: this.minThumbPosition, maxThumbPosition: this.maxThumbPosition } = this.thumbPosition());\n };\n\n private syncInputsValue = () => {\n this.inputMinElem?.setAttribute('value', this.minValue.toString());\n this.inputMaxElem?.setAttribute('value', this.maxValue.toString());\n };\n\n private stringToObject = (value: TSliderValue) => (isString(value) ? JSON.parse(value) : value);\n\n private handleInputChange = (type: 'min' | 'max', event: InputEvent) => {\n const target = event.target as HTMLInputElement;\n const value = parseFloat(target.value);\n\n if (type === 'min') {\n this.minValue = this.isRangeType ? Math.min(value, this.maxValue - this.gap) : value;\n } else if (type === 'max') {\n this.maxValue = this.isRangeType ? Math.max(value, this.minValue + this.gap) : value;\n }\n\n // Update the input value to reflect the clamped value\n const reflectedValue = (type === 'min' ? this.minValue : this.maxValue).toString();\n target.value = reflectedValue;\n target.setAttribute('value', reflectedValue);\n\n // Sync the prop value.\n // This will trigger the `@Watch('value')` method and emit the `bqChange` event.\n const { internals, isRangeType, maxValue, minValue } = this;\n this.value = isRangeType ? [minValue, maxValue] : minValue;\n internals?.setFormValue(isRangeType ? JSON.stringify(this.value) : this.value.toString());\n if (isRangeType) this.el.setAttribute('value', JSON.stringify(this.value));\n };\n\n private calculatePercent = (value: number) => {\n const totalRange = Number(this.max) - Number(this.min);\n return ((value - this.min) / totalRange) * 100;\n };\n\n private updateProgressTrack = () => {\n if (!this.progressElem) return;\n\n // For range type, left starts from the `min` value and width is the difference between `max` and `min`.\n // For non-range type, left starts from 0 and width is the `min` value.\n const left = this.isRangeType ? this.calculatePercent(this.minValue) : 0;\n const width = this.isRangeType\n ? this.calculatePercent(Number(this.maxValue) - Number(this.minValue) + this.min)\n : this.calculatePercent(this.minValue);\n\n this.progressElem.style.insetInlineStart = `${left}%`;\n this.progressElem.style.inlineSize = `${width}%`;\n };\n\n private calculateThumbPosition = (value: number): number => {\n if (!this.progressElem) return 0;\n\n // Get the width of the track area and the size of the input range thumb\n const trackAreaWidth = this.trackElem.getBoundingClientRect().width;\n // We need to also add 4px to the thumb size,\n // this is because the thumb is 2px border (`border-m`)\n const inputThumbSize = parseInt(getComputedStyle(this.el).getPropertyValue('--bq-slider--thumb-size'), 10) + 4;\n const totalWidth = trackAreaWidth - inputThumbSize;\n\n return ((value - this.min) / (this.max - this.min)) * totalWidth + inputThumbSize / 2;\n };\n\n private thumbPosition = (): { minThumbPosition: number; maxThumbPosition?: number } => {\n const minThumbPosition = this.calculateThumbPosition(this.minValue);\n const maxThumbPosition = this.isRangeType ? this.calculateThumbPosition(this.maxValue) : undefined;\n\n return { minThumbPosition, maxThumbPosition };\n };\n\n private emitBqChange = () => {\n this.debounceBqChange?.cancel();\n\n const value: Exclude<TSliderValue, string> = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;\n this.debounceBqChange = debounce(() => this.bqChange.emit({ value, el: this.el }), this.debounceTime);\n\n this.debounceBqChange();\n };\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleMouseDown = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'remove');\n };\n\n private handleMouseUp = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'add');\n };\n\n private handleTooltipVisibility = (event: MouseEvent, action: 'add' | 'remove') => {\n if (!this.enableTooltip || this.tooltipAlwaysVisible) return;\n\n const target = event.target as HTMLElement;\n const tooltipElem = target === this.inputMinElem ? this.minTooltipElem : this.maxTooltipElem;\n tooltipElem.classList[action]('hidden');\n };\n\n private get decimalCount(): number {\n // Return the length of the decimal part of the step value.\n return (this.step % 1).toFixed(10).split('.')[1].replace(/0+$/, '').length;\n }\n\n private get isRangeType() {\n return this.type === 'range';\n }\n\n private get isTooltipAlwaysVisible(): boolean {\n return this.tooltipAlwaysVisible && this.enableTooltip;\n }\n\n private renderLabel = (value: number, position: 'start' | 'end', css?: string) => {\n return (\n <span\n class={{\n [`${css} is-fit min-is-8 box-content block font-medium text-primary text-s leading-regular [font-variant:tabular-nums]`]: true,\n hidden: position === 'start' ? !this.enableValueIndicator : !this.enableValueIndicator || !this.isRangeType,\n }}\n part={`label-${position}`}\n >\n {value.toFixed(this.decimalCount)}\n </span>\n );\n };\n\n private renderInput = (type: 'max' | 'min', value: number, refCallback: (input: HTMLInputElement) => void) => {\n // Determine the zIndex value based on the type and the current min and max values.\n const zIndexValue = (type: 'min' | 'max'): string => {\n const zIndex = {\n min: this.minValue === this.min && this.maxValue === this.minValue,\n max: this.maxValue === this.max && this.minValue === this.maxValue,\n };\n\n // If the value of both thumbs is the same as the min or max value, set the zIndex to -1\n return zIndex[type] ? '-1' : '0';\n };\n\n return (\n <input\n class={{\n '-translate-y-1/2 is-full absolute inset-bs-[50%] start-0 cursor-pointer appearance-none bg-transparent outline-none disabled:cursor-not-allowed': true,\n 'pointer-events-none': this.isRangeType,\n }}\n disabled={this.disabled}\n max={this.max}\n min={this.min}\n name={this.name}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onInput={(ev) => this.handleInputChange(type, ev)}\n onMouseDown={this.handleMouseDown}\n onMouseUp={this.handleMouseUp}\n part={`input-${type}`}\n ref={refCallback}\n step={this.step}\n style={this.isRangeType ? { zIndex: zIndexValue(type) } : undefined}\n type=\"range\"\n value={value}\n />\n );\n };\n\n private renderTooltip = (\n value: number,\n thumbPosition: number,\n refCallback: (elem: HTMLBqTooltipElement) => void,\n ): HTMLBqTooltipElement => (\n <bq-tooltip\n alwaysVisible={true}\n class={{\n 'absolute [&::part(panel)]:absolute': true,\n hidden: !this.isTooltipAlwaysVisible,\n }}\n distance={this.enableValueIndicator ? 6 : 16}\n exportparts=\"base,trigger,panel\"\n ref={refCallback}\n style={{ insetInlineStart: `${thumbPosition}px`, fontVariant: 'tabular-nums' }}\n >\n <div class=\"bs-1 is-1 absolute\" slot=\"trigger\" />\n {value.toFixed(this.decimalCount)}\n </bq-tooltip>\n );\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n aria-disabled={this.disabled ? 'true' : 'false'}\n class={{ 'is-full flex': true, 'cursor-not-allowed opacity-60': this.disabled }}\n part=\"base\"\n >\n {/* LABEL (start) */}\n {this.renderLabel(this.minValue, 'start', 'me-xs text-end')}\n {/* SLIDER */}\n <div class=\"is-full relative\" part=\"container\">\n {/* TRACK AREA */}\n <span\n class=\"-translate-y-1/2 bs-1 is-full absolute inset-bs-[50%] start-0 rounded-xs bg-[--bq-slider--trackarea-color]\"\n part=\"track-area\"\n ref={(elem) => {\n this.trackElem = elem;\n }}\n />\n {/* PROGRESS AREA */}\n <span\n class=\"-translate-y-1/2 bs-1 is-[50%] absolute inset-bs-[50%] rounded-xs bg-[--bq-slider--progress-color]\"\n part=\"progress-area\"\n ref={(elem) => {\n this.progressElem = elem;\n }}\n />\n {/* TOOLTIP on top of the value or min value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.renderTooltip(this.minValue, this.minThumbPosition, (elem) => {\n this.minTooltipElem = elem;\n })}\n {/* INPUT (Min), used on single type */}\n {this.renderInput('min', this.minValue, (input) => {\n this.inputMinElem = input;\n })}\n {/* TOOLTIP on top of the max value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.isRangeType &&\n this.renderTooltip(this.maxValue, this.maxThumbPosition, (elem) => {\n this.maxTooltipElem = elem;\n })}\n {/* INPUT (Max) */}\n {this.isRangeType &&\n this.renderInput('max', this.maxValue, (input) => {\n this.inputMaxElem = input;\n })}\n </div>\n {/* LABEL (end) */}\n {this.renderLabel(this.maxValue, 'end', 'ms-xs text-start')}\n </div>\n );\n }\n}\n"],"names":["isNil","clamp","isString","debounce","h"],"mappings":";;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,4yzBAA4yzB;;MC2DnzzB,QAAQ,GAAA,MAAA;;;;;;;;;;;;;;;;AAIX,IAAA,YAAY;AACZ,IAAA,YAAY;AACZ,IAAA,cAAc;AACd,IAAA,cAAc;AACd,IAAA,YAAY;AACZ,IAAA,SAAS;AACT,IAAA,gBAAgB;;;AAKL,IAAA,SAAS;;;;;AAO5B;;;AAGG;AACM,IAAA,QAAQ;;AAER,IAAA,QAAQ;;AAER,IAAA,gBAAgB;;AAEhB,IAAA,gBAAgB;;;;IAMA,YAAY,GAAG,CAAC;;IAGhB,QAAQ,GAAI,KAAK;;IAGjB,oBAAoB,GAAI,KAAK;;IAGd,GAAG,GAAG,CAAC;;IAGtB,GAAG,GAAG,GAAG;;IAGT,GAAG,GAAG,CAAC;;AAGP,IAAA,IAAI;AAE7B;;;AAGG;IACsB,IAAI,GAAG,CAAC;;IAGR,IAAI,GAAgB,QAAQ;AAErD;;;;AAIG;AACqC,IAAA,KAAK;;IAGpB,aAAa,GAAY,KAAK;AAEvD;;;AAGG;IACsB,oBAAoB,GAAY,KAAK;;;AAM9D,IAAA,qBAAqB,CAAC,QAAsB,EAAA;AAC1C,QAAA,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACvB,IAAI,CAAC,YAAY,EAAE;;IAIrB,oBAAoB,GAAA;AAClB,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI;AACjE,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAA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inner/scss/bq-spinner.scss?tag=bq-spinner&encapsulation=shadow","../../packages/beeq/src/components/spinner/bq-spinner.tsx"],"sourcesContent":["export const SPINNER_TEXT_POSITION = ['none', 'left', 'right', 'above', 'below'] as const;\nexport const SPINNER_SIZE = ['small', 'medium', 'large'] as const;\nexport type TSpinnerTextPosition = (typeof SPINNER_TEXT_POSITION)[number];\nexport type TSpinnerSize = (typeof SPINNER_SIZE)[number];\n","/* -------------------------------------------------------------------------- */\n/* Spinner styles */\n/* -------------------------------------------------------------------------- */\n@import './bq-spinner.variables';\n\n:host {\n @apply relative inline-block;\n}\n\n.bq-spinner {\n @apply flex;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Spinner loader size */\n/* -------------------------------------------------------------------------- */\n\n.bq-spinner--loader.large {\n @apply bs-[--bq-spinner--size-large] is-[--bq-spinner--size-large];\n}\n\n.bq-spinner--loader.medium {\n @apply bs-[--bq-spinner--size-medium] is-[--bq-spinner--size-medium];\n}\n\n.bq-spinner--loader.small {\n @apply bs-[--bq-spinner--size-small] is-[--bq-spinner--size-small];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Text position */\n/* -------------------------------------------------------------------------- */\n\n.text-left,\n.text-right {\n @apply flex-row items-center;\n\n &.has-text {\n @apply gap-x-m;\n }\n}\n\n.text-left {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-2;\n }\n\n .bq-spinner--text {\n @apply order-1;\n }\n}\n\n.text-right {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-1;\n }\n\n .bq-spinner--text {\n @apply order-2;\n }\n}\n\n.text-above,\n.text-below {\n @apply flex-col items-center;\n\n &.has-text {\n @apply gap-y-m;\n }\n}\n\n.text-above {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-2;\n }\n\n .bq-spinner--text {\n @apply order-1;\n }\n}\n\n.text-below {\n .bq-spinner--loader,\n .bq-spinner--icon {\n @apply order-1;\n }\n\n .bq-spinner--text {\n @apply order-2;\n }\n}\n\n/* -------------------------------------------------------------------------- */\n/* Animate slotted icon if provided */\n/* -------------------------------------------------------------------------- */\n\n.is-animated {\n .bq-spinner--icon,\n .bq-spinner--loader > svg {\n @include animation-spin;\n }\n}\n","import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\n\nimport {\n getCSSVariableValue,\n getTextContent,\n hasSlotContent,\n isHTMLElement,\n isNil,\n validatePropValue,\n} from '../../shared/utils';\nimport type { TSpinnerSize, TSpinnerTextPosition } from './bq-spinner.types';\nimport { SPINNER_SIZE, SPINNER_TEXT_POSITION } from './bq-spinner.types';\n\n/**\n * Spinners are designed for users to display data loading.\n *\n * @example How to use it\n * ```html\n * <bq-spinner size=\"medium\" text-position=\"bellow\">\n * <span>Loading...</span>\n * </bq-spinner>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/275f10-spinner/b/09d7b1\n * @status stable\n *\n * @attr {boolean} animation - If `false`, the animation on the icon element will be stopped.\n * @attr {\"small\" | \"medium\" | \"large\"} size - It defines the size of the icon element displayed.\n * @attr {\"above\" | \"below\" | \"left\" | \"right\" | \"none\"} text-position - It defines the position of the label text.\n *\n * @slot icon - The icon slot container.\n * @slot - The content of the spinner component.\n *\n * @part base - The div wrapper container used under the hood.\n * @part icon - The `<svg>` icon element used to spin/animate.\n * @part custom-icon - The `<span>` tag element that holds the custom icon element passed.\n * @part text - The `<span>` tag element that renders the label text inside the component.\n *\n * @cssprop --bq-spinner--color - Spinner color\n * @cssprop --bq-spinner--size-large - Spinner large size\n * @cssprop --bq-spinner--size-medium - Spinner medium size\n * @cssprop --bq-spinner--size-small - Spinner small size\n * @cssprop --bq-spinner--large-text-fontSize - Spinner large text font size\n * @cssprop --bq-spinner--medium-text-fontSize - Spinner medium text font size\n * @cssprop --bq-spinner--small-text-fontSize - Spinner small text font size\n * @cssprop --bq-spinner--text-lineHeight - Spinner text line height\n */\n@Component({\n tag: 'bq-spinner',\n styleUrl: './scss/bq-spinner.scss',\n shadow: true,\n})\nexport class BqSpinner {\n // Own Properties\n // ====================\n\n private iconSlotElem: HTMLElement;\n private slotElem: HTMLElement;\n private observer: MutationObserver = new MutationObserver((mutations) => {\n const [mutation] = mutations;\n this.slotContentLength = mutation.target.textContent.length;\n });\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSpinnerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasIconSlot = false;\n @State() private hasSlot = false;\n @State() private slotContentLength = 0;\n\n // Public Property API\n // ========================\n\n /** If `false`, the animation on the icon element will be stopped */\n @Prop({ reflect: true }) animation? = true;\n\n /** It defines the position of the label text */\n @Prop({ reflect: true }) textPosition: TSpinnerTextPosition = 'none';\n\n /** It defines the size of the icon element displayed */\n @Prop({ reflect: true }) size: TSpinnerSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('textPosition')\n handleTextPositionProp() {\n validatePropValue(SPINNER_TEXT_POSITION, 'none', this.el, 'textPosition');\n }\n\n @Watch('size')\n handleSizeProp() {\n validatePropValue(SPINNER_SIZE, 'medium', this.el, 'size');\n this.setIconSize();\n }\n\n @Watch('hasIconSlot')\n handleHasIconSlot() {\n this.setIconSize();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n this.handleIconSlotChange();\n this.setIconSize();\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleSlotChange = () => {\n if (!this.slotElem) return;\n\n this.hasSlot = hasSlotContent(this.slotElem);\n if (!this.hasSlot) return;\n\n const slot = this.slotElem.querySelector('slot') ?? null;\n if (isNil(slot)) return;\n\n this.slotContentLength = getTextContent(slot, { recurse: true }).length;\n const nodes = slot.assignedNodes({ flatten: true });\n nodes.forEach((node) => {\n this.observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n });\n };\n\n private handleIconSlotChange = (): void => {\n this.hasIconSlot = hasSlotContent(this.iconSlotElem, 'icon');\n };\n\n private checkPropValues = (): void => {\n validatePropValue(SPINNER_TEXT_POSITION, 'none', this.el, 'textPosition');\n validatePropValue(SPINNER_SIZE, 'medium', this.el, 'size');\n };\n\n private get isTextDisplayed(): boolean {\n return this.textPosition !== 'none';\n }\n\n private setIconSize(): void {\n if (!this.hasIconSlot || !this.bqIcon) return;\n\n this.bqIcon.size = parseInt(getCSSVariableValue(`bq-spinner--size-${this.size}`, this.el), 10).toString();\n }\n\n private get bqIcon(): HTMLBqIconElement | null {\n if (!this.hasIconSlot) return null;\n\n const slot = this.iconSlotElem.querySelector('slot');\n return [...slot.assignedElements({ flatten: true })].filter((el: Element) => isHTMLElement(el, 'bq-icon'))[0];\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n class={{\n [`bq-spinner ${this.size} text-${this.textPosition}`]: true,\n 'is-animated': this.animation,\n 'has-text': !!this.slotContentLength,\n }}\n part=\"base\"\n >\n {!this.hasIconSlot && (\n <div\n aria-label=\"Loading...\"\n class={`bq-spinner--loader ${this.size} relative text-[--bq-spinner--color]`}\n role=\"status\"\n >\n <svg aria-hidden=\"true\" class=\"bs-full is-full\" fill=\"currentColor\" viewBox=\"0 0 48 48\">\n <path\n d=\"M10.27 7.637c-.937-1.117-.798-2.796.415-3.605a24 24 0 0 1 37.09 23.249c-.2 1.444-1.65 2.301-3.064 1.944-1.414-.356-2.25-1.793-2.096-3.242A18.72 18.72 0 0 0 14.102 8.11c-1.237.77-2.895.643-3.832-.474Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M48 24c0 13.255-10.745 24-24 24S0 37.255 0 24 10.745 0 24 0s24 10.745 24 24ZM5.28 24c0 10.339 8.381 18.72 18.72 18.72 10.339 0 18.72-8.381 18.72-18.72 0-10.339-8.381-18.72-18.72-18.72C13.661 5.28 5.28 13.661 5.28 24Z\"\n fill=\"currentColor\"\n opacity=\".1\"\n />\n </svg>\n </div>\n )}\n <span\n class={{ 'bq-spinner--icon': true, flex: this.hasIconSlot, '!hidden': !this.hasIconSlot }}\n part=\"custom-icon\"\n ref={(spanElem) => {\n this.iconSlotElem = spanElem;\n }}\n >\n <slot name=\"icon\" onSlotchange={this.handleIconSlotChange} />\n </span>\n <span\n class={{\n 'bq-spinner--text font-medium text-primary leading-regular': true,\n '!hidden': !this.isTextDisplayed,\n }}\n part=\"text\"\n ref={(spanElem) => {\n this.slotElem = spanElem;\n }}\n >\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n );\n }\n}\n"],"names":["validatePropValue","hasSlotContent","slot","isNil","getTextContent","getCSSVariableValue","isHTMLElement","h"],"mappings":";;;;;;;;;;;;;;AAAO,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAU;AAClF,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;;ACDjE,MAAM,YAAY,GAAG,q8rBAAq8rB;;MCoD78rB,SAAS,GAAA,MAAA;;;;;;AAIZ,IAAA,YAAY;AACZ,IAAA,QAAQ;AACR,IAAA,QAAQ,GAAqB,IAAI,gBAAgB,CAAC,CAAC,SAAS,KAAI;AACtE,QAAA,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS;QAC5B,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM;AAC7D,KAAC,CAAC;;;;;IAWe,WAAW,GAAG,KAAK;IACnB,OAAO,GAAG,KAAK;IACf,iBAAiB,GAAG,CAAC;;;;IAMb,SAAS,GAAI,IAAI;;IAGjB,YAAY,GAAyB,MAAM;;IAG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GAAG,QAAQ;AAC9B,aAAC,EAAA,EAEDA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,IAAI,CAAC,oBAAoB,EAAA,CAAI,CACxD,EACPA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,2DAA2D,EAAE,IAAI;AACjE,gBAAA,SAAS,EAAE,CAAC,IAAI,CAAC,eAAe;aACjC,EACD,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,CAAC,QAAQ,KAAI;AAChB,gBAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ;aACzB,EAAA,EAEDA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAI,CAAA,CACxC,CACH;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bq-status.entry.cjs.js","sources":["../../packages/beeq/src/components/status/bq-status.types.ts","../../packages/beeq/src/components/status/scss/bq-status.scss?tag=bq-status&encapsulation=shadow","../../packages/beeq/src/components/status/bq-status.tsx"],"sourcesContent":["export const STATUS_TYPE = ['alert', 'danger', 'info', 'neutral', 'success'] as const;\nexport type TStatusType = (typeof STATUS_TYPE)[number];\n","@import './bq-status.variables';\n\n.bq-status__circle {\n &::part(base) {\n --bq-badge--size-medium: var(--bq-status-circle--size);\n }\n\n &.success::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.success);\n }\n\n &.danger::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.danger);\n }\n\n &.neutral::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.secondary);\n }\n\n &.alert::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.warning);\n }\n\n &.info::part(base) {\n --bq-badge--background-color: theme(backgroundColor.ui.brand);\n }\n}\n\n.bq-status__text ::slotted(*) {\n @apply text-s font-medium leading-regular text-primary p-b-0 p-i-0 m-b-0 m-i-0;\n}\n","import { Component, Element, h, Prop, Watch } from '@stencil/core';\n\nimport { validatePropValue } from '../../shared/utils';\nimport type { TStatusType } from './bq-status.types';\nimport { STATUS_TYPE } from './bq-status.types';\n\n/**\n * The Status Component is a UI element that represents the current state or condition of an item, task, or process.\n *\n * @example How to use it\n * ```html\n * <bq-status type=\"alert\">Alert status</bq-status>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/46c8d5-status/b/09d7b1\n * @status stable\n *\n * @dependency bq-badge\n *\n * @attr {\"alert\" | \"danger\" | \"info\" | \"neutral\" | \"success\"} type - It defines the type of status to display.\n *\n * @slot The content of the status component.\n *\n * @part base - The component's internal wrapper of the status component.\n * @part circle - The colored circle that marks the status type.\n * @part text - The `<div>` container that holds the text label of the status component.\n *\n * @cssprop --bq-status-circ - Status circle size.\n */\n@Component({\n tag: 'bq-status',\n styleUrl: './scss/bq-status.scss',\n shadow: true,\n})\nexport class BqStatus {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqStatusElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** It defines the type of status to display */\n @Prop({ reflect: true }) type: TStatusType = 'neutral';\n\n // Prop lifecycle events\n // =======================\n @Watch('type')\n checkPropValues() {\n validatePropValue(STATUS_TYPE, 'neutral', this.el, 'type');\n }\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n // render() function\n // Always the last one in the class.\n // ===================================\n render() {\n return (\n <div class=\"bq-status inline-flex items-center gap-xs\" part=\"base\" role=\"status\">\n <bq-badge class={`bq-status__circle rounded-full ${this.type}`} part=\"circle\" size=\"medium\" />\n <div\n class=\"bq-status__text max-bs-[20px] m-b-0 m-i-0 p-b-0 p-i-0 font-medium text-primary text-s leading-regular\"\n part=\"text\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"names":["validatePropValue","h"],"mappings":";;;;;;;;;AAAO,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAU;;ACArF,MAAM,WAAW,GAAG,ykpBAAykpB;;MCkChlpB,QAAQ,GAAA,MAAA;;;;;;;;;;;IAgBM,IAAI,GAAgB,SAAS;;;IAKtD,eAAe,GAAA;QACbA,uBAAiB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC;;;;;;;;IAU5D,iBAAiB,GAAA;QACf,IAAI,CAAC,eAAe,EAAE;;;;;;;;;;;;;;;;;IAoBxB,MAAM,GAAA;AACJ,QAAA,QACEC,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,2CAA2C,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,QAAQ,EAAA,EAC9EA,OAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,KAAK,EAAE,kCAAkC,IAAI,CAAC,IAAI,CAAE,CAAA,EAAE,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAG,CAAA,EAC9FA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,uGAAuG,EAC7G,IAAI,EAAC,MAAM,EAAA,EAEXA,OAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ,CACF;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bq-step-item.entry.cjs.js","sources":["../../packages/beeq/src/components/step-item/bq-step-item.types.ts","../../packages/beeq/src/components/step-item/scss/bq-step-item.scss?tag=bq-step-item&encapsulation=shadow","../../packages/beeq/src/components/step-item/bq-step-item.tsx"],"sourcesContent":["export const STEP_ITEM_STATUS = ['default', 'current', 'completed', 'error', 'disabled'] as const;\nexport type TStepItemStatus = (typeof STEP_ITEM_STATUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Step item styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-step-item.variables';\n\n:host {\n --bq-icon--color: theme(stroke.icon.primary);\n // !Note: The use of the `bg-primary` is to avoid the divider to be visible behind the step item.\n @apply bg-primary;\n}\n\n.bq-step-item {\n @apply flex gap-s rounded-m border-none bg-transparent pe-[--bq-steps--gap] ps-0 p-b-xs2 focus-visible:focus hover:bg-hover-ui-secondary;\n @apply transition-colors duration-300;\n}\n\n.bq-step-item__prefix.dot,\n.bq-step-item__prefix.icon {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color);\n }\n\n &.current {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-current);\n }\n }\n\n &.completed {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-completed);\n }\n }\n\n &.error {\n ::slotted(bq-icon) {\n --bq-icon--color: var(--bq-step-item--prefix-color-error);\n }\n }\n\n &.disabled {\n ::slotted(bq-icon) {\n opacity: 0.6;\n }\n }\n}\n\n.bq-step-item__prefix.numeric {\n @apply flex items-center justify-center rounded-full;\n @apply bg-[--bq-step-item--prefix-num-bg-color] bs-[--bq-step-item--prefix-num-size] is-[--bq-step-item--prefix-num-size];\n @apply text-m font-semibold leading-regular text-primary;\n\n &.small {\n @apply text-s [--bq-step-item--prefix-num-size:--bq-spacing-l];\n }\n\n // Status\n\n &.current {\n @apply bg-[var(--bq-step-item--prefix-color-current)] text-alt;\n }\n\n &.completed {\n @apply bg-ui-success-alt text-success;\n }\n\n &.error {\n @apply bg-ui-danger-alt text-danger;\n }\n\n &.disabled {\n @apply opacity-60;\n }\n}\n\n.bq-step-item__content--description::slotted(*) {\n @apply text-s leading-regular opacity-60;\n}\n","import type { EventEmitter } from '@stencil/core';\nimport { Component, Element, Event, h, Prop, Watch } from '@stencil/core';\n\nimport { isHTMLElement, validatePropValue } from '../../shared/utils';\nimport type { TStepsSize, TStepsType } from '../steps/bq-steps.types';\nimport { STEPS_SIZE } from '../steps/bq-steps.types';\nimport type { TStepItemStatus } from './bq-step-item.types';\nimport { STEP_ITEM_STATUS } from './bq-step-item.types';\n\n/**\n * The Step Item Component is a UI element used to display a single step or stage in a process or task.\n * It should be used inside the Steps component.\n *\n * @example How to use it\n * ```html\n * <bq-step-item status=\"completed\">\n * <bq-icon slot=\"prefix\" name=\"check-circle\"></bq-icon>\n * <span>Title</span>\n * <span slot=\"description\">Description</span>\n * </bq-step-item>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/896b66-stepper\n * @status stable\n *\n * @attr {\"small\" | \"medium\"} size - It defines prefix size\n * @attr {\"completed\" | \"current\" | \"error\" | \"default\" | \"disabled\"} status - It defines step item appearance based on its status\n * @attr {\"numeric\" | \"icon\" | \"dot\"} type - It defines the step item type used\n *\n * @event bqClick - Callback handler emitted when the step item is clicked\n *\n * @slot - The step item content\n * @slot prefix - The step item prefix\n * @slot description - The step item description\n *\n * @part base - The component's base wrapper.\n * @part title - The component's title.\n * @part description - The component's description.\n *\n * @cssprop --bq-step-item--prefix-color - Color of the prefix icon\n * @cssprop --bq-step-item--prefix-color-current - Color of the prefix icon when current\n * @cssprop --bq-step-item--prefix-color-completed - Color of the prefix icon when completed\n * @cssprop --bq-step-item--prefix-color-error - Color of the prefix icon when error\n * @cssprop --bq-step-item--prefix-num-size - Size of the prefix number\n * @cssprop --bq-step-item--prefix-num-bg-color - Background color of the prefix number\n */\n@Component({\n tag: 'bq-step-item',\n styleUrl: './scss/bq-step-item.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqStepItem {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqStepItemElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** It defines prefix size */\n @Prop({ reflect: true }) size?: TStepsSize = 'medium';\n\n /** It defines step item appearance based on its status */\n @Prop({ reflect: true, mutable: true }) status?: TStepItemStatus = 'default';\n\n /** It defines the step item type used */\n @Prop({ reflect: true }) type?: TStepsType;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n @Watch('status')\n checkPropValues() {\n validatePropValue(STEPS_SIZE, 'medium', this.el, 'size');\n validatePropValue(STEP_ITEM_STATUS, 'default', this.el, 'status');\n\n this.handleIconPrefix();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler triggered when the step item is clicked */\n @Event() bqClick: EventEmitter<HTMLBqStepItemElement>;\n\n /** Callback handler triggered when the step item is focused */\n @Event() bqFocus: EventEmitter<HTMLBqStepItemElement>;\n\n /** Callback handler triggered when the step item loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqStepItemElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.checkPropValues();\n }\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleIconPrefix();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleClick = async () => {\n if (this.isDisabled || this.isCurrent) return;\n\n const clickEvent = this.bqClick.emit(this.el);\n if (clickEvent.defaultPrevented) return;\n\n const stepsParent = this.el.closest('bq-steps');\n if (!stepsParent) return;\n\n await stepsParent.setCurrentStepItem(this.el);\n };\n\n private handleIconPrefix = () => {\n const iconElem = this.el.querySelector('[slot=\"prefix\"]');\n if (!iconElem || !isHTMLElement(iconElem, 'bq-icon')) return;\n\n iconElem.size = this.size === 'small' ? 24 : 32;\n };\n\n private get isDisabled(): boolean {\n return this.status === 'disabled';\n }\n\n private get isCurrent(): boolean {\n return this.status === 'current';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <button\n class={{\n 'bq-step-item': true,\n [`bq-step-item--${this.status}`]: true,\n 'pointer-events-none opacity-60': this.isDisabled,\n }}\n disabled={this.isDisabled}\n onBlur={this.handleBlur}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n part=\"base\"\n type=\"button\"\n >\n <div class={`bq-step-item__prefix relative ${this.type} ${this.size} ${this.status}`}>\n <slot name=\"prefix\" onSlotchange={this.handleIconPrefix} />\n </div>\n <div class=\"bq-step-item__content items-start text-start\">\n {/* TITLE */}\n <div\n class={{\n 'bq-step-item__content--title pe-xs3 text-m text-primary leading-regular': true,\n 'pointer-events-none': this.isDisabled,\n 'text-brand': this.isCurrent,\n }}\n part=\"title\"\n >\n <slot />\n </div>\n {/* DESCRIPTION */}\n <div\n class={{\n 'bq-step-item__content--description text-s text-secondary leading-regular': true,\n 'opacity-60': this.isDisabled,\n }}\n part=\"description\"\n >\n <slot name=\"description\" />\n </div>\n </div>\n </button>\n );\n }\n}\n"],"names":["validatePropValue","STEPS_SIZE","isHTMLElement","h"],"mappings":";;;;;;;;;;;AAAO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,CAAU;;ACAjG,MAAM,aAAa,GAAG,2qxBAA2qxB;;MCqDprxB,UAAU,GAAA,MAAA;;;;;;;;;;;;;;IAgBI,IAAI,GAAgB,QAAQ;;IAGb,MAAM,GAAqB,SAAS;;AAGnD,IAAA,IAAI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AE;AACL,gBAAA,yEAAyE,EAAE,IAAI;gBAC/E,qBAAqB,EAAE,IAAI,CAAC,UAAU;gBACtC,YAAY,EAAE,IAAI,CAAC,SAAS;aAC7B,EACD,IAAI,EAAC,OAAO,EAAA,EAEZA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACJ,EAENA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,0EAA0E,EAAE,IAAI;gBAChF,YAAY,EAAE,IAAI,CAAC,UAAU;aAC9B,EACD,IAAI,EAAC,aAAa,EAAA,EAElBA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,aAAa,EAAA,CAAG,CACvB,CACF,CACC;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bq-steps.entry.cjs.js","sources":["../../packages/beeq/src/components/steps/scss/bq-steps.scss?tag=bq-steps&encapsulation=shadow","../../packages/beeq/src/components/steps/bq-steps.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Steps styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-steps.variables';\n\n:host {\n @apply block;\n}\n\n::slotted(bq-step-item:not(:first-child)) {\n @apply ps-[--bq-steps--gap];\n}\n","import { Component, Element, h, Method, Prop, Watch } from '@stencil/core';\n\nimport { validatePropValue } from '../../shared/utils';\nimport type { TStepsSize, TStepsType } from './bq-steps.types';\nimport { STEPS_SIZE, STEPS_TYPE } from './bq-steps.types';\n\n/**\n * The Steps Component is a UI element used to display a series of steps or stages in a process or task.\n * It is used to guide users through a process or task and to indicate their progress.\n *\n * @example How to use it\n * ```html\n * <bq-steps divider-color=\"stroke--primary\" type=\"dot\" size=\"medium\">\n * <bq-step-item status=\"completed\"> ... </bq-step-item>\n * <bq-step-item status=\"error\"> ... </bq-step-item>\n * <bq-step-item status=\"current\"> ... </bq-step-item>\n * <bq-step-item status=\"default\"> ... </bq-step-item>\n * </bq-steps>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/896b66-stepper\n * @status stable\n *\n * @dependency bq-divider\n *\n * @attr {string} divider-color - The color of the line that connects the steps. It should be a valid declarative color token.\n * @attr {\"medium\" | \"small\"} size - The size of the steps\n * @attr {\"numeric\" | \"icon\" | \"dot\"} type - The type of prefix element to use on the step items\n *\n * @slot - The step items\n *\n * @part container - The container wrapper of the Steps component\n * @part divider-base - The base wrapper of the divider component\n * @part divider-dash-start - The dash start wrapper of the divider component\n * @part divider-dash-end - The dash end wrapper of the divider component\n *\n * @cssprop --bq-steps--divider-color - Divider color\n * @cssprop --bq-steps--gap - Gap between steps\n */\n@Component({\n tag: 'bq-steps',\n styleUrl: './scss/bq-steps.scss',\n shadow: true,\n})\nexport class BqSteps {\n // Own Properties\n // ====================\n\n private stepElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqStepsElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** The color of the line that connects the steps. It should be a valid declarative color token. */\n @Prop({ reflect: true }) dividerColor: string = 'stroke--primary';\n\n /** The size of the steps */\n @Prop({ reflect: true }) size: TStepsSize = 'medium';\n\n /** The type of prefix element to use on the step items */\n @Prop({ reflect: true }) type: TStepsType;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('type')\n @Watch('size')\n checkPropValues() {\n validatePropValue(STEPS_SIZE, 'medium', this.el, 'size');\n validatePropValue(STEPS_TYPE, 'numeric', this.el, 'type');\n\n this.setStepItemProps();\n }\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.setStepItemProps();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Set the current step item.\n * @param newCurrentStep - The step item to set as current.\n */\n @Method()\n async setCurrentStepItem(newCurrentStep: HTMLBqStepItemElement): Promise<void> {\n // Ideally, only one step item should be current.\n // So we change the status of the current step item to default.\n const currentStep = this.bqSteps.find((step) => step.status === 'current');\n if (currentStep) currentStep.status = 'default';\n // And then we set the status of the new current step item to current.\n newCurrentStep.status = 'current';\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private get bqSteps(): HTMLBqStepItemElement[] {\n if (!this.stepElem) return [];\n\n const slot = this.stepElem.querySelector('slot');\n return [...slot.assignedElements({ flatten: true })].filter(\n (el: HTMLBqSideMenuItemElement) => el.tagName.toLowerCase() === 'bq-step-item',\n ) as [HTMLBqSideMenuItemElement];\n }\n\n private setStepItemProps = () => {\n this.bqSteps.forEach((bqStepElem: HTMLBqStepItemElement) => {\n bqStepElem.size = this.size;\n bqStepElem.type = this.type;\n });\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n // !Note: We use a custom padding value for the medium size to avoid misalignment between the steps and the divider.\n const dividerPaddingTop = this.size === 'small' ? 'p-bs-m' : 'p-bs-5';\n\n return (\n <div\n class=\"relative flex w-full items-start justify-between\"\n part=\"container\"\n ref={(div) => {\n this.stepElem = div;\n }}\n >\n <slot />\n <bq-divider\n class={`-z-10 absolute inset-ie-0 inset-is-0 p-i-s ${dividerPaddingTop}`}\n exportparts=\"base:divider-base,dash-start:divider-dash-start,dash-end:divider-dash-end\"\n strokeColor={this.dividerColor}\n strokeThickness={2}\n />\n </div>\n );\n }\n}\n"],"names":["validatePropValue","STEPS_SIZE","STEPS_TYPE","h"],"mappings":";;;;;;;;;;AAAA,MAAM,UAAU,GAAG,g/nBAAg/nB;;MC4Ct/nB,OAAO,GAAA,MAAA;;;;;;AAIV,IAAA,QAAQ;;;;;;;;IAeS,YAAY,GAAW,iBAAiB;;IAGxC,IAAI,GAAe,QAAQ;;AAG3B,I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iBAAiB,GAAG,IAAI,CAAC,IAAI,KAAK,OAAO,GAAG,QAAQ,GAAG,QAAQ;QAErE,QACEC,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,kDAAkD,EACxD,IAAI,EAAC,WAAW,EAChB,GAAG,EAAE,CAAC,GAAG,KAAI;AACX,gBAAA,IAAI,CAAC,QAAQ,GAAG,GAAG;aACpB,EAAA,EAEDA,OAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EACRA,OACE,CAAA,YAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,CAAA,2CAAA,EAA8C,iBAAiB,CAAE,CAAA,EACxE,WAAW,EAAC,2EAA2E,EACvF,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,eAAe,EAAE,CAAC,EAAA,CAClB,CACE;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bq-steps.types-D4B3f19X.js","sources":["../../packages/beeq/src/components/steps/bq-steps.types.ts"],"sourcesContent":["export const STEPS_TYPE = ['numeric', 'icon', 'dot'] as const;\nexport type TStepsType = (typeof STEPS_TYPE)[number];\n\nexport const STEPS_SIZE = ['medium', 'small'] as const;\nexport type TStepsSize = (typeof STEPS_SIZE)[number];\n"],"names":[],"mappings":";;;;;;AAAa,MAAA,UAAU,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK;MAGtC,UAAU,GAAG,CAAC,QAAQ,EAAE,OAAO;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bq-switch.entry.cjs.js","sources":["../../packages/beeq/src/components/switch/scss/bq-switch.scss?tag=bq-switch&encapsulation=shadow","../../packages/beeq/src/components/switch/bq-switch.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Switch styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-switch.variables';\n\n:host {\n @apply inline-block;\n}\n\n:host(.full-width) {\n @apply is-full;\n}\n\n.bq-switch {\n @apply flex cursor-pointer select-none items-center rounded-s transition-colors duration-300 p-b-2 p-i-2;\n\n justify-content: var(--bq-switch--justify-content);\n\n // Display background on hover (if enabled)\n &.has-background:not(.is-disabled):hover {\n @apply bg-hover-ui-primary;\n }\n\n &.is-disabled {\n @apply cursor-not-allowed opacity-60;\n }\n}\n\n.bq-switch--input:not(:disabled):focus,\n.bq-switch--input:not(:disabled):focus-visible {\n ~ .bq-switch--control {\n @apply focus;\n }\n}\n\n.bq-switch--control__dot {\n @apply absolute start-xs2 rounded-full bg-ui-primary bs-[--bq-switch--dot-size] is-[--bq-switch--dot-size];\n @apply group-[&.is-checked]:start-[calc(100%_-_var(--bq-switch--dot-size)_-_var(--bq-spacing-xs2))] group-[&.is-checked]:bg-[--bq-icon--alt];\n @apply transition-all duration-300;\n}\n\n.bq-switch--control__icon {\n --bq-icon--size: var(--bq-switch--dot-size) !important;\n\n &::part(base) {\n @apply flex;\n }\n}\n","import type { EventEmitter } from '@stencil/core';\nimport { AttachInternals, Component, Element, Event, Host, h, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { getTextContent, isNil } from '../../shared/utils';\nimport type { TSwitchInnerLabel, TSwitchJustifyContent } from './bq-switch.types';\n\n/**\n * Toggle switches are digital on/off switches.\n * They should provide immediate results, giving users the freedom to control their preferences as needed.\n *\n * @example How to use it\n * ```html\n * <bq-switch inner-label=\"default\" justify-content=\"start\" name=\"bq-switch\" value=\"Switch value\">\n * Toggle me!\n * </bq-switch>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/49d9c9-switch\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {boolean} background-on-hover - If `true`, a background will be displayed on hover\n * @attr {boolean} checked - It indicates whether if the switch is `ON` by default (when the page loads)\n * @attr {boolean} disabled - If `true`, the switch control will be disabled and no interaction will be allowed\n * @attr {string} form-validation-message - The native form validation message\n * @attr {boolean} full-width - If `true`, the component will take the full width space available on the parent container\n * @attr {\"default\" | \"icon\"} inner-label - It indicates how to to display the on/off marks inside the control, with icons or none (default)\n * @attr {\"start\" | \"end\" | \"center\" | \"space-between\" | \"space-around\" | \"space-evenly\"} justify-content - It defines how to distribute the space between and around the control and the label text\n * @attr {string} name - Name of the form control. Submitted with the form as part of a name/value pair\n * @attr {boolean} required - If `true`, it will indicate that the user must switch `ON` the element before the owning form can be submitted\n * @attr {boolean} reverse-order - If `true`, the order of the control and the label text will be changed\n * @attr {string} value - The input control's value, submitted as a name/value pair with form data\n *\n * @event bqChange - Handler to be called when the switch state changes\n * @event bqFocus - Handler to be called when the switch gets focus\n * @event bqBlur - Handler to be called when the switch loses focus\n *\n * @slot - The switch label text\n *\n * @part base - HTML `<label>` root container\n * @part control - HTML `<div>` element for the custom control\n * @part dot - HTML `<div>` element that acts as changing dot\n * @part icon-off - HTMLBqIcon `<pk-icon>` element used as the `OFF` mark inner label\n * @part icon-on - HTMLBqIcon `<pk-icon>` element used as the `ON` mark inner label\n * @part label - HTML `<span>` element that holds the label text\n *\n * @cssprop --bq-switch--height - Switch height\n * @cssprop --bq-switch--justify-content - Switch justify content\n * @cssprop --bq-switch--width - Switch width\n * @cssprop --bq-switch--dot-size - Switch dot size\n */\n@Component({\n tag: 'bq-switch',\n styleUrl: './scss/bq-switch.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSwitch {\n // Own Properties\n // ====================\n\n private labelElem: HTMLSpanElement;\n private inputElem: HTMLInputElement;\n private prevCheckedValue: boolean;\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals!: ElementInternals;\n @Element() el!: HTMLBqSwitchElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasLabel = false;\n\n // Public Property API\n // ========================\n\n /** If true, a background will be displayed on hover */\n @Prop({ reflect: true }) backgroundOnHover?: boolean = false;\n\n /** It indicates whether if the switch is `ON` by default (when the page loads) */\n @Prop({ reflect: true, mutable: true }) checked?: boolean = false;\n\n /** If true, the switch control will be disabled and no interaction will be allowed */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** The native form validation message */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /** If true, the component will take the full width space available on the parent container */\n @Prop({ reflect: true }) fullWidth?: boolean = false;\n\n /** It indicates how to to display the on/off marks inside the control, with icons or none (default) */\n @Prop({ reflect: true }) innerLabel?: TSwitchInnerLabel = 'default';\n\n /**\n * It defines how to distribute the space between and around the control and the label text\n * (https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content)\n */\n @Prop({ reflect: true }) justifyContent?: TSwitchJustifyContent = 'start';\n\n /** Name of the form control. Submitted with the form as part of a name/value pair */\n @Prop({ reflect: true }) name!: string;\n\n /** If `true`, it will indicate that the user must switch `ON` the element before the owning form can be submitted */\n @Prop({ reflect: true }) required?: boolean = false;\n\n /** If true, the order of the control and the label text will be changed */\n @Prop({ reflect: true }) reverseOrder?: boolean = false;\n\n /** The input control's value, submitted as a name/value pair with form data. */\n @Prop({ reflect: true }) value?: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('required')\n handleRequiredChange() {\n this.updateFormValidity();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the switch state changes */\n @Event() bqChange: EventEmitter<{ checked: boolean }>;\n\n /** Handler to be called when the switch gets focus */\n @Event() bqFocus: EventEmitter<HTMLBqSwitchElement>;\n\n /** Handler to be called when the switch loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSwitchElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.prevCheckedValue = this.checked;\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n componentDidUpdate() {\n /**\n * We need to trigger the `bqChange` immediately after the first update happens\n * so the checked attribute get applied, otherwise, a delay will happen\n * between the event emits and when the checked attribute value gets reflected in the element host.\n */\n if (this.checked !== this.prevCheckedValue) {\n this.bqChange.emit({ checked: this.checked });\n this.prevCheckedValue = this.checked;\n }\n }\n\n formAssociatedCallback() {\n this.setFormValue(this.checked);\n this.updateFormValidity();\n }\n\n formResetCallback() {\n // Reset the form value and validity state\n this.checked = false;\n this.inputElem.removeAttribute('checked');\n this.internals?.setFormValue(undefined);\n this.updateFormValidity();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Simulate a click event on the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.click()`.\n */\n @Method()\n async vClick() {\n this.inputElem?.click();\n }\n\n /**\n * Sets focus on the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.focus()`.\n */\n @Method()\n async vFocus() {\n this.inputElem?.focus();\n }\n\n /**\n * Remove focus from the native `<input>` HTML element used under the hood.\n * Use this method instead of the global `element.blur()`.\n */\n @Method()\n async vBlur() {\n this.inputElem?.blur();\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleChange = () => {\n this.checked = !this.checked;\n this.inputElem.setAttribute('checked', `${this.checked}`);\n this.setFormValue(this.checked);\n this.updateFormValidity();\n };\n\n private handleOnFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleOnBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleSlotChange = () => {\n const slot = this.labelElem?.querySelector('slot') ?? null;\n if (isNil(slot)) return;\n\n this.hasLabel = !!getTextContent(slot, { recurse: true }).length;\n };\n\n private setFormValue = (checked: boolean) => {\n const value = checked ? 'on' : undefined;\n // Set form value based on the checked state\n // Here we also pass the state of the component (2nd argument) as the state of the form control\n // Details: https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/setFormValue\n this.internals?.setFormValue(value, `${this.checked}`);\n };\n\n private updateFormValidity = () => {\n const { formValidationMessage, internals, required, checked, inputElem } = this;\n // Clear the validity state\n internals?.states.clear();\n\n if (!(required && !checked)) {\n // If the switch component is not required or is checked, set the validity state to valid\n internals?.states.add('valid');\n internals?.setValidity({});\n return;\n }\n\n // Set validity state based on the required property and checked state\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, inputElem);\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const hostStyle = {\n ...(this.justifyContent && { '--bq-switch--justify-content': this.justifyContent }),\n };\n\n const labelCssClasses = {\n 'has-background': this.backgroundOnHover,\n 'is-checked': this.checked,\n 'is-disabled': this.disabled,\n 'flex-row-reverse': this.reverseOrder,\n };\n\n return (\n <Host class={{ 'full-width': this.fullWidth }} style={hostStyle}>\n <label class={{ 'bq-switch group': true, ...labelCssClasses }} part=\"base\">\n {/* Hidden native HTML input */}\n <input\n aria-checked={this.checked ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-label={this.name}\n checked={this.checked}\n class=\"bq-switch--input peer !bs-[--bq-switch--dot-size] !is-[--bq-switch--width] sr-only peer-checked:invisible\"\n disabled={this.disabled}\n name={!isNil(this.name) ? this.name : undefined}\n onBlur={this.handleOnBlur}\n onChange={this.handleChange}\n onFocus={this.handleOnFocus}\n ref={(input) => {\n this.inputElem = input;\n }}\n required={this.required}\n role=\"switch\"\n type=\"checkbox\"\n value={this.value}\n />\n {/* Control */}\n <div\n class=\"bq-switch--control bs-[--bq-switch--height] is-[--bq-switch--width] relative box-border flex justify-between rounded-full bg-ui-tertiary p-b-xs2 p-i-xs2 transition duration-300 group-[&.is-checked]:bg-ui-brand\"\n part=\"control\"\n >\n {this.innerLabel === 'icon' && (\n <bq-icon class=\"bq-switch--control__icon on\" color=\"icon--alt\" name=\"check\" part=\"icon-on\" title=\"On\" />\n )}\n {this.innerLabel === 'icon' && (\n <bq-icon\n class=\"bq-switch--control__icon off\"\n color=\"icon--inverse\"\n name=\"x\"\n part=\"icon-off\"\n title=\"Off\"\n />\n )}\n {/* Dot */}\n <div class=\"bq-switch--control__dot\" part=\"dot\" />\n </div>\n {/* Label */}\n <span\n class={{\n 'bq-switch--label font-medium text-m text-primary leading-regular transition-colors duration-300': true,\n 'ms-s': this.hasLabel && !this.reverseOrder,\n 'me-s': this.hasLabel && this.reverseOrder,\n }}\n part=\"label\"\n ref={(span) => {\n this.labelElem = span;\n }}\n >\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n </label>\n </Host>\n );\n }\n}\n"],"names":["slot","isNil","getTextContent","h","Host"],"mappings":";;;;;;;;;;AAAA,MAAM,WAAW,GAAG,mlwBAAmlwB;;MC4D1lwB,QAAQ,GAAA,MAAA;;;;;;;;;;;;;;;;AAIX,IAAA,SAAS;AACT,IAAA,SAAS;AACT,IAAA,gBAAgB;;;AAKL,IAAA,SAAS;;;;;IAOnB,QAAQ,GAAG,KAAK;;;;IAMA,iBAAiB,GAAa,KAAK;;IAGpB,OAAO,GAAa,KAAK;;IAGxC,QAAQ,GAAa,KAAK;;AAG1B,IAAA,qBAAqB;;IAGrB,SAAS,GAAa,KAAK;;IAG3B,UAAU,GAAuB,SAAS;AAEnE;;;AAGG;IACsB,cAAc,GAA2B,OAAO;;AAGhD,IAAA,IAAI;;IAGJ,QAAQ,GAAa,KAAK;;IAG1B,YAAY,GAAa,KAAK;;AAG9B,IAAA,KAAK;;;IAM9B,oBAAoB,GAAA;QAClB,IAAI,CAAC,kBAAkB,EAAE;;;;;;AAQlB,IAAA,QAAQ;;AAGR,IAAA,OAAO;;AAGP,IAAA,MAAM;;;;IAMf,iBAAiB,GAAA;AACf,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,OAAO;;IAGtC,gBAAgB,GAAA;QACd,IAAI,CAAC,gBAAgB,EAAE;;IAGzB,kBAAkB,GAAA;AAChB;;;;AAIG;QACH,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,gBAAgB,EAAE;AAC1C,YAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,C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ources":["../../packages/beeq/src/components/tab-group/scss/bq-tab-group.scss?tag=bq-tab-group&encapsulation=shadow","../../packages/beeq/src/components/tab-group/bq-tab-group.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Tab styles */\n/* -------------------------------------------------------------------------- */\n\n:host {\n @apply block;\n}\n\n.bq-tab-group {\n @apply relative;\n\n &::after {\n @apply absolute flex border-0 border-solid border-primary content-empty;\n }\n\n &--horizontal-start,\n &--horizontal-end {\n &::after {\n @apply is-full inset-be-0 [border-block-end-width:--bq-stroke-s];\n }\n }\n\n &--horizontal-start {\n @apply justify-start;\n }\n\n &--horizontal-end {\n @apply justify-end;\n }\n\n &--vertical-start::after {\n @apply end-0 bs-full is-0 [border-block-end-width:0px] [border-inline-end-width:--bq-stroke-s];\n }\n\n &--vertical-end::after {\n @apply start-0 bs-full is-0 [border-block-end-width:0px] [border-inline-start-width:--bq-stroke-s];\n }\n}\n\n.bq-tab-group.no-divider {\n &::after {\n @apply content-none;\n }\n}\n\n.bq-tab-group--container {\n @include hide-scrollbar;\n @apply gap-xs2 p-xs2; // This will avoid cutting the outline focus style\n}\n","import type { EventEmitter } from '@stencil/core';\nimport { Component, Element, Event, Host, h, Listen, Prop, Watch } from '@stencil/core';\n\nimport { debounce, getNextElement, isHTMLElement, isNil, type TDebounce, validatePropValue } from '../../shared/utils';\nimport type { TTabOrientation, TTabPlacement, TTabSize } from '../tab/bq-tab.types';\nimport { TAB_ORIENTATION, TAB_PLACEMENT, TAB_SIZE } from '../tab/bq-tab.types';\n\n/**\n * The tab group is a user interface element that allows users wrap a set of tab items.\n *\n * @example How to use it\n * ```html\n * <bq-tab-group value=\"5\">\n * <bq-tab tab-id=\"1\">Tab</bq-tab>\n * <bq-tab tab-id=\"2\" active>Tab</bq-tab>\n * <bq-tab tab-id=\"3\">Long Tab name</bq-tab>\n * <bq-tab tab-id=\"4\" disabled>Tab</bq-tab>\n * </bq-tab-group>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/775321-tabs\n * @status stable\n *\n * @attr {number} debounce-time - A number representing the delay value applied to bqChange event handler\n * @attr {boolean} disable-divider - If true, the underline divider below the tabs won't be shown\n * @attr {string} orientation - The direction that tab should be render\n * @attr {string} placement - The placement that tab should be render\n * @attr {string} size - The size of the tab\n * @attr {string} value - A string representing the id of the selected tab.\n *\n * @event bqChange - Handler to be called when the tab value changes\n *\n * @slot - The bq-tab items\n *\n * @part base - The HTML div wrapper inside the shadow DOM.\n * @part tabs - The HTML div used to hold the tab buttons.\n */\n@Component({\n tag: 'bq-tab-group',\n styleUrl: './scss/bq-tab-group.scss',\n shadow: true,\n})\nexport class BqTabGroup {\n // Own Properties\n // ====================\n\n private debouncedBqChange: TDebounce<{ value: string; target: HTMLBqTabElement }>;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqTabGroupElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** A number representing the delay value applied to bqChange event handler */\n @Prop({ reflect: true, mutable: true }) debounceTime = 0;\n\n /** If true, the underline divider below the tabs won't be shown */\n @Prop({ reflect: true }) disableDivider = false;\n\n /** The direction that tab should be render */\n @Prop({ reflect: true }) orientation?: TTabOrientation = 'horizontal';\n\n /** The placement that tab should be render */\n @Prop({ reflect: true }) placement?: TTabPlacement = 'start';\n\n /** The size of the tab */\n @Prop({ reflect: true }) size: TTabSize = 'medium';\n\n /** A string representing the id of the selected tab. */\n @Prop({ reflect: true, mutable: true }) value: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('debounceTime')\n checkDebounceChange() {\n if (this.debounceTime < 0) {\n this.debounceTime = Math.max(0, this.debounceTime);\n }\n\n if (this.debouncedBqChange) {\n this.debouncedBqChange.cancel();\n }\n\n this.debouncedBqChange = debounce((event: Parameters<typeof this.debouncedBqChange>[0]) => {\n this.bqChange.emit(event);\n }, this.debounceTime);\n }\n\n @Watch('size')\n @Watch('value')\n @Watch('orientation')\n @Watch('placement')\n checkPropValues() {\n validatePropValue(TAB_SIZE, 'medium', this.el, 'size');\n validatePropValue(TAB_ORIENTATION, 'horizontal', this.el, 'orientation');\n validatePropValue(TAB_PLACEMENT, 'start', this.el, 'placement');\n\n this.bqTabElements.forEach((bqTabElement) => {\n bqTabElement.size = this.size;\n bqTabElement.orientation = this.orientation;\n bqTabElement.placement = this.placement;\n bqTabElement.active = !isNil(this.value) ? bqTabElement.tabId === this.value : false;\n });\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the tab value changes */\n @Event() bqChange: EventEmitter<{ target: HTMLBqTabElement; value: string }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkDebounceChange();\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.checkPropValues();\n }\n\n // Listeners\n // ==============\n\n @Listen('keyup', { target: 'body', passive: true, capture: true })\n onKeyUp(event: KeyboardEvent) {\n const { target } = event;\n if (!isHTMLElement(target, 'bq-tab')) return;\n\n this.makeTabsFocusable();\n }\n\n @Listen('bqClick', { passive: true })\n onBqClick(event: CustomEvent<HTMLBqTabElement>) {\n const { detail: target } = event;\n this.bqTabElements.forEach((bqTabElement) => {\n bqTabElement.active = bqTabElement === target;\n });\n this.debouncedBqChange({ value: target.tabId, target });\n this.selectTab(target);\n }\n\n @Listen('bqKeyDown', { passive: true })\n async onBqKeyDown(event: CustomEvent<KeyboardEvent>) {\n const { target } = event;\n\n // NOTE: ensures the target is an HTML element with the tag name 'bq-tab'\n if (!isHTMLElement(target, 'bq-tab')) return;\n\n const keyActions: { [key: string]: 'forward' | 'backward' } = {\n ArrowDown: 'forward',\n ArrowRight: 'forward',\n ArrowUp: 'backward',\n ArrowLeft: 'backward',\n };\n\n // NOTE: gets the direction based on key pressed\n const direction = keyActions[event.detail.key];\n\n if (!direction) return;\n\n await this.focusTabSibling(target, direction);\n }\n\n @Listen('bqBlur', { capture: true, passive: true })\n onBqBlur() {\n this.restoreTabsFocus();\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private focusTabSibling = async (\n currentTarget: HTMLBqTabElement,\n direction: 'forward' | 'backward',\n ): Promise<void> => {\n let target: HTMLBqTabElement | null = null;\n\n this.bqTabElements.forEach((bqTabElement, index, elements) => {\n bqTabElement.active = false;\n\n if (bqTabElement === currentTarget) {\n target = getNextElement(elements, index, direction);\n }\n });\n\n if (target) {\n await target.vFocus();\n this.selectTab(target);\n }\n };\n\n private makeTabsFocusable = (): void => {\n this.bqTabElements.forEach((bqTabElement) => {\n if (bqTabElement.disabled) return;\n\n /**\n * This is a \"fire and forget\" operation. The callback itself doesn't do anything special\n * with the asynchronous code (doesn't await it or do anything with the result)\n * Details: https://stackoverflow.com/a/63488201\n */\n (async () => {\n await bqTabElement.enableFocus(true);\n })();\n });\n };\n\n private restoreTabsFocus = (): void => {\n this.bqTabElements.forEach((bqTabElement) => {\n if (bqTabElement.disabled || bqTabElement.active) return;\n\n /** @See line #173 */\n (async () => {\n await bqTabElement.enableFocus(false);\n })();\n });\n };\n\n private get bqTabElements(): HTMLBqTabElement[] {\n return Array.from(this.el.querySelectorAll('bq-tab'));\n }\n\n private selectTab = (target: HTMLBqTabElement): void => {\n const { tabId } = target;\n target.active = true;\n this.value = tabId;\n this.debouncedBqChange({ value: tabId, target });\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host class={{ 'inline-block': this.orientation === 'vertical' }}>\n <div\n class={{\n [`bq-tab-group bq-tab-group--${this.orientation}-${this.placement} is-full flex`]: true,\n 'no-divider': this.disableDivider,\n }}\n part=\"base\"\n >\n <div\n class={{\n 'bq-tab-group--container flex overflow-x-auto': true,\n 'flex-col': this.orientation !== 'horizontal',\n }}\n part=\"tabs\"\n role=\"tablist\"\n >\n <slot />\n </div>\n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J,CACF,CACD;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bq-textarea.entry.cjs.js","sources":["../../packages/beeq/src/components/textarea/scss/bq-textarea.scss?tag=bq-textarea&encapsulation=shadow","../../packages/beeq/src/components/textarea/bq-textarea.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Textarea styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-textarea.variables';\n\n:host {\n @apply block is-full;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Label */\n/* -------------------------------------------------------------------------- */\n\n.bq-textarea__label {\n @apply text-[length:--bq-textarea--label-text-size] text-[color:--bq-textarea--label-text-color] m-be-[--bq-textarea--label-margin-bottom];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Native HTML Textarea control */\n/* -------------------------------------------------------------------------- */\n\n.bq-textarea__input {\n @apply flex-auto resize-y bg-[--bq-textarea--background-color] bs-[inherit];\n // Border\n @apply rounded-[--bq-textarea--border-radius] border-[length:--bq-textarea--border-width] border-[color:--bq-textarea--border-color];\n // Padding\n @apply pe-[--bq-textarea--padding-end] ps-[--bq-textarea--padding-start] p-b-[--bq-textarea--paddingY];\n // Text\n @apply text-[length:--bq-textarea--text-size] text-[color:--bq-textarea--text-color] placeholder:text-[color:--bq-textarea--text-placeholder-color];\n // Transition\n @apply transition-colors ease-in-out;\n // Hover\n @apply [&:not([disabled]):not(:focus-within)]:hover:border-hover-brand;\n // Disabled\n @apply disabled:cursor-not-allowed disabled:opacity-60;\n // Focus\n &:not([disabled]):focus-within {\n --bq-ring-width: 1px;\n --bq-ring-offset-width: 0;\n --bq-ring-color-focus: var(--bq-textarea--border-color-focus);\n\n @apply focus border-[color:--bq-ring-color-focus];\n }\n}\n\n/* ------------------------------- Validations ------------------------------- */\n\n.bq-textarea__input.validation-error {\n @apply border-danger [&:not(.disabled):not(:focus-within)]:hover:border-hover-danger;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.danger);\n\n @apply border-active-danger;\n }\n}\n\n.bq-textarea__input.validation-success {\n @apply border-success [&:not(.disabled):not(:focus-within)]:hover:border-hover-success;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.success);\n\n @apply border-active-success;\n }\n}\n\n.bq-textarea__input.validation-warning {\n @apply border-warning [&:not(.disabled):not(:focus-within)]:hover:border-hover-warning;\n\n &:not(.disabled):focus-within {\n --bq-ring-color-focus: theme(stroke.warning);\n\n @apply border-active-warning;\n }\n}\n\n/* -------------------------------------------------------------------------- */\n/* Helper text */\n/* -------------------------------------------------------------------------- */\n\n.bq-textarea__helper {\n @apply text-[length:--bq-textarea--helper-text-size] text-[color:--bq-textarea--helper-text-color] m-bs-[--bq-textarea--helper-margin-top];\n}\n\n/* ------------------------------- Validations ------------------------------ */\n\n.bq-textarea__helper.validation-error {\n @apply text-danger;\n}\n\n.bq-textarea__helper.validation-success {\n @apply text-success;\n}\n\n.bq-textarea__helper.validation-warning {\n @apply text-warning;\n}\n\n/* ----------------------------- Helper counter ----------------------------- */\n\n/** Apply a disabled text color style to the textarea counter when the validation is none. */\n.bq-textarea__helper[class~='validation-none'] {\n .bq-textarea__helper--counter {\n @apply opacity-60;\n }\n}\n","import type { EventEmitter } from '@stencil/core';\nimport { AttachInternals, Component, Element, Event, h, Prop, State, Watch } from '@stencil/core';\n\nimport { debounce, hasSlotContent, isHTMLElement, isNil, type TDebounce } from '../../shared/utils';\nimport type { TInputValidation } from '../input/bq-input.types';\nimport type { TTextareaAutoCapitalize, TTextareaWrap } from './bq-textarea.types';\n\n/**\n * The Textarea component is a multi-line text input control that is often used in a form to collect user inputs like comments or reviews.\n *\n * @example How to use it\n * ```html\n * <bq-textarea maxlength=\"0\" name=\"textarea\" placeholder=\"Placeholder...\" rows=\"5\">\n * <label slot=\"label\">Label</label>\n * <span class=\"flex items-center gap-xs\" slot=\"helper-text\">\n * <bq-icon name=\"star\"></bq-icon>\n * Helper text\n * </span>\n * </bq-textarea>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/16792c-textarea\n * @status stable\n *\n * @attr {string} autocapitalize - Controls whether or not the textarea field should be capitalized and how.\n * @attr {string} autocomplete - Specifies whether or not the textarea field should have autocomplete enabled.\n * @attr {boolean} autofocus - If `true`, the textarea will be focused on component render.\n * @attr {boolean} auto-grow - If `true`, the textarea will automatically grow and shrink to fit its contents.\n * @attr {number} debounce-time - The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the textarea value changes.\n * @attr {boolean} disabled - If `true`, the user cannot interact with the textarea.\n * @attr {boolean} disable-resize - If `true`, it will block the user's ability to resize the textarea.\n * @attr {string} form - The ID of the form that the textarea field belongs to.\n * @attr {string} form-validation-message - The native form validation message.\n * @attr {number} maxlength - The maximum number of characters that can be entered into the textarea (`0`: no limit).\n * @attr {string} name - The name of the textarea element.\n * @attr {string} placeholder - The placeholder text to show when there is no value.\n * @attr {boolean} readonly - If `true`, the textarea field cannot be modified.\n * @attr {boolean} required - Indicates whether or not the textarea field is required to be filled out before submitting the form.\n * @attr {number} rows - The number of visible text lines for the control. It must be a positive integer.\n * @attr {boolean} spellcheck - If `true`, the textarea content may be checked for spelling errors.\n * @attr {\"error\" | \"none\" | \"success\" | \"warning\"} validation-status - The validation status of the textarea.\n * @attr {string} value - The value of the textarea. It can be used to reset the textarea to a previous value.\n * @attr {\"soft\" | \"hard\"} wrap - Specifies how the text in a text area is to be wrapped when submitted in a form.\n *\n * @event bqBlur - Handler to be called when the textarea loses focus.\n * @event bqChange - Handler to be called when the textarea value has changed and the textarea loses focus.\n * @event bqClear - Handler to be called when the textarea value has been cleared.\n * @event bqFocus - Handler to be called when the textarea has received focus.\n * @event bqInput - Handler to be called when the textarea value changes.\n *\n * @slot label - The textarea label.\n * @slot helper-text - The helper text.\n *\n * @part base - The component's base wrapper.\n * @part input - The textarea element.\n * @part label - The textarea label.\n * @part helper-info - The helper info container.\n * @part helper-text - The helper text.\n * @part helper-counter - The helper counter.\n *\n * @cssprop --bq-textarea--background-color - Textarea background color\n * @cssprop --bq-textarea--border-color - Textarea border color\n * @cssprop --bq-textarea--border-color-focus - Textarea border color on focus\n * @cssprop --bq-textarea--border-radius - Textarea border radius\n * @cssprop --bq-textarea--border-width - Textarea border width\n * @cssprop --bq-textarea--border-style - Textarea border style\n * @cssprop --bq-textarea--helper-margin-top - Textarea helper text margin top\n * @cssprop --bq-textarea--helper-text-color - Textarea helper text color\n * @cssprop --bq-textarea--helper-text-size - Textarea helper text size\n * @cssprop --bq-textarea--label-margin-bottom - Textarea label margin bottom\n * @cssprop --bq-textarea--label-text-color - Textarea label text color\n * @cssprop --bq-textarea--label-text-size - Textarea label text size\n * @cssprop --bq-textarea--paddingY - Textarea padding top and bottom\n * @cssprop --bq-textarea--padding-start - Textarea padding start\n * @cssprop --bq-textarea--padding-end - Textarea padding end\n * @cssprop --bq-textarea--text-color - Textarea text color\n * @cssprop --bq-textarea--text-size - Textarea text size\n * @cssprop --bq-textarea--text-placeholder-color - Textarea placeholder text color\n */\n@Component({\n tag: 'bq-textarea',\n styleUrl: './scss/bq-textarea.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqTextarea {\n // Own Properties\n // ====================\n\n private debounceBqInput: TDebounce<void>;\n private fallbackId = 'textarea';\n\n private helperTextElem?: HTMLElement;\n private labelElem?: HTMLLabelElement;\n private textarea: HTMLTextAreaElement;\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals!: ElementInternals;\n @Element() el!: HTMLBqTextareaElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasHelperText = false;\n @State() private hasLabel = false;\n\n // Public Property API\n // ========================\n\n /**\n * Controls whether or not the textarea field should be capitalized and how.\n * Possible values are 'off', 'none', 'on', 'sentences', 'words', and 'characters'.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize\n */\n @Prop({ reflect: true }) autocapitalize: TTextareaAutoCapitalize = 'off';\n\n /**\n * Specifies whether or not the textarea field should have autocomplete enabled.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n */\n @Prop({ reflect: true }) autocomplete: string = 'off';\n\n /** If true, the textarea will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean = false;\n\n /**\n * If `true`, the textarea will automatically grow and shrink to fit its contents.\n * If `false`, the textarea will have a fixed height specified by the `rows` property.\n */\n @Prop({ reflect: true }) autoGrow: boolean = false;\n\n /**\n * The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the textarea value changes.\n * A value of 0 means no debouncing will occur.\n */\n @Prop({ reflect: true, mutable: true }) debounceTime? = 0;\n\n /** If `true`, the user cannot interact with the textarea. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** If `true`, it will block the user's ability to resize the textarea. */\n @Prop({ reflect: true }) disableResize?: boolean = false;\n\n /** The ID of the form that the textarea field belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** The native form validation message */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /**\n * The maximum number of characters that can be entered into the textarea (`0`: no limit).\n * When enabled, a character counter will be shown underneath the textarea.\n */\n @Prop({ reflect: true }) maxlength: number;\n\n /** The name of the textarea element. */\n @Prop({ reflect: true }) name!: string;\n\n /** The placeholder text to show when there is no value. */\n @Prop({ reflect: true }) placeholder!: string;\n\n /** If true, the textarea field cannot be modified. */\n @Prop({ reflect: true }) readonly?: boolean = false;\n\n /** Indicates whether or not the textarea field is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean = false;\n\n /** The number of visible text lines for the control. It must be a positive integer. */\n @Prop({ reflect: true }) rows: number = 5;\n\n /** If true, the textarea content may be checked for spelling errors. */\n @Prop({ reflect: true }) spellcheck: boolean = false;\n\n /**\n * The validation status of the textarea.\n *\n * @remarks\n * This property is used to indicate the validation status of the textarea. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The textarea has a validation error.\n * - `'warning'`: The textarea has a validation warning.\n * - `'success'`: The textarea has passed validation.\n */\n @Prop({ reflect: true, mutable: true }) validationStatus: TInputValidation = 'none';\n\n /** The value of the textarea. It can be used to reset the textarea to a previous value. */\n @Prop({ mutable: true }) value: string;\n\n /** Specifies how the text in a text area is to be wrapped when submitted in a form */\n @Prop({ reflect: true }) wrap: TTextareaWrap = 'soft';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n if (!this.textarea) return;\n if (!this.maxlength || this.value?.length < this.maxlength) return;\n // If the value is longer than the maxlength, we need to truncate it\n this.value = this.value?.substring(0, this.maxlength);\n this.textarea.value = this.value ?? '';\n }\n\n @Watch('required')\n handleRequiredPropChange() {\n this.updateFormValidity();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the textarea loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqTextareaElement>;\n\n /**\n * Callback handler emitted when the textarea value has changed and the textarea loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the textarea field and then clicks outside of the textarea field.\n */\n @Event() bqChange!: EventEmitter<{ value: string; el: HTMLBqTextareaElement }>;\n\n /** Callback handler emitted when the textarea value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqTextareaElement>;\n\n /** Callback handler emitted when the textarea has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqTextareaElement>;\n\n /**\n * Callback handler emitted when the textarea value changes.\n * This handler is called whenever the user types or pastes text into the textarea field.\n */\n @Event() bqInput!: EventEmitter<{ value: string; el: HTMLBqTextareaElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.handleSlotChange();\n this.handleValueChange();\n }\n\n formAssociatedCallback() {\n this.setFormValue(this.value);\n this.updateFormValidity();\n }\n\n formResetCallback() {\n this.clearSelection();\n // Reset the form validity state\n this.setFormValue();\n this.updateFormValidity();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private get numberOfCharacters() {\n if (!this.maxlength || !this.textarea) return 0;\n\n return this.value?.length;\n }\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private handleChange = (ev: Event) => {\n if (this.disabled) return;\n\n if (!isHTMLElement(ev.target, 'textarea')) return;\n this.value = ev.target.value;\n this.setFormValue(this.value);\n this.updateFormValidity();\n\n this.bqChange.emit({ value: this.value, el: this.el });\n };\n\n private handleInput = (ev: Event) => {\n if (this.disabled) return;\n\n this.debounceBqInput?.cancel();\n\n if (!isHTMLElement(ev.target, 'textarea')) return;\n this.value = ev.target.value;\n\n this.debounceBqInput = debounce(() => {\n this.bqInput.emit({ value: this.value, el: this.el });\n }, this.debounceTime);\n this.debounceBqInput();\n\n this.autoResize();\n };\n\n private autoResize = () => {\n if (!this.autoGrow) return;\n\n const inputElem = this.textarea;\n if (!inputElem) return;\n\n inputElem.style.height = 'auto';\n inputElem.style.height = `${inputElem.scrollHeight}px`;\n };\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n this.hasHelperText = hasSlotContent(this.helperTextElem);\n };\n\n private setFormValue = (value?: string) => {\n this.internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n };\n\n private updateFormValidity = () => {\n const { formValidationMessage, internals, required, value, textarea } = this;\n\n // Clear the validity state\n internals?.states.clear();\n\n if (required && (!value || value.trim() === '')) {\n // Set validity state to invalid\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, textarea);\n return;\n }\n\n // Set validity state to valid if textarea has value or is not required\n internals?.states.add('valid');\n internals?.setValidity({});\n };\n\n private clearSelection = () => {\n this.value = '';\n this.textarea.value = this.value;\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bq-textarea flex flex-auto flex-col\" part=\"base\">\n <label\n aria-label={this.name ?? this.fallbackId}\n class={{ 'bq-textarea__label': true, '!hidden': !this.hasLabel }}\n htmlFor={this.name ?? this.fallbackId}\n part=\"label\"\n ref={(label: HTMLLabelElement) => {\n this.labelElem = label;\n }}\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n <textarea\n autocapitalize={this.autocapitalize}\n autocomplete={this.autocomplete}\n autofocus={this.autofocus}\n class={{\n 'bq-textarea__input': true,\n 'resize-none': this.disableResize,\n [`validation-${this.validationStatus}`]: true,\n }}\n disabled={this.disabled}\n form={this.form}\n id={this.name ?? this.fallbackId}\n maxLength={this.maxlength > 0 ? this.maxlength : undefined}\n name={this.name}\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onFocus={this.handleFocus}\n onInput={this.handleInput}\n part=\"input\"\n placeholder={this.placeholder}\n readOnly={this.readonly}\n ref={(elem: HTMLTextAreaElement) => {\n this.textarea = elem;\n }}\n required={this.required}\n rows={this.rows}\n spellcheck={this.spellcheck}\n wrap={this.wrap}\n >\n {this.value}\n </textarea>\n <div\n class={{\n 'bq-textarea__helper flex items-center justify-between': true,\n [`validation-${this.validationStatus}`]: true,\n '!hidden': !this.hasHelperText && !this.maxlength,\n }}\n part=\"helper-info\"\n >\n <span\n class=\"bq-textarea__helper--text\"\n part=\"helper-text\"\n ref={(span: HTMLElement) => {\n this.helperTextElem = span;\n }}\n >\n <slot name=\"helper-text\" onSlotchange={this.handleSlotChange} />\n </span>\n <span\n class={{ 'bq-textarea__helper--counter [fontVariant:tabular-nums]': true, '!hidden': !this.maxlength }}\n part=\"helper-counter\"\n >\n {this.numberOfCharacters ?? 0}/{this.maxlength}\n </span>\n </div>\n </div>\n );\n }\n}\n"],"names":["isHTMLElement","debounce","hasSlotContent","isNil","h"],"mappings":";;;;;;;;;;;;AAAA,MAAM,aAAa,GAAG,i20BAA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ACf,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,IAAI,EAAE,IAAI,CAAC,IAAI,EAEd,EAAA,IAAI,CAAC,KAAK,CACF,EACXA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,uDAAuD,EAAE,IAAI;AAC7D,gBAAA,CAAC,cAAc,IAAI,CAAC,gBAAgB,CAAE,CAAA,GAAG,IAAI;gBAC7C,SAAS,EAAE,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,SAAS;aAClD,EACD,IAAI,EAAC,aAAa,EAAA,EAElBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,2BAA2B,EACjC,IAAI,EAAC,aAAa,EAClB,GAAG,EAAE,CAAC,IAAiB,KAAI;AACzB,gBAAA,IAAI,CAAC,cAAc,GAAG,IAAI;AAC5B,aAAC,EAAA,EAEDA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,aAAa,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAA,CAAI,CAC3D,EACPA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,EAAE,yDAAyD,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EACtG,IAAI,EAAC,gBAAgB,EAAA,EAEpB,IAAI,CAAC,kBAAkB,IAAI,CAAC,OAAG,IAAI,CAAC,SAAS,CACzC,CACH,CACF;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bq-toast.entry.cjs.js","sources":["../../packages/beeq/src/components/toast/bq-toast.types.ts","../../packages/beeq/src/components/toast/scss/bq-toast.scss?tag=bq-toast&encapsulation=shadow","../../packages/beeq/src/components/toast/bq-toast.tsx"],"sourcesContent":["export const TOAST_TYPE = ['info', 'success', 'alert', 'error', 'loading', 'custom'] as const;\nexport type TToastType = (typeof TOAST_TYPE)[number];\n\nexport const TOAST_PLACEMENT = [\n 'top-center',\n 'top-right',\n 'bottom-right',\n 'bottom-center',\n 'bottom-left',\n 'top-left',\n] as const;\nexport type TToastPlacement = (typeof TOAST_PLACEMENT)[number];\n\nexport const TOAST_BORDER_RADIUS = ['none', 'xs2', 'xs', 's', 'm', 'l', 'full'] as const;\nexport type TToastBorderRadius = (typeof TOAST_BORDER_RADIUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Toast styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-toast.variables';\n\n:host {\n @apply inline-block;\n}\n\n:host(.is-hidden) {\n @apply hidden;\n}\n\n.bq-toast {\n @include animation-slide-in;\n @apply flex items-center gap-[--bq-toast--gap] p-b-[--bq-toast--padding-y] p-i-[--bq-toast--padding-x];\n @apply rounded-[--bq-toast--border-radius] bg-[--bq-toast--background] shadow-[shadow:--bq-toast--box-shadow];\n @apply border-[length:--bq-toast--border-width] border-[color:--bq-toast--border-color];\n\n border-style: var(--bq-toast--border-style);\n}\n\n.bq-toast--icon {\n @apply flex;\n\n &.info {\n @apply text-[--bq-toast--icon-color-info];\n }\n\n &.success {\n @apply text-[--bq-toast--icon-color-success];\n }\n\n &.alert {\n @apply text-[--bq-toast--icon-color-alert];\n }\n\n &.error {\n @apply text-[--bq-toast--icon-color-error];\n }\n\n &.loading {\n @include animation-spin;\n @apply text-[--bq-toast--icon-color-loading];\n }\n\n &.custom {\n @apply text-[--bq-toast--icon-color-custom];\n }\n}\n","import type { EventEmitter } from '@stencil/core';\nimport { Component, Element, Event, Host, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { debounce, isClient, type TDebounce, validatePropValue } from '../../shared/utils';\nimport type { TToastBorderRadius, TToastPlacement, TToastType } from './bq-toast.types';\nimport { TOAST_PLACEMENT, TOAST_TYPE } from './bq-toast.types';\n\nconst TOAST_PORTAL_SELECTOR = 'bq-toast-portal';\n\n/**\n * Toasts are time-based components used to display short messages.\n * Commonly used for errors, confirmations, or progress updates.\n *\n * @example How to use it\n * ```html\n * <bq-toast type=\"info\">\n * This is a message\n * </bq-toast>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/83da51-toast\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"s\" | \"none\" | \"xs2\" | \"xs\" | \"m\" | \"l\" | \"full\"} border - The corder radius of the toast component\n * @attr {\"success\" | \"error\" | \"loading\" | \"alert\" | \"info\"} type - Type of toast\n * @attr {\"top-left\" | \"top-center\" | \"top-right\" | \"bottom-left\" | \"bottom-center\" | \"bottom-right\"} placement - Placement of toast\n * @attr {boolean} hide-icon - If true will hide toast icon\n * @attr {boolean} open - If true, the toast will be shown\n * @attr {number} time - The length of time, in milliseconds, after which the toast will close itself\n *\n * @method show - Method to be called to show the toast component\n * @method hide - Method to be called to hide the toast component\n * @method toast - This method can be used to display toasts in a fixed-position element that allows for stacking multiple toasts vertically\n *\n * @event bqHide - Callback handler to be called when the notification is hidden\n * @event bqShow - Callback handler to be called when the notification is shown\n *\n * @slot - The content to be displayed in the toast component.\n * @slot icon - The icon to be displayed in the toast component.\n *\n * @part wrapper - The component's internal wrapper inside the shadow DOM.\n * @part icon-info - The `<div>` container that holds the icon component.\n * @part base - The `<div>` container of the internal bq-icon component.\n * @part svg - The `<svg>` element of the internal bq-icon component.\n *\n * @cssprop --bq-toast--background - Toast background color\n * @cssprop --bq-toast--box-shadow - Toast box shadow\n * @cssprop --bq-toast--padding-y - Toast vertical padding\n * @cssprop --bq-toast--padding-x - Toast horizontal padding\n * @cssprop --bq-toast--gap - Toast distance between icon and text\n * @cssprop --bq-toast--border-radius - Toast border radius\n * @cssprop --bq-toast--border-color - Toast border color\n * @cssprop --bq-toast--border-style - Toast border style\n * @cssprop --bq-toast--border-width - Toast border width\n * @cssprop --bq-toast--icon-color-info - Toast icon color when type is 'info'\n * @cssprop --bq-toast--icon-color-success - Toast icon color when type is 'success'\n * @cssprop --bq-toast--icon-color-alert - Toast icon color when type is 'alert'\n * @cssprop --bq-toast--icon-color-error - Toast icon color when type is 'error'\n * @cssprop --bq-toast--icon-color-loading - Toast icon color when type is 'loading'\n * @cssprop --bq-toast--icon-color-custom - Toast icon color when type is 'custom'\n */\n@Component({\n tag: 'bq-toast',\n styleUrl: './scss/bq-toast.scss',\n shadow: true,\n})\nexport class BqToast {\n // Own Properties\n // ====================\n\n private autoDismissDebounce: TDebounce<void>;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqToastElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private toastPortal = isClient() ? document.querySelector(`.${TOAST_PORTAL_SELECTOR}`) : null;\n\n // Public Property API\n // ========================\n\n /** The corder radius of the toast component */\n @Prop({ reflect: true }) border: TToastBorderRadius = 's';\n\n /** Type of toast */\n @Prop({ reflect: true, mutable: true }) type: TToastType = 'info';\n\n /** Placement of toast */\n @Prop({ reflect: true, mutable: true }) placement: TToastPlacement = 'bottom-center';\n\n /** If true will hide toast icon */\n @Prop({ reflect: true, mutable: true }) hideIcon = false;\n\n /** If true, the toast will be shown */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** The length of time, in milliseconds, after which the toast will close itself */\n @Prop({ reflect: true }) time: number = 3000;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('type')\n @Watch('placement')\n checkPropValues() {\n validatePropValue(TOAST_TYPE, 'default', this.el, 'type');\n validatePropValue(TOAST_PLACEMENT, 'bottom-center', this.el, 'placement');\n\n const { toastPortal } = this;\n toastPortal?.classList.remove(...TOAST_PLACEMENT);\n toastPortal?.classList.add(this.placement);\n }\n\n @Watch('time')\n handleTimeChange() {\n this.autoDismissDebounce?.cancel();\n\n this.time = Math.max(0, this.time);\n\n this.autoDismissDebounce = debounce(() => {\n this.hide();\n }, this.time);\n }\n\n @Watch('open')\n handleOpenChange() {\n this.autoDismissDebounce?.cancel();\n\n if (this.open) {\n this.autoDismissDebounce?.();\n }\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the notification is hidden */\n @Event() bqHide: EventEmitter<HTMLBqToastElement>;\n\n /** Callback handler to be called when the notification is shown */\n @Event() bqShow: EventEmitter<HTMLBqToastElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n if (!isClient()) return;\n\n if (this.toastPortal) {\n this.toastPortal = Object.assign(document.createElement('div'), { className: TOAST_PORTAL_SELECTOR });\n }\n }\n\n componentWillLoad() {\n this.checkPropValues();\n this.handleTimeChange();\n this.handleOpenChange();\n }\n\n disconnectedCallback() {\n this.autoDismissDebounce?.cancel();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqHide')\n onNotificationHide() {\n try {\n const { toastPortal } = this;\n toastPortal?.removeChild(this.el);\n // Remove the toast portal from the DOM when there are no more toasts\n if (toastPortal?.querySelector(this.el.tagName.toLowerCase()) === null) {\n toastPortal?.remove();\n }\n } catch (error) {\n /**\n * Skip DOMException error since it could be possible that\n * in some situations the notification portal is missing\n */\n if (error instanceof DOMException) return;\n throw error;\n }\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Method to be called to show the toast component */\n @Method()\n async show(): Promise<void> {\n this.handleShow();\n }\n\n /** Method to be called to hide the toast component */\n @Method()\n async hide(): Promise<void> {\n this.handleHide();\n }\n\n /** This method can be used to display toasts in a fixed-position element that allows for stacking multiple toasts vertically */\n @Method()\n async toast() {\n if (!isClient()) return;\n\n const { toastPortal } = this;\n if (toastPortal?.parentElement === null) {\n document.body.append(toastPortal);\n }\n\n toastPortal?.appendChild(this.el);\n\n requestAnimationFrame(() => {\n this.show();\n });\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleShow = () => {\n const ev = this.bqShow.emit(this.el);\n if (!ev.defaultPrevented) {\n this.open = true;\n }\n };\n\n private handleHide = () => {\n const ev = this.bqHide.emit(this.el);\n if (!ev.defaultPrevented) {\n this.open = false;\n }\n };\n\n private get iconName() {\n const typeMap = {\n success: 'check-circle-bold',\n error: 'x-circle-bold',\n loading: 'spinner-gap-bold',\n alert: 'warning-bold',\n info: 'info-bold',\n };\n\n return typeMap[this.type] || 'info-bold';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-toast--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host\n aria-hidden={!this.open ? 'true' : 'false'}\n class={{ 'is-hidden': !this.open }}\n hidden={!this.open ? 'true' : 'false'}\n role=\"status\"\n style={style}\n >\n <output class=\"bq-toast\" part=\"wrapper\">\n <div class={{ [`bq-toast--icon ${this.type}`]: true, '!hidden': this.hideIcon }} part=\"icon\">\n <slot name=\"icon\">\n <bq-icon exportparts=\"base,svg\" name={this.iconName} size=\"24\" slot=\"icon\" />\n </slot>\n </div>\n <slot />\n </output>\n </Host>\n );\n }\n}\n"],"names":["isClient","validatePropValue","debounce","h","Host"],"mappings":";;;;;;;;;;;;AAAO,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAU;AAGtF,MAAM,eAAe,GAAG;IAC7B,YAAY;IACZ,WAAW;IACX,cAAc;IACd,eAAe;IACf,aAAa;IACb,UAAU;CACF;;ACVV,MAAM,UAAU,GAAG,2qtBAA2qtB;;ACO9rtB,MAAM,qBAAqB,GAAG,iBAAiB;MA6DlC,OAAO,GAAA,MAAA;;;;;;;;AAIV,IAAA,mBAAmB;;;;;AAWV,IAAA,WAAW,GAAGA,iBAAQ,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA,CAAA,EAAI,qBAAqB,CAAE,CAAA,CAAC,GAAG,IAAI;;;;IAM7E,MAAM,GAAuB,GAAG;;IAGjB,IAA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AA,EAAA,0CAAA,EAAA,KAAK,EAAE,EAAE,CAAC,CAAA,eAAA,EAAkB,IAAI,CAAC,IAAI,CAAE,CAAA,GAAG,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAC,MAAM,EAAA,EAC1FA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,MAAM,EAAA,EACfA,OAAA,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAS,WAAW,EAAC,UAAU,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAA,CAAG,CACxE,CACH,EACNA,OAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACD,CACJ;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bq-tooltip.entry.cjs.js","sources":["../../packages/beeq/src/components/tooltip/scss/bq-tooltip.scss?tag=bq-tooltip&encapsulation=shadow","../../packages/beeq/src/components/tooltip/bq-tooltip.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Tooltip styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-tooltip.variables';\n\n.bq-tooltip--panel {\n @include animation-fade-in;\n @apply pointer-events-none fixed z-[--bq-tooltip--z-index] box-border bg-[--bq-tooltip--background-color];\n @apply is-[--bq-tooltip--width] max-is-[--bq-tooltip--max-width] p-b-[--bq-tooltip--paddingY] p-i-[--bq-tooltip--paddingX];\n @apply text-[length:--bq-tooltip--font-size] leading-[--bq-tooltip--line-height] text-[color:--bq-tooltip--text-color];\n @apply rounded-[--bq-tooltip--border-radius] border-[length:--bq-tooltip--border-width] border-[color:--bq-tooltip--border-color];\n @apply shadow-[shadow:--bq-tooltip--box-shadow];\n}\n\n.bq-tooltip--arrow {\n &,\n &::before {\n @apply absolute -z-[1] bs-2 is-2;\n }\n\n &::before {\n @apply start-0 rotate-45 bg-[--bq-tooltip--background-color] content-empty inset-bs-0;\n }\n}\n","import type { EventEmitter } from '@stencil/core';\nimport { Component, Element, Event, h, Listen, Method, Prop, Watch } from '@stencil/core';\n\nimport type { Placement } from '../../services/interfaces';\nimport { FloatingUI } from '../../services/libraries';\nimport { isEventTargetChildOfElement } from '../../shared/utils';\n\n/**\n * The Tooltip component is a small pop-up box that appears when a user hovers over or clicks on an element, providing additional information or context.\n *\n * @example How to use it\n * ```html\n * <bq-tooltip visible>\n * Yuhu! I'm a tooltip 🙃\n * <bq-button slot=\"trigger\">Hover me!</bq-button>\n * </bq-tooltip>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/64c562-tooltip\n * @status stable\n *\n * @attr {boolean} always-visible - If true, the tooltip will always be visible\n * @attr {number} distance - Distance between trigger element and tooltip\n * @attr {boolean} hide-arrow - If true, the arrow on the tooltip content won't be shown\n * @attr {\"top\" | \"right\" | \"bottom\" | \"left\"} placement - Defines the position of the tooltip\n * @attr {boolean} same-width - Whether the tooltip should have the same width as the trigger element (applicable only for content shorter than the trigger element)\n * @attr {\"click\" | \"hover\"} display-on - Set the action when the tooltip should be displayed, on hover (default) or click\n * @attr {boolean} visible - Indicates whether or not the tooltip is visible when the component is first rendered, and when interacting with the trigger\n *\n * @method show - Shows the tooltip\n * @method hide - Hides the tooltip\n *\n * @slot trigger - The element which displays tooltip on hover\n * @slot - The tooltip content\n *\n * @part base - The component wrapper container inside the shadow DOM\n * @part trigger - The `<div>` container that holds the element which displays tooltip on hover\n * @part panel - The `<div>` container that holds the tooltip content\n *\n * @cssprop --bq-tooltip--background-color - Tooltip background color\n * @cssprop --bq-tooltip--box-shadow - Tooltip box shadow\n * @cssprop --bq-tooltip--font-size - Tooltip font size\n * @cssprop --bq-tooltip--line-height - Tooltip line height\n * @cssprop --bq-tooltip--text-color - Tooltip text color\n * @cssprop --bq-tooltip--paddingX - Tooltip horizontal padding\n * @cssprop --bq-tooltip--paddingY - Tooltip vertical padding\n * @cssprop --bq-tooltip--border-color - Tooltip border color\n * @cssprop --bq-tooltip--border-radius - Tooltip border radius\n * @cssprop --bq-tooltip--border-style - Tooltip border style\n * @cssprop --bq-tooltip--border-width - Tooltip border width\n * @cssprop --bq-tooltip--z-index: Tooltip z-index\n */\n@Component({\n tag: 'bq-tooltip',\n styleUrl: './scss/bq-tooltip.scss',\n shadow: true,\n})\nexport class BqTooltip {\n // Own Properties\n // ====================\n private trigger: HTMLElement;\n private panel: HTMLElement;\n private arrow: HTMLElement;\n private floatingUI: FloatingUI;\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqTooltipElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** If true, the tooltip will always be visible */\n @Prop() alwaysVisible?: boolean = false;\n\n /** Distance between trigger element and tooltip */\n @Prop({ reflect: true }) distance?: number = 10;\n\n /** If true, the arrow on the tooltip content won't be shown */\n @Prop({ reflect: true }) hideArrow?: boolean = false;\n\n /* Defines the position of the tooltip */\n @Prop({ reflect: true }) placement?: Placement = 'top';\n\n /** Whether the tooltip should have the same width as the trigger element\n * (applicable only for content shorter than the trigger element) */\n @Prop({ reflect: true }) sameWidth?: boolean = false;\n\n /** Set the action when the tooltip should be displayed, on hover (default) or click */\n @Prop({ reflect: true }) displayOn: 'click' | 'hover' = 'hover';\n\n /**\n * Indicates whether or not the tooltip is visible when the component is first rendered,\n * and when interacting with the trigger\n */\n @Prop({ reflect: true, mutable: true }) visible? = false;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('visible')\n async handleVisibleChange() {\n if (!this.visible && !this.alwaysVisible) {\n return await this.hide();\n }\n\n await this.show();\n }\n\n @Watch('distance')\n @Watch('hideArrow')\n @Watch('placement')\n @Watch('sameWidth')\n handleFloatingUIOptionsChange() {\n this.floatingUI.init({\n placement: this.placement,\n distance: this.distance,\n sameWidth: this.sameWidth,\n strategy: 'fixed',\n });\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Emitted when the tooltip trigger is clicked */\n @Event() bqClick: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is focused in */\n @Event() bqFocusIn: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is focused out */\n @Event() bqFocusOut: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is hovered in */\n @Event() bqHoverIn: EventEmitter<HTMLBqTooltipElement>;\n\n /** Emitted when the tooltip trigger is hovered out */\n @Event() bqHoverOut: EventEmitter<HTMLBqTooltipElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.floatingUI = new FloatingUI(this.trigger, this.panel, {\n ...(!this.hideArrow && { arrow: this.arrow }),\n placement: this.placement,\n distance: this.distance,\n sameWidth: this.sameWidth,\n strategy: 'fixed',\n skidding: 0,\n });\n }\n\n disconnectedCallback() {\n this.floatingUI?.destroy();\n }\n // Listeners\n // ==============\n\n @Listen('keydown', { target: 'document' })\n handleDocumentKeyDown(event: KeyboardEvent) {\n // Early returns for performance optimization\n if (this.alwaysVisible || !this.visible || this.displayOn !== 'click') return;\n // Hide tooltip when the user presses the escape key, but only if the displayOn is click and the tooltip is visible\n if (event.key !== 'Escape') return;\n\n this.hide();\n }\n\n @Listen('mousedown', { target: 'document' })\n handleDocumentMouseDown(event: MouseEvent) {\n // Early returns for performance optimization\n if (this.alwaysVisible || !this.visible) return;\n // Hide tooltip when the user clicks outside of the tooltip, but only if the displayOn is click and the tooltip is visible\n if (isEventTargetChildOfElement(event, this.el)) return;\n\n this.hide();\n }\n\n @Listen('scroll', { target: 'document', passive: true })\n handleDocumentScroll() {\n // Early returns for performance optimization\n if (this.alwaysVisible || !this.visible) return;\n // Hide tooltip when the user scrolls, but only if the the tooltip is visible\n this.hide();\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Shows the tooltip */\n @Method()\n async show() {\n this.visible = true;\n this.showTooltip();\n }\n\n /** Hides the tooltip */\n @Method()\n async hide() {\n if (this.alwaysVisible) return;\n\n this.visible = false;\n this.hideTooltip();\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleTriggerMouseOver = async () => {\n if (this.displayOn !== 'hover') return;\n\n const hoverEvent = this.bqHoverIn.emit(this.el);\n if (hoverEvent.defaultPrevented) return;\n\n await this.show();\n };\n\n private handleTriggerMouseLeave = async () => {\n if (this.displayOn !== 'hover') return;\n\n const hoverEvent = this.bqHoverOut.emit(this.el);\n if (hoverEvent.defaultPrevented) return;\n\n await this.hide();\n };\n\n private handleTriggerOnClick = async () => {\n if (this.displayOn !== 'click') return;\n\n const clickEvent = this.bqClick.emit(this.el);\n if (clickEvent.defaultPrevented) return;\n\n await (this.visible ? this.hide() : this.show());\n };\n\n private handleTriggerFocusin = async () => {\n if (this.visible || this.displayOn === 'click') return;\n\n const focusEvent = this.bqFocusIn.emit(this.el);\n if (focusEvent.defaultPrevented) return;\n\n await this.show();\n };\n\n private handleTriggerFocusout = async () => {\n if (!this.visible || this.displayOn === 'click') return;\n\n const focusEvent = this.bqFocusOut.emit(this.el);\n if (focusEvent.defaultPrevented) return;\n\n await this.hide();\n };\n\n private showTooltip = () => {\n if (!this.panel) return;\n this.floatingUI?.update();\n };\n\n private hideTooltip = () => {\n if (!this.panel) return;\n this.visible = false;\n };\n\n private get isHidden() {\n return !this.visible && !this.alwaysVisible;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bq-tooltip relative\" part=\"base\">\n {/* TRIGGER */}\n {/**\n * NOTE: We could use a native HTML button as trigger container, but it causes issues with\n * certain interactive elements inside the trigger slot (e.g., buttons, links, inputs...).\n * This is because nested interactive elements are not allowed inside a button.\n * Also, that will force the user to focus twice to reach the inner interactive element.\n */}\n {/** biome-ignore lint/a11y/noStaticElementInteractions: bypass the \"Static Elements should not be interactive.\" rule */}\n {/** biome-ignore lint/a11y/useKeyWithClickEvents: bypass the \"Enforce to have the onClick mouse event with the onKeyUp, the onKeyDown, or the onKeyPress keyboard event.\" rule */}\n <div\n class=\"bq-tooltip--trigger\"\n onClick={this.handleTriggerOnClick}\n onFocusin={this.handleTriggerFocusin}\n onFocusout={this.handleTriggerFocusout}\n onMouseEnter={this.handleTriggerMouseOver}\n onMouseLeave={this.handleTriggerMouseLeave}\n part=\"trigger\"\n ref={(el: HTMLDivElement) => {\n this.trigger = el;\n }}\n >\n <slot name=\"trigger\" />\n </div>\n {/* PANEL */}\n <div\n aria-hidden={this.isHidden}\n class=\"bq-tooltip--panel\"\n hidden={this.isHidden}\n part=\"panel\"\n ref={(el: HTMLDivElement) => {\n this.panel = el;\n }}\n role=\"tooltip\"\n >\n {!this.hideArrow && (\n <div\n class=\"bq-tooltip--arrow\"\n ref={(el: HTMLDivElement) => {\n this.arrow = el;\n }}\n />\n )}\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"names":["FloatingUI","event","isEventTargetChildOfElement","h"],"mappings":";;;;;;;;;;AAAA,MAAM,YAAY,GAAG,k1tBAAk1tB;;MCyD11tB,SAAS,GAAA,MAAA;;;;;;;;;;;AAGZ,IAAA,OAAO;AACP,IAAA,KAAK;AACL,IAAA,KAAK;AACL,IAAA,UAAU;;;;;;;;IAcV,aAAa,GAAa,KAAK;;IAGd,QAAQ,GAAY,EAAE;;IAGtB,SAAS,GAAa,KAAK;;IAG3B,SAAS,GAAe,KAAK;AAEtD;AACoE;IAC3C,SAAS,GAAa,KAAK;;IAG3B,SAAS,GAAsB,OAAO;AAE/D;;;AAGG;IACqC,OAAO,GAAI,KAAK;;;AAMxD,IAAA,MAAM,mBAAmB,GAAA;QACvB,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;AACxC,YAAA,OAAO,MAA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,EAAC,qBAAqB,EAC3B,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAClC,SAAS,EAAE,IAAI,CAAC,oBAAoB,EACpC,UAAU,EAAE,IAAI,CAAC,qBAAqB,EACtC,YAAY,EAAE,IAAI,CAAC,sBAAsB,EACzC,YAAY,EAAE,IAAI,CAAC,uBAAuB,EAC1C,IAAI,EAAC,SAAS,EACd,GAAG,EAAE,CAAC,EAAkB,KAAI;AAC1B,gBAAA,IAAI,CAAC,OAAO,GAAG,EAAE;aAClB,EAAA,EAEDA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAA,CAAG,CACnB,EAENA,OACe,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,aAAA,EAAA,IAAI,CAAC,QAAQ,EAC1B,KAAK,EAAC,mBAAmB,EACzB,MAAM,EAAE,IAAI,CAAC,QAAQ,EACrB,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,CAAC,EAAkB,KAAI;AAC1B,gBAAA,IAAI,CAAC,KAAK,GAAG,EAAE;AACjB,aAAC,EACD,IAAI,EAAC,SAAS,EAAA,EAEb,CAAC,IAAI,CAAC,SAAS,KACdA,OACE,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,mBAAmB,EACzB,GAAG,EAAE,CAAC,EAAkB,KAAI;AAC1B,gBAAA,IAAI,CAAC,KAAK,GAAG,EAAE;AACjB,aAAC,GACD,CACH,EACDA,OAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ,CACF;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date-C-h2CBps.js","sources":["../../packages/beeq/src/shared/utils/date.ts"],"sourcesContent":["/**\n * Date parsing pattern definition\n */\ntype TDatePattern = {\n regex: RegExp;\n parse: (\n match: RegExpExecArray,\n monthMap: Record<string, number>,\n locale?: Intl.LocalesArgument,\n ) => { day: number; month: number; year: number };\n};\n\n/**\n * Static date parsing patterns\n */\nconst DATE_PATTERNS: TDatePattern[] = [\n {\n // Matches \"30 May 2024\" or \"30 January 2024\"\n regex: /^(\\d{1,2})\\s+([a-z]+)\\s+(\\d{4})$/i,\n parse: (m, months) => ({\n day: +m[1],\n month: months[m[2].toLowerCase()],\n year: +m[3],\n }),\n },\n {\n // Matches \"05/30/2024\", \"30-05-2024\", \"30.05.2024\", \"05.30.2024\" (with heuristic for day/month)\n regex: /^(\\d{1,2})[\\s\\-/.](\\d{1,2})[\\s\\-/.](\\d{4})$/,\n parse: (m, _, locale) => {\n const { day, month } = parseNumericDate(+m[1], +m[2], locale);\n return { day, month, year: +m[3] };\n },\n },\n {\n // Matches \"May 30, 2024\" or \"January 1, 1970\" (with optional comma)\n regex: /^([a-z]+)\\s+(\\d{1,2}),?\\s+(\\d{4})$/i,\n parse: (m, months) => ({\n month: months[m[1].toLowerCase()],\n day: +m[2],\n year: +m[3],\n }),\n },\n {\n // Matches \"2024-05-30\" (ISO format without parsing as Date first)\n regex: /^(\\d{4})-(\\d{2})-(\\d{2})$/,\n parse: (m) => ({\n year: +m[1],\n month: +m[2] - 1,\n day: +m[3],\n }),\n },\n];\n\nconst monthNamesCache = new Map<string, Record<string, number>>();\n\n/**\n * Gets localized month names for the given locale (both short and long forms)\n * Caches results for performance\n * @param {Intl.LocalesArgument} locale - The locale identifier, e.g., 'en-GB', 'fr-FR', etc.\n * @returns {Record<string, number>} Mapping of month names to month indices\n */\nconst getMonthNamesForLocale = (locale: Intl.LocalesArgument): Record<string, number> => {\n const cacheKey = typeof locale === 'string' ? locale : JSON.stringify(locale);\n\n const cachedMonthNames = monthNamesCache.get(cacheKey);\n if (cachedMonthNames) return cachedMonthNames;\n\n const monthMap: Record<string, number> = {};\n const shortFormatter = new Intl.DateTimeFormat(locale, { month: 'short' });\n const longFormatter = new Intl.DateTimeFormat(locale, { month: 'long' });\n\n for (let month = 0; month < 12; month++) {\n const date = new Date(2024, month, 1);\n monthMap[shortFormatter.format(date).toLowerCase()] = month;\n monthMap[longFormatter.format(date).toLowerCase()] = month;\n }\n\n monthNamesCache.set(cacheKey, monthMap);\n return monthMap;\n};\n\n/**\n * Parses day-month-year or month-day-year numeric date format\n * Uses heuristic: if any number > 12, treat it as day, otherwise defaults to locale preference\n * @param {number} first - The first numeric part (day or month)\n * @param {number} second - The second numeric part (month or day)\n * @param {Intl.LocalesArgument} locale - The locale for determining format preference\n * @returns {{day: number, month: number}} Object with day and month (0-based)\n */\nconst parseNumericDate = (\n first: number,\n second: number,\n locale: Intl.LocalesArgument = 'en-GB',\n): { day: number; month: number } => {\n // If first number > 12, it must be the day (DD/MM format)\n if (first > 12) return { day: first, month: second - 1 };\n\n // If second number > 12, it must be the day (MM/DD format)\n if (second > 12) return { day: second, month: first - 1 };\n\n // Both numbers <= 12: ambiguous case\n // Use locale to determine format preference\n const localeStr = typeof locale === 'string' ? locale : locale?.[0] || 'en-GB';\n const usesMMDD = ['en-US', 'en-CA'].some((l) => localeStr.startsWith(l));\n\n if (usesMMDD) {\n // US/Canada format: MM/DD\n return { day: second, month: first - 1 };\n }\n\n // Default to DD/MM (European/most of world format)\n return { day: first, month: second - 1 };\n};\n\n/**\n * Validates that a date is actually valid (not auto-corrected by Date constructor)\n * @param {number} day - Day of the month\n * @param {number} month - Month (0-based)\n * @param {number} year - Full year\n * @returns {boolean} True if the date is valid\n */\nconst isDateValid = (day: number, month: number, year: number): boolean => {\n const date = new Date(year, month, day);\n return date.getDate() === day && date.getMonth() === month && date.getFullYear() === year;\n};\n\n/**\n * Validates and creates a Date object from day, month, and year\n * @param {number} day - Day of the month\n * @param {number} month - Month (0-based)\n * @param {number} year - Full year\n * @returns {Date | null} Valid Date object or null if invalid\n */\nconst createValidDate = (day: number, month: number, year: number): Date | null => {\n if (month === undefined || !day || !year) return null;\n if (!isDateValid(day, month, year)) return null;\n\n return new Date(year, month, day);\n};\n\n/**\n * Parses various date input formats and returns a Date object\n * Supports:\n * - ISO format: \"2024-05-30\"\n * - Text format: \"30 May 2024\", \"May 30, 2024\", \"30 January 2024\", \"January 1, 1970\" (locale-aware)\n * - Numeric formats: \"30/05/2024\", \"05-30-2024\", \"30.05.2024\", \"05.30.2024\" (with heuristic for day/month)\n *\n * @param {string} inputValue - The date string to parse\n * @param {Intl.LocalesArgument} locale - The locale for month name recognition (defaults to 'en-GB')\n * @returns {Date | null} Parsed Date object or null if parsing fails\n */\nexport const parseDateInput = (inputValue: string, locale: Intl.LocalesArgument = 'en-GB'): Date | null => {\n if (!inputValue?.trim()) return null;\n\n // Try ISO format first\n const isoDate = new Date(`${inputValue}T00:00:00`);\n if (!Number.isNaN(isoDate.getTime()) && isValidISODate(inputValue)) return isoDate;\n\n const monthMap = getMonthNamesForLocale(locale);\n\n for (const { regex, parse } of DATE_PATTERNS) {\n const match = regex.exec(inputValue);\n if (!match) continue;\n\n const { day, month, year } = parse(match, monthMap, locale);\n const date = createValidDate(day, month, year);\n if (date) return date;\n }\n\n return null;\n};\n\n/**\n * Validates if a string is in ISO date format (YYYY-MM-DD) with actual valid date values\n * @param {string} dateStr - The date string to validate\n * @returns {boolean} True if the date string is valid in ISO format and represents an actual valid date\n */\nexport const isValidISODate = (dateStr: string): boolean => {\n if (!/^\\d{4}-\\d{2}-\\d{2}$/.test(dateStr)) return false;\n\n const [yearStr, monthStr, dayStr] = dateStr.split('-');\n const year = +yearStr;\n const month = +monthStr - 1;\n const day = +dayStr;\n\n return isDateValid(day, month, year);\n};\n"],"names":[],"mappings":";;;;;;AAYA;;AAEG;AACH,MAAM,aAAa,GAAmB;AACpC,IAAA;;AAEE,QAAA,KAAK,EAAE,mCAAmC;QAC1C,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,MAAM;AACrB,YAAA,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YACV,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,W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