@beeq/core 1.10.0 → 1.11.0-beta.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-group.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-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-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-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-select.entry.esm.js.map +1 -1
- package/dist/beeq/bq-side-menu-item.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-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/index.esm.js +1 -1
- package/dist/beeq/{p-67597553.entry.js → p-08b19f97.entry.js} +2 -2
- package/dist/beeq/p-08b19f97.entry.js.map +1 -0
- package/dist/beeq/{p-c7b5ae9b.entry.js → p-0e481031.entry.js} +2 -2
- package/dist/beeq/p-0e481031.entry.js.map +1 -0
- package/dist/beeq/{p-69f1f5ad.entry.js → p-1770fd5b.entry.js} +2 -2
- package/dist/beeq/p-1770fd5b.entry.js.map +1 -0
- package/dist/beeq/{p-6eb439a3.entry.js → p-1f8cc15c.entry.js} +2 -2
- package/dist/beeq/p-1f8cc15c.entry.js.map +1 -0
- package/dist/beeq/{p-12c13e8e.entry.js → p-25e92d0a.entry.js} +2 -2
- package/dist/beeq/p-25e92d0a.entry.js.map +1 -0
- package/dist/beeq/{p-afb356b4.entry.js → p-28788a48.entry.js} +2 -2
- package/dist/beeq/p-28788a48.entry.js.map +1 -0
- package/dist/beeq/{p-22c634b5.entry.js → p-32a07a71.entry.js} +2 -2
- package/dist/beeq/p-32a07a71.entry.js.map +1 -0
- package/dist/beeq/{p-622b9249.entry.js → p-33899839.entry.js} +2 -2
- package/dist/beeq/p-33899839.entry.js.map +1 -0
- package/dist/beeq/{p-def3bd26.entry.js → p-3424586a.entry.js} +2 -2
- package/dist/beeq/p-3424586a.entry.js.map +1 -0
- package/dist/beeq/{p-c7d5983f.entry.js → p-3b1ef7e6.entry.js} +2 -2
- package/dist/beeq/p-3b1ef7e6.entry.js.map +1 -0
- package/dist/beeq/p-42515484.entry.js +6 -0
- package/dist/beeq/p-42515484.entry.js.map +1 -0
- package/dist/beeq/{p-9b03ec25.entry.js → p-4a726c36.entry.js} +2 -2
- package/dist/beeq/p-4a726c36.entry.js.map +1 -0
- package/dist/beeq/{p-4aa72d5a.entry.js → p-61fe519c.entry.js} +2 -2
- package/dist/beeq/p-61fe519c.entry.js.map +1 -0
- package/dist/beeq/{p-1dded250.entry.js → p-6eb0f643.entry.js} +2 -2
- package/dist/beeq/p-6eb0f643.entry.js.map +1 -0
- package/dist/beeq/{p-38b70ecf.entry.js → p-73054d34.entry.js} +2 -2
- package/dist/beeq/p-73054d34.entry.js.map +1 -0
- package/dist/beeq/{p-b144f52a.entry.js → p-7bf79e31.entry.js} +2 -2
- package/dist/beeq/p-7bf79e31.entry.js.map +1 -0
- package/dist/beeq/{p-d90d892b.entry.js → p-7ecff021.entry.js} +2 -2
- package/dist/beeq/p-7ecff021.entry.js.map +1 -0
- package/dist/beeq/{p-18af4fe6.entry.js → p-84c96afc.entry.js} +2 -2
- package/dist/beeq/p-84c96afc.entry.js.map +1 -0
- package/dist/beeq/{p-dac78869.entry.js → p-895454b8.entry.js} +2 -2
- package/dist/beeq/p-895454b8.entry.js.map +1 -0
- package/dist/beeq/{p-b7be6f2a.entry.js → p-9584ff4f.entry.js} +2 -2
- package/dist/beeq/p-9584ff4f.entry.js.map +1 -0
- package/dist/beeq/{p-C4jSqdYP.js → p-B2Q_ACEf.js} +3 -3
- package/dist/beeq/p-B2Q_ACEf.js.map +1 -0
- package/dist/beeq/p-C_mtknb1.js +6 -0
- package/dist/beeq/p-C_mtknb1.js.map +1 -0
- package/dist/beeq/p-DMf9D39m.js +6 -0
- package/dist/beeq/p-DMf9D39m.js.map +1 -0
- package/dist/beeq/p-DdvbF5yL.js.map +1 -1
- package/dist/beeq/p-Ds7rcaFH.js +6 -0
- package/dist/beeq/p-Ds7rcaFH.js.map +1 -0
- package/dist/beeq/{p-1a19b5fa.entry.js → p-a287dd31.entry.js} +2 -2
- package/dist/beeq/p-a287dd31.entry.js.map +1 -0
- package/dist/beeq/{p-cb1ec3ac.entry.js → p-acec3250.entry.js} +2 -2
- package/dist/beeq/p-acec3250.entry.js.map +1 -0
- package/dist/beeq/{p-fc2f0022.entry.js → p-afecb3f2.entry.js} +2 -2
- package/dist/beeq/p-afecb3f2.entry.js.map +1 -0
- package/dist/beeq/{p-694593eb.entry.js → p-b324e939.entry.js} +2 -2
- package/dist/beeq/p-b324e939.entry.js.map +1 -0
- package/dist/beeq/{p-4362ebdd.entry.js → p-b387860a.entry.js} +2 -2
- package/dist/beeq/p-b387860a.entry.js.map +1 -0
- package/dist/beeq/p-b40aaef2.entry.js +6 -0
- package/dist/beeq/p-b40aaef2.entry.js.map +1 -0
- package/dist/beeq/{p-cf711f06.entry.js → p-ba7572f4.entry.js} +2 -2
- package/dist/beeq/p-ba7572f4.entry.js.map +1 -0
- package/dist/beeq/{p-ad56e393.entry.js → p-bcd00932.entry.js} +2 -2
- package/dist/beeq/p-bcd00932.entry.js.map +1 -0
- package/dist/beeq/p-c737da48.entry.js +6 -0
- package/dist/beeq/p-c737da48.entry.js.map +1 -0
- package/dist/beeq/{p-bb038cc5.entry.js → p-c7471d26.entry.js} +2 -2
- package/dist/beeq/p-c7471d26.entry.js.map +1 -0
- package/dist/beeq/{p-96fed9ed.entry.js → p-dc188227.entry.js} +2 -2
- package/dist/beeq/p-dc188227.entry.js.map +1 -0
- package/dist/beeq/{p-c886eaab.entry.js → p-de332995.entry.js} +2 -2
- package/dist/beeq/p-de332995.entry.js.map +1 -0
- package/dist/beeq/{p-88a8f431.entry.js → p-e1450a16.entry.js} +2 -2
- package/dist/beeq/p-e1450a16.entry.js.map +1 -0
- package/dist/beeq/{p-5b60b7fa.entry.js → p-e1ecf09d.entry.js} +2 -2
- package/dist/beeq/p-e1ecf09d.entry.js.map +1 -0
- package/dist/beeq/{p-3464beb1.entry.js → p-e2aec11c.entry.js} +2 -2
- package/dist/beeq/p-e2aec11c.entry.js.map +1 -0
- package/dist/beeq/{p-1ca28052.entry.js → p-e5e294ad.entry.js} +2 -2
- package/dist/beeq/p-e5e294ad.entry.js.map +1 -0
- package/dist/beeq/{p-83c5cd25.entry.js → p-e97a106c.entry.js} +2 -2
- package/dist/beeq/p-e97a106c.entry.js.map +1 -0
- package/dist/beeq/{p-8918acc2.entry.js → p-ee9117e4.entry.js} +2 -2
- package/dist/beeq/p-ee9117e4.entry.js.map +1 -0
- package/dist/beeq/{p-ef64ddbc.entry.js → p-f82cff9e.entry.js} +2 -2
- package/dist/beeq/p-f82cff9e.entry.js.map +1 -0
- package/dist/beeq.html-custom-data.json +33 -33
- package/dist/cjs/{assetsPath-CyeA6tpY.js → assetsPath-pf4usGy6.js} +8 -12
- package/dist/cjs/assetsPath-pf4usGy6.js.map +1 -0
- package/dist/cjs/beeq.cjs.js +2 -4
- package/dist/cjs/beeq.cjs.js.map +1 -1
- package/dist/cjs/bq-accordion-group.cjs.entry.js +2 -4
- package/dist/cjs/bq-accordion-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-accordion.cjs.entry.js +1 -3
- package/dist/cjs/bq-alert.cjs.entry.js +2 -4
- package/dist/cjs/bq-alert.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-avatar.cjs.entry.js +2 -4
- package/dist/cjs/bq-avatar.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-badge.cjs.entry.js +1 -3
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +2 -4
- package/dist/cjs/bq-breadcrumb-item.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-breadcrumb.cjs.entry.js +2 -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 +3 -5
- 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 +2 -4
- package/dist/cjs/bq-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-date-picker.cjs.entry.js +2 -4
- package/dist/cjs/bq-date-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-dialog.cjs.entry.js +2 -4
- package/dist/cjs/bq-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-divider.cjs.entry.js +1 -3
- package/dist/cjs/bq-drawer.cjs.entry.js +2 -4
- 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 +3 -5
- package/dist/cjs/bq-empty-state.cjs.entry.js +2 -4
- package/dist/cjs/bq-empty-state.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-input.cjs.entry.js +2 -4
- package/dist/cjs/bq-input.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-notification.cjs.entry.js +2 -4
- 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 +3 -5
- package/dist/cjs/bq-option.cjs.entry.js +1 -3
- package/dist/cjs/bq-page-title.cjs.entry.js +2 -4
- package/dist/cjs/bq-page-title.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-progress.cjs.entry.js +2 -4
- package/dist/cjs/bq-progress.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-radio-group.cjs.entry.js +18 -11
- package/dist/cjs/bq-radio-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-radio.cjs.entry.js +1 -3
- package/dist/cjs/bq-select.cjs.entry.js +11 -11
- package/dist/cjs/bq-select.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-side-menu-item.cjs.entry.js +2 -4
- package/dist/cjs/bq-side-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-side-menu.cjs.entry.js +1 -3
- package/dist/cjs/bq-slider.cjs.entry.js +1 -3
- package/dist/cjs/bq-spinner.cjs.entry.js +2 -4
- 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 +1 -3
- package/dist/cjs/bq-steps.cjs.entry.js +2 -4
- package/dist/cjs/bq-steps.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-switch.cjs.entry.js +2 -4
- package/dist/cjs/bq-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-tab-group.cjs.entry.js +2 -4
- package/dist/cjs/bq-tab-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-tab.cjs.entry.js +2 -4
- package/dist/cjs/bq-tab.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-textarea.cjs.entry.js +2 -4
- package/dist/cjs/bq-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-toast.cjs.entry.js +2 -4
- package/dist/cjs/bq-toast.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-tooltip.cjs.entry.js +2 -4
- package/dist/cjs/{index-tFN0ax76.js → index-B6fG32hZ.js} +39 -22
- package/dist/cjs/index-B6fG32hZ.js.map +1 -0
- package/dist/cjs/{index-BKXwzJHW.js → index-DMgUhnao.js} +26 -21
- package/dist/cjs/index-DMgUhnao.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -4
- package/dist/cjs/loader.cjs.js +1 -3
- package/dist/cjs/{stringToArray-DWnmNBjZ.js → stringToArray-DTx7uqZ4.js} +4 -3
- package/dist/cjs/stringToArray-DTx7uqZ4.js.map +1 -0
- package/dist/cjs/transition-C0S-pYqN.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/radio-group/bq-radio-group.js +35 -9
- package/dist/collection/components/radio-group/bq-radio-group.js.map +1 -1
- package/dist/collection/components/select/bq-select.js +10 -8
- 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/shared/utils/assetsPath.js +6 -10
- package/dist/collection/shared/utils/assetsPath.js.map +1 -1
- package/dist/collection/shared/utils/stringToArray.js +2 -1
- package/dist/collection/shared/utils/stringToArray.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/{p-CttsUm37.js → p--r87nWid.js} +2 -2
- package/dist/components/{p-CttsUm37.js.map → p--r87nWid.js.map} +1 -1
- package/dist/components/{p-DpHyV2gx.js → p-3U5U42sd.js} +2 -2
- package/dist/components/{p-DpHyV2gx.js.map → p-3U5U42sd.js.map} +1 -1
- package/dist/components/{p-BREXcAn5.js → p-5stK0dyx.js} +2 -2
- package/dist/components/{p-BREXcAn5.js.map → p-5stK0dyx.js.map} +1 -1
- package/dist/components/{p-BrcJUBET.js → p-CHy0sCco.js} +2 -2
- package/dist/components/{p-BrcJUBET.js.map → p-CHy0sCco.js.map} +1 -1
- package/dist/components/p-C_mtknb1.js +6 -0
- package/dist/components/p-C_mtknb1.js.map +1 -0
- package/dist/components/{p-BzYR7w7X.js → p-CeT8gvNG.js} +2 -2
- package/dist/components/{p-BzYR7w7X.js.map → p-CeT8gvNG.js.map} +1 -1
- package/dist/components/{p-DngixUI8.js → p-D5Ui9x2e.js} +2 -2
- package/dist/components/{p-DngixUI8.js.map → p-D5Ui9x2e.js.map} +1 -1
- package/dist/components/p-D8zAe4nK.js +6 -0
- package/dist/components/p-D8zAe4nK.js.map +1 -0
- package/dist/components/{p-9gvSRSmi.js → p-DX628oDu.js} +2 -2
- package/dist/components/{p-9gvSRSmi.js.map → p-DX628oDu.js.map} +1 -1
- package/dist/components/p-DdvbF5yL.js.map +1 -1
- package/dist/components/{p-DZeqNx0s.js → p-DwLfHxB7.js} +2 -2
- package/dist/components/{p-DZeqNx0s.js.map → p-DwLfHxB7.js.map} +1 -1
- package/dist/components/{p-DZoizZde.js → p-eLopxgQr.js} +2 -2
- package/dist/components/p-eLopxgQr.js.map +1 -0
- package/dist/custom-elements.json +232 -225
- package/dist/esm/{assetsPath-v2hVBSPV.js → assetsPath-CJqXJ_hN.js} +8 -12
- package/dist/esm/assetsPath-CJqXJ_hN.js.map +1 -0
- package/dist/esm/beeq.js +3 -5
- package/dist/esm/beeq.js.map +1 -1
- package/dist/esm/bq-accordion-group.entry.js +2 -4
- package/dist/esm/bq-accordion-group.entry.js.map +1 -1
- package/dist/esm/bq-accordion.entry.js +1 -3
- package/dist/esm/bq-alert.entry.js +2 -4
- package/dist/esm/bq-alert.entry.js.map +1 -1
- package/dist/esm/bq-avatar.entry.js +2 -4
- package/dist/esm/bq-avatar.entry.js.map +1 -1
- package/dist/esm/bq-badge.entry.js +1 -3
- package/dist/esm/bq-breadcrumb-item.entry.js +2 -4
- package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/bq-breadcrumb.entry.js +2 -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 +3 -5
- 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 +2 -4
- package/dist/esm/bq-checkbox.entry.js.map +1 -1
- package/dist/esm/bq-date-picker.entry.js +2 -4
- package/dist/esm/bq-date-picker.entry.js.map +1 -1
- package/dist/esm/bq-dialog.entry.js +2 -4
- package/dist/esm/bq-dialog.entry.js.map +1 -1
- package/dist/esm/bq-divider.entry.js +1 -3
- package/dist/esm/bq-drawer.entry.js +2 -4
- 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 +3 -5
- package/dist/esm/bq-empty-state.entry.js +2 -4
- package/dist/esm/bq-empty-state.entry.js.map +1 -1
- package/dist/esm/bq-input.entry.js +2 -4
- package/dist/esm/bq-input.entry.js.map +1 -1
- package/dist/esm/bq-notification.entry.js +2 -4
- 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 +3 -5
- package/dist/esm/bq-option.entry.js +1 -3
- package/dist/esm/bq-page-title.entry.js +2 -4
- package/dist/esm/bq-page-title.entry.js.map +1 -1
- package/dist/esm/bq-progress.entry.js +2 -4
- package/dist/esm/bq-progress.entry.js.map +1 -1
- package/dist/esm/bq-radio-group.entry.js +18 -11
- package/dist/esm/bq-radio-group.entry.js.map +1 -1
- package/dist/esm/bq-radio.entry.js +1 -3
- package/dist/esm/bq-select.entry.js +11 -11
- package/dist/esm/bq-select.entry.js.map +1 -1
- package/dist/esm/bq-side-menu-item.entry.js +2 -4
- package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
- package/dist/esm/bq-side-menu.entry.js +1 -3
- package/dist/esm/bq-slider.entry.js +1 -3
- package/dist/esm/bq-spinner.entry.js +2 -4
- 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 +1 -3
- package/dist/esm/bq-steps.entry.js +2 -4
- package/dist/esm/bq-steps.entry.js.map +1 -1
- package/dist/esm/bq-switch.entry.js +2 -4
- package/dist/esm/bq-switch.entry.js.map +1 -1
- package/dist/esm/bq-tab-group.entry.js +2 -4
- package/dist/esm/bq-tab-group.entry.js.map +1 -1
- package/dist/esm/bq-tab.entry.js +2 -4
- package/dist/esm/bq-tab.entry.js.map +1 -1
- package/dist/esm/bq-textarea.entry.js +2 -4
- package/dist/esm/bq-textarea.entry.js.map +1 -1
- package/dist/esm/bq-toast.entry.js +2 -4
- package/dist/esm/bq-toast.entry.js.map +1 -1
- package/dist/esm/bq-tooltip.entry.js +2 -4
- package/dist/esm/{index-C4jSqdYP.js → index-B2Q_ACEf.js} +26 -21
- package/dist/esm/index-B2Q_ACEf.js.map +1 -0
- package/dist/esm/{index-y49NXy_H.js → index-C_mtknb1.js} +39 -22
- package/dist/esm/index-C_mtknb1.js.map +1 -0
- package/dist/esm/index.js +2 -4
- package/dist/esm/loader.js +2 -4
- package/dist/esm/{stringToArray-g9MEtfgW.js → stringToArray-DD7NecAG.js} +4 -3
- package/dist/esm/stringToArray-DD7NecAG.js.map +1 -0
- package/dist/esm/transition-DdvbF5yL.js.map +1 -1
- package/dist/hydrate/index.js +83 -53
- package/dist/hydrate/index.mjs +83 -53
- package/dist/types/components/radio-group/bq-radio-group.d.ts +2 -0
- package/dist/types/components.d.ts +5 -0
- package/dist/types/stencil-public-runtime.d.ts +23 -0
- package/package.json +4 -4
- package/dist/beeq/p-12c13e8e.entry.js.map +0 -1
- package/dist/beeq/p-18af4fe6.entry.js.map +0 -1
- package/dist/beeq/p-1a19b5fa.entry.js.map +0 -1
- package/dist/beeq/p-1ca28052.entry.js.map +0 -1
- package/dist/beeq/p-1dded250.entry.js.map +0 -1
- package/dist/beeq/p-22c634b5.entry.js.map +0 -1
- package/dist/beeq/p-3464beb1.entry.js.map +0 -1
- package/dist/beeq/p-36d1fb9d.entry.js +0 -6
- package/dist/beeq/p-36d1fb9d.entry.js.map +0 -1
- package/dist/beeq/p-38b70ecf.entry.js.map +0 -1
- package/dist/beeq/p-4362ebdd.entry.js.map +0 -1
- package/dist/beeq/p-4aa72d5a.entry.js.map +0 -1
- package/dist/beeq/p-5b60b7fa.entry.js.map +0 -1
- package/dist/beeq/p-622b9249.entry.js.map +0 -1
- package/dist/beeq/p-67597553.entry.js.map +0 -1
- package/dist/beeq/p-694593eb.entry.js.map +0 -1
- package/dist/beeq/p-69f1f5ad.entry.js.map +0 -1
- package/dist/beeq/p-6eb439a3.entry.js.map +0 -1
- package/dist/beeq/p-83c5cd25.entry.js.map +0 -1
- package/dist/beeq/p-88a8f431.entry.js.map +0 -1
- package/dist/beeq/p-8918acc2.entry.js.map +0 -1
- package/dist/beeq/p-9573c018.entry.js +0 -6
- package/dist/beeq/p-9573c018.entry.js.map +0 -1
- package/dist/beeq/p-96fed9ed.entry.js.map +0 -1
- package/dist/beeq/p-9b03ec25.entry.js.map +0 -1
- package/dist/beeq/p-BO2RoztC.js +0 -6
- package/dist/beeq/p-BO2RoztC.js.map +0 -1
- package/dist/beeq/p-C4jSqdYP.js.map +0 -1
- package/dist/beeq/p-DG51kDIQ.js +0 -6
- package/dist/beeq/p-DG51kDIQ.js.map +0 -1
- package/dist/beeq/p-a8c20aaf.entry.js +0 -6
- package/dist/beeq/p-a8c20aaf.entry.js.map +0 -1
- package/dist/beeq/p-ad56e393.entry.js.map +0 -1
- package/dist/beeq/p-afb356b4.entry.js.map +0 -1
- package/dist/beeq/p-b144f52a.entry.js.map +0 -1
- package/dist/beeq/p-b7be6f2a.entry.js.map +0 -1
- package/dist/beeq/p-bb038cc5.entry.js.map +0 -1
- package/dist/beeq/p-c7b5ae9b.entry.js.map +0 -1
- package/dist/beeq/p-c7d5983f.entry.js.map +0 -1
- package/dist/beeq/p-c886eaab.entry.js.map +0 -1
- package/dist/beeq/p-cb1ec3ac.entry.js.map +0 -1
- package/dist/beeq/p-cf711f06.entry.js.map +0 -1
- package/dist/beeq/p-d90d892b.entry.js.map +0 -1
- package/dist/beeq/p-dac78869.entry.js.map +0 -1
- package/dist/beeq/p-def3bd26.entry.js.map +0 -1
- package/dist/beeq/p-ef64ddbc.entry.js.map +0 -1
- package/dist/beeq/p-fc2f0022.entry.js.map +0 -1
- package/dist/beeq/p-y49NXy_H.js +0 -6
- package/dist/beeq/p-y49NXy_H.js.map +0 -1
- package/dist/cjs/assetsPath-CyeA6tpY.js.map +0 -1
- 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/index-BKXwzJHW.js.map +0 -1
- package/dist/cjs/index-tFN0ax76.js.map +0 -1
- package/dist/cjs/stringToArray-DWnmNBjZ.js.map +0 -1
- package/dist/components/p-DSDQV9S1.js +0 -6
- package/dist/components/p-DSDQV9S1.js.map +0 -1
- package/dist/components/p-DZoizZde.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/assetsPath-v2hVBSPV.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/index-C4jSqdYP.js.map +0 -1
- package/dist/esm/index-y49NXy_H.js.map +0 -1
- package/dist/esm/stringToArray-g9MEtfgW.js.map +0 -1
- /package/dist/types/{home/runner/work/BEEQ/BEEQ → Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System}/.stencil/packages/beeq/jest.config.d.ts +0 -0
- /package/dist/types/{home/runner/work/BEEQ/BEEQ → Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System}/.stencil/packages/beeq/stencil.config.d.ts +0 -0
- /package/dist/types/{home/runner/work/BEEQ/BEEQ → Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System}/.stencil/tailwind.config.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-dropdown.bq-panel.entry.esm.js","sources":["../../packages/beeq/src/components/dropdown/scss/bq-dropdown.scss?tag=bq-dropdown&encapsulation=shadow","../../packages/beeq/src/components/dropdown/bq-dropdown.tsx","../../packages/beeq/src/components/panel/scss/bq-panel.scss?tag=bq-panel&encapsulation=shadow","../../packages/beeq/src/components/panel/bq-panel.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Dropdown styles */\n/* -------------------------------------------------------------------------- */\n\n:host {\n @apply relative inline-block;\n}\n","import { Component, Element, Event, h, Listen, Prop, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { Placement } from '../../services/interfaces';\nimport { isEventTargetChildOfElement } from '../../shared/utils';\n\nlet id = 0;\n\n/**\n * The Dropdown Component is commonly used when presenting a list of selectable options that are too numerous to fit comfortably on the screen.\n * They provide an efficient way to save space and present a long list of options in a compact and organized manner.\n *\n * @example How to use it\n * ```html\n * <bq-dropdown placement=\"bottom-start\">\n * <bq-button slot=\"trigger\">Dropdown</bq-button>\n * <bq-option-list>\n * <bq-option value=\"users\">...</bq-option>\n * <bq-option value=\"user\">...</bq-option>\n * <bq-option value=\"dashboard\">...</bq-option>\n * <bq-option value=\"settings\">...</bq-option>\n * <bq-option value=\"logout\">...</bq-option>\n * </bq-option-list>\n * </bq-dropdown>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/47ff4b-dropdown\n * @status stable\n *\n * @dependency bq-panel\n *\n * @attr {boolean} disabled - If true, the dropdown panel will be visible and won't be shown.\n * @attr {number} distance - Represents the distance (gutter or margin) between the panel and the trigger element.\n * @attr {boolean} keep-open-on-select - If true, the panel will remain open after a selection is made.\n * @attr {\"top\" | \"bottom\" | \"left\" | \"right\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"right-start\" | \"right-end\"} placement - Position of the panel.\n * @attr {boolean} open - If true, the panel will be visible.\n * @attr {string} panel-height - When set, it will override the height of the dropdown panel.\n * @attr {boolean} same-width - Whether the panel should have the same width as the trigger element.\n * @attr {number} skidding - Represents the skidding between the panel and the trigger element.\n * @attr {\"fixed\" | \"absolute\"} strategy - Defines the strategy to position the panel.\n *\n * @event bqOpen - Callback handler to be called when the dropdown panel is opened or closed.\n *\n * @slot trigger - The trigger element that opens the dropdown panel.\n * @slot - The content of the dropdown panel.\n *\n * @part base - The component's internal wrapper.\n * @part dropdown - The `<bq-panel>` element used under the hood to display the dropdown panel.\n * @part panel - The `<div>` element used to display and style the panel inside the `<bq-panel>` element.\n * @part trigger - The `<div>` element that hosts the trigger element.\n *\n * @cssprop --bq-panel--background - Panel background color\n * @cssprop --bq-panel--border-color - Panel border color\n * @cssprop --bq-panel--border-radius - Panel border radius\n * @cssprop --bq-panel--border-style - Panel border style\n * @cssprop --bq-panel--border-width - Panel border width\n * @cssprop --bq-panel--box-shadow - Panel box shadow\n * @cssprop --bq-panel--padding - Panel padding\n * @cssprop --bq-panel--height - Panel height\n * @cssprop --bq-panel--width - Panel width\n * @cssprop --bq-panel-z-index - Panel z-index applied when opened\n */\n@Component({\n tag: 'bq-dropdown',\n styleUrl: './scss/bq-dropdown.scss',\n shadow: true,\n})\nexport class BqDropdown {\n // Own Properties\n // ====================\n\n private dropdownPanelId = `bq-dropdown-panel-${++id}`;\n private triggerElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqDropdownElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** If true, the dropdown panel will not lock the page body scroll when open. */\n @Prop({ reflect: true }) disableScrollLock?: boolean = false;\n\n /** If true, the dropdown panel will be visible and won't be shown. */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** Represents the distance (gutter or margin) between the panel and the trigger element. */\n @Prop({ reflect: true }) distance?: number = 4;\n\n /** If true, the panel will remain open after a selection is made. */\n @Prop({ reflect: true }) keepOpenOnSelect?: boolean = false;\n\n /** Position of the panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom-start';\n\n /** If true, the panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the dropdown panel */\n @Prop({ reflect: true }) panelHeight?: string;\n\n /** Whether the panel should have the same width as the trigger element */\n @Prop({ reflect: true }) sameWidth?: boolean = false;\n\n /** Represents the skidding between the panel and the trigger element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Defines the strategy to position the panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('open')\n onOpenChange() {\n this.bqOpen.emit({ open: this.open });\n }\n\n @Watch('disabled')\n handleDisabledChange() {\n if (!this.triggerElem) return;\n\n // set 'disabled' attribute based on 'this.disabled' value, ensuring consistent state handling\n if (!this.disabled) {\n this.triggerElem?.removeAttribute('disabled');\n return;\n }\n this.triggerElem?.setAttribute('disabled', 'true');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the dropdown panel is opened or closed. */\n @Event() bqOpen: EventEmitter<{ open: boolean }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.triggerElem = this.el.querySelector('[slot=\"trigger\"]');\n this.handleDisabledChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqSelect', { passive: true })\n onItemSelect() {\n if (this.keepOpenOnSelect) return;\n\n this.open = false;\n }\n\n /** Listens for the 'click' event on the document object\n * and closes the dropdown panel if the click is outside the component.\n */\n @Listen('click', { target: 'document', passive: true })\n onClickOutside(event: MouseEvent) {\n if (!this.open || isEventTargetChildOfElement(event, this.el)) return;\n\n // Close when clicking outside of the close element\n this.open = false;\n }\n\n @Listen('keyup', { target: 'window', passive: true })\n onEscape(event: KeyboardEvent) {\n if (!this.open) return;\n // Close the panel when pressing Escape or when pressing Tab and the component loses focus.\n if (event.key === 'Escape' || (event.key === 'Tab' && !isEventTargetChildOfElement(event, this.el))) {\n this.open = false;\n }\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 // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private togglePanel = (): void => {\n // Don't toggle the panel if the component is disabled or the trigger element is disabled\n if (this.disabled || this.triggerElem?.hasAttribute('disabled')) return;\n\n this.open = !this.open;\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.panelHeight && { '--bq-panel--height': this.panelHeight }),\n };\n\n return (\n <div class=\"bq-dropdown\" part=\"base\">\n {/* TRIGGER CONTAINER */}\n <div\n class=\"bq-dropdown__trigger block\"\n aria-controls={this.dropdownPanelId}\n aria-haspopup=\"true\"\n onClick={this.togglePanel}\n part=\"trigger\"\n >\n <slot name=\"trigger\" />\n </div>\n {/* PANEL */}\n <bq-panel\n style={style}\n id={this.dropdownPanelId}\n class=\"bq-dropdown__panel\"\n disableScrollLock={this.disableScrollLock}\n distance={this.distance}\n placement={this.placement}\n open={this.open}\n sameWidth={this.sameWidth}\n skidding={this.skidding}\n strategy={this.strategy}\n role=\"group\"\n part=\"dropdown\"\n exportparts=\"panel\"\n >\n <slot />\n </bq-panel>\n </div>\n );\n }\n}\n","/* -------------------------------------------------------------------------- */\n/* Panel styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-panel.variables';\n\n:host {\n @apply block;\n}\n\n.bq-panel {\n @include animation-fade-in;\n @apply fixed z-[--bq-panel-z-index] overflow-y-auto overflow-x-hidden is-[--bq-panel--width] max-bs-[--bq-panel--height];\n @apply rounded-[--bq-panel--border-radius] bg-[--bq-panel--background] shadow-[shadow:--bq-panel--box-shadow];\n @apply pe-[--bq-panel--padding-end] ps-[--bq-panel--padding-start] p-b-[--bq-panel--paddingY];\n @apply border-[length:--bq-panel--border-width] border-[color:--bq-panel--border-color];\n\n border-style: var(--bq-panel--border-style);\n}\n","import { ReferenceElement } from '@floating-ui/dom';\nimport { Component, Element, h, Prop, Watch } from '@stencil/core';\n\nimport type { Placement } from '../../services/interfaces';\nimport { FloatingUI } from '../../services/libraries';\nimport { isClient, lockBodyScroll, unlockBodyScroll } from '../../shared/utils';\n\n/**\n * The Panel component is a versatile and essential element used to wrap and display content in a floating panel.\n *\n * @example How to use it\n * ```html\n * <bq-panel open>\n * <div>Panel content</div>\n * </bq-panel>\n * ```\n *\n * @status stable\n *\n * @attr {number} distance - Represents the distance (gutter or margin) between the panel and the trigger element.\n * @attr {\"top\" | \"bottom\" | \"left\" | \"right\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"right-start\" | \"right-end\"} placement - Position of the panel.\n * @attr {boolean} open - If true, the panel will be visible.\n * @attr {boolean} same-width - Whether the panel should have the same width as the trigger element.\n * @attr {number} skidding - Represents the skidding between the panel and the trigger element.\n * @attr {\"fixed\" | \"absolute\"} strategy - Defines the strategy to position the panel.\n *\n * @slot - The content of the panel.\n *\n * @part panel - The `<div>` element used to display and style the panel\n *\n * @prop --bq-panel--background - Panel background color\n * @prop --bq-panel--border-color - Panel border color\n * @prop --bq-panel--border-radius - Panel border radius\n * @prop --bq-panel--border-style - Panel border style\n * @prop --bq-panel--border-width - Panel border width\n * @prop --bq-panel--box-shadow - Panel box shadow\n * @prop --bq-panel--padding - Panel padding\n * @prop --bq-panel--height - Panel height\n * @prop --bq-panel--width - Panel width\n * @prop --bq-panel-z-index - Panel z-index applied when opened\n */\n@Component({\n tag: 'bq-panel',\n styleUrl: './scss/bq-panel.scss',\n shadow: true,\n})\nexport class BqPanel {\n // Own Properties\n // ====================\n\n private panel: HTMLElement;\n private floatingUI: FloatingUI;\n private trigger: ReferenceElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqPanelElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** If true, the panel will not lock the page body scroll when open. */\n @Prop({ reflect: true }) disableScrollLock?: boolean = false;\n\n /** Represents the distance (gutter or margin) between the panel and the trigger element. */\n @Prop({ reflect: true }) distance?: number = 4;\n\n /** Position of the panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom-start';\n\n /** If true, the panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** Whether the panel should have the same width as the trigger element */\n @Prop({ reflect: true }) sameWidth?: boolean = false;\n\n /** Represents the skidding between the panel and the trigger element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Defines the strategy to position the panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('open')\n handleOpenChange() {\n if (!this.open) {\n this.hidePanel();\n return;\n }\n\n this.showPanel();\n }\n\n @Watch('distance')\n @Watch('placement')\n @Watch('sameWidth')\n @Watch('skidding')\n @Watch('strategy')\n onPropChange() {\n if (!isClient()) return;\n\n this.floatingUI?.init({ ...this.options });\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 if (!isClient()) return;\n\n // We need to find the trigger element from the parent to position the panel relative to it.\n const parentTrigger = this.el.parentElement.querySelector('div[part=\"trigger\"]');\n\n if (!parentTrigger) return;\n\n this.trigger = {\n getBoundingClientRect: () => parentTrigger.getBoundingClientRect(),\n contextElement: parentTrigger,\n };\n\n this.floatingUI = new FloatingUI(this.trigger, this.panel, { ...this.options });\n this.handleOpenChange();\n }\n\n disconnectedCallback() {\n if (!isClient()) return;\n\n this.floatingUI?.destroy();\n\n // Ensure scroll lock is removed if the component is disconnected while the panel is open.\n if (this.open && !this.disableScrollLock) {\n unlockBodyScroll();\n }\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 showPanel() {\n if (!isClient()) return;\n\n this.floatingUI?.update();\n\n // Lock the body scroll if the disableScrollLock prop is not true.\n if (!this.disableScrollLock) {\n lockBodyScroll();\n }\n }\n\n private async hidePanel() {\n this.open = false;\n\n // Unlock the body scroll if the disableScrollLock prop is not true.\n if (isClient() && !this.disableScrollLock) {\n unlockBodyScroll();\n }\n }\n\n private get options() {\n return {\n distance: this.distance,\n placement: this.placement,\n sameWidth: this.sameWidth,\n skidding: this.skidding,\n strategy: this.strategy,\n };\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n class=\"bq-panel\"\n ref={(el) => (this.panel = el)}\n aria-hidden={!this.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AE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB;;;;;IAOH,MAAM,GAAA;AACJ,QAAA,QACE,CACE,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,UAAU,EAChB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,EAAA,aAAA,EACjB,CAAC,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,OAAO,EAC1C,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,EAClB,IAAI,EAAC,OAAO,EAAA,EAEZ,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"bq-dropdown.bq-panel.entry.esm.js","sources":["../../packages/beeq/src/components/dropdown/scss/bq-dropdown.scss?tag=bq-dropdown&encapsulation=shadow","../../packages/beeq/src/components/dropdown/bq-dropdown.tsx","../../packages/beeq/src/components/panel/scss/bq-panel.scss?tag=bq-panel&encapsulation=shadow","../../packages/beeq/src/components/panel/bq-panel.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Dropdown styles */\n/* -------------------------------------------------------------------------- */\n\n:host {\n @apply relative inline-block;\n}\n","import { Component, Element, Event, h, Listen, Prop, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { Placement } from '../../services/interfaces';\nimport { isEventTargetChildOfElement } from '../../shared/utils';\n\nlet id = 0;\n\n/**\n * The Dropdown Component is commonly used when presenting a list of selectable options that are too numerous to fit comfortably on the screen.\n * They provide an efficient way to save space and present a long list of options in a compact and organized manner.\n *\n * @example How to use it\n * ```html\n * <bq-dropdown placement=\"bottom-start\">\n * <bq-button slot=\"trigger\">Dropdown</bq-button>\n * <bq-option-list>\n * <bq-option value=\"users\">...</bq-option>\n * <bq-option value=\"user\">...</bq-option>\n * <bq-option value=\"dashboard\">...</bq-option>\n * <bq-option value=\"settings\">...</bq-option>\n * <bq-option value=\"logout\">...</bq-option>\n * </bq-option-list>\n * </bq-dropdown>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/47ff4b-dropdown\n * @status stable\n *\n * @dependency bq-panel\n *\n * @attr {boolean} disabled - If true, the dropdown panel will be visible and won't be shown.\n * @attr {number} distance - Represents the distance (gutter or margin) between the panel and the trigger element.\n * @attr {boolean} keep-open-on-select - If true, the panel will remain open after a selection is made.\n * @attr {\"top\" | \"bottom\" | \"left\" | \"right\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"right-start\" | \"right-end\"} placement - Position of the panel.\n * @attr {boolean} open - If true, the panel will be visible.\n * @attr {string} panel-height - When set, it will override the height of the dropdown panel.\n * @attr {boolean} same-width - Whether the panel should have the same width as the trigger element.\n * @attr {number} skidding - Represents the skidding between the panel and the trigger element.\n * @attr {\"fixed\" | \"absolute\"} strategy - Defines the strategy to position the panel.\n *\n * @event bqOpen - Callback handler to be called when the dropdown panel is opened or closed.\n *\n * @slot trigger - The trigger element that opens the dropdown panel.\n * @slot - The content of the dropdown panel.\n *\n * @part base - The component's internal wrapper.\n * @part dropdown - The `<bq-panel>` element used under the hood to display the dropdown panel.\n * @part panel - The `<div>` element used to display and style the panel inside the `<bq-panel>` element.\n * @part trigger - The `<div>` element that hosts the trigger element.\n *\n * @cssprop --bq-panel--background - Panel background color\n * @cssprop --bq-panel--border-color - Panel border color\n * @cssprop --bq-panel--border-radius - Panel border radius\n * @cssprop --bq-panel--border-style - Panel border style\n * @cssprop --bq-panel--border-width - Panel border width\n * @cssprop --bq-panel--box-shadow - Panel box shadow\n * @cssprop --bq-panel--padding - Panel padding\n * @cssprop --bq-panel--height - Panel height\n * @cssprop --bq-panel--width - Panel width\n * @cssprop --bq-panel-z-index - Panel z-index applied when opened\n */\n@Component({\n tag: 'bq-dropdown',\n styleUrl: './scss/bq-dropdown.scss',\n shadow: true,\n})\nexport class BqDropdown {\n // Own Properties\n // ====================\n\n private dropdownPanelId = `bq-dropdown-panel-${++id}`;\n private triggerElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqDropdownElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** If true, the dropdown panel will not lock the page body scroll when open. */\n @Prop({ reflect: true }) disableScrollLock?: boolean = false;\n\n /** If true, the dropdown panel will be visible and won't be shown. */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** Represents the distance (gutter or margin) between the panel and the trigger element. */\n @Prop({ reflect: true }) distance?: number = 4;\n\n /** If true, the panel will remain open after a selection is made. */\n @Prop({ reflect: true }) keepOpenOnSelect?: boolean = false;\n\n /** Position of the panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom-start';\n\n /** If true, the panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the dropdown panel */\n @Prop({ reflect: true }) panelHeight?: string;\n\n /** Whether the panel should have the same width as the trigger element */\n @Prop({ reflect: true }) sameWidth?: boolean = false;\n\n /** Represents the skidding between the panel and the trigger element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Defines the strategy to position the panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('open')\n onOpenChange() {\n this.bqOpen.emit({ open: this.open });\n }\n\n @Watch('disabled')\n handleDisabledChange() {\n if (!this.triggerElem) return;\n\n // set 'disabled' attribute based on 'this.disabled' value, ensuring consistent state handling\n if (!this.disabled) {\n this.triggerElem?.removeAttribute('disabled');\n return;\n }\n this.triggerElem?.setAttribute('disabled', 'true');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the dropdown panel is opened or closed. */\n @Event() bqOpen: EventEmitter<{ open: boolean }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.triggerElem = this.el.querySelector('[slot=\"trigger\"]');\n this.handleDisabledChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqSelect', { passive: true })\n onItemSelect() {\n if (this.keepOpenOnSelect) return;\n\n this.open = false;\n }\n\n /** Listens for the 'click' event on the document object\n * and closes the dropdown panel if the click is outside the component.\n */\n @Listen('click', { target: 'document', passive: true })\n onClickOutside(event: MouseEvent) {\n if (!this.open || isEventTargetChildOfElement(event, this.el)) return;\n\n // Close when clicking outside of the close element\n this.open = false;\n }\n\n @Listen('keyup', { target: 'window', passive: true })\n onEscape(event: KeyboardEvent) {\n if (!this.open) return;\n // Close the panel when pressing Escape or when pressing Tab and the component loses focus.\n if (event.key === 'Escape' || (event.key === 'Tab' && !isEventTargetChildOfElement(event, this.el))) {\n this.open = false;\n }\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 // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private togglePanel = (): void => {\n // Don't toggle the panel if the component is disabled or the trigger element is disabled\n if (this.disabled || this.triggerElem?.hasAttribute('disabled')) return;\n\n this.open = !this.open;\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.panelHeight && { '--bq-panel--height': this.panelHeight }),\n };\n\n return (\n <div class=\"bq-dropdown\" part=\"base\">\n {/* TRIGGER CONTAINER */}\n <div\n class=\"bq-dropdown__trigger block\"\n aria-controls={this.dropdownPanelId}\n aria-haspopup=\"true\"\n onClick={this.togglePanel}\n part=\"trigger\"\n >\n <slot name=\"trigger\" />\n </div>\n {/* PANEL */}\n <bq-panel\n style={style}\n id={this.dropdownPanelId}\n class=\"bq-dropdown__panel\"\n disableScrollLock={this.disableScrollLock}\n distance={this.distance}\n placement={this.placement}\n open={this.open}\n sameWidth={this.sameWidth}\n skidding={this.skidding}\n strategy={this.strategy}\n role=\"group\"\n part=\"dropdown\"\n exportparts=\"panel\"\n >\n <slot />\n </bq-panel>\n </div>\n );\n }\n}\n","/* -------------------------------------------------------------------------- */\n/* Panel styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-panel.variables';\n\n:host {\n @apply block;\n}\n\n.bq-panel {\n @include animation-fade-in;\n @apply fixed z-[--bq-panel-z-index] overflow-y-auto overflow-x-hidden is-[--bq-panel--width] max-bs-[--bq-panel--height];\n @apply rounded-[--bq-panel--border-radius] bg-[--bq-panel--background] shadow-[shadow:--bq-panel--box-shadow];\n @apply pe-[--bq-panel--padding-end] ps-[--bq-panel--padding-start] p-b-[--bq-panel--paddingY];\n @apply border-[length:--bq-panel--border-width] border-[color:--bq-panel--border-color];\n\n border-style: var(--bq-panel--border-style);\n}\n","import { ReferenceElement } from '@floating-ui/dom';\nimport { Component, Element, h, Prop, Watch } from '@stencil/core';\n\nimport type { Placement } from '../../services/interfaces';\nimport { FloatingUI } from '../../services/libraries';\nimport { isClient, lockBodyScroll, unlockBodyScroll } from '../../shared/utils';\n\n/**\n * The Panel component is a versatile and essential element used to wrap and display content in a floating panel.\n *\n * @example How to use it\n * ```html\n * <bq-panel open>\n * <div>Panel content</div>\n * </bq-panel>\n * ```\n *\n * @status stable\n *\n * @attr {number} distance - Represents the distance (gutter or margin) between the panel and the trigger element.\n * @attr {\"top\" | \"bottom\" | \"left\" | \"right\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\" | \"right-start\" | \"right-end\"} placement - Position of the panel.\n * @attr {boolean} open - If true, the panel will be visible.\n * @attr {boolean} same-width - Whether the panel should have the same width as the trigger element.\n * @attr {number} skidding - Represents the skidding between the panel and the trigger element.\n * @attr {\"fixed\" | \"absolute\"} strategy - Defines the strategy to position the panel.\n *\n * @slot - The content of the panel.\n *\n * @part panel - The `<div>` element used to display and style the panel\n *\n * @prop --bq-panel--background - Panel background color\n * @prop --bq-panel--border-color - Panel border color\n * @prop --bq-panel--border-radius - Panel border radius\n * @prop --bq-panel--border-style - Panel border style\n * @prop --bq-panel--border-width - Panel border width\n * @prop --bq-panel--box-shadow - Panel box shadow\n * @prop --bq-panel--padding - Panel padding\n * @prop --bq-panel--height - Panel height\n * @prop --bq-panel--width - Panel width\n * @prop --bq-panel-z-index - Panel z-index applied when opened\n */\n@Component({\n tag: 'bq-panel',\n styleUrl: './scss/bq-panel.scss',\n shadow: true,\n})\nexport class BqPanel {\n // Own Properties\n // ====================\n\n private panel: HTMLElement;\n private floatingUI: FloatingUI;\n private trigger: ReferenceElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqPanelElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** If true, the panel will not lock the page body scroll when open. */\n @Prop({ reflect: true }) disableScrollLock?: boolean = false;\n\n /** Represents the distance (gutter or margin) between the panel and the trigger element. */\n @Prop({ reflect: true }) distance?: number = 4;\n\n /** Position of the panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom-start';\n\n /** If true, the panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** Whether the panel should have the same width as the trigger element */\n @Prop({ reflect: true }) sameWidth?: boolean = false;\n\n /** Represents the skidding between the panel and the trigger element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Defines the strategy to position the panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('open')\n handleOpenChange() {\n if (!this.open) {\n this.hidePanel();\n return;\n }\n\n this.showPanel();\n }\n\n @Watch('distance')\n @Watch('placement')\n @Watch('sameWidth')\n @Watch('skidding')\n @Watch('strategy')\n onPropChange() {\n if (!isClient()) return;\n\n this.floatingUI?.init({ ...this.options });\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 if (!isClient()) return;\n\n // We need to find the trigger element from the parent to position the panel relative to it.\n const parentTrigger = this.el.parentElement.querySelector('div[part=\"trigger\"]');\n\n if (!parentTrigger) return;\n\n this.trigger = {\n getBoundingClientRect: () => parentTrigger.getBoundingClientRect(),\n contextElement: parentTrigger,\n };\n\n this.floatingUI = new FloatingUI(this.trigger, this.panel, { ...this.options });\n this.handleOpenChange();\n }\n\n disconnectedCallback() {\n if (!isClient()) return;\n\n this.floatingUI?.destroy();\n\n // Ensure scroll lock is removed if the component is disconnected while the panel is open.\n if (this.open && !this.disableScrollLock) {\n unlockBodyScroll();\n }\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 showPanel() {\n if (!isClient()) return;\n\n this.floatingUI?.update();\n\n // Lock the body scroll if the disableScrollLock prop is not true.\n if (!this.disableScrollLock) {\n lockBodyScroll();\n }\n }\n\n private async hidePanel() {\n this.open = false;\n\n // Unlock the body scroll if the disableScrollLock prop is not true.\n if (isClient() && !this.disableScrollLock) {\n unlockBodyScroll();\n }\n }\n\n private get options() {\n return {\n distance: this.distance,\n placement: this.placement,\n sameWidth: this.sameWidth,\n skidding: this.skidding,\n strategy: this.strategy,\n };\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n class=\"bq-panel\"\n ref={(el) => (this.panel = el)}\n aria-hid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EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB;;;;;IAOH,MAAM,GAAA;AACJ,QAAA,QACE,CACE,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,UAAU,EAChB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,EAAA,aAAA,EACjB,CAAC,IAAI,CAAC,IAAI,GAAG,MAAM,GAAG,OAAO,EAC1C,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,EAClB,IAAI,EAAC,OAAO,EAAA,EAEZ,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACJ;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-empty-state.entry.esm.js","sources":["../../packages/beeq/src/components/empty-state/bq-empty-state.types.ts","../../packages/beeq/src/components/empty-state/scss/bq-empty-state.scss?tag=bq-empty-state&encapsulation=shadow","../../packages/beeq/src/components/empty-state/bq-empty-state.tsx"],"sourcesContent":["export const EMPTY_STATE_SIZE = ['small', 'medium', 'large'] as const;\nexport type TEmptyStateSize = (typeof EMPTY_STATE_SIZE)[number];\n\nexport const SIZE_TO_VALUE_MAP: Record<TEmptyStateSize, number> = {\n small: 40,\n medium: 80,\n large: 180,\n};\n","/* -------------------------------------------------------------------------- */\n/* Empty state styles */\n/* -------------------------------------------------------------------------- */\n\n:host {\n @apply relative inline-block;\n}\n","import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\n\nimport { EMPTY_STATE_SIZE, SIZE_TO_VALUE_MAP } from './bq-empty-state.types';\nimport type { TEmptyStateSize } from './bq-empty-state.types';\nimport { hasSlotContent, validatePropValue } from '../../shared/utils';\n\n/**\n * An Empty State is a UI component displayed when there is no data or content available, often used in dynamic or inactive application states.\n *\n * @example How to use it\n * ```html\n * <bq-empty-state size=\"medium\">Title</bq-empty-state>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/673ae0-empty-state/b/09d7b1\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"large\" | \"medium\" | \"small\"} size - The size of the empty state component\n *\n * @slot thumbnail - The element that wraps the thumbnail element\n * @slot body - The content to be displayed after the thumbnail section\n * @slot footer - The content to be displayed after the body section as footer\n *\n * @part body - The container `<div>` that wraps the alert description content\n * @part footer - The container `<div>` that wraps the alert footer content\n * @part icon - The `<bq-icon>` element used to render a predefined icon size based on the empty state size (small, medium, large)\n * @part thumbnail - The container `<div>` that wraps the thumbnail element\n * @part title - The container `<div>` that wraps the empty state title content\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n */\n\n@Component({\n tag: 'bq-empty-state',\n styleUrl: './scss/bq-empty-state.scss',\n shadow: true,\n})\nexport class BqEmptyState {\n // Own Properties\n // ====================\n\n private bodyElem: HTMLDivElement;\n private footerElem: HTMLDivElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqEmptyStateElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasBody = false;\n @State() private hasFooter = false;\n\n // Public Property API\n // ========================\n\n /** The size of the empty state component */\n @Prop({ reflect: true, mutable: true }) size: TEmptyStateSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n checkPropValues() {\n validatePropValue(EMPTY_STATE_SIZE, 'medium', this.el, 'size');\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 }\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.hasBody = hasSlotContent(this.bodyElem, 'body');\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private get iconSize(): number {\n return SIZE_TO_VALUE_MAP[this.size] || SIZE_TO_VALUE_MAP.medium;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"inline-flex flex-col items-center\" part=\"wrapper\">\n <div\n class={{\n 'm-be-m': this.size === 'small',\n 'm-be-xl': this.size === 'medium',\n 'm-be-xxl': this.size === 'large',\n }}\n part=\"thumbnail\"\n >\n <slot name=\"thumbnail\">\n <bq-icon size={this.iconSize} name=\"database\" part=\"icon\" exportparts=\"base,svg\" />\n </slot>\n </div>\n <div\n class={{\n 'font-bold leading-regular text-primary': true,\n 'text-m': this.size === 'small',\n 'text-l': this.size === 'medium',\n 'text-xxl2': this.size === 'large',\n 'm-be-xs': this.size === 'small' && this.hasBody,\n 'm-be-m': this.size === 'medium' && this.hasBody,\n 'm-be-l': this.size === 'large' && this.hasBody,\n }}\n part=\"title\"\n >\n <slot />\n </div>\n <div\n class={{\n 'font-normal leading-regular': true,\n 'text-s': this.size === 'small',\n 'text-m': this.size === 'medium',\n 'text-l': this.size === 'large',\n 'm-be-m': this.size === 'small' && this.hasFooter,\n 'm-be-l': this.size === 'medium' && this.hasFooter,\n 'm-be-xl': this.size === 'large' && this.hasFooter,\n }}\n ref={(div) => (this.bodyElem = div)}\n part=\"body\"\n >\n <slot name=\"body\" onSlotchange={this.handleSlotChange} />\n </div>\n <div class=\"flex items-start gap-xs\" ref={(div) => (this.footerElem = div)} part=\"footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAO,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;AAG9D,MAAM,iBAAiB,GAAoC;AAChE,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,KAAK,EAAE,GAAG;CACX;;ACPD,MAAM,eAAe,GAAG
|
|
1
|
+
{"version":3,"file":"bq-empty-state.entry.esm.js","sources":["../../packages/beeq/src/components/empty-state/bq-empty-state.types.ts","../../packages/beeq/src/components/empty-state/scss/bq-empty-state.scss?tag=bq-empty-state&encapsulation=shadow","../../packages/beeq/src/components/empty-state/bq-empty-state.tsx"],"sourcesContent":["export const EMPTY_STATE_SIZE = ['small', 'medium', 'large'] as const;\nexport type TEmptyStateSize = (typeof EMPTY_STATE_SIZE)[number];\n\nexport const SIZE_TO_VALUE_MAP: Record<TEmptyStateSize, number> = {\n small: 40,\n medium: 80,\n large: 180,\n};\n","/* -------------------------------------------------------------------------- */\n/* Empty state styles */\n/* -------------------------------------------------------------------------- */\n\n:host {\n @apply relative inline-block;\n}\n","import { Component, Element, h, Prop, State, Watch } from '@stencil/core';\n\nimport { EMPTY_STATE_SIZE, SIZE_TO_VALUE_MAP } from './bq-empty-state.types';\nimport type { TEmptyStateSize } from './bq-empty-state.types';\nimport { hasSlotContent, validatePropValue } from '../../shared/utils';\n\n/**\n * An Empty State is a UI component displayed when there is no data or content available, often used in dynamic or inactive application states.\n *\n * @example How to use it\n * ```html\n * <bq-empty-state size=\"medium\">Title</bq-empty-state>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/673ae0-empty-state/b/09d7b1\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"large\" | \"medium\" | \"small\"} size - The size of the empty state component\n *\n * @slot thumbnail - The element that wraps the thumbnail element\n * @slot body - The content to be displayed after the thumbnail section\n * @slot footer - The content to be displayed after the body section as footer\n *\n * @part body - The container `<div>` that wraps the alert description content\n * @part footer - The container `<div>` that wraps the alert footer content\n * @part icon - The `<bq-icon>` element used to render a predefined icon size based on the empty state size (small, medium, large)\n * @part thumbnail - The container `<div>` that wraps the thumbnail element\n * @part title - The container `<div>` that wraps the empty state title content\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n */\n\n@Component({\n tag: 'bq-empty-state',\n styleUrl: './scss/bq-empty-state.scss',\n shadow: true,\n})\nexport class BqEmptyState {\n // Own Properties\n // ====================\n\n private bodyElem: HTMLDivElement;\n private footerElem: HTMLDivElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqEmptyStateElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasBody = false;\n @State() private hasFooter = false;\n\n // Public Property API\n // ========================\n\n /** The size of the empty state component */\n @Prop({ reflect: true, mutable: true }) size: TEmptyStateSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n checkPropValues() {\n validatePropValue(EMPTY_STATE_SIZE, 'medium', this.el, 'size');\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 }\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.hasBody = hasSlotContent(this.bodyElem, 'body');\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private get iconSize(): number {\n return SIZE_TO_VALUE_MAP[this.size] || SIZE_TO_VALUE_MAP.medium;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"inline-flex flex-col items-center\" part=\"wrapper\">\n <div\n class={{\n 'm-be-m': this.size === 'small',\n 'm-be-xl': this.size === 'medium',\n 'm-be-xxl': this.size === 'large',\n }}\n part=\"thumbnail\"\n >\n <slot name=\"thumbnail\">\n <bq-icon size={this.iconSize} name=\"database\" part=\"icon\" exportparts=\"base,svg\" />\n </slot>\n </div>\n <div\n class={{\n 'font-bold leading-regular text-primary': true,\n 'text-m': this.size === 'small',\n 'text-l': this.size === 'medium',\n 'text-xxl2': this.size === 'large',\n 'm-be-xs': this.size === 'small' && this.hasBody,\n 'm-be-m': this.size === 'medium' && this.hasBody,\n 'm-be-l': this.size === 'large' && this.hasBody,\n }}\n part=\"title\"\n >\n <slot />\n </div>\n <div\n class={{\n 'font-normal leading-regular': true,\n 'text-s': this.size === 'small',\n 'text-m': this.size === 'medium',\n 'text-l': this.size === 'large',\n 'm-be-m': this.size === 'small' && this.hasFooter,\n 'm-be-l': this.size === 'medium' && this.hasFooter,\n 'm-be-xl': this.size === 'large' && this.hasFooter,\n }}\n ref={(div) => (this.bodyElem = div)}\n part=\"body\"\n >\n <slot name=\"body\" onSlotchange={this.handleSlotChange} />\n </div>\n <div class=\"flex items-start gap-xs\" ref={(div) => (this.footerElem = div)} part=\"footer\">\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAO,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU;AAG9D,MAAM,iBAAiB,GAAoC;AAChE,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,KAAK,EAAE,GAAG;CACX;;ACPD,MAAM,eAAe,GAAG,0hnBAA0hnB;;MCsCrinB,YAAY,GAAA,MAAA;;;;;;AAIf,IAAA,QAAQ;AACR,IAAA,UAAU;;;;;IAWD,OAAO,GAAG,KAAK;IACf,SAAS,GAAG,KAAK;;;;IAMM,IAAI,GAAoB,QAAQ;;;IAMxE,eAAe,GAAA;QACb,iBAAiB,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC;;;;;;;;IAWhE,iBAAiB,GAAA;QACf,IAAI,CAAC,eAAe,EAAE;;IAGxB,gBAAgB,GAAA;QACd,IAAI,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AG,MAAM,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,EAAE,IAAI,EAAC,QAAQ,EAAA,EACvF,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAA,CAAI,CACvD,CACF;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-input.entry.esm.js","sources":["../../packages/beeq/src/components/input/scss/bq-input.scss?tag=bq-input&encapsulation=shadow","../../packages/beeq/src/components/input/bq-input.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Input styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-input.variables';\n\n:host {\n @apply block is-full;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Label and Helper text */\n/* -------------------------------------------------------------------------- */\n\n.bq-input--label {\n @apply flex flex-grow items-center m-be-[--bq-input--label-margin-bottom];\n @apply text-[length:--bq-input--label-text-size] text-[color:--bq-input--label-text-color];\n}\n\n.bq-input--helper-text {\n @apply text-[length:--bq-input--helper-text-size] text-[color:--bq-input--helper-text-color] m-bs-[--bq-input--helper-margin-top];\n}\n\n.bq-input--helper-text.validation-error {\n @apply text-danger;\n}\n\n.bq-input--helper-text.validation-success {\n @apply text-success;\n}\n\n.bq-input--helper-text.validation-warning {\n @apply text-warning;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Input group control */\n/* -------------------------------------------------------------------------- */\n\n.bq-input--control {\n @apply flex items-center transition-[border-color,box-shadow] is-full;\n // Border\n @apply rounded-[--bq-input--border-radius] border-[length:--bq-input--border-width] border-[color:--bq-input--border-color];\n // Padding\n @apply pe-[--bq-input--padding-end] ps-[--bq-input--padding-start] p-b-[--bq-input--paddingY];\n // Text\n @apply text-[length:--bq-input--text-size] text-[color:--bq-input--text-color] placeholder:text-[color:--bq-input--text-placeholder-color];\n // Hover\n @apply [&:not(.disabled):not(:focus-within)]:hover:border-hover-brand;\n\n border-style: var(--bq-input--border-style);\n\n // Focus\n &:not(.disabled):focus-within {\n --bq-ring-width: 1px;\n --bq-ring-offset-width: 0;\n --bq-ring-color-focus: var(--bq-input--border-color-focus);\n\n @apply focus border-[color:--bq-input--border-color-focus];\n }\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-input--control__clear {\n @apply inline-block;\n }\n }\n}\n\n.bq-input--control.disabled {\n @apply cursor-not-allowed opacity-60;\n}\n\n/* ------------------------------- Validation ------------------------------- */\n\n.bq-input--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-input--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-input--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-input--control__input {\n @apply flex-auto cursor-inherit appearance-none bg-inherit font-inherit text-[length:inherit] text-inherit;\n @apply border-none min-bs-[--bq-input--icon-size] min-is-0 p-b-0 p-i-0 m-b-0 m-i-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-input--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 bs-auto p-b-0 p-i-0;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Prefix and suffix */\n/* -------------------------------------------------------------------------- */\n\n.bq-input--control__prefix,\n.bq-input--control__suffix {\n @apply pointer-events-none flex items-center text-[color:--bq-input--text-color];\n}\n\n.bq-input--control__prefix {\n @apply me-[--bq-input--gap];\n}\n\n.bq-input--control__suffix {\n @apply ms-[--bq-input--gap];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Slotted and internal icons */\n/* -------------------------------------------------------------------------- */\n\nbq-icon,\n::slotted(bq-icon) {\n --bq-icon--size: var(--bq-input--icon-size) !important;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Hide webkit clear button */\n/* -------------------------------------------------------------------------- */\n\n/* Remove clear controls from search input */\n\n.bq-input--control__input::-moz-search-cancel {\n @apply hidden appearance-none;\n}\n\n.bq-input--control__input::-webkit-search-decoration,\n.bq-input--control__input::-webkit-search-cancel-button,\n.bq-input--control__input::-webkit-search-results-button,\n.bq-input--control__input::-webkit-search-results-decoration {\n @apply hidden appearance-none;\n}\n\n/* Remove native control extra padding from input date and datetime */\n\n.bq-input--control__input::-webkit-datetime-edit-fields-wrapper,\n.bq-input--control__input::-webkit-datetime-edit,\n.bq-input--control__input::-webkit-datetime-edit-year-field,\n.bq-input--control__input::-webkit-datetime-edit-month-field,\n.bq-input--control__input::-webkit-datetime-edit-day-field,\n.bq-input--control__input::-webkit-datetime-edit-hour-field,\n.bq-input--control__input::-webkit-datetime-edit-minute-field,\n.bq-input--control__input::-webkit-datetime-edit-second-field,\n.bq-input--control__input::-webkit-datetime-edit-millisecond-field,\n.bq-input--control__input::-webkit-datetime-edit-meridiem-field {\n @apply p-b-0 p-i-0;\n}\n","import { AttachInternals, Component, Element, Event, h, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { TInputType, TInputValidation, TInputValue } from './bq-input.types';\nimport { debounce, hasSlotContent, isDefined, isHTMLElement, isNil, TDebounce } from '../../shared/utils';\n\n/**\n * The Input component is a fundamental user interface element that allows users to input data by typing it into a text field.\n * It is commonly used in web and mobile applications for various purposes, such as collecting user information, search inputs, and login forms.\n *\n * @example How to use it\n * ```html\n * <bq-input name=\"username\" label=\"Username\" placeholder=\"Enter your username\"></bq-input>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/980362-input\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {string} autocapitalize - Controls whether or not the input field should be capitalized and how.\n * @attr {string} autocomplete - Specifies whether or not the input field should have autocomplete enabled.\n * @attr {string} autocorrect - Controls whether or not the input field should have autocorrect enabled.\n * @attr {boolean} autofocus - If true, the 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} disabled - Indicates whether the input is disabled or not.\n * @attr {boolean} disable-clear - If true, the clear button won't be displayed.\n * @attr {string} form - The ID of the form that the input field belongs to.\n * @attr {string} form-validation-message - The native form validation message (mandatory if `required` is set).\n * @attr {string} inputmode - The inputmode attribute specifies what kind of input mechanism would be most helpful for users entering content into the input field.\n * @attr {number | string} max - The maximum value that the input field can accept.\n * @attr {number} maxlength - The maximum number of characters that the input field can accept.\n * @attr {number | string} min - The minimum value that the input field can accept.\n * @attr {number} minlength - The minimum number of characters that the input field can accept.\n * @attr {string} name - The input field name.\n * @attr {string} pattern - Specifies a regular expression the form control's value should match.\n * @attr {string} placeholder - The input placeholder text value.\n * @attr {boolean} readonly - If true, the input field cannot be modified.\n * @attr {boolean} required - Indicates whether or not the input field is required to be filled out before submitting the form.\n * @attr {number | 'any'} step - A number that specifies the granularity that the value must adhere to.\n * @attr {string} type - The type attribute specifies the type of input field to display.\n * @attr {'none' | 'error' | 'warning' | 'success'} validation-status - The validation status of the input.\n * @attr {string | number | string[]} value - The input value, it can be used to reset the input to a previous value.\n *\n * @event bqBlur - Callback handler emitted when the input loses focus.\n * @event bqChange - Callback handler emitted when the input value has changed and the input loses focus.\n * @event bqClear - Callback handler emitted when the input value has been cleared.\n * @event bqFocus - Callback handler emitted when the input has received focus.\n * @event bqInput - Callback handler emitted when the input value changes.\n *\n * @slot label - The label slot container.\n * @slot prefix - The prefix slot container.\n * @slot suffix - The suffix slot container.\n * @slot helper-text - The helper text slot container.\n * @slot clear-icon - The clear icon 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 helper-text - The helper text slot container.\n * @part label - The label slot container.\n * @part input - The native HTML input element used under the hood.\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n *\n * @cssprop --bq-input--background-color - Input background color\n * @cssprop --bq-input--border-color - Input border color\n * @cssprop --bq-input--border-color-focus - Input border color on focus\n * @cssprop --bq-input--border-radius - Input border radius\n * @cssprop --bq-input--border-width - Input border width\n * @cssprop --bq-input--border-style - Input border style\n * @cssprop --bq-input--gap - Gap between input content and prefix/suffix\n * @cssprop --bq-input--helper-margin-top - Helper text margin top\n * @cssprop --bq-input--helper-text-color - Helper text color\n * @cssprop --bq-input--helper-text-size - Helper text size\n * @cssprop --bq-input--icon-size - Icon size to use in prefix/suffix and clear button\n * @cssprop --bq-input--label-margin-bottom - Input label margin bottom\n * @cssprop --bq-input--label-text-color - Input label text color\n * @cssprop --bq-input--label-text-size - Input label text size\n * @cssprop --bq-input--padding-start - Input padding start\n * @cssprop --bq-input--padding-end - Input padding end\n * @cssprop --bq-input--paddingY - Input padding top and bottom\n * @cssprop --bq-input--text-color - Input text color\n * @cssprop --bq-input--text-size - Input text size\n * @cssprop --bq-input--text-placeholder-color - Input placeholder text color\n */\n@Component({\n tag: 'bq-input',\n styleUrl: './scss/bq-input.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqInput {\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 debounceBqInput: TDebounce<void>;\n private fallbackInputId = 'input';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqInputElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasHelperText = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /**\n * Controls whether or not the input field should be capitalized and how.\n * Possible values are 'off', 'none', 'on', 'sentences', 'words', and 'characters'.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize\n */\n @Prop({ reflect: true }) autocapitalize: string = 'off';\n\n /**\n * Specifies whether or not the input field should have autocomplete enabled.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n */\n @Prop({ reflect: true }) autocomplete: string = 'off';\n\n /**\n * Controls whether or not the input field should have autocorrect enabled.\n * Possible values are 'on' and 'off'.\n */\n @Prop({ reflect: true }) autocorrect: 'on' | 'off' = 'off';\n\n /** If true, the 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 /**\n * Indicates whether the input is disabled or not.\n * If `true`, the input 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 /** The ID of the form that the input field belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** The native form validation message (mandatory if `required` is set) */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /**\n * The inputmode attribute specifies what kind of input mechanism would be most helpful for users entering content into the input field.\n * This allows a browser to display an appropriate virtual keyboard while editing.\n * Possible values are 'none', 'text', 'decimal', 'numeric', 'tel', 'search', 'email', 'url', and 'date'.\n */\n @Prop() inputmode?: string;\n\n /**\n * The maximum value that the input field can accept.\n * Only applies to date and number input types.\n */\n @Prop({ reflect: true }) max?: number | string;\n\n /** The maximum number of characters that the input field can accept. */\n @Prop({ reflect: true }) maxlength: number;\n\n /**\n * The minimum value that the input field can accept.\n * Only applies to date and number input types.\n */\n @Prop({ reflect: true }) min?: number | string;\n\n /** The minimum number of characters that the input field can accept. */\n @Prop({ reflect: true }) minlength: number;\n\n /** The input field name. */\n @Prop({ reflect: true }) name!: string;\n\n /**\n * Specifies a regular expression the form control's value should match.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern\n */\n @Prop({ reflect: true }) pattern?: string;\n\n /** The input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** If true, the input field cannot be modified. */\n @Prop({ reflect: true }) readonly?: boolean;\n\n /** Indicates whether or not the input field is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /**\n * A number that specifies the granularity that the value must adhere to.\n * Valid for date, month, week, time, datetime-local, number, and range.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step\n */\n @Prop({ reflect: true }) step: number | 'any';\n\n /**\n * The type attribute specifies the type of input field to display.\n * Possible values are 'text', 'password', 'email', 'number', 'tel', 'search', 'url', and more.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n */\n @Prop({ reflect: true }) type: TInputType = 'text';\n\n /**\n * The validation status of the input.\n *\n * @remarks\n * This property is used to indicate the validation status of the 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 input value, it can be used to reset the input to a previous value */\n @Prop({ reflect: true, mutable: true }) value: TInputValue;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n const { internals, value } = this;\n if (Array.isArray(value)) {\n this.hasValue = value.some((val) => val.length > 0);\n this.internals.setFormValue(value.join(','));\n return;\n }\n\n this.hasValue = isDefined(value);\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqInputElement>;\n\n /**\n * Callback handler emitted when the input value has changed and the input loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.\n */\n @Event() bqChange!: EventEmitter<{ value: string | number | string[]; el: HTMLBqInputElement }>;\n\n /** Callback handler emitted when the input value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqInputElement>;\n\n /** Callback handler emitted when the input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqInputElement>;\n\n /**\n * Callback handler emitted when the input value changes.\n * This handler is called whenever the user types or pastes text into the input field.\n */\n @Event() bqInput!: EventEmitter<{ value: string | number | string[]; el: HTMLBqInputElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.handleValueChange();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n formAssociatedCallback() {\n this.setFormValue(this.value?.toString());\n this.updateFormValidity();\n }\n\n formResetCallback() {\n if (isNil(this.value)) return;\n\n this.handleClear();\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 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 handleInput = (ev: Event) => {\n if (this.disabled) return;\n\n this.debounceBqInput?.cancel();\n\n if (!isHTMLElement(ev.target, 'input')) return;\n this.value = this.type === 'number' ? Number(ev.target.value) : ev.target.value;\n\n this.debounceBqInput = debounce(() => {\n this.bqInput.emit({ value: this.value, el: this.el });\n }, this.debounceTime);\n this.debounceBqInput();\n };\n\n private handleChange = (ev: Event) => {\n if (this.disabled) return;\n\n if (!isHTMLElement(ev.target, 'input')) return;\n this.value = this.type === 'number' ? Number(ev.target.value) : ev.target.value;\n // Update form value and validity\n this.setFormValue(`${this.value}`);\n this.updateFormValidity();\n\n this.bqChange.emit({ value: this.value, el: this.el });\n };\n\n private handleClear = () => {\n if (this.disabled) return;\n\n const { inputElem, setFormValue, updateFormValidity } = this;\n // Clear input element value\n inputElem.value = '';\n this.value = inputElem.value;\n // Set form value to empty string abd update validity\n setFormValue(this.value);\n updateFormValidity();\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n ev.stopPropagation();\n this.handleClear();\n\n const { bqClear, bqChange, bqInput, el, inputElem } = this;\n // Emit events\n bqClear.emit(el);\n bqInput.emit({ value: this.value, el });\n bqChange.emit({ value: this.value, el });\n // Refocus input element\n inputElem.focus();\n };\n\n private setFormValue = (value?: string) => {\n this.internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n };\n\n private updateFormValidity = () => {\n const { formValidationMessage, internals, required, value, inputElem } = this;\n\n // Clear the validity state\n internals?.states.clear();\n\n if (required && (!value || value.toString().trim() === '')) {\n // Set validity state to invalid\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, inputElem);\n return;\n }\n\n // Set validity state to valid if textarea has value or is not required\n internals?.states.add('valid');\n internals?.setValidity({});\n };\n\n private 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 // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bq-input\" part=\"base\">\n {/* Label */}\n <label\n class={{ 'bq-input--label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n {/* Input control group */}\n <div\n class={{\n 'bq-input--control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-input--control__prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-input--control__input\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n disabled={this.disabled}\n form={this.form}\n inputMode={this.inputmode}\n max={this.max}\n maxLength={this.maxlength}\n min={this.min}\n minLength={this.minlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n ref={(inputElem) => (this.inputElem = inputElem)}\n readOnly={this.readonly}\n required={this.required}\n step={this.step}\n type={this.type}\n value={this.value}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onFocus={this.handleFocus}\n onInput={this.handleInput}\n />\n {/* Clear Button */}\n {this.hasValue && !this.disabled && !this.disableClear && (\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-input--control__clear ms-[--bq-input--gap] hidden\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\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-input--control__suffix': true, '!hidden': !this.hasSuffix }}\n ref={(spanElem) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n {/* Helper text */}\n <div\n class={{\n [`bq-input--helper-text validation-${this.validationStatus}`]: true,\n '!hidden': !this.hasHelperText,\n }}\n ref={(divElem) => (this.helperTextElem = divElem)}\n part=\"helper-text\"\n >\n <slot name=\"helper-text\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA,MAAM,UAAU,GAAG,2t5BAA2t5B;;MCiGju5B,OAAO,GAAA,MAAA;;;;;;;;;;;;;;;;;;AAIV,IAAA,cAAc;AACd,IAAA,SAAS;AACT,IAAA,SAAS;AACT,IAAA,UAAU;AACV,IAAA,UAAU;AAEV,IAAA,eAAe;IACf,eAAe,GAAG,OAAO;;AAMd,IAAA,SAAS;;;;IAMnB,aAAa,GAAG,KAAK;IACrB,QAAQ,GAAG,KAAK;IAChB,SAAS,GAAG,KAAK;IACjB,SAAS,GAAG,KAAK;IACjB,QAAQ,GAAG,KAAK;;;AAKzB;;;;AAIG;IACsB,cAAc,GAAW,KAAK;AAEvD;;;AAGG;IACsB,YAAY,GAAW,KAAK;AAErD;;;AAGG;IACsB,WAAW,GAAiB,KAAK;;AAGjC,IAAA,SAAS;;IAGT,gBAAgB,GAAI,aAAa;AAE1D;;;AAGG;IACqC,YAAY,GAAI,CAAC;AAEzD;;;AAGG;IACsB,QAAQ,GAAa,KAAK;;IAG1B,YAAY,GAAI,KAAK;;AAGrB,IAAA,IAAI;;AAGJ,IAAA,qBAAqB;AAE9C;;;;AAIG;AACK,IAAA,SAAS;AAEjB;;;AAGG;AACsB,IAAA,GAAG;;AAGH,IAAA,SAAS;AAElC;;;AAGG;AACsB,IAAA,GAAG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,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,YAAY,EAAA,EACrB,CAAS,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,UAAU,EAAC,KAAK,EAAC,MAAM,EAAA,CAAG,CACnC,CACG,CACb,EAED,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,EAAE,2BAA2B,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EACxE,GAAG,EAAE,CAAC,QAAQ,MAAM,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,EAC/C,IAAI,EAAC,QAAQ,EAAA,EAEb,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAI,CAAA,CACtD,CACH,EAEN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,CAAC,oCAAoC,IAAI,CAAC,gBAAgB,CAAE,CAAA,GAAG,IAAI;AACnE,gBAAA,SAAS,EAAE,CAAC,IAAI,CAAC,aAAa;AAC/B,aAAA,EACD,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,EACjD,IAAI,EAAC,aAAa,EAAA,EAElB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,aAAa,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAA,CAAI,CAC5D,CACF;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"bq-input.entry.esm.js","sources":["../../packages/beeq/src/components/input/scss/bq-input.scss?tag=bq-input&encapsulation=shadow","../../packages/beeq/src/components/input/bq-input.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Input styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-input.variables';\n\n:host {\n @apply block is-full;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Label and Helper text */\n/* -------------------------------------------------------------------------- */\n\n.bq-input--label {\n @apply flex flex-grow items-center m-be-[--bq-input--label-margin-bottom];\n @apply text-[length:--bq-input--label-text-size] text-[color:--bq-input--label-text-color];\n}\n\n.bq-input--helper-text {\n @apply text-[length:--bq-input--helper-text-size] text-[color:--bq-input--helper-text-color] m-bs-[--bq-input--helper-margin-top];\n}\n\n.bq-input--helper-text.validation-error {\n @apply text-danger;\n}\n\n.bq-input--helper-text.validation-success {\n @apply text-success;\n}\n\n.bq-input--helper-text.validation-warning {\n @apply text-warning;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Input group control */\n/* -------------------------------------------------------------------------- */\n\n.bq-input--control {\n @apply flex items-center transition-[border-color,box-shadow] is-full;\n // Border\n @apply rounded-[--bq-input--border-radius] border-[length:--bq-input--border-width] border-[color:--bq-input--border-color];\n // Padding\n @apply pe-[--bq-input--padding-end] ps-[--bq-input--padding-start] p-b-[--bq-input--paddingY];\n // Text\n @apply text-[length:--bq-input--text-size] text-[color:--bq-input--text-color] placeholder:text-[color:--bq-input--text-placeholder-color];\n // Hover\n @apply [&:not(.disabled):not(:focus-within)]:hover:border-hover-brand;\n\n border-style: var(--bq-input--border-style);\n\n // Focus\n &:not(.disabled):focus-within {\n --bq-ring-width: 1px;\n --bq-ring-offset-width: 0;\n --bq-ring-color-focus: var(--bq-input--border-color-focus);\n\n @apply focus border-[color:--bq-input--border-color-focus];\n }\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-input--control__clear {\n @apply inline-block;\n }\n }\n}\n\n.bq-input--control.disabled {\n @apply cursor-not-allowed opacity-60;\n}\n\n/* ------------------------------- Validation ------------------------------- */\n\n.bq-input--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-input--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-input--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-input--control__input {\n @apply flex-auto cursor-inherit appearance-none bg-inherit font-inherit text-[length:inherit] text-inherit;\n @apply border-none min-bs-[--bq-input--icon-size] min-is-0 p-b-0 p-i-0 m-b-0 m-i-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-input--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 bs-auto p-b-0 p-i-0;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Prefix and suffix */\n/* -------------------------------------------------------------------------- */\n\n.bq-input--control__prefix,\n.bq-input--control__suffix {\n @apply pointer-events-none flex items-center text-[color:--bq-input--text-color];\n}\n\n.bq-input--control__prefix {\n @apply me-[--bq-input--gap];\n}\n\n.bq-input--control__suffix {\n @apply ms-[--bq-input--gap];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Slotted and internal icons */\n/* -------------------------------------------------------------------------- */\n\nbq-icon,\n::slotted(bq-icon) {\n --bq-icon--size: var(--bq-input--icon-size) !important;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Hide webkit clear button */\n/* -------------------------------------------------------------------------- */\n\n/* Remove clear controls from search input */\n\n.bq-input--control__input::-moz-search-cancel {\n @apply hidden appearance-none;\n}\n\n.bq-input--control__input::-webkit-search-decoration,\n.bq-input--control__input::-webkit-search-cancel-button,\n.bq-input--control__input::-webkit-search-results-button,\n.bq-input--control__input::-webkit-search-results-decoration {\n @apply hidden appearance-none;\n}\n\n/* Remove native control extra padding from input date and datetime */\n\n.bq-input--control__input::-webkit-datetime-edit-fields-wrapper,\n.bq-input--control__input::-webkit-datetime-edit,\n.bq-input--control__input::-webkit-datetime-edit-year-field,\n.bq-input--control__input::-webkit-datetime-edit-month-field,\n.bq-input--control__input::-webkit-datetime-edit-day-field,\n.bq-input--control__input::-webkit-datetime-edit-hour-field,\n.bq-input--control__input::-webkit-datetime-edit-minute-field,\n.bq-input--control__input::-webkit-datetime-edit-second-field,\n.bq-input--control__input::-webkit-datetime-edit-millisecond-field,\n.bq-input--control__input::-webkit-datetime-edit-meridiem-field {\n @apply p-b-0 p-i-0;\n}\n","import { AttachInternals, Component, Element, Event, h, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport type { TInputType, TInputValidation, TInputValue } from './bq-input.types';\nimport { debounce, hasSlotContent, isDefined, isHTMLElement, isNil, TDebounce } from '../../shared/utils';\n\n/**\n * The Input component is a fundamental user interface element that allows users to input data by typing it into a text field.\n * It is commonly used in web and mobile applications for various purposes, such as collecting user information, search inputs, and login forms.\n *\n * @example How to use it\n * ```html\n * <bq-input name=\"username\" label=\"Username\" placeholder=\"Enter your username\"></bq-input>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/980362-input\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {string} autocapitalize - Controls whether or not the input field should be capitalized and how.\n * @attr {string} autocomplete - Specifies whether or not the input field should have autocomplete enabled.\n * @attr {string} autocorrect - Controls whether or not the input field should have autocorrect enabled.\n * @attr {boolean} autofocus - If true, the 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} disabled - Indicates whether the input is disabled or not.\n * @attr {boolean} disable-clear - If true, the clear button won't be displayed.\n * @attr {string} form - The ID of the form that the input field belongs to.\n * @attr {string} form-validation-message - The native form validation message (mandatory if `required` is set).\n * @attr {string} inputmode - The inputmode attribute specifies what kind of input mechanism would be most helpful for users entering content into the input field.\n * @attr {number | string} max - The maximum value that the input field can accept.\n * @attr {number} maxlength - The maximum number of characters that the input field can accept.\n * @attr {number | string} min - The minimum value that the input field can accept.\n * @attr {number} minlength - The minimum number of characters that the input field can accept.\n * @attr {string} name - The input field name.\n * @attr {string} pattern - Specifies a regular expression the form control's value should match.\n * @attr {string} placeholder - The input placeholder text value.\n * @attr {boolean} readonly - If true, the input field cannot be modified.\n * @attr {boolean} required - Indicates whether or not the input field is required to be filled out before submitting the form.\n * @attr {number | 'any'} step - A number that specifies the granularity that the value must adhere to.\n * @attr {string} type - The type attribute specifies the type of input field to display.\n * @attr {'none' | 'error' | 'warning' | 'success'} validation-status - The validation status of the input.\n * @attr {string | number | string[]} value - The input value, it can be used to reset the input to a previous value.\n *\n * @event bqBlur - Callback handler emitted when the input loses focus.\n * @event bqChange - Callback handler emitted when the input value has changed and the input loses focus.\n * @event bqClear - Callback handler emitted when the input value has been cleared.\n * @event bqFocus - Callback handler emitted when the input has received focus.\n * @event bqInput - Callback handler emitted when the input value changes.\n *\n * @slot label - The label slot container.\n * @slot prefix - The prefix slot container.\n * @slot suffix - The suffix slot container.\n * @slot helper-text - The helper text slot container.\n * @slot clear-icon - The clear icon 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 helper-text - The helper text slot container.\n * @part label - The label slot container.\n * @part input - The native HTML input element used under the hood.\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n *\n * @cssprop --bq-input--background-color - Input background color\n * @cssprop --bq-input--border-color - Input border color\n * @cssprop --bq-input--border-color-focus - Input border color on focus\n * @cssprop --bq-input--border-radius - Input border radius\n * @cssprop --bq-input--border-width - Input border width\n * @cssprop --bq-input--border-style - Input border style\n * @cssprop --bq-input--gap - Gap between input content and prefix/suffix\n * @cssprop --bq-input--helper-margin-top - Helper text margin top\n * @cssprop --bq-input--helper-text-color - Helper text color\n * @cssprop --bq-input--helper-text-size - Helper text size\n * @cssprop --bq-input--icon-size - Icon size to use in prefix/suffix and clear button\n * @cssprop --bq-input--label-margin-bottom - Input label margin bottom\n * @cssprop --bq-input--label-text-color - Input label text color\n * @cssprop --bq-input--label-text-size - Input label text size\n * @cssprop --bq-input--padding-start - Input padding start\n * @cssprop --bq-input--padding-end - Input padding end\n * @cssprop --bq-input--paddingY - Input padding top and bottom\n * @cssprop --bq-input--text-color - Input text color\n * @cssprop --bq-input--text-size - Input text size\n * @cssprop --bq-input--text-placeholder-color - Input placeholder text color\n */\n@Component({\n tag: 'bq-input',\n styleUrl: './scss/bq-input.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqInput {\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 debounceBqInput: TDebounce<void>;\n private fallbackInputId = 'input';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqInputElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasHelperText = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /**\n * Controls whether or not the input field should be capitalized and how.\n * Possible values are 'off', 'none', 'on', 'sentences', 'words', and 'characters'.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize\n */\n @Prop({ reflect: true }) autocapitalize: string = 'off';\n\n /**\n * Specifies whether or not the input field should have autocomplete enabled.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values\n */\n @Prop({ reflect: true }) autocomplete: string = 'off';\n\n /**\n * Controls whether or not the input field should have autocorrect enabled.\n * Possible values are 'on' and 'off'.\n */\n @Prop({ reflect: true }) autocorrect: 'on' | 'off' = 'off';\n\n /** If true, the 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 /**\n * Indicates whether the input is disabled or not.\n * If `true`, the input 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 /** The ID of the form that the input field belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** The native form validation message (mandatory if `required` is set) */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /**\n * The inputmode attribute specifies what kind of input mechanism would be most helpful for users entering content into the input field.\n * This allows a browser to display an appropriate virtual keyboard while editing.\n * Possible values are 'none', 'text', 'decimal', 'numeric', 'tel', 'search', 'email', 'url', and 'date'.\n */\n @Prop() inputmode?: string;\n\n /**\n * The maximum value that the input field can accept.\n * Only applies to date and number input types.\n */\n @Prop({ reflect: true }) max?: number | string;\n\n /** The maximum number of characters that the input field can accept. */\n @Prop({ reflect: true }) maxlength: number;\n\n /**\n * The minimum value that the input field can accept.\n * Only applies to date and number input types.\n */\n @Prop({ reflect: true }) min?: number | string;\n\n /** The minimum number of characters that the input field can accept. */\n @Prop({ reflect: true }) minlength: number;\n\n /** The input field name. */\n @Prop({ reflect: true }) name!: string;\n\n /**\n * Specifies a regular expression the form control's value should match.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern\n */\n @Prop({ reflect: true }) pattern?: string;\n\n /** The input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** If true, the input field cannot be modified. */\n @Prop({ reflect: true }) readonly?: boolean;\n\n /** Indicates whether or not the input field is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /**\n * A number that specifies the granularity that the value must adhere to.\n * Valid for date, month, week, time, datetime-local, number, and range.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step\n */\n @Prop({ reflect: true }) step: number | 'any';\n\n /**\n * The type attribute specifies the type of input field to display.\n * Possible values are 'text', 'password', 'email', 'number', 'tel', 'search', 'url', and more.\n * See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types\n */\n @Prop({ reflect: true }) type: TInputType = 'text';\n\n /**\n * The validation status of the input.\n *\n * @remarks\n * This property is used to indicate the validation status of the 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 input value, it can be used to reset the input to a previous value */\n @Prop({ reflect: true, mutable: true }) value: TInputValue;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n const { internals, value } = this;\n if (Array.isArray(value)) {\n this.hasValue = value.some((val) => val.length > 0);\n this.internals.setFormValue(value.join(','));\n return;\n }\n\n this.hasValue = isDefined(value);\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqInputElement>;\n\n /**\n * Callback handler emitted when the input value has changed and the input loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.\n */\n @Event() bqChange!: EventEmitter<{ value: string | number | string[]; el: HTMLBqInputElement }>;\n\n /** Callback handler emitted when the input value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqInputElement>;\n\n /** Callback handler emitted when the input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqInputElement>;\n\n /**\n * Callback handler emitted when the input value changes.\n * This handler is called whenever the user types or pastes text into the input field.\n */\n @Event() bqInput!: EventEmitter<{ value: string | number | string[]; el: HTMLBqInputElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.handleValueChange();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n formAssociatedCallback() {\n this.setFormValue(this.value?.toString());\n this.updateFormValidity();\n }\n\n formResetCallback() {\n if (isNil(this.value)) return;\n\n this.handleClear();\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 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 handleInput = (ev: Event) => {\n if (this.disabled) return;\n\n this.debounceBqInput?.cancel();\n\n if (!isHTMLElement(ev.target, 'input')) return;\n this.value = this.type === 'number' ? Number(ev.target.value) : ev.target.value;\n\n this.debounceBqInput = debounce(() => {\n this.bqInput.emit({ value: this.value, el: this.el });\n }, this.debounceTime);\n this.debounceBqInput();\n };\n\n private handleChange = (ev: Event) => {\n if (this.disabled) return;\n\n if (!isHTMLElement(ev.target, 'input')) return;\n this.value = this.type === 'number' ? Number(ev.target.value) : ev.target.value;\n // Update form value and validity\n this.setFormValue(`${this.value}`);\n this.updateFormValidity();\n\n this.bqChange.emit({ value: this.value, el: this.el });\n };\n\n private handleClear = () => {\n if (this.disabled) return;\n\n const { inputElem, setFormValue, updateFormValidity } = this;\n // Clear input element value\n inputElem.value = '';\n this.value = inputElem.value;\n // Set form value to empty string abd update validity\n setFormValue(this.value);\n updateFormValidity();\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n ev.stopPropagation();\n this.handleClear();\n\n const { bqClear, bqChange, bqInput, el, inputElem } = this;\n // Emit events\n bqClear.emit(el);\n bqInput.emit({ value: this.value, el });\n bqChange.emit({ value: this.value, el });\n // Refocus input element\n inputElem.focus();\n };\n\n private setFormValue = (value?: string) => {\n this.internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n };\n\n private updateFormValidity = () => {\n const { formValidationMessage, internals, required, value, inputElem } = this;\n\n // Clear the validity state\n internals?.states.clear();\n\n if (required && (!value || value.toString().trim() === '')) {\n // Set validity state to invalid\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, inputElem);\n return;\n }\n\n // Set validity state to valid if textarea has value or is not required\n internals?.states.add('valid');\n internals?.setValidity({});\n };\n\n private 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 // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bq-input\" part=\"base\">\n {/* Label */}\n <label\n class={{ 'bq-input--label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n {/* Input control group */}\n <div\n class={{\n 'bq-input--control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-input--control__prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-input--control__input\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n disabled={this.disabled}\n form={this.form}\n inputMode={this.inputmode}\n max={this.max}\n maxLength={this.maxlength}\n min={this.min}\n minLength={this.minlength}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n ref={(inputElem) => (this.inputElem = inputElem)}\n readOnly={this.readonly}\n required={this.required}\n step={this.step}\n type={this.type}\n value={this.value}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onFocus={this.handleFocus}\n onInput={this.handleInput}\n />\n {/* Clear Button */}\n {this.hasValue && !this.disabled && !this.disableClear && (\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-input--control__clear ms-[--bq-input--gap] hidden\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\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-input--control__suffix': true, '!hidden': !this.hasSuffix }}\n ref={(spanElem) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n {/* Helper text */}\n <div\n class={{\n [`bq-input--helper-text validation-${this.validationStatus}`]: true,\n '!hidden': !this.hasHelperText,\n }}\n ref={(divElem) => (this.helperTextElem = divElem)}\n part=\"helper-text\"\n >\n <slot name=\"helper-text\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n );\n }\n}\n"],"names":[],"m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,QAAQ,CAAC,EAC/C,IAAI,EAAC,QAAQ,EAAA,EAEb,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAI,CAAA,CACtD,CACH,EAEN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,CAAC,oCAAoC,IAAI,CAAC,gBAAgB,CAAE,CAAA,GAAG,IAAI;AACnE,gBAAA,SAAS,EAAE,CAAC,IAAI,CAAC,aAAa;AAC/B,aAAA,EACD,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,EACjD,IAAI,EAAC,aAAa,EAAA,EAElB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,aAAa,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAA,CAAI,CAC5D,CACF;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-notification.entry.esm.js","sources":["../../packages/beeq/src/components/notification/bq-notification.types.ts","../../packages/beeq/src/components/notification/scss/bq-notification.scss?tag=bq-notification&encapsulation=shadow","../../packages/beeq/src/components/notification/bq-notification.tsx"],"sourcesContent":["export const NOTIFICATION_TYPE = ['error', 'info', 'neutral', 'success', 'warning'] as const;\nexport type TNotificationType = (typeof NOTIFICATION_TYPE)[number];\n\nexport const NOTIFICATION_BORDER_RADIUS = ['none', 'xs2', 'xs', 's', 'm', 'l', 'full'] as const;\nexport type TNotificationBorderRadius = (typeof NOTIFICATION_BORDER_RADIUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Notification styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-notification.variables';\n\n:host {\n @apply block;\n}\n\n:host(.is-hidden) {\n @apply hidden;\n}\n\n.bq-notification {\n @apply relative flex transition-all min-is-[--bq-notification--min-width] p-b-[--bq-notification--padding] p-i-[--bq-notification--padding];\n @apply rounded-[--bq-notification--border-radius] bg-[--bq-notification--background] shadow-[shadow:--bq-notification--box-shadow];\n}\n\n/**\n * Set the notification icon color based on the type value selected\n */\n.notification--icon.color {\n &-error {\n @apply text-[color:--bq-notification--icon-color-error];\n }\n\n &-info {\n @apply text-[color:--bq-notification--icon-color-info];\n }\n\n &-neutral {\n @apply text-[color:--bq-notification--icon-color-neutral];\n }\n\n &-success {\n @apply text-[color:--bq-notification--icon-color-success];\n }\n\n &-warning {\n @apply text-[color:--bq-notification--icon-color-warning];\n }\n}\n\n/**\n * Tweak the close bq-button styles so it remain small without extra padding\n */\n.notification--close::part(button) {\n @apply rounded-s border-0 bs-fit p-b-0 p-i-0;\n}\n\n/**\n * Here we guarantee that if the footer actions are wrapped in a div container from the consumer side,\n * the styles get applied to the that wrapping container directly\n */\n[part='footer'] ::slotted(*) {\n @apply flex items-start gap-xs;\n}\n\n[part='body'],\n[part='footer'] {\n ::slotted(*) {\n @apply block m-bs-m;\n }\n}\n","import { Component, Element, Event, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { NOTIFICATION_TYPE } from './bq-notification.types';\nimport type { TNotificationBorderRadius, TNotificationType } from './bq-notification.types';\nimport { debounce, enter, hasSlotContent, isClient, leave, TDebounce, validatePropValue } from '../../shared/utils';\n\nconst NOTIFICATION_PORTAL_SELECTOR = 'bq-notification-portal';\n\n/**\n * The Notification component is a user interface element used to provide information or alerts to users in a non-intrusive manner.\n *\n * @example How to use it\n * ```html\n * <bq-notification border=\"s\" time=\"3000\" type=\"info\">\n * Title\n * <span slot=\"body\">\n * This is some description text text\n * <a class=\"bq-link\" href=\"https://example.com\">Link</a>\n * </span>\n * <div class=\"flex gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"primary\" size=\"small\">Button</bq-button>\n * <bq-button appearance=\"link\" size=\"small\">Button</bq-button>\n * </div>\n * </bq-notification>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/945cb6-notification\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {boolean} auto-dismiss - If true, the notification will automatically hide after the specified amount of time\n * @attr {string} border - The corder radius of the notification component\n * @attr {boolean} disable-close - If true, the close button at the top right of the notification won't be shown\n * @attr {boolean} hide-icon - If true, the notification icon won't be shown\n * @attr {boolean} open - If true, the notification will be shown\n * @attr {number} time - The length of time, in milliseconds, after which the notification will close itself. Only valid if `auto-dismiss=\"true\"`\n * @attr {string} type - Type of Notification\n *\n * @event bqAfterClose - Callback handler to be called after the notification has been closed\n * @event bqAfterOpen - Callback handler to be called after the notification has been opened\n * @event bqHide - Callback handler to be called when the notification is hidden\n * @event bqShow - Callback handler to be called when the notification is shown\n *\n * @slot - The notification title content\n * @slot body - The notification description content\n * @slot footer - The notification footer content\n * @slot icon - The icon to be displayed in the notification\n * @slot btn-close - The close button of the notification\n *\n * @part base - The `<div>` container of the predefined bq-icon component.\n * @part body - The container `<div>` that wraps the notification description content\n * @part btn-close - The `bq-button` used to close the notification\n * @part content - The container `<div>` that wraps all the notification content (title, description, footer)\n * @part footer - The container `<div>` that wraps the notification footer content\n * @part icon - The `<bq-icon>` element used to render a predefined icon based on the notification type\n * @part icon-outline - The container `<div>` that wraps the icon element\n * @part main - The container `<div>` that wraps the notification main content (title, description)\n * @part svg - The `<svg>` element of the predefined bq-icon component.\n * @part title - The container `<div>` that wraps the notification title content\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n *\n * @cssprop --bq-notification--background - The notification background color\n * @cssprop --bq-notification--box-shadow - The notification box shadow\n * @cssprop --bq-notification--border-color - The notification border color\n * @cssprop --bq-notification--border-radius - The notification border radius\n * @cssprop --bq-notification--border-style - The notification border style\n * @cssprop --bq-notification--border-width - The notification border width\n * @cssprop --bq-notification--content-footer-gap - The notification content and footer gap\n * @cssprop --bq-notification--title-body-gap - The notification title and body gap\n * @cssprop --bq-notification--icon-color-error - The notification icon color for error type\n * @cssprop --bq-notification--icon-color-info - The notification icon color for info type\n * @cssprop --bq-notification--icon-color-neutral - The notification icon color for neutral type\n * @cssprop --bq-notification--icon-color-success - The notification icon color for success type\n * @cssprop --bq-notification--icon-color-warning - The notification icon color for warning type\n * @cssprop --bq-notification--padding - The notification padding\n * @cssprop --bq-notification--min-width - The notification min width\n */\n@Component({\n tag: 'bq-notification',\n styleUrl: './scss/bq-notification.scss',\n shadow: true,\n})\nexport class BqNotification {\n // Own Properties\n // ====================\n\n private autoDismissDebounce: TDebounce<void>;\n private bodyElem: HTMLDivElement;\n private footerElem: HTMLDivElement;\n private notificationElem: HTMLDivElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqNotificationElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasContent = false;\n @State() private hasFooter = false;\n @State() private notificationPortal = isClient() ? document.querySelector(`.${NOTIFICATION_PORTAL_SELECTOR}`) : null;\n\n // Public Property API\n // ========================\n\n /** If true, the notification will automatically hide after the specified amount of time */\n @Prop({ reflect: true }) autoDismiss: boolean;\n\n /** The corder radius of the notification component */\n @Prop({ reflect: true }) border: TNotificationBorderRadius = 's';\n\n /** If true, the close button at the top right of the notification won't be shown */\n @Prop({ reflect: true }) disableClose: boolean;\n\n /** If true, the notification icon won't be shown */\n @Prop({ reflect: true }) hideIcon: boolean;\n\n /** If true, the notification will be shown */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** The length of time, in milliseconds, after which the notification will close itself. Only valid if `autoDismiss=\"true\"` */\n @Prop({ reflect: true }) time: number = 3000;\n\n /** Type of Notification */\n @Prop({ reflect: true }) type: TNotificationType = 'info';\n\n // Prop lifecycle events\n // =======================\n @Watch('autoDismiss')\n @Watch('time')\n handleTimeout() {\n this.autoDismissDebounce?.cancel();\n if (!this.autoDismiss) return;\n\n this.autoDismissDebounce = debounce(() => {\n this.hide();\n }, this.time);\n // Make sure to autodismiss the notification if the `auto-dismiss` value changed while open\n if (this.open) this.autoDismissDebounce();\n }\n\n @Watch('open')\n handleOpenChange() {\n this.autoDismissDebounce?.cancel();\n\n if (!(this.autoDismiss && this.open)) return;\n this.autoDismissDebounce();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(NOTIFICATION_TYPE, 'info', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the notification is hidden */\n @Event() bqHide!: EventEmitter;\n\n /** Callback handler to be called when the notification is shown */\n @Event() bqShow!: EventEmitter;\n\n /** Callback handler to be called after the notification has been opened */\n @Event() bqAfterOpen!: EventEmitter;\n\n /** Callback handler to be called after the notification has been closed */\n @Event() bqAfterClose!: EventEmitter;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (!notificationPortal) {\n this.notificationPortal = Object.assign(document.createElement('div'), {\n className: NOTIFICATION_PORTAL_SELECTOR,\n });\n }\n }\n\n componentWillLoad() {\n this.checkPropValues();\n this.handleTimeout();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqAfterClose')\n afterNotificationClose() {\n try {\n const { notificationPortal } = this;\n notificationPortal.removeChild(this.el);\n // Remove the notification portal from the DOM when there are no more notifications\n if (notificationPortal.querySelector(this.el.tagName.toLowerCase()) === null) {\n notificationPortal.remove();\n }\n } catch (error) {\n /**\n * Skip DOMException error since it could be possible that\n * in some situations the notification portal is missing\n */\n if (error instanceof DOMException) return;\n throw error;\n }\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Method to be called to hide the notification component */\n @Method()\n async hide(): Promise<void> {\n await this.handleHide();\n }\n\n /** Method to be called to show the notification component */\n @Method()\n async show(): Promise<void> {\n await this.handleShow();\n }\n\n /** This method can be used to display notifications in a fixed-position element that allows for stacking multiple notifications vertically */\n @Method()\n async toast() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (notificationPortal?.parentElement === null) {\n document.body.append(notificationPortal);\n }\n\n notificationPortal?.appendChild(this.el);\n requestAnimationFrame(() => {\n this.show();\n });\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleHide = async () => {\n const ev = this.bqHide.emit(this.el);\n if (!ev.defaultPrevented) {\n await leave(this.notificationElem);\n this.open = false;\n this.handleTransitionEnd();\n }\n };\n\n private handleShow = async () => {\n const ev = this.bqShow.emit(this.el);\n if (!ev.defaultPrevented) {\n this.open = true;\n await enter(this.notificationElem);\n this.handleTransitionEnd();\n }\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n };\n\n private handleSlotChange = () => {\n this.hasContent = hasSlotContent(this.bodyElem);\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private get iconName(): string {\n const typeMap = {\n error: 'x-circle',\n success: 'check-circle',\n warning: 'warning-circle',\n };\n\n return typeMap[this.type] || 'info';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-notification--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host\n style={style}\n class={{ 'is-hidden': !this.open }}\n aria-hidden={!this.open ? 'true' : 'false'}\n hidden={!this.open ? 'true' : 'false'}\n role=\"alert\"\n >\n <div\n class=\"bq-notification\"\n data-transition-enter=\"transform transition ease-out duration-300\"\n data-transition-enter-start=\"translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n data-transition-enter-end=\"translate-y-0 opacity-100 sm:translate-x-0\"\n data-transition-leave=\"transform transition ease-in duration-100\"\n data-transition-leave-start=\"translate-y-0 opacity-100 sm:translate-x-0\"\n data-transition-leave-end=\"-translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n ref={(div) => (this.notificationElem = div)}\n part=\"wrapper\"\n >\n {/* CLOSE BUTTON */}\n {!this.disableClose && (\n <bq-button\n class=\"notification--close absolute inset-ie-5 [&::part(label)]:inline-flex\"\n appearance=\"text\"\n size=\"small\"\n onClick={() => this.hide()}\n part=\"btn-close\"\n >\n <slot name=\"btn-close\">\n <bq-icon name=\"x\" />\n </slot>\n </bq-button>\n )}\n {/* ICON */}\n <div\n class={{\n '!hidden': this.hideIcon,\n [`color-${this.type}`]: true, // The icon color will be based on the type (info, success, warning, error)\n 'notification--icon me-xs flex text-left align-top': true,\n }}\n part=\"icon-outline\"\n >\n <slot name=\"icon\">\n <bq-icon name={this.iconName} part=\"icon\" exportparts=\"base,svg\" />\n </slot>\n </div>\n {/* MAIN */}\n <div class=\"flex flex-col items-start gap-[--bq-notification--content-footer-gap]\" part=\"main\">\n <div class=\"flex flex-col gap-[--bq-notification--title-body-gap]\" part=\"content\">\n {/* TITLE */}\n <div class=\"title-font font-semibold leading-regular\" part=\"title\">\n <slot />\n </div>\n {/* BODY */}\n <div\n class={{ 'text-s leading-regular': true, '!hidden': !this.hasContent }}\n ref={(div) => (this.bodyElem = div)}\n part=\"body\"\n >\n <slot name=\"body\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n {/* FOOTER */}\n <div\n class={{ 'flex items-start gap-xs': true, '!hidden': !this.hasFooter }}\n ref={(div) => (this.footerElem = div)}\n part=\"footer\"\n >\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAAO,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAU;;ACA5F,MAAM,iBAAiB,GAAG,k3zBAAk3zB;;ACO54zB,MAAM,4BAA4B,GAAG,wBAAwB;MA8EhD,cAAc,GAAA,MAAA;;;;;;;;;;AAIj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A,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EAAI,CAAA,CACrD,CACF,EAEN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,EAAE,yBAAyB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EACtE,GAAG,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,EACrC,IAAI,EAAC,QAAQ,EAAA,EAEb,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACvD,CACF,CACF,CACD;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"bq-notification.entry.esm.js","sources":["../../packages/beeq/src/components/notification/bq-notification.types.ts","../../packages/beeq/src/components/notification/scss/bq-notification.scss?tag=bq-notification&encapsulation=shadow","../../packages/beeq/src/components/notification/bq-notification.tsx"],"sourcesContent":["export const NOTIFICATION_TYPE = ['error', 'info', 'neutral', 'success', 'warning'] as const;\nexport type TNotificationType = (typeof NOTIFICATION_TYPE)[number];\n\nexport const NOTIFICATION_BORDER_RADIUS = ['none', 'xs2', 'xs', 's', 'm', 'l', 'full'] as const;\nexport type TNotificationBorderRadius = (typeof NOTIFICATION_BORDER_RADIUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Notification styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-notification.variables';\n\n:host {\n @apply block;\n}\n\n:host(.is-hidden) {\n @apply hidden;\n}\n\n.bq-notification {\n @apply relative flex transition-all min-is-[--bq-notification--min-width] p-b-[--bq-notification--padding] p-i-[--bq-notification--padding];\n @apply rounded-[--bq-notification--border-radius] bg-[--bq-notification--background] shadow-[shadow:--bq-notification--box-shadow];\n}\n\n/**\n * Set the notification icon color based on the type value selected\n */\n.notification--icon.color {\n &-error {\n @apply text-[color:--bq-notification--icon-color-error];\n }\n\n &-info {\n @apply text-[color:--bq-notification--icon-color-info];\n }\n\n &-neutral {\n @apply text-[color:--bq-notification--icon-color-neutral];\n }\n\n &-success {\n @apply text-[color:--bq-notification--icon-color-success];\n }\n\n &-warning {\n @apply text-[color:--bq-notification--icon-color-warning];\n }\n}\n\n/**\n * Tweak the close bq-button styles so it remain small without extra padding\n */\n.notification--close::part(button) {\n @apply rounded-s border-0 bs-fit p-b-0 p-i-0;\n}\n\n/**\n * Here we guarantee that if the footer actions are wrapped in a div container from the consumer side,\n * the styles get applied to the that wrapping container directly\n */\n[part='footer'] ::slotted(*) {\n @apply flex items-start gap-xs;\n}\n\n[part='body'],\n[part='footer'] {\n ::slotted(*) {\n @apply block m-bs-m;\n }\n}\n","import { Component, Element, Event, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport type { EventEmitter } from '@stencil/core';\n\nimport { NOTIFICATION_TYPE } from './bq-notification.types';\nimport type { TNotificationBorderRadius, TNotificationType } from './bq-notification.types';\nimport { debounce, enter, hasSlotContent, isClient, leave, TDebounce, validatePropValue } from '../../shared/utils';\n\nconst NOTIFICATION_PORTAL_SELECTOR = 'bq-notification-portal';\n\n/**\n * The Notification component is a user interface element used to provide information or alerts to users in a non-intrusive manner.\n *\n * @example How to use it\n * ```html\n * <bq-notification border=\"s\" time=\"3000\" type=\"info\">\n * Title\n * <span slot=\"body\">\n * This is some description text text\n * <a class=\"bq-link\" href=\"https://example.com\">Link</a>\n * </span>\n * <div class=\"flex gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"primary\" size=\"small\">Button</bq-button>\n * <bq-button appearance=\"link\" size=\"small\">Button</bq-button>\n * </div>\n * </bq-notification>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/945cb6-notification\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {boolean} auto-dismiss - If true, the notification will automatically hide after the specified amount of time\n * @attr {string} border - The corder radius of the notification component\n * @attr {boolean} disable-close - If true, the close button at the top right of the notification won't be shown\n * @attr {boolean} hide-icon - If true, the notification icon won't be shown\n * @attr {boolean} open - If true, the notification will be shown\n * @attr {number} time - The length of time, in milliseconds, after which the notification will close itself. Only valid if `auto-dismiss=\"true\"`\n * @attr {string} type - Type of Notification\n *\n * @event bqAfterClose - Callback handler to be called after the notification has been closed\n * @event bqAfterOpen - Callback handler to be called after the notification has been opened\n * @event bqHide - Callback handler to be called when the notification is hidden\n * @event bqShow - Callback handler to be called when the notification is shown\n *\n * @slot - The notification title content\n * @slot body - The notification description content\n * @slot footer - The notification footer content\n * @slot icon - The icon to be displayed in the notification\n * @slot btn-close - The close button of the notification\n *\n * @part base - The `<div>` container of the predefined bq-icon component.\n * @part body - The container `<div>` that wraps the notification description content\n * @part btn-close - The `bq-button` used to close the notification\n * @part content - The container `<div>` that wraps all the notification content (title, description, footer)\n * @part footer - The container `<div>` that wraps the notification footer content\n * @part icon - The `<bq-icon>` element used to render a predefined icon based on the notification type\n * @part icon-outline - The container `<div>` that wraps the icon element\n * @part main - The container `<div>` that wraps the notification main content (title, description)\n * @part svg - The `<svg>` element of the predefined bq-icon component.\n * @part title - The container `<div>` that wraps the notification title content\n * @part wrapper - The wrapper container `<div>` of the element inside the shadow DOM\n *\n * @cssprop --bq-notification--background - The notification background color\n * @cssprop --bq-notification--box-shadow - The notification box shadow\n * @cssprop --bq-notification--border-color - The notification border color\n * @cssprop --bq-notification--border-radius - The notification border radius\n * @cssprop --bq-notification--border-style - The notification border style\n * @cssprop --bq-notification--border-width - The notification border width\n * @cssprop --bq-notification--content-footer-gap - The notification content and footer gap\n * @cssprop --bq-notification--title-body-gap - The notification title and body gap\n * @cssprop --bq-notification--icon-color-error - The notification icon color for error type\n * @cssprop --bq-notification--icon-color-info - The notification icon color for info type\n * @cssprop --bq-notification--icon-color-neutral - The notification icon color for neutral type\n * @cssprop --bq-notification--icon-color-success - The notification icon color for success type\n * @cssprop --bq-notification--icon-color-warning - The notification icon color for warning type\n * @cssprop --bq-notification--padding - The notification padding\n * @cssprop --bq-notification--min-width - The notification min width\n */\n@Component({\n tag: 'bq-notification',\n styleUrl: './scss/bq-notification.scss',\n shadow: true,\n})\nexport class BqNotification {\n // Own Properties\n // ====================\n\n private autoDismissDebounce: TDebounce<void>;\n private bodyElem: HTMLDivElement;\n private footerElem: HTMLDivElement;\n private notificationElem: HTMLDivElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqNotificationElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasContent = false;\n @State() private hasFooter = false;\n @State() private notificationPortal = isClient() ? document.querySelector(`.${NOTIFICATION_PORTAL_SELECTOR}`) : null;\n\n // Public Property API\n // ========================\n\n /** If true, the notification will automatically hide after the specified amount of time */\n @Prop({ reflect: true }) autoDismiss: boolean;\n\n /** The corder radius of the notification component */\n @Prop({ reflect: true }) border: TNotificationBorderRadius = 's';\n\n /** If true, the close button at the top right of the notification won't be shown */\n @Prop({ reflect: true }) disableClose: boolean;\n\n /** If true, the notification icon won't be shown */\n @Prop({ reflect: true }) hideIcon: boolean;\n\n /** If true, the notification will be shown */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** The length of time, in milliseconds, after which the notification will close itself. Only valid if `autoDismiss=\"true\"` */\n @Prop({ reflect: true }) time: number = 3000;\n\n /** Type of Notification */\n @Prop({ reflect: true }) type: TNotificationType = 'info';\n\n // Prop lifecycle events\n // =======================\n @Watch('autoDismiss')\n @Watch('time')\n handleTimeout() {\n this.autoDismissDebounce?.cancel();\n if (!this.autoDismiss) return;\n\n this.autoDismissDebounce = debounce(() => {\n this.hide();\n }, this.time);\n // Make sure to autodismiss the notification if the `auto-dismiss` value changed while open\n if (this.open) this.autoDismissDebounce();\n }\n\n @Watch('open')\n handleOpenChange() {\n this.autoDismissDebounce?.cancel();\n\n if (!(this.autoDismiss && this.open)) return;\n this.autoDismissDebounce();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(NOTIFICATION_TYPE, 'info', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the notification is hidden */\n @Event() bqHide!: EventEmitter;\n\n /** Callback handler to be called when the notification is shown */\n @Event() bqShow!: EventEmitter;\n\n /** Callback handler to be called after the notification has been opened */\n @Event() bqAfterOpen!: EventEmitter;\n\n /** Callback handler to be called after the notification has been closed */\n @Event() bqAfterClose!: EventEmitter;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (!notificationPortal) {\n this.notificationPortal = Object.assign(document.createElement('div'), {\n className: NOTIFICATION_PORTAL_SELECTOR,\n });\n }\n }\n\n componentWillLoad() {\n this.checkPropValues();\n this.handleTimeout();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqAfterClose')\n afterNotificationClose() {\n try {\n const { notificationPortal } = this;\n notificationPortal.removeChild(this.el);\n // Remove the notification portal from the DOM when there are no more notifications\n if (notificationPortal.querySelector(this.el.tagName.toLowerCase()) === null) {\n notificationPortal.remove();\n }\n } catch (error) {\n /**\n * Skip DOMException error since it could be possible that\n * in some situations the notification portal is missing\n */\n if (error instanceof DOMException) return;\n throw error;\n }\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Method to be called to hide the notification component */\n @Method()\n async hide(): Promise<void> {\n await this.handleHide();\n }\n\n /** Method to be called to show the notification component */\n @Method()\n async show(): Promise<void> {\n await this.handleShow();\n }\n\n /** This method can be used to display notifications in a fixed-position element that allows for stacking multiple notifications vertically */\n @Method()\n async toast() {\n if (!isClient()) return;\n\n const { notificationPortal } = this;\n if (notificationPortal?.parentElement === null) {\n document.body.append(notificationPortal);\n }\n\n notificationPortal?.appendChild(this.el);\n requestAnimationFrame(() => {\n this.show();\n });\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleHide = async () => {\n const ev = this.bqHide.emit(this.el);\n if (!ev.defaultPrevented) {\n await leave(this.notificationElem);\n this.open = false;\n this.handleTransitionEnd();\n }\n };\n\n private handleShow = async () => {\n const ev = this.bqShow.emit(this.el);\n if (!ev.defaultPrevented) {\n this.open = true;\n await enter(this.notificationElem);\n this.handleTransitionEnd();\n }\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n };\n\n private handleSlotChange = () => {\n this.hasContent = hasSlotContent(this.bodyElem);\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private get iconName(): string {\n const typeMap = {\n error: 'x-circle',\n success: 'check-circle',\n warning: 'warning-circle',\n };\n\n return typeMap[this.type] || 'info';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-notification--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host\n style={style}\n class={{ 'is-hidden': !this.open }}\n aria-hidden={!this.open ? 'true' : 'false'}\n hidden={!this.open ? 'true' : 'false'}\n role=\"alert\"\n >\n <div\n class=\"bq-notification\"\n data-transition-enter=\"transform transition ease-out duration-300\"\n data-transition-enter-start=\"translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n data-transition-enter-end=\"translate-y-0 opacity-100 sm:translate-x-0\"\n data-transition-leave=\"transform transition ease-in duration-100\"\n data-transition-leave-start=\"translate-y-0 opacity-100 sm:translate-x-0\"\n data-transition-leave-end=\"-translate-y-xs opacity-0 sm:translate-y-0 sm:translate-x-s\"\n ref={(div) => (this.notificationElem = div)}\n part=\"wrapper\"\n >\n {/* CLOSE BUTTON */}\n {!this.disableClose && (\n <bq-button\n class=\"notification--close absolute inset-ie-5 [&::part(label)]:inline-flex\"\n appearance=\"text\"\n size=\"small\"\n onClick={() => this.hide()}\n part=\"btn-close\"\n >\n <slot name=\"btn-close\">\n <bq-icon name=\"x\" />\n </slot>\n </bq-button>\n )}\n {/* ICON */}\n <div\n class={{\n '!hidden': this.hideIcon,\n [`color-${this.type}`]: true, // The icon color will be based on the type (info, success, warning, error)\n 'notification--icon me-xs flex text-left align-top': true,\n }}\n part=\"icon-outline\"\n >\n <slot name=\"icon\">\n <bq-icon name={this.iconName} part=\"icon\" exportparts=\"base,svg\" />\n </slot>\n </div>\n {/* MAIN */}\n <div class=\"flex flex-col items-start gap-[--bq-notification--content-footer-gap]\" part=\"main\">\n <div class=\"flex flex-col gap-[--bq-notification--title-body-gap]\" part=\"content\">\n {/* TITLE */}\n <div class=\"title-font font-semibold leading-regular\" part=\"title\">\n <slot />\n </div>\n {/* BODY */}\n <div\n class={{ 'text-s leading-regular': true, '!hidden': !this.hasContent }}\n ref={(div) => (this.bodyElem = div)}\n part=\"body\"\n >\n <slot name=\"body\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n {/* FOOTER */}\n <div\n class={{ 'flex items-start gap-xs': true, '!hidden': !this.hasFooter }}\n ref={(div) => (this.footerElem = div)}\n part=\"footer\"\n >\n <slot name=\"footer\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAAO,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAU;;ACA5F,MAAM,iBAAiB,GAAG,sjzBAAsjzB;;ACOhlzB,MAAM,4BAA4B,GAAG,wBAAwB;MA8EhD,cAAc,GAAA,MAAA;;;;;;;;;;AAIjB,IAAA,mBAAmB;AACnB,IAAA,QAAQ;AACR,IAAA,UAAU;AACV,IAAA,gBAAgB;;;;;IAWP,UAAU,GAAG,KAAK;IAClB,SAAS,GAAG,KAAK;AACjB,IAAA,kBAAkB,GAAG,QA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,0CAAA,EACE,KAAK,EAAE,EAAE,yBAAyB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EACtE,GAAG,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,EACrC,IAAI,EAAC,QAAQ,EAAA,EAEb,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACvD,CACF,CACF,CACD;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-option-group.entry.esm.js","sources":["../../packages/beeq/src/components/option-group/scss/bq-option-group.scss?tag=bq-option-group&encapsulation=shadow","../../packages/beeq/src/components/option-group/bq-option-group.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Option group styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-option-group.variables';\n\n:host {\n @apply block;\n}\n\n.bq-option-group {\n @apply flex overflow-hidden overflow-ellipsis;\n @apply bg-[--bq-option-group--background] text-[length:--bq-option-group--font-size] leading-[--bq-option-group--line-height];\n @apply pe-[--bq-option-group--label-padding-end] ps-[--bq-option-group--label-padding-start] p-b-[--bq-option-group--label-paddingY] p-i-[--bq-option-group--label-paddingY];\n\n &__child {\n @apply flex items-center;\n }\n}\n\n.bq-option-group__label {\n @apply pe-[--bq-option-group--label-text-padding-end] ps-[--bq-option-group--label-text-padding-start];\n}\n\n.bq-option-group__container ::slotted(bq-option) {\n @apply ps-[--bq-option-group--container-padding-start];\n}\n","import { Component, Element, h } from '@stencil/core';\n\n/**\n * The option group 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-group class=\"hydrated\">\n * <span slot=\"header-label\">Sport</span>\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-group>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/3b1b7b-option-group\n * @status stable\n *\n * @slot header-label - The label of the option group\n * @slot header-prefix - The prefix of the label\n * @slot header-suffix - The suffix of the label\n * @slot - The option items\n *\n * @part label - The `legend` tag element which acts as a container for the label\n * @part prefix - The prefix of the label\n * @part label - The text of the label\n * @part suffix - The suffix of the label\n * @part group - The `div` element which holds the option items\n *\n * @cssprop --bq-option-group--background - option group background color\n * @cssprop --bq-option-group--font-size - option group font size\n * @cssprop --bq-option-group--line-height - option group line height\n * @cssprop --bq-option-group--label-padding-start - option group header padding start\n * @cssprop --bq-option-group--label-padding-end - option group header padding start\n * @cssprop --bq-option-group--label-paddingY - option group header padding Y axis\n * @cssprop --bq-option-group--label-text-padding-start - option group text within label padding start\n * @cssprop --bq-option-group--label-text-padding-end - option group text within label padding start\n * @cssprop --bq-option-group--container-padding-start - option group container padding start\n */\n@Component({\n tag: 'bq-option-group',\n styleUrl: './scss/bq-option-group.scss',\n shadow: true,\n})\nexport class BqOptionGroup {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\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 // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bg-ui-primary\">\n <legend class=\"bq-option-group m-be-[--bq-option-group--gapY-list]\" part=\"label\">\n <span class=\"option-group__prefix flex items-center\" part=\"prefix\">\n <slot name=\"header-prefix\" />\n </span>\n <span\n class=\"bq-option-group__label inline-block overflow-hidden text-ellipsis whitespace-nowrap is-auto\"\n part=\"label\"\n >\n <slot name=\"header-label\" />\n </span>\n <span class=\"bq-option-group__suffix\" part=\"suffix\">\n <slot name=\"header-suffix\" />\n </span>\n </legend>\n <div\n class=\"bq-option-group__container flex flex-col gap-[--bq-option-group--gapY-list]\"\n role=\"group\"\n aria-label=\"Options\"\n part=\"group\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"bq-option-group.entry.esm.js","sources":["../../packages/beeq/src/components/option-group/scss/bq-option-group.scss?tag=bq-option-group&encapsulation=shadow","../../packages/beeq/src/components/option-group/bq-option-group.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Option group styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-option-group.variables';\n\n:host {\n @apply block;\n}\n\n.bq-option-group {\n @apply flex overflow-hidden overflow-ellipsis;\n @apply bg-[--bq-option-group--background] text-[length:--bq-option-group--font-size] leading-[--bq-option-group--line-height];\n @apply pe-[--bq-option-group--label-padding-end] ps-[--bq-option-group--label-padding-start] p-b-[--bq-option-group--label-paddingY] p-i-[--bq-option-group--label-paddingY];\n\n &__child {\n @apply flex items-center;\n }\n}\n\n.bq-option-group__label {\n @apply pe-[--bq-option-group--label-text-padding-end] ps-[--bq-option-group--label-text-padding-start];\n}\n\n.bq-option-group__container ::slotted(bq-option) {\n @apply ps-[--bq-option-group--container-padding-start];\n}\n","import { Component, Element, h } from '@stencil/core';\n\n/**\n * The option group 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-group class=\"hydrated\">\n * <span slot=\"header-label\">Sport</span>\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-group>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/3b1b7b-option-group\n * @status stable\n *\n * @slot header-label - The label of the option group\n * @slot header-prefix - The prefix of the label\n * @slot header-suffix - The suffix of the label\n * @slot - The option items\n *\n * @part label - The `legend` tag element which acts as a container for the label\n * @part prefix - The prefix of the label\n * @part label - The text of the label\n * @part suffix - The suffix of the label\n * @part group - The `div` element which holds the option items\n *\n * @cssprop --bq-option-group--background - option group background color\n * @cssprop --bq-option-group--font-size - option group font size\n * @cssprop --bq-option-group--line-height - option group line height\n * @cssprop --bq-option-group--label-padding-start - option group header padding start\n * @cssprop --bq-option-group--label-padding-end - option group header padding start\n * @cssprop --bq-option-group--label-paddingY - option group header padding Y axis\n * @cssprop --bq-option-group--label-text-padding-start - option group text within label padding start\n * @cssprop --bq-option-group--label-text-padding-end - option group text within label padding start\n * @cssprop --bq-option-group--container-padding-start - option group container padding start\n */\n@Component({\n tag: 'bq-option-group',\n styleUrl: './scss/bq-option-group.scss',\n shadow: true,\n})\nexport class BqOptionGroup {\n // Own Properties\n // ====================\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\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 // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"bg-ui-primary\">\n <legend class=\"bq-option-group m-be-[--bq-option-group--gapY-list]\" part=\"label\">\n <span class=\"option-group__prefix flex items-center\" part=\"prefix\">\n <slot name=\"header-prefix\" />\n </span>\n <span\n class=\"bq-option-group__label inline-block overflow-hidden text-ellipsis whitespace-nowrap is-auto\"\n part=\"label\"\n >\n <slot name=\"header-label\" />\n </span>\n <span class=\"bq-option-group__suffix\" part=\"suffix\">\n <slot name=\"header-suffix\" />\n </span>\n </legend>\n <div\n class=\"bq-option-group__container flex flex-col gap-[--bq-option-group--gapY-list]\"\n role=\"group\"\n aria-label=\"Options\"\n part=\"group\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,yprBAAyprB;;MC6CrqrB,aAAa,GAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA8CxB,MAAM,GAAA;AACJ,QAAA,QACE,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,eAAe,EAAA,EACxB,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,qDAAqD,EAAC,IAAI,EAAC,OAAO,EAAA,EAC9E,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,wCAAwC,EAAC,IAAI,EAAC,QAAQ,EAAA,EAChE,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,eAAe,EAAA,CAAG,CACxB,EACP,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,6FAA6F,EACnG,IAAI,EAAC,OAAO,EAAA,EAEZ,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,cAAc,EAAA,CAAG,CACvB,EACP,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,yBAAyB,EAAC,IAAI,EAAC,QAAQ,EAAA,EACjD,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,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