@helixui/library 3.3.1 → 3.4.0-next.121
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 +2 -2
- 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
|
@@ -5,6 +5,59 @@ import { HelixElement } from '../../base/index.js';
|
|
|
5
5
|
* Supports focus trapping, overlay backdrop, keyboard navigation, and full
|
|
6
6
|
* ARIA labelling for enterprise healthcare accessibility requirements.
|
|
7
7
|
*
|
|
8
|
+
* ## Architecture Note: Host-Canonical ARIA (group-4 round-1, Path A)
|
|
9
|
+
*
|
|
10
|
+
* The host carries the announced dialog semantics via `ElementInternals`:
|
|
11
|
+
*
|
|
12
|
+
* - `internals.role = 'dialog'` (the host IS the dialog surface)
|
|
13
|
+
* - `internals.ariaModal = 'true'` (modality declared on host)
|
|
14
|
+
* - `internals.ariaLabelledByElements` / `internals.ariaDescribedByElements`
|
|
15
|
+
* project consumer light-DOM IDREFs across the shadow boundary.
|
|
16
|
+
* - `internals.ariaLabel` carries the resolved fallback name when no
|
|
17
|
+
* IDREF chain or slotted title exists.
|
|
18
|
+
*
|
|
19
|
+
* The inner `<div part="overlay">` no longer carries `role`, `aria-modal`,
|
|
20
|
+
* `aria-labelledby`, or `aria-label` — those would create a nested-dialog
|
|
21
|
+
* announcement above the host's canonical surface. Belt-and-suspenders
|
|
22
|
+
* fallback: when the runtime does NOT expose IDL element references on
|
|
23
|
+
* `ElementInternals` (older Firefox / Safari builds), the resolved label
|
|
24
|
+
* text is text-flattened and written to the inner overlay's `aria-label`
|
|
25
|
+
* so AT walking down from the host still finds an announceable name.
|
|
26
|
+
*
|
|
27
|
+
* Naming precedence (W3C AccName 1.2 §4.3.1):
|
|
28
|
+
*
|
|
29
|
+
* 1. Consumer `aria-labelledby` on the host — IDREFs resolved across the
|
|
30
|
+
* shadow boundary via `resolveIdrefTokens` (same scope walk used by
|
|
31
|
+
* every host-canonical hx-* control: own root → ancestor shadow hosts
|
|
32
|
+
* → owner document → slot owners).
|
|
33
|
+
* 2. Consumer `aria-label` on the host.
|
|
34
|
+
* 3. `<slot name="label">` text content (multi-node aggregation per
|
|
35
|
+
* AccName 1.2 §4.3.10 — decorative `aria-hidden` / `[hidden]` subtrees
|
|
36
|
+
* contribute zero to the name).
|
|
37
|
+
* 4. `label` property — explicit author fallback string.
|
|
38
|
+
* 5. Hard-coded literal `"Drawer"` (last-resort accessible name).
|
|
39
|
+
*
|
|
40
|
+
* Description channel: a synthesized `<span id="${id}-consumer-desc">` is
|
|
41
|
+
* rendered inside the shadow root and updated to mirror consumer-resolved
|
|
42
|
+
* description text. The host's `internals.ariaDescribedByElements` carries
|
|
43
|
+
* the live element references on the modern path; the in-shadow span is the
|
|
44
|
+
* fallback target for AT that does not walk IDL refs. `aria-description` is
|
|
45
|
+
* intentionally NEVER written — the W3C AccName algorithm ignores it
|
|
46
|
+
* whenever `aria-describedby` is also present.
|
|
47
|
+
*
|
|
48
|
+
* Slot mutation observers track:
|
|
49
|
+
* 1. The label slot's text content (in-place i18n re-renders).
|
|
50
|
+
* 2. Consumer-resolved external IDREF targets (so a consumer mutating
|
|
51
|
+
* `<label id="x">Patient</label>` in place re-flows the name).
|
|
52
|
+
* 3. Host attribute mutations (delegated to `installAriaIdrefMirror`,
|
|
53
|
+
* which also catches late-inserted IDREF targets and id renames in
|
|
54
|
+
* every relevant root).
|
|
55
|
+
*
|
|
56
|
+
* Focus trap, ESC dismiss, focus-restore, and the inert-outside-content
|
|
57
|
+
* sibling-walk are unchanged from the pre-host-canonical implementation —
|
|
58
|
+
* they operate against the shadow-internal panel which is still the focus
|
|
59
|
+
* target for keyboard users.
|
|
60
|
+
*
|
|
8
61
|
* ## Architecture Note: Native `<dialog>` Migration
|
|
9
62
|
*
|
|
10
63
|
* This component currently uses `role="dialog"` + `aria-modal="true"` on a
|
|
@@ -161,7 +214,91 @@ export declare class HelixDrawer extends HelixElement {
|
|
|
161
214
|
* Unique ID for the title element, used by aria-labelledby to link the dialog to its label.
|
|
162
215
|
* @internal
|
|
163
216
|
*/
|
|
217
|
+
private readonly _id;
|
|
218
|
+
/** @internal */
|
|
164
219
|
private readonly _titleId;
|
|
220
|
+
/**
|
|
221
|
+
* Id of the synthesized in-shadow span that mirrors consumer-resolved
|
|
222
|
+
* description text. Belt-and-suspenders: the host's
|
|
223
|
+
* `internals.ariaDescribedByElements` carries the live element references
|
|
224
|
+
* on the modern path; this in-shadow span is the fallback referenced via
|
|
225
|
+
* `aria-describedby` on the inner overlay so AT that does not walk IDL refs
|
|
226
|
+
* still finds an announceable description.
|
|
227
|
+
* @internal
|
|
228
|
+
*/
|
|
229
|
+
private readonly _consumerDescId;
|
|
230
|
+
/**
|
|
231
|
+
* Test seam: when set to `true` or `false`, overrides the platform
|
|
232
|
+
* `supportsIdrefElementReferences` probe before `connectedCallback`
|
|
233
|
+
* seeds `_supportsIdrefRefs`. Mirrors hx-combobox round-3 finding 4 —
|
|
234
|
+
* tests must select the path BEFORE the host connects so the synthetic
|
|
235
|
+
* environment matches a legacy engine. Production code MUST NOT touch
|
|
236
|
+
* this field. It is `static` so the cleanup is global and obvious.
|
|
237
|
+
* @internal
|
|
238
|
+
*/
|
|
239
|
+
static __testSupportsIdrefRefsOverride: boolean | null;
|
|
240
|
+
/**
|
|
241
|
+
* Whether the runtime exposes IDL element references on ElementInternals.
|
|
242
|
+
* Drives the modern-vs-fallback ARIA projection in `_syncHostAriaSemantics`.
|
|
243
|
+
* @internal
|
|
244
|
+
*/
|
|
245
|
+
private _supportsIdrefRefs;
|
|
246
|
+
/**
|
|
247
|
+
* Direct references to ALL labellable elements projected into
|
|
248
|
+
* `<slot name="label">`. Aggregates every assigned element so composed
|
|
249
|
+
* labels (e.g. `<svg slot="label" aria-hidden="true">…</svg><span slot="label">Patient</span>`)
|
|
250
|
+
* project the FULL visible label via `internals.ariaLabelledByElements`
|
|
251
|
+
* while `flattenAccName` strips the decorative subtree per AccName 1.2.
|
|
252
|
+
* @internal
|
|
253
|
+
*/
|
|
254
|
+
private _slottedLabelEls;
|
|
255
|
+
/**
|
|
256
|
+
* Flattened text content of the slotted label nodes, used for the no-IDL-ref
|
|
257
|
+
* fallback `internals.ariaLabel` and the legacy inner-overlay `aria-label`.
|
|
258
|
+
* @internal
|
|
259
|
+
*/
|
|
260
|
+
private _labelSlotText;
|
|
261
|
+
/**
|
|
262
|
+
* Most recently observed consumer-supplied `aria-labelledby` token list on
|
|
263
|
+
* the host. Refreshed every sync via `getAttribute()` — the host attribute
|
|
264
|
+
* IS the live source of truth, so `removeAttribute` is observable on the
|
|
265
|
+
* next sync (it returns `null`).
|
|
266
|
+
* @internal
|
|
267
|
+
*/
|
|
268
|
+
private _consumerLabelledBy;
|
|
269
|
+
/** @internal — see `_consumerLabelledBy`. */
|
|
270
|
+
private _consumerDescribedBy;
|
|
271
|
+
/**
|
|
272
|
+
* Handle for the shared IDREF mirror. See `installAriaIdrefMirror()`.
|
|
273
|
+
* @internal
|
|
274
|
+
*/
|
|
275
|
+
private _ariaMirror;
|
|
276
|
+
/**
|
|
277
|
+
* Watches in-place text mutations on the assigned slotted label nodes
|
|
278
|
+
* (e.g. consumer i18n re-renders that mutate `textContent` instead of
|
|
279
|
+
* replacing the node). `slotchange` does NOT fire on descendant text
|
|
280
|
+
* mutations, so this observer is the only signal that keeps the host's
|
|
281
|
+
* accessible name synchronized with the visible label.
|
|
282
|
+
* @internal
|
|
283
|
+
*/
|
|
284
|
+
private _labelSlotTextObserver;
|
|
285
|
+
/**
|
|
286
|
+
* Watches in-place text / visibility mutations on consumer light-DOM
|
|
287
|
+
* elements resolved from host `aria-labelledby` / `aria-describedby`.
|
|
288
|
+
* Reinstalled on every sync against the deduped union of resolved
|
|
289
|
+
* elements; disconnects automatically when the consumer retracts both
|
|
290
|
+
* IDREF chains.
|
|
291
|
+
* @internal
|
|
292
|
+
*/
|
|
293
|
+
private _externalRefsObserver;
|
|
294
|
+
/**
|
|
295
|
+
* Dedicated host observer scoped to `aria-describedby` with
|
|
296
|
+
* `attributeOldValue: true`. Catches authentic consumer retraction
|
|
297
|
+
* (oldValue !== null && newValue === null) so the cached baseline
|
|
298
|
+
* follows the live attribute.
|
|
299
|
+
* @internal
|
|
300
|
+
*/
|
|
301
|
+
private _hostDescribedByObserver;
|
|
165
302
|
/**
|
|
166
303
|
* Controls whether the drawer is open.
|
|
167
304
|
* @attr open
|
|
@@ -204,6 +341,7 @@ export declare class HelixDrawer extends HelixElement {
|
|
|
204
341
|
connectedCallback(): void;
|
|
205
342
|
disconnectedCallback(): void;
|
|
206
343
|
updated(changedProperties: PropertyValues<this>): void;
|
|
344
|
+
firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
207
345
|
/** Opens the drawer. */
|
|
208
346
|
show(): void;
|
|
209
347
|
/** Closes the drawer. */
|
|
@@ -250,6 +388,69 @@ export declare class HelixDrawer extends HelixElement {
|
|
|
250
388
|
private _handleFooterSlotChange;
|
|
251
389
|
/** @internal */
|
|
252
390
|
private _handleLabelSlotChange;
|
|
391
|
+
/**
|
|
392
|
+
* Reads the label slot's assigned nodes and computes the discriminated
|
|
393
|
+
* naming state. Aggregates ALL assigned elements (not just the first) so
|
|
394
|
+
* composed labels project the FULL visible label via
|
|
395
|
+
* `internals.ariaLabelledByElements`. Per AccName 1.2 §4.3.10,
|
|
396
|
+
* `aria-hidden="true"` / `[hidden]` elements contribute zero to the
|
|
397
|
+
* accessible name but stay in `elements` so AT walking IDL refs sees the
|
|
398
|
+
* full visible group. `hasUsefulName` is gated on the flattened text
|
|
399
|
+
* length: a slot containing only decorative wrappers does NOT name the
|
|
400
|
+
* dialog, and the host falls through to the next naming source.
|
|
401
|
+
* @internal
|
|
402
|
+
*/
|
|
403
|
+
private _readLabelSlotState;
|
|
404
|
+
/**
|
|
405
|
+
* (Re-)installs the mutation observer over the current set of slotted label
|
|
406
|
+
* elements. On any descendant text/visibility mutation we re-flatten and
|
|
407
|
+
* re-sync so the host's accessible name tracks the visible label.
|
|
408
|
+
* @internal
|
|
409
|
+
*/
|
|
410
|
+
private _installLabelSlotTextObserver;
|
|
411
|
+
/**
|
|
412
|
+
* (Re-)installs a `MutationObserver` against the deduped union of
|
|
413
|
+
* consumer-resolved label/description elements. Watches `characterData`,
|
|
414
|
+
* `childList`, `subtree`, and `aria-hidden` / `hidden` attributes so any
|
|
415
|
+
* in-place mutation on the referenced light-DOM nodes triggers a fresh
|
|
416
|
+
* sync — keeping the modern-path IDL refs and the fallback-path text
|
|
417
|
+
* flatten aligned with the live consumer text.
|
|
418
|
+
* @internal
|
|
419
|
+
*/
|
|
420
|
+
private _installExternalRefsObserver;
|
|
421
|
+
/**
|
|
422
|
+
* Resolves consumer-supplied label/description IDREFs on the host and
|
|
423
|
+
* projects the canonical dialog ARIA onto the **host** via
|
|
424
|
+
* `ElementInternals` (modern path) and onto the inner overlay via attribute
|
|
425
|
+
* writes (fallback path).
|
|
426
|
+
*
|
|
427
|
+
* Cross-shadow naming is belt-and-suspenders:
|
|
428
|
+
*
|
|
429
|
+
* 1. **Modern path** (`_supportsIdrefRefs === true`): consumer-resolved
|
|
430
|
+
* label/description elements are written onto
|
|
431
|
+
* `internals.ariaLabelledByElements` / `internals.ariaDescribedByElements`
|
|
432
|
+
* on the host. AT walking the host's accessibility tree finds them
|
|
433
|
+
* across the shadow boundary. `internals.ariaLabel` carries the
|
|
434
|
+
* flattened text fallback (only when no labelledby resolves) so AT
|
|
435
|
+
* that does not walk IDL refs still announces a name.
|
|
436
|
+
* 2. **Fallback path** (`_supportsIdrefRefs === false`): the resolved
|
|
437
|
+
* element text is flattened and written to `internals.ariaLabel` AND
|
|
438
|
+
* mirrored to the inner overlay's `aria-label`.
|
|
439
|
+
*
|
|
440
|
+
* The synthesized `<span id="${_consumerDescId}">` mirrors the resolved
|
|
441
|
+
* description text on every sync. The inner overlay's `aria-describedby`
|
|
442
|
+
* chains the in-shadow span. `aria-description` is intentionally NEVER
|
|
443
|
+
* written — W3C AccName ignores it whenever `aria-describedby` is set.
|
|
444
|
+
*
|
|
445
|
+
* Naming precedence (W3C AccName 1.2 §4.3.1):
|
|
446
|
+
* 1. Consumer `aria-labelledby` (resolved IDREFs, text-flattened)
|
|
447
|
+
* 2. Consumer `aria-label`
|
|
448
|
+
* 3. Slotted `<slot name="label">` text
|
|
449
|
+
* 4. `label` property
|
|
450
|
+
* 5. Hard-coded `"Drawer"`
|
|
451
|
+
* @internal
|
|
452
|
+
*/
|
|
453
|
+
private _syncHostAriaSemantics;
|
|
253
454
|
/** @internal */
|
|
254
455
|
private _renderHeader;
|
|
255
456
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-drawer.d.ts","sourceRoot":"","sources":["../../../src/components/hx-drawer/hx-drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"hx-drawer.d.ts","sourceRoot":"","sources":["../../../src/components/hx-drawer/hx-drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,4CAA4C,CAAC;AAKpD,OAAO,EAAE,YAAY,EAAmB,MAAM,qBAAqB,CAAC;AAkCpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;OAGG;IACH,OAAO,CAAC,cAAc,CAYpB;IAIF,gBAAgB;IAChB,OAAO,CAAC,gBAAgB;IAkBxB,gBAAgB;IAChB,OAAO,CAAC,qBAAqB;IA0B7B,gBAAgB;IAChB,OAAO,CAAC,UAAU;IAmClB;;;OAGG;IACH,OAAO,CAAC,mBAAmB,CAMzB;IAIF,gBAAgB;IAChB,OAAO,CAAC,8BAA8B;IAKtC,gBAAgB;IAChB,OAAO,CAAC,uBAAuB;IAK/B,gBAAgB;IAChB,OAAO,CAAC,sBAAsB;IAY9B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,mBAAmB;IA4B3B;;;;;OAKG;IACH,OAAO,CAAC,6BAA6B;IA8BrC;;;;;;;;OAQG;IACH,OAAO,CAAC,4BAA4B;IAsBpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,OAAO,CAAC,sBAAsB;IA+K9B,gBAAgB;IAChB,OAAO,CAAC,aAAa;IA8DrB,gBAAgB;IAChB,OAAO,CAAC,aAAa;IAYZ,MAAM;CAwChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,WAAW,CAAC;KAC1B;IACD,UAAU,mBAAmB;QAC3B,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;QAC7B,eAAe,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;QACnC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;QAC7B,eAAe,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;QACnC,kBAAkB,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;KACvC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-drawer.styles.d.ts","sourceRoot":"","sources":["../../../src/components/hx-drawer/hx-drawer.styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"hx-drawer.styles.d.ts","sourceRoot":"","sources":["../../../src/components/hx-drawer/hx-drawer.styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,yBA4S7B,CAAC"}
|
|
@@ -4,6 +4,51 @@ export type DropdownPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bo
|
|
|
4
4
|
/**
|
|
5
5
|
* A dropdown component — a button that opens a floating panel on click.
|
|
6
6
|
*
|
|
7
|
+
* ## Architecture Note: Host-Attribute Label Mirror (group-4 round-1)
|
|
8
|
+
*
|
|
9
|
+
* The announced surface is the inner `[part="panel"]` element, which carries
|
|
10
|
+
* `role="menu"`. The host wraps a slotted trigger and the floating panel and
|
|
11
|
+
* does NOT claim a role itself (apart from the round-35-style host
|
|
12
|
+
* `aria-expanded` fallback used only when the trigger slot is empty).
|
|
13
|
+
*
|
|
14
|
+
* Because the panel lives in shadow DOM and `ElementInternals` IDL refs on
|
|
15
|
+
* the host project semantics OUTWARD (host → AT) rather than INWARD
|
|
16
|
+
* (host → shadow descendant), we use the **host-attribute mirror** pattern:
|
|
17
|
+
* resolve consumer `aria-labelledby` IDREFs against the host's composed-tree
|
|
18
|
+
* roots, text-flatten via `flattenAccName`, and write the result to the
|
|
19
|
+
* panel's `aria-label`. Host `aria-label` outranks the `label` property in
|
|
20
|
+
* the same precedence used by every host-canonical hx-* control.
|
|
21
|
+
*
|
|
22
|
+
* Naming precedence (W3C AccName 1.2 §4.3.1):
|
|
23
|
+
* 1. Host `aria-labelledby` (resolved IDREFs, text-flattened)
|
|
24
|
+
* 2. Host `aria-label`
|
|
25
|
+
* 3. `label` property
|
|
26
|
+
* 4. Hard-coded literal `"Menu"` (last-resort accessible name)
|
|
27
|
+
*
|
|
28
|
+
* **Group 4b → Group 5b boundary:** Group 4b added the host-attribute
|
|
29
|
+
* label mirror **only** — additive on top of the existing dropdown
|
|
30
|
+
* behaviour. Group 5b (this commit) adds the composite-navigation
|
|
31
|
+
* portion that 4b explicitly deferred:
|
|
32
|
+
* - **Roving tabindex** inside the panel (`_applyRovingTabIndex` +
|
|
33
|
+
* `_rovingIndex`). Only the focused item carries `tabindex=0`.
|
|
34
|
+
* - **First-character typeahead** with 500ms timeout (`_handleTypeahead`)
|
|
35
|
+
* matching `hx-menu`, `hx-overflow-menu`, `hx-split-button`.
|
|
36
|
+
* - Submenu auto-handling is delegated to slotted `hx-menu` /
|
|
37
|
+
* `hx-menu-item` (whose `hx-item-submenu-open` / `hx-item-submenu-close`
|
|
38
|
+
* events are auto-handled by the parent `hx-menu` after Group 5b).
|
|
39
|
+
*
|
|
40
|
+
* The panel's inner-div `role="menu"` is intentionally NOT migrated to
|
|
41
|
+
* the host: the host wraps a slotted consumer trigger AND the panel,
|
|
42
|
+
* so it cannot canonically carry the menu role. Slotted `hx-menu-item`
|
|
43
|
+
* children carry `role="menuitem"` on their HOST after Group 5b's menu
|
|
44
|
+
* migration, which fixes the cross-shadow walk concern from the
|
|
45
|
+
* consumer's perspective.
|
|
46
|
+
*
|
|
47
|
+
* `aria-controls` is intentionally omitted on the trigger: the panel lives
|
|
48
|
+
* in shadow DOM and IDREF values cannot be resolved across shadow
|
|
49
|
+
* boundaries by assistive technology (axe-core flags this as a critical
|
|
50
|
+
* violation if attempted). See `_setupTriggerAria` for the inline note.
|
|
51
|
+
*
|
|
7
52
|
* @summary Button that opens a floating menu panel on click.
|
|
8
53
|
*
|
|
9
54
|
* @tag hx-dropdown
|
|
@@ -74,6 +119,49 @@ export declare class HelixDropdown extends HelixElement {
|
|
|
74
119
|
* @internal
|
|
75
120
|
*/
|
|
76
121
|
private _panelVisible;
|
|
122
|
+
/**
|
|
123
|
+
* Index within the panel's focusable menu items of the item currently
|
|
124
|
+
* holding the roving tabindex (and thus visual focus). −1 means the
|
|
125
|
+
* panel has not been keyboard-focused yet.
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
private _rovingIndex;
|
|
129
|
+
/**
|
|
130
|
+
* Accumulated character buffer for typeahead search within the panel's
|
|
131
|
+
* menu items. Cleared after 500ms of inactivity.
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
private _typeaheadBuffer;
|
|
135
|
+
/**
|
|
136
|
+
* Timer handle that clears the typeahead buffer after a period of inactivity.
|
|
137
|
+
* @internal
|
|
138
|
+
*/
|
|
139
|
+
private _typeaheadTimer;
|
|
140
|
+
/**
|
|
141
|
+
* Resolved accessible name for the menu panel — the value written to the
|
|
142
|
+
* inner `[part="panel"]` `aria-label`. Recomputed on every sync per
|
|
143
|
+
* AccName 1.2 §4.3.1 precedence: host `aria-labelledby` (flattened) >
|
|
144
|
+
* host `aria-label` > `label` property > literal `"Menu"`.
|
|
145
|
+
* @internal
|
|
146
|
+
*/
|
|
147
|
+
private _resolvedLabel;
|
|
148
|
+
/**
|
|
149
|
+
* Most recently observed consumer-supplied `aria-labelledby` token list on
|
|
150
|
+
* the host. Refreshed every sync via `getAttribute()`.
|
|
151
|
+
* @internal
|
|
152
|
+
*/
|
|
153
|
+
private _consumerLabelledBy;
|
|
154
|
+
/**
|
|
155
|
+
* Handle for the shared host attribute / root id observer.
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
158
|
+
private _ariaMirror;
|
|
159
|
+
/**
|
|
160
|
+
* Watches in-place text / visibility mutations on consumer light-DOM
|
|
161
|
+
* elements resolved from the host's `aria-labelledby`.
|
|
162
|
+
* @internal
|
|
163
|
+
*/
|
|
164
|
+
private _externalRefsObserver;
|
|
77
165
|
/**
|
|
78
166
|
* Guards against accumulating multiple document click listeners when open state
|
|
79
167
|
* changes faster than the microtask queue can process removeEventListener calls.
|
|
@@ -111,6 +199,30 @@ export declare class HelixDropdown extends HelixElement {
|
|
|
111
199
|
private _handleKeydown;
|
|
112
200
|
/** @internal */
|
|
113
201
|
private _handleMenuNavigation;
|
|
202
|
+
/**
|
|
203
|
+
* Roving tabindex inside the panel: only the focused item carries
|
|
204
|
+
* tabindex=0; the rest are tabindex=-1. APG-compliant for the menu
|
|
205
|
+
* button pattern. Closing-Tab semantics are preserved by the
|
|
206
|
+
* `_handleKeydown` Tab branch above (which lets focus advance
|
|
207
|
+
* naturally and closes the panel).
|
|
208
|
+
*
|
|
209
|
+
* Group 5b: introduced to align hx-dropdown's panel keyboard contract
|
|
210
|
+
* with hx-menu / hx-overflow-menu / hx-split-button. Group 4b only
|
|
211
|
+
* added the host-attribute label mirror (additive); this is the
|
|
212
|
+
* keyboard portion deferred until Group 5.
|
|
213
|
+
*
|
|
214
|
+
* Codex push-gate round-8 finding 2: route through
|
|
215
|
+
* `writeMenuItemRovingTabIndex` so host-canonical `hx-menu-item` items
|
|
216
|
+
* land their roving tabindex on the correct surface (host on the
|
|
217
|
+
* modern path, inner `.menu-item` on the fallback path). A direct
|
|
218
|
+
* `item.tabIndex = value` write on the host fails on the fallback
|
|
219
|
+
* path because the host is forced to `tabindex=-1` to keep exactly
|
|
220
|
+
* one focusable surface per item.
|
|
221
|
+
* @internal
|
|
222
|
+
*/
|
|
223
|
+
private _applyRovingTabIndex;
|
|
224
|
+
/** @internal */
|
|
225
|
+
private _handleTypeahead;
|
|
114
226
|
/** @internal */
|
|
115
227
|
private _getFocusableMenuItems;
|
|
116
228
|
/** @internal */
|
|
@@ -119,6 +231,42 @@ export declare class HelixDropdown extends HelixElement {
|
|
|
119
231
|
private _handleOutsideClick;
|
|
120
232
|
/** @internal */
|
|
121
233
|
private _handlePanelClick;
|
|
234
|
+
/**
|
|
235
|
+
* Bubbled `hx-item-select` from a slotted `hx-menu-item` host. Forwards
|
|
236
|
+
* the activation through the composite's `hx-select` contract using the
|
|
237
|
+
* item's `value` property and label text. Disabled items never emit
|
|
238
|
+
* `hx-item-select`, so no disabled-guard is needed here.
|
|
239
|
+
* @internal
|
|
240
|
+
*/
|
|
241
|
+
private _handlePanelItemSelect;
|
|
242
|
+
/**
|
|
243
|
+
* Bubbled `hx-item-submenu-open` from a slotted `hx-menu-item` host.
|
|
244
|
+
* Codex push-gate round-9 P1: when slotted `hx-menu-item`s open / close
|
|
245
|
+
* a nested submenu inside this composite's panel (no enclosing
|
|
246
|
+
* `hx-menu`), the events fly past with no handler. Match the round-4
|
|
247
|
+
* `hx-menu._handleSubmenuOpen` shape so APG behaviour holds.
|
|
248
|
+
*
|
|
249
|
+
* If the dispatching item is enclosed by an inner `hx-menu` (a true
|
|
250
|
+
* nested submenu inside the panel), that menu owns the toggle — defer.
|
|
251
|
+
* Otherwise this composite's panel is the enclosing menu surface, so
|
|
252
|
+
* call `setSubmenuOpen(true)` on the item and focus the first child.
|
|
253
|
+
* @internal
|
|
254
|
+
*/
|
|
255
|
+
private _handlePanelSubmenuOpen;
|
|
256
|
+
/**
|
|
257
|
+
* Bubbled `hx-item-submenu-close` from a slotted `hx-menu-item` host.
|
|
258
|
+
* Codex push-gate round-9 P1: routes the close to the right surface.
|
|
259
|
+
*
|
|
260
|
+
* - Nested submenu close (the dispatching item lives inside an inner
|
|
261
|
+
* `hx-menu` slotted into a parent's `slot="submenu"`): defer to that
|
|
262
|
+
* inner menu's own handler. The composite's panel must NOT close.
|
|
263
|
+
* - Top-level item ArrowLeft (no enclosing `hx-menu` between the item
|
|
264
|
+
* and this composite): there is no parent submenu to close, so
|
|
265
|
+
* collapse the composite's panel and return focus to the trigger,
|
|
266
|
+
* matching APG menu-button behaviour.
|
|
267
|
+
* @internal
|
|
268
|
+
*/
|
|
269
|
+
private _handlePanelSubmenuClose;
|
|
122
270
|
render(): import('lit').TemplateResult<1>;
|
|
123
271
|
/** @internal */
|
|
124
272
|
private _onPanelSlotChange;
|
|
@@ -127,7 +275,27 @@ export declare class HelixDropdown extends HelixElement {
|
|
|
127
275
|
firstUpdated(): void;
|
|
128
276
|
/** @internal */
|
|
129
277
|
private _setupTriggerAria;
|
|
278
|
+
willUpdate(changedProperties: PropertyValues<this>): void;
|
|
130
279
|
updated(changedProperties: PropertyValues<this>): void;
|
|
280
|
+
/**
|
|
281
|
+
* (Re-)installs a `MutationObserver` over the deduped union of
|
|
282
|
+
* consumer-resolved label elements, watching for in-place text /
|
|
283
|
+
* visibility mutations so the panel's `aria-label` tracks live consumer
|
|
284
|
+
* text. See `hx-popover._installExternalRefsObserver` for the matching
|
|
285
|
+
* shape used across the host-attribute-mirror family.
|
|
286
|
+
* @internal
|
|
287
|
+
*/
|
|
288
|
+
private _installExternalRefsObserver;
|
|
289
|
+
/**
|
|
290
|
+
* Resolves the menu panel's accessible name from host attributes and the
|
|
291
|
+
* `label` property. AccName 1.2 §4.3.1 precedence:
|
|
292
|
+
* 1. Host `aria-labelledby` (resolved IDREFs, flattened)
|
|
293
|
+
* 2. Host `aria-label`
|
|
294
|
+
* 3. `label` property
|
|
295
|
+
* 4. Literal `"Menu"` (last-resort)
|
|
296
|
+
* @internal
|
|
297
|
+
*/
|
|
298
|
+
private _syncResolvedLabel;
|
|
131
299
|
}
|
|
132
300
|
declare global {
|
|
133
301
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/hx-dropdown/hx-dropdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,4CAA4C,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"hx-dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/hx-dropdown/hx-dropdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,4CAA4C,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAgBnD,MAAM,MAAM,iBAAiB,GACzB,KAAK,GACL,WAAW,GACX,SAAS,GACT,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,OAAO,GACP,KAAK,CAAC;AAIV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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}
|
|
@@ -13,6 +13,26 @@ import { HelixElement } from '../../base/index.js';
|
|
|
13
13
|
* `disconnectedCallback`. This is an intentional, documented accessibility
|
|
14
14
|
* mechanism.
|
|
15
15
|
*
|
|
16
|
+
* **`aria-label` ownership model:** When `label` is set and no shadow `<label>`
|
|
17
|
+
* is rendered, hx-field writes `aria-label` to the slotted control and stamps
|
|
18
|
+
* a `data-hx-owns-label="true"` ownership marker.
|
|
19
|
+
*
|
|
20
|
+
* Consumers have two ways to keep their value safe from hx-field's writes:
|
|
21
|
+
* (a) **Suspend** all ARIA bridging by setting `data-aria-managed` on the
|
|
22
|
+
* control. While present, hx-field skips every aria-* mutation and
|
|
23
|
+
* leaves any existing marker/snapshot in place — removing
|
|
24
|
+
* `data-aria-managed` later may resume host ownership of an `aria-label`
|
|
25
|
+
* value that still matches the snapshot.
|
|
26
|
+
* (b) **Release** ownership permanently by overwriting `aria-label` to a
|
|
27
|
+
* different value than the one hx-field last wrote. The mismatch
|
|
28
|
+
* triggers `_releaseHostOwnedAriaLabel`, which strips the marker and
|
|
29
|
+
* clears the snapshot, transferring ownership to the consumer.
|
|
30
|
+
*
|
|
31
|
+
* **Limitation:** because release detection is snapshot-based, a consumer
|
|
32
|
+
* rewrite to the *exact same value* hx-field last wrote is invisible. To
|
|
33
|
+
* genuinely take ownership in that case the consumer must write a different
|
|
34
|
+
* value (even briefly), or remove the `data-hx-owns-label` marker themselves.
|
|
35
|
+
*
|
|
16
36
|
* @summary Layout wrapper for label, control, help text, and error message.
|
|
17
37
|
*
|
|
18
38
|
* @tag hx-field
|
|
@@ -150,6 +170,42 @@ export declare class HelixField extends HelixElement {
|
|
|
150
170
|
* @internal
|
|
151
171
|
*/
|
|
152
172
|
private _a11yDescEl;
|
|
173
|
+
/**
|
|
174
|
+
* Marker attribute placed on the slotted control whenever hx-field writes
|
|
175
|
+
* `aria-label` to it. Presence of this marker indicates host ownership of
|
|
176
|
+
* the attribute; absence means the value belongs to the consumer.
|
|
177
|
+
*
|
|
178
|
+
* Ownership is recomputed from the live DOM on every `_syncSlottedControl()`
|
|
179
|
+
* call rather than cached in a flag — this keeps post-mount mutations
|
|
180
|
+
* (consumer adds/removes `aria-label`, toggles `data-aria-managed`)
|
|
181
|
+
* authoritative instead of letting a stale snapshot win.
|
|
182
|
+
*
|
|
183
|
+
* See round-13 F2 for context on the precedence hazard.
|
|
184
|
+
* @internal
|
|
185
|
+
*/
|
|
186
|
+
private static readonly _ARIA_LABEL_OWNED_ATTR;
|
|
187
|
+
/**
|
|
188
|
+
* Last `aria-label` value written by hx-field to the currently adopted
|
|
189
|
+
* control. Used in combination with the ownership marker to detect a
|
|
190
|
+
* consumer overwrite: if the marker is present but the live value no
|
|
191
|
+
* longer matches what we last wrote, the consumer has taken over and we
|
|
192
|
+
* release the marker so subsequent syncs treat the value as consumer-
|
|
193
|
+
* owned.
|
|
194
|
+
* @internal
|
|
195
|
+
*/
|
|
196
|
+
private _lastWrittenAriaLabel;
|
|
197
|
+
/**
|
|
198
|
+
* Tracks whether the dev-time competing-label warning has already been
|
|
199
|
+
* emitted for the currently adopted slotted control.
|
|
200
|
+
*
|
|
201
|
+
* Latch semantics: this fires **once per adopted control**. The latch is
|
|
202
|
+
* only reset on adoption (`_resolveSlottedControl()`) or disconnection.
|
|
203
|
+
* Toggling `data-aria-managed` on/off on the same control after the
|
|
204
|
+
* warning has fired does NOT re-arm the latch — by design, to avoid
|
|
205
|
+
* console spam from consumers who toggle the attribute repeatedly.
|
|
206
|
+
* @internal
|
|
207
|
+
*/
|
|
208
|
+
private _competingLabelWarned;
|
|
153
209
|
connectedCallback(): void;
|
|
154
210
|
disconnectedCallback(): void;
|
|
155
211
|
updated(changedProps: PropertyValues<this>): void;
|
|
@@ -162,6 +218,52 @@ export declare class HelixField extends HelixElement {
|
|
|
162
218
|
/** Tracks the first form control assigned to the default slot. */
|
|
163
219
|
/** @internal */
|
|
164
220
|
private _handleDefaultSlotChange;
|
|
221
|
+
/**
|
|
222
|
+
* Adopts a new slotted control and re-syncs ARIA wiring.
|
|
223
|
+
*
|
|
224
|
+
* Ownership of `aria-label` is tracked via the
|
|
225
|
+
* `data-hx-owns-label` marker attribute on the control itself, recomputed
|
|
226
|
+
* on every `_syncSlottedControl()` call — there is no cached ownership
|
|
227
|
+
* flag, so post-mount mutations of `aria-label` and `data-aria-managed`
|
|
228
|
+
* by the consumer are always honored.
|
|
229
|
+
* @internal
|
|
230
|
+
*/
|
|
231
|
+
private _resolveSlottedControl;
|
|
232
|
+
/**
|
|
233
|
+
* Returns true if hx-field owns the `aria-label` on the given control —
|
|
234
|
+
* i.e. the host wrote it, the marker attribute is still present, AND the
|
|
235
|
+
* live value still matches the value the host last wrote.
|
|
236
|
+
*
|
|
237
|
+
* Side effect: when the marker is present but the value no longer matches
|
|
238
|
+
* `_lastWrittenAriaLabel`, the consumer has overwritten the host value
|
|
239
|
+
* directly. We release the marker (and reset the snapshot) so subsequent
|
|
240
|
+
* syncs treat the value as consumer-owned. This keeps the marker honest
|
|
241
|
+
* without a MutationObserver.
|
|
242
|
+
*
|
|
243
|
+
* Cross-host migration / pre-mounted marker: if the marker is present but
|
|
244
|
+
* `_lastWrittenAriaLabel === null`, this host has never written to the
|
|
245
|
+
* control. Either (a) the control was migrated from a prior hx-field that
|
|
246
|
+
* stamped the marker, or (b) a consumer pre-mounted the marker themselves.
|
|
247
|
+
* In both cases this host has no ownership claim, so we strip the orphan
|
|
248
|
+
* marker and treat the value as consumer-owned. Without this, a fresh host
|
|
249
|
+
* with `label=""` would silently strip the inherited aria-label.
|
|
250
|
+
*
|
|
251
|
+
* Note (snapshot limitation): if the consumer rewrites `aria-label` to the
|
|
252
|
+
* exact same value we last wrote, we cannot detect the overwrite — to
|
|
253
|
+
* genuinely take ownership in that case the consumer must either write a
|
|
254
|
+
* different value or remove the `data-hx-owns-label` marker themselves.
|
|
255
|
+
*
|
|
256
|
+
* Absence of the marker (or presence of `data-aria-managed`) means the
|
|
257
|
+
* consumer owns the value and hx-field must not touch it.
|
|
258
|
+
* @internal
|
|
259
|
+
*/
|
|
260
|
+
private _hostOwnsAriaLabel;
|
|
261
|
+
/**
|
|
262
|
+
* Removes the host-owned `aria-label` and its ownership marker if (and only
|
|
263
|
+
* if) hx-field still owns them. Consumer-set values are left untouched.
|
|
264
|
+
* @internal
|
|
265
|
+
*/
|
|
266
|
+
private _releaseHostOwnedAriaLabel;
|
|
165
267
|
/**
|
|
166
268
|
* Focuses the slotted form control when the shadow DOM label is clicked.
|
|
167
269
|
* The shadow `<label>` cannot use `for`/`id` to link to a slotted input
|
|
@@ -182,6 +284,13 @@ export declare class HelixField extends HelixElement {
|
|
|
182
284
|
* - `HX-*` elements manage their own ARIA attributes; bridging is skipped.
|
|
183
285
|
* - Elements with `data-aria-managed` attribute opt out of ARIA mutation;
|
|
184
286
|
* bridging is skipped entirely for those elements.
|
|
287
|
+
*
|
|
288
|
+
* **Round-13 F2 ownership model:** `aria-label` ownership is recomputed
|
|
289
|
+
* from the live DOM on every call. If the marker attribute
|
|
290
|
+
* `data-hx-owns-label` is present, hx-field owns the value and may
|
|
291
|
+
* overwrite or remove it. Otherwise the consumer owns it, and hx-field
|
|
292
|
+
* leaves it alone. This makes post-mount consumer mutations
|
|
293
|
+
* (add/remove/replace) authoritative without relying on a stale flag.
|
|
185
294
|
*/
|
|
186
295
|
/** @internal */
|
|
187
296
|
private _syncSlottedControl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hx-field.d.ts","sourceRoot":"","sources":["../../../src/components/hx-field/hx-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AACzD,OAAO,4CAA4C,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAmB,MAAM,qBAAqB,CAAC;AAcpE
|
|
1
|
+
{"version":3,"file":"hx-field.d.ts","sourceRoot":"","sources":["../../../src/components/hx-field/hx-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,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