@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
|
@@ -1,688 +0,0 @@
|
|
|
1
|
-
import { css as C, nothing as _, html as x } from "lit";
|
|
2
|
-
import { property as h, state as p, query as w, customElement as E } from "lit/decorators.js";
|
|
3
|
-
import { F as L } from "./FormMixin-B8PXk5RQ.js";
|
|
4
|
-
import { classMap as I } from "lit/directives/class-map.js";
|
|
5
|
-
import { ifDefined as v } from "lit/directives/if-defined.js";
|
|
6
|
-
import { live as D } from "lit/directives/live.js";
|
|
7
|
-
import { repeat as M } from "lit/directives/repeat.js";
|
|
8
|
-
import { b as H } from "./forced-colors-CTEDFRGa.js";
|
|
9
|
-
import { H as O } from "./helix-element-BNEYeiys.js";
|
|
10
|
-
import { c as V } from "./id-counter-DuX8vsui.js";
|
|
11
|
-
const A = C`
|
|
12
|
-
:host {
|
|
13
|
-
display: block;
|
|
14
|
-
position: relative;
|
|
15
|
-
}
|
|
16
|
-
:host([disabled]) {
|
|
17
|
-
opacity: var(--hx-opacity-disabled, 0.5);
|
|
18
|
-
pointer-events: none;
|
|
19
|
-
}
|
|
20
|
-
* {
|
|
21
|
-
box-sizing: border-box;
|
|
22
|
-
}
|
|
23
|
-
.field {
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
gap: var(--hx-space-1, 0.25rem);
|
|
27
|
-
font-family: var(--hx-time-picker-font-family, var(--hx-font-family-sans, sans-serif));
|
|
28
|
-
}
|
|
29
|
-
.field__label {
|
|
30
|
-
display: flex;
|
|
31
|
-
align-items: baseline;
|
|
32
|
-
gap: var(--hx-space-1, 0.25rem);
|
|
33
|
-
font-size: var(--hx-font-size-sm, 0.875rem);
|
|
34
|
-
font-weight: var(--hx-font-weight-medium, 500);
|
|
35
|
-
color: var(--hx-time-picker-label-color, var(--hx-color-text-strong, #202b39));
|
|
36
|
-
line-height: var(--hx-line-height-normal, 1.5);
|
|
37
|
-
}
|
|
38
|
-
.field__required-marker {
|
|
39
|
-
color: var(--hx-time-picker-error-color, var(--hx-color-error-text, #c92a2a));
|
|
40
|
-
font-weight: var(--hx-font-weight-bold, 700);
|
|
41
|
-
}
|
|
42
|
-
.field__combobox {
|
|
43
|
-
position: relative;
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
border: var(--hx-border-width-thin, 1px) solid
|
|
47
|
-
var(--hx-time-picker-border-color, var(--hx-color-border-strong, #66787b));
|
|
48
|
-
border-radius: var(--hx-time-picker-border-radius, var(--hx-border-radius-md, 0.375rem));
|
|
49
|
-
background-color: var(--hx-time-picker-bg, var(--hx-color-surface-default, #ffffff));
|
|
50
|
-
transition:
|
|
51
|
-
border-color var(--hx-transition-fast, 150ms ease),
|
|
52
|
-
box-shadow var(--hx-transition-fast, 150ms ease);
|
|
53
|
-
overflow: visible;
|
|
54
|
-
}
|
|
55
|
-
.field__combobox:focus-within {
|
|
56
|
-
border-color: var(--hx-time-picker-focus-ring-color, var(--hx-focus-ring-color));
|
|
57
|
-
box-shadow: 0 0 0 var(--hx-focus-ring-width, 2px)
|
|
58
|
-
color-mix(
|
|
59
|
-
in srgb,
|
|
60
|
-
var(--hx-time-picker-focus-ring-color, var(--hx-focus-ring-color))
|
|
61
|
-
calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
|
|
62
|
-
transparent
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
.field--error .field__combobox {
|
|
66
|
-
border-color: var(--hx-time-picker-error-color, var(--hx-color-error-500, #e5493e));
|
|
67
|
-
}
|
|
68
|
-
.field--error .field__combobox:focus-within {
|
|
69
|
-
border-color: var(--hx-time-picker-error-color, var(--hx-color-error-500, #e5493e));
|
|
70
|
-
box-shadow: 0 0 0 var(--hx-focus-ring-width, 2px)
|
|
71
|
-
color-mix(
|
|
72
|
-
in srgb,
|
|
73
|
-
var(--hx-time-picker-error-color, var(--hx-color-error-500, #e5493e))
|
|
74
|
-
calc(var(--hx-focus-ring-opacity, 0.25) * 100%),
|
|
75
|
-
transparent
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
.field__input {
|
|
79
|
-
flex: 1;
|
|
80
|
-
border: none;
|
|
81
|
-
outline: none;
|
|
82
|
-
background: transparent;
|
|
83
|
-
padding: var(--hx-space-2, 0.5rem) var(--hx-space-3, 0.75rem);
|
|
84
|
-
font-family: inherit;
|
|
85
|
-
font-size: var(--hx-font-size-md, 1rem);
|
|
86
|
-
color: var(--hx-time-picker-color, var(--hx-color-text-strong, #202b39));
|
|
87
|
-
line-height: var(--hx-line-height-normal, 1.5);
|
|
88
|
-
min-height: var(--hx-size-10, 2.5rem);
|
|
89
|
-
width: 100%;
|
|
90
|
-
cursor: text;
|
|
91
|
-
}
|
|
92
|
-
.field__input::placeholder {
|
|
93
|
-
color: var(--hx-color-text-placeholder, #66787b);
|
|
94
|
-
}
|
|
95
|
-
.field__input:disabled {
|
|
96
|
-
cursor: not-allowed;
|
|
97
|
-
}
|
|
98
|
-
.field__toggle {
|
|
99
|
-
display: flex;
|
|
100
|
-
align-items: center;
|
|
101
|
-
justify-content: center;
|
|
102
|
-
border: none;
|
|
103
|
-
background: transparent;
|
|
104
|
-
padding: 0 var(--hx-space-3, 0.75rem);
|
|
105
|
-
color: var(--hx-time-picker-chevron-color, var(--hx-color-text-muted, #4a5362));
|
|
106
|
-
cursor: pointer;
|
|
107
|
-
height: 100%;
|
|
108
|
-
min-height: var(--hx-size-10, 2.5rem);
|
|
109
|
-
flex-shrink: 0;
|
|
110
|
-
border-inline-start: var(--hx-border-width-thin, 1px) solid
|
|
111
|
-
var(--hx-time-picker-border-color, var(--hx-color-border-strong, #66787b));
|
|
112
|
-
}
|
|
113
|
-
.field__toggle:focus-visible {
|
|
114
|
-
outline: var(--hx-focus-ring-width, 2px) solid
|
|
115
|
-
var(--hx-time-picker-focus-ring-color, var(--hx-focus-ring-color));
|
|
116
|
-
outline-offset: -2px;
|
|
117
|
-
border-radius: 0 var(--hx-time-picker-border-radius, var(--hx-border-radius-md, 0.375rem));
|
|
118
|
-
}
|
|
119
|
-
.field__listbox {
|
|
120
|
-
position: absolute;
|
|
121
|
-
top: calc(100% + var(--hx-space-1, 0.25rem));
|
|
122
|
-
inset-inline-start: 0;
|
|
123
|
-
inset-inline-end: 0;
|
|
124
|
-
z-index: var(--hx-z-index-dropdown, 1000);
|
|
125
|
-
background-color: var(--hx-time-picker-listbox-bg, var(--hx-color-surface-default, #ffffff));
|
|
126
|
-
border: var(--hx-border-width-thin, 1px) solid
|
|
127
|
-
var(--hx-time-picker-border-color, var(--hx-color-border-strong, #66787b));
|
|
128
|
-
border-radius: var(--hx-time-picker-border-radius, var(--hx-border-radius-md, 0.375rem));
|
|
129
|
-
box-shadow: var(
|
|
130
|
-
--hx-time-picker-listbox-shadow,
|
|
131
|
-
0 4px 16px color-mix(in srgb, var(--hx-color-neutral-900) 12%, transparent)
|
|
132
|
-
);
|
|
133
|
-
max-height: var(--hx-time-picker-listbox-max-height, 16rem);
|
|
134
|
-
overflow-y: auto;
|
|
135
|
-
padding: var(--hx-space-1, 0.25rem) 0;
|
|
136
|
-
list-style: none;
|
|
137
|
-
margin: 0;
|
|
138
|
-
}
|
|
139
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
140
|
-
.field__listbox {
|
|
141
|
-
animation: hx-listbox-enter var(--hx-transition-fast, 150ms ease) forwards;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
@keyframes hx-listbox-enter {
|
|
145
|
-
0% {
|
|
146
|
-
opacity: 0;
|
|
147
|
-
transform: translateY(-0.25rem);
|
|
148
|
-
}
|
|
149
|
-
to {
|
|
150
|
-
opacity: 1;
|
|
151
|
-
transform: translateY(0);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
.field__option {
|
|
155
|
-
display: flex;
|
|
156
|
-
align-items: center;
|
|
157
|
-
padding: var(--hx-space-2, 0.5rem) var(--hx-space-3, 0.75rem);
|
|
158
|
-
font-size: var(--hx-font-size-md, 1rem);
|
|
159
|
-
font-family: inherit;
|
|
160
|
-
color: var(--hx-time-picker-option-color, var(--hx-color-text-strong, #202b39));
|
|
161
|
-
cursor: pointer;
|
|
162
|
-
transition: background-color var(--hx-transition-fast, 150ms ease);
|
|
163
|
-
line-height: var(--hx-line-height-normal, 1.5);
|
|
164
|
-
}
|
|
165
|
-
.field__option:hover,
|
|
166
|
-
.field__option--active {
|
|
167
|
-
background-color: var(--hx-time-picker-option-hover-bg, var(--hx-color-primary-50, #ebf8f8));
|
|
168
|
-
color: var(--hx-time-picker-option-hover-color, var(--hx-color-primary-700, #0f6363));
|
|
169
|
-
}
|
|
170
|
-
.field__option--selected {
|
|
171
|
-
background-color: var(
|
|
172
|
-
--hx-time-picker-option-selected-bg,
|
|
173
|
-
var(--hx-color-primary-100, #dbf0f0)
|
|
174
|
-
);
|
|
175
|
-
color: var(--hx-time-picker-option-selected-color, var(--hx-color-primary-800, #07494a));
|
|
176
|
-
font-weight: var(--hx-font-weight-medium, 500);
|
|
177
|
-
}
|
|
178
|
-
.field__option--selected.field__option--active {
|
|
179
|
-
background-color: var(
|
|
180
|
-
--hx-time-picker-option-selected-bg,
|
|
181
|
-
var(--hx-color-primary-100, #dbf0f0)
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
@media (prefers-reduced-motion: reduce) {
|
|
185
|
-
.field__combobox,
|
|
186
|
-
.field__option {
|
|
187
|
-
transition: none;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
.field__help-text,
|
|
191
|
-
.field__error {
|
|
192
|
-
font-size: var(--hx-font-size-xs, 0.75rem);
|
|
193
|
-
line-height: var(--hx-line-height-normal, 1.5);
|
|
194
|
-
}
|
|
195
|
-
.field__help-text {
|
|
196
|
-
color: var(--hx-color-text-muted, #4a5362);
|
|
197
|
-
}
|
|
198
|
-
.field__error {
|
|
199
|
-
color: var(--hx-time-picker-error-color, var(--hx-color-error-text, #c92a2a));
|
|
200
|
-
}
|
|
201
|
-
@media (forced-colors: active) {
|
|
202
|
-
.field__combobox {
|
|
203
|
-
border-color: ButtonText;
|
|
204
|
-
background-color: Canvas;
|
|
205
|
-
}
|
|
206
|
-
.field__combobox:focus-within {
|
|
207
|
-
outline: 3px solid Highlight;
|
|
208
|
-
outline-offset: 0;
|
|
209
|
-
box-shadow: none;
|
|
210
|
-
}
|
|
211
|
-
.field--error .field__combobox {
|
|
212
|
-
border-color: LinkText;
|
|
213
|
-
}
|
|
214
|
-
.field--error .field__combobox:focus-within {
|
|
215
|
-
outline-color: Highlight;
|
|
216
|
-
box-shadow: none;
|
|
217
|
-
}
|
|
218
|
-
.field__toggle:focus-visible {
|
|
219
|
-
outline: 3px solid Highlight;
|
|
220
|
-
outline-offset: 0;
|
|
221
|
-
}
|
|
222
|
-
.field__listbox {
|
|
223
|
-
border-color: ButtonText;
|
|
224
|
-
background-color: Canvas;
|
|
225
|
-
box-shadow: none;
|
|
226
|
-
}
|
|
227
|
-
.field__option:hover,
|
|
228
|
-
.field__option--active {
|
|
229
|
-
background-color: Highlight;
|
|
230
|
-
color: HighlightText;
|
|
231
|
-
forced-color-adjust: none;
|
|
232
|
-
}
|
|
233
|
-
.field__option--selected {
|
|
234
|
-
background-color: Highlight;
|
|
235
|
-
color: HighlightText;
|
|
236
|
-
forced-color-adjust: none;
|
|
237
|
-
}
|
|
238
|
-
.field__error {
|
|
239
|
-
color: LinkText;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
`;
|
|
243
|
-
var T = Object.defineProperty, P = Object.getOwnPropertyDescriptor, l = (e, t, o, i) => {
|
|
244
|
-
for (var r = i > 1 ? void 0 : i ? P(t, o) : t, a = e.length - 1, n; a >= 0; a--)
|
|
245
|
-
(n = e[a]) && (r = (i ? n(t, o, r) : n(r)) || r);
|
|
246
|
-
return i && r && T(t, o, r), r;
|
|
247
|
-
};
|
|
248
|
-
function d(e) {
|
|
249
|
-
const t = /^(\d{1,2}):(\d{2})$/.exec(e.trim());
|
|
250
|
-
if (!t) return null;
|
|
251
|
-
const o = parseInt(t[1] ?? "0", 10), i = parseInt(t[2] ?? "0", 10);
|
|
252
|
-
return o < 0 || o > 23 || i < 0 || i > 59 ? null : { hours: o, minutes: i };
|
|
253
|
-
}
|
|
254
|
-
function f(e, t) {
|
|
255
|
-
return `${String(e).padStart(2, "0")}:${String(t).padStart(2, "0")}`;
|
|
256
|
-
}
|
|
257
|
-
function k(e) {
|
|
258
|
-
const t = d(e);
|
|
259
|
-
if (!t) return e;
|
|
260
|
-
const { hours: o, minutes: i } = t, r = o < 12 ? "AM" : "PM", a = o % 12 === 0 ? 12 : o % 12;
|
|
261
|
-
return `${String(a).padStart(2, "0")}:${String(i).padStart(2, "0")} ${r}`;
|
|
262
|
-
}
|
|
263
|
-
function q(e, t, o, i) {
|
|
264
|
-
const r = d(e) ?? { hours: 0, minutes: 0 }, a = d(t) ?? { hours: 23, minutes: 59 }, n = r.hours * 60 + r.minutes, c = a.hours * 60 + a.minutes, u = Math.max(1, Math.round(o)), m = [];
|
|
265
|
-
for (let b = n; b <= c; b += u) {
|
|
266
|
-
const $ = Math.floor(b / 60) % 24, S = b % 60, g = f($, S);
|
|
267
|
-
m.push({
|
|
268
|
-
value: g,
|
|
269
|
-
label: i === "12h" ? k(g) : g
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
return m;
|
|
273
|
-
}
|
|
274
|
-
function y(e, t, o) {
|
|
275
|
-
if (!e) return "";
|
|
276
|
-
const i = d(e);
|
|
277
|
-
if (!i) return "";
|
|
278
|
-
const r = i.hours * 60 + i.minutes, a = d(t) ?? { hours: 0, minutes: 0 }, n = d(o) ?? { hours: 23, minutes: 59 }, c = a.hours * 60 + a.minutes, u = n.hours * 60 + n.minutes;
|
|
279
|
-
return r < c ? f(a.hours, a.minutes) : r > u ? f(n.hours, n.minutes) : f(i.hours, i.minutes);
|
|
280
|
-
}
|
|
281
|
-
function z(e) {
|
|
282
|
-
const t = e.trim().toUpperCase(), o = d(t);
|
|
283
|
-
if (o) return f(o.hours, o.minutes);
|
|
284
|
-
const i = /^(\d{1,2})(?::(\d{2}))?\s*(AM|PM)$/.exec(t) ?? /^(\d{1,2})(\d{2})\s*(AM|PM)$/.exec(t);
|
|
285
|
-
if (i) {
|
|
286
|
-
let r = parseInt(i[1] ?? "0", 10);
|
|
287
|
-
const a = i[2] !== void 0 ? parseInt(i[2], 10) : 0, n = i[3] ?? "";
|
|
288
|
-
return r < 1 || r > 12 || a < 0 || a > 59 ? null : (n === "AM" ? r = r === 12 ? 0 : r : r = r === 12 ? 12 : r + 12, f(r, a));
|
|
289
|
-
}
|
|
290
|
-
return null;
|
|
291
|
-
}
|
|
292
|
-
const F = V("hx-time-picker");
|
|
293
|
-
let s = class extends L(O) {
|
|
294
|
-
constructor() {
|
|
295
|
-
super(...arguments), this.name = "", this.value = "", this.min = "00:00", this.max = "23:59", this.step = 30, this.label = "", this.required = !1, this.disabled = !1, this.error = "", this.format = "12h", this._open = !1, this._activeIndex = -1, this._inputDisplayValue = "", this._hasLabelSlot = !1, this._hasErrorSlot = !1, this._hasHelpSlot = !1, this._slottedLabelId = "", this._id = F(), this._listboxId = `${this._id}-listbox`, this._errorId = `${this._id}-error`, this._helpId = `${this._id}-help`, this._cachedSlots = null, this._slotsKey = "", this._handleOutsideClick = (e) => {
|
|
296
|
-
var t;
|
|
297
|
-
this.isConnected && !this.contains(e.target) && !((t = this.shadowRoot) != null && t.contains(e.target)) && this._closeListbox();
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Lazily generates and caches the list of time slots based on current min, max, step, and format.
|
|
302
|
-
* @internal
|
|
303
|
-
*/
|
|
304
|
-
get _slots() {
|
|
305
|
-
const e = `${this.min}|${this.max}|${this.step}|${this.format}`;
|
|
306
|
-
return (this._cachedSlots === null || e !== this._slotsKey) && (this._slotsKey = e, this._cachedSlots = q(this.min, this.max, this.step, this.format)), this._cachedSlots;
|
|
307
|
-
}
|
|
308
|
-
// ─── Lifecycle ───
|
|
309
|
-
connectedCallback() {
|
|
310
|
-
super.connectedCallback(), document.addEventListener("click", this._handleOutsideClick);
|
|
311
|
-
}
|
|
312
|
-
disconnectedCallback() {
|
|
313
|
-
super.disconnectedCallback(), document.removeEventListener("click", this._handleOutsideClick);
|
|
314
|
-
}
|
|
315
|
-
willUpdate(e) {
|
|
316
|
-
(e.has("value") || e.has("format")) && (this._inputDisplayValue = this.value ? this.format === "12h" ? k(this.value) : this.value : "");
|
|
317
|
-
}
|
|
318
|
-
updated(e) {
|
|
319
|
-
var t;
|
|
320
|
-
if (super.updated(e), e.has("value") && this._internals.setFormValue(this.value || null), e.has("_open") && this._open && this._scrollActiveOptionIntoView(), e.has("error") && this.error) {
|
|
321
|
-
const o = (t = this.shadowRoot) == null ? void 0 : t.querySelector('[role="alert"]');
|
|
322
|
-
if (o) {
|
|
323
|
-
const i = this.error;
|
|
324
|
-
requestAnimationFrame(() => {
|
|
325
|
-
o.textContent = "", requestAnimationFrame(() => {
|
|
326
|
-
o.textContent = i;
|
|
327
|
-
});
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
// ─── Form Integration ───
|
|
333
|
-
/** @internal */
|
|
334
|
-
_updateValidity() {
|
|
335
|
-
this.required && !this.value ? this._internals.setValidity(
|
|
336
|
-
{ valueMissing: !0 },
|
|
337
|
-
this.error || "Please select a time.",
|
|
338
|
-
this._inputEl ?? void 0
|
|
339
|
-
) : this._internals.setValidity({});
|
|
340
|
-
}
|
|
341
|
-
/** @internal */
|
|
342
|
-
_onFormReset() {
|
|
343
|
-
this.value = "", this._inputDisplayValue = "", this._internals.setFormValue(null), this._closeListbox(), this._resetInteractionState();
|
|
344
|
-
}
|
|
345
|
-
/** @internal */
|
|
346
|
-
_onFormStateRestore(e, t) {
|
|
347
|
-
if (typeof e != "string") return;
|
|
348
|
-
const o = y(e, this.min, this.max);
|
|
349
|
-
this.value = o;
|
|
350
|
-
}
|
|
351
|
-
/** @internal */
|
|
352
|
-
_onFormDisabled(e) {
|
|
353
|
-
this.disabled = e;
|
|
354
|
-
}
|
|
355
|
-
// ─── Listbox helpers ───
|
|
356
|
-
/** @internal */
|
|
357
|
-
_openListbox() {
|
|
358
|
-
if (this._open) return;
|
|
359
|
-
const e = this._slots.findIndex((t) => t.value === this.value);
|
|
360
|
-
this._activeIndex = e >= 0 ? e : 0, this._open = !0;
|
|
361
|
-
}
|
|
362
|
-
/** @internal */
|
|
363
|
-
_closeListbox() {
|
|
364
|
-
this._open && (this._open = !1, this._activeIndex = -1, this._handleInteractionBlur());
|
|
365
|
-
}
|
|
366
|
-
/** @internal */
|
|
367
|
-
_scrollActiveOptionIntoView() {
|
|
368
|
-
if (!this._listboxEl) return;
|
|
369
|
-
const e = this._listboxEl.querySelector(".field__option--active");
|
|
370
|
-
e == null || e.scrollIntoView({ block: "nearest" });
|
|
371
|
-
}
|
|
372
|
-
/** @internal */
|
|
373
|
-
_selectSlot(e) {
|
|
374
|
-
const t = y(e.value, this.min, this.max);
|
|
375
|
-
this.value = t, this._handleInteractionInput(), this._closeListbox(), this._dispatchChange(t);
|
|
376
|
-
}
|
|
377
|
-
// ─── Slot tracking ───
|
|
378
|
-
/** @internal */
|
|
379
|
-
_handleLabelSlotChange(e) {
|
|
380
|
-
const o = e.target.assignedNodes({ flatten: !0 });
|
|
381
|
-
if (this._hasLabelSlot = o.length > 0, this._hasLabelSlot) {
|
|
382
|
-
const i = o.find((r) => r.nodeType === Node.ELEMENT_NODE);
|
|
383
|
-
i && (i.id || (i.id = `${this._id}-slotted-label`), this._slottedLabelId = i.id);
|
|
384
|
-
} else
|
|
385
|
-
this._slottedLabelId = "";
|
|
386
|
-
}
|
|
387
|
-
/** @internal */
|
|
388
|
-
_handleErrorSlotChange(e) {
|
|
389
|
-
const t = e.target;
|
|
390
|
-
this._hasErrorSlot = t.assignedNodes({ flatten: !0 }).length > 0;
|
|
391
|
-
}
|
|
392
|
-
/** @internal */
|
|
393
|
-
_handleHelpSlotChange(e) {
|
|
394
|
-
const t = e.target;
|
|
395
|
-
this._hasHelpSlot = t.assignedNodes({ flatten: !0 }).length > 0;
|
|
396
|
-
}
|
|
397
|
-
// ─── Event Dispatch ───
|
|
398
|
-
/** @internal */
|
|
399
|
-
_dispatchChange(e) {
|
|
400
|
-
this.dispatchEvent(
|
|
401
|
-
new CustomEvent("hx-change", {
|
|
402
|
-
bubbles: !0,
|
|
403
|
-
composed: !0,
|
|
404
|
-
detail: { value: e }
|
|
405
|
-
})
|
|
406
|
-
);
|
|
407
|
-
}
|
|
408
|
-
// ─── Input Handlers ───
|
|
409
|
-
/** @internal */
|
|
410
|
-
_handleInputClick() {
|
|
411
|
-
this.disabled || this._openListbox();
|
|
412
|
-
}
|
|
413
|
-
/** @internal */
|
|
414
|
-
_handleToggleClick(e) {
|
|
415
|
-
var t;
|
|
416
|
-
e.stopPropagation(), !this.disabled && (this._open ? this._closeListbox() : (this._openListbox(), (t = this._inputEl) == null || t.focus()));
|
|
417
|
-
}
|
|
418
|
-
/** @internal */
|
|
419
|
-
_handleInputInput(e) {
|
|
420
|
-
const t = e.target;
|
|
421
|
-
this._inputDisplayValue = t.value, this._open || this._openListbox();
|
|
422
|
-
}
|
|
423
|
-
/** @internal */
|
|
424
|
-
_handleInputChange(e) {
|
|
425
|
-
const o = e.target.value.trim();
|
|
426
|
-
if (!o) {
|
|
427
|
-
this.value = "", this._handleInteractionInput(), this._handleInteractionBlur(), this._internals.setFormValue(null), this._dispatchChange("");
|
|
428
|
-
return;
|
|
429
|
-
}
|
|
430
|
-
const i = z(o);
|
|
431
|
-
if (i) {
|
|
432
|
-
const r = y(i, this.min, this.max);
|
|
433
|
-
this.value = r, this._handleInteractionInput(), this._handleInteractionBlur(), this._dispatchChange(r);
|
|
434
|
-
} else
|
|
435
|
-
this._inputDisplayValue = this.value ? this.format === "12h" ? k(this.value) : this.value : "";
|
|
436
|
-
}
|
|
437
|
-
/** @internal */
|
|
438
|
-
_handleInputKeyDown(e) {
|
|
439
|
-
switch (e.key) {
|
|
440
|
-
case "ArrowDown":
|
|
441
|
-
e.preventDefault(), this._open ? (this._activeIndex = Math.min(this._activeIndex + 1, this._slots.length - 1), this._scrollActiveOptionIntoView()) : this._openListbox();
|
|
442
|
-
break;
|
|
443
|
-
case "ArrowUp":
|
|
444
|
-
e.preventDefault(), this._open && (this._activeIndex = Math.max(this._activeIndex - 1, 0), this._scrollActiveOptionIntoView());
|
|
445
|
-
break;
|
|
446
|
-
case "Enter":
|
|
447
|
-
if (this._open && this._activeIndex >= 0) {
|
|
448
|
-
e.preventDefault();
|
|
449
|
-
const t = this._slots[this._activeIndex];
|
|
450
|
-
t && this._selectSlot(t);
|
|
451
|
-
}
|
|
452
|
-
break;
|
|
453
|
-
case "Escape":
|
|
454
|
-
e.preventDefault(), this._closeListbox();
|
|
455
|
-
break;
|
|
456
|
-
case "Home":
|
|
457
|
-
this._open && (e.preventDefault(), this._activeIndex = 0, this._scrollActiveOptionIntoView());
|
|
458
|
-
break;
|
|
459
|
-
case "End":
|
|
460
|
-
this._open && (e.preventDefault(), this._activeIndex = this._slots.length - 1, this._scrollActiveOptionIntoView());
|
|
461
|
-
break;
|
|
462
|
-
case "Tab":
|
|
463
|
-
this._closeListbox();
|
|
464
|
-
break;
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
/** @internal */
|
|
468
|
-
_handleOptionPointerDown(e) {
|
|
469
|
-
e.preventDefault();
|
|
470
|
-
}
|
|
471
|
-
/** @internal */
|
|
472
|
-
_handleOptionClick(e) {
|
|
473
|
-
var t;
|
|
474
|
-
this._selectSlot(e), (t = this._inputEl) == null || t.focus();
|
|
475
|
-
}
|
|
476
|
-
/** @internal */
|
|
477
|
-
_handleOptionMouseEnter(e) {
|
|
478
|
-
this._activeIndex = e;
|
|
479
|
-
}
|
|
480
|
-
// ─── Public API ───
|
|
481
|
-
/** Moves focus to the time input element. */
|
|
482
|
-
focus(e) {
|
|
483
|
-
var t;
|
|
484
|
-
(t = this._inputEl) == null || t.focus(e);
|
|
485
|
-
}
|
|
486
|
-
// ─── Render ───
|
|
487
|
-
render() {
|
|
488
|
-
const e = !!this.error || this._hasErrorSlot, t = this._slots, o = {
|
|
489
|
-
field: !0,
|
|
490
|
-
"field--error": e,
|
|
491
|
-
"field--disabled": this.disabled,
|
|
492
|
-
"field--required": this.required
|
|
493
|
-
}, i = this._open && this._activeIndex >= 0 ? `${this._listboxId}-option-${this._activeIndex}` : void 0, r = this.format === "12h" ? "hh:mm AM" : "hh:mm", a = [e ? this._errorId : null, this._helpId].filter(Boolean).join(" ") || void 0;
|
|
494
|
-
return x`
|
|
495
|
-
<div part="field" class=${I(o)}>
|
|
496
|
-
<!-- Label -->
|
|
497
|
-
<slot name="label" @slotchange=${this._handleLabelSlotChange}>
|
|
498
|
-
${this.label ? x`
|
|
499
|
-
<label part="label" class="field__label" for=${this._id}>
|
|
500
|
-
${this.label}
|
|
501
|
-
${this.required ? x`<span class="field__required-marker" aria-hidden="true">*</span>` : _}
|
|
502
|
-
</label>
|
|
503
|
-
` : _}
|
|
504
|
-
</slot>
|
|
505
|
-
|
|
506
|
-
<!-- Combobox wrapper; role="combobox" lives on the input per ARIA 1.2 -->
|
|
507
|
-
<div class="field__combobox">
|
|
508
|
-
<input
|
|
509
|
-
part="input"
|
|
510
|
-
class="field__input"
|
|
511
|
-
id=${this._id}
|
|
512
|
-
type="text"
|
|
513
|
-
inputmode="text"
|
|
514
|
-
autocomplete="off"
|
|
515
|
-
spellcheck="false"
|
|
516
|
-
role="combobox"
|
|
517
|
-
aria-expanded=${this._open ? "true" : "false"}
|
|
518
|
-
aria-haspopup="listbox"
|
|
519
|
-
.value=${D(this._inputDisplayValue)}
|
|
520
|
-
placeholder=${r}
|
|
521
|
-
?required=${this.required}
|
|
522
|
-
?disabled=${this.disabled}
|
|
523
|
-
name=${v(this.name || void 0)}
|
|
524
|
-
aria-autocomplete="list"
|
|
525
|
-
aria-controls=${this._listboxId}
|
|
526
|
-
aria-activedescendant=${v(i)}
|
|
527
|
-
aria-invalid=${e ? "true" : _}
|
|
528
|
-
aria-describedby=${v(a)}
|
|
529
|
-
aria-required=${this.required ? "true" : _}
|
|
530
|
-
aria-labelledby=${v(
|
|
531
|
-
this._hasLabelSlot && this._slottedLabelId ? this._slottedLabelId : void 0
|
|
532
|
-
)}
|
|
533
|
-
@click=${this._handleInputClick}
|
|
534
|
-
@input=${this._handleInputInput}
|
|
535
|
-
@change=${this._handleInputChange}
|
|
536
|
-
@keydown=${this._handleInputKeyDown}
|
|
537
|
-
/>
|
|
538
|
-
|
|
539
|
-
<!-- Toggle button -->
|
|
540
|
-
<button
|
|
541
|
-
part="toggle"
|
|
542
|
-
type="button"
|
|
543
|
-
class="field__toggle"
|
|
544
|
-
tabindex="-1"
|
|
545
|
-
aria-label=${this._open ? "Close time picker" : "Open time picker"}
|
|
546
|
-
?disabled=${this.disabled}
|
|
547
|
-
@click=${this._handleToggleClick}
|
|
548
|
-
>
|
|
549
|
-
<!-- Clock icon -->
|
|
550
|
-
<svg
|
|
551
|
-
width="16"
|
|
552
|
-
height="16"
|
|
553
|
-
viewBox="0 0 16 16"
|
|
554
|
-
fill="none"
|
|
555
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
556
|
-
aria-hidden="true"
|
|
557
|
-
>
|
|
558
|
-
<circle cx="8" cy="8" r="6.5" stroke="currentColor" stroke-width="1.25" />
|
|
559
|
-
<path
|
|
560
|
-
d="M8 4.5V8L10.5 10"
|
|
561
|
-
stroke="currentColor"
|
|
562
|
-
stroke-width="1.25"
|
|
563
|
-
stroke-linecap="round"
|
|
564
|
-
stroke-linejoin="round"
|
|
565
|
-
/>
|
|
566
|
-
</svg>
|
|
567
|
-
</button>
|
|
568
|
-
|
|
569
|
-
<!-- Dropdown listbox: always in DOM so aria-controls is never a dangling reference (WCAG 4.1.2). Hidden via the boolean hidden attribute when closed. -->
|
|
570
|
-
<ul
|
|
571
|
-
part="listbox"
|
|
572
|
-
class="field__listbox"
|
|
573
|
-
id=${this._listboxId}
|
|
574
|
-
role="listbox"
|
|
575
|
-
aria-label=${this.label || "Time options"}
|
|
576
|
-
?hidden=${!this._open}
|
|
577
|
-
>
|
|
578
|
-
${this._open ? M(
|
|
579
|
-
t,
|
|
580
|
-
(n) => n.value,
|
|
581
|
-
(n, c) => {
|
|
582
|
-
const u = n.value === this.value, m = c === this._activeIndex;
|
|
583
|
-
return x`
|
|
584
|
-
<li
|
|
585
|
-
part="option"
|
|
586
|
-
class=${I({
|
|
587
|
-
field__option: !0,
|
|
588
|
-
"field__option--selected": u,
|
|
589
|
-
"field__option--active": m
|
|
590
|
-
})}
|
|
591
|
-
id="${this._listboxId}-option-${c}"
|
|
592
|
-
role="option"
|
|
593
|
-
aria-selected=${u ? "true" : "false"}
|
|
594
|
-
@pointerdown=${this._handleOptionPointerDown}
|
|
595
|
-
@click=${() => this._handleOptionClick(n)}
|
|
596
|
-
@mouseenter=${() => this._handleOptionMouseEnter(c)}
|
|
597
|
-
>
|
|
598
|
-
${n.label}
|
|
599
|
-
</li>
|
|
600
|
-
`;
|
|
601
|
-
}
|
|
602
|
-
) : _}
|
|
603
|
-
</ul>
|
|
604
|
-
</div>
|
|
605
|
-
|
|
606
|
-
<!-- Error slot / property -->
|
|
607
|
-
<slot name="error" @slotchange=${this._handleErrorSlotChange}>
|
|
608
|
-
${this.error ? x`
|
|
609
|
-
<div part="error" class="field__error" id=${this._errorId} role="alert">
|
|
610
|
-
${this.error}
|
|
611
|
-
</div>
|
|
612
|
-
` : _}
|
|
613
|
-
</slot>
|
|
614
|
-
|
|
615
|
-
<!-- Help slot -->
|
|
616
|
-
<div part="help-text" class="field__help-text" id=${this._helpId}>
|
|
617
|
-
<slot name="help-text" @slotchange=${this._handleHelpSlotChange}></slot>
|
|
618
|
-
</div>
|
|
619
|
-
</div>
|
|
620
|
-
`;
|
|
621
|
-
}
|
|
622
|
-
};
|
|
623
|
-
s.styles = [A, H];
|
|
624
|
-
s.formAssociated = !0;
|
|
625
|
-
l([
|
|
626
|
-
h({ type: String, reflect: !0 })
|
|
627
|
-
], s.prototype, "name", 2);
|
|
628
|
-
l([
|
|
629
|
-
h({ type: String, reflect: !0 })
|
|
630
|
-
], s.prototype, "value", 2);
|
|
631
|
-
l([
|
|
632
|
-
h({ type: String })
|
|
633
|
-
], s.prototype, "min", 2);
|
|
634
|
-
l([
|
|
635
|
-
h({ type: String })
|
|
636
|
-
], s.prototype, "max", 2);
|
|
637
|
-
l([
|
|
638
|
-
h({ type: Number })
|
|
639
|
-
], s.prototype, "step", 2);
|
|
640
|
-
l([
|
|
641
|
-
h({ type: String })
|
|
642
|
-
], s.prototype, "label", 2);
|
|
643
|
-
l([
|
|
644
|
-
h({ type: Boolean, reflect: !0 })
|
|
645
|
-
], s.prototype, "required", 2);
|
|
646
|
-
l([
|
|
647
|
-
h({ type: Boolean, reflect: !0 })
|
|
648
|
-
], s.prototype, "disabled", 2);
|
|
649
|
-
l([
|
|
650
|
-
h({ type: String })
|
|
651
|
-
], s.prototype, "error", 2);
|
|
652
|
-
l([
|
|
653
|
-
h({ type: String, reflect: !0 })
|
|
654
|
-
], s.prototype, "format", 2);
|
|
655
|
-
l([
|
|
656
|
-
p()
|
|
657
|
-
], s.prototype, "_open", 2);
|
|
658
|
-
l([
|
|
659
|
-
p()
|
|
660
|
-
], s.prototype, "_activeIndex", 2);
|
|
661
|
-
l([
|
|
662
|
-
p()
|
|
663
|
-
], s.prototype, "_inputDisplayValue", 2);
|
|
664
|
-
l([
|
|
665
|
-
p()
|
|
666
|
-
], s.prototype, "_hasLabelSlot", 2);
|
|
667
|
-
l([
|
|
668
|
-
p()
|
|
669
|
-
], s.prototype, "_hasErrorSlot", 2);
|
|
670
|
-
l([
|
|
671
|
-
p()
|
|
672
|
-
], s.prototype, "_hasHelpSlot", 2);
|
|
673
|
-
l([
|
|
674
|
-
p()
|
|
675
|
-
], s.prototype, "_slottedLabelId", 2);
|
|
676
|
-
l([
|
|
677
|
-
w(".field__input")
|
|
678
|
-
], s.prototype, "_inputEl", 2);
|
|
679
|
-
l([
|
|
680
|
-
w(".field__listbox")
|
|
681
|
-
], s.prototype, "_listboxEl", 2);
|
|
682
|
-
s = l([
|
|
683
|
-
E("hx-time-picker")
|
|
684
|
-
], s);
|
|
685
|
-
export {
|
|
686
|
-
s as H
|
|
687
|
-
};
|
|
688
|
-
//# sourceMappingURL=hx-time-picker-BoEIZwzv.js.map
|