@actabldesign/bellhop-core 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bh-accordion-item.js +1 -1
- package/components/bh-activity-feed.js +1 -1
- package/components/bh-alert.js +1 -1
- package/components/bh-appbar.js +1 -1
- package/components/bh-avatar-add.js +1 -1
- package/components/bh-avatar-stacked.js +1 -1
- package/components/bh-avatar.js +1 -1
- package/components/bh-badge-dot.js +1 -1
- package/components/bh-badge.js +1 -1
- package/components/bh-banner.js +1 -1
- package/components/bh-bar-chart.js +1 -1
- package/components/bh-breadcrumbs.js +1 -1
- package/components/bh-button-icon.js +1 -1
- package/components/bh-button.js +1 -1
- package/components/bh-card-content.js +1 -1
- package/components/bh-card-footer.js +1 -1
- package/components/bh-card-header.js +1 -1
- package/components/bh-card.js +1 -1
- package/components/bh-chart-tooltip.js +1 -1
- package/components/bh-chat-message.js +1 -1
- package/components/bh-chat-reaction.js +1 -1
- package/components/bh-checkbox.js +1 -1
- package/components/bh-checklist-task-group.js +1 -1
- package/components/bh-close-button.js +1 -1
- package/components/bh-command-bar.d.ts +11 -0
- package/components/bh-command-bar.js +1 -0
- package/components/bh-container-footer.js +1 -1
- package/components/bh-container.js +1 -1
- package/components/bh-credit-card.js +1 -1
- package/components/bh-data-grid-body.js +1 -1
- package/components/bh-data-grid-change-preview.js +1 -1
- package/components/bh-data-grid-filter-builder.js +1 -1
- package/components/bh-data-grid-footer.js +1 -1
- package/components/bh-data-grid-header.js +1 -1
- package/components/bh-data-grid-toolbar.js +1 -1
- package/components/bh-data-grid.js +2 -2
- package/components/bh-date-picker-content.js +1 -1
- package/components/bh-date-picker.js +1 -1
- package/components/bh-date-range-picker-content.js +1 -1
- package/components/bh-date-range-picker.js +1 -1
- package/components/bh-divider.js +1 -1
- package/components/bh-dropdown-menu.js +1 -1
- package/components/bh-dropdown.js +1 -1
- package/components/bh-emoji-picker.js +1 -1
- package/components/bh-empty-state.js +1 -1
- package/components/bh-fab.js +1 -1
- package/components/bh-featured-icon.js +1 -1
- package/components/bh-feed-item.js +1 -1
- package/components/bh-gauge-chart.js +1 -1
- package/components/bh-guided-checklist.js +1 -1
- package/components/bh-html-editor-bubble-menu.js +1 -1
- package/components/bh-html-editor-toolbar.js +1 -1
- package/components/bh-html-editor.js +1 -1
- package/components/bh-illustrations.js +1 -1
- package/components/bh-inline-cta.js +1 -1
- package/components/bh-input-autocomplete.js +1 -1
- package/components/bh-input-number.js +1 -1
- package/components/bh-input-password.js +1 -1
- package/components/bh-input-text.js +1 -1
- package/components/bh-input-verification.js +1 -1
- package/components/bh-kbd.d.ts +11 -0
- package/components/bh-kbd.js +1 -0
- package/components/bh-label.js +1 -1
- package/components/bh-line-chart.js +1 -1
- package/components/bh-logo-box.js +1 -1
- package/components/bh-menu-item.js +1 -1
- package/components/bh-menu.js +1 -1
- package/components/bh-modal-actions.js +1 -1
- package/components/bh-modal-header.js +1 -1
- package/components/bh-month-picker-content.js +1 -1
- package/components/bh-month-picker.js +1 -1
- package/components/bh-multi-select.js +1 -1
- package/components/bh-nav-item.js +1 -1
- package/components/bh-notification-center.d.ts +11 -0
- package/components/bh-notification-center.js +1 -0
- package/components/bh-page-header.js +1 -1
- package/components/bh-page-navigation-child.js +1 -1
- package/components/bh-page-navigation-multi-level.js +1 -1
- package/components/bh-page-navigation-single-level.js +1 -1
- package/components/bh-page-navigation.js +1 -1
- package/components/bh-pagination.js +1 -1
- package/components/bh-picker-menu.js +1 -1
- package/components/bh-pie-chart.js +1 -1
- package/components/bh-pivot-grid-field-chooser.js +1 -1
- package/components/bh-pivot-grid.js +1 -1
- package/components/bh-progress-bar.js +1 -1
- package/components/bh-progress-ring.js +1 -1
- package/components/bh-property-switcher.js +1 -1
- package/components/bh-radar-chart.js +1 -1
- package/components/bh-radio-button.js +1 -1
- package/components/bh-radio-group.js +1 -1
- package/components/bh-range-slider.js +1 -1
- package/components/bh-section-footer.js +1 -1
- package/components/bh-section-header.js +1 -1
- package/components/bh-select.js +1 -1
- package/components/bh-selection-group-item.js +1 -1
- package/components/bh-selection-group.js +1 -1
- package/components/bh-side-panel-footer.js +1 -1
- package/components/bh-side-panel-header.js +1 -1
- package/components/bh-sidebar.js +1 -1
- package/components/bh-skeleton-loader.js +1 -1
- package/components/bh-stepper.js +1 -1
- package/components/bh-tab-item.js +1 -1
- package/components/bh-table-header.js +1 -1
- package/components/bh-tabs.js +1 -1
- package/components/bh-tag-group.js +1 -1
- package/components/bh-tag-input.js +1 -1
- package/components/bh-tag.js +1 -1
- package/components/bh-textarea.js +1 -1
- package/components/bh-toast-container.js +1 -1
- package/components/bh-toast.js +1 -1
- package/components/bh-toggle.js +1 -1
- package/components/bh-tooltip.js +1 -1
- package/components/bh-trend-chart.js +1 -1
- package/components/index.d.ts +6 -0
- package/components/index.js +1 -1
- package/components/{p-BVwh7Zds.js → p-2SnKTVal.js} +1 -1
- package/components/{p-DpyQ9_VL.js → p-6tew_a-x.js} +1 -1
- package/components/{p-BUoq_1rz.js → p-B7La6Iwp.js} +1 -1
- package/components/p-B8HxD-vO.js +1 -0
- package/components/{p-CdwBDbHF.js → p-B9--bog4.js} +1 -1
- package/components/{p-D_0aDuRr.js → p-BF5hfv7s.js} +1 -1
- package/components/{p-oaisznHL.js → p-BI2Y2Le4.js} +1 -1
- package/components/p-Be6mIKzo.js +1 -0
- package/components/p-Bh0oD_Yf.js +1 -0
- package/components/{p-nMu0IHKp.js → p-BniMhcxp.js} +1 -1
- package/components/{p-CZRjavNE.js → p-Br9M2BbM.js} +1 -1
- package/components/{p-QCa_P3zY.js → p-BwxcuFPS.js} +1 -1
- package/components/{p-Dq8Cpk56.js → p-BzHDM9Tg.js} +1 -1
- package/components/{p-D-D80sUk.js → p-C4rAmars.js} +1 -1
- package/components/{p-B2KPN863.js → p-C7fkgBQS.js} +1 -1
- package/components/{p-cD3vmu49.js → p-CClVva-u.js} +1 -1
- package/components/p-CJUnjRCe.js +1 -0
- package/components/{p--a7Uv1ky.js → p-CK_Py1Yi.js} +1 -1
- package/components/{p-DjJP-dIm.js → p-CWdw6bHR.js} +1 -1
- package/components/{p-XYHjFWDD.js → p-CZ_H3nat.js} +1 -1
- package/components/{p-CtaODgcw.js → p-C_nrq7_Y.js} +1 -1
- package/components/{p-BFL2Pm_E.js → p-CssmbrSc.js} +1 -1
- package/components/p-CvsupUaF.js +1 -0
- package/components/{p-DBAPExTG.js → p-CvwyG_Kj.js} +1 -1
- package/components/{p-Bf_iTZDv.js → p-D6aw0IK6.js} +1 -1
- package/components/{p-CzvaS9up.js → p-DBl9mNfN.js} +1 -1
- package/components/{p-DWoyQVnq.js → p-DG90uKhz.js} +1 -1
- package/components/{p-CWY9YV_9.js → p-DGWzDn9Y.js} +1 -1
- package/components/p-DJlRFgcj.js +1 -0
- package/components/p-DKWhUGrV.js +1 -0
- package/components/{p-CC_DXFwx.js → p-DSDbfC31.js} +1 -1
- package/components/{p-1SkDR91n.js → p-DUm7JrA0.js} +1 -1
- package/components/{p-C6UC_xxP.js → p-DblmzWu8.js} +1 -1
- package/components/{p-BHeNnP2q.js → p-DfCONXO0.js} +1 -1
- package/components/p-DhgfM7Wy.js +1 -0
- package/components/{p-Xa6gUVGr.js → p-DjUfsCJJ.js} +1 -1
- package/components/{p-CVSRqFZ0.js → p-DjpXtbw8.js} +1 -1
- package/components/{p-GjWzFf-V.js → p-Dzlsnb7d.js} +1 -1
- package/components/{p-Be20AcNb.js → p-S-miu3h6.js} +1 -1
- package/components/{p-DIMoIy0w.js → p-W2SGLZN7.js} +1 -1
- package/components/{p-arW9uaFJ.js → p-hhv9O2Qq.js} +1 -1
- package/components/{p-BwwSI2Fv.js → p-jNp3nckG.js} +1 -1
- package/dist/bellhop-core/bellhop-core.esm.js +1 -1
- package/dist/bellhop-core/p-009efb12.entry.js +1 -0
- package/dist/bellhop-core/p-01b505e3.entry.js +1 -0
- package/dist/bellhop-core/p-02945f90.entry.js +1 -0
- package/dist/bellhop-core/p-04d2ec72.entry.js +1 -0
- package/dist/bellhop-core/p-05867224.entry.js +1 -0
- package/dist/bellhop-core/p-05a53d3b.entry.js +1 -0
- package/dist/bellhop-core/p-0692ab72.entry.js +1 -0
- package/dist/bellhop-core/p-06f9b713.entry.js +1 -0
- package/dist/bellhop-core/p-08b8ba36.entry.js +1 -0
- package/dist/bellhop-core/p-0953e008.entry.js +1 -0
- package/dist/bellhop-core/p-0976eb7a.entry.js +1 -0
- package/dist/bellhop-core/p-097d70d9.entry.js +1 -0
- package/dist/bellhop-core/p-0a316bb6.entry.js +1 -0
- package/dist/bellhop-core/p-108ca612.entry.js +1 -0
- package/dist/bellhop-core/p-12d3c4e9.entry.js +1 -0
- package/dist/bellhop-core/p-13f15f41.entry.js +1 -0
- package/dist/bellhop-core/p-15bb1050.entry.js +1 -0
- package/dist/bellhop-core/p-16e01b81.entry.js +1 -0
- package/dist/bellhop-core/p-188980bd.entry.js +1 -0
- package/dist/bellhop-core/p-1fba0985.entry.js +1 -0
- package/dist/bellhop-core/p-24e5c52b.entry.js +1 -0
- package/dist/bellhop-core/p-29729109.entry.js +1 -0
- package/dist/bellhop-core/p-2b93b512.entry.js +1 -0
- package/dist/bellhop-core/{p-213a104c.entry.js → p-2bcd94d0.entry.js} +1 -1
- package/dist/bellhop-core/p-2bdb9784.entry.js +1 -0
- package/dist/bellhop-core/p-2ee44b97.entry.js +1 -0
- package/dist/bellhop-core/p-3348400a.entry.js +1 -0
- package/dist/bellhop-core/p-38873b75.entry.js +1 -0
- package/dist/bellhop-core/p-399be504.entry.js +1 -0
- package/dist/bellhop-core/p-3d67e55f.entry.js +1 -0
- package/dist/bellhop-core/p-3dcf8812.entry.js +1 -0
- package/dist/bellhop-core/p-42f26142.entry.js +1 -0
- package/dist/bellhop-core/p-43d94b51.entry.js +1 -0
- package/dist/bellhop-core/p-4c65d80a.entry.js +1 -0
- package/dist/bellhop-core/p-4e4b59cc.entry.js +1 -0
- package/dist/bellhop-core/p-50c00ac6.entry.js +1 -0
- package/dist/bellhop-core/p-52d0c0ac.entry.js +1 -0
- package/dist/bellhop-core/p-53ddab62.entry.js +1 -0
- package/dist/bellhop-core/p-558c1c9f.entry.js +1 -0
- package/dist/bellhop-core/{p-fb8e0e6c.entry.js → p-59feba80.entry.js} +1 -1
- package/dist/bellhop-core/{p-165b45f3.entry.js → p-5a49ebee.entry.js} +1 -1
- package/dist/bellhop-core/p-5f5648e6.entry.js +1 -0
- package/dist/bellhop-core/p-614f84ff.entry.js +1 -0
- package/dist/bellhop-core/p-6517c63b.entry.js +1 -0
- package/dist/bellhop-core/{p-c86b7e41.entry.js → p-654de2b6.entry.js} +1 -1
- package/dist/bellhop-core/p-65e10ead.entry.js +1 -0
- package/dist/bellhop-core/p-68c5a0bd.entry.js +1 -0
- package/dist/bellhop-core/p-68cf8430.entry.js +1 -0
- package/dist/bellhop-core/p-6ad1ed53.entry.js +1 -0
- package/dist/bellhop-core/p-6df539be.entry.js +1 -0
- package/dist/bellhop-core/p-6e1c1c27.entry.js +1 -0
- package/dist/bellhop-core/p-710e4da7.entry.js +1 -0
- package/dist/bellhop-core/p-7841fbc2.entry.js +1 -0
- package/dist/bellhop-core/p-7bceb793.entry.js +1 -0
- package/dist/bellhop-core/p-7bd58fae.entry.js +1 -0
- package/dist/bellhop-core/p-7c0d23d4.entry.js +1 -0
- package/dist/bellhop-core/p-7e226f98.entry.js +1 -0
- package/dist/bellhop-core/{p-4a96c207.entry.js → p-815fb83e.entry.js} +1 -1
- package/dist/bellhop-core/p-832bf58d.entry.js +1 -0
- package/dist/bellhop-core/p-8370a956.entry.js +1 -0
- package/dist/bellhop-core/{p-b992fd96.entry.js → p-858017eb.entry.js} +1 -1
- package/dist/bellhop-core/p-87c827d7.entry.js +1 -0
- package/dist/bellhop-core/p-8a38724f.entry.js +1 -0
- package/dist/bellhop-core/p-8aa87a99.entry.js +1 -0
- package/dist/bellhop-core/p-8ad4d720.entry.js +1 -0
- package/dist/bellhop-core/p-8d319614.entry.js +1 -0
- package/dist/bellhop-core/p-963e6ad9.entry.js +1 -0
- package/dist/bellhop-core/p-97bed0b0.entry.js +1 -0
- package/dist/bellhop-core/{p-df4c2032.entry.js → p-9b2d67db.entry.js} +2 -2
- package/dist/bellhop-core/p-9b935b1a.entry.js +1 -0
- package/dist/bellhop-core/p-9cf187af.entry.js +1 -0
- package/dist/bellhop-core/p-9e0b9dec.entry.js +1 -0
- package/dist/bellhop-core/p-CBTS9Vhx.js +1 -0
- package/dist/bellhop-core/{p-Dn-MvAk9.js → p-CKTtXT2O.js} +1 -1
- package/dist/bellhop-core/p-CMKOFHIa.js +1 -0
- package/dist/bellhop-core/p-Xi3uD33F.js +1 -0
- package/dist/bellhop-core/p-a57034cf.entry.js +1 -0
- package/dist/bellhop-core/p-a925a3d8.entry.js +1 -0
- package/dist/bellhop-core/p-abf0f15d.entry.js +1 -0
- package/dist/bellhop-core/p-b212b4c1.entry.js +1 -0
- package/dist/bellhop-core/p-b2380f56.entry.js +1 -0
- package/dist/bellhop-core/p-b333c85f.entry.js +1 -0
- package/dist/bellhop-core/p-b9d363b0.entry.js +1 -0
- package/dist/bellhop-core/p-b9d86b80.entry.js +1 -0
- package/dist/bellhop-core/p-baa76b6d.entry.js +1 -0
- package/dist/bellhop-core/p-bb11a7df.entry.js +1 -0
- package/dist/bellhop-core/p-bcc53e7e.entry.js +1 -0
- package/dist/bellhop-core/p-c0513194.entry.js +1 -0
- package/dist/bellhop-core/p-c1eed46c.entry.js +1 -0
- package/dist/bellhop-core/p-c2440a5a.entry.js +1 -0
- package/dist/bellhop-core/p-c338d5ed.entry.js +1 -0
- package/dist/bellhop-core/p-c4cd8445.entry.js +1 -0
- package/dist/bellhop-core/p-cd404c53.entry.js +1 -0
- package/dist/bellhop-core/p-d2fdf27a.entry.js +1 -0
- package/dist/bellhop-core/p-d89a2316.entry.js +1 -0
- package/dist/bellhop-core/p-d9903fd1.entry.js +1 -0
- package/dist/bellhop-core/p-df86ac00.entry.js +1 -0
- package/dist/bellhop-core/p-dfc61397.entry.js +1 -0
- package/dist/bellhop-core/p-e02bdcfb.entry.js +1 -0
- package/dist/bellhop-core/p-e6ad9a10.entry.js +1 -0
- package/dist/bellhop-core/p-e86b4fbf.entry.js +1 -0
- package/dist/bellhop-core/p-eed85b08.entry.js +1 -0
- package/dist/bellhop-core/p-f0a47a26.entry.js +1 -0
- package/dist/bellhop-core/p-f46e818f.entry.js +1 -0
- package/dist/bellhop-core/p-f6c8568f.entry.js +1 -0
- package/dist/bellhop-core/p-f784164a.entry.js +1 -0
- package/dist/bellhop-core/p-f8d47699.entry.js +1 -0
- package/dist/bellhop-core/{p-1323f446.entry.js → p-f8dce3b6.entry.js} +1 -1
- package/dist/bellhop-core/p-f9962334.entry.js +1 -0
- package/dist/bellhop-core/p-fb897d66.entry.js +1 -0
- package/dist/cjs/bellhop-core.cjs.js +1 -1
- package/dist/cjs/bh-accordion-item.cjs.entry.js +4 -3
- package/dist/cjs/bh-accordion.cjs.entry.js +3 -2
- package/dist/cjs/bh-activity-feed_2.cjs.entry.js +174 -0
- package/dist/cjs/bh-alert.cjs.entry.js +4 -3
- package/dist/cjs/bh-appbar.cjs.entry.js +57 -11
- package/dist/cjs/bh-autocomplete-menu.cjs.entry.js +3 -2
- package/dist/cjs/bh-avatar-add.cjs.entry.js +4 -3
- package/dist/cjs/bh-avatar-stacked.cjs.entry.js +4 -3
- package/dist/cjs/bh-avatar.cjs.entry.js +6 -5
- package/dist/cjs/bh-badge-dot_2.cjs.entry.js +8 -7
- package/dist/cjs/bh-badge.cjs.entry.js +6 -5
- package/dist/cjs/bh-banner.cjs.entry.js +5 -4
- package/dist/cjs/bh-bar-chart.cjs.entry.js +5 -4
- package/dist/cjs/bh-breadcrumbs.cjs.entry.js +16 -5
- package/dist/cjs/bh-button-icon_2.cjs.entry.js +5 -4
- package/dist/cjs/bh-button.cjs.entry.js +5 -4
- package/dist/cjs/bh-card-content.cjs.entry.js +4 -3
- package/dist/cjs/bh-card-footer.cjs.entry.js +4 -3
- package/dist/cjs/bh-card-header.cjs.entry.js +4 -3
- package/dist/cjs/bh-card.cjs.entry.js +4 -3
- package/dist/cjs/bh-chart-tooltip.cjs.entry.js +5 -4
- package/dist/cjs/bh-chat-message.cjs.entry.js +5 -4
- package/dist/cjs/bh-chat-reaction.cjs.entry.js +5 -4
- package/dist/cjs/bh-checkbox.cjs.entry.js +3 -2
- package/dist/cjs/bh-checklist-task-group_3.cjs.entry.js +6 -5
- package/dist/cjs/bh-close-button.cjs.entry.js +1 -1
- package/dist/cjs/bh-command-bar.cjs.entry.js +309 -0
- package/dist/cjs/bh-container-footer.cjs.entry.js +4 -3
- package/dist/cjs/bh-container.cjs.entry.js +4 -3
- package/dist/cjs/bh-credit-card.cjs.entry.js +4 -3
- package/dist/cjs/bh-data-grid-body.cjs.entry.js +3 -2
- package/dist/cjs/bh-data-grid-change-preview.cjs.entry.js +3 -2
- package/dist/cjs/bh-data-grid-filter-builder.cjs.entry.js +3 -2
- package/dist/cjs/bh-data-grid-footer.cjs.entry.js +4 -3
- package/dist/cjs/bh-data-grid-header.cjs.entry.js +3 -2
- package/dist/cjs/bh-data-grid-toolbar.cjs.entry.js +4 -3
- package/dist/cjs/bh-data-grid.cjs.entry.js +4 -3
- package/dist/cjs/bh-date-picker-content.cjs.entry.js +6 -5
- package/dist/cjs/bh-date-picker.cjs.entry.js +6 -5
- package/dist/cjs/bh-date-range-picker-content.cjs.entry.js +5 -4
- package/dist/cjs/bh-date-range-picker.cjs.entry.js +7 -6
- package/dist/cjs/bh-divider.cjs.entry.js +4 -3
- package/dist/cjs/bh-dropdown-menu.cjs.entry.js +1 -1
- package/dist/cjs/bh-dropdown.cjs.entry.js +13 -4
- package/dist/cjs/bh-emoji-picker.cjs.entry.js +1 -1
- package/dist/cjs/bh-empty-state_2.cjs.entry.js +6 -5
- package/dist/cjs/bh-featured-icon.cjs.entry.js +4 -3
- package/dist/cjs/bh-gauge-chart.cjs.entry.js +5 -4
- package/dist/cjs/bh-guided-checklist.cjs.entry.js +5 -4
- package/dist/cjs/bh-html-editor-bubble-menu_2.cjs.entry.js +8 -7
- package/dist/cjs/bh-html-editor.cjs.entry.js +5 -4
- package/dist/cjs/bh-illustrations.cjs.entry.js +4 -3
- package/dist/cjs/bh-inline-cta.cjs.entry.js +5 -4
- package/dist/cjs/bh-input-autocomplete.cjs.entry.js +7 -6
- package/dist/cjs/bh-input-number.cjs.entry.js +5 -4
- package/dist/cjs/bh-input-password.cjs.entry.js +6 -5
- package/dist/cjs/bh-input-text.cjs.entry.js +5 -4
- package/dist/cjs/bh-input-verification.cjs.entry.js +4 -3
- package/dist/cjs/bh-kbd.cjs.entry.js +34 -0
- package/dist/cjs/bh-label_2.cjs.entry.js +5 -4
- package/dist/cjs/bh-line-chart.cjs.entry.js +5 -4
- package/dist/cjs/bh-logo-box_2.cjs.entry.js +8 -7
- package/dist/cjs/bh-menu_2.cjs.entry.js +4 -3
- package/dist/cjs/bh-modal-actions.cjs.entry.js +4 -3
- package/dist/cjs/bh-modal-header.cjs.entry.js +7 -6
- package/dist/cjs/bh-modal.cjs.entry.js +4 -3
- package/dist/cjs/bh-month-picker-content.cjs.entry.js +4 -3
- package/dist/cjs/bh-month-picker.cjs.entry.js +6 -5
- package/dist/cjs/bh-multi-select.cjs.entry.js +8 -7
- package/dist/cjs/bh-notification-center.cjs.entry.js +210 -0
- package/dist/cjs/bh-page-header.cjs.entry.js +4 -3
- package/dist/cjs/bh-page-navigation-child.cjs.entry.js +4 -3
- package/dist/cjs/bh-page-navigation-multi-level_2.cjs.entry.js +7 -6
- package/dist/cjs/bh-page-navigation.cjs.entry.js +4 -3
- package/dist/cjs/bh-pagination_2.cjs.entry.js +10 -9
- package/dist/cjs/bh-picker-menu.cjs.entry.js +3 -2
- package/dist/cjs/bh-pie-chart.cjs.entry.js +6 -5
- package/dist/cjs/bh-pivot-grid-field-chooser.cjs.entry.js +5 -4
- package/dist/cjs/bh-pivot-grid.cjs.entry.js +20 -19
- package/dist/cjs/bh-popover.cjs.entry.js +3 -2
- package/dist/cjs/bh-product-switcher.cjs.entry.js +3 -2
- package/dist/cjs/bh-progress-bar.cjs.entry.js +7 -6
- package/dist/cjs/bh-progress-ring.cjs.entry.js +1 -1
- package/dist/cjs/bh-property-switcher.cjs.entry.js +22 -5
- package/dist/cjs/bh-radar-chart.cjs.entry.js +5 -4
- package/dist/cjs/bh-radio-button.cjs.entry.js +3 -2
- package/dist/cjs/bh-radio-group.cjs.entry.js +4 -3
- package/dist/cjs/bh-range-slider.cjs.entry.js +4 -3
- package/dist/cjs/bh-section-footer.cjs.entry.js +4 -3
- package/dist/cjs/bh-section-header.cjs.entry.js +4 -3
- package/dist/cjs/bh-selection-group-item.cjs.entry.js +3 -2
- package/dist/cjs/bh-selection-group.cjs.entry.js +4 -3
- package/dist/cjs/bh-side-panel-footer.cjs.entry.js +1 -1
- package/dist/cjs/bh-side-panel-header.cjs.entry.js +1 -1
- package/dist/cjs/bh-sidebar.cjs.entry.js +19 -5
- package/dist/cjs/bh-stepper.cjs.entry.js +3 -2
- package/dist/cjs/bh-tab-item.cjs.entry.js +5 -4
- package/dist/cjs/bh-table-header.cjs.entry.js +4 -3
- package/dist/cjs/bh-tabs.cjs.entry.js +4 -3
- package/dist/cjs/bh-tag-group.cjs.entry.js +4 -3
- package/dist/cjs/bh-tag-input.cjs.entry.js +5 -4
- package/dist/cjs/bh-textarea.cjs.entry.js +5 -4
- package/dist/cjs/bh-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/bh-toast.cjs.entry.js +5 -4
- package/dist/cjs/bh-toggle.cjs.entry.js +4 -3
- package/dist/cjs/bh-trend-chart.cjs.entry.js +5 -4
- package/dist/cjs/{component-error-handler-C4vfF_Qu.js → component-error-handler-BxXlGq4E.js} +1 -1
- package/dist/cjs/error-boundary-fNUNT0lE.js +75 -0
- package/dist/cjs/hotkeys-BzAUI8Zg.js +113 -0
- package/dist/cjs/index-B6sArKsK.js +20 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{error-boundary-Bf7TcT4U.js → logger-DZionBgs.js} +0 -71
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/bh-accordion/bh-accordion-item/bh-accordion-item.js +1 -1
- package/dist/collection/components/bh-activity-feed/bh-activity-feed.css +8 -0
- package/dist/collection/components/bh-activity-feed/bh-activity-feed.js +29 -2
- package/dist/collection/components/bh-appbar/bh-appbar.css +28 -1
- package/dist/collection/components/bh-appbar/bh-appbar.js +220 -9
- package/dist/collection/components/bh-appbar/bh-notification-center/bh-notification-center.css +118 -0
- package/dist/collection/components/bh-appbar/bh-notification-center/bh-notification-center.js +513 -0
- package/dist/collection/components/bh-avatar/bh-avatar-add/bh-avatar-add.js +1 -1
- package/dist/collection/components/bh-avatar/bh-avatar-stacked/bh-avatar-stacked.js +1 -1
- package/dist/collection/components/bh-avatar/bh-avatar.css +8 -2
- package/dist/collection/components/bh-avatar/bh-avatar.js +2 -2
- package/dist/collection/components/bh-badge/bh-badge-dot/bh-badge-dot.js +1 -1
- package/dist/collection/components/bh-badge/bh-badge.js +2 -2
- package/dist/collection/components/bh-banner/bh-banner.js +2 -2
- package/dist/collection/components/bh-breadcrumbs/bh-breadcrumbs.css +3 -1
- package/dist/collection/components/bh-breadcrumbs/bh-breadcrumbs.js +14 -3
- package/dist/collection/components/bh-button/bh-button-icon/bh-button-icon.js +1 -1
- package/dist/collection/components/bh-button/bh-button.js +1 -1
- package/dist/collection/components/bh-card/bh-card-content/bh-card-content.js +1 -1
- package/dist/collection/components/bh-card/bh-card-footer/bh-card-footer.js +1 -1
- package/dist/collection/components/bh-card/bh-card-header/bh-card-header.js +1 -1
- package/dist/collection/components/bh-card/bh-card.js +1 -1
- package/dist/collection/components/bh-chart/bh-bar-chart/bh-bar-chart.js +2 -2
- package/dist/collection/components/bh-chart/bh-chart-tooltip/bh-chart-tooltip.js +2 -2
- package/dist/collection/components/bh-chart/bh-gauge-chart/bh-gauge-chart.js +2 -2
- package/dist/collection/components/bh-chart/bh-line-chart/bh-line-chart.js +2 -2
- package/dist/collection/components/bh-chart/bh-pie-chart/bh-pie-chart.js +3 -3
- package/dist/collection/components/bh-chart/bh-progress-bar/bh-progress-bar.js +4 -4
- package/dist/collection/components/bh-chart/bh-radar-chart/bh-radar-chart.js +2 -2
- package/dist/collection/components/bh-chart/bh-trend-chart/bh-trend-chart.js +2 -2
- package/dist/collection/components/bh-chat/bh-chat-message/bh-chat-message.js +2 -2
- package/dist/collection/components/bh-chat/bh-chat-reaction/bh-chat-reaction.js +2 -2
- package/dist/collection/components/bh-close-button/bh-close-button.js +1 -1
- package/dist/collection/components/bh-command-bar/bh-command-bar.css +181 -0
- package/dist/collection/components/bh-command-bar/bh-command-bar.figma.js +9 -0
- package/dist/collection/components/bh-command-bar/bh-command-bar.js +663 -0
- package/dist/collection/components/bh-container/bh-container-footer/bh-container-footer.js +1 -1
- package/dist/collection/components/bh-container/bh-container.js +1 -1
- package/dist/collection/components/bh-credit-card/bh-credit-card.js +1 -1
- package/dist/collection/components/bh-data-grid/bh-data-grid-footer.js +1 -1
- package/dist/collection/components/bh-data-grid/bh-data-grid-toolbar.js +1 -1
- package/dist/collection/components/bh-divider/bh-divider.js +1 -1
- package/dist/collection/components/bh-dropdown/bh-dropdown-menu/bh-dropdown-menu.js +1 -1
- package/dist/collection/components/bh-dropdown/bh-dropdown.js +29 -1
- package/dist/collection/components/bh-emoji-picker/bh-emoji-picker.js +1 -1
- package/dist/collection/components/bh-empty-state/bh-empty-state.js +1 -1
- package/dist/collection/components/bh-fab/bh-fab.js +2 -2
- package/dist/collection/components/bh-featured-icon/bh-featured-icon.js +1 -1
- package/dist/collection/components/bh-feed-item/bh-feed-item.css +9 -2
- package/dist/collection/components/bh-feed-item/bh-feed-item.js +81 -4
- package/dist/collection/components/bh-guided-checklist/bh-guided-checklist.js +1 -1
- package/dist/collection/components/bh-html-editor/bh-html-editor-bubble-menu/bh-html-editor-bubble-menu.js +3 -3
- package/dist/collection/components/bh-html-editor/bh-html-editor-toolbar/bh-html-editor-toolbar.js +1 -1
- package/dist/collection/components/bh-html-editor/bh-html-editor.js +2 -2
- package/dist/collection/components/bh-illustrations/bh-illustrations.js +1 -1
- package/dist/collection/components/bh-inline-cta/bh-inline-cta.js +2 -2
- package/dist/collection/components/bh-input/bh-input-autocomplete/bh-input-autocomplete.js +3 -3
- package/dist/collection/components/bh-input/bh-input-number/bh-input-number.js +2 -2
- package/dist/collection/components/bh-input/bh-input-password/bh-input-password.js +3 -3
- package/dist/collection/components/bh-input/bh-input-text/bh-input-text.js +2 -2
- package/dist/collection/components/bh-input/bh-input-verification/bh-input-verification.js +1 -1
- package/dist/collection/components/bh-input/bh-tag-input/bh-tag-input.js +2 -2
- package/dist/collection/components/bh-input/bh-textarea/bh-textarea.js +2 -2
- package/dist/collection/components/bh-kbd/bh-kbd.css +33 -0
- package/dist/collection/components/bh-kbd/bh-kbd.figma.js +11 -0
- package/dist/collection/components/bh-kbd/bh-kbd.js +78 -0
- package/dist/collection/components/bh-logo-box/bh-logo-box.js +2 -2
- package/dist/collection/components/bh-modal/bh-modal-actions/bh-modal-actions.js +1 -1
- package/dist/collection/components/bh-modal/bh-modal-header/bh-modal-header.js +4 -4
- package/dist/collection/components/bh-multi-select/bh-multi-select.js +3 -3
- package/dist/collection/components/bh-page-header/bh-page-header.js +2 -2
- package/dist/collection/components/bh-page-navigation/bh-page-navigation-child/bh-page-navigation-child.js +1 -1
- package/dist/collection/components/bh-page-navigation/bh-page-navigation-multi-level/bh-page-navigation-multi-level.js +2 -2
- package/dist/collection/components/bh-page-navigation/bh-page-navigation-single-level/bh-page-navigation-single-level.js +1 -1
- package/dist/collection/components/bh-page-navigation/bh-page-navigation.js +1 -1
- package/dist/collection/components/bh-pagination/bh-pagination.js +2 -2
- package/dist/collection/components/bh-picker/bh-date-picker/bh-date-picker-content/bh-date-picker-content.js +3 -3
- package/dist/collection/components/bh-picker/bh-date-picker/bh-date-picker.js +3 -3
- package/dist/collection/components/bh-picker/bh-date-range-picker/bh-date-range-picker-content/bh-date-range-picker-content.js +2 -2
- package/dist/collection/components/bh-picker/bh-date-range-picker/bh-date-range-picker.js +4 -4
- package/dist/collection/components/bh-picker/bh-month-picker/bh-month-picker-content/bh-month-picker-content.js +1 -1
- package/dist/collection/components/bh-picker/bh-month-picker/bh-month-picker.js +3 -3
- package/dist/collection/components/bh-pivot-grid/bh-pivot-grid-field-chooser/bh-pivot-grid-field-chooser.js +2 -2
- package/dist/collection/components/bh-pivot-grid/bh-pivot-grid.js +16 -16
- package/dist/collection/components/bh-progress-ring/bh-progress-ring.js +1 -1
- package/dist/collection/components/bh-property-switcher/bh-property-switcher.js +20 -4
- package/dist/collection/components/bh-radio-group/bh-radio-group.js +1 -1
- package/dist/collection/components/bh-range-slider/bh-range-slider.js +1 -1
- package/dist/collection/components/bh-section-footer/bh-section-footer.js +1 -1
- package/dist/collection/components/bh-section-header/bh-section-header.js +1 -1
- package/dist/collection/components/bh-select/bh-select.js +4 -4
- package/dist/collection/components/bh-selection-group/bh-selection-group.js +1 -1
- package/dist/collection/components/bh-side-panel/bh-side-panel-footer/bh-side-panel-footer.js +1 -1
- package/dist/collection/components/bh-side-panel/bh-side-panel-header/bh-side-panel-header.js +1 -1
- package/dist/collection/components/bh-sidebar/bh-nav-item/bh-nav-item.js +2 -2
- package/dist/collection/components/bh-sidebar/bh-sidebar.js +79 -3
- package/dist/collection/components/bh-skeleton-loader/bh-skeleton-loader.js +1 -1
- package/dist/collection/components/bh-table-header/bh-table-header.js +1 -1
- package/dist/collection/components/bh-tabs/bh-tab-item/bh-tab-item.js +2 -2
- package/dist/collection/components/bh-tabs/bh-tabs.js +1 -1
- package/dist/collection/components/bh-tag/bh-tag-group/bh-tag-group.js +1 -1
- package/dist/collection/components/bh-tag/bh-tag.js +2 -2
- package/dist/collection/components/bh-toast/bh-toast.js +2 -2
- package/dist/collection/components/bh-toast-container/bh-toast-container.js +1 -1
- package/dist/collection/components/bh-toggle/bh-toggle.js +1 -1
- package/dist/collection/components/bh-tooltip/bh-tooltip.js +1 -1
- package/dist/collection/components/index.js +5 -0
- package/dist/collection/utils/hotkeys.js +107 -0
- package/dist/collection/utils/index.js +4 -0
- package/dist/esm/bellhop-core.js +1 -1
- package/dist/esm/bh-accordion-item.entry.js +3 -2
- package/dist/esm/bh-accordion.entry.js +2 -1
- package/dist/esm/bh-activity-feed_2.entry.js +171 -0
- package/dist/esm/bh-alert.entry.js +3 -2
- package/dist/esm/bh-appbar.entry.js +56 -10
- package/dist/esm/bh-autocomplete-menu.entry.js +2 -1
- package/dist/esm/bh-avatar-add.entry.js +3 -2
- package/dist/esm/bh-avatar-stacked.entry.js +3 -2
- package/dist/esm/bh-avatar.entry.js +5 -4
- package/dist/esm/bh-badge-dot_2.entry.js +6 -5
- package/dist/esm/bh-badge.entry.js +5 -4
- package/dist/esm/bh-banner.entry.js +4 -3
- package/dist/esm/bh-bar-chart.entry.js +4 -3
- package/dist/esm/bh-breadcrumbs.entry.js +15 -4
- package/dist/esm/bh-button-icon_2.entry.js +3 -2
- package/dist/esm/bh-button.entry.js +4 -3
- package/dist/esm/bh-card-content.entry.js +3 -2
- package/dist/esm/bh-card-footer.entry.js +3 -2
- package/dist/esm/bh-card-header.entry.js +3 -2
- package/dist/esm/bh-card.entry.js +3 -2
- package/dist/esm/bh-chart-tooltip.entry.js +4 -3
- package/dist/esm/bh-chat-message.entry.js +4 -3
- package/dist/esm/bh-chat-reaction.entry.js +4 -3
- package/dist/esm/bh-checkbox.entry.js +2 -1
- package/dist/esm/bh-checklist-task-group_3.entry.js +5 -4
- package/dist/esm/bh-close-button.entry.js +1 -1
- package/dist/esm/bh-command-bar.entry.js +307 -0
- package/dist/esm/bh-container-footer.entry.js +3 -2
- package/dist/esm/bh-container.entry.js +3 -2
- package/dist/esm/bh-credit-card.entry.js +3 -2
- package/dist/esm/bh-data-grid-body.entry.js +2 -1
- package/dist/esm/bh-data-grid-change-preview.entry.js +2 -1
- package/dist/esm/bh-data-grid-filter-builder.entry.js +2 -1
- package/dist/esm/bh-data-grid-footer.entry.js +3 -2
- package/dist/esm/bh-data-grid-header.entry.js +2 -1
- package/dist/esm/bh-data-grid-toolbar.entry.js +3 -2
- package/dist/esm/bh-data-grid.entry.js +3 -2
- package/dist/esm/bh-date-picker-content.entry.js +5 -4
- package/dist/esm/bh-date-picker.entry.js +5 -4
- package/dist/esm/bh-date-range-picker-content.entry.js +4 -3
- package/dist/esm/bh-date-range-picker.entry.js +6 -5
- package/dist/esm/bh-divider.entry.js +3 -2
- package/dist/esm/bh-dropdown-menu.entry.js +1 -1
- package/dist/esm/bh-dropdown.entry.js +12 -3
- package/dist/esm/bh-emoji-picker.entry.js +1 -1
- package/dist/esm/bh-empty-state_2.entry.js +4 -3
- package/dist/esm/bh-featured-icon.entry.js +3 -2
- package/dist/esm/bh-gauge-chart.entry.js +4 -3
- package/dist/esm/bh-guided-checklist.entry.js +4 -3
- package/dist/esm/bh-html-editor-bubble-menu_2.entry.js +6 -5
- package/dist/esm/bh-html-editor.entry.js +4 -3
- package/dist/esm/bh-illustrations.entry.js +3 -2
- package/dist/esm/bh-inline-cta.entry.js +4 -3
- package/dist/esm/bh-input-autocomplete.entry.js +6 -5
- package/dist/esm/bh-input-number.entry.js +4 -3
- package/dist/esm/bh-input-password.entry.js +5 -4
- package/dist/esm/bh-input-text.entry.js +4 -3
- package/dist/esm/bh-input-verification.entry.js +3 -2
- package/dist/esm/bh-kbd.entry.js +32 -0
- package/dist/esm/bh-label_2.entry.js +3 -2
- package/dist/esm/bh-line-chart.entry.js +4 -3
- package/dist/esm/bh-logo-box_2.entry.js +6 -5
- package/dist/esm/bh-menu_2.entry.js +2 -1
- package/dist/esm/bh-modal-actions.entry.js +3 -2
- package/dist/esm/bh-modal-header.entry.js +6 -5
- package/dist/esm/bh-modal.entry.js +3 -2
- package/dist/esm/bh-month-picker-content.entry.js +3 -2
- package/dist/esm/bh-month-picker.entry.js +5 -4
- package/dist/esm/bh-multi-select.entry.js +7 -6
- package/dist/esm/bh-notification-center.entry.js +208 -0
- package/dist/esm/bh-page-header.entry.js +3 -2
- package/dist/esm/bh-page-navigation-child.entry.js +3 -2
- package/dist/esm/bh-page-navigation-multi-level_2.entry.js +5 -4
- package/dist/esm/bh-page-navigation.entry.js +3 -2
- package/dist/esm/bh-pagination_2.entry.js +8 -7
- package/dist/esm/bh-picker-menu.entry.js +2 -1
- package/dist/esm/bh-pie-chart.entry.js +5 -4
- package/dist/esm/bh-pivot-grid-field-chooser.entry.js +4 -3
- package/dist/esm/bh-pivot-grid.entry.js +19 -18
- package/dist/esm/bh-popover.entry.js +2 -1
- package/dist/esm/bh-product-switcher.entry.js +2 -1
- package/dist/esm/bh-progress-bar.entry.js +6 -5
- package/dist/esm/bh-progress-ring.entry.js +1 -1
- package/dist/esm/bh-property-switcher.entry.js +21 -4
- package/dist/esm/bh-radar-chart.entry.js +4 -3
- package/dist/esm/bh-radio-button.entry.js +2 -1
- package/dist/esm/bh-radio-group.entry.js +3 -2
- package/dist/esm/bh-range-slider.entry.js +3 -2
- package/dist/esm/bh-section-footer.entry.js +3 -2
- package/dist/esm/bh-section-header.entry.js +3 -2
- package/dist/esm/bh-selection-group-item.entry.js +2 -1
- package/dist/esm/bh-selection-group.entry.js +3 -2
- package/dist/esm/bh-side-panel-footer.entry.js +1 -1
- package/dist/esm/bh-side-panel-header.entry.js +1 -1
- package/dist/esm/bh-sidebar.entry.js +18 -4
- package/dist/esm/bh-stepper.entry.js +2 -1
- package/dist/esm/bh-tab-item.entry.js +4 -3
- package/dist/esm/bh-table-header.entry.js +3 -2
- package/dist/esm/bh-tabs.entry.js +3 -2
- package/dist/esm/bh-tag-group.entry.js +3 -2
- package/dist/esm/bh-tag-input.entry.js +4 -3
- package/dist/esm/bh-textarea.entry.js +4 -3
- package/dist/esm/bh-toast-container.entry.js +1 -1
- package/dist/esm/bh-toast.entry.js +4 -3
- package/dist/esm/bh-toggle.entry.js +3 -2
- package/dist/esm/bh-trend-chart.entry.js +4 -3
- package/dist/esm/{component-error-handler-BVWQSuxn.js → component-error-handler-bgLpf9Pn.js} +1 -1
- package/dist/esm/error-boundary-afpK3NgJ.js +70 -0
- package/dist/esm/hotkeys-CBTS9Vhx.js +109 -0
- package/dist/esm/index-CTHvNfIu.js +20 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{error-boundary-YLeLKAYJ.js → logger-CMKOFHIa.js} +1 -68
- package/dist/locales/bh-appbar/de.json +4 -1
- package/dist/locales/bh-appbar/en.json +4 -1
- package/dist/locales/bh-appbar/es.json +4 -1
- package/dist/locales/bh-appbar/fr.json +4 -1
- package/dist/locales/bh-appbar/ja.json +4 -1
- package/dist/locales/bh-appbar/pt.json +4 -1
- package/dist/locales/bh-appbar/ru.json +4 -1
- package/dist/locales/bh-appbar/zh.json +4 -1
- package/dist/locales/bh-command-bar/de.json +13 -0
- package/dist/locales/bh-command-bar/en.json +13 -0
- package/dist/locales/bh-command-bar/es.json +13 -0
- package/dist/locales/bh-command-bar/fr.json +13 -0
- package/dist/locales/bh-command-bar/ja.json +13 -0
- package/dist/locales/bh-command-bar/pt.json +13 -0
- package/dist/locales/bh-command-bar/ru.json +13 -0
- package/dist/locales/bh-command-bar/zh.json +13 -0
- package/dist/types/components/bh-activity-feed/bh-activity-feed.d.ts +6 -0
- package/dist/types/components/bh-appbar/bh-appbar.d.ts +38 -0
- package/dist/types/components/bh-appbar/bh-notification-center/bh-notification-center.d.ts +108 -0
- package/dist/types/components/bh-breadcrumbs/bh-breadcrumbs.d.ts +8 -0
- package/dist/types/components/bh-command-bar/bh-command-bar.d.ts +131 -0
- package/dist/types/components/bh-command-bar/bh-command-bar.figma.d.ts +1 -0
- package/dist/types/components/bh-dropdown/bh-dropdown.d.ts +4 -0
- package/dist/types/components/bh-feed-item/bh-feed-item.d.ts +15 -0
- package/dist/types/components/bh-kbd/bh-kbd.d.ts +13 -0
- package/dist/types/components/bh-kbd/bh-kbd.figma.d.ts +1 -0
- package/dist/types/components/bh-property-switcher/bh-property-switcher.d.ts +2 -0
- package/dist/types/components/bh-sidebar/bh-sidebar.d.ts +14 -1
- package/dist/types/components/index.d.ts +3 -0
- package/dist/types/components.d.ts +541 -4
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/hotkeys.d.ts +23 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/hydrate/index.js +1021 -189
- package/hydrate/index.mjs +1021 -189
- package/llms.txt +4251 -286
- package/package.json +1 -1
- package/vscode-data.json +215 -0
- package/components/p-B7i48CAz.js +0 -1
- package/components/p-Bk-ipvH3.js +0 -1
- package/components/p-Cy98fCjm.js +0 -1
- package/components/p-i7ZvTRXV.js +0 -1
- package/dist/bellhop-core/p-008932dc.entry.js +0 -1
- package/dist/bellhop-core/p-03e002af.entry.js +0 -1
- package/dist/bellhop-core/p-062955a0.entry.js +0 -1
- package/dist/bellhop-core/p-0705eb78.entry.js +0 -1
- package/dist/bellhop-core/p-0a1548b0.entry.js +0 -1
- package/dist/bellhop-core/p-0a758a65.entry.js +0 -1
- package/dist/bellhop-core/p-0b3a286d.entry.js +0 -1
- package/dist/bellhop-core/p-0e60f7f5.entry.js +0 -1
- package/dist/bellhop-core/p-105d9352.entry.js +0 -1
- package/dist/bellhop-core/p-11eec77c.entry.js +0 -1
- package/dist/bellhop-core/p-1334408b.entry.js +0 -1
- package/dist/bellhop-core/p-141d68b7.entry.js +0 -1
- package/dist/bellhop-core/p-164db491.entry.js +0 -1
- package/dist/bellhop-core/p-170c4a62.entry.js +0 -1
- package/dist/bellhop-core/p-19739563.entry.js +0 -1
- package/dist/bellhop-core/p-1cfa274f.entry.js +0 -1
- package/dist/bellhop-core/p-1ddb2ef9.entry.js +0 -1
- package/dist/bellhop-core/p-22243198.entry.js +0 -1
- package/dist/bellhop-core/p-23acfc6a.entry.js +0 -1
- package/dist/bellhop-core/p-277693e6.entry.js +0 -1
- package/dist/bellhop-core/p-283eb6ee.entry.js +0 -1
- package/dist/bellhop-core/p-298d6782.entry.js +0 -1
- package/dist/bellhop-core/p-30f1e109.entry.js +0 -1
- package/dist/bellhop-core/p-31e952ed.entry.js +0 -1
- package/dist/bellhop-core/p-3254b058.entry.js +0 -1
- package/dist/bellhop-core/p-332a6b0d.entry.js +0 -1
- package/dist/bellhop-core/p-43c97303.entry.js +0 -1
- package/dist/bellhop-core/p-4b8fe1fa.entry.js +0 -1
- package/dist/bellhop-core/p-4d8b9186.entry.js +0 -1
- package/dist/bellhop-core/p-50b95dc8.entry.js +0 -1
- package/dist/bellhop-core/p-53006e0e.entry.js +0 -1
- package/dist/bellhop-core/p-53683664.entry.js +0 -1
- package/dist/bellhop-core/p-53dc8f16.entry.js +0 -1
- package/dist/bellhop-core/p-54d147b9.entry.js +0 -1
- package/dist/bellhop-core/p-56b090e1.entry.js +0 -1
- package/dist/bellhop-core/p-58eae3e6.entry.js +0 -1
- package/dist/bellhop-core/p-5d43f80b.entry.js +0 -1
- package/dist/bellhop-core/p-61aeccd7.entry.js +0 -1
- package/dist/bellhop-core/p-63303380.entry.js +0 -1
- package/dist/bellhop-core/p-63af6f45.entry.js +0 -1
- package/dist/bellhop-core/p-640aaf14.entry.js +0 -1
- package/dist/bellhop-core/p-6632ba13.entry.js +0 -1
- package/dist/bellhop-core/p-6807b97e.entry.js +0 -1
- package/dist/bellhop-core/p-6a725cbe.entry.js +0 -1
- package/dist/bellhop-core/p-6bfb6425.entry.js +0 -1
- package/dist/bellhop-core/p-6c4eb165.entry.js +0 -1
- package/dist/bellhop-core/p-72cd0a98.entry.js +0 -1
- package/dist/bellhop-core/p-74972e2e.entry.js +0 -1
- package/dist/bellhop-core/p-77a7967d.entry.js +0 -1
- package/dist/bellhop-core/p-79bc0c14.entry.js +0 -1
- package/dist/bellhop-core/p-7f2736ab.entry.js +0 -1
- package/dist/bellhop-core/p-83024333.entry.js +0 -1
- package/dist/bellhop-core/p-8c01d55f.entry.js +0 -1
- package/dist/bellhop-core/p-8d4654ea.entry.js +0 -1
- package/dist/bellhop-core/p-9429002f.entry.js +0 -1
- package/dist/bellhop-core/p-956ca990.entry.js +0 -1
- package/dist/bellhop-core/p-9b0d2d1d.entry.js +0 -1
- package/dist/bellhop-core/p-YLeLKAYJ.js +0 -1
- package/dist/bellhop-core/p-a0005573.entry.js +0 -1
- package/dist/bellhop-core/p-a26f1ec0.entry.js +0 -1
- package/dist/bellhop-core/p-a42cca95.entry.js +0 -1
- package/dist/bellhop-core/p-a7153865.entry.js +0 -1
- package/dist/bellhop-core/p-a7608d57.entry.js +0 -1
- package/dist/bellhop-core/p-a94d36ae.entry.js +0 -1
- package/dist/bellhop-core/p-a9644488.entry.js +0 -1
- package/dist/bellhop-core/p-aac0f3c1.entry.js +0 -1
- package/dist/bellhop-core/p-aae7e90e.entry.js +0 -1
- package/dist/bellhop-core/p-ac2d706c.entry.js +0 -1
- package/dist/bellhop-core/p-b21105d4.entry.js +0 -1
- package/dist/bellhop-core/p-b7995c47.entry.js +0 -1
- package/dist/bellhop-core/p-bacf8b19.entry.js +0 -1
- package/dist/bellhop-core/p-bf2f5dbd.entry.js +0 -1
- package/dist/bellhop-core/p-c10aff52.entry.js +0 -1
- package/dist/bellhop-core/p-c30fcfcb.entry.js +0 -1
- package/dist/bellhop-core/p-c581c876.entry.js +0 -1
- package/dist/bellhop-core/p-c97c166b.entry.js +0 -1
- package/dist/bellhop-core/p-cb19b35b.entry.js +0 -1
- package/dist/bellhop-core/p-cb1dde19.entry.js +0 -1
- package/dist/bellhop-core/p-cf8c9d85.entry.js +0 -1
- package/dist/bellhop-core/p-d3816b20.entry.js +0 -1
- package/dist/bellhop-core/p-d4107350.entry.js +0 -1
- package/dist/bellhop-core/p-d59fdc08.entry.js +0 -1
- package/dist/bellhop-core/p-d77016ec.entry.js +0 -1
- package/dist/bellhop-core/p-dd1e6138.entry.js +0 -1
- package/dist/bellhop-core/p-dd6f2996.entry.js +0 -1
- package/dist/bellhop-core/p-e082bce2.entry.js +0 -1
- package/dist/bellhop-core/p-e0e28b1f.entry.js +0 -1
- package/dist/bellhop-core/p-e4a47861.entry.js +0 -1
- package/dist/bellhop-core/p-e74a03e3.entry.js +0 -1
- package/dist/bellhop-core/p-e9168244.entry.js +0 -1
- package/dist/bellhop-core/p-ea1fe131.entry.js +0 -1
- package/dist/bellhop-core/p-ecf1b0c4.entry.js +0 -1
- package/dist/bellhop-core/p-f16e07ca.entry.js +0 -1
- package/dist/bellhop-core/p-f2d2abb2.entry.js +0 -1
- package/dist/bellhop-core/p-f8f6e900.entry.js +0 -1
- package/dist/bellhop-core/p-fbdeab71.entry.js +0 -1
- package/dist/bellhop-core/p-fcb058cf.entry.js +0 -1
- package/dist/cjs/bh-activity-feed.cjs.entry.js +0 -71
- package/dist/cjs/bh-feed-item.cjs.entry.js +0 -82
- package/dist/esm/bh-activity-feed.entry.js +0 -69
- package/dist/esm/bh-feed-item.entry.js +0 -80
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as i,c as e,h as r,d as a,t as o}from"./p-YZi6LqIt.js";import{d as n}from"./p-B2KPN863.js";import{d as s}from"./p-Bf_iTZDv.js";import{a as h,u as l}from"./p-L4Y2hq_b.js";import{a as c,b as d,M as u}from"./p-DlPm3fIV.js";import{c as p,r as b,m,M as g}from"./p-BJXjqxlX.js";import{c as f}from"./p-YdVz1TeW.js";import{B as v,r as y}from"./p-BNVOtH-1.js";import{b as w}from"./p-Bam7V_bL.js";const x=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bhInput=e(this,"bhInput"),this.bhChange=e(this,"bhChange"),this.bhFocus=e(this,"bhFocus"),this.bhBlur=e(this,"bhBlur"),this.bhHelpClick=e(this,"bhHelpClick"),this.bhValidityChange=e(this,"bhValidityChange"),this.internals=this.attachInternals()}internals;logger=p("bh-input-text");focusState=f();inputEl;i18nUnsubscribe;label="";placeholder="";hintText="";showLabel=!0;showHintText=!0;showHelpIcon=!1;showLeadingIcon=!1;showTrailingIcon=!1;error=!1;disabled=!1;required=!1;helpIconTooltip="Help";leadingIcon="mail";trailingIcon="search";value="";name="";defaultValue="";validationMessage="";type="text";width="";readOnly=!1;size="md";state="default";ariaDescribedBy;ariaErrorMessage;ariaDetails;autocomplete="off";autoCorrect="off";autocapitalize="none";multiline=!1;rows=3;ariaRowCount=null;ariaRowIndex=null;ariaAutocomplete="none";ariaActiveDescendant;ariaOwns;focusVersion=0;_i18nVersion=0;isDirty=!1;isTouched=!1;bhInput;bhChange;bhFocus;bhBlur;bhHelpClick;bhValidityChange;get safeWidth(){if(!this.width)return"";const t=c(this.width,50);return t.valid?t.value:(b("bh-input-text",new Error(`Invalid width: ${t.errors.map((t=>t.message)).join(", ")}`)),"")}handleValueChange(t){this.inputEl&&this.inputEl.value!==t&&(this.inputEl.value=t),h(this),l(this.internals,this.inputEl,this.validationMessage)}componentWillLoad(){this.focusState.onChange((()=>{this.focusVersion++})),this.i18nUnsubscribe=v.onLocaleChange((()=>{this._i18nVersion++}))}componentDidCatch(t){this.logger.error("Component error caught",t instanceof Error?t:new Error(String(t))),m.increment(g.COMPONENT_ERROR,{component:"bh-input-text",error_type:t instanceof Error?t.name:"unknown"}),b("bh-input-text",t)}handleInput=t=>{const i=d(t.target.value,u);this.value=i.value,i.valid||b("bh-input-text",new Error(i.errors.map((t=>t.message)).join(", "))),this.isDirty||(this.isDirty=!0),this.bhInput.emit(this.value),h(this),l(this.internals,this.inputEl,this.validationMessage)};handleChange=()=>{this.bhChange.emit(this.value)};handleKeyDown=()=>{};handleValidityChange=()=>{this.inputEl&&this.bhValidityChange.emit(this.inputEl.validity)};componentDidLoad(){h(this),l(this.internals,this.inputEl,this.validationMessage),this.inputEl&&this.inputEl.addEventListener("invalid",this.handleValidityChange)}disconnectedCallback(){this.inputEl&&this.inputEl.removeEventListener("invalid",this.handleValidityChange),this.i18nUnsubscribe?.()}formResetCallback(){this.value=this.defaultValue,this.inputEl&&(this.inputEl.value=this.defaultValue),h(this),l(this.internals,this.inputEl)}handleFocus=t=>{this.isTouched=!0,this.focusState.handleFocus(t,(()=>this.bhFocus.emit()))};handleBlur=t=>{this.focusState.handleBlur(t,(()=>this.bhBlur.emit()))};handleMouseEnter=()=>{this.focusState.handleMouseEnter()};handleMouseLeave=()=>{this.focusState.handleMouseLeave()};handleHelpClick=()=>{this.bhHelpClick.emit()};render(){const t=w({base:"input-container",size:this.size,modifiers:{focused:this.focusState.isFocused,hover:this.focusState.isHovered&&!this.focusState.isFocused,error:this.error,disabled:this.disabled,"with-leading":this.showLeadingIcon}});return r(a,{key:"cfc175452fd7b3d81d6e0a181ca26f1859dd9a66"},r("div",{key:"b9e887f60b0bdc5cbcf85070045fd8770e3b2340",class:"input-wrapper",part:"wrapper",style:this.safeWidth?{width:this.safeWidth}:{}},r("bh-label",{key:"2c79f210fa7e0f9aeb7138dc53b44d6b026b8c9b",disabled:this.disabled,helpIconTooltip:y("bh-input-text","helpIconTooltip",this.helpIconTooltip,"Help"),label:this.showLabel?this.label:"",onBhHelpClick:this.handleHelpClick,required:this.required,showHelpIcon:this.showHelpIcon},r("div",{key:"f962246e449cc293c89d79ed9a177b51951ae174",class:t,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,part:"container"},r("div",{key:"4869423297c6b36c9e1e1d1b4b337293a181394e",class:"input-content"},this.showLeadingIcon&&r("span",{key:"75c6ff65c29d8604ea91c6568b05fd179f54fc25","aria-hidden":"true",class:"material-symbols-outlined leading-icon",part:"prefix"},this.leadingIcon),this.multiline?r("textarea",{"aria-atomic":"true","aria-busy":"false","aria-describedby":[this.showHintText&&this.hintText?"hint-text":"",this.ariaDescribedBy].filter(Boolean).join(" ")||void 0,"aria-details":this.ariaDetails,"aria-errormessage":this.ariaErrorMessage,"aria-invalid":this.error?"true":"false","aria-label":this.label,"aria-live":"polite","aria-multiline":"true","aria-readonly":String(this.readOnly),"aria-required":String(this.required),"aria-rowcount":this.ariaRowCount,"aria-rowindex":this.ariaRowIndex,autocapitalize:this.autocapitalize,autocomplete:this.autocomplete,autocorrect:this.autoCorrect,class:"input-element","data-dirty":String(this.isDirty),"data-touched":String(this.isTouched),disabled:this.disabled,name:this.name,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,part:"input",placeholder:this.placeholder,readOnly:this.readOnly,ref:t=>this.inputEl=t,required:this.required,rows:this.rows,value:this.value}):r("input",{"aria-activedescendant":this.ariaActiveDescendant,"aria-atomic":"true","aria-autocomplete":this.ariaAutocomplete,"aria-busy":"false","aria-describedby":[this.showHintText&&this.hintText?"hint-text":"",this.ariaDescribedBy].filter(Boolean).join(" ")||void 0,"aria-details":this.ariaDetails,"aria-errormessage":this.ariaErrorMessage,"aria-invalid":this.error?"true":"false","aria-label":this.label,"aria-live":"polite","aria-owns":this.ariaOwns,"aria-readonly":String(this.readOnly),"aria-required":String(this.required),autocapitalize:this.autocapitalize,autocomplete:this.autocomplete,autocorrect:this.autoCorrect,class:"input-element","data-dirty":String(this.isDirty),"data-touched":String(this.isTouched),disabled:this.disabled,name:this.name,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,part:"input",placeholder:this.placeholder,readOnly:this.readOnly,ref:t=>this.inputEl=t,required:this.required,type:this.type,value:this.value}),this.showTrailingIcon&&r("span",{key:"05facc68b88ba19e95d87f5c17a49007e2570d46","aria-hidden":"true",class:"material-symbols-outlined trailing-icon",part:"suffix"},this.trailingIcon)))),this.showHintText&&this.hintText&&r("div",{key:"06ed1c5553a700c49ff7188cae4e3fa70dbd9b33","aria-live":this.error?"assertive":"polite",class:{"hint-text":!0,"hint-error":this.error},id:"hint-text"},this.hintText)))}static get formAssociated(){return!0}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return'@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.5}}@layer bh-tokens,bh-base,bh-variants,bh-states,bh-utilities; @layer bh-tokens{:host{display:block;font-family:var(--font-inter);--bh-input-bg:var(--color-bg-primary);--bh-input-bg-disabled:var(--color-bg-secondary);--bh-input-color:var(--color-text-primary);--bh-input-color-placeholder:var(--color-text-tertiary);--bh-input-border-color:var(--color-border-primary);--bh-input-border-color-hover:var(--color-border-interactive);--bh-input-border-color-focus:var(--color-border-interactive);--bh-input-border-color-error:var(--color-border-error);--bh-input-border-radius:var(--radius-md);--bh-input-icon-color:var(--color-text-tertiary);--bh-input-icon-color-focus:var(--color-text-interactive);--bh-input-hint-color:var(--color-text-secondary);--bh-input-hint-error-color:var(--color-text-error)}}@layer bh-base{.input-wrapper{display:flex;flex-direction:column;gap:var(--spacing-sm);width:100%}.input-container{display:flex;align-items:center;gap:var(--spacing-md);padding:var(--spacing-sm);height:var(--bh-input-height-md);width:100%;background:var(--bh-input-bg);border:1px solid var(--bh-input-border-color);border-radius:var(--bh-input-border-radius);transition:border-color var(--animation-duration-normal) ease-in-out, box-shadow var(--animation-duration-normal) ease-in-out;cursor:text;box-sizing:border-box}.input-content{display:flex;align-items:center;gap:var(--spacing-md);flex:1;height:100%;min-width:0}.input-element{flex:1;height:100%;border:none;outline:none;background:transparent;font-family:inherit;font-weight:var(--weight-regular);font-size:var(--text-sm-size);line-height:var(--line-height-normal);color:var(--bh-input-color);min-width:60px;padding:0}.leading-icon,.trailing-icon{font-size:var(--text-xl-size);color:var(--bh-input-icon-color);user-select:none;flex-shrink:0;cursor:default;transition:color var(--animation-duration-normal) ease-in-out}.hint-text{font-family:inherit;font-weight:var(--weight-regular);font-size:var(--text-sm-size);line-height:var(--line-height-normal);color:var(--bh-input-hint-color)}}@layer bh-variants{.input-container.input-container-with-leading{padding:var(--spacing-md) var(--spacing-xl)}.input-container-sm{height:var(--bh-input-height-sm)}.input-container-lg{height:var(--bh-input-height-lg)}}@layer bh-states{.input-container.input-container-hover{border-color:var(--bh-input-border-color-hover)}.input-container.input-container-focused{border-color:var(--bh-input-border-color-focus);box-shadow:0 0 0 1px var(--bh-input-border-color-focus)}.input-container.input-container-focused .leading-icon,.input-container.input-container-focused .trailing-icon{color:var(--bh-input-icon-color-focus)}.input-container.input-container-disabled{opacity:0.5;cursor:not-allowed;background:var(--bh-input-bg-disabled)}.input-container.input-container-error{border-color:var(--bh-input-border-color-error)}.input-container.input-container-error.input-container-hover{border-color:var(--bh-input-border-color-error)}.input-container.input-container-error.input-container-focused{border-color:var(--bh-input-border-color-focus)}.input-element:focus{outline:none;border:none;box-shadow:none}.input-element::placeholder{color:var(--bh-input-color-placeholder)}.input-element:disabled{cursor:not-allowed}.hint-text.hint-error{color:var(--bh-input-hint-error-color)}}@layer bh-utilities{.material-symbols-outlined{font-family:"Material Symbols Outlined";font-weight:normal;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;font-feature-settings:"liga";-webkit-font-smoothing:antialiased;font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;font-size:var(--icon-size-md)}}'}},[577,"bh-input-text",{label:[1],placeholder:[1],hintText:[1,"hint-text"],showLabel:[4,"show-label"],showHintText:[4,"show-hint-text"],showHelpIcon:[4,"show-help-icon"],showLeadingIcon:[4,"show-leading-icon"],showTrailingIcon:[4,"show-trailing-icon"],error:[4],disabled:[4],required:[4],helpIconTooltip:[1,"help-icon-tooltip"],leadingIcon:[1,"leading-icon"],trailingIcon:[1,"trailing-icon"],value:[1025],name:[1],defaultValue:[1,"default-value"],validationMessage:[1,"validation-message"],type:[1],width:[1],readOnly:[4,"read-only"],size:[1],state:[1],ariaDescribedBy:[1,"aria-described-by"],ariaErrorMessage:[1,"aria-error-message"],ariaDetails:[1,"aria-details"],autocomplete:[1],autoCorrect:[1,"autocorrect"],autocapitalize:[1],multiline:[4],rows:[2],ariaRowCount:[1,"aria-row-count"],ariaRowIndex:[1,"aria-row-index"],ariaAutocomplete:[1,"aria-autocomplete"],ariaActiveDescendant:[1,"aria-active-descendant"],ariaOwns:[1,"aria-owns"],focusVersion:[32],_i18nVersion:[32],isDirty:[32],isTouched:[32]},void 0,{value:[{handleValueChange:0}]}]);function k(){"undefined"!=typeof customElements&&["bh-input-text","bh-label","bh-tooltip"].forEach((t=>{switch(t){case"bh-input-text":customElements.get(o(t))||customElements.define(o(t),x);break;case"bh-label":customElements.get(o(t))||n();break;case"bh-tooltip":customElements.get(o(t))||s()}}))}export{x as B,k as d}
|
|
1
|
+
import{p as t,H as i,c as e,h as a,d as r,t as o}from"./p-YZi6LqIt.js";import{d as n}from"./p-C7fkgBQS.js";import{d as s}from"./p-D6aw0IK6.js";import{a as h,u as l}from"./p-L4Y2hq_b.js";import{a as c,b as d,M as u}from"./p-DlPm3fIV.js";import{c as p,r as b,m,M as g}from"./p-BJXjqxlX.js";import{c as f}from"./p-YdVz1TeW.js";import{B as v,r as y}from"./p-BNVOtH-1.js";import{b as w}from"./p-Bam7V_bL.js";const x=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bhInput=e(this,"bhInput"),this.bhChange=e(this,"bhChange"),this.bhFocus=e(this,"bhFocus"),this.bhBlur=e(this,"bhBlur"),this.bhHelpClick=e(this,"bhHelpClick"),this.bhValidityChange=e(this,"bhValidityChange"),this.internals=this.attachInternals()}internals;logger=p("bh-input-text");focusState=f();inputEl;i18nUnsubscribe;label="";placeholder="";hintText="";showLabel=!0;showHintText=!0;showHelpIcon=!1;showLeadingIcon=!1;showTrailingIcon=!1;error=!1;disabled=!1;required=!1;helpIconTooltip="Help";leadingIcon="mail";trailingIcon="search";value="";name="";defaultValue="";validationMessage="";type="text";width="";readOnly=!1;size="md";state="default";ariaDescribedBy;ariaErrorMessage;ariaDetails;autocomplete="off";autoCorrect="off";autocapitalize="none";multiline=!1;rows=3;ariaRowCount=null;ariaRowIndex=null;ariaAutocomplete="none";ariaActiveDescendant;ariaOwns;focusVersion=0;_i18nVersion=0;isDirty=!1;isTouched=!1;bhInput;bhChange;bhFocus;bhBlur;bhHelpClick;bhValidityChange;get safeWidth(){if(!this.width)return"";const t=c(this.width,50);return t.valid?t.value:(b("bh-input-text",new Error(`Invalid width: ${t.errors.map((t=>t.message)).join(", ")}`)),"")}handleValueChange(t){this.inputEl&&this.inputEl.value!==t&&(this.inputEl.value=t),h(this),l(this.internals,this.inputEl,this.validationMessage)}componentWillLoad(){this.focusState.onChange((()=>{this.focusVersion++})),this.i18nUnsubscribe=v.onLocaleChange((()=>{this._i18nVersion++}))}componentDidCatch(t){this.logger.error("Component error caught",t instanceof Error?t:new Error(String(t))),m.increment(g.COMPONENT_ERROR,{component:"bh-input-text",error_type:t instanceof Error?t.name:"unknown"}),b("bh-input-text",t)}handleInput=t=>{const i=d(t.target.value,u);this.value=i.value,i.valid||b("bh-input-text",new Error(i.errors.map((t=>t.message)).join(", "))),this.isDirty||(this.isDirty=!0),this.bhInput.emit(this.value),h(this),l(this.internals,this.inputEl,this.validationMessage)};handleChange=()=>{this.bhChange.emit(this.value)};handleKeyDown=()=>{};handleValidityChange=()=>{this.inputEl&&this.bhValidityChange.emit(this.inputEl.validity)};componentDidLoad(){h(this),l(this.internals,this.inputEl,this.validationMessage),this.inputEl&&this.inputEl.addEventListener("invalid",this.handleValidityChange)}disconnectedCallback(){this.inputEl&&this.inputEl.removeEventListener("invalid",this.handleValidityChange),this.i18nUnsubscribe?.()}formResetCallback(){this.value=this.defaultValue,this.inputEl&&(this.inputEl.value=this.defaultValue),h(this),l(this.internals,this.inputEl)}handleFocus=t=>{this.isTouched=!0,this.focusState.handleFocus(t,(()=>this.bhFocus.emit()))};handleBlur=t=>{this.focusState.handleBlur(t,(()=>this.bhBlur.emit()))};handleMouseEnter=()=>{this.focusState.handleMouseEnter()};handleMouseLeave=()=>{this.focusState.handleMouseLeave()};handleHelpClick=()=>{this.bhHelpClick.emit()};render(){const t=w({base:"input-container",size:this.size,modifiers:{focused:this.focusState.isFocused,hover:this.focusState.isHovered&&!this.focusState.isFocused,error:this.error,disabled:this.disabled,"with-leading":this.showLeadingIcon}});return a(r,{key:"fd68ed8d9760d81e87cf5c5bb4662d3760152d77"},a("div",{key:"d67659734019a46231e60a4becf34d194ae76e63",class:"input-wrapper",part:"wrapper",style:this.safeWidth?{width:this.safeWidth}:{}},a("bh-label",{key:"97d68713ffe5e9f815091a035aa24085b4175951",disabled:this.disabled,helpIconTooltip:y("bh-input-text","helpIconTooltip",this.helpIconTooltip,"Help"),label:this.showLabel?this.label:"",onBhHelpClick:this.handleHelpClick,required:this.required,showHelpIcon:this.showHelpIcon},a("div",{key:"f4daa8903354b686a6335e40c5f64b75b6f8db24",class:t,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,part:"container"},a("div",{key:"c4b05d6f6633441441faa2cd17207649d56d92d2",class:"input-content"},this.showLeadingIcon&&a("span",{key:"e2f29d1ac639640c9cdcf855c85921330c56782f","aria-hidden":"true",class:"material-symbols-outlined leading-icon",part:"prefix"},this.leadingIcon),this.multiline?a("textarea",{"aria-atomic":"true","aria-busy":"false","aria-describedby":[this.showHintText&&this.hintText?"hint-text":"",this.ariaDescribedBy].filter(Boolean).join(" ")||void 0,"aria-details":this.ariaDetails,"aria-errormessage":this.ariaErrorMessage,"aria-invalid":this.error?"true":"false","aria-label":this.label,"aria-live":"polite","aria-multiline":"true","aria-readonly":String(this.readOnly),"aria-required":String(this.required),"aria-rowcount":this.ariaRowCount,"aria-rowindex":this.ariaRowIndex,autocapitalize:this.autocapitalize,autocomplete:this.autocomplete,autocorrect:this.autoCorrect,class:"input-element","data-dirty":String(this.isDirty),"data-touched":String(this.isTouched),disabled:this.disabled,name:this.name,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,part:"input",placeholder:this.placeholder,readOnly:this.readOnly,ref:t=>this.inputEl=t,required:this.required,rows:this.rows,value:this.value}):a("input",{"aria-activedescendant":this.ariaActiveDescendant,"aria-atomic":"true","aria-autocomplete":this.ariaAutocomplete,"aria-busy":"false","aria-describedby":[this.showHintText&&this.hintText?"hint-text":"",this.ariaDescribedBy].filter(Boolean).join(" ")||void 0,"aria-details":this.ariaDetails,"aria-errormessage":this.ariaErrorMessage,"aria-invalid":this.error?"true":"false","aria-label":this.label,"aria-live":"polite","aria-owns":this.ariaOwns,"aria-readonly":String(this.readOnly),"aria-required":String(this.required),autocapitalize:this.autocapitalize,autocomplete:this.autocomplete,autocorrect:this.autoCorrect,class:"input-element","data-dirty":String(this.isDirty),"data-touched":String(this.isTouched),disabled:this.disabled,name:this.name,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus,onInput:this.handleInput,onKeyDown:this.handleKeyDown,part:"input",placeholder:this.placeholder,readOnly:this.readOnly,ref:t=>this.inputEl=t,required:this.required,type:this.type,value:this.value}),this.showTrailingIcon&&a("span",{key:"e4b637bb7a5183e6573982127bb0e32499be77b5","aria-hidden":"true",class:"material-symbols-outlined trailing-icon",part:"suffix"},this.trailingIcon)))),this.showHintText&&this.hintText&&a("div",{key:"562f6ae808edd4b8c5f00fa3da349025e39ef3ab","aria-live":this.error?"assertive":"polite",class:{"hint-text":!0,"hint-error":this.error},id:"hint-text"},this.hintText)))}static get formAssociated(){return!0}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return'@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.5}}@layer bh-tokens,bh-base,bh-variants,bh-states,bh-utilities; @layer bh-tokens{:host{display:block;font-family:var(--font-inter);--bh-input-bg:var(--color-bg-primary);--bh-input-bg-disabled:var(--color-bg-secondary);--bh-input-color:var(--color-text-primary);--bh-input-color-placeholder:var(--color-text-tertiary);--bh-input-border-color:var(--color-border-primary);--bh-input-border-color-hover:var(--color-border-interactive);--bh-input-border-color-focus:var(--color-border-interactive);--bh-input-border-color-error:var(--color-border-error);--bh-input-border-radius:var(--radius-md);--bh-input-icon-color:var(--color-text-tertiary);--bh-input-icon-color-focus:var(--color-text-interactive);--bh-input-hint-color:var(--color-text-secondary);--bh-input-hint-error-color:var(--color-text-error)}}@layer bh-base{.input-wrapper{display:flex;flex-direction:column;gap:var(--spacing-sm);width:100%}.input-container{display:flex;align-items:center;gap:var(--spacing-md);padding:var(--spacing-sm);height:var(--bh-input-height-md);width:100%;background:var(--bh-input-bg);border:1px solid var(--bh-input-border-color);border-radius:var(--bh-input-border-radius);transition:border-color var(--animation-duration-normal) ease-in-out, box-shadow var(--animation-duration-normal) ease-in-out;cursor:text;box-sizing:border-box}.input-content{display:flex;align-items:center;gap:var(--spacing-md);flex:1;height:100%;min-width:0}.input-element{flex:1;height:100%;border:none;outline:none;background:transparent;font-family:inherit;font-weight:var(--weight-regular);font-size:var(--text-sm-size);line-height:var(--line-height-normal);color:var(--bh-input-color);min-width:60px;padding:0}.leading-icon,.trailing-icon{font-size:var(--text-xl-size);color:var(--bh-input-icon-color);user-select:none;flex-shrink:0;cursor:default;transition:color var(--animation-duration-normal) ease-in-out}.hint-text{font-family:inherit;font-weight:var(--weight-regular);font-size:var(--text-sm-size);line-height:var(--line-height-normal);color:var(--bh-input-hint-color)}}@layer bh-variants{.input-container.input-container-with-leading{padding:var(--spacing-md) var(--spacing-xl)}.input-container-sm{height:var(--bh-input-height-sm)}.input-container-lg{height:var(--bh-input-height-lg)}}@layer bh-states{.input-container.input-container-hover{border-color:var(--bh-input-border-color-hover)}.input-container.input-container-focused{border-color:var(--bh-input-border-color-focus);box-shadow:0 0 0 1px var(--bh-input-border-color-focus)}.input-container.input-container-focused .leading-icon,.input-container.input-container-focused .trailing-icon{color:var(--bh-input-icon-color-focus)}.input-container.input-container-disabled{opacity:0.5;cursor:not-allowed;background:var(--bh-input-bg-disabled)}.input-container.input-container-error{border-color:var(--bh-input-border-color-error)}.input-container.input-container-error.input-container-hover{border-color:var(--bh-input-border-color-error)}.input-container.input-container-error.input-container-focused{border-color:var(--bh-input-border-color-focus)}.input-element:focus{outline:none;border:none;box-shadow:none}.input-element::placeholder{color:var(--bh-input-color-placeholder)}.input-element:disabled{cursor:not-allowed}.hint-text.hint-error{color:var(--bh-input-hint-error-color)}}@layer bh-utilities{.material-symbols-outlined{font-family:"Material Symbols Outlined";font-weight:normal;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;font-feature-settings:"liga";-webkit-font-smoothing:antialiased;font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;font-size:var(--icon-size-md)}}'}},[577,"bh-input-text",{label:[1],placeholder:[1],hintText:[1,"hint-text"],showLabel:[4,"show-label"],showHintText:[4,"show-hint-text"],showHelpIcon:[4,"show-help-icon"],showLeadingIcon:[4,"show-leading-icon"],showTrailingIcon:[4,"show-trailing-icon"],error:[4],disabled:[4],required:[4],helpIconTooltip:[1,"help-icon-tooltip"],leadingIcon:[1,"leading-icon"],trailingIcon:[1,"trailing-icon"],value:[1025],name:[1],defaultValue:[1,"default-value"],validationMessage:[1,"validation-message"],type:[1],width:[1],readOnly:[4,"read-only"],size:[1],state:[1],ariaDescribedBy:[1,"aria-described-by"],ariaErrorMessage:[1,"aria-error-message"],ariaDetails:[1,"aria-details"],autocomplete:[1],autoCorrect:[1,"autocorrect"],autocapitalize:[1],multiline:[4],rows:[2],ariaRowCount:[1,"aria-row-count"],ariaRowIndex:[1,"aria-row-index"],ariaAutocomplete:[1,"aria-autocomplete"],ariaActiveDescendant:[1,"aria-active-descendant"],ariaOwns:[1,"aria-owns"],focusVersion:[32],_i18nVersion:[32],isDirty:[32],isTouched:[32]},void 0,{value:[{handleValueChange:0}]}]);function k(){"undefined"!=typeof customElements&&["bh-input-text","bh-label","bh-tooltip"].forEach((t=>{switch(t){case"bh-input-text":customElements.get(o(t))||customElements.define(o(t),x);break;case"bh-label":customElements.get(o(t))||n();break;case"bh-tooltip":customElements.get(o(t))||s()}}))}export{x as B,k as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as a,H as e,c as b,h as s,t as i}from"./p-YZi6LqIt.js";const o=a(class extends e{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.bhClick=b(this,"bhClick")}iconName="add";ariaLabel;size="lg";disabled=!1;bhClick;handleClick=a=>{if(this.disabled)return a.preventDefault(),void a.stopPropagation();this.bhClick.emit()};render(){return s("button",{key:"
|
|
1
|
+
import{p as a,H as e,c as b,h as s,t as i}from"./p-YZi6LqIt.js";const o=a(class extends e{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.bhClick=b(this,"bhClick")}iconName="add";ariaLabel;size="lg";disabled=!1;bhClick;handleClick=a=>{if(this.disabled)return a.preventDefault(),void a.stopPropagation();this.bhClick.emit()};render(){return s("button",{key:"8c17cd53a08c3fc2e2b4717fac888dd86a9b75e4","aria-disabled":this.disabled?"true":void 0,"aria-label":this.ariaLabel,class:{fab:!0,[`fab-${this.size}`]:!0,"fab-disabled":this.disabled},disabled:this.disabled,onClick:this.handleClick,part:"button",type:"button"},s("span",{key:"1d3996d1272bb4cd46a8760e5217d9f5a14b12d3",class:"material-symbols-outlined",part:"icon"},this.iconName))}static get style(){return"@layer bh-tokens,bh-base,bh-states; @layer bh-tokens{:host{--bh-fab-bg:var(--color-bg-interactive, #4f46e5);--bh-fab-bg-hover:var(--color-bg-interactive-hover, #4338ca);--bh-fab-bg-active:var(--color-bg-interactive-active, #3730a3);--bh-fab-color:var(--color-text-inverse, #ffffff);--bh-fab-shadow:var(--bh-shadows-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.2));--bh-fab-size-md:44px;--bh-fab-size-lg:56px;--bh-fab-icon-size-md:20px;--bh-fab-icon-size-lg:24px;--bh-fab-focus-ring:0 0 0 3px var(--color-border-interactive, #818cf8);display:inline-block}}@layer bh-base{.fab{display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:50%;background:var(--bh-fab-bg);color:var(--bh-fab-color);box-shadow:var(--bh-fab-shadow);cursor:pointer;outline:none;padding:0;transition:background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease}.fab-md{width:var(--bh-fab-size-md);height:var(--bh-fab-size-md)}.fab-lg{width:var(--bh-fab-size-lg);height:var(--bh-fab-size-lg)}.fab .material-symbols-outlined{font-size:var(--bh-fab-icon-size-lg);line-height:1;user-select:none}.fab-md .material-symbols-outlined{font-size:var(--bh-fab-icon-size-md)}.fab-disabled{opacity:0.5;cursor:not-allowed;box-shadow:none}}@layer bh-states{.fab:not(.fab-disabled):hover{background:var(--bh-fab-bg-hover)}.fab:not(.fab-disabled):active{background:var(--bh-fab-bg-active);transform:scale(0.95)}.fab:not(.fab-disabled):focus-visible{box-shadow:var(--bh-fab-shadow), var(--bh-fab-focus-ring)}}"}},[513,"bh-fab",{iconName:[1,"icon-name"],ariaLabel:[1,"aria-label"],size:[1],disabled:[4]}]);function t(){"undefined"!=typeof customElements&&["bh-fab"].forEach((a=>{"bh-fab"===a&&(customElements.get(i(a))||customElements.define(i(a),o))}))}export{o as B,t as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,c as i,h as a,t as n}from"./p-YZi6LqIt.js";import{d as r}from"./p-B7i48CAz.js";import{c as s,m as o,M as m,r as h}from"./p-BJXjqxlX.js";import{c as u}from"./p-YdVz1TeW.js";import{A as l}from"./p-BoVgy_Ao.js";import{v as d}from"./p-DlPm3fIV.js";import{K as c}from"./p-zdFuIabL.js";import{c as b}from"./p-B93zYxiE.js";import{a as v}from"./p-BqJRACkO.js";const p=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bhClick=i(this,"bhClick"),this.bhSubmenuToggle=i(this,"bhSubmenuToggle")}get el(){return this}logger=s("bh-menu-item");focusState=u();hoverOpenTimeout;hoverCloseTimeout;positioner;submenuRef;itemRef;focusVersion=0;label="";variant="default";icon="";avatarSrc="";avatarAlt="";imageSrc="";imageAlt="";selected=!1;disabled=!1;shortcut="";divider=!1;hasSubmenu=!1;orientation="vertical";submenuVisible=!1;submenuItems=[];bhClick;bhSubmenuToggle;componentWillLoad(){this.focusState.onChange((()=>{this.focusVersion++}))}disconnectedCallback(){this.clearHoverTimeouts(),this.destroyPositioner()}componentDidCatch(e){this.logger.error("Component error caught",e instanceof Error?e:new Error(String(e))),o.increment(m.COMPONENT_ERROR,{component:"bh-menu-item",error_type:e instanceof Error?e.name:"unknown"}),h("bh-menu-item",e)}async handleSubmenuVisibleChange(e){e?await this.setupPositioner():this.destroyPositioner()}get parsedSubmenuItems(){if("string"==typeof this.submenuItems){if(!this.submenuItems)return[];const e=d(this.submenuItems);return e.valid&&Array.isArray(e.value)?e.value:[]}return Array.isArray(this.submenuItems)?this.submenuItems:[]}get hasSubmenuContent(){return this.hasSubmenu&&this.parsedSubmenuItems.length>0}clearHoverTimeouts(){void 0!==this.hoverOpenTimeout&&(clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=void 0),void 0!==this.hoverCloseTimeout&&(clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=void 0)}destroyPositioner(){this.positioner&&(this.positioner.destroy(),this.positioner=void 0)}async setupPositioner(){if(this.destroyPositioner(),!this.itemRef||!this.submenuRef)return;const e="horizontal"===this.orientation?"bottom-start":"right-start";try{this.positioner=await b(this.itemRef,this.submenuRef,{placement:e,offset:0,flip:!0,shift:!0,shiftPadding:8,autoUpdate:!0},((e,t)=>{this.submenuRef&&(this.submenuRef.style.left=`${e}px`,this.submenuRef.style.top=`${t}px`)}))}catch{this.logger.error("Failed to position submenu",new Error("Floating UI position failed"))}}handleClick=()=>{this.disabled||(this.hasSubmenuContent&&this.bhSubmenuToggle.emit({open:!this.submenuVisible}),this.bhClick.emit())};handleKeyDown=e=>{v(e)&&!this.disabled&&(e.preventDefault(),this.bhClick.emit())};handleFocus=e=>{this.focusState.handleFocus(e)};handleBlur=e=>{this.focusState.handleBlur(e)};handleMouseEnter=()=>{this.focusState.handleMouseEnter(),this.hasSubmenuContent&&!this.disabled&&(void 0!==this.hoverCloseTimeout&&(clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=void 0),this.hoverOpenTimeout=setTimeout((()=>{this.bhSubmenuToggle.emit({open:!0}),this.hoverOpenTimeout=void 0}),200))};handleMouseLeave=()=>{this.focusState.handleMouseLeave(),this.hasSubmenuContent&&(void 0!==this.hoverOpenTimeout&&(clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=void 0),this.hoverCloseTimeout=setTimeout((()=>{this.bhSubmenuToggle.emit({open:!1}),this.hoverCloseTimeout=void 0}),300))};renderLeadingContent(){switch(this.variant){case"icon":return a("span",{class:"menu-item-icon material-symbols-outlined",part:"icon"},this.icon);case"avatar":return a("bh-avatar",{alt:this.avatarAlt,class:"menu-item-avatar",imageSrc:this.avatarSrc,part:"avatar",size:"xs",variant:"image"});case"image":return a("img",{alt:this.imageAlt,class:"menu-item-image",part:"image",src:this.imageSrc});default:return null}}renderTrailingContent(){const e=[];return this.selected&&e.push(a("span",{class:"menu-item-trailing material-symbols-outlined",part:"trailing"},"check")),this.shortcut&&e.push(a("span",{class:"menu-item-shortcut",part:"shortcut"},this.shortcut)),this.hasSubmenu&&e.push(a("span",{class:"menu-item-trailing material-symbols-outlined",part:"trailing"},"horizontal"===this.orientation?"expand_more":"chevron_right")),e.length>0?e:null}renderSubmenu(){return this.hasSubmenuContent&&this.submenuVisible?a("div",{class:"menu-item-submenu",ref:e=>{this.submenuRef=e}},a("bh-menu",{menuItems:this.parsedSubmenuItems,orientation:"vertical"})):null}render(){if(this.divider)return a("hr",{"aria-hidden":"true",class:"menu-item-divider",part:"divider"});const e={"menu-item-wrapper":!0,"menu-item-wrapper--submenu-open":this.submenuVisible},t={"menu-item":!0,"menu-item--selected":this.selected,"menu-item--disabled":this.disabled,"menu-item--has-submenu":this.hasSubmenu,[`menu-item--${this.variant}`]:!0,focused:this.focusState.isFocused&&!this.disabled,hovered:this.focusState.isHovered&&!this.disabled};return a("div",{class:e},a("div",{"aria-checked":this.selected?"true":void 0,"aria-disabled":this.disabled?"true":void 0,"aria-expanded":this.hasSubmenu?String(this.submenuVisible):void 0,"aria-haspopup":this.hasSubmenu?"menu":void 0,class:t,"data-focused":String(this.focusState.isFocused),"data-hovered":String(this.focusState.isHovered),onBlur:this.handleBlur,onClick:this.handleClick,onFocus:this.handleFocus,onKeyDown:this.handleKeyDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,part:"container",ref:e=>{this.itemRef=e},role:"menuitem",tabindex:this.disabled?-1:0},this.renderLeadingContent(),a("span",{class:"menu-item-label",part:"label"},this.label),this.renderTrailingContent()),this.renderSubmenu())}static get watchers(){return{submenuVisible:[{handleSubmenuVisibleChange:0}]}}static get style(){return'@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.5}}@layer bh-tokens,bh-base,bh-variants,bh-states,bh-utilities; @layer bh-tokens{:host{display:block;padding:var(--menu-item-padding-v) var(--menu-item-padding-h);height:var(--menu-item-height);--menu-item-height:var(--bh-button-height-sm);--menu-item-padding-h:var(--spacing-sm);--menu-item-padding-v:var(--spacing-xxs);--menu-item-gap:var(--spacing-sm);--menu-item-radius:var(--radius-sm);--menu-item-icon-size:var(--icon-size-sm);--menu-item-image-size:var(--icon-size-sm);--menu-item-bg:transparent;--menu-item-color:var(--color-text-primary)}}@layer bh-base{font-family:"Material Symbols Outlined";font-weight:normal;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;font-feature-settings:"liga";-webkit-font-smoothing:antialiased;font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;.menu-item-wrapper{position:relative}.menu-item-submenu:popover-open{background:transparent;overflow:visible;margin:0;inset:auto;border:0;padding:0}.menu-item-submenu{position:absolute;z-index:var(--z-index-dropdown)}.menu-item{display:flex;align-items:center;gap:var(--menu-item-gap);height:var(--menu-item-height);padding:var(--menu-item-padding-v) var(--menu-item-padding-h);border-radius:var(--menu-item-radius);background-color:var(--menu-item-bg);color:var(--menu-item-color);font-family:var(--font-inter);font-size:var(--text-sm-size);font-weight:var(--weight-medium);line-height:var(--line-height-normal);cursor:pointer;outline:none;transition:background-color var(--animation-duration-fast) ease;user-select:none;box-sizing:border-box}.menu-item-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-item-icon{width:var(--menu-item-icon-size);height:var(--menu-item-icon-size);font-size:var(--menu-item-icon-size);flex-shrink:0;color:var(--color-text-secondary)}.menu-item-avatar{flex-shrink:0}.menu-item-image{width:var(--menu-item-image-size);height:var(--menu-item-image-size);border-radius:var(--radius-xs);border:1px solid var(--color-neutral-900);object-fit:cover;flex-shrink:0}.menu-item-trailing{width:var(--menu-item-icon-size);height:var(--menu-item-icon-size);font-size:var(--menu-item-icon-size);flex-shrink:0;color:inherit}.menu-item-shortcut{font-family:var(--font-inter);font-size:var(--text-xs-size);font-weight:var(--weight-regular);line-height:var(--line-height-normal);color:var(--color-text-secondary);flex-shrink:0;white-space:nowrap}.menu-item-divider{height:1px;background:var(--color-border-secondary);border:none;margin:var(--spacing-xs) var(--menu-item-padding-h)}}@layer bh-states{.menu-item:hover:not(.menu-item--disabled){background-color:var(--color-bg-secondary)}.menu-item:focus-visible:not(.menu-item--disabled){box-shadow:0 0 0 2px var(--color-bg-primary), 0 0 0 4px var(--color-border-interactive)}.menu-item--selected{--menu-item-bg:var(--color-neutral-200)}.menu-item--selected:hover:not(.menu-item--disabled){background-color:var(--color-bg-secondary)}.menu-item--disabled{--menu-item-color:var(--color-text-disabled);cursor:not-allowed}.menu-item--disabled.menu-item--selected{--menu-item-bg:var(--color-neutral-100)}}'}},[513,"bh-menu-item",{label:[1],variant:[1],icon:[1],avatarSrc:[1,"avatar-src"],avatarAlt:[1,"avatar-alt"],imageSrc:[1,"image-src"],imageAlt:[1,"image-alt"],selected:[4],disabled:[4],shortcut:[1],divider:[4],hasSubmenu:[4,"has-submenu"],orientation:[1],submenuVisible:[4,"submenu-visible"],submenuItems:[1,"submenu-items"],focusVersion:[32]},void 0,{submenuVisible:[{handleSubmenuVisibleChange:0}]}]);function g(){"undefined"!=typeof customElements&&["bh-menu-item","bh-avatar","bh-menu","bh-menu-item"].forEach((e=>{switch(e){case"bh-menu-item":customElements.get(n(e))||customElements.define(n(e),p);break;case"bh-avatar":customElements.get(n(e))||r();break;case"bh-menu":customElements.get(n(e))||x();break;case"bh-menu-item":customElements.get(n(e))||g()}}))}const f=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bhItemClick=i(this,"bhItemClick"),this.bhOpen=i(this,"bhOpen"),this.bhClose=i(this,"bhClose")}get el(){return this}logger=s("bh-menu");focusState=u();menuItemElements=[];focusVersion=0;focusedIndex=-1;openSubmenuIndex=-1;isClosing=!1;shouldRender=!0;orientation="vertical";visible=!0;menuItems=[];header;scrollable=!1;showIcons=!0;animated=!1;bhItemClick;bhOpen;bhClose;componentWillLoad(){this.shouldRender=this.visible,this.focusState.onChange((()=>{this.focusVersion++}))}componentDidLoad(){this.collectMenuItems()}componentDidUpdate(){this.collectMenuItems()}componentDidCatch(e){this.logger.error("Component error caught",e instanceof Error?e:new Error(String(e))),o.increment(m.COMPONENT_ERROR,{component:"bh-menu",error_type:e instanceof Error?e.name:"unknown"}),h("bh-menu",e)}handleVisibilityChange(e){e?(this.shouldRender=!0,this.isClosing=!1,this.bhOpen.emit(),this.focusedIndex=-1):(this.bhClose.emit(),this.animated?(this.isClosing=!0,setTimeout((()=>{this.shouldRender=!1,this.isClosing=!1}),l.MENU_CLOSE)):this.shouldRender=!1)}handleItemClick(e){e.stopPropagation();const t=this.findItemIndex(e),i=this.parsedMenuItems;this.bhItemClick.emit({index:t,item:t>=0&&t<i.length?i[t]:void 0})}handleSubmenuToggle(e){e.stopPropagation();const t=this.findItemIndex(e);e.detail.open?this.openSubmenuIndex=t:this.openSubmenuIndex===t&&(this.openSubmenuIndex=-1)}findItemIndex(e){for(const t of e.composedPath?.()??[]){const e=this.menuItemElements.indexOf(t);if(e>=0)return e}return this.menuItemElements.indexOf(e.target)}collectMenuItems(){const e=this.el.shadowRoot;if(!e)return;const t=e.querySelector('[role="menu"]');t&&(this.menuItemElements=[...Array.from(t.querySelectorAll("bh-menu-item")),...Array.from(this.el.querySelectorAll("bh-menu-item"))])}get parsedMenuItems(){if("string"==typeof this.menuItems){if(!this.menuItems)return[];const e=d(this.menuItems);return e.valid?Array.isArray(e.value)?e.value:(h("bh-menu",new Error("menuItems must be an array")),[]):(h("bh-menu",new Error(`Invalid menuItems JSON: ${e.errors.map((e=>e.message)).join(", ")}`)),[])}return Array.isArray(this.menuItems)?this.menuItems:[]}get parsedHeader(){if(this.header){if("string"==typeof this.header){const e=d(this.header);return e.valid?e.value??void 0:void h("bh-menu",new Error(`Invalid header JSON: ${e.errors.map((e=>e.message)).join(", ")}`))}return this.header}}async focusItem(e){for(let e=0;e<10&&(this.collectMenuItems(),!this.menuItemElements.some((e=>e.shadowRoot?.querySelector('[role="menuitem"]'))));e++)await new Promise((e=>requestAnimationFrame((()=>e(void 0)))));this.focusItemInternal(e)}focusItemInternal(e){const t=this.menuItemElements;if(0===t.length)return;let i=e,a=0;for(;a<t.length;){i<0&&(i=t.length-1),i>=t.length&&(i=0);const n=t[i];if(n&&!n.hasAttribute("disabled")&&"true"!==n.getAttribute("aria-disabled"))break;i+=e>this.focusedIndex?1:-1,a++}if(a>=t.length)return;this.focusedIndex=i;const n=t[i]?.shadowRoot?.querySelector('[role="menuitem"]');n?n.focus():t[i]?.focus()}openSubmenuForFocusedItem(){const e=this.menuItemElements[this.focusedIndex];e&&("menu"===e.getAttribute("aria-haspopup")||e.hasAttribute("has-submenu"))&&(this.openSubmenuIndex=this.focusedIndex,requestAnimationFrame((()=>{const t=e.shadowRoot?.querySelector("bh-menu"),i=t?.shadowRoot?.querySelector("bh-menu-item"),a=i?.shadowRoot?.querySelector('[role="menuitem"]');a&&a.focus()})))}closeSubmenu(){if(this.openSubmenuIndex>=0){const e=this.menuItemElements[this.openSubmenuIndex];this.openSubmenuIndex=-1;const t=e?.shadowRoot?.querySelector('[role="menuitem"]');t&&t.focus()}}handleKeyDown=e=>{const t="vertical"===this.orientation,i=t?c.ARROW_DOWN:c.ARROW_RIGHT,a=t?c.ARROW_UP:c.ARROW_LEFT,n=t?c.ARROW_RIGHT:c.ARROW_DOWN,r=t?c.ARROW_LEFT:c.ARROW_UP;switch(e.key){case i:e.preventDefault(),this.focusItemInternal(this.focusedIndex+1);break;case a:e.preventDefault(),this.focusItemInternal(this.focusedIndex-1);break;case n:n!==i&&(e.preventDefault(),this.openSubmenuForFocusedItem());break;case r:r!==a&&(e.preventDefault(),this.closeSubmenu());break;case c.HOME:e.preventDefault(),this.focusItemInternal(0);break;case c.END:e.preventDefault(),this.focusItemInternal(this.menuItemElements.length-1);break;case c.ESCAPE:e.preventDefault(),this.openSubmenuIndex>=0?this.closeSubmenu():this.visible=!1}};renderDataDrivenItems(){const e=this.parsedMenuItems;return 0===e.length?null:e.map(((e,t)=>{if(e.divider)return a("hr",{"aria-hidden":"true",class:"menu-divider",key:e.id??`divider-${t}`,part:"divider"});const i=e.variant??e.type??(e.icon?"icon":"default");return a("bh-menu-item",{avatarAlt:e.avatarAlt??"",avatarSrc:e.avatarSrc??"",disabled:e.disabled??!1,hasSubmenu:void 0!==e.children&&e.children.length>0||(e.hasSubmenu??!1),icon:e.icon??"",imageAlt:e.imageAlt??"",imageSrc:e.imageSrc??"",key:e.id??t,label:e.label??"",orientation:this.orientation,selected:e.selected??!1,shortcut:e.shortcut??"",submenuItems:e.children??[],submenuVisible:this.openSubmenuIndex===t,variant:this.showIcons||"icon"!==i?i:"default"})}))}renderHeader(){const e=this.parsedHeader;return e?a("div",{class:{"menu-header":!0,"menu-header--avatar":!!e.avatarGroup},part:"header"},e.avatarGroup&&a("div",{class:"menu-header-avatar-group"},a("bh-avatar",{alt:e.name||"Avatar",imageSrc:e.avatarSrc||void 0,size:"md",status:"online",variant:e.avatarSrc?"image":"placeholder"}),a("div",{class:"menu-header-avatar-text"},a("div",{class:"menu-header-avatar-name"},e.name),a("div",{class:"menu-header-avatar-email"},e.email))),!e.avatarGroup&&e.title&&a("div",{class:"menu-header-title"},e.title)):null}render(){if(!this.shouldRender)return null;const e="vertical"===this.orientation,t={menu:!0,"menu--vertical":e,"menu--horizontal":!e,"menu--scrollable":this.scrollable,"menu--animated":this.animated,"menu--closing":this.isClosing},i=this.renderDataDrivenItems(),n=null!==i;return a("div",{"aria-orientation":this.orientation,class:t,onKeyDown:this.handleKeyDown,part:"container",role:"menu"},this.renderHeader(),n?a("div",{class:"menu-items",part:"items"},i):a("slot",null))}static get watchers(){return{visible:[{handleVisibilityChange:0}]}}static get style(){return'@charset "UTF-8"; @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } @layer bh-tokens, bh-base, bh-variants, bh-states, bh-utilities; @layer bh-tokens { :host { } :host:popover-open { background: transparent; overflow: visible; display: block; margin: 0; inset: auto; border: 0; padding: 0; } :host { display: inline-block; --menu-bg: var(--color-bg-primary); --menu-border-color: var(--color-border-secondary); --menu-radius-vertical: var(--radius-md); --menu-radius-horizontal: var(--radius-xl); --menu-shadow: var(--shadow-md); --menu-padding: var(--spacing-xs); --menu-gap: var(--spacing-xxs); --menu-min-width: 240px; } } @layer bh-base { .menu { display: flex; background-color: var(--menu-bg); box-sizing: border-box; list-style: none; margin: 0; outline: none; overflow: hidden; } .menu-items { display: flex; flex-direction: column; flex: 1; gap: var(--menu-gap); } .menu-divider { height: 1px; background: var(--menu-border-color); border: none; margin: 0; margin-top: var(--spacing-xs); } .menu-header { padding: var(--spacing-sm); border-bottom: 1px solid var(--menu-border-color); } .menu-header--avatar { padding: var(--spacing-sm); } .menu-header-avatar-group { display: flex; align-items: center; gap: var(--spacing-xl); width: 100%; } .menu-header-avatar-text { display: flex; flex-direction: column; flex: 1; min-width: 0; } .menu-header-avatar-name { font-family: var(--font-inter); font-weight: var(--weight-semibold); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .menu-header-avatar-email { font-family: var(--font-inter); font-weight: var(--weight-regular); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .menu-header-title { font-family: var(--font-inter); font-weight: var(--weight-semibold); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-primary); } } @layer bh-variants { .menu--vertical { flex-direction: column; min-width: var(--menu-min-width); padding-top: var(--spacing-xs); padding-bottom: var(--spacing-sm); border: 1px solid var(--menu-border-color); border-radius: var(--menu-radius-vertical); box-shadow: var(--menu-shadow); } .menu--horizontal { flex-direction: row; align-items: center; border-radius: var(--menu-radius-horizontal); gap: var(--spacing-xxs); } .menu--scrollable .menu-items { max-height: 280px; overflow-y: auto; overflow-x: hidden; } .menu--animated { animation: menuEnter var(--animation-duration-fast) ease-out forwards; } .menu--animated.menu--closing { animation: menuExit var(--animation-duration-fast) ease-in forwards; } @keyframes menuEnter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } } @keyframes menuExit { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-8px); } } }'}},[769,"bh-menu",{orientation:[1],visible:[1028],menuItems:[1,"menu-items"],header:[1],scrollable:[4],showIcons:[4,"show-icons"],animated:[4],focusVersion:[32],focusedIndex:[32],openSubmenuIndex:[32],isClosing:[32],shouldRender:[32],focusItem:[64]},[[0,"bhClick","handleItemClick"],[0,"bhSubmenuToggle","handleSubmenuToggle"]],{visible:[{handleVisibilityChange:0}]}]);function x(){"undefined"!=typeof customElements&&["bh-menu","bh-avatar","bh-menu","bh-menu-item"].forEach((e=>{switch(e){case"bh-menu":customElements.get(n(e))||customElements.define(n(e),f);break;case"bh-avatar":customElements.get(n(e))||r();break;case"bh-menu":customElements.get(n(e))||x();break;case"bh-menu-item":customElements.get(n(e))||g()}}))}export{f as B,p as a,g as b,x as d}
|
|
1
|
+
import{p as e,H as t,c as i,h as a,t as n}from"./p-YZi6LqIt.js";import{d as r}from"./p-DJlRFgcj.js";import{c as s,m as o,M as m,r as h}from"./p-BJXjqxlX.js";import{c as u}from"./p-YdVz1TeW.js";import{A as l}from"./p-BoVgy_Ao.js";import{v as d}from"./p-DlPm3fIV.js";import{K as c}from"./p-zdFuIabL.js";import{c as b}from"./p-B93zYxiE.js";import{a as v}from"./p-BqJRACkO.js";const p=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bhClick=i(this,"bhClick"),this.bhSubmenuToggle=i(this,"bhSubmenuToggle")}get el(){return this}logger=s("bh-menu-item");focusState=u();hoverOpenTimeout;hoverCloseTimeout;positioner;submenuRef;itemRef;focusVersion=0;label="";variant="default";icon="";avatarSrc="";avatarAlt="";imageSrc="";imageAlt="";selected=!1;disabled=!1;shortcut="";divider=!1;hasSubmenu=!1;orientation="vertical";submenuVisible=!1;submenuItems=[];bhClick;bhSubmenuToggle;componentWillLoad(){this.focusState.onChange((()=>{this.focusVersion++}))}disconnectedCallback(){this.clearHoverTimeouts(),this.destroyPositioner()}componentDidCatch(e){this.logger.error("Component error caught",e instanceof Error?e:new Error(String(e))),o.increment(m.COMPONENT_ERROR,{component:"bh-menu-item",error_type:e instanceof Error?e.name:"unknown"}),h("bh-menu-item",e)}async handleSubmenuVisibleChange(e){e?await this.setupPositioner():this.destroyPositioner()}get parsedSubmenuItems(){if("string"==typeof this.submenuItems){if(!this.submenuItems)return[];const e=d(this.submenuItems);return e.valid&&Array.isArray(e.value)?e.value:[]}return Array.isArray(this.submenuItems)?this.submenuItems:[]}get hasSubmenuContent(){return this.hasSubmenu&&this.parsedSubmenuItems.length>0}clearHoverTimeouts(){void 0!==this.hoverOpenTimeout&&(clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=void 0),void 0!==this.hoverCloseTimeout&&(clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=void 0)}destroyPositioner(){this.positioner&&(this.positioner.destroy(),this.positioner=void 0)}async setupPositioner(){if(this.destroyPositioner(),!this.itemRef||!this.submenuRef)return;const e="horizontal"===this.orientation?"bottom-start":"right-start";try{this.positioner=await b(this.itemRef,this.submenuRef,{placement:e,offset:0,flip:!0,shift:!0,shiftPadding:8,autoUpdate:!0},((e,t)=>{this.submenuRef&&(this.submenuRef.style.left=`${e}px`,this.submenuRef.style.top=`${t}px`)}))}catch{this.logger.error("Failed to position submenu",new Error("Floating UI position failed"))}}handleClick=()=>{this.disabled||(this.hasSubmenuContent&&this.bhSubmenuToggle.emit({open:!this.submenuVisible}),this.bhClick.emit())};handleKeyDown=e=>{v(e)&&!this.disabled&&(e.preventDefault(),this.bhClick.emit())};handleFocus=e=>{this.focusState.handleFocus(e)};handleBlur=e=>{this.focusState.handleBlur(e)};handleMouseEnter=()=>{this.focusState.handleMouseEnter(),this.hasSubmenuContent&&!this.disabled&&(void 0!==this.hoverCloseTimeout&&(clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=void 0),this.hoverOpenTimeout=setTimeout((()=>{this.bhSubmenuToggle.emit({open:!0}),this.hoverOpenTimeout=void 0}),200))};handleMouseLeave=()=>{this.focusState.handleMouseLeave(),this.hasSubmenuContent&&(void 0!==this.hoverOpenTimeout&&(clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=void 0),this.hoverCloseTimeout=setTimeout((()=>{this.bhSubmenuToggle.emit({open:!1}),this.hoverCloseTimeout=void 0}),300))};renderLeadingContent(){switch(this.variant){case"icon":return a("span",{class:"menu-item-icon material-symbols-outlined",part:"icon"},this.icon);case"avatar":return a("bh-avatar",{alt:this.avatarAlt,class:"menu-item-avatar",imageSrc:this.avatarSrc,part:"avatar",size:"xs",variant:"image"});case"image":return a("img",{alt:this.imageAlt,class:"menu-item-image",part:"image",src:this.imageSrc});default:return null}}renderTrailingContent(){const e=[];return this.selected&&e.push(a("span",{class:"menu-item-trailing material-symbols-outlined",part:"trailing"},"check")),this.shortcut&&e.push(a("span",{class:"menu-item-shortcut",part:"shortcut"},this.shortcut)),this.hasSubmenu&&e.push(a("span",{class:"menu-item-trailing material-symbols-outlined",part:"trailing"},"horizontal"===this.orientation?"expand_more":"chevron_right")),e.length>0?e:null}renderSubmenu(){return this.hasSubmenuContent&&this.submenuVisible?a("div",{class:"menu-item-submenu",ref:e=>{this.submenuRef=e}},a("bh-menu",{menuItems:this.parsedSubmenuItems,orientation:"vertical"})):null}render(){if(this.divider)return a("hr",{"aria-hidden":"true",class:"menu-item-divider",part:"divider"});const e={"menu-item-wrapper":!0,"menu-item-wrapper--submenu-open":this.submenuVisible},t={"menu-item":!0,"menu-item--selected":this.selected,"menu-item--disabled":this.disabled,"menu-item--has-submenu":this.hasSubmenu,[`menu-item--${this.variant}`]:!0,focused:this.focusState.isFocused&&!this.disabled,hovered:this.focusState.isHovered&&!this.disabled};return a("div",{class:e},a("div",{"aria-checked":this.selected?"true":void 0,"aria-disabled":this.disabled?"true":void 0,"aria-expanded":this.hasSubmenu?String(this.submenuVisible):void 0,"aria-haspopup":this.hasSubmenu?"menu":void 0,class:t,"data-focused":String(this.focusState.isFocused),"data-hovered":String(this.focusState.isHovered),onBlur:this.handleBlur,onClick:this.handleClick,onFocus:this.handleFocus,onKeyDown:this.handleKeyDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,part:"container",ref:e=>{this.itemRef=e},role:"menuitem",tabindex:this.disabled?-1:0},this.renderLeadingContent(),a("span",{class:"menu-item-label",part:"label"},this.label),this.renderTrailingContent()),this.renderSubmenu())}static get watchers(){return{submenuVisible:[{handleSubmenuVisibleChange:0}]}}static get style(){return'@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.5}}@layer bh-tokens,bh-base,bh-variants,bh-states,bh-utilities; @layer bh-tokens{:host{display:block;padding:var(--menu-item-padding-v) var(--menu-item-padding-h);height:var(--menu-item-height);--menu-item-height:var(--bh-button-height-sm);--menu-item-padding-h:var(--spacing-sm);--menu-item-padding-v:var(--spacing-xxs);--menu-item-gap:var(--spacing-sm);--menu-item-radius:var(--radius-sm);--menu-item-icon-size:var(--icon-size-sm);--menu-item-image-size:var(--icon-size-sm);--menu-item-bg:transparent;--menu-item-color:var(--color-text-primary)}}@layer bh-base{font-family:"Material Symbols Outlined";font-weight:normal;font-style:normal;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;font-feature-settings:"liga";-webkit-font-smoothing:antialiased;font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;.menu-item-wrapper{position:relative}.menu-item-submenu:popover-open{background:transparent;overflow:visible;margin:0;inset:auto;border:0;padding:0}.menu-item-submenu{position:absolute;z-index:var(--z-index-dropdown)}.menu-item{display:flex;align-items:center;gap:var(--menu-item-gap);height:var(--menu-item-height);padding:var(--menu-item-padding-v) var(--menu-item-padding-h);border-radius:var(--menu-item-radius);background-color:var(--menu-item-bg);color:var(--menu-item-color);font-family:var(--font-inter);font-size:var(--text-sm-size);font-weight:var(--weight-medium);line-height:var(--line-height-normal);cursor:pointer;outline:none;transition:background-color var(--animation-duration-fast) ease;user-select:none;box-sizing:border-box}.menu-item-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-item-icon{width:var(--menu-item-icon-size);height:var(--menu-item-icon-size);font-size:var(--menu-item-icon-size);flex-shrink:0;color:var(--color-text-secondary)}.menu-item-avatar{flex-shrink:0}.menu-item-image{width:var(--menu-item-image-size);height:var(--menu-item-image-size);border-radius:var(--radius-xs);border:1px solid var(--color-neutral-900);object-fit:cover;flex-shrink:0}.menu-item-trailing{width:var(--menu-item-icon-size);height:var(--menu-item-icon-size);font-size:var(--menu-item-icon-size);flex-shrink:0;color:inherit}.menu-item-shortcut{font-family:var(--font-inter);font-size:var(--text-xs-size);font-weight:var(--weight-regular);line-height:var(--line-height-normal);color:var(--color-text-secondary);flex-shrink:0;white-space:nowrap}.menu-item-divider{height:1px;background:var(--color-border-secondary);border:none;margin:var(--spacing-xs) var(--menu-item-padding-h)}}@layer bh-states{.menu-item:hover:not(.menu-item--disabled){background-color:var(--color-bg-secondary)}.menu-item:focus-visible:not(.menu-item--disabled){box-shadow:0 0 0 2px var(--color-bg-primary), 0 0 0 4px var(--color-border-interactive)}.menu-item--selected{--menu-item-bg:var(--color-neutral-200)}.menu-item--selected:hover:not(.menu-item--disabled){background-color:var(--color-bg-secondary)}.menu-item--disabled{--menu-item-color:var(--color-text-disabled);cursor:not-allowed}.menu-item--disabled.menu-item--selected{--menu-item-bg:var(--color-neutral-100)}}'}},[513,"bh-menu-item",{label:[1],variant:[1],icon:[1],avatarSrc:[1,"avatar-src"],avatarAlt:[1,"avatar-alt"],imageSrc:[1,"image-src"],imageAlt:[1,"image-alt"],selected:[4],disabled:[4],shortcut:[1],divider:[4],hasSubmenu:[4,"has-submenu"],orientation:[1],submenuVisible:[4,"submenu-visible"],submenuItems:[1,"submenu-items"],focusVersion:[32]},void 0,{submenuVisible:[{handleSubmenuVisibleChange:0}]}]);function g(){"undefined"!=typeof customElements&&["bh-menu-item","bh-avatar","bh-menu","bh-menu-item"].forEach((e=>{switch(e){case"bh-menu-item":customElements.get(n(e))||customElements.define(n(e),p);break;case"bh-avatar":customElements.get(n(e))||r();break;case"bh-menu":customElements.get(n(e))||x();break;case"bh-menu-item":customElements.get(n(e))||g()}}))}const f=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bhItemClick=i(this,"bhItemClick"),this.bhOpen=i(this,"bhOpen"),this.bhClose=i(this,"bhClose")}get el(){return this}logger=s("bh-menu");focusState=u();menuItemElements=[];focusVersion=0;focusedIndex=-1;openSubmenuIndex=-1;isClosing=!1;shouldRender=!0;orientation="vertical";visible=!0;menuItems=[];header;scrollable=!1;showIcons=!0;animated=!1;bhItemClick;bhOpen;bhClose;componentWillLoad(){this.shouldRender=this.visible,this.focusState.onChange((()=>{this.focusVersion++}))}componentDidLoad(){this.collectMenuItems()}componentDidUpdate(){this.collectMenuItems()}componentDidCatch(e){this.logger.error("Component error caught",e instanceof Error?e:new Error(String(e))),o.increment(m.COMPONENT_ERROR,{component:"bh-menu",error_type:e instanceof Error?e.name:"unknown"}),h("bh-menu",e)}handleVisibilityChange(e){e?(this.shouldRender=!0,this.isClosing=!1,this.bhOpen.emit(),this.focusedIndex=-1):(this.bhClose.emit(),this.animated?(this.isClosing=!0,setTimeout((()=>{this.shouldRender=!1,this.isClosing=!1}),l.MENU_CLOSE)):this.shouldRender=!1)}handleItemClick(e){e.stopPropagation();const t=this.findItemIndex(e),i=this.parsedMenuItems;this.bhItemClick.emit({index:t,item:t>=0&&t<i.length?i[t]:void 0})}handleSubmenuToggle(e){e.stopPropagation();const t=this.findItemIndex(e);e.detail.open?this.openSubmenuIndex=t:this.openSubmenuIndex===t&&(this.openSubmenuIndex=-1)}findItemIndex(e){for(const t of e.composedPath?.()??[]){const e=this.menuItemElements.indexOf(t);if(e>=0)return e}return this.menuItemElements.indexOf(e.target)}collectMenuItems(){const e=this.el.shadowRoot;if(!e)return;const t=e.querySelector('[role="menu"]');t&&(this.menuItemElements=[...Array.from(t.querySelectorAll("bh-menu-item")),...Array.from(this.el.querySelectorAll("bh-menu-item"))])}get parsedMenuItems(){if("string"==typeof this.menuItems){if(!this.menuItems)return[];const e=d(this.menuItems);return e.valid?Array.isArray(e.value)?e.value:(h("bh-menu",new Error("menuItems must be an array")),[]):(h("bh-menu",new Error(`Invalid menuItems JSON: ${e.errors.map((e=>e.message)).join(", ")}`)),[])}return Array.isArray(this.menuItems)?this.menuItems:[]}get parsedHeader(){if(this.header){if("string"==typeof this.header){const e=d(this.header);return e.valid?e.value??void 0:void h("bh-menu",new Error(`Invalid header JSON: ${e.errors.map((e=>e.message)).join(", ")}`))}return this.header}}async focusItem(e){for(let e=0;e<10&&(this.collectMenuItems(),!this.menuItemElements.some((e=>e.shadowRoot?.querySelector('[role="menuitem"]'))));e++)await new Promise((e=>requestAnimationFrame((()=>e(void 0)))));this.focusItemInternal(e)}focusItemInternal(e){const t=this.menuItemElements;if(0===t.length)return;let i=e,a=0;for(;a<t.length;){i<0&&(i=t.length-1),i>=t.length&&(i=0);const n=t[i];if(n&&!n.hasAttribute("disabled")&&"true"!==n.getAttribute("aria-disabled"))break;i+=e>this.focusedIndex?1:-1,a++}if(a>=t.length)return;this.focusedIndex=i;const n=t[i]?.shadowRoot?.querySelector('[role="menuitem"]');n?n.focus():t[i]?.focus()}openSubmenuForFocusedItem(){const e=this.menuItemElements[this.focusedIndex];e&&("menu"===e.getAttribute("aria-haspopup")||e.hasAttribute("has-submenu"))&&(this.openSubmenuIndex=this.focusedIndex,requestAnimationFrame((()=>{const t=e.shadowRoot?.querySelector("bh-menu"),i=t?.shadowRoot?.querySelector("bh-menu-item"),a=i?.shadowRoot?.querySelector('[role="menuitem"]');a&&a.focus()})))}closeSubmenu(){if(this.openSubmenuIndex>=0){const e=this.menuItemElements[this.openSubmenuIndex];this.openSubmenuIndex=-1;const t=e?.shadowRoot?.querySelector('[role="menuitem"]');t&&t.focus()}}handleKeyDown=e=>{const t="vertical"===this.orientation,i=t?c.ARROW_DOWN:c.ARROW_RIGHT,a=t?c.ARROW_UP:c.ARROW_LEFT,n=t?c.ARROW_RIGHT:c.ARROW_DOWN,r=t?c.ARROW_LEFT:c.ARROW_UP;switch(e.key){case i:e.preventDefault(),this.focusItemInternal(this.focusedIndex+1);break;case a:e.preventDefault(),this.focusItemInternal(this.focusedIndex-1);break;case n:n!==i&&(e.preventDefault(),this.openSubmenuForFocusedItem());break;case r:r!==a&&(e.preventDefault(),this.closeSubmenu());break;case c.HOME:e.preventDefault(),this.focusItemInternal(0);break;case c.END:e.preventDefault(),this.focusItemInternal(this.menuItemElements.length-1);break;case c.ESCAPE:e.preventDefault(),this.openSubmenuIndex>=0?this.closeSubmenu():this.visible=!1}};renderDataDrivenItems(){const e=this.parsedMenuItems;return 0===e.length?null:e.map(((e,t)=>{if(e.divider)return a("hr",{"aria-hidden":"true",class:"menu-divider",key:e.id??`divider-${t}`,part:"divider"});const i=e.variant??e.type??(e.icon?"icon":"default");return a("bh-menu-item",{avatarAlt:e.avatarAlt??"",avatarSrc:e.avatarSrc??"",disabled:e.disabled??!1,hasSubmenu:void 0!==e.children&&e.children.length>0||(e.hasSubmenu??!1),icon:e.icon??"",imageAlt:e.imageAlt??"",imageSrc:e.imageSrc??"",key:e.id??t,label:e.label??"",orientation:this.orientation,selected:e.selected??!1,shortcut:e.shortcut??"",submenuItems:e.children??[],submenuVisible:this.openSubmenuIndex===t,variant:this.showIcons||"icon"!==i?i:"default"})}))}renderHeader(){const e=this.parsedHeader;return e?a("div",{class:{"menu-header":!0,"menu-header--avatar":!!e.avatarGroup},part:"header"},e.avatarGroup&&a("div",{class:"menu-header-avatar-group"},a("bh-avatar",{alt:e.name||"Avatar",imageSrc:e.avatarSrc||void 0,size:"md",status:"online",variant:e.avatarSrc?"image":"placeholder"}),a("div",{class:"menu-header-avatar-text"},a("div",{class:"menu-header-avatar-name"},e.name),a("div",{class:"menu-header-avatar-email"},e.email))),!e.avatarGroup&&e.title&&a("div",{class:"menu-header-title"},e.title)):null}render(){if(!this.shouldRender)return null;const e="vertical"===this.orientation,t={menu:!0,"menu--vertical":e,"menu--horizontal":!e,"menu--scrollable":this.scrollable,"menu--animated":this.animated,"menu--closing":this.isClosing},i=this.renderDataDrivenItems(),n=null!==i;return a("div",{"aria-orientation":this.orientation,class:t,onKeyDown:this.handleKeyDown,part:"container",role:"menu"},this.renderHeader(),n?a("div",{class:"menu-items",part:"items"},i):a("slot",null))}static get watchers(){return{visible:[{handleVisibilityChange:0}]}}static get style(){return'@charset "UTF-8"; @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } @layer bh-tokens, bh-base, bh-variants, bh-states, bh-utilities; @layer bh-tokens { :host { } :host:popover-open { background: transparent; overflow: visible; display: block; margin: 0; inset: auto; border: 0; padding: 0; } :host { display: inline-block; --menu-bg: var(--color-bg-primary); --menu-border-color: var(--color-border-secondary); --menu-radius-vertical: var(--radius-md); --menu-radius-horizontal: var(--radius-xl); --menu-shadow: var(--shadow-md); --menu-padding: var(--spacing-xs); --menu-gap: var(--spacing-xxs); --menu-min-width: 240px; } } @layer bh-base { .menu { display: flex; background-color: var(--menu-bg); box-sizing: border-box; list-style: none; margin: 0; outline: none; overflow: hidden; } .menu-items { display: flex; flex-direction: column; flex: 1; gap: var(--menu-gap); } .menu-divider { height: 1px; background: var(--menu-border-color); border: none; margin: 0; margin-top: var(--spacing-xs); } .menu-header { padding: var(--spacing-sm); border-bottom: 1px solid var(--menu-border-color); } .menu-header--avatar { padding: var(--spacing-sm); } .menu-header-avatar-group { display: flex; align-items: center; gap: var(--spacing-xl); width: 100%; } .menu-header-avatar-text { display: flex; flex-direction: column; flex: 1; min-width: 0; } .menu-header-avatar-name { font-family: var(--font-inter); font-weight: var(--weight-semibold); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .menu-header-avatar-email { font-family: var(--font-inter); font-weight: var(--weight-regular); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .menu-header-title { font-family: var(--font-inter); font-weight: var(--weight-semibold); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-primary); } } @layer bh-variants { .menu--vertical { flex-direction: column; min-width: var(--menu-min-width); padding-top: var(--spacing-xs); padding-bottom: var(--spacing-sm); border: 1px solid var(--menu-border-color); border-radius: var(--menu-radius-vertical); box-shadow: var(--menu-shadow); } .menu--horizontal { flex-direction: row; align-items: center; border-radius: var(--menu-radius-horizontal); gap: var(--spacing-xxs); } .menu--scrollable .menu-items { max-height: 280px; overflow-y: auto; overflow-x: hidden; } .menu--animated { animation: menuEnter var(--animation-duration-fast) ease-out forwards; } .menu--animated.menu--closing { animation: menuExit var(--animation-duration-fast) ease-in forwards; } @keyframes menuEnter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } } @keyframes menuExit { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-8px); } } }'}},[769,"bh-menu",{orientation:[1],visible:[1028],menuItems:[1,"menu-items"],header:[1],scrollable:[4],showIcons:[4,"show-icons"],animated:[4],focusVersion:[32],focusedIndex:[32],openSubmenuIndex:[32],isClosing:[32],shouldRender:[32],focusItem:[64]},[[0,"bhClick","handleItemClick"],[0,"bhSubmenuToggle","handleSubmenuToggle"]],{visible:[{handleVisibilityChange:0}]}]);function x(){"undefined"!=typeof customElements&&["bh-menu","bh-avatar","bh-menu","bh-menu-item"].forEach((e=>{switch(e){case"bh-menu":customElements.get(n(e))||customElements.define(n(e),f);break;case"bh-avatar":customElements.get(n(e))||r();break;case"bh-menu":customElements.get(n(e))||x();break;case"bh-menu-item":customElements.get(n(e))||g()}}))}export{f as B,p as a,g as b,x as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,H as t,c as s,h as i,d as r,t as a}from"./p-YZi6LqIt.js";import{d as o}from"./p-B7i48CAz.js";import{d as n}from"./p-Bk-ipvH3.js";import{d as h}from"./p-cD3vmu49.js";import{d as l}from"./p-BHeNnP2q.js";import{d as c}from"./p-B2KPN863.js";import{d}from"./p-BbPrWlsw.js";import{d as p}from"./p-CVSRqFZ0.js";import{d as b}from"./p-Bf_iTZDv.js";import{a as u,v as m}from"./p-L4Y2hq_b.js";import{K as g}from"./p-zdFuIabL.js";import{Z as v}from"./p-BoVgy_Ao.js";import{c as f,r as x}from"./p-BJXjqxlX.js";import{c as y}from"./p-YdVz1TeW.js";import{g as k}from"./p-CLrVoF3x.js";import{B as w,r as C}from"./p-BNVOtH-1.js";import{v as z}from"./p-DlPm3fIV.js";import{a as O}from"./p-BqJRACkO.js";import{c as j}from"./p-CFlb5gKI.js";import{c as V}from"./p-B93zYxiE.js";const I=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bhChange=s(this,"bhChange"),this.bhMultiChange=s(this,"bhMultiChange"),this.bhClear=s(this,"bhClear"),this.bhOpen=s(this,"bhOpen"),this.bhClose=s(this,"bhClose"),this.bhFocus=s(this,"bhFocus"),this.bhBlur=s(this,"bhBlur"),this.bhValidityChange=s(this,"bhValidityChange"),this.internals=this.attachInternals()}get el(){return this}internals;logger=f("bh-select");focusState=y();selectId=k("bh-select");triggerRef;menuRef;positioner;dismissalManager;i18nUnsubscribe;_cachedOptions=null;_lastOptionsInput="[]";searchInputRef;_justOpened=!1;_cachedValues=null;_lastValuesInput=null;label="";supportingText="";placeholder="Select…";name="";value="";required=!1;disabled=!1;error=!1;size="md";options="[]";multiple=!1;values="[]";maxTagsVisible=2;keepOpenOnSelect;searchable=!1;displayMode="text";triggerIcon="";clearable=!1;isOpen=!1;searchQuery="";activeIndex=-1;menuPosition={x:0,y:0};menuWidth=0;focusVersion=0;_i18nVersion=0;bhChange;bhMultiChange;bhClear;bhOpen;bhClose;bhFocus;bhBlur;bhValidityChange;componentDidCatch(e){this.logger.error("Component error caught",e instanceof Error?e:new Error(String(e))),x("bh-select",e)}componentWillLoad(){this.focusState.onChange((()=>{this.focusVersion++})),this.i18nUnsubscribe=w.onLocaleChange((()=>{this._i18nVersion++}))}componentDidLoad(){if(this.multiple){const e=this.parsedValues;this.name&&this.internals&&this.internals.setFormValue(e.length>0?e.join(","):null)}else u(this);this.updateRequiredValidity(),this.bhValidityChange.emit(this.internals?.validity)}componentDidUpdate(){this._justOpened&&this.searchInputRef&&(this._justOpened=!1,this.searchInputRef.focus())}disconnectedCallback(){this.dismissalManager?.destroy(),this.cleanupFloating(),this.i18nUnsubscribe?.()}formResetCallback(){this.multiple?this.values="[]":this.value=""}handleValueChange(){u(this),this.updateRequiredValidity(),this.bhValidityChange.emit(this.internals?.validity)}handleValuesChange(){if(this.multiple){const e=this.parsedValues;this.name&&this.internals&&this.internals.setFormValue(e.length>0?e.join(","):null),this.updateRequiredValidity(),this.bhValidityChange.emit(this.internals?.validity)}}handleRequiredChange(){this.updateRequiredValidity(),this.bhValidityChange.emit(this.internals?.validity)}handleOpenChange(e){e?(this.setupFloatingUI(),this.initDismissalManager(),this.dismissalManager?.enable()):(this.dismissalManager?.disable(),this.cleanupFloating())}updateRequiredValidity(){m(this.internals,this.required,this.multiple?this.parsedValues.length>0:Boolean(this.value),"Please select an option.")}get parsedOptions(){if(this.options!==this._lastOptionsInput)if(this._lastOptionsInput=this.options,"string"==typeof this.options){const e=z(this.options);e.valid&&Array.isArray(e.value)?this._cachedOptions=e.value:(this.logger.warn("Invalid options JSON:",{errors:e.errors}),this._cachedOptions=[])}else this._cachedOptions=this.options||[];return this._cachedOptions||[]}get selectedOption(){return this.parsedOptions.find((e=>e.value===this.value))}get parsedValues(){if(this.values!==this._lastValuesInput)if(this._lastValuesInput=this.values,Array.isArray(this.values))this._cachedValues=this.values;else{const e=z(this.values);this._cachedValues=e.valid&&Array.isArray(e.value)?e.value:[]}return this._cachedValues??[]}get selectedOptions(){const e=new Set(this.parsedValues);return this.parsedOptions.filter((t=>e.has(t.value)))}get filteredOptions(){const e=this.parsedOptions;if(!this.searchQuery)return e;const t=this.searchQuery.toLowerCase();return e.filter((e=>e.label.toLowerCase().includes(t)))}get displayedOptions(){return this.searchable?this.filteredOptions:this.parsedOptions}get enabledIndexes(){return this.displayedOptions.flatMap(((e,t)=>e.disabled?[]:[t]))}optionId(e){return`${this.selectId}-option-${e}`}openMenu(){if(!this.disabled&&!this.isOpen){if(this.searchable&&(this.searchQuery="",this._justOpened=!0),this.multiple)this.activeIndex=this.enabledIndexes[0]??-1;else{const e=this.displayedOptions.findIndex((e=>e.value===this.value&&!e.disabled));this.activeIndex=e>=0?e:this.enabledIndexes[0]??-1}this.isOpen=!0,this.bhOpen.emit()}}closeMenu(e){this.isOpen&&(this.isOpen=!1,this.searchable&&(this.searchQuery=""),this.bhClose.emit({reason:e}))}deselectOption(e){this.values=JSON.stringify(this.parsedValues.filter((t=>t!==e))),this.bhMultiChange.emit(this.selectedOptions)}handleSearchInput=e=>{this.searchQuery=e.target.value,this.activeIndex=this.enabledIndexes[0]??-1};clearAll=e=>{e.stopPropagation(),this.multiple?(this.values="[]",this.bhMultiChange.emit([])):this.value="",this.bhClear.emit()};toggleMenu=()=>{this.disabled||(this.isOpen?this.closeMenu():this.openMenu())};selectOption(e){if(!e.disabled)if(this.multiple){const t=this.parsedValues,s=t.includes(e.value);this.values=JSON.stringify(s?t.filter((t=>t!==e.value)):[...t,e.value]),this.bhMultiChange.emit(this.selectedOptions),(this.keepOpenOnSelect??1)||this.closeMenu("select")}else{if(this.value=e.value,this.bhChange.emit(e),this.keepOpenOnSelect)return;this.closeMenu("select")}}moveActive(e){const t=this.enabledIndexes;if(0===t.length)return;const s=t.indexOf(this.activeIndex);if(s<0)return void(this.activeIndex=e>0?t[0]:t[t.length-1]);const i=Math.max(0,Math.min(s+e,t.length-1));this.activeIndex=t[i]}handleTriggerKeyDown=e=>{if(!this.disabled)if(this.isOpen)switch(e.key){case g.ARROW_DOWN:e.preventDefault(),this.moveActive(1);break;case g.ARROW_UP:e.preventDefault(),this.moveActive(-1);break;case g.HOME:e.preventDefault(),this.activeIndex=this.enabledIndexes[0]??-1;break;case g.END:e.preventDefault(),this.activeIndex=this.enabledIndexes[this.enabledIndexes.length-1]??-1;break;case g.ENTER:case g.SPACE:{if(this.searchable&&e.key===g.SPACE)break;e.preventDefault();const t=this.displayedOptions[this.activeIndex];t&&this.selectOption(t);break}case g.ESCAPE:e.preventDefault(),this.closeMenu("escape")}else e.key!==g.ARROW_DOWN&&e.key!==g.ARROW_UP&&(!O(e)||this.searchable&&e.key===g.SPACE)||(e.preventDefault(),this.openMenu())};handleDismiss=()=>{this.closeMenu("outside-click")};initDismissalManager(){this.dismissalManager&&(this.dismissalManager.destroy(),this.dismissalManager=void 0),this.menuRef&&this.triggerRef&&(this.dismissalManager=j(this.menuRef,{onDismiss:this.handleDismiss,escapeKey:!1,clickOutside:!0,focusLoss:!1,excludeElements:[this.triggerRef]}))}async setupFloatingUI(){if(this.triggerRef&&this.menuRef)try{this.positioner=await V(this.triggerRef,this.menuRef,{placement:"bottom-start",offset:4,flip:!0,fallbackPlacements:["top-start"],shift:!0,shiftPadding:8,matchWidth:!0,timeoutMs:2e3,autoUpdate:!0},((e,t)=>{this.menuPosition={x:e,y:t}}))}catch(e){x("bh-select",e),this.fallbackPosition()}}fallbackPosition(){if(!this.triggerRef)return;const e=this.triggerRef.getBoundingClientRect();this.menuPosition={x:e.left,y:e.bottom+4},this.menuWidth=e.width}cleanupFloating(){this.positioner&&(this.positioner.destroy(),this.positioner=void 0)}handleFocus=e=>{this.focusState.handleFocus(e,(()=>this.bhFocus.emit()))};handleBlur=e=>{this.focusState.handleBlur(e,(()=>this.bhBlur.emit()))};handleMouseEnter=()=>{this.focusState.handleMouseEnter()};handleMouseLeave=()=>{this.focusState.handleMouseLeave()};render(){const e=this.selectedOption,t=`${this.selectId}-label`,s=`${this.selectId}-listbox`,a=`${this.selectId}-supporting`,o=this.multiple?this.parsedValues.length>0:Boolean(this.value),n={"select-trigger":!0,[`select-trigger-${this.size}`]:!0,"trigger-focused":this.focusState.isFocused||this.isOpen,"trigger-error":this.error,"trigger-disabled":this.disabled},h=this.isOpen?{position:"fixed",left:`${this.menuPosition.x}px`,top:`${this.menuPosition.y}px`,zIndex:String(v.POPOVER),width:this.menuWidth>0?`${this.menuWidth}px`:void 0}:{display:"none"};return i(r,{key:"54a25e68eb56eeb45dc02268b6841c3f56d4cd7f"},i("div",{key:"d79d8c99bc590fea80ffa93ec63049bf026842e4",class:"select-wrapper",part:"wrapper"},this.label&&i("span",{key:"5df519601e51b84a44e85be961e569c7f1d9c3a1",class:"select-label",id:t,part:"label"},this.label,this.required&&i("span",{key:"d40dc62c2f84d9b9aab95874b3fe3d079d1aaeef","aria-hidden":"true",class:"select-required"},"*")),i("div",{key:"b31c8aecfbe11de9a2c0768df92d903056d53e74","aria-activedescendant":this.isOpen&&this.activeIndex>=0?this.optionId(this.activeIndex):void 0,"aria-controls":s,"aria-describedby":this.supportingText?a:void 0,"aria-disabled":this.disabled?"true":void 0,"aria-expanded":String(this.isOpen),"aria-haspopup":"listbox","aria-invalid":this.error?"true":void 0,"aria-labelledby":this.label?t:void 0,"aria-required":this.required?"true":void 0,class:n,onBlur:this.handleBlur,onClick:this.toggleMenu,onFocus:this.handleFocus,onKeyDown:this.handleTriggerKeyDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,part:"trigger",ref:e=>this.triggerRef=e,role:"combobox",tabindex:this.disabled?-1:0},!this.multiple&&this.searchable&&!this.isOpen&&e?.avatar?i("bh-avatar",{"aria-hidden":"true",class:"trigger-selected-avatar",imageSrc:e.avatar,size:"xxs",variant:"image"}):this.triggerIcon&&i("span",{"aria-hidden":"true",class:"material-symbols-outlined trigger-leading-icon"},this.triggerIcon),this.multiple&&"tags"===this.displayMode?i("div",{class:"select-tags-content"},this.selectedOptions.slice(0,this.maxTagsVisible).map((e=>i("bh-tag",{action:"dismiss",avatarSrc:e.avatar??"",key:e.value,label:e.label,onBhClose:()=>this.deselectOption(e.value),size:"sm",variant:e.avatar?"avatar":"text-only"}))),this.selectedOptions.length>this.maxTagsVisible&&i("span",{class:"select-overflow-count"},"+",this.selectedOptions.length-this.maxTagsVisible),this.searchable?i("input",{class:"select-search-input",onClick:e=>{this.isOpen&&e.stopPropagation()},onInput:this.handleSearchInput,placeholder:0===this.selectedOptions.length?C("bh-select","placeholder",this.placeholder,"Select…"):"",ref:e=>{this.searchInputRef=e},type:"text",value:this.searchQuery}):0===this.selectedOptions.length&&i("span",{class:"select-placeholder"},C("bh-select","placeholder",this.placeholder,"Select…"))):this.multiple?this.parsedValues.length>0?i("span",{class:"select-value"},this.selectedOptions.map((e=>e.label)).join(", ")):i("span",{class:"select-placeholder"},C("bh-select","placeholder",this.placeholder,"Select…")):this.searchable?i("input",{class:"select-search-input",disabled:this.disabled,onClick:e=>{this.isOpen&&e.stopPropagation()},onInput:this.handleSearchInput,placeholder:C("bh-select","placeholder",this.placeholder,"Select…"),readOnly:!this.isOpen,ref:e=>{this.searchInputRef=e},type:"text",value:this.isOpen?this.searchQuery:e?.label??""}):e?i("span",{class:"select-value"},e.label):i("span",{class:"select-placeholder"},C("bh-select","placeholder",this.placeholder,"Select…")),this.clearable&&o&&i("button",{key:"34c5f3e3ffed7a3bc106ac25e70a10ab54778231","aria-label":"Clear selection",class:"trigger-clear",onClick:this.clearAll,tabIndex:-1,type:"button"},i("span",{key:"1e5ac56e69edadaee20dae25729d3078514a6f00","aria-hidden":"true",class:"material-symbols-outlined"},"close")),i("span",{key:"33359b20f7199171f04366b1176bca1f4ad4f6e1","aria-hidden":"true",class:"material-symbols-outlined trigger-icon"},this.isOpen?"expand_less":"expand_more")),this.supportingText&&i("div",{key:"3e07eec1338e2ed9415792f7ed4ade0b810e183e",class:{"supporting-text":!0,"supporting-error":this.error},id:a,part:"supporting-text"},this.supportingText),i("div",{key:"061c8a817d8ad2f530afde1afbf82d527fc64696","aria-labelledby":this.label?t:void 0,"aria-multiselectable":this.multiple?"true":void 0,class:{"select-menu":!0,"animate-menu-enter":this.isOpen},id:s,part:"menu",ref:e=>this.menuRef=e,role:"listbox",style:h},i("div",{key:"c99d558c9a8fd4774ba76f82dac6287bd533b25c",class:"menu-items"},this.displayedOptions.map(((e,t)=>{const s=this.multiple?this.parsedValues.includes(e.value):e.value===this.value;return i("div",{"aria-disabled":e.disabled?"true":void 0,"aria-selected":String(s),class:{"select-option":!0,"option-selected":s,"option-active":t===this.activeIndex,"option-disabled":!!e.disabled},id:this.optionId(t),key:e.value,onClick:()=>this.selectOption(e),role:"option"},i("div",{class:"option-content"},this.multiple&&"text"===this.displayMode&&i("bh-checkbox",{"aria-hidden":"true",checked:s,class:"option-checkbox",disabled:e.disabled,size:"sm",tabIndex:-1}),e.avatar?i("bh-avatar",{"aria-hidden":"true",class:"option-avatar",imageSrc:e.avatar,size:"xs",variant:"image"}):e.icon&&i("span",{"aria-hidden":"true",class:"material-symbols-outlined option-icon"},e.icon),i("span",{class:"option-label",title:e.label},e.label),(!this.multiple||"tags"===this.displayMode)&&s&&i("span",{"aria-hidden":"true",class:"material-symbols-outlined check-icon"},"check")))}))))))}static get formAssociated(){return!0}static get watchers(){return{value:[{handleValueChange:0}],values:[{handleValuesChange:0}],required:[{handleRequiredChange:0}],isOpen:[{handleOpenChange:0}]}}static get style(){return'@charset "UTF-8"; @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } @layer bh-tokens, bh-base, bh-variants, bh-states, bh-utilities; @layer bh-tokens { :host { display: block; position: relative; --bh-select-bg: var(--color-bg-primary); --bh-select-border: var(--color-border-primary); --bh-select-border-hover: var(--color-border-interactive); --bh-select-border-focus: var(--color-border-interactive); --bh-select-border-error: var(--color-border-error); --bh-select-text: var(--color-text-primary); --bh-select-placeholder: var(--color-text-tertiary); --bh-select-icon: var(--color-text-secondary); --bh-select-menu-bg: var(--color-surface-elevated); --bh-select-menu-radius: var(--radius-md); --bh-select-menu-shadow: var(--shadow-dropdown); --bh-select-menu-hover-bg: var(--color-bg-secondary); --bh-select-menu-selected-bg: var(--color-neutral-200); --bh-select-menu-text: var(--color-text-primary); --bh-select-menu-icon: var(--color-text-secondary); --bh-select-check-color: var(--color-text-interactive); } } @layer bh-base { .select-wrapper { position: relative; display: flex; flex-direction: column; gap: var(--spacing-xs); } .select-label { font-family: var(--font-inter); font-size: var(--text-sm-size); font-weight: var(--weight-medium); line-height: var(--line-height-normal); color: var(--bh-select-text); } .select-required { color: var(--color-text-error); margin-left: var(--spacing-xxs); } .select-trigger { display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-xs) var(--spacing-sm); background: var(--bh-select-bg); border: 1px solid var(--bh-select-border); border-radius: var(--radius-md); cursor: pointer; outline: none; transition: border-color var(--animation-duration-fast) ease, box-shadow var(--animation-duration-fast) ease; box-sizing: border-box; } .select-value, .select-placeholder { font-family: var(--font-inter); font-size: var(--text-sm-size); line-height: var(--line-height-normal); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .select-value { color: var(--bh-select-text); } .select-placeholder { color: var(--bh-select-placeholder); } .trigger-icon { font-size: var(--icon-size-md); color: var(--bh-select-icon); flex-shrink: 0; user-select: none; } .supporting-text { font-family: var(--font-inter); font-size: var(--text-xs-size); line-height: var(--line-height-normal); color: var(--color-text-secondary); } .supporting-error { color: var(--color-text-error); } .select-menu:popover-open { margin: 0; inset: auto; border: 0; padding: 0; } .select-menu { min-width: 200px; background: var(--bh-select-menu-bg); border-radius: var(--bh-select-menu-radius); box-shadow: var(--bh-select-menu-shadow); overflow: hidden; box-sizing: border-box; } .menu-items { padding: var(--spacing-xs) 0; max-height: 280px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--color-border-secondary) var(--color-bg-secondary); } .menu-items::-webkit-scrollbar { width: var(--sp-1-5); } .menu-items::-webkit-scrollbar-track { background: var(--color-bg-secondary); border-radius: var(--radius-xs); } .menu-items::-webkit-scrollbar-thumb { background: var(--color-border-secondary); border-radius: var(--radius-xs); } .menu-items::-webkit-scrollbar-thumb:hover { background: var(--color-border-primary); } .select-option { padding: var(--spacing-none) var(--spacing-sm); cursor: pointer; outline: none; } .option-content { display: flex; align-items: center; gap: var(--spacing-md); padding: var(--spacing-sm); border-radius: var(--radius-sm); transition: background-color var(--animation-duration-fast) ease; } .option-icon { font-size: var(--text-lg-size); color: var(--bh-select-menu-icon); flex-shrink: 0; display: flex; align-items: center; justify-content: center; } .option-label { font-family: var(--font-inter); font-weight: var(--weight-medium); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--bh-select-menu-text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .check-icon { font-size: var(--text-lg-size); color: var(--bh-select-check-color); flex-shrink: 0; } .option-checkbox { flex-shrink: 0; pointer-events: none; } .option-avatar { flex-shrink: 0; } .trigger-selected-avatar { flex-shrink: 0; display: flex; align-items: center; } .trigger-leading-icon { font-size: var(--icon-size-md); color: var(--bh-select-icon); flex-shrink: 0; user-select: none; } .select-tags-content { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--spacing-xs); flex: 1; min-width: 0; overflow: hidden; } .select-overflow-count { font-family: var(--font-inter); font-size: var(--text-xs-size); font-weight: var(--weight-medium); line-height: var(--line-height-normal); color: var(--color-text-secondary); background: var(--color-bg-secondary); border-radius: var(--radius-full, 9999px); padding: 2px var(--spacing-xs); white-space: nowrap; flex-shrink: 0; } .trigger-clear { display: flex; align-items: center; justify-content: center; background: none; border: none; padding: 0; cursor: pointer; color: var(--bh-select-icon); flex-shrink: 0; line-height: 1; } .trigger-clear .material-symbols-outlined { font-size: var(--icon-size-md); } .trigger-clear:hover { color: var(--color-text-primary); } .select-search-input { font-family: var(--font-inter); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--bh-select-text); border: none; outline: none; background: transparent; padding: 0; flex: 1; min-width: 80px; } .select-search-input::placeholder { color: var(--bh-select-placeholder); } .select-search-input:read-only { cursor: pointer; } } @layer bh-variants { .select-trigger-sm { min-height: var(--bh-button-height-sm); } .select-trigger-md { min-height: var(--bh-button-height-md); } .select-trigger-lg { min-height: var(--bh-button-height-lg); } } @layer bh-states { .select-trigger:hover:not(.trigger-disabled) { border-color: var(--bh-select-border-hover); } .trigger-focused { border-color: var(--bh-select-border-focus); box-shadow: 0 0 0 2px var(--bh-select-border-focus); } .trigger-error { border-color: var(--bh-select-border-error); } .trigger-error.trigger-focused { box-shadow: 0 0 0 2px var(--bh-select-border-error); } .trigger-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; } .select-option:hover:not(.option-disabled) .option-content { background: var(--bh-select-menu-hover-bg); } .option-active:not(.option-disabled) .option-content { background: var(--bh-select-menu-hover-bg); } .option-selected .option-content { background: var(--bh-select-menu-selected-bg); } .option-selected .option-label { font-weight: var(--weight-semibold); } .option-disabled { opacity: 0.5; cursor: not-allowed; } } @layer bh-utilities { .animate-menu-enter { animation: menuEnter var(--animation-duration-fast) ease-out forwards; } @keyframes menuEnter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } } }'}},[577,"bh-select",{label:[1],supportingText:[1,"supporting-text"],placeholder:[1],name:[1],value:[1537],required:[4],disabled:[4],error:[4],size:[1],options:[1],multiple:[4],values:[1025],maxTagsVisible:[2,"max-tags-visible"],keepOpenOnSelect:[4,"keep-open-on-select"],searchable:[4],displayMode:[1,"display-mode"],triggerIcon:[1,"trigger-icon"],clearable:[4],isOpen:[32],searchQuery:[32],activeIndex:[32],menuPosition:[32],menuWidth:[32],focusVersion:[32],_i18nVersion:[32]},void 0,{value:[{handleValueChange:0}],values:[{handleValuesChange:0}],required:[{handleRequiredChange:0}],isOpen:[{handleOpenChange:0}]}]);function S(){"undefined"!=typeof customElements&&["bh-select","bh-avatar","bh-badge-dot","bh-button-icon","bh-checkbox","bh-label","bh-loader-spinner","bh-tag","bh-tooltip"].forEach((e=>{switch(e){case"bh-select":customElements.get(a(e))||customElements.define(a(e),I);break;case"bh-avatar":customElements.get(a(e))||o();break;case"bh-badge-dot":customElements.get(a(e))||n();break;case"bh-button-icon":customElements.get(a(e))||h();break;case"bh-checkbox":customElements.get(a(e))||l();break;case"bh-label":customElements.get(a(e))||c();break;case"bh-loader-spinner":customElements.get(a(e))||d();break;case"bh-tag":customElements.get(a(e))||p();break;case"bh-tooltip":customElements.get(a(e))||b()}}))}export{I as B,S as d}
|
|
1
|
+
import{p as e,H as t,c as s,h as i,d as r,t as a}from"./p-YZi6LqIt.js";import{d as o}from"./p-DJlRFgcj.js";import{d as n}from"./p-Be6mIKzo.js";import{d as h}from"./p-CClVva-u.js";import{d as l}from"./p-DfCONXO0.js";import{d as c}from"./p-C7fkgBQS.js";import{d}from"./p-BbPrWlsw.js";import{d as b}from"./p-DjpXtbw8.js";import{d as p}from"./p-D6aw0IK6.js";import{a as u,v as g}from"./p-L4Y2hq_b.js";import{K as m}from"./p-zdFuIabL.js";import{Z as v}from"./p-BoVgy_Ao.js";import{c as f,r as x}from"./p-BJXjqxlX.js";import{c as y}from"./p-YdVz1TeW.js";import{g as k}from"./p-CLrVoF3x.js";import{B as w,r as C}from"./p-BNVOtH-1.js";import{v as z}from"./p-DlPm3fIV.js";import{a as O}from"./p-BqJRACkO.js";import{c as j}from"./p-CFlb5gKI.js";import{c as I}from"./p-B93zYxiE.js";const V=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bhChange=s(this,"bhChange"),this.bhMultiChange=s(this,"bhMultiChange"),this.bhClear=s(this,"bhClear"),this.bhOpen=s(this,"bhOpen"),this.bhClose=s(this,"bhClose"),this.bhFocus=s(this,"bhFocus"),this.bhBlur=s(this,"bhBlur"),this.bhValidityChange=s(this,"bhValidityChange"),this.internals=this.attachInternals()}get el(){return this}internals;logger=f("bh-select");focusState=y();selectId=k("bh-select");triggerRef;menuRef;positioner;dismissalManager;i18nUnsubscribe;_cachedOptions=null;_lastOptionsInput="[]";searchInputRef;_justOpened=!1;_cachedValues=null;_lastValuesInput=null;label="";supportingText="";placeholder="Select…";name="";value="";required=!1;disabled=!1;error=!1;size="md";options="[]";multiple=!1;values="[]";maxTagsVisible=2;keepOpenOnSelect;searchable=!1;displayMode="text";triggerIcon="";clearable=!1;isOpen=!1;searchQuery="";activeIndex=-1;menuPosition={x:0,y:0};menuWidth=0;focusVersion=0;_i18nVersion=0;bhChange;bhMultiChange;bhClear;bhOpen;bhClose;bhFocus;bhBlur;bhValidityChange;componentDidCatch(e){this.logger.error("Component error caught",e instanceof Error?e:new Error(String(e))),x("bh-select",e)}componentWillLoad(){this.focusState.onChange((()=>{this.focusVersion++})),this.i18nUnsubscribe=w.onLocaleChange((()=>{this._i18nVersion++}))}componentDidLoad(){if(this.multiple){const e=this.parsedValues;this.name&&this.internals&&this.internals.setFormValue(e.length>0?e.join(","):null)}else u(this);this.updateRequiredValidity(),this.bhValidityChange.emit(this.internals?.validity)}componentDidUpdate(){this._justOpened&&this.searchInputRef&&(this._justOpened=!1,this.searchInputRef.focus())}disconnectedCallback(){this.dismissalManager?.destroy(),this.cleanupFloating(),this.i18nUnsubscribe?.()}formResetCallback(){this.multiple?this.values="[]":this.value=""}handleValueChange(){u(this),this.updateRequiredValidity(),this.bhValidityChange.emit(this.internals?.validity)}handleValuesChange(){if(this.multiple){const e=this.parsedValues;this.name&&this.internals&&this.internals.setFormValue(e.length>0?e.join(","):null),this.updateRequiredValidity(),this.bhValidityChange.emit(this.internals?.validity)}}handleRequiredChange(){this.updateRequiredValidity(),this.bhValidityChange.emit(this.internals?.validity)}handleOpenChange(e){e?(this.setupFloatingUI(),this.initDismissalManager(),this.dismissalManager?.enable()):(this.dismissalManager?.disable(),this.cleanupFloating())}updateRequiredValidity(){g(this.internals,this.required,this.multiple?this.parsedValues.length>0:Boolean(this.value),"Please select an option.")}get parsedOptions(){if(this.options!==this._lastOptionsInput)if(this._lastOptionsInput=this.options,"string"==typeof this.options){const e=z(this.options);e.valid&&Array.isArray(e.value)?this._cachedOptions=e.value:(this.logger.warn("Invalid options JSON:",{errors:e.errors}),this._cachedOptions=[])}else this._cachedOptions=this.options||[];return this._cachedOptions||[]}get selectedOption(){return this.parsedOptions.find((e=>e.value===this.value))}get parsedValues(){if(this.values!==this._lastValuesInput)if(this._lastValuesInput=this.values,Array.isArray(this.values))this._cachedValues=this.values;else{const e=z(this.values);this._cachedValues=e.valid&&Array.isArray(e.value)?e.value:[]}return this._cachedValues??[]}get selectedOptions(){const e=new Set(this.parsedValues);return this.parsedOptions.filter((t=>e.has(t.value)))}get filteredOptions(){const e=this.parsedOptions;if(!this.searchQuery)return e;const t=this.searchQuery.toLowerCase();return e.filter((e=>e.label.toLowerCase().includes(t)))}get displayedOptions(){return this.searchable?this.filteredOptions:this.parsedOptions}get enabledIndexes(){return this.displayedOptions.flatMap(((e,t)=>e.disabled?[]:[t]))}optionId(e){return`${this.selectId}-option-${e}`}openMenu(){if(!this.disabled&&!this.isOpen){if(this.searchable&&(this.searchQuery="",this._justOpened=!0),this.multiple)this.activeIndex=this.enabledIndexes[0]??-1;else{const e=this.displayedOptions.findIndex((e=>e.value===this.value&&!e.disabled));this.activeIndex=e>=0?e:this.enabledIndexes[0]??-1}this.isOpen=!0,this.bhOpen.emit()}}closeMenu(e){this.isOpen&&(this.isOpen=!1,this.searchable&&(this.searchQuery=""),this.bhClose.emit({reason:e}))}deselectOption(e){this.values=JSON.stringify(this.parsedValues.filter((t=>t!==e))),this.bhMultiChange.emit(this.selectedOptions)}handleSearchInput=e=>{this.searchQuery=e.target.value,this.activeIndex=this.enabledIndexes[0]??-1};clearAll=e=>{e.stopPropagation(),this.multiple?(this.values="[]",this.bhMultiChange.emit([])):this.value="",this.bhClear.emit()};toggleMenu=()=>{this.disabled||(this.isOpen?this.closeMenu():this.openMenu())};selectOption(e){if(!e.disabled)if(this.multiple){const t=this.parsedValues,s=t.includes(e.value);this.values=JSON.stringify(s?t.filter((t=>t!==e.value)):[...t,e.value]),this.bhMultiChange.emit(this.selectedOptions),(this.keepOpenOnSelect??1)||this.closeMenu("select")}else{if(this.value=e.value,this.bhChange.emit(e),this.keepOpenOnSelect)return;this.closeMenu("select")}}moveActive(e){const t=this.enabledIndexes;if(0===t.length)return;const s=t.indexOf(this.activeIndex);if(s<0)return void(this.activeIndex=e>0?t[0]:t[t.length-1]);const i=Math.max(0,Math.min(s+e,t.length-1));this.activeIndex=t[i]}handleTriggerKeyDown=e=>{if(!this.disabled)if(this.isOpen)switch(e.key){case m.ARROW_DOWN:e.preventDefault(),this.moveActive(1);break;case m.ARROW_UP:e.preventDefault(),this.moveActive(-1);break;case m.HOME:e.preventDefault(),this.activeIndex=this.enabledIndexes[0]??-1;break;case m.END:e.preventDefault(),this.activeIndex=this.enabledIndexes[this.enabledIndexes.length-1]??-1;break;case m.ENTER:case m.SPACE:{if(this.searchable&&e.key===m.SPACE)break;e.preventDefault();const t=this.displayedOptions[this.activeIndex];t&&this.selectOption(t);break}case m.ESCAPE:e.preventDefault(),this.closeMenu("escape")}else e.key!==m.ARROW_DOWN&&e.key!==m.ARROW_UP&&(!O(e)||this.searchable&&e.key===m.SPACE)||(e.preventDefault(),this.openMenu())};handleDismiss=()=>{this.closeMenu("outside-click")};initDismissalManager(){this.dismissalManager&&(this.dismissalManager.destroy(),this.dismissalManager=void 0),this.menuRef&&this.triggerRef&&(this.dismissalManager=j(this.menuRef,{onDismiss:this.handleDismiss,escapeKey:!1,clickOutside:!0,focusLoss:!1,excludeElements:[this.triggerRef]}))}async setupFloatingUI(){if(this.triggerRef&&this.menuRef)try{this.positioner=await I(this.triggerRef,this.menuRef,{placement:"bottom-start",offset:4,flip:!0,fallbackPlacements:["top-start"],shift:!0,shiftPadding:8,matchWidth:!0,timeoutMs:2e3,autoUpdate:!0},((e,t)=>{this.menuPosition={x:e,y:t}}))}catch(e){x("bh-select",e),this.fallbackPosition()}}fallbackPosition(){if(!this.triggerRef)return;const e=this.triggerRef.getBoundingClientRect();this.menuPosition={x:e.left,y:e.bottom+4},this.menuWidth=e.width}cleanupFloating(){this.positioner&&(this.positioner.destroy(),this.positioner=void 0)}handleFocus=e=>{this.focusState.handleFocus(e,(()=>this.bhFocus.emit()))};handleBlur=e=>{this.focusState.handleBlur(e,(()=>this.bhBlur.emit()))};handleMouseEnter=()=>{this.focusState.handleMouseEnter()};handleMouseLeave=()=>{this.focusState.handleMouseLeave()};render(){const e=this.selectedOption,t=`${this.selectId}-label`,s=`${this.selectId}-listbox`,a=`${this.selectId}-supporting`,o=this.multiple?this.parsedValues.length>0:Boolean(this.value),n={"select-trigger":!0,[`select-trigger-${this.size}`]:!0,"trigger-focused":this.focusState.isFocused||this.isOpen,"trigger-error":this.error,"trigger-disabled":this.disabled},h=this.isOpen?{position:"fixed",left:`${this.menuPosition.x}px`,top:`${this.menuPosition.y}px`,zIndex:String(v.POPOVER),width:this.menuWidth>0?`${this.menuWidth}px`:void 0}:{display:"none"};return i(r,{key:"43f8bb5f4e255ab16856ae95df0fa99b13479168"},i("div",{key:"ff1b24b8180c0369bbbc3f5a7d80d9cc04ae4c58",class:"select-wrapper",part:"wrapper"},this.label&&i("span",{key:"7999ddb59b69cc028089060abd65d39cddcc6477",class:"select-label",id:t,part:"label"},this.label,this.required&&i("span",{key:"801a705676425d1f3894eeb088fb0d244ea6f498","aria-hidden":"true",class:"select-required"},"*")),i("div",{key:"f10ec8ddb06c3b7d738ee667afe3cb07c255e502","aria-activedescendant":this.isOpen&&this.activeIndex>=0?this.optionId(this.activeIndex):void 0,"aria-controls":s,"aria-describedby":this.supportingText?a:void 0,"aria-disabled":this.disabled?"true":void 0,"aria-expanded":String(this.isOpen),"aria-haspopup":"listbox","aria-invalid":this.error?"true":void 0,"aria-labelledby":this.label?t:void 0,"aria-required":this.required?"true":void 0,class:n,onBlur:this.handleBlur,onClick:this.toggleMenu,onFocus:this.handleFocus,onKeyDown:this.handleTriggerKeyDown,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,part:"trigger",ref:e=>this.triggerRef=e,role:"combobox",tabindex:this.disabled?-1:0},!this.multiple&&this.searchable&&!this.isOpen&&e?.avatar?i("bh-avatar",{"aria-hidden":"true",class:"trigger-selected-avatar",imageSrc:e.avatar,size:"xxs",variant:"image"}):this.triggerIcon&&i("span",{"aria-hidden":"true",class:"material-symbols-outlined trigger-leading-icon"},this.triggerIcon),this.multiple&&"tags"===this.displayMode?i("div",{class:"select-tags-content"},this.selectedOptions.slice(0,this.maxTagsVisible).map((e=>i("bh-tag",{action:"dismiss",avatarSrc:e.avatar??"",key:e.value,label:e.label,onBhClose:()=>this.deselectOption(e.value),size:"sm",variant:e.avatar?"avatar":"text-only"}))),this.selectedOptions.length>this.maxTagsVisible&&i("span",{class:"select-overflow-count"},"+",this.selectedOptions.length-this.maxTagsVisible),this.searchable?i("input",{class:"select-search-input",onClick:e=>{this.isOpen&&e.stopPropagation()},onInput:this.handleSearchInput,placeholder:0===this.selectedOptions.length?C("bh-select","placeholder",this.placeholder,"Select…"):"",ref:e=>{this.searchInputRef=e},type:"text",value:this.searchQuery}):0===this.selectedOptions.length&&i("span",{class:"select-placeholder"},C("bh-select","placeholder",this.placeholder,"Select…"))):this.multiple?this.parsedValues.length>0?i("span",{class:"select-value"},this.selectedOptions.map((e=>e.label)).join(", ")):i("span",{class:"select-placeholder"},C("bh-select","placeholder",this.placeholder,"Select…")):this.searchable?i("input",{class:"select-search-input",disabled:this.disabled,onClick:e=>{this.isOpen&&e.stopPropagation()},onInput:this.handleSearchInput,placeholder:C("bh-select","placeholder",this.placeholder,"Select…"),readOnly:!this.isOpen,ref:e=>{this.searchInputRef=e},type:"text",value:this.isOpen?this.searchQuery:e?.label??""}):e?i("span",{class:"select-value"},e.label):i("span",{class:"select-placeholder"},C("bh-select","placeholder",this.placeholder,"Select…")),this.clearable&&o&&i("button",{key:"c062ac5e898db328ec3ff70daf488ecddb246238","aria-label":"Clear selection",class:"trigger-clear",onClick:this.clearAll,tabIndex:-1,type:"button"},i("span",{key:"89e0d0c5288c7c2345a3e576a006442bd7c079ae","aria-hidden":"true",class:"material-symbols-outlined"},"close")),i("span",{key:"a3336ce2bf823cccdae80eff7c472b259b43e51c","aria-hidden":"true",class:"material-symbols-outlined trigger-icon"},this.isOpen?"expand_less":"expand_more")),this.supportingText&&i("div",{key:"d35ed101cccc3eb83a4a8fc15f2b53f4afb28773",class:{"supporting-text":!0,"supporting-error":this.error},id:a,part:"supporting-text"},this.supportingText),i("div",{key:"4f971a6b8303001b0036cc8d37b8fa8d31dbdb26","aria-labelledby":this.label?t:void 0,"aria-multiselectable":this.multiple?"true":void 0,class:{"select-menu":!0,"animate-menu-enter":this.isOpen},id:s,part:"menu",ref:e=>this.menuRef=e,role:"listbox",style:h},i("div",{key:"fe60eb6b80628bd41af456f4576ae26ac8fc8d76",class:"menu-items"},this.displayedOptions.map(((e,t)=>{const s=this.multiple?this.parsedValues.includes(e.value):e.value===this.value;return i("div",{"aria-disabled":e.disabled?"true":void 0,"aria-selected":String(s),class:{"select-option":!0,"option-selected":s,"option-active":t===this.activeIndex,"option-disabled":!!e.disabled},id:this.optionId(t),key:e.value,onClick:()=>this.selectOption(e),role:"option"},i("div",{class:"option-content"},this.multiple&&"text"===this.displayMode&&i("bh-checkbox",{"aria-hidden":"true",checked:s,class:"option-checkbox",disabled:e.disabled,size:"sm",tabIndex:-1}),e.avatar?i("bh-avatar",{"aria-hidden":"true",class:"option-avatar",imageSrc:e.avatar,size:"xs",variant:"image"}):e.icon&&i("span",{"aria-hidden":"true",class:"material-symbols-outlined option-icon"},e.icon),i("span",{class:"option-label",title:e.label},e.label),(!this.multiple||"tags"===this.displayMode)&&s&&i("span",{"aria-hidden":"true",class:"material-symbols-outlined check-icon"},"check")))}))))))}static get formAssociated(){return!0}static get watchers(){return{value:[{handleValueChange:0}],values:[{handleValuesChange:0}],required:[{handleRequiredChange:0}],isOpen:[{handleOpenChange:0}]}}static get style(){return'@charset "UTF-8"; @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } @layer bh-tokens, bh-base, bh-variants, bh-states, bh-utilities; @layer bh-tokens { :host { display: block; position: relative; --bh-select-bg: var(--color-bg-primary); --bh-select-border: var(--color-border-primary); --bh-select-border-hover: var(--color-border-interactive); --bh-select-border-focus: var(--color-border-interactive); --bh-select-border-error: var(--color-border-error); --bh-select-text: var(--color-text-primary); --bh-select-placeholder: var(--color-text-tertiary); --bh-select-icon: var(--color-text-secondary); --bh-select-menu-bg: var(--color-surface-elevated); --bh-select-menu-radius: var(--radius-md); --bh-select-menu-shadow: var(--shadow-dropdown); --bh-select-menu-hover-bg: var(--color-bg-secondary); --bh-select-menu-selected-bg: var(--color-neutral-200); --bh-select-menu-text: var(--color-text-primary); --bh-select-menu-icon: var(--color-text-secondary); --bh-select-check-color: var(--color-text-interactive); } } @layer bh-base { .select-wrapper { position: relative; display: flex; flex-direction: column; gap: var(--spacing-xs); } .select-label { font-family: var(--font-inter); font-size: var(--text-sm-size); font-weight: var(--weight-medium); line-height: var(--line-height-normal); color: var(--bh-select-text); } .select-required { color: var(--color-text-error); margin-left: var(--spacing-xxs); } .select-trigger { display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-xs) var(--spacing-sm); background: var(--bh-select-bg); border: 1px solid var(--bh-select-border); border-radius: var(--radius-md); cursor: pointer; outline: none; transition: border-color var(--animation-duration-fast) ease, box-shadow var(--animation-duration-fast) ease; box-sizing: border-box; } .select-value, .select-placeholder { font-family: var(--font-inter); font-size: var(--text-sm-size); line-height: var(--line-height-normal); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .select-value { color: var(--bh-select-text); } .select-placeholder { color: var(--bh-select-placeholder); } .trigger-icon { font-size: var(--icon-size-md); color: var(--bh-select-icon); flex-shrink: 0; user-select: none; } .supporting-text { font-family: var(--font-inter); font-size: var(--text-xs-size); line-height: var(--line-height-normal); color: var(--color-text-secondary); } .supporting-error { color: var(--color-text-error); } .select-menu:popover-open { margin: 0; inset: auto; border: 0; padding: 0; } .select-menu { min-width: 200px; background: var(--bh-select-menu-bg); border-radius: var(--bh-select-menu-radius); box-shadow: var(--bh-select-menu-shadow); overflow: hidden; box-sizing: border-box; } .menu-items { padding: var(--spacing-xs) 0; max-height: 280px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--color-border-secondary) var(--color-bg-secondary); } .menu-items::-webkit-scrollbar { width: var(--sp-1-5); } .menu-items::-webkit-scrollbar-track { background: var(--color-bg-secondary); border-radius: var(--radius-xs); } .menu-items::-webkit-scrollbar-thumb { background: var(--color-border-secondary); border-radius: var(--radius-xs); } .menu-items::-webkit-scrollbar-thumb:hover { background: var(--color-border-primary); } .select-option { padding: var(--spacing-none) var(--spacing-sm); cursor: pointer; outline: none; } .option-content { display: flex; align-items: center; gap: var(--spacing-md); padding: var(--spacing-sm); border-radius: var(--radius-sm); transition: background-color var(--animation-duration-fast) ease; } .option-icon { font-size: var(--text-lg-size); color: var(--bh-select-menu-icon); flex-shrink: 0; display: flex; align-items: center; justify-content: center; } .option-label { font-family: var(--font-inter); font-weight: var(--weight-medium); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--bh-select-menu-text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .check-icon { font-size: var(--text-lg-size); color: var(--bh-select-check-color); flex-shrink: 0; } .option-checkbox { flex-shrink: 0; pointer-events: none; } .option-avatar { flex-shrink: 0; } .trigger-selected-avatar { flex-shrink: 0; display: flex; align-items: center; } .trigger-leading-icon { font-size: var(--icon-size-md); color: var(--bh-select-icon); flex-shrink: 0; user-select: none; } .select-tags-content { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--spacing-xs); flex: 1; min-width: 0; overflow: hidden; } .select-overflow-count { font-family: var(--font-inter); font-size: var(--text-xs-size); font-weight: var(--weight-medium); line-height: var(--line-height-normal); color: var(--color-text-secondary); background: var(--color-bg-secondary); border-radius: var(--radius-full, 9999px); padding: 2px var(--spacing-xs); white-space: nowrap; flex-shrink: 0; } .trigger-clear { display: flex; align-items: center; justify-content: center; background: none; border: none; padding: 0; cursor: pointer; color: var(--bh-select-icon); flex-shrink: 0; line-height: 1; } .trigger-clear .material-symbols-outlined { font-size: var(--icon-size-md); } .trigger-clear:hover { color: var(--color-text-primary); } .select-search-input { font-family: var(--font-inter); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--bh-select-text); border: none; outline: none; background: transparent; padding: 0; flex: 1; min-width: 80px; } .select-search-input::placeholder { color: var(--bh-select-placeholder); } .select-search-input:read-only { cursor: pointer; } } @layer bh-variants { .select-trigger-sm { min-height: var(--bh-button-height-sm); } .select-trigger-md { min-height: var(--bh-button-height-md); } .select-trigger-lg { min-height: var(--bh-button-height-lg); } } @layer bh-states { .select-trigger:hover:not(.trigger-disabled) { border-color: var(--bh-select-border-hover); } .trigger-focused { border-color: var(--bh-select-border-focus); box-shadow: 0 0 0 2px var(--bh-select-border-focus); } .trigger-error { border-color: var(--bh-select-border-error); } .trigger-error.trigger-focused { box-shadow: 0 0 0 2px var(--bh-select-border-error); } .trigger-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; } .select-option:hover:not(.option-disabled) .option-content { background: var(--bh-select-menu-hover-bg); } .option-active:not(.option-disabled) .option-content { background: var(--bh-select-menu-hover-bg); } .option-selected .option-content { background: var(--bh-select-menu-selected-bg); } .option-selected .option-label { font-weight: var(--weight-semibold); } .option-disabled { opacity: 0.5; cursor: not-allowed; } } @layer bh-utilities { .animate-menu-enter { animation: menuEnter var(--animation-duration-fast) ease-out forwards; } @keyframes menuEnter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } } }'}},[577,"bh-select",{label:[1],supportingText:[1,"supporting-text"],placeholder:[1],name:[1],value:[1537],required:[4],disabled:[4],error:[4],size:[1],options:[1],multiple:[4],values:[1025],maxTagsVisible:[2,"max-tags-visible"],keepOpenOnSelect:[4,"keep-open-on-select"],searchable:[4],displayMode:[1,"display-mode"],triggerIcon:[1,"trigger-icon"],clearable:[4],isOpen:[32],searchQuery:[32],activeIndex:[32],menuPosition:[32],menuWidth:[32],focusVersion:[32],_i18nVersion:[32]},void 0,{value:[{handleValueChange:0}],values:[{handleValuesChange:0}],required:[{handleRequiredChange:0}],isOpen:[{handleOpenChange:0}]}]);function S(){"undefined"!=typeof customElements&&["bh-select","bh-avatar","bh-badge-dot","bh-button-icon","bh-checkbox","bh-label","bh-loader-spinner","bh-tag","bh-tooltip"].forEach((e=>{switch(e){case"bh-select":customElements.get(a(e))||customElements.define(a(e),V);break;case"bh-avatar":customElements.get(a(e))||o();break;case"bh-badge-dot":customElements.get(a(e))||n();break;case"bh-button-icon":customElements.get(a(e))||h();break;case"bh-checkbox":customElements.get(a(e))||l();break;case"bh-label":customElements.get(a(e))||c();break;case"bh-loader-spinner":customElements.get(a(e))||d();break;case"bh-tag":customElements.get(a(e))||b();break;case"bh-tooltip":customElements.get(a(e))||p()}}))}export{V as B,S as d}
|