@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["DRAWER_POSITIONS","DRAWER_PLACEMENT","bqDrawerCss","BqDrawerStyle0","BqDrawer","footerElem","drawerElem","OPEN_CSS_CLASS","hasFooter","hasIcon","enableBackdrop","closeOnClickOutside","closeOnEsc","open","placement","position","handleOpenChange","this","handleAfterHide","handleAfterShow","handlePlacementChange","isNil","console","warn","validatePropValue","el","synPositionMap","right","left","handlePositionChange","syncPlacementMap","end","start","bqClose","bqOpen","bqAfterOpen","bqAfterClose","componentWillLoad","handleMouseClick","event","button","rect","getBoundingClientRect","clientX","hide","handleKeyDown","key","ev","emit","defaultPrevented","show","handleFooterSlotChange","hasSlotContent","async","leave","handleTransitionEnd","classList","add","enter","remove","isPositionStart","isPositionEnd","render","h","Host","class","tabIndex","part","ref","div","hidden","role","id","name","appearance","size","slot","exportparts","onClick","bind","title","block","dashed","onSlotchange"],"sources":["../../packages/beeq/src/components/drawer/bq-drawer.types.ts","../../packages/beeq/src/components/drawer/scss/bq-drawer.scss?tag=bq-drawer&encapsulation=shadow","../../packages/beeq/src/components/drawer/bq-drawer.tsx"],"sourcesContent":["export const DRAWER_POSITIONS = ['start', 'end'] as const;\nexport type TDrawerPosition = (typeof DRAWER_POSITIONS)[number];\n// !TO BE REMOVED: `placement` is deprecated and it will be removed in the future\nexport const DRAWER_PLACEMENT = ['left', 'right'] as const;\nexport type TDrawerPlacement = (typeof DRAWER_PLACEMENT)[number];\n","/* -------------------------------------------------------------------------- */\n/* Drawer styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-drawer.variables';\n\n:host {\n @apply invisible #{!important};\n}\n\n:host(.bq-drawer--open) {\n @apply visible #{!important};\n}\n\n.bq-drawer {\n @apply fixed z-[--bq-drawer--zIndex] flex flex-col gap-[--bq-drawer--gap] bg-primary shadow-m is-[--bq-drawer--width] max-is-full p-b-[--bq-drawer--paddingY] p-i-[--bq-drawer--paddingX] inset-b-0;\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { DRAWER_PLACEMENT, DRAWER_POSITIONS, TDrawerPlacement, TDrawerPosition } from './bq-drawer.types';\nimport { enter, hasSlotContent, isNil, leave, validatePropValue } from '../../shared/utils';\n\n/**\n * The Drawer component provides a sliding panel interface commonly used for navigation or presenting additional content without taking up significant screen space.\n *\n * @example How to use it\n * ```html\n * <bq-drawer position=\"end\">\n * <div class=\"flex gap-xs\" slot=\"title\">Title</div>\n * <div class=\"...\">\n * Content\n * </div>\n * <div class=\"flex flex-1 justify-center gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"primary\" block=\"\" size=\"small\">Button</bq-button>\n * <bq-button appearance=\"link\" block=\"\" size=\"small\">Button</bq-button>\n * </div>\n * </bq-drawer>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/871139-drawer\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n * @dependency bq-divider\n *\n * @attr {boolean} enable-backdrop - If true, the backdrop overlay will be shown when the drawer opens.\n * @attr {boolean} close-on-click-outside - If true, the drawer will not close when clicking outside the panel.\n * @attr {boolean} close-on-esc - If true, the drawer will not close when the [Esc] key is pressed.\n * @attr {boolean} open - If true, the drawer component will be shown.\n * @attr {\"start\" | \"end\"} position - Defines the position of the drawer.\n *\n * @method show - Method to be called to show the drawer component.\n * @method hide - Method to be called to hide the drawer component.\n *\n * @event bqClose - Callback handler to be called when the drawer is closed.\n * @event bqOpen - Callback handler to be called when the drawer is opened.\n * @event bqAfterOpen - Callback handler to be called after the drawer has been opened.\n * @event bqAfterClose - Callback handler to be called after the drawer has been closed.\n *\n * @slot title - The title content of the drawer.\n * @slot - The body content of the drawer.\n * @slot footer - The footer content of the drawer.\n * @slot button-close - The close button content of the drawer.\n * @slot footer-divider - The footer divider content of the drawer.\n *\n * @part backdrop - The `<div>` that holds the backdrop overlay.\n * @part button-close - The BqButton that closes the drawer.\n * @part button-close__btn - The native button used under the hood that closes the drawer.\n * @part button-close__label - The text inside the native button that closes the drawer.\n * @part panel - The `<div>` that holds the drawer entire content.\n * @part header - The `<header>` that holds the icon, title, and close button.\n * @part title - The `<div>` that holds the title content.\n * @part body - The `<main>` that holds the drawer body content.\n * @part footer - The `<footer>` that holds footer content.\n *\n * @cssprop --bq-drawer--backgroundBackdrop - Background color of the backdrop\n * @cssprop --bq-drawer--gap - Gap between the drawer and the viewport\n * @cssprop --bq-drawer--width - Width of the drawer\n * @cssprop --bq-drawer--paddingX - Padding left and right of the drawer\n * @cssprop --bq-drawer--paddingY - Padding top and bottom of the drawer\n * @cssprop --bq-drawer--zIndex - Z-index of the drawer component\n */\n@Component({\n tag: 'bq-drawer',\n styleUrl: './scss/bq-drawer.scss',\n shadow: true,\n})\nexport class BqDrawer {\n // Own Properties\n // ====================\n\n private footerElem: HTMLElement;\n private drawerElem: HTMLDivElement;\n private OPEN_CSS_CLASS = 'bq-drawer--open';\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqDrawerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasFooter = false;\n @State() hasIcon: boolean = false;\n\n // Public Property API\n // ========================\n\n /** If true, the backdrop overlay will be shown when the drawer opens */\n @Prop({ reflect: true }) enableBackdrop = false;\n\n /** If true, the drawer will not close when clicking outside the panel */\n @Prop({ reflect: true }) closeOnClickOutside = false;\n\n /** If true, the dialog will not close when the [Esc] key is pressed */\n @Prop({ reflect: true }) closeOnEsc = false;\n\n /** If true, the drawer component will be shown */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** @deprecated Defines the position of the drawer */\n @Prop({ reflect: true, mutable: true }) placement: TDrawerPlacement = 'right';\n\n /** Defines the position of the drawer */\n @Prop({ reflect: true, mutable: true }) position: TDrawerPosition = 'end';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('open')\n async handleOpenChange() {\n if (!this.open) {\n await this.handleAfterHide();\n return;\n }\n\n await this.handleAfterShow();\n }\n\n /**\n * !TO BE REMOVED: Delete this `@Watch()` once the deprecated `placement` property is removed\n * We need to maintain retro-compatibility with the deprecated `placement` property\n */\n @Watch('placement')\n handlePlacementChange() {\n if (!isNil(this.placement)) {\n console.warn(\n `❗️ [bq-drawer]: the 'placement' prop is deprecated and it will be removed in the future. Please use 'position' instead.`,\n );\n }\n validatePropValue(DRAWER_PLACEMENT, 'right', this.el, 'placement');\n // Sync 'position' property\n const synPositionMap = {\n right: 'end',\n left: 'start',\n };\n this.position = (synPositionMap[this.placement] as TDrawerPosition) || this.position;\n }\n\n @Watch('position')\n handlePositionChange() {\n validatePropValue(DRAWER_POSITIONS, 'start', this.el, 'position');\n /**\n * Sync 'placement' property\n * !TO BE REMOVED: Delete the code below once the deprecated `placement` property is removed\n */\n const syncPlacementMap = {\n end: 'right',\n start: 'left',\n };\n this.placement = (syncPlacementMap[this.position] as TDrawerPlacement) || this.placement;\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler to be called when the drawer is closed */\n @Event() bqClose!: EventEmitter;\n\n /** Callback handler to be called when the drawer is opened */\n @Event() bqOpen!: EventEmitter;\n\n /** Callback handler to be called after the drawer has been opened */\n @Event() bqAfterOpen!: EventEmitter;\n\n /** Callback handler to be called after the drawer has been closed */\n @Event() bqAfterClose!: EventEmitter;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.handlePositionChange();\n // !TO BE REMOVED: Delete this once the deprecated `placement` property is removed\n this.handlePlacementChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('mousedown', { target: 'window', capture: true })\n async handleMouseClick(event: MouseEvent) {\n if (!this.open) return;\n if (!this.drawerElem || this.closeOnClickOutside) return;\n // Skip if the mouse button is not the main button\n if (event.button !== 0) return;\n\n const rect = this.drawerElem.getBoundingClientRect();\n if (event.clientX < rect.left || event.clientX > rect.right) {\n await this.hide();\n }\n }\n\n @Listen('keydown', { target: 'window', capture: true })\n async handleKeyDown(event: KeyboardEvent) {\n if (!this.open) return;\n if (!this.drawerElem || this.closeOnEsc || !(event.key === 'Escape' || event.key === 'Esc')) return;\n\n await this.hide();\n }\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n /** Method to be called to hide the drawer component */\n @Method()\n async hide(): Promise<void> {\n const ev = this.bqClose.emit();\n if (ev.defaultPrevented) return;\n\n this.open = false;\n }\n\n /** Method to be called to show the drawer component */\n @Method()\n async show(): Promise<void> {\n const ev = this.bqOpen.emit();\n if (ev.defaultPrevented) return;\n\n this.open = true;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleFooterSlotChange = () => {\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n private handleAfterHide = async () => {\n if (!this.drawerElem) return;\n\n await leave(this.drawerElem);\n this.handleTransitionEnd();\n };\n\n private handleAfterShow = async () => {\n if (!this.drawerElem) return;\n\n this.el.classList.add(this.OPEN_CSS_CLASS);\n await enter(this.drawerElem);\n this.handleTransitionEnd();\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n this.el.classList.remove(this.OPEN_CSS_CLASS);\n };\n\n private get isPositionStart() {\n // !TO BE REMOVED: `placement` is deprecated and will be removed in the future\n return this.position === 'start' || this.placement === 'left';\n }\n\n private get isPositionEnd() {\n // !TO BE REMOVED: `placement` is deprecated and will be removed in the future\n return this.position === 'end' || this.placement === 'right';\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host>\n {/* BACKDROP */}\n {this.enableBackdrop && (\n <div\n class={{\n 'fixed inset-0 block bg-[--bq-drawer--backgroundBackdrop] opacity-0 transition-opacity duration-300':\n true,\n 'pointer-events-none': !this.open,\n 'opacity-60': this.open,\n }}\n tabIndex={-1}\n part=\"backdrop\"\n />\n )}\n {/* DRAWER PANEL */}\n <div\n class={{\n [`bq-drawer transition-all duration-300 ease-in-out ${this.position || this.placement}`]: true,\n '-start-[--bq-drawer--width]': this.isPositionStart,\n '-end-[--bq-drawer--width]': this.isPositionEnd,\n 'start-0': this.open && this.isPositionStart,\n 'end-0': this.open && this.isPositionEnd,\n }}\n ref={(div) => (this.drawerElem = div)}\n aria-hidden={!this.open ? 'true' : 'false'}\n aria-labelledby=\"bq-drawer__title\"\n aria-modal=\"true\"\n hidden={!this.open}\n part=\"panel\"\n role=\"dialog\"\n >\n <header class=\"flex items-center\" part=\"header\">\n <h2\n class=\"flex-1 items-center justify-between font-bold leading-regular text-primary\"\n id=\"bq-drawer__title\"\n part=\"title\"\n >\n <slot name=\"title\" />\n </h2>\n <div class=\"flex\" part=\"button-close\">\n <bq-button\n class=\"[&::part(button)]:rounded-s [&::part(button)]:border-0 [&::part(button)]:bs-fit [&::part(button)]:p-b-0 [&::part(button)]:p-i-0 [&::part(label)]:inline-flex\"\n appearance=\"text\"\n size=\"small\"\n slot=\"button-close\"\n exportparts=\"button:button-close__btn,label:button-close__label\"\n onClick={this.hide.bind(this)}\n >\n <slot name=\"button-close\">\n <bq-icon name=\"x-bold\" role=\"img\" title=\"Close\" />\n </slot>\n </bq-button>\n </div>\n </header>\n <main class=\"block flex-auto overflow-auto\" part=\"body\">\n <slot />\n </main>\n <footer\n class={{\n block: true,\n '!hidden': !this.hasFooter,\n }}\n ref={(footerElem) => (this.footerElem = footerElem)}\n part=\"footer\"\n >\n <slot name=\"footer-divider\">\n <bq-divider class=\"mb-m block\" dashed />\n </slot>\n <slot name=\"footer\" onSlotchange={this.handleFooterSlotChange} />\n </footer>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":";;;;uNAAO,MAAMA,EAAmB,CAAC,QAAS,OAGnC,MAAMC,EAAmB,CAAC,OAAQ,SCHzC,MAAMC,EAAc,iqtBACpB,MAAAC,EAAeD,E,MCsEFE,EAAQ,M,6KAIXC,WACAC,WACAC,eAAiB,kB,wBAWRC,UAAY,MACpBC,QAAmB,MAMHC,eAAiB,MAGjBC,oBAAsB,MAGtBC,WAAa,MAGEC,KAGAC,UAA8B,QAG9BC,SAA4B,MAMpE,sBAAMC,GACJ,IAAKC,KAAK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AM2B,KAAK,WAEbV,EAAA,OAAAjB,IAAA,2CAAKmB,MAAM,OAAOE,KAAK,gBACrBJ,EAAA,aAAAjB,IAAA,2CACEmB,MAAM,+JACNS,WAAW,OACXC,KAAK,QACLC,KAAK,eACLC,YAAY,qDACZC,QAAS7D,KAAK2B,KAAKmC,KAAK9D,OAExB8C,EAAA,QAAAjB,IAAA,2CAAM2B,KAAK,gBACTV,EAAA,WAAAjB,IAAA,2CAAS2B,KAAK,SAASF,KAAK,MAAMS,MAAM,cAKhDjB,EAAA,QAAAjB,IAAA,2CAAMmB,MAAM,gCAAgCE,KAAK,QAC/CJ,EAAA,QAAAjB,IAAA,8CAEFiB,EAAA,UAAAjB,IAAA,2CACEmB,MAAO,CACLgB,MAAO,KACP,WAAYhE,KAAKT,WAEnB4D,IAAM/D,GAAgBY,KAAKZ,WAAaA,EACxC8D,KAAK,UAELJ,EAAA,QAAAjB,IAAA,2CAAM2B,KAAK,kBACTV,EAAA,cAAAjB,IAAA,2CAAYmB,MAAM,aAAaiB,OAAM,QAEvCnB,EAAA,QAAAjB,IAAA,2CAAM2B,KAAK,SAASU,aAAclE,KAAKkC,2B","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ACCORDION_SIZE","ACCORDION_APPEARANCE","Accordion","el","header","panel","animation","isClosing","isExpanding","animationOptions","duration","easing","constructor","this","querySelector","open","style","height","offsetHeight","window","requestAnimationFrame","expand","close","startHeight","endHeight","cancel","animate","onfinish","onAnimationFinish","oncancel","removeAttribute","endEvent","Event","bubbles","composed","dispatchEvent","bqAccordionCss","BqAccordionStyle0","BqAccordion","accordion","prefixElem","suffixElem","detailsElem","hasPrefix","hasSuffix","appearance","disabled","expanded","noAnimation","rotate","size","checkPropValues","validatePropValue","handleExpandedChange","event","bqOpen","emit","bqClose","defaultPrevented","isCssInterpolateSizeSupported","setTimeout","CustomEvent","handleDisabledChange","handleJsAnimation","console","warn","bqBlur","bqFocus","bqAfterOpen","bqAfterClose","bqClick","componentWillLoad","componentDidLoad","onAccordionTransitionEnd","stopPropagation","target","handleClick","preventDefault","handleFocus","handleBlur","handlePrefixSlotChange","hasSlotContent","handleSuffixSlotChange","CSS","supports","render","h","key","class","ref","part","id","onClick","onFocus","onBlur","tabindex","role","element","name","onSlotchange"],"sources":["../../packages/beeq/src/components/accordion/bq-accordion.types.ts","../../packages/beeq/src/components/accordion/helper/index.ts","../../packages/beeq/src/components/accordion/scss/bq-accordion.scss?tag=bq-accordion&encapsulation=shadow","../../packages/beeq/src/components/accordion/bq-accordion.tsx"],"sourcesContent":["export const ACCORDION_SIZE = ['small', 'medium'] as const;\nexport type TAccordionSize = (typeof ACCORDION_SIZE)[number];\n\nexport const ACCORDION_APPEARANCE = ['filled', 'ghost'] as const;\nexport type TAccordionAppearance = (typeof ACCORDION_APPEARANCE)[number];\n","/* -------------------------------------------------------------------------------------- */\n/* 💡 Credits: https://css-tricks.com/how-to-animate-the-details-element-using-waapi */\n/* -------------------------------------------------------------------------------------- */\n\nexport class Accordion {\n private el: HTMLDetailsElement;\n private header: HTMLElement;\n private panel: HTMLElement;\n private animation: Animation | null;\n private isClosing: boolean;\n private isExpanding: boolean;\n private animationOptions = {\n duration: 200,\n easing: 'ease-in-out',\n };\n\n constructor(el: HTMLDetailsElement) {\n // Store the <details> element\n this.el = el;\n // Store the <summary> header element\n this.header = el.querySelector('summary');\n // Store the <div class=\"content\"> element\n this.panel = el.querySelector('.bq-accordion__body');\n // Store the animation object (so we can cancel it, if needed)\n this.animation = null;\n // Store if the element is closing\n this.isClosing = false;\n // Store if the element is expanding\n this.isExpanding = false;\n }\n\n public open() {\n // Check if the element is being closed or is already closed\n if (!this.isClosing && this.el.open) return;\n // Apply a fixed height on the element\n this.el.style.height = `${this.el.offsetHeight}px`;\n // Force the [open] attribute on the details element\n this.el.open = true;\n // Wait for the next frame to call the expand function\n window.requestAnimationFrame(() => this.expand());\n }\n\n public close() {\n // Check if the element is being opened or is already open\n if (!this.isExpanding && !this.el.open) return;\n // Set the element as \"being closed\"\n this.isClosing = true;\n\n // Store the current height of the element\n const startHeight = `${this.el.offsetHeight}px`;\n // Calculate the height of the <summary> header\n const endHeight = `${this.header.offsetHeight}px`;\n\n // If there is already an animation running\n if (this.animation) {\n // Cancel the current animation\n this.animation.cancel();\n }\n\n // Start a WAAPI animation\n this.animation = this.el.animate({ height: [startHeight, endHeight] }, this.animationOptions);\n // When the animation is complete, call onAnimationFinish()\n this.animation.onfinish = () => this.onAnimationFinish(false);\n // If the animation is cancelled, isClosing variable is set to false\n this.animation.oncancel = () => (this.isClosing = false);\n }\n\n // Expands the accordion\n private expand() {\n // Set the element as \"being expanding\"\n this.isExpanding = true;\n // Get the current fixed height of the element\n const startHeight = `${this.el.offsetHeight}px`;\n // Calculate the open height of the element (summary header height + panel body height)\n const endHeight = `${this.header.offsetHeight + this.panel.offsetHeight}px`;\n\n // If there is already an animation running\n if (this.animation) {\n // Cancel the current animation\n this.animation.cancel();\n }\n\n // Start a WAAPI animation\n this.animation = this.el.animate({ height: [startHeight, endHeight] }, this.animationOptions);\n // When the animation is complete, call onAnimationFinish()\n this.animation.onfinish = () => this.onAnimationFinish(true);\n // If the animation is cancelled, isExpanding variable is set to false\n this.animation.oncancel = () => (this.isExpanding = false);\n }\n\n // Handles the end of the animation\n private onAnimationFinish(open: boolean) {\n // Set the open attribute based on the parameter\n this.el.open = open;\n // Clear the stored animation\n this.animation = null;\n // Reset isClosing & isExpanding\n this.isClosing = false;\n this.isExpanding = false;\n // Remove the overflow hidden and the fixed height\n this.el.removeAttribute('style');\n // Dispatch a custom event based on the open parameter\n const endEvent = new Event('accordionTransitionEnd', { bubbles: false, composed: true });\n this.el.dispatchEvent(endEvent);\n }\n}\n","/* -------------------------------------------------------------------------- */\n/* Accordion styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-accordion.variables';\n\n:host {\n @apply block;\n}\n\n.bq-accordion:not(.no-animation) {\n /* -------------------------------------------------------------------- */\n /* Opt-in the component to animating to/from intrinsic sizing keywords */\n /* Details: https://chrome.dev/css-wrapped-2024/#animate-to-height-auto */\n /* -------------------------------------------------------------------- */\n @apply supports-[interpolate-size:_allow-keywords]:[interpolate-size:_allow-keywords];\n}\n\n.bq-accordion {\n &.disabled {\n @apply cursor-not-allowed opacity-60;\n\n .bq-accordion__header {\n @apply pointer-events-none;\n }\n }\n\n &.small .bq-accordion__header {\n @apply gap-[--bq-accordion--small-gap] pe-[--bq-accordion--small-padding-end] ps-[--bq-accordion--small-padding-start] p-b-[--bq-accordion--small-padding-y];\n @apply rounded-ee-[--bq-accordion--small-radius] rounded-es-[--bq-accordion--small-radius] rounded-se-[--bq-accordion--small-radius] rounded-ss-[--bq-accordion--small-radius];\n }\n\n &.medium .bq-accordion__header {\n @apply gap-[--bq-accordion--medium-gap] pe-[--bq-accordion--medium-padding-end] ps-[--bq-accordion--medium-padding-start] p-b-[--bq-accordion--medium-padding-y];\n @apply rounded-ee-[--bq-accordion--medium-radius] rounded-es-[--bq-accordion--medium-radius] rounded-se-[--bq-accordion--medium-radius] rounded-ss-[--bq-accordion--medium-radius];\n }\n\n &[open] .bq-accordion__header {\n @apply border-[length:--bq-accordion--expanded-border-width] border-[color:--bq-accordion--expanded-border-color];\n @apply rounded-ee-[0px] rounded-es-[0px];\n\n border-style: var(--bq-accordion--expanded-border-style);\n }\n\n &.small .bq-accordion__content {\n @apply rounded-ee-[--bq-accordion--small-radius] rounded-es-[--bq-accordion--small-radius] rounded-se-[0px] rounded-ss-[0px];\n }\n\n &.medium .bq-accordion__content {\n @apply rounded-ee-[--bq-accordion--medium-radius] rounded-es-[--bq-accordion--medium-radius] rounded-se-[0px] rounded-ss-[0px];\n }\n\n &.filled {\n .bq-accordion__header {\n @apply bg-[--bq-accordion--filled-collapsed-background] hover:bg-hover-ui-secondary;\n }\n\n .bq-accordion__header--text {\n @apply text-[--bq-accordion--filled-collapsed-text-color];\n }\n\n .bq-accordion__content {\n @apply border-[length:--bq-accordion--panel-filled-border-width] border-[color:--bq-accordion--panel-filled-border-color];\n\n border-style: var(--bq-accordion--panel-filled-border-style);\n }\n\n &[open] .bq-accordion__header {\n @apply bg-[--bq-accordion--filled-expanded-background] hover:bg-hover-ui-secondary;\n }\n\n &[open] .bq-accordion__header--text {\n @apply text-[--bq-accordion--filled-expanded-text-color];\n }\n }\n\n &.ghost {\n .bq-accordion__header {\n @apply bg-[--bq-accordion--ghost-collapsed-background] hover:bg-hover-ui-secondary;\n }\n\n .bq-accordion__header--text {\n @apply text-[--bq-accordion--ghost-collapsed-text-color];\n }\n\n .bq-accordion__content {\n @apply border-[length:--bq-accordion--panel-ghost-border-width] border-[color:--bq-accordion--panel-ghost-border-color];\n\n border-style: var(--bq-accordion--panel-ghost-border-style);\n }\n\n &[open] .bq-accordion__header {\n @apply bg-[--bq-accordion--ghost-expanded-background] hover:bg-hover-ui-secondary;\n }\n\n &[open] .bq-accordion__header--text {\n @apply text-[--bq-accordion--ghost-expanded-text-color];\n }\n }\n\n &.small.filled .bq-accordion__content {\n @apply pe-[--bq-accordion--panel-small-filled-padding-end] ps-[--bq-accordion--panel-small-filled-padding-start] p-b-[--bq-accordion--panel-small-filled-padding-y];\n }\n\n &.medium.filled .bq-accordion__content {\n @apply pe-[--bq-accordion--panel-medium-filled-padding-end] ps-[--bq-accordion--panel-medium-filled-padding-start] p-b-[--bq-accordion--panel-medium-filled-padding-y];\n }\n\n &.small.ghost .bq-accordion__content {\n @apply pe-[--bq-accordion--panel-small-ghost-padding-end] ps-[--bq-accordion--panel-small-ghost-padding-start] p-b-[--bq-accordion--panel-small-ghost-padding-y];\n }\n\n &.medium.ghost .bq-accordion__content {\n @apply pe-[--bq-accordion--panel-medium-ghost-padding-end] ps-[--bq-accordion--panel-medium-ghost-padding-start] p-b-[--bq-accordion--panel-medium-ghost-padding-y];\n }\n}\n\n.bq-accordion::details-content {\n @apply block overflow-clip transition-all duration-300 ease-in-out bs-0 [transition-behavior:allow-discrete];\n}\n\n.bq-accordion[open]::details-content {\n @apply bs-auto;\n}\n\n.bq-accordion__header {\n // Since there's an overflow on the <summary> element, the focus outline is not visible,\n // so we force it to be inset to avoid the overflow hidden.\n --bq-ring-offset-width: -2px;\n\n @apply flex cursor-pointer select-none list-none items-center transition-colors duration-300 ease-in-out focus-visible:focus;\n @apply border-[length:--bq-accordion--collapsed-border-width] border-[color:--bq-accordion--collapsed-border-color];\n\n border-style: var(--bq-accordion--collapsed-border-style);\n\n &::marker,\n &::-webkit-details-marker {\n @apply hidden;\n }\n}\n\n.bq-accordion__header--text {\n @apply flex-1;\n}\n\n.bq-accordion__header--prefix,\n.bq-accordion__header--suffix {\n @apply flex items-center justify-center;\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Prop, State, Watch } from '@stencil/core';\n\nimport { ACCORDION_APPEARANCE, ACCORDION_SIZE, TAccordionAppearance, TAccordionSize } from './bq-accordion.types';\nimport { Accordion } from './helper';\nimport { hasSlotContent, validatePropValue } from '../../shared/utils';\n\n/**\n * The Accordion is a UI component that allows users to toggle between showing and hiding content sections. It provides a collapsible functionality, where only one section can be expanded at a time, while the others remain collapsed.\n *\n * @example How to use it\n * ```html\n * <bq-accordion appearance=\"filled\" size=\"medium\">\n * <bq-avatar size=\"xsmall\" image=\"/image/url/img.png\" slot=\"prefix\"></bq-avatar>\n * <h3 slot=\"header\">Header</h3>\n * <div>Lorem ipsum dolor...</div>\n * </bq-accordion>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/713eae-accordion\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"filled\" | \"ghost\"} [appearance=\"filled\"] - The appearance style of the Accordion\n * @attr {boolean} [disabled=false] - If true, the Accordion is disabled\n * @attr {boolean} [expanded=false] - If true, the Accordion is expanded\n * @attr {boolean} [no-animation=false] - Animation is set through JS when the browser does not support CSS calc-size() If true, the Accordion animation, will be disabled. No animation will be applied.\n * @attr {boolean} [rotate=false] - If true, the Accordion expand icon is rotate 180deg when expanded\n * @attr {\"small\" | \"medium\"} [size=\"medium\"] - The size of the the Accordion\n *\n * @event bqOpen - Handler to be called when the accordion is opened\n * @event bqAfterOpen - Handler to be called after the accordion is opened\n * @event bqClose - Handler to be called when the accordion is closed\n * @event bqAfterClose - Handler to be called after the accordion is closed\n * @event bqFocus - Handler to be called when the accordion gets focus\n * @event bqClick - Handler to be called when the accordion is clicked\n * @event bqBlur - Handler to be called when the accordion loses focus\n *\n * @slot - The accordion panel content\n * @slot collapse - The accordion collapse icon\n * @slot expand - The accordion expand icon\n * @slot header - The accordion header content\n * @slot prefix - The accordion prefix content (icon or avatar)\n * @slot suffix - The accordion suffix content (icon or avatar)\n *\n * @part base - The `<details>` that holds the accordion content\n * @part header - The `<summary>` that holds the accordion header content\n * @part panel - The `<div>` that holds the accordion panel content\n * @part prefix - The `<div>` that holds the accordion prefix content\n * @part suffix - The `<div>` that holds the accordion suffix content\n * @part text - The `<div>` that holds the accordion header text content\n *\n * @cssprop --bq-accordion--small-padding-y - Accordion small vertical padding\n * @cssprop --bq-accordion--small-padding-start - Accordion small start padding\n * @cssprop --bq-accordion--small-padding-end - Accordion small end padding\n * @cssprop --bq-accordion--small-padding-gap - Accordion small gap distance between suffix, title and prefix\n * @cssprop --bq-accordion--small-radius - Accordion small border radius\n *\n * @cssprop --bq-accordion--medium-padding-y - Accordion medium vertical padding\n * @cssprop --bq-accordion--medium-padding-start - Accordion medium start padding\n * @cssprop --bq-accordion--medium-padding-end - Accordion medium end padding\n * @cssprop --bq-accordion--medium-padding-gap - Accordion medium gap distance between suffix, title and prefix\n * @cssprop --bq-accordion--medium-radius - Accordion medium border radius\n *\n * @cssprop --bq-accordion--collapsed-border-color - Accordion collapsed border color\n * @cssprop --bq-accordion--collapsed-border-style - Accordion collapsed border style\n * @cssprop --bq-accordion--collapsed-border-width - Accordion collapsed border width\n *\n * @cssprop --bq-accordion--expanded-border-color - Accordion expanded border color\n * @cssprop --bq-accordion--expanded-border-style - Accordion expanded border style\n * @cssprop --bq-accordion--expanded-border-width - Accordion expanded border width\n *\n * @cssprop --bq-accordion--filled-collapsed-background - Accordion filled collapsed header background\n * @cssprop --bq-accordion--filled-collapsed-text-color - Accordion filled collapsed header text color\n * @cssprop --bq-accordion--filled-expanded-background - Accordion filled expanded header background\n * @cssprop --bq-accordion--filled-expanded-collapsed-hover - Accordion filled expanded header color on hover\n * @cssprop --bq-accordion--filled-expanded-text-color - Accordion filled expanded header text color\n *\n * @cssprop --bq-accordion--ghost-collapsed-background - Accordion ghost collapsed header background\n * @cssprop --bq-accordion--ghost-collapsed-text-color - Accordion ghost collapsed header text color\n * @cssprop --bq-accordion--ghost-expanded-background - Accordion ghost expanded header background\n * @cssprop --bq-accordion--ghost-expanded-collapsed-hover - Accordion ghost expanded header color on hover\n * @cssprop --bq-accordion--ghost-expanded-text-color - Accordion ghost expanded header text color\n *\n * @cssprop --bq-accordion--panel-filled-border-color - Accordion filled panel border color\n * @cssprop --bq-accordion--panel-filled-border-style - Accordion filled panel border style\n * @cssprop --bq-accordion--panel-filled-border-width - Accordion filled panel border width\n * @cssprop --bq-accordion--panel-small-filled-padding-y - Accordion small filled panel vertical padding\n * @cssprop --bq-accordion--panel-small-filled-padding-start - Accordion small filled panel start padding\n * @cssprop --bq-accordion--panel-small-filled-padding-end - Accordion small filled panel end padding\n * @cssprop --bq-accordion--panel-medium-filled-padding-y - Accordion medium filled panel vertical padding\n * @cssprop --bq-accordion--panel-medium-filled-padding-start - Accordion medium filled panel start padding\n * @cssprop --bq-accordion--panel-medium-filled-padding-end - Accordion medium filled panel end padding\n *\n * @cssprop --bq-accordion--panel-ghost-border-color - Accordion ghost panel border color\n * @cssprop --bq-accordion--panel-ghost-border-style - Accordion ghost panel border style\n * @cssprop --bq-accordion--panel-ghost-border-width - Accordion ghost panel border width\n * @cssprop --bq-accordion--panel-small-ghost-padding-y - Accordion small ghost panel vertical padding\n * @cssprop --bq-accordion--panel-small-ghost-padding-start - Accordion small ghost panel start padding\n * @cssprop --bq-accordion--panel-small-ghost-padding-end - Accordion small ghost panel end padding\n * @cssprop --bq-accordion--panel-medium-ghost-padding-y - Accordion medium ghost panel vertical padding\n * @cssprop --bq-accordion--panel-medium-ghost-padding-start - Accordion medium ghost panel start padding\n * @cssprop --bq-accordion--panel-medium-ghost-padding-end - Accordion medium ghost panel end padding\n */\n@Component({\n tag: 'bq-accordion',\n styleUrl: './scss/bq-accordion.scss',\n shadow: true,\n})\nexport class BqAccordion {\n // Own Properties\n // ====================\n\n private accordion: Accordion;\n private prefixElem: HTMLDivElement;\n private suffixElem: HTMLDivElement;\n private detailsElem: HTMLDetailsElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqAccordionElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasPrefix = false;\n @State() private hasSuffix = false;\n\n // Public Property API\n // ========================\n\n /** The appearance style of the Accordion */\n @Prop({ reflect: true, mutable: true }) appearance: TAccordionAppearance = 'filled';\n\n /** If true, the Accordion is disabled */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** If true, the Accordion is expanded */\n @Prop({ reflect: true, mutable: true }) expanded: boolean = false;\n\n /**\n * Animation is set through JS when the browser does not support CSS calc-size()\n * If true, the Accordion animation, will be disabled. No animation will be applied.\n */\n @Prop({ reflect: true }) noAnimation: boolean = false;\n\n /** If true, the Accordion expand icon is rotate 180deg when expanded */\n @Prop({ reflect: true }) rotate: boolean = false;\n\n /** The size of the Accordion */\n @Prop({ reflect: true, mutable: true }) size: TAccordionSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n checkPropValues() {\n validatePropValue(ACCORDION_SIZE, 'medium', this.el, 'size');\n validatePropValue(ACCORDION_APPEARANCE, 'filled', this.el, 'appearance');\n }\n\n @Watch('expanded')\n handleExpandedChange() {\n const event = this.expanded ? this.bqOpen.emit(this.el) : this.bqClose.emit(this.el);\n if (event.defaultPrevented) {\n this.expanded = !this.expanded;\n return;\n }\n\n if (this.expanded) {\n this.accordion?.open();\n } else {\n this.accordion?.close();\n }\n if (!this.isCssInterpolateSizeSupported) return;\n\n // NOTE: This is a workaround to trigger the transitionEnd event\n // when the open/close animation is handled via CSS instead of JS\n setTimeout(() => {\n this.el.dispatchEvent(new CustomEvent('accordionTransitionEnd', { bubbles: false, composed: true }));\n }, 200);\n }\n\n @Watch('disabled')\n handleDisabledChange() {\n if (!this.disabled) return;\n\n this.expanded = false;\n }\n\n @Watch('noAnimation')\n handleJsAnimation() {\n if (this.isCssInterpolateSizeSupported) return;\n\n console.warn(\n `[bq-accordion] animating to/from intrinsic sizing keywords (interpolate-size: allow-keywords) is not supported and animation will be set through JS.\n For vertical layout, consider using the 'noAnimation' prop ('no-animation' attribute) to disable it`,\n );\n this.accordion = !this.noAnimation ? new Accordion(this.detailsElem) : null;\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the accordion loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqAccordionElement>;\n\n /** Handler to be called when the accordion gets focus */\n @Event() bqFocus: EventEmitter<HTMLBqAccordionElement>;\n\n /** Handler to be called when the accordion is opened */\n @Event() bqOpen: EventEmitter<HTMLBqAccordionElement>;\n\n /** Handler to be called after the accordion is opened */\n @Event() bqAfterOpen: EventEmitter<HTMLBqAccordionElement>;\n\n /** Handler to be called when the accordion is closed */\n @Event() bqClose: EventEmitter<HTMLBqAccordionElement>;\n\n /** Handler to be called after the accordion is closed */\n @Event() bqAfterClose: EventEmitter<HTMLBqAccordionElement>;\n\n /** Handler to be called when the accordion is clicked */\n @Event() bqClick: EventEmitter<HTMLBqAccordionElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleJsAnimation();\n this.handleExpandedChange();\n }\n\n // Listeners\n // ==============\n\n @Listen('accordionTransitionEnd')\n onAccordionTransitionEnd(event: CustomEvent) {\n event.stopPropagation();\n if (event.target !== this.el) return;\n\n if (this.expanded) {\n this.bqAfterOpen.emit(this.el);\n return;\n }\n\n this.bqAfterClose.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 handleClick = (event: MouseEvent) => {\n event.preventDefault();\n\n if (this.disabled) return;\n\n this.bqClick.emit(this.el);\n this.expanded = !this.expanded;\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handlePrefixSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n };\n\n private handleSuffixSlotChange = () => {\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private get open() {\n return this.expanded && !this.disabled;\n }\n\n private get isCssInterpolateSizeSupported() {\n return window.CSS?.supports('(interpolate-size: allow-keywords)');\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <details\n class={{\n [`bq-accordion overflow-hidden ${this.size} ${this.appearance}`]: true,\n 'no-animation': this.noAnimation,\n disabled: this.disabled,\n }}\n ref={(detailsElem: HTMLDetailsElement) => (this.detailsElem = detailsElem)}\n open={this.open}\n part=\"base\"\n >\n <summary\n id=\"bq-accordion__header\"\n class=\"bq-accordion__header\"\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n aria-expanded={this.expanded ? 'true' : 'false'}\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls=\"bq-accordion__content\"\n tabindex={this.disabled ? -1 : 0}\n role=\"button\"\n part=\"header\"\n >\n <div\n ref={(element) => (this.prefixElem = element)}\n class={{ 'bq-accordion__header--prefix': true, '!hidden': !this.hasPrefix }}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handlePrefixSlotChange} />\n </div>\n <div class=\"bq-accordion__header--text\" part=\"text\">\n <slot name=\"header\" />\n </div>\n <div\n ref={(element) => (this.suffixElem = element)}\n class={{ 'bq-accordion__header--suffix': true, '!hidden': !this.hasSuffix }}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSuffixSlotChange} />\n </div>\n <div\n class={{\n 'flex items-center justify-center transition-transform duration-300 ease-in-out': true,\n '!hidden': this.open && !this.rotate,\n 'rotate-180': this.rotate && this.open,\n }}\n aria-hidden=\"true\"\n >\n <slot name=\"expand\">\n <bq-icon name=\"plus\" />\n </slot>\n </div>\n <div\n class={{ 'flex items-center justify-center': true, '!hidden': (!this.open && !this.rotate) || this.rotate }}\n aria-hidden=\"true\"\n >\n <slot name=\"collapse\">\n <bq-icon name=\"minus\" />\n </slot>\n </div>\n </summary>\n <div\n class=\"bq-accordion__body overflow-hidden\"\n aria-labelledby=\"bq-accordion__header\"\n role=\"region\"\n part=\"panel\"\n >\n <slot id=\"bq-accordion__content\" class=\"bq-accordion__content block\" />\n </div>\n </details>\n );\n }\n}\n"],"mappings":";;;;4HAAO,MAAMA,EAAiB,CAAC,QAAS,UAGjC,MAAMC,EAAuB,CAAC,SAAU,S,MCClCC,EACHC,GACAC,OACAC,MACAC,UACAC,UACAC,YACAC,iBAAmB,CACzBC,SAAU,IACVC,OAAQ,eAGV,WAAAC,CAAYT,GAEVU,KAAKV,GAAKA,EAEVU,KAAKT,OAASD,EAAGW,cAAc,WAE/BD,KAAKR,MAAQF,EAAGW,cAAc,uBAE9BD,KAAKP,UAAY,KAEjBO,KAAKN,UAAY,MAEjBM,KAAKL,YAAc,K,CAGd,IAAAO,GAEL,IAAKF,KAAKN,WAAaM,KAAKV,GAAGY,KAAM,OAErCF,KAAKV,GAAGa,MAAMC,OAAS,GAAGJ,KAAKV,GAAGe,iBAElCL,KAAKV,GAAGY,KAAO,KAEfI,OAAOC,uBAAsB,IAAMP,KAAKQ,U,CAGnC,KAAAC,GAEL,IAAKT,KAAKL,cAAg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,IAAA,2CACEE,IAAMQ,GAAapF,KAAK4B,WAAawD,EACrCT,MAAO,CAAE,+BAAgC,KAAM,WAAY3E,KAAK+B,WAChE8C,KAAK,UAELJ,EAAA,QAAAC,IAAA,2CAAMW,KAAK,SAASC,aAActF,KAAKqE,0BAEzCI,EAAA,OAAAC,IAAA,2CACEC,MAAO,CACL,iFAAkF,KAClF,UAAW3E,KAAKE,OAASF,KAAKoC,OAC9B,aAAcpC,KAAKoC,QAAUpC,KAAKE,MACnC,cACW,QAEZuE,EAAA,QAAAC,IAAA,2CAAMW,KAAK,UACTZ,EAAA,WAAAC,IAAA,2CAASW,KAAK,WAGlBZ,EAAA,OAAAC,IAAA,2CACEC,MAAO,CAAE,mCAAoC,KAAM,WAAa3E,KAAKE,OAASF,KAAKoC,QAAWpC,KAAKoC,QAAQ,cAC/F,QAEZqC,EAAA,QAAAC,IAAA,2CAAMW,KAAK,YACTZ,EAAA,WAAAC,IAAA,2CAASW,KAAK,aAIpBZ,EAAA,OAAAC,IAAA,2CACEC,MAAM,qCAAoC,kBAC1B,uBAChBQ,KAAK,SACLN,KAAK,SAELJ,EAAA,QAAAC,IAAA,2CAAMI,GAAG,wBAAwBH,MAAM,iC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["NOTIFICATION_TYPE","bqNotificationCss","BqNotificationStyle0","NOTIFICATION_PORTAL_SELECTOR","BqNotification","autoDismissDebounce","bodyElem","footerElem","notificationElem","hasContent","hasFooter","notificationPortal","isClient","document","querySelector","autoDismiss","border","disableClose","hideIcon","open","time","type","handleTimeout","this","cancel","debounce","hide","handleOpenChange","checkPropValues","validatePropValue","el","bqHide","bqShow","bqAfterOpen","bqAfterClose","connectedCallback","Object","assign","createElement","className","componentWillLoad","afterNotificationClose","removeChild","tagName","toLowerCase","remove","error","DOMException","handleHide","show","handleShow","toast","parentElement","body","append","appendChild","requestAnimationFrame","async","ev","emit","defaultPrevented","leave","handleTransitionEnd","enter","handleContentSlotChange","hasSlotContent","handleFooterSlotChange","iconName","typeMap","success","warning","render","style","h","Host","key","class","hidden","role","ref","div","part","appearance","size","onClick","name","exportparts","onSlotchange"],"sources":["../../packages/beeq/src/components/notification/bq-notification.types.ts","../../packages/beeq/src/components/notification/scss/bq-notification.scss?tag=bq-notification&encapsulation=shadow","../../packages/beeq/src/components/notification/bq-notification.tsx"],"sourcesContent":["export const NOTIFICATION_TYPE = ['error', 'info', 'neutral', 'success', 'warning'] as const;\nexport type TNotificationType = (typeof NOTIFICATION_TYPE)[number];\n\nexport const NOTIFICATION_BORDER_RADIUS = ['none', 'xs2', 'xs', 's', 'm', 'l', 'full'] as const;\nexport type TNotificationBorderRadius = (typeof NOTIFICATION_BORDER_RADIUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Notification styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-notification.variables';\n\n:host {\n @apply block;\n}\n\n:host(.is-hidden) {\n @apply hidden;\n}\n\n.bq-notification {\n @apply relative flex transition-all min-is-[--bq-notification--min-width] p-b-[--bq-notification--padding] p-i-[--bq-notification--padding];\n @apply rounded-[--bq-notification--border-radius] bg-[--bq-notification--background] shadow-[shadow:--bq-notification--box-shadow];\n}\n\n/**\n * Set the notification icon color based on the type value selected\n */\n.notification--icon.color {\n &-error {\n @apply text-[color:--bq-notification--icon-color-error];\n }\n\n &-info {\n @apply text-[color:--bq-notification--icon-color-info];\n }\n\n &-neutral {\n @apply text-[color:--bq-notification--icon-color-neutral];\n }\n\n &-success {\n @apply text-[color:--bq-notification--icon-color-success];\n }\n\n &-warning {\n @apply text-[color:--bq-notification--icon-color-warning];\n }\n}\n\n/**\n * Tweak the close bq-button styles so it remain small without extra padding\n */\n.notification--close::part(button) {\n @apply rounded-s border-0 bs-fit p-b-0 p-i-0;\n}\n\n/**\n * Here we guarantee that if the footer actions are wrapped in a div container from the consumer side,\n * the styles get applied to the that wrapping container directly\n */\n[part='footer'] ::slotted(*) {\n @apply flex items-start gap-xs;\n}\n\n[part='body'],\n[part='footer'] {\n ::slotted(*) {\n @apply block m-bs-m;\n }\n}\n","import { Component, Element, Event, 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"],"mappings":";;;;mRAAO,MAAMA,EAAoB,CAAC,QAAS,OAAQ,UAAW,UAAW,WCAzE,MAAMC,EAAoB,gtzBAC1B,MAAAC,EAAeD,ECIf,MAAME,EAA+B,yB,MA8ExBC,EAAc,M,2KAIjBC,oBACAC,SACAC,WACAC,iB,wBAWSC,WAAa,MACbC,UAAY,MACZC,mBAAqBC,IAAaC,SAASC,cAAc,IAAIX,KAAkC,KAMvFY,YAGAC,OAAoC,IAGpCC,aAGAC,SAGeC,KAGfC,KAAe,IAGfC,KAA0B,OAMnD,aAAAC,GACEC,KAAKlB,qBAAqBmB,SAC1B,IAAKD,KAAKR,YAAa,OAEvBQ,KAAKlB,oBAAsBoB,GAAS,KAClCF,KAAKG,MAAM,GACVH,KAAKH,MAER,GAAIG,KAAKJ,KAAMI,KAAKlB,qB,CAItB,gBAAAsB,GACEJ,KAAKlB,qBAAqBmB,SAE1B,KAAMD,KAAKR,aAAeQ,KAAKJ,MAAO,OACtCI,KAAKlB,qB,CAIP,eAAAuB,GACEC,EAAkB7B,EAAmB,OAAQuB,KAAKO,GAAI,O,CAQ/CC,OAGAC,OAGAC,YAGAC,aAMT,iBAAAC,GACE,IAAKvB,IAAY,OAEjB,MAAMD,mBAAEA,GAAuBY,KAC/B,IAAKZ,EAAoB,CACvBY,KAAKZ,mBAAqByB,OAAOC,OAAOxB,SAASyB,cAAc,OAAQ,CACrEC,UAAWpC,G,EAKjB,iBA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AE,IAAA,2CAAMU,KAAK,OAAOE,aAAchE,KAAKyC,4BAIzCS,EAAA,OAAAE,IAAA,2CACEC,MAAO,CAAE,0BAA2B,KAAM,WAAYrD,KAAKb,WAC3DqE,IAAMC,GAASzD,KAAKhB,WAAayE,EACjCC,KAAK,UAELR,EAAA,QAAAE,IAAA,2CAAMU,KAAK,SAASE,aAAchE,KAAK2C,4B","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["BADGE_SIZE","bqBadgeCss","BqBadgeStyle0","BqBadge","spanElement","observer","MutationObserver","mutations","mutation","this","contentLength","target","textContent","length","backgroundColor","textColor","size","handleSizePropChange","validatePropValue","el","componentWillLoad","disconnectedCallback","disconnect","onSlotChange","slot","isNil","getTextContent","recurse","node","assignedNodes","flatten","takeRecords","observe","characterData","childList","subtree","querySelector","render","styles","getColorCSSVariable","h","Host","key","style","class","digit","part","ref","element","onSlotchange"],"sources":["../../packages/beeq/src/components/badge/bq-badge.types.ts","../../packages/beeq/src/components/badge/scss/bq-badge.scss?tag=bq-badge&encapsulation=shadow","../../packages/beeq/src/components/badge/bq-badge.tsx"],"sourcesContent":["export const BADGE_SIZE = ['small', 'medium'] as const;\nexport type TBadgeSize = (typeof BADGE_SIZE)[number];\n","/* -------------------------------------------------------------------------- */\n/* Badge styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-badge.variables';\n\n:host {\n @apply inline-block;\n}\n\n.bq-badge {\n @apply flex items-center justify-center bg-[color:--bq-badge--background-color] text-[color:--bq-badge--text-color];\n @apply rounded-[--bq-badge--border-radius] border-[length:--bq-badge--border-width] border-[color:--bq-badge--border-color];\n\n border-style: var(--bq-badge--border-style);\n box-shadow: var(--bq-badge--box-shadow);\n}\n\n.size {\n &--small {\n @apply bs-[--bq-badge--size-small] is-[--bq-badge--size-small];\n }\n\n &--medium {\n @apply bs-[--bq-badge--size-medium] is-[--bq-badge--size-medium];\n }\n}\n\n.digit {\n @apply min-bs-[--bq-badge--size-large] min-is-[--bq-badge--size-large];\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport { BADGE_SIZE, TBadgeSize } from './bq-badge.types';\nimport { getColorCSSVariable, getTextContent, isNil, validatePropValue } from '../../shared/utils';\n\n/**\n * The Badge component is a visual indicator that can be added to various elements within a user interface.\n * It is typically used to highlight important or relevant information, such as alerts, notifications, or statuses.\n *\n * @example How to use it\n * ```html\n * <bq-badge background-color=\"ui--success\" text-color=\"text--inverse\" size=\"small\">9</bq-badge>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/194fd1-badge\n * @status stable\n *\n * @attr {string} background-color - Badge background color. The value should be a valid value of the palette color.\n * @attr {string} text-color - Badge number color. The value should be a valid value of the palette color.\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the badge. Relevant if badge has no content.\n *\n * @slot - The default slot is used to add content to the badge. The content can be a number or a text.\n *\n * @part base - The component's internal wrapper that holds the count.\n * @part number - The component's internal wrapper that holds the slot.\n *\n * @cssprop --bq-badge--background-color - The badge background color\n * @cssprop --bq-badge--box-shadow - The badge box shadow\n * @cssprop --bq-badge--border-color - The badge border color\n * @cssprop --bq-badge--border-radius - The badge border radius\n * @cssprop --bq-badge--border-style - The badge border style\n * @cssprop --bq-badge--border-width - The badge border width\n * @cssprop --bq-badge--size-small - The badge small size\n * @cssprop --bq-badge--size-medium - The badge medium size\n * @cssprop --bq-badge--size-large - The badge large size\n * @cssprop --bq-badge--text-color - The badge text color\n */\n@Component({\n tag: 'bq-badge',\n styleUrl: './scss/bq-badge.scss',\n shadow: true,\n})\nexport class BqBadge {\n // Own Properties\n // ====================\n\n private spanElement?: HTMLSpanElement;\n\n private observer: MutationObserver = new MutationObserver((mutations) => {\n const [mutation] = mutations;\n this.contentLength = mutation.target.textContent.length;\n });\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el: HTMLBqBadgeElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private contentLength = 0;\n\n // Public Property API\n // ========================\n\n /** Badge background color. The value should be a valid value of the palette color */\n @Prop({ mutable: true, reflect: true }) backgroundColor? = 'ui--danger';\n\n /** Badge number color. The value should be a valid value of the palette color */\n @Prop({ mutable: true, reflect: true }) textColor? = 'text--inverse';\n\n /** The size of the badge. Relevant if badge has no content. */\n @Prop({ reflect: true, mutable: true }) size?: TBadgeSize = 'small';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('size')\n handleSizePropChange() {\n validatePropValue(BADGE_SIZE, 'small', this.el, 'size');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.handleSizePropChange();\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private onSlotChange = () => {\n const slot = this.slot;\n\n if (isNil(slot)) return;\n\n this.contentLength = getTextContent(slot, { recurse: true }).length;\n const [node] = slot.assignedNodes({ flatten: true });\n\n if (isNil(node)) {\n this.observer.takeRecords();\n return;\n }\n\n this.observer.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n };\n\n private get slot(): HTMLSlotElement | null {\n return this.spanElement?.querySelector('slot') ?? null;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const styles = {\n ...(this.backgroundColor && { '--bq-badge--background-color': getColorCSSVariable(this.backgroundColor) }),\n ...(this.textColor && { '--bq-badge--text-color': getColorCSSVariable(this.textColor) }),\n };\n\n return (\n <Host style={styles}>\n <div\n class={{\n 'bq-badge': true,\n [`size--${this.size}`]: this.contentLength === 0,\n digit: this.contentLength > 0,\n 'p-i-xs2': this.contentLength > 1,\n }}\n part=\"base\"\n >\n <span ref={(element) => (this.spanElement = element)} class=\"text-xs font-bold leading-small\" part=\"number\">\n <slot onSlotchange={this.onSlotChange}></slot>\n </span>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":";;;;iOAAO,MAAMA,EAAa,CAAC,QAAS,UCApC,MAAMC,EAAa,q6pBACnB,MAAAC,EAAeD,E,MCyCFE,EAAO,M,yBAIVC,YAEAC,SAA6B,IAAIC,kBAAkBC,IACzD,MAAOC,GAAYD,EACnBE,KAAKC,cAAgBF,EAASG,OAAOC,YAAYC,MAAM,I,wBAYxCH,cAAgB,EAMOI,gBAAmB,aAGnBC,UAAa,gBAGbC,KAAoB,QAM5D,oBAAAC,GACEC,EAAkBlB,EAAY,QAASS,KAAKU,GAAI,O,CAWlD,iBAAAC,GACEX,KAAKQ,sB,CAGP,oBAAAI,GACEZ,KAAKJ,UAAUiB,Y,CAkBTC,aAAe,KACrB,MAAMC,EAAOf,KAAKe,KAElB,GAAIC,EAAMD,GAAO,OAEjBf,KAAKC,cAAgBgB,EAAeF,EAAM,CAAEG,QAAS,OAAQd,OAC7D,MAAOe,GAAQJ,EAAKK,cAAc,CAAEC,QAAS,OAE7C,GAAIL,EAAMG,GAAO,CACfnB,KAAKJ,SAAS0B,cACd,M,CAGFtB,KAAKJ,SAAS2B,QAAQJ,EAAM,CAC1BK,cAAe,KACfC,UAAW,KACXC,QAAS,MACT,EAGJ,QAAYX,GACV,OAAOf,KAAKL,aAAagC,cAAc,SAAW,I,CAOpD,MAAAC,GACE,MAAMC,EAAS,IACT7B,KAAKK,iBAAmB,CAAE,+BAAgCyB,EAAoB9B,KAAKK,qBACnFL,KAAKM,WAAa,CAAE,yBAA0BwB,EAAoB9B,KAAKM,aAG7E,OACEyB,EAACC,EAAI,CAAAC,IAAA,2CAACC,MAAOL,GACXE,EAAA,OAAAE,IAAA,2CACEE,MAAO,CACL,WAAY,KACZ,CAAC,SAASnC,KAAKO,QAASP,KAAKC,gBAAkB,EAC/CmC,MAAOpC,KAAKC,cAAgB,EAC5B,UAAWD,KAAKC,cAAgB,GAElCoC,KAAK,QAELN,EAAA,QAAAE,IAAA,2CAAMK,IAAMC,GAAavC,KAAKL,YAAc4C,EAAUJ,MAAM,kCAAkCE,KAAK,UACjGN,EAAA,QAAAE,IAAA,2CAAMO,aAAcxC,KAAKc,iB","ignoreList":[]}
|
package/dist/beeq/p-cf923c68.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by Endavans
|
|
3
|
-
* © https://beeq.design - Apache 2 License.
|
|
4
|
-
*/
|
|
5
|
-
import"./p-4a3784e1.js";import{i as t}from"./p-07b82e50.js";let n;const s="data-beeq";const r="svg";const c=t=>{n=t};const e=(t="")=>{if(!n){const t=o();const n=t?null:u();const e=t||n;if(e){const n=t?e.getAttribute(s):i(e);c(`${n}/${r}`)}else{c(`./${r}`)}}const e=t?`/${t.replace(/^\//,"")}`:"";return n.replace(/\/$/,"")+e};const o=()=>{if(!t())return null;return document.querySelector(`script[${s}]`)};const u=()=>{if(!t())return null;return document.querySelector(`script[src*="beeq"]`)};const i=n=>{if(!t())return"";const s=n.getAttribute("src");return s?s.substring(0,s.lastIndexOf("/")):""};export{e as g,c as s};
|
|
6
|
-
//# sourceMappingURL=p-cf923c68.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["DIALOG_SIZE","DIALOG_FOOTER_APPEARANCE","bqDialogCss","BqDialogStyle0","BqDialog","dialogElem","contentElem","footerElem","closeSlotElem","OPEN_CSS_CLASS","hasContent","hasFooter","border","disableBackdrop","disableCloseEscKeydown","disableCloseClickOutside","footerAppearance","hideCloseButton","open","size","checkPropValues","validatePropValue","this","el","handleOpenChange","handleOpen","handleClose","bqCancel","bqClose","bqOpen","bqAfterOpen","bqAfterClose","componentWillLoad","componentDidLoad","shadowRoot","querySelector","addEventListener","hide","disconnectedCallback","removeEventListener","handleMouseClick","event","button","rect","getBoundingClientRect","clientY","top","bottom","clientX","left","right","cancel","handleKeyDown","ev","isEscapeKey","key","preventDefault","show","emit","defaultPrevented","async","leave","close","handleTransitionEnd","classList","add","showModal","enter","remove","handleContentSlotChange","hasSlotContent","handleFooterSlotChange","render","style","h","class","inert","undefined","ref","part","id","name","appearance","role","title","mainElem","onSlotchange"],"sources":["../../packages/beeq/src/components/dialog/bq-dialog.types.ts","../../packages/beeq/src/components/dialog/scss/bq-dialog.scss?tag=bq-dialog&encapsulation=shadow","../../packages/beeq/src/components/dialog/bq-dialog.tsx"],"sourcesContent":["export const DIALOG_SIZE = ['small', 'medium', 'large'] as const;\nexport type TDialogSize = (typeof DIALOG_SIZE)[number];\n\nexport const DIALOG_FOOTER_APPEARANCE = ['standard', 'highlight'] as const;\nexport type TDialogFooterAppearance = (typeof DIALOG_FOOTER_APPEARANCE)[number];\n\nexport const DIALOG_BORDER_RADIUS = ['none', 'xs2', 'xs', 's', 'm', 'l', 'full'] as const;\nexport type TDialogBorderRadius = (typeof DIALOG_BORDER_RADIUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Dialog styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-dialog.variables';\n\n:host {\n @apply invisible #{!important};\n}\n\n:host(.bq-dialog--open) {\n @apply visible #{!important};\n}\n\n/* --------------------------------- Dialog --------------------------------- */\n\n.bq-dialog {\n @apply absolute flex flex-col gap-[--bq-dialog--content-footer-gap] p-b-0 p-i-0;\n @apply bg-[--bq-dialog--background] text-[--bq-dialog--text-color] shadow-[shadow:--bq-dialog--box-shadow];\n @apply rounded-[--bq-dialog--border-radius] border-[length:--bq-dialog--border-width] border-[color:--bq-dialog--border-color];\n // If mobile resolution, dialog will be full width\n @apply is-[90vw];\n\n border-style: var(--bq-dialog--border-style);\n\n &.small {\n @apply sm:is-[--bq-dialog--width-small];\n }\n\n &.medium {\n @apply sm:is-[--bq-dialog--width-medium];\n }\n\n &.large {\n @apply sm:is-[--bq-dialog--width-large];\n }\n}\n\n/* ----------------------------- Dialog backdrop ---------------------------- */\n\n.bq-dialog::backdrop {\n @apply bg-[--bq-dialog--background-backdrop] opacity-0 transition-[opacity] duration-300 ease-in-out;\n}\n\n.bq-dialog[open]::backdrop {\n @apply opacity-60;\n}\n\n/* ------------------------------ Dialog header ----------------------------- */\n\n.bq-dialog--header {\n @apply sticky flex items-center gap-m inset-bs-0 p-b-[--bq-dialog--padding] p-be-0 p-i-[--bq-dialog--padding];\n}\n\n/* ------------------------------ Dialog footer ----------------------------- */\n\n.bq-dialog--footer {\n @apply sticky flex items-center justify-end gap-xs is-full inset-bs-[100%] p-b-[--bq-dialog--padding] p-bs-0 p-i-[--bq-dialog--padding];\n}\n\n/* --------------------------- Dialog close button -------------------------- */\n\n.bq-dialog--close {\n --bq-radius--m: theme(borderRadius.s);\n --bq-button--small-paddingX: theme(spacing.xs2);\n --bq-button--small-paddingY: theme(spacing.xs2);\n\n &::part(button) {\n @apply border-none;\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\nimport {\n DIALOG_FOOTER_APPEARANCE,\n DIALOG_SIZE,\n TDialogBorderRadius,\n TDialogFooterAppearance,\n TDialogSize,\n} from './bq-dialog.types';\nimport { enter, hasSlotContent, leave, validatePropValue } from '../../shared/utils';\n\n/**\n * The Dialog component is used to display additional content or prompt a user for action.\n * It provides a way to display additional information, options, or controls in a separate, non-obstructive interface element.\n *\n * @example How to use it\n * ```html\n * <bq-dialog footer-appearance=\"standard\" border=\"m\" size=\"medium\">\n * <h5 class=\"bold flex items-center gap-s\" slot=\"title\">\n * <bq-icon name=\"info\" size=\"30\" color=\"text--accent\" role=\"img\" title=\"Info\"></bq-icon>\n * Title\n * </h5>\n * <p>\n * Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n * standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a\n * type specimen book.\n * </p>\n * <div class=\"flex gap-xs\" slot=\"footer\">\n * <bq-button appearance=\"link\">Button</bq-button>\n * <bq-button variant=\"ghost\">Button</bq-button>\n * <bq-button variant=\"standard\" slot=\"footer\">Button</bq-button>\n * </div>\n * </bq-dialog>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/15b6fc-dialog\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-icon\n *\n * @attr {\"none\" | \"xs2\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"full\"} border - Border radius of the dialog component.\n * @attr {boolean} disable-backdrop - If true, the backdrop overlay won't be shown when the dialog opens.\n * @attr {boolean} disable-close-esc-keydown - If true, the dialog will not close when the [Esc] key is pressed.\n * @attr {boolean} disable-close-click-outside - If true, the dialog will not close when clicking on the backdrop overlay.\n * @attr {\"standard\" | \"highlight\"} footer-appearance - The appearance of the footer.\n * @attr {boolean} hide-close-button - If true, it hides the close button.\n * @attr {boolean} open - If true, the dialog will be shown as open.\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the dialog.\n *\n * @method show - Open the dialog.\n * @method hide - Closes the dialog.\n * @method cancel - Dismiss or cancel the dialog.\n *\n * @event bqCancel - Callback handler emitted when the dialog has been canceled or dismissed.\n * @event bqClose - Callback handler emitted when the dialog will close.\n * @event bqOpen - Callback handler emitted when the dialog will open.\n * @event bqAfterOpen - Callback handler emitted when the dialog finish opening.\n * @event bqAfterClose - Callback handler emitted when the dialog finish closing.\n *\n * @slot title - The title content of the dialog.\n * @slot - The body content of the dialog.\n * @slot footer - The footer content of the dialog.\n * @slot button-close - The close button content of the dialog.\n *\n * @part body - The `<main>` that holds the dialog body content.\n * @part button-close - The button that closes the dialog on click.\n * @part content - The `<div>` container that holds the dialog title and body content.\n * @part dialog - The `<dialog>` wrapper container inside the shadow DOM.\n * @part footer - The `<footer>` that holds footer content.\n * @part header - The `<header>` that holds the icon, title, description and close button.\n * @part title - The `<div>` that holds the title content.\n *\n * @cssprop --bq-dialog--background - Dialog background color\n * @cssprop --bq-dialog--background-backdrop - Dialog backdrop background color\n * @cssprop --bq-dialog--box-shadow - Dialog box shadow\n * @cssprop --bq-dialog--border-color - Dialog border color\n * @cssprop --bq-dialog--border-style - Dialog border style\n * @cssprop --bq-dialog--border-width - Dialog border width\n * @cssprop --bq-dialog--border-radius - Dialog border radius\n * @cssprop --bq-dialog--padding - Dialog padding\n * @cssprop --bq-dialog--content-footer-gap - Dialog gap distance between content and footer elements\n * @cssprop --bq-dialog--title-body-gap - Dialog gap distance between title and body elements\n * @cssprop --bq-dialog--width-small - Dialog small width\n * @cssprop --bq-dialog--width-medium - Dialog medium width\n * @cssprop --bq-dialog--width-large - Dialog large width\n * @cssprop --bq-dialog-z-index - Dialog z-index applied when opened\n */\n@Component({\n tag: 'bq-dialog',\n styleUrl: './scss/bq-dialog.scss',\n shadow: true,\n})\nexport class BqDialog {\n // Own Properties\n // ====================\n\n private dialogElem: HTMLDialogElement;\n private contentElem: HTMLElement;\n private footerElem: HTMLElement;\n private closeSlotElem: HTMLElement;\n private OPEN_CSS_CLASS = 'bq-dialog--open';\n\n // Reference to host HTML element\n // ===================================\n @Element() el!: HTMLBqDialogElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasContent = false;\n @State() private hasFooter = false;\n\n // Public Property API\n // ========================\n\n /** Border radius of the dialog component */\n @Prop({ reflect: true }) border: TDialogBorderRadius = 'm';\n\n /** If true, the backdrop overlay won't be shown when the dialog opens */\n @Prop({ reflect: true }) disableBackdrop = false;\n\n /** If true, the dialog will not close when the [Esc] key is press */\n @Prop({ reflect: true }) disableCloseEscKeydown = false;\n\n /** If true, the dialog will not close when clicking on the backdrop overlay */\n @Prop({ reflect: true }) disableCloseClickOutside = false;\n\n /** The appearance of footer */\n @Prop({ reflect: true }) footerAppearance: TDialogFooterAppearance = 'standard';\n\n /** If true, it hides the close button */\n @Prop({ reflect: true }) hideCloseButton = false;\n\n /** If true, the dialog will be shown as open */\n @Prop({ reflect: true, mutable: true }) open: boolean = false;\n\n /** The size of the dialog */\n @Prop({ reflect: true, mutable: true }) size: TDialogSize = 'medium';\n\n // Prop lifecycle events\n // =======================\n @Watch('footerAppearance')\n @Watch('size')\n checkPropValues() {\n validatePropValue(DIALOG_SIZE, 'large', this.el, 'size');\n validatePropValue(DIALOG_FOOTER_APPEARANCE, 'standard', this.el, 'footerAppearance');\n }\n\n @Watch('open')\n async handleOpenChange() {\n if (this.open) {\n await this.handleOpen();\n return;\n }\n\n await this.handleClose();\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the dialog has been canceled or dismissed */\n @Event() bqCancel!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog will close */\n @Event() bqClose!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog will open */\n @Event() bqOpen!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog finish opening */\n @Event() bqAfterOpen!: EventEmitter<void>;\n\n /** Callback handler emitted when the dialog finish closing */\n @Event() bqAfterClose!: EventEmitter<void>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleOpenChange();\n this.closeSlotElem = this.el.shadowRoot.querySelector('slot[name=\"button-close\"]');\n this.closeSlotElem?.addEventListener('click', () => this.hide());\n }\n\n disconnectedCallback() {\n this.closeSlotElem?.removeEventListener('click', () => this.hide());\n }\n\n // Listeners\n // ==============\n\n @Listen('mousedown', { target: 'window', capture: true })\n async handleMouseClick(event: MouseEvent) {\n if (!this.open) return;\n if (!this.dialogElem || this.disableCloseClickOutside) return;\n // Skip if the mouse button is not the main button\n if (event.button !== 0) return;\n\n const rect = this.dialogElem.getBoundingClientRect();\n if (\n event.clientY < rect.top ||\n event.clientY > rect.bottom ||\n event.clientX < rect.left ||\n event.clientX > rect.right\n ) {\n await this.cancel();\n }\n }\n\n @Listen('keydown', { target: 'window', capture: true })\n async handleKeyDown(ev: KeyboardEvent) {\n const isEscapeKey = ev.key === 'Escape' || ev.key === 'Esc';\n if (!this.open || !this.dialogElem || !isEscapeKey) return;\n\n if (this.disableCloseEscKeydown) {\n ev.preventDefault();\n return;\n }\n\n await this.cancel();\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 /** Open the dialog */\n @Method()\n async show() {\n const ev = this.bqOpen.emit();\n if (ev.defaultPrevented) return;\n\n this.open = true;\n }\n\n /** Closes the dialog */\n @Method()\n async hide() {\n const ev = this.bqClose.emit();\n if (ev.defaultPrevented) return;\n\n this.open = false;\n }\n\n /** Dismiss or cancel the dialog */\n @Method()\n async cancel() {\n const ev = this.bqCancel.emit();\n if (ev.defaultPrevented) return;\n\n this.open = false;\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleClose = async () => {\n if (!this.dialogElem) return;\n\n await leave(this.dialogElem);\n this.dialogElem.close();\n // Emit bqAfterClose event after the dialog is closed\n this.handleTransitionEnd();\n };\n\n private handleOpen = async () => {\n if (!this.dialogElem) return;\n\n this.el.classList.add(this.OPEN_CSS_CLASS);\n // Show the dialog\n if (this.disableBackdrop) {\n this.dialogElem.show();\n } else {\n this.dialogElem.showModal();\n }\n await enter(this.dialogElem);\n // Emit bqAfterOpen event after the dialog is opened\n this.handleTransitionEnd();\n };\n\n private handleTransitionEnd = () => {\n if (this.open) {\n this.bqAfterOpen.emit();\n return;\n }\n\n this.bqAfterClose.emit();\n this.el.classList.remove(this.OPEN_CSS_CLASS);\n };\n\n private handleContentSlotChange = () => {\n this.hasContent = hasSlotContent(this.contentElem);\n };\n\n private handleFooterSlotChange = () => {\n this.hasFooter = hasSlotContent(this.footerElem, 'footer');\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const style = {\n ...(this.border && { '--bq-dialog--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <dialog\n style={style}\n class={{\n [`bq-dialog hidden ${this.size} m-auto focus-visible:outline-none`]: true,\n 'inset-be-[50%] inset-bs-[50%]': this.disableBackdrop,\n }}\n data-transition-enter=\"transition ease-in duration-300\"\n data-transition-enter-start=\"opacity-0 scale-90\"\n data-transition-enter-end=\"opacity-100 scale-100\"\n data-transition-leave=\"transition ease-out duration-300\"\n data-transition-leave-start=\"opacity-100 scale-100\"\n data-transition-leave-end=\"opacity-0 scale-90\"\n inert={this.open ? undefined : true}\n ref={(dialogElem) => (this.dialogElem = dialogElem)}\n aria-modal=\"true\"\n aria-labelledby=\"bq-dialog--title\"\n part=\"dialog\"\n >\n <main class=\"flex flex-col gap-[--bq-dialog--title-body-gap] overflow-hidden\" part=\"content\">\n <header class=\"bq-dialog--header\" part=\"header\">\n <div id=\"bq-dialog--title\" class=\"bq-dialog--title flex flex-1 items-center justify-between\" part=\"title\">\n <slot name=\"title\" />\n </div>\n <slot name=\"button-close\">\n {!this.hideCloseButton && (\n <bq-button class=\"bq-dialog--close\" appearance=\"text\" size=\"small\">\n <bq-icon class=\"cursor-pointer\" name=\"x\" role=\"img\" title=\"Close\" />\n </bq-button>\n )}\n </slot>\n </header>\n <div\n class={{\n '!hidden': !this.hasContent,\n 'overflow-y-auto p-i-[--bq-dialog--padding]': this.hasContent,\n '!p-be-[--bq-dialog--padding]': !this.hasFooter,\n }}\n ref={(mainElem) => (this.contentElem = mainElem)}\n part=\"body\"\n >\n <slot onSlotchange={this.handleContentSlotChange} />\n </div>\n </main>\n <footer\n class={{\n '!hidden': !this.hasFooter,\n 'bq-dialog--footer': this.hasFooter,\n 'bg-ui-alt !p-b-s': this.footerAppearance === 'highlight',\n }}\n ref={(footerElem) => (this.footerElem = footerElem)}\n part=\"footer\"\n >\n <slot name=\"footer\" onSlotchange={this.handleFooterSlotChange} />\n </footer>\n </dialog>\n );\n }\n}\n"],"mappings":";;;;4KAAO,MAAMA,EAAc,CAAC,QAAS,SAAU,SAGxC,MAAMC,EAA2B,CAAC,WAAY,aCHrD,MAAMC,EAAc,yp0BACpB,MAAAC,EAAeD,E,MC4FFE,EAAQ,M,gNAIXC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OtD,KAAKJ,KAAO2D,UAAY,KAC/BC,IAAMzE,GAAgBiB,KAAKjB,WAAaA,EAAW,aACxC,OAAM,kBACD,mBAChB0E,KAAK,UAELL,EAAA,QAAAnB,IAAA,2CAAMoB,MAAM,kEAAkEI,KAAK,WACjFL,EAAA,UAAAnB,IAAA,2CAAQoB,MAAM,oBAAoBI,KAAK,UACrCL,EAAA,OAAAnB,IAAA,2CAAKyB,GAAG,mBAAmBL,MAAM,4DAA4DI,KAAK,SAChGL,EAAA,QAAAnB,IAAA,2CAAM0B,KAAK,WAEbP,EAAA,QAAAnB,IAAA,2CAAM0B,KAAK,iBACP3D,KAAKL,iBACLyD,EAAA,aAAAnB,IAAA,2CAAWoB,MAAM,mBAAmBO,WAAW,OAAO/D,KAAK,SACzDuD,EAAA,WAAAnB,IAAA,2CAASoB,MAAM,iBAAiBM,KAAK,IAAIE,KAAK,MAAMC,MAAM,aAKlEV,EAAA,OAAAnB,IAAA,2CACEoB,MAAO,CACL,WAAYrD,KAAKZ,WACjB,6CAA8CY,KAAKZ,WACnD,gCAAiCY,KAAKX,WAExCmE,IAAMO,GAAc/D,KAAKhB,YAAc+E,EACvCN,KAAK,QAELL,EAAA,QAAAnB,IAAA,2CAAM+B,aAAchE,KAAK+C,4BAG7BK,EAAA,UAAAnB,IAAA,2CACEoB,MAAO,CACL,WAAYrD,KAAKX,UACjB,oBAAqBW,KAAKX,UAC1B,mBAAoBW,KAAKN,mBAAqB,aAEhD8D,IAAMvE,GAAgBe,KAAKf,WAAaA,EACxCwE,KAAK,UAELL,EAAA,QAAAnB,IAAA,2CAAM0B,KAAK,SAASK,aAAchE,KAAKiD,0B","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["bqBreadcrumbCss","BqBreadcrumbStyle0","BqBreadcrumb","navElem","spanElem","label","handleSlotChange","breadcrumbItems","this","itemCount","length","separatorElem","getSeparatorElem","forEach","item","index","isLastItem","separatorSlot","querySelector","append","cloneNode","setAttribute","clone","separatorFromSlot","slot","assignedElements","flatten","render","h","Host","key","class","ref","elem","part","onSlotchange","hidden","element","name"],"sources":["../../packages/beeq/src/components/breadcrumb/scss/bq-breadcrumb.scss?tag=bq-breadcrumb&encapsulation=shadow","../../packages/beeq/src/components/breadcrumb/bq-breadcrumb.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Breadcrumb styles */\n/* -------------------------------------------------------------------------- */\n\n:host {\n @apply block;\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\n\n/**\n * The Breadcrumb is used to wraps a series of breadcrumb items to indicate the current page's location within a navigational hierarchy.\n *\n * @example How to use it\n * ```html\n * <bq-breadcrumb label=\"Breadcrumb\">\n * <bq-breadcrumb-item>Home</bq-breadcrumb-item>\n * <bq-breadcrumb-item>Men's clothing</bq-breadcrumb-item>\n * <bq-breadcrumb-item>Shirt</bq-breadcrumb-item>\n * <bq-breadcrumb-item>Casual shirts</bq-breadcrumb-item>\n * </bq-breadcrumb>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/194fd1-breadcrumb\n * @status stable\n *\n * @attr {string} label - The `aria-label` attribute to describe the type of navigation\n *\n * @slot - The default slot is used to add `bq-breadcrumb-item` items to the breadcrumb.\n * @slot separator - The slot to add a separator between breadcrumb items. Default separator is `/`.\n *\n * @part navigation - The `nav` tag that loads the breadcrumb items\n * @part separator - The container that wraps the separator element\n */\n@Component({\n tag: 'bq-breadcrumb',\n styleUrl: './scss/bq-breadcrumb.scss',\n shadow: true,\n})\nexport class BqBreadcrumb {\n // Own Properties\n // ====================\n\n private navElem: HTMLElement;\n private spanElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqBreadcrumbElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n // Public Property API\n // ========================\n\n /** The `aria-label` attribute to describe the type of navigation */\n @Prop({ reflect: true }) label: string = 'Breadcrumbs';\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 = (): void => {\n const breadcrumbItems = this.breadcrumbItems;\n const itemCount = breadcrumbItems.length;\n const separatorElem = this.getSeparatorElem();\n\n breadcrumbItems.forEach((item, index) => {\n const isLastItem = index === itemCount - 1;\n const separatorSlot = item.querySelector('[slot=\"separator\"]');\n\n if (!separatorSlot && !isLastItem) {\n item.append(separatorElem.cloneNode(true));\n }\n\n item.setAttribute('aria-current', isLastItem ? 'page' : '');\n });\n };\n\n private getSeparatorElem = (): HTMLElement => {\n const clone = this.separatorFromSlot.cloneNode(true) as HTMLElement;\n clone.slot = 'separator';\n\n return clone;\n };\n\n private get separatorFromSlot() {\n return this.spanElem\n .querySelector<HTMLSlotElement>('slot[name=\"separator\"]')\n .assignedElements({ flatten: true })[0] as HTMLElement;\n }\n\n private get breadcrumbItems(): HTMLBqBreadcrumbItemElement[] {\n return this.navElem\n .querySelector<HTMLSlotElement>('slot')\n .assignedElements({ flatten: true }) as HTMLBqBreadcrumbItemElement[];\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <Host>\n <nav class=\"flex items-center\" aria-label={this.label} ref={(elem) => (this.navElem = elem)} part=\"navigation\">\n <slot onSlotchange={this.handleSlotChange}></slot>\n </nav>\n <span hidden aria-hidden=\"true\" ref={(element) => (this.spanElem = element)} part=\"separator\">\n <slot name=\"separator\">\n <span class=\"flex items-center justify-center is-3\">/</span>\n </slot>\n </span>\n </Host>\n );\n }\n}\n"],"mappings":";;;;yDAAA,MAAMA,EAAkB,g0lBACxB,MAAAC,EAAeD,E,MC8BFE,EAAY,M,yBAIfC,QACAC,S,wBAeiBC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