@beeq/core 1.11.0 → 1.11.1
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/bq-accordion.entry.esm.js.map +1 -1
- package/dist/beeq/bq-alert.entry.esm.js.map +1 -1
- package/dist/beeq/bq-avatar.entry.esm.js.map +1 -1
- package/dist/beeq/bq-badge.entry.esm.js.map +1 -1
- package/dist/beeq/bq-breadcrumb-item.entry.esm.js.map +1 -1
- package/dist/beeq/bq-breadcrumb.entry.esm.js.map +1 -1
- package/dist/beeq/bq-button.bq-icon.entry.esm.js.map +1 -1
- package/dist/beeq/bq-card.entry.esm.js.map +1 -1
- package/dist/beeq/bq-checkbox.entry.esm.js.map +1 -1
- package/dist/beeq/bq-date-picker.entry.esm.js.map +1 -1
- package/dist/beeq/bq-dialog.entry.esm.js.map +1 -1
- package/dist/beeq/bq-divider.entry.esm.js.map +1 -1
- package/dist/beeq/bq-drawer.entry.esm.js.map +1 -1
- package/dist/beeq/bq-dropdown.bq-panel.entry.esm.js.map +1 -1
- package/dist/beeq/bq-empty-state.entry.esm.js.map +1 -1
- package/dist/beeq/bq-input.entry.esm.js.map +1 -1
- package/dist/beeq/bq-notification.entry.esm.js.map +1 -1
- package/dist/beeq/bq-option-group.entry.esm.js.map +1 -1
- package/dist/beeq/bq-option-list.bq-tag.entry.esm.js.map +1 -1
- package/dist/beeq/bq-option.entry.esm.js.map +1 -1
- package/dist/beeq/bq-page-title.entry.esm.js.map +1 -1
- package/dist/beeq/bq-progress.entry.esm.js.map +1 -1
- package/dist/beeq/bq-radio-group.entry.esm.js.map +1 -1
- package/dist/beeq/bq-radio.entry.esm.js.map +1 -1
- package/dist/beeq/bq-select.entry.esm.js.map +1 -1
- package/dist/beeq/bq-side-menu-item.entry.esm.js.map +1 -1
- package/dist/beeq/bq-side-menu.entry.esm.js.map +1 -1
- package/dist/beeq/bq-slider.entry.esm.js.map +1 -1
- package/dist/beeq/bq-spinner.entry.esm.js.map +1 -1
- package/dist/beeq/bq-status.entry.esm.js.map +1 -1
- package/dist/beeq/bq-step-item.entry.esm.js.map +1 -1
- package/dist/beeq/bq-steps.entry.esm.js.map +1 -1
- package/dist/beeq/bq-switch.entry.esm.js.map +1 -1
- package/dist/beeq/bq-tab-group.entry.esm.js.map +1 -1
- package/dist/beeq/bq-tab.entry.esm.js.map +1 -1
- package/dist/beeq/bq-textarea.entry.esm.js.map +1 -1
- package/dist/beeq/bq-toast.entry.esm.js.map +1 -1
- package/dist/beeq/bq-tooltip.entry.esm.js.map +1 -1
- package/dist/beeq/index.esm.js +1 -1
- package/dist/beeq/index.esm.js.map +1 -1
- package/dist/beeq/{p-a9643899.entry.js → p-0bf5e367.entry.js} +2 -2
- package/dist/beeq/p-0bf5e367.entry.js.map +1 -0
- package/dist/beeq/{p-dd896cd8.entry.js → p-16defa87.entry.js} +2 -2
- package/dist/beeq/p-16defa87.entry.js.map +1 -0
- package/dist/beeq/{p-5ce77af6.entry.js → p-17de1ba4.entry.js} +2 -2
- package/dist/beeq/p-17de1ba4.entry.js.map +1 -0
- package/dist/beeq/p-1df8fe61.entry.js +6 -0
- package/dist/beeq/p-1df8fe61.entry.js.map +1 -0
- package/dist/beeq/{p-b520bdb8.entry.js → p-24749f67.entry.js} +2 -2
- package/dist/beeq/p-24749f67.entry.js.map +1 -0
- package/dist/beeq/{p-8eb8612b.entry.js → p-38add122.entry.js} +2 -2
- package/dist/beeq/p-38add122.entry.js.map +1 -0
- package/dist/beeq/{p-d1dd36ca.entry.js → p-454fa535.entry.js} +2 -2
- package/dist/beeq/p-454fa535.entry.js.map +1 -0
- package/dist/beeq/{p-ba12d135.entry.js → p-4647a0fb.entry.js} +2 -2
- package/dist/beeq/p-4647a0fb.entry.js.map +1 -0
- package/dist/beeq/{p-87430ad8.entry.js → p-4725a142.entry.js} +2 -2
- package/dist/beeq/p-4725a142.entry.js.map +1 -0
- package/dist/beeq/{p-6852a0b0.entry.js → p-51351eed.entry.js} +2 -2
- package/dist/beeq/p-51351eed.entry.js.map +1 -0
- package/dist/beeq/{p-96f6c9ae.entry.js → p-5b0a56e7.entry.js} +2 -2
- package/dist/beeq/p-5b0a56e7.entry.js.map +1 -0
- package/dist/beeq/{p-3dca7a14.entry.js → p-5c23324d.entry.js} +2 -2
- package/dist/beeq/p-5c23324d.entry.js.map +1 -0
- package/dist/beeq/{p-60db3689.entry.js → p-5dd30c4c.entry.js} +2 -2
- package/dist/beeq/p-5dd30c4c.entry.js.map +1 -0
- package/dist/beeq/{p-eb2cfa90.entry.js → p-5df7df5d.entry.js} +2 -2
- package/dist/beeq/p-5df7df5d.entry.js.map +1 -0
- package/dist/beeq/{p-c023718e.entry.js → p-5e8c8e90.entry.js} +2 -2
- package/dist/beeq/p-5e8c8e90.entry.js.map +1 -0
- package/dist/beeq/{p-1c6ef374.entry.js → p-662578a2.entry.js} +2 -2
- package/dist/beeq/p-662578a2.entry.js.map +1 -0
- package/dist/beeq/{p-3c7397cf.entry.js → p-6ae2ca4b.entry.js} +2 -2
- package/dist/beeq/p-6ae2ca4b.entry.js.map +1 -0
- package/dist/beeq/{p-0deed5d1.entry.js → p-7ca73c06.entry.js} +2 -2
- package/dist/beeq/p-7ca73c06.entry.js.map +1 -0
- package/dist/beeq/{p-7063e5c2.entry.js → p-84e62655.entry.js} +2 -2
- package/dist/beeq/p-84e62655.entry.js.map +1 -0
- package/dist/beeq/{p-dc4d2d77.entry.js → p-93d6f4f0.entry.js} +2 -2
- package/dist/beeq/p-93d6f4f0.entry.js.map +1 -0
- package/dist/beeq/{p-2f008ed1.entry.js → p-9585221e.entry.js} +2 -2
- package/dist/beeq/p-9585221e.entry.js.map +1 -0
- package/dist/beeq/{p-477f032f.entry.js → p-9e9baa82.entry.js} +2 -2
- package/dist/beeq/p-9e9baa82.entry.js.map +1 -0
- package/dist/beeq/{p-DMf9D39m.js → p-BNvWMggA.js} +2 -2
- package/dist/beeq/{p-DMf9D39m.js.map → p-BNvWMggA.js.map} +1 -1
- package/dist/beeq/p-BOf9EC3C.js +7 -0
- package/dist/beeq/p-BOf9EC3C.js.map +1 -0
- package/dist/beeq/{p-Ci39rxuU.js → p-BRbYDZoo.js} +2 -2
- package/dist/beeq/{p-Ci39rxuU.js.map → p-BRbYDZoo.js.map} +1 -1
- package/dist/beeq/{p-D9ofIraD.js → p-CVw85-WU.js} +1 -1
- package/dist/beeq/p-CVw85-WU.js.map +1 -0
- package/dist/beeq/p-CgIw4Syg.js +6 -0
- package/dist/beeq/{p-y49NXy_H.js.map → p-CgIw4Syg.js.map} +1 -1
- package/dist/beeq/p-DdvbF5yL.js.map +1 -1
- package/dist/beeq/{p-48811a09.entry.js → p-b1d2e472.entry.js} +2 -2
- package/dist/beeq/p-b1d2e472.entry.js.map +1 -0
- package/dist/beeq/p-b7efb629.entry.js +6 -0
- package/dist/beeq/p-b7efb629.entry.js.map +1 -0
- package/dist/beeq/{p-9305e1a2.entry.js → p-b88b2573.entry.js} +2 -2
- package/dist/beeq/p-b88b2573.entry.js.map +1 -0
- package/dist/beeq/p-bfca08f5.entry.js +6 -0
- package/dist/beeq/p-bfca08f5.entry.js.map +1 -0
- package/dist/beeq/{p-6a10175b.entry.js → p-c63b89d2.entry.js} +2 -2
- package/dist/beeq/p-c63b89d2.entry.js.map +1 -0
- package/dist/beeq/{p-3e8980ff.entry.js → p-ca93325b.entry.js} +2 -2
- package/dist/beeq/p-ca93325b.entry.js.map +1 -0
- package/dist/beeq/{p-04745600.entry.js → p-cb0639d5.entry.js} +2 -2
- package/dist/beeq/p-cb0639d5.entry.js.map +1 -0
- package/dist/beeq/{p-78be94d2.entry.js → p-cd53041f.entry.js} +2 -2
- package/dist/beeq/p-cd53041f.entry.js.map +1 -0
- package/dist/beeq/{p-f12a127c.entry.js → p-d8118f0b.entry.js} +2 -2
- package/dist/beeq/p-d8118f0b.entry.js.map +1 -0
- package/dist/beeq/p-d9c5ab1d.entry.js +6 -0
- package/dist/beeq/p-d9c5ab1d.entry.js.map +1 -0
- package/dist/beeq/{p-1421f4a3.entry.js → p-dc5aa386.entry.js} +2 -2
- package/dist/beeq/p-dc5aa386.entry.js.map +1 -0
- package/dist/beeq/{p-fbc38c77.entry.js → p-dcda1181.entry.js} +2 -2
- package/dist/beeq/p-dcda1181.entry.js.map +1 -0
- package/dist/beeq/{p-6d429afd.entry.js → p-e5c12fd7.entry.js} +2 -2
- package/dist/beeq/p-e5c12fd7.entry.js.map +1 -0
- package/dist/beeq/p-eaa8c123.entry.js +6 -0
- package/dist/beeq/p-eaa8c123.entry.js.map +1 -0
- package/dist/beeq/{p-8280145e.entry.js → p-eb47c1ae.entry.js} +2 -2
- package/dist/beeq/p-eb47c1ae.entry.js.map +1 -0
- package/dist/beeq/{p-f8d5c1ab.entry.js → p-eb6eac82.entry.js} +2 -2
- package/dist/beeq/p-eb6eac82.entry.js.map +1 -0
- package/dist/beeq/{p-37a2fb82.entry.js → p-f691f00c.entry.js} +2 -2
- package/dist/beeq/p-f691f00c.entry.js.map +1 -0
- package/dist/beeq/p-igOoibr-.js +6 -0
- package/dist/beeq/p-igOoibr-.js.map +1 -0
- package/dist/beeq/{p-CVMdKx0v.js → p-lysmVw2n.js} +2 -2
- package/dist/beeq/{p-CVMdKx0v.js.map → p-lysmVw2n.js.map} +1 -1
- package/dist/beeq.html-custom-data.json +2 -11
- package/dist/cjs/beeq.cjs.js +3 -5
- package/dist/cjs/beeq.cjs.js.map +1 -1
- package/dist/cjs/bq-accordion-group.cjs.entry.js +1 -3
- package/dist/cjs/bq-accordion.cjs.entry.js +18 -10
- package/dist/cjs/bq-accordion.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-alert.cjs.entry.js +12 -11
- package/dist/cjs/bq-alert.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-avatar.cjs.entry.js +5 -7
- package/dist/cjs/bq-avatar.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-badge.cjs.entry.js +4 -4
- package/dist/cjs/bq-badge.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +4 -6
- package/dist/cjs/bq-breadcrumb-item.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-breadcrumb.cjs.entry.js +6 -4
- package/dist/cjs/bq-breadcrumb.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-button.bq-icon.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-button_2.cjs.entry.js +14 -12
- package/dist/cjs/bq-card.cjs.entry.js +2 -4
- package/dist/cjs/bq-card.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/bq-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-date-picker.cjs.entry.js +69 -26
- package/dist/cjs/bq-date-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-dialog.cjs.entry.js +12 -8
- package/dist/cjs/bq-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-divider.cjs.entry.js +7 -7
- package/dist/cjs/bq-divider.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-drawer.cjs.entry.js +8 -6
- package/dist/cjs/bq-drawer.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-dropdown.bq-panel.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-dropdown_2.cjs.entry.js +12 -8
- package/dist/cjs/bq-empty-state.cjs.entry.js +9 -7
- package/dist/cjs/bq-empty-state.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-input.cjs.entry.js +29 -23
- package/dist/cjs/bq-input.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-notification.cjs.entry.js +10 -6
- package/dist/cjs/bq-notification.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-option-group.cjs.entry.js +2 -4
- package/dist/cjs/bq-option-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-option-list.bq-tag.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-option-list_2.cjs.entry.js +6 -6
- package/dist/cjs/bq-option.cjs.entry.js +17 -12
- package/dist/cjs/bq-option.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-page-title.cjs.entry.js +10 -6
- package/dist/cjs/bq-page-title.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-progress.cjs.entry.js +6 -8
- package/dist/cjs/bq-progress.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-radio-group.cjs.entry.js +15 -11
- package/dist/cjs/bq-radio-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-radio.cjs.entry.js +4 -4
- package/dist/cjs/bq-radio.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-select.cjs.entry.js +76 -31
- package/dist/cjs/bq-select.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-side-menu-item.cjs.entry.js +6 -6
- package/dist/cjs/bq-side-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-side-menu.cjs.entry.js +11 -9
- package/dist/cjs/bq-side-menu.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-slider.cjs.entry.js +25 -14
- package/dist/cjs/bq-slider.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-spinner.cjs.entry.js +12 -14
- package/dist/cjs/bq-spinner.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-status.cjs.entry.js +2 -4
- package/dist/cjs/bq-status.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-step-item.cjs.entry.js +7 -9
- package/dist/cjs/bq-step-item.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-steps.cjs.entry.js +5 -5
- package/dist/cjs/bq-steps.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-switch.cjs.entry.js +8 -6
- package/dist/cjs/bq-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-tab-group.cjs.entry.js +9 -9
- package/dist/cjs/bq-tab-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-tab.cjs.entry.js +8 -6
- package/dist/cjs/bq-tab.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-textarea.cjs.entry.js +16 -15
- package/dist/cjs/bq-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-toast.cjs.entry.js +4 -7
- package/dist/cjs/bq-toast.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-tooltip.cjs.entry.js +9 -5
- package/dist/cjs/bq-tooltip.entry.cjs.js.map +1 -1
- package/dist/cjs/date-C-h2CBps.js +170 -0
- package/dist/cjs/date-C-h2CBps.js.map +1 -0
- package/dist/cjs/{debounce-DFaAa1Cu.js → debounce-D0tIpUuS.js} +4 -4
- package/dist/cjs/debounce-D0tIpUuS.js.map +1 -0
- package/dist/cjs/{index-tFN0ax76.js → index-D7RDSS0K.js} +73 -47
- package/dist/cjs/{index-tFN0ax76.js.map → index-D7RDSS0K.js.map} +1 -1
- package/dist/cjs/{index-CLoLF-_B.js → index-g8MkV15i.js} +78 -65
- package/dist/cjs/index-g8MkV15i.js.map +1 -0
- package/dist/cjs/index.cjs.js +7 -6
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{isDefined-K4EcmGLZ.js → isDefined-D24L82z9.js} +3 -3
- package/dist/cjs/{isDefined-K4EcmGLZ.js.map → isDefined-D24L82z9.js.map} +1 -1
- package/dist/cjs/{isString-CHgmxASW.js → isString-CA9m1aBg.js} +3 -3
- package/dist/cjs/{isString-CHgmxASW.js.map → isString-CA9m1aBg.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -4
- package/dist/cjs/{stringToArray-DTx7uqZ4.js → stringToArray-B747BpEA.js} +4 -4
- package/dist/cjs/{stringToArray-DTx7uqZ4.js.map → stringToArray-B747BpEA.js.map} +1 -1
- package/dist/cjs/transition-C0S-pYqN.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/accordion/bq-accordion.js +17 -11
- package/dist/collection/components/accordion/bq-accordion.js.map +1 -1
- package/dist/collection/components/accordion/helper/index.js +6 -2
- package/dist/collection/components/accordion/helper/index.js.map +1 -1
- package/dist/collection/components/accordion/scss/bq-accordion.css +1 -1
- package/dist/collection/components/accordion-group/bq-accordion-group.js +6 -6
- package/dist/collection/components/alert/bq-alert.js +25 -22
- package/dist/collection/components/alert/bq-alert.js.map +1 -1
- package/dist/collection/components/avatar/bq-avatar.js +16 -16
- package/dist/collection/components/avatar/bq-avatar.js.map +1 -1
- package/dist/collection/components/badge/bq-badge.js +10 -8
- package/dist/collection/components/badge/bq-badge.js.map +1 -1
- package/dist/collection/components/breadcrumb/bq-breadcrumb.js +7 -3
- package/dist/collection/components/breadcrumb/bq-breadcrumb.js.map +1 -1
- package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js +6 -6
- package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js.map +1 -1
- package/dist/collection/components/button/bq-button.js +23 -19
- 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 +5 -5
- package/dist/collection/components/card/bq-card.js.map +1 -1
- package/dist/collection/components/checkbox/bq-checkbox.js +19 -17
- package/dist/collection/components/checkbox/bq-checkbox.js.map +1 -1
- package/dist/collection/components/date-picker/bq-date-picker.js +103 -61
- package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
- package/dist/collection/components/dialog/bq-dialog.js +20 -14
- package/dist/collection/components/dialog/bq-dialog.js.map +1 -1
- package/dist/collection/components/divider/bq-divider.js +17 -15
- package/dist/collection/components/divider/bq-divider.js.map +1 -1
- package/dist/collection/components/drawer/bq-drawer.js +16 -12
- package/dist/collection/components/drawer/bq-drawer.js.map +1 -1
- package/dist/collection/components/dropdown/bq-dropdown.js +18 -14
- package/dist/collection/components/dropdown/bq-dropdown.js.map +1 -1
- package/dist/collection/components/empty-state/bq-empty-state.js +10 -6
- package/dist/collection/components/empty-state/bq-empty-state.js.map +1 -1
- package/dist/collection/components/icon/bq-icon.js +17 -17
- package/dist/collection/components/icon/bq-icon.js.map +1 -1
- package/dist/collection/components/input/bq-input.js +89 -86
- package/dist/collection/components/input/bq-input.js.map +1 -1
- package/dist/collection/components/notification/bq-notification.js +21 -15
- package/dist/collection/components/notification/bq-notification.js.map +1 -1
- package/dist/collection/components/option/bq-option.js +42 -16
- package/dist/collection/components/option/bq-option.js.map +1 -1
- package/dist/collection/components/option/scss/bq-option.css +1 -1
- package/dist/collection/components/option-group/bq-option-group.js +1 -1
- package/dist/collection/components/option-group/bq-option-group.js.map +1 -1
- package/dist/collection/components/option-list/bq-option-list.js +1 -1
- package/dist/collection/components/option-list/bq-option-list.js.map +1 -1
- package/dist/collection/components/page-title/bq-page-title.js +9 -3
- package/dist/collection/components/page-title/bq-page-title.js.map +1 -1
- package/dist/collection/components/panel/bq-panel.js +10 -8
- package/dist/collection/components/panel/bq-panel.js.map +1 -1
- package/dist/collection/components/progress/bq-progress.js +14 -14
- package/dist/collection/components/progress/bq-progress.js.map +1 -1
- package/dist/collection/components/radio/bq-radio.js +16 -14
- package/dist/collection/components/radio/bq-radio.js.map +1 -1
- package/dist/collection/components/radio-group/bq-radio-group.js +25 -19
- package/dist/collection/components/radio-group/bq-radio-group.js.map +1 -1
- package/dist/collection/components/select/bq-select.js +101 -54
- 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 +12 -8
- package/dist/collection/components/side-menu/bq-side-menu.js.map +1 -1
- package/dist/collection/components/side-menu/scss/bq-side-menu.css +1 -1
- package/dist/collection/components/side-menu-item/bq-side-menu-item.js +8 -6
- package/dist/collection/components/side-menu-item/bq-side-menu-item.js.map +1 -1
- package/dist/collection/components/slider/bq-slider.js +36 -23
- package/dist/collection/components/slider/bq-slider.js.map +1 -1
- package/dist/collection/components/spinner/bq-spinner.js +14 -14
- package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
- package/dist/collection/components/spinner/bq-spinner.types.js +1 -1
- package/dist/collection/components/spinner/bq-spinner.types.js.map +1 -1
- package/dist/collection/components/spinner/scss/bq-spinner.css +1 -1
- package/dist/collection/components/status/bq-status.js +3 -3
- package/dist/collection/components/status/bq-status.js.map +1 -1
- package/dist/collection/components/step-item/bq-step-item.js +11 -11
- package/dist/collection/components/step-item/bq-step-item.js.map +1 -1
- package/dist/collection/components/steps/bq-steps.js +8 -6
- package/dist/collection/components/steps/bq-steps.js.map +1 -1
- package/dist/collection/components/switch/bq-switch.js +22 -18
- package/dist/collection/components/switch/bq-switch.js.map +1 -1
- package/dist/collection/components/tab/bq-tab.js +17 -13
- package/dist/collection/components/tab/bq-tab.js.map +1 -1
- package/dist/collection/components/tab-group/bq-tab-group.js +15 -13
- package/dist/collection/components/tab-group/bq-tab-group.js.map +1 -1
- package/dist/collection/components/tag/bq-tag.js +19 -17
- package/dist/collection/components/tag/bq-tag.js.map +1 -1
- package/dist/collection/components/tag/helper/index.js.map +1 -1
- package/dist/collection/components/textarea/bq-textarea.js +51 -62
- package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
- package/dist/collection/components/toast/bq-toast.js +11 -12
- package/dist/collection/components/toast/bq-toast.js.map +1 -1
- package/dist/collection/components/tooltip/bq-tooltip.js +14 -8
- package/dist/collection/components/tooltip/bq-tooltip.js.map +1 -1
- package/dist/collection/services/interfaces/floating-ui.js.map +1 -1
- package/dist/collection/services/libraries/floating-ui/index.js +34 -25
- package/dist/collection/services/libraries/floating-ui/index.js.map +1 -1
- package/dist/collection/shared/test-utils/sleep.js +1 -1
- package/dist/collection/shared/test-utils/sleep.js.map +1 -1
- package/dist/collection/shared/utils/date.js +163 -0
- package/dist/collection/shared/utils/date.js.map +1 -0
- package/dist/collection/shared/utils/debounce.js +2 -1
- package/dist/collection/shared/utils/debounce.js.map +1 -1
- package/dist/collection/shared/utils/index.js +1 -0
- package/dist/collection/shared/utils/index.js.map +1 -1
- package/dist/collection/shared/utils/isString.js +1 -1
- package/dist/collection/shared/utils/isString.js.map +1 -1
- package/dist/collection/shared/utils/setRafTimeout.js +0 -1
- package/dist/collection/shared/utils/setRafTimeout.js.map +1 -1
- package/dist/collection/tools/angular-value-accessor-config.js.map +1 -1
- package/dist/collection/tools/generate-custom-elements-json.js +2 -2
- package/dist/collection/tools/generate-custom-elements-json.js.map +1 -1
- package/dist/collection/tools/vue-model-config.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.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-C4Jb3i-D.js → p-16lKXCDk.js} +2 -2
- package/dist/components/p-16lKXCDk.js.map +1 -0
- package/dist/components/{p-CjS2vgik.js → p-A6e1tN-B.js} +2 -2
- package/dist/components/p-A6e1tN-B.js.map +1 -0
- package/dist/components/{p-5er2o4Mn.js → p-B5XEhmuc.js} +2 -2
- package/dist/components/{p-5er2o4Mn.js.map → p-B5XEhmuc.js.map} +1 -1
- package/dist/components/{p-Bs3hKCXS.js → p-BBhidARY.js} +2 -2
- package/dist/components/p-BBhidARY.js.map +1 -0
- package/dist/components/{p-Ci39rxuU.js → p-BRbYDZoo.js} +2 -2
- package/dist/components/{p-D9ofIraD.js → p-CVw85-WU.js} +1 -1
- package/dist/components/p-CVw85-WU.js.map +1 -0
- package/dist/components/p-CXUO6Zub.js +6 -0
- package/dist/components/p-CXUO6Zub.js.map +1 -0
- package/dist/components/p-CgIw4Syg.js +6 -0
- package/dist/components/p-CgIw4Syg.js.map +1 -0
- package/dist/components/{p-k2047NJf.js → p-D14_9VoZ.js} +2 -2
- package/dist/components/{p-k2047NJf.js.map → p-D14_9VoZ.js.map} +1 -1
- package/dist/components/{p-fQPjV9jm.js → p-DGysEMss.js} +2 -2
- package/dist/components/p-DGysEMss.js.map +1 -0
- package/dist/components/p-DHdYy1q5.js +6 -0
- package/dist/components/p-DHdYy1q5.js.map +1 -0
- package/dist/components/p-DdvbF5yL.js.map +1 -1
- package/dist/components/{p-BIl7Vq5P.js → p-DokL_HVP.js} +2 -2
- package/dist/components/p-DokL_HVP.js.map +1 -0
- package/dist/components/{p-BPVTwD6U.js → p-eRUe5rRq.js} +2 -2
- package/dist/components/p-eRUe5rRq.js.map +1 -0
- package/dist/components/{p-CVMdKx0v.js → p-lysmVw2n.js} +2 -2
- package/dist/components/{p-CVMdKx0v.js.map → p-lysmVw2n.js.map} +1 -1
- package/dist/custom-elements.json +57 -61
- package/dist/esm/beeq.js +4 -6
- package/dist/esm/beeq.js.map +1 -1
- package/dist/esm/bq-accordion-group.entry.js +1 -3
- package/dist/esm/bq-accordion.entry.js +18 -10
- package/dist/esm/bq-accordion.entry.js.map +1 -1
- package/dist/esm/bq-alert.entry.js +12 -11
- package/dist/esm/bq-alert.entry.js.map +1 -1
- package/dist/esm/bq-avatar.entry.js +5 -7
- package/dist/esm/bq-avatar.entry.js.map +1 -1
- package/dist/esm/bq-badge.entry.js +4 -4
- package/dist/esm/bq-badge.entry.js.map +1 -1
- package/dist/esm/bq-breadcrumb-item.entry.js +4 -6
- package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/bq-breadcrumb.entry.js +6 -4
- package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
- package/dist/esm/bq-button.bq-icon.entry.js.map +1 -1
- package/dist/esm/bq-button_2.entry.js +14 -12
- package/dist/esm/bq-card.entry.js +2 -4
- package/dist/esm/bq-card.entry.js.map +1 -1
- package/dist/esm/bq-checkbox.entry.js +5 -5
- package/dist/esm/bq-checkbox.entry.js.map +1 -1
- package/dist/esm/bq-date-picker.entry.js +69 -26
- package/dist/esm/bq-date-picker.entry.js.map +1 -1
- package/dist/esm/bq-dialog.entry.js +12 -8
- package/dist/esm/bq-dialog.entry.js.map +1 -1
- package/dist/esm/bq-divider.entry.js +7 -7
- package/dist/esm/bq-divider.entry.js.map +1 -1
- package/dist/esm/bq-drawer.entry.js +8 -6
- package/dist/esm/bq-drawer.entry.js.map +1 -1
- package/dist/esm/bq-dropdown.bq-panel.entry.js.map +1 -1
- package/dist/esm/bq-dropdown_2.entry.js +12 -8
- package/dist/esm/bq-empty-state.entry.js +9 -7
- package/dist/esm/bq-empty-state.entry.js.map +1 -1
- package/dist/esm/bq-input.entry.js +29 -23
- package/dist/esm/bq-input.entry.js.map +1 -1
- package/dist/esm/bq-notification.entry.js +10 -6
- package/dist/esm/bq-notification.entry.js.map +1 -1
- package/dist/esm/bq-option-group.entry.js +2 -4
- package/dist/esm/bq-option-group.entry.js.map +1 -1
- package/dist/esm/bq-option-list.bq-tag.entry.js.map +1 -1
- package/dist/esm/bq-option-list_2.entry.js +6 -6
- package/dist/esm/bq-option.entry.js +17 -12
- package/dist/esm/bq-option.entry.js.map +1 -1
- package/dist/esm/bq-page-title.entry.js +10 -6
- package/dist/esm/bq-page-title.entry.js.map +1 -1
- package/dist/esm/bq-progress.entry.js +6 -8
- package/dist/esm/bq-progress.entry.js.map +1 -1
- package/dist/esm/bq-radio-group.entry.js +15 -11
- package/dist/esm/bq-radio-group.entry.js.map +1 -1
- package/dist/esm/bq-radio.entry.js +4 -4
- package/dist/esm/bq-radio.entry.js.map +1 -1
- package/dist/esm/bq-select.entry.js +76 -31
- package/dist/esm/bq-select.entry.js.map +1 -1
- package/dist/esm/bq-side-menu-item.entry.js +6 -6
- package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
- package/dist/esm/bq-side-menu.entry.js +11 -9
- package/dist/esm/bq-side-menu.entry.js.map +1 -1
- package/dist/esm/bq-slider.entry.js +25 -14
- package/dist/esm/bq-slider.entry.js.map +1 -1
- package/dist/esm/bq-spinner.entry.js +12 -14
- package/dist/esm/bq-spinner.entry.js.map +1 -1
- package/dist/esm/bq-status.entry.js +2 -4
- package/dist/esm/bq-status.entry.js.map +1 -1
- package/dist/esm/bq-step-item.entry.js +7 -9
- package/dist/esm/bq-step-item.entry.js.map +1 -1
- package/dist/esm/bq-steps.entry.js +5 -5
- package/dist/esm/bq-steps.entry.js.map +1 -1
- package/dist/esm/bq-switch.entry.js +8 -6
- package/dist/esm/bq-switch.entry.js.map +1 -1
- package/dist/esm/bq-tab-group.entry.js +9 -9
- package/dist/esm/bq-tab-group.entry.js.map +1 -1
- package/dist/esm/bq-tab.entry.js +8 -6
- package/dist/esm/bq-tab.entry.js.map +1 -1
- package/dist/esm/bq-textarea.entry.js +16 -15
- package/dist/esm/bq-textarea.entry.js.map +1 -1
- package/dist/esm/bq-toast.entry.js +4 -7
- package/dist/esm/bq-toast.entry.js.map +1 -1
- package/dist/esm/bq-tooltip.entry.js +9 -5
- package/dist/esm/bq-tooltip.entry.js.map +1 -1
- package/dist/esm/date-igOoibr-.js +167 -0
- package/dist/esm/date-igOoibr-.js.map +1 -0
- package/dist/esm/{debounce-cjfQylgg.js → debounce-gVeuteEJ.js} +4 -4
- package/dist/esm/debounce-gVeuteEJ.js.map +1 -0
- package/dist/esm/{index-DDw-pDpy.js → index-BOf9EC3C.js} +78 -65
- package/dist/esm/index-BOf9EC3C.js.map +1 -0
- package/dist/esm/{index-y49NXy_H.js → index-CgIw4Syg.js} +73 -47
- package/dist/esm/{index-y49NXy_H.js.map → index-CgIw4Syg.js.map} +1 -1
- package/dist/esm/index.js +5 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{isDefined-DjmcVyb_.js → isDefined-DvmFa_bD.js} +3 -3
- package/dist/esm/{isDefined-DjmcVyb_.js.map → isDefined-DvmFa_bD.js.map} +1 -1
- package/dist/esm/{isString-CVMdKx0v.js → isString-lysmVw2n.js} +3 -3
- package/dist/esm/{isString-CVMdKx0v.js.map → isString-lysmVw2n.js.map} +1 -1
- package/dist/esm/loader.js +3 -5
- package/dist/esm/{stringToArray-DD7NecAG.js → stringToArray-CIJArUww.js} +4 -4
- package/dist/esm/{stringToArray-DD7NecAG.js.map → stringToArray-CIJArUww.js.map} +1 -1
- package/dist/esm/transition-DdvbF5yL.js.map +1 -1
- package/dist/hydrate/index.d.ts +2 -0
- package/dist/hydrate/index.js +955 -544
- package/dist/hydrate/index.mjs +955 -544
- package/dist/jest.config.js +3 -0
- package/dist/jest.config.js.map +1 -1
- package/dist/stencil.config.js +3 -2
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/components/date-picker/bq-date-picker.d.ts +5 -2
- package/dist/types/components/dropdown/bq-dropdown.d.ts +1 -0
- package/dist/types/components/icon/bq-icon.d.ts +1 -1
- package/dist/types/components/input/bq-input.d.ts +10 -11
- package/dist/types/components/option/bq-option.d.ts +4 -2
- package/dist/types/components/select/bq-select.d.ts +1 -0
- package/dist/types/components/spinner/bq-spinner.types.d.ts +1 -1
- package/dist/types/components/step-item/bq-step-item.d.ts +1 -1
- package/dist/types/components/tag/helper/index.d.ts +1 -1
- package/dist/types/components/textarea/bq-textarea.d.ts +5 -9
- package/dist/types/components.d.ts +40 -42
- package/dist/types/global.d.ts +1 -4
- package/dist/types/home/runner/work/BEEQ/BEEQ/.stencil/packages/beeq/jest.config.d.ts +3 -0
- package/dist/types/services/interfaces/floating-ui.d.ts +1 -1
- package/dist/types/services/libraries/floating-ui/index.d.ts +5 -2
- package/dist/types/shared/test-utils/setProperties.d.ts +1 -1
- package/dist/types/shared/test-utils/sleep.d.ts +1 -1
- package/dist/types/shared/utils/date.d.ts +18 -0
- package/dist/types/shared/utils/debounce.d.ts +1 -1
- package/dist/types/shared/utils/index.d.ts +1 -0
- package/dist/types/shared/utils/setRafTimeout.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +49 -2
- package/dist/types/tools/angular-value-accessor-config.d.ts +1 -1
- package/dist/types/tools/vue-model-config.d.ts +1 -1
- package/package.json +1 -1
- package/dist/beeq/p-04745600.entry.js.map +0 -1
- package/dist/beeq/p-0deed5d1.entry.js.map +0 -1
- package/dist/beeq/p-1421f4a3.entry.js.map +0 -1
- package/dist/beeq/p-1c6ef374.entry.js.map +0 -1
- package/dist/beeq/p-1cd1ae48.entry.js +0 -6
- package/dist/beeq/p-1cd1ae48.entry.js.map +0 -1
- package/dist/beeq/p-2f008ed1.entry.js.map +0 -1
- package/dist/beeq/p-37a2fb82.entry.js.map +0 -1
- package/dist/beeq/p-3c7397cf.entry.js.map +0 -1
- package/dist/beeq/p-3dca7a14.entry.js.map +0 -1
- package/dist/beeq/p-3e8980ff.entry.js.map +0 -1
- package/dist/beeq/p-477f032f.entry.js.map +0 -1
- package/dist/beeq/p-48811a09.entry.js.map +0 -1
- package/dist/beeq/p-540d625a.entry.js +0 -6
- package/dist/beeq/p-540d625a.entry.js.map +0 -1
- package/dist/beeq/p-5ce77af6.entry.js.map +0 -1
- package/dist/beeq/p-60db3689.entry.js.map +0 -1
- package/dist/beeq/p-6852a0b0.entry.js.map +0 -1
- package/dist/beeq/p-6a10175b.entry.js.map +0 -1
- package/dist/beeq/p-6d429afd.entry.js.map +0 -1
- package/dist/beeq/p-7063e5c2.entry.js.map +0 -1
- package/dist/beeq/p-78be94d2.entry.js.map +0 -1
- package/dist/beeq/p-8280145e.entry.js.map +0 -1
- package/dist/beeq/p-87430ad8.entry.js.map +0 -1
- package/dist/beeq/p-8eb8612b.entry.js.map +0 -1
- package/dist/beeq/p-9305e1a2.entry.js.map +0 -1
- package/dist/beeq/p-96f6c9ae.entry.js.map +0 -1
- package/dist/beeq/p-D9ofIraD.js.map +0 -1
- package/dist/beeq/p-DDw-pDpy.js +0 -7
- package/dist/beeq/p-DDw-pDpy.js.map +0 -1
- package/dist/beeq/p-a9643899.entry.js.map +0 -1
- package/dist/beeq/p-b268b017.entry.js +0 -6
- package/dist/beeq/p-b268b017.entry.js.map +0 -1
- package/dist/beeq/p-b520bdb8.entry.js.map +0 -1
- package/dist/beeq/p-ba12d135.entry.js.map +0 -1
- package/dist/beeq/p-c023718e.entry.js.map +0 -1
- package/dist/beeq/p-d1dd36ca.entry.js.map +0 -1
- package/dist/beeq/p-dc4d2d77.entry.js.map +0 -1
- package/dist/beeq/p-dd896cd8.entry.js.map +0 -1
- package/dist/beeq/p-e7bd48a0.entry.js +0 -6
- package/dist/beeq/p-e7bd48a0.entry.js.map +0 -1
- package/dist/beeq/p-eb2cfa90.entry.js.map +0 -1
- package/dist/beeq/p-f12a127c.entry.js.map +0 -1
- package/dist/beeq/p-f189b65d.entry.js +0 -6
- package/dist/beeq/p-f189b65d.entry.js.map +0 -1
- package/dist/beeq/p-f8d5c1ab.entry.js.map +0 -1
- package/dist/beeq/p-fbc38c77.entry.js.map +0 -1
- package/dist/beeq/p-y49NXy_H.js +0 -6
- package/dist/cjs/bq-accordion-group.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-accordion.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-alert.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-avatar.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-badge.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-button_2.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-card.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-checkbox.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-date-picker.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-dialog.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-divider.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-drawer.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-dropdown_2.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-empty-state.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-input.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-notification.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-option-group.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-option-list_2.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-option.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-page-title.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-progress.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-radio-group.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-radio.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-select.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-side-menu-item.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-side-menu.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-slider.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-spinner.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-status.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-step-item.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-steps.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-switch.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-tab-group.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-tab.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-textarea.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-toast.cjs.entry.js.map +0 -1
- package/dist/cjs/bq-tooltip.cjs.entry.js.map +0 -1
- package/dist/cjs/debounce-DFaAa1Cu.js.map +0 -1
- package/dist/cjs/index-CLoLF-_B.js.map +0 -1
- package/dist/components/p-BIl7Vq5P.js.map +0 -1
- package/dist/components/p-BPVTwD6U.js.map +0 -1
- package/dist/components/p-Bkf_oCvP.js +0 -6
- package/dist/components/p-Bkf_oCvP.js.map +0 -1
- package/dist/components/p-Bs3hKCXS.js.map +0 -1
- package/dist/components/p-C4Jb3i-D.js.map +0 -1
- package/dist/components/p-CjS2vgik.js.map +0 -1
- package/dist/components/p-D9ofIraD.js.map +0 -1
- package/dist/components/p-DE7kLeHf.js +0 -6
- package/dist/components/p-DE7kLeHf.js.map +0 -1
- package/dist/components/p-fQPjV9jm.js.map +0 -1
- package/dist/components/p-y49NXy_H.js +0 -6
- package/dist/components/p-y49NXy_H.js.map +0 -1
- package/dist/esm/bq-button_2.entry.js.map +0 -1
- package/dist/esm/bq-dropdown_2.entry.js.map +0 -1
- package/dist/esm/bq-option-list_2.entry.js.map +0 -1
- package/dist/esm/debounce-cjfQylgg.js.map +0 -1
- package/dist/esm/index-DDw-pDpy.js.map +0 -1
- /package/dist/components/{p-Ci39rxuU.js.map → p-BRbYDZoo.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"bq-option-list.bq-tag.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,i1mBAAi1mB;;MCkC51mB,YAAY,GAAA,MAAA;;;;;;;;;;;;;;IAoBE,SAAS,GAAW,SAAS;;;;;AAO7C,IAAA,QAAQ;;;;IAMjB,gBAAgB,GAAA;QACd,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC;;;;AAQzC,IAAA,UAAU,CAACA,OAA+B,EAAA;AACxC,QAAA,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAGA,OAAK;AAC9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,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,eAAe,EAAA,CACjG,CACQ,CACb,CACM,CACJ;;;;;;;;;;;;;","names":["event","isHTMLElement","isEventTargetChildOfElement","h","validatePropValue","hasSlotContent","getColorCSSVariable","Host"],"sources":["../../packages/beeq/src/components/option-list/scss/bq-option-list.scss?tag=bq-option-list&encapsulation=shadow","../../packages/beeq/src/components/option-list/bq-option-list.tsx","../../packages/beeq/src/components/tag/bq-tag.types.ts","../../packages/beeq/src/components/tag/helper/index.ts","../../packages/beeq/src/components/tag/scss/bq-tag.scss?tag=bq-tag&encapsulation=shadow","../../packages/beeq/src/components/tag/bq-tag.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Option list styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-option-list.variables';\n\n:host {\n @apply block;\n}\n","import { Component, Element, Event, h, Listen, Prop } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { isEventTargetChildOfElement, isHTMLElement } from '../../shared/utils';\n\n/**\n * The option list component is a container for multiple option elements.\n * It allows to manage the appearance and size of all options at once.\n *\n * @example How to use it\n * ```html\n * <bq-option-list>\n * <bq-option value=\"football\">Football</bq-option>\n * <bq-option value=\"basketball\">Basketball</bq-option>\n * <bq-option value=\"tennis\">Tennis</bq-option>\n * </bq-option-list>\n * ```\n *\n * @documentation https://storybook.beeq.design/?path=/story/components-option--default\n * @status stable\n *\n * @attr {string} aria-label - Aria label for the list.\n *\n * @slot - The option items\n *\n * @part base - The component's internal wrapper.\n *\n * @cssprop --bq-option-group--gapY-list - Option group gap between items Y axis\n */\n@Component({\n tag: 'bq-option-list',\n styleUrl: './scss/bq-option-list.scss',\n shadow: true,\n})\nexport class BqOptionList {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqOptionListElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n // Prop lifecycle events\n // =======================\n\n /** Aria label for the list. */\n @Prop({ reflect: true }) ariaLabel: string = 'Options';\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when `bq-option` is selected (on click/enter press). */\n @Event() bqSelect: EventEmitter<{ value: string; item: HTMLBqOptionElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.el.setAttribute('role', 'listbox');\n }\n\n // Listeners\n // ==============\n\n @Listen('bqClick', { passive: true })\n @Listen('bqEnter', { passive: true })\n onBqSelect(event: CustomEvent<HTMLElement>) {\n const { target: item } = event;\n if (!isHTMLElement(item, 'bq-option') || !isEventTargetChildOfElement(event, this.el)) return;\n\n this.bqSelect.emit({ item, value: item.value });\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\n render() {\n return (\n <div class=\"bq-option__list flex flex-col gap-y-[--bq-option-group--gapY-list]\" part=\"base\">\n <slot />\n </div>\n );\n }\n}\n","export const TAG_SIZE = ['xsmall', 'small', 'medium'] as const;\nexport type TTagSize = (typeof TAG_SIZE)[number];\n\nexport const TAG_COLOR = ['error', 'gray', 'info', 'success', 'warning'] as const;\nexport type TTagColor = (typeof TAG_COLOR)[number];\n\nexport const TAG_VARIANT = ['outline', 'filled'] as const;\nexport type TTagVariant = (typeof TAG_VARIANT)[number];\n\nexport const TAG_BORDER_RADIUS = ['none', 'xs2', 'xs', 's', 'm', 'l', 'full'] as const;\nexport type TTagBorderRadius = (typeof TAG_BORDER_RADIUS)[number];\n","import { TAG_COLOR, TAG_SIZE, TAG_VARIANT, TTagColor, TTagSize, TTagVariant } from '../bq-tag.types';\n\n/**\n * Function to determine the icon size based on the provided tag size.\n *\n * @param {TTagSize} size - The size of the tag.\n * @returns {number} The corresponding icon size. If the provided size does not match any predefined sizes, the function returns the size for 'medium'.\n */\nexport const iconSize = (size: TTagSize): number => {\n const xsmall = TAG_SIZE[0];\n const small = TAG_SIZE[1];\n const medium = TAG_SIZE[2];\n\n const SIZE = {\n [xsmall]: 16,\n [small]: 20,\n [medium]: 24,\n };\n\n return SIZE[size] || SIZE[medium];\n};\n\n/**\n * Function to determine the tag text color scheme for a given tag type.\n *\n * @param {TTagType} color - The color of the tag.\n * @returns {Object} An object containing the color scheme for the given tag type. If the provided type does not match any predefined types, the function returns the color scheme for 'default'.\n */\nexport const textColor = (color: TTagColor): Partial<{ [K in TTagVariant]: string }> => {\n const typeError = TAG_COLOR[0];\n const typeGray = TAG_COLOR[1];\n const typeInfo = TAG_COLOR[2];\n const typeSuccess = TAG_COLOR[3];\n const typeWarning = TAG_COLOR[4];\n\n const variantOutline = TAG_VARIANT[0];\n const variantFilled = TAG_VARIANT[1];\n\n const COLORS = {\n [typeError]: {\n [variantOutline]: 'text--danger',\n [variantFilled]: 'text--alt',\n },\n [typeGray]: {\n [variantOutline]: 'text--primary',\n [variantFilled]: 'text--alt',\n },\n [typeInfo]: {\n [variantOutline]: 'text--brand',\n [variantFilled]: 'text--alt',\n },\n [typeSuccess]: {\n [variantOutline]: 'text--success',\n [variantFilled]: 'text--alt',\n },\n [typeWarning]: {\n [variantOutline]: 'text--warning',\n [variantFilled]: 'text--alt',\n },\n };\n\n return COLORS[color];\n};\n","/* -------------------------------------------------------------------------- */\n/* Tag styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-tag.variables';\n\n:host {\n @apply relative inline-block;\n}\n\n:host([removable][hidden]) {\n @apply hidden;\n}\n\n.bq-tag {\n @apply box-border inline-flex select-none flex-row items-center justify-center bg-[--bq-tag--background-color];\n @apply gap-[--bq-tag--medium-gap] font-medium leading-regular text-primary p-b-[--bq-tag--medium-padding-y] p-i-[--bq-tag--medium-padding-x];\n @apply rounded-[--bq-tag--border-radius] border-[length:--bq-tag--border-width] border-[color:--bq-tag--border-color];\n @apply transition-colors duration-300 ease-in-out;\n\n border-style: var(--bq-tag--border-style);\n}\n\n/* ---------------------------------- Size ---------------------------------- */\n\n.bq-tag__xsmall,\n.bq-tag__small {\n @apply gap-[--bq-tag--small-gap] p-b-[--bq-tag--small-padding-y] p-i-[--bq-tag--small-padding-x];\n\n /* Apply predefined border radius only if the border property have NO VALUE */\n &:not(.has-border) {\n @apply rounded-[--bq-tag--small-border-radius];\n }\n}\n\n/* --------------------------------- Action --------------------------------- */\n\n.bq-tag__default.is-clickable {\n @apply cursor-pointer;\n // Focus\n @apply focus-visible:focus;\n // Hover\n @apply hover:enabled:bg-[color-mix(in_srgb,_var(--bq-tag--background-color),_var(--bq-hover)_20%)];\n // Active/Selected\n @apply [&.active]:text-alt [&.active]:[--bq-tag--background-color:--bq-ui--brand];\n // Disabled\n @apply disabled:cursor-not-allowed disabled:border-none disabled:opacity-60;\n}\n\n/* ------------------------------ Color styles ------------------------------ */\n\n.bq-tag__error {\n &.bq-tag__filled {\n @apply bg-ui-danger text-alt;\n }\n\n &.bq-tag__outline {\n @apply bg-ui-danger-alt text-danger [--bq-tag--border-color:--bq-stroke--danger];\n }\n}\n\n.bq-tag__gray {\n &.bq-tag__filled {\n @apply bg-ui-tertiary text-alt;\n }\n\n &.bq-tag__outline {\n @apply bg-ui-primary text-primary [--bq-tag--border-color:--bq-stroke--tertiary];\n }\n}\n\n.bq-tag__info {\n &.bq-tag__filled {\n @apply bg-ui-brand text-alt;\n }\n\n &.bq-tag__outline {\n @apply bg-ui-brand-alt text-brand [--bq-tag--border-color:--bq-stroke--brand];\n }\n}\n\n.bq-tag__success {\n &.bq-tag__filled {\n @apply bg-ui-success text-alt;\n }\n\n &.bq-tag__outline {\n @apply bg-ui-success-alt text-success [--bq-tag--border-color:--bq-tag--border-success];\n }\n}\n\n.bq-tag__warning {\n &.bq-tag__filled {\n @apply bg-ui-warning text-alt;\n }\n\n &.bq-tag__outline {\n @apply border-warning bg-ui-warning-alt text-warning;\n }\n}\n\n/* ------------------------------ Close button ------------------------------ */\n\n.bq-tag__close::part(button) {\n @apply pointer-events-none border-0 bs-fit p-b-0 p-i-0;\n}\n\n/* --------------- Apply the right size to the bq-icon prefix --------------- */\n\n.bq-tag__prefix ::slotted(bq-icon) {\n --bq-icon--size: var(--bq-tag--icon-prefix-size) !important;\n}\n","import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { TAG_COLOR, TAG_SIZE, TAG_VARIANT } from './bq-tag.types';\nimport type { TTagBorderRadius, TTagColor, TTagSize, TTagVariant } from './bq-tag.types';\nimport { iconSize, textColor } from './helper';\nimport { getColorCSSVariable, hasSlotContent, validatePropValue } from '../../shared/utils';\n\n/**\n * The Tag Component is a UI element used to label and categorize content within an application.\n * Tags are commonly used to label items with keywords or categories, making it easier to find and organize content.\n *\n * @example How to use it\n * ```html\n * <bq-tag color=\"success\" size=\"medium\" variant=\"filled\">Success</bq-tag>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/42f8c9-tag\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {string} border - The corner radius of the Tag (will override size's predefined border)\n * @attr {boolean} clickable - If `true`, the Tag can be clickable\n * @attr {\"error\" | \"gray\" | \"info\" | \"success\" | \"warning\"} color - The color style of the Tag\n * @attr {boolean} disabled - If `true`, the Tag will be disabled (only if clickable = `true`, no interaction allowed)\n * @attr {boolean} hidden - If `true`, the Tag component will hidden (only if removable = `true`)\n * @attr {boolean} removable - If `true`, the Tag component can be removed\n * @attr {boolean} selected - If `true`, the Tag is selected (only if clickable = `true`)\n * @attr {\"xsmall\" | \"small\" | \"medium\"} size - The size of the Tag component\n * @attr {\"outline\" | \"filled\"} variant - The variant of Tag to apply on top of the variant\n *\n * @method hide - Method to be called to remove the tag component\n * @method show - Method to be called to show the tag component\n *\n * @event bqClose - Callback handler to be called when the tag is close/hidden\n * @event bqOpen - Callback handler to be called when the tag is not open/shown\n * @event bqBlur - Handler to be called when tag loses focus\n * @event bqClick - Handler to be called when tag is clicked\n * @event bqFocus - Handler to be called when tag is focused\n *\n * @slot prefix - The prefix slot to add an icon or any other content before the text\n * @slot - The text content of the tag\n *\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM.\n * @part prefix - The `<span>` tag element that acts as prefix container (when icon exists in front of tag).\n * @part text - The `<div>` element containing the text of the tag component.\n * @part btn-close - The close button element to remove the tag component.\n *\n * @cssprop --bq-tag--background-color - Tag background color\n * @cssprop --bq-tag--border-color - Tag border color\n * @cssprop --bq-tag--border-radius - Tag border radius\n * @cssprop --bq-tag--border-style - Tag border style\n * @cssprop --bq-tag--border-width - Tag border width\n * @cssprop --bq-tag--small-border-radius - Tag small border radius\n * @cssprop --bq-tag--small-gap - Tag small gap between content\n * @cssprop --bq-tag--small-padding-x - Tag small padding horizontal\n * @cssprop --bq-tag--small-padding-y - Tag small padding vertical\n * @cssprop --bq-tag--medium-gap - Tag medium gap between content\n * @cssprop --bq-tag--medium-padding-x - Tag medium padding horizontal\n * @cssprop --bq-tag--medium-padding-y - Tag medium padding vertical\n */\n@Component({\n tag: 'bq-tag',\n styleUrl: './scss/bq-tag.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqTag {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqTagElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasPrefix = false;\n\n // Public Property API\n // ========================\n\n /** The corner radius of the Tag (will override size's predefined border) */\n @Prop({ reflect: true }) border: TTagBorderRadius;\n\n /** If true, the Tag can be clickable */\n @Prop({ reflect: true }) clickable: boolean = false;\n\n /** The color style of the Tag */\n @Prop({ reflect: true }) color: TTagColor;\n\n /** If true, the Tag will be disabled (only if clickable = `true`, no interaction allowed) */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** If true, the Tag component will hidden (only if removable = `true`) */\n @Prop({ reflect: true, mutable: true }) hidden: boolean;\n\n /** If true, the Tag component can be removed */\n @Prop({ reflect: true }) removable: boolean = false;\n\n /** If true, the Tag is selected (only if clickable = `true`) */\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n\n /** The size of the Tag component */\n @Prop({ reflect: true }) size: TTagSize = 'medium';\n\n /** The variant of Tag to apply on top of the variant */\n @Prop({ reflect: true }) variant: TTagVariant = 'filled';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n @Watch('variant')\n checkPropValues() {\n validatePropValue(TAG_SIZE, 'medium', this.el, 'size');\n validatePropValue(TAG_VARIANT, 'filled', this.el, 'variant');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the tag is close/hidden */\n @Event() bqClose: EventEmitter;\n\n /** Callback handler to be called when the tag is not open/shown */\n @Event() bqOpen: EventEmitter;\n\n /** Handler to be called when tag loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqTagElement>;\n\n /** Handler to be called when tag is clicked */\n @Event() bqClick: EventEmitter<HTMLBqTagElement>;\n\n /** Handler to be called when tag is focused */\n @Event() bqFocus: EventEmitter<HTMLBqTagElement>;\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 }\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 /** Method to be called to remove the tag component */\n @Method()\n async hide(): Promise<void> {\n this.handleHide();\n }\n\n /** Method to be called to show the tag component */\n @Method()\n async show(): Promise<void> {\n this.handleShow();\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleHide = () => {\n if (!this.isRemovable) return;\n\n const ev = this.bqClose.emit(this.el);\n if (!ev.defaultPrevented) {\n this.hidden = true;\n }\n };\n\n private handleShow = () => {\n if (!this.isRemovable) return;\n\n const ev = this.bqOpen.emit(this.el);\n if (!ev.defaultPrevented) {\n this.hidden = false;\n }\n };\n\n private handleClick = () => {\n // If the tag is not clickable or the tag is disabled, we don't want to handle the click\n if (!this.isClickable || this.disabled) return;\n\n // Emit a click event on the element\n const ev = this.bqClick.emit(this.el);\n // If the event was not prevented, toggle the clickable state\n if (!ev.defaultPrevented) {\n this.selected = !this.selected;\n }\n };\n\n private handleBlur = () => {\n if (!this.isClickable) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (!this.isClickable) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n };\n\n private get isClickable(): boolean {\n return this.clickable && !this.color && !this.hasCustomColor && !this.removable;\n }\n\n private get isRemovable(): boolean {\n return this.removable && !this.isClickable;\n }\n\n private get isHidden(): boolean {\n return this.isRemovable && this.hidden;\n }\n\n private get hasCustomColor(): boolean {\n return this.color !== undefined ? !TAG_COLOR.includes(this.color) : false;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n '--bq-tag--icon-prefix-size': `${iconSize(this.size)}px`,\n ...(this.border && { '--bq-tag--border-radius': `var(--bq-radius--${this.border})` }),\n ...(this.color && { '--bq-tag--background-color': getColorCSSVariable(this.color) ?? this.color }),\n ...(this.hasCustomColor && { '--bq-text--primary': `var(--bq-text--alt)` }),\n };\n\n return (\n <Host style={style} aria-hidden={this.isHidden ? 'true' : 'false'} hidden={this.isHidden ? 'true' : 'false'}>\n <button\n class={{\n [`bq-tag bq-tag__${this.size}`]: true,\n [`bq-tag__${this.color || 'default'} bq-tag__${this.variant}`]: !this.hasCustomColor,\n 'is-clickable': this.isClickable,\n 'is-removable': this.removable,\n // Active/Selected state when clickable\n active: this.isClickable && this.selected,\n // Fixed border radius\n 'has-border': !!this.border,\n }}\n disabled={this.disabled}\n onBlur={this.handleBlur}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n tabindex={this.isClickable ? 0 : -1}\n part=\"wrapper\"\n >\n <span\n class={{ 'bq-tag__prefix inline-flex': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <div\n class={{\n 'text-xs': this.size === 'xsmall',\n 'text-s': this.size === 'small',\n 'text-m': this.size === 'medium',\n }}\n part=\"text\"\n >\n <slot />\n </div>\n {this.isRemovable && !this.disabled && (\n <bq-button class=\"bq-tag__close\" appearance=\"text\" size=\"small\" onClick={this.handleHide} part=\"btn-close\">\n <bq-icon\n size={iconSize(this.size)}\n name=\"x-circle\"\n color={this.color && !this.hasCustomColor ? textColor(this.color)[this.variant] : 'text--primary'}\n />\n </bq-button>\n )}\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"bq-option.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,WAAW,GAAG,s9uBAAs9uB;;MCwD79uB,QAAQ,GAAA,MAAA;;;;;;;;;;AAIX,IAAA,UAAU;AACV,IAAA,UAAU;;;;;IAWT,SAAS,GAAY,KAAK;IAC1B,SAAS,GAAY,KAAK;;;;IAMV,MAAM,GAAY,KAAK;;IAGvB,QAAQ,GAAa,KAAK;;AAG1B,IAAA,KAAK;;IAGL,QAAQ,GAAY,KAAK;;;;;;;AAUzC,IAAA,MAAM;;AAGN,IAAA,OAAO;;AAGP,IAAA,OAAO;;AAGP,IAAA,OAAO;;;;IAMhB,gBAAgB,GAAA;QACd,IAAI,CAAC,gBAAgB,EAAE;;;;AAOzB,IAAA,SAAS,CAAC,KAAoB,EAAA;AAC5B,QAAA,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO;YAAE;QAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAA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C,SAAS;aAC3B,EACD,GAAG,EAAE,CAAC,IAAI,MAAM,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,EACvC,IAAI,EAAC,QAAQ,EAAA,EAEbA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAI,CAAA,CACtD,CACH,CACD;;;;;;;","names":["hasSlotContent","h","Host"],"sources":["../../packages/beeq/src/components/option/scss/bq-option.scss?tag=bq-option&encapsulation=shadow","../../packages/beeq/src/components/option/bq-option.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Option styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-option.variables';\n\n:host {\n @apply block;\n}\n\n:host([hidden]) {\n @apply hidden;\n}\n\n.bq-option {\n @apply flex cursor-pointer items-center text-[length:--bq-option--font-size] text-primary is-full;\n @apply pe-[--bq-option--padding-end] ps-[--bq-option--padding-start] p-b-[--bq-option--paddingY] p-i-[--bq-option--paddingY];\n @apply rounded-[--bq-option--border-radius] bg-[--bq-option--background] shadow-[shadow:--bq-option--box-shadow];\n @apply border-[length:--bq-option--border-width] border-[color:--bq-option--border-color];\n // Transition\n @apply transition-colors duration-150 ease-in-out;\n // Focus\n @apply [&:not(.disabled)]:focus-visible:focus;\n // Hover\n @apply [&:not(.disabled)]:hover:bg-hover-ui-secondary;\n // Active\n @apply [&.active:not(.disabled)]:bg-ui-brand-alt [&.active:not(.disabled)]:text-brand;\n // Disabled\n @apply [&.disabled]:cursor-not-allowed [&.disabled]:opacity-60;\n\n border-style: var(--bq-option--border-style);\n}\n\n.bq-option__label {\n @apply inline-block flex-auto overflow-hidden text-ellipsis whitespace-nowrap;\n @apply pe-[--bq-option-label--padding-end] ps-[--bq-option-label--padding-start];\n}\n","import { Component, Element, Event, h, Host, Listen, Prop, State } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { hasSlotContent } from '../../shared/utils';\n\n/**\n * An option refers to a specific choice that appears in a list of selectable items that can be opened or closed by the user.\n * It can be an element of the navigation system that allows users to select different sections or pages within an application or it can be used within a dropdown list.\n *\n * @example How to use it\n * ```html\n * <bq-option value=\"user\">\n * <span>User profile</span>\n * <bq-icon slot=\"suffix\" name=\"user\"></bq-icon>\n * </bq-option>\n * ```\n *\n * @documentation https://storybook.beeq.design/?path=/story/components-option--with-option-group\n * @status stable\n *\n * @attr {boolean} disabled - If true, the option is disabled.\n * @attr {boolean} hidden - If true, the option is hidden.\n * @attr {string} value - A string representing the value of the option. Can be used to identify the item.\n * @attr {boolean} selected - If true, the option is selected and active.\n *\n * @event bqBlur - Handler to be called when item loses focus.\n * @event bqFocus - Handler to be called when item is focused.\n * @event bqClick - Handler to be called when item is clicked.\n * @event bqEnter - Handler to be called on enter key press.\n *\n * @slot prefix - The prefix content to be displayed before the label.\n * @slot - The label content to be displayed.\n *\n * @part base - The component's internal wrapper.\n * @part label - The `span` element in which the label text is displayed.\n * @part prefix - The `span` element in which the prefix is displayed (generally `bq-icon`).\n * @part suffix - The `span` element in which the suffix is displayed (generally `bq-icon`).\n *\n * @cssprop --bq-option--background - background color\n * @cssprop --bq-option--font-size - font size\n * @cssprop --bq-option--border-color - border color\n * @cssprop --bq-option--border-style - border style\n * @cssprop --bq-option--border-width - border width\n * @cssprop --bq-option--border-radius - border radius\n * @cssprop --bq-option--box-shadow - box shadow\n * @cssprop --bq-option--gap-start - gap space between prefix and label\n * @cssprop --bq-option--gap-end - gap space between label and suffix\n * @cssprop --bq-option--paddingY - padding Y axis\n * @cssprop --bq-option--padding-start - option label padding start\n * @cssprop --bq-option--padding-end - option label padding end\n */\n@Component({\n tag: 'bq-option',\n styleUrl: './scss/bq-option.scss',\n shadow: true,\n})\nexport class BqOption {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqOptionElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasPrefix: boolean = false;\n @State() hasSuffix: boolean = false;\n\n // Public Property API\n // ========================\n\n /** If true, the option is hidden. */\n @Prop({ reflect: true }) hidden: boolean = false;\n\n /** If true, the option is disabled. */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** A string representing the value of the option. Can be used to identify the item */\n @Prop({ reflect: true }) value?: string;\n\n /** If true, the option is selected and active. */\n @Prop({ reflect: true }) selected: 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 item loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called when item is focused */\n @Event() bqFocus: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called when item is clicked */\n @Event() bqClick: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called on enter key press */\n @Event() bqEnter: EventEmitter<HTMLBqOptionElement>;\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 @Listen('keydown')\n onKeyDown(event: KeyboardEvent) {\n if (event.key !== 'Enter') return;\n this.bqEnter.emit(this.el);\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 onBlur = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqBlur.emit(this.el);\n };\n\n private onFocus = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqFocus.emit(this.el);\n };\n\n private onClick = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqClick.emit(this.el);\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private get isDisabledOrHidden() {\n return this.disabled || this.hidden;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host\n aria-disabled={this.isDisabledOrHidden ? 'true' : 'false'}\n aria-hidden={this.hidden ? 'true' : 'false'}\n aria-selected={this.selected ? 'true' : 'false'}\n role=\"option\"\n >\n <div\n class={{\n 'bq-option': true,\n disabled: this.disabled,\n active: !this.disabled && this.selected,\n }}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.onClick}\n tabindex={this.isDisabledOrHidden ? '-1' : '0'}\n role=\"button\"\n part=\"base\"\n >\n <span\n class={{\n 'bq-option__prefix me-[--bq-option--gap-start] flex items-center': true,\n '!hidden': !this.hasPrefix,\n }}\n ref={(elem) => (this.prefixElem = elem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <span class=\"bq-option__label\" part=\"label\">\n <slot />\n </span>\n <span\n class={{\n 'bq-option__suffix ml-auto ms-[--bq-option--gap-end] flex items-center': true,\n '!hidden': !this.hasSuffix,\n }}\n ref={(elem) => (this.suffixElem = elem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"bq-page-title.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,cAAc,GAAG,o+oBAAo+oB;;MCuD9+oB,WAAW,GAAA,MAAA;;;;;;AAId,IAAA,kBAAkB;AAClB,IAAA,UAAU;AACV,IAAA,YAAY;;;;;IAWH,kBAAkB,GAAG,KAAK;IAC1B,SAAS,GAAG,KAAK;IACjB,WAAW,GAAG,KAAK;;;;;;;;;;;IAgBpC,gBAAgB,GAAA;QACd,I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A,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,EAAE,uCAAuC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EACpF,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,EAC7C,IAAI,EAAC,QAAQ,EAAA,EAEbA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAI,CAAA,CACvD,CACF,EAENA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,0IAA0I,EAAE,IAAI;AAChJ,gBAAA,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW;aAC1B,EACD,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,EAC/C,IAAI,EAAC,WAAW,EAAA,EAEhBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,WAAW,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAI,CAAA,CAC1D,CACF,CACF;;;;;;;","names":["hasSlotContent","h"],"sources":["../../packages/beeq/src/components/page-title/scss/bq-page-title.scss?tag=bq-page-title&encapsulation=shadow","../../packages/beeq/src/components/page-title/bq-page-title.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Page title styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-page-title.variables';\n\n:host {\n @apply block;\n}\n","import { Component, Element, h, State } from '@stencil/core';\n\nimport { hasSlotContent } from '../../shared/utils';\n\n/**\n * The Page Title component is a versatile and essential element used to display the main title of a page or section within an application.\n *\n * @example How to use it\n * ```html\n * <bq-page-title>\n * <bq-button appearance=\"link\" slot=\"back\">\n * <bq-icon\n * color=\"text--primary\"\n * name=\"arrow-left\"\n * weight=\"bold\"\n * role=\"img\"\n * title=\"Navigate back to the previous page\"\n * ></bq-icon>\n * </bq-button>\n * Title\n * <div slot=\"sub-title\">Sub-title</div>\n * </bq-page-title>\n * ```\n *\n * @documentation https://storybook.beeq.design/?path=/docs/components-page-title--overview\n * @status stable\n *\n * @slot back - The back navigation button.\n * @slot - The main title content.\n * @slot sub-title - The sub-title content.\n * @slot suffix - The suffix content.\n *\n * @part base - The inner container `<div>`of element that contains the base page title component.\n * @part content - Defines the main container of the page title component, which includes the title and subtitle elements.\n * @part title-suffix - Defines the container that holds the title and any suffix content.\n * @part back - The container `<div>` page title element that acts as back slot container.\n * @part title - The `<h1>` element serves as a container for the page title content, to improve accessibility.\n * @part suffix - The `<div>` page title element that acts as suffix slot container.\n * @part sub-title - The `<div>` page title element that acts as sub-title slot container.\n *\n * @cssprop --paddingY - Padding top and bottom of the page title wrapper\n * @cssprop --subtitle-borderBlockEnd - Page title border end color\n * @cssprop --subtitle-fontWeight - Page title font weight for subtitle\n * @cssprop --subtitle-textColor - Page title color for sub-title\n * @cssprop --subtitle-textSize - Page title text size for subtitle\n * @cssprop --title-fontWeight - Page title font weight for title\n * @cssprop --title-lineHeight - Page title text line height\n * @cssprop --title-textColor - Page title color for title\n * @cssprop --title-textSize - Page title text size for title\n */\n@Component({\n tag: 'bq-page-title',\n styleUrl: './scss/bq-page-title.scss',\n shadow: true,\n})\nexport class BqPageTitle {\n // Own Properties\n // ====================\n\n private backNavigationElem: HTMLElement;\n private suffixElem: HTMLElement;\n private subTitleElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqPageTitleElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private haveBackNavigation = false;\n @State() private hasSuffix = false;\n @State() private hasSubTitle = false;\n\n // Public Property API\n // ========================\n\n // Prop lifecycle events\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 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 this.haveBackNavigation = hasSlotContent(this.backNavigationElem, 'back');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n this.hasSubTitle = hasSlotContent(this.subTitleElem, 'sub-title');\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"flex gap-xs p-b-[--paddingY] [border-block-end:--subtitle-borderBlockEnd]\" part=\"base\">\n {/* Back navigation button */}\n <div\n class={{ flex: true, '!hidden': !this.haveBackNavigation }}\n ref={(divElem) => (this.backNavigationElem = divElem)}\n part=\"back\"\n >\n <slot name=\"back\" onSlotchange={this.handleSlotChange} />\n </div>\n <div class=\"flex flex-grow flex-col gap-xs\" part=\"content\">\n <div class=\"flex items-center gap-xs\" part=\"title-suffix\">\n {/* Title */}\n <h1\n class=\"title-font text-[length:--title-textSize] font-[--title-fontWeight] leading-[--title-lineHeight] text-[color:--title-textColor]\"\n part=\"title\"\n >\n <slot />\n </h1>\n {/* Suffix */}\n <div\n class={{ 'flex flex-grow gap-xs p-b-xs2 p-i-xs2': true, '!hidden': !this.hasSuffix }}\n ref={(divElem) => (this.suffixElem = divElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n {/* Sub-title */}\n <div\n class={{\n 'title-font text-[length:--subtitle-textSize] font-[--subtitle-fontWeight] leading-[--title-lineHeight] text-[color:--subtitle-textColor]': true,\n hidden: !this.hasSubTitle,\n }}\n ref={(divElem) => (this.subTitleElem = divElem)}\n part=\"sub-title\"\n >\n <slot name=\"sub-title\" onSlotchange={this.handleSlotChange} />\n </div>\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,aAAa,EAAE,IAAI,EACnB,QAAQ,EAAE,EAAE,EACZ,KAAK,EAAE,EAAE,gBAAgB,EAAE,CAAG,EAAA,IAAI,CAAC,KAAK,CAAG,CAAA,CAAA,EAAE,WAAW,EAAE,cAAc,EAAE,EAAA,EAE1EA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,oBAAoB,EAAC,IAAI,EAAC,SAAS,EAAO,CAAA,EACpD,IAAI,CAAC,KAAK,CACA,CACd,EACA,IAAI,CAAC,aAAa,KACjBA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,uJAAuJ,EAAE,IAAI;AAC7J,gBAAA,cAAc,EAAE,IAAI,CAAC,WAAW,KAAK,SAAS;AAC/C,aAAA,EACD,IAAI,EAAC,eAAe,EAAA,CACpB,CACH,CACG,EACNA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,aAAA,EACe,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,GAAG,MAAM,GAAG,OAAO,EACjE,KAAK,EAAE;AACL,gBAAA,mCAAmC,EAAE,IAAI;AACzC,gBAAA,cAAc,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;AACrC,gBAAA,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;gBACpC,qBAAqB,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa;AACzD,aAAA,EACD,KAAK,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,EACtC,IAAI,EAAC,OAAO,EAAA,EAEZA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAO,IAAI,CAAC,KAAK,MAAS,CACtB,CACF,CACD;;;;;;;;;;;;;","names":["validatePropValue","h","Host"],"sources":["../../packages/beeq/src/components/progress/bq-progress.types.ts","../../packages/beeq/src/components/progress/scss/bq-progress.scss?tag=bq-progress&encapsulation=shadow","../../packages/beeq/src/components/progress/bq-progress.tsx"],"sourcesContent":["export const PROGRESS_BORDER_SHAPE = ['square', 'rounded'] as const;\nexport type TProgressBorderShape = (typeof PROGRESS_BORDER_SHAPE)[number];\n\nexport const PROGRESS_THICKNESS = ['medium', 'large'] as const;\nexport type TProgressThickness = (typeof PROGRESS_THICKNESS)[number];\n\nexport const PROGRESS_TYPE = ['default', 'error'] as const;\nexport type TProgressType = (typeof PROGRESS_TYPE)[number];\n","/* -------------------------------------------------------------------------- */\n/* Progress styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-progress.variables';\n\n@layer component {\n @keyframes move-indeterminate {\n 0% {\n inset-inline-start: 0;\n }\n\n 100% {\n inset-inline-start: calc(100% - var(--bq-progress-bar--indeterminateWidth));\n }\n }\n\n .animate-indeterminate {\n animation: move-indeterminate 1s linear 0s infinite alternate-reverse;\n }\n}\n\n.progress-bar {\n @apply relative appearance-none bs-[--bq-progress-bar--height] is-full;\n}\n\n.progress-bar::-webkit-progress-bar {\n @apply bg-[--bq-progress-bar--trackColor];\n}\n\n.progress-bar::-webkit-progress-value {\n @apply bg-[--bq-progress-bar--indicatorColor];\n}\n\n.progress-bar::-moz-progress-bar {\n @apply animate-indeterminate bg-[--bq-progress-bar--indicatorColor];\n}\n\n.progress-bar:indeterminate::-moz-progress-bar {\n @apply bg-[--bq-progress-bar--trackColor];\n}\n\n.progress-bar.progress-bar__border-shape::-webkit-progress-value,\n.progress-bar.progress-bar__border-shape::-webkit-progress-bar {\n @apply rounded-full;\n}\n\n.progress-bar__indeterminate {\n @apply animate-indeterminate;\n}\n\n.progress-bar.progress-bar__border-shape::-moz-progress-bar {\n @apply animate-indeterminate rounded-full;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\nimport { PROGRESS_BORDER_SHAPE, PROGRESS_THICKNESS, PROGRESS_TYPE } from './bq-progress.types';\nimport type { TProgressBorderShape, TProgressThickness, TProgressType } from './bq-progress.types';\nimport { validatePropValue } from '../../shared/utils';\n\n/**\n * The progress bar is a user interface component that visually represents the completion status of a task or process.\n *\n * @example How to use it\n * ```html\n * <bq-progress value=\"50\"></bq-progress>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/691cb3-progress\n * @status stable\n *\n * @dependency bq-tooltip\n *\n * @attr {\"rounded\" | \"rounded-full\"} border-shape - It will set the border style of the progress bar\n * @attr {boolean} enable-tooltip - If `true`, a tooltip will be shown displaying the progress value\n * @attr {boolean} indeterminate - If `true` the indeterminate state of progress bar is enabled\n * @attr {boolean} label - If `true`, a label text showing the value (in percentage) will be shown\n * @attr {\"small\" | \"medium\" | \"large\"} thickness - Progress bar thickness\n * @attr {\"default\" | \"error\"} type - Progress type\n * @attr {number} value - A number representing the current value of the progress bar\n *\n * @part wrapper - The component wrapper container inside the shadow DOM\n * @part progress - The `<div>` container that holds the native progress element\n * @part progress-bar - The native html for progress element\n * @part label - The `<div>` container that holds the label value (in percentage)\n * @part indeterminate - The `<div>` container that holds the indeterminate progress bar\n * @part base - The base container for the tooltip component inside the shadow DOM when hovering over the progress bar\n * @part trigger - The container holding the element that triggers the tooltip display when hovering over the progress bar\n * @part panel - The container holding the content of the tooltip when hovering over the progress bar\n *\n * @cssprop --bq-progress-bar--height - The progress bars height\n * @cssprop --bq-progress-bar--indeterminateWidth - The progress bar width when its indeterminate\n * @cssprop --bq-progress-bar--indicatorColor - The progress bar color (inside the track area)\n * @cssprop --bq-progress-bar--trackColor - The progress bar track area (the grey one)\n */\n@Component({\n tag: 'bq-progress',\n styleUrl: './scss/bq-progress.scss',\n shadow: true,\n})\nexport class BqProgress {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqProgressElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** It will set the border style of the progress bar */\n @Prop({ reflect: true }) borderShape: TProgressBorderShape = 'rounded';\n\n /** If `true`, a tooltip will be shown displaying the progress value */\n @Prop({ reflect: true }) enableTooltip: boolean = false;\n\n /** If `true` the indeterminate state of progress bar is enabled */\n @Prop({ reflect: true }) indeterminate: boolean = false;\n\n /** If `true, a label text showing the value (in percentage) will be shown */\n @Prop({ reflect: true }) label: boolean = false;\n\n /** Progress bar thickness */\n @Prop({ reflect: true }) thickness: TProgressThickness = 'medium';\n\n /** Progress type */\n @Prop({ reflect: true }) type: TProgressType = 'default';\n\n /** A number representing the current value of the progress bar */\n @Prop({ reflect: true, mutable: true }) value = 0;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('borderShape')\n @Watch('thickness')\n @Watch('type')\n handleTypePropChange() {\n validatePropValue(PROGRESS_BORDER_SHAPE, 'rounded', this.el, 'borderShape');\n validatePropValue(PROGRESS_THICKNESS, 'medium', this.el, 'thickness');\n validatePropValue(PROGRESS_TYPE, 'default', this.el, 'type');\n }\n\n @Watch('value')\n handleValuePropChange(newValue: number) {\n this.validateValue(newValue);\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.handleTypePropChange();\n this.handleValuePropChange(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 validateValue(newValue: number) {\n const clampedValue = Math.max(0, Math.min(100, newValue));\n if (newValue !== clampedValue) {\n this.value = clampedValue;\n }\n return this.value;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.thickness === 'large' && { '--bq-progress-bar--height': 'var(--bq-spacing-xs)' }),\n ...(this.type === 'error' && { '--bq-progress-bar--indicatorColor': 'var(--bq-ui--danger)' }),\n };\n\n return (\n <Host style={style}>\n <div class=\"flex items-center\" part=\"wrapper\">\n <div class=\"relative flex items-center is-full\" part=\"progress\">\n <progress\n class={{\n [`progress-bar progress-bar__${this.type} ${this.thickness}`]: true,\n 'progress-bar__border-shape rounded-full': this.borderShape === 'rounded',\n }}\n value={this.indeterminate ? undefined : this.value}\n max=\"100\"\n part=\"progress-bar\"\n />\n {this.enableTooltip && !this.indeterminate && (\n <bq-tooltip\n class=\"absolute [&::part(panel)]:absolute\"\n exportparts=\"base,trigger,panel\"\n alwaysVisible={true}\n distance={16}\n style={{ insetInlineStart: `${this.value}%`, fontVariant: 'tabular-nums' }}\n >\n <div class=\"absolute bs-1 is-1\" slot=\"trigger\"></div>\n {this.value}\n </bq-tooltip>\n )}\n {this.indeterminate && (\n <div\n class={{\n 'progress-bar__indeterminate absolute bg-[--bq-progress-bar--indicatorColor] bs-[--bq-progress-bar--height] is-[--bq-progress-bar--indeterminateWidth]': true,\n 'rounded-full': this.borderShape === 'rounded',\n }}\n part=\"indeterminate\"\n />\n )}\n </div>\n <div\n aria-hidden={!this.label || this.indeterminate ? 'true' : 'false'}\n class={{\n 'ms-xs font-medium leading-regular': true,\n 'text-primary': this.type !== 'error',\n 'text-danger': this.type === 'error',\n 'invisible ms-0 is-0': !this.label || this.indeterminate,\n }}\n style={{ fontVariant: 'tabular-nums' }}\n part=\"label\"\n >\n <span>{this.value}%</span>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"bq-radio-group.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAO,MAAM,uBAAuB,GAAG,CAAC,YAAY,EAAE,UAAU,CAAU;;ACA1E,MAAM,eAAe,GAAG,womBAAwomB;;ACehqmB,MAAM,OAAO,GAAG;AACd,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,SAAS,EAAE,UAAU;CACb;MAmDG,YAAY,GAAA,MAAA;;;;;;;;;;;;;;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A,EAClBA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAE,EAAC,sBAAsB,EAAC,IAAI,EAAC,OAAO,GAAG,CACxC,EACTA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,CAAmB,gBAAA,EAAA,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAC,OAAO,EAAA,EAC7DA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,EAAE,EAAC,eAAe,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAI,CAAA,CAC5D,CACG,CACN;;;;;;;;;;;;;;;;;;","names":["debounce","validatePropValue","event","isEventTargetChildOfElement","isDefined","isNil","getNextElement","h","Host"],"sources":["../../packages/beeq/src/components/radio-group/bq-radio-group.types.ts","../../packages/beeq/src/components/radio-group/scss/bq-radio-group.scss?tag=bq-radio-group&encapsulation=shadow","../../packages/beeq/src/components/radio-group/bq-radio-group.tsx"],"sourcesContent":["export const RADIO_GROUP_ORIENTATION = ['horizontal', 'vertical'] as const;\nexport type TRadioGroupOrientation = (typeof RADIO_GROUP_ORIENTATION)[number];\n","/* -------------------------------------------------------------------------- */\n/* Radio group styles */\n/* -------------------------------------------------------------------------- */\n\n:host {\n @apply inline-block;\n}\n\n.bq-radio-group {\n @apply m-b-0 m-i-0;\n\n &:not(.has-fieldset) {\n @apply border-0 m-b-0 m-i-0 p-b-0 p-i-0;\n }\n\n &--horizontal {\n @apply flex;\n }\n\n &--vertical {\n @apply flex flex-col;\n }\n}\n","import { AttachInternals, Component, Element, Event, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { RADIO_GROUP_ORIENTATION } from './bq-radio-group.types';\nimport type { TRadioGroupOrientation } from './bq-radio-group.types';\nimport {\n debounce,\n getNextElement,\n isDefined,\n isEventTargetChildOfElement,\n isNil,\n TDebounce,\n validatePropValue,\n} from '../../shared/utils';\n\nconst KEY_MAP = {\n ArrowDown: 'forward',\n ArrowRight: 'forward',\n ArrowUp: 'backward',\n ArrowLeft: 'backward',\n} as const;\n\ntype Direction = (typeof KEY_MAP)[keyof typeof KEY_MAP];\n\n/**\n * The radio group is a user interface component that groups radio buttons to enable a single selection within the group.\n *\n * @example How to use it\n * ```html\n * <bq-radio-group fieldset value=\"option1\">\n * <span slot=\"label\">radio group</span>\n * <bq-radio value=\"option1\">Radio option 1</bq-radio>\n * <bq-radio value=\"option2\">Radio option 2</bq-radio>\n * <bq-radio value=\"option3\">Radio option 3</bq-radio>\n * </bq-radio-group>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/9718e1-radio-button/b/09d7b1\n * @status stable\n *\n * @attr {boolean} background-on-hover - If `true`, the radio displays background on hover\n * @attr {number} debounce-time - A number representing the delay time (in milliseconds) that bqChange event handler gets triggered once the value change\n * @attr {boolean} disabled - If `true` radio inputs are disabled\n * @attr {boolean} fieldset - If `true` displays fieldset\n * @attr {string} name - Name of the HTML input form control. Submitted with the form as part of a name/value pair\n * @attr {\"horizontal\" | \"vertical\"} orientation - The display orientation of the radio inputs\n * @attr {boolean} required - If `true`, the radio group is required\n * @attr {string} required-validation-message - The native form validation message when the radio group is required\n * @attr {string} value - The display orientation of the radio inputs\n *\n * @method vClick - Simulate a click event on the native `<input>` HTML element used under the hood\n * @method vFocus - Sets focus on the native `<input>` HTML element used under the hood\n * @method vBlur - Remove focus from the native `<input>` HTML element used under the hood\n *\n * @event bqChange - Handler to be called when the radio state changes\n *\n * @slot - The bq-radio items to group\n * @slot label - The label content of radio group\n *\n * @part base - The component's internal wrapper of the radio components.\n * @part label - The `<legend>` element that holds the text content.\n * @part group - The `<div>` element that holds the radio inputs.\n */\n@Component({\n tag: 'bq-radio-group',\n styleUrl: './scss/bq-radio-group.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqRadioGroup {\n // Own Properties\n // ====================\n\n private initialValue?: string;\n private debouncedBqChange: TDebounce<{ value: string; target: HTMLBqRadioElement }>;\n private focusedBqRadio: HTMLBqRadioElement | null = null;\n private readonly radioElementsSet = new Set<HTMLBqRadioElement>();\n private cachedRadioElements: HTMLBqRadioElement[] = [];\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals!: ElementInternals;\n @Element() el!: HTMLBqRadioGroupElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() checkedRadio?: HTMLBqRadioElement;\n @State() tabIndex: '0' | '-1' = '0';\n\n // Public Property API\n // ========================\n\n /** If true, all radio inputs in the group will display a background on hover */\n @Prop({ reflect: true }) backgroundOnHover = false;\n\n /** A number representing the delay time (in milliseconds) that `bqChange` event handler gets triggered once the value change */\n @Prop({ reflect: true, mutable: true }) debounceTime = 0;\n\n /** If true radio inputs are disabled */\n @Prop({ reflect: true }) disabled = false;\n\n /** If true displays fieldset */\n @Prop({ reflect: true }) fieldset = false;\n\n /** Name of the HTML input form control. Submitted with the form as part of a name/value pair. */\n @Prop({ reflect: true }) name!: string;\n\n /** The display orientation of the radio inputs */\n @Prop({ reflect: true, mutable: true }) orientation: TRadioGroupOrientation = 'vertical';\n\n /** If true, the radio group is required */\n @Prop({ reflect: true }) required = false;\n\n /** The native form validation message when the radio group is required */\n @Prop({ reflect: true }) requiredValidationMessage?: string;\n\n /** A string representing the value of the radio. */\n @Prop({ reflect: true, mutable: true }) value?: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('debounceTime')\n handleDebounceTimeChange() {\n const MIN_DEBOUNCE_TIME = 0;\n const normalizedDebounceTime = Math.max(MIN_DEBOUNCE_TIME, this.debounceTime);\n\n if (normalizedDebounceTime !== this.debounceTime) {\n this.debounceTime = normalizedDebounceTime;\n }\n\n this.debouncedBqChange?.cancel();\n this.debouncedBqChange = debounce((event: { value: string; target: HTMLBqRadioElement }): void => {\n this.bqChange?.emit(event);\n }, this.debounceTime);\n }\n\n @Watch('disabled')\n handleDisabledChange() {\n this.tabIndex = this.disabled ? '-1' : '0';\n this.updateRadioTabIndexes();\n }\n\n @Watch('backgroundOnHover')\n @Watch('disabled')\n @Watch('name')\n @Watch('required')\n handleGroupProperties() {\n this.updateRadioProperties();\n }\n\n @Watch('orientation')\n checkPropValues() {\n validatePropValue(RADIO_GROUP_ORIENTATION, 'vertical', this.el, 'orientation');\n }\n\n @Watch('required')\n handleRequiredChange() {\n this.updateFormValidity();\n }\n\n @Watch('value')\n handleValueChange() {\n this.updateRadioProperties();\n this.updateFormValidity();\n\n // Find and update the checked radio based on the new value\n const newCheckedRadio = this.cachedRadioElements.find((radio) => radio.value === this.value);\n if (newCheckedRadio) {\n this.checkedRadio = newCheckedRadio;\n this.debouncedBqChange?.({ value: this.value, target: newCheckedRadio });\n } else {\n this.checkedRadio = undefined;\n }\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the radio state changes */\n @Event() bqChange: EventEmitter<{ value: string; target: HTMLBqRadioElement }>;\n\n /** Handler to be called when the radio loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqRadioElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.initialValue = this.value;\n this.handleDebounceTimeChange();\n this.internals.setFormValue(this.value ?? null);\n\n this.updateCustomStates();\n this.updateFormValidity();\n }\n\n disconnectedCallback() {\n this.debouncedBqChange?.cancel();\n }\n\n formAssociatedCallback() {\n this.internals.setFormValue(this.value ?? null);\n this.updateFormValidity();\n }\n\n formResetCallback() {\n this.value = this.initialValue;\n this.internals.setFormValue(this.value ?? null);\n this.updateFormValidity();\n this.updateCustomStates();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqClick', { capture: true })\n async onBqClick(event: CustomEvent<{ value: string; target: HTMLBqRadioElement }>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n const { target, value } = event.detail;\n if (value === this.value) return;\n\n requestAnimationFrame(() => {\n if (event.defaultPrevented) return;\n this.updateRadioSelection(target);\n });\n }\n\n @Listen('bqKeyDown')\n onBqKeyDown(event: CustomEvent<{ key: string; target: HTMLBqRadioElement }>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n const direction: Direction | undefined = KEY_MAP[event.detail.key];\n if (!direction) return;\n\n this.focusRadioInputSibling(event.detail.target, direction);\n }\n\n @Listen('bqFocus', { capture: true })\n onBqFocus(event: CustomEvent<HTMLBqRadioElement>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n const shouldStopPropagation = isDefined(this.focusedBqRadio);\n this.focusedBqRadio = event.detail;\n\n if (shouldStopPropagation) {\n event.stopPropagation();\n }\n }\n\n @Listen('bqBlur', { capture: true })\n onBqBlur(event: CustomEvent<HTMLBqRadioElement>) {\n if (!isEventTargetChildOfElement(event, this.el)) return;\n\n // NOTE: if focusedBqRadio is nil that means the event occured from this component\n if (isNil(this.focusedBqRadio)) return;\n\n event.stopPropagation();\n\n requestAnimationFrame(() => {\n if (this.focusedBqRadio !== event.detail) return;\n\n this.focusedBqRadio = null;\n this.bqBlur.emit(event.detail);\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 // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n /**\n * Initializes the radio elements set by querying the host element for `ds-radio` elements.\n * This is done to avoid re-querying the host element for radio elements on every change.\n */\n private initializeRadioElements = (): void => {\n this.radioElementsSet.clear();\n this.el.querySelectorAll('bq-radio').forEach((radio) => this.radioElementsSet.add(radio));\n // Caching the radio elements in an array for faster access and iteration\n this.cachedRadioElements = Array.from(this.radioElementsSet);\n // Set the tabIndex of the host element to -1 if there are no radio elements or the group is disabled, otherwise set it to 0\n this.tabIndex = this.cachedRadioElements.length === 0 || this.disabled ? '-1' : '0';\n // Set initial tabIndex for all radios\n this.updateRadioTabIndexes();\n };\n\n /**\n * Sets tabIndex for all radio elements based on current state\n * Handles all scenarios: disabled state, checked radio, value matching, fallback to first\n */\n private updateRadioTabIndexes = (): void => {\n if (this.cachedRadioElements.length === 0) return;\n\n // If disabled, all radios get tabIndex -1\n if (this.disabled) {\n this.cachedRadioElements.forEach((radio) => (radio.tabIndex = -1));\n return;\n }\n\n // Find which radio should be focusable\n let focusableRadio: HTMLBqRadioElement | undefined;\n\n // Priority 1: Currently checked radio\n focusableRadio = this.cachedRadioElements.find((radio) => radio.checked);\n\n // Priority 2: Radio matching current value\n if (!focusableRadio && this.value) {\n focusableRadio = this.cachedRadioElements.find((radio) => radio.value === this.value);\n }\n\n // Priority 3: First enabled radio (fallback)\n if (!focusableRadio) {\n focusableRadio = this.cachedRadioElements.find((radio) => !radio.disabled);\n }\n\n // Apply tabIndex to all radios\n this.cachedRadioElements.forEach((radio) => {\n radio.tabIndex = radio === focusableRadio ? 0 : -1;\n });\n };\n\n /**\n * Updates the radio selection and focus.\n * @param target - The radio element to update.\n */\n private updateRadioSelection = (target: HTMLBqRadioElement): void => {\n // Only uncheck the previously checked radio if it's different\n if (this.checkedRadio && this.checkedRadio !== target) {\n this.checkedRadio.checked = false;\n this.checkedRadio.tabIndex = -1;\n }\n\n target.checked = true;\n target.tabIndex = 0;\n target.vFocus();\n\n this.checkedRadio = target;\n this.value = target.value;\n this.internals?.setFormValue(this.value ?? null);\n\n this.updateRadioTabIndexes();\n };\n\n /**\n * Synchronizes properties of child radio elements with the group's state.\n */\n private updateRadioProperties = (): void => {\n if (this.cachedRadioElements.length === 0) return;\n\n const { backgroundOnHover, disabled, name, required, value } = this;\n\n for (const radio of this.cachedRadioElements) {\n radio.backgroundOnHover = backgroundOnHover;\n radio.checked = value === radio.value;\n // This will allows us to force all radio elements to be disabled\n // while keeping the disabled state of the radio element if it was set individually by the user\n radio.forceDisabled = disabled;\n radio.name = name;\n radio.required = required;\n }\n };\n\n /**\n * Focuses the next/previous radio element in the group based on the current target.\n * Handles circular navigation and skips disabled elements.\n * @param currentTarget - The currently focused radio element\n * @param direction - The navigation direction ('forward' | 'backward')\n */\n private focusRadioInputSibling = (currentTarget: HTMLBqRadioElement, direction: Direction): void => {\n // If there is none or only one radio element, there will be no sibling to focus\n if (this.cachedRadioElements.length <= 1) return;\n\n const currentIndex = this.cachedRadioElements.indexOf(currentTarget);\n // If the index of the radio element target is not found, it means that it's not part of the group\n if (currentIndex === -1) return;\n\n const nextElement = getNextElement(this.cachedRadioElements, currentIndex, direction);\n this.updateRadioSelection(nextElement);\n };\n\n private updateFormValidity = async (): Promise<void> => {\n const { internals, required, requiredValidationMessage, value } = this;\n // Clear the validity state\n internals?.states.clear();\n\n if (!required || (required && !isNil(value))) {\n // If the radio group is not required or has a value, set the validity state to valid\n internals?.states.add('valid');\n internals?.setValidity({});\n return;\n }\n\n const firstRadio = this.cachedRadioElements[0];\n if (!firstRadio) return;\n // If the radio group is required and has no value, set the validity state to invalid\n internals?.states.add('invalid');\n // We need to pass the native input element to the setValidity method as anchor element\n internals?.setValidity(\n { valueMissing: true },\n requiredValidationMessage ?? 'Please select an option',\n await firstRadio.getNativeInput(),\n );\n };\n\n /**\n * Updates the custom states based on the component properties.\n * The custom states can be used to style the component based on the component properties.\n * The custom states are `disabled`, based on the component properties.\n */\n private updateCustomStates = (): void => {\n const states = new Set<string>();\n\n if (this.disabled) states.add('disabled');\n if (this.orientation) states.add(this.orientation);\n\n // Update states\n this.internals?.states.clear();\n states.forEach((state) => this.internals?.states.add(state));\n };\n\n private handleSlotChange = (): void => {\n this.initializeRadioElements();\n this.updateRadioProperties();\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host tabindex={this.tabIndex}>\n <fieldset\n class={{ 'bq-radio-group': true, 'has-fieldset': this.fieldset }}\n aria-controls=\"bq-radiogroup\"\n aria-labelledby=\"bq-radio-group__label\"\n aria-disabled={this.disabled}\n aria-required={this.required}\n disabled={this.disabled}\n role=\"radiogroup\"\n part=\"base\"\n >\n <legend part=\"label\">\n <slot id=\"bq-radiogroup__label\" name=\"label\" />\n </legend>\n <div class={`bq-radio-group--${this.orientation}`} part=\"group\">\n <slot id=\"bq-radiogroup\" onSlotchange={this.handleSlotChange} />\n </div>\n </fieldset>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"bq-radio.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,UAAU,GAAG,+lvBAA+lvB;;MCiDrmvB,OAAO,GAAA,MAAA;;;;;;;;;;AAGV,IAAA,YAAY;;;;;;;;IAeK,iBAAiB,GAAG,KAAK;;IAGV,OAAO,GAAG,KAAK;;IAG9B,QAAQ,GAAG,KAAK;;IAGhB,aAAa,GAAG,KAAK;;AAGrB,IAAA,MAAM;;AAGN,IAAA,IAAI;;AAGJ,IAAA,QAAQ;;AAGR,IAAA,KAAK;;;;;;;AAUrB,IAAA,OAAO;;AAGP,IAAA,OAAO;;AAGP,IAAA,MAAM;;AAGN,IAAA,SAAS;;;;;;;;;;;;AAgBlB;;;AAGG;AAEH,IAAA,MAAM,MAAM,GAAA;AACV,QAAA,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE;;AAG5B;;;AAGG;AAEH,IAAA,MAAM,MAAM,GAAA;AACV,QAAA,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE;;AAG5B;;;AAGG;AAEH,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE;;AAG3B;;AAEG;AAEH,IAAA,MAAM,cAAc,GAAA;QAClB,OAAO,IAAI,CAAC,YAAY;;;;;;AAQlB,IAAA,WAAW,GAAG,CAAC,KAAiB,KAAI;;QAE1C,KAAK,CAAC,cAAc,EAAE;QACtB,IAAI,IAAI,CAAC,QAAQ;YAAE;;;QAInB,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,E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AC,MAAM,EACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,UAAU,EACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,YAAY,EACzB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,OAAO,EAAE,IAAI,CAAC,aAAa,EAC3B,SAAS,EAAE,IAAI,CAAC,eAAe,EAAA,cAAA,EACjB,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,OAAO,EAAA,eAAA,EAC9B,IAAI,CAAC,UAAU,GAAG,MAAM,GAAG,OAAO,EACjC,iBAAA,EAAA,iBAAiB,EACjC,IAAI,EAAC,OAAO,EACZ,CAAA,EACFA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,kBAAkB,EAAC,IAAI,EAAC,OAAO,EAAA,EACxCA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,mBAAmB,EAAA,CAAG,CAC7B,CACF,EACNA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,qGAAqG,EAC3G,IAAI,EAAC,OAAO,EAAA,EAEZA,OAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAE,EAAC,iBAAiB,EAAA,CAAQ,CAC7B,CACD,CACH;;;;;;;;","names":["h","Host"],"sources":["../../packages/beeq/src/components/radio/scss/bq-radio.scss?tag=bq-radio&encapsulation=shadow","../../packages/beeq/src/components/radio/bq-radio.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Radio styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-radio.variables';\n\n:host {\n @apply inline-block;\n}\n\n.bq-radio {\n @apply box-border inline-flex cursor-pointer items-center justify-center gap-2 transition-[background-color] duration-300;\n @apply rounded-s p-b-xs p-i-xs;\n\n &.is-disabled {\n @apply cursor-not-allowed opacity-60;\n\n &.is-checked .bq-radio__circle {\n @apply border-icon-brand;\n }\n\n &.is-checked .bq-radio__checked {\n @apply bg-ui-brand;\n }\n }\n\n &.has-background:not(.is-disabled):hover {\n @apply bg-hover-ui-primary;\n }\n\n &.is-checked:not(.is-disabled) {\n .bq-radio__circle {\n @apply border-icon-brand;\n }\n\n .bq-radio__checked {\n @apply bg-ui-brand;\n }\n }\n\n &:not(.is-disabled):hover .bq-radio__circle {\n @apply border-hover-icon-brand;\n }\n\n &.is-checked:not(.is-disabled):hover {\n .bq-radio__checked,\n .bq-radio__circle {\n @apply border-hover-icon-brand;\n }\n }\n}\n\n.bq-radio__input {\n @apply sr-only;\n\n &:focus-visible {\n ~ .bq-radio__circle {\n @apply focus;\n }\n }\n}\n\n.bq-radio__control {\n @apply box-border flex items-center justify-center rounded-full bs-[--bq-radio--size] is-[--bq-radio--size] p-b-[2px] p-i-[2px];\n}\n\n.bq-radio__circle {\n @apply relative box-border flex items-center justify-center rounded-full border-[length:--bq-radio--border-width] border-solid border-hover-icon-primary bs-full is-full p-b-[3px] p-i-[3px];\n}\n\n.bq-radio__checked {\n @apply rounded-full bs-full is-full;\n}\n\n.bq-radio__label {\n @apply font-medium leading-regular text-primary;\n}\n\n.bq-radio__circle,\n.bq-radio__checked,\n.bq-radio__label {\n @apply transition-[color,background-color,border-color,box-shadow] duration-300;\n}\n","import { Component, Element, Event, h, Host, Method, Prop } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\n/**\n * The radio button is a user interface element that allows users to select a single option.\n *\n * @example How to use it\n * ```html\n * <bq-radio value=\"option1\">Radio option 1</bq-radio>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/9718e1-radio-button/b/09d7b1\n * @status stable\n *\n * @attr {boolean} background-on-hover - If `true`, the radio displays background on hover\n * @attr {boolean} checked - If `true` radio input is checked\n * @attr {boolean} disabled - If `true` radio input is disabled\n * @attr {string} form-id - The form ID that the radio input is associated with\n * @attr {string} name - Name of the HTML input 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 specify a value for the radio before the owning form can be submitted\n * @attr {boolean} value - A string representing the value of the radio\n *\n * @method vClick - Simulate a click event on the native `<input>` HTML element used under the hood\n * @method vFocus - Sets focus on the native `<input>` HTML element used under the hood\n * @method vBlur - Remove focus from the native `<input>` HTML element used under the hood\n * @method getNativeInput - Returns the native `<input>` HTML element used under the hood\n *\n * @event bqBlur - Handler to be called when the radio loses focus\n * @event bqClick - Handler to be called when the radio state changes\n * @event bqFocus - Handler to be called when the radio gets focused\n * @event bqKeyDown - The handler is to be called when the radio key is pressed\n *\n * @slot - The bq-radio item\n *\n * @part base - The component's internal wrapper of the radio component.\n * @part input - The native HTML `<input type=\"radio\">` used under the hood.\n * @part radio - The component's internal wrapper of the radio component.\n * @part label - The `<span>` element that holds the text content.\n *\n * @cssprop --bq-radio--size - Radio size\n * @cssprop --bq-radio--border-width - Radio border width\n */\n@Component({\n tag: 'bq-radio',\n styleUrl: './scss/bq-radio.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqRadio {\n // Own Properties\n // ====================\n private inputElement: HTMLInputElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqRadioElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** If true radio displays background on hover */\n @Prop({ reflect: true }) backgroundOnHover = false;\n\n /** If true radio input is checked */\n @Prop({ reflect: true, mutable: true }) checked = false;\n\n /** If true radio input is disabled */\n @Prop({ reflect: true }) disabled = false;\n\n /** @internal Used by the radio-group parent component to force the disabled state of the radio input */\n @Prop({ reflect: true }) forceDisabled = false;\n\n /** The form ID that the radio input is associated with */\n @Prop({ reflect: true }) formId?: string;\n\n /** Name of the HTML input 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 specify a value for the radio before the owning form can be submitted */\n @Prop({ reflect: true }) required?: boolean;\n\n /** A string representing the value of the radio. */\n @Prop({ reflect: true }) value!: string;\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 radio state changes */\n @Event() bqClick: EventEmitter<{ value: string; target: HTMLBqRadioElement }>;\n\n /** Handler to be called when the radio gets focus */\n @Event() bqFocus: EventEmitter<HTMLBqRadioElement>;\n\n /** Handler to be called when the radio loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqRadioElement>;\n\n /** Handler to be called when the radio key is pressed */\n @Event() bqKeyDown: EventEmitter<{ key: string; target: HTMLBqRadioElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\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.inputElement?.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.inputElement?.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.inputElement?.blur();\n }\n\n /**\n * Returns the native `<input>` HTML element used under the hood.\n */\n @Method()\n async getNativeInput() {\n return this.inputElement;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleClick = (event: MouseEvent) => {\n // Prevent the native input click default behavior\n event.preventDefault();\n if (this.disabled) return;\n\n // Emit the event without changing state\n // Let the radio-group handle all state management and event propagation\n const bqClickEvent = this.bqClick.emit({ value: this.value, target: this.el });\n if (bqClickEvent.defaultPrevented) {\n event.stopImmediatePropagation();\n }\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 handleOnKeyDown = (event: KeyboardEvent) => {\n this.bqKeyDown.emit({ key: event.key, target: this.el });\n };\n\n private get isDisabled() {\n return this.disabled || this.forceDisabled;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host>\n <label\n class={{\n 'bq-radio group': true,\n 'is-disabled': this.isDisabled,\n 'is-checked': this.checked,\n 'has-background': this.backgroundOnHover,\n }}\n part=\"base\"\n >\n <div class=\"bq-radio__control\">\n <input\n class=\"bq-radio__input\"\n ref={(element) => (this.inputElement = element)}\n type=\"radio\"\n form={this.formId}\n name={this.name}\n value={this.value}\n required={this.required}\n disabled={this.isDisabled}\n checked={this.checked}\n onBlur={this.handleOnBlur}\n onClick={this.handleClick}\n onFocus={this.handleOnFocus}\n onKeyDown={this.handleOnKeyDown}\n aria-checked={this.checked ? 'true' : 'false'}\n aria-disabled={this.isDisabled ? 'true' : 'false'}\n aria-labelledby=\"bq-radio__label\"\n part=\"input\"\n />\n <div class=\"bq-radio__circle\" part=\"radio\">\n <div class=\"bq-radio__checked\" />\n </div>\n </div>\n <span\n class=\"bq-radio__label group-hover:text-text-primary-hover group-[.is-disabled]:text-text-primary-disabled\"\n part=\"label\"\n >\n <slot id=\"bq-radio__label\"></slot>\n </span>\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"bq-select.entry.cjs.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,sz7BAAsz7B;;MCkI7z7B,QAAQ,GAAA,MAAA;;;;;;;;;;;;;;;;;;AAIX,IAAA,cAAc;AACd,IAAA,SAAS;AACT,IAAA,SAAS;AACT,IAAA,UAAU;AACV,IAAA,UAAU;AAEV,IAAA,aAAa;AACb,IAAA,aAAa;IAEb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I,EAAC,YAAY,EAAC,KAAK,EAAC,MAAM,EAAA,CAAG,CACrC,CACF,CACH,EACNA,OAAA,CAAA,gBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,EAAE,EAAE,CAAA,WAAA,EAAc,IAAI,CAAC,IAAI,CAAA,CAAE,EAC7B,UAAU,EAAE,IAAI,CAAC,YAAY,mBACd,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,OAAO,EAC3C,WAAW,EAAC,kBAAkB,EAC9B,IAAI,EAAC,SAAS,EAAA,EAEdA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACO,CACL,EAEdA,OAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,CAAC,qCAAqC,IAAI,CAAC,gBAAgB,CAAE,CAAA,GAAG,IAAI;AACpE,gBAAA,SAAS,EAAE,CAAC,IAAI,CAAC,aAAa;AAC/B,aAAA,EACD,GAAG,EAAE,CAAC,OAAuB,MAAM,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,EACjE,IAAI,EAAC,aAAa,EAAA,EAElBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,aAAa,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAA,CAAI,CAC5D,CACF;;;;;;;;;;;;","names":["isNil","stringToArray","isHTMLElement","isDefined","debounce","hasSlotContent","index","h"],"sources":["../../packages/beeq/src/components/select/scss/bq-select.scss?tag=bq-select&encapsulation=shadow","../../packages/beeq/src/components/select/bq-select.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Select styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-select.variables';\n\n:host {\n @apply block w-full;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Label and Helper text */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__label {\n @apply flex items-center m-be-[--bq-select--label-margin-bottom];\n @apply text-[length:--bq-select--label-text-size] text-[color:--bq-select--label-text-color];\n}\n\n.bq-select__helper-text {\n @apply text-[length:--bq-select--helper-text-size] text-[color:--bq-select--helper-text-color] m-bs-[--bq-select--helper-margin-top];\n}\n\n.bq-select__helper-text.validation-error {\n @apply text-danger;\n}\n\n.bq-select__helper-text.validation-success {\n @apply text-success;\n}\n\n.bq-select__helper-text.validation-warning {\n @apply text-warning;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Select input group control */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__dropdown:has(:focus-within, :focus-visible) {\n // The focus state will be controlled by the dropdown element\n // if any of its children has focus, the dropdown will set the focus state to the .bq-select__control\n .bq-select__control {\n --bq-ring-width: 1px;\n --bq-ring-offset-width: 0;\n --bq-ring-color-focus: var(--bq-select--border-color-focus);\n\n @apply focus border-[color:--bq-select--border-color-focus];\n }\n}\n\n.bq-select__control {\n @apply flex items-center transition-[border-color,box-shadow] is-full;\n // Border\n @apply rounded-[--bq-select--border-radius] border-[length:--bq-select--border-width] border-[color:--bq-select--border-color];\n // Padding\n @apply pe-[--bq-select--padding-end] ps-[--bq-select--padding-start] p-b-[var(--bq-select--paddingY)];\n // Text\n @apply select-none text-[length:--bq-select--text-size] text-[color:--bq-select--text-color] placeholder:text-[color:--bq-select--text-placeholder-color];\n // Hover\n @apply [&:not(.disabled):not(:focus-within)]:hover:border-hover-brand;\n\n border-style: var(--bq-select--border-style);\n\n // Enable clear button whenever the input group control is hovered or has focus\n &:not(.disabled):hover,\n &:not(.disabled):focus-within {\n .bq-select__control--clear {\n @apply inline-block;\n }\n }\n}\n\n.bq-select__control.disabled {\n @apply cursor-not-allowed opacity-60;\n}\n\n/* ------------------------------- Validation ------------------------------- */\n\n.bq-select__control.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-select__control.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-select__control.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/* Native HTML Input */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__control--input {\n @apply flex-auto cursor-inherit select-none appearance-none bg-inherit font-inherit text-[length:inherit] text-inherit;\n @apply m-0 border-none p-0 min-bs-[var(--bq-select--icon-size)] min-is-0 focus:outline-none focus-visible:outline-none;\n\n box-shadow: none;\n font-weight: inherit;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Clear button */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__control--clear::part(button) {\n // Since the clear button is inside the input group control,\n // we need to reset the focus ring styles\n --bq-ring-width: initial;\n --bq-ring-offset-width: initial;\n --bq-ring-color-focus: initial;\n\n @apply rounded-xs border-none p-0 bs-auto;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Prefix and suffix */\n/* -------------------------------------------------------------------------- */\n\n.bq-select__control--prefix,\n.bq-select__control--suffix {\n @apply pointer-events-none flex items-center text-[color:var(--bq-select--text-color)];\n}\n\n.bq-select__control--prefix {\n @apply me-[--bq-select--gap];\n}\n\n.bq-select__control--suffix {\n @apply ms-[--bq-select--gap] transition-transform duration-300 ease-in-out;\n}\n\n.bq-select__tags {\n @apply me-xs2 flex flex-1 gap-xs2;\n\n bq-tag,\n ::slotted(bq-tag) {\n @apply inline-flex;\n }\n\n bq-tag::part(text) {\n @apply text-nowrap leading-small;\n }\n}\n\n/* -------------------------------------------------------------------------- */\n/* Slotted and internal icons */\n/* -------------------------------------------------------------------------- */\n\nbq-icon,\n::slotted(bq-icon) {\n --bq-icon--size: var(--bq-select--icon-size) !important;\n}\n","import { AttachInternals, Component, Element, Event, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { Placement } from '../../services/interfaces';\nimport {\n debounce,\n hasSlotContent,\n isDefined,\n isHTMLElement,\n isNil,\n stringToArray,\n TDebounce,\n} from '../../shared/utils';\nimport type { TInputValidation } from '../input/bq-input.types';\n\nexport type TSelectValue = string | string[];\n\n/**\n * The select input component lets users choose from a predefined list, commonly used in forms for easy data selection.\n *\n * @example How to use it\n * ```html\n * <bq-select placeholder=\"Placeholder\">\n * <label slot=\"label\">Select label</label>\n * <span slot=\"helper-text\">\n * <bq-icon name=\"star\"></bq-icon>\n * Helper text\n * </span>\n *\n * <bq-option value=\"1\">Option 1</bq-option>\n * <bq-option value=\"2\">Option 2</bq-option>\n * <bq-option value=\"3\">Option 3</bq-option>\n * </bq-select>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/41989d-select/b/09d7b1\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-dropdown\n * @dependency bq-icon\n * @dependency bq-option-list\n * @dependency bq-tag\n *\n * @attr {boolean} autofocus - If `true`, the Select input will be focused on component render.\n * @attr {string} clear-button-label - The clear button aria label.\n * @attr {number} debounce-time - The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the input value changes.\n * @attr {boolean} disable-clear - If `true`, the clear button won't be displayed.\n * @attr {boolean} disabled - Indicates whether the Select input is disabled and cannot be interacted with.\n * @attr {number} distance - Represents the distance (gutter or margin) between the Select panel and the input element.\n * @attr {string} form - The ID of the form that Select input field belongs to.\n * @attr {boolean} keep-open-on-select - If `true`, the Select panel will remain open after a selection is made.\n * @attr {number} max-tags-visible - The maximum number of tags to display when multiple selection is enabled.\n * @attr {boolean} multiple - If `true`, the Select input will allow multiple selections.\n * @attr {string} name - The Select input name.\n * @attr {boolean} open - If `true`, the Select panel will be visible.\n * @attr {string} panel-height - When set, it will override the height of the Select panel.\n * @attr {string} placeholder - The Select input placeholder text value.\n * @attr {\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"} placement - Position of the Select panel.\n * @attr {boolean} readonly - If `true`, the Select input cannot be modified.\n * @attr {boolean} required - Indicates whether or not the Select input is required to be filled out before submitting the form.\n * @attr {boolean} same-width - Whether the panel should have the Select same width as the input element.\n * @attr {number} skidding - Represents the skidding between the Select panel and the input element.\n * @attr {\"absolute\" | \"fixed\"} strategy - Defines the strategy to position the Select panel.\n * @attr {\"error\" | \"success\" | \"warning\" | \"none\"} validation-status - The validation status of the Select input.\n * @attr {\"number\" | \"string\" | \"string[]\"} value - The select input value can be used to reset the field to a previous value.\n *\n * @method clear - Method to be called to clear the selected value.\n *\n * @event bqBlur - The callback handler is emitted when the Select input loses focus.\n * @event bqClear - The callback handler is emitted when the selected value has been cleared.\n * @event bqFocus - A callback handler is emitted when the Select input has received focus.\n * @event bqSelect - The callback handler is emitted when the selected value has changed.\n *\n * @slot label - The label slot container.\n * @slot prefix - The prefix slot container.\n * @slot tags - The tags slot container.\n * @slot clear-icon - The clear icon slot container.\n * @slot suffix - The suffix slot container.\n * @slot helper-text - The helper text slot container.\n *\n * @part base - The component's base wrapper.\n * @part button - The native HTML button used under the hood in the clear button.\n * @part clear-btn - The clear button.\n * @part control - The input control wrapper.\n * @part input-outline - The input outline wrapper that holds the tags container and the native HTML input used under the hood.\n * @part helper-text - The helper text slot container.\n * @part input - The native HTML input element used under the hood.\n * @part label - The label slot container.\n * @part panel - The select panel container\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n * @part tags - The tags container of the BqTags for multiple selection.\n * @part tag - The tag container of the BqTag for multiple selection.\n * @part tag__base - The base wrapper of the BqTag for multiple selection.\n * @part tag__prefix - The prefix slot container of the BqTag for multiple selection.\n * @part tag__text - The text slot container of the BqTag for multiple selection.\n * @part tag__btn-close - The close button of the BqTag for multiple selection.\n * @part option-list - The option list container.\n *\n * @cssprop --bq-select--background-color - Select background color\n * @cssprop --bq-select--border-color - Select border color\n * @cssprop --bq-select--border-color-focus - Select border color on focus\n * @cssprop --bq-select--border-color-disabled - Select border color when disabled\n * @cssprop --bq-select--border-radius - Select border radius\n * @cssprop --bq-select--border-width - Select border width\n * @cssprop --bq-select--border-style - Select border style\n * @cssprop --bq-select--gap - Gap between Select content and prefix/suffix\n * @cssprop --bq-select--helper-margin-top - Helper text margin top\n * @cssprop --bq-select--helper-text-color - Helper text color\n * @cssprop --bq-select--helper-text-size - Helper text size\n * @cssprop --bq-select--icon-size - Icon size to use in prefix/suffix and clear button\n * @cssprop --bq-select--label-margin-bottom - Select label margin bottom\n * @cssprop --bq-select--label-text-color - Select label text color\n * @cssprop --bq-select--label-text-size - Select label text size\n * @cssprop --bq-select--padding-start - Select padding start\n * @cssprop --bq-select--padding-end - Select padding end\n * @cssprop --bq-select--paddingY - Select padding top and bottom\n * @cssprop --bq-select--text-color - Select text color\n * @cssprop --bq-select--text-size - Select text size\n * @cssprop --bq-select--text-placeholder-color - Select placeholder text color\n */\n@Component({\n tag: 'bq-select',\n styleUrl: './scss/bq-select.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSelect {\n // Own Properties\n // ====================\n\n private helperTextElem?: HTMLElement;\n private inputElem?: HTMLInputElement;\n private labelElem?: HTMLElement;\n private prefixElem?: HTMLElement;\n private suffixElem?: HTMLElement;\n\n private debounceQuery: TDebounce<void>;\n private debounceInput: TDebounce<void>;\n\n private fallbackInputId = 'select';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSelectElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() displayValue?: string;\n @State() hasHelperText = false;\n @State() selectedOptions: HTMLBqOptionElement[] = [];\n\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /** If true, the Select input will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /** The clear button aria label */\n @Prop({ reflect: true }) clearButtonLabel? = 'Clear value';\n\n /**\n * The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the input 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 Select panel will not lock the page body scroll when open. */\n @Prop({ reflect: true }) disableScrollLock?: boolean = false;\n\n /**\n * Indicates whether the Select input is disabled or not.\n * If `true`, the Select is disabled and cannot be interacted with.\n */\n @Prop({ mutable: true }) disabled?: boolean = false;\n\n /** If true, the clear button won't be displayed */\n @Prop({ reflect: true }) disableClear? = false;\n\n /** Represents the distance (gutter or margin) between the Select panel and the input element. */\n @Prop({ reflect: true }) distance?: number = 8;\n\n /** The ID of the form that the Select input belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** If true, the Select panel will remain open after a selection is made. */\n @Prop({ reflect: true }) keepOpenOnSelect?: boolean = false;\n\n /** The Select input name. */\n @Prop({ reflect: true }) name!: string;\n\n /** The maximum number of tags to display when multiple selection is enabled */\n @Prop({ mutable: true }) maxTagsVisible: number = 2;\n\n /** If true, the Select input will allow multiple selections. */\n @Prop({ reflect: true }) multiple?: boolean = false;\n\n /** If true, the Select panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the Select panel. */\n @Prop({ reflect: true }) panelHeight?: string;\n\n /** The Select input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** Position of the Select panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom';\n\n /** If true, the list of options cannot be filtered (searching won't be available) */\n @Prop({ reflect: true }) readonly?: boolean;\n\n /** Indicates whether or not the Select input is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /** Whether the panel should have the Select same width as the input element */\n @Prop({ reflect: true }) sameWidth?: boolean = true;\n\n /** Represents the skidding between the Select panel and the input element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Defines the strategy to position the Select panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n /**\n * The validation status of the Select input.\n *\n * @remarks\n * This property is used to indicate the validation status of the select input. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The input has a validation error.\n * - `'warning'`: The input has a validation warning.\n * - `'success'`: The input has passed validation.\n */\n @Prop({ reflect: true }) validationStatus: TInputValidation = 'none';\n\n /** The select input value, it can be used to reset the field to a previous value */\n @Prop({ reflect: true, mutable: true }) value: TSelectValue;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n // Early return for undefined/null values\n if (isNil(this.value)) {\n this.value = this.multiple ? [] : '';\n this.internals.setFormValue(undefined);\n this.syncItemsFromValue();\n return;\n }\n\n // Handle multiple selection mode\n if (this.multiple) {\n this.value = stringToArray(this.value);\n this.internals.setFormValue(this.value.join(','));\n this.syncItemsFromValue();\n\n return;\n }\n\n // Handle single selection mode\n this.value = String(this.value);\n this.internals.setFormValue(this.value);\n this.syncItemsFromValue();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the Select input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the selected value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the Select input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the selected value has changed */\n @Event() bqSelect!: EventEmitter<{ value: string | number | string[]; item: HTMLBqOptionElement }>;\n\n /** Callback handler emitted when the Select input changes its value while typing */\n @Event() bqInput: EventEmitter<{ value: string | number | string[] }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.initMultipleValue();\n }\n\n componentWillLoad() {\n this.initMultipleValue();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n\n if (this.multiple && Array.isArray(this.value)) {\n this.selectedOptions = this.options.filter((item) => this.value.includes(item.value));\n }\n this.handleValueChange();\n }\n\n formAssociatedCallback() {\n this.internals.role = 'combobox';\n this.internals.ariaExpanded = this.open ? 'true' : 'false';\n }\n\n async formResetCallback() {\n if (isNil(this.value)) return;\n\n this.internals.setValidity({});\n this.clear();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqOpen', { capture: true })\n handleOpenChange(ev: CustomEvent<{ open: boolean }>) {\n if (!ev.composedPath().includes(this.el)) return;\n\n this.open = ev.detail.open;\n }\n\n @Listen('bqFocus', { capture: true })\n @Listen('bqBlur', { capture: true })\n stopOptionFocusBlurPropagation(ev: CustomEvent) {\n // Stop propagation of focus and blur events coming from the `bq-option` elements\n if (isHTMLElement(ev.target, 'bq-select')) return;\n\n ev.stopPropagation();\n }\n\n @Listen('scroll', { target: 'window', passive: true, capture: true })\n handleScrollEvent() {\n if (!this.open || this.disableScrollLock) return;\n\n // Close the panel when the scroll event is triggered.\n // This is useful for those cases where the floating panel is inside a scrollable container.\n // For example, a select inside a dialog, drawer, etc.\n // ⚠️ Notice that document body scroll lock is handled via the `scrollLock` utility.\n this.open = false;\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 * Clears the selected value.\n *\n * @return {Promise<void>}\n * @memberof BqSelect\n */\n @Method()\n async clear(): Promise<void> {\n if (this.disabled) return;\n\n const { multiple, inputElem, bqClear, el } = this;\n\n // Clear value and selected options\n this.value = '';\n this.selectedOptions = [];\n\n // Clear display value and input element if not multiple\n if (!multiple) {\n this.displayValue = '';\n inputElem.value = '';\n }\n\n // Update form value and reset options visibility\n this.resetOptionsVisibility();\n\n // Emit clear event\n bqClear.emit(el);\n }\n\n /**\n * Resets the Select input to a previous value.\n *\n * @param {TSelectValue} value - The value to reset the Select input to.\n * @return {Promise<void>}\n * @memberof BqSelect\n */\n @Method()\n async reset(value: TSelectValue): Promise<void> {\n if (isNil(value)) return;\n\n this.value = value;\n this.syncItemsFromValue();\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private initMultipleValue = () => {\n if (!this.multiple || !isDefined(this.value)) return;\n\n this.value = Array.isArray(this.value) ? this.value : Array.from(JSON.parse(String(this.value)));\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 handleSelect = (ev: CustomEvent<{ value: TSelectValue; item: HTMLBqOptionElement }>) => {\n if (this.disabled) return;\n\n if (this.multiple) {\n ev.stopPropagation();\n }\n\n const { value, item } = ev.detail;\n\n if (this.multiple) {\n this.handleMultipleSelection(item);\n // Clear the input value after selecting an item\n this.inputElem.value = '';\n // If multiple selection is enabled, emit the selected items array instead of relying on\n // the option list to emit the value of the selected item\n this.bqSelect.emit({ value: this.value, item });\n } else {\n this.value = value;\n }\n\n this.resetOptionsVisibility();\n this.inputElem.focus();\n };\n\n private handleMultipleSelection = (item: HTMLBqOptionElement) => {\n // Set has O(1) complexity for insertion, deletion, and search operations, compared to an Array's O(n)\n const selectedOptionsSet = new Set(this.selectedOptions);\n\n if (selectedOptionsSet.has(item)) {\n selectedOptionsSet.delete(item);\n } else {\n selectedOptionsSet.add(item);\n }\n\n this.selectedOptions = Array.from(selectedOptionsSet);\n this.value = this.selectedOptions.map((item) => item.value);\n };\n\n private handleSearchFilter = (value: string) => {\n if (this.disabled) return;\n\n this.debounceQuery?.cancel();\n\n if (!isDefined(value)) {\n this.clear();\n } else {\n this.debounceQuery = debounce(() => {\n this.options.forEach((item: HTMLBqOptionElement) => {\n const itemLabel = this.getOptionLabel(item).toLowerCase();\n item.hidden = !itemLabel.includes(value);\n });\n }, this.debounceTime);\n\n this.debounceQuery();\n }\n\n // The panel will close once a selection is made\n // so we need to make sure it's open when the user is typing and the query is not empty\n this.open = true;\n };\n\n private handleInput = (ev: Event) => {\n if (this.disabled) return;\n\n const { value } = ev.target as HTMLInputElement;\n\n this.debounceInput?.cancel();\n\n this.debounceInput = debounce(() => {\n const inputEvent = this.bqInput.emit({ value });\n if (!inputEvent.defaultPrevented) {\n // Continue with search filtering only if the event wasn't prevented\n this.handleSearchFilter(value);\n }\n }, this.debounceTime);\n\n this.debounceInput();\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n (async () => {\n await this.clear();\n })();\n this.inputElem.focus();\n\n ev.stopPropagation();\n };\n\n private handleTagRemove = (item: HTMLBqOptionElement) => {\n if (this.disabled) return;\n\n this.handleMultipleSelection(item);\n this.bqSelect.emit({ value: this.value, item });\n };\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n this.hasPrefix = hasSlotContent(this.prefixElem);\n this.hasSuffix = hasSlotContent(this.suffixElem);\n this.hasHelperText = hasSlotContent(this.helperTextElem);\n };\n\n private resetOptionsVisibility = () => {\n this.options.forEach((item: HTMLBqOptionElement) => (item.hidden = false));\n };\n\n private syncItemsFromValue = () => {\n const { internals, options, value } = this;\n if (!options.length) return;\n\n // Sync selected state of the BqOption elements\n this.syncSelectedOptionsState();\n\n if (this.multiple) {\n // Sync selected options for multiple selection mode\n this.selectedOptions = options.filter((option) => this.value?.includes(option.value));\n }\n\n // Always update display value and form value\n this.updateDisplayLabel();\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n };\n\n /**\n * Syncs the selected state of the BqOption elements which value is included in the `value` property.\n * Notice that value can be a string or an array of strings.\n *\n * @private\n * @memberof BqSelect\n */\n private syncSelectedOptionsState = () => {\n const { options, multiple, value } = this;\n const lowerCaseValue = String(value).toLowerCase();\n\n options.forEach((option: HTMLBqOptionElement) => {\n if (multiple && Array.isArray(value)) {\n option.selected = value.includes(option.value);\n } else {\n option.selected = option.value.toLowerCase() === lowerCaseValue;\n }\n });\n };\n\n /**\n * Updates the display value of the input element based on the selected option.\n *\n * @private\n * @memberof BqSelect\n */\n private updateDisplayLabel = () => {\n const { value, options, inputElem } = this;\n\n const checkedItem = options.find((item) => item.value === value);\n const displayValue = checkedItem ? this.getOptionLabel(checkedItem) : '';\n\n this.displayValue = displayValue;\n if (inputElem) {\n inputElem.value = displayValue;\n }\n };\n\n private getOptionLabel = (item: HTMLBqOptionElement) => {\n if (!item) return '';\n return item.innerText.trim() ?? '';\n };\n\n private get options() {\n return Array.from(this.el.querySelectorAll('bq-option'));\n }\n\n private get displayPlaceholder() {\n // Hide the placeholder when multiple selection is enabled and there are selected items\n return this.multiple && this.selectedOptions.length !== 0 ? undefined : this.placeholder;\n }\n\n private get displayTags() {\n return this.selectedOptions.map((item, index) => {\n if (index < this.maxTagsVisible || this.maxTagsVisible < 0) {\n return (\n <bq-tag\n key={item.value}\n removable\n size=\"xsmall\"\n variant=\"filled\"\n onBqClose={(event) => {\n // NOTE: prevents triggering bqClose on parent\n event.stopPropagation();\n this.handleTagRemove(item);\n }}\n // Prevent the tag from closing the panel when clicked\n onClick={(ev: MouseEvent) => ev.stopPropagation()}\n exportparts=\"wrapper:tag__base,prefix:tag__prefix,text:tag__text,btn-close:tag__btn-close\"\n part=\"tag\"\n >\n {this.getOptionLabel(item)}\n </bq-tag>\n );\n } else if (index === this.maxTagsVisible) {\n return (\n <bq-tag\n key=\"more\"\n size=\"xsmall\"\n variant=\"filled\"\n exportparts=\"wrapper:tag__base,prefix:tag__prefix,text:tag__text,btn-close:tag__btn-close\"\n part=\"tag\"\n >\n +{this.selectedOptions.length - index}\n </bq-tag>\n );\n }\n\n return null;\n });\n }\n\n private get hasClearIcon() {\n if (this.disableClear || this.disabled) {\n return false;\n }\n\n if (this.multiple) {\n return this.selectedOptions.length > 0;\n }\n\n return isDefined(this.displayValue);\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const labelId = `bq-select__label-${this.name || this.fallbackInputId}`;\n\n return (\n <div class=\"bq-select\" part=\"base\">\n {/* Label */}\n <label\n id={labelId}\n class={{ 'bq-select__label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem: HTMLSpanElement) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n {/* Select dropdown */}\n <bq-dropdown\n class=\"bq-select__dropdown w-full\"\n disableScrollLock={this.disableScrollLock}\n disabled={this.disabled}\n distance={this.distance}\n keepOpenOnSelect={this.keepOpenOnSelect}\n open={this.open}\n panelHeight={this.panelHeight}\n placement={this.placement}\n sameWidth={this.sameWidth}\n skidding={this.skidding}\n strategy={this.strategy}\n exportparts=\"panel\"\n >\n {/* Input control group */}\n <div\n class={{\n 'bq-select__control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n slot=\"trigger\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-select__control--prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem: HTMLSpanElement) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <div class=\"flex flex-1 overflow-x-auto\" part=\"input-outline\">\n {/* Display selected values using BqTags for multiple selection */}\n {this.multiple && (\n <span class=\"bq-select__tags\" part=\"tags\">\n <slot name=\"tags\">{this.displayTags}</slot>\n </span>\n )}\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-select__control--input flex-grow is-full\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls={`bq-options-${this.name}`}\n aria-expanded={this.open ? 'true' : 'false'}\n aria-haspopup=\"listbox\"\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n placeholder={this.displayPlaceholder}\n ref={(inputElem: HTMLInputElement) => (this.inputElem = inputElem)}\n readOnly={this.readonly}\n required={this.required}\n role=\"combobox\"\n spellcheck={false}\n type=\"text\"\n value={this.displayValue}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onInput={this.handleInput}\n />\n </div>\n {/* Clear Button */}\n {this.hasClearIcon && (\n // The clear button will be visible as long as the input has a value\n // and the parent group is hovered or has focus-within\n <bq-button\n class=\"bq-select__control--clear ms-[--bq-select--gap]\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\n tabIndex={-1}\n >\n <slot name=\"clear-icon\">\n <bq-icon name=\"x-circle\" class=\"flex\" />\n </slot>\n </bq-button>\n )}\n {/* Suffix */}\n <span\n class={{ 'bq-select__control--suffix': true, 'rotate-180': this.open, 'rotate-0': !this.open }}\n ref={(spanElem: HTMLSpanElement) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange}>\n <bq-icon name=\"caret-down\" class=\"flex\" />\n </slot>\n </span>\n </div>\n <bq-option-list\n id={`bq-options-${this.name}`}\n onBqSelect={this.handleSelect}\n aria-expanded={this.open ? 'true' : 'false'}\n exportparts=\"base:option-list\"\n role=\"listbox\"\n >\n <slot />\n </bq-option-list>\n </bq-dropdown>\n {/* Helper text */}\n <div\n class={{\n [`bq-select__helper-text validation-${this.validationStatus}`]: true,\n '!hidden': !this.hasHelperText,\n }}\n ref={(divElem: HTMLDivElement) => (this.helperTextElem = divElem)}\n part=\"helper-text\"\n >\n <slot name=\"helper-text\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"bq-side-menu-item.entry.cjs.js","mappings":";;;;;;;;;AAAA,MAAM,iBAAiB,GAAG,o/vBAAo/vB;;MCoDjgwB,cAAc,GAAA,MAAA;;;;;;;;;AAIjB,IAAA,SAAS;;;;;AA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QAAQ,EAAE,CACL,CACd;;;;;;;","names":["getTextContent","h"],"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 { Component, Element, Event, h, Prop, State } from '@stencil/core';\nimport type { EventEmitter } 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 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 onFocus={this.handleFocus}\n onClick={this.handleClick}\n aria-disabled={this.disabled ? 'true' : 'false'}\n role=\"menuitem\"\n tabindex={this.disabled ? -1 : 0}\n slot=\"trigger\"\n part=\"base\"\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) => (this.labelElem = labelElem)}\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\" placement=\"right\" exportparts=\"trigger, panel\">\n {this.textContent}\n {this.menuItem()}\n </bq-tooltip>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"bq-side-menu.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,aAAa,GAAG,yquBAAyquB;;MC8DlruB,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,IAAI,CAAC,cAAc,EAAE;AACrB,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;;;;;;AAQ1C,IAAA,UAAU;;AAGV,IAAA,QAAQ;;;;IAMjB,gBAAgB,GAAA;QACd,IAAI,CAACA,iBAAQ,EAAE;YAAE;QAEjB,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC;QAClD,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC7C,IAAI,CAAC,cAA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AuD,EAC7D,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;;YAE3C,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,KAAK,EAAA,EAEVA,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;;;;;;;;;;","names":["isClient","isHTMLElement","h"],"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-text--primary: theme(textColor.inverse);\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-text--primary: theme(textColor.inverse);\n }\n}\n","import { Component, Event, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { TSideMenuAppearance, TSideMenuSize } from './bq-side-menu.types';\nimport { isClient, isHTMLElement } from '../../shared/utils';\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(\n (menuItem: HTMLBqSideMenuItemElement) => (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) => (menuItem.collapse = this.collapse));\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 ref={(navElem) => (this.menuElem = navElem)}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n role=\"menu\"\n part=\"nav\"\n >\n <slot />\n </nav>\n {/* Footer */}\n <div\n class=\"bq-side-menu--footer sticky flex justify-center bg-[var(--bq-side-menu--bg-color)] p-xs inset-be-0 m-bs-[auto]\"\n part=\"footer\"\n >\n <slot name=\"footer\"></slot>\n </div>\n </aside>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-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AAoG,EAC1G,GAAG,EAAE,CAAC,IAAI,MAAM,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,EACzC,IAAI,EAAC,eAAe,EACpB,CAAA,EAED,IAAI,CAAC,aAAa;YACjB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,IAAI,MAAM,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,EAEjG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,MAAM,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC,EAE9E,IAAI,CAAC,aAAa;AACjB,YAAA,IAAI,CAAC,WAAW;AAChB,YAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,IAAI,MAAM,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,EAEjG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,MAAM,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC,CAC/F,EAEL,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,kBAAkB,CAAC,CACvD;;;;;;;;;;;;;;","names":["isNil","clamp","isString","debounce","h"],"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 { AttachInternals, Component, Element, Event, h, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { TSliderType, TSliderValue } from './bq-slider.types';\nimport { clamp, debounce, isNil, isString, TDebounce } from '../../shared/utils';\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} box-content block text-s font-medium leading-regular text-primary is-fit min-is-8 [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 type=\"range\"\n class={{\n 'absolute start-0 -translate-y-1/2 cursor-pointer appearance-none bg-transparent outline-none is-full inset-bs-[50%] disabled:cursor-not-allowed': true,\n 'pointer-events-none': this.isRangeType,\n }}\n style={this.isRangeType ? { zIndex: zIndexValue(type) } : undefined}\n disabled={this.disabled}\n min={this.min}\n max={this.max}\n name={this.name}\n step={this.step}\n ref={refCallback}\n onInput={(ev) => this.handleInputChange(type, ev)}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onMouseDown={this.handleMouseDown}\n onMouseUp={this.handleMouseUp}\n value={value}\n part={`input-${type}`}\n />\n );\n };\n\n private renderTooltip = (\n value: number,\n thumbPosition: number,\n refCallback: (elem: HTMLBqTooltipElement) => void,\n ): HTMLBqTooltipElement => (\n <bq-tooltip\n class={{\n 'absolute [&::part(panel)]:absolute': true,\n hidden: !this.isTooltipAlwaysVisible,\n }}\n exportparts=\"base,trigger,panel\"\n alwaysVisible={true}\n distance={this.enableValueIndicator ? 6 : 16}\n style={{ insetInlineStart: `${thumbPosition}px`, fontVariant: 'tabular-nums' }}\n ref={refCallback}\n >\n <div class=\"absolute bs-1 is-1\" 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={{ 'flex is-full': 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=\"relative is-full\" part=\"container\">\n {/* TRACK AREA */}\n <span\n class=\"absolute start-0 -translate-y-1/2 rounded-xs bg-[--bq-slider--trackarea-color] bs-1 is-full inset-bs-[50%]\"\n ref={(elem) => (this.trackElem = elem)}\n part=\"track-area\"\n />\n {/* PROGRESS AREA */}\n <span\n class=\"absolute -translate-y-1/2 rounded-xs bg-[--bq-slider--progress-color] bs-1 is-[50%] inset-bs-[50%]\"\n ref={(elem) => (this.progressElem = elem)}\n part=\"progress-area\"\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) => (this.minTooltipElem = elem))}\n {/* INPUT (Min), used on single type */}\n {this.renderInput('min', this.minValue, (input) => (this.inputMinElem = input))}\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) => (this.maxTooltipElem = elem))}\n {/* INPUT (Max) */}\n {this.isRangeType && this.renderInput('max', this.maxValue, (input) => (this.inputMaxElem = input))}\n </div>\n {/* LABEL (end) */}\n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,EAAE,IAAI,CAAC,gBAAgB,EAAI,CAAA,CACxC,CACH;;;;;;;;;;;;","names":["validatePropValue","hasSlotContent","slot","isNil","getTextContent","getCSSVariableValue","isHTMLElement","h"],"sources":["../../packages/beeq/src/components/spinner/bq-spinner.types.ts","../../packages/beeq/src/components/spinner/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', 'bellow'] 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-bellow {\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-bellow {\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 { SPINNER_SIZE, SPINNER_TEXT_POSITION } from './bq-spinner.types';\nimport type { TSpinnerSize, TSpinnerTextPosition } from './bq-spinner.types';\nimport {\n getCSSVariableValue,\n getTextContent,\n hasSlotContent,\n isHTMLElement,\n isNil,\n validatePropValue,\n} from '../../shared/utils';\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)).toString();\n }\n\n private get bqIcon(): HTMLBqIconElement | null {\n if (!this.hasIconSlot) return null;\n\n const slot = this.iconSlotElem.querySelector('slot');\n\n return [...slot.assignedElements({ flatten: true })].filter((el: Element) =>\n isHTMLElement(el, 'bq-icon'),\n )[0] as HTMLBqIconElement;\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 class={`bq-spinner--loader ${this.size} relative text-[--bq-spinner--color]`}\n aria-label=\"Loading...\"\n role=\"status\"\n >\n <svg class=\"bs-full is-full\" fill=\"currentColor\" viewBox=\"0 0 48 48\">\n <path\n fill=\"currentColor\"\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 />\n <path\n fill=\"currentColor\"\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 opacity=\".1\"\n />\n </svg>\n </div>\n )}\n <span\n class={{\n 'bq-spinner--icon': true,\n flex: this.hasIconSlot,\n '!hidden': !this.hasIconSlot,\n }}\n ref={(spanElem) => (this.iconSlotElem = spanElem)}\n part=\"custom-icon\"\n >\n <slot name=\"icon\" onSlotchange={this.handleIconSlotChange} />\n </span>\n <span\n class={{\n 'bq-spinner--text font-medium leading-regular text-primary': true,\n '!hidden': !this.isTextDisplayed,\n }}\n part=\"text\"\n ref={(spanElem) => (this.slotElem = spanElem)}\n >\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n );\n }\n}\n"],"version":3}
|