@helixui/library 3.3.1 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +340 -71
- package/dist/components/hx-accordion/hx-accordion-item.d.ts +35 -0
- package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
- package/dist/components/hx-alert/hx-alert.d.ts +11 -0
- package/dist/components/hx-alert/hx-alert.d.ts.map +1 -1
- package/dist/components/hx-alert/hx-alert.styles.d.ts.map +1 -1
- package/dist/components/hx-alert/index.js +1 -1
- package/dist/components/hx-badge/hx-badge.styles.d.ts.map +1 -1
- package/dist/components/hx-badge/index.js +1 -1
- package/dist/components/hx-banner/hx-banner.d.ts +9 -1
- package/dist/components/hx-banner/hx-banner.d.ts.map +1 -1
- package/dist/components/hx-banner/index.js +1 -1
- package/dist/components/hx-button/hx-button.d.ts +11 -1
- package/dist/components/hx-button/hx-button.d.ts.map +1 -1
- package/dist/components/hx-button/index.js +1 -1
- package/dist/components/hx-button-group/hx-button-group.d.ts +13 -0
- package/dist/components/hx-button-group/hx-button-group.d.ts.map +1 -1
- package/dist/components/hx-button-group/index.js +1 -1
- package/dist/components/hx-checkbox/hx-checkbox.d.ts +153 -1
- package/dist/components/hx-checkbox/hx-checkbox.d.ts.map +1 -1
- package/dist/components/hx-checkbox/hx-checkbox.styles.d.ts.map +1 -1
- package/dist/components/hx-checkbox/index.js +1 -1
- package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts +151 -2
- package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts.map +1 -1
- package/dist/components/hx-checkbox-group/index.js +1 -1
- package/dist/components/hx-color-picker/hx-color-picker.d.ts +163 -1
- package/dist/components/hx-color-picker/hx-color-picker.d.ts.map +1 -1
- package/dist/components/hx-color-picker/hx-color-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-color-picker/index.js +1 -1
- package/dist/components/hx-combobox/hx-combobox.d.ts +311 -2
- package/dist/components/hx-combobox/hx-combobox.d.ts.map +1 -1
- package/dist/components/hx-combobox/index.js +1 -1
- package/dist/components/hx-data-table/hx-data-table.d.ts.map +1 -1
- package/dist/components/hx-data-table/index.js +1 -1
- package/dist/components/hx-date-picker/hx-date-picker.d.ts +182 -56
- package/dist/components/hx-date-picker/hx-date-picker.d.ts.map +1 -1
- package/dist/components/hx-date-picker/hx-date-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-date-picker/index.js +1 -1
- package/dist/components/hx-dialog/hx-dialog.d.ts +240 -0
- package/dist/components/hx-dialog/hx-dialog.d.ts.map +1 -1
- package/dist/components/hx-dialog/index.js +1 -1
- package/dist/components/hx-drawer/hx-drawer.d.ts +201 -0
- package/dist/components/hx-drawer/hx-drawer.d.ts.map +1 -1
- package/dist/components/hx-drawer/hx-drawer.styles.d.ts.map +1 -1
- package/dist/components/hx-drawer/index.js +1 -1
- package/dist/components/hx-dropdown/hx-dropdown.d.ts +168 -0
- package/dist/components/hx-dropdown/hx-dropdown.d.ts.map +1 -1
- package/dist/components/hx-dropdown/index.js +1 -1
- package/dist/components/hx-field/hx-field.d.ts +109 -0
- package/dist/components/hx-field/hx-field.d.ts.map +1 -1
- package/dist/components/hx-field/index.js +1 -1
- package/dist/components/hx-icon-button/hx-icon-button.d.ts +16 -3
- package/dist/components/hx-icon-button/hx-icon-button.d.ts.map +1 -1
- package/dist/components/hx-icon-button/hx-icon-button.styles.d.ts.map +1 -1
- package/dist/components/hx-icon-button/index.js +1 -1
- package/dist/components/hx-link/hx-link.d.ts +10 -1
- package/dist/components/hx-link/hx-link.d.ts.map +1 -1
- package/dist/components/hx-link/index.js +1 -1
- package/dist/components/hx-list/hx-list-item.d.ts +27 -1
- package/dist/components/hx-list/hx-list-item.d.ts.map +1 -1
- package/dist/components/hx-list/hx-list.d.ts +28 -0
- package/dist/components/hx-list/hx-list.d.ts.map +1 -1
- package/dist/components/hx-list/index.js +1 -1
- package/dist/components/hx-menu/hx-menu-divider.d.ts +10 -0
- package/dist/components/hx-menu/hx-menu-divider.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu-item.d.ts +99 -2
- package/dist/components/hx-menu/hx-menu-item.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu-item.styles.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu.d.ts +117 -2
- package/dist/components/hx-menu/hx-menu.d.ts.map +1 -1
- package/dist/components/hx-menu/index.js +1 -1
- package/dist/components/hx-meter/hx-meter.d.ts +39 -0
- package/dist/components/hx-meter/hx-meter.d.ts.map +1 -1
- package/dist/components/hx-meter/hx-meter.styles.d.ts.map +1 -1
- package/dist/components/hx-meter/index.js +1 -1
- package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts +132 -1
- package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts.map +1 -1
- package/dist/components/hx-overflow-menu/index.js +1 -1
- package/dist/components/hx-phi-field/hx-phi-field.d.ts +0 -1
- package/dist/components/hx-phi-field/hx-phi-field.d.ts.map +1 -1
- package/dist/components/hx-popover/hx-popover.d.ts +91 -0
- package/dist/components/hx-popover/hx-popover.d.ts.map +1 -1
- package/dist/components/hx-popover/index.js +1 -1
- package/dist/components/hx-progress-bar/hx-progress-bar.d.ts +33 -0
- package/dist/components/hx-progress-bar/hx-progress-bar.d.ts.map +1 -1
- package/dist/components/hx-progress-bar/index.js +1 -1
- package/dist/components/hx-radio-group/hx-radio-group.d.ts +152 -1
- package/dist/components/hx-radio-group/hx-radio-group.d.ts.map +1 -1
- package/dist/components/hx-radio-group/hx-radio.d.ts +14 -0
- package/dist/components/hx-radio-group/hx-radio.d.ts.map +1 -1
- package/dist/components/hx-radio-group/index.js +1 -1
- package/dist/components/hx-select/hx-select.d.ts +304 -2
- package/dist/components/hx-select/hx-select.d.ts.map +1 -1
- package/dist/components/hx-select/hx-select.styles.d.ts.map +1 -1
- package/dist/components/hx-select/index.js +1 -1
- package/dist/components/hx-side-nav/hx-nav-item.styles.d.ts.map +1 -1
- package/dist/components/hx-side-nav/index.js +1 -1
- package/dist/components/hx-spinner/hx-spinner.d.ts +14 -0
- package/dist/components/hx-spinner/hx-spinner.d.ts.map +1 -1
- package/dist/components/hx-spinner/index.js +1 -1
- package/dist/components/hx-split-button/hx-split-button.d.ts +94 -7
- package/dist/components/hx-split-button/hx-split-button.d.ts.map +1 -1
- package/dist/components/hx-split-button/index.js +1 -1
- package/dist/components/hx-stat/hx-stat.d.ts +28 -0
- package/dist/components/hx-stat/hx-stat.d.ts.map +1 -1
- package/dist/components/hx-stat/index.js +1 -1
- package/dist/components/hx-switch/hx-switch.d.ts +78 -1
- package/dist/components/hx-switch/hx-switch.d.ts.map +1 -1
- package/dist/components/hx-switch/hx-switch.styles.d.ts.map +1 -1
- package/dist/components/hx-switch/index.js +1 -1
- package/dist/components/hx-table/hx-td.d.ts +30 -3
- package/dist/components/hx-table/hx-td.d.ts.map +1 -1
- package/dist/components/hx-table/hx-th.d.ts +39 -3
- package/dist/components/hx-table/hx-th.d.ts.map +1 -1
- package/dist/components/hx-table/hx-tr.d.ts +26 -0
- package/dist/components/hx-table/hx-tr.d.ts.map +1 -1
- package/dist/components/hx-table/index.js +1 -1
- package/dist/components/hx-tabs/hx-tab-panel.d.ts +34 -0
- package/dist/components/hx-tabs/hx-tab-panel.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tab.d.ts +45 -2
- package/dist/components/hx-tabs/hx-tab.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tab.styles.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tabs.d.ts +32 -2
- package/dist/components/hx-tabs/hx-tabs.d.ts.map +1 -1
- package/dist/components/hx-tabs/index.js +1 -1
- package/dist/components/hx-tag/hx-tag.styles.d.ts.map +1 -1
- package/dist/components/hx-tag/index.js +1 -1
- package/dist/components/hx-theme/hx-theme.d.ts +10 -5
- package/dist/components/hx-theme/hx-theme.d.ts.map +1 -1
- package/dist/components/hx-time-picker/hx-time-picker.d.ts +210 -2
- package/dist/components/hx-time-picker/hx-time-picker.d.ts.map +1 -1
- package/dist/components/hx-time-picker/hx-time-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-time-picker/index.js +1 -1
- package/dist/components/hx-toast/hx-toast-stack.d.ts +14 -0
- package/dist/components/hx-toast/hx-toast-stack.d.ts.map +1 -1
- package/dist/components/hx-toast/hx-toast.d.ts +22 -3
- package/dist/components/hx-toast/hx-toast.d.ts.map +1 -1
- package/dist/components/hx-toast/index.js +1 -1
- package/dist/components/hx-toast/toast-factory.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/hx-toggle-button.d.ts +110 -0
- package/dist/components/hx-toggle-button/hx-toggle-button.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/hx-toggle-button.styles.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/index.js +1 -1
- package/dist/components/hx-tooltip/hx-tooltip.d.ts +52 -0
- package/dist/components/hx-tooltip/hx-tooltip.d.ts.map +1 -1
- package/dist/components/hx-tooltip/index.js +1 -1
- package/dist/components/hx-tree-view/hx-tree-item.d.ts +117 -12
- package/dist/components/hx-tree-view/hx-tree-item.d.ts.map +1 -1
- package/dist/components/hx-tree-view/hx-tree-view.d.ts +87 -7
- package/dist/components/hx-tree-view/hx-tree-view.d.ts.map +1 -1
- package/dist/components/hx-tree-view/index.js +1 -1
- package/dist/css/helix-all.css +221 -1
- package/dist/css/helix-core.css +81 -0
- package/dist/css/helix-feedback.css +14 -0
- package/dist/css/helix-forms.css +109 -1
- package/dist/css/helix-overlay.css +17 -0
- package/dist/css/hx-alert.css +9 -0
- package/dist/css/hx-badge.css +28 -0
- package/dist/css/hx-checkbox.css +18 -0
- package/dist/css/hx-color-picker.css +25 -0
- package/dist/css/hx-date-picker.css +2 -1
- package/dist/css/hx-drawer.css +17 -0
- package/dist/css/hx-icon-button.css +30 -0
- package/dist/css/hx-meter.css +5 -0
- package/dist/css/hx-select.css +19 -0
- package/dist/css/hx-switch.css +17 -0
- package/dist/css/hx-tag.css +23 -0
- package/dist/css/hx-time-picker.css +11 -0
- package/dist/css/hx-toggle-button.css +17 -0
- package/dist/css/index.css +1 -1
- package/dist/css/manifest.json +4 -1
- package/dist/index.js +38 -38
- package/dist/shared/aria-flatten-DY6v2vah.js +22 -0
- package/dist/shared/aria-flatten-DY6v2vah.js.map +1 -0
- package/dist/shared/aria-idref-CxvyzfQS.js +126 -0
- package/dist/shared/aria-idref-CxvyzfQS.js.map +1 -0
- package/dist/shared/hx-accordion-ZVzgDzTG.js.map +1 -1
- package/dist/shared/{hx-alert-CLn7CstP.js → hx-alert-Bto8-TIi.js} +55 -37
- package/dist/shared/hx-alert-Bto8-TIi.js.map +1 -0
- package/dist/shared/{hx-badge-CQXgOXJM.js → hx-badge-JlFtAdxS.js} +37 -9
- package/dist/shared/hx-badge-JlFtAdxS.js.map +1 -0
- package/dist/shared/{hx-banner-D3DzpfcP.js → hx-banner-fpRnciIO.js} +13 -5
- package/dist/shared/hx-banner-fpRnciIO.js.map +1 -0
- package/dist/shared/{hx-button-DPY6SPVT.js → hx-button-BOwAEcF1.js} +108 -85
- package/dist/shared/{hx-button-DPY6SPVT.js.map → hx-button-BOwAEcF1.js.map} +1 -1
- package/dist/shared/{hx-button-group-BI-QBqmO.js → hx-button-group-DcHP5MBv.js} +15 -16
- package/dist/shared/{hx-button-group-BI-QBqmO.js.map → hx-button-group-DcHP5MBv.js.map} +1 -1
- package/dist/shared/hx-checkbox-C48KYKFq.js +696 -0
- package/dist/shared/hx-checkbox-C48KYKFq.js.map +1 -0
- package/dist/shared/hx-checkbox-group-BJIAX3zU.js +496 -0
- package/dist/shared/hx-checkbox-group-BJIAX3zU.js.map +1 -0
- package/dist/shared/hx-color-picker-Dk4cBwYQ.js +1221 -0
- package/dist/shared/hx-color-picker-Dk4cBwYQ.js.map +1 -0
- package/dist/shared/hx-combobox-BTLO9qiK.js +1359 -0
- package/dist/shared/hx-combobox-BTLO9qiK.js.map +1 -0
- package/dist/shared/{hx-data-table-CLqVqdxr.js → hx-data-table-Ct3gQ6ya.js} +3 -2
- package/dist/shared/{hx-data-table-CLqVqdxr.js.map → hx-data-table-Ct3gQ6ya.js.map} +1 -1
- package/dist/shared/{hx-date-picker-2iRG1p74.js → hx-date-picker-CiR7FVnR.js} +542 -206
- package/dist/shared/hx-date-picker-CiR7FVnR.js.map +1 -0
- package/dist/shared/hx-dialog-AOZpHSuF.js +717 -0
- package/dist/shared/hx-dialog-AOZpHSuF.js.map +1 -0
- package/dist/shared/{hx-drawer-Y1Ui2IWJ.js → hx-drawer-DH6CdAN1.js} +300 -98
- package/dist/shared/hx-drawer-DH6CdAN1.js.map +1 -0
- package/dist/shared/hx-dropdown-DiLd40Lm.js +401 -0
- package/dist/shared/hx-dropdown-DiLd40Lm.js.map +1 -0
- package/dist/shared/{hx-field-B3Qo8OLS.js → hx-field-zw0U1KVi.js} +99 -38
- package/dist/shared/hx-field-zw0U1KVi.js.map +1 -0
- package/dist/shared/{hx-icon-button-CGNdQSFM.js → hx-icon-button-a6OpeQz5.js} +149 -68
- package/dist/shared/hx-icon-button-a6OpeQz5.js.map +1 -0
- package/dist/shared/{hx-link-C-O6vq0Q.js → hx-link-CMnZRUtQ.js} +55 -43
- package/dist/shared/hx-link-CMnZRUtQ.js.map +1 -0
- package/dist/shared/{hx-list-MyEhh8c7.js → hx-list-De66EtAP.js} +163 -107
- package/dist/shared/hx-list-De66EtAP.js.map +1 -0
- package/dist/shared/hx-menu-divider-BjiRIWKq.js +797 -0
- package/dist/shared/hx-menu-divider-BjiRIWKq.js.map +1 -0
- package/dist/shared/{hx-meter-BPscsw5t.js → hx-meter-BJdh6nrF.js} +105 -64
- package/dist/shared/hx-meter-BJdh6nrF.js.map +1 -0
- package/dist/shared/{hx-nav-item-xqRPOCWX.js → hx-nav-item-CODtUlew.js} +13 -9
- package/dist/shared/{hx-nav-item-xqRPOCWX.js.map → hx-nav-item-CODtUlew.js.map} +1 -1
- package/dist/shared/hx-overflow-menu-BQ4fiMYu.js +492 -0
- package/dist/shared/hx-overflow-menu-BQ4fiMYu.js.map +1 -0
- package/dist/shared/hx-phi-field-C19oxlrr.js.map +1 -1
- package/dist/shared/{hx-popover-B-FP3-wW.js → hx-popover-B9W8-tC0.js} +123 -66
- package/dist/shared/hx-popover-B9W8-tC0.js.map +1 -0
- package/dist/shared/hx-progress-bar-C8nDMdYa.js +290 -0
- package/dist/shared/hx-progress-bar-C8nDMdYa.js.map +1 -0
- package/dist/shared/hx-radio-Z1lV1zTO.js +822 -0
- package/dist/shared/hx-radio-Z1lV1zTO.js.map +1 -0
- package/dist/shared/hx-select-D18CnJ0e.js +1089 -0
- package/dist/shared/hx-select-D18CnJ0e.js.map +1 -0
- package/dist/shared/{hx-spinner-DL5AYr16.js → hx-spinner-BB0h2hKZ.js} +62 -34
- package/dist/shared/hx-spinner-BB0h2hKZ.js.map +1 -0
- package/dist/shared/{hx-split-button-Djnc5Aeg.js → hx-split-button-BoABoEm5.js} +153 -82
- package/dist/shared/hx-split-button-BoABoEm5.js.map +1 -0
- package/dist/shared/{hx-stat-WOcNV1Ry.js → hx-stat-Dtf9lz-O.js} +77 -47
- package/dist/shared/hx-stat-Dtf9lz-O.js.map +1 -0
- package/dist/shared/hx-switch-B6kr-EwE.js +540 -0
- package/dist/shared/hx-switch-B6kr-EwE.js.map +1 -0
- package/dist/shared/{hx-tab-panel-DspCrKqo.js → hx-tab-panel-BQtBXKLD.js} +255 -131
- package/dist/shared/hx-tab-panel-BQtBXKLD.js.map +1 -0
- package/dist/shared/{hx-tag-CNSmdyaK.js → hx-tag-C5aCUpVi.js} +63 -40
- package/dist/shared/hx-tag-C5aCUpVi.js.map +1 -0
- package/dist/shared/{hx-td-DnnEMIuA.js → hx-td-BGkFOJEK.js} +267 -123
- package/dist/shared/hx-td-BGkFOJEK.js.map +1 -0
- package/dist/shared/hx-theme-BsefFWTO.js.map +1 -1
- package/dist/shared/hx-time-picker-iwCD7rzW.js +1038 -0
- package/dist/shared/hx-time-picker-iwCD7rzW.js.map +1 -0
- package/dist/shared/{hx-toggle-button-iLiYrMbD.js → hx-toggle-button-BQ81EDkl.js} +226 -65
- package/dist/shared/hx-toggle-button-BQ81EDkl.js.map +1 -0
- package/dist/shared/{hx-tooltip-nYOv9OLu.js → hx-tooltip-DVqtKPCD.js} +68 -46
- package/dist/shared/hx-tooltip-DVqtKPCD.js.map +1 -0
- package/dist/shared/hx-tree-item-CHrUhuZL.js +925 -0
- package/dist/shared/hx-tree-item-CHrUhuZL.js.map +1 -0
- package/dist/shared/menu-roving-DmMnzJhn.js +14 -0
- package/dist/shared/menu-roving-DmMnzJhn.js.map +1 -0
- package/dist/shared/menu-tree-BNM0SYYq.js +42 -0
- package/dist/shared/menu-tree-BNM0SYYq.js.map +1 -0
- package/dist/shared/{toast-factory-YSznocIV.js → toast-factory-CL2BzdSB.js} +128 -77
- package/dist/shared/toast-factory-CL2BzdSB.js.map +1 -0
- package/dist/utils/aria-flatten.d.ts +56 -0
- package/dist/utils/aria-flatten.d.ts.map +1 -0
- package/dist/utils/aria-idref.d.ts +127 -0
- package/dist/utils/aria-idref.d.ts.map +1 -0
- package/dist/utils/menu-label.d.ts +18 -0
- package/dist/utils/menu-label.d.ts.map +1 -0
- package/dist/utils/menu-roving.d.ts +28 -0
- package/dist/utils/menu-roving.d.ts.map +1 -0
- package/dist/utils/menu-tree.d.ts +41 -0
- package/dist/utils/menu-tree.d.ts.map +1 -0
- package/dist/utils/tree-walk.d.ts +53 -0
- package/dist/utils/tree-walk.d.ts.map +1 -0
- package/figma-inventory.json +132 -20
- package/package.json +1 -1
- package/dist/shared/hx-alert-CLn7CstP.js.map +0 -1
- package/dist/shared/hx-badge-CQXgOXJM.js.map +0 -1
- package/dist/shared/hx-banner-D3DzpfcP.js.map +0 -1
- package/dist/shared/hx-checkbox-D7xma9YH.js +0 -524
- package/dist/shared/hx-checkbox-D7xma9YH.js.map +0 -1
- package/dist/shared/hx-checkbox-group-C9n315Ju.js +0 -323
- package/dist/shared/hx-checkbox-group-C9n315Ju.js.map +0 -1
- package/dist/shared/hx-color-picker-uRc865FJ.js +0 -882
- package/dist/shared/hx-color-picker-uRc865FJ.js.map +0 -1
- package/dist/shared/hx-combobox-DDzqNKEW.js +0 -924
- package/dist/shared/hx-combobox-DDzqNKEW.js.map +0 -1
- package/dist/shared/hx-date-picker-2iRG1p74.js.map +0 -1
- package/dist/shared/hx-dialog-DRN_1-Y-.js +0 -514
- package/dist/shared/hx-dialog-DRN_1-Y-.js.map +0 -1
- package/dist/shared/hx-drawer-Y1Ui2IWJ.js.map +0 -1
- package/dist/shared/hx-dropdown-LyaRc8Rf.js +0 -263
- package/dist/shared/hx-dropdown-LyaRc8Rf.js.map +0 -1
- package/dist/shared/hx-field-B3Qo8OLS.js.map +0 -1
- package/dist/shared/hx-icon-button-CGNdQSFM.js.map +0 -1
- package/dist/shared/hx-link-C-O6vq0Q.js.map +0 -1
- package/dist/shared/hx-list-MyEhh8c7.js.map +0 -1
- package/dist/shared/hx-menu-divider-C2omnPtj.js +0 -558
- package/dist/shared/hx-menu-divider-C2omnPtj.js.map +0 -1
- package/dist/shared/hx-meter-BPscsw5t.js.map +0 -1
- package/dist/shared/hx-overflow-menu-DCLsdIBy.js +0 -374
- package/dist/shared/hx-overflow-menu-DCLsdIBy.js.map +0 -1
- package/dist/shared/hx-popover-B-FP3-wW.js.map +0 -1
- package/dist/shared/hx-progress-bar-Bn3JEPUf.js +0 -258
- package/dist/shared/hx-progress-bar-Bn3JEPUf.js.map +0 -1
- package/dist/shared/hx-radio-CJvNU2yP.js +0 -621
- package/dist/shared/hx-radio-CJvNU2yP.js.map +0 -1
- package/dist/shared/hx-select-C8fEHQhC.js +0 -807
- package/dist/shared/hx-select-C8fEHQhC.js.map +0 -1
- package/dist/shared/hx-spinner-DL5AYr16.js.map +0 -1
- package/dist/shared/hx-split-button-Djnc5Aeg.js.map +0 -1
- package/dist/shared/hx-stat-WOcNV1Ry.js.map +0 -1
- package/dist/shared/hx-switch-BrZFaRue.js +0 -420
- package/dist/shared/hx-switch-BrZFaRue.js.map +0 -1
- package/dist/shared/hx-tab-panel-DspCrKqo.js.map +0 -1
- package/dist/shared/hx-tag-CNSmdyaK.js.map +0 -1
- package/dist/shared/hx-td-DnnEMIuA.js.map +0 -1
- package/dist/shared/hx-time-picker-BoEIZwzv.js +0 -688
- package/dist/shared/hx-time-picker-BoEIZwzv.js.map +0 -1
- package/dist/shared/hx-toggle-button-iLiYrMbD.js.map +0 -1
- package/dist/shared/hx-tooltip-nYOv9OLu.js.map +0 -1
- package/dist/shared/hx-tree-item-C2CiWuDE.js +0 -703
- package/dist/shared/hx-tree-item-C2CiWuDE.js.map +0 -1
- package/dist/shared/toast-factory-YSznocIV.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { lightTokenCss as p } from "@helixui/tokens";
|
|
2
2
|
import { H as S, a as y } from "./shared/hx-accordion-ZVzgDzTG.js";
|
|
3
3
|
import { H as b } from "./shared/hx-action-bar-CitgcpGv.js";
|
|
4
|
-
import { H as g } from "./shared/hx-alert-
|
|
4
|
+
import { H as g } from "./shared/hx-alert-Bto8-TIi.js";
|
|
5
5
|
import { H as v } from "./shared/hx-avatar-C9hOmlAb.js";
|
|
6
|
-
import { H as E } from "./shared/hx-badge-
|
|
7
|
-
import { H as k } from "./shared/hx-banner-
|
|
6
|
+
import { H as E } from "./shared/hx-badge-JlFtAdxS.js";
|
|
7
|
+
import { H as k } from "./shared/hx-banner-fpRnciIO.js";
|
|
8
8
|
import { H as B, a as P } from "./shared/hx-breadcrumb-item-3tKppF9h.js";
|
|
9
|
-
import { H as M } from "./shared/hx-button-
|
|
10
|
-
import { H as N } from "./shared/hx-button-group-
|
|
9
|
+
import { H as M } from "./shared/hx-button-BOwAEcF1.js";
|
|
10
|
+
import { H as N } from "./shared/hx-button-group-DcHP5MBv.js";
|
|
11
11
|
import { H as A } from "./shared/hx-card-qNAM2QNV.js";
|
|
12
12
|
import { H as G, a as U } from "./shared/hx-carousel-item-z1Lc24op.js";
|
|
13
|
-
import { H as O } from "./shared/hx-checkbox-
|
|
14
|
-
import { H as K } from "./shared/hx-checkbox-group-
|
|
13
|
+
import { H as O } from "./shared/hx-checkbox-C48KYKFq.js";
|
|
14
|
+
import { H as K } from "./shared/hx-checkbox-group-BJIAX3zU.js";
|
|
15
15
|
import { H as Y } from "./shared/hx-clinical-status-D3XQIOqX.js";
|
|
16
16
|
import { H as q } from "./shared/hx-code-snippet-fVV3Z2DZ.js";
|
|
17
|
-
import { H as J } from "./shared/hx-color-picker-
|
|
18
|
-
import { H as Z } from "./shared/hx-combobox-
|
|
17
|
+
import { H as J } from "./shared/hx-color-picker-Dk4cBwYQ.js";
|
|
18
|
+
import { H as Z } from "./shared/hx-combobox-BTLO9qiK.js";
|
|
19
19
|
import { H as oe } from "./shared/hx-container-DVI7sxfX.js";
|
|
20
20
|
import { H as re } from "./shared/hx-copy-button-sUVuikyH.js";
|
|
21
21
|
import { H as ie } from "./shared/hx-counter-0zYapFhf.js";
|
|
22
|
-
import { H as xe } from "./shared/hx-data-table-
|
|
23
|
-
import { H as le } from "./shared/hx-date-picker-
|
|
24
|
-
import { H as pe } from "./shared/hx-dialog-
|
|
22
|
+
import { H as xe } from "./shared/hx-data-table-Ct3gQ6ya.js";
|
|
23
|
+
import { H as le } from "./shared/hx-date-picker-CiR7FVnR.js";
|
|
24
|
+
import { H as pe } from "./shared/hx-dialog-AOZpHSuF.js";
|
|
25
25
|
import { H as fe } from "./shared/hx-divider-CYfcUjcr.js";
|
|
26
|
-
import { H as de } from "./shared/hx-drawer-
|
|
27
|
-
import { H as ue } from "./shared/hx-dropdown-
|
|
28
|
-
import { H as ye } from "./shared/hx-field-
|
|
26
|
+
import { H as de } from "./shared/hx-drawer-DH6CdAN1.js";
|
|
27
|
+
import { H as ue } from "./shared/hx-dropdown-DiLd40Lm.js";
|
|
28
|
+
import { H as ye } from "./shared/hx-field-zw0U1KVi.js";
|
|
29
29
|
import { H as be } from "./shared/hx-field-label-BVRyyKeh.js";
|
|
30
30
|
import { H as ge } from "./shared/hx-file-upload-D3rKROK5.js";
|
|
31
31
|
import { H as ve } from "./shared/hx-form-CkChEATa.js";
|
|
@@ -33,52 +33,52 @@ import { H as Ee } from "./shared/hx-format-date-CKnlQOmV.js";
|
|
|
33
33
|
import { H as ke, a as we } from "./shared/hx-grid-CXZf3jeK.js";
|
|
34
34
|
import { H as Pe } from "./shared/hx-help-text-Xb2Yr8x2.js";
|
|
35
35
|
import { H as Me } from "./shared/hx-icon-fuVm4-bk.js";
|
|
36
|
-
import { H as Ne } from "./shared/hx-icon-button-
|
|
36
|
+
import { H as Ne } from "./shared/hx-icon-button-a6OpeQz5.js";
|
|
37
37
|
import { H as Ae } from "./shared/hx-image-Ben_4yM5.js";
|
|
38
|
-
import { H as Ge } from "./shared/hx-link-
|
|
39
|
-
import { H as Ve, a as Oe } from "./shared/hx-list-
|
|
40
|
-
import { H as Ke, a as We, b as Ye } from "./shared/hx-menu-divider-
|
|
41
|
-
import { H as qe } from "./shared/hx-meter-
|
|
38
|
+
import { H as Ge } from "./shared/hx-link-CMnZRUtQ.js";
|
|
39
|
+
import { H as Ve, a as Oe } from "./shared/hx-list-De66EtAP.js";
|
|
40
|
+
import { H as Ke, a as We, b as Ye } from "./shared/hx-menu-divider-BjiRIWKq.js";
|
|
41
|
+
import { H as qe } from "./shared/hx-meter-BJdh6nrF.js";
|
|
42
42
|
import { H as Je } from "./shared/hx-nav-ldFM3Fle.js";
|
|
43
43
|
import { H as Ze } from "./shared/hx-number-input-yUzFOSC1.js";
|
|
44
|
-
import { H as oo } from "./shared/hx-overflow-menu-
|
|
44
|
+
import { H as oo } from "./shared/hx-overflow-menu-BQ4fiMYu.js";
|
|
45
45
|
import { H as ro } from "./shared/hx-pagination-C7y8GVyU.js";
|
|
46
46
|
import { H as io } from "./shared/hx-patient-banner-CkS-Lmj4.js";
|
|
47
47
|
import { H as xo } from "./shared/hx-phi-field-C19oxlrr.js";
|
|
48
|
-
import { H as lo } from "./shared/hx-popover-
|
|
48
|
+
import { H as lo } from "./shared/hx-popover-B9W8-tC0.js";
|
|
49
49
|
import { H as po } from "./shared/hx-popup-COUXXZ9X.js";
|
|
50
|
-
import { H as fo } from "./shared/hx-progress-bar-
|
|
50
|
+
import { H as fo } from "./shared/hx-progress-bar-C8nDMdYa.js";
|
|
51
51
|
import { H as ho } from "./shared/hx-progress-ring-TwHyXeEp.js";
|
|
52
52
|
import { H as So } from "./shared/hx-prose-BThYcASV.js";
|
|
53
|
-
import { H as To, a as bo } from "./shared/hx-radio-
|
|
53
|
+
import { H as To, a as bo } from "./shared/hx-radio-Z1lV1zTO.js";
|
|
54
54
|
import { H as go } from "./shared/hx-rating-C3QP53k9.js";
|
|
55
|
-
import { H as vo } from "./shared/hx-select-
|
|
56
|
-
import { H as Eo, a as Do } from "./shared/hx-nav-item-
|
|
55
|
+
import { H as vo } from "./shared/hx-select-D18CnJ0e.js";
|
|
56
|
+
import { H as Eo, a as Do } from "./shared/hx-nav-item-CODtUlew.js";
|
|
57
57
|
import { H as wo } from "./shared/hx-skeleton-Cnieh5Uc.js";
|
|
58
58
|
import { H as Po } from "./shared/hx-slider-Blmv_rwS.js";
|
|
59
|
-
import { H as Mo } from "./shared/hx-spinner-
|
|
60
|
-
import { H as No } from "./shared/hx-split-button-
|
|
59
|
+
import { H as Mo } from "./shared/hx-spinner-BB0h2hKZ.js";
|
|
60
|
+
import { H as No } from "./shared/hx-split-button-BoABoEm5.js";
|
|
61
61
|
import { H as Ao } from "./shared/hx-split-panel-B-u0Z3mm.js";
|
|
62
62
|
import { H as Go } from "./shared/hx-stack-DGfcOfWJ.js";
|
|
63
|
-
import { H as Vo } from "./shared/hx-stat-
|
|
63
|
+
import { H as Vo } from "./shared/hx-stat-Dtf9lz-O.js";
|
|
64
64
|
import { H as Xo } from "./shared/hx-status-indicator-BlQyen43.js";
|
|
65
65
|
import { H as Wo, a as Yo } from "./shared/hx-step-R2rjp1fT.js";
|
|
66
66
|
import { H as qo, a as zo } from "./shared/hx-structured-list-m_-dMJbC.js";
|
|
67
67
|
import { H as Qo } from "./shared/hx-style-scope-TDnR8H4O.js";
|
|
68
|
-
import { H as et } from "./shared/hx-switch-
|
|
69
|
-
import { H as tt, a as rt, b as at, c as it, d as st, e as xt, f as Ht } from "./shared/hx-td-
|
|
70
|
-
import { H as nt, a as pt, b as mt } from "./shared/hx-tab-panel-
|
|
71
|
-
import { H as ct } from "./shared/hx-tag-
|
|
68
|
+
import { H as et } from "./shared/hx-switch-B6kr-EwE.js";
|
|
69
|
+
import { H as tt, a as rt, b as at, c as it, d as st, e as xt, f as Ht } from "./shared/hx-td-BGkFOJEK.js";
|
|
70
|
+
import { H as nt, a as pt, b as mt } from "./shared/hx-tab-panel-BQtBXKLD.js";
|
|
71
|
+
import { H as ct } from "./shared/hx-tag-C5aCUpVi.js";
|
|
72
72
|
import { H as ht } from "./shared/hx-text-Bz_9fJ3J.js";
|
|
73
73
|
import { F as St, H as yt } from "./shared/hx-text-input-D6FlOZM-.js";
|
|
74
74
|
import { H as bt } from "./shared/hx-textarea-CNG590KY.js";
|
|
75
75
|
import { H as gt } from "./shared/hx-theme-BsefFWTO.js";
|
|
76
|
-
import { H as vt } from "./shared/hx-time-picker-
|
|
77
|
-
import { H as Et, a as Dt, t as kt } from "./shared/toast-factory-
|
|
78
|
-
import { H as Bt } from "./shared/hx-toggle-button-
|
|
79
|
-
import { H as Ft } from "./shared/hx-tooltip-
|
|
76
|
+
import { H as vt } from "./shared/hx-time-picker-iwCD7rzW.js";
|
|
77
|
+
import { H as Et, a as Dt, t as kt } from "./shared/toast-factory-CL2BzdSB.js";
|
|
78
|
+
import { H as Bt } from "./shared/hx-toggle-button-BQ81EDkl.js";
|
|
79
|
+
import { H as Ft } from "./shared/hx-tooltip-DVqtKPCD.js";
|
|
80
80
|
import { H as Lt } from "./shared/hx-top-nav-DP6OFS8C.js";
|
|
81
|
-
import { H as Rt, a as At } from "./shared/hx-tree-item-
|
|
81
|
+
import { H as Rt, a as At } from "./shared/hx-tree-item-CHrUhuZL.js";
|
|
82
82
|
import { H as Gt } from "./shared/hx-visually-hidden-0bZKOWgT.js";
|
|
83
83
|
import { F as Vt } from "./shared/FormMixin-B8PXk5RQ.js";
|
|
84
84
|
import { H as Xt } from "./shared/helix-element-BNEYeiys.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function E(e) {
|
|
2
|
+
if (e.getAttribute("aria-hidden") === "true" || e.hasAttribute("hidden"))
|
|
3
|
+
return "";
|
|
4
|
+
let r = "";
|
|
5
|
+
const i = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, {
|
|
6
|
+
acceptNode(d) {
|
|
7
|
+
if (d.nodeType === Node.ELEMENT_NODE) {
|
|
8
|
+
const n = d;
|
|
9
|
+
return n.getAttribute("aria-hidden") === "true" || n.hasAttribute("hidden") ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_SKIP;
|
|
10
|
+
}
|
|
11
|
+
return NodeFilter.FILTER_ACCEPT;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
let t = i.nextNode();
|
|
15
|
+
for (; t; )
|
|
16
|
+
r += t.textContent ?? "", t = i.nextNode();
|
|
17
|
+
return r.replace(/\s+/g, " ").trim();
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
E as f
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=aria-flatten-DY6v2vah.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aria-flatten-DY6v2vah.js","sources":["../../src/utils/aria-flatten.ts"],"sourcesContent":["/**\n * AccName-aware text flattener. Walks the subtree of `root` and concatenates\n * text-node content, REJECTING any element subtree carrying `aria-hidden=\"true\"`\n * or the `hidden` attribute per W3C AccName 1.2 §4.3.10. Used by host-canonical\n * components for both external IDREF flatten (host aria-labelledby/aria-describedby\n * targets) and slotted-label aggregation, so nested decorative content like\n * `<svg aria-hidden=\"true\"><title>icon</title></svg>` does not leak into the\n * announced name/description.\n *\n * The TreeWalker filter only inspects elements VISITED during the walk — it\n * never tests the root itself, so a hidden ROOT (e.g. `<span slot=\"label\" hidden>`)\n * would still contribute its descendants' text. Per AccName 1.2 §4.3.10, a\n * hidden root contributes the empty string. Gate the walk here so every caller\n * honors the rule symmetrically.\n *\n * ## Intentional divergence from AccName 1.2 §4.3.7 (LabelledBy Recursion)\n *\n * The AccName 1.2 spec (§4.3.7 + \"Hidden Not Referenced\") states that when an\n * element is DIRECTLY referenced by `aria-labelledby` / `aria-describedby`,\n * that referenced element's subtree contributes to the computed name even when\n * the element itself is hidden via `hidden` / `aria-hidden=\"true\"`. The author's\n * explicit IDREF is treated as intent to use that subtree as the name.\n *\n * This helper deliberately diverges from §4.3.7 by applying the §4.3.10 hidden\n * gate uniformly to ALL callers, including the IDREF-target path. Rationale:\n *\n * 1. **Predictability across consumer mental models.** Consumers expect\n * \"visually hidden via `[hidden]` / `aria-hidden=true`\" to mean\n * \"semantically removed\", full stop. A label that disappears visually but\n * keeps announcing creates a debugging trap, especially in CMS / Twig\n * contexts where visibility toggles are often driven by template logic.\n * 2. **Standard accessible-hide pattern is already supported.** Authors who\n * want a label that is visually hidden but contributes its text via\n * `aria-labelledby` should use the established `.sr-only` / `.visually-hidden`\n * pattern (clip-path / position:absolute / width:1px), which neither\n * attribute affects. That pattern correctly contributes here.\n * 3. **Fail-safe for stale references.** A hidden referenced element is more\n * often a stale or accidentally-toggled reference than an intentional\n * hidden-name source. Returning the empty string lets the host fall back\n * to its next AccName step (aria-label, slotted label, placeholder) rather\n * than announcing surprising stale content.\n *\n * If a future component genuinely needs strict §4.3.7 behavior, add a second\n * entry point (e.g. `flattenAccNameForIdRef`) that skips the root-level gate\n * and reuses the TreeWalker logic; do not relax this gate globally.\n *\n * Single source of truth for accessible-name flattening across the library.\n * Used by hx-time-picker, hx-date-picker, hx-toggle-button, and any future\n * host-canonical component that aggregates slotted text into an accessible name.\n *\n * @param root - The element whose subtree text content should be flattened.\n * @returns The concatenated, whitespace-collapsed text content with hidden\n * subtrees excluded.\n */\nexport function flattenAccName(root: Element): string {\n // §4.3.10 hidden-root gate. Applied uniformly to all callers (slot aggregation\n // AND IDREF-target paths) — see \"Intentional divergence\" in the JSDoc above for\n // the rationale and the supported sr-only escape hatch.\n if (root.getAttribute('aria-hidden') === 'true' || root.hasAttribute('hidden')) {\n return '';\n }\n let result = '';\n const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, {\n acceptNode(node) {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const el = node as Element;\n if (el.getAttribute('aria-hidden') === 'true') {\n return NodeFilter.FILTER_REJECT;\n }\n if (el.hasAttribute('hidden')) {\n return NodeFilter.FILTER_REJECT;\n }\n return NodeFilter.FILTER_SKIP;\n }\n return NodeFilter.FILTER_ACCEPT;\n },\n });\n let textNode: Node | null = walker.nextNode();\n while (textNode) {\n result += textNode.textContent ?? '';\n textNode = walker.nextNode();\n }\n return result.replace(/\\s+/g, ' ').trim();\n}\n"],"names":["flattenAccName","root","result","walker","node","el","textNode"],"mappings":"AAsDO,SAASA,EAAeC,GAAuB;AAIpD,MAAIA,EAAK,aAAa,aAAa,MAAM,UAAUA,EAAK,aAAa,QAAQ;AAC3E,WAAO;AAET,MAAIC,IAAS;AACb,QAAMC,IAAS,SAAS,iBAAiBF,GAAM,WAAW,eAAe,WAAW,WAAW;AAAA,IAC7F,WAAWG,GAAM;AACf,UAAIA,EAAK,aAAa,KAAK,cAAc;AACvC,cAAMC,IAAKD;AAIX,eAHIC,EAAG,aAAa,aAAa,MAAM,UAGnCA,EAAG,aAAa,QAAQ,IACnB,WAAW,gBAEb,WAAW;AAAA,MACpB;AACA,aAAO,WAAW;AAAA,IACpB;AAAA,EAAA,CACD;AACD,MAAIC,IAAwBH,EAAO,SAAA;AACnC,SAAOG;AACL,IAAAJ,KAAUI,EAAS,eAAe,IAClCA,IAAWH,EAAO,SAAA;AAEpB,SAAOD,EAAO,QAAQ,QAAQ,GAAG,EAAE,KAAA;AACrC;"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
function p(e, i) {
|
|
2
|
+
if (!i) return [];
|
|
3
|
+
const a = i.split(/\s+/).filter(Boolean);
|
|
4
|
+
if (a.length === 0) return [];
|
|
5
|
+
const t = [];
|
|
6
|
+
w(e, t);
|
|
7
|
+
const r = e.ownerDocument;
|
|
8
|
+
r && !t.includes(r) && t.push(r);
|
|
9
|
+
const c = [];
|
|
10
|
+
for (const d of a)
|
|
11
|
+
for (const n of t) {
|
|
12
|
+
const s = n.getElementById(d);
|
|
13
|
+
if (s) {
|
|
14
|
+
c.push(s);
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return c;
|
|
19
|
+
}
|
|
20
|
+
function w(e, i) {
|
|
21
|
+
const a = /* @__PURE__ */ new Set(), t = (s) => {
|
|
22
|
+
a.has(s) || (a.add(s), i.push(s));
|
|
23
|
+
}, r = /* @__PURE__ */ new Set([e]), c = [];
|
|
24
|
+
let d = !1;
|
|
25
|
+
const n = (s) => {
|
|
26
|
+
let b = s, o = b.getRootNode();
|
|
27
|
+
const l = b.assignedSlot ?? null;
|
|
28
|
+
for (l && !r.has(l) && (r.add(l), c.push(l)); o instanceof ShadowRoot; ) {
|
|
29
|
+
t(o);
|
|
30
|
+
const u = o.host ?? null;
|
|
31
|
+
if (!u) break;
|
|
32
|
+
const f = u.assignedSlot ?? null;
|
|
33
|
+
f && !r.has(f) && (r.add(f), c.push(f)), b = u, o = u.getRootNode();
|
|
34
|
+
}
|
|
35
|
+
o instanceof Document && (d = !0);
|
|
36
|
+
};
|
|
37
|
+
for (n(e); c.length > 0; )
|
|
38
|
+
n(c.shift());
|
|
39
|
+
if (d) {
|
|
40
|
+
const s = e.ownerDocument;
|
|
41
|
+
s && t(s);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function R(e) {
|
|
45
|
+
return "ariaLabelledByElements" in e && "ariaDescribedByElements" in e && typeof e.ariaLabelledByElements < "u";
|
|
46
|
+
}
|
|
47
|
+
const v = [
|
|
48
|
+
"aria-label",
|
|
49
|
+
"aria-labelledby",
|
|
50
|
+
"aria-describedby",
|
|
51
|
+
"data-aria-label",
|
|
52
|
+
"data-aria-labelledby",
|
|
53
|
+
"data-aria-describedby"
|
|
54
|
+
], h = /* @__PURE__ */ new WeakMap();
|
|
55
|
+
function m(e, i) {
|
|
56
|
+
let a = h.get(e);
|
|
57
|
+
if (!a) {
|
|
58
|
+
const t = /* @__PURE__ */ new Set();
|
|
59
|
+
let r = 0;
|
|
60
|
+
const c = () => {
|
|
61
|
+
r = 0, Array.from(t).forEach((s) => {
|
|
62
|
+
s();
|
|
63
|
+
});
|
|
64
|
+
}, d = () => {
|
|
65
|
+
if (r !== 0) return;
|
|
66
|
+
r = (typeof globalThis.requestAnimationFrame == "function" ? globalThis.requestAnimationFrame : (b) => globalThis.setTimeout(() => b(performance.now()), 0))(c);
|
|
67
|
+
}, n = new MutationObserver(() => {
|
|
68
|
+
d();
|
|
69
|
+
});
|
|
70
|
+
n.observe(e, {
|
|
71
|
+
childList: !0,
|
|
72
|
+
subtree: !0,
|
|
73
|
+
attributes: !0,
|
|
74
|
+
attributeFilter: ["id", "hidden", "aria-hidden", "style", "class"],
|
|
75
|
+
characterData: !0
|
|
76
|
+
}), a = { observer: n, subscribers: t }, h.set(e, a);
|
|
77
|
+
}
|
|
78
|
+
return a.subscribers.add(i), () => {
|
|
79
|
+
const t = h.get(e);
|
|
80
|
+
t && (t.subscribers.delete(i), t.subscribers.size === 0 && (t.observer.disconnect(), h.delete(e)));
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function S(e, i, a = {}) {
|
|
84
|
+
const t = a.observedAttributes ?? v, r = a.observeRoot ?? !0, c = new MutationObserver(() => i());
|
|
85
|
+
c.observe(e, {
|
|
86
|
+
attributes: !0,
|
|
87
|
+
attributeFilter: [...t]
|
|
88
|
+
});
|
|
89
|
+
const d = new MutationObserver(() => {
|
|
90
|
+
b(), i();
|
|
91
|
+
});
|
|
92
|
+
d.observe(e, {
|
|
93
|
+
attributes: !0,
|
|
94
|
+
attributeFilter: ["slot"]
|
|
95
|
+
});
|
|
96
|
+
const n = /* @__PURE__ */ new Map(), s = () => {
|
|
97
|
+
const o = [];
|
|
98
|
+
w(e, o);
|
|
99
|
+
const l = e.ownerDocument;
|
|
100
|
+
return l && !o.includes(l) && o.push(l), o;
|
|
101
|
+
}, b = () => {
|
|
102
|
+
if (!r) return;
|
|
103
|
+
const o = s(), l = new Set(o);
|
|
104
|
+
for (const [u, f] of n)
|
|
105
|
+
l.has(u) || (f(), n.delete(u));
|
|
106
|
+
for (const u of o)
|
|
107
|
+
n.has(u) || n.set(u, m(u, i));
|
|
108
|
+
};
|
|
109
|
+
return b(), i(), {
|
|
110
|
+
resync() {
|
|
111
|
+
b(), i();
|
|
112
|
+
},
|
|
113
|
+
disconnect() {
|
|
114
|
+
c.disconnect(), d.disconnect();
|
|
115
|
+
for (const o of n.values())
|
|
116
|
+
o();
|
|
117
|
+
n.clear();
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export {
|
|
122
|
+
S as i,
|
|
123
|
+
p as r,
|
|
124
|
+
R as s
|
|
125
|
+
};
|
|
126
|
+
//# sourceMappingURL=aria-idref-CxvyzfQS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aria-idref-CxvyzfQS.js","sources":["../../src/utils/aria-idref.ts"],"sourcesContent":["/**\n * Shared utilities for resolving `aria-labelledby` and `aria-describedby`\n * IDREF token lists across the Shadow DOM boundary.\n *\n * Selection-control components (`hx-checkbox`, `hx-radio-group`, `hx-switch`,\n * etc.) elevate their semantic surface to the host via `ElementInternals` so\n * that consumer-supplied `aria-labelledby` / `aria-describedby` on the host\n * resolves to light-DOM elements rather than being trapped on inner shadow\n * nodes.\n *\n * Modern Chromium 134+ and Safari 17.4+ expose the IDL element-references API\n * (`internals.ariaLabelledByElements`, `internals.ariaDescribedByElements`).\n * For those engines we resolve token IDs against the host's root node (a\n * Document or ShadowRoot) and assign the resulting elements directly.\n *\n * Older engines fall back to the host-attribute path: the ARIA delegation\n * mixin keeps the original token list in `data-aria-labelledby`/\n * `data-aria-describedby`, which assistive technology cannot follow into the\n * shadow root, but that is the same surface area as the pre-fix code and is\n * not a regression.\n *\n * Component authors do NOT need to wire this directly — see\n * `installAriaIdrefMirror()` for an installable observer that keeps an inner\n * node's `aria-*` attributes in sync with the token list across mutations.\n */\n\n/**\n * Resolves a whitespace-separated IDREF token list to live element references.\n *\n * Searches the host's containing root first (Document or ShadowRoot), then\n * walks up through enclosing shadow hosts, and finally falls back to the\n * top-level Document. Codex round-15 P1: hx-* controls embedded inside an\n * outer component's shadow tree often legitimately reference labels/descriptions\n * declared in the outer document or in an ancestor shadow tree. Restricting\n * resolution to a single root left those controls anonymous on the\n * `ariaLabelledByElements` / `ariaDescribedByElements` path. The IDL\n * element-references API accepts any element regardless of root, so widening\n * the search closes that gap.\n *\n * Codex round-16 P1: when the host is **slotted into** another component\n * (light-DOM child of a shadow-root-bearing element), `host.getRootNode()`\n * is still the document, so IDREF targets declared in the slot owner's\n * shadow root are unreachable through the ancestor-shadow-host chain. We\n * additionally walk `host.assignedSlot.getRootNode()` — that resolves to\n * the slot owner's shadow root — and continue up that root's host chain so\n * cross-shadow IDREF resolution works for the composed-tree slotting\n * pattern. The walk is recursive: a slot owner that is itself slotted into\n * another shadow tree contributes its own ancestor chain too.\n *\n * Tokens that fail to resolve at every level are silently dropped — matching\n * native attribute-string platform behaviour where unresolved tokens are\n * ignored.\n */\nexport function resolveIdrefTokens(host: Element, tokens: string | null): Element[] {\n if (!tokens) return [];\n const ids = tokens.split(/\\s+/).filter(Boolean);\n if (ids.length === 0) return [];\n\n // Build the ordered list of roots to search: host's own root first\n // (closest scope), then walking outward through enclosing shadow hosts,\n // then the top-level Document. Each id resolves at the first root that\n // owns it, mirroring how shadow-encapsulation-aware AT walks the tree.\n const roots: Array<Document | ShadowRoot> = [];\n collectIdrefSearchRoots(host, roots);\n // If host is detached or in an unusual root, also try the top-level\n // ownerDocument as a defensive last resort.\n const ownerDoc = host.ownerDocument;\n if (ownerDoc && !roots.includes(ownerDoc)) {\n roots.push(ownerDoc);\n }\n\n const out: Element[] = [];\n for (const id of ids) {\n for (const root of roots) {\n const el = root.getElementById(id);\n if (el) {\n out.push(el);\n break;\n }\n }\n }\n return out;\n}\n\n/**\n * Walks the composed-tree ancestry of `start` and pushes every Document or\n * ShadowRoot that could legitimately own an IDREF target into `roots` in the\n * order they should be searched (closest scope first). The walk crosses two\n * kinds of boundary:\n *\n * 1. A node sitting inside a ShadowRoot escapes via `root.host`.\n * 2. A node assigned to a `<slot>` in another shadow tree escapes via\n * `node.assignedSlot` — the slot lives in the slot-owner's shadow root,\n * so we hop into that root and keep climbing from there.\n *\n * Both pathways are followed because either may apply at any level. A\n * light-DOM custom element slotted into a shadow component has\n * `getRootNode() === document` AND `assignedSlot !== null`. Codex push-gate\n * round-1 finding 1: the slot-owner shadow root MUST be searched BEFORE the\n * document fallback. Element ids are unique per-tree, not globally, so the\n * same id may legally exist in BOTH the document and a slot-owner shadow\n * root. If the document is searched first, the resolver binds to the wrong\n * element and the slotted control gets the wrong accessible name. The\n * solution is to walk the slot chain (assignedSlot → slot-owner shadow root\n * → its host's chain) before falling through to the owner document.\n *\n * The slot-walk is transitive: a slot owner that is itself slotted into\n * another shadow tree contributes its own slot chain too, all of which is\n * searched ahead of the document. From inside any shadow root we follow\n * `root.host` outward AND, on every hop, check whether that host is itself\n * slotted into yet another shadow tree. De-duplication is by reference\n * identity.\n *\n * @internal\n */\nfunction collectIdrefSearchRoots(start: Element, roots: Array<Document | ShadowRoot>): void {\n const visited = new Set<Document | ShadowRoot>();\n\n const pushRoot = (root: Document | ShadowRoot): void => {\n if (visited.has(root)) return;\n visited.add(root);\n roots.push(root);\n };\n\n // Walk a single ancestor chain starting from `entry`, pushing every\n // ShadowRoot encountered (closest first) and queuing any slot-owner\n // shadow roots we cross via assignedSlot for separate exploration. The\n // owner document encountered at the end of a chain is NOT pushed here —\n // the caller controls when to fall through to the document so the\n // slot-owner trees can be searched first (codex push-gate round-1 #1).\n const visitedEntries = new Set<Element>([start]);\n const slotEntries: Element[] = [];\n let documentSeen = false;\n\n const walkChain = (entry: Element): void => {\n let currentNode: Element = entry;\n let currentRoot: Node | null = currentNode.getRootNode();\n\n // If the entry is itself in document scope and is slotted into a\n // shadow tree, queue the slot for slot-owner-first exploration.\n const slotFromEntry = (currentNode as HTMLElement).assignedSlot ?? null;\n if (slotFromEntry && !visitedEntries.has(slotFromEntry)) {\n visitedEntries.add(slotFromEntry);\n slotEntries.push(slotFromEntry);\n }\n\n while (currentRoot instanceof ShadowRoot) {\n pushRoot(currentRoot);\n const shadowHost: Element | null = currentRoot.host ?? null;\n if (!shadowHost) break;\n // The shadow host itself may be slotted into yet another component.\n // Queue that branch for slot-owner-first exploration.\n const hostSlot = (shadowHost as HTMLElement).assignedSlot ?? null;\n if (hostSlot && !visitedEntries.has(hostSlot)) {\n visitedEntries.add(hostSlot);\n slotEntries.push(hostSlot);\n }\n currentNode = shadowHost;\n currentRoot = shadowHost.getRootNode();\n }\n\n if (currentRoot instanceof Document) {\n // Defer the document push: slot-owner shadow roots queued during\n // this walk must be searched BEFORE the document so duplicate ids\n // resolve in the correct (slot-owner) scope first.\n documentSeen = true;\n }\n };\n\n walkChain(start);\n // Drain the slot-entry queue. Each slot entry contributes its own\n // ancestor chain, whose shadow roots are pushed ahead of the owner\n // document. Slot entries are processed in discovery order (FIFO) so\n // closer slot owners are searched before more distant ones.\n while (slotEntries.length > 0) {\n walkChain(slotEntries.shift() as Element);\n }\n\n if (documentSeen) {\n const ownerDoc = start.ownerDocument;\n if (ownerDoc) pushRoot(ownerDoc);\n }\n}\n\n/**\n * True when the runtime exposes the IDL element-references API on\n * `ElementInternals`. Older Firefox / Safari builds return `undefined`\n * for these accessors.\n */\nexport function supportsIdrefElementReferences(internals: ElementInternals): boolean {\n return (\n 'ariaLabelledByElements' in internals &&\n 'ariaDescribedByElements' in internals &&\n typeof (internals as ElementInternals & { ariaLabelledByElements?: unknown })\n .ariaLabelledByElements !== 'undefined'\n );\n}\n\n/**\n * Mirror snapshot describing what should be applied to inner ARIA-bearing\n * shadow nodes. Components consume this to project the correct attributes\n * onto whichever inner element owns the announced semantic role.\n */\nexport interface AriaIdrefSnapshot {\n /** Computed `aria-labelledby` token list, or `null` to omit. */\n labelledBy: string | null;\n /** Computed `aria-describedby` token list, or `null` to omit. */\n describedBy: string | null;\n}\n\n/**\n * Merges two whitespace-separated token lists, preserving order and removing\n * duplicates. `null`/empty inputs are skipped. Returns `null` when the merged\n * list is empty.\n */\nexport function mergeTokenLists(...lists: Array<string | null | undefined>): string | null {\n const seen = new Set<string>();\n const out: string[] = [];\n for (const list of lists) {\n if (!list) continue;\n for (const token of list.split(/\\s+/)) {\n if (token && !seen.has(token)) {\n seen.add(token);\n out.push(token);\n }\n }\n }\n return out.length > 0 ? out.join(' ') : null;\n}\n\n/**\n * Options accepted by `installAriaIdrefMirror()`.\n */\nexport interface AriaIdrefMirrorOptions {\n /**\n * Attribute names on the host whose mutations should trigger a resync.\n * Defaults to `['aria-labelledby', 'aria-describedby', 'aria-label']` plus\n * the `data-aria-*` mirrors used by `mixinDelegatesAria`.\n */\n observedAttributes?: string[];\n /**\n * Whether to observe the resolved root for `id` attribute and `childList`\n * mutations so that late-inserted IDREF targets and id renames trigger a\n * resync. Defaults to `true`.\n */\n observeRoot?: boolean;\n}\n\n/**\n * Handle returned by `installAriaIdrefMirror()`. Call `disconnect()` from\n * `disconnectedCallback()` to tear the observers down. `resync()` forces an\n * immediate sync — useful from `connectedCallback()` after the host has been\n * re-attached to a new root.\n */\nexport interface AriaIdrefMirrorHandle {\n /** Force an immediate sync. */\n resync(): void;\n /** Tear down all observers and listeners. */\n disconnect(): void;\n}\n\n/**\n * Default attribute set observed on the host for ARIA / data-aria mirroring.\n */\nconst DEFAULT_HOST_OBSERVED_ATTRS: readonly string[] = [\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'data-aria-label',\n 'data-aria-labelledby',\n 'data-aria-describedby',\n];\n\n/**\n * Per-root shared observer registry. Codex round-7 finding #11 (perf).\n *\n * Round-1 created a `subtree: true` MutationObserver per host instance, so a\n * page with N IDREF-aware controls would receive N×M sync callbacks for any\n * unrelated childList/id mutation in the document. This registry collapses\n * the cost: a single observer per Document/ShadowRoot fans mutations out to\n * the registered subscribers (the per-host `sync` callbacks) only.\n *\n * The registry uses a `WeakMap` keyed by root so subscribers are garbage\n * collected with their roots. Subscribers are stored in a `Set` keyed by the\n * `sync` callback identity so re-installation is idempotent.\n *\n * @internal\n */\ninterface SharedRootObserverEntry {\n observer: MutationObserver;\n subscribers: Set<() => void>;\n}\n\nconst sharedRootObservers: WeakMap<Document | ShadowRoot, SharedRootObserverEntry> = new WeakMap();\n\nfunction subscribeToRoot(root: Document | ShadowRoot, sync: () => void): () => void {\n let entry = sharedRootObservers.get(root);\n if (!entry) {\n const subscribers = new Set<() => void>();\n // Codex push-gate round-4 P2: components that flatten `aria-labelledby`\n // to a fallback string (legacy engines without `ariaLabelledByElements`,\n // and string-mirroring callers like hx-menu / hx-menu-item /\n // hx-overflow-menu / hx-split-button) must resync when:\n // - the referenced label's text content mutates in place\n // (`characterData`)\n // - the referenced target is hidden / unhidden via attributes\n // (`hidden`, `aria-hidden`, `style`, `class` — visibility affects\n // accessible-name computation per accname §4.3.2)\n // Without these triggers the mirrored `aria-label` stays stale.\n //\n // Widening the observer surface produces noisier callbacks, so the\n // shared subscriber fan-out is coalesced through a single\n // `requestAnimationFrame` (with a setTimeout fallback for environments\n // where rAF is unavailable, e.g. test-stubbed roots). Subscribers see\n // at most one resync per frame regardless of mutation density.\n let pendingFrame = 0;\n const flush = (): void => {\n pendingFrame = 0;\n // Snapshot subscribers before invocation: a sync() callback may itself\n // resubscribe (e.g. component reattach), and Set iteration over a live\n // collection during mutation is undefined.\n Array.from(subscribers).forEach((fn) => {\n fn();\n });\n };\n const scheduleFlush = (): void => {\n if (pendingFrame !== 0) return;\n const raf =\n typeof globalThis.requestAnimationFrame === 'function'\n ? globalThis.requestAnimationFrame\n : (cb: FrameRequestCallback) => globalThis.setTimeout(() => cb(performance.now()), 0);\n pendingFrame = raf(flush) as unknown as number;\n };\n const observer = new MutationObserver(() => {\n scheduleFlush();\n });\n observer.observe(root, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['id', 'hidden', 'aria-hidden', 'style', 'class'],\n characterData: true,\n });\n entry = { observer, subscribers };\n sharedRootObservers.set(root, entry);\n }\n entry.subscribers.add(sync);\n\n return () => {\n const current = sharedRootObservers.get(root);\n if (!current) return;\n current.subscribers.delete(sync);\n if (current.subscribers.size === 0) {\n current.observer.disconnect();\n sharedRootObservers.delete(root);\n }\n };\n}\n\n/**\n * Installs a `MutationObserver` pair that keeps host ARIA semantics in sync\n * with mutations to consumer-supplied attributes AND late-target / id\n * mutations in the host's resolved root.\n *\n * The `sync` callback is invoked on:\n * 1. Initial install (synchronously)\n * 2. Any change to one of the observed host attributes\n * 3. Any `id` attribute mutation, child insertion, or child removal in the\n * resolved root (Document or ShadowRoot containing the host)\n *\n * Components should call this from `connectedCallback()` and call\n * `handle.disconnect()` from `disconnectedCallback()`. The handle's\n * `resync()` method is safe to call from any lifecycle hook.\n *\n * Costs are bounded: the host observer touches one element; the root\n * observer is shared per `Document`/`ShadowRoot` (codex round-7 #11) so every\n * subscribing host pays a single attach cost regardless of how many other\n * IDREF-aware controls share the root.\n */\nexport function installAriaIdrefMirror(\n host: Element,\n sync: () => void,\n options: AriaIdrefMirrorOptions = {},\n): AriaIdrefMirrorHandle {\n const observedAttributes = options.observedAttributes ?? DEFAULT_HOST_OBSERVED_ATTRS;\n const observeRoot = options.observeRoot ?? true;\n\n // Observe consumer mutations to the host's ARIA / data-aria attributes.\n // We do NOT use `observedAttributes`/`attributeChangedCallback` here because\n // that requires class-level wiring that conflicts with downstream mixins\n // (e.g. `mixinDelegatesAria` already commandeers `attributeChangedCallback`\n // for the same attributes). A scoped `MutationObserver` is reentry-safe.\n const hostObserver = new MutationObserver(() => sync());\n hostObserver.observe(host, {\n attributes: true,\n attributeFilter: [...observedAttributes],\n });\n\n // Codex push-gate round-1 finding 2: when the host's `slot` attribute\n // changes, the host may have just been re-assigned into a different slot\n // owner's shadow tree — and therefore the set of reachable IDREF roots\n // has changed. The shared root observer's callback runs `sync()` (not\n // `resync()`), so observers stay attached to the OLD roots; later id /\n // childList mutations in the NEW slot owner shadow tree never fire\n // resync. A separate observer scoped to the host's `slot` attribute\n // triggers a full reattach via `resync()`.\n const slotAttrObserver = new MutationObserver(() => {\n // Reattach observers to the new reachable-roots set, then sync.\n attachRootObservers();\n sync();\n });\n slotAttrObserver.observe(host, {\n attributes: true,\n attributeFilter: ['slot'],\n });\n\n // Subscribe to the shared per-root observer so late-inserted targets and id\n // renames re-resolve through the IDREF path. Round-7 #11 collapses N\n // per-instance subtree observers into one per root, so on pages with many\n // controls a single mutation produces a single subscriber fan-out instead\n // of `controls × mutations` observer callbacks.\n //\n // Codex round-16 P1: subscribe to every root the resolver can match — the\n // host's own root, every enclosing shadow root, and the owner document.\n // Without this, dynamic IDREF targets in ancestor scopes (legitimate per\n // the round-15 widened resolver) bind correctly on first render but never\n // resync when the outer document mutates. We track active subscriptions\n // by root and incrementally diff on `attachRootObservers()` so resync\n // calls don't churn observers when nothing has changed.\n const rootSubscriptions = new Map<Document | ShadowRoot, () => void>();\n\n const computeRootsToObserve = (): Array<Document | ShadowRoot> => {\n const roots: Array<Document | ShadowRoot> = [];\n // Use the same composed-tree walk as `resolveIdrefTokens` so the\n // observer subscribes to every root the resolver can match — including\n // slot-owner shadow roots when the host is light-DOM-slotted into\n // another component (codex round-17 P1). Without this, a late id\n // mutation inside the slot owner's shadow tree never fires resync.\n collectIdrefSearchRoots(host, roots);\n const ownerDoc = host.ownerDocument;\n if (ownerDoc && !roots.includes(ownerDoc)) {\n roots.push(ownerDoc);\n }\n return roots;\n };\n\n const attachRootObservers = (): void => {\n if (!observeRoot) return;\n const wanted = computeRootsToObserve();\n const wantedSet = new Set(wanted);\n // Remove subscriptions for roots no longer in scope (e.g. when the host\n // is moved between trees and the old ancestor chain no longer applies).\n for (const [root, unsub] of rootSubscriptions) {\n if (!wantedSet.has(root)) {\n unsub();\n rootSubscriptions.delete(root);\n }\n }\n // Add subscriptions for new roots (host's root + ancestor shadow roots\n // + owner document) that the resolver can now match against.\n for (const root of wanted) {\n if (!rootSubscriptions.has(root)) {\n rootSubscriptions.set(root, subscribeToRoot(root, sync));\n }\n }\n };\n\n attachRootObservers();\n // Initial sync — caller's `sync` reads the current attribute snapshot.\n sync();\n\n return {\n resync(): void {\n attachRootObservers();\n sync();\n },\n disconnect(): void {\n hostObserver.disconnect();\n slotAttrObserver.disconnect();\n for (const unsub of rootSubscriptions.values()) {\n unsub();\n }\n rootSubscriptions.clear();\n },\n };\n}\n"],"names":["resolveIdrefTokens","host","tokens","ids","roots","collectIdrefSearchRoots","ownerDoc","out","id","root","el","start","visited","pushRoot","visitedEntries","slotEntries","documentSeen","walkChain","entry","currentNode","currentRoot","slotFromEntry","shadowHost","hostSlot","supportsIdrefElementReferences","internals","DEFAULT_HOST_OBSERVED_ATTRS","sharedRootObservers","subscribeToRoot","sync","subscribers","pendingFrame","flush","fn","scheduleFlush","cb","observer","current","installAriaIdrefMirror","options","observedAttributes","observeRoot","hostObserver","slotAttrObserver","attachRootObservers","rootSubscriptions","computeRootsToObserve","wanted","wantedSet","unsub"],"mappings":"AAqDO,SAASA,EAAmBC,GAAeC,GAAkC;AAClF,MAAI,CAACA,EAAQ,QAAO,CAAA;AACpB,QAAMC,IAAMD,EAAO,MAAM,KAAK,EAAE,OAAO,OAAO;AAC9C,MAAIC,EAAI,WAAW,EAAG,QAAO,CAAA;AAM7B,QAAMC,IAAsC,CAA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MoB,CAAI,CAAC;AAAA,EAG7D;AAEA,SAAAe,EAAA,GAEAf,EAAA,GAEO;AAAA,IACL,SAAe;AACb,MAAAe,EAAA,GACAf,EAAA;AAAA,IACF;AAAA,IACA,aAAmB;AACjB,MAAAa,EAAa,WAAA,GACbC,EAAiB,WAAA;AACjB,iBAAWM,KAASJ,EAAkB;AACpC,QAAAI,EAAA;AAEF,MAAAJ,EAAkB,MAAA;AAAA,IACpB;AAAA,EAAA;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-accordion-ZVzgDzTG.js","sources":["../../src/components/hx-accordion/hx-accordion.styles.ts","../../src/components/hx-accordion/hx-accordion-item.styles.ts","../../src/components/hx-accordion/hx-accordion-item.ts","../../src/components/hx-accordion/hx-accordion.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixAccordionStyles = css`\n :host {\n display: block;\n font-family: var(--hx-accordion-font-family, var(--hx-font-family-sans, sans-serif));\n }\n\n .accordion {\n border-radius: var(--hx-accordion-border-radius, var(--hx-border-radius-md, 0.375rem));\n overflow: hidden;\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n .accordion {\n border: 2px solid CanvasText;\n }\n }\n`;\n","import { css } from 'lit';\n\nexport const helixAccordionItemStyles = css`\n :host {\n display: block;\n }\n\n .item {\n border-bottom: var(--hx-border-width-thin, 1px) solid\n var(--hx-accordion-border-color, var(--hx-color-neutral-200, #d6dbd5));\n font-family: var(--hx-accordion-item-font-family, var(--hx-font-family-sans, sans-serif));\n }\n\n :host(:first-child) .item {\n border-top: var(--hx-border-width-thin, 1px) solid\n var(--hx-accordion-border-color, var(--hx-color-neutral-200, #d6dbd5));\n }\n\n /* Remove native details marker */\n .trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--hx-space-3, 0.75rem);\n padding: var(--hx-accordion-trigger-padding, var(--hx-space-4, 1rem));\n cursor: pointer;\n list-style: none;\n font-size: var(--hx-font-size-md, 1rem);\n font-weight: var(--hx-font-weight-semibold, 600);\n color: var(--hx-accordion-trigger-color, var(--hx-color-neutral-800, #202b39));\n background-color: var(--hx-accordion-trigger-bg, transparent);\n user-select: none;\n transition: background-color var(--hx-transition-fast, 150ms ease);\n }\n\n /* Hide the native details disclosure triangle */\n .trigger::-webkit-details-marker {\n display: none;\n }\n\n .trigger::marker {\n display: none;\n }\n\n .item--disabled .trigger {\n cursor: not-allowed;\n }\n\n :host(:not([disabled])) .trigger:hover {\n background-color: var(--hx-accordion-trigger-hover-bg, var(--hx-color-neutral-50, #f5f8f3));\n }\n\n .trigger:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #0f7078);\n outline-offset: var(--hx-focus-ring-offset, -2px);\n }\n\n /* ─── Icon ─── */\n\n .icon {\n flex-shrink: 0;\n width: var(--hx-accordion-icon-size, var(--hx-size-5, 1.25rem));\n height: var(--hx-accordion-icon-size, var(--hx-size-5, 1.25rem));\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--hx-accordion-icon-color, var(--hx-color-neutral-500, #66787b));\n transition: transform var(--hx-transition-normal, 250ms ease);\n }\n\n .item--expanded .icon {\n transform: rotate(180deg);\n }\n\n /* ─── Content animation via CSS grid trick ─── */\n\n .content-wrapper {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows var(--hx-transition-normal, 250ms ease);\n overflow: hidden;\n }\n\n .item--expanded .content-wrapper,\n details[open]:not(.item--expanded) .content-wrapper {\n grid-template-rows: 1fr;\n }\n\n .content-inner {\n overflow: hidden;\n }\n\n .content {\n padding: var(--hx-accordion-content-padding, 0 var(--hx-space-4, 1rem) var(--hx-space-4, 1rem));\n font-size: var(--hx-font-size-md, 1rem);\n line-height: var(--hx-line-height-normal, 1.5);\n color: var(--hx-accordion-content-color, var(--hx-color-neutral-600, #4a5362));\n }\n\n /* ─── Disabled host ─── */\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled, 0.5);\n }\n\n /* ─── Reduced motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .trigger {\n transition: none;\n }\n\n .icon {\n transition: none;\n }\n\n .content-wrapper {\n transition: none;\n }\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n .trigger {\n forced-color-adjust: none;\n color: ButtonText;\n background-color: ButtonFace;\n }\n\n .trigger:focus-visible {\n outline: 3px solid Highlight;\n outline-offset: -2px;\n }\n\n .item {\n border-bottom-color: CanvasText;\n }\n\n :host(:first-child) .item {\n border-top-color: CanvasText;\n }\n\n .item--disabled .trigger {\n color: GrayText;\n }\n\n :host([disabled]) {\n opacity: 1;\n }\n\n .icon {\n color: ButtonText;\n }\n\n .content {\n color: CanvasText;\n }\n }\n`;\n","import { html, svg, nothing } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HelixElement, createIdCounter } from '../../base/index.js';\nimport { helixAccordionItemStyles } from './hx-accordion-item.styles.js';\nimport { forcedColorsInteractive } from '../../styles/forced-colors.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\nconst chevronIcon = svg`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"6 9 12 15 18 9\"></polyline>\n </svg>\n`;\n\nconst _nextAccordionItemId = createIdCounter('hx-accordion-item');\n\n/** Detail for hx-expand and hx-collapse events dispatched by hx-accordion-item. */\nexport interface HxAccordionToggleDetail {\n expanded: boolean;\n itemId: string;\n}\n\n/**\n * An individual accordion item with collapsible content.\n *\n * @summary Collapsible panel that can be expanded or collapsed.\n *\n * @tag hx-accordion-item\n *\n * @slot trigger - The heading/trigger content for this item.\n * @slot - Default slot for the collapsible body content.\n *\n * @attr {number} level - Heading level (1–6) for the trigger via `role=\"heading\" aria-level`.\n * Defaults to 3. Set this to match the document outline — e.g., use `level=\"2\"` when the\n * accordion appears under an `<h1>` landmark.\n *\n * @fires {CustomEvent<{expanded: boolean, itemId: string}>} hx-expand - Dispatched when the item is expanded.\n * @fires {CustomEvent<{expanded: boolean, itemId: string}>} hx-collapse - Dispatched when the item is collapsed.\n *\n * @csspart item - The outer details element container.\n * @csspart trigger - The summary/trigger element.\n * @csspart content - The collapsible content area.\n * @csspart icon - The expand/collapse icon.\n *\n * @cssprop [--hx-accordion-border-color=var(--hx-color-neutral-200)] - Border color between items.\n * @cssprop [--hx-accordion-trigger-padding=var(--hx-space-4)] - Trigger padding.\n * @cssprop [--hx-accordion-trigger-color=var(--hx-color-neutral-800)] - Trigger text color.\n * @cssprop [--hx-accordion-trigger-bg=transparent] - Trigger background color.\n * @cssprop [--hx-accordion-trigger-hover-bg=var(--hx-color-neutral-50)] - Trigger hover background.\n * @cssprop [--hx-accordion-icon-color=var(--hx-color-neutral-500)] - Icon color.\n * @cssprop [--hx-accordion-content-padding=0 var(--hx-space-4) var(--hx-space-4)] - Content padding.\n * @cssprop [--hx-accordion-content-color=var(--hx-color-neutral-600)] - Content text color.\n */\n@customElement('hx-accordion-item')\nexport class HelixAccordionItem extends HelixElement {\n static override styles = [helixAccordionItemStyles, forcedColorsInteractive];\n\n /** @internal */\n private _uid = _nextAccordionItemId();\n\n /**\n * Whether this item is expanded.\n * @attr expanded\n */\n @property({ type: Boolean, reflect: true })\n expanded = false;\n\n /**\n * Whether this item is disabled (cannot be toggled).\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Heading level (1–6) applied via `role=\"heading\" aria-level` on the summary\n * trigger. Defaults to 3. Set to match the document outline around the\n * accordion so screen readers surface accordion items in the heading list.\n * @attr level\n */\n @property({ type: Number })\n level: 1 | 2 | 3 | 4 | 5 | 6 = 3;\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (!this.closest('hx-accordion')) {\n devWarn(\n 'hx-accordion-item',\n 'Used outside hx-accordion. Single-expand coordination will not function.',\n );\n }\n }\n\n // ─── Slot Handlers ───\n\n /** @internal */\n private _handleTriggerSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n const hasContent = slot.assignedNodes({ flatten: true }).length > 0;\n if (!hasContent) {\n devWarn(\n 'hx-accordion-item',\n 'trigger slot is empty — provide a visible label for keyboard and screen reader users.',\n );\n }\n }\n\n // ─── Heading Level Helper ───\n\n /**\n * Returns a clamped heading level (1–6) for use as `aria-level` on the\n * `<summary>` element. Per the WAI-ARIA APG Accordion pattern, the\n * `<summary>` must be a **direct child** of `<details>` for native\n * disclosure behaviour to work. Instead of wrapping `<summary>` inside\n * an `<h3>` (which breaks the native toggle), we apply\n * `role=\"heading\" aria-level=\"N\"` directly on `<summary>`.\n */\n /** @internal */\n private get _headingLevel(): number {\n return Math.max(1, Math.min(6, this.level));\n }\n\n // ─── Toggle Logic ───\n\n /** @internal */\n private _toggle(): void {\n if (this.disabled) return;\n\n const willExpand = !this.expanded;\n this.expanded = willExpand;\n\n this._dispatchToggleEvent(willExpand);\n }\n\n /** @internal */\n _dispatchToggleEvent(expanded: boolean): void {\n const detail = { expanded, itemId: this.id || '' };\n const options = { bubbles: true, composed: true, detail };\n\n if (expanded) {\n this.dispatchEvent(\n new CustomEvent<{ expanded: boolean; itemId: string }>('hx-expand', options),\n );\n } else {\n this.dispatchEvent(\n new CustomEvent<{ expanded: boolean; itemId: string }>('hx-collapse', options),\n );\n }\n }\n\n // ─── Event Handlers ───\n\n /** @internal */\n private _handleSummaryClick(e: MouseEvent): void {\n e.preventDefault();\n this._toggle();\n }\n\n /** @internal */\n private _handleKeyDown(e: KeyboardEvent): void {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this._toggle();\n }\n }\n\n // ─── Render ───\n\n override render() {\n const itemClasses = {\n item: true,\n 'item--expanded': this.expanded,\n 'item--disabled': this.disabled,\n };\n\n return html`\n <details part=\"item\" class=${classMap(itemClasses)} ?open=${this.expanded}>\n <summary\n id=${`${this._uid}-trigger`}\n part=\"trigger\"\n class=\"trigger\"\n role=\"heading\"\n aria-level=${this._headingLevel}\n tabindex=${this.disabled ? '-1' : '0'}\n aria-expanded=${this.expanded ? 'true' : 'false'}\n aria-disabled=${this.disabled ? 'true' : nothing}\n aria-controls=${`${this._uid}-content`}\n @click=${this._handleSummaryClick}\n @keydown=${this._handleKeyDown}\n >\n <slot name=\"trigger\" @slotchange=${this._handleTriggerSlotChange}></slot>\n <span part=\"icon\" class=\"icon\">${chevronIcon}</span>\n </summary>\n <div class=\"content-wrapper\">\n <div class=\"content-inner\">\n <div\n id=${`${this._uid}-content`}\n part=\"content\"\n class=\"content\"\n role=\"region\"\n aria-labelledby=${`${this._uid}-trigger`}\n aria-hidden=${this.expanded ? nothing : 'true'}\n >\n <slot></slot>\n </div>\n </div>\n </div>\n </details>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-accordion-item': HelixAccordionItem;\n }\n}\n","import { html, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { HelixElement } from '../../base/index.js';\nimport { helixAccordionStyles } from './hx-accordion.styles.js';\nimport { forcedColorsInteractive } from '../../styles/forced-colors.js';\nimport './hx-accordion-item.js';\nimport type { HelixAccordionItem } from './hx-accordion-item.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * An accordion container that manages collapsible content sections.\n *\n * @summary Collapsible content sections with single or multi-expand modes.\n *\n * @tag hx-accordion\n *\n * @slot - Default slot for hx-accordion-item elements.\n *\n * @csspart accordion - The outer container wrapping all accordion items.\n *\n * @cssprop [--hx-accordion-border-radius=var(--hx-border-radius-md)] - Outer border radius.\n *\n * @example\n * ```html\n * <hx-accordion mode=\"single\">\n * <hx-accordion-item>\n * <span slot=\"trigger\">What is this?</span>\n * <p>Answer content here.</p>\n * </hx-accordion-item>\n * </hx-accordion>\n * ```\n * @cssprop [--hx-accordion-font-family=var(--hx-font-family-sans)] - CSS custom property.\n * @cssprop [--hx-font-family-sans] - Font family.\n * @cssprop [--hx-border-radius-md] - CSS custom property.\n */\n@customElement('hx-accordion')\nexport class HelixAccordion extends HelixElement {\n static override styles = [helixAccordionStyles, forcedColorsInteractive];\n\n /**\n * Expansion mode: 'single' collapses all other items when one expands.\n * 'multi' allows multiple items open simultaneously.\n * @attr mode\n */\n @property({ type: String, reflect: true })\n mode: 'single' | 'multi' = 'single';\n\n // ─── Lifecycle ───\n\n /** @internal */\n private _mutationObserver: MutationObserver | null = null;\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('hx-expand', this._handleChildExpand);\n this.addEventListener('keydown', this._handleKeyDown);\n // Re-enforce single mode when reconnected with pre-expanded items\n this._enforceSingleMode();\n // Watch for dynamically added accordion items that may violate single-expand\n if (typeof MutationObserver !== 'undefined') {\n this._mutationObserver = new MutationObserver((mutations) => {\n const hasNewItems = mutations.some((m) =>\n Array.from(m.addedNodes).some(\n (n) => n instanceof Element && n.tagName.toLowerCase() === 'hx-accordion-item',\n ),\n );\n if (hasNewItems) {\n this._enforceSingleMode();\n }\n });\n this._mutationObserver.observe(this, { childList: true });\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('hx-expand', this._handleChildExpand);\n this.removeEventListener('keydown', this._handleKeyDown);\n this._mutationObserver?.disconnect();\n this._mutationObserver = null;\n }\n\n protected override firstUpdated(): void {\n this._enforceSingleMode();\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('mode')) {\n const validModes: string[] = ['single', 'multi'];\n if (!validModes.includes(this.mode)) {\n devWarn(\n 'hx-accordion',\n `Invalid mode \"${this.mode}\". Expected one of: ${validModes.join(', ')}. Clamping to \"single\".`,\n );\n this.mode = 'single';\n return;\n }\n // When switching from multi to single, enforce single-expand immediately\n this._enforceSingleMode();\n }\n }\n\n // ─── Single-expand coordination ───\n\n /** @internal */\n private _enforceSingleMode(): void {\n if (this.mode !== 'single') return;\n\n const items = this.querySelectorAll<HelixAccordionItem>('hx-accordion-item');\n let foundExpanded = false;\n\n items.forEach((item) => {\n if (item.expanded) {\n if (foundExpanded) {\n item.expanded = false;\n } else {\n foundExpanded = true;\n }\n }\n });\n }\n\n /**\n * Handles expand events from child accordion items to enforce single-expand mode.\n * @internal\n */\n private _handleChildExpand = (e: Event): void => {\n if (this.mode !== 'single') return;\n\n const expandedItem = e.composedPath()[0] as HelixAccordionItem;\n const items = this.querySelectorAll<HelixAccordionItem>('hx-accordion-item');\n\n items.forEach((item) => {\n if (item !== expandedItem && item.expanded) {\n item.expanded = false;\n item._dispatchToggleEvent(false);\n }\n });\n };\n\n // ─── Arrow key navigation (ARIA APG Accordion pattern) ───\n\n /**\n * Handles keyboard navigation between accordion triggers using arrow, Home, and End keys.\n * @internal\n */\n private _handleKeyDown = (e: KeyboardEvent): void => {\n const triggers = this._getTriggers();\n if (triggers.length === 0) return;\n\n const activeEl = this.shadowRoot?.activeElement ?? document.activeElement;\n let currentItem: HelixAccordionItem | null = null;\n\n const items = Array.from(this.querySelectorAll<HelixAccordionItem>('hx-accordion-item'));\n for (const item of items) {\n const summary = item.shadowRoot?.querySelector('[part=\"trigger\"]');\n if (summary === activeEl || item.shadowRoot?.activeElement === summary) {\n currentItem = item;\n break;\n }\n }\n\n if (!currentItem) return;\n\n const enabledItems = items.filter((item) => !item.disabled);\n const currentIndex = enabledItems.indexOf(currentItem);\n if (currentIndex === -1) return;\n\n let targetIndex = -1;\n\n switch (e.key) {\n case 'ArrowDown':\n targetIndex = (currentIndex + 1) % enabledItems.length;\n break;\n case 'ArrowUp':\n targetIndex = (currentIndex - 1 + enabledItems.length) % enabledItems.length;\n break;\n case 'Home':\n targetIndex = 0;\n break;\n case 'End':\n targetIndex = enabledItems.length - 1;\n break;\n default:\n return;\n }\n\n e.preventDefault();\n const targetItem = enabledItems[targetIndex];\n const targetSummary = targetItem?.shadowRoot?.querySelector<HTMLElement>('[part=\"trigger\"]');\n targetSummary?.focus();\n };\n\n /** @internal */\n private _getTriggers(): HTMLElement[] {\n const items = this.querySelectorAll<HelixAccordionItem>('hx-accordion-item');\n const triggers: HTMLElement[] = [];\n items.forEach((item) => {\n const summary = item.shadowRoot?.querySelector<HTMLElement>('[part=\"trigger\"]');\n if (summary) triggers.push(summary);\n });\n return triggers;\n }\n\n // ─── Slot validation ───\n\n /** @internal */\n private _handleSlotChange(e: Event): void {\n const slot = e.target;\n if (!(slot instanceof HTMLSlotElement)) return;\n const invalid = slot\n .assignedElements()\n .filter((el) => el.tagName.toLowerCase() !== 'hx-accordion-item');\n if (invalid.length > 0) {\n devWarn(\n 'hx-accordion',\n `Default slot expects <hx-accordion-item> elements. Found unexpected: ${invalid.map((el) => `<${el.tagName.toLowerCase()}>`).join(', ')}`,\n );\n }\n }\n\n // ─── Render ───\n\n override render() {\n return html`\n <div part=\"accordion\" class=\"accordion\">\n <slot @slotchange=${this._handleSlotChange}></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-accordion': HelixAccordion;\n }\n}\n"],"names":["helixAccordionStyles","css","helixAccordionItemStyles","chevronIcon","svg","_nextAccordionItemId","createIdCounter","HelixAccordionItem","HelixElement","willExpand","expanded","options","itemClasses","html","classMap","nothing","forcedColorsInteractive","__decorateClass","property","customElement","HelixAccordion","expandedItem","item","activeEl","_a","currentItem","items","summary","_b","_c","enabledItems","currentIndex","targetIndex","targetItem","targetSummary","_d","mutations","m","n","changedProperties","validModes","devWarn","foundExpanded","triggers","slot","invalid","el"],"mappings":";;;;;;;AAEO,MAAMA,IAAuBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G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AAgB;AAEpB,IAAAhB,EAAM,QAAQ,CAACJ,MAAS;AACtB,MAAIA,EAAK,aACHoB,IACFpB,EAAK,WAAW,KAEhBoB,IAAgB;AAAA,IAGtB,CAAC;AAAA,EACH;AAAA;AAAA,EA0EQ,eAA8B;AACpC,UAAMhB,IAAQ,KAAK,iBAAqC,mBAAmB,GACrEiB,IAA0B,CAAA;AAChC,WAAAjB,EAAM,QAAQ,CAACJ,MAAS;;AACtB,YAAMK,KAAUH,IAAAF,EAAK,eAAL,gBAAAE,EAAiB,cAA2B;AAC5D,MAAIG,KAASgB,EAAS,KAAKhB,CAAO;AAAA,IACpC,CAAC,GACMgB;AAAA,EACT;AAAA;AAAA;AAAA,EAKQ,kBAAkB,GAAgB;AACxC,UAAMC,IAAO,EAAE;AACf,QAAI,EAAEA,aAAgB,iBAAkB;AACxC,UAAMC,IAAUD,EACb,iBAAA,EACA,OAAO,CAACE,MAAOA,EAAG,QAAQ,YAAA,MAAkB,mBAAmB;AAClE,IAAID,EAAQ,SAAS,KACnBJ;AAAA,MACE;AAAA,MACA,wEAAwEI,EAAQ,IAAI,CAACC,MAAO,IAAIA,EAAG,QAAQ,YAAA,CAAa,GAAG,EAAE,KAAK,IAAI,CAAC;AAAA,IAAA;AAAA,EAG7I;AAAA;AAAA,EAIS,SAAS;AAChB,WAAOjC;AAAA;AAAA,4BAEiB,KAAK,iBAAiB;AAAA;AAAA;AAAA,EAGhD;AACF;AAnMaO,EACK,SAAS,CAACpB,GAAsBgB,CAAuB;AAQvEC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAR9BE,EASX,WAAA,QAAA,CAAA;AATWA,IAANH,EAAA;AAAA,EADNE,EAAc,cAAc;AAAA,GAChBC,CAAA;"}
|
|
1
|
+
{"version":3,"file":"hx-accordion-ZVzgDzTG.js","sources":["../../src/components/hx-accordion/hx-accordion.styles.ts","../../src/components/hx-accordion/hx-accordion-item.styles.ts","../../src/components/hx-accordion/hx-accordion-item.ts","../../src/components/hx-accordion/hx-accordion.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixAccordionStyles = css`\n :host {\n display: block;\n font-family: var(--hx-accordion-font-family, var(--hx-font-family-sans, sans-serif));\n }\n\n .accordion {\n border-radius: var(--hx-accordion-border-radius, var(--hx-border-radius-md, 0.375rem));\n overflow: hidden;\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n .accordion {\n border: 2px solid CanvasText;\n }\n }\n`;\n","import { css } from 'lit';\n\nexport const helixAccordionItemStyles = css`\n :host {\n display: block;\n }\n\n .item {\n border-bottom: var(--hx-border-width-thin, 1px) solid\n var(--hx-accordion-border-color, var(--hx-color-neutral-200, #d6dbd5));\n font-family: var(--hx-accordion-item-font-family, var(--hx-font-family-sans, sans-serif));\n }\n\n :host(:first-child) .item {\n border-top: var(--hx-border-width-thin, 1px) solid\n var(--hx-accordion-border-color, var(--hx-color-neutral-200, #d6dbd5));\n }\n\n /* Remove native details marker */\n .trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--hx-space-3, 0.75rem);\n padding: var(--hx-accordion-trigger-padding, var(--hx-space-4, 1rem));\n cursor: pointer;\n list-style: none;\n font-size: var(--hx-font-size-md, 1rem);\n font-weight: var(--hx-font-weight-semibold, 600);\n color: var(--hx-accordion-trigger-color, var(--hx-color-neutral-800, #202b39));\n background-color: var(--hx-accordion-trigger-bg, transparent);\n user-select: none;\n transition: background-color var(--hx-transition-fast, 150ms ease);\n }\n\n /* Hide the native details disclosure triangle */\n .trigger::-webkit-details-marker {\n display: none;\n }\n\n .trigger::marker {\n display: none;\n }\n\n .item--disabled .trigger {\n cursor: not-allowed;\n }\n\n :host(:not([disabled])) .trigger:hover {\n background-color: var(--hx-accordion-trigger-hover-bg, var(--hx-color-neutral-50, #f5f8f3));\n }\n\n .trigger:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #0f7078);\n outline-offset: var(--hx-focus-ring-offset, -2px);\n }\n\n /* ─── Icon ─── */\n\n .icon {\n flex-shrink: 0;\n width: var(--hx-accordion-icon-size, var(--hx-size-5, 1.25rem));\n height: var(--hx-accordion-icon-size, var(--hx-size-5, 1.25rem));\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--hx-accordion-icon-color, var(--hx-color-neutral-500, #66787b));\n transition: transform var(--hx-transition-normal, 250ms ease);\n }\n\n .item--expanded .icon {\n transform: rotate(180deg);\n }\n\n /* ─── Content animation via CSS grid trick ─── */\n\n .content-wrapper {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows var(--hx-transition-normal, 250ms ease);\n overflow: hidden;\n }\n\n .item--expanded .content-wrapper,\n details[open]:not(.item--expanded) .content-wrapper {\n grid-template-rows: 1fr;\n }\n\n .content-inner {\n overflow: hidden;\n }\n\n .content {\n padding: var(--hx-accordion-content-padding, 0 var(--hx-space-4, 1rem) var(--hx-space-4, 1rem));\n font-size: var(--hx-font-size-md, 1rem);\n line-height: var(--hx-line-height-normal, 1.5);\n color: var(--hx-accordion-content-color, var(--hx-color-neutral-600, #4a5362));\n }\n\n /* ─── Disabled host ─── */\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled, 0.5);\n }\n\n /* ─── Reduced motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .trigger {\n transition: none;\n }\n\n .icon {\n transition: none;\n }\n\n .content-wrapper {\n transition: none;\n }\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n .trigger {\n forced-color-adjust: none;\n color: ButtonText;\n background-color: ButtonFace;\n }\n\n .trigger:focus-visible {\n outline: 3px solid Highlight;\n outline-offset: -2px;\n }\n\n .item {\n border-bottom-color: CanvasText;\n }\n\n :host(:first-child) .item {\n border-top-color: CanvasText;\n }\n\n .item--disabled .trigger {\n color: GrayText;\n }\n\n :host([disabled]) {\n opacity: 1;\n }\n\n .icon {\n color: ButtonText;\n }\n\n .content {\n color: CanvasText;\n }\n }\n`;\n","import { html, svg, nothing } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HelixElement, createIdCounter } from '../../base/index.js';\nimport { helixAccordionItemStyles } from './hx-accordion-item.styles.js';\nimport { forcedColorsInteractive } from '../../styles/forced-colors.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\nconst chevronIcon = svg`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"6 9 12 15 18 9\"></polyline>\n </svg>\n`;\n\nconst _nextAccordionItemId = createIdCounter('hx-accordion-item');\n\n/** Detail for hx-expand and hx-collapse events dispatched by hx-accordion-item. */\nexport interface HxAccordionToggleDetail {\n expanded: boolean;\n itemId: string;\n}\n\n/**\n * An individual accordion item with collapsible content.\n *\n * ## Architecture Note: Slot Projection vs. Host-Canonical (group-4 round-1)\n *\n * `hx-accordion-item` deliberately does NOT participate in the\n * host-canonical / `internals.ariaLabelledByElements` pattern used by every\n * other group-2/3/4 component. Rationale:\n *\n * 1. The trigger label comes from `<slot name=\"trigger\">` — consumer\n * light-DOM projected directly into the `<summary>` element. AT reads\n * the slot-projected text natively because slot projection preserves\n * accessible name (the `<summary>` IS the heading and consumes the\n * slotted text in its own accessible name computation).\n * 2. `aria-labelledby=\"${_uid}-trigger\"` on the inner content region and\n * `aria-controls=\"${_uid}-content\"` on the summary BOTH resolve\n * same-shadow-root, which works correctly across every AT — these\n * IDREFs never cross a shadow boundary.\n * 3. Pushing these ids through `internals.ariaLabelledByElements` would\n * either duplicate the wiring (heading announced twice) or break the\n * native `<details>/<summary>` toggle semantics (the host carrying\n * `role=\"heading\"` would shadow the summary's own heading projection).\n *\n * `role=\"heading\"` on `<summary>` (with `aria-level=N`) is the APG-canonical\n * Accordion pattern. Per the APG note, `<summary>` MUST be a direct child\n * of `<details>` for the native toggle to function — wrapping it in an\n * `<h3>` would forfeit native disclosure. The role-on-summary approach is\n * the authoritative compromise. NVDA, JAWS, and VoiceOver all announce the\n * summary as a heading at the configured level when this pattern is used.\n *\n * `aria-controls` on the summary points at the shadow-internal content\n * region; APG marks the relationship as implicit via the heading + region\n * structure, so AT not following the IDREF still announces correctly. The\n * IDREF is a hint, not a requirement — and because both ids are in the\n * same shadow root, it resolves cleanly when AT does follow it. This\n * matches the popover/dropdown intentional `aria-controls` omission for\n * the cross-shadow case (see those components' code comments).\n *\n * @summary Collapsible panel that can be expanded or collapsed.\n *\n * @tag hx-accordion-item\n *\n * @slot trigger - The heading/trigger content for this item.\n * @slot - Default slot for the collapsible body content.\n *\n * @attr {number} level - Heading level (1–6) for the trigger via `role=\"heading\" aria-level`.\n * Defaults to 3. Set this to match the document outline — e.g., use `level=\"2\"` when the\n * accordion appears under an `<h1>` landmark.\n *\n * @fires {CustomEvent<{expanded: boolean, itemId: string}>} hx-expand - Dispatched when the item is expanded.\n * @fires {CustomEvent<{expanded: boolean, itemId: string}>} hx-collapse - Dispatched when the item is collapsed.\n *\n * @csspart item - The outer details element container.\n * @csspart trigger - The summary/trigger element.\n * @csspart content - The collapsible content area.\n * @csspart icon - The expand/collapse icon.\n *\n * @cssprop [--hx-accordion-border-color=var(--hx-color-neutral-200)] - Border color between items.\n * @cssprop [--hx-accordion-trigger-padding=var(--hx-space-4)] - Trigger padding.\n * @cssprop [--hx-accordion-trigger-color=var(--hx-color-neutral-800)] - Trigger text color.\n * @cssprop [--hx-accordion-trigger-bg=transparent] - Trigger background color.\n * @cssprop [--hx-accordion-trigger-hover-bg=var(--hx-color-neutral-50)] - Trigger hover background.\n * @cssprop [--hx-accordion-icon-color=var(--hx-color-neutral-500)] - Icon color.\n * @cssprop [--hx-accordion-content-padding=0 var(--hx-space-4) var(--hx-space-4)] - Content padding.\n * @cssprop [--hx-accordion-content-color=var(--hx-color-neutral-600)] - Content text color.\n */\n@customElement('hx-accordion-item')\nexport class HelixAccordionItem extends HelixElement {\n static override styles = [helixAccordionItemStyles, forcedColorsInteractive];\n\n /** @internal */\n private _uid = _nextAccordionItemId();\n\n /**\n * Whether this item is expanded.\n * @attr expanded\n */\n @property({ type: Boolean, reflect: true })\n expanded = false;\n\n /**\n * Whether this item is disabled (cannot be toggled).\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Heading level (1–6) applied via `role=\"heading\" aria-level` on the summary\n * trigger. Defaults to 3. Set to match the document outline around the\n * accordion so screen readers surface accordion items in the heading list.\n * @attr level\n */\n @property({ type: Number })\n level: 1 | 2 | 3 | 4 | 5 | 6 = 3;\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (!this.closest('hx-accordion')) {\n devWarn(\n 'hx-accordion-item',\n 'Used outside hx-accordion. Single-expand coordination will not function.',\n );\n }\n }\n\n // ─── Slot Handlers ───\n\n /** @internal */\n private _handleTriggerSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n const hasContent = slot.assignedNodes({ flatten: true }).length > 0;\n if (!hasContent) {\n devWarn(\n 'hx-accordion-item',\n 'trigger slot is empty — provide a visible label for keyboard and screen reader users.',\n );\n }\n }\n\n // ─── Heading Level Helper ───\n\n /**\n * Returns a clamped heading level (1–6) for use as `aria-level` on the\n * `<summary>` element. Per the WAI-ARIA APG Accordion pattern, the\n * `<summary>` must be a **direct child** of `<details>` for native\n * disclosure behaviour to work. Instead of wrapping `<summary>` inside\n * an `<h3>` (which breaks the native toggle), we apply\n * `role=\"heading\" aria-level=\"N\"` directly on `<summary>`.\n */\n /** @internal */\n private get _headingLevel(): number {\n return Math.max(1, Math.min(6, this.level));\n }\n\n // ─── Toggle Logic ───\n\n /** @internal */\n private _toggle(): void {\n if (this.disabled) return;\n\n const willExpand = !this.expanded;\n this.expanded = willExpand;\n\n this._dispatchToggleEvent(willExpand);\n }\n\n /** @internal */\n _dispatchToggleEvent(expanded: boolean): void {\n const detail = { expanded, itemId: this.id || '' };\n const options = { bubbles: true, composed: true, detail };\n\n if (expanded) {\n this.dispatchEvent(\n new CustomEvent<{ expanded: boolean; itemId: string }>('hx-expand', options),\n );\n } else {\n this.dispatchEvent(\n new CustomEvent<{ expanded: boolean; itemId: string }>('hx-collapse', options),\n );\n }\n }\n\n // ─── Event Handlers ───\n\n /** @internal */\n private _handleSummaryClick(e: MouseEvent): void {\n e.preventDefault();\n this._toggle();\n }\n\n /** @internal */\n private _handleKeyDown(e: KeyboardEvent): void {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this._toggle();\n }\n }\n\n // ─── Render ───\n\n override render() {\n const itemClasses = {\n item: true,\n 'item--expanded': this.expanded,\n 'item--disabled': this.disabled,\n };\n\n return html`\n <details part=\"item\" class=${classMap(itemClasses)} ?open=${this.expanded}>\n <summary\n id=${`${this._uid}-trigger`}\n part=\"trigger\"\n class=\"trigger\"\n role=\"heading\"\n aria-level=${this._headingLevel}\n tabindex=${this.disabled ? '-1' : '0'}\n aria-expanded=${this.expanded ? 'true' : 'false'}\n aria-disabled=${this.disabled ? 'true' : nothing}\n aria-controls=${`${this._uid}-content`}\n @click=${this._handleSummaryClick}\n @keydown=${this._handleKeyDown}\n >\n <slot name=\"trigger\" @slotchange=${this._handleTriggerSlotChange}></slot>\n <span part=\"icon\" class=\"icon\">${chevronIcon}</span>\n </summary>\n <div class=\"content-wrapper\">\n <div class=\"content-inner\">\n <div\n id=${`${this._uid}-content`}\n part=\"content\"\n class=\"content\"\n role=\"region\"\n aria-labelledby=${`${this._uid}-trigger`}\n aria-hidden=${this.expanded ? nothing : 'true'}\n >\n <slot></slot>\n </div>\n </div>\n </div>\n </details>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-accordion-item': HelixAccordionItem;\n }\n}\n","import { html, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { HelixElement } from '../../base/index.js';\nimport { helixAccordionStyles } from './hx-accordion.styles.js';\nimport { forcedColorsInteractive } from '../../styles/forced-colors.js';\nimport './hx-accordion-item.js';\nimport type { HelixAccordionItem } from './hx-accordion-item.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * An accordion container that manages collapsible content sections.\n *\n * @summary Collapsible content sections with single or multi-expand modes.\n *\n * @tag hx-accordion\n *\n * @slot - Default slot for hx-accordion-item elements.\n *\n * @csspart accordion - The outer container wrapping all accordion items.\n *\n * @cssprop [--hx-accordion-border-radius=var(--hx-border-radius-md)] - Outer border radius.\n *\n * @example\n * ```html\n * <hx-accordion mode=\"single\">\n * <hx-accordion-item>\n * <span slot=\"trigger\">What is this?</span>\n * <p>Answer content here.</p>\n * </hx-accordion-item>\n * </hx-accordion>\n * ```\n * @cssprop [--hx-accordion-font-family=var(--hx-font-family-sans)] - CSS custom property.\n * @cssprop [--hx-font-family-sans] - Font family.\n * @cssprop [--hx-border-radius-md] - CSS custom property.\n */\n@customElement('hx-accordion')\nexport class HelixAccordion extends HelixElement {\n static override styles = [helixAccordionStyles, forcedColorsInteractive];\n\n /**\n * Expansion mode: 'single' collapses all other items when one expands.\n * 'multi' allows multiple items open simultaneously.\n * @attr mode\n */\n @property({ type: String, reflect: true })\n mode: 'single' | 'multi' = 'single';\n\n // ─── Lifecycle ───\n\n /** @internal */\n private _mutationObserver: MutationObserver | null = null;\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('hx-expand', this._handleChildExpand);\n this.addEventListener('keydown', this._handleKeyDown);\n // Re-enforce single mode when reconnected with pre-expanded items\n this._enforceSingleMode();\n // Watch for dynamically added accordion items that may violate single-expand\n if (typeof MutationObserver !== 'undefined') {\n this._mutationObserver = new MutationObserver((mutations) => {\n const hasNewItems = mutations.some((m) =>\n Array.from(m.addedNodes).some(\n (n) => n instanceof Element && n.tagName.toLowerCase() === 'hx-accordion-item',\n ),\n );\n if (hasNewItems) {\n this._enforceSingleMode();\n }\n });\n this._mutationObserver.observe(this, { childList: true });\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('hx-expand', this._handleChildExpand);\n this.removeEventListener('keydown', this._handleKeyDown);\n this._mutationObserver?.disconnect();\n this._mutationObserver = null;\n }\n\n protected override firstUpdated(): void {\n this._enforceSingleMode();\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('mode')) {\n const validModes: string[] = ['single', 'multi'];\n if (!validModes.includes(this.mode)) {\n devWarn(\n 'hx-accordion',\n `Invalid mode \"${this.mode}\". Expected one of: ${validModes.join(', ')}. Clamping to \"single\".`,\n );\n this.mode = 'single';\n return;\n }\n // When switching from multi to single, enforce single-expand immediately\n this._enforceSingleMode();\n }\n }\n\n // ─── Single-expand coordination ───\n\n /** @internal */\n private _enforceSingleMode(): void {\n if (this.mode !== 'single') return;\n\n const items = this.querySelectorAll<HelixAccordionItem>('hx-accordion-item');\n let foundExpanded = false;\n\n items.forEach((item) => {\n if (item.expanded) {\n if (foundExpanded) {\n item.expanded = false;\n } else {\n foundExpanded = true;\n }\n }\n });\n }\n\n /**\n * Handles expand events from child accordion items to enforce single-expand mode.\n * @internal\n */\n private _handleChildExpand = (e: Event): void => {\n if (this.mode !== 'single') return;\n\n const expandedItem = e.composedPath()[0] as HelixAccordionItem;\n const items = this.querySelectorAll<HelixAccordionItem>('hx-accordion-item');\n\n items.forEach((item) => {\n if (item !== expandedItem && item.expanded) {\n item.expanded = false;\n item._dispatchToggleEvent(false);\n }\n });\n };\n\n // ─── Arrow key navigation (ARIA APG Accordion pattern) ───\n\n /**\n * Handles keyboard navigation between accordion triggers using arrow, Home, and End keys.\n * @internal\n */\n private _handleKeyDown = (e: KeyboardEvent): void => {\n const triggers = this._getTriggers();\n if (triggers.length === 0) return;\n\n const activeEl = this.shadowRoot?.activeElement ?? document.activeElement;\n let currentItem: HelixAccordionItem | null = null;\n\n const items = Array.from(this.querySelectorAll<HelixAccordionItem>('hx-accordion-item'));\n for (const item of items) {\n const summary = item.shadowRoot?.querySelector('[part=\"trigger\"]');\n if (summary === activeEl || item.shadowRoot?.activeElement === summary) {\n currentItem = item;\n break;\n }\n }\n\n if (!currentItem) return;\n\n const enabledItems = items.filter((item) => !item.disabled);\n const currentIndex = enabledItems.indexOf(currentItem);\n if (currentIndex === -1) return;\n\n let targetIndex = -1;\n\n switch (e.key) {\n case 'ArrowDown':\n targetIndex = (currentIndex + 1) % enabledItems.length;\n break;\n case 'ArrowUp':\n targetIndex = (currentIndex - 1 + enabledItems.length) % enabledItems.length;\n break;\n case 'Home':\n targetIndex = 0;\n break;\n case 'End':\n targetIndex = enabledItems.length - 1;\n break;\n default:\n return;\n }\n\n e.preventDefault();\n const targetItem = enabledItems[targetIndex];\n const targetSummary = targetItem?.shadowRoot?.querySelector<HTMLElement>('[part=\"trigger\"]');\n targetSummary?.focus();\n };\n\n /** @internal */\n private _getTriggers(): HTMLElement[] {\n const items = this.querySelectorAll<HelixAccordionItem>('hx-accordion-item');\n const triggers: HTMLElement[] = [];\n items.forEach((item) => {\n const summary = item.shadowRoot?.querySelector<HTMLElement>('[part=\"trigger\"]');\n if (summary) triggers.push(summary);\n });\n return triggers;\n }\n\n // ─── Slot validation ───\n\n /** @internal */\n private _handleSlotChange(e: Event): void {\n const slot = e.target;\n if (!(slot instanceof HTMLSlotElement)) return;\n const invalid = slot\n .assignedElements()\n .filter((el) => el.tagName.toLowerCase() !== 'hx-accordion-item');\n if (invalid.length > 0) {\n devWarn(\n 'hx-accordion',\n `Default slot expects <hx-accordion-item> elements. Found unexpected: ${invalid.map((el) => `<${el.tagName.toLowerCase()}>`).join(', ')}`,\n );\n }\n }\n\n // ─── Render ───\n\n override render() {\n return html`\n <div part=\"accordion\" class=\"accordion\">\n <slot @slotchange=${this._handleSlotChange}></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-accordion': HelixAccordion;\n }\n}\n"],"names":["helixAccordionStyles","css","helixAccordionItemStyles","chevronIcon","svg","_nextAccordionItemId","createIdCounter","HelixAccordionItem","HelixElement","willExpand","expanded","options","itemClasses","html","classMap","nothing","forcedColorsInteractive","__decorateClass","property","customElement","HelixAccordion","expandedItem","item","activeEl","_a","currentItem","items","summary","_b","_c","enabledItems","currentIndex","targetIndex","targetItem","targetSummary","_d","mutations","m","n","changedProperties","validModes","devWarn","foundExpanded","triggers","slot","invalid","el"],"mappings":";;;;;;;AAEO,MAAMA,IAAuBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GCAvBC,IAA2BD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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