@beeq/core 1.8.3-beta.1 → 1.8.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beeq/beeq.esm.js +1 -1
- package/dist/beeq/beeq.esm.js.map +1 -1
- package/dist/beeq/index.esm.js +1 -1
- package/dist/beeq/{p-959c3d05.entry.js → p-01b3d2a5.entry.js} +2 -2
- package/dist/beeq/p-01b3d2a5.entry.js.map +1 -0
- package/dist/beeq/{p-e655938a.entry.js → p-0ac37ff8.entry.js} +2 -2
- package/dist/beeq/{p-803269b3.entry.js → p-1a8f376a.entry.js} +2 -2
- package/dist/beeq/{p-a941b0bb.entry.js → p-22188233.entry.js} +2 -2
- package/dist/beeq/p-22188233.entry.js.map +1 -0
- package/dist/beeq/{p-3806d9e3.entry.js → p-24135e46.entry.js} +2 -2
- package/dist/beeq/{p-90165aef.entry.js → p-260877e5.entry.js} +2 -2
- package/dist/beeq/{p-90165aef.entry.js.map → p-260877e5.entry.js.map} +1 -1
- package/dist/beeq/{p-d7ce7165.js → p-260d4ca0.js} +2 -2
- package/dist/beeq/{p-d7ce7165.js.map → p-260d4ca0.js.map} +1 -1
- package/dist/beeq/{p-dafa4162.entry.js → p-28adda86.entry.js} +2 -2
- package/dist/beeq/{p-dafa4162.entry.js.map → p-28adda86.entry.js.map} +1 -1
- package/dist/beeq/{p-e4dd6ff4.js → p-2b530ad4.js} +2 -2
- package/dist/beeq/{p-cb9fa154.entry.js → p-2f9fc4d4.entry.js} +2 -2
- package/dist/beeq/p-2f9fc4d4.entry.js.map +1 -0
- package/dist/beeq/{p-b067c558.entry.js → p-34f25f24.entry.js} +2 -2
- package/dist/beeq/p-34f25f24.entry.js.map +1 -0
- package/dist/beeq/{p-c42f9ac5.entry.js → p-38ee4c02.entry.js} +2 -2
- package/dist/beeq/{p-b7b3f7c6.entry.js → p-3f5865c0.entry.js} +2 -2
- package/dist/beeq/{p-9a7af424.entry.js → p-45bfda93.entry.js} +2 -2
- package/dist/beeq/p-4a5c07f9.js +7 -0
- package/dist/beeq/p-4a5c07f9.js.map +1 -0
- package/dist/beeq/{p-a4e11bbc.entry.js → p-4ddb6bdb.entry.js} +2 -2
- package/dist/beeq/p-4ddb6bdb.entry.js.map +1 -0
- package/dist/beeq/{p-19f5a833.entry.js → p-6195e6e5.entry.js} +2 -2
- package/dist/beeq/p-6195e6e5.entry.js.map +1 -0
- package/dist/beeq/{p-a8075be3.entry.js → p-63b4f8f9.entry.js} +2 -2
- package/dist/beeq/{p-4d21a49d.entry.js → p-648da701.entry.js} +2 -2
- package/dist/beeq/{p-3fe626f1.entry.js → p-6764f11f.entry.js} +2 -2
- package/dist/beeq/p-6764f11f.entry.js.map +1 -0
- package/dist/beeq/{p-b69f347d.entry.js → p-7478cf0a.entry.js} +2 -2
- package/dist/beeq/p-7478cf0a.entry.js.map +1 -0
- package/dist/beeq/{p-a8d64d1b.entry.js → p-7bb8664c.entry.js} +2 -2
- package/dist/beeq/{p-7585f825.entry.js → p-7ff775a3.entry.js} +2 -2
- package/dist/beeq/{p-5546f242.entry.js → p-801f7b25.entry.js} +2 -2
- package/dist/beeq/p-852225bc.js +6 -0
- package/dist/beeq/{p-ba1f9637.entry.js → p-8b63d8fc.entry.js} +2 -2
- package/dist/beeq/p-8b63d8fc.entry.js.map +1 -0
- package/dist/beeq/{p-e8f147c2.entry.js → p-8c011151.entry.js} +2 -2
- package/dist/beeq/p-8c011151.entry.js.map +1 -0
- package/dist/beeq/{p-70310ac8.entry.js → p-8d9f797d.entry.js} +2 -2
- package/dist/beeq/p-8d9f797d.entry.js.map +1 -0
- package/dist/beeq/{p-7efff703.entry.js → p-9a803ecf.entry.js} +2 -2
- package/dist/beeq/{p-b129db1a.entry.js → p-9eea4f4f.entry.js} +2 -2
- package/dist/beeq/{p-ed569a61.entry.js → p-a3c36d6c.entry.js} +2 -2
- package/dist/beeq/{p-bbaad491.entry.js → p-a620392e.entry.js} +2 -2
- package/dist/beeq/{p-66b6d69a.entry.js → p-a661454e.entry.js} +2 -2
- package/dist/beeq/{p-4500ffe5.entry.js → p-a7c4f022.entry.js} +2 -2
- package/dist/beeq/p-abda6f6c.entry.js +6 -0
- package/dist/beeq/p-abda6f6c.entry.js.map +1 -0
- package/dist/beeq/{p-65d67b85.entry.js → p-abf83b5c.entry.js} +2 -2
- package/dist/beeq/p-abf83b5c.entry.js.map +1 -0
- package/dist/beeq/{p-39a80765.entry.js → p-b044c5f6.entry.js} +2 -2
- package/dist/beeq/p-b044c5f6.entry.js.map +1 -0
- package/dist/beeq/{p-3f654a12.entry.js → p-b1ab6b7f.entry.js} +2 -2
- package/dist/beeq/{p-dbac0368.entry.js → p-b89dcf37.entry.js} +2 -2
- package/dist/beeq/p-b89dcf37.entry.js.map +1 -0
- package/dist/beeq/{p-f4e8ebd3.entry.js → p-ba8b92f1.entry.js} +2 -2
- package/dist/beeq/{p-8ed41b69.entry.js → p-bc1980d8.entry.js} +2 -2
- package/dist/beeq/{p-59a1b546.entry.js → p-c63ee3df.entry.js} +2 -2
- package/dist/beeq/p-c63ee3df.entry.js.map +1 -0
- package/dist/beeq/{p-ee1ecb6e.entry.js → p-f48c3ca7.entry.js} +2 -2
- package/dist/beeq.html-custom-data.json +311 -311
- package/dist/cjs/{assetsPath-32c4030b.js → assetsPath-95e7f5ab.js} +2 -2
- package/dist/cjs/{assetsPath-32c4030b.js.map → assetsPath-95e7f5ab.js.map} +1 -1
- package/dist/cjs/beeq.cjs.js +3 -3
- package/dist/cjs/beeq.cjs.js.map +1 -1
- package/dist/cjs/bq-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/bq-accordion.cjs.entry.js +7 -8
- package/dist/cjs/bq-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-alert.cjs.entry.js +9 -10
- package/dist/cjs/bq-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-avatar.cjs.entry.js +1 -1
- package/dist/cjs/bq-badge.cjs.entry.js +8 -5
- package/dist/cjs/bq-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +2 -2
- package/dist/cjs/bq-breadcrumb.cjs.entry.js +5 -2
- package/dist/cjs/bq-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-button_2.cjs.entry.js +9 -6
- package/dist/cjs/bq-button_2.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-card.cjs.entry.js +1 -1
- package/dist/cjs/bq-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/bq-date-picker.cjs.entry.js +97 -17
- package/dist/cjs/bq-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-dialog.cjs.entry.js +8 -9
- package/dist/cjs/bq-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-divider.cjs.entry.js +2 -2
- package/dist/cjs/bq-drawer.cjs.entry.js +10 -7
- package/dist/cjs/bq-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/bq-empty-state.cjs.entry.js +10 -9
- package/dist/cjs/bq-empty-state.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-input.cjs.entry.js +11 -14
- package/dist/cjs/bq-input.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-notification.cjs.entry.js +8 -7
- package/dist/cjs/bq-notification.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-option-group.cjs.entry.js +1 -1
- package/dist/cjs/bq-option-list_2.cjs.entry.js +8 -5
- package/dist/cjs/bq-option-list_2.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-option.cjs.entry.js +10 -9
- package/dist/cjs/bq-option.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-page-title.cjs.entry.js +7 -4
- package/dist/cjs/bq-page-title.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-progress.cjs.entry.js +1 -1
- package/dist/cjs/bq-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/bq-radio.cjs.entry.js +1 -1
- package/dist/cjs/bq-select.cjs.entry.js +10 -15
- package/dist/cjs/bq-select.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-side-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/bq-side-menu.cjs.entry.js +1 -1
- package/dist/cjs/bq-slider.cjs.entry.js +1 -1
- package/dist/cjs/bq-spinner.cjs.entry.js +8 -6
- package/dist/cjs/bq-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-status.cjs.entry.js +1 -1
- package/dist/cjs/bq-step-item.cjs.entry.js +1 -1
- package/dist/cjs/bq-steps.cjs.entry.js +1 -1
- package/dist/cjs/bq-switch.cjs.entry.js +2 -2
- package/dist/cjs/bq-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/bq-tab.cjs.entry.js +7 -4
- package/dist/cjs/bq-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-textarea.cjs.entry.js +7 -8
- package/dist/cjs/bq-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-toast.cjs.entry.js +1 -1
- package/dist/cjs/bq-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/{index-0c8d249a.js → index-d734f710.js} +13 -11
- package/dist/cjs/index-d734f710.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{isDefined-5e8aae9d.js → isDefined-642f676a.js} +2 -2
- package/dist/cjs/{isDefined-5e8aae9d.js.map → isDefined-642f676a.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{slot-2fee189a.js → slot-c3eeb29f.js} +3 -1
- package/dist/cjs/slot-c3eeb29f.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/accordion/bq-accordion.js +5 -6
- package/dist/collection/components/accordion/bq-accordion.js.map +1 -1
- package/dist/collection/components/alert/bq-alert.js +6 -7
- package/dist/collection/components/alert/bq-alert.js.map +1 -1
- package/dist/collection/components/alert/scss/bq-alert.css +1 -1
- package/dist/collection/components/badge/bq-badge.js +6 -3
- package/dist/collection/components/badge/bq-badge.js.map +1 -1
- package/dist/collection/components/breadcrumb/bq-breadcrumb.js +4 -1
- package/dist/collection/components/breadcrumb/bq-breadcrumb.js.map +1 -1
- package/dist/collection/components/button/bq-button.js +5 -2
- package/dist/collection/components/button/bq-button.js.map +1 -1
- package/dist/collection/components/date-picker/bq-date-picker.js +27 -14
- package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
- package/dist/collection/components/date-picker/bq-date-picker.types.js.map +1 -1
- package/dist/collection/components/date-picker/helper/callyLibrary.js +73 -0
- package/dist/collection/components/date-picker/helper/callyLibrary.js.map +1 -0
- package/dist/collection/components/dialog/bq-dialog.js +6 -7
- package/dist/collection/components/dialog/bq-dialog.js.map +1 -1
- package/dist/collection/components/drawer/bq-drawer.js +7 -4
- package/dist/collection/components/drawer/bq-drawer.js.map +1 -1
- package/dist/collection/components/drawer/scss/bq-drawer.css +1 -1
- package/dist/collection/components/empty-state/bq-empty-state.js +8 -7
- package/dist/collection/components/empty-state/bq-empty-state.js.map +1 -1
- package/dist/collection/components/input/bq-input.js +8 -11
- package/dist/collection/components/input/bq-input.js.map +1 -1
- package/dist/collection/components/notification/bq-notification.js +6 -5
- package/dist/collection/components/notification/bq-notification.js.map +1 -1
- package/dist/collection/components/option/bq-option.js +8 -7
- package/dist/collection/components/option/bq-option.js.map +1 -1
- package/dist/collection/components/page-title/bq-page-title.js +5 -2
- package/dist/collection/components/page-title/bq-page-title.js.map +1 -1
- package/dist/collection/components/select/bq-select.js +6 -11
- package/dist/collection/components/select/bq-select.js.map +1 -1
- package/dist/collection/components/select/scss/bq-select.css +1 -1
- package/dist/collection/components/spinner/bq-spinner.js +6 -4
- package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
- package/dist/collection/components/tab/bq-tab.js +5 -2
- package/dist/collection/components/tab/bq-tab.js.map +1 -1
- package/dist/collection/components/tag/bq-tag.js +6 -3
- package/dist/collection/components/tag/bq-tag.js.map +1 -1
- package/dist/collection/components/textarea/bq-textarea.js +5 -6
- package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
- package/dist/collection/shared/utils/slot.js +2 -0
- package/dist/collection/shared/utils/slot.js.map +1 -1
- package/dist/components/bq-accordion-group.js +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-badge.js +1 -1
- package/dist/components/bq-breadcrumb-item.js +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-checkbox.js +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-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-radio-group.js +1 -1
- package/dist/components/bq-radio.js +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.js +1 -1
- package/dist/components/bq-slider.js +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-step-item.js +1 -1
- package/dist/components/bq-steps.js +1 -1
- package/dist/components/bq-switch.js +1 -1
- package/dist/components/bq-tab-group.js +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-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-d7ce7165.js → p-260d4ca0.js} +2 -2
- package/dist/components/{p-d7ce7165.js.map → p-260d4ca0.js.map} +1 -1
- package/dist/components/{p-9a115ee5.js → p-263a1cc6.js} +2 -2
- package/dist/components/{p-5b34bd04.js → p-33faef06.js} +2 -2
- package/dist/components/p-46f7e0e3.js +6 -0
- package/dist/components/p-46f7e0e3.js.map +1 -0
- package/dist/components/{p-ac26ffcd.js → p-5c61f1f5.js} +2 -2
- package/dist/components/p-6078fd87.js +6 -0
- package/dist/components/{p-8d8eeb62.js → p-6478d24c.js} +2 -2
- package/dist/components/{p-f5588ccd.js → p-6c1e486c.js} +2 -2
- package/dist/components/p-6c1e486c.js.map +1 -0
- package/dist/components/{p-a02c6b73.js → p-71751caa.js} +2 -2
- package/dist/components/p-71751caa.js.map +1 -0
- package/dist/components/{p-b50adb19.js → p-8d04a487.js} +2 -2
- package/dist/components/p-a731ba87.js +6 -0
- package/dist/components/p-a731ba87.js.map +1 -0
- package/dist/components/{p-c58e0d87.js → p-f7c2d883.js} +2 -2
- package/dist/custom-elements.json +5881 -5948
- package/dist/esm/{assetsPath-57848212.js → assetsPath-060da522.js} +2 -2
- package/dist/esm/{assetsPath-57848212.js.map → assetsPath-060da522.js.map} +1 -1
- package/dist/esm/beeq.js +4 -4
- package/dist/esm/beeq.js.map +1 -1
- package/dist/esm/bq-accordion-group.entry.js +1 -1
- package/dist/esm/bq-accordion.entry.js +7 -8
- package/dist/esm/bq-accordion.entry.js.map +1 -1
- package/dist/esm/bq-alert.entry.js +9 -10
- package/dist/esm/bq-alert.entry.js.map +1 -1
- package/dist/esm/bq-avatar.entry.js +1 -1
- package/dist/esm/bq-badge.entry.js +8 -5
- package/dist/esm/bq-badge.entry.js.map +1 -1
- package/dist/esm/bq-breadcrumb-item.entry.js +2 -2
- package/dist/esm/bq-breadcrumb.entry.js +5 -2
- package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
- package/dist/esm/bq-button_2.entry.js +9 -6
- package/dist/esm/bq-button_2.entry.js.map +1 -1
- package/dist/esm/bq-card.entry.js +1 -1
- package/dist/esm/bq-checkbox.entry.js +1 -1
- package/dist/esm/bq-date-picker.entry.js +97 -17
- package/dist/esm/bq-date-picker.entry.js.map +1 -1
- package/dist/esm/bq-dialog.entry.js +8 -9
- package/dist/esm/bq-dialog.entry.js.map +1 -1
- package/dist/esm/bq-divider.entry.js +2 -2
- package/dist/esm/bq-drawer.entry.js +10 -7
- package/dist/esm/bq-drawer.entry.js.map +1 -1
- package/dist/esm/bq-dropdown_2.entry.js +1 -1
- package/dist/esm/bq-empty-state.entry.js +10 -9
- package/dist/esm/bq-empty-state.entry.js.map +1 -1
- package/dist/esm/bq-input.entry.js +11 -14
- package/dist/esm/bq-input.entry.js.map +1 -1
- package/dist/esm/bq-notification.entry.js +8 -7
- package/dist/esm/bq-notification.entry.js.map +1 -1
- package/dist/esm/bq-option-group.entry.js +1 -1
- package/dist/esm/bq-option-list_2.entry.js +8 -5
- package/dist/esm/bq-option-list_2.entry.js.map +1 -1
- package/dist/esm/bq-option.entry.js +10 -9
- package/dist/esm/bq-option.entry.js.map +1 -1
- package/dist/esm/bq-page-title.entry.js +7 -4
- package/dist/esm/bq-page-title.entry.js.map +1 -1
- package/dist/esm/bq-progress.entry.js +1 -1
- package/dist/esm/bq-radio-group.entry.js +1 -1
- package/dist/esm/bq-radio.entry.js +1 -1
- package/dist/esm/bq-select.entry.js +10 -15
- package/dist/esm/bq-select.entry.js.map +1 -1
- package/dist/esm/bq-side-menu-item.entry.js +2 -2
- package/dist/esm/bq-side-menu.entry.js +1 -1
- package/dist/esm/bq-slider.entry.js +1 -1
- package/dist/esm/bq-spinner.entry.js +8 -6
- package/dist/esm/bq-spinner.entry.js.map +1 -1
- package/dist/esm/bq-status.entry.js +1 -1
- package/dist/esm/bq-step-item.entry.js +1 -1
- package/dist/esm/bq-steps.entry.js +1 -1
- package/dist/esm/bq-switch.entry.js +2 -2
- package/dist/esm/bq-tab-group.entry.js +1 -1
- package/dist/esm/bq-tab.entry.js +7 -4
- package/dist/esm/bq-tab.entry.js.map +1 -1
- package/dist/esm/bq-textarea.entry.js +7 -8
- package/dist/esm/bq-textarea.entry.js.map +1 -1
- package/dist/esm/bq-toast.entry.js +1 -1
- package/dist/esm/bq-tooltip.entry.js +1 -1
- package/dist/esm/{index-59610291.js → index-46823bdb.js} +13 -11
- package/dist/esm/index-46823bdb.js.map +1 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/{isDefined-30b8b652.js → isDefined-8bdbf6b8.js} +2 -2
- package/dist/esm/{isDefined-30b8b652.js.map → isDefined-8bdbf6b8.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{slot-58bfedb5.js → slot-be230a01.js} +3 -1
- package/dist/esm/slot-be230a01.js.map +1 -0
- package/dist/hydrate/index.js +227 -1284
- package/dist/hydrate/index.mjs +227 -1284
- package/dist/stencil.config.js +20 -17
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/components/accordion/bq-accordion.d.ts +1 -2
- package/dist/types/components/alert/bq-alert.d.ts +1 -2
- package/dist/types/components/badge/bq-badge.d.ts +2 -1
- package/dist/types/components/breadcrumb/bq-breadcrumb.d.ts +1 -0
- package/dist/types/components/button/bq-button.d.ts +1 -0
- package/dist/types/components/date-picker/bq-date-picker.d.ts +3 -4
- package/dist/types/components/date-picker/bq-date-picker.types.d.ts +16 -0
- package/dist/types/components/date-picker/helper/callyLibrary.d.ts +11 -0
- package/dist/types/components/dialog/bq-dialog.d.ts +1 -2
- package/dist/types/components/drawer/bq-drawer.d.ts +1 -0
- package/dist/types/components/empty-state/bq-empty-state.d.ts +2 -2
- package/dist/types/components/input/bq-input.d.ts +2 -4
- package/dist/types/components/notification/bq-notification.d.ts +2 -2
- package/dist/types/components/option/bq-option.d.ts +2 -2
- package/dist/types/components/page-title/bq-page-title.d.ts +1 -0
- package/dist/types/components/select/bq-select.d.ts +1 -4
- package/dist/types/components/tab/bq-tab.d.ts +1 -0
- package/dist/types/components/tag/bq-tag.d.ts +1 -0
- package/dist/types/components/textarea/bq-textarea.d.ts +1 -2
- package/dist/types/global.d.ts +0 -10
- package/package.json +2 -3
- package/dist/beeq/p-19f5a833.entry.js.map +0 -1
- package/dist/beeq/p-34611c2f.js +0 -6
- package/dist/beeq/p-34611c2f.js.map +0 -1
- package/dist/beeq/p-39a80765.entry.js.map +0 -1
- package/dist/beeq/p-3fe626f1.entry.js.map +0 -1
- package/dist/beeq/p-4a3784e1.js +0 -7
- package/dist/beeq/p-4a3784e1.js.map +0 -1
- package/dist/beeq/p-59a1b546.entry.js.map +0 -1
- package/dist/beeq/p-65d67b85.entry.js.map +0 -1
- package/dist/beeq/p-6bea33f4.entry.js +0 -6
- package/dist/beeq/p-6bea33f4.entry.js.map +0 -1
- package/dist/beeq/p-70310ac8.entry.js.map +0 -1
- package/dist/beeq/p-959c3d05.entry.js.map +0 -1
- package/dist/beeq/p-a4e11bbc.entry.js.map +0 -1
- package/dist/beeq/p-a941b0bb.entry.js.map +0 -1
- package/dist/beeq/p-b067c558.entry.js.map +0 -1
- package/dist/beeq/p-b69f347d.entry.js.map +0 -1
- package/dist/beeq/p-ba1f9637.entry.js.map +0 -1
- package/dist/beeq/p-cb9fa154.entry.js.map +0 -1
- package/dist/beeq/p-cf923c68.js +0 -6
- package/dist/beeq/p-dbac0368.entry.js.map +0 -1
- package/dist/beeq/p-e8f147c2.entry.js.map +0 -1
- package/dist/cjs/cally-1bde2e82.js +0 -1162
- package/dist/cjs/cally-1bde2e82.js.map +0 -1
- package/dist/cjs/index-0c8d249a.js.map +0 -1
- package/dist/cjs/slot-2fee189a.js.map +0 -1
- package/dist/components/p-34611c2f.js +0 -6
- package/dist/components/p-34611c2f.js.map +0 -1
- package/dist/components/p-37483f1c.js +0 -6
- package/dist/components/p-37483f1c.js.map +0 -1
- package/dist/components/p-6e0c7ab4.js +0 -6
- package/dist/components/p-a02c6b73.js.map +0 -1
- package/dist/components/p-d16482dc.js +0 -6
- package/dist/components/p-d16482dc.js.map +0 -1
- package/dist/components/p-f5588ccd.js.map +0 -1
- package/dist/esm/cally-49a83be1.js +0 -1157
- package/dist/esm/cally-49a83be1.js.map +0 -1
- package/dist/esm/index-59610291.js.map +0 -1
- package/dist/esm/slot-58bfedb5.js.map +0 -1
- /package/dist/beeq/{p-e655938a.entry.js.map → p-0ac37ff8.entry.js.map} +0 -0
- /package/dist/beeq/{p-803269b3.entry.js.map → p-1a8f376a.entry.js.map} +0 -0
- /package/dist/beeq/{p-3806d9e3.entry.js.map → p-24135e46.entry.js.map} +0 -0
- /package/dist/beeq/{p-e4dd6ff4.js.map → p-2b530ad4.js.map} +0 -0
- /package/dist/beeq/{p-c42f9ac5.entry.js.map → p-38ee4c02.entry.js.map} +0 -0
- /package/dist/beeq/{p-b7b3f7c6.entry.js.map → p-3f5865c0.entry.js.map} +0 -0
- /package/dist/beeq/{p-9a7af424.entry.js.map → p-45bfda93.entry.js.map} +0 -0
- /package/dist/beeq/{p-a8075be3.entry.js.map → p-63b4f8f9.entry.js.map} +0 -0
- /package/dist/beeq/{p-4d21a49d.entry.js.map → p-648da701.entry.js.map} +0 -0
- /package/dist/beeq/{p-a8d64d1b.entry.js.map → p-7bb8664c.entry.js.map} +0 -0
- /package/dist/beeq/{p-7585f825.entry.js.map → p-7ff775a3.entry.js.map} +0 -0
- /package/dist/beeq/{p-5546f242.entry.js.map → p-801f7b25.entry.js.map} +0 -0
- /package/dist/beeq/{p-cf923c68.js.map → p-852225bc.js.map} +0 -0
- /package/dist/beeq/{p-7efff703.entry.js.map → p-9a803ecf.entry.js.map} +0 -0
- /package/dist/beeq/{p-b129db1a.entry.js.map → p-9eea4f4f.entry.js.map} +0 -0
- /package/dist/beeq/{p-ed569a61.entry.js.map → p-a3c36d6c.entry.js.map} +0 -0
- /package/dist/beeq/{p-bbaad491.entry.js.map → p-a620392e.entry.js.map} +0 -0
- /package/dist/beeq/{p-66b6d69a.entry.js.map → p-a661454e.entry.js.map} +0 -0
- /package/dist/beeq/{p-4500ffe5.entry.js.map → p-a7c4f022.entry.js.map} +0 -0
- /package/dist/beeq/{p-3f654a12.entry.js.map → p-b1ab6b7f.entry.js.map} +0 -0
- /package/dist/beeq/{p-f4e8ebd3.entry.js.map → p-ba8b92f1.entry.js.map} +0 -0
- /package/dist/beeq/{p-8ed41b69.entry.js.map → p-bc1980d8.entry.js.map} +0 -0
- /package/dist/beeq/{p-ee1ecb6e.entry.js.map → p-f48c3ca7.entry.js.map} +0 -0
- /package/dist/components/{p-9a115ee5.js.map → p-263a1cc6.js.map} +0 -0
- /package/dist/components/{p-5b34bd04.js.map → p-33faef06.js.map} +0 -0
- /package/dist/components/{p-ac26ffcd.js.map → p-5c61f1f5.js.map} +0 -0
- /package/dist/components/{p-6e0c7ab4.js.map → p-6078fd87.js.map} +0 -0
- /package/dist/components/{p-8d8eeb62.js.map → p-6478d24c.js.map} +0 -0
- /package/dist/components/{p-b50adb19.js.map → p-8d04a487.js.map} +0 -0
- /package/dist/components/{p-c58e0d87.js.map → p-f7c2d883.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-notification.js","sourceRoot":"","sources":["../../../../../../src/components/notification/bq-notification.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { NOTIFICATION_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 // 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 handleContentSlotChange = () => {\n this.hasContent = hasSlotContent(this.bodyElem);\n };\n\n private handleFooterSlotChange = () => {\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.handleContentSlotChange} />\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.handleFooterSlotChange} />\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"bq-notification.js","sourceRoot":"","sources":["../../../../../../src/components/notification/bq-notification.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAErH,OAAO,EAAE,iBAAiB,EAAgD,MAAM,yBAAyB,CAAC;AAC1G,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEpH,MAAM,4BAA4B,GAAG,wBAAwB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AAMH,MAAM,OAAO,cAAc;IACzB,iBAAiB;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C,IAAI,EAAC,SAAS;wBAE/E,4DAAK,KAAK,EAAC,0CAA0C,EAAC,IAAI,EAAC,OAAO;4BAChE,8DAAQ,CACJ;wBAEN,4DACE,KAAK,EAAE,EAAE,wBAAwB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,EACtE,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,EACnC,IAAI,EAAC,MAAM;4BAEX,6DAAM,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACrD,CACF;oBAEN,4DACE,KAAK,EAAE,EAAE,yBAAyB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EACtE,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,EACrC,IAAI,EAAC,QAAQ;wBAEb,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACvD,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { NOTIFICATION_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"]}
|
|
@@ -89,6 +89,9 @@ export class BqOption {
|
|
|
89
89
|
// Component lifecycle events
|
|
90
90
|
// Ordered by their natural call order
|
|
91
91
|
// =====================================
|
|
92
|
+
componentDidLoad() {
|
|
93
|
+
this.handleSlotChange();
|
|
94
|
+
}
|
|
92
95
|
// Listeners
|
|
93
96
|
// ==============
|
|
94
97
|
onKeyDown(event) {
|
|
@@ -130,10 +133,8 @@ export class BqOption {
|
|
|
130
133
|
}
|
|
131
134
|
this.bqClick.emit(this.el);
|
|
132
135
|
};
|
|
133
|
-
|
|
136
|
+
handleSlotChange = () => {
|
|
134
137
|
this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');
|
|
135
|
-
};
|
|
136
|
-
handleSuffixSlotChange = () => {
|
|
137
138
|
this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');
|
|
138
139
|
};
|
|
139
140
|
get isDisabledOrHidden() {
|
|
@@ -143,17 +144,17 @@ export class BqOption {
|
|
|
143
144
|
// Always the last one in the class.
|
|
144
145
|
// ===================================
|
|
145
146
|
render() {
|
|
146
|
-
return (h(Host, { key: '
|
|
147
|
+
return (h(Host, { key: '1be886ea81c2b09fc6731e921995a46725aa3e8e', "aria-disabled": this.isDisabledOrHidden ? 'true' : 'false', "aria-hidden": this.hidden ? 'true' : 'false', "aria-selected": this.selected ? 'true' : 'false', role: "option" }, h("div", { key: '258189fbd1bbf931a6555539d28d210a64a12d7f', class: {
|
|
147
148
|
'bq-option': true,
|
|
148
149
|
disabled: this.disabled,
|
|
149
150
|
active: !this.disabled && this.selected,
|
|
150
|
-
}, onBlur: this.onBlur, onFocus: this.onFocus, onClick: this.onClick, tabindex: this.isDisabledOrHidden ? '-1' : '0', role: "button", part: "base" }, h("span", { key: '
|
|
151
|
+
}, onBlur: this.onBlur, onFocus: this.onFocus, onClick: this.onClick, tabindex: this.isDisabledOrHidden ? '-1' : '0', role: "button", part: "base" }, h("span", { key: '8910e42ffb4125d63d7086ffb5d035e43c3cd35a', class: {
|
|
151
152
|
'bq-option__prefix me-[--bq-option--gap-start] flex items-center': true,
|
|
152
153
|
'!hidden': !this.hasPrefix,
|
|
153
|
-
}, ref: (elem) => (this.prefixElem = elem), part: "prefix" }, h("slot", { key: '
|
|
154
|
+
}, ref: (elem) => (this.prefixElem = elem), part: "prefix" }, h("slot", { key: 'b5cdce62eb2299b741b9c575b97c0c702ef2ad5e', name: "prefix", onSlotchange: this.handleSlotChange })), h("span", { key: '6e204cf745ed9c2585167483ba1293f628ef1e5a', class: "bq-option__label", part: "label" }, h("slot", { key: '7c9fc96ce28239d0d1fc6fd68089083725e0f621' })), h("span", { key: 'ef52e125bff41a4226ac2d302cd85a8093ff4b83', class: {
|
|
154
155
|
'bq-option__suffix ml-auto ms-[--bq-option--gap-end] flex items-center': true,
|
|
155
156
|
'!hidden': !this.hasSuffix,
|
|
156
|
-
}, ref: (elem) => (this.suffixElem = elem), part: "suffix" }, h("slot", { key: '
|
|
157
|
+
}, ref: (elem) => (this.suffixElem = elem), part: "suffix" }, h("slot", { key: '45042b8677df77b8216e9d68e56094bd1fb1aa55', name: "suffix", onSlotchange: this.handleSlotChange })))));
|
|
157
158
|
}
|
|
158
159
|
static get is() { return "bq-option"; }
|
|
159
160
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-option.js","sourceRoot":"","sources":["../../../../../../src/components/option/bq-option.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtG,OAAO,EAAE,cAAc,EAAE,MAAM,oBA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AAY,EAAE,IAAI,CAAC,sBAAsB,GAAI,CAC5D,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State } from '@stencil/core';\n\nimport { hasSlotContent } from '../../shared/utils';\n\n/**\n * An option refers to a specific choice that appears in a list of selectable items that can be opened or closed by the user.\n * It can be an element of the navigation system that allows users to select different sections or pages within an application or it can be used within a dropdown list.\n *\n * @example How to use it\n * ```html\n * <bq-option value=\"user\">\n * <span>User profile</span>\n * <bq-icon slot=\"suffix\" name=\"user\"></bq-icon>\n * </bq-option>\n * ```\n *\n * @documentation https://storybook.beeq.design/?path=/story/components-option--with-option-group\n * @status stable\n *\n * @attr {boolean} disabled - If true, the option is disabled.\n * @attr {boolean} hidden - If true, the option is hidden.\n * @attr {string} value - A string representing the value of the option. Can be used to identify the item.\n * @attr {boolean} selected - If true, the option is selected and active.\n *\n * @event bqBlur - Handler to be called when item loses focus.\n * @event bqFocus - Handler to be called when item is focused.\n * @event bqClick - Handler to be called when item is clicked.\n * @event bqEnter - Handler to be called on enter key press.\n *\n * @slot prefix - The prefix content to be displayed before the label.\n * @slot - The label content to be displayed.\n *\n * @part base - The component's internal wrapper.\n * @part label - The `span` element in which the label text is displayed.\n * @part prefix - The `span` element in which the prefix is displayed (generally `bq-icon`).\n * @part suffix - The `span` element in which the suffix is displayed (generally `bq-icon`).\n *\n * @cssprop --bq-option--background - background color\n * @cssprop --bq-option--font-size - font size\n * @cssprop --bq-option--border-color - border color\n * @cssprop --bq-option--border-style - border style\n * @cssprop --bq-option--border-width - border width\n * @cssprop --bq-option--border-radius - border radius\n * @cssprop --bq-option--box-shadow - box shadow\n * @cssprop --bq-option--gap-start - gap space between prefix and label\n * @cssprop --bq-option--gap-end - gap space between label and suffix\n * @cssprop --bq-option--paddingY - padding Y axis\n * @cssprop --bq-option--padding-start - option label padding start\n * @cssprop --bq-option--padding-end - option label padding end\n */\n@Component({\n tag: 'bq-option',\n styleUrl: './scss/bq-option.scss',\n shadow: true,\n})\nexport class BqOption {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqOptionElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasPrefix: boolean = false;\n @State() hasSuffix: boolean = false;\n\n // Public Property API\n // ========================\n\n /** If true, the option is hidden. */\n @Prop({ reflect: true }) hidden: boolean = false;\n\n /** If true, the option is disabled. */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** A string representing the value of the option. Can be used to identify the item */\n @Prop({ reflect: true }) value?: string;\n\n /** If true, the option is selected and active. */\n @Prop({ reflect: true }) selected: boolean = false;\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when item loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called when item is focused */\n @Event() bqFocus: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called when item is clicked */\n @Event() bqClick: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called on enter key press */\n @Event() bqEnter: EventEmitter<HTMLBqOptionElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n // Listeners\n // ==============\n\n @Listen('keydown')\n onKeyDown(event: KeyboardEvent) {\n if (event.key !== 'Enter') return;\n this.bqEnter.emit(this.el);\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private onBlur = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqBlur.emit(this.el);\n };\n\n private onFocus = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqFocus.emit(this.el);\n };\n\n private onClick = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqClick.emit(this.el);\n };\n\n private onSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n };\n\n private handleSuffixSlotChange = () => {\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private get isDisabledOrHidden() {\n return this.disabled || this.hidden;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host\n aria-disabled={this.isDisabledOrHidden ? 'true' : 'false'}\n aria-hidden={this.hidden ? 'true' : 'false'}\n aria-selected={this.selected ? 'true' : 'false'}\n role=\"option\"\n >\n <div\n class={{\n 'bq-option': true,\n disabled: this.disabled,\n active: !this.disabled && this.selected,\n }}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.onClick}\n tabindex={this.isDisabledOrHidden ? '-1' : '0'}\n role=\"button\"\n part=\"base\"\n >\n <span\n class={{\n 'bq-option__prefix me-[--bq-option--gap-start] flex items-center': true,\n '!hidden': !this.hasPrefix,\n }}\n ref={(elem) => (this.prefixElem = elem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.onSlotChange} />\n </span>\n <span class=\"bq-option__label\" part=\"label\">\n <slot />\n </span>\n <span\n class={{\n 'bq-option__suffix ml-auto ms-[--bq-option--gap-end] flex items-center': true,\n '!hidden': !this.hasSuffix,\n }}\n ref={(elem) => (this.suffixElem = elem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSuffixSlotChange} />\n </span>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"bq-option.js","sourceRoot":"","sources":["../../../../../../src/components/option/bq-option.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtG,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAMH,MAAM,OAAO,QAAQ;IACnB,iBAAiB;IACjB,uBAAuB;IAEf,UAAU,CAAc;IACxB,UAAU,CAAc;IAEhC,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAuB;IAEpC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAEjC,SAAS,GAAY,KAAK,CAAC;IAC3B,SAAS,GAAY,KAAK,CAAC;IAEpC,sBAAsB;IACtB,2BAA2B;IAE3B,qCAAqC;IACZ,MAAM,GAAY,KAAK,CAAC;IAEjD,uCAAuC;IACd,QAAQ,GAAa,KAAK,CAAC;IAEpD,sFAAsF;IAC7D,KAAK,CAAU;IAExC,kDAAkD;IACzB,QAAQ,GAAY,KAAK,CAAC;IAEnD,wBAAwB;IACxB,0BAA0B;IAE1B,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,iDAAiD;IACxC,MAAM,CAAoC;IAEnD,gDAAgD;IACvC,OAAO,CAAoC;IAEpD,gDAAgD;IACvC,OAAO,CAAoC;IAEpD,8CAA8C;IACrC,OAAO,CAAoC;IAEpD,6BAA6B;IAC7B,sCAAsC;IACtC,wCAAwC;IAExC,gBAAgB;QACd,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAED,YAAY;IACZ,iBAAiB;IAGjB,SAAS,CAAC,KAAoB;QAC5B,IAAI,KAA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AM,KAAK,EAAC,kBAAkB,EAAC,IAAI,EAAC,OAAO;oBACzC,8DAAQ,CACH;gBACP,6DACE,KAAK,EAAE;wBACL,uEAAuE,EAAE,IAAI;wBAC7E,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS;qBAC3B,EACD,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,EACvC,IAAI,EAAC,QAAQ;oBAEb,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACtD,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State } from '@stencil/core';\n\nimport { hasSlotContent } from '../../shared/utils';\n\n/**\n * An option refers to a specific choice that appears in a list of selectable items that can be opened or closed by the user.\n * It can be an element of the navigation system that allows users to select different sections or pages within an application or it can be used within a dropdown list.\n *\n * @example How to use it\n * ```html\n * <bq-option value=\"user\">\n * <span>User profile</span>\n * <bq-icon slot=\"suffix\" name=\"user\"></bq-icon>\n * </bq-option>\n * ```\n *\n * @documentation https://storybook.beeq.design/?path=/story/components-option--with-option-group\n * @status stable\n *\n * @attr {boolean} disabled - If true, the option is disabled.\n * @attr {boolean} hidden - If true, the option is hidden.\n * @attr {string} value - A string representing the value of the option. Can be used to identify the item.\n * @attr {boolean} selected - If true, the option is selected and active.\n *\n * @event bqBlur - Handler to be called when item loses focus.\n * @event bqFocus - Handler to be called when item is focused.\n * @event bqClick - Handler to be called when item is clicked.\n * @event bqEnter - Handler to be called on enter key press.\n *\n * @slot prefix - The prefix content to be displayed before the label.\n * @slot - The label content to be displayed.\n *\n * @part base - The component's internal wrapper.\n * @part label - The `span` element in which the label text is displayed.\n * @part prefix - The `span` element in which the prefix is displayed (generally `bq-icon`).\n * @part suffix - The `span` element in which the suffix is displayed (generally `bq-icon`).\n *\n * @cssprop --bq-option--background - background color\n * @cssprop --bq-option--font-size - font size\n * @cssprop --bq-option--border-color - border color\n * @cssprop --bq-option--border-style - border style\n * @cssprop --bq-option--border-width - border width\n * @cssprop --bq-option--border-radius - border radius\n * @cssprop --bq-option--box-shadow - box shadow\n * @cssprop --bq-option--gap-start - gap space between prefix and label\n * @cssprop --bq-option--gap-end - gap space between label and suffix\n * @cssprop --bq-option--paddingY - padding Y axis\n * @cssprop --bq-option--padding-start - option label padding start\n * @cssprop --bq-option--padding-end - option label padding end\n */\n@Component({\n tag: 'bq-option',\n styleUrl: './scss/bq-option.scss',\n shadow: true,\n})\nexport class BqOption {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqOptionElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() hasPrefix: boolean = false;\n @State() hasSuffix: boolean = false;\n\n // Public Property API\n // ========================\n\n /** If true, the option is hidden. */\n @Prop({ reflect: true }) hidden: boolean = false;\n\n /** If true, the option is disabled. */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /** A string representing the value of the option. Can be used to identify the item */\n @Prop({ reflect: true }) value?: string;\n\n /** If true, the option is selected and active. */\n @Prop({ reflect: true }) selected: boolean = false;\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when item loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called when item is focused */\n @Event() bqFocus: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called when item is clicked */\n @Event() bqClick: EventEmitter<HTMLBqOptionElement>;\n\n /** Handler to be called on enter key press */\n @Event() bqEnter: EventEmitter<HTMLBqOptionElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('keydown')\n onKeyDown(event: KeyboardEvent) {\n if (event.key !== 'Enter') return;\n this.bqEnter.emit(this.el);\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private onBlur = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqBlur.emit(this.el);\n };\n\n private onFocus = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqFocus.emit(this.el);\n };\n\n private onClick = (event: Event) => {\n if (this.isDisabledOrHidden) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n this.bqClick.emit(this.el);\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private get isDisabledOrHidden() {\n return this.disabled || this.hidden;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host\n aria-disabled={this.isDisabledOrHidden ? 'true' : 'false'}\n aria-hidden={this.hidden ? 'true' : 'false'}\n aria-selected={this.selected ? 'true' : 'false'}\n role=\"option\"\n >\n <div\n class={{\n 'bq-option': true,\n disabled: this.disabled,\n active: !this.disabled && this.selected,\n }}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.onClick}\n tabindex={this.isDisabledOrHidden ? '-1' : '0'}\n role=\"button\"\n part=\"base\"\n >\n <span\n class={{\n 'bq-option__prefix me-[--bq-option--gap-start] flex items-center': true,\n '!hidden': !this.hasPrefix,\n }}\n ref={(elem) => (this.prefixElem = elem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <span class=\"bq-option__label\" part=\"label\">\n <slot />\n </span>\n <span\n class={{\n 'bq-option__suffix ml-auto ms-[--bq-option--gap-end] flex items-center': true,\n '!hidden': !this.hasSuffix,\n }}\n ref={(elem) => (this.suffixElem = elem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -75,6 +75,9 @@ export class BqPageTitle {
|
|
|
75
75
|
// Component lifecycle events
|
|
76
76
|
// Ordered by their natural call order
|
|
77
77
|
// =====================================
|
|
78
|
+
componentDidLoad() {
|
|
79
|
+
this.handleSlotChange();
|
|
80
|
+
}
|
|
78
81
|
// Listeners
|
|
79
82
|
// ==============
|
|
80
83
|
// Public methods API
|
|
@@ -96,10 +99,10 @@ export class BqPageTitle {
|
|
|
96
99
|
// Always the last one in the class.
|
|
97
100
|
// ===================================
|
|
98
101
|
render() {
|
|
99
|
-
return (h("div", { key: '
|
|
102
|
+
return (h("div", { key: '234aa6eeb328738441f3545b61257ec3a14c51cf', class: "flex gap-xs p-b-[--paddingY] [border-block-end:--subtitle-borderBlockEnd]", part: "base" }, h("div", { key: '867d26e55922753a1ff3d9b9f15167299621d49b', class: { flex: true, '!hidden': !this.haveBackNavigation }, ref: (divElem) => (this.backNavigationElem = divElem), part: "back" }, h("slot", { key: '61eb7494f390391b228a899227bf0680f448ba40', name: "back", onSlotchange: this.handleSlotChange })), h("div", { key: 'b57edbfbdbea5f00109e24f44ba6a6a2a0b8f3d8', class: "flex flex-grow flex-col gap-xs", part: "content" }, h("div", { key: 'c28bc08aa42afce9dea80be4766b41f8d52462db', class: "flex items-center gap-xs", part: "title-suffix" }, h("h1", { key: 'a0e1bd317189dc33a6deb4fd7d76c2aec3c6fa51', class: "title-font text-[length:--title-textSize] font-[--title-fontWeight] leading-[--title-lineHeight] text-[color:--title-textColor]", part: "title" }, h("slot", { key: '24ff8fc569dc979b33e8bc8e02574f78e66fb450' })), h("div", { key: '3c0538de7c6829880a5110568cbb16ccc1645dd4', class: { 'flex flex-grow gap-xs p-b-xs2 p-i-xs2': true, '!hidden': !this.hasSuffix }, ref: (divElem) => (this.suffixElem = divElem), part: "suffix" }, h("slot", { key: '78dca26a8830e20704d7076344e7633792987aa3', name: "suffix", onSlotchange: this.handleSlotChange }))), h("div", { key: '85ebbeb207db40c0a276ab6b0640151189287fdb', class: {
|
|
100
103
|
'title-font text-[length:--subtitle-textSize] font-[--subtitle-fontWeight] leading-[--title-lineHeight] text-[color:--subtitle-textColor]': true,
|
|
101
104
|
hidden: !this.hasSubTitle,
|
|
102
|
-
}, ref: (divElem) => (this.subTitleElem = divElem), part: "sub-title" }, h("slot", { key: '
|
|
105
|
+
}, ref: (divElem) => (this.subTitleElem = divElem), part: "sub-title" }, h("slot", { key: '7e4aa79164d537dba69db069cd760897a92bdf95', name: "sub-title", onSlotchange: this.handleSlotChange })))));
|
|
103
106
|
}
|
|
104
107
|
static get is() { return "bq-page-title"; }
|
|
105
108
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-page-title.js","sourceRoot":"","sources":["../../../../../../src/components/page-title/bq-page-title.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAMH,MAAM,OAAO,WAAW;IACtB,iBAAiB;IACjB,uBAAuB;IAEf,kBAAkB,CAAc;IAChC,UAAU,CAAc;IACxB,YAAY,CAAc;IAElC,iCAAiC;IACjC,sCA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4DAAK,KAAK,EAAC,gCAAgC,EAAC,IAAI,EAAC,SAAS;gBACxD,4DAAK,KAAK,EAAC,0BAA0B,EAAC,IAAI,EAAC,cAAc;oBAEvD,2DACE,KAAK,EAAC,iIAAiI,EACvI,IAAI,EAAC,OAAO;wBAEZ,8DAAQ,CACL;oBAEL,4DACE,KAAK,EAAE,EAAE,uCAAuC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EACpF,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,EAC7C,IAAI,EAAC,QAAQ;wBAEb,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACvD,CACF;gBAEN,4DACE,KAAK,EAAE;wBACL,0IAA0I,EACxI,IAAI;wBACN,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW;qBAC1B,EACD,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,EAC/C,IAAI,EAAC,WAAW;oBAEhB,6DAAM,IAAI,EAAC,WAAW,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CAC1D,CACF,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, State } from '@stencil/core';\n\nimport { hasSlotContent } from '../../shared/utils';\n\n/**\n * The Page Title component is a versatile and essential element used to display the main title of a page or section within an application.\n *\n * @example How to use it\n * ```html\n * <bq-page-title>\n * <bq-button appearance=\"link\" slot=\"back\">\n * <bq-icon\n * color=\"text--primary\"\n * name=\"arrow-left\"\n * weight=\"bold\"\n * role=\"img\"\n * title=\"Navigate back to the previous page\"\n * ></bq-icon>\n * </bq-button>\n * Title\n * <div slot=\"sub-title\">Sub-title</div>\n * </bq-page-title>\n * ```\n *\n * @documentation https://storybook.beeq.design/?path=/docs/components-page-title--overview\n * @status stable\n *\n * @slot back - The back navigation button.\n * @slot - The main title content.\n * @slot sub-title - The sub-title content.\n * @slot suffix - The suffix content.\n *\n * @part base - The inner container `<div>`of element that contains the base page title component.\n * @part content - Defines the main container of the page title component, which includes the title and subtitle elements.\n * @part title-suffix - Defines the container that holds the title and any suffix content.\n * @part back - The container `<div>` page title element that acts as back slot container.\n * @part title - The `<h1>` element serves as a container for the page title content, to improve accessibility.\n * @part suffix - The `<div>` page title element that acts as suffix slot container.\n * @part sub-title - The `<div>` page title element that acts as sub-title slot container.\n *\n * @cssprop --paddingY - Padding top and bottom of the page title wrapper\n * @cssprop --subtitle-borderBlockEnd - Page title border end color\n * @cssprop --subtitle-fontWeight - Page title font weight for subtitle\n * @cssprop --subtitle-textColor - Page title color for sub-title\n * @cssprop --subtitle-textSize - Page title text size for subtitle\n * @cssprop --title-fontWeight - Page title font weight for title\n * @cssprop --title-lineHeight - Page title text line height\n * @cssprop --title-textColor - Page title color for title\n * @cssprop --title-textSize - Page title text size for title\n */\n@Component({\n tag: 'bq-page-title',\n styleUrl: './scss/bq-page-title.scss',\n shadow: true,\n})\nexport class BqPageTitle {\n // Own Properties\n // ====================\n\n private backNavigationElem: HTMLElement;\n private suffixElem: HTMLElement;\n private subTitleElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqPageTitleElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private haveBackNavigation = false;\n @State() private hasSuffix = false;\n @State() private hasSubTitle = false;\n\n // Public Property API\n // ========================\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleSlotChange = () => {\n this.haveBackNavigation = hasSlotContent(this.backNavigationElem, 'back');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n this.hasSubTitle = hasSlotContent(this.subTitleElem, 'sub-title');\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"flex gap-xs p-b-[--paddingY] [border-block-end:--subtitle-borderBlockEnd]\" part=\"base\">\n {/* Back navigation button */}\n <div\n class={{ flex: true, '!hidden': !this.haveBackNavigation }}\n ref={(divElem) => (this.backNavigationElem = divElem)}\n part=\"back\"\n >\n <slot name=\"back\" onSlotchange={this.handleSlotChange} />\n </div>\n <div class=\"flex flex-grow flex-col gap-xs\" part=\"content\">\n <div class=\"flex items-center gap-xs\" part=\"title-suffix\">\n {/* Title */}\n <h1\n class=\"title-font text-[length:--title-textSize] font-[--title-fontWeight] leading-[--title-lineHeight] text-[color:--title-textColor]\"\n part=\"title\"\n >\n <slot />\n </h1>\n {/* Suffix */}\n <div\n class={{ 'flex flex-grow gap-xs p-b-xs2 p-i-xs2': true, '!hidden': !this.hasSuffix }}\n ref={(divElem) => (this.suffixElem = divElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n {/* Sub-title */}\n <div\n class={{\n 'title-font text-[length:--subtitle-textSize] font-[--subtitle-fontWeight] leading-[--title-lineHeight] text-[color:--subtitle-textColor]':\n true,\n hidden: !this.hasSubTitle,\n }}\n ref={(divElem) => (this.subTitleElem = divElem)}\n part=\"sub-title\"\n >\n <slot name=\"sub-title\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"bq-page-title.js","sourceRoot":"","sources":["../../../../../../src/components/page-title/bq-page-title.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AA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\n\n/**\n * The Page Title component is a versatile and essential element used to display the main title of a page or section within an application.\n *\n * @example How to use it\n * ```html\n * <bq-page-title>\n * <bq-button appearance=\"link\" slot=\"back\">\n * <bq-icon\n * color=\"text--primary\"\n * name=\"arrow-left\"\n * weight=\"bold\"\n * role=\"img\"\n * title=\"Navigate back to the previous page\"\n * ></bq-icon>\n * </bq-button>\n * Title\n * <div slot=\"sub-title\">Sub-title</div>\n * </bq-page-title>\n * ```\n *\n * @documentation https://storybook.beeq.design/?path=/docs/components-page-title--overview\n * @status stable\n *\n * @slot back - The back navigation button.\n * @slot - The main title content.\n * @slot sub-title - The sub-title content.\n * @slot suffix - The suffix content.\n *\n * @part base - The inner container `<div>`of element that contains the base page title component.\n * @part content - Defines the main container of the page title component, which includes the title and subtitle elements.\n * @part title-suffix - Defines the container that holds the title and any suffix content.\n * @part back - The container `<div>` page title element that acts as back slot container.\n * @part title - The `<h1>` element serves as a container for the page title content, to improve accessibility.\n * @part suffix - The `<div>` page title element that acts as suffix slot container.\n * @part sub-title - The `<div>` page title element that acts as sub-title slot container.\n *\n * @cssprop --paddingY - Padding top and bottom of the page title wrapper\n * @cssprop --subtitle-borderBlockEnd - Page title border end color\n * @cssprop --subtitle-fontWeight - Page title font weight for subtitle\n * @cssprop --subtitle-textColor - Page title color for sub-title\n * @cssprop --subtitle-textSize - Page title text size for subtitle\n * @cssprop --title-fontWeight - Page title font weight for title\n * @cssprop --title-lineHeight - Page title text line height\n * @cssprop --title-textColor - Page title color for title\n * @cssprop --title-textSize - Page title text size for title\n */\n@Component({\n tag: 'bq-page-title',\n styleUrl: './scss/bq-page-title.scss',\n shadow: true,\n})\nexport class BqPageTitle {\n // Own Properties\n // ====================\n\n private backNavigationElem: HTMLElement;\n private suffixElem: HTMLElement;\n private subTitleElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqPageTitleElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private haveBackNavigation = false;\n @State() private hasSuffix = false;\n @State() private hasSubTitle = false;\n\n // Public Property API\n // ========================\n\n // Prop lifecycle events\n // =======================\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleSlotChange = () => {\n this.haveBackNavigation = hasSlotContent(this.backNavigationElem, 'back');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n this.hasSubTitle = hasSlotContent(this.subTitleElem, 'sub-title');\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div class=\"flex gap-xs p-b-[--paddingY] [border-block-end:--subtitle-borderBlockEnd]\" part=\"base\">\n {/* Back navigation button */}\n <div\n class={{ flex: true, '!hidden': !this.haveBackNavigation }}\n ref={(divElem) => (this.backNavigationElem = divElem)}\n part=\"back\"\n >\n <slot name=\"back\" onSlotchange={this.handleSlotChange} />\n </div>\n <div class=\"flex flex-grow flex-col gap-xs\" part=\"content\">\n <div class=\"flex items-center gap-xs\" part=\"title-suffix\">\n {/* Title */}\n <h1\n class=\"title-font text-[length:--title-textSize] font-[--title-fontWeight] leading-[--title-lineHeight] text-[color:--title-textColor]\"\n part=\"title\"\n >\n <slot />\n </h1>\n {/* Suffix */}\n <div\n class={{ 'flex flex-grow gap-xs p-b-xs2 p-i-xs2': true, '!hidden': !this.hasSuffix }}\n ref={(divElem) => (this.suffixElem = divElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n {/* Sub-title */}\n <div\n class={{\n 'title-font text-[length:--subtitle-textSize] font-[--subtitle-fontWeight] leading-[--title-lineHeight] text-[color:--subtitle-textColor]':\n true,\n hidden: !this.hasSubTitle,\n }}\n ref={(divElem) => (this.subTitleElem = divElem)}\n part=\"sub-title\"\n >\n <slot name=\"sub-title\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n </div>\n );\n }\n}\n"]}
|
|
@@ -226,6 +226,7 @@ export class BqSelect {
|
|
|
226
226
|
this.initMultipleValue();
|
|
227
227
|
}
|
|
228
228
|
componentDidLoad() {
|
|
229
|
+
this.handleSlotChange();
|
|
229
230
|
if (this.multiple && Array.isArray(this.value)) {
|
|
230
231
|
this.selectedOptions = this.options.filter((item) => this.value.includes(item.value));
|
|
231
232
|
}
|
|
@@ -369,16 +370,10 @@ export class BqSelect {
|
|
|
369
370
|
this.handleMultipleSelection(item);
|
|
370
371
|
this.bqSelect.emit({ value: this.value, item });
|
|
371
372
|
};
|
|
372
|
-
|
|
373
|
+
handleSlotChange = () => {
|
|
373
374
|
this.hasLabel = hasSlotContent(this.labelElem);
|
|
374
|
-
};
|
|
375
|
-
handlePrefixSlotChange = () => {
|
|
376
375
|
this.hasPrefix = hasSlotContent(this.prefixElem);
|
|
377
|
-
};
|
|
378
|
-
handleSuffixSlotChange = () => {
|
|
379
376
|
this.hasSuffix = hasSlotContent(this.suffixElem);
|
|
380
|
-
};
|
|
381
|
-
handleHelperTextSlotChange = () => {
|
|
382
377
|
this.hasHelperText = hasSlotContent(this.helperTextElem);
|
|
383
378
|
};
|
|
384
379
|
resetOptionsVisibility = () => {
|
|
@@ -475,19 +470,19 @@ export class BqSelect {
|
|
|
475
470
|
// ===================================
|
|
476
471
|
render() {
|
|
477
472
|
const labelId = `bq-select__label-${this.name || this.fallbackInputId}`;
|
|
478
|
-
return (h("div", { key: '
|
|
473
|
+
return (h("div", { key: '5e44b83a85f6938cdbf5b5b0cf73b343efceb6a9', class: "bq-select", part: "base" }, h("label", { key: 'ca0b78359e16b66b75b55b8db86dae3ce87d7c09', id: labelId, class: { 'bq-select__label': true, '!hidden': !this.hasLabel }, "aria-label": this.name || this.fallbackInputId, htmlFor: this.name || this.fallbackInputId, ref: (labelElem) => (this.labelElem = labelElem), part: "label" }, h("slot", { key: '483914810c82f7881a4f2d2a3f8a77872e5051b6', name: "label", onSlotchange: this.handleSlotChange })), h("bq-dropdown", { key: '7716752c1d9ab32fc445c100200edcb621686fd8', class: "bq-select__dropdown w-full", disabled: this.disabled, distance: this.distance, keepOpenOnSelect: this.keepOpenOnSelect, open: this.open, panelHeight: this.panelHeight, placement: this.placement, sameWidth: this.sameWidth, skidding: this.skidding, strategy: this.strategy, exportparts: "panel" }, h("div", { key: '01211150f4c2bfd0d5c6df507e43fae84448752f', class: {
|
|
479
474
|
'bq-select__control': true,
|
|
480
475
|
[`validation-${this.validationStatus}`]: true,
|
|
481
476
|
disabled: this.disabled,
|
|
482
|
-
}, part: "control", slot: "trigger" }, h("span", { key: '
|
|
477
|
+
}, part: "control", slot: "trigger" }, h("span", { key: '7dafaad97bd6194e8ed1fc86955d999075ee9320', class: { 'bq-select__control--prefix': true, '!hidden': !this.hasPrefix }, ref: (spanElem) => (this.prefixElem = spanElem), part: "prefix" }, h("slot", { key: '80bf0f97d32b119bd98d95acfb664cd3062f9014', name: "prefix", onSlotchange: this.handleSlotChange })), h("div", { key: '5cf5e7ec36f0c7f44d22e3a8a389d64e28e697a0', class: "flex flex-1 overflow-x-auto", part: "input-outline" }, this.multiple && (h("span", { key: 'fe418c58f8f115a8834502c4b6677f9e4c8ca4e5', class: "bq-select__tags", part: "tags" }, h("slot", { key: '7422992668def862a1687fd2f701d975b99d3352', name: "tags" }, this.displayTags))), h("input", { key: '1e28407314a524753705335919cf506bf4702f0b', id: this.name || this.fallbackInputId, class: "bq-select__control--input flex-grow is-full", autoComplete: "off", autoCapitalize: "off", "aria-disabled": this.disabled ? 'true' : 'false', "aria-controls": `bq-options-${this.name}`, "aria-expanded": this.open ? 'true' : 'false', "aria-haspopup": "listbox", disabled: this.disabled, form: this.form, name: this.name, placeholder: this.displayPlaceholder, ref: (inputElem) => (this.inputElem = inputElem), readOnly: this.readonly, required: this.required, role: "combobox", spellcheck: false, type: "text", value: this.displayValue, part: "input",
|
|
483
478
|
// Events
|
|
484
479
|
onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handleSearchFilter })), this.hasClearIcon && (
|
|
485
480
|
// The clear button will be visible as long as the input has a value
|
|
486
481
|
// and the parent group is hovered or has focus-within
|
|
487
|
-
h("bq-button", { key: '
|
|
482
|
+
h("bq-button", { key: 'ff96b89aeafb2acc542ce11477f27b300a66ca80', class: "bq-select__control--clear ms-[--bq-select--gap]", appearance: "text", "aria-label": this.clearButtonLabel, size: "small", onBqClick: this.handleClearClick, part: "clear-btn", exportparts: "button", tabIndex: -1 }, h("slot", { key: 'a15a6415944cbee2208306c7cddb67e5d6a37d06', name: "clear-icon" }, h("bq-icon", { key: '7f776f8c2a5d226a95c9af30525586d3bdfd0b50', name: "x-circle", class: "flex" })))), h("span", { key: '3535c47119a77de29a2b5ea4dcb3fd174d5da62f', class: { 'bq-select__control--suffix': true, 'rotate-180': this.open, 'rotate-0': !this.open }, ref: (spanElem) => (this.suffixElem = spanElem), part: "suffix" }, h("slot", { key: '3c917b70bd43ffc311703578eeed190ba40579fa', name: "suffix", onSlotchange: this.handleSlotChange }, h("bq-icon", { key: '175b61a120c1475ec87cbd24d615e3512602ec11', name: "caret-down", class: "flex" })))), h("bq-option-list", { key: '492b3f57b45cf28ac4a3bfb6f16da321641e16fd', id: `bq-options-${this.name}`, onBqSelect: this.handleSelect, "aria-expanded": this.open ? 'true' : 'false', exportparts: "base:option-list", role: "listbox" }, h("slot", { key: '3737c1cb94c3dac93882f8f9678fb1aedc9b1be5' }))), h("div", { key: '6108d4384d82c4ee959bfdff969b1ebdb27f3084', class: {
|
|
488
483
|
[`bq-select__helper-text validation-${this.validationStatus}`]: true,
|
|
489
484
|
'!hidden': !this.hasHelperText,
|
|
490
|
-
}, ref: (divElem) => (this.helperTextElem = divElem), part: "helper-text" }, h("slot", { key: '
|
|
485
|
+
}, ref: (divElem) => (this.helperTextElem = divElem), part: "helper-text" }, h("slot", { key: 'ff8cda8d9c5e057e36b70d079cf96d32b249179d', name: "helper-text", onSlotchange: this.handleSlotChange }))));
|
|
491
486
|
}
|
|
492
487
|
static get is() { return "bq-select"; }
|
|
493
488
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-select.js","sourceRoot":"","sources":["../../../../../../src/components/select/bq-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAa,MAAM,oBAAoB,CAAC;AAKpH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwGG;AASH,MAAM,OAAO,QAAQ;IACnB,iBAAiB;IACjB,uBAAuB;IAEf,cAAc,CAAe;IAC7B,SAAS,CAAoB;IAC7B,SAAS,CAAe;IACxB,UAAU,CAAe;IACzB,UAAU,CAAe;IAEzB,aAAa,CAAkB;IAE/B,eAAe,GAAG,QAAQ,CAAC;IAEnC,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAuB;IACjB,SAAS,CAAoB;IAEhD,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAEjC,YAAY,CAAU;IACtB,aAAa,GAAG,KAAK,CAAC;IACtB,eAAe,GAA0B,EAAE,CAAC;IAE5C,QAAQ,GAAG,KAAK,CAAC;IACjB,SAAS,GAAG,KAAK,CAAC;IAClB,SAAS,GAAG,KAAK,CAAC;IAClB,QAAQ,GAAG,KAAK,CAAC;I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\n Watch,\n} from '@stencil/core';\n\nimport { Placement } from '../../services/interfaces';\nimport { debounce, hasSlotContent, isDefined, isHTMLElement, isNil, isString, TDebounce } from '../../shared/utils';\nimport { TInputValidation } from '../input/bq-input.types';\n\nexport type TSelectValue = string | string[];\n\n/**\n * The select input component lets users choose from a predefined list, commonly used in forms for easy data selection.\n *\n * @example How to use it\n * ```html\n * <bq-select placeholder=\"Placeholder\">\n * <label slot=\"label\">Select label</label>\n * <span slot=\"helper-text\">\n * <bq-icon name=\"star\"></bq-icon>\n * Helper text\n * </span>\n *\n * <bq-option value=\"1\">Option 1</bq-option>\n * <bq-option value=\"2\">Option 2</bq-option>\n * <bq-option value=\"3\">Option 3</bq-option>\n * </bq-select>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/41989d-select/b/09d7b1\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-dropdown\n * @dependency bq-icon\n * @dependency bq-option-list\n * @dependency bq-tag\n *\n * @attr {boolean} autofocus - If `true`, the Select input will be focused on component render.\n * @attr {string} clear-button-label - The clear button aria label.\n * @attr {number} debounce-time - The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the input value changes.\n * @attr {boolean} disable-clear - If `true`, the clear button won't be displayed.\n * @attr {boolean} disabled - Indicates whether the Select input is disabled and cannot be interacted with.\n * @attr {number} distance - Represents the distance (gutter or margin) between the Select panel and the input element.\n * @attr {string} form - The ID of the form that Select input field belongs to.\n * @attr {boolean} keep-open-on-select - If `true`, the Select panel will remain open after a selection is made.\n * @attr {number} max-tags-visible - The maximum number of tags to display when multiple selection is enabled.\n * @attr {boolean} multiple - If `true`, the Select input will allow multiple selections.\n * @attr {string} name - The Select input name.\n * @attr {boolean} open - If `true`, the Select panel will be visible.\n * @attr {string} panel-height - When set, it will override the height of the Select panel.\n * @attr {string} placeholder - The Select input placeholder text value.\n * @attr {\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"} placement - Position of the Select panel.\n * @attr {boolean} readonly - If `true`, the Select input cannot be modified.\n * @attr {boolean} required - Indicates whether or not the Select input is required to be filled out before submitting the form.\n * @attr {boolean} same-width - Whether the panel should have the Select same width as the input element.\n * @attr {number} skidding - Represents the skidding between the Select panel and the input element.\n * @attr {\"absolute\" | \"fixed\"} strategy - Defines the strategy to position the Select panel.\n * @attr {\"error\" | \"success\" | \"warning\" | \"none\"} validation-status - The validation status of the Select input.\n * @attr {\"number\" | \"string\" | \"string[]\"} value - The select input value can be used to reset the field to a previous value.\n *\n * @method clear - Method to be called to clear the selected value.\n *\n * @event bqBlur - The callback handler is emitted when the Select input loses focus.\n * @event bqClear - The callback handler is emitted when the selected value has been cleared.\n * @event bqFocus - A callback handler is emitted when the Select input has received focus.\n * @event bqSelect - The callback handler is emitted when the selected value has changed.\n *\n * @slot label - The label slot container.\n * @slot prefix - The prefix slot container.\n * @slot tags - The tags slot container.\n * @slot clear-icon - The clear icon slot container.\n * @slot suffix - The suffix slot container.\n * @slot helper-text - The helper text slot container.\n *\n * @part base - The component's base wrapper.\n * @part button - The native HTML button used under the hood in the clear button.\n * @part clear-btn - The clear button.\n * @part control - The input control wrapper.\n * @part input-outline - The input outline wrapper that holds the tags container and the native HTML input used under the hood.\n * @part helper-text - The helper text slot container.\n * @part input - The native HTML input element used under the hood.\n * @part label - The label slot container.\n * @part panel - The select panel container\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n * @part tags - The tags container of the BqTags for multiple selection.\n * @part tag - The tag container of the BqTag for multiple selection.\n * @part tag__base - The base wrapper of the BqTag for multiple selection.\n * @part tag__prefix - The prefix slot container of the BqTag for multiple selection.\n * @part tag__text - The text slot container of the BqTag for multiple selection.\n * @part tag__btn-close - The close button of the BqTag for multiple selection.\n * @part option-list - The option list container.\n *\n * @cssprop --bq-select--background-color - Select background color\n * @cssprop --bq-select--border-color - Select border color\n * @cssprop --bq-select--border-color-focus - Select border color on focus\n * @cssprop --bq-select--border-color-disabled - Select border color when disabled\n * @cssprop --bq-select--border-radius - Select border radius\n * @cssprop --bq-select--border-width - Select border width\n * @cssprop --bq-select--border-style - Select border style\n * @cssprop --bq-select--gap - Gap between Select content and prefix/suffix\n * @cssprop --bq-select--helper-margin-top - Helper text margin top\n * @cssprop --bq-select--helper-text-color - Helper text color\n * @cssprop --bq-select--helper-text-size - Helper text size\n * @cssprop --bq-select--icon-size - Icon size to use in prefix/suffix and clear button\n * @cssprop --bq-select--label-margin-bottom - Select label margin bottom\n * @cssprop --bq-select--label-text-color - Select label text color\n * @cssprop --bq-select--label-text-size - Select label text size\n * @cssprop --bq-select--padding-start - Select padding start\n * @cssprop --bq-select--padding-end - Select padding end\n * @cssprop --bq-select--paddingY - Select padding top and bottom\n * @cssprop --bq-select--text-color - Select text color\n * @cssprop --bq-select--text-size - Select text size\n * @cssprop --bq-select--text-placeholder-color - Select placeholder text color\n */\n@Component({\n tag: 'bq-select',\n styleUrl: './scss/bq-select.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSelect {\n // Own Properties\n // ====================\n\n private helperTextElem?: HTMLElement;\n private inputElem?: HTMLInputElement;\n private labelElem?: HTMLElement;\n private prefixElem?: HTMLElement;\n private suffixElem?: HTMLElement;\n\n private debounceQuery: TDebounce<void>;\n\n private fallbackInputId = 'select';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSelectElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() displayValue?: string;\n @State() hasHelperText = false;\n @State() selectedOptions: HTMLBqOptionElement[] = [];\n\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /** If true, the Select input will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /** The clear button aria label */\n @Prop({ reflect: true }) clearButtonLabel? = 'Clear value';\n\n /**\n * The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the input value changes.\n * A value of 0 means no debouncing will occur.\n */\n @Prop({ reflect: true, mutable: true }) debounceTime? = 0;\n\n /**\n * Indicates whether the Select input is disabled or not.\n * If `true`, the Select is disabled and cannot be interacted with.\n */\n @Prop({ mutable: true }) disabled?: boolean = false;\n\n /** If true, the clear button won't be displayed */\n @Prop({ reflect: true }) disableClear? = false;\n\n /** Represents the distance (gutter or margin) between the Select panel and the input element. */\n @Prop({ reflect: true }) distance?: number = 8;\n\n /** The ID of the form that the Select input belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** If true, the Select panel will remain open after a selection is made. */\n @Prop({ reflect: true }) keepOpenOnSelect?: boolean = false;\n\n /** The Select input name. */\n @Prop({ reflect: true }) name!: string;\n\n /** The maximum number of tags to display when multiple selection is enabled */\n @Prop({ mutable: true }) maxTagsVisible: number = 2;\n\n /** If true, the Select input will allow multiple selections. */\n @Prop({ reflect: true }) multiple?: boolean = false;\n\n /** If true, the Select panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the Select panel. */\n @Prop({ reflect: true }) panelHeight?: string;\n\n /** The Select input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** Position of the Select panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom';\n\n /** If true, the list of options cannot be filtered (searching won't be available) */\n @Prop({ reflect: true }) readonly?: boolean;\n\n /** Indicates whether or not the Select input is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /** Whether the panel should have the Select same width as the input element */\n @Prop({ reflect: true }) sameWidth?: boolean = true;\n\n /** Represents the skidding between the Select panel and the input element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Defines the strategy to position the Select panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n /**\n * The validation status of the Select input.\n *\n * @remarks\n * This property is used to indicate the validation status of the select input. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The input has a validation error.\n * - `'warning'`: The input has a validation warning.\n * - `'success'`: The input has passed validation.\n */\n @Prop({ reflect: true }) validationStatus: TInputValidation = 'none';\n\n /** The select input value, it can be used to reset the field to a previous value */\n @Prop({ reflect: true, mutable: true }) value: TSelectValue;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n if (this.multiple && isString(this.value)) {\n // NOTE: we ensure that value is an array, changing the value will trigger Watch to execute thus the return\n this.value = Array.from(JSON.parse(String(this.value)));\n this.internals.setFormValue(this.value.join(','));\n return;\n }\n\n this.syncItemsFromValue();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the Select input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the selected value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the Select input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the selected value has changed */\n @Event() bqSelect!: EventEmitter<{ value: string | number | string[]; item: HTMLBqOptionElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.initMultipleValue();\n }\n\n componentWillLoad() {\n this.initMultipleValue();\n }\n\n componentDidLoad() {\n if (this.multiple && Array.isArray(this.value)) {\n this.selectedOptions = this.options.filter((item) => this.value.includes(item.value));\n }\n\n this.handleValueChange();\n }\n\n formAssociatedCallback() {\n this.internals.role = 'combobox';\n this.internals.ariaExpanded = this.open ? 'true' : 'false';\n }\n\n async formResetCallback() {\n if (isNil(this.value)) return;\n\n this.internals.setValidity({});\n this.clear();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqOpen', { capture: true })\n handleOpenChange(ev: CustomEvent<{ open: boolean }>) {\n if (!ev.composedPath().includes(this.el)) return;\n\n this.open = ev.detail.open;\n }\n\n @Listen('bqFocus', { capture: true })\n @Listen('bqBlur', { capture: true })\n stopOptionFocusBlurPropagation(ev: CustomEvent) {\n // Stop propagation of focus and blur events coming from the `bq-option` elements\n if (isHTMLElement(ev.target, 'bq-select')) return;\n\n ev.stopPropagation();\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Clears the selected value.\n *\n * @return {Promise<void>}\n * @memberof BqSelect\n */\n @Method()\n async clear(): Promise<void> {\n if (this.disabled) return;\n\n const { multiple, inputElem, bqClear, el } = this;\n\n // Clear value and selected options\n this.value = undefined;\n this.selectedOptions = [];\n\n // Clear display value and input element if not multiple\n if (!multiple) {\n this.displayValue = undefined;\n inputElem.value = undefined;\n }\n\n // Update form value and reset options visibility\n this.resetOptionsVisibility();\n\n // Emit clear event\n bqClear.emit(el);\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private initMultipleValue = () => {\n if (!this.multiple) return;\n\n this.value = Array.isArray(this.value) ? this.value : Array.from(JSON.parse(String(this.value)));\n };\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private handleSelect = (ev: CustomEvent<{ value: TSelectValue; item: HTMLBqOptionElement }>) => {\n if (this.disabled) return;\n\n if (this.multiple) {\n ev.stopPropagation();\n }\n\n const { value, item } = ev.detail;\n\n if (this.multiple) {\n this.handleMultipleSelection(item);\n // Clear the input value after selecting an item\n this.inputElem.value = '';\n // If multiple selection is enabled, emit the selected items array instead of relying on\n // the option list to emit the value of the selected item\n this.bqSelect.emit({ value: this.value, item });\n } else {\n this.value = value;\n }\n\n this.resetOptionsVisibility();\n this.inputElem.focus();\n };\n\n private handleMultipleSelection = (item: HTMLBqOptionElement) => {\n // Set has O(1) complexity for insertion, deletion, and search operations, compared to an Array's O(n)\n const selectedOptionsSet = new Set(this.selectedOptions);\n\n if (selectedOptionsSet.has(item)) {\n selectedOptionsSet.delete(item);\n } else {\n selectedOptionsSet.add(item);\n }\n\n this.selectedOptions = Array.from(selectedOptionsSet);\n this.value = this.selectedOptions.map((item) => item.value);\n };\n\n private handleSearchFilter = (ev: Event) => {\n if (this.disabled) return;\n\n this.debounceQuery?.cancel();\n\n const query = (ev.target as HTMLInputElement).value?.toLowerCase().trim();\n\n if (!isDefined(query)) {\n this.clear();\n } else {\n this.debounceQuery = debounce(() => {\n this.options.forEach((item: HTMLBqOptionElement) => {\n const itemLabel = this.getOptionLabel(item).toLowerCase();\n item.hidden = !itemLabel.includes(query);\n });\n }, this.debounceTime);\n\n this.debounceQuery();\n }\n\n // The panel will close once a selection is made\n // so we need to make sure it's open when the user is typing and the query is not empty\n this.open = true;\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n (async () => {\n await this.clear();\n })();\n this.inputElem.focus();\n\n ev.stopPropagation();\n };\n\n private handleTagRemove = (item: HTMLBqOptionElement) => {\n if (this.disabled) return;\n\n this.handleMultipleSelection(item);\n this.bqSelect.emit({ value: this.value, item });\n };\n\n private handleLabelSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n };\n\n private handlePrefixSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem);\n };\n\n private handleSuffixSlotChange = () => {\n this.hasSuffix = hasSlotContent(this.suffixElem);\n };\n\n private handleHelperTextSlotChange = () => {\n this.hasHelperText = hasSlotContent(this.helperTextElem);\n };\n\n private resetOptionsVisibility = () => {\n this.options.forEach((item: HTMLBqOptionElement) => (item.hidden = false));\n };\n\n private syncItemsFromValue = () => {\n const { internals, options, value } = this;\n if (!options.length) return;\n\n // Sync selected state of the BqOption elements\n this.syncSelectedOptionsState();\n\n if (this.multiple) {\n // Sync selected options for multiple selection mode\n this.selectedOptions = options.filter((option) => this.value?.includes(option.value));\n } else {\n // Sync display label for single selection mode\n this.updateDisplayLabel();\n }\n\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n };\n\n /**\n * Syncs the selected state of the BqOption elements which value is included in the `value` property.\n * Notice that value can be a string or an array of strings.\n *\n * @private\n * @memberof BqSelect\n */\n private syncSelectedOptionsState = () => {\n const { options, multiple, value } = this;\n const lowerCaseValue = String(value).toLowerCase();\n\n options.forEach((option: HTMLBqOptionElement) => {\n if (multiple && Array.isArray(value)) {\n option.selected = value.includes(option.value);\n } else {\n option.selected = option.value.toLowerCase() === lowerCaseValue;\n }\n });\n };\n\n /**\n * Updates the display value of the input element based on the selected option.\n *\n * @private\n * @memberof BqSelect\n */\n private updateDisplayLabel = () => {\n const { value, options, inputElem } = this;\n\n const checkedItem = options.find((item) => item.value === value);\n const displayValue = checkedItem ? this.getOptionLabel(checkedItem) : '';\n\n inputElem.value = displayValue;\n this.displayValue = displayValue;\n };\n\n private getOptionLabel = (item: HTMLBqOptionElement) => {\n if (!item) return;\n return item.innerText.trim() ?? '';\n };\n\n private get options() {\n return Array.from(this.el.querySelectorAll('bq-option'));\n }\n\n private get displayPlaceholder() {\n // Hide the placeholder when multiple selection is enabled and there are selected items\n return this.multiple && this.selectedOptions.length !== 0 ? undefined : this.placeholder;\n }\n\n private get displayTags() {\n return this.selectedOptions.map((item, index) => {\n if (index < this.maxTagsVisible || this.maxTagsVisible < 0) {\n return (\n <bq-tag\n key={item.value}\n removable\n size=\"xsmall\"\n variant=\"filled\"\n onBqClose={(event) => {\n // NOTE: prevents triggering bqClose on parent\n event.stopPropagation();\n this.handleTagRemove(item);\n }}\n // Prevent the tag from closing the panel when clicked\n onClick={(ev: MouseEvent) => ev.stopPropagation()}\n exportparts=\"wrapper:tag__base,prefix:tag__prefix,text:tag__text,btn-close:tag__btn-close\"\n part=\"tag\"\n >\n {this.getOptionLabel(item)}\n </bq-tag>\n );\n } else if (index === this.maxTagsVisible) {\n return (\n <bq-tag\n key=\"more\"\n size=\"xsmall\"\n variant=\"filled\"\n exportparts=\"wrapper:tag__base,prefix:tag__prefix,text:tag__text,btn-close:tag__btn-close\"\n part=\"tag\"\n >\n +{this.selectedOptions.length - index}\n </bq-tag>\n );\n }\n\n return null;\n });\n }\n\n private get hasClearIcon() {\n if (this.disableClear || this.disabled) {\n return false;\n }\n\n if (this.multiple) {\n return this.selectedOptions.length > 0;\n }\n\n return isDefined(this.displayValue);\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const labelId = `bq-select__label-${this.name || this.fallbackInputId}`;\n\n return (\n <div class=\"bq-select\" part=\"base\">\n {/* Label */}\n <label\n id={labelId}\n class={{ 'bq-select__label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem: HTMLSpanElement) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleLabelSlotChange} />\n </label>\n {/* Select dropdown */}\n <bq-dropdown\n class=\"bq-select__dropdown w-full\"\n disabled={this.disabled}\n distance={this.distance}\n keepOpenOnSelect={this.keepOpenOnSelect}\n open={this.open}\n panelHeight={this.panelHeight}\n placement={this.placement}\n sameWidth={this.sameWidth}\n skidding={this.skidding}\n strategy={this.strategy}\n exportparts=\"panel\"\n >\n {/* Input control group */}\n <div\n class={{\n 'bq-select__control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n slot=\"trigger\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-select__control--prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem: HTMLSpanElement) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handlePrefixSlotChange} />\n </span>\n <div class=\"flex flex-1 overflow-x-auto\" part=\"input-outline\">\n {/* Display selected values using BqTags for multiple selection */}\n {this.multiple && (\n <span class=\"bq-select__tags\" part=\"tags\">\n <slot name=\"tags\">{this.displayTags}</slot>\n </span>\n )}\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-select__control--input flex-grow is-full\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls={`bq-options-${this.name}`}\n aria-expanded={this.open ? 'true' : 'false'}\n aria-haspopup=\"listbox\"\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n placeholder={this.displayPlaceholder}\n ref={(inputElem: HTMLInputElement) => (this.inputElem = inputElem)}\n readOnly={this.readonly}\n required={this.required}\n role=\"combobox\"\n spellcheck={false}\n type=\"text\"\n value={this.displayValue}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onInput={this.handleSearchFilter}\n />\n </div>\n {/* Clear Button */}\n {this.hasClearIcon && (\n // The clear button will be visible as long as the input has a value\n // and the parent group is hovered or has focus-within\n <bq-button\n class=\"bq-select__control--clear ms-[--bq-select--gap]\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\n tabIndex={-1}\n >\n <slot name=\"clear-icon\">\n <bq-icon name=\"x-circle\" class=\"flex\" />\n </slot>\n </bq-button>\n )}\n {/* Suffix */}\n <span\n class={{ 'bq-select__control--suffix': true, 'rotate-180': this.open, 'rotate-0': !this.open }}\n ref={(spanElem: HTMLSpanElement) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSuffixSlotChange}>\n <bq-icon name=\"caret-down\" class=\"flex\" />\n </slot>\n </span>\n </div>\n <bq-option-list\n id={`bq-options-${this.name}`}\n onBqSelect={this.handleSelect}\n aria-expanded={this.open ? 'true' : 'false'}\n exportparts=\"base:option-list\"\n role=\"listbox\"\n >\n <slot />\n </bq-option-list>\n </bq-dropdown>\n {/* Helper text */}\n <div\n class={{\n [`bq-select__helper-text validation-${this.validationStatus}`]: true,\n '!hidden': !this.hasHelperText,\n }}\n ref={(divElem: HTMLDivElement) => (this.helperTextElem = divElem)}\n part=\"helper-text\"\n >\n <slot name=\"helper-text\" onSlotchange={this.handleHelperTextSlotChange} />\n </div>\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"bq-select.js","sourceRoot":"","sources":["../../../../../../src/components/select/bq-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAa,MAAM,oBAAoB,CAAC;AAKpH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwGG;AASH,MAAM,OAAO,QAAQ;IACnB,iBAAiB;IACjB,uBAAuB;IAEf,cAAc,CAAe;IAC7B,SAAS,CAAoB;IAC7B,SAAS,CAAe;IACxB,UAAU,CAAe;IACzB,UAAU,CAAe;IAEzB,aAAa,CAAkB;IAE/B,eAAe,GAAG,QAAQ,CAAC;IAEnC,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAAuB;IACjB,SAAS,CAAoB;IAEhD,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAEjC,YAAY,CAAU;IACtB,aAAa,GAAG,KAAK,CAAC;IACtB,eAAe,GAA0B,EAAE,CAAC;IAE5C,QAAQ,GAAG,KAAK,CAAC;IACjB,SAAS,GAAG,KAAK,CAAC;IAClB,SAAS,GAAG,KAAK,CAAC;IAClB,QAAQ,GAAG,KAAK,CAAC;IAE1B,sBAAsB;IACtB,2BAA2B;IAE3B,oEAAoE;IAC3C,SAAS,CAAU;IAE5C,kCAAkC;IACT,gBAAgB,GAAI,aAAa,CAAC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EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,EACjE,IAAI,EAAC,aAAa;gBAElB,6DAAM,IAAI,EAAC,aAAa,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CAC5D,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Listen,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nimport { Placement } from '../../services/interfaces';\nimport { debounce, hasSlotContent, isDefined, isHTMLElement, isNil, isString, TDebounce } from '../../shared/utils';\nimport { TInputValidation } from '../input/bq-input.types';\n\nexport type TSelectValue = string | string[];\n\n/**\n * The select input component lets users choose from a predefined list, commonly used in forms for easy data selection.\n *\n * @example How to use it\n * ```html\n * <bq-select placeholder=\"Placeholder\">\n * <label slot=\"label\">Select label</label>\n * <span slot=\"helper-text\">\n * <bq-icon name=\"star\"></bq-icon>\n * Helper text\n * </span>\n *\n * <bq-option value=\"1\">Option 1</bq-option>\n * <bq-option value=\"2\">Option 2</bq-option>\n * <bq-option value=\"3\">Option 3</bq-option>\n * </bq-select>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/41989d-select/b/09d7b1\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-dropdown\n * @dependency bq-icon\n * @dependency bq-option-list\n * @dependency bq-tag\n *\n * @attr {boolean} autofocus - If `true`, the Select input will be focused on component render.\n * @attr {string} clear-button-label - The clear button aria label.\n * @attr {number} debounce-time - The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the input value changes.\n * @attr {boolean} disable-clear - If `true`, the clear button won't be displayed.\n * @attr {boolean} disabled - Indicates whether the Select input is disabled and cannot be interacted with.\n * @attr {number} distance - Represents the distance (gutter or margin) between the Select panel and the input element.\n * @attr {string} form - The ID of the form that Select input field belongs to.\n * @attr {boolean} keep-open-on-select - If `true`, the Select panel will remain open after a selection is made.\n * @attr {number} max-tags-visible - The maximum number of tags to display when multiple selection is enabled.\n * @attr {boolean} multiple - If `true`, the Select input will allow multiple selections.\n * @attr {string} name - The Select input name.\n * @attr {boolean} open - If `true`, the Select panel will be visible.\n * @attr {string} panel-height - When set, it will override the height of the Select panel.\n * @attr {string} placeholder - The Select input placeholder text value.\n * @attr {\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"} placement - Position of the Select panel.\n * @attr {boolean} readonly - If `true`, the Select input cannot be modified.\n * @attr {boolean} required - Indicates whether or not the Select input is required to be filled out before submitting the form.\n * @attr {boolean} same-width - Whether the panel should have the Select same width as the input element.\n * @attr {number} skidding - Represents the skidding between the Select panel and the input element.\n * @attr {\"absolute\" | \"fixed\"} strategy - Defines the strategy to position the Select panel.\n * @attr {\"error\" | \"success\" | \"warning\" | \"none\"} validation-status - The validation status of the Select input.\n * @attr {\"number\" | \"string\" | \"string[]\"} value - The select input value can be used to reset the field to a previous value.\n *\n * @method clear - Method to be called to clear the selected value.\n *\n * @event bqBlur - The callback handler is emitted when the Select input loses focus.\n * @event bqClear - The callback handler is emitted when the selected value has been cleared.\n * @event bqFocus - A callback handler is emitted when the Select input has received focus.\n * @event bqSelect - The callback handler is emitted when the selected value has changed.\n *\n * @slot label - The label slot container.\n * @slot prefix - The prefix slot container.\n * @slot tags - The tags slot container.\n * @slot clear-icon - The clear icon slot container.\n * @slot suffix - The suffix slot container.\n * @slot helper-text - The helper text slot container.\n *\n * @part base - The component's base wrapper.\n * @part button - The native HTML button used under the hood in the clear button.\n * @part clear-btn - The clear button.\n * @part control - The input control wrapper.\n * @part input-outline - The input outline wrapper that holds the tags container and the native HTML input used under the hood.\n * @part helper-text - The helper text slot container.\n * @part input - The native HTML input element used under the hood.\n * @part label - The label slot container.\n * @part panel - The select panel container\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n * @part tags - The tags container of the BqTags for multiple selection.\n * @part tag - The tag container of the BqTag for multiple selection.\n * @part tag__base - The base wrapper of the BqTag for multiple selection.\n * @part tag__prefix - The prefix slot container of the BqTag for multiple selection.\n * @part tag__text - The text slot container of the BqTag for multiple selection.\n * @part tag__btn-close - The close button of the BqTag for multiple selection.\n * @part option-list - The option list container.\n *\n * @cssprop --bq-select--background-color - Select background color\n * @cssprop --bq-select--border-color - Select border color\n * @cssprop --bq-select--border-color-focus - Select border color on focus\n * @cssprop --bq-select--border-color-disabled - Select border color when disabled\n * @cssprop --bq-select--border-radius - Select border radius\n * @cssprop --bq-select--border-width - Select border width\n * @cssprop --bq-select--border-style - Select border style\n * @cssprop --bq-select--gap - Gap between Select content and prefix/suffix\n * @cssprop --bq-select--helper-margin-top - Helper text margin top\n * @cssprop --bq-select--helper-text-color - Helper text color\n * @cssprop --bq-select--helper-text-size - Helper text size\n * @cssprop --bq-select--icon-size - Icon size to use in prefix/suffix and clear button\n * @cssprop --bq-select--label-margin-bottom - Select label margin bottom\n * @cssprop --bq-select--label-text-color - Select label text color\n * @cssprop --bq-select--label-text-size - Select label text size\n * @cssprop --bq-select--padding-start - Select padding start\n * @cssprop --bq-select--padding-end - Select padding end\n * @cssprop --bq-select--paddingY - Select padding top and bottom\n * @cssprop --bq-select--text-color - Select text color\n * @cssprop --bq-select--text-size - Select text size\n * @cssprop --bq-select--text-placeholder-color - Select placeholder text color\n */\n@Component({\n tag: 'bq-select',\n styleUrl: './scss/bq-select.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSelect {\n // Own Properties\n // ====================\n\n private helperTextElem?: HTMLElement;\n private inputElem?: HTMLInputElement;\n private labelElem?: HTMLElement;\n private prefixElem?: HTMLElement;\n private suffixElem?: HTMLElement;\n\n private debounceQuery: TDebounce<void>;\n\n private fallbackInputId = 'select';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSelectElement;\n @AttachInternals() internals!: ElementInternals;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() displayValue?: string;\n @State() hasHelperText = false;\n @State() selectedOptions: HTMLBqOptionElement[] = [];\n\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /** If true, the Select input will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /** The clear button aria label */\n @Prop({ reflect: true }) clearButtonLabel? = 'Clear value';\n\n /**\n * The amount of time, in milliseconds, to wait before emitting the `bqInput` event after the input value changes.\n * A value of 0 means no debouncing will occur.\n */\n @Prop({ reflect: true, mutable: true }) debounceTime? = 0;\n\n /**\n * Indicates whether the Select input is disabled or not.\n * If `true`, the Select is disabled and cannot be interacted with.\n */\n @Prop({ mutable: true }) disabled?: boolean = false;\n\n /** If true, the clear button won't be displayed */\n @Prop({ reflect: true }) disableClear? = false;\n\n /** Represents the distance (gutter or margin) between the Select panel and the input element. */\n @Prop({ reflect: true }) distance?: number = 8;\n\n /** The ID of the form that the Select input belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** If true, the Select panel will remain open after a selection is made. */\n @Prop({ reflect: true }) keepOpenOnSelect?: boolean = false;\n\n /** The Select input name. */\n @Prop({ reflect: true }) name!: string;\n\n /** The maximum number of tags to display when multiple selection is enabled */\n @Prop({ mutable: true }) maxTagsVisible: number = 2;\n\n /** If true, the Select input will allow multiple selections. */\n @Prop({ reflect: true }) multiple?: boolean = false;\n\n /** If true, the Select panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the Select panel. */\n @Prop({ reflect: true }) panelHeight?: string;\n\n /** The Select input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** Position of the Select panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom';\n\n /** If true, the list of options cannot be filtered (searching won't be available) */\n @Prop({ reflect: true }) readonly?: boolean;\n\n /** Indicates whether or not the Select input is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /** Whether the panel should have the Select same width as the input element */\n @Prop({ reflect: true }) sameWidth?: boolean = true;\n\n /** Represents the skidding between the Select panel and the input element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Defines the strategy to position the Select panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n /**\n * The validation status of the Select input.\n *\n * @remarks\n * This property is used to indicate the validation status of the select input. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The input has a validation error.\n * - `'warning'`: The input has a validation warning.\n * - `'success'`: The input has passed validation.\n */\n @Prop({ reflect: true }) validationStatus: TInputValidation = 'none';\n\n /** The select input value, it can be used to reset the field to a previous value */\n @Prop({ reflect: true, mutable: true }) value: TSelectValue;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n if (this.multiple && isString(this.value)) {\n // NOTE: we ensure that value is an array, changing the value will trigger Watch to execute thus the return\n this.value = Array.from(JSON.parse(String(this.value)));\n this.internals.setFormValue(this.value.join(','));\n return;\n }\n\n this.syncItemsFromValue();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the Select input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the selected value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the Select input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqSelectElement>;\n\n /** Callback handler emitted when the selected value has changed */\n @Event() bqSelect!: EventEmitter<{ value: string | number | string[]; item: HTMLBqOptionElement }>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.initMultipleValue();\n }\n\n componentWillLoad() {\n this.initMultipleValue();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n\n if (this.multiple && Array.isArray(this.value)) {\n this.selectedOptions = this.options.filter((item) => this.value.includes(item.value));\n }\n this.handleValueChange();\n }\n\n formAssociatedCallback() {\n this.internals.role = 'combobox';\n this.internals.ariaExpanded = this.open ? 'true' : 'false';\n }\n\n async formResetCallback() {\n if (isNil(this.value)) return;\n\n this.internals.setValidity({});\n this.clear();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqOpen', { capture: true })\n handleOpenChange(ev: CustomEvent<{ open: boolean }>) {\n if (!ev.composedPath().includes(this.el)) return;\n\n this.open = ev.detail.open;\n }\n\n @Listen('bqFocus', { capture: true })\n @Listen('bqBlur', { capture: true })\n stopOptionFocusBlurPropagation(ev: CustomEvent) {\n // Stop propagation of focus and blur events coming from the `bq-option` elements\n if (isHTMLElement(ev.target, 'bq-select')) return;\n\n ev.stopPropagation();\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /**\n * Clears the selected value.\n *\n * @return {Promise<void>}\n * @memberof BqSelect\n */\n @Method()\n async clear(): Promise<void> {\n if (this.disabled) return;\n\n const { multiple, inputElem, bqClear, el } = this;\n\n // Clear value and selected options\n this.value = undefined;\n this.selectedOptions = [];\n\n // Clear display value and input element if not multiple\n if (!multiple) {\n this.displayValue = undefined;\n inputElem.value = undefined;\n }\n\n // Update form value and reset options visibility\n this.resetOptionsVisibility();\n\n // Emit clear event\n bqClear.emit(el);\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private initMultipleValue = () => {\n if (!this.multiple) return;\n\n this.value = Array.isArray(this.value) ? this.value : Array.from(JSON.parse(String(this.value)));\n };\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private handleSelect = (ev: CustomEvent<{ value: TSelectValue; item: HTMLBqOptionElement }>) => {\n if (this.disabled) return;\n\n if (this.multiple) {\n ev.stopPropagation();\n }\n\n const { value, item } = ev.detail;\n\n if (this.multiple) {\n this.handleMultipleSelection(item);\n // Clear the input value after selecting an item\n this.inputElem.value = '';\n // If multiple selection is enabled, emit the selected items array instead of relying on\n // the option list to emit the value of the selected item\n this.bqSelect.emit({ value: this.value, item });\n } else {\n this.value = value;\n }\n\n this.resetOptionsVisibility();\n this.inputElem.focus();\n };\n\n private handleMultipleSelection = (item: HTMLBqOptionElement) => {\n // Set has O(1) complexity for insertion, deletion, and search operations, compared to an Array's O(n)\n const selectedOptionsSet = new Set(this.selectedOptions);\n\n if (selectedOptionsSet.has(item)) {\n selectedOptionsSet.delete(item);\n } else {\n selectedOptionsSet.add(item);\n }\n\n this.selectedOptions = Array.from(selectedOptionsSet);\n this.value = this.selectedOptions.map((item) => item.value);\n };\n\n private handleSearchFilter = (ev: Event) => {\n if (this.disabled) return;\n\n this.debounceQuery?.cancel();\n\n const query = (ev.target as HTMLInputElement).value?.toLowerCase().trim();\n\n if (!isDefined(query)) {\n this.clear();\n } else {\n this.debounceQuery = debounce(() => {\n this.options.forEach((item: HTMLBqOptionElement) => {\n const itemLabel = this.getOptionLabel(item).toLowerCase();\n item.hidden = !itemLabel.includes(query);\n });\n }, this.debounceTime);\n\n this.debounceQuery();\n }\n\n // The panel will close once a selection is made\n // so we need to make sure it's open when the user is typing and the query is not empty\n this.open = true;\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n (async () => {\n await this.clear();\n })();\n this.inputElem.focus();\n\n ev.stopPropagation();\n };\n\n private handleTagRemove = (item: HTMLBqOptionElement) => {\n if (this.disabled) return;\n\n this.handleMultipleSelection(item);\n this.bqSelect.emit({ value: this.value, item });\n };\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n this.hasPrefix = hasSlotContent(this.prefixElem);\n this.hasSuffix = hasSlotContent(this.suffixElem);\n this.hasHelperText = hasSlotContent(this.helperTextElem);\n };\n\n private resetOptionsVisibility = () => {\n this.options.forEach((item: HTMLBqOptionElement) => (item.hidden = false));\n };\n\n private syncItemsFromValue = () => {\n const { internals, options, value } = this;\n if (!options.length) return;\n\n // Sync selected state of the BqOption elements\n this.syncSelectedOptionsState();\n\n if (this.multiple) {\n // Sync selected options for multiple selection mode\n this.selectedOptions = options.filter((option) => this.value?.includes(option.value));\n } else {\n // Sync display label for single selection mode\n this.updateDisplayLabel();\n }\n\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n };\n\n /**\n * Syncs the selected state of the BqOption elements which value is included in the `value` property.\n * Notice that value can be a string or an array of strings.\n *\n * @private\n * @memberof BqSelect\n */\n private syncSelectedOptionsState = () => {\n const { options, multiple, value } = this;\n const lowerCaseValue = String(value).toLowerCase();\n\n options.forEach((option: HTMLBqOptionElement) => {\n if (multiple && Array.isArray(value)) {\n option.selected = value.includes(option.value);\n } else {\n option.selected = option.value.toLowerCase() === lowerCaseValue;\n }\n });\n };\n\n /**\n * Updates the display value of the input element based on the selected option.\n *\n * @private\n * @memberof BqSelect\n */\n private updateDisplayLabel = () => {\n const { value, options, inputElem } = this;\n\n const checkedItem = options.find((item) => item.value === value);\n const displayValue = checkedItem ? this.getOptionLabel(checkedItem) : '';\n\n inputElem.value = displayValue;\n this.displayValue = displayValue;\n };\n\n private getOptionLabel = (item: HTMLBqOptionElement) => {\n if (!item) return;\n return item.innerText.trim() ?? '';\n };\n\n private get options() {\n return Array.from(this.el.querySelectorAll('bq-option'));\n }\n\n private get displayPlaceholder() {\n // Hide the placeholder when multiple selection is enabled and there are selected items\n return this.multiple && this.selectedOptions.length !== 0 ? undefined : this.placeholder;\n }\n\n private get displayTags() {\n return this.selectedOptions.map((item, index) => {\n if (index < this.maxTagsVisible || this.maxTagsVisible < 0) {\n return (\n <bq-tag\n key={item.value}\n removable\n size=\"xsmall\"\n variant=\"filled\"\n onBqClose={(event) => {\n // NOTE: prevents triggering bqClose on parent\n event.stopPropagation();\n this.handleTagRemove(item);\n }}\n // Prevent the tag from closing the panel when clicked\n onClick={(ev: MouseEvent) => ev.stopPropagation()}\n exportparts=\"wrapper:tag__base,prefix:tag__prefix,text:tag__text,btn-close:tag__btn-close\"\n part=\"tag\"\n >\n {this.getOptionLabel(item)}\n </bq-tag>\n );\n } else if (index === this.maxTagsVisible) {\n return (\n <bq-tag\n key=\"more\"\n size=\"xsmall\"\n variant=\"filled\"\n exportparts=\"wrapper:tag__base,prefix:tag__prefix,text:tag__text,btn-close:tag__btn-close\"\n part=\"tag\"\n >\n +{this.selectedOptions.length - index}\n </bq-tag>\n );\n }\n\n return null;\n });\n }\n\n private get hasClearIcon() {\n if (this.disableClear || this.disabled) {\n return false;\n }\n\n if (this.multiple) {\n return this.selectedOptions.length > 0;\n }\n\n return isDefined(this.displayValue);\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const labelId = `bq-select__label-${this.name || this.fallbackInputId}`;\n\n return (\n <div class=\"bq-select\" part=\"base\">\n {/* Label */}\n <label\n id={labelId}\n class={{ 'bq-select__label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem: HTMLSpanElement) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n {/* Select dropdown */}\n <bq-dropdown\n class=\"bq-select__dropdown w-full\"\n disabled={this.disabled}\n distance={this.distance}\n keepOpenOnSelect={this.keepOpenOnSelect}\n open={this.open}\n panelHeight={this.panelHeight}\n placement={this.placement}\n sameWidth={this.sameWidth}\n skidding={this.skidding}\n strategy={this.strategy}\n exportparts=\"panel\"\n >\n {/* Input control group */}\n <div\n class={{\n 'bq-select__control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n slot=\"trigger\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-select__control--prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem: HTMLSpanElement) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <div class=\"flex flex-1 overflow-x-auto\" part=\"input-outline\">\n {/* Display selected values using BqTags for multiple selection */}\n {this.multiple && (\n <span class=\"bq-select__tags\" part=\"tags\">\n <slot name=\"tags\">{this.displayTags}</slot>\n </span>\n )}\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-select__control--input flex-grow is-full\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls={`bq-options-${this.name}`}\n aria-expanded={this.open ? 'true' : 'false'}\n aria-haspopup=\"listbox\"\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n placeholder={this.displayPlaceholder}\n ref={(inputElem: HTMLInputElement) => (this.inputElem = inputElem)}\n readOnly={this.readonly}\n required={this.required}\n role=\"combobox\"\n spellcheck={false}\n type=\"text\"\n value={this.displayValue}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onInput={this.handleSearchFilter}\n />\n </div>\n {/* Clear Button */}\n {this.hasClearIcon && (\n // The clear button will be visible as long as the input has a value\n // and the parent group is hovered or has focus-within\n <bq-button\n class=\"bq-select__control--clear ms-[--bq-select--gap]\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\n tabIndex={-1}\n >\n <slot name=\"clear-icon\">\n <bq-icon name=\"x-circle\" class=\"flex\" />\n </slot>\n </bq-button>\n )}\n {/* Suffix */}\n <span\n class={{ 'bq-select__control--suffix': true, 'rotate-180': this.open, 'rotate-0': !this.open }}\n ref={(spanElem: HTMLSpanElement) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange}>\n <bq-icon name=\"caret-down\" class=\"flex\" />\n </slot>\n </span>\n </div>\n <bq-option-list\n id={`bq-options-${this.name}`}\n onBqSelect={this.handleSelect}\n aria-expanded={this.open ? 'true' : 'false'}\n exportparts=\"base:option-list\"\n role=\"listbox\"\n >\n <slot />\n </bq-option-list>\n </bq-dropdown>\n {/* Helper text */}\n <div\n class={{\n [`bq-select__helper-text validation-${this.validationStatus}`]: true,\n '!hidden': !this.hasHelperText,\n }}\n ref={(divElem: HTMLDivElement) => (this.helperTextElem = divElem)}\n part=\"helper-text\"\n >\n <slot name=\"helper-text\" onSlotchange={this.handleSlotChange} />\n </div>\n </div>\n );\n }\n}\n"]}
|