@beeq/core 1.8.3 → 1.8.4
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-b69f347d.entry.js → p-0338b2f9.entry.js} +2 -2
- package/dist/beeq/p-0338b2f9.entry.js.map +1 -0
- package/dist/beeq/{p-3806d9e3.entry.js → p-0b0a2c8a.entry.js} +2 -2
- package/dist/beeq/{p-803269b3.entry.js → p-0ee91951.entry.js} +2 -2
- package/dist/beeq/{p-3f654a12.entry.js → p-11f54320.entry.js} +2 -2
- package/dist/beeq/{p-66b6d69a.entry.js → p-1694f242.entry.js} +2 -2
- package/dist/beeq/{p-9a7af424.entry.js → p-21ef028f.entry.js} +2 -2
- package/dist/beeq/{p-7585f825.entry.js → p-226f3647.entry.js} +2 -2
- 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-c42f9ac5.entry.js → p-2f55e11f.entry.js} +2 -2
- package/dist/beeq/{p-ee1ecb6e.entry.js → p-3ac6d599.entry.js} +2 -2
- package/dist/beeq/{p-a4e11bbc.entry.js → p-402449b6.entry.js} +2 -2
- package/dist/beeq/p-402449b6.entry.js.map +1 -0
- package/dist/beeq/{p-dbac0368.entry.js → p-4757fa1e.entry.js} +2 -2
- package/dist/beeq/p-4757fa1e.entry.js.map +1 -0
- package/dist/beeq/{p-3fe626f1.entry.js → p-49b40ec5.entry.js} +2 -2
- package/dist/beeq/p-49b40ec5.entry.js.map +1 -0
- package/dist/beeq/{p-a8075be3.entry.js → p-4fc0cf41.entry.js} +2 -2
- package/dist/beeq/{p-19f5a833.entry.js → p-5837a0ea.entry.js} +2 -2
- package/dist/beeq/p-5837a0ea.entry.js.map +1 -0
- package/dist/beeq/{p-dafa4162.entry.js → p-5e4edb8a.entry.js} +2 -2
- package/dist/beeq/{p-dafa4162.entry.js.map → p-5e4edb8a.entry.js.map} +1 -1
- package/dist/beeq/{p-7efff703.entry.js → p-5fe65f50.entry.js} +2 -2
- package/dist/beeq/{p-e8f147c2.entry.js → p-68944624.entry.js} +2 -2
- package/dist/beeq/p-68944624.entry.js.map +1 -0
- package/dist/beeq/{p-cb9fa154.entry.js → p-6aaa20c9.entry.js} +2 -2
- package/dist/beeq/p-6aaa20c9.entry.js.map +1 -0
- package/dist/beeq/{p-59a1b546.entry.js → p-6bc7c1e5.entry.js} +2 -2
- package/dist/beeq/p-6bc7c1e5.entry.js.map +1 -0
- package/dist/beeq/{p-bbaad491.entry.js → p-730ed434.entry.js} +2 -2
- package/dist/beeq/{p-4d21a49d.entry.js → p-7af08445.entry.js} +2 -2
- package/dist/beeq/{p-15bf8ffd.entry.js → p-7cfca18b.entry.js} +2 -2
- package/dist/beeq/p-7cfca18b.entry.js.map +1 -0
- package/dist/beeq/{p-ba1f9637.entry.js → p-7d161e60.entry.js} +2 -2
- package/dist/beeq/p-7d161e60.entry.js.map +1 -0
- package/dist/beeq/{p-19ea2c90.entry.js → p-7dda6cb9.entry.js} +2 -2
- package/dist/beeq/p-7dda6cb9.entry.js.map +1 -0
- package/dist/beeq/{p-5546f242.entry.js → p-85d7bc6c.entry.js} +2 -2
- package/dist/beeq/{p-4500ffe5.entry.js → p-93a3bcb5.entry.js} +2 -2
- package/dist/beeq/{p-90165aef.entry.js → p-96684c94.entry.js} +2 -2
- package/dist/beeq/{p-90165aef.entry.js.map → p-96684c94.entry.js.map} +1 -1
- package/dist/beeq/p-9ecdbeec.js +6 -0
- package/dist/beeq/p-a035d288.js +6 -0
- package/dist/beeq/{p-b129db1a.entry.js → p-a0b2db0b.entry.js} +2 -2
- package/dist/beeq/p-a52f0ff0.entry.js +6 -0
- package/dist/beeq/p-a52f0ff0.entry.js.map +1 -0
- package/dist/beeq/{p-f4e8ebd3.entry.js → p-a902a347.entry.js} +2 -2
- package/dist/beeq/{p-70310ac8.entry.js → p-aeb28fb3.entry.js} +2 -2
- package/dist/beeq/p-aeb28fb3.entry.js.map +1 -0
- package/dist/beeq/{p-b0d168c8.entry.js → p-af9c9769.entry.js} +2 -2
- package/dist/beeq/p-af9c9769.entry.js.map +1 -0
- package/dist/beeq/{p-b7b3f7c6.entry.js → p-b4ae4315.entry.js} +2 -2
- package/dist/beeq/p-c05c50bf.js +7 -0
- package/dist/beeq/p-c05c50bf.js.map +1 -0
- package/dist/beeq/{p-e655938a.entry.js → p-d04883ab.entry.js} +2 -2
- package/dist/beeq/{p-a8d64d1b.entry.js → p-d4676bbd.entry.js} +2 -2
- package/dist/beeq/{p-39a80765.entry.js → p-e29c46f5.entry.js} +2 -2
- package/dist/beeq/p-e29c46f5.entry.js.map +1 -0
- package/dist/beeq/{p-8ed41b69.entry.js → p-e827f88d.entry.js} +2 -2
- package/dist/beeq/{p-65d67b85.entry.js → p-f7e3eff3.entry.js} +2 -2
- package/dist/beeq/p-f7e3eff3.entry.js.map +1 -0
- package/dist/beeq/{p-ed569a61.entry.js → p-f85f1705.entry.js} +2 -2
- package/dist/beeq.html-custom-data.json +59 -59
- package/dist/cjs/{assetsPath-32c4030b.js → assetsPath-bff6e1f9.js} +2 -2
- package/dist/cjs/{assetsPath-32c4030b.js.map → assetsPath-bff6e1f9.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 +8 -9
- 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-6fcc2c3c.js} +56 -20
- package/dist/cjs/index-6fcc2c3c.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -4
- package/dist/cjs/{isDefined-5e8aae9d.js → isDefined-237b1214.js} +2 -2
- package/dist/cjs/{isDefined-5e8aae9d.js.map → isDefined-237b1214.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/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-c58e0d87.js → p-1629a472.js} +2 -2
- package/dist/components/{p-ac26ffcd.js → p-242345e1.js} +2 -2
- 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-a02c6b73.js → p-2aab0744.js} +2 -2
- package/dist/components/p-2aab0744.js.map +1 -0
- package/dist/components/p-39d794c1.js +6 -0
- package/dist/components/{p-5b34bd04.js → p-51027528.js} +2 -2
- package/dist/components/p-66fcce92.js +6 -0
- package/dist/components/p-66fcce92.js.map +1 -0
- package/dist/components/{p-8d8eeb62.js → p-afef286d.js} +2 -2
- package/dist/components/{p-f5588ccd.js → p-b5306ce3.js} +2 -2
- package/dist/components/p-b5306ce3.js.map +1 -0
- package/dist/components/{p-b50adb19.js → p-dfb2cbb5.js} +2 -2
- package/dist/components/p-f0fcfdea.js +6 -0
- package/dist/components/p-f0fcfdea.js.map +1 -0
- package/dist/components/{p-9a115ee5.js → p-fd965589.js} +2 -2
- package/dist/custom-elements.json +724 -791
- package/dist/esm/{assetsPath-57848212.js → assetsPath-14f18f9a.js} +2 -2
- package/dist/esm/{assetsPath-57848212.js.map → assetsPath-14f18f9a.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 +8 -9
- 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-4e4c39e8.js} +56 -20
- package/dist/esm/index-4e4c39e8.js.map +1 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/{isDefined-30b8b652.js → isDefined-7a919d19.js} +2 -2
- package/dist/esm/{isDefined-30b8b652.js.map → isDefined-7a919d19.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.d.ts +22 -5
- package/dist/hydrate/index.js +674 -1297
- package/dist/hydrate/index.mjs +674 -1297
- 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-15bf8ffd.entry.js.map +0 -1
- package/dist/beeq/p-19ea2c90.entry.js.map +0 -1
- 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-a4e11bbc.entry.js.map +0 -1
- package/dist/beeq/p-b0d168c8.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-e4dd6ff4.js +0 -6
- 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-3806d9e3.entry.js.map → p-0b0a2c8a.entry.js.map} +0 -0
- /package/dist/beeq/{p-803269b3.entry.js.map → p-0ee91951.entry.js.map} +0 -0
- /package/dist/beeq/{p-3f654a12.entry.js.map → p-11f54320.entry.js.map} +0 -0
- /package/dist/beeq/{p-66b6d69a.entry.js.map → p-1694f242.entry.js.map} +0 -0
- /package/dist/beeq/{p-9a7af424.entry.js.map → p-21ef028f.entry.js.map} +0 -0
- /package/dist/beeq/{p-7585f825.entry.js.map → p-226f3647.entry.js.map} +0 -0
- /package/dist/beeq/{p-c42f9ac5.entry.js.map → p-2f55e11f.entry.js.map} +0 -0
- /package/dist/beeq/{p-ee1ecb6e.entry.js.map → p-3ac6d599.entry.js.map} +0 -0
- /package/dist/beeq/{p-a8075be3.entry.js.map → p-4fc0cf41.entry.js.map} +0 -0
- /package/dist/beeq/{p-7efff703.entry.js.map → p-5fe65f50.entry.js.map} +0 -0
- /package/dist/beeq/{p-bbaad491.entry.js.map → p-730ed434.entry.js.map} +0 -0
- /package/dist/beeq/{p-4d21a49d.entry.js.map → p-7af08445.entry.js.map} +0 -0
- /package/dist/beeq/{p-5546f242.entry.js.map → p-85d7bc6c.entry.js.map} +0 -0
- /package/dist/beeq/{p-4500ffe5.entry.js.map → p-93a3bcb5.entry.js.map} +0 -0
- /package/dist/beeq/{p-e4dd6ff4.js.map → p-9ecdbeec.js.map} +0 -0
- /package/dist/beeq/{p-cf923c68.js.map → p-a035d288.js.map} +0 -0
- /package/dist/beeq/{p-b129db1a.entry.js.map → p-a0b2db0b.entry.js.map} +0 -0
- /package/dist/beeq/{p-f4e8ebd3.entry.js.map → p-a902a347.entry.js.map} +0 -0
- /package/dist/beeq/{p-b7b3f7c6.entry.js.map → p-b4ae4315.entry.js.map} +0 -0
- /package/dist/beeq/{p-e655938a.entry.js.map → p-d04883ab.entry.js.map} +0 -0
- /package/dist/beeq/{p-a8d64d1b.entry.js.map → p-d4676bbd.entry.js.map} +0 -0
- /package/dist/beeq/{p-8ed41b69.entry.js.map → p-e827f88d.entry.js.map} +0 -0
- /package/dist/beeq/{p-ed569a61.entry.js.map → p-f85f1705.entry.js.map} +0 -0
- /package/dist/components/{p-c58e0d87.js.map → p-1629a472.js.map} +0 -0
- /package/dist/components/{p-ac26ffcd.js.map → p-242345e1.js.map} +0 -0
- /package/dist/components/{p-6e0c7ab4.js.map → p-39d794c1.js.map} +0 -0
- /package/dist/components/{p-5b34bd04.js.map → p-51027528.js.map} +0 -0
- /package/dist/components/{p-8d8eeb62.js.map → p-afef286d.js.map} +0 -0
- /package/dist/components/{p-b50adb19.js.map → p-dfb2cbb5.js.map} +0 -0
- /package/dist/components/{p-9a115ee5.js.map → p-fd965589.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-badge.js","sourceRoot":"","sources":["../../../../../../src/components/badge/bq-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAA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AE,aAAa,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC;IACzD,CAAC;IAED,oBAAoB;IACpB,oCAAoC;IACpC,sCAAsC;IAEtC,MAAM;QACJ,MAAM,MAAM,GAAG;YACb,GAAG,CAAC,IAAI,CAAC,eAAe,IAAI,EAAE,8BAA8B,EAAE,mBAAmB,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;YAC1G,GAAG,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,wBAAwB,EAAE,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;SACzF,CAAC;QAEF,OAAO,CACL,EAAC,IAAI,qDAAC,KAAK,EAAE,MAAM;YACjB,4DACE,KAAK,EAAE;oBACL,UAAU,EAAE,IAAI;oBAChB,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,aAAa,KAAK,CAAC;oBAChD,KAAK,EAAE,IAAI,CAAC,aAAa,GAAG,CAAC;oBAC7B,SAAS,EAAE,IAAI,CAAC,aAAa,GAAG,CAAC;iBAClC,EACD,IAAI,EAAC,MAAM;gBAEX,6DAAM,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,EAAE,KAAK,EAAC,iCAAiC,EAAC,IAAI,EAAC,QAAQ;oBACzG,6DAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAS,CAC7C,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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 componentDidLoad() {\n this.handleSlotChange();\n }\n\n disconnectedCallback() {\n this.observer?.disconnect();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleSlotChange = () => {\n 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.handleSlotChange}></slot>\n </span>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -50,6 +50,9 @@ export class BqBreadcrumb {
|
|
|
50
50
|
// Component lifecycle events
|
|
51
51
|
// Ordered by their natural call order
|
|
52
52
|
// =====================================
|
|
53
|
+
componentDidLoad() {
|
|
54
|
+
this.handleSlotChange();
|
|
55
|
+
}
|
|
53
56
|
// Listeners
|
|
54
57
|
// ==============
|
|
55
58
|
// Public methods API
|
|
@@ -94,7 +97,7 @@ export class BqBreadcrumb {
|
|
|
94
97
|
// Always the last one in the class.
|
|
95
98
|
// ===================================
|
|
96
99
|
render() {
|
|
97
|
-
return (h(Host, { key: '
|
|
100
|
+
return (h(Host, { key: 'aae87cc8b4a6faf6fd4f98ecd3a417332f0b11a5' }, h("nav", { key: 'f00f254eca0ae890e3f87371c8708d46deb9cd87', class: "flex items-center", "aria-label": this.label, ref: (elem) => (this.navElem = elem), part: "navigation" }, h("slot", { key: 'a887b539347263fa086c556145492d05e4a7e7c5', onSlotchange: this.handleSlotChange })), h("span", { key: 'bb806ca58f82d816c76539779ded1be73158e964', hidden: true, "aria-hidden": "true", ref: (element) => (this.spanElem = element), part: "separator" }, h("slot", { key: '9c548dd32acdc5a34bf752d4dce95301c3a6e6bd', name: "separator" }, h("span", { key: 'f898be99739911c5610853ce06b6c53d7b70791d', class: "flex items-center justify-center is-3" }, "/")))));
|
|
98
101
|
}
|
|
99
102
|
static get is() { return "bq-breadcrumb"; }
|
|
100
103
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-breadcrumb.js","sourceRoot":"","sources":["../../../../../../src/components/breadcrumb/bq-breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,MAAM,OAAO,YAAY;IACvB,iBAAiB;IACjB,uBAAuB;IAEf,OAAO,CAAc;IACrB,QAAQ,CAAc;IAE9B,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAA2B;IAExC,oBA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,WAAW,CAAC;QAEzB,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,IAAY,iBAAiB;QAC3B,OAAO,IAAI,CAAC,QAAQ;aACjB,aAAa,CAAkB,wBAAwB,CAAC;aACxD,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAgB,CAAC;IAC3D,CAAC;IAED,IAAY,eAAe;QACzB,OAAO,IAAI,CAAC,OAAO;aAChB,aAAa,CAAkB,MAAM,CAAC;aACtC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAkC,CAAC;IAC1E,CAAC;IAED,oBAAoB;IACpB,oCAAoC;IACpC,sCAAsC;IAEtC,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAC,mBAAmB,gBAAa,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,IAAI,EAAC,YAAY;gBAC5G,6DAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAS,CAC9C;YACN,6DAAM,MAAM,uBAAa,MAAM,EAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,EAAE,IAAI,EAAC,WAAW;gBAC3F,6DAAM,IAAI,EAAC,WAAW;oBACpB,6DAAM,KAAK,EAAC,uCAAuC,QAAS,CACvD,CACF,CACF,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
|
|
1
|
+
{"version":3,"file":"bq-breadcrumb.js","sourceRoot":"","sources":["../../../../../../src/components/breadcrumb/bq-breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,MAAM,OAAO,YAAY;IACvB,iBAAiB;IACjB,uBAAuB;IAEf,OAAO,CAAc;IACrB,QAAQ,CAAc;IAE9B,iCAAiC;IACjC,sCAAsC;IAE3B,EAAE,CAA2B;IAExC,oBAAoB;IACpB,wCAAwC;IACxC,0CAA0C;IAE1C,sBAAsB;IACtB,2BAA2B;IAE3B,oEAAoE;IAC3C,KAAK,GAAW,aAAa,CAAC;IAEvD,wBAAwB;IACxB,0BAA0B;IAE1B,iBAAiB;IACjB,+CAA+C;IAC/C,iDAAiD;IAEjD,6BAA6B;IAC7B,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D,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAgB,CAAC;IAC3D,CAAC;IAED,IAAY,eAAe;QACzB,OAAO,IAAI,CAAC,OAAO;aAChB,aAAa,CAAkB,MAAM,CAAC;aACtC,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAkC,CAAC;IAC1E,CAAC;IAED,oBAAoB;IACpB,oCAAoC;IACpC,sCAAsC;IAEtC,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAC,mBAAmB,gBAAa,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,IAAI,EAAC,YAAY;gBAC5G,6DAAM,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAS,CAC9C;YACN,6DAAM,MAAM,uBAAa,MAAM,EAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,EAAE,IAAI,EAAC,WAAW;gBAC3F,6DAAM,IAAI,EAAC,WAAW;oBACpB,6DAAM,KAAK,EAAC,uCAAuC,QAAS,CACvD,CACF,CACF,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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 componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleSlotChange = (): 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"]}
|
|
@@ -133,6 +133,9 @@ export class BqButton {
|
|
|
133
133
|
componentWillLoad() {
|
|
134
134
|
this.checkPropValues();
|
|
135
135
|
}
|
|
136
|
+
componentDidLoad() {
|
|
137
|
+
this.handleSlotChange();
|
|
138
|
+
}
|
|
136
139
|
// Listeners
|
|
137
140
|
// ==============
|
|
138
141
|
// Public methods API
|
|
@@ -204,7 +207,7 @@ export class BqButton {
|
|
|
204
207
|
const style = {
|
|
205
208
|
...(this.border && { '--bq-button--border-radius': `var(--bq-radius--${this.border})` }),
|
|
206
209
|
};
|
|
207
|
-
return (h(Host, { key: '
|
|
210
|
+
return (h(Host, { key: 'e15588968948fe9bca9e10311cc875a49399c885', style: style }, h(TagElem, { key: '603e74c2247943f9f743a65b2ff0351e1f1aadfc', class: {
|
|
208
211
|
'bq-button': true,
|
|
209
212
|
[`bq-button--${this.appearance}`]: true,
|
|
210
213
|
[`content-${this.justifyContent}`]: true,
|
|
@@ -215,7 +218,7 @@ export class BqButton {
|
|
|
215
218
|
'has-prefix': this.hasPrefix,
|
|
216
219
|
'has-suffix': this.hasSuffix,
|
|
217
220
|
loading: this.loading,
|
|
218
|
-
}, "aria-disabled": this.disabled ? 'true' : 'false', disabled: this.disabled, download: isLink ? this.download : undefined, href: isLink ? this.href : undefined, part: "button", rel: isLink && this.target ? 'noreferrer noopener' : undefined, target: isLink ? this.target : undefined, type: this.type, tabIndex: this.disabled ? -1 : 0, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.handleClick }, h("span", { key: '
|
|
221
|
+
}, "aria-disabled": this.disabled ? 'true' : 'false', disabled: this.disabled, download: isLink ? this.download : undefined, href: isLink ? this.href : undefined, part: "button", rel: isLink && this.target ? 'noreferrer noopener' : undefined, target: isLink ? this.target : undefined, type: this.type, tabIndex: this.disabled ? -1 : 0, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.handleClick }, h("span", { key: '26fb7d597faabcabcbc99f20527a40cbda1eba83', class: "bq-button__prefix", ref: (spanElem) => (this.prefixElem = spanElem), part: "prefix" }, h("slot", { key: 'd401dddfed429aa79ee13db471194ee48c9e9807', name: "prefix", onSlotchange: this.handleSlotChange })), h("span", { key: '1ff8d9566b5d30456d42f0d8b96851532e55f85c', class: "bq-button__label", part: "label" }, h("slot", { key: '310684adbb5eb77b107413bc41926545a0e2c860' })), h("span", { key: '9d8966acfb68f32e5101f47290f3660fb5437e19', class: "bq-button__suffix", ref: (spanElem) => (this.suffixElem = spanElem), part: "suffix" }, h("slot", { key: 'c370ac224c02fb89fc7b2ba9e1b8635221b92395', name: "suffix", onSlotchange: this.handleSlotChange })), this.loading && h("bq-icon", { key: '09a9e89332b5c292e0fcaf53859de901b85dae6c', class: "bq-button__loader", name: "spinner-gap" }))));
|
|
219
222
|
}
|
|
220
223
|
static get is() { return "bq-button"; }
|
|
221
224
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-button.js","sourceRoot":"","sources":["../../../../../../src/components/button/bq-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAA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,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACtD;gBACN,IAAI,CAAC,OAAO,IAAI,gEAAS,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,aAAa,GAAG,CACjE,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport {\n BUTTON_APPEARANCE,\n BUTTON_SIZE,\n BUTTON_TYPE,\n BUTTON_VARIANT,\n TButtonAppearance,\n TButtonBorderRadius,\n TButtonSize,\n TButtonType,\n TButtonVariant,\n} from './bq-button.types';\nimport { hasSlotContent, isClient, isDefined, isNil, validatePropValue } from '../../shared/utils';\n\n/**\n * Buttons are designed for users to take action on a page or a screen.\n *\n * @example How to use it\n * ```html\n * <bq-button appearance=\"primary\" border=\"m\" size=\"medium\">\n * <bq-icon name=\"arrow-circle-left\" slot=\"prefix\"></bq-icon>\n * Go back\n * </bq-button>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/286b43-buttons\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"primary\" | \"secondary\" | \"link\" | \"text\"} appearance - The appearance style to apply to the button\n * @attr {boolean} block - If `true`, it will make the button fit to its parent width.\n * @attr {string} border - The corner radius of the button\n * @attr {boolean} disabled - If `true`, the button will be disabled (no interaction allowed)\n * @attr {string} download - Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * @attr {string} href - When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`\n * @attr {\"left\" | \"center\" | \"right\"} justify-content - It determinate how the content should be aligned\n * @attr {boolean} loading - If `true` it will display the button in a loading state\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the button\n * @attr {\"_blank\" | \"_parent\" | \"_self\" | \"_top\"} target - Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * @attr {\"button\" | \"submit\" | \"reset\"} type - The default behavior of the button\n * @attr {\"standard\" | \"ghost\" | \"danger\"} variant - The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`)\n *\n * @event bqBlur - Handler to be called when the button loses focus\n * @event bqFocus - Handler to be called when button gets focus\n * @event bqClick - Handler to be called when the button is clicked\n *\n * @slot prefix - The prefix content to be displayed before the button label\n * @slot - The button label content\n * @slot suffix - The suffix content to be displayed after the button label\n *\n * @part button - The `<a>` or `<button>` HTML element used under the hood.\n * @part prefix - The `<span>` tag element that acts as prefix container.\n * @part label - The `<span>` tag element that renders the text of the button.\n * @part suffix - The `<span>` tag element that acts as suffix container.\n *\n * @cssprop --bq-button--border-color - Button border color\n * @cssprop --bq-button--border-radius - Button border radius\n * @cssprop --bq-button--border-style - Button border style\n * @cssprop --bq-button--border-width - Button border width\n * @cssprop --bq-button--small-height - Button small height\n * @cssprop --bq-button--small-paddingX - Button small padding block (top and bottom)\n * @cssprop --bq-button--small-paddingY - Button small padding inline (left and right)\n * @cssprop --bq-button--small-font-size - Button small font size\n * @cssprop --bq-button--medium-height - Button medium height\n * @cssprop --bq-button--medium-paddingX - Button medium padding block (top and bottom)\n * @cssprop --bq-button--medium-paddingY - Button medium padding inline (left and right)\n * @cssprop --bq-button--medium-font-size - Button medium font size\n * @cssprop --bq-button--large-height - Button large height\n * @cssprop --bq-button--large-paddingX - Button large padding block (top and bottom)\n * @cssprop --bq-button--large-paddingY - Button large padding inline (left and right)\n * @cssprop --bq-button--large-font-size - Button large font size\n */\n@Component({\n tag: 'bq-button',\n styleUrl: './scss/bq-button.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqButton {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqButtonElement;\n @AttachInternals() internals!: ElementInternals;\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 to apply to the button */\n @Prop({ reflect: true }) appearance: TButtonAppearance = 'primary';\n\n /** If `true`, it will make the button fit to its parent width. */\n @Prop({ reflect: true }) block: boolean = false;\n\n /** The corner radius of the button */\n @Prop({ reflect: true }) border: TButtonBorderRadius = 'm';\n\n /** If true, the button will be disabled (no interaction allowed) */\n @Prop() disabled = false;\n\n /**\n * Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n */\n @Prop() download?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>` */\n @Prop({ reflect: true }) href: string;\n\n /** It determinate how the content should be aligned */\n @Prop({ reflect: true }) justifyContent: 'left' | 'center' | 'right' = 'center';\n\n /** If `true` it will display the button in a loading state */\n @Prop() loading = false;\n\n /** The size of the button */\n @Prop({ reflect: true }) size: TButtonSize = 'medium';\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n */\n @Prop({ reflect: true }) target: '_blank' | '_parent' | '_self' | '_top';\n\n /** The default behavior of the button */\n @Prop({ reflect: true }) type: TButtonType = 'button';\n\n /** The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`) */\n @Prop({ reflect: true }) variant: TButtonVariant = 'standard';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('appearance')\n @Watch('type')\n @Watch('size')\n @Watch('variant')\n checkPropValues() {\n validatePropValue(BUTTON_APPEARANCE, 'primary', this.el, 'appearance');\n validatePropValue(BUTTON_TYPE, 'button', this.el, 'type');\n validatePropValue(BUTTON_SIZE, 'medium', this.el, 'size');\n validatePropValue(BUTTON_VARIANT, 'standard', this.el, 'variant');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the button loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when the button is clicked */\n @Event() bqFocus: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when button gets focus */\n @Event() bqClick: EventEmitter<HTMLBqButtonElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleClick = (ev: Event) => {\n const { disabled, loading, bqClick, el } = this;\n\n if (disabled || loading) {\n this.preventEvent(ev);\n return;\n }\n\n const bqClickEvent = bqClick.emit(el);\n if (bqClickEvent.defaultPrevented) {\n this.preventEvent(ev);\n return;\n }\n\n this.handleFormAction();\n };\n\n private handleFormAction() {\n const {\n type,\n internals: { form },\n } = this;\n if (isNil(form)) return;\n\n const formAction = this.formActions(form)[type];\n if (isNil(formAction)) return;\n\n formAction();\n }\n\n private formActions = (form: HTMLFormElement) => ({\n submit: () => this.submitAssociatedForm(form),\n reset: () => form.reset(),\n });\n\n private submitAssociatedForm = (form: HTMLFormElement) => {\n if (!isClient() || isNil(form)) return;\n\n const btn = document.createElement('button');\n btn.type = this.type;\n btn.hidden = true;\n form.append(btn);\n\n btn.click();\n btn.remove();\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private preventEvent(ev: Event) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const isLink = isDefined(this.href);\n const TagElem = isLink ? 'a' : 'button';\n const style = {\n ...(this.border && { '--bq-button--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host style={style}>\n <TagElem\n class={{\n 'bq-button': true,\n [`bq-button--${this.appearance}`]: true,\n [`content-${this.justifyContent}`]: true,\n [`${this.variant}`]: true,\n [`${this.size}`]: true,\n block: this.block,\n disabled: this.disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n loading: this.loading,\n }}\n aria-disabled={this.disabled ? 'true' : 'false'}\n disabled={this.disabled}\n download={isLink ? this.download : undefined}\n href={isLink ? this.href : undefined}\n part=\"button\"\n rel={isLink && this.target ? 'noreferrer noopener' : undefined}\n target={isLink ? this.target : undefined}\n type={this.type}\n tabIndex={this.disabled ? -1 : 0}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n >\n <span class=\"bq-button__prefix\" ref={(spanElem) => (this.prefixElem = spanElem)} part=\"prefix\">\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <span class=\"bq-button__label\" part=\"label\">\n <slot />\n </span>\n <span class=\"bq-button__suffix\" ref={(spanElem) => (this.suffixElem = spanElem)} part=\"suffix\">\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n {this.loading && <bq-icon class=\"bq-button__loader\" name=\"spinner-gap\" />}\n </TagElem>\n </Host>\n );\n }\n}\n"]}
|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C,OAAO;oBACzC,8DAAQ,CACH;gBACP,6DAAM,KAAK,EAAC,mBAAmB,EAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAC,QAAQ;oBAC5F,6DAAM,IAAI,EAAC,QAAQ,EAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,GAAI,CACtD;gBACN,IAAI,CAAC,OAAO,IAAI,gEAAS,KAAK,EAAC,mBAAmB,EAAC,IAAI,EAAC,aAAa,GAAG,CACjE,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { AttachInternals, Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport {\n BUTTON_APPEARANCE,\n BUTTON_SIZE,\n BUTTON_TYPE,\n BUTTON_VARIANT,\n TButtonAppearance,\n TButtonBorderRadius,\n TButtonSize,\n TButtonType,\n TButtonVariant,\n} from './bq-button.types';\nimport { hasSlotContent, isClient, isDefined, isNil, validatePropValue } from '../../shared/utils';\n\n/**\n * Buttons are designed for users to take action on a page or a screen.\n *\n * @example How to use it\n * ```html\n * <bq-button appearance=\"primary\" border=\"m\" size=\"medium\">\n * <bq-icon name=\"arrow-circle-left\" slot=\"prefix\"></bq-icon>\n * Go back\n * </bq-button>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/286b43-buttons\n * @status stable\n *\n * @dependency bq-icon\n *\n * @attr {\"primary\" | \"secondary\" | \"link\" | \"text\"} appearance - The appearance style to apply to the button\n * @attr {boolean} block - If `true`, it will make the button fit to its parent width.\n * @attr {string} border - The corner radius of the button\n * @attr {boolean} disabled - If `true`, the button will be disabled (no interaction allowed)\n * @attr {string} download - Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * @attr {string} href - When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`\n * @attr {\"left\" | \"center\" | \"right\"} justify-content - It determinate how the content should be aligned\n * @attr {boolean} loading - If `true` it will display the button in a loading state\n * @attr {\"small\" | \"medium\" | \"large\"} size - The size of the button\n * @attr {\"_blank\" | \"_parent\" | \"_self\" | \"_top\"} target - Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * @attr {\"button\" | \"submit\" | \"reset\"} type - The default behavior of the button\n * @attr {\"standard\" | \"ghost\" | \"danger\"} variant - The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`)\n *\n * @event bqBlur - Handler to be called when the button loses focus\n * @event bqFocus - Handler to be called when button gets focus\n * @event bqClick - Handler to be called when the button is clicked\n *\n * @slot prefix - The prefix content to be displayed before the button label\n * @slot - The button label content\n * @slot suffix - The suffix content to be displayed after the button label\n *\n * @part button - The `<a>` or `<button>` HTML element used under the hood.\n * @part prefix - The `<span>` tag element that acts as prefix container.\n * @part label - The `<span>` tag element that renders the text of the button.\n * @part suffix - The `<span>` tag element that acts as suffix container.\n *\n * @cssprop --bq-button--border-color - Button border color\n * @cssprop --bq-button--border-radius - Button border radius\n * @cssprop --bq-button--border-style - Button border style\n * @cssprop --bq-button--border-width - Button border width\n * @cssprop --bq-button--small-height - Button small height\n * @cssprop --bq-button--small-paddingX - Button small padding block (top and bottom)\n * @cssprop --bq-button--small-paddingY - Button small padding inline (left and right)\n * @cssprop --bq-button--small-font-size - Button small font size\n * @cssprop --bq-button--medium-height - Button medium height\n * @cssprop --bq-button--medium-paddingX - Button medium padding block (top and bottom)\n * @cssprop --bq-button--medium-paddingY - Button medium padding inline (left and right)\n * @cssprop --bq-button--medium-font-size - Button medium font size\n * @cssprop --bq-button--large-height - Button large height\n * @cssprop --bq-button--large-paddingX - Button large padding block (top and bottom)\n * @cssprop --bq-button--large-paddingY - Button large padding inline (left and right)\n * @cssprop --bq-button--large-font-size - Button large font size\n */\n@Component({\n tag: 'bq-button',\n styleUrl: './scss/bq-button.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqButton {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqButtonElement;\n @AttachInternals() internals!: ElementInternals;\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 to apply to the button */\n @Prop({ reflect: true }) appearance: TButtonAppearance = 'primary';\n\n /** If `true`, it will make the button fit to its parent width. */\n @Prop({ reflect: true }) block: boolean = false;\n\n /** The corner radius of the button */\n @Prop({ reflect: true }) border: TButtonBorderRadius = 'm';\n\n /** If true, the button will be disabled (no interaction allowed) */\n @Prop() disabled = false;\n\n /**\n * Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n */\n @Prop() download?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>` */\n @Prop({ reflect: true }) href: string;\n\n /** It determinate how the content should be aligned */\n @Prop({ reflect: true }) justifyContent: 'left' | 'center' | 'right' = 'center';\n\n /** If `true` it will display the button in a loading state */\n @Prop() loading = false;\n\n /** The size of the button */\n @Prop({ reflect: true }) size: TButtonSize = 'medium';\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n */\n @Prop({ reflect: true }) target: '_blank' | '_parent' | '_self' | '_top';\n\n /** The default behavior of the button */\n @Prop({ reflect: true }) type: TButtonType = 'button';\n\n /** The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`) */\n @Prop({ reflect: true }) variant: TButtonVariant = 'standard';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('appearance')\n @Watch('type')\n @Watch('size')\n @Watch('variant')\n checkPropValues() {\n validatePropValue(BUTTON_APPEARANCE, 'primary', this.el, 'appearance');\n validatePropValue(BUTTON_TYPE, 'button', this.el, 'type');\n validatePropValue(BUTTON_SIZE, 'medium', this.el, 'size');\n validatePropValue(BUTTON_VARIANT, 'standard', this.el, 'variant');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the button loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when the button is clicked */\n @Event() bqFocus: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when button gets focus */\n @Event() bqClick: EventEmitter<HTMLBqButtonElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n componentDidLoad() {\n this.handleSlotChange();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleClick = (ev: Event) => {\n const { disabled, loading, bqClick, el } = this;\n\n if (disabled || loading) {\n this.preventEvent(ev);\n return;\n }\n\n const bqClickEvent = bqClick.emit(el);\n if (bqClickEvent.defaultPrevented) {\n this.preventEvent(ev);\n return;\n }\n\n this.handleFormAction();\n };\n\n private handleFormAction() {\n const {\n type,\n internals: { form },\n } = this;\n if (isNil(form)) return;\n\n const formAction = this.formActions(form)[type];\n if (isNil(formAction)) return;\n\n formAction();\n }\n\n private formActions = (form: HTMLFormElement) => ({\n submit: () => this.submitAssociatedForm(form),\n reset: () => form.reset(),\n });\n\n private submitAssociatedForm = (form: HTMLFormElement) => {\n if (!isClient() || isNil(form)) return;\n\n const btn = document.createElement('button');\n btn.type = this.type;\n btn.hidden = true;\n form.append(btn);\n\n btn.click();\n btn.remove();\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n private preventEvent(ev: Event) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const isLink = isDefined(this.href);\n const TagElem = isLink ? 'a' : 'button';\n const style = {\n ...(this.border && { '--bq-button--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host style={style}>\n <TagElem\n class={{\n 'bq-button': true,\n [`bq-button--${this.appearance}`]: true,\n [`content-${this.justifyContent}`]: true,\n [`${this.variant}`]: true,\n [`${this.size}`]: true,\n block: this.block,\n disabled: this.disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n loading: this.loading,\n }}\n aria-disabled={this.disabled ? 'true' : 'false'}\n disabled={this.disabled}\n download={isLink ? this.download : undefined}\n href={isLink ? this.href : undefined}\n part=\"button\"\n rel={isLink && this.target ? 'noreferrer noopener' : undefined}\n target={isLink ? this.target : undefined}\n type={this.type}\n tabIndex={this.disabled ? -1 : 0}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n >\n <span class=\"bq-button__prefix\" ref={(spanElem) => (this.prefixElem = spanElem)} part=\"prefix\">\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <span class=\"bq-button__label\" part=\"label\">\n <slot />\n </span>\n <span class=\"bq-button__suffix\" ref={(spanElem) => (this.suffixElem = spanElem)} part=\"suffix\">\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n {this.loading && <bq-icon class=\"bq-button__loader\" name=\"spinner-gap\" />}\n </TagElem>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { h, } from "@stencil/core";
|
|
6
6
|
import { DATE_PICKER_TYPE } from "./bq-date-picker.types";
|
|
7
|
+
import { isCallyLibraryLoaded, loadCallyLibrary } from "./helper/callyLibrary";
|
|
7
8
|
import { hasSlotContent, isClient, isDefined, isEventTargetChildOfElement, isHTMLElement, isNil, validatePropValue, } from "../../shared/utils";
|
|
8
9
|
/**
|
|
9
10
|
* The Date Picker is a intuitive UI element component allows users to select dates from a visual calendar interface, providing an intuitive way to input date information.
|
|
@@ -146,6 +147,7 @@ export class BqDatePicker {
|
|
|
146
147
|
// State() variables
|
|
147
148
|
// Inlined decorator, alphabetical order
|
|
148
149
|
// =======================================
|
|
150
|
+
isCallyLoaded = false;
|
|
149
151
|
focusedDate;
|
|
150
152
|
displayDate;
|
|
151
153
|
hasLabel = false;
|
|
@@ -239,7 +241,9 @@ export class BqDatePicker {
|
|
|
239
241
|
// Prop lifecycle events
|
|
240
242
|
// =======================
|
|
241
243
|
handleValueChange() {
|
|
242
|
-
const { formatDisplayValue, internals, value } = this;
|
|
244
|
+
const { formatDisplayValue, internals, isCallyLoaded, value } = this;
|
|
245
|
+
if (!isCallyLoaded)
|
|
246
|
+
return;
|
|
243
247
|
internals.setFormValue(!isNil(value) ? `${value}` : undefined);
|
|
244
248
|
this.updateFormValidity();
|
|
245
249
|
if (Array.isArray(value)) {
|
|
@@ -271,11 +275,18 @@ export class BqDatePicker {
|
|
|
271
275
|
// Ordered by their natural call order
|
|
272
276
|
// =====================================
|
|
273
277
|
async connectedCallback() {
|
|
274
|
-
if (!isClient())
|
|
278
|
+
if (!isClient() || this.isCallyLoaded)
|
|
275
279
|
return;
|
|
276
|
-
|
|
280
|
+
try {
|
|
281
|
+
await loadCallyLibrary();
|
|
282
|
+
this.isCallyLoaded = isCallyLibraryLoaded();
|
|
283
|
+
}
|
|
284
|
+
catch (error) {
|
|
285
|
+
console.error(error);
|
|
286
|
+
}
|
|
277
287
|
}
|
|
278
|
-
|
|
288
|
+
async componentDidLoad() {
|
|
289
|
+
this.handleSlotChange();
|
|
279
290
|
this.handleValueChange();
|
|
280
291
|
}
|
|
281
292
|
formAssociatedCallback() {
|
|
@@ -341,11 +352,12 @@ export class BqDatePicker {
|
|
|
341
352
|
this.bqFocus.emit(this.el);
|
|
342
353
|
};
|
|
343
354
|
setFocusedDate = () => {
|
|
344
|
-
|
|
355
|
+
const { callyElem, formatFocusedDate, isCallyLoaded, value } = this;
|
|
356
|
+
if (!(callyElem && isCallyLoaded))
|
|
345
357
|
return;
|
|
346
358
|
// We need to set the focused date in the calendar component via a ref
|
|
347
359
|
// because it doesn't work when passed as a prop (the Cally element does not re-render)
|
|
348
|
-
this.focusedDate =
|
|
360
|
+
this.focusedDate = value ? formatFocusedDate(value) : new Date().toLocaleDateString('fr-CA');
|
|
349
361
|
this.callyElem.focusedDate = this.focusedDate;
|
|
350
362
|
};
|
|
351
363
|
handleChange = (ev) => {
|
|
@@ -391,16 +403,14 @@ export class BqDatePicker {
|
|
|
391
403
|
this.inputElem.focus();
|
|
392
404
|
ev.stopPropagation();
|
|
393
405
|
};
|
|
394
|
-
|
|
406
|
+
handleSlotChange = () => {
|
|
395
407
|
this.hasLabel = hasSlotContent(this.labelElem);
|
|
396
|
-
};
|
|
397
|
-
handlePrefixSlotChange = () => {
|
|
398
408
|
this.hasPrefix = hasSlotContent(this.prefixElem);
|
|
399
|
-
};
|
|
400
|
-
handleSuffixSlotChange = () => {
|
|
401
409
|
this.hasSuffix = hasSlotContent(this.suffixElem);
|
|
402
410
|
};
|
|
403
411
|
generateCalendarMonth = (offset, className = '') => {
|
|
412
|
+
if (!this.isCallyLoaded)
|
|
413
|
+
return null;
|
|
404
414
|
return (h("calendar-month", { offset: offset, class: className, exportparts: `${this.COMMON_EXPORT_PARTS},${this.BUTTON_EXPORT_PARTS}` }));
|
|
405
415
|
};
|
|
406
416
|
/**
|
|
@@ -417,6 +427,8 @@ export class BqDatePicker {
|
|
|
417
427
|
* @returns {Element[]} An array of elements representing the calendar months.
|
|
418
428
|
*/
|
|
419
429
|
generateCalendarMonths = () => {
|
|
430
|
+
if (!this.isCallyLoaded)
|
|
431
|
+
return [];
|
|
420
432
|
if (this.type === 'range' || (this.type === 'multi' && this.months)) {
|
|
421
433
|
return Array.from({ length: this.months }, (_, i) => {
|
|
422
434
|
const offset = i > 0 ? i : undefined;
|
|
@@ -484,16 +496,16 @@ export class BqDatePicker {
|
|
|
484
496
|
render() {
|
|
485
497
|
const CallyCalendar = this.CalendarType;
|
|
486
498
|
const labelId = `bq-date-picker__label-${this.name || this.fallbackInputId}`;
|
|
487
|
-
return (h("div", { key: '
|
|
499
|
+
return (h("div", { key: '069f903344826b0ebcae55e8ef856b7f482c233a', class: "bq-date-picker", part: "base" }, h("label", { key: 'f59992a4898eb30b3d31eb9c6b72f6e904c473c8', id: labelId, class: { 'bq-date-picker__label': true, '!hidden': !this.hasLabel }, "aria-label": this.name || this.fallbackInputId, htmlFor: this.name || this.fallbackInputId, ref: (labelElem) => (this.labelElem = labelElem), part: "label" }, h("slot", { key: 'aebcf5dadd8678765f0116b07d2bad4f2d52af6e', name: "label", onSlotchange: this.handleSlotChange })), h("bq-dropdown", { key: 'ccb991f3c53db36c33f7b300cd2c5495ad8dbe16', class: "bq-date-picker__dropdown is-full [&::part(panel)]:p-m [&::part(panel)]:is-auto", disabled: this.disabled, distance: this.distance, open: this.open, panelHeight: this.panelHeight, placement: this.placement, skidding: this.skidding, strategy: this.strategy, exportparts: "panel" }, h("div", { key: 'bf2e9ac59a47f5e6ace0d28b48ed16c2c8645679', class: {
|
|
488
500
|
'bq-date-picker__control': true,
|
|
489
501
|
[`validation-${this.validationStatus}`]: true,
|
|
490
502
|
disabled: this.disabled,
|
|
491
|
-
}, part: "control", slot: "trigger" }, h("span", { key: '
|
|
503
|
+
}, part: "control", slot: "trigger" }, h("span", { key: '27a2f44c0a81cc0b7302d152e8731199828bbc54', class: { 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }, ref: (spanElem) => (this.prefixElem = spanElem), part: "prefix" }, h("slot", { key: '0c23dd1c1a4221a207fc56a231413e7aac5dc5c9', name: "prefix", onSlotchange: this.handleSlotChange })), h("input", { key: 'faba190997324a83c461f1577e2344fbef5f313a', id: this.name || this.fallbackInputId, class: "bq-date-picker__control--input", autoComplete: "off", autoCapitalize: "off", "aria-disabled": this.disabled ? 'true' : 'false', "aria-controls": `${this.name}`, "aria-haspopup": "dialog", disabled: this.disabled, form: this.form, name: this.name, placeholder: this.placeholder, readonly: this.type !== 'single', ref: (inputElem) => (this.inputElem = inputElem), required: this.required, spellcheck: false, type: "text", value: this.displayDate, part: "input",
|
|
492
504
|
// Events
|
|
493
505
|
onBlur: this.handleBlur, onFocus: this.handleFocus, onChange: this.handleChange }), this.hasValue && !this.disabled && !this.disableClear && (
|
|
494
506
|
// The clear button will be visible as long as the input has a value
|
|
495
507
|
// and the parent group is hovered or has focus-within
|
|
496
|
-
h("bq-button", { key: '
|
|
508
|
+
h("bq-button", { key: 'c2378ba7fa91f2ba97a365b4c112f7bdd9133768', class: "bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden", appearance: "text", "aria-label": this.clearButtonLabel, size: "small", onBqClick: this.handleClearClick, part: "clear-btn", exportparts: "button" }, h("slot", { key: '834c2e4ceca2f3750aa3387997b9e109243ea31b', name: "clear-icon" }, h("bq-icon", { key: 'fb69b669c5945d0d1837d78132cd50cee58d0ae8', name: "x-circle", class: "flex" })))), h("span", { key: '6a62e719ff5351a3fe5adcfee6d305fdccadeace', class: "bq-date-picker__control--suffix", ref: (spanElem) => (this.suffixElem = spanElem), part: "suffix" }, h("slot", { key: '41feb65276d71d1f385e10c678090a38f1665152', name: "suffix", onSlotchange: this.handleSlotChange }, h("bq-icon", { key: '041dd77ea0b03bcf0632f9f7f58fe4ed88fa527e', name: "calendar-blank", class: "flex" })))), this.isCallyLoaded && (h(CallyCalendar, { key: '1c49606beca0c95a7af42519c4a38716bba10bc5', isDateDisallowed: this.isDateDisallowed, locale: this.locale, value: this.value, min: this.min, max: this.max, months: this.months, tentative: this.tentative, pageBy: this.monthsPerView, firstDayOfWeek: this.firstDayOfWeek, showOutsideDays: this.showOutsideDays, onChange: this.handleCalendarChange, onRangestart: this.handleCalendarRangeStart, onRangeend: this.handleCalendarRangeEnd, exportparts: "container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading", ref: (elem) => (this.callyElem = elem) }, h("bq-icon", { key: '995826eb972580a6f63052bee35324aa9a2add6c', color: "text--primary", slot: "previous", name: "caret-left", label: "Previous" }), h("bq-icon", { key: 'c5139a4bc0e92dcfc7ea3be691f6f553c2c4efb9', color: "text--primary", slot: "next", name: "caret-right", label: "Next" }), h("div", { key: 'c7ca5ac86a07e2d0681261ceb9045675df7a3881', class: "flex flex-wrap justify-center gap-[--bq-spacing-m]" }, this.generateCalendarMonths()))))));
|
|
497
509
|
}
|
|
498
510
|
static get is() { return "bq-date-picker"; }
|
|
499
511
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1101,6 +1113,7 @@ export class BqDatePicker {
|
|
|
1101
1113
|
}
|
|
1102
1114
|
static get states() {
|
|
1103
1115
|
return {
|
|
1116
|
+
"isCallyLoaded": {},
|
|
1104
1117
|
"focusedDate": {},
|
|
1105
1118
|
"displayDate": {},
|
|
1106
1119
|
"hasLabel": {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-date-picker.js","sourceRoot":"","sources":["../../../../../../src/components/date-pic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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Listen,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { CalendarDate } from 'cally';\n\nimport { DATE_PICKER_TYPE, DaysOfWeek, TDatePickerType } from './bq-date-picker.types';\nimport { Placement } from '../../services/interfaces';\nimport {\n hasSlotContent,\n isClient,\n isDefined,\n isEventTargetChildOfElement,\n isHTMLElement,\n isNil,\n validatePropValue,\n} from '../../shared/utils';\nimport { TInputValidation } from '../input/bq-input.types';\n\n/**\n * The Date Picker is a intuitive UI element component allows users to select dates from a visual calendar interface, providing an intuitive way to input date information.\n *\n * @example How to use it\n * ```html\n * <bq-date-picker\n * first-day-of-week=\"1\"\n * locale=\"en-GB\"\n * months-per-view=\"single\"\n * months=\"2\"\n * name=\"bq-date-picker\"\n * placeholder=\"Enter your date\"\n * placement=\"bottom-end\"\n * show-outside-days=\"false\"\n * type=\"range\"\n * validation-status=\"none\"\n * value=\"2024-05-25\"\n * >\n * <label class=\"flex flex-grow items-center\" slot=\"label\">\n * Date picker label\n * </label>\n * </bq-date-picker>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/5793a9-date-picker\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-dropdown\n * @dependency bq-icon\n *\n * @attr {boolean} autofocus - If `true`, the Date picker input will be focused on component render.\n * @attr {string} clear-button-label - The clear button aria label.\n * @attr {boolean} disable-clear - If `true`, the clear button won't be displayed.\n * @attr {boolean} disabled - Indicates whether the Date picker input is disabled or not.\n * @attr {number} distance - Represents the distance (gutter or margin) between the Date picker panel and the input element.\n * @attr {0 | 1 | 2 | 3 | 4 | 5 | 6} first-day-of-week - The first day of the week, where Sunday is 0, Monday is 1, etc.\n * @attr {Intl.DateTimeFormatOptions} format-options - The options to use when formatting the displayed value. Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n * @attr {string} form - The ID of the form that the Date picker input belongs to.\n * @attr {string} form-validation-message - The native form validation message (mandatory if `required` is set).\n * @attr {function} is-date-disallowed - A function that takes a date and returns true if the date should not be selectable.\n * @attr {Intl.LocalesArgument} locale - The locale for formatting dates. If not set, will use the browser's locale. Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument\n * @attr {string} max - The latest date that can be selected.\n * @attr {string} min - The earliest date that can be selected.\n * @attr {number} months - Number of months to show when range is `true`.\n * @attr {string} name - The Date picker input name.\n * @attr {boolean} open - If `true`, the Date picker panel will be visible.\n * @attr {string} panel-height - When set, it will override the height of the Date picker panel.\n * @attr {\"top\" | \"right\" | \"bottom\" | \"left\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\"} placement - Position of the Date picker panel.\n * @attr {boolean} required - Indicates whether or not the Date picker input is required to be filled out before submitting the form.\n * @attr {number} skidding - Represents the skidding between the Date picker panel and the input element.\n * @attr {boolean} show-outside-days - Whether to show days outside the month.\n * @attr {string} strategy - Defines the strategy to position the Date picker panel.\n * @attr {string} tentative - The date that is tentatively selected, e.g. the start of a range selection.\n * @attr {\"single\" | \"multi\" | \"range\"} type - It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection.\n * @attr {\"error\" | \"none\" | \"success\" | \"warning\"} validation-status - The validation status of the Select input.\n * @attr {string} value - The select input value represents the currently selected date or range and can be used to reset the field to a previous value.\n *\n * @method clear - Clears the selected value.\n *\n * @event bqBlur - Callback handler emitted when the input loses focus.\n * @event bqChange - Callback handler emitted when the input value has changed and the input loses focus.\n * @event bqClear - Callback handler emitted when the input value has been cleared.\n * @event bqFocus - Callback handler emitted when the input has received focus.\n *\n * @part base - The component's base wrapper.\n * @part button - The native HTML button used under the hood in the clear button.\n * @part calendar__button - Any button used in the calendar-month component.\n * @part calendar__button - Any button within the calendar-range component.\n * @part calendar__container - The calendar-range container for the entire component.\n * @part calendar__day - The buttons corresponding to each day in the calendar-month grid.\n * @part calendar__disabled - A button that is disabled due to min/max on the calendar-range component.\n * @part calendar__disallowed - Any day that has been disallowed via isDateDisallowed.\n * @part calendar__head - The calendar-month table's header row.\n * @part calendar__header - The calendar-range container for the heading and buttons.\n * @part calendar__heading - The calendar-month heading container that labels the month.\n * @part calendar__heading - The calendar-range heading containing the month and year.\n * @part calendar__next - The next page button on the calendar-range component.\n * @part calendar__outside - Any days which are outside the current month.\n * @part calendar__previous - The previous page button on the calendar-range component.\n * @part calendar__range-end - The day at the end of a date range.\n * @part calendar__range-inner - Any days between the start and end of a date range.\n * @part calendar__range-start - The day at the start of a date range.\n * @part calendar__selected - Any days which are selected.\n * @part calendar__table - The calendar-month <table> element.\n * @part calendar__td - The calendar-month table's body cells.\n * @part calendar__th - The calendar-month table's header cells.\n * @part calendar__today - The Today's day.\n * @part calendar__tr - Any row within the table on the calendar-month component.\n * @part calendar__week - The calendar-month table's body rows.\n * @part clear-btn - The clear button.\n * @part control - The input control wrapper.\n * @part input - The native HTML input element used under the hood.\n * @part label - The label slot container.\n * @part panel - The date picker panel container\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n *\n * @cssprop --bq-date-picker--background-color - Date picker background color.\n * @cssprop --bq-date-picker--border-color - Date picker border color.\n * @cssprop --bq-date-picker--border-color-disabled - Date picker border color when disabled.\n * @cssprop --bq-date-picker--border-color-focus - Date picker border color on focus.\n * @cssprop --bq-date-picker--border-radius - Date picker border radius.\n * @cssprop --bq-date-picker--border-style - Date picker border style.\n * @cssprop --bq-date-picker--border-width - Date picker border width.\n * @cssprop --bq-date-picker--currentDate-border-color - Date picker border color for current date.\n * @cssprop --bq-date-picker--currentDate-border-width - Date picker border width for current date.\n * @cssprop --bq-date-picker--day-size - Date picker button day size.\n * @cssprop --bq-date-picker--gap - Gap between Date picker content and prefix/suffix.\n * @cssprop --bq-date-picker--icon-size - Icon size to use in prefix/suffix and clear button.\n * @cssprop --bq-date-picker--label-margin-bottom - Date picker label margin bottom.\n * @cssprop --bq-date-picker--label-text-color - Date picker label text color.\n * @cssprop --bq-date-picker--label-text-size - Date picker label text size.\n * @cssprop --bq-date-picker--padding-end - Date picker padding end.\n * @cssprop --bq-date-picker--padding-start - Date picker padding start.\n * @cssprop --bq-date-picker--paddingY - Date picker padding top and bottom.\n * @cssprop --bq-date-picker--range-background-color - Background color for the selected date range in the date picker.\n * @cssprop --bq-date-picker--range-inner-background-color - Background color for the selected dates inside the date range in the date picker.\n * @cssprop --bq-date-picker--text-color - Date picker text color.\n * @cssprop --bq-date-picker--text-placeholder-color - Date picker placeholder text color.\n * @cssprop --bq-date-picker--text-size - Date picker text size.\n */\n@Component({\n tag: 'bq-date-picker',\n styleUrl: './scss/bq-date-picker.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqDatePicker {\n // Own Properties\n // ====================\n\n private callyElem?: InstanceType<typeof CalendarDate>;\n private inputElem?: HTMLInputElement;\n private labelElem?: HTMLElement;\n private prefixElem?: HTMLElement;\n private suffixElem?: HTMLElement;\n\n private fallbackInputId = 'date-picker';\n\n // Export parts of the calendar-month component\n private readonly COMMON_EXPORT_PARTS =\n 'calendar__heading,calendar__table,calendar__tr,calendar__head,calendar__week,calendar__th,calendar__td';\n private readonly BUTTON_EXPORT_PARTS =\n 'calendar__button,calendar__day,calendar__selected,calendar__today,calendar__disallowed,calendar__outside,calendar__range-start,calendar__range-end,calendar__range-inner';\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals: ElementInternals;\n @Element() el!: HTMLBqDatePickerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() focusedDate: string;\n @State() displayDate: string;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasRangeEnd = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /** If `true`, the Date picker input will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /** The clear button aria label */\n @Prop({ reflect: true }) clearButtonLabel? = 'Clear value';\n\n /** If `true`, the clear button won't be displayed */\n @Prop({ reflect: true }) disableClear? = false;\n\n /**\n * Indicates whether the Date picker input is disabled or not.\n * If `true`, the Date picker is disabled and cannot be interacted with.\n */\n @Prop({ mutable: true }) disabled?: boolean = false;\n\n /** Represents the distance (gutter or margin) between the Date picker panel and the input element. */\n @Prop({ reflect: true }) distance?: number = 8;\n\n /** The first day of the week, where Sunday is 0, Monday is 1, etc */\n @Prop({ reflect: true }) firstDayOfWeek?: DaysOfWeek = 1;\n\n /** The options to use when formatting the displayed value.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n @Prop() formatOptions: Intl.DateTimeFormatOptions = {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n };\n\n /** The ID of the form that the Date picker input belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** The native form validation message (mandatory if `required` is set) */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /** A function that takes a date and returns true if the date should not be selectable */\n @Prop({ reflect: true }) isDateDisallowed?: (date: Date) => boolean;\n\n /** The locale for formatting dates. If not set, will use the browser's locale.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument\n */\n @Prop({ reflect: true }) locale: Intl.LocalesArgument = 'en-GB';\n\n /** The latest date that can be selected */\n @Prop({ reflect: true }) max?: string;\n\n /** The earliest date that can be selected */\n @Prop({ reflect: true }) min?: string;\n\n /** Number of months to show when range is `true` */\n @Prop({ reflect: true }) months: number;\n\n /**\n * Specifies how the next/previous buttons should navigate the calendar.\n * - single: The buttons will navigate by a single month at a time.\n * - months: The buttons will navigate by the number of months displayed per view.\n */\n @Prop({ reflect: true }) monthsPerView: 'single' | 'months' = 'single';\n\n /** The Date picker input name. */\n @Prop({ reflect: true }) name!: string;\n\n /** If `true`, the Date picker panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the Date picker panel. */\n @Prop({ reflect: true, mutable: true }) panelHeight?: string = 'auto';\n\n /** The Date picker input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** Position of the Date picker panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom-end';\n\n /** Indicates whether or not the Date picker input is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /** Represents the skidding between the Date picker panel and the input element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Whether to show days outside the month */\n @Prop({ reflect: true }) showOutsideDays: boolean = false;\n\n /** Defines the strategy to position the Date picker panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n /** The date that is tentatively selected e.g. the start of a range selection */\n @Prop({ reflect: true, mutable: true }) tentative?: string;\n\n /** It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection */\n @Prop({ reflect: true }) type: TDatePickerType = 'single';\n\n /**\n * The validation status of the Select input.\n *\n * @remarks\n * This property is used to indicate the validation status of the select input. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The input has a validation error.\n * - `'warning'`: The input has a validation warning.\n * - `'success'`: The input has passed validation.\n */\n @Prop({ reflect: true }) validationStatus: TInputValidation = 'none';\n\n /** The select input value represents the currently selected date or range and can be used to reset the field to a previous value.\n * All dates are expected in ISO-8601 format (YYYY-MM-DD). */\n @Prop({ reflect: true, mutable: true }) value: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n const { formatDisplayValue, internals, value } = this;\n\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n this.updateFormValidity();\n\n if (Array.isArray(value)) {\n this.hasValue = value.some((val) => val.length > 0);\n return;\n }\n\n this.hasValue = isDefined(value);\n this.displayDate = formatDisplayValue(value);\n\n this.setFocusedDate();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(DATE_PICKER_TYPE, 'single', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqDatePickerElement>;\n\n /**\n * Callback handler emitted when the input value has changed and the input loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.\n */\n @Event() bqChange!: EventEmitter<{ value: string; el: HTMLBqDatePickerElement }>;\n\n /** Callback handler emitted when the input value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqDatePickerElement>;\n\n /** Callback handler emitted when the input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqDatePickerElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n async connectedCallback() {\n if (!isClient()) return;\n\n await import('cally');\n }\n\n componentWillLoad() {\n this.handleValueChange();\n }\n\n formAssociatedCallback() {\n this.updateFormValidity();\n }\n\n formResetCallback() {\n if (isNil(this.value)) return;\n\n this.clear();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqOpen', { capture: true })\n handleOpenChange(ev: CustomEvent<{ open: boolean }>) {\n if (!ev.composedPath().includes(this.el)) return;\n\n this.open = ev.detail.open;\n this.setFocusedDate();\n }\n\n @Listen('click', { target: 'body', capture: true })\n handleClickOutside(ev: MouseEvent) {\n const { open, type, hasRangeEnd } = this;\n if (!open || type !== 'range' || ev.button !== 0) return;\n if (isEventTargetChildOfElement(ev, this.el) || hasRangeEnd) return;\n if (isEventTargetChildOfElement(ev, this.el)) return;\n\n if (!hasRangeEnd) {\n this.tentative = undefined;\n this.hasRangeEnd = false;\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 /**\n * Clears the selected value.\n *\n * @return {Promise<void>}\n * @memberof BqInput\n */\n @Method()\n async clear(): Promise<void> {\n if (this.disabled) return;\n\n this.value = undefined;\n this.internals.setFormValue(undefined);\n this.bqClear.emit(this.el);\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private setFocusedDate = () => {\n if (!this.callyElem) return;\n // We need to set the focused date in the calendar component via a ref\n // because it doesn't work when passed as a prop (the Cally element does not re-render)\n this.focusedDate = this.value ? this.formatFocusedDate(this.value) : new Date().toLocaleDateString('fr-CA');\n this.callyElem.focusedDate = this.focusedDate;\n };\n\n private handleChange = (ev: Event) => {\n if (this.disabled) return;\n if (!isHTMLElement(ev.target, 'input')) return;\n\n const dateValue = new Date(ev.target.value);\n if (!isNaN(dateValue.getTime())) {\n // We need to force the value to respect the format: yyyy-mm-dd, hence the hardcoded locale\n this.value = dateValue.toLocaleDateString('fr-CA');\n this.displayDate = this.formatDisplayValue(this.value);\n this.internals.setFormValue(`${this.value}`);\n this.bqChange.emit({ value: this.value, el: this.el });\n }\n };\n\n private handleCalendarChange = (ev: Event) => {\n const { value } = ev.target as unknown as { value: string };\n\n this.value = value;\n this.displayDate = this.formatDisplayValue(this.value);\n this.inputElem.value = this.displayDate;\n this.inputElem.focus();\n\n this.internals.setFormValue(`${this.value}`);\n this.bqChange.emit({ value: this.value, el: this.el });\n\n this.open = this.type === 'multi';\n };\n\n private handleCalendarRangeStart = (ev: CustomEvent) => {\n this.hasRangeEnd = false;\n this.tentative = new Date(ev.detail).toLocaleDateString('fr-CA');\n };\n\n private handleCalendarRangeEnd = () => {\n this.hasRangeEnd = true;\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n if (this.disabled) return;\n\n this.inputElem.value = '';\n this.value = this.inputElem.value;\n this.hasRangeEnd = false;\n\n this.bqClear.emit(this.el);\n this.bqChange.emit({ value: this.value, el: this.el });\n this.internals.setFormValue(undefined);\n this.inputElem.focus();\n\n ev.stopPropagation();\n };\n\n private handleLabelSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n };\n\n private handlePrefixSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem);\n };\n\n private handleSuffixSlotChange = () => {\n this.hasSuffix = hasSlotContent(this.suffixElem);\n };\n\n private generateCalendarMonth = (offset?: number, className = ''): Element => {\n return (\n <calendar-month\n offset={offset}\n class={className}\n exportparts={`${this.COMMON_EXPORT_PARTS},${this.BUTTON_EXPORT_PARTS}`}\n />\n );\n };\n\n /**\n * Generates an array of Elements representing the calendar months.\n *\n * If the type of the date picker is 'range' or 'multi' and the number of months is specified,\n * it generates an array of calendar months with the specified length. Each month will have an offset\n * and a class name based on its position in the array. The offset is used to determine the month to display,\n * and the class name is used for responsive design.\n *\n * If the type of the date picker is not 'range' or 'multi', or if the number of months is not specified,\n * it generates an array with a single calendar month.\n *\n * @returns {Element[]} An array of elements representing the calendar months.\n */\n private generateCalendarMonths = (): Element[] => {\n if (this.type === 'range' || (this.type === 'multi' && this.months)) {\n return Array.from({ length: this.months }, (_, i) => {\n const offset = i > 0 ? i : undefined;\n const className = offset ? 'hidden sm:block' : '';\n return this.generateCalendarMonth(offset, className);\n });\n }\n\n return [this.generateCalendarMonth()];\n };\n\n /**\n * Extracts and returns the first date part from a given string.\n * When the type of the date picker is 'range' or 'multi', the first or initial date part of the value\n * should be the focused date in the calendar.\n *\n * @param value - The value to be processed, can be a string.\n * @returns The extracted last date portion of the value.\n */\n private formatFocusedDate = (value: string): string | null => {\n if (!value) return;\n\n const dateRegex = /\\b\\d{4}-\\d{2}-\\d{2}\\b/;\n const match = dateRegex.exec(value);\n return match ? match[0] : null;\n };\n\n private formatDisplayValue = (value: string): string | undefined => {\n if (!value) return;\n\n const dateFormatter = new Intl.DateTimeFormat(this.locale, this.formatOptions);\n\n if (this.type === 'range') {\n const [start, end] = value.split('/').map((dateStr) => new Date(dateStr));\n return dateFormatter.formatRange(start, end);\n }\n\n if (this.type === 'multi') {\n const dates = value.split(' ').map((dateStr) => new Date(dateStr));\n return dates.map((date) => dateFormatter.format(date)).join(', ');\n }\n\n return dateFormatter.format(new Date(value));\n };\n\n private updateFormValidity = () => {\n const { formValidationMessage, internals, required, value, inputElem } = this;\n\n // Clear the validity state\n internals?.states.clear();\n\n if (required && (!value || value.toString().trim() === '')) {\n // Set validity state to invalid\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, inputElem);\n return;\n }\n\n // Set validity state to valid if textarea has value or is not required\n internals?.states.add('valid');\n internals?.setValidity({});\n };\n\n private get CalendarType() {\n const componentTypes = {\n single: 'calendar-date',\n multi: 'calendar-multi',\n range: 'calendar-range',\n } as const;\n\n // Return the corresponding component type, based on the type prop value\n return componentTypes[this.type] || componentTypes.single;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const CallyCalendar = this.CalendarType;\n const labelId = `bq-date-picker__label-${this.name || this.fallbackInputId}`;\n\n return (\n <div class=\"bq-date-picker\" part=\"base\">\n {/* Label */}\n <label\n id={labelId}\n class={{ 'bq-date-picker__label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem: HTMLSpanElement) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleLabelSlotChange} />\n </label>\n {/* Select date picker dropdown */}\n <bq-dropdown\n class=\"bq-date-picker__dropdown is-full [&::part(panel)]:p-m [&::part(panel)]:is-auto\"\n disabled={this.disabled}\n distance={this.distance}\n open={this.open}\n panelHeight={this.panelHeight}\n placement={this.placement}\n skidding={this.skidding}\n strategy={this.strategy}\n exportparts=\"panel\"\n >\n {/* Input control group */}\n <div\n class={{\n 'bq-date-picker__control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n slot=\"trigger\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem: HTMLSpanElement) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handlePrefixSlotChange} />\n </span>\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-date-picker__control--input\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls={`${this.name}`}\n aria-haspopup=\"dialog\"\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.type !== 'single'}\n ref={(inputElem: HTMLInputElement) => (this.inputElem = inputElem)}\n required={this.required}\n spellcheck={false}\n type=\"text\"\n value={this.displayDate}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onChange={this.handleChange}\n />\n {/* Clear Button */}\n {this.hasValue && !this.disabled && !this.disableClear && (\n // The clear button will be visible as long as the input has a value\n // and the parent group is hovered or has focus-within\n <bq-button\n class=\"bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\n >\n <slot name=\"clear-icon\">\n <bq-icon name=\"x-circle\" class=\"flex\" />\n </slot>\n </bq-button>\n )}\n {/* Suffix */}\n <span\n class=\"bq-date-picker__control--suffix\"\n ref={(spanElem: HTMLSpanElement) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSuffixSlotChange}>\n <bq-icon name=\"calendar-blank\" class=\"flex\" />\n </slot>\n </span>\n </div>\n <CallyCalendar\n isDateDisallowed={this.isDateDisallowed}\n locale={this.locale as string}\n value={this.value}\n min={this.min}\n max={this.max}\n months={this.months}\n tentative={this.tentative}\n pageBy={this.monthsPerView}\n firstDayOfWeek={this.firstDayOfWeek}\n showOutsideDays={this.showOutsideDays}\n onChange={this.handleCalendarChange}\n onRangestart={this.handleCalendarRangeStart}\n onRangeend={this.handleCalendarRangeEnd}\n exportparts=\"container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading\"\n ref={(elem) => (this.callyElem = elem as InstanceType<typeof CalendarDate>)}\n >\n <bq-icon color=\"text--primary\" slot=\"previous\" name=\"caret-left\" label=\"Previous\" />\n <bq-icon color=\"text--primary\" slot=\"next\" name=\"caret-right\" label=\"Next\" />\n\n <div class=\"flex flex-wrap justify-center gap-[--bq-spacing-m]\">{this.generateCalendarMonths()}</div>\n </CallyCalendar>\n </bq-dropdown>\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"bq-date-picker.js","sourceRoot":"","sources":["../../../../../../src/components/date-picker/bq-date-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,gBAAgB,EAA8C,MAAM,wBAAwB,CAAC;AACtG,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,OAAO,EACL,cAAc,EACd,QAAQ,EACR,SAAS,EACT,2BAA2B,EAC3B,aAAa,EACb,KAAK,EACL,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAG5B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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Listen,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nimport { DATE_PICKER_TYPE, DaysOfWeek, TCalendarDate, TDatePickerType } from './bq-date-picker.types';\nimport { isCallyLibraryLoaded, loadCallyLibrary } from './helper/callyLibrary';\nimport { Placement } from '../../services/interfaces';\nimport {\n hasSlotContent,\n isClient,\n isDefined,\n isEventTargetChildOfElement,\n isHTMLElement,\n isNil,\n validatePropValue,\n} from '../../shared/utils';\nimport { TInputValidation } from '../input/bq-input.types';\n\n/**\n * The Date Picker is a intuitive UI element component allows users to select dates from a visual calendar interface, providing an intuitive way to input date information.\n *\n * @example How to use it\n * ```html\n * <bq-date-picker\n * first-day-of-week=\"1\"\n * locale=\"en-GB\"\n * months-per-view=\"single\"\n * months=\"2\"\n * name=\"bq-date-picker\"\n * placeholder=\"Enter your date\"\n * placement=\"bottom-end\"\n * show-outside-days=\"false\"\n * type=\"range\"\n * validation-status=\"none\"\n * value=\"2024-05-25\"\n * >\n * <label class=\"flex flex-grow items-center\" slot=\"label\">\n * Date picker label\n * </label>\n * </bq-date-picker>\n * ```\n *\n * @documentation https://www.beeq.design/3d466e231/p/5793a9-date-picker\n * @status stable\n *\n * @dependency bq-button\n * @dependency bq-dropdown\n * @dependency bq-icon\n *\n * @attr {boolean} autofocus - If `true`, the Date picker input will be focused on component render.\n * @attr {string} clear-button-label - The clear button aria label.\n * @attr {boolean} disable-clear - If `true`, the clear button won't be displayed.\n * @attr {boolean} disabled - Indicates whether the Date picker input is disabled or not.\n * @attr {number} distance - Represents the distance (gutter or margin) between the Date picker panel and the input element.\n * @attr {0 | 1 | 2 | 3 | 4 | 5 | 6} first-day-of-week - The first day of the week, where Sunday is 0, Monday is 1, etc.\n * @attr {Intl.DateTimeFormatOptions} format-options - The options to use when formatting the displayed value. Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n * @attr {string} form - The ID of the form that the Date picker input belongs to.\n * @attr {string} form-validation-message - The native form validation message (mandatory if `required` is set).\n * @attr {function} is-date-disallowed - A function that takes a date and returns true if the date should not be selectable.\n * @attr {Intl.LocalesArgument} locale - The locale for formatting dates. If not set, will use the browser's locale. Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument\n * @attr {string} max - The latest date that can be selected.\n * @attr {string} min - The earliest date that can be selected.\n * @attr {number} months - Number of months to show when range is `true`.\n * @attr {string} name - The Date picker input name.\n * @attr {boolean} open - If `true`, the Date picker panel will be visible.\n * @attr {string} panel-height - When set, it will override the height of the Date picker panel.\n * @attr {\"top\" | \"right\" | \"bottom\" | \"left\" | \"top-start\" | \"top-end\" | \"right-start\" | \"right-end\" | \"bottom-start\" | \"bottom-end\" | \"left-start\" | \"left-end\"} placement - Position of the Date picker panel.\n * @attr {boolean} required - Indicates whether or not the Date picker input is required to be filled out before submitting the form.\n * @attr {number} skidding - Represents the skidding between the Date picker panel and the input element.\n * @attr {boolean} show-outside-days - Whether to show days outside the month.\n * @attr {string} strategy - Defines the strategy to position the Date picker panel.\n * @attr {string} tentative - The date that is tentatively selected, e.g. the start of a range selection.\n * @attr {\"single\" | \"multi\" | \"range\"} type - It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection.\n * @attr {\"error\" | \"none\" | \"success\" | \"warning\"} validation-status - The validation status of the Select input.\n * @attr {string} value - The select input value represents the currently selected date or range and can be used to reset the field to a previous value.\n *\n * @method clear - Clears the selected value.\n *\n * @event bqBlur - Callback handler emitted when the input loses focus.\n * @event bqChange - Callback handler emitted when the input value has changed and the input loses focus.\n * @event bqClear - Callback handler emitted when the input value has been cleared.\n * @event bqFocus - Callback handler emitted when the input has received focus.\n *\n * @part base - The component's base wrapper.\n * @part button - The native HTML button used under the hood in the clear button.\n * @part calendar__button - Any button used in the calendar-month component.\n * @part calendar__button - Any button within the calendar-range component.\n * @part calendar__container - The calendar-range container for the entire component.\n * @part calendar__day - The buttons corresponding to each day in the calendar-month grid.\n * @part calendar__disabled - A button that is disabled due to min/max on the calendar-range component.\n * @part calendar__disallowed - Any day that has been disallowed via isDateDisallowed.\n * @part calendar__head - The calendar-month table's header row.\n * @part calendar__header - The calendar-range container for the heading and buttons.\n * @part calendar__heading - The calendar-month heading container that labels the month.\n * @part calendar__heading - The calendar-range heading containing the month and year.\n * @part calendar__next - The next page button on the calendar-range component.\n * @part calendar__outside - Any days which are outside the current month.\n * @part calendar__previous - The previous page button on the calendar-range component.\n * @part calendar__range-end - The day at the end of a date range.\n * @part calendar__range-inner - Any days between the start and end of a date range.\n * @part calendar__range-start - The day at the start of a date range.\n * @part calendar__selected - Any days which are selected.\n * @part calendar__table - The calendar-month <table> element.\n * @part calendar__td - The calendar-month table's body cells.\n * @part calendar__th - The calendar-month table's header cells.\n * @part calendar__today - The Today's day.\n * @part calendar__tr - Any row within the table on the calendar-month component.\n * @part calendar__week - The calendar-month table's body rows.\n * @part clear-btn - The clear button.\n * @part control - The input control wrapper.\n * @part input - The native HTML input element used under the hood.\n * @part label - The label slot container.\n * @part panel - The date picker panel container\n * @part prefix - The prefix slot container.\n * @part suffix - The suffix slot container.\n *\n * @cssprop --bq-date-picker--background-color - Date picker background color.\n * @cssprop --bq-date-picker--border-color - Date picker border color.\n * @cssprop --bq-date-picker--border-color-disabled - Date picker border color when disabled.\n * @cssprop --bq-date-picker--border-color-focus - Date picker border color on focus.\n * @cssprop --bq-date-picker--border-radius - Date picker border radius.\n * @cssprop --bq-date-picker--border-style - Date picker border style.\n * @cssprop --bq-date-picker--border-width - Date picker border width.\n * @cssprop --bq-date-picker--currentDate-border-color - Date picker border color for current date.\n * @cssprop --bq-date-picker--currentDate-border-width - Date picker border width for current date.\n * @cssprop --bq-date-picker--day-size - Date picker button day size.\n * @cssprop --bq-date-picker--gap - Gap between Date picker content and prefix/suffix.\n * @cssprop --bq-date-picker--icon-size - Icon size to use in prefix/suffix and clear button.\n * @cssprop --bq-date-picker--label-margin-bottom - Date picker label margin bottom.\n * @cssprop --bq-date-picker--label-text-color - Date picker label text color.\n * @cssprop --bq-date-picker--label-text-size - Date picker label text size.\n * @cssprop --bq-date-picker--padding-end - Date picker padding end.\n * @cssprop --bq-date-picker--padding-start - Date picker padding start.\n * @cssprop --bq-date-picker--paddingY - Date picker padding top and bottom.\n * @cssprop --bq-date-picker--range-background-color - Background color for the selected date range in the date picker.\n * @cssprop --bq-date-picker--range-inner-background-color - Background color for the selected dates inside the date range in the date picker.\n * @cssprop --bq-date-picker--text-color - Date picker text color.\n * @cssprop --bq-date-picker--text-placeholder-color - Date picker placeholder text color.\n * @cssprop --bq-date-picker--text-size - Date picker text size.\n */\n@Component({\n tag: 'bq-date-picker',\n styleUrl: './scss/bq-date-picker.scss',\n formAssociated: true,\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqDatePicker {\n // Own Properties\n // ====================\n\n private callyElem?: TCalendarDate;\n private inputElem?: HTMLInputElement;\n private labelElem?: HTMLElement;\n private prefixElem?: HTMLElement;\n private suffixElem?: HTMLElement;\n\n private fallbackInputId = 'date-picker';\n\n // Export parts of the calendar-month component\n private readonly COMMON_EXPORT_PARTS =\n 'calendar__heading,calendar__table,calendar__tr,calendar__head,calendar__week,calendar__th,calendar__td';\n private readonly BUTTON_EXPORT_PARTS =\n 'calendar__button,calendar__day,calendar__selected,calendar__today,calendar__disallowed,calendar__outside,calendar__range-start,calendar__range-end,calendar__range-inner';\n\n // Reference to host HTML element\n // ===================================\n\n @AttachInternals() internals: ElementInternals;\n @Element() el!: HTMLBqDatePickerElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() isCallyLoaded = false;\n @State() focusedDate: string;\n @State() displayDate: string;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasRangeEnd = false;\n @State() hasSuffix = false;\n @State() hasValue = false;\n\n // Public Property API\n // ========================\n\n /** If `true`, the Date picker input will be focused on component render */\n @Prop({ reflect: true }) autofocus: boolean;\n\n /** The clear button aria label */\n @Prop({ reflect: true }) clearButtonLabel? = 'Clear value';\n\n /** If `true`, the clear button won't be displayed */\n @Prop({ reflect: true }) disableClear? = false;\n\n /**\n * Indicates whether the Date picker input is disabled or not.\n * If `true`, the Date picker is disabled and cannot be interacted with.\n */\n @Prop({ mutable: true }) disabled?: boolean = false;\n\n /** Represents the distance (gutter or margin) between the Date picker panel and the input element. */\n @Prop({ reflect: true }) distance?: number = 8;\n\n /** The first day of the week, where Sunday is 0, Monday is 1, etc */\n @Prop({ reflect: true }) firstDayOfWeek?: DaysOfWeek = 1;\n\n /** The options to use when formatting the displayed value.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n @Prop() formatOptions: Intl.DateTimeFormatOptions = {\n day: 'numeric',\n month: 'short',\n year: 'numeric',\n };\n\n /** The ID of the form that the Date picker input belongs to. */\n @Prop({ reflect: true }) form?: string;\n\n /** The native form validation message (mandatory if `required` is set) */\n @Prop({ mutable: true }) formValidationMessage?: string;\n\n /** A function that takes a date and returns true if the date should not be selectable */\n @Prop({ reflect: true }) isDateDisallowed?: (date: Date) => boolean;\n\n /** The locale for formatting dates. If not set, will use the browser's locale.\n * Details: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument\n */\n @Prop({ reflect: true }) locale: Intl.LocalesArgument = 'en-GB';\n\n /** The latest date that can be selected */\n @Prop({ reflect: true }) max?: string;\n\n /** The earliest date that can be selected */\n @Prop({ reflect: true }) min?: string;\n\n /** Number of months to show when range is `true` */\n @Prop({ reflect: true }) months: number;\n\n /**\n * Specifies how the next/previous buttons should navigate the calendar.\n * - single: The buttons will navigate by a single month at a time.\n * - months: The buttons will navigate by the number of months displayed per view.\n */\n @Prop({ reflect: true }) monthsPerView: 'single' | 'months' = 'single';\n\n /** The Date picker input name. */\n @Prop({ reflect: true }) name!: string;\n\n /** If `true`, the Date picker panel will be visible. */\n @Prop({ reflect: true, mutable: true }) open?: boolean = false;\n\n /** When set, it will override the height of the Date picker panel. */\n @Prop({ reflect: true, mutable: true }) panelHeight?: string = 'auto';\n\n /** The Date picker input placeholder text value */\n @Prop({ reflect: true }) placeholder?: string;\n\n /** Position of the Date picker panel */\n @Prop({ reflect: true }) placement?: Placement = 'bottom-end';\n\n /** Indicates whether or not the Date picker input is required to be filled out before submitting the form. */\n @Prop({ reflect: true }) required?: boolean;\n\n /** Represents the skidding between the Date picker panel and the input element. */\n @Prop({ reflect: true }) skidding?: number = 0;\n\n /** Whether to show days outside the month */\n @Prop({ reflect: true }) showOutsideDays: boolean = false;\n\n /** Defines the strategy to position the Date picker panel */\n @Prop({ reflect: true }) strategy?: 'fixed' | 'absolute' = 'fixed';\n\n /** The date that is tentatively selected e.g. the start of a range selection */\n @Prop({ reflect: true, mutable: true }) tentative?: string;\n\n /** It defines how the calendar will behave, allowing single date selection, range selection, or multiple date selection */\n @Prop({ reflect: true }) type: TDatePickerType = 'single';\n\n /**\n * The validation status of the Select input.\n *\n * @remarks\n * This property is used to indicate the validation status of the select input. It can be set to one of the following values:\n * - `'none'`: No validation status is set.\n * - `'error'`: The input has a validation error.\n * - `'warning'`: The input has a validation warning.\n * - `'success'`: The input has passed validation.\n */\n @Prop({ reflect: true }) validationStatus: TInputValidation = 'none';\n\n /** The select input value represents the currently selected date or range and can be used to reset the field to a previous value.\n * All dates are expected in ISO-8601 format (YYYY-MM-DD). */\n @Prop({ reflect: true, mutable: true }) value: string;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValueChange() {\n const { formatDisplayValue, internals, isCallyLoaded, value } = this;\n if (!isCallyLoaded) return;\n\n internals.setFormValue(!isNil(value) ? `${value}` : undefined);\n this.updateFormValidity();\n\n if (Array.isArray(value)) {\n this.hasValue = value.some((val) => val.length > 0);\n return;\n }\n\n this.hasValue = isDefined(value);\n this.displayDate = formatDisplayValue(value);\n\n this.setFocusedDate();\n }\n\n @Watch('type')\n checkPropValues() {\n validatePropValue(DATE_PICKER_TYPE, 'single', this.el, 'type');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Callback handler emitted when the input loses focus */\n @Event() bqBlur!: EventEmitter<HTMLBqDatePickerElement>;\n\n /**\n * Callback handler emitted when the input value has changed and the input loses focus.\n * This handler is called whenever the user finishes typing or pasting text into the input field and then clicks outside of the input field.\n */\n @Event() bqChange!: EventEmitter<{ value: string; el: HTMLBqDatePickerElement }>;\n\n /** Callback handler emitted when the input value has been cleared */\n @Event() bqClear!: EventEmitter<HTMLBqDatePickerElement>;\n\n /** Callback handler emitted when the input has received focus */\n @Event() bqFocus!: EventEmitter<HTMLBqDatePickerElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n async connectedCallback() {\n if (!isClient() || this.isCallyLoaded) return;\n\n try {\n await loadCallyLibrary();\n this.isCallyLoaded = isCallyLibraryLoaded();\n } catch (error) {\n console.error(error);\n }\n }\n\n async componentDidLoad() {\n this.handleSlotChange();\n this.handleValueChange();\n }\n\n formAssociatedCallback() {\n this.updateFormValidity();\n }\n\n formResetCallback() {\n if (isNil(this.value)) return;\n\n this.clear();\n }\n\n // Listeners\n // ==============\n\n @Listen('bqOpen', { capture: true })\n handleOpenChange(ev: CustomEvent<{ open: boolean }>) {\n if (!ev.composedPath().includes(this.el)) return;\n\n this.open = ev.detail.open;\n this.setFocusedDate();\n }\n\n @Listen('click', { target: 'body', capture: true })\n handleClickOutside(ev: MouseEvent) {\n const { open, type, hasRangeEnd } = this;\n if (!open || type !== 'range' || ev.button !== 0) return;\n if (isEventTargetChildOfElement(ev, this.el) || hasRangeEnd) return;\n if (isEventTargetChildOfElement(ev, this.el)) return;\n\n if (!hasRangeEnd) {\n this.tentative = undefined;\n this.hasRangeEnd = false;\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 /**\n * Clears the selected value.\n *\n * @return {Promise<void>}\n * @memberof BqInput\n */\n @Method()\n async clear(): Promise<void> {\n if (this.disabled) return;\n\n this.value = undefined;\n this.internals.setFormValue(undefined);\n this.bqClear.emit(this.el);\n }\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n if (this.disabled) return;\n\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n if (this.disabled) return;\n\n this.bqFocus.emit(this.el);\n };\n\n private setFocusedDate = () => {\n const { callyElem, formatFocusedDate, isCallyLoaded, value } = this;\n if (!(callyElem && isCallyLoaded)) return;\n // We need to set the focused date in the calendar component via a ref\n // because it doesn't work when passed as a prop (the Cally element does not re-render)\n this.focusedDate = value ? formatFocusedDate(value) : new Date().toLocaleDateString('fr-CA');\n this.callyElem.focusedDate = this.focusedDate;\n };\n\n private handleChange = (ev: Event) => {\n if (this.disabled) return;\n if (!isHTMLElement(ev.target, 'input')) return;\n\n const dateValue = new Date(ev.target.value);\n if (!isNaN(dateValue.getTime())) {\n // We need to force the value to respect the format: yyyy-mm-dd, hence the hardcoded locale\n this.value = dateValue.toLocaleDateString('fr-CA');\n this.displayDate = this.formatDisplayValue(this.value);\n this.internals.setFormValue(`${this.value}`);\n this.bqChange.emit({ value: this.value, el: this.el });\n }\n };\n\n private handleCalendarChange = (ev: Event) => {\n const { value } = ev.target as unknown as { value: string };\n\n this.value = value;\n this.displayDate = this.formatDisplayValue(this.value);\n this.inputElem.value = this.displayDate;\n this.inputElem.focus();\n\n this.internals.setFormValue(`${this.value}`);\n this.bqChange.emit({ value: this.value, el: this.el });\n\n this.open = this.type === 'multi';\n };\n\n private handleCalendarRangeStart = (ev: CustomEvent) => {\n this.hasRangeEnd = false;\n this.tentative = new Date(ev.detail).toLocaleDateString('fr-CA');\n };\n\n private handleCalendarRangeEnd = () => {\n this.hasRangeEnd = true;\n };\n\n private handleClearClick = (ev: CustomEvent) => {\n if (this.disabled) return;\n\n this.inputElem.value = '';\n this.value = this.inputElem.value;\n this.hasRangeEnd = false;\n\n this.bqClear.emit(this.el);\n this.bqChange.emit({ value: this.value, el: this.el });\n this.internals.setFormValue(undefined);\n this.inputElem.focus();\n\n ev.stopPropagation();\n };\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlotContent(this.labelElem);\n this.hasPrefix = hasSlotContent(this.prefixElem);\n this.hasSuffix = hasSlotContent(this.suffixElem);\n };\n\n private generateCalendarMonth = (offset?: number, className = ''): Element | null => {\n if (!this.isCallyLoaded) return null;\n\n return (\n <calendar-month\n offset={offset}\n class={className}\n exportparts={`${this.COMMON_EXPORT_PARTS},${this.BUTTON_EXPORT_PARTS}`}\n />\n );\n };\n\n /**\n * Generates an array of Elements representing the calendar months.\n *\n * If the type of the date picker is 'range' or 'multi' and the number of months is specified,\n * it generates an array of calendar months with the specified length. Each month will have an offset\n * and a class name based on its position in the array. The offset is used to determine the month to display,\n * and the class name is used for responsive design.\n *\n * If the type of the date picker is not 'range' or 'multi', or if the number of months is not specified,\n * it generates an array with a single calendar month.\n *\n * @returns {Element[]} An array of elements representing the calendar months.\n */\n private generateCalendarMonths = (): Element[] => {\n if (!this.isCallyLoaded) return [];\n\n if (this.type === 'range' || (this.type === 'multi' && this.months)) {\n return Array.from({ length: this.months }, (_, i) => {\n const offset = i > 0 ? i : undefined;\n const className = offset ? 'hidden sm:block' : '';\n return this.generateCalendarMonth(offset, className);\n });\n }\n\n return [this.generateCalendarMonth()];\n };\n\n /**\n * Extracts and returns the first date part from a given string.\n * When the type of the date picker is 'range' or 'multi', the first or initial date part of the value\n * should be the focused date in the calendar.\n *\n * @param value - The value to be processed, can be a string.\n * @returns The extracted last date portion of the value.\n */\n private formatFocusedDate = (value: string): string | null => {\n if (!value) return;\n\n const dateRegex = /\\b\\d{4}-\\d{2}-\\d{2}\\b/;\n const match = dateRegex.exec(value);\n return match ? match[0] : null;\n };\n\n private formatDisplayValue = (value: string): string | undefined => {\n if (!value) return;\n\n const dateFormatter = new Intl.DateTimeFormat(this.locale, this.formatOptions);\n\n if (this.type === 'range') {\n const [start, end] = value.split('/').map((dateStr) => new Date(dateStr));\n return dateFormatter.formatRange(start, end);\n }\n\n if (this.type === 'multi') {\n const dates = value.split(' ').map((dateStr) => new Date(dateStr));\n return dates.map((date) => dateFormatter.format(date)).join(', ');\n }\n\n return dateFormatter.format(new Date(value));\n };\n\n private updateFormValidity = () => {\n const { formValidationMessage, internals, required, value, inputElem } = this;\n\n // Clear the validity state\n internals?.states.clear();\n\n if (required && (!value || value.toString().trim() === '')) {\n // Set validity state to invalid\n internals?.states.add('invalid');\n internals?.setValidity({ valueMissing: true }, formValidationMessage, inputElem);\n return;\n }\n\n // Set validity state to valid if textarea has value or is not required\n internals?.states.add('valid');\n internals?.setValidity({});\n };\n\n private get CalendarType() {\n const componentTypes = {\n single: 'calendar-date',\n multi: 'calendar-multi',\n range: 'calendar-range',\n } as const;\n\n // Return the corresponding component type, based on the type prop value\n return componentTypes[this.type] || componentTypes.single;\n }\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const CallyCalendar = this.CalendarType;\n const labelId = `bq-date-picker__label-${this.name || this.fallbackInputId}`;\n\n return (\n <div class=\"bq-date-picker\" part=\"base\">\n {/* Label */}\n <label\n id={labelId}\n class={{ 'bq-date-picker__label': true, '!hidden': !this.hasLabel }}\n aria-label={this.name || this.fallbackInputId}\n htmlFor={this.name || this.fallbackInputId}\n ref={(labelElem: HTMLSpanElement) => (this.labelElem = labelElem)}\n part=\"label\"\n >\n <slot name=\"label\" onSlotchange={this.handleSlotChange} />\n </label>\n {/* Select date picker dropdown */}\n <bq-dropdown\n class=\"bq-date-picker__dropdown is-full [&::part(panel)]:p-m [&::part(panel)]:is-auto\"\n disabled={this.disabled}\n distance={this.distance}\n open={this.open}\n panelHeight={this.panelHeight}\n placement={this.placement}\n skidding={this.skidding}\n strategy={this.strategy}\n exportparts=\"panel\"\n >\n {/* Input control group */}\n <div\n class={{\n 'bq-date-picker__control': true,\n [`validation-${this.validationStatus}`]: true,\n disabled: this.disabled,\n }}\n part=\"control\"\n slot=\"trigger\"\n >\n {/* Prefix */}\n <span\n class={{ 'bq-date-picker__control--prefix': true, '!hidden': !this.hasPrefix }}\n ref={(spanElem: HTMLSpanElement) => (this.prefixElem = spanElem)}\n part=\"prefix\"\n >\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n {/* HTML Input */}\n <input\n id={this.name || this.fallbackInputId}\n class=\"bq-date-picker__control--input\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-controls={`${this.name}`}\n aria-haspopup=\"dialog\"\n disabled={this.disabled}\n form={this.form}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.type !== 'single'}\n ref={(inputElem: HTMLInputElement) => (this.inputElem = inputElem)}\n required={this.required}\n spellcheck={false}\n type=\"text\"\n value={this.displayDate}\n part=\"input\"\n // Events\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onChange={this.handleChange}\n />\n {/* Clear Button */}\n {this.hasValue && !this.disabled && !this.disableClear && (\n // The clear button will be visible as long as the input has a value\n // and the parent group is hovered or has focus-within\n <bq-button\n class=\"bq-date-picker__control--clear ms-[--bq-date-picker--gap] hidden\"\n appearance=\"text\"\n aria-label={this.clearButtonLabel}\n size=\"small\"\n onBqClick={this.handleClearClick}\n part=\"clear-btn\"\n exportparts=\"button\"\n >\n <slot name=\"clear-icon\">\n <bq-icon name=\"x-circle\" class=\"flex\" />\n </slot>\n </bq-button>\n )}\n {/* Suffix */}\n <span\n class=\"bq-date-picker__control--suffix\"\n ref={(spanElem: HTMLSpanElement) => (this.suffixElem = spanElem)}\n part=\"suffix\"\n >\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange}>\n <bq-icon name=\"calendar-blank\" class=\"flex\" />\n </slot>\n </span>\n </div>\n {this.isCallyLoaded && (\n <CallyCalendar\n isDateDisallowed={this.isDateDisallowed}\n locale={this.locale as string}\n value={this.value}\n min={this.min}\n max={this.max}\n months={this.months}\n tentative={this.tentative}\n pageBy={this.monthsPerView}\n firstDayOfWeek={this.firstDayOfWeek}\n showOutsideDays={this.showOutsideDays}\n onChange={this.handleCalendarChange}\n onRangestart={this.handleCalendarRangeStart}\n onRangeend={this.handleCalendarRangeEnd}\n exportparts=\"container:calendar__container,header:calendar__header,button:calendar__button,previous:calendar__previous,next:calendar__next,disabled:calendar__disabled,heading:calendar__heading\"\n ref={(elem: TCalendarDate) => (this.callyElem = elem)}\n >\n <bq-icon color=\"text--primary\" slot=\"previous\" name=\"caret-left\" label=\"Previous\" />\n <bq-icon color=\"text--primary\" slot=\"next\" name=\"caret-right\" label=\"Next\" />\n\n <div class=\"flex flex-wrap justify-center gap-[--bq-spacing-m]\">{this.generateCalendarMonths()}</div>\n </CallyCalendar>\n )}\n </bq-dropdown>\n </div>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bq-date-picker.types.js","sourceRoot":"","sources":["../../../../../../src/components/date-picker/bq-date-picker.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC","sourcesContent":["export type DaysOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\nexport const DATE_PICKER_TYPE = ['single', 'multi', 'range'] as const;\nexport type TDatePickerType = (typeof DATE_PICKER_TYPE)[number];\n"]}
|
|
1
|
+
{"version":3,"file":"bq-date-picker.types.js","sourceRoot":"","sources":["../../../../../../src/components/date-picker/bq-date-picker.types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC","sourcesContent":["export type DaysOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\nexport const DATE_PICKER_TYPE = ['single', 'multi', 'range'] as const;\nexport type TDatePickerType = (typeof DATE_PICKER_TYPE)[number];\n\nexport type TCalendarDate = {\n focusedDate: string;\n value: string;\n min?: string;\n max?: string;\n months?: number;\n tentative?: string;\n pageBy?: 'single' | 'months';\n firstDayOfWeek?: number;\n showOutsideDays?: boolean;\n isDateDisallowed?: (date: Date) => boolean;\n locale?: string;\n onChange?: (ev: Event) => void;\n onRangestart?: (ev: CustomEvent) => void;\n onRangeend?: (ev: CustomEvent) => void;\n};\n"]}
|