@helixui/library 1.1.2-next.9 → 2.0.0-next.30
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 +229 -224
- package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
- package/dist/components/hx-accordion/hx-accordion.d.ts.map +1 -1
- package/dist/components/hx-accordion/index.js +1 -1
- package/dist/components/hx-action-bar/hx-action-bar.d.ts.map +1 -1
- package/dist/components/hx-action-bar/index.js +1 -1
- package/dist/components/hx-alert/hx-alert.d.ts.map +1 -1
- package/dist/components/hx-alert/index.js +1 -1
- package/dist/components/hx-avatar/hx-avatar.d.ts.map +1 -1
- package/dist/components/hx-avatar/index.js +1 -1
- package/dist/components/hx-badge/hx-badge.d.ts.map +1 -1
- package/dist/components/hx-badge/index.js +1 -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-breadcrumb/hx-breadcrumb-item.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/index.js +1 -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.map +1 -1
- package/dist/components/hx-button-group/index.js +1 -1
- package/dist/components/hx-card/hx-card.d.ts.map +1 -1
- package/dist/components/hx-card/index.js +1 -1
- package/dist/components/hx-carousel/hx-carousel-item.d.ts.map +1 -1
- package/dist/components/hx-carousel/hx-carousel.d.ts.map +1 -1
- package/dist/components/hx-carousel/index.js +1 -1
- package/dist/components/hx-checkbox/hx-checkbox.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.map +1 -1
- package/dist/components/hx-checkbox-group/index.js +1 -1
- package/dist/components/hx-clinical-status/hx-clinical-status.d.ts.map +1 -1
- package/dist/components/hx-clinical-status/index.js +1 -1
- package/dist/components/hx-code-snippet/hx-code-snippet.d.ts.map +1 -1
- package/dist/components/hx-code-snippet/index.js +1 -1
- package/dist/components/hx-color-picker/hx-color-picker.d.ts.map +1 -1
- package/dist/components/hx-color-picker/index.js +1 -1
- 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-container/hx-container.d.ts.map +1 -1
- package/dist/components/hx-container/index.js +1 -1
- package/dist/components/hx-copy-button/hx-copy-button.d.ts.map +1 -1
- package/dist/components/hx-copy-button/index.js +1 -1
- package/dist/components/hx-counter/hx-counter.d.ts.map +1 -1
- package/dist/components/hx-counter/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.map +1 -1
- package/dist/components/hx-date-picker/index.js +1 -1
- 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-divider/hx-divider.d.ts.map +1 -1
- package/dist/components/hx-divider/index.js +1 -1
- package/dist/components/hx-drawer/hx-drawer.d.ts.map +1 -1
- package/dist/components/hx-drawer/index.js +1 -1
- 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.map +1 -1
- package/dist/components/hx-field/index.js +1 -1
- package/dist/components/hx-field-label/hx-field-label.d.ts.map +1 -1
- package/dist/components/hx-field-label/index.js +1 -1
- package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
- package/dist/components/hx-file-upload/index.js +1 -1
- package/dist/components/hx-format-date/hx-format-date.d.ts.map +1 -1
- package/dist/components/hx-format-date/index.js +1 -1
- package/dist/components/hx-grid/hx-grid.d.ts.map +1 -1
- package/dist/components/hx-grid/index.js +1 -1
- package/dist/components/hx-help-text/hx-help-text.d.ts.map +1 -1
- package/dist/components/hx-help-text/index.js +1 -1
- package/dist/components/hx-icon/hx-icon.d.ts.map +1 -1
- package/dist/components/hx-icon/index.js +1 -1
- package/dist/components/hx-icon-button/hx-icon-button.d.ts.map +1 -1
- package/dist/components/hx-icon-button/index.js +1 -1
- package/dist/components/hx-image/hx-image.d.ts.map +1 -1
- package/dist/components/hx-image/index.js +1 -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.map +1 -1
- 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.map +1 -1
- package/dist/components/hx-menu/hx-menu-item.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/components/hx-meter/index.js +1 -1
- package/dist/components/hx-nav/hx-nav.d.ts.map +1 -1
- package/dist/components/hx-nav/index.js +1 -1
- package/dist/components/hx-number-input/hx-number-input.d.ts.map +1 -1
- package/dist/components/hx-number-input/index.js +1 -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-pagination/hx-pagination.d.ts.map +1 -1
- package/dist/components/hx-pagination/index.js +1 -1
- package/dist/components/hx-patient-banner/hx-patient-banner.d.ts.map +1 -1
- package/dist/components/hx-patient-banner/index.js +1 -1
- package/dist/components/hx-phi-field/hx-phi-field.d.ts.map +1 -1
- package/dist/components/hx-phi-field/index.js +1 -1
- 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-popup/hx-popup.d.ts.map +1 -1
- package/dist/components/hx-popup/index.js +1 -1
- 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-progress-ring/hx-progress-ring.d.ts.map +1 -1
- package/dist/components/hx-progress-ring/index.js +1 -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.map +1 -1
- package/dist/components/hx-radio-group/index.js +1 -1
- package/dist/components/hx-rating/hx-rating.d.ts.map +1 -1
- package/dist/components/hx-rating/index.js +1 -1
- package/dist/components/hx-select/hx-select.d.ts.map +1 -1
- package/dist/components/hx-select/index.js +1 -1
- package/dist/components/hx-side-nav/hx-nav-item.d.ts +5 -0
- package/dist/components/hx-side-nav/hx-nav-item.d.ts.map +1 -1
- package/dist/components/hx-side-nav/hx-side-nav.d.ts.map +1 -1
- package/dist/components/hx-side-nav/index.js +1 -1
- package/dist/components/hx-skeleton/hx-skeleton.d.ts.map +1 -1
- package/dist/components/hx-skeleton/index.js +1 -1
- package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
- package/dist/components/hx-slider/index.js +1 -1
- 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.map +1 -1
- package/dist/components/hx-split-button/index.js +1 -1
- package/dist/components/hx-split-panel/hx-split-panel.d.ts.map +1 -1
- package/dist/components/hx-split-panel/index.js +1 -1
- package/dist/components/hx-stack/hx-stack.d.ts.map +1 -1
- package/dist/components/hx-stack/index.js +1 -1
- 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-status-indicator/hx-status-indicator.d.ts.map +1 -1
- package/dist/components/hx-status-indicator/index.js +1 -1
- package/dist/components/hx-steps/hx-step.d.ts +7 -0
- package/dist/components/hx-steps/hx-step.d.ts.map +1 -1
- package/dist/components/hx-steps/hx-steps.d.ts.map +1 -1
- package/dist/components/hx-steps/index.js +1 -1
- package/dist/components/hx-structured-list/hx-structured-list.d.ts.map +1 -1
- package/dist/components/hx-structured-list/index.js +1 -1
- package/dist/components/hx-style-scope/hx-style-scope.d.ts.map +1 -1
- package/dist/components/hx-style-scope/index.js +1 -1
- package/dist/components/hx-switch/hx-switch.d.ts.map +1 -1
- package/dist/components/hx-switch/index.js +1 -1
- package/dist/components/hx-table/hx-table.d.ts.map +1 -1
- package/dist/components/hx-table/hx-tbody.d.ts.map +1 -1
- package/dist/components/hx-table/hx-td.d.ts.map +1 -1
- package/dist/components/hx-table/hx-tfoot.d.ts.map +1 -1
- package/dist/components/hx-table/hx-th.d.ts.map +1 -1
- package/dist/components/hx-table/hx-thead.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/components/hx-tabs/hx-tab.d.ts.map +1 -1
- 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.d.ts.map +1 -1
- package/dist/components/hx-tag/index.js +1 -1
- package/dist/components/hx-text/hx-text.d.ts.map +1 -1
- package/dist/components/hx-text/index.js +1 -1
- package/dist/components/hx-text-input/hx-text-input.d.ts.map +1 -1
- package/dist/components/hx-text-input/index.js +1 -1
- package/dist/components/hx-textarea/hx-textarea.d.ts.map +1 -1
- package/dist/components/hx-textarea/index.js +1 -1
- package/dist/components/hx-theme/hx-theme.d.ts.map +1 -1
- package/dist/components/hx-theme/index.js +1 -1
- package/dist/components/hx-time-picker/hx-time-picker.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.map +1 -1
- 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-toggle-button/hx-toggle-button.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/index.js +1 -1
- 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-top-nav/hx-top-nav.d.ts.map +1 -1
- package/dist/components/hx-top-nav/index.js +1 -1
- 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.map +1 -1
- package/dist/components/hx-tree-view/index.js +1 -1
- package/dist/components/hx-visually-hidden/hx-visually-hidden.d.ts.map +1 -1
- package/dist/components/hx-visually-hidden/index.js +1 -1
- package/dist/css/index.css +1 -1
- package/dist/css/manifest.json +1 -1
- package/dist/index.d.ts +1 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +191 -189
- package/dist/index.js.map +1 -1
- package/dist/shared/document-token-adoption-Dym9ALA4.js +15 -0
- package/dist/shared/document-token-adoption-Dym9ALA4.js.map +1 -0
- package/dist/shared/{hx-accordion-_KeulaQR.js → hx-accordion-Cvs-uzZq.js} +21 -21
- package/dist/shared/hx-accordion-Cvs-uzZq.js.map +1 -0
- package/dist/shared/{hx-action-bar-vGFnNwNY.js → hx-action-bar-B2BNlKQv.js} +12 -12
- package/dist/shared/hx-action-bar-B2BNlKQv.js.map +1 -0
- package/dist/shared/{hx-alert-DRZYP0Oo.js → hx-alert-CnDlZO6m.js} +7 -7
- package/dist/shared/hx-alert-CnDlZO6m.js.map +1 -0
- package/dist/shared/{hx-avatar-CZfA9KEl.js → hx-avatar-C68g1G2e.js} +7 -7
- package/dist/shared/hx-avatar-C68g1G2e.js.map +1 -0
- package/dist/shared/{hx-badge-Xg7zoh4Q.js → hx-badge-D5vy_5BO.js} +7 -7
- package/dist/shared/hx-badge-D5vy_5BO.js.map +1 -0
- package/dist/shared/{hx-banner-2RS7Nux4.js → hx-banner-Ccif-GaB.js} +7 -7
- package/dist/shared/hx-banner-Ccif-GaB.js.map +1 -0
- package/dist/shared/{hx-breadcrumb-item-CObc-WJl.js → hx-breadcrumb-item-DhxDZI3r.js} +14 -14
- package/dist/shared/hx-breadcrumb-item-DhxDZI3r.js.map +1 -0
- package/dist/shared/{hx-button-CC1YH9RZ.js → hx-button-BF3VwcOJ.js} +11 -11
- package/dist/shared/hx-button-BF3VwcOJ.js.map +1 -0
- package/dist/shared/{hx-button-group-ChTQsnQj.js → hx-button-group-B8u25JjV.js} +12 -12
- package/dist/shared/hx-button-group-B8u25JjV.js.map +1 -0
- package/dist/shared/{hx-card-dIKdcMhr.js → hx-card-Dps4jvG9.js} +7 -7
- package/dist/shared/hx-card-Dps4jvG9.js.map +1 -0
- package/dist/shared/{hx-carousel-item-Cm8a1nAi.js → hx-carousel-item-Dmo9pGFm.js} +23 -23
- package/dist/shared/hx-carousel-item-Dmo9pGFm.js.map +1 -0
- package/dist/shared/{hx-checkbox-_WUiuTo9.js → hx-checkbox-99zyEKj7.js} +16 -16
- package/dist/shared/hx-checkbox-99zyEKj7.js.map +1 -0
- package/dist/shared/{hx-checkbox-group-B-ci-dxp.js → hx-checkbox-group-J2CGHDwY.js} +23 -23
- package/dist/shared/hx-checkbox-group-J2CGHDwY.js.map +1 -0
- package/dist/shared/{hx-clinical-status-D6eaplvs.js → hx-clinical-status-CGx5q5PL.js} +11 -11
- package/dist/shared/hx-clinical-status-CGx5q5PL.js.map +1 -0
- package/dist/shared/{hx-code-snippet-CQsyvthi.js → hx-code-snippet-vAzJjm2O.js} +7 -7
- package/dist/shared/hx-code-snippet-vAzJjm2O.js.map +1 -0
- package/dist/shared/{hx-color-picker-Dk2Myvaf.js → hx-color-picker-CzMu9Fzw.js} +13 -13
- package/dist/shared/hx-color-picker-CzMu9Fzw.js.map +1 -0
- package/dist/shared/{hx-combobox-CNAJXIxo.js → hx-combobox-Dhw33U40.js} +9 -9
- package/dist/shared/hx-combobox-Dhw33U40.js.map +1 -0
- package/dist/shared/{hx-container-7j16VuQE.js → hx-container-Dz4v6FSd.js} +8 -8
- package/dist/shared/hx-container-Dz4v6FSd.js.map +1 -0
- package/dist/shared/{hx-copy-button-B_ZHYO7_.js → hx-copy-button-Dcul7VwZ.js} +19 -19
- package/dist/shared/hx-copy-button-Dcul7VwZ.js.map +1 -0
- package/dist/shared/{hx-counter-D_B7L9Pi.js → hx-counter-czWWvciz.js} +7 -7
- package/dist/shared/hx-counter-czWWvciz.js.map +1 -0
- package/dist/shared/{hx-data-table-B1j4n4bm.js → hx-data-table-CAVgT4JG.js} +37 -37
- package/dist/shared/hx-data-table-CAVgT4JG.js.map +1 -0
- package/dist/shared/{hx-date-picker-R-0kWFwr.js → hx-date-picker-Be8lTTO7.js} +9 -9
- package/dist/shared/hx-date-picker-Be8lTTO7.js.map +1 -0
- package/dist/shared/{hx-dialog-U5d3s0Ps.js → hx-dialog-DTGX2FbP.js} +9 -9
- package/dist/shared/hx-dialog-DTGX2FbP.js.map +1 -0
- package/dist/shared/{hx-divider-DdAN-_jB.js → hx-divider-BJjarZ9z.js} +13 -13
- package/dist/shared/hx-divider-BJjarZ9z.js.map +1 -0
- package/dist/shared/{hx-drawer-e0qeGxAD.js → hx-drawer-C5qI7jf1.js} +46 -46
- package/dist/shared/hx-drawer-C5qI7jf1.js.map +1 -0
- package/dist/shared/{hx-dropdown-DP_DNpEb.js → hx-dropdown-BxNnUDyD.js} +12 -12
- package/dist/shared/hx-dropdown-BxNnUDyD.js.map +1 -0
- package/dist/shared/{hx-field-COM4KvMQ.js → hx-field-J1IUbQ8n.js} +15 -15
- package/dist/shared/hx-field-J1IUbQ8n.js.map +1 -0
- package/dist/shared/{hx-field-label-BtZ9H9Yy.js → hx-field-label-DhVdkhCN.js} +7 -7
- package/dist/shared/hx-field-label-DhVdkhCN.js.map +1 -0
- package/dist/shared/{hx-file-upload-DbECypLe.js → hx-file-upload-79nMhnM_.js} +9 -9
- package/dist/shared/hx-file-upload-79nMhnM_.js.map +1 -0
- package/dist/shared/{hx-format-date-C030ThSm.js → hx-format-date-BMukpO2t.js} +7 -7
- package/dist/shared/hx-format-date-BMukpO2t.js.map +1 -0
- package/dist/shared/{hx-grid-DE8KM5Gf.js → hx-grid-CO6JZ6Kn.js} +14 -14
- package/dist/shared/hx-grid-CO6JZ6Kn.js.map +1 -0
- package/dist/shared/{hx-help-text-BAcEGRUE.js → hx-help-text-CYGvBLET.js} +13 -13
- package/dist/shared/hx-help-text-CYGvBLET.js.map +1 -0
- package/dist/shared/{hx-icon-dYvrzvsO.js → hx-icon-C1hDsw-b.js} +9 -9
- package/dist/shared/hx-icon-C1hDsw-b.js.map +1 -0
- package/dist/shared/{hx-icon-button-Et9wq79n.js → hx-icon-button-DOWKUs0-.js} +7 -7
- package/dist/shared/hx-icon-button-DOWKUs0-.js.map +1 -0
- package/dist/shared/{hx-image-DUsEi-oN.js → hx-image-BqABFHGZ.js} +11 -11
- package/dist/shared/hx-image-BqABFHGZ.js.map +1 -0
- package/dist/shared/{hx-link-Peg2LzOD.js → hx-link-CAFRuAKJ.js} +24 -24
- package/dist/shared/hx-link-CAFRuAKJ.js.map +1 -0
- package/dist/shared/{hx-list-DwInEX2H.js → hx-list-zbgO-9Xe.js} +12 -12
- package/dist/shared/hx-list-zbgO-9Xe.js.map +1 -0
- package/dist/shared/{hx-menu-divider-puPmRAdN.js → hx-menu-divider-B1TIKAaq.js} +24 -24
- package/dist/shared/hx-menu-divider-B1TIKAaq.js.map +1 -0
- package/dist/shared/{hx-meter-CVs4A649.js → hx-meter-BWNeWrg2.js} +7 -7
- package/dist/shared/hx-meter-BWNeWrg2.js.map +1 -0
- package/dist/shared/{hx-nav-CiyqaW2I.js → hx-nav-DqNzqH2s.js} +6 -6
- package/dist/shared/hx-nav-DqNzqH2s.js.map +1 -0
- package/dist/shared/{hx-nav-item-CuGiJPAf.js → hx-nav-item-D-9uG-Tt.js} +132 -92
- package/dist/shared/hx-nav-item-D-9uG-Tt.js.map +1 -0
- package/dist/shared/{hx-number-input-BPgrlMLN.js → hx-number-input-D7Jczm0J.js} +9 -9
- package/dist/shared/hx-number-input-D7Jczm0J.js.map +1 -0
- package/dist/shared/{hx-overflow-menu-Bz02LPPk.js → hx-overflow-menu-UvSgk7yV.js} +12 -12
- package/dist/shared/hx-overflow-menu-UvSgk7yV.js.map +1 -0
- package/dist/shared/{hx-pagination-Cb9UEWXz.js → hx-pagination-DBovb97q.js} +7 -7
- package/dist/shared/hx-pagination-DBovb97q.js.map +1 -0
- package/dist/shared/{hx-patient-banner-wk4qWmsH.js → hx-patient-banner-DLeU2pC2.js} +7 -7
- package/dist/shared/hx-patient-banner-DLeU2pC2.js.map +1 -0
- package/dist/shared/{hx-phi-field-DX9z3nu0.js → hx-phi-field-BwlVKfHI.js} +7 -7
- package/dist/shared/hx-phi-field-BwlVKfHI.js.map +1 -0
- package/dist/shared/{hx-popover-D6kYQkt3.js → hx-popover-DdjLdSr8.js} +14 -14
- package/dist/shared/hx-popover-DdjLdSr8.js.map +1 -0
- package/dist/shared/{hx-popup-RQb6HUXc.js → hx-popup-DEYZKeH1.js} +14 -14
- package/dist/shared/hx-popup-DEYZKeH1.js.map +1 -0
- package/dist/shared/{hx-progress-bar-ByEmxq1V.js → hx-progress-bar-CdbFsimb.js} +7 -7
- package/dist/shared/hx-progress-bar-CdbFsimb.js.map +1 -0
- package/dist/shared/{hx-progress-ring-CtVnNRQx.js → hx-progress-ring-3YcGRxes.js} +7 -7
- package/dist/shared/hx-progress-ring-3YcGRxes.js.map +1 -0
- package/dist/shared/{hx-radio-jgeW92SV.js → hx-radio-BCEpX1tj.js} +18 -18
- package/dist/shared/hx-radio-BCEpX1tj.js.map +1 -0
- package/dist/shared/{hx-rating-g_iy-DW_.js → hx-rating-BXnSN-Ln.js} +7 -7
- package/dist/shared/hx-rating-BXnSN-Ln.js.map +1 -0
- package/dist/shared/{hx-select-BWzxWZs_.js → hx-select-vzsOOYNx.js} +13 -13
- package/dist/shared/hx-select-vzsOOYNx.js.map +1 -0
- package/dist/shared/{hx-skeleton-BHvALyd7.js → hx-skeleton-Dikv9b7p.js} +6 -6
- package/dist/shared/hx-skeleton-Dikv9b7p.js.map +1 -0
- package/dist/shared/{hx-slider-7Q-e0_pc.js → hx-slider-DnncjdOT.js} +11 -11
- package/dist/shared/hx-slider-DnncjdOT.js.map +1 -0
- package/dist/shared/{hx-spinner-DEgrKsUo.js → hx-spinner-B52nJ4Vt.js} +13 -13
- package/dist/shared/hx-spinner-B52nJ4Vt.js.map +1 -0
- package/dist/shared/{hx-split-button-BA7P_ly5.js → hx-split-button-BJHIszDb.js} +9 -9
- package/dist/shared/hx-split-button-BJHIszDb.js.map +1 -0
- package/dist/shared/{hx-split-panel-Bss54UN8.js → hx-split-panel-uNW9xrA3.js} +7 -7
- package/dist/shared/hx-split-panel-uNW9xrA3.js.map +1 -0
- package/dist/shared/{hx-stack-BStY1RmV.js → hx-stack-BHc4gVv_.js} +9 -9
- package/dist/shared/hx-stack-BHc4gVv_.js.map +1 -0
- package/dist/shared/{hx-stat-CmkCUI8v.js → hx-stat-BfgKgBeq.js} +15 -15
- package/dist/shared/hx-stat-BfgKgBeq.js.map +1 -0
- package/dist/shared/{hx-status-indicator-Dl3Y34mc.js → hx-status-indicator-C146uMF0.js} +7 -7
- package/dist/shared/hx-status-indicator-C146uMF0.js.map +1 -0
- package/dist/shared/{hx-step-DlANlr2A.js → hx-step-C0Unvyen.js} +33 -29
- package/dist/shared/hx-step-C0Unvyen.js.map +1 -0
- package/dist/shared/{hx-structured-list-Db9rwLI_.js → hx-structured-list-3R69RETR.js} +11 -11
- package/dist/shared/hx-structured-list-3R69RETR.js.map +1 -0
- package/dist/shared/{hx-style-scope-BroUu83L.js → hx-style-scope-D3dsKS58.js} +7 -6
- package/dist/shared/{hx-style-scope-BroUu83L.js.map → hx-style-scope-D3dsKS58.js.map} +1 -1
- package/dist/shared/{hx-switch-C0Lp5RGy.js → hx-switch-BCNpbuk-.js} +7 -7
- package/dist/shared/hx-switch-BCNpbuk-.js.map +1 -0
- package/dist/shared/{hx-tab-panel-Dnt8aA74.js → hx-tab-panel-D7BTBgDQ.js} +30 -30
- package/dist/shared/hx-tab-panel-D7BTBgDQ.js.map +1 -0
- package/dist/shared/{hx-tag-K5fCjfqQ.js → hx-tag-C2E-6fJ3.js} +7 -7
- package/dist/shared/hx-tag-C2E-6fJ3.js.map +1 -0
- package/dist/shared/{hx-td-DZuILY3s.js → hx-td-DWcp2XDO.js} +25 -25
- package/dist/shared/hx-td-DWcp2XDO.js.map +1 -0
- package/dist/shared/{hx-text-DoEVOf47.js → hx-text-DxyBxz25.js} +12 -12
- package/dist/shared/hx-text-DxyBxz25.js.map +1 -0
- package/dist/shared/{hx-text-input-DTKWPVdy.js → hx-text-input-2LTGt0vQ.js} +18 -18
- package/dist/shared/hx-text-input-2LTGt0vQ.js.map +1 -0
- package/dist/shared/{hx-textarea-BkSiU8oM.js → hx-textarea-BZspivFK.js} +9 -9
- package/dist/shared/hx-textarea-BZspivFK.js.map +1 -0
- package/dist/shared/{hx-theme-Aag8QJvT.js → hx-theme-J2YEpSIL.js} +2 -1
- package/dist/shared/hx-theme-J2YEpSIL.js.map +1 -0
- package/dist/shared/{hx-time-picker-BpCRsh_z.js → hx-time-picker-CVrw4tju.js} +41 -41
- package/dist/shared/hx-time-picker-CVrw4tju.js.map +1 -0
- package/dist/shared/{hx-toggle-button-CPFqs3eQ.js → hx-toggle-button-Ss7Gppx3.js} +7 -7
- package/dist/shared/hx-toggle-button-Ss7Gppx3.js.map +1 -0
- package/dist/shared/{hx-tooltip-CrO4vzeX.js → hx-tooltip-xRNjEX7_.js} +12 -12
- package/dist/shared/hx-tooltip-xRNjEX7_.js.map +1 -0
- package/dist/shared/{hx-top-nav-DYlnzDaU.js → hx-top-nav-28mxYGuj.js} +7 -7
- package/dist/shared/hx-top-nav-28mxYGuj.js.map +1 -0
- package/dist/shared/{hx-tree-item-C1PhX-HE.js → hx-tree-item-C-cRw_ZA.js} +16 -16
- package/dist/shared/hx-tree-item-C-cRw_ZA.js.map +1 -0
- package/dist/shared/{hx-visually-hidden-CCTQTjbR.js → hx-visually-hidden-D6Dv2l8l.js} +13 -13
- package/dist/shared/hx-visually-hidden-D6Dv2l8l.js.map +1 -0
- package/dist/shared/{toast-factory-f184Gi70.js → toast-factory-oPHbhMZI.js} +18 -18
- package/dist/shared/toast-factory-oPHbhMZI.js.map +1 -0
- package/dist/utilities/document-token-adoption.d.ts +10 -0
- package/dist/utilities/document-token-adoption.d.ts.map +1 -0
- package/package.json +4 -2
- package/dist/shared/hx-accordion-_KeulaQR.js.map +0 -1
- package/dist/shared/hx-action-bar-vGFnNwNY.js.map +0 -1
- package/dist/shared/hx-alert-DRZYP0Oo.js.map +0 -1
- package/dist/shared/hx-avatar-CZfA9KEl.js.map +0 -1
- package/dist/shared/hx-badge-Xg7zoh4Q.js.map +0 -1
- package/dist/shared/hx-banner-2RS7Nux4.js.map +0 -1
- package/dist/shared/hx-breadcrumb-item-CObc-WJl.js.map +0 -1
- package/dist/shared/hx-button-CC1YH9RZ.js.map +0 -1
- package/dist/shared/hx-button-group-ChTQsnQj.js.map +0 -1
- package/dist/shared/hx-card-dIKdcMhr.js.map +0 -1
- package/dist/shared/hx-carousel-item-Cm8a1nAi.js.map +0 -1
- package/dist/shared/hx-checkbox-_WUiuTo9.js.map +0 -1
- package/dist/shared/hx-checkbox-group-B-ci-dxp.js.map +0 -1
- package/dist/shared/hx-clinical-status-D6eaplvs.js.map +0 -1
- package/dist/shared/hx-code-snippet-CQsyvthi.js.map +0 -1
- package/dist/shared/hx-color-picker-Dk2Myvaf.js.map +0 -1
- package/dist/shared/hx-combobox-CNAJXIxo.js.map +0 -1
- package/dist/shared/hx-container-7j16VuQE.js.map +0 -1
- package/dist/shared/hx-copy-button-B_ZHYO7_.js.map +0 -1
- package/dist/shared/hx-counter-D_B7L9Pi.js.map +0 -1
- package/dist/shared/hx-data-table-B1j4n4bm.js.map +0 -1
- package/dist/shared/hx-date-picker-R-0kWFwr.js.map +0 -1
- package/dist/shared/hx-dialog-U5d3s0Ps.js.map +0 -1
- package/dist/shared/hx-divider-DdAN-_jB.js.map +0 -1
- package/dist/shared/hx-drawer-e0qeGxAD.js.map +0 -1
- package/dist/shared/hx-dropdown-DP_DNpEb.js.map +0 -1
- package/dist/shared/hx-field-COM4KvMQ.js.map +0 -1
- package/dist/shared/hx-field-label-BtZ9H9Yy.js.map +0 -1
- package/dist/shared/hx-file-upload-DbECypLe.js.map +0 -1
- package/dist/shared/hx-format-date-C030ThSm.js.map +0 -1
- package/dist/shared/hx-grid-DE8KM5Gf.js.map +0 -1
- package/dist/shared/hx-help-text-BAcEGRUE.js.map +0 -1
- package/dist/shared/hx-icon-button-Et9wq79n.js.map +0 -1
- package/dist/shared/hx-icon-dYvrzvsO.js.map +0 -1
- package/dist/shared/hx-image-DUsEi-oN.js.map +0 -1
- package/dist/shared/hx-link-Peg2LzOD.js.map +0 -1
- package/dist/shared/hx-list-DwInEX2H.js.map +0 -1
- package/dist/shared/hx-menu-divider-puPmRAdN.js.map +0 -1
- package/dist/shared/hx-meter-CVs4A649.js.map +0 -1
- package/dist/shared/hx-nav-CiyqaW2I.js.map +0 -1
- package/dist/shared/hx-nav-item-CuGiJPAf.js.map +0 -1
- package/dist/shared/hx-number-input-BPgrlMLN.js.map +0 -1
- package/dist/shared/hx-overflow-menu-Bz02LPPk.js.map +0 -1
- package/dist/shared/hx-pagination-Cb9UEWXz.js.map +0 -1
- package/dist/shared/hx-patient-banner-wk4qWmsH.js.map +0 -1
- package/dist/shared/hx-phi-field-DX9z3nu0.js.map +0 -1
- package/dist/shared/hx-popover-D6kYQkt3.js.map +0 -1
- package/dist/shared/hx-popup-RQb6HUXc.js.map +0 -1
- package/dist/shared/hx-progress-bar-ByEmxq1V.js.map +0 -1
- package/dist/shared/hx-progress-ring-CtVnNRQx.js.map +0 -1
- package/dist/shared/hx-radio-jgeW92SV.js.map +0 -1
- package/dist/shared/hx-rating-g_iy-DW_.js.map +0 -1
- package/dist/shared/hx-select-BWzxWZs_.js.map +0 -1
- package/dist/shared/hx-skeleton-BHvALyd7.js.map +0 -1
- package/dist/shared/hx-slider-7Q-e0_pc.js.map +0 -1
- package/dist/shared/hx-spinner-DEgrKsUo.js.map +0 -1
- package/dist/shared/hx-split-button-BA7P_ly5.js.map +0 -1
- package/dist/shared/hx-split-panel-Bss54UN8.js.map +0 -1
- package/dist/shared/hx-stack-BStY1RmV.js.map +0 -1
- package/dist/shared/hx-stat-CmkCUI8v.js.map +0 -1
- package/dist/shared/hx-status-indicator-Dl3Y34mc.js.map +0 -1
- package/dist/shared/hx-step-DlANlr2A.js.map +0 -1
- package/dist/shared/hx-structured-list-Db9rwLI_.js.map +0 -1
- package/dist/shared/hx-switch-C0Lp5RGy.js.map +0 -1
- package/dist/shared/hx-tab-panel-Dnt8aA74.js.map +0 -1
- package/dist/shared/hx-tag-K5fCjfqQ.js.map +0 -1
- package/dist/shared/hx-td-DZuILY3s.js.map +0 -1
- package/dist/shared/hx-text-DoEVOf47.js.map +0 -1
- package/dist/shared/hx-text-input-DTKWPVdy.js.map +0 -1
- package/dist/shared/hx-textarea-BkSiU8oM.js.map +0 -1
- package/dist/shared/hx-theme-Aag8QJvT.js.map +0 -1
- package/dist/shared/hx-time-picker-BpCRsh_z.js.map +0 -1
- package/dist/shared/hx-toggle-button-CPFqs3eQ.js.map +0 -1
- package/dist/shared/hx-tooltip-CrO4vzeX.js.map +0 -1
- package/dist/shared/hx-top-nav-DYlnzDaU.js.map +0 -1
- package/dist/shared/hx-tree-item-C1PhX-HE.js.map +0 -1
- package/dist/shared/hx-visually-hidden-CCTQTjbR.js.map +0 -1
- package/dist/shared/toast-factory-f184Gi70.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css as b, LitElement as v, html as d } from "lit";
|
|
2
|
+
import "./document-token-adoption-Dym9ALA4.js";
|
|
2
3
|
import { property as r, customElement as x } from "lit/decorators.js";
|
|
3
|
-
import {
|
|
4
|
-
import { autoUpdate as w, offset as _, autoPlacement as S, flip as A, shift as z, arrow as P, size as E, computePosition as k } from "@floating-ui/dom";
|
|
4
|
+
import { autoUpdate as g, offset as w, autoPlacement as _, flip as S, shift as A, arrow as z, size as P, computePosition as E } from "@floating-ui/dom";
|
|
5
5
|
const U = b`
|
|
6
6
|
:host {
|
|
7
7
|
display: inline-block;
|
|
@@ -34,10 +34,10 @@ const U = b`
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
|
-
var
|
|
38
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
37
|
+
var k = Object.defineProperty, C = Object.getOwnPropertyDescriptor, a = (t, o, e, i) => {
|
|
38
|
+
for (var n = i > 1 ? void 0 : i ? C(o, e) : o, p = t.length - 1, l; p >= 0; p--)
|
|
39
39
|
(l = t[p]) && (n = (i ? l(o, e, n) : l(n)) || n);
|
|
40
|
-
return i && n &&
|
|
40
|
+
return i && n && k(o, e, n), n;
|
|
41
41
|
};
|
|
42
42
|
let s = class extends v {
|
|
43
43
|
constructor() {
|
|
@@ -71,7 +71,7 @@ let s = class extends v {
|
|
|
71
71
|
var e;
|
|
72
72
|
this._stopAutoUpdate();
|
|
73
73
|
const t = this._getAnchorElement(), o = (e = this.shadowRoot) == null ? void 0 : e.querySelector('[part="popup"]');
|
|
74
|
-
!t || !o || (this._cleanupAutoUpdate =
|
|
74
|
+
!t || !o || (this._cleanupAutoUpdate = g(t, o, () => {
|
|
75
75
|
this._reposition();
|
|
76
76
|
}));
|
|
77
77
|
}
|
|
@@ -86,14 +86,14 @@ let s = class extends v {
|
|
|
86
86
|
const t = this._getAnchorElement(), o = (u = this.shadowRoot) == null ? void 0 : u.querySelector('[part="popup"]');
|
|
87
87
|
if (!t || !o) return;
|
|
88
88
|
const e = this.arrow ? ((f = this.shadowRoot) == null ? void 0 : f.querySelector('[part="arrow"]')) ?? null : null, i = [
|
|
89
|
-
|
|
89
|
+
w({ mainAxis: this.distance, crossAxis: this.skidding })
|
|
90
90
|
];
|
|
91
|
-
this.placement === "auto" ? i.push(
|
|
92
|
-
|
|
91
|
+
this.placement === "auto" ? i.push(_()) : this.flip && i.push(
|
|
92
|
+
S({
|
|
93
93
|
fallbackPlacements: this.flipFallbackPlacements
|
|
94
94
|
})
|
|
95
|
-
), this.shift && i.push(
|
|
96
|
-
|
|
95
|
+
), this.shift && i.push(A({ padding: 8 })), e && i.push(z({ element: e, padding: this.arrowPadding })), this.autoSize && i.push(
|
|
96
|
+
P({
|
|
97
97
|
apply: ({ availableWidth: h, availableHeight: y }) => {
|
|
98
98
|
this.style.setProperty("--hx-auto-size-available-width", `${h}px`), this.style.setProperty("--hx-auto-size-available-height", `${y}px`);
|
|
99
99
|
}
|
|
@@ -101,7 +101,7 @@ let s = class extends v {
|
|
|
101
101
|
);
|
|
102
102
|
const n = this.placement === "auto" ? "bottom" : this.placement;
|
|
103
103
|
o.style.position = this.strategy;
|
|
104
|
-
const { x: p, y: l, placement: c, middlewareData: m } = await
|
|
104
|
+
const { x: p, y: l, placement: c, middlewareData: m } = await E(t, o, {
|
|
105
105
|
placement: n,
|
|
106
106
|
strategy: this.strategy,
|
|
107
107
|
middleware: i
|
|
@@ -148,7 +148,7 @@ let s = class extends v {
|
|
|
148
148
|
`;
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
|
-
s.styles = [
|
|
151
|
+
s.styles = [U];
|
|
152
152
|
a([
|
|
153
153
|
r({ attribute: "anchor" })
|
|
154
154
|
], s.prototype, "anchor", 2);
|
|
@@ -209,4 +209,4 @@ s = a([
|
|
|
209
209
|
export {
|
|
210
210
|
s as H
|
|
211
211
|
};
|
|
212
|
-
//# sourceMappingURL=hx-popup-
|
|
212
|
+
//# sourceMappingURL=hx-popup-DEYZKeH1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-popup-DEYZKeH1.js","sources":["../../src/components/hx-popup/hx-popup.styles.ts","../../src/components/hx-popup/hx-popup.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixPopupStyles = css`\n :host {\n display: inline-block;\n }\n\n [part='popup'] {\n position: fixed;\n z-index: var(--hx-popup-z-index, 9000);\n inset: 0 auto auto 0;\n box-sizing: border-box;\n transition: var(--hx-popup-transition, none);\n }\n\n :host(:not([active])) [part='popup'] {\n display: none;\n }\n\n [part='arrow'] {\n position: absolute;\n width: var(--hx-arrow-size, 8px);\n height: var(--hx-arrow-size, 8px);\n background: var(--hx-arrow-color, var(--hx-color-neutral-0, #ffffff));\n transform: rotate(45deg);\n pointer-events: none;\n }\n\n @media (prefers-reduced-motion: reduce) {\n [part='popup'] {\n transition: none;\n }\n }\n`;\n","import { LitElement, html, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport {\n computePosition,\n flip as flipMiddleware,\n shift as shiftMiddleware,\n offset as offsetMiddleware,\n arrow as arrowMiddleware,\n autoUpdate,\n size as sizeMiddleware,\n autoPlacement as autoPlacementMiddleware,\n} from '@floating-ui/dom';\nimport type { Placement, Middleware } from '@floating-ui/dom';\nimport { helixPopupStyles } from './hx-popup.styles.js';\n\ntype PopupPlacement =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'auto';\n\n// More precise type matching @floating-ui/dom's arrow middleware data structure\ntype ArrowData = { x?: number; y?: number; centerOffset: number };\n\n/**\n * A low-level positioning primitive that anchors a floating panel to a reference element.\n * This is the base that hx-tooltip, hx-dropdown, and hx-popover build upon.\n *\n * @summary Low-level popup positioning utility.\n *\n * @tag hx-popup\n *\n * @slot anchor - The reference element the popup is anchored to.\n * @slot - Default slot for popup content.\n *\n * @csspart popup - The popup container element.\n * @csspart arrow - The arrow indicator element (only present when `arrow` is true).\n *\n * @cssprop [--hx-popup-z-index=9000] - Z-index of the popup container.\n * @cssprop [--hx-popup-transition=none] - Transition applied to the popup element.\n * Consumers who need enter/exit animations can set this property AND override the\n * default `display: none` hide mechanism via `::part(popup)`. Example:\n * ```css\n * hx-popup { --hx-popup-transition: opacity 0.2s ease; }\n * hx-popup:not([active])::part(popup) { display: block; opacity: 0; pointer-events: none; }\n * hx-popup[active]::part(popup) { opacity: 1; }\n * ```\n * @cssprop [--hx-arrow-size=8px] - Size of the arrow element.\n * @cssprop [--hx-arrow-color=var(--hx-color-surface-overlay, #ffffff)] - Color of the arrow element.\n * @cssprop --hx-auto-size-available-width - Available width set by auto-size middleware (on :host).\n * @cssprop --hx-auto-size-available-height - Available height set by auto-size middleware (on :host).\n *\n * @fires {CustomEvent} hx-reposition - Emitted after the popup is repositioned.\n *\n * ## Accessibility Contract\n *\n * `hx-popup` is a **positioning utility**, not an interactive widget. It does not provide\n * ARIA semantics. Consumers are responsible for all accessibility:\n *\n * - **Popup role**: Add `role=\"tooltip\"`, `role=\"dialog\"`, `role=\"listbox\"`, etc. to the\n * slotted popup content depending on its purpose.\n * - **Trigger state**: The element that triggers the popup MUST set `aria-expanded=\"true/false\"`.\n * - **Association**: Use `aria-controls` on the trigger to reference the popup content element,\n * and `aria-labelledby` / `aria-describedby` as appropriate.\n * - **Focus management**: `hx-popup` does NOT trap focus. Consumers building dialogs or menus\n * MUST implement focus trapping and keyboard dismiss (Escape key) themselves.\n * - **Visibility**: The popup is hidden via `display: none` (CSS) and the `inert` attribute\n * when inactive. Both are reliable accessibility-tree hiding mechanisms.\n *\n * @example\n * ```html\n * <!-- Tooltip pattern -->\n * <hx-popup id=\"my-tooltip\" placement=\"bottom\" distance=\"8\">\n * <button\n * slot=\"anchor\"\n * aria-describedby=\"tooltip-content\"\n * aria-expanded=\"false\"\n * aria-controls=\"my-tooltip\"\n * >\n * Trigger\n * </button>\n * <div id=\"tooltip-content\" role=\"tooltip\">Tooltip text</div>\n * </hx-popup>\n * ```\n *\n * ## Drupal Integration\n *\n * `hx-popup` is a JS utility — Twig provides markup only. No Drupal behavior file is\n * required for basic usage, since the `anchor` slot and `active` attribute are sufficient.\n *\n * ```twig\n * {# Basic Twig usage — prefer anchor slot in server-rendered contexts #}\n * <hx-popup id=\"my-popup\" placement=\"bottom\" distance=\"8\">\n * <button\n * slot=\"anchor\"\n * aria-expanded=\"false\"\n * aria-controls=\"popup-content\"\n * >Open</button>\n * <div id=\"popup-content\" role=\"dialog\" aria-label=\"Popup content\">...</div>\n * </hx-popup>\n * ```\n *\n * ```js\n * // Drupal behavior for toggle interaction\n * Drupal.behaviors.helixPopup = {\n * attach(context) {\n * context.querySelectorAll('hx-popup').forEach((popup) => {\n * const trigger = popup.querySelector('[slot=\"anchor\"]');\n * if (!trigger) return;\n * trigger.addEventListener('click', () => {\n * popup.active = !popup.active;\n * trigger.setAttribute('aria-expanded', String(popup.active));\n * });\n * });\n * },\n * };\n * ```\n *\n * For Drupal-generated dynamic IDs, prefer the anchor **slot** over the `anchor` CSS selector\n * attribute, since slot-based anchoring does not require knowing the element's ID at render time.\n * If you must use the CSS selector form with dynamic IDs, pass the ID via a Twig variable:\n * ```twig\n * <hx-popup anchor=\"#{{ element['#id'] }}\" placement=\"bottom\">...</hx-popup>\n * ```\n */\n@customElement('hx-popup')\nexport class HelixPopup extends LitElement {\n static override styles = [helixPopupStyles];\n\n /** @internal */\n private _anchorSlotEl: Element | null = null;\n /** @internal */\n private _cleanupAutoUpdate: (() => void) | null = null;\n\n /**\n * The reference element to anchor the popup to.\n *\n * - **Attribute form** (`anchor=\"#selector\"`): Accepts a CSS selector string resolved via\n * `querySelector` from the component's root node. Use this in HTML/Twig markup.\n * - **Property form** (`el.anchor = element`): Accepts an `Element` reference directly.\n * Setting an Element via JS property does NOT reflect to the attribute.\n *\n * If not set, the element in the `anchor` slot is used.\n *\n * @attr anchor\n */\n @property({ attribute: 'anchor' })\n anchor: string | Element | null = null;\n\n /**\n * Preferred placement of the popup relative to the anchor.\n * @attr placement\n */\n @property({ type: String, reflect: true })\n placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'auto' = 'bottom';\n\n /**\n * Whether the popup is visible.\n * @attr active\n */\n @property({ type: Boolean, reflect: true })\n active = false;\n\n /**\n * Gap in pixels between the popup and the anchor element.\n * @attr distance\n */\n @property({ type: Number, reflect: true })\n distance = 0;\n\n /**\n * Offset in pixels along the anchor element's axis.\n * @attr skidding\n */\n @property({ type: Number, reflect: true })\n skidding = 0;\n\n /**\n * Whether to show an arrow pointing to the anchor element.\n * @attr arrow\n */\n @property({ type: Boolean, reflect: true })\n arrow = false;\n\n /**\n * Manual placement of the arrow along the popup edge.\n * When not set, floating-ui calculates the optimal position.\n * @attr arrow-placement\n */\n @property({ attribute: 'arrow-placement', reflect: true })\n arrowPlacement: 'start' | 'center' | 'end' | null = null;\n\n /**\n * Minimum padding in pixels from the popup edge to the arrow.\n * @attr arrow-padding\n */\n @property({ type: Number, attribute: 'arrow-padding' })\n arrowPadding = 10;\n\n /**\n * When true, flips the popup to the opposite side to avoid overflow.\n * @attr flip\n */\n @property({ type: Boolean, reflect: true })\n flip = false;\n\n /**\n * Fallback placements to try when flipping. Accepts a JSON array string.\n *\n * @example\n * ```html\n * <!-- Try \"top\" then \"left\" before giving up -->\n * <hx-popup flip flip-fallback-placements='[\"top\",\"left\"]'>...</hx-popup>\n * ```\n *\n * @attr flip-fallback-placements\n */\n @property({\n attribute: 'flip-fallback-placements',\n converter: {\n fromAttribute(value: string | null): PopupPlacement[] {\n if (!value) return [];\n try {\n return JSON.parse(value) as PopupPlacement[];\n } catch {\n return [];\n }\n },\n toAttribute(value: PopupPlacement[]): string {\n return JSON.stringify(value);\n },\n },\n })\n flipFallbackPlacements: (\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'auto'\n )[] = [];\n\n /**\n * When true, shifts the popup along the axis to remain in the viewport.\n * @attr shift\n */\n @property({ type: Boolean, reflect: true })\n shift = false;\n\n /**\n * When true, resizes the popup to fit within the viewport.\n * Sets --hx-auto-size-available-width and --hx-auto-size-available-height CSS custom\n * properties on `:host` so they cascade into shadow DOM and are readable from light DOM.\n * @attr auto-size\n */\n @property({ type: Boolean, attribute: 'auto-size', reflect: true })\n autoSize = false;\n\n /**\n * Positioning strategy passed to floating-ui's `computePosition`.\n *\n * - `'fixed'` (default): works for most cases; positions relative to the viewport.\n * - `'absolute'`: use inside `overflow: hidden` / scroll containers where the popup is\n * positioned relative to the nearest positioned ancestor instead of the viewport.\n *\n * @attr strategy\n */\n @property({ reflect: true })\n strategy: 'fixed' | 'absolute' = 'fixed';\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.active) {\n void this.updateComplete.then(() => this._startAutoUpdate());\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._stopAutoUpdate();\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n\n const activeChanged = changedProperties.has('active');\n const positioningChanged =\n changedProperties.has('placement') ||\n changedProperties.has('distance') ||\n changedProperties.has('skidding') ||\n changedProperties.has('arrow') ||\n changedProperties.has('arrowPadding') ||\n changedProperties.has('arrowPlacement') ||\n changedProperties.has('flip') ||\n changedProperties.has('flipFallbackPlacements') ||\n changedProperties.has('shift') ||\n changedProperties.has('autoSize') ||\n changedProperties.has('anchor') ||\n changedProperties.has('strategy');\n\n if (activeChanged) {\n if (this.active) {\n this._startAutoUpdate();\n } else {\n this._stopAutoUpdate();\n // Clean up autoSize custom properties when popup goes inactive\n if (this.autoSize) {\n this.style.removeProperty('--hx-auto-size-available-width');\n this.style.removeProperty('--hx-auto-size-available-height');\n }\n }\n } else if (positioningChanged && this.active) {\n void this._reposition();\n }\n\n // Remove stale autoSize properties when autoSize is disabled\n if (changedProperties.has('autoSize') && !this.autoSize) {\n this.style.removeProperty('--hx-auto-size-available-width');\n this.style.removeProperty('--hx-auto-size-available-height');\n }\n }\n\n // ─── Anchor Resolution ───\n\n /** @internal */\n private _getAnchorElement(): Element | null {\n if (this.anchor instanceof Element) {\n return this.anchor;\n }\n if (typeof this.anchor === 'string') {\n return (this.getRootNode() as Document | ShadowRoot).querySelector(this.anchor);\n }\n return this._anchorSlotEl;\n }\n\n /** @internal */\n private _handleAnchorSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n const assigned = slot.assignedElements();\n this._anchorSlotEl = assigned[0] ?? null;\n if (this.active) {\n void this._reposition();\n }\n }\n\n // ─── Positioning ───\n\n /** @internal */\n private _startAutoUpdate(): void {\n this._stopAutoUpdate();\n const anchorEl = this._getAnchorElement();\n const popupEl = this.shadowRoot?.querySelector<HTMLElement>('[part=\"popup\"]');\n if (!anchorEl || !popupEl) return;\n\n this._cleanupAutoUpdate = autoUpdate(anchorEl, popupEl, () => {\n void this._reposition();\n });\n }\n\n /** @internal */\n private _stopAutoUpdate(): void {\n this._cleanupAutoUpdate?.();\n this._cleanupAutoUpdate = null;\n }\n\n /** @internal */\n private async _reposition(): Promise<void> {\n const anchorEl = this._getAnchorElement();\n const popupEl = this.shadowRoot?.querySelector<HTMLElement>('[part=\"popup\"]');\n if (!anchorEl || !popupEl) return;\n\n const arrowEl = this.arrow\n ? (this.shadowRoot?.querySelector<HTMLElement>('[part=\"arrow\"]') ?? null)\n : null;\n\n const middleware: Middleware[] = [\n offsetMiddleware({ mainAxis: this.distance, crossAxis: this.skidding }),\n ];\n\n if (this.placement === 'auto') {\n middleware.push(autoPlacementMiddleware());\n } else if (this.flip) {\n middleware.push(\n flipMiddleware({\n fallbackPlacements: this.flipFallbackPlacements as Placement[],\n }),\n );\n }\n\n if (this.shift) {\n middleware.push(shiftMiddleware({ padding: 8 }));\n }\n\n if (arrowEl) {\n middleware.push(arrowMiddleware({ element: arrowEl, padding: this.arrowPadding }));\n }\n\n if (this.autoSize) {\n middleware.push(\n sizeMiddleware({\n apply: ({ availableWidth, availableHeight }) => {\n // Set on :host so the custom properties cascade into shadow DOM and\n // are accessible from light DOM consumers via CSS inheritance.\n this.style.setProperty('--hx-auto-size-available-width', `${availableWidth}px`);\n this.style.setProperty('--hx-auto-size-available-height', `${availableHeight}px`);\n },\n }),\n );\n }\n\n const effectivePlacement: Placement =\n this.placement === 'auto' ? 'bottom' : (this.placement as Placement);\n\n // Set position strategy before computing — inline style takes precedence over CSS\n popupEl.style.position = this.strategy;\n\n const { x, y, placement, middlewareData } = await computePosition(anchorEl, popupEl, {\n placement: effectivePlacement,\n strategy: this.strategy,\n middleware,\n });\n\n Object.assign(popupEl.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n\n if (arrowEl) {\n const arrowData = middlewareData.arrow as ArrowData | undefined;\n this._positionArrow(arrowEl, placement, arrowData);\n }\n\n this.dispatchEvent(new CustomEvent<void>('hx-reposition', { bubbles: true, composed: true }));\n }\n\n /** @internal */\n private _positionArrow(\n arrowEl: HTMLElement,\n placement: Placement,\n arrowData: ArrowData | undefined,\n ): void {\n const basePlacement = placement.split('-')[0] as 'top' | 'right' | 'bottom' | 'left';\n const staticSides = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n } as const;\n const staticSide = staticSides[basePlacement];\n\n const arrowStyle: Record<string, string> = {\n left: '',\n top: '',\n right: '',\n bottom: '',\n };\n\n if (this.arrowPlacement === 'start' || this.arrowPlacement === 'end') {\n const isVertical = basePlacement === 'top' || basePlacement === 'bottom';\n if (isVertical) {\n arrowStyle[this.arrowPlacement === 'start' ? 'left' : 'right'] = `${this.arrowPadding}px`;\n } else {\n arrowStyle[this.arrowPlacement === 'start' ? 'top' : 'bottom'] = `${this.arrowPadding}px`;\n }\n } else {\n // 'center' or null: use floating-ui computed position\n if (arrowData?.x != null) arrowStyle.left = `${arrowData.x}px`;\n if (arrowData?.y != null) arrowStyle.top = `${arrowData.y}px`;\n }\n\n arrowStyle[staticSide] = '-4px';\n arrowEl.setAttribute('data-placement', basePlacement);\n Object.assign(arrowEl.style, arrowStyle);\n }\n\n // ─── Public API ───\n\n /**\n * Forces the popup to recalculate its position.\n */\n async reposition(): Promise<void> {\n await this._reposition();\n }\n\n // ─── Render ───\n\n override render() {\n return html`\n <slot name=\"anchor\" @slotchange=${this._handleAnchorSlotChange}></slot>\n <div part=\"popup\" ?inert=${!this.active}>\n <slot></slot>\n ${this.arrow ? html`<div part=\"arrow\"></div>` : ''}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-popup': HelixPopup;\n }\n}\n"],"names":["helixPopupStyles","css","HelixPopup","LitElement","changedProperties","activeChanged","positioningChanged","e","assigned","anchorEl","popupEl","_a","autoUpdate","arrowEl","_b","middleware","offsetMiddleware","autoPlacementMiddleware","flipMiddleware","shiftMiddleware","arrowMiddleware","sizeMiddleware","availableWidth","availableHeight","effectivePlacement","x","y","placement","middlewareData","computePosition","arrowData","basePlacement","staticSide","arrowStyle","html","__decorateClass","property","value","customElement"],"mappings":";;;;AAEO,MAAMA,IAAmBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;ACsIzB,IAAMC,IAAN,cAAyBC,EAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAQ,gBAAgC,MAExC,KAAQ,qBAA0C,MAelD,KAAA,SAAkC,MAOlC,KAAA,YAaa,UAOb,KAAA,SAAS,IAOT,KAAA,WAAW,GAOX,KAAA,WAAW,GAOX,KAAA,QAAQ,IAQR,KAAA,iBAAoD,MAOpD,KAAA,eAAe,IAOf,KAAA,OAAO,IA6BP,KAAA,yBAcM,CAAA,GAON,KAAA,QAAQ,IASR,KAAA,WAAW,IAYX,KAAA,WAAiC;AAAA,EAAA;AAAA;AAAA,EAIxB,oBAA0B;A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nF3ClC,EAoFX,WAAA,gBAAA,CAAA;AAOAiC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA1F/BlC,EA2FX,WAAA,QAAA,CAAA;AA6BAiC,EAAA;AAAA,EAhBCC,EAAS;AAAA,IACR,WAAW;AAAA,IACX,WAAW;AAAA,MACT,cAAcC,GAAwC;AACpD,YAAI,CAACA,EAAO,QAAO,CAAA;AACnB,YAAI;AACF,iBAAO,KAAK,MAAMA,CAAK;AAAA,QACzB,QAAQ;AACN,iBAAO,CAAA;AAAA,QACT;AAAA,MACF;AAAA,MACA,YAAYA,GAAiC;AAC3C,eAAO,KAAK,UAAUA,CAAK;AAAA,MAC7B;AAAA,IAAA;AAAA,EACF,CACD;AAAA,GAvHUnC,EAwHX,WAAA,0BAAA,CAAA;AAqBAiC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA5I/BlC,EA6IX,WAAA,SAAA,CAAA;AASAiC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,WAAW,aAAa,SAAS,IAAM;AAAA,GArJvDlC,EAsJX,WAAA,YAAA,CAAA;AAYAiC,EAAA;AAAA,EADCC,EAAS,EAAE,SAAS,GAAA,CAAM;AAAA,GAjKhBlC,EAkKX,WAAA,YAAA,CAAA;AAlKWA,IAANiC,EAAA;AAAA,EADNG,EAAc,UAAU;AAAA,GACZpC,CAAA;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { css as m, LitElement as u, nothing as c, html as p } from "lit";
|
|
2
|
+
import "./document-token-adoption-Dym9ALA4.js";
|
|
2
3
|
import { property as o, state as g, customElement as v } from "lit/decorators.js";
|
|
3
4
|
import { classMap as _ } from "lit/directives/class-map.js";
|
|
4
5
|
import { ifDefined as b } from "lit/directives/if-defined.js";
|
|
5
|
-
|
|
6
|
-
const x = m`
|
|
6
|
+
const f = m`
|
|
7
7
|
:host {
|
|
8
8
|
display: block;
|
|
9
9
|
}
|
|
@@ -137,10 +137,10 @@ const x = m`
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
`;
|
|
140
|
-
var
|
|
141
|
-
for (var s = l > 1 ? void 0 : l ?
|
|
140
|
+
var x = Object.defineProperty, y = Object.getOwnPropertyDescriptor, a = (r, t, n, l) => {
|
|
141
|
+
for (var s = l > 1 ? void 0 : l ? y(t, n) : t, i = r.length - 1, h; i >= 0; i--)
|
|
142
142
|
(h = r[i]) && (s = (l ? h(t, n, s) : h(s)) || s);
|
|
143
|
-
return l && s &&
|
|
143
|
+
return l && s && x(t, n, s), s;
|
|
144
144
|
};
|
|
145
145
|
let e = class extends u {
|
|
146
146
|
constructor() {
|
|
@@ -210,7 +210,7 @@ let e = class extends u {
|
|
|
210
210
|
`;
|
|
211
211
|
}
|
|
212
212
|
};
|
|
213
|
-
e.styles = [f
|
|
213
|
+
e.styles = [f];
|
|
214
214
|
e._counter = 0;
|
|
215
215
|
e._VARIANT_LABELS = {
|
|
216
216
|
success: "Success",
|
|
@@ -253,4 +253,4 @@ e = a([
|
|
|
253
253
|
export {
|
|
254
254
|
e as H
|
|
255
255
|
};
|
|
256
|
-
//# sourceMappingURL=hx-progress-bar-
|
|
256
|
+
//# sourceMappingURL=hx-progress-bar-CdbFsimb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-progress-bar-CdbFsimb.js","sources":["../../src/components/hx-progress-bar/hx-progress-bar.styles.ts","../../src/components/hx-progress-bar/hx-progress-bar.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixProgressBarStyles = css`\n :host {\n display: block;\n }\n\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n\n .progress-bar {\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-1, 0.25rem);\n }\n\n .progress-bar__label {\n font-family: var(--hx-progress-bar-label-font-family, var(--hx-font-family-sans, sans-serif));\n font-size: var(--hx-progress-bar-label-font-size, var(--hx-font-size-sm, 0.875rem));\n font-weight: var(--hx-progress-bar-label-font-weight, var(--hx-font-weight-medium, 500));\n color: var(--hx-progress-bar-label-color, var(--hx-color-neutral-700));\n line-height: var(--hx-line-height-tight, 1.25);\n }\n\n .progress-bar__track {\n position: relative;\n overflow: hidden;\n border-radius: var(--hx-progress-bar-border-radius, var(--hx-border-radius-full, 9999px));\n background-color: var(--hx-progress-bar-track-bg, var(--hx-color-neutral-100));\n width: 100%;\n }\n\n /* ─── Size Variants ─── */\n\n .progress-bar--sm .progress-bar__track {\n height: var(--hx-progress-bar-height-sm, var(--hx-space-1, 0.25rem));\n }\n\n .progress-bar--md .progress-bar__track {\n height: var(--hx-progress-bar-height-md, var(--hx-space-2, 0.5rem));\n }\n\n .progress-bar--lg .progress-bar__track {\n height: var(--hx-progress-bar-height-lg, var(--hx-space-3, 0.75rem));\n }\n\n .progress-bar__fill {\n height: 100%;\n width: 100%;\n border-radius: inherit;\n background-color: var(--hx-progress-bar-indicator-bg, var(--hx-color-primary-500));\n transform-origin: left center;\n transform: scaleX(var(--_value-ratio, 0));\n transition: transform var(--hx-transition-fast, 150ms ease);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .progress-bar__fill {\n transition: none;\n }\n }\n\n /* ─── Variant Colors ─── */\n\n .progress-bar--default .progress-bar__fill {\n --hx-progress-bar-indicator-bg: var(--hx-color-primary-500);\n }\n\n .progress-bar--success .progress-bar__fill {\n --hx-progress-bar-indicator-bg: var(--hx-color-success-700);\n }\n\n .progress-bar--warning .progress-bar__fill {\n --hx-progress-bar-indicator-bg: var(--hx-color-warning-500);\n }\n\n .progress-bar--danger .progress-bar__fill {\n --hx-progress-bar-indicator-bg: var(--hx-color-error-500);\n }\n\n /* ─── Indeterminate Animation ─── */\n\n @keyframes hx-progress-indeterminate {\n 0% {\n transform: translateX(-100%) scaleX(0.4);\n }\n 50% {\n transform: translateX(50%) scaleX(0.6);\n }\n 100% {\n transform: translateX(250%) scaleX(0.4);\n }\n }\n\n .progress-bar--indeterminate .progress-bar__fill {\n transform: translateX(-100%) scaleX(0.4);\n transform-origin: left center;\n animation: hx-progress-indeterminate var(--hx-progress-bar-indeterminate-duration, 1.5s)\n ease-in-out infinite;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .progress-bar__fill {\n transition: none;\n }\n\n .progress-bar--indeterminate .progress-bar__fill {\n animation: none;\n transform: scaleX(1);\n opacity: var(--hx-opacity-disabled, 0.5); /* reduced from animation; no exact token for 0.4 */\n }\n }\n\n /* ─── High Contrast Mode ─── */\n\n @media (forced-colors: active) {\n .progress-bar__track {\n border: 1px solid ButtonText;\n background-color: Canvas;\n }\n\n .progress-bar__fill {\n background-color: Highlight;\n forced-color-adjust: none;\n }\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { helixProgressBarStyles } from './hx-progress-bar.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * A linear progress indicator for determinate and indeterminate states.\n *\n * @summary Displays task completion progress or an indeterminate loading state.\n *\n * @tag hx-progress-bar\n *\n * @slot label - Visible label text rendered above the progress bar track.\n *\n * @csspart track - The outer track container element.\n * @csspart fill - The filled portion indicating progress.\n * @csspart label - The label slot wrapper element.\n *\n * @cssprop [--hx-progress-bar-track-bg=var(--hx-color-neutral-100)] - Track background color.\n * @cssprop [--hx-progress-bar-indicator-bg=var(--hx-color-primary-500)] - Indicator fill color.\n * @cssprop [--hx-progress-bar-border-radius=var(--hx-border-radius-full)] - Track border radius.\n * @cssprop [--hx-progress-bar-height-sm=var(--hx-size-1)] - Track height for size=\"sm\".\n * @cssprop [--hx-progress-bar-height-md=var(--hx-size-2)] - Track height for size=\"md\".\n * @cssprop [--hx-progress-bar-height-lg=var(--hx-size-3)] - Track height for size=\"lg\".\n * @cssprop [--hx-progress-bar-label-font-family=var(--hx-font-family-sans)] - Label font family.\n * @cssprop [--hx-progress-bar-label-font-size=var(--hx-font-size-sm)] - Label font size.\n * @cssprop [--hx-progress-bar-label-font-weight=var(--hx-font-weight-medium)] - Label font weight.\n * @cssprop [--hx-progress-bar-label-color=var(--hx-color-neutral-700)] - Label text color.\n *\n * @fires {CustomEvent} hx-complete - Emitted when progress reaches 100%.\n */\n@customElement('hx-progress-bar')\nexport class HelixProgressBar extends LitElement {\n static override styles = [helixProgressBarStyles];\n\n /**\n * Current progress value (min–max). Set to null for indeterminate state.\n * @attr value\n */\n @property({ type: Number, reflect: true })\n value: number | null = null;\n\n /**\n * Minimum value for the progress bar.\n * @attr min\n */\n @property({ type: Number, reflect: true })\n min = 0;\n\n /**\n * Maximum value for the progress bar.\n * @attr max\n */\n @property({ type: Number, reflect: true })\n max = 100;\n\n /**\n * When true, displays an animated indeterminate loading state regardless of value.\n * @attr indeterminate\n */\n @property({ type: Boolean, reflect: true })\n indeterminate = false;\n\n /**\n * Accessible label for the progress bar (maps to aria-label when no label slot content is used).\n * @attr label\n */\n @property({ type: String, reflect: true })\n label = '';\n\n /**\n * Additional description for the progress operation, linked via aria-describedby.\n * @attr description\n */\n @property({ type: String, reflect: true })\n description = '';\n\n /**\n * Size of the progress bar track.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Visual variant controlling the indicator color.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'success' | 'warning' | 'danger' = 'default';\n\n /** @internal */\n @state() private _liveMessage = '';\n /** @internal */\n @state() private _hasLabelSlotContent = false;\n /** @internal */\n private _warnedAboutLabel = false;\n\n /** @internal */\n private static _counter = 0;\n /** @internal */\n private _uid = `hx-pb-${++HelixProgressBar._counter}`;\n\n /** @internal */\n private get _isIndeterminate(): boolean {\n return this.indeterminate || this.value === null;\n }\n\n /** @internal */\n private get _percentage(): number {\n if (this._isIndeterminate) return 0;\n if (this.value !== null && isNaN(this.value)) {\n devWarn('hx-progress-bar', 'Invalid value: NaN. Defaulting to 0.');\n return 0;\n }\n const range = this.max - this.min;\n if (range <= 0) return 0;\n const clamped = Math.max(this.min, Math.min(this.value ?? this.min, this.max));\n return ((clamped - this.min) / range) * 100;\n }\n\n /** @internal */\n private get _isComplete(): boolean {\n return !this._isIndeterminate && this.value !== null && this.value >= this.max;\n }\n\n override updated(changedProps: PropertyValues<this>): void {\n super.updated(changedProps);\n if ((changedProps.has('value') || changedProps.has('max')) && this._isComplete) {\n this._liveMessage = 'Complete';\n this.dispatchEvent(new CustomEvent<void>('hx-complete', { bubbles: true, composed: true }));\n } else if (changedProps.has('value') && !this._isComplete) {\n this._liveMessage = '';\n }\n\n if (\n changedProps.has('value') ||\n changedProps.has('min') ||\n changedProps.has('max') ||\n changedProps.has('indeterminate')\n ) {\n const ratio = this._isIndeterminate ? 0 : this._percentage / 100;\n this.style.setProperty('--_value-ratio', String(Math.max(0, Math.min(1, ratio))));\n }\n\n if (!this.label && !this._warnedAboutLabel) {\n this._warnedAboutLabel = true;\n devWarn(\n 'hx-progress-bar',\n 'No accessible label provided. Set the `label` attribute or use the label slot. An unlabeled progressbar violates WCAG 2.1 AA (4.1.2 Name, Role, Value).',\n );\n }\n }\n\n /** @internal */\n private _onLabelSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasLabelSlotContent = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n // ─── WCAG 1.4.1: Variant label map ───\n // Semantic variants (success/warning/danger) must not rely on color alone.\n // The variant label is included in aria-valuetext for AT users and rendered\n // as visually-hidden text for users in high contrast or color-blind contexts.\n\n /** @internal */\n private static readonly _VARIANT_LABELS: Partial<Record<HelixProgressBar['variant'], string>> = {\n success: 'Success',\n warning: 'Warning',\n danger: 'Danger',\n };\n\n /** @internal */\n private get _variantLabel(): string {\n return HelixProgressBar._VARIANT_LABELS[this.variant] ?? '';\n }\n\n override render() {\n const labelId = `${this._uid}-label`;\n const descId = this.description ? `${this._uid}-desc` : undefined;\n const hasVisibleLabel = this._hasLabelSlotContent;\n\n const classes = {\n 'progress-bar': true,\n [`progress-bar--${this.size}`]: true,\n [`progress-bar--${this.variant}`]: true,\n 'progress-bar--indeterminate': this._isIndeterminate,\n };\n\n const ariaValueNow = this._isIndeterminate ? undefined : (this.value ?? this.min);\n const variantLabel = this._variantLabel;\n\n // WCAG 1.4.1: Include variant label in aria-valuetext so AT users receive\n // the semantic state (success/warning/danger) without relying on fill color.\n const percentageText = this._isIndeterminate\n ? 'In progress'\n : `${Math.round(this._percentage)}%`;\n const ariaValuetext = variantLabel ? `${percentageText} — ${variantLabel}` : percentageText;\n\n return html`\n <div class=${classMap(classes)}>\n ${hasVisibleLabel || this.label\n ? html`<span id=${labelId} part=\"label\" class=\"progress-bar__label\">\n <slot name=\"label\" @slotchange=${this._onLabelSlotChange}></slot>\n </span>`\n : html`<slot name=\"label\" @slotchange=${this._onLabelSlotChange} hidden></slot>`}\n ${this.description\n ? html`<span id=${descId} class=\"sr-only\">${this.description}</span>`\n : nothing}\n <div\n part=\"track\"\n class=\"progress-bar__track\"\n role=\"progressbar\"\n aria-valuenow=${ifDefined(ariaValueNow)}\n aria-valuemin=${this.min}\n aria-valuemax=${this.max}\n aria-valuetext=${ariaValuetext}\n aria-label=${ifDefined(!hasVisibleLabel && this.label ? this.label : undefined)}\n aria-labelledby=${ifDefined(hasVisibleLabel ? labelId : undefined)}\n aria-describedby=${ifDefined(descId)}\n >\n <div part=\"fill\" class=\"progress-bar__fill\"></div>\n </div>\n ${variantLabel\n ? html`<span class=\"sr-only progress-bar__variant-label\">${variantLabel}</span>`\n : nothing}\n <div aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">${this._liveMessage}</div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-progress-bar': HelixProgressBar;\n }\n}\n"],"names":["helixProgressBarStyles","css","HelixProgressBar","LitElement","range","changedProps","ratio","e","slot","labelId","descId","hasVisibleLabel","classes","ariaValueNow","variantLabel","percentageText","ariaValuetext","html","classMap","nothing","ifDefined","__decorateClass","property","state","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAyBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;ACiC/B,IAAMC,IAAN,cAA+BC,EAAW;AAAA,EAA1C,cAAA;AAAA,UAAA,GAAA,SAAA,GAQL,KAAA,QAAuB,MAOvB,KAAA,MAAM,GAON,KAAA,MAAM,KAON,KAAA,gBAAgB,IAOhB,KAAA,QAAQ,IAOR,KAAA,cAAc,IAOd,KAA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B,EA4DM,WAAA,gBAAA,CAAA;AAEAmB,EAAA;AAAA,EAAhBE,EAAA;AAAM,GA9DIrB,EA8DM,WAAA,wBAAA,CAAA;AA9DNA,IAANmB,EAAA;AAAA,EADNG,EAAc,iBAAiB;AAAA,GACnBtB,CAAA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css as c, LitElement as g, svg as d, html as u } from "lit";
|
|
2
|
+
import "./document-token-adoption-Dym9ALA4.js";
|
|
2
3
|
import { property as n, customElement as p } from "lit/decorators.js";
|
|
3
|
-
|
|
4
|
-
const f = c`
|
|
4
|
+
const m = c`
|
|
5
5
|
:host {
|
|
6
6
|
display: inline-flex;
|
|
7
7
|
align-items: center;
|
|
@@ -144,10 +144,10 @@ const f = c`
|
|
|
144
144
|
pointer-events: none;
|
|
145
145
|
}
|
|
146
146
|
`;
|
|
147
|
-
var
|
|
148
|
-
for (var s = t > 1 ? void 0 : t ?
|
|
147
|
+
var f = Object.defineProperty, v = Object.getOwnPropertyDescriptor, i = (r, o, a, t) => {
|
|
148
|
+
for (var s = t > 1 ? void 0 : t ? v(o, a) : o, l = r.length - 1, h; l >= 0; l--)
|
|
149
149
|
(h = r[l]) && (s = (t ? h(o, a, s) : h(s)) || s);
|
|
150
|
-
return t && s &&
|
|
150
|
+
return t && s && f(o, a, s), s;
|
|
151
151
|
};
|
|
152
152
|
let e = class extends g {
|
|
153
153
|
constructor() {
|
|
@@ -226,7 +226,7 @@ let e = class extends g {
|
|
|
226
226
|
`;
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
e.styles = [m
|
|
229
|
+
e.styles = [m];
|
|
230
230
|
i([
|
|
231
231
|
n({ type: Number, reflect: !0 })
|
|
232
232
|
], e.prototype, "value", 2);
|
|
@@ -251,4 +251,4 @@ e = i([
|
|
|
251
251
|
export {
|
|
252
252
|
e as H
|
|
253
253
|
};
|
|
254
|
-
//# sourceMappingURL=hx-progress-ring-
|
|
254
|
+
//# sourceMappingURL=hx-progress-ring-3YcGRxes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-progress-ring-3YcGRxes.js","sources":["../../src/components/hx-progress-ring/hx-progress-ring.styles.ts","../../src/components/hx-progress-ring/hx-progress-ring.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixProgressRingStyles = css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n\n /* ─── Base Container ─── */\n\n .progress-ring {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n\n /* ─── SVG ─── */\n\n .progress-ring__svg {\n transform: rotate(-90deg);\n overflow: visible;\n }\n\n /* ─── Track ─── */\n\n .progress-ring__track {\n fill: none;\n stroke: var(--hx-progress-ring-track-color, var(--hx-color-neutral-200, #e2e8f0));\n }\n\n /* ─── Indicator ─── */\n\n .progress-ring__indicator {\n fill: none;\n stroke: var(--hx-progress-ring-indicator-color, var(--hx-color-primary-500, #2563eb));\n stroke-linecap: round;\n transition: stroke-dashoffset var(--hx-transition-base, 300ms ease);\n }\n\n /* ─── Variant Colors ─── */\n\n :host([variant='success']) .progress-ring__indicator {\n stroke: var(--hx-progress-ring-indicator-color, var(--hx-color-success-500, #16a34a));\n }\n\n :host([variant='warning']) .progress-ring__indicator {\n stroke: var(--hx-progress-ring-indicator-color, var(--hx-color-warning-500, #d97706));\n }\n\n :host([variant='danger']) .progress-ring__indicator {\n stroke: var(--hx-progress-ring-indicator-color, var(--hx-color-error-500, #dc2626));\n }\n\n /* ─── Indeterminate Animation ─── */\n\n :host([indeterminate]) .progress-ring__svg {\n animation: hx-progress-ring-rotate var(--hx-duration-spinner, 1400ms) linear infinite;\n }\n\n :host([indeterminate]) .progress-ring__indicator {\n animation: hx-progress-ring-dash var(--hx-duration-spinner, 1400ms) ease-in-out infinite;\n transition: none;\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n\n @keyframes hx-progress-ring-rotate {\n to {\n transform: rotate(270deg);\n }\n }\n\n /*\n * Indeterminate spinner keyframes — values are tuned for default strokeWidth=4\n * (radius ≈ 48, circumference ≈ 301). The gap value 200 is intentionally smaller\n * than the full circumference; the repeating pattern is a standard CSS spinner\n * technique that produces an arc of ~35% coverage. At non-default strokeWidths\n * the arc coverage will vary slightly but remains visually acceptable.\n */\n @keyframes hx-progress-ring-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host([indeterminate]) .progress-ring__svg {\n animation: none;\n }\n\n :host([indeterminate]) .progress-ring__indicator {\n animation: none;\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35;\n }\n\n .progress-ring__indicator {\n transition: none;\n }\n }\n\n /* ─── Size Variants ─── */\n\n :host([size='sm']) .progress-ring {\n width: var(--hx-size-8, 2rem);\n height: var(--hx-size-8, 2rem);\n }\n\n :host([size='md']) .progress-ring,\n .progress-ring {\n width: var(--hx-size-12, 3rem);\n height: var(--hx-size-12, 3rem);\n }\n\n :host([size='lg']) .progress-ring {\n width: var(--hx-size-16, 4rem);\n height: var(--hx-size-16, 4rem);\n }\n\n /* ─── Label (center slot wrapper) ─── */\n\n .progress-ring__label {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n inset: 0;\n font-size: var(--hx-font-size-xs, 0.75rem);\n font-family: var(--hx-font-family-sans, sans-serif);\n font-weight: var(--hx-font-weight-semibold, 600);\n color: var(--hx-progress-ring-label-color, var(--hx-color-neutral-900, #0f172a));\n pointer-events: none;\n }\n`;\n","import { LitElement, html, svg, TemplateResult, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { helixProgressRingStyles } from './hx-progress-ring.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * SVG-based circular progress indicator. Supports determinate and indeterminate modes,\n * multiple size variants, semantic color variants, and a center content slot.\n *\n * @summary Circular progress ring for indicating operation progress or loading state.\n *\n * @tag hx-progress-ring\n *\n * @slot - Default slot for center content (percentage text, icon, etc.).\n *\n * @csspart base - The SVG element.\n * @csspart track - The background circle track.\n * @csspart indicator - The progress arc indicator.\n * @csspart label - The center slot wrapper div.\n *\n * @cssprop [--hx-progress-ring-track-color=var(--hx-color-neutral-200)] - Track stroke color.\n * @cssprop [--hx-progress-ring-indicator-color=var(--hx-color-primary-500)] - Indicator stroke color.\n * @cssprop [--hx-progress-ring-label-color=var(--hx-color-neutral-900)] - Center label text color.\n */\n@customElement('hx-progress-ring')\nexport class HelixProgressRing extends LitElement {\n static override styles = [helixProgressRingStyles];\n\n // ─── Public Properties ───\n\n /**\n * Current progress value (0–max). When null, renders in indeterminate mode.\n * @attr value\n */\n @property({ type: Number, reflect: true })\n value: number | null = null;\n\n /**\n * Maximum value for the progress range. Defaults to 100. Used for aria-valuemax.\n * @attr max\n */\n @property({ type: Number, reflect: true })\n max = 100;\n\n /**\n * Size of the ring. Controls SVG diameter.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Stroke width of the ring circles in SVG user units.\n * @attr stroke-width\n */\n @property({ type: Number, attribute: 'stroke-width', reflect: true })\n strokeWidth = 4;\n\n /**\n * Semantic color variant.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'success' | 'warning' | 'danger' = 'default';\n\n /**\n * Accessible label for the progressbar. Exposed as aria-label.\n * Set this attribute to satisfy WCAG 4.1.2. When absent, aria-busy reflects\n * indeterminate state and a console warning is emitted.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n // ─── Private Helpers ───\n\n /** @internal */\n private get _isIndeterminate(): boolean {\n return this.value === null;\n }\n\n /** @internal */\n private get _clampedValue(): number {\n if (this.value === null) return 0;\n return Math.min(this.max, Math.max(0, this.value));\n }\n\n /**\n * SVG viewBox is 100x100. Radius leaves room for the stroke.\n */\n /** @internal */\n private get _radius(): number {\n return (100 - this.strokeWidth) / 2;\n }\n\n /** @internal */\n private get _circumference(): number {\n return 2 * Math.PI * this._radius;\n }\n\n /** @internal */\n private get _strokeDashoffset(): number {\n return this._circumference * (1 - this._clampedValue / this.max);\n }\n\n /** @internal */\n private _labelWarned = false;\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Backward compat: accept legacy `size` attribute. When present and `hx-size`\n // is not set, map the value and emit a deprecation warning.\n const legacySize = this.getAttribute('size');\n if (legacySize !== null && !this.hasAttribute('hx-size')) {\n devWarn('hx-progress-ring', 'The \"size\" attribute is deprecated. Use \"hx-size\" instead.');\n this.size = legacySize as 'sm' | 'md' | 'lg';\n }\n this.setAttribute('role', 'progressbar');\n this.setAttribute('aria-valuemin', '0');\n }\n\n protected override willUpdate(_changed: PropertyValues<this>): void {\n // Sync all dynamic ARIA attributes before render\n this.setAttribute('aria-valuemax', String(this.max));\n\n if (this._isIndeterminate) {\n this.setAttribute('indeterminate', '');\n this.setAttribute('aria-busy', 'true');\n this.removeAttribute('aria-valuenow');\n this.removeAttribute('aria-valuetext');\n } else {\n this.removeAttribute('indeterminate');\n this.removeAttribute('aria-busy');\n this.setAttribute('aria-valuenow', String(this._clampedValue));\n this.setAttribute('aria-valuetext', `${this._clampedValue}% complete`);\n }\n\n if (this.label) {\n this.setAttribute('aria-label', this.label);\n } else {\n this.removeAttribute('aria-label');\n if (!this._labelWarned) {\n this._labelWarned = true;\n devWarn(\n 'hx-progress-ring',\n 'Missing accessible label. Set the `label` attribute for WCAG 4.1.2 compliance.',\n );\n }\n }\n }\n\n // ─── Render ───\n\n override render(): TemplateResult {\n const cx = 50;\n const cy = 50;\n const r = this._radius;\n const circumference = this._circumference;\n\n return html`\n <div class=\"progress-ring\">\n <svg\n class=\"progress-ring__svg\"\n part=\"base\"\n viewBox=\"0 0 100 100\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n ${svg`\n <circle\n class=\"progress-ring__track\"\n part=\"track\"\n cx=${cx}\n cy=${cy}\n r=${r}\n stroke-width=${this.strokeWidth}\n />\n <circle\n class=\"progress-ring__indicator\"\n part=\"indicator\"\n cx=${cx}\n cy=${cy}\n r=${r}\n stroke-width=${this.strokeWidth}\n stroke-dasharray=${\n this._isIndeterminate ? '1 200' : `${circumference} ${circumference}`\n }\n stroke-dashoffset=${this._isIndeterminate ? '0' : this._strokeDashoffset}\n />\n `}\n </svg>\n <div class=\"progress-ring__label\" part=\"label\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-progress-ring': HelixProgressRing;\n }\n}\n"],"names":["helixProgressRingStyles","css","HelixProgressRing","LitElement","legacySize","_changed","r","circumference","html","svg","__decorateClass","property","customElement"],"mappings":";;;AAEO,MAAMA,IAA0BC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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M,QAAQ,SAAS,IAAM,WAAW,WAAW;AAAA,GAvBpDT,EAwBX,WAAA,QAAA,CAAA;AAOAQ,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,gBAAgB,SAAS,IAAM;AAAA,GA9BzDT,EA+BX,WAAA,eAAA,CAAA;AAOAQ,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GArC9BT,EAsCX,WAAA,WAAA,CAAA;AASAQ,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA9CfT,EA+CX,WAAA,SAAA,CAAA;AA/CWA,IAANQ,EAAA;AAAA,EADNE,EAAc,kBAAkB;AAAA,GACpBV,CAAA;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css as g, LitElement as m, nothing as h, html as p } from "lit";
|
|
2
|
-
import
|
|
2
|
+
import "./document-token-adoption-Dym9ALA4.js";
|
|
3
|
+
import { property as d, state as w, customElement as y } from "lit/decorators.js";
|
|
3
4
|
import { classMap as k } from "lit/directives/class-map.js";
|
|
4
|
-
|
|
5
|
-
const S = g`
|
|
5
|
+
const R = g`
|
|
6
6
|
:host {
|
|
7
7
|
display: block;
|
|
8
8
|
}
|
|
@@ -80,14 +80,14 @@ const S = g`
|
|
|
80
80
|
line-height: var(--hx-line-height-normal, 1.5);
|
|
81
81
|
}
|
|
82
82
|
`;
|
|
83
|
-
var
|
|
84
|
-
for (var i = t > 1 ? void 0 : t ?
|
|
83
|
+
var S = Object.defineProperty, E = Object.getOwnPropertyDescriptor, n = (e, r, s, t) => {
|
|
84
|
+
for (var i = t > 1 ? void 0 : t ? E(r, s) : r, a = e.length - 1, l; a >= 0; a--)
|
|
85
85
|
(l = e[a]) && (i = (t ? l(r, s, i) : l(i)) || i);
|
|
86
|
-
return t && i &&
|
|
86
|
+
return t && i && S(r, s, i), i;
|
|
87
87
|
};
|
|
88
|
-
let
|
|
88
|
+
let C = 0, o = class extends m {
|
|
89
89
|
constructor() {
|
|
90
|
-
super(), this.value = "", this.name = "", this.label = "", this.required = !1, this.disabled = !1, this.error = "", this.helpText = "", this.orientation = "vertical", this._hasErrorSlot = !1, this._groupId = `hx-radio-group-${
|
|
90
|
+
super(), this.value = "", this.name = "", this.label = "", this.required = !1, this.disabled = !1, this.error = "", this.helpText = "", this.orientation = "vertical", this._hasErrorSlot = !1, this._groupId = `hx-radio-group-${++C}`, this._helpTextId = `${this._groupId}-help`, this._errorId = `${this._groupId}-error`, this._cachedRadios = null, this._individualDisabledStates = /* @__PURE__ */ new WeakMap(), this._handleRadioSelect = (e) => {
|
|
91
91
|
if (!(e instanceof CustomEvent)) return;
|
|
92
92
|
e.stopPropagation();
|
|
93
93
|
const r = e.detail.value;
|
|
@@ -314,7 +314,7 @@ let $ = 0, o = class extends m {
|
|
|
314
314
|
`;
|
|
315
315
|
}
|
|
316
316
|
};
|
|
317
|
-
o.styles = [
|
|
317
|
+
o.styles = [R];
|
|
318
318
|
o.formAssociated = !0;
|
|
319
319
|
n([
|
|
320
320
|
d({ type: String })
|
|
@@ -341,12 +341,12 @@ n([
|
|
|
341
341
|
d({ type: String, reflect: !0 })
|
|
342
342
|
], o.prototype, "orientation", 2);
|
|
343
343
|
n([
|
|
344
|
-
|
|
344
|
+
w()
|
|
345
345
|
], o.prototype, "_hasErrorSlot", 2);
|
|
346
346
|
o = n([
|
|
347
347
|
y("hx-radio-group")
|
|
348
348
|
], o);
|
|
349
|
-
const
|
|
349
|
+
const $ = g`
|
|
350
350
|
:host {
|
|
351
351
|
display: block;
|
|
352
352
|
}
|
|
@@ -466,14 +466,14 @@ const I = g`
|
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
`;
|
|
469
|
-
var
|
|
470
|
-
for (var i = t > 1 ? void 0 : t ?
|
|
469
|
+
var I = Object.defineProperty, A = Object.getOwnPropertyDescriptor, f = (e, r, s, t) => {
|
|
470
|
+
for (var i = t > 1 ? void 0 : t ? A(r, s) : r, a = e.length - 1, l; a >= 0; a--)
|
|
471
471
|
(l = e[a]) && (i = (t ? l(r, s, i) : l(i)) || i);
|
|
472
|
-
return t && i &&
|
|
472
|
+
return t && i && I(r, s, i), i;
|
|
473
473
|
};
|
|
474
|
-
let
|
|
474
|
+
let z = 0, c = class extends m {
|
|
475
475
|
constructor() {
|
|
476
|
-
super(...arguments), this.value = "", this.label = "", this.disabled = !1, this.checked = !1, this._inputId = `hx-radio-${++
|
|
476
|
+
super(...arguments), this.value = "", this.label = "", this.disabled = !1, this.checked = !1, this._inputId = `hx-radio-${++z}`;
|
|
477
477
|
}
|
|
478
478
|
// ─── Lifecycle ───
|
|
479
479
|
connectedCallback() {
|
|
@@ -521,7 +521,7 @@ let D = 0, c = class extends m {
|
|
|
521
521
|
`;
|
|
522
522
|
}
|
|
523
523
|
};
|
|
524
|
-
c.styles = [
|
|
524
|
+
c.styles = [$];
|
|
525
525
|
f([
|
|
526
526
|
d({ type: String })
|
|
527
527
|
], c.prototype, "value", 2);
|
|
@@ -541,4 +541,4 @@ export {
|
|
|
541
541
|
c as H,
|
|
542
542
|
o as a
|
|
543
543
|
};
|
|
544
|
-
//# sourceMappingURL=hx-radio-
|
|
544
|
+
//# sourceMappingURL=hx-radio-BCEpX1tj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-radio-BCEpX1tj.js","sources":["../../src/components/hx-radio-group/hx-radio-group.styles.ts","../../src/components/hx-radio-group/hx-radio-group.ts","../../src/components/hx-radio-group/hx-radio.styles.ts","../../src/components/hx-radio-group/hx-radio.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixRadioGroupStyles = css`\n :host {\n display: block;\n }\n\n :host([disabled]) {\n opacity: var(--hx-opacity-disabled, 0.5);\n pointer-events: none;\n }\n\n * {\n box-sizing: border-box;\n }\n\n /* ─── Fieldset ─── */\n\n .fieldset {\n border: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-2, 0.5rem);\n font-family: var(--hx-font-family-sans, sans-serif);\n }\n\n /* ─── Legend ─── */\n\n .fieldset__legend {\n display: flex;\n align-items: baseline;\n gap: var(--hx-space-1, 0.25rem);\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-weight: var(--hx-font-weight-medium, 500);\n color: var(--hx-radio-group-label-color, var(--hx-color-neutral-700, #343a40));\n line-height: var(--hx-line-height-normal, 1.5);\n padding: 0;\n margin-bottom: var(--hx-space-1, 0.25rem);\n }\n\n .fieldset__required-marker {\n color: var(--hx-radio-group-error-color, var(--hx-color-error-text, #b91c1c));\n font-weight: var(--hx-font-weight-bold, 700);\n }\n\n /* ─── Group Container ─── */\n\n .fieldset__group {\n display: flex;\n flex-direction: column;\n gap: var(--hx-radio-group-gap, var(--hx-space-3, 0.75rem));\n }\n\n :host([orientation='horizontal']) .fieldset__group {\n flex-direction: row;\n flex-wrap: wrap;\n }\n\n /* ─── Error State ─── */\n\n .fieldset--error .fieldset__legend {\n color: var(--hx-radio-group-error-color, var(--hx-color-error-text, #b91c1c));\n }\n\n /* ─── Help Text & Error Messages ─── */\n\n .fieldset__help-text {\n font-size: var(--hx-font-size-xs, 0.75rem);\n color: var(--hx-radio-group-help-text-color, var(--hx-color-neutral-500, #6c757d));\n line-height: var(--hx-line-height-normal, 1.5);\n }\n\n .fieldset__error {\n font-size: var(--hx-font-size-xs, 0.75rem);\n color: var(--hx-radio-group-error-color, var(--hx-color-error-text, #b91c1c));\n line-height: var(--hx-line-height-normal, 1.5);\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { devWarn } from '../../utils/dev-warn.js';\nimport { helixRadioGroupStyles } from './hx-radio-group.styles.js';\nimport type { HelixRadio } from './hx-radio.js';\n\nlet _groupCounter = 0;\n\n/**\n * A form-associated radio group that manages a set of `<hx-radio>` children.\n *\n * @summary Form-associated radio group with label, validation, help text, and keyboard navigation.\n *\n * @tag hx-radio-group\n *\n * @slot - `<hx-radio>` elements.\n * @slot error - Custom error content (overrides the error property).\n * @slot help-text - Custom help text content (overrides the helpText property).\n *\n * @fires {CustomEvent<{value: string, checked: boolean}>} hx-change - Dispatched when the selected radio changes.\n * @fires {CustomEvent<{value: string}>} hx-radio-select - Internal event dispatched by `hx-radio` when selected; consumed by the group.\n *\n * @csspart fieldset - The fieldset wrapper.\n * @csspart legend - The legend/label.\n * @csspart group - The container for radio items.\n * @csspart error - The error message.\n * @csspart help-text - The help text.\n *\n * @cssprop [--hx-radio-group-gap=var(--hx-space-3, 0.75rem)] - Gap between radio items.\n * @cssprop [--hx-radio-group-label-color=var(--hx-color-neutral-700, #343a40)] - Label text color.\n * @cssprop [--hx-radio-group-error-color=var(--hx-color-error-500, #dc3545)] - Error message color.\n * @cssprop [--hx-radio-group-help-text-color=var(--hx-color-neutral-500, #6c757d)] - Help text color.\n */\n@customElement('hx-radio-group')\nexport class HelixRadioGroup extends LitElement {\n static override styles = [helixRadioGroupStyles];\n\n // ─── Form Association ───\n\n /**\n * Enables ElementInternals form association for this component.\n * @internal\n */\n static formAssociated = true;\n\n /**\n * Reference to the ElementInternals instance for form participation.\n * @internal\n */\n private _internals: ElementInternals;\n\n constructor() {\n super();\n /** @internal */\n this._internals = this.attachInternals();\n }\n\n // ─── Properties ───\n\n /**\n * The selected radio's value.\n * @attr value\n */\n @property({ type: String })\n value = '';\n\n /**\n * The name used for form submission.\n * @attr name\n */\n @property({ type: String })\n name = '';\n\n /**\n * The fieldset legend/label text.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Whether a selection is required for form submission.\n * @attr required\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * Whether the entire group is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Error message to display. When set, the group enters an error state.\n * @attr error\n */\n @property({ type: String })\n error = '';\n\n /**\n * Help text displayed below the group for guidance.\n * @attr help-text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText = '';\n\n /**\n * Layout orientation of the radio items.\n * @attr orientation\n */\n @property({ type: String, reflect: true })\n orientation: 'vertical' | 'horizontal' = 'vertical';\n\n /**\n * Queries the rendered group container element within the shadow root.\n * @internal\n */\n private get _groupEl(): HTMLElement | null {\n return this.renderRoot?.querySelector('.fieldset__group') ?? null;\n }\n\n /**\n * Tracks whether the error slot has assigned content.\n * @internal\n */\n @state() private _hasErrorSlot = false;\n\n // ─── Internal IDs ───\n\n /**\n * Unique identifier for this radio group instance used in ARIA attributes.\n * @internal\n */\n private _groupId = `hx-radio-group-${++_groupCounter}`;\n /**\n * Unique identifier for the help text element, used in aria-describedby.\n * @internal\n */\n private _helpTextId = `${this._groupId}-help`;\n /**\n * Unique identifier for the error element, used in aria-describedby.\n * @internal\n */\n private _errorId = `${this._groupId}-error`;\n\n // ─── Slot Handlers ───\n\n /**\n * Handles slotchange events on the error slot to detect assigned content.\n * @internal\n */\n private _handleErrorSlotChange(e: Event): void {\n if (!(e.target instanceof HTMLSlotElement)) return;\n this._hasErrorSlot = e.target.assignedNodes({ flatten: true }).length > 0;\n }\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('hx-radio-select', this._handleRadioSelect);\n this.addEventListener('keydown', this._handleKeydown);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('hx-radio-select', this._handleRadioSelect);\n this.removeEventListener('keydown', this._handleKeydown);\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('value')) {\n this._internals.setFormValue(this.value || null);\n this._syncRadios();\n this._updateValidity();\n }\n if (changedProperties.has('disabled')) {\n this._syncRadios();\n }\n }\n\n override firstUpdated(changedProperties: PropertyValues<this>): void {\n super.firstUpdated(changedProperties);\n this._syncRadios();\n this._updateValidity();\n // WCAG 4.1.2: warn when no accessible name is available for the radio group.\n // The fieldset needs either a label prop (rendered as <legend>) or an aria-label\n // attribute on the host element so screen readers can identify the group.\n if (!this.label && !this.getAttribute('aria-label')) {\n devWarn(\n 'hx-radio-group',\n 'No accessible label provided. Set the `label` attribute or add `aria-label` to the host element. An unlabeled radio group violates WCAG 2.1 AA (4.1.2 Name, Role, Value).',\n );\n }\n }\n\n // ─── Radio Management ───\n\n /**\n * Cached list of child hx-radio elements; invalidated on slot change.\n * @internal\n */\n private _cachedRadios: HelixRadio[] | null = null;\n /**\n * Stores each radio's individual disabled state before group-level disabling overrides it.\n * @internal\n */\n private _individualDisabledStates = new WeakMap<HelixRadio, boolean>();\n\n /**\n * Returns all child hx-radio elements, using the cache when available.\n * @internal\n */\n private _getRadios(): HelixRadio[] {\n if (!this._cachedRadios) {\n this._cachedRadios = Array.from(this.querySelectorAll('hx-radio')) as HelixRadio[];\n }\n return this._cachedRadios;\n }\n\n /**\n * Returns only the child hx-radio elements that are not disabled.\n * @internal\n */\n private _getEnabledRadios(): HelixRadio[] {\n return this._getRadios().filter((radio) => !radio.disabled && !this.disabled);\n }\n\n /**\n * Synchronizes checked state, disabled state, and roving tabindex across all child radios.\n * @internal\n */\n private _syncRadios(): void {\n const radios = this._getRadios();\n const enabledRadios = this._getEnabledRadios();\n\n radios.forEach((radio) => {\n const isChecked = radio.value === this.value && this.value !== '';\n radio.checked = isChecked;\n\n if (this.disabled) {\n // Store individual disabled state before overriding with group disabled\n if (!this._individualDisabledStates.has(radio)) {\n this._individualDisabledStates.set(radio, radio.disabled);\n }\n radio.disabled = true;\n } else {\n // Restore individual disabled state when group is re-enabled\n const originalDisabled = this._individualDisabledStates.get(radio);\n if (originalDisabled !== undefined) {\n radio.disabled = originalDisabled;\n this._individualDisabledStates.delete(radio);\n }\n }\n });\n\n // Roving tabindex management\n const checkedRadio = enabledRadios.find((r) => r.checked);\n radios.forEach((radio) => {\n radio.tabIndex = -1;\n });\n\n if (checkedRadio) {\n checkedRadio.tabIndex = 0;\n } else if (enabledRadios.length > 0) {\n const firstRadio = enabledRadios[0];\n if (firstRadio) {\n firstRadio.tabIndex = 0;\n }\n }\n }\n\n // ─── Event Handling ───\n\n /**\n * Handles the internal hx-radio-select event to update the group's selected value.\n * @internal\n */\n private _handleRadioSelect = (e: Event): void => {\n if (!(e instanceof CustomEvent)) return;\n e.stopPropagation();\n\n const newValue = (e.detail as { value: string }).value;\n if (newValue === this.value) {\n return;\n }\n\n this.value = newValue;\n // Reactive update in updated() will call setFormValue, _syncRadios, _updateValidity\n\n /**\n * Dispatched when the selected radio changes.\n * @event hx-change\n */\n this.dispatchEvent(\n new CustomEvent<{ value: string; checked: boolean }>('hx-change', {\n bubbles: true,\n composed: true,\n detail: { value: this.value, checked: true },\n }),\n );\n };\n\n /**\n * Handles keyboard navigation (arrow keys, Home, End, Space) within the radio group.\n * @internal\n */\n private _handleKeydown = (e: KeyboardEvent): void => {\n const enabledRadios = this._getEnabledRadios();\n if (enabledRadios.length === 0) {\n return;\n }\n\n const isHandledKey = [\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n ' ',\n 'Home',\n 'End',\n ].includes(e.key);\n if (!isHandledKey) {\n return;\n }\n\n e.preventDefault();\n\n // Space: select the currently focused radio without moving focus\n if (e.key === ' ') {\n const targetRadio = (e.target as Element)?.closest?.('hx-radio') as HelixRadio | null;\n if (targetRadio && !targetRadio.disabled) {\n targetRadio.dispatchEvent(\n new CustomEvent<{ value: string }>('hx-radio-select', {\n bubbles: true,\n composed: true,\n detail: { value: targetRadio.value },\n }),\n );\n }\n return;\n }\n\n const targetRadio = (e.target as Element)?.closest?.('hx-radio') as HelixRadio | null;\n const currentIndex = targetRadio\n ? enabledRadios.indexOf(targetRadio)\n : enabledRadios.findIndex((radio) => radio.checked);\n\n let nextIndex: number;\n if (e.key === 'Home') {\n nextIndex = 0;\n } else if (e.key === 'End') {\n nextIndex = enabledRadios.length - 1;\n } else if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {\n nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % enabledRadios.length;\n } else {\n nextIndex = currentIndex <= 0 ? enabledRadios.length - 1 : currentIndex - 1;\n }\n\n const nextRadio = enabledRadios[nextIndex];\n if (nextRadio) {\n nextRadio.focus();\n nextRadio.dispatchEvent(\n new CustomEvent<{ value: string }>('hx-radio-select', {\n bubbles: true,\n composed: true,\n detail: { value: nextRadio.value },\n }),\n );\n }\n };\n\n /**\n * Handles slotchange events on the default slot to refresh the radio cache.\n * @internal\n */\n private _handleSlotChange(): void {\n this._cachedRadios = null;\n this._syncRadios();\n }\n\n // ─── Form Integration ───\n\n /**\n * Returns the associated form element, if any.\n * @returns The associated `HTMLFormElement`, or `null` if not in a form.\n */\n get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n /**\n * Returns the validation message.\n * @returns The current validation message string.\n */\n get validationMessage(): string {\n return this._internals.validationMessage;\n }\n\n /**\n * Returns the ValidityState object.\n * @returns The `ValidityState` representing the current validity of the element.\n */\n get validity(): ValidityState {\n return this._internals.validity;\n }\n\n /**\n * Checks whether the group satisfies its constraints.\n * @returns `true` if the group is valid, `false` otherwise.\n */\n checkValidity(): boolean {\n return this._internals.checkValidity();\n }\n\n /**\n * Reports validity and shows the browser's constraint validation UI.\n * @returns `true` if the group is valid, `false` otherwise.\n */\n reportValidity(): boolean {\n return this._internals.reportValidity();\n }\n\n /**\n * Updates the ElementInternals validity state based on the required constraint and current value.\n * @internal\n */\n private _updateValidity(): void {\n if (this.required && !this.value) {\n this._internals.setValidity(\n { valueMissing: true },\n this.error || 'Please select an option.',\n this._groupEl ?? undefined,\n );\n } else {\n this._internals.setValidity({});\n }\n }\n\n /** @internal */\n formResetCallback(): void {\n this.value = '';\n this._internals.setFormValue(null);\n this._syncRadios();\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string | File | FormData,\n _mode: 'restore' | 'autocomplete',\n ): void {\n if (typeof state === 'string') {\n this.value = state;\n }\n }\n\n /** @internal */\n formDisabledCallback(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n // ─── Render ───\n\n override render() {\n const hasError = !!this.error;\n const legendId = `${this._groupId}-legend`;\n\n const fieldsetClasses = {\n fieldset: true,\n 'fieldset--error': hasError,\n 'fieldset--disabled': this.disabled,\n 'fieldset--required': this.required,\n };\n\n // WCAG 1.3.1: _errorId is now on the persistent wrapper div around the error slot,\n // so it remains valid whether error content comes from the slot or the property.\n const hasHelp = !!this.helpText;\n const describedByIds = [hasError ? this._errorId : null, hasHelp ? this._helpTextId : null]\n .filter(Boolean)\n .join(' ');\n const describedBy = describedByIds || nothing;\n\n return html`\n <fieldset\n part=\"fieldset\"\n class=${classMap(fieldsetClasses)}\n role=\"radiogroup\"\n aria-labelledby=${this.label ? legendId : nothing}\n aria-describedby=${describedBy}\n aria-required=${this.required ? 'true' : nothing}\n >\n ${this.label\n ? html`\n <legend part=\"legend\" class=\"fieldset__legend\" id=${legendId}>\n ${this.label}\n ${this.required\n ? html`<span class=\"fieldset__required-marker\" aria-hidden=\"true\">*</span>`\n : nothing}\n </legend>\n `\n : nothing}\n\n <div part=\"group\" class=\"fieldset__group\" role=\"none\">\n <slot @slotchange=${this._handleSlotChange}></slot>\n </div>\n\n <!-- WCAG 1.3.1: wrap slot in a persistent container so _errorId stays stable\n regardless of whether error content comes from the slot or the property. -->\n <div id=${this._errorId}>\n <slot name=\"error\" @slotchange=${this._handleErrorSlotChange}>\n ${hasError\n ? html`<div part=\"error\" class=\"fieldset__error\" role=\"alert\">${this.error}</div>`\n : nothing}\n </slot>\n </div>\n\n ${this.helpText && !hasError\n ? html`\n <div part=\"help-text\" class=\"fieldset__help-text\" id=${this._helpTextId}>\n <slot name=\"help-text\">${this.helpText}</slot>\n </div>\n `\n : nothing}\n </fieldset>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-radio-group': HelixRadioGroup;\n }\n}\n\n/** Canonical type alias for the hx-radio-group component. */\nexport type HxRadioGroup = HelixRadioGroup;\n\n/** @deprecated Use {@link HxRadioGroup} instead. The `Wc` prefix was a legacy naming convention. */\nexport type WcRadioGroup = HelixRadioGroup;\n","import { css } from 'lit';\n\nexport const helixRadioStyles = css`\n :host {\n display: block;\n }\n\n :host([disabled]) {\n opacity: var(--hx-opacity-disabled, 0.5);\n pointer-events: none;\n }\n\n * {\n box-sizing: border-box;\n }\n\n .radio {\n display: inline-flex;\n align-items: center;\n gap: var(--hx-space-2, 0.5rem);\n /* WCAG 2.5.5 (healthcare mandate): minimum 44px touch target height */\n min-height: var(--hx-touch-target-min, 2.75rem);\n cursor: pointer;\n position: relative;\n font-family: var(--hx-font-family-sans, sans-serif);\n }\n\n .radio--disabled {\n cursor: not-allowed;\n }\n\n /* ─── Hidden Native Input ─── */\n\n .radio__input {\n position: absolute;\n width: var(--hx-space-px);\n height: var(--hx-space-px);\n padding: 0;\n margin: calc(var(--hx-space-px) * -1);\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n /* ─── Visual Radio Circle ─── */\n\n .radio__control {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--hx-radio-size, var(--hx-size-5, 1.25rem));\n height: var(--hx-radio-size, var(--hx-size-5, 1.25rem));\n border: var(--hx-border-width-medium, 2px) solid\n var(--hx-radio-border-color, var(--hx-color-neutral-300, #ced4da));\n border-radius: var(--hx-border-radius-full, 9999px);\n background-color: var(--hx-color-neutral-0, #ffffff);\n transition:\n border-color var(--hx-transition-fast, 150ms ease),\n background-color var(--hx-transition-fast, 150ms ease),\n box-shadow var(--hx-transition-fast, 150ms ease);\n flex-shrink: 0;\n }\n\n /* ─── Inner Dot ─── */\n\n .radio__dot {\n width: calc(var(--hx-radio-size, var(--hx-size-5, 1.25rem)) * 0.4);\n height: calc(var(--hx-radio-size, var(--hx-size-5, 1.25rem)) * 0.4);\n border-radius: var(--hx-border-radius-full, 9999px);\n background-color: var(--hx-radio-dot-color, var(--hx-color-neutral-0, #ffffff));\n transform: scale(0);\n transition: transform var(--hx-transition-fast, 150ms ease);\n }\n\n /* ─── Checked State ─── */\n\n .radio--checked .radio__control {\n border-color: var(--hx-radio-checked-border-color, var(--hx-color-primary-500, #2563eb));\n background-color: var(--hx-radio-checked-bg, var(--hx-color-primary-500, #2563eb));\n }\n\n .radio--checked .radio__dot {\n transform: scale(1);\n }\n\n /* ─── Focus State ─── */\n\n :host(:focus-visible) .radio__control {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(\n --hx-radio-focus-ring-color,\n var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa))\n );\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n /* ─── Hover State ─── */\n\n .radio:not(.radio--disabled):not(.radio--checked):hover .radio__control {\n border-color: var(--hx-color-neutral-400, #adb5bd);\n }\n\n /* ─── Label ─── */\n\n .radio__label {\n font-size: var(--hx-font-size-md, 1rem);\n color: var(--hx-radio-label-color, var(--hx-color-neutral-700, #343a40));\n line-height: var(--hx-line-height-normal, 1.5);\n user-select: none;\n -webkit-user-select: none;\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .radio__control,\n .radio__dot {\n transition: none;\n }\n }\n`;\n","import { LitElement, html, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { helixRadioStyles } from './hx-radio.styles.js';\n\n// Module-level counter for stable, SSR-safe IDs (avoids Math.random() hydration mismatch)\nlet _hxRadioIdCounter = 0;\n\n/**\n * An individual radio button, designed to be used inside a `<hx-radio-group>`.\n *\n * @summary Presentational radio button managed by its parent radio group.\n *\n * @tag hx-radio\n *\n * @slot - Custom label content (overrides the label property).\n *\n * @csspart radio - The visual radio circle.\n * @csspart label - The label text.\n *\n * @cssprop [--hx-radio-size=var(--hx-size-5, 1.25rem)] - Radio circle size.\n * @cssprop [--hx-radio-border-color=var(--hx-color-neutral-300, #ced4da)] - Radio border color.\n * @cssprop [--hx-radio-checked-bg=var(--hx-color-primary-500, #2563EB)] - Checked background color.\n * @cssprop [--hx-radio-checked-border-color=var(--hx-color-primary-500, #2563EB)] - Checked border color.\n * @cssprop [--hx-radio-dot-color=var(--hx-color-neutral-0, #ffffff)] - Inner dot color when checked.\n * @cssprop [--hx-radio-focus-ring-color=var(--hx-focus-ring-color, #2563EB)] - Focus ring color.\n * @cssprop [--hx-radio-label-color=var(--hx-color-neutral-700, #343a40)] - Label text color.\n */\n@customElement('hx-radio')\nexport class HelixRadio extends LitElement {\n static override styles = [helixRadioStyles];\n\n // ─── Properties ───\n\n /**\n * The value this radio represents.\n * @attr value\n */\n @property({ type: String })\n value = '';\n\n /**\n * Visible label text for the radio.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Whether this radio is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Whether this radio is checked. Managed by the parent group.\n * @attr checked\n */\n @property({ type: Boolean, reflect: true })\n checked = false;\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('role', 'radio');\n this.setAttribute('aria-checked', String(this.checked));\n // WCAG 4.1.2: expose the label text as aria-label on the host so assistive\n // technology can associate the visible label with the radio role. The label\n // span lives inside Shadow DOM and aria-labelledby cannot cross shadow\n // boundaries, so aria-label on the host is the correct pattern here.\n if (this.label) {\n this.setAttribute('aria-label', this.label);\n }\n // WCAG 4.1.2: omit aria-disabled entirely when not disabled. Setting\n // aria-disabled=\"false\" is verbose and unnecessary — omission is preferred.\n if (this.disabled) {\n this.setAttribute('aria-disabled', 'true');\n } else {\n this.removeAttribute('aria-disabled');\n }\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('checked')) {\n this.setAttribute('aria-checked', String(this.checked));\n }\n if (changedProperties.has('label')) {\n if (this.label) {\n this.setAttribute('aria-label', this.label);\n } else {\n this.removeAttribute('aria-label');\n }\n }\n if (changedProperties.has('disabled')) {\n if (this.disabled) {\n this.setAttribute('aria-disabled', 'true');\n } else {\n this.removeAttribute('aria-disabled');\n }\n }\n }\n\n // ─── Internal IDs ───\n\n /** @internal */\n private _inputId = `hx-radio-${++_hxRadioIdCounter}`;\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleClick(): void {\n if (this.disabled) {\n return;\n }\n\n /**\n * Internal event dispatched to signal selection to the parent group.\n * Not part of the public API.\n * @internal\n */\n this.dispatchEvent(\n new CustomEvent<{ value: string }>('hx-radio-select', {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n }\n\n // ─── Render ───\n\n override render() {\n const classes = {\n radio: true,\n 'radio--checked': this.checked,\n 'radio--disabled': this.disabled,\n };\n\n return html`\n <div class=${classMap(classes)} @click=${this._handleClick}>\n <input\n class=\"radio__input\"\n type=\"radio\"\n id=${this._inputId}\n .checked=${this.checked}\n ?disabled=${this.disabled}\n tabindex=\"-1\"\n aria-hidden=\"true\"\n />\n <span part=\"radio\" class=\"radio__control\" aria-hidden=\"true\">\n <span class=\"radio__dot\"></span>\n </span>\n <span part=\"label\" class=\"radio__label\">\n <slot>${this.label}</slot>\n </span>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-radio': HelixRadio;\n }\n}\n\n/** Canonical type alias for the hx-radio component. */\nexport type HxRadio = HelixRadio;\n\n/** @deprecated Use {@link HxRadio} instead. The `Wc` prefix was a legacy naming convention. */\nexport type WcRadio = HelixRadio;\n"],"names":["helixRadioGroupStyles","css","_groupCounter","HelixRadioGroup","LitElement","newValue","enabledRadios","targetRadio","_b","_a","_d","_c","currentIndex","radio","nextIndex","nextRadio","changedProperties","radios","isChecked","originalDisabled","checkedRadio","r","firstRadio","state","_mode","disabled","hasError","legendId","fieldsetClasses","hasHelp","describedBy","nothing","html","classMap","__decorateClass","property","customElement","helixRadioStyles","_hxRadioIdCounter","HelixRadio","classes"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AAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GATfI,EAUX,WAAA,SAAA,CAAA;AAOAL,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAhBfI,EAiBX,WAAA,SAAA,CAAA;AAOAL,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAvB/BI,EAwBX,WAAA,YAAA,CAAA;AAOAL,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA9B/BI,EA+BX,WAAA,WAAA,CAAA;AA/BWA,IAANL,EAAA;AAAA,EADNE,EAAc,UAAU;AAAA,GACZG,CAAA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css as f, LitElement as v, html as d, nothing as p } from "lit";
|
|
2
|
+
import "./document-token-adoption-Dym9ALA4.js";
|
|
2
3
|
import { property as h, state as y, customElement as _ } from "lit/decorators.js";
|
|
3
|
-
|
|
4
|
-
const x = f`
|
|
4
|
+
const g = f`
|
|
5
5
|
:host {
|
|
6
6
|
display: inline-block;
|
|
7
7
|
}
|
|
@@ -98,10 +98,10 @@ const x = f`
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
`;
|
|
101
|
-
var
|
|
102
|
-
for (var r = o > 1 ? void 0 : o ?
|
|
101
|
+
var x = Object.defineProperty, w = Object.getOwnPropertyDescriptor, n = (e, t, s, o) => {
|
|
102
|
+
for (var r = o > 1 ? void 0 : o ? w(t, s) : t, a = e.length - 1, i; a >= 0; a--)
|
|
103
103
|
(i = e[a]) && (r = (o ? i(t, s, r) : i(r)) || r);
|
|
104
|
-
return o && r &&
|
|
104
|
+
return o && r && x(t, s, r), r;
|
|
105
105
|
};
|
|
106
106
|
let l = class extends v {
|
|
107
107
|
constructor() {
|
|
@@ -414,7 +414,7 @@ let l = class extends v {
|
|
|
414
414
|
`;
|
|
415
415
|
}
|
|
416
416
|
};
|
|
417
|
-
l.styles = [g
|
|
417
|
+
l.styles = [g];
|
|
418
418
|
l.formAssociated = !0;
|
|
419
419
|
n([
|
|
420
420
|
h({ type: Number, reflect: !0 })
|
|
@@ -455,4 +455,4 @@ l = n([
|
|
|
455
455
|
export {
|
|
456
456
|
l as H
|
|
457
457
|
};
|
|
458
|
-
//# sourceMappingURL=hx-rating-
|
|
458
|
+
//# sourceMappingURL=hx-rating-BXnSN-Ln.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-rating-BXnSN-Ln.js","sources":["../../src/components/hx-rating/hx-rating.styles.ts","../../src/components/hx-rating/hx-rating.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixRatingStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled, 0.5);\n }\n\n /* ─── Base Container ─── */\n\n .base {\n display: inline-flex;\n align-items: center;\n gap: var(--hx-rating-gap, var(--hx-space-1, 0.25rem));\n font-size: var(--hx-rating-size, var(--hx-font-size-xl, 1.25rem));\n }\n\n .base--readonly {\n cursor: default;\n }\n\n .base--disabled {\n cursor: not-allowed;\n }\n\n /* ─── Symbol (each star) ─── */\n\n .symbol {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n cursor: pointer;\n color: var(--hx-rating-empty-color, var(--hx-color-neutral-300, #d1d5db));\n line-height: 1;\n transition: transform var(--hx-transition-fast, 0.15s ease);\n }\n\n .symbol:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n border-radius: var(--hx-border-radius-sm, 0.125rem);\n }\n\n .symbol--full,\n .symbol--half {\n color: var(--hx-rating-color, var(--hx-color-warning-400, #fbbf24));\n }\n\n .symbol--disabled {\n cursor: not-allowed;\n }\n\n .base:not(.base--readonly) .symbol:hover {\n transform: scale(1.15);\n color: var(--hx-rating-hover-color, var(--hx-color-warning-300, #fcd34d));\n }\n\n /* ─── Half-Star Layout ─── */\n\n .star-half {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: 1em;\n height: 1em;\n }\n\n .star-half__filled {\n position: absolute;\n left: 0;\n top: 0;\n /* Clip to left 50% for the filled half */\n clip-path: inset(0 50% 0 0);\n }\n\n .star-half__empty {\n position: absolute;\n left: 0;\n top: 0;\n color: var(--hx-rating-empty-color, var(--hx-color-neutral-300, #d1d5db));\n /* Clip to right 50% for the empty half */\n clip-path: inset(0 0 0 50%);\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .symbol {\n transition: none;\n }\n }\n`;\n","// @vrt-approved: A11Y-RATING-001 No VRT snapshots exist for hx-rating yet; this fix\n// corrects a WCAG 2.5.3 accessibility violation and does not change visual appearance.\n// VRT infrastructure for hx-rating to be added as a follow-up.\n// @accessibility-engineer-approved: A11Y-RATING-001\n// Star <span> elements are children of role=\"radiogroup\" or role=\"slider\" containers.\n// Keyboard navigation is handled at the container level (WAI-ARIA composite widget pattern)\n// per https://www.w3.org/WAI/ARIA/apg/patterns/radio/ and\n// https://www.w3.org/WAI/ARIA/apg/patterns/slider/. Individual star spans are not\n// keyboard focus targets — the container div receives @keydown. In the precision=0.5\n// slider branch, star spans carry role=\"presentation\" aria-hidden=\"true\" and are purely\n// decorative click/hover targets with no independent keyboard accessibility obligation.\n\nimport { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { helixRatingStyles } from './hx-rating.styles.js';\n\n// ─── Event Detail Interfaces ───\n\n/** Detail payload for the hx-change event. */\nexport interface HxRatingChangeDetail {\n /** The new rating value after the change. */\n value: number;\n}\n\n/** Detail payload for the hx-hover event. */\nexport interface HxRatingHoverDetail {\n /** The rating value being previewed on hover. */\n value: number;\n}\n\n/**\n * A star rating input component for user feedback and display.\n * Supports whole and half-star ratings, keyboard navigation, hover preview,\n * and native form participation via ElementInternals.\n *\n * ### Accessibility\n *\n * - **Interactive mode (precision=1)**: Uses `role=\"radiogroup\"` with individual `role=\"radio\"` stars.\n * Each star has `aria-label` (\"1 star\", \"2 stars\", etc.) and `aria-checked`.\n * - **Interactive mode (precision=0.5)**: Uses `role=\"slider\"` with `aria-valuemin`, `aria-valuemax`,\n * `aria-valuenow`, and `aria-valuetext` (e.g. \"2.5 out of 5 stars\"). Star elements are\n * `aria-hidden=\"true\"` decorative visuals. This avoids a WCAG 2.5.3 label-content-name mismatch\n * that would occur if a `role=\"radio\"` labeled \"3 stars\" were checked for a value of 2.5.\n * - **Readonly mode**: Uses `role=\"img\"` with a descriptive `aria-label` (\"Rating: 3 out of 5\").\n * - **Keyboard**: Arrow keys (Left/Right/Up/Down) adjust value by `precision` step.\n * Home sets to 0, End sets to `max`. Focus follows the active tab stop.\n * - **Disabled**: Sets `aria-disabled=\"true\"` on the group and prevents interaction.\n *\n * @summary Star rating input for user feedback and display.\n *\n * @tag hx-rating\n *\n * @slot icon - Custom rating icon. Receives `data-state` attribute (\"full\" | \"half\" | \"empty\").\n *\n * @fires {CustomEvent<HxRatingChangeDetail>} hx-change - Dispatched when the rating value changes.\n * @fires {CustomEvent<HxRatingHoverDetail>} hx-hover - Dispatched while hovering over a star for preview.\n *\n * @csspart base - The outer container element.\n * @csspart symbol - Each individual star/icon element.\n *\n * @cssprop [--hx-rating-color=var(--hx-color-warning-400,#fbbf24)] - Filled star color.\n * @cssprop [--hx-rating-empty-color=var(--hx-color-neutral-300,#d1d5db)] - Empty star color.\n * @cssprop [--hx-rating-hover-color=var(--hx-color-warning-300,#fcd34d)] - Star color on hover.\n * @cssprop [--hx-rating-size=var(--hx-font-size-xl,1.25rem)] - Star icon size.\n * @cssprop [--hx-rating-gap=var(--hx-space-1,0.25rem)] - Gap between stars.\n *\n * @example\n * ```html\n * <!-- Interactive rating -->\n * <hx-rating value=\"3\" max=\"5\" label=\"Product rating\"></hx-rating>\n *\n * <!-- Read-only display -->\n * <hx-rating value=\"4.5\" max=\"5\" precision=\"0.5\" readonly></hx-rating>\n * ```\n */\n@customElement('hx-rating')\nexport class HelixRating extends LitElement {\n static override styles = [helixRatingStyles];\n\n // ─── Form Association ───\n\n /** @internal */\n static formAssociated = true;\n\n /** @internal */\n private _internals: ElementInternals;\n\n constructor() {\n super();\n /** @internal */\n this._internals = this.attachInternals();\n }\n\n // ─── Properties ───\n\n /**\n * The current rating value (0 to max).\n * @attr value\n */\n @property({ type: Number, reflect: true })\n value = 0;\n\n /**\n * The maximum number of stars.\n * @attr max\n */\n @property({ type: Number, reflect: true })\n max = 5;\n\n /**\n * The minimum selectable increment. Use 0.5 for half-star ratings.\n * @attr precision\n */\n @property({ type: Number, reflect: true })\n precision: 0.5 | 1 = 1;\n\n /**\n * When true, the rating is display-only and cannot be changed.\n * @attr readonly\n */\n @property({ type: Boolean, reflect: true })\n readonly = false;\n\n /**\n * When true, the rating is disabled and cannot be interacted with.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * The name submitted with the form.\n * @attr name\n */\n @property({ type: String })\n name = '';\n\n /**\n * Accessible label for the rating group.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * When true, a non-zero rating is required for form submission.\n * @attr required\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * Generates the accessible label for individual star elements.\n * Handles singular/plural automatically.\n * @param count - star count (1-based)\n */\n @property({ attribute: false })\n labelStar: (count: number) => string = (count) => (count === 1 ? '1 star' : `${count} stars`);\n\n /**\n * Generates the aria-valuetext for the composite rating widget.\n * @param value - current rating value\n * @param max - maximum rating value\n */\n @property({ attribute: false })\n labelValueText: (value: number, max: number) => string = (value, max) =>\n `${value} out of ${max} stars`;\n\n /** @internal */\n @state() private _hoverValue: number | null = null;\n\n /** @internal */\n private _defaultValue = 0;\n\n // ─── Lifecycle ───\n\n override firstUpdated(): void {\n this._defaultValue = this.value;\n }\n\n override updated(changedProps: PropertyValues<this>): void {\n if (changedProps.has('value') || changedProps.has('name')) {\n this._internals.setFormValue(String(this.value));\n }\n if (changedProps.has('value') || changedProps.has('required')) {\n this._updateValidity();\n }\n }\n\n /** @internal */\n formResetCallback(): void {\n this.value = this._defaultValue;\n this._internals.setFormValue(String(this._defaultValue));\n }\n\n /** @internal */\n formStateRestoreCallback(\n state: string | File | FormData | null,\n _mode: 'restore' | 'autocomplete',\n ): void {\n if (typeof state === 'string') {\n const parsed = parseFloat(state);\n if (!isNaN(parsed)) {\n this.value = parsed;\n this._internals.setFormValue(state);\n }\n }\n }\n\n /** @internal */\n formDisabledCallback(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n /** Returns the ValidityState object. */\n get validity(): ValidityState {\n return this._internals.validity;\n }\n\n /** Returns the current validation message. */\n get validationMessage(): string {\n return this._internals.validationMessage;\n }\n\n /** Checks whether the rating satisfies its constraints. */\n checkValidity(): boolean {\n return this._internals.checkValidity();\n }\n\n /** Reports validity and shows the browser's constraint validation UI. */\n reportValidity(): boolean {\n return this._internals.reportValidity();\n }\n\n /** @internal */\n private _updateValidity(): void {\n if (this.required && this.value === 0) {\n this._internals.setValidity(\n { valueMissing: true },\n 'Please select a rating.',\n this.shadowRoot?.querySelector<HTMLElement>('[part=\"base\"]') ?? undefined,\n );\n } else {\n this._internals.setValidity({});\n }\n }\n\n // ─── Helpers ───\n\n /** @internal */\n private get _displayValue(): number {\n return this._hoverValue ?? this.value;\n }\n\n /** @internal */\n private _clampAndSnap(v: number): number {\n const clamped = Math.min(Math.max(0, v), this.max);\n const steps = Math.round(clamped / this.precision);\n const snapped = steps * this.precision;\n return parseFloat(snapped.toFixed(this.precision === 0.5 ? 1 : 0));\n }\n\n /** @internal */\n private _ariaValueText(): string {\n return this.labelValueText(this.value, this.max);\n }\n\n /** @internal */\n private _getStarState(i: number): 'full' | 'half' | 'empty' {\n const dv = this._displayValue;\n if (dv >= i) return 'full';\n if (this.precision === 0.5 && dv >= i - 0.5) return 'half';\n return 'empty';\n }\n\n /** Star i is \"checked\" when its integer value or its half-value matches the current value. */\n /** @internal */\n private _isChecked(i: number): boolean {\n if (Math.abs(this.value - i) < 0.01) return true;\n if (this.precision === 0.5 && Math.abs(this.value - (i - 0.5)) < 0.01) return true;\n return false;\n }\n\n /** Resolve the clicked/hovered value from mouse position within a star element. */\n /** @internal */\n private _resolveValue(e: MouseEvent, i: number): number {\n if (this.precision === 0.5) {\n const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();\n const isLeftHalf = (e.clientX - rect.left) / rect.width < 0.5;\n return isLeftHalf ? i - 0.5 : i;\n }\n return i;\n }\n\n // ─── Event Handlers ───\n\n /** @internal */\n private _setValue(v: number): void {\n if (this.readonly || this.disabled) return;\n const next = this._clampAndSnap(v);\n this.value = next;\n this._internals.setFormValue(String(next));\n this.dispatchEvent(\n new CustomEvent<HxRatingChangeDetail>('hx-change', {\n bubbles: true,\n composed: true,\n detail: { value: next },\n }),\n );\n }\n\n /** @internal */\n private _handleKeydown(e: KeyboardEvent): void {\n if (this.readonly || this.disabled) return;\n let next: number | null = null;\n\n switch (e.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n e.preventDefault();\n next = this._clampAndSnap(this.value + this.precision);\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n e.preventDefault();\n next = this._clampAndSnap(this.value - this.precision);\n break;\n case 'Home':\n e.preventDefault();\n next = 0;\n break;\n case 'End':\n e.preventDefault();\n next = this.max;\n break;\n default:\n return;\n }\n\n if (next !== null) {\n this._setValue(next);\n if (this.precision !== 0.5) {\n void this.updateComplete.then(() => {\n this.shadowRoot?.querySelector<HTMLElement>('[part=\"symbol\"][tabindex=\"0\"]')?.focus();\n });\n }\n }\n }\n\n /** @internal */\n private _handleSymbolClick(e: MouseEvent, i: number): void {\n if (this.readonly || this.disabled) return;\n this._setValue(this._resolveValue(e, i));\n }\n\n /** @internal */\n private _handleSymbolMouseEnter(e: MouseEvent, i: number): void {\n if (this.readonly || this.disabled) return;\n const val = this._resolveValue(e, i);\n this._hoverValue = val;\n this.dispatchEvent(\n new CustomEvent<HxRatingHoverDetail>('hx-hover', {\n bubbles: true,\n composed: true,\n detail: { value: val },\n }),\n );\n }\n\n /** @internal */\n private _handleSymbolMouseMove(e: MouseEvent, i: number): void {\n if (this.readonly || this.disabled || this.precision !== 0.5) return;\n const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();\n const isLeftHalf = (e.clientX - rect.left) / rect.width < 0.5;\n const val = isLeftHalf ? i - 0.5 : i;\n if (val !== this._hoverValue) {\n this._hoverValue = val;\n this.dispatchEvent(\n new CustomEvent<HxRatingHoverDetail>('hx-hover', {\n bubbles: true,\n composed: true,\n detail: { value: val },\n }),\n );\n }\n }\n\n /** @internal */\n private _handleMouseLeave(): void {\n this._hoverValue = null;\n }\n\n // ─── SVG Star Icons ───\n\n /** @internal */\n private _renderFullStar() {\n return html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n width=\"1em\"\n height=\"1em\"\n >\n <path\n d=\"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z\"\n />\n </svg>\n `;\n }\n\n /** @internal */\n private _renderHalfStar() {\n return html`\n <span class=\"star-half\" aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n width=\"1em\"\n height=\"1em\"\n class=\"star-half__filled\"\n >\n <path\n d=\"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z\"\n />\n </svg>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n width=\"1em\"\n height=\"1em\"\n class=\"star-half__empty\"\n >\n <path\n d=\"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z\"\n />\n </svg>\n </span>\n `;\n }\n\n /** @internal */\n private _renderEmptyStar() {\n return html`\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n aria-hidden=\"true\"\n width=\"1em\"\n height=\"1em\"\n >\n <path\n d=\"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z\"\n />\n </svg>\n `;\n }\n\n /** @internal */\n private _renderStarIcon(state: 'full' | 'half' | 'empty') {\n if (state === 'full') return this._renderFullStar();\n if (state === 'half') return this._renderHalfStar();\n return this._renderEmptyStar();\n }\n\n // ─── Render ───\n\n override render() {\n // Interactive mode: fall back to 'Rating' so the group/slider always has a name.\n const ariaLabel = this.label || 'Rating';\n\n // WCAG 4.1.2: in readonly mode, build the aria-label from the consumer-provided\n // `label` property rather than a hardcoded 'Rating:' prefix. When a consumer\n // supplies a label (e.g. \"Product quality\"), prepending a hardcoded \"Rating:\"\n // would create redundancy. The `labelValueText` property (default: \"X out of Y\n // stars\") lets consumers customise the value portion independently.\n const valueText = this.labelValueText(this.value, this.max);\n const readonlyAriaLabel = this.label ? `${this.label}: ${valueText}` : valueText;\n\n if (this.readonly) {\n return html`\n <div part=\"base\" class=\"base base--readonly\" role=\"img\" aria-label=${readonlyAriaLabel}>\n ${Array.from({ length: this.max }, (_, idx) => {\n const i = idx + 1;\n const state = this._getStarState(i);\n return html`\n <span part=\"symbol\" class=\"symbol symbol--${state}\" data-index=\"${i}\">\n <slot name=\"icon\" data-state=\"${state}\">${this._renderStarIcon(state)}</slot>\n </span>\n `;\n })}\n </div>\n `;\n }\n\n // Use slider pattern for half-star precision to correctly represent half values\n // in the accessibility tree (WCAG 2.5.3, axe: label-content-name-mismatch)\n if (this.precision === 0.5) {\n return html`\n <div\n part=\"base\"\n class=\"base${this.disabled ? ' base--disabled' : ''}\"\n role=\"slider\"\n aria-label=\"${ariaLabel}\"\n aria-valuemin=\"0\"\n aria-valuemax=\"${this.max}\"\n aria-valuenow=\"${this.value}\"\n aria-valuetext=\"${this._ariaValueText()}\"\n aria-disabled=\"${this.disabled ? 'true' : nothing}\"\n tabindex=\"${this.disabled ? '-1' : '0'}\"\n @keydown=\"${this._handleKeydown}\"\n @mouseleave=\"${this._handleMouseLeave}\"\n >\n ${Array.from({ length: this.max }, (_, idx) => {\n const i = idx + 1;\n const state = this._getStarState(i);\n return html`\n <span\n part=\"symbol\"\n class=\"symbol symbol--${state}${this.disabled ? ' symbol--disabled' : ''}\"\n role=\"presentation\"\n aria-hidden=\"true\"\n data-index=\"${i}\"\n @click=\"${(e: MouseEvent) => this._handleSymbolClick(e, i)}\"\n @mouseenter=\"${(e: MouseEvent) => this._handleSymbolMouseEnter(e, i)}\"\n @mousemove=\"${(e: MouseEvent) => this._handleSymbolMouseMove(e, i)}\"\n >\n <slot name=\"icon\" data-state=\"${state}\">${this._renderStarIcon(state)}</slot>\n </span>\n `;\n })}\n </div>\n `;\n }\n\n return html`\n <div\n part=\"base\"\n class=\"base${this.disabled ? ' base--disabled' : ''}\"\n role=\"radiogroup\"\n aria-label=\"${ariaLabel}\"\n aria-disabled=\"${this.disabled ? 'true' : nothing}\"\n tabindex=\"-1\"\n @keydown=\"${this._handleKeydown}\"\n @mouseleave=\"${this._handleMouseLeave}\"\n >\n ${Array.from({ length: this.max }, (_, idx) => {\n const i = idx + 1;\n const state = this._getStarState(i);\n const checked = this._isChecked(i);\n const starLabel = this.labelStar(i);\n const isActiveTabStop = this.value > 0 ? Math.ceil(this.value) === i : i === 1;\n\n return html`\n <span\n part=\"symbol\"\n class=\"symbol symbol--${state}${this.disabled ? ' symbol--disabled' : ''}\"\n role=\"radio\"\n aria-label=\"${starLabel}\"\n aria-checked=\"${checked ? 'true' : 'false'}\"\n tabindex=\"${!this.disabled && isActiveTabStop ? '0' : '-1'}\"\n data-index=\"${i}\"\n @click=\"${(e: MouseEvent) => this._handleSymbolClick(e, i)}\"\n @mouseenter=\"${(e: MouseEvent) => this._handleSymbolMouseEnter(e, i)}\"\n @mousemove=\"${(e: MouseEvent) => this._handleSymbolMouseMove(e, i)}\"\n >\n <slot name=\"icon\" data-state=\"${state}\">${this._renderStarIcon(state)}</slot>\n </span>\n `;\n })}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-rating': HelixRating;\n }\n}\n"],"names":["helixRatingStyles","css","HelixRating","LitElement","count","value","max","changedProps","state","_mode","parsed","disabled","_a","v","clamped","snapped","i","dv","rect","next","_b","val","html","ariaLabel","valueText","readonlyAriaLabel","_","idx","nothing","e","checked","starLabel","isActiveTabStop","__decorateClass","property","customElement"],"mappings":";;;AAEO,MAAMA,IAAoBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AC2E1B,IAAMC,IAAN,cAA0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