@helixui/library 1.1.2 → 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 +2962 -1965
- package/dist/base/helix-element.d.ts +134 -0
- package/dist/base/helix-element.d.ts.map +1 -0
- package/dist/base/id-counter.d.ts +32 -0
- package/dist/base/id-counter.d.ts.map +1 -0
- package/dist/base/index.d.ts +4 -0
- package/dist/base/index.d.ts.map +1 -0
- package/dist/base/styles.d.ts +19 -0
- package/dist/base/styles.d.ts.map +1 -0
- package/dist/components/hx-accordion/hx-accordion-item.d.ts +3 -0
- package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
- package/dist/components/hx-accordion/hx-accordion.d.ts +4 -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 +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 +10 -5
- package/dist/components/hx-alert/hx-alert.d.ts.map +1 -1
- package/dist/components/hx-alert/hx-alert.styles.d.ts.map +1 -1
- package/dist/components/hx-alert/index.js +1 -1
- package/dist/components/hx-avatar/hx-avatar.d.ts.map +1 -1
- package/dist/components/hx-avatar/hx-avatar.styles.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/hx-badge.styles.d.ts.map +1 -1
- package/dist/components/hx-badge/index.js +1 -1
- package/dist/components/hx-banner/hx-banner.d.ts +15 -5
- package/dist/components/hx-banner/hx-banner.d.ts.map +1 -1
- package/dist/components/hx-banner/hx-banner.styles.d.ts.map +1 -1
- package/dist/components/hx-banner/index.js +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb-item.d.ts +1 -0
- package/dist/components/hx-breadcrumb/hx-breadcrumb-item.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts +42 -11
- 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 +22 -13
- package/dist/components/hx-button/hx-button.d.ts.map +1 -1
- package/dist/components/hx-button/hx-button.styles.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 +3 -6
- 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 +7 -7
- 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 +2 -2
- 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 +18 -18
- package/dist/components/hx-checkbox/hx-checkbox.d.ts.map +1 -1
- package/dist/components/hx-checkbox/hx-checkbox.styles.d.ts.map +1 -1
- package/dist/components/hx-checkbox/index.js +1 -1
- package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts +8 -3
- 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 +134 -0
- package/dist/components/hx-clinical-status/hx-clinical-status.d.ts.map +1 -0
- package/dist/components/hx-clinical-status/hx-clinical-status.styles.d.ts +2 -0
- package/dist/components/hx-clinical-status/hx-clinical-status.styles.d.ts.map +1 -0
- package/dist/components/hx-clinical-status/index.d.ts +3 -0
- package/dist/components/hx-clinical-status/index.d.ts.map +1 -0
- package/dist/components/hx-clinical-status/index.js +5 -0
- package/dist/components/hx-clinical-status/index.js.map +1 -0
- package/dist/components/hx-code-snippet/hx-code-snippet.d.ts.map +1 -1
- package/dist/components/hx-code-snippet/hx-code-snippet.styles.d.ts.map +1 -1
- package/dist/components/hx-code-snippet/index.js +1 -1
- package/dist/components/hx-color-picker/color-utils.d.ts +27 -0
- package/dist/components/hx-color-picker/color-utils.d.ts.map +1 -0
- package/dist/components/hx-color-picker/hx-color-picker.d.ts +16 -4
- 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 +9 -4
- package/dist/components/hx-combobox/hx-combobox.d.ts.map +1 -1
- package/dist/components/hx-combobox/hx-combobox.styles.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 +6 -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 +20 -3
- package/dist/components/hx-counter/hx-counter.d.ts.map +1 -1
- package/dist/components/hx-counter/hx-counter.styles.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 +8 -0
- package/dist/components/hx-data-table/hx-data-table.d.ts.map +1 -1
- package/dist/components/hx-data-table/hx-data-table.styles.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 +40 -3
- package/dist/components/hx-date-picker/hx-date-picker.d.ts.map +1 -1
- package/dist/components/hx-date-picker/hx-date-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-date-picker/index.js +1 -1
- package/dist/components/hx-dialog/hx-dialog.d.ts +4 -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 +5 -8
- package/dist/components/hx-drawer/hx-drawer.d.ts.map +1 -1
- package/dist/components/hx-drawer/hx-drawer.styles.d.ts.map +1 -1
- package/dist/components/hx-drawer/index.js +1 -1
- package/dist/components/hx-dropdown/hx-dropdown.d.ts +14 -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 +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/hx-field-label.styles.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 +8 -9
- 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-form/hx-form.d.ts.map +1 -1
- package/dist/components/hx-form/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 +5 -9
- 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 +4 -3
- 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 +1 -1
- package/dist/components/hx-link/hx-link.d.ts.map +1 -1
- package/dist/components/hx-link/hx-link.styles.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 +5 -0
- package/dist/components/hx-menu/hx-menu-item.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu.d.ts +1 -0
- package/dist/components/hx-menu/hx-menu.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu.styles.d.ts.map +1 -1
- package/dist/components/hx-menu/index.js +1 -1
- package/dist/components/hx-meter/hx-meter.d.ts +2 -2
- 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 +10 -0
- 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 +4 -3
- 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 +3 -3
- package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts.map +1 -1
- package/dist/components/hx-overflow-menu/hx-overflow-menu.styles.d.ts.map +1 -1
- package/dist/components/hx-overflow-menu/index.js +1 -1
- package/dist/components/hx-pagination/hx-pagination.d.ts +8 -0
- package/dist/components/hx-pagination/hx-pagination.d.ts.map +1 -1
- package/dist/components/hx-pagination/hx-pagination.styles.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 +113 -0
- package/dist/components/hx-patient-banner/hx-patient-banner.d.ts.map +1 -0
- package/dist/components/hx-patient-banner/hx-patient-banner.styles.d.ts +2 -0
- package/dist/components/hx-patient-banner/hx-patient-banner.styles.d.ts.map +1 -0
- package/dist/components/hx-patient-banner/index.d.ts +3 -0
- package/dist/components/hx-patient-banner/index.d.ts.map +1 -0
- package/dist/components/hx-patient-banner/index.js +5 -0
- package/dist/components/hx-patient-banner/index.js.map +1 -0
- package/dist/components/hx-phi-field/hx-phi-field.d.ts +97 -0
- package/dist/components/hx-phi-field/hx-phi-field.d.ts.map +1 -0
- package/dist/components/hx-phi-field/hx-phi-field.styles.d.ts +2 -0
- package/dist/components/hx-phi-field/hx-phi-field.styles.d.ts.map +1 -0
- package/dist/components/hx-phi-field/index.d.ts +3 -0
- package/dist/components/hx-phi-field/index.d.ts.map +1 -0
- package/dist/components/hx-phi-field/index.js +5 -0
- package/dist/components/hx-phi-field/index.js.map +1 -0
- package/dist/components/hx-popover/hx-popover.d.ts +25 -9
- 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 +5 -8
- 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 +2 -0
- package/dist/components/hx-progress-bar/hx-progress-bar.d.ts.map +1 -1
- package/dist/components/hx-progress-bar/hx-progress-bar.styles.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-prose/hx-prose.d.ts +1 -0
- package/dist/components/hx-prose/hx-prose.d.ts.map +1 -1
- package/dist/components/hx-radio-group/hx-radio-group.d.ts +3 -7
- 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/hx-radio.styles.d.ts.map +1 -1
- package/dist/components/hx-radio-group/index.js +1 -1
- package/dist/components/hx-rating/hx-rating.d.ts +3 -3
- package/dist/components/hx-rating/hx-rating.d.ts.map +1 -1
- package/dist/components/hx-rating/hx-rating.styles.d.ts.map +1 -1
- package/dist/components/hx-rating/index.js +1 -1
- package/dist/components/hx-select/hx-select.d.ts +17 -11
- package/dist/components/hx-select/hx-select.d.ts.map +1 -1
- package/dist/components/hx-select/hx-select.styles.d.ts.map +1 -1
- package/dist/components/hx-select/index.js +1 -1
- package/dist/components/hx-side-nav/hx-nav-item.d.ts +12 -0
- package/dist/components/hx-side-nav/hx-nav-item.d.ts.map +1 -1
- package/dist/components/hx-side-nav/hx-nav-item.styles.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/hx-side-nav.styles.d.ts.map +1 -1
- package/dist/components/hx-side-nav/index.js +1 -1
- package/dist/components/hx-skeleton/hx-skeleton.d.ts +2 -2
- 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 +5 -8
- package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
- package/dist/components/hx-slider/hx-slider.styles.d.ts.map +1 -1
- package/dist/components/hx-slider/index.js +1 -1
- package/dist/components/hx-spinner/hx-spinner.d.ts +14 -1
- package/dist/components/hx-spinner/hx-spinner.d.ts.map +1 -1
- package/dist/components/hx-spinner/hx-spinner.styles.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 +10 -4
- package/dist/components/hx-split-button/hx-split-button.d.ts.map +1 -1
- package/dist/components/hx-split-button/hx-split-button.styles.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/hx-split-panel.styles.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 +7 -2
- 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 +19 -3
- package/dist/components/hx-status-indicator/hx-status-indicator.d.ts.map +1 -1
- package/dist/components/hx-status-indicator/hx-status-indicator.styles.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-step.styles.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 +10 -3
- 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 +71 -0
- package/dist/components/hx-style-scope/hx-style-scope.d.ts.map +1 -0
- package/dist/components/hx-style-scope/hx-style-scope.styles.d.ts +10 -0
- package/dist/components/hx-style-scope/hx-style-scope.styles.d.ts.map +1 -0
- package/dist/components/hx-style-scope/index.d.ts +2 -0
- package/dist/components/hx-style-scope/index.d.ts.map +1 -0
- package/dist/components/hx-style-scope/index.js +5 -0
- package/dist/components/hx-style-scope/index.js.map +1 -0
- package/dist/components/hx-switch/hx-switch.d.ts +4 -4
- package/dist/components/hx-switch/hx-switch.d.ts.map +1 -1
- package/dist/components/hx-switch/hx-switch.styles.d.ts.map +1 -1
- package/dist/components/hx-switch/index.js +1 -1
- package/dist/components/hx-table/hx-table.d.ts +1 -0
- 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-panel.styles.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tab.d.ts +1 -0
- package/dist/components/hx-tabs/hx-tab.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tab.styles.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tabs.d.ts +12 -2
- package/dist/components/hx-tabs/hx-tabs.d.ts.map +1 -1
- package/dist/components/hx-tabs/index.js +1 -1
- package/dist/components/hx-tag/hx-tag.d.ts.map +1 -1
- package/dist/components/hx-tag/hx-tag.styles.d.ts.map +1 -1
- package/dist/components/hx-tag/index.js +1 -1
- package/dist/components/hx-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 +16 -15
- package/dist/components/hx-text-input/hx-text-input.d.ts.map +1 -1
- package/dist/components/hx-text-input/hx-text-input.styles.d.ts.map +1 -1
- package/dist/components/hx-text-input/index.js +1 -1
- package/dist/components/hx-textarea/hx-textarea.d.ts +4 -4
- package/dist/components/hx-textarea/hx-textarea.d.ts.map +1 -1
- package/dist/components/hx-textarea/hx-textarea.styles.d.ts.map +1 -1
- package/dist/components/hx-textarea/index.js +1 -1
- package/dist/components/hx-theme/hx-theme.d.ts +82 -3
- 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 +6 -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 +1 -1
- package/dist/components/hx-toast/hx-toast-stack.d.ts.map +1 -1
- package/dist/components/hx-toast/hx-toast.d.ts +9 -5
- package/dist/components/hx-toast/hx-toast.d.ts.map +1 -1
- package/dist/components/hx-toast/hx-toast.styles.d.ts.map +1 -1
- package/dist/components/hx-toast/index.js +1 -1
- package/dist/components/hx-toast/toast-factory.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/hx-toggle-button.d.ts +4 -3
- package/dist/components/hx-toggle-button/hx-toggle-button.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/hx-toggle-button.styles.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/index.js +1 -1
- package/dist/components/hx-tooltip/hx-tooltip.d.ts +1 -2
- 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 +12 -0
- 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 +27 -2
- package/dist/components/hx-tree-view/hx-tree-view.d.ts.map +1 -1
- package/dist/components/hx-tree-view/hx-tree-view.styles.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/controllers/helix-audit-controller.d.ts +71 -0
- package/dist/controllers/helix-audit-controller.d.ts.map +1 -0
- package/dist/css/helix-all.css +9743 -0
- package/dist/css/helix-core.css +1839 -0
- package/dist/css/helix-data.css +639 -0
- package/dist/css/helix-feedback.css +1268 -0
- package/dist/css/helix-forms.css +2525 -0
- package/dist/css/helix-layout.css +380 -0
- package/dist/css/helix-media.css +213 -0
- package/dist/css/helix-navigation.css +1131 -0
- package/dist/css/helix-overlay.css +643 -0
- package/dist/css/helix-tokens.css +432 -0
- package/dist/css/helix-utility.css +633 -0
- package/dist/css/hx-accordion.css +10 -0
- package/dist/css/hx-action-bar.css +117 -0
- package/dist/css/hx-alert.css +213 -0
- package/dist/css/hx-avatar.css +134 -0
- package/dist/css/hx-badge.css +178 -0
- package/dist/css/hx-banner.css +203 -0
- package/dist/css/hx-breadcrumb.css +36 -0
- package/dist/css/hx-button-group.css +91 -0
- package/dist/css/hx-button.css +296 -0
- package/dist/css/hx-card.css +161 -0
- package/dist/css/hx-carousel.css +211 -0
- package/dist/css/hx-checkbox-group.css +77 -0
- package/dist/css/hx-checkbox.css +219 -0
- package/dist/css/hx-clinical-status.css +248 -0
- package/dist/css/hx-code-snippet.css +179 -0
- package/dist/css/hx-color-picker.css +2 -0
- package/dist/css/hx-combobox.css +2 -0
- package/dist/css/hx-container.css +82 -0
- package/dist/css/hx-copy-button.css +121 -0
- package/dist/css/hx-counter.css +51 -0
- package/dist/css/hx-data-table.css +207 -0
- package/dist/css/hx-date-picker.css +2 -0
- package/dist/css/hx-dialog.css +190 -0
- package/dist/css/hx-divider.css +87 -0
- package/dist/css/hx-drawer.css +262 -0
- package/dist/css/hx-dropdown.css +46 -0
- package/dist/css/hx-field-label.css +38 -0
- package/dist/css/hx-field.css +119 -0
- package/dist/css/hx-file-upload.css +241 -0
- package/dist/css/hx-form.css +2 -0
- package/dist/css/hx-format-date.css +10 -0
- package/dist/css/hx-grid.css +14 -0
- package/dist/css/hx-help-text.css +50 -0
- package/dist/css/hx-icon-button.css +152 -0
- package/dist/css/hx-icon.css +73 -0
- package/dist/css/hx-image.css +41 -0
- package/dist/css/hx-link.css +105 -0
- package/dist/css/hx-list.css +48 -0
- package/dist/css/hx-menu.css +23 -0
- package/dist/css/hx-meter.css +113 -0
- package/dist/css/hx-nav.css +242 -0
- package/dist/css/hx-number-input.css +246 -0
- package/dist/css/hx-overflow-menu.css +133 -0
- package/dist/css/hx-pagination.css +193 -0
- package/dist/css/hx-patient-banner.css +139 -0
- package/dist/css/hx-phi-field.css +97 -0
- package/dist/css/hx-popover.css +61 -0
- package/dist/css/hx-popup.css +31 -0
- package/dist/css/hx-progress-bar.css +133 -0
- package/dist/css/hx-progress-ring.css +142 -0
- package/dist/css/hx-prose.css +2 -0
- package/dist/css/hx-radio-group.css +77 -0
- package/dist/css/hx-rating.css +96 -0
- package/dist/css/hx-select.css +295 -0
- package/dist/css/hx-side-nav.css +149 -0
- package/dist/css/hx-skeleton.css +82 -0
- package/dist/css/hx-slider.css +287 -0
- package/dist/css/hx-spinner.css +116 -0
- package/dist/css/hx-split-button.css +309 -0
- package/dist/css/hx-split-panel.css +168 -0
- package/dist/css/hx-stack.css +104 -0
- package/dist/css/hx-stat.css +106 -0
- package/dist/css/hx-status-indicator.css +126 -0
- package/dist/css/hx-steps.css +52 -0
- package/dist/css/hx-structured-list.css +75 -0
- package/dist/css/hx-style-scope.css +4 -0
- package/dist/css/hx-switch.css +169 -0
- package/dist/css/hx-table.css +128 -0
- package/dist/css/hx-tabs.css +76 -0
- package/dist/css/hx-tag.css +146 -0
- package/dist/css/hx-text-input.css +214 -0
- package/dist/css/hx-text.css +149 -0
- package/dist/css/hx-textarea.css +180 -0
- package/dist/css/hx-theme.css +23 -0
- package/dist/css/hx-time-picker.css +2 -0
- package/dist/css/hx-toast.css +230 -0
- package/dist/css/hx-toggle-button.css +207 -0
- package/dist/css/hx-tooltip.css +51 -0
- package/dist/css/hx-top-nav.css +203 -0
- package/dist/css/hx-tree-view.css +22 -0
- package/dist/css/hx-visually-hidden.css +26 -0
- package/dist/css/index.css +84 -0
- package/dist/css/manifest.json +2704 -0
- package/dist/index.d.ts +15 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +268 -176
- package/dist/index.js.map +1 -1
- package/dist/mixins/FocusMixin.d.ts +49 -0
- package/dist/mixins/FocusMixin.d.ts.map +1 -0
- package/dist/mixins/FormMixin.d.ts +69 -0
- package/dist/mixins/FormMixin.d.ts.map +1 -0
- package/dist/mixins/aria-delegation.d.ts +97 -0
- package/dist/mixins/aria-delegation.d.ts.map +1 -0
- package/dist/mixins/index.d.ts +5 -0
- package/dist/mixins/index.d.ts.map +1 -0
- package/dist/shared/FormMixin-Bjvw20G5.js +88 -0
- package/dist/shared/FormMixin-Bjvw20G5.js.map +1 -0
- package/dist/shared/aria-delegation-CBP9eQ0M.js +107 -0
- package/dist/shared/aria-delegation-CBP9eQ0M.js.map +1 -0
- 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-D1kFhdeQ.js → hx-accordion-Cvs-uzZq.js} +86 -58
- package/dist/shared/hx-accordion-Cvs-uzZq.js.map +1 -0
- package/dist/shared/{hx-action-bar-D4bulGQP.js → hx-action-bar-B2BNlKQv.js} +34 -35
- package/dist/shared/hx-action-bar-B2BNlKQv.js.map +1 -0
- package/dist/shared/{hx-alert-CSxCF2rr.js → hx-alert-CnDlZO6m.js} +38 -34
- package/dist/shared/hx-alert-CnDlZO6m.js.map +1 -0
- package/dist/shared/{hx-avatar-Cun-O99h.js → hx-avatar-C68g1G2e.js} +32 -15
- package/dist/shared/hx-avatar-C68g1G2e.js.map +1 -0
- package/dist/shared/{hx-badge-CsFd2xtw.js → hx-badge-D5vy_5BO.js} +49 -40
- package/dist/shared/hx-badge-D5vy_5BO.js.map +1 -0
- package/dist/shared/{hx-banner-BTV-X2xF.js → hx-banner-Ccif-GaB.js} +95 -60
- package/dist/shared/hx-banner-Ccif-GaB.js.map +1 -0
- package/dist/shared/{hx-breadcrumb-item-4IwaLgaO.js → hx-breadcrumb-item-DhxDZI3r.js} +92 -89
- package/dist/shared/hx-breadcrumb-item-DhxDZI3r.js.map +1 -0
- package/dist/shared/{hx-button-7k-KeCYU.js → hx-button-BF3VwcOJ.js} +128 -63
- package/dist/shared/hx-button-BF3VwcOJ.js.map +1 -0
- package/dist/shared/{hx-button-group-CWjWv-wS.js → hx-button-group-B8u25JjV.js} +9 -9
- package/dist/shared/hx-button-group-B8u25JjV.js.map +1 -0
- package/dist/shared/{hx-card-0hT3G5hi.js → hx-card-Dps4jvG9.js} +34 -34
- package/dist/shared/hx-card-Dps4jvG9.js.map +1 -0
- package/dist/shared/{hx-carousel-item-DgeYyYZJ.js → hx-carousel-item-Dmo9pGFm.js} +25 -25
- package/dist/shared/hx-carousel-item-Dmo9pGFm.js.map +1 -0
- package/dist/shared/{hx-checkbox-BvjO-O41.js → hx-checkbox-99zyEKj7.js} +67 -70
- package/dist/shared/hx-checkbox-99zyEKj7.js.map +1 -0
- package/dist/shared/{hx-checkbox-group-Z5VvWzcj.js → hx-checkbox-group-J2CGHDwY.js} +48 -42
- package/dist/shared/hx-checkbox-group-J2CGHDwY.js.map +1 -0
- package/dist/shared/hx-clinical-status-CGx5q5PL.js +469 -0
- package/dist/shared/hx-clinical-status-CGx5q5PL.js.map +1 -0
- package/dist/shared/{hx-code-snippet-DqzPkH4K.js → hx-code-snippet-vAzJjm2O.js} +57 -48
- package/dist/shared/hx-code-snippet-vAzJjm2O.js.map +1 -0
- package/dist/shared/{hx-color-picker-Da8z6AlQ.js → hx-color-picker-CzMu9Fzw.js} +153 -137
- package/dist/shared/hx-color-picker-CzMu9Fzw.js.map +1 -0
- package/dist/shared/{hx-combobox-CivfelTS.js → hx-combobox-Dhw33U40.js} +17 -17
- package/dist/shared/hx-combobox-Dhw33U40.js.map +1 -0
- package/dist/shared/{hx-container-DLUKnTi9.js → hx-container-Dz4v6FSd.js} +15 -15
- package/dist/shared/hx-container-Dz4v6FSd.js.map +1 -0
- package/dist/shared/{hx-copy-button--0dymSvw.js → hx-copy-button-Dcul7VwZ.js} +52 -45
- package/dist/shared/hx-copy-button-Dcul7VwZ.js.map +1 -0
- package/dist/shared/hx-counter-czWWvciz.js +185 -0
- package/dist/shared/hx-counter-czWWvciz.js.map +1 -0
- package/dist/shared/{hx-data-table-BWvd5NNx.js → hx-data-table-CAVgT4JG.js} +89 -53
- package/dist/shared/hx-data-table-CAVgT4JG.js.map +1 -0
- package/dist/shared/{hx-date-picker-6voxxxNE.js → hx-date-picker-Be8lTTO7.js} +105 -92
- package/dist/shared/hx-date-picker-Be8lTTO7.js.map +1 -0
- package/dist/shared/{hx-dialog-DkUSnVgw.js → hx-dialog-DTGX2FbP.js} +98 -89
- package/dist/shared/hx-dialog-DTGX2FbP.js.map +1 -0
- package/dist/shared/{hx-divider-DNNs4e8q.js → hx-divider-BJjarZ9z.js} +15 -15
- package/dist/shared/hx-divider-BJjarZ9z.js.map +1 -0
- package/dist/shared/{hx-drawer-CJcRZcns.js → hx-drawer-C5qI7jf1.js} +87 -47
- package/dist/shared/hx-drawer-C5qI7jf1.js.map +1 -0
- package/dist/shared/{hx-dropdown-Bo0KTM1A.js → hx-dropdown-BxNnUDyD.js} +56 -41
- package/dist/shared/hx-dropdown-BxNnUDyD.js.map +1 -0
- package/dist/shared/{hx-field-3MmzJ4kZ.js → hx-field-J1IUbQ8n.js} +21 -21
- package/dist/shared/hx-field-J1IUbQ8n.js.map +1 -0
- package/dist/shared/{hx-field-label-Bg-EWvqF.js → hx-field-label-DhVdkhCN.js} +11 -14
- package/dist/shared/hx-field-label-DhVdkhCN.js.map +1 -0
- package/dist/shared/{hx-file-upload-ByjAgfNy.js → hx-file-upload-79nMhnM_.js} +79 -88
- package/dist/shared/hx-file-upload-79nMhnM_.js.map +1 -0
- package/dist/shared/{hx-form-BpS6v3Iu.js → hx-form-fJE-FJQV.js} +36 -32
- package/dist/shared/{hx-form-BpS6v3Iu.js.map → hx-form-fJE-FJQV.js.map} +1 -1
- package/dist/shared/{hx-format-date-BdnWV2kX.js → hx-format-date-BMukpO2t.js} +19 -17
- package/dist/shared/hx-format-date-BMukpO2t.js.map +1 -0
- package/dist/shared/{hx-grid-gEjuF0cR.js → hx-grid-CO6JZ6Kn.js} +12 -12
- 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-CP6OnLoM.js → hx-icon-C1hDsw-b.js} +15 -15
- package/dist/shared/hx-icon-C1hDsw-b.js.map +1 -0
- package/dist/shared/{hx-icon-button-DzH_bRtC.js → hx-icon-button-DOWKUs0-.js} +10 -10
- package/dist/shared/hx-icon-button-DOWKUs0-.js.map +1 -0
- package/dist/shared/{hx-image-C6pGiI6c.js → hx-image-BqABFHGZ.js} +21 -21
- package/dist/shared/hx-image-BqABFHGZ.js.map +1 -0
- package/dist/shared/{hx-link-Tmk_YPvW.js → hx-link-CAFRuAKJ.js} +27 -25
- 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-DR4G_rqw.js → hx-menu-divider-B1TIKAaq.js} +50 -30
- package/dist/shared/hx-menu-divider-B1TIKAaq.js.map +1 -0
- package/dist/shared/{hx-meter-uXkTZq-W.js → hx-meter-BWNeWrg2.js} +18 -18
- package/dist/shared/hx-meter-BWNeWrg2.js.map +1 -0
- package/dist/shared/{hx-nav-3JsN2Oak.js → hx-nav-DqNzqH2s.js} +119 -107
- package/dist/shared/hx-nav-DqNzqH2s.js.map +1 -0
- package/dist/shared/{hx-nav-item-D3EJatzc.js → hx-nav-item-D-9uG-Tt.js} +181 -115
- package/dist/shared/hx-nav-item-D-9uG-Tt.js.map +1 -0
- package/dist/shared/{hx-number-input-CIpL2BEh.js → hx-number-input-D7Jczm0J.js} +42 -41
- package/dist/shared/hx-number-input-D7Jczm0J.js.map +1 -0
- package/dist/shared/{hx-overflow-menu-2kgOJ_ht.js → hx-overflow-menu-UvSgk7yV.js} +20 -16
- package/dist/shared/hx-overflow-menu-UvSgk7yV.js.map +1 -0
- package/dist/shared/{hx-pagination-Blt-fFqV.js → hx-pagination-DBovb97q.js} +91 -75
- package/dist/shared/hx-pagination-DBovb97q.js.map +1 -0
- package/dist/shared/hx-patient-banner-DLeU2pC2.js +297 -0
- package/dist/shared/hx-patient-banner-DLeU2pC2.js.map +1 -0
- package/dist/shared/hx-phi-field-BwlVKfHI.js +295 -0
- package/dist/shared/hx-phi-field-BwlVKfHI.js.map +1 -0
- package/dist/shared/{hx-popover-DxE67miP.js → hx-popover-DdjLdSr8.js} +96 -69
- package/dist/shared/hx-popover-DdjLdSr8.js.map +1 -0
- package/dist/shared/{hx-popup-Dg6n_PbY.js → hx-popup-DEYZKeH1.js} +15 -15
- package/dist/shared/hx-popup-DEYZKeH1.js.map +1 -0
- package/dist/shared/{hx-progress-bar-Dm_EHyng.js → hx-progress-bar-CdbFsimb.js} +44 -42
- package/dist/shared/hx-progress-bar-CdbFsimb.js.map +1 -0
- package/dist/shared/{hx-progress-ring-DpxBDD5d.js → hx-progress-ring-3YcGRxes.js} +8 -8
- package/dist/shared/hx-progress-ring-3YcGRxes.js.map +1 -0
- package/dist/shared/hx-prose-Ml_L2zje.js.map +1 -1
- package/dist/shared/{hx-radio-BywgVSEu.js → hx-radio-BCEpX1tj.js} +40 -39
- package/dist/shared/hx-radio-BCEpX1tj.js.map +1 -0
- package/dist/shared/{hx-rating-CUWBQ0fZ.js → hx-rating-BXnSN-Ln.js} +92 -96
- package/dist/shared/hx-rating-BXnSN-Ln.js.map +1 -0
- package/dist/shared/{hx-select-BwDwxk-M.js → hx-select-vzsOOYNx.js} +137 -98
- 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-D_0EKJyk.js → hx-slider-DnncjdOT.js} +31 -26
- package/dist/shared/hx-slider-DnncjdOT.js.map +1 -0
- package/dist/shared/{hx-spinner-DMn4SChS.js → hx-spinner-B52nJ4Vt.js} +15 -14
- package/dist/shared/hx-spinner-B52nJ4Vt.js.map +1 -0
- package/dist/shared/{hx-split-button-CypgLXw1.js → hx-split-button-BJHIszDb.js} +44 -35
- package/dist/shared/hx-split-button-BJHIszDb.js.map +1 -0
- package/dist/shared/{hx-split-panel-CV_Kr4EK.js → hx-split-panel-uNW9xrA3.js} +18 -15
- 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-CHntLHJM.js → hx-stat-BfgKgBeq.js} +43 -35
- package/dist/shared/hx-stat-BfgKgBeq.js.map +1 -0
- package/dist/shared/{hx-status-indicator-C1BwEvUw.js → hx-status-indicator-C146uMF0.js} +81 -40
- package/dist/shared/hx-status-indicator-C146uMF0.js.map +1 -0
- package/dist/shared/{hx-step-BIVWSPxd.js → hx-step-C0Unvyen.js} +48 -84
- package/dist/shared/hx-step-C0Unvyen.js.map +1 -0
- package/dist/shared/{hx-structured-list-CMWllxGg.js → hx-structured-list-3R69RETR.js} +25 -22
- package/dist/shared/hx-structured-list-3R69RETR.js.map +1 -0
- package/dist/shared/hx-style-scope-D3dsKS58.js +126 -0
- package/dist/shared/hx-style-scope-D3dsKS58.js.map +1 -0
- package/dist/shared/{hx-switch-BgX8kuWt.js → hx-switch-BCNpbuk-.js} +14 -11
- package/dist/shared/hx-switch-BCNpbuk-.js.map +1 -0
- package/dist/shared/{hx-tab-panel-DhOq67jj.js → hx-tab-panel-D7BTBgDQ.js} +165 -126
- package/dist/shared/hx-tab-panel-D7BTBgDQ.js.map +1 -0
- package/dist/shared/{hx-tag-CzOTDcXI.js → hx-tag-C2E-6fJ3.js} +20 -19
- package/dist/shared/hx-tag-C2E-6fJ3.js.map +1 -0
- package/dist/shared/{hx-td-h6oeW6YC.js → hx-td-DWcp2XDO.js} +49 -46
- package/dist/shared/hx-td-DWcp2XDO.js.map +1 -0
- package/dist/shared/{hx-text-DTXjiviE.js → hx-text-DxyBxz25.js} +27 -27
- package/dist/shared/hx-text-DxyBxz25.js.map +1 -0
- package/dist/shared/hx-text-input-2LTGt0vQ.js +576 -0
- package/dist/shared/hx-text-input-2LTGt0vQ.js.map +1 -0
- package/dist/shared/{hx-textarea-BgX7rxyo.js → hx-textarea-BZspivFK.js} +23 -23
- package/dist/shared/hx-textarea-BZspivFK.js.map +1 -0
- package/dist/shared/hx-theme-J2YEpSIL.js +300 -0
- package/dist/shared/hx-theme-J2YEpSIL.js.map +1 -0
- package/dist/shared/{hx-time-picker-DmLu7WUC.js → hx-time-picker-CVrw4tju.js} +89 -88
- package/dist/shared/hx-time-picker-CVrw4tju.js.map +1 -0
- package/dist/shared/{hx-toggle-button-D1jpDvSA.js → hx-toggle-button-Ss7Gppx3.js} +14 -11
- package/dist/shared/hx-toggle-button-Ss7Gppx3.js.map +1 -0
- package/dist/shared/{hx-tooltip-kh7QFPKu.js → hx-tooltip-xRNjEX7_.js} +26 -21
- 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-BP6UF_H1.js → hx-tree-item-C-cRw_ZA.js} +170 -106
- 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/id-counter-JhvVCnjh.js +143 -0
- package/dist/shared/id-counter-JhvVCnjh.js.map +1 -0
- package/dist/shared/{toast-factory-DTy-qN8r.js → toast-factory-oPHbhMZI.js} +58 -46
- package/dist/shared/toast-factory-oPHbhMZI.js.map +1 -0
- package/dist/utilities/adoptedStylesheetRegistry.d.ts +47 -0
- package/dist/utilities/adoptedStylesheetRegistry.d.ts.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/dist/utilities/generateScopedSelectors.d.ts +30 -0
- package/dist/utilities/generateScopedSelectors.d.ts.map +1 -0
- package/dist/utilities/injectLightStyles.d.ts +37 -0
- package/dist/utilities/injectLightStyles.d.ts.map +1 -0
- package/dist/utilities/lightStyleRegistry.d.ts +41 -0
- package/dist/utilities/lightStyleRegistry.d.ts.map +1 -0
- package/dist/utilities/sheetManager.d.ts +62 -0
- package/dist/utilities/sheetManager.d.ts.map +1 -0
- package/dist/utils/contrast-checker.d.ts +86 -0
- package/dist/utils/contrast-checker.d.ts.map +1 -0
- package/dist/utils/token-merger.d.ts +24 -0
- package/dist/utils/token-merger.d.ts.map +1 -0
- package/fouc.css +37 -0
- package/package.json +28 -6
- package/dist/shared/hx-accordion-D1kFhdeQ.js.map +0 -1
- package/dist/shared/hx-action-bar-D4bulGQP.js.map +0 -1
- package/dist/shared/hx-alert-CSxCF2rr.js.map +0 -1
- package/dist/shared/hx-avatar-Cun-O99h.js.map +0 -1
- package/dist/shared/hx-badge-CsFd2xtw.js.map +0 -1
- package/dist/shared/hx-banner-BTV-X2xF.js.map +0 -1
- package/dist/shared/hx-breadcrumb-item-4IwaLgaO.js.map +0 -1
- package/dist/shared/hx-button-7k-KeCYU.js.map +0 -1
- package/dist/shared/hx-button-group-CWjWv-wS.js.map +0 -1
- package/dist/shared/hx-card-0hT3G5hi.js.map +0 -1
- package/dist/shared/hx-carousel-item-DgeYyYZJ.js.map +0 -1
- package/dist/shared/hx-checkbox-BvjO-O41.js.map +0 -1
- package/dist/shared/hx-checkbox-group-Z5VvWzcj.js.map +0 -1
- package/dist/shared/hx-code-snippet-DqzPkH4K.js.map +0 -1
- package/dist/shared/hx-color-picker-Da8z6AlQ.js.map +0 -1
- package/dist/shared/hx-combobox-CivfelTS.js.map +0 -1
- package/dist/shared/hx-container-DLUKnTi9.js.map +0 -1
- package/dist/shared/hx-copy-button--0dymSvw.js.map +0 -1
- package/dist/shared/hx-counter-Duf00H7p.js +0 -147
- package/dist/shared/hx-counter-Duf00H7p.js.map +0 -1
- package/dist/shared/hx-data-table-BWvd5NNx.js.map +0 -1
- package/dist/shared/hx-date-picker-6voxxxNE.js.map +0 -1
- package/dist/shared/hx-dialog-DkUSnVgw.js.map +0 -1
- package/dist/shared/hx-divider-DNNs4e8q.js.map +0 -1
- package/dist/shared/hx-drawer-CJcRZcns.js.map +0 -1
- package/dist/shared/hx-dropdown-Bo0KTM1A.js.map +0 -1
- package/dist/shared/hx-field-3MmzJ4kZ.js.map +0 -1
- package/dist/shared/hx-field-label-Bg-EWvqF.js.map +0 -1
- package/dist/shared/hx-file-upload-ByjAgfNy.js.map +0 -1
- package/dist/shared/hx-format-date-BdnWV2kX.js.map +0 -1
- package/dist/shared/hx-grid-gEjuF0cR.js.map +0 -1
- package/dist/shared/hx-help-text-BAcEGRUE.js.map +0 -1
- package/dist/shared/hx-icon-CP6OnLoM.js.map +0 -1
- package/dist/shared/hx-icon-button-DzH_bRtC.js.map +0 -1
- package/dist/shared/hx-image-C6pGiI6c.js.map +0 -1
- package/dist/shared/hx-link-Tmk_YPvW.js.map +0 -1
- package/dist/shared/hx-list-DwInEX2H.js.map +0 -1
- package/dist/shared/hx-menu-divider-DR4G_rqw.js.map +0 -1
- package/dist/shared/hx-meter-uXkTZq-W.js.map +0 -1
- package/dist/shared/hx-nav-3JsN2Oak.js.map +0 -1
- package/dist/shared/hx-nav-item-D3EJatzc.js.map +0 -1
- package/dist/shared/hx-number-input-CIpL2BEh.js.map +0 -1
- package/dist/shared/hx-overflow-menu-2kgOJ_ht.js.map +0 -1
- package/dist/shared/hx-pagination-Blt-fFqV.js.map +0 -1
- package/dist/shared/hx-popover-DxE67miP.js.map +0 -1
- package/dist/shared/hx-popup-Dg6n_PbY.js.map +0 -1
- package/dist/shared/hx-progress-bar-Dm_EHyng.js.map +0 -1
- package/dist/shared/hx-progress-ring-DpxBDD5d.js.map +0 -1
- package/dist/shared/hx-radio-BywgVSEu.js.map +0 -1
- package/dist/shared/hx-rating-CUWBQ0fZ.js.map +0 -1
- package/dist/shared/hx-select-BwDwxk-M.js.map +0 -1
- package/dist/shared/hx-skeleton-BHvALyd7.js.map +0 -1
- package/dist/shared/hx-slider-D_0EKJyk.js.map +0 -1
- package/dist/shared/hx-spinner-DMn4SChS.js.map +0 -1
- package/dist/shared/hx-split-button-CypgLXw1.js.map +0 -1
- package/dist/shared/hx-split-panel-CV_Kr4EK.js.map +0 -1
- package/dist/shared/hx-stack-BStY1RmV.js.map +0 -1
- package/dist/shared/hx-stat-CHntLHJM.js.map +0 -1
- package/dist/shared/hx-status-indicator-C1BwEvUw.js.map +0 -1
- package/dist/shared/hx-step-BIVWSPxd.js.map +0 -1
- package/dist/shared/hx-structured-list-CMWllxGg.js.map +0 -1
- package/dist/shared/hx-switch-BgX8kuWt.js.map +0 -1
- package/dist/shared/hx-tab-panel-DhOq67jj.js.map +0 -1
- package/dist/shared/hx-tag-CzOTDcXI.js.map +0 -1
- package/dist/shared/hx-td-h6oeW6YC.js.map +0 -1
- package/dist/shared/hx-text-DTXjiviE.js.map +0 -1
- package/dist/shared/hx-text-input-CqEdDHMU.js +0 -461
- package/dist/shared/hx-text-input-CqEdDHMU.js.map +0 -1
- package/dist/shared/hx-textarea-BgX7rxyo.js.map +0 -1
- package/dist/shared/hx-theme-6GDoUG8j.js +0 -176
- package/dist/shared/hx-theme-6GDoUG8j.js.map +0 -1
- package/dist/shared/hx-time-picker-DmLu7WUC.js.map +0 -1
- package/dist/shared/hx-toggle-button-D1jpDvSA.js.map +0 -1
- package/dist/shared/hx-tooltip-kh7QFPKu.js.map +0 -1
- package/dist/shared/hx-top-nav-DYlnzDaU.js.map +0 -1
- package/dist/shared/hx-tree-item-BP6UF_H1.js.map +0 -1
- package/dist/shared/hx-visually-hidden-CCTQTjbR.js.map +0 -1
- package/dist/shared/toast-factory-DTy-qN8r.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hx-split-panel-CV_Kr4EK.js","sources":["../../src/components/hx-split-panel/hx-split-panel.styles.ts","../../src/components/hx-split-panel/hx-split-panel.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixSplitPanelStyles = css`\n :host {\n display: flex;\n --_divider-size: var(--hx-split-panel-divider-size, 4px);\n --_divider-color: var(--hx-split-panel-divider-color, var(--hx-color-neutral-200));\n --_divider-hover-color: var(--hx-split-panel-divider-hover-color, var(--hx-color-primary-500));\n overflow: hidden;\n }\n\n :host([orientation='horizontal']) {\n flex-direction: row;\n width: 100%;\n height: 100%;\n }\n\n :host([orientation='vertical']) {\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n\n .panel {\n overflow: auto;\n min-width: 0;\n min-height: 0;\n }\n\n .panel--start {\n flex-shrink: 0;\n }\n\n .panel--end {\n flex: 1;\n }\n\n :host([orientation='horizontal']) .panel--start {\n height: 100%;\n }\n\n :host([orientation='vertical']) .panel--start {\n width: 100%;\n }\n\n /* ─── Divider Track (flex child wrapper) ─── */\n\n .divider-track {\n flex-shrink: 0;\n position: relative;\n overflow: visible;\n display: flex;\n align-items: stretch;\n }\n\n :host([orientation='horizontal']) .divider-track {\n width: var(--_divider-size);\n height: 100%;\n }\n\n :host([orientation='vertical']) .divider-track {\n width: 100%;\n height: var(--_divider-size);\n }\n\n /* ─── Divider (separator role — no interactive children) ─── */\n\n .divider {\n flex: 1;\n background-color: var(--_divider-color);\n cursor: col-resize;\n transition: background-color var(--hx-transition-fast, 150ms ease);\n touch-action: none;\n user-select: none;\n -webkit-user-select: none;\n outline: none;\n }\n\n :host([orientation='horizontal']) .divider {\n cursor: col-resize;\n }\n\n :host([orientation='vertical']) .divider {\n cursor: row-resize;\n }\n\n .divider:hover,\n .divider:focus-visible {\n background-color: var(--_divider-hover-color);\n }\n\n .divider:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(\n --hx-split-panel-focus-ring-color,\n var(--hx-focus-ring-color, var(--hx-color-primary-500))\n );\n outline-offset: var(--hx-focus-ring-offset, 2px);\n box-shadow: 0 0 0 4px color-mix(in srgb, var(--_divider-hover-color) 30%, transparent);\n }\n\n :host([disabled]) .divider {\n cursor: default;\n pointer-events: none;\n }\n\n :host([disabled]) .divider:hover,\n :host([disabled]) .divider:focus-visible {\n background-color: var(--_divider-color);\n outline: none;\n box-shadow: none;\n }\n\n /* ─── Collapse Controls (siblings of separator, not children) ─── */\n\n .collapse-controls {\n position: absolute;\n top: 50%;\n inset-inline-start: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n z-index: 2;\n pointer-events: auto;\n }\n\n :host([orientation='vertical']) .collapse-controls {\n flex-direction: row;\n }\n\n .collapse-btn {\n background: var(--_divider-hover-color);\n border: 2px solid var(--hx-color-neutral-0);\n color: var(--hx-color-neutral-0);\n width: 20px;\n height: 20px;\n border-radius: 50%;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 8px;\n padding: 0;\n line-height: 1;\n flex-shrink: 0;\n }\n\n .collapse-btn:hover {\n filter: brightness(1.1);\n }\n\n .collapse-btn:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(\n --hx-split-panel-focus-ring-color,\n var(--hx-focus-ring-color, var(--hx-color-primary-500))\n );\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .divider {\n transition: none;\n }\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixSplitPanelStyles } from './hx-split-panel.styles.js';\n\n/**\n * A resizable two-pane layout with a draggable divider.\n *\n * @summary Resizable split panel with start and end panes.\n *\n * @tag hx-split-panel\n *\n * @slot start - The first (start) panel content.\n * @slot end - The second (end) panel content.\n *\n * @csspart start - The start panel container.\n * @csspart divider - The draggable divider element.\n * @csspart end - The end panel container.\n *\n * @fires hx-reposition - Fired when the divider is moved. Detail: `{ position: number }`.\n *\n * @cssprop [--hx-split-panel-divider-size=4px] - Width (horizontal) or height (vertical) of the divider.\n * @cssprop [--hx-split-panel-divider-color=var(--hx-color-neutral-200)] - Default divider color.\n * @cssprop [--hx-split-panel-divider-hover-color=var(--hx-color-primary-500)] - Divider color on hover/focus.\n *\n * @example Drupal Twig usage:\n * ```twig\n * <hx-split-panel\n * position=\"50\"\n * orientation=\"horizontal\"\n * min=\"10\"\n * max=\"90\"\n * collapsible\n * >\n * <div slot=\"start\">{{ start_content }}</div>\n * <div slot=\"end\">{{ end_content }}</div>\n * </hx-split-panel>\n *\n * Attribute-settable: position, position-in-pixels, orientation, disabled, min, max, collapsible, collapsed\n * JS-only (complex types): snap (use .snap=${[25, 50, 75]} in Lit templates,\n * or snap=\"[25,50,75]\" as JSON string in Twig)\n * ```\n */\n@customElement('hx-split-panel')\nexport class HelixSplitPanel extends LitElement {\n static override styles = [tokenStyles, helixSplitPanelStyles];\n\n /**\n * Position of the divider as a percentage (0–100) of the start panel.\n * @attr position\n */\n @property({ type: Number, reflect: true })\n position = 50;\n\n /**\n * Position of the divider in pixels (alternative to `position`).\n * When set, takes precedence over `position` until the host is measured.\n * @attr position-in-pixels\n */\n @property({ type: Number, attribute: 'position-in-pixels' })\n positionInPixels: number | undefined;\n\n /**\n * Orientation of the split.\n * @attr orientation\n */\n @property({ type: String, reflect: true })\n orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Minimum position as a percentage (0–100). Prevents full collapse of start panel.\n * @attr min\n */\n @property({ type: Number, reflect: true })\n min = 0;\n\n /**\n * Maximum position as a percentage (0–100). Prevents full expansion of start panel.\n * @attr max\n */\n @property({ type: Number, reflect: true })\n max = 100;\n\n /**\n * Snap points as an array of percentages. The divider snaps to the\n * nearest point within a 5% threshold.\n * Accepts JSON array string in HTML: snap=\"[25, 50, 75]\"\n * @attr snap\n */\n @property({\n attribute: 'snap',\n converter: {\n fromAttribute(value: string | null): number[] {\n if (!value) return [];\n try {\n const parsed = JSON.parse(value) as unknown;\n if (Array.isArray(parsed)) return (parsed as unknown[]).map(Number);\n return [];\n } catch {\n return value\n .split(',')\n .map((s) => Number(s.trim()))\n .filter((n) => !isNaN(n));\n }\n },\n toAttribute(value: number[]): string {\n return JSON.stringify(value);\n },\n },\n })\n snap: number[] = [];\n\n /**\n * When true, the divider cannot be dragged.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * When true, collapse/expand buttons appear on the divider.\n * @attr collapsible\n */\n @property({ type: Boolean, reflect: true })\n collapsible = false;\n\n /**\n * Which panel is collapsed: 'start', 'end', or null (not collapsed).\n * @attr collapsed\n */\n @property({ type: String, reflect: true })\n collapsed: 'start' | 'end' | null = null;\n\n /**\n * Accessible label for the divider separator element.\n * @attr resize-label\n */\n @property({ attribute: 'resize-label' })\n resizeLabel = 'Resize panels';\n\n /**\n * Accessible label for the button that collapses the start panel.\n * @attr collapse-start-label\n */\n @property({ attribute: 'collapse-start-label' })\n collapseStartLabel = 'Collapse start panel';\n\n /**\n * Accessible label for the button that collapses the end panel.\n * @attr collapse-end-label\n */\n @property({ attribute: 'collapse-end-label' })\n collapseEndLabel = 'Collapse end panel';\n\n /**\n * Whether the user is currently dragging the divider.\n * @internal\n */\n private _dragging = false;\n /**\n * The pointer coordinate (clientX or clientY) at the start of a drag gesture.\n * @internal\n */\n private _dragStart = 0;\n /**\n * The divider position percentage at the moment a drag gesture begins, used to compute deltas.\n * @internal\n */\n private _positionAtDragStart = 0;\n /**\n * The position saved before a collapse occurs, restored when the panel is expanded.\n * @internal\n */\n private _positionBeforeCollapse = 50;\n /**\n * Cached container width measured once at drag start to avoid layout thrash on every pointermove.\n * @internal\n */\n private _cachedContainerWidth = 0;\n /**\n * Cached container height measured once at drag start to avoid layout thrash on every pointermove.\n * @internal\n */\n private _cachedContainerHeight = 0;\n\n /** @internal */\n private _clamp(value: number): number {\n return Math.min(this.max, Math.max(this.min, value));\n }\n\n /** @internal */\n private _snapToPoint(value: number): number {\n if (!this.snap.length) return value;\n const threshold = 5;\n for (const point of this.snap) {\n if (Math.abs(value - point) <= threshold) return point;\n }\n return value;\n }\n\n /** @internal */\n private _setPosition(percent: number): void {\n const clamped = this._clamp(this._snapToPoint(percent));\n if (clamped === this.position) return;\n this.position = clamped;\n this.dispatchEvent(\n new CustomEvent<{ position: number }>('hx-reposition', {\n detail: { position: this.position },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n /** @internal */\n private _getHostSize(): number {\n if (this.orientation === 'horizontal') {\n return this.offsetWidth;\n }\n return this.offsetHeight;\n }\n\n /**\n * Initiates a drag gesture when the divider receives a pointerdown event.\n * @internal\n */\n private _onPointerDown = (e: PointerEvent): void => {\n if (this.disabled) return;\n const divider = e.currentTarget as HTMLElement;\n divider.setPointerCapture(e.pointerId);\n this._dragging = true;\n this._dragStart = this.orientation === 'horizontal' ? e.clientX : e.clientY;\n this._positionAtDragStart = this.position;\n // Cache container dimensions once at drag start to avoid forced layout on every pointermove\n this._cachedContainerWidth = this.offsetWidth;\n this._cachedContainerHeight = this.offsetHeight;\n e.preventDefault();\n };\n\n /**\n * Updates the divider position during an active drag gesture.\n * @internal\n */\n private _onPointerMove = (e: PointerEvent): void => {\n if (!this._dragging) return;\n const current = this.orientation === 'horizontal' ? e.clientX : e.clientY;\n const delta = current - this._dragStart;\n const hostSize =\n this.orientation === 'horizontal' ? this._cachedContainerWidth : this._cachedContainerHeight;\n if (hostSize === 0) return;\n const deltaPercent = (delta / hostSize) * 100;\n this._setPosition(this._positionAtDragStart + deltaPercent);\n };\n\n /**\n * Ends the drag gesture when the pointer is released.\n * @internal\n */\n private _onPointerUp = (): void => {\n this._dragging = false;\n this._cachedContainerWidth = 0;\n this._cachedContainerHeight = 0;\n };\n\n /**\n * Handles keyboard navigation on the divider — arrow keys adjust position, Home/End jump to min/max.\n * @internal\n */\n private _onKeyDown = (e: KeyboardEvent): void => {\n if (this.disabled) return;\n switch (e.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n e.preventDefault();\n this._setPosition(this.position - 1);\n break;\n case 'ArrowRight':\n case 'ArrowDown':\n e.preventDefault();\n this._setPosition(this.position + 1);\n break;\n case 'PageUp':\n e.preventDefault();\n this._setPosition(this.position + 10);\n break;\n case 'PageDown':\n e.preventDefault();\n this._setPosition(this.position - 10);\n break;\n case 'Home':\n e.preventDefault();\n this._setPosition(this.min);\n break;\n case 'End':\n e.preventDefault();\n this._setPosition(this.max);\n break;\n }\n };\n\n /**\n * Collapses the start panel by setting `collapsed` to `'start'`.\n * @internal\n */\n private _collapseStart = (): void => {\n this.collapsed = 'start';\n };\n\n /**\n * Collapses the end panel by setting `collapsed` to `'end'`.\n * @internal\n */\n private _collapseEnd = (): void => {\n this.collapsed = 'end';\n };\n\n /**\n * Expands a collapsed panel by resetting `collapsed` to null.\n * @internal\n */\n private _expand = (): void => {\n this.collapsed = null;\n };\n\n protected override willUpdate(changedProperties: PropertyValues<this>): void {\n super.willUpdate(changedProperties);\n if (!changedProperties.has('collapsed')) return;\n\n const prev = changedProperties.get('collapsed');\n\n if (this.collapsed === 'start') {\n // Save restore point when transitioning from non-collapsed state (or initial render)\n if (prev === null || prev === undefined) this._positionBeforeCollapse = this.position;\n this._setPosition(this.min);\n } else if (this.collapsed === 'end') {\n if (prev === null || prev === undefined) this._positionBeforeCollapse = this.position;\n this._setPosition(this.max);\n } else if (this.collapsed === null && prev !== null && prev !== undefined) {\n // Only expand when transitioning from an explicitly collapsed state (not first render)\n this._setPosition(this._positionBeforeCollapse);\n }\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.positionInPixels !== undefined) {\n // Convert pixel position to percentage after first paint\n requestAnimationFrame(() => {\n if (this.positionInPixels !== undefined) {\n const hostSize = this._getHostSize();\n if (hostSize > 0) {\n this._setPosition((this.positionInPixels / hostSize) * 100);\n }\n }\n });\n }\n }\n\n /** @internal */\n private _startPanelStyleMap(): Record<string, string> {\n if (this.orientation === 'horizontal') {\n return { width: `${this.position}%` };\n }\n return { height: `${this.position}%` };\n }\n\n override render() {\n return html`\n <div part=\"start\" class=\"panel panel--start\" style=${styleMap(this._startPanelStyleMap())}>\n <slot name=\"start\"></slot>\n </div>\n <div class=\"divider-track\">\n <div\n part=\"divider\"\n class=\"divider\"\n role=\"separator\"\n aria-label=${this.resizeLabel}\n aria-orientation=${this.orientation === 'horizontal' ? 'vertical' : 'horizontal'}\n aria-valuenow=${this.position}\n aria-valuemin=${this.min}\n aria-valuemax=${this.max}\n aria-disabled=${this.disabled ? 'true' : nothing}\n tabindex=${this.disabled ? '-1' : '0'}\n @pointerdown=${this._onPointerDown}\n @pointermove=${this._onPointerMove}\n @pointerup=${this._onPointerUp}\n @keydown=${this._onKeyDown}\n ></div>\n ${this.collapsible\n ? this.collapsed\n ? html`<div class=\"collapse-controls\">\n <button\n type=\"button\"\n class=\"collapse-btn\"\n aria-label=${`Expand ${this.collapsed} panel`}\n @click=${this._expand}\n >\n ${this.collapsed === 'start' ? '▶' : '◀'}\n </button>\n </div>`\n : html`<div class=\"collapse-controls\">\n <button\n type=\"button\"\n class=\"collapse-btn\"\n aria-label=${this.collapseStartLabel}\n @click=${this._collapseStart}\n >\n ◀\n </button>\n <button\n type=\"button\"\n class=\"collapse-btn\"\n aria-label=${this.collapseEndLabel}\n @click=${this._collapseEnd}\n >\n ▶\n </button>\n </div>`\n : nothing}\n </div>\n <div part=\"end\" class=\"panel panel--end\">\n <slot name=\"end\"></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-split-panel': HelixSplitPanel;\n }\n}\n"],"names":["helixSplitPanelStyles","css","HelixSplitPanel","LitElement","e","delta","hostSize","deltaPercent","value","threshold","point","percent","clamped","changedProperties","prev","html","styleMap","nothing","tokenSt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AK,MAAMb,CAAK;AAC/B,iBAAI,MAAM,QAAQa,CAAM,IAAWA,EAAqB,IAAI,MAAM,IAC3D,CAAA;AAAA,QACT,QAAQ;AACN,iBAAOb,EACJ,MAAM,GAAG,EACT,IAAI,CAACc,MAAM,OAAOA,EAAE,MAAM,CAAC,EAC3B,OAAO,CAACC,MAAM,CAAC,MAAMA,CAAC,CAAC;AAAA,QAC5B;AAAA,MACF;AAAA,MACA,YAAYf,GAAyB;AACnC,eAAO,KAAK,UAAUA,CAAK;AAAA,MAC7B;AAAA,IAAA;AAAA,EACF,CACD;AAAA,GAjEUN,EAkEX,WAAA,QAAA,CAAA;AAOAiB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAxE/BlB,EAyEX,WAAA,YAAA,CAAA;AAOAiB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA/E/BlB,EAgFX,WAAA,eAAA,CAAA;AAOAiB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAtF9BlB,EAuFX,WAAA,aAAA,CAAA;AAOAiB,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,eAAA,CAAgB;AAAA,GA7F5BlB,EA8FX,WAAA,eAAA,CAAA;AAOAiB,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,uBAAA,CAAwB;AAAA,GApGpClB,EAqGX,WAAA,sBAAA,CAAA;AAOAiB,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,qBAAA,CAAsB;AAAA,GA3GlClB,EA4GX,WAAA,oBAAA,CAAA;AA5GWA,IAANiB,EAAA;AAAA,EADNK,EAAc,gBAAgB;AAAA,GAClBtB,CAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hx-stack-BStY1RmV.js","sources":["../../src/components/hx-stack/hx-stack.styles.ts","../../src/components/hx-stack/hx-stack.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixStackStyles = css`\n :host {\n display: block;\n }\n\n :host([inline]) {\n display: inline-block;\n }\n\n [part='base'] {\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-4, 1rem);\n }\n\n /* ─── Direction ─── */\n\n :host([direction='horizontal']) [part='base'] {\n flex-direction: row;\n }\n\n :host([direction='vertical']) [part='base'] {\n flex-direction: column;\n }\n\n /* ─── Wrap ─── */\n\n :host([wrap]) [part='base'] {\n flex-wrap: wrap;\n }\n\n /* ─── Alignment ─── */\n\n :host([align='start']) [part='base'] {\n align-items: flex-start;\n }\n\n :host([align='center']) [part='base'] {\n align-items: center;\n }\n\n :host([align='end']) [part='base'] {\n align-items: flex-end;\n }\n\n :host([align='stretch']) [part='base'] {\n align-items: stretch;\n }\n\n :host([align='baseline']) [part='base'] {\n align-items: baseline;\n }\n\n /* ─── Justify ─── */\n\n :host([justify='start']) [part='base'] {\n justify-content: flex-start;\n }\n\n :host([justify='center']) [part='base'] {\n justify-content: center;\n }\n\n :host([justify='end']) [part='base'] {\n justify-content: flex-end;\n }\n\n :host([justify='between']) [part='base'] {\n justify-content: space-between;\n }\n\n :host([justify='around']) [part='base'] {\n justify-content: space-around;\n }\n\n :host([justify='evenly']) [part='base'] {\n justify-content: space-evenly;\n }\n\n /* ─── Gap ─── */\n\n :host([gap='none']) [part='base'] {\n gap: 0;\n }\n\n :host([gap='xs']) [part='base'] {\n gap: var(--hx-space-1, 0.25rem);\n }\n\n :host([gap='sm']) [part='base'] {\n gap: var(--hx-space-2, 0.5rem);\n }\n\n :host([gap='md']) [part='base'] {\n gap: var(--hx-space-4, 1rem);\n }\n\n :host([gap='lg']) [part='base'] {\n gap: var(--hx-space-6, 1.5rem);\n }\n\n :host([gap='xl']) [part='base'] {\n gap: var(--hx-space-8, 2rem);\n }\n`;\n","import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixStackStyles } from './hx-stack.styles.js';\n\n/**\n * A flexbox layout wrapper for consistent vertical/horizontal spacing between children.\n *\n * @summary Flexbox stack layout utility for arranging children with consistent spacing.\n *\n * @tag hx-stack\n *\n * @slot - Default slot for any child content.\n *\n * @csspart base - The inner flex container.\n */\n@customElement('hx-stack')\nexport class HelixStack extends LitElement {\n static override styles = [tokenStyles, helixStackStyles];\n\n /**\n * Direction of the stack layout.\n * @attr direction\n */\n @property({ type: String, reflect: true })\n direction: 'horizontal' | 'vertical' = 'vertical';\n\n /**\n * Gap between children using design tokens.\n * @attr gap\n */\n @property({ type: String, reflect: true })\n gap: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'md';\n\n /**\n * Align-items value for cross-axis alignment.\n * @attr align\n */\n @property({ type: String, reflect: true })\n align: 'start' | 'center' | 'end' | 'stretch' | 'baseline' = 'stretch';\n\n /**\n * Justify-content value for main-axis distribution.\n * @attr justify\n */\n @property({ type: String, reflect: true })\n justify: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly' = 'start';\n\n /**\n * When true, children wrap onto multiple lines.\n * @attr wrap\n */\n @property({ type: Boolean, reflect: true })\n wrap = false;\n\n /**\n * When true, the component renders as `display: inline-flex`.\n * @attr inline\n */\n @property({ type: Boolean, reflect: true })\n inline = false;\n\n /**\n * Sets `role=\"presentation\"` on connect so assistive technologies treat this\n * element as a purely visual layout wrapper with no semantic meaning. This\n * suppresses any implicit ARIA role that a custom element might otherwise\n * inherit, preventing screen readers from announcing \"group\" or \"region\"\n * for what is purely a spacing/alignment container.\n *\n * **Consumer override:** If you need a semantic grouping role (e.g. for a\n * form fieldset equivalent), set `role=\"group\"` or any other ARIA role\n * directly on the element — the guard `!this.hasAttribute('role')` ensures\n * the component will not overwrite it.\n *\n * @example\n * <!-- Layout stack — role=\"presentation\" applied automatically -->\n * <hx-stack gap=\"md\">...</hx-stack>\n *\n * @example\n * <!-- Semantic group — consumer role preserved -->\n * <hx-stack role=\"group\" aria-labelledby=\"form-heading\" gap=\"md\">...</hx-stack>\n */\n override connectedCallback(): void {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'presentation');\n }\n }\n\n override render() {\n return html`\n <div part=\"base\">\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-stack': HelixStack;\n }\n}\n"],"names":["helixStackStyles","css","HelixStack","LitElement","html","tokenStyles","__decorateClass","property","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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;ACezB,IAAMC,IAAN,cAAyBC,EAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA,GAQL,KAAA,YAAuC,YAOvC,KAAA,MAAiD,MAOjD,KAAA,QAA6D,WAO7D,KAAA,UAAwE,SAOxE,KAAA,OAAO,IAOP,KAAA,SAAS;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAsBA,oBAA0B;AACjC,UAAM,kBAAA,GACD,KAAK,aAAa,MAAM,KAC3B,KAAK,aAAa,QAAQ,cAAc;AAAA,EAE5C;AAAA,EAES,SAAS;AAChB,WAAOC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKT;AACF;AA/EaF,EACK,SAAS,CAACG,GAAaL,CAAgB;AAOvDM,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAP9BL,EAQX,WAAA,aAAA,CAAA;AAOAI,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAd9BL,EAeX,WAAA,OAAA,CAAA;AAOAI,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GArB9BL,EAsBX,WAAA,SAAA,CAAA;AAOAI,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GA5B9BL,EA6BX,WAAA,WAAA,CAAA;AAOAI,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAnC/BL,EAoCX,WAAA,QAAA,CAAA;AAOAI,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GA1C/BL,EA2CX,WAAA,UAAA,CAAA;AA3CWA,IAANI,EAAA;AAAA,EADNE,EAAc,UAAU;AAAA,GACZN,CAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hx-stat-CHntLHJM.js","sources":["../../src/components/hx-stat/hx-stat.styles.ts","../../src/components/hx-stat/hx-stat.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixStatStyles = css`\n :host {\n display: block;\n }\n\n .stat {\n display: flex;\n flex-direction: column;\n gap: var(--hx-stat-gap, var(--hx-space-1, 0.25rem));\n font-family: var(--hx-stat-font-family, var(--hx-font-family-sans, sans-serif));\n color: var(--hx-stat-color, var(--hx-color-neutral-800, #212529));\n }\n\n /* ─── Size Variants ─── */\n\n .stat--sm .stat__value {\n font-size: var(--hx-stat-value-font-size-sm, var(--hx-font-size-xl, 1.25rem));\n line-height: var(--hx-line-height-tight, 1.25);\n font-weight: var(--hx-stat-value-font-weight, var(--hx-font-weight-bold, 700));\n }\n\n .stat--sm .stat__label {\n font-size: var(--hx-stat-label-font-size-sm, var(--hx-font-size-xs, 0.75rem));\n }\n\n .stat--md .stat__value {\n font-size: var(--hx-stat-value-font-size-md, var(--hx-font-size-3xl, 1.875rem));\n line-height: var(--hx-line-height-tight, 1.25);\n font-weight: var(--hx-stat-value-font-weight, var(--hx-font-weight-bold, 700));\n }\n\n .stat--md .stat__label {\n font-size: var(--hx-stat-label-font-size-md, var(--hx-font-size-sm, 0.875rem));\n }\n\n .stat--lg .stat__value {\n font-size: var(--hx-stat-value-font-size-lg, var(--hx-font-size-5xl, 3rem));\n line-height: var(--hx-line-height-tight, 1.25);\n font-weight: var(--hx-stat-value-font-weight, var(--hx-font-weight-bold, 700));\n }\n\n .stat--lg .stat__label {\n font-size: var(--hx-stat-label-font-size-lg, var(--hx-font-size-md, 1rem));\n }\n\n /* ─── Value ─── */\n\n .stat__header {\n display: flex;\n align-items: center;\n gap: var(--hx-stat-header-gap, var(--hx-space-2, 0.5rem));\n }\n\n .stat__value {\n color: var(--hx-stat-value-color, var(--hx-color-neutral-900, #111827));\n }\n\n /* ─── Label ─── */\n\n .stat__label {\n color: var(--hx-stat-label-color, var(--hx-color-neutral-500, #6c757d));\n font-weight: var(--hx-font-weight-normal, 400);\n }\n\n /* ─── Icon Slot ─── */\n\n .stat__icon {\n display: flex;\n align-items: center;\n color: var(--hx-stat-icon-color, var(--hx-color-primary-500, #2563eb));\n flex-shrink: 0;\n }\n\n /* ─── Trend Indicator ─── */\n\n .stat__trend {\n display: inline-flex;\n align-items: center;\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-semibold, 600);\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n padding: var(--hx-space-0-5, 0.125rem) var(--hx-space-1-5, 0.375rem);\n }\n\n .stat__trend--up {\n color: var(--hx-stat-trend-up-color, var(--hx-color-success-700, #15803d));\n background-color: var(--hx-stat-trend-up-bg, var(--hx-color-success-50, #f0fdf4));\n }\n\n .stat__trend--down {\n color: var(--hx-stat-trend-down-color, var(--hx-color-error-700, #b91c1c));\n background-color: var(--hx-stat-trend-down-bg, var(--hx-color-error-50, #fef2f2));\n }\n\n .stat__trend-arrow {\n width: 0.75em;\n height: 0.75em;\n flex-shrink: 0;\n }\n\n /* ─── Hidden empty slot wrappers ─── */\n\n [hidden] {\n display: none !important;\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { devWarn } from '../../utils/dev-warn.js';\nimport { helixStatStyles } from './hx-stat.styles.js';\n\nexport type StatSize = 'sm' | 'md' | 'lg';\nexport type StatTrend = 'up' | 'down' | 'neutral';\n\n/**\n * A static stat display component for presenting key metrics in a healthcare dashboard.\n *\n * @summary Displays a labeled metric value with optional trend indicator and icon slot.\n *\n * @tag hx-stat\n *\n * @slot icon - Optional icon displayed alongside the stat value.\n *\n * @csspart container - The outer stat container element.\n * @csspart header - The row containing the value and optional icon.\n * @csspart value - The stat value element.\n * @csspart label - The stat label element.\n * @csspart trend - The trend indicator element (only rendered when trend is not 'neutral').\n * @csspart icon - The icon slot container.\n *\n * @cssprop [--hx-stat-gap=var(--hx-space-1)] - Gap between value and label.\n * @cssprop [--hx-stat-header-gap=var(--hx-space-2)] - Gap between icon and value in the header row.\n * @cssprop [--hx-stat-color=var(--hx-color-neutral-800)] - Default text color.\n * @cssprop [--hx-stat-value-color=var(--hx-color-neutral-900)] - Value text color.\n * @cssprop [--hx-stat-label-color=var(--hx-color-neutral-500)] - Label text color.\n * @cssprop [--hx-stat-icon-color=var(--hx-color-primary-500)] - Icon color.\n * @cssprop [--hx-stat-value-font-weight=var(--hx-font-weight-bold)] - Value font weight.\n * @cssprop [--hx-stat-font-family=var(--hx-font-family-sans)] - Font family.\n * @cssprop [--hx-stat-value-font-size-sm=var(--hx-font-size-xl)] - Value font size at sm.\n * @cssprop [--hx-stat-value-font-size-md=var(--hx-font-size-3xl)] - Value font size at md.\n * @cssprop [--hx-stat-value-font-size-lg=var(--hx-font-size-5xl)] - Value font size at lg.\n * @cssprop [--hx-stat-label-font-size-sm=var(--hx-font-size-xs)] - Label font size at sm.\n * @cssprop [--hx-stat-label-font-size-md=var(--hx-font-size-sm)] - Label font size at md.\n * @cssprop [--hx-stat-label-font-size-lg=var(--hx-font-size-md)] - Label font size at lg.\n * @cssprop [--hx-stat-trend-up-color=var(--hx-color-success-700)] - Trend up text color.\n * @cssprop [--hx-stat-trend-up-bg=var(--hx-color-success-50)] - Trend up background color.\n * @cssprop [--hx-stat-trend-down-color=var(--hx-color-error-700)] - Trend down text color.\n * @cssprop [--hx-stat-trend-down-bg=var(--hx-color-error-50)] - Trend down background color.\n */\n@customElement('hx-stat')\nexport class HelixStat extends LitElement {\n static override styles = [tokenStyles, helixStatStyles];\n\n /**\n * The metric label displayed below the value.\n * @attr label\n */\n @property({ type: String, reflect: true })\n label = '';\n\n /**\n * The metric value displayed prominently.\n * @attr value\n */\n @property({ type: String, reflect: true })\n value = '';\n\n /**\n * Trend direction indicator. 'neutral' hides the indicator.\n * @attr trend\n */\n @property({ type: String, reflect: true })\n trend: StatTrend = 'neutral';\n\n /**\n * Size variant controlling font size.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: StatSize = 'md';\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-stat', 'The \"size\" attribute is deprecated. Use \"hx-size\" instead.');\n this.size = legacySize as StatSize;\n }\n }\n\n // ─── Slot Detection ───\n\n /** @internal */\n @state() private _hasIcon = false;\n\n /** @internal */\n private _onIconSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasIcon = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n // ─── Render Helpers ───\n\n /** @internal */\n private _renderTrendArrow(trend: 'up' | 'down'): ReturnType<typeof html> {\n if (trend === 'up') {\n return html`\n <svg\n class=\"stat__trend-arrow\"\n aria-hidden=\"true\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6 10V2M6 2L2 6M6 2L10 6\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n `;\n }\n return html`\n <svg\n class=\"stat__trend-arrow\"\n aria-hidden=\"true\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6 2V10M6 10L2 6M6 10L10 6\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n `;\n }\n\n // ─── Render ───\n\n override render() {\n const containerClasses = {\n stat: true,\n [`stat--${this.size}`]: true,\n };\n\n const hasTrend = this.trend !== 'neutral';\n\n return html`\n <div part=\"container\" class=${classMap(containerClasses)}>\n <div part=\"header\" class=\"stat__header\">\n <span part=\"icon\" class=\"stat__icon\" ?hidden=${!this._hasIcon}>\n <slot name=\"icon\" @slotchange=${this._onIconSlotChange}></slot>\n </span>\n <span part=\"value\" class=\"stat__value\">${this.value}</span>\n ${hasTrend\n ? html`\n <span\n part=\"trend\"\n class=\"stat__trend stat__trend--${this.trend}\"\n role=\"img\"\n aria-label=\"Trend: ${this.trend}\"\n >\n ${this._renderTrendArrow(this.trend as 'up' | 'down')}\n </span>\n `\n : nothing}\n </div>\n <span part=\"label\" class=\"stat__label\">${this.label}</span>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-stat': HelixStat;\n }\n}\n"],"names":["helixStatStyles","css","HelixStat","LitElement","legacySize","e","slot","trend","html","containerClasses","hasTrend","classMap","nothing","tokenStyles","__decorateClass","property","state","customElement"],"mappings":";;;;AAEO,MAAMA,IAAkBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AC4CxB,IAAMC,IAAN,cAAwBC,EAAW;AAAA,EAAnC,cAAA;AAAA,UAAA,GAAA,SAAA,GAQL,KAAA,QAAQ,IAOR,KAAA,QAAQ,IAOR,KAAA,QAAmB,WAOnB,KAAA,OAAiB,MAkBR,KAAQ,WAAW;AAAA,EAAA;AAAA;AAAA,EAdnB,oBAA0B;AACjC,UAAM,kBAAA;AAGN,UAAMC,IAAa,KAAK,a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AAQ,SAAS,IAAM;AAAA,GAd9Bb,EAeX,WAAA,SAAA,CAAA;AAOAY,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GArB9Bb,EAsBX,WAAA,SAAA,CAAA;AAOAY,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM,WAAW,WAAW;AAAA,GA5BpDb,EA6BX,WAAA,QAAA,CAAA;AAkBiBY,EAAA;AAAA,EAAhBE,EAAA;AAAM,GA/CId,EA+CM,WAAA,YAAA,CAAA;AA/CNA,IAANY,EAAA;AAAA,EADNG,EAAc,SAAS;AAAA,GACXf,CAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hx-status-indicator-C1BwEvUw.js","sources":["../../src/components/hx-status-indicator/hx-status-indicator.styles.ts","../../src/components/hx-status-indicator/hx-status-indicator.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixStatusIndicatorStyles = css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n flex-shrink: 0;\n --_dot-color: var(--hx-status-indicator-color-default, var(--hx-color-neutral-300, #ced4da));\n }\n\n .indicator {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--_indicator-size);\n height: var(--_indicator-size);\n flex-shrink: 0;\n }\n\n .indicator__dot {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: var(--_dot-color);\n position: relative;\n z-index: 1; /* dot above pulse ring within shadow root */\n }\n\n .indicator__pulse-ring {\n display: none;\n position: absolute;\n inset: 0;\n border-radius: 50%;\n background-color: var(--hx-status-indicator-pulse-color, var(--_dot-color));\n opacity: 0.4;\n animation: hx-status-pulse var(--hx-status-indicator-pulse-duration, 1.5s) ease-out infinite;\n z-index: 0; /* pulse ring beneath dot within shadow root */\n }\n\n :host([pulse]) .indicator__pulse-ring {\n display: block;\n }\n\n @keyframes hx-status-pulse {\n 0% {\n transform: scale(1);\n opacity: 0.4;\n }\n 100% {\n transform: scale(var(--hx-status-indicator-pulse-scale, 2.5));\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host([pulse]) .indicator__pulse-ring {\n animation: none;\n display: none;\n }\n }\n\n /* ─── Size Variants ─── */\n\n :host([size='sm']) {\n --_indicator-size: var(--hx-status-indicator-size-sm, var(--hx-size-2));\n }\n\n :host([size='md']) {\n --_indicator-size: var(--hx-status-indicator-size-md, var(--hx-size-3));\n }\n\n :host([size='lg']) {\n --_indicator-size: var(--hx-status-indicator-size-lg, var(--hx-size-4));\n }\n\n /* ─── Status Colors ─── */\n\n :host([status='online']) {\n --_dot-color: var(--hx-status-indicator-color-online, var(--hx-color-success-500));\n }\n\n :host([status='offline']) {\n --_dot-color: var(--hx-status-indicator-color-offline, var(--hx-color-neutral-400));\n }\n\n :host([status='away']) {\n --_dot-color: var(--hx-status-indicator-color-away, var(--hx-color-warning-500));\n }\n\n :host([status='busy']) {\n --_dot-color: var(--hx-status-indicator-color-busy, var(--hx-color-danger-500));\n }\n\n :host([status='unknown']) {\n --_dot-color: var(--hx-status-indicator-color-unknown, var(--hx-color-neutral-300));\n }\n`;\n","import { LitElement, html, type PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { devWarn } from '../../utils/dev-warn.js';\nimport { helixStatusIndicatorStyles } from './hx-status-indicator.styles.js';\n\nexport type StatusIndicatorStatus = 'online' | 'offline' | 'away' | 'busy' | 'unknown';\nexport type StatusIndicatorSize = 'sm' | 'md' | 'lg';\n\nconst STATUS_LABELS: Record<StatusIndicatorStatus, string> = {\n online: 'Online',\n offline: 'Offline',\n away: 'Away',\n busy: 'Busy',\n unknown: 'Unknown',\n};\n\n/**\n * A colored dot/badge indicating system or entity health status.\n * Purely visual — no slots. Supports an animated pulse ring.\n *\n * Uses `role=\"img\"` with an auto-generated `aria-label` (e.g. \"Status: Online\").\n * When used decoratively alongside visible text that conveys the same status information\n * (e.g. \"Provider is available\"), set `aria-hidden=\"true\"` on the host element to prevent\n * duplicate announcements to screen reader users. This is the recommended composition\n * pattern in healthcare dashboards.\n *\n * @remarks\n * The status vocabulary (`online`, `offline`, `away`, `busy`, `unknown`) is the intentional\n * implementation canonical form for this component. Although a prior spec draft used\n * `active/inactive/error/warning`, the current vocabulary was approved as a deliberate\n * design decision for flexibility and UX clarity in healthcare dashboard contexts.\n *\n * @summary Status indicator dot component.\n *\n * @tag hx-status-indicator\n *\n * @csspart base - The dot element.\n * @csspart pulse-ring - The animated pulse ring element.\n *\n * @cssprop [--hx-status-indicator-color-online] - Override color for the \"online\" status dot.\n * @cssprop [--hx-status-indicator-color-offline] - Override color for the \"offline\" status dot.\n * @cssprop [--hx-status-indicator-color-away] - Override color for the \"away\" status dot.\n * @cssprop [--hx-status-indicator-color-busy] - Override color for the \"busy\" status dot.\n * @cssprop [--hx-status-indicator-color-unknown] - Override color for the \"unknown\" status dot.\n * @cssprop [--hx-status-indicator-size-sm] - Override size for the \"sm\" variant.\n * @cssprop [--hx-status-indicator-size-md] - Override size for the \"md\" variant.\n * @cssprop [--hx-status-indicator-size-lg] - Override size for the \"lg\" variant.\n * @cssprop [--hx-status-indicator-pulse-duration] - Override pulse animation duration.\n * @cssprop [--hx-status-indicator-pulse-scale] - Override pulse animation max scale.\n * @cssprop [--hx-status-indicator-pulse-color] - Override pulse ring color independently from dot color.\n */\n@customElement('hx-status-indicator')\nexport class HelixStatusIndicator extends LitElement {\n static override styles = [tokenStyles, helixStatusIndicatorStyles];\n\n /**\n * The status to display.\n * @attr status\n */\n @property({ type: String, reflect: true })\n status: StatusIndicatorStatus = 'unknown';\n\n /**\n * Size of the indicator dot.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: StatusIndicatorSize = 'md';\n\n /**\n * Whether to show an animated pulse ring around the dot.\n * Animation is suppressed when prefers-reduced-motion is active.\n * @attr pulse\n * @remarks\n * In Twig (Drupal) templates, render as a bare attribute: `pulse` — NOT `pulse=\"true\"`.\n * The value is ignored; only attribute presence matters.\n */\n @property({ type: Boolean, reflect: true })\n pulse = false;\n\n /**\n * Accessible label for the indicator. Defaults to \"Status: {Status}\".\n * Set aria-hidden=\"true\" on the host when status is conveyed by adjacent text.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /** @internal */\n private _getLabel(): string {\n if (this.label) return this.label;\n const statusText = STATUS_LABELS[this.status] ?? 'Unknown';\n return `Status: ${statusText}`;\n }\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-status-indicator', 'The \"size\" attribute is deprecated. Use \"hx-size\" instead.');\n this.size = legacySize as StatusIndicatorSize;\n }\n // T3-01-4: Place role=\"img\" on the host element for robust AT traversal.\n // Some screen reader + browser combinations skip shadow children; host-level\n // ARIA attributes are more reliable across the flat accessibility tree.\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'img');\n }\n this.setAttribute('aria-label', this._getLabel());\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n // Keep host aria-label in sync when status or label properties change.\n if (changedProperties.has('status') || changedProperties.has('label')) {\n this.setAttribute('aria-label', this._getLabel());\n }\n }\n\n override render() {\n return html`\n <div class=\"indicator\">\n <div class=\"indicator__pulse-ring\" part=\"pulse-ring\"></div>\n <div class=\"indicator__dot\" part=\"base\"></div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-status-indicator': HelixStatusIndicator;\n }\n}\n"],"names":["helixStatusIndicatorStyles","css","STATUS_LABELS","HelixStatusIndicator","LitElement","legacySize","changedProperties","html","tokenStyles","__decorateClass","property","customElement"],"mappings":";;;AAEO,MAAMA,IAA6BC;AAAA;AAAA;AAAA;AAA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AA,EAES,QAAQC,GAA+C;AAC9D,UAAM,QAAQA,CAAiB,IAE3BA,EAAkB,IAAI,QAAQ,KAAKA,EAAkB,IAAI,OAAO,MAClE,KAAK,aAAa,cAAc,KAAK,UAAA,CAAW;AAAA,EAEpD;AAAA,EAES,SAAS;AAChB,WAAOC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMT;AACF;AA/EaJ,EACK,SAAS,CAACK,GAAaR,CAA0B;AAOjES,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAP9BP,EAQX,WAAA,UAAA,CAAA;AAOAM,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM,WAAW,WAAW;AAAA,GAdpDP,EAeX,WAAA,QAAA,CAAA;AAWAM,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAzB/BP,EA0BX,WAAA,SAAA,CAAA;AAQAM,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAjCfP,EAkCX,WAAA,SAAA,CAAA;AAlCWA,IAANM,EAAA;AAAA,EADNE,EAAc,qBAAqB;AAAA,GACvBR,CAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hx-step-BIVWSPxd.js","sources":["../../src/components/hx-steps/hx-steps.styles.ts","../../src/components/hx-steps/hx-steps.ts","../../src/components/hx-steps/hx-step.styles.ts","../../src/components/hx-steps/hx-step.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixStepsStyles = css`\n :host {\n display: block;\n\n /* ─── Size defaults (md) ─── */\n --hx-steps-indicator-size: 2rem;\n --hx-steps-indicator-font-size: var(--hx-font-size-sm, 0.875rem);\n --hx-steps-indicator-icon-size: 1rem;\n --hx-steps-label-font-size: var(--hx-font-size-sm, 0.875rem);\n --hx-steps-description-font-size: var(--hx-font-size-xs, 0.75rem);\n\n /* ─── Item layout defaults (horizontal) ─── */\n --hx-steps-item-flex: 1;\n --hx-steps-item-width: auto;\n }\n\n .steps {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n }\n\n /* ─── Orientation: vertical ─── */\n\n :host([orientation='vertical']) {\n --hx-steps-item-flex: initial;\n --hx-steps-item-width: 100%;\n }\n\n :host([orientation='vertical']) .steps {\n flex-direction: column;\n }\n\n /* ─── Size: sm ─── */\n\n :host([size='sm']) {\n --hx-steps-indicator-size: 1.5rem;\n --hx-steps-indicator-font-size: var(--hx-font-size-xs, 0.75rem);\n --hx-steps-indicator-icon-size: 0.75rem;\n --hx-steps-label-font-size: var(--hx-font-size-xs, 0.75rem);\n --hx-steps-description-font-size: var(--hx-font-size-xs, 0.75rem);\n }\n\n /* ─── Size: lg ─── */\n\n :host([size='lg']) {\n --hx-steps-indicator-size: 2.5rem;\n --hx-steps-indicator-font-size: var(--hx-font-size-md, 1rem);\n --hx-steps-indicator-icon-size: 1.25rem;\n --hx-steps-label-font-size: var(--hx-font-size-md, 1rem);\n --hx-steps-description-font-size: var(--hx-font-size-sm, 0.875rem);\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { devWarn } from '../../utils/dev-warn.js';\nimport { helixStepsStyles } from './hx-steps.styles.js';\nimport type { HelixStep } from './hx-step.js';\n\n/**\n * A multi-step wizard / stepper progress indicator. Renders a sequence of\n * `<hx-step>` children as a horizontal or vertical step tracker with connector\n * lines and status-based styling.\n *\n * Provide an `aria-label` on `<hx-steps>` to describe the step process for assistive technology.\n *\n * @summary Multi-step progress indicator container.\n *\n * @tag hx-steps\n *\n * @slot - Default slot for `<hx-step>` elements.\n *\n * @fires {CustomEvent<{step: HelixStep, index: number}>} hx-step-click - Dispatched when\n * a step is clicked. Detail contains the clicked `step` element and its zero-based `index`.\n *\n * @csspart base - The inner wrapper element.\n *\n * @cssprop [--hx-steps-indicator-size=2rem] - Step indicator circle diameter.\n * @cssprop [--hx-steps-connector-color=var(--hx-color-neutral-200)] - Connector line color.\n * @cssprop [--hx-steps-label-color=var(--hx-color-neutral-600)] - Step label text color.\n * @cssprop [--hx-steps-description-color=var(--hx-color-neutral-500)] - Step description color.\n */\n@customElement('hx-steps')\nexport class HelixSteps extends LitElement {\n static override styles = [tokenStyles, helixStepsStyles];\n\n // ─── Public Properties ───\n\n /**\n * Layout orientation of the steps.\n * @attr orientation\n */\n @property({ type: String, reflect: true })\n orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Size variant of the steps.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Accessible label for the list. Forwarded to the inner list element.\n * @attr aria-label\n */\n @property({ type: String, attribute: 'aria-label' })\n ariaLabel: string | null = null;\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-steps', 'The \"size\" attribute is deprecated. Use \"hx-size\" instead.');\n this.size = legacySize as 'sm' | 'md' | 'lg';\n }\n this.addEventListener('hx-step-click-internal', this._handleStepClickInternal);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('hx-step-click-internal', this._handleStepClickInternal);\n }\n\n override firstUpdated(): void {\n this._syncChildren();\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('orientation') || changedProperties.has('size')) {\n this._syncChildren();\n }\n }\n\n // ─── Child Sync ───\n\n /** @internal */\n private _getSteps(): HelixStep[] {\n return Array.from(this.querySelectorAll(':scope > hx-step')) as HelixStep[];\n }\n\n /** @internal */\n private _syncChildren(): void {\n const steps = this._getSteps();\n steps.forEach((step, i) => {\n step.orientation = this.orientation;\n step.size = this.size;\n step.index = i;\n });\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleSlotChange = (): void => {\n this._syncChildren();\n };\n\n /** @internal */\n private _handleStepClickInternal = (e: Event): void => {\n e.stopPropagation();\n const steps = this._getSteps();\n const step = e\n .composedPath()\n .find(\n (el): el is HelixStep => el instanceof Element && el.tagName.toLowerCase() === 'hx-step',\n );\n if (!step) return;\n const index = steps.indexOf(step);\n\n /**\n * Dispatched when a step is clicked.\n * @event hx-step-click\n */\n this.dispatchEvent(\n new CustomEvent<{ step: HelixStep; index: number }>('hx-step-click', {\n bubbles: true,\n composed: true,\n detail: { step, index },\n }),\n );\n };\n\n // ─── Render ───\n\n override render() {\n return html`\n <div part=\"base\" class=\"steps\" role=\"list\" aria-label=${this.ariaLabel ?? nothing}>\n <slot @slotchange=${this._handleSlotChange}></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-steps': HelixSteps;\n }\n}\n","import { css } from 'lit';\n\nexport const helixStepStyles = css`\n :host {\n display: flex;\n flex: var(--hx-steps-item-flex, 1);\n width: var(--hx-steps-item-width, auto);\n min-width: 0;\n }\n\n /* ─── Visually Hidden (SR only) ─── */\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 /* ─── Step Wrapper ─── */\n\n .step {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n cursor: pointer;\n }\n\n /* ─── Focus ─── */\n\n :host(:focus-visible) .step__indicator {\n outline: 2px solid var(--hx-color-primary-500);\n outline-offset: 2px;\n }\n\n /* ─── Track (indicator + connector) ─── */\n\n .step__track {\n display: flex;\n flex-direction: row;\n align-items: center;\n width: 100%;\n }\n\n /* ─── Indicator ─── */\n\n .step__indicator {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--hx-steps-indicator-size, 2rem);\n height: var(--hx-steps-indicator-size, 2rem);\n border-radius: var(--hx-border-radius-full, 9999px);\n border: 2px solid var(--hx-color-neutral-300);\n background-color: var(--hx-color-neutral-0);\n color: var(--hx-color-neutral-500);\n font-size: var(--hx-steps-indicator-font-size, var(--hx-font-size-sm));\n font-weight: var(--hx-font-weight-semibold);\n font-family: var(--hx-font-family-sans);\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n border-color var(--hx-transition-fast, 150ms ease),\n color var(--hx-transition-fast, 150ms ease);\n position: relative;\n z-index: 1;\n }\n\n .step__indicator svg {\n width: var(--hx-steps-indicator-icon-size, 1rem);\n height: var(--hx-steps-indicator-icon-size, 1rem);\n }\n\n /* ─── Connector ─── */\n\n .step__connector {\n flex: 1;\n height: var(--hx-steps-connector-thickness, var(--hx-border-width, 2px));\n min-width: 0;\n background-color: var(--hx-steps-connector-color, var(--hx-color-neutral-200));\n transition: background-color var(--hx-transition-fast, 150ms ease);\n }\n\n :host(:last-child) .step__connector {\n display: none;\n }\n\n /* ─── Label Area ─── */\n\n .step__label-area {\n text-align: center;\n margin-top: var(--hx-space-2, 0.5rem);\n width: 100%;\n padding: 0 var(--hx-space-1, 0.25rem);\n }\n\n .step__label {\n font-family: var(--hx-font-family-sans);\n font-size: var(--hx-steps-label-font-size, var(--hx-font-size-sm));\n font-weight: var(--hx-font-weight-medium);\n color: var(--hx-steps-label-color, var(--hx-color-neutral-600));\n line-height: var(--hx-line-height-tight, 1.25);\n }\n\n .step__description {\n font-family: var(--hx-font-family-sans);\n font-size: var(--hx-steps-description-font-size, var(--hx-font-size-xs));\n color: var(--hx-steps-description-color, var(--hx-color-neutral-500));\n margin-top: var(--hx-space-1, 0.25rem);\n line-height: var(--hx-line-height-normal, 1.5);\n }\n\n /* ─── Status: active ─── */\n\n /* Active: outlined indicator (in-progress) — visually distinct from complete (filled) */\n :host([status='active']) .step__indicator {\n border-color: var(--hx-color-primary-500);\n background-color: var(--hx-color-primary-500);\n color: var(--hx-color-neutral-0);\n }\n\n :host([status='active']) .step__label {\n color: var(--hx-color-primary-700);\n font-weight: var(--hx-font-weight-semibold);\n }\n\n /* ─── Status: complete ─── */\n\n /* Complete: filled indicator with darker shade — visually distinct from active */\n :host([status='complete']) .step__indicator {\n border-color: var(--hx-color-primary-700);\n background-color: var(--hx-color-primary-700);\n color: var(--hx-color-neutral-0);\n }\n\n :host([status='complete']) .step__connector {\n background-color: var(--hx-steps-connector-complete-color, var(--hx-color-primary-500));\n }\n\n :host([status='complete']) .step__label {\n color: var(--hx-color-neutral-700);\n }\n\n /* ─── Status: error ─── */\n\n :host([status='error']) .step__indicator {\n border-color: var(--hx-color-error-500);\n background-color: var(--hx-color-error-500);\n color: var(--hx-color-neutral-0);\n }\n\n :host([status='error']) .step__label {\n color: var(--hx-color-error-700);\n }\n\n /* ─── Status: disabled ─── */\n\n :host([disabled]) .step {\n cursor: not-allowed;\n opacity: 0.5;\n pointer-events: none;\n }\n\n :host([disabled]) .step__indicator {\n border-color: var(--hx-color-neutral-300);\n background-color: var(--hx-color-neutral-100);\n color: var(--hx-color-neutral-400);\n }\n\n /* ─── Vertical Layout ─── */\n\n :host([orientation='vertical']) {\n flex: initial;\n width: 100%;\n }\n\n :host([orientation='vertical']) .step {\n flex-direction: row;\n align-items: flex-start;\n gap: var(--hx-space-3, 0.75rem);\n }\n\n :host([orientation='vertical']) .step__track {\n flex-direction: column;\n align-items: center;\n width: auto;\n flex-shrink: 0;\n }\n\n :host([orientation='vertical']) .step__connector {\n width: var(--hx-steps-connector-thickness, var(--hx-border-width, 2px));\n height: auto;\n min-height: var(--hx-space-8, 2rem);\n flex: 1;\n }\n\n :host([orientation='vertical']) .step__label-area {\n text-align: left;\n margin-top: 0;\n padding-bottom: var(--hx-space-4, 1rem);\n padding-inline-start: 0;\n }\n\n :host([orientation='vertical']:last-child) .step__label-area {\n padding-bottom: 0;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .step__indicator {\n transition: none;\n }\n\n .step__connector {\n transition: none;\n }\n }\n\n /* ─── Dark Mode ─── */\n\n @media (prefers-color-scheme: dark) {\n .step__indicator {\n background-color: var(--hx-color-neutral-800);\n border-color: var(--hx-color-neutral-600);\n color: var(--hx-color-neutral-300);\n }\n\n .step__connector {\n background-color: var(--hx-color-neutral-700);\n }\n\n .step__label {\n color: var(--hx-color-neutral-300);\n }\n\n .step__description {\n color: var(--hx-color-neutral-400);\n }\n\n :host([status='active']) .step__label {\n color: var(--hx-color-primary-300);\n }\n\n :host([status='complete']) .step__label {\n color: var(--hx-color-neutral-200);\n }\n\n :host([status='error']) .step__label {\n color: var(--hx-color-error-300);\n }\n\n :host([disabled]) .step__indicator {\n background-color: var(--hx-color-neutral-900);\n border-color: var(--hx-color-neutral-700);\n color: var(--hx-color-neutral-600);\n }\n }\n`;\n","import { LitElement, html, type PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixStepStyles } from './hx-step.styles.js';\n\n/**\n * An individual step, designed to be used inside an `<hx-steps>` container.\n * Represents a single step in a multi-step wizard or progress indicator.\n *\n * @summary Individual step item within an `<hx-steps>` progress indicator.\n *\n * @tag hx-step\n *\n * @slot icon - Custom icon for the step indicator. Shown when status is `pending` or `active`.\n * @slot label - Step label text. Falls back to the `label` property.\n * @slot description - Step description text. Falls back to the `description` property.\n *\n * @csspart base - The outermost wrapper element.\n * @csspart indicator - The circular step indicator.\n * @csspart connector - The line connecting this step to the next.\n * @csspart label - The step label element.\n * @csspart description - The step description element.\n *\n * @cssprop [--hx-steps-indicator-size=2rem] - Indicator circle diameter.\n * @cssprop [--hx-steps-indicator-font-size=var(--hx-font-size-sm)] - Indicator text size.\n * @cssprop [--hx-steps-indicator-icon-size=1rem] - Indicator icon size.\n * @cssprop [--hx-steps-label-font-size=var(--hx-font-size-sm)] - Label font size.\n * @cssprop [--hx-steps-description-font-size=var(--hx-font-size-xs)] - Description font size.\n * @cssprop [--hx-steps-connector-color=var(--hx-color-neutral-200)] - Connector line color.\n * @cssprop [--hx-steps-connector-complete-color=var(--hx-color-primary-500)] - Connector color when step is complete.\n * @cssprop [--hx-steps-connector-thickness=var(--hx-border-width,2px)] - Connector line thickness.\n * @cssprop [--hx-steps-label-color=var(--hx-color-neutral-600)] - Label text color.\n * @cssprop [--hx-steps-description-color=var(--hx-color-neutral-500)] - Description text color.\n */\n@customElement('hx-step')\nexport class HelixStep extends LitElement {\n static override styles = [tokenStyles, helixStepStyles];\n\n // ─── Public Properties ───\n\n /**\n * The step label text.\n * @attr label\n */\n @property({ type: String, reflect: true })\n label = '';\n\n /**\n * Current status of the step.\n * @attr status\n */\n @property({ type: String, reflect: true })\n status: 'pending' | 'active' | 'complete' | 'error' = 'pending';\n\n /**\n * Optional description text shown below the label.\n * @attr description\n */\n @property({ type: String, reflect: true })\n description = '';\n\n /**\n * Whether the step is disabled and non-interactive.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n // ─── Internal Properties (set by parent hx-steps) ───\n\n /**\n * Layout orientation. Set by the parent `<hx-steps>` container via JS property.\n * Do not set this attribute directly on `<hx-step>` — use the `orientation`\n * property on the parent `<hx-steps>` container instead. The parent will\n * propagate the value to all child steps via `_syncChildren()`.\n * @internal\n */\n @property({ attribute: false })\n orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Size variant. Set by the parent `<hx-steps>` container via JS property.\n * Do not set this attribute directly on `<hx-step>` — use the `size` property\n * on the parent `<hx-steps>` container instead. The parent will propagate the\n * value to all child steps via `_syncChildren()`.\n * @internal\n */\n @property({ attribute: false })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Zero-based index of this step. Set by the parent `<hx-steps>` container.\n * @internal\n */\n @property({ type: Number })\n index = 0;\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n this.setAttribute('tabindex', this.disabled ? '-1' : '0');\n this.addEventListener('keydown', this._handleKeydown);\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('keydown', this._handleKeydown);\n }\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('status')) {\n if (this.status === 'active') {\n this.setAttribute('aria-current', 'step');\n } else {\n this.removeAttribute('aria-current');\n }\n }\n if (changedProperties.has('disabled')) {\n if (this.disabled) {\n this.setAttribute('tabindex', '-1');\n this.setAttribute('aria-disabled', 'true');\n } else {\n this.setAttribute('tabindex', '0');\n this.removeAttribute('aria-disabled');\n }\n }\n if (changedProperties.has('orientation')) {\n this.setAttribute('orientation', this.orientation);\n }\n if (changedProperties.has('size')) {\n this.setAttribute('size', this.size);\n }\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleKeydown = (event: KeyboardEvent): void => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this._handleClick();\n }\n };\n\n /** @internal */\n private _handleClick(): void {\n if (this.disabled) {\n return;\n }\n\n /**\n * Internal event dispatched to signal step click to the parent container.\n * @internal\n */\n this.dispatchEvent(\n new CustomEvent<void>('hx-step-click-internal', {\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n // ─── Render Helpers ───\n\n /** @internal */\n private _renderCheckmark() {\n return html`\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M20 6L9 17l-5-5\" />\n </svg>\n <span class=\"sr-only\">Complete</span>\n `;\n }\n\n /** @internal */\n private _renderXMark() {\n return html`\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n >\n <path d=\"M18 6L6 18M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">Error</span>\n `;\n }\n\n /** @internal */\n private _renderIndicatorContent() {\n if (this.status === 'complete') {\n return this._renderCheckmark();\n }\n if (this.status === 'error') {\n return this._renderXMark();\n }\n return html`<slot name=\"icon\">${this.index + 1}</slot>`;\n }\n\n // ─── Render ───\n\n override render() {\n return html`\n <div part=\"base\" class=\"step\" @click=${this._handleClick}>\n <div class=\"step__track\">\n <div part=\"indicator\" class=\"step__indicator\">${this._renderIndicatorContent()}</div>\n <div part=\"connector\" class=\"step__connector\" aria-hidden=\"true\"></div>\n </div>\n <div class=\"step__label-area\">\n <div part=\"label\" class=\"step__label\">\n <slot name=\"label\">${this.label}</slot>\n </div>\n <div part=\"description\" class=\"step__description\">\n <slot name=\"description\">${this.description}</slot>\n </div>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-step': HelixStep;\n }\n}\n"],"names":["helixStepsStyles","css","HelixSteps","LitElement","e","steps","step","el","index","legacySize","changedProperties","html","nothing","tokenStyles","__decorateClass","property","customElement","helixStepStyles","HelixStep","event"],"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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AC6BzB,IAAMC,IAAN,cAAyBC,EAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA,GAUL,KAAA,cAAyC,cAOzC,KAAA,OAA2B,MAO3B,KAAA,YAA2B,MAoD3B,KAAQ,oBAAoB,MAAY;AACtC,WAAK,cAAA;AAAA,IACP,GAGA,KAAQ,2BAA2B,CAACC,MAAmB;AACrD,MA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../../src/components/hx-structured-list/hx-structured-list.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixStructuredListStyles = css`\n :host {\n display: block;\n --_border-color: var(--hx-structured-list-border-color, var(--hx-color-neutral-200, #e2e8f0));\n --_border-width: var(--hx-structured-list-border-width, var(--hx-border-width-thin, 1px));\n --_bg-stripe: var(--hx-structured-list-stripe-bg, var(--hx-color-neutral-50, #f8fafc));\n --_padding-block: var(--hx-structured-list-padding-block, var(--hx-space-4, 1rem));\n --_padding-inline: var(--hx-structured-list-padding-inline, var(--hx-space-4, 1rem));\n }\n\n :host([condensed]) {\n --_padding-block: var(--hx-structured-list-condensed-padding-block, var(--hx-space-2, 0.5rem));\n --_padding-inline: var(\n --hx-structured-list-condensed-padding-inline,\n var(--hx-space-3, 0.75rem)\n );\n }\n\n .list {\n display: block;\n margin: 0;\n padding: 0;\n list-style: none;\n }\n\n :host([bordered]) .list {\n border: var(--_border-width) solid var(--_border-color);\n border-radius: var(--hx-border-radius-md, 0.375rem);\n overflow: hidden;\n }\n\n :host([striped]) ::slotted(hx-structured-list-row:nth-of-type(even)) {\n background: var(--_bg-stripe);\n }\n`;\n\nexport const helixStructuredListRowStyles = css`\n :host {\n display: block;\n }\n\n .row {\n display: grid;\n grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);\n align-items: baseline;\n padding-block: var(--_padding-block, var(--hx-space-4, 1rem));\n padding-inline: var(--_padding-inline, var(--hx-space-4, 1rem));\n gap: var(--hx-space-4, 1rem);\n }\n\n :host(:not(:last-of-type)) .row {\n border-bottom: var(--_border-width, var(--hx-border-width-thin, 1px)) solid\n var(--_border-color, var(--hx-color-neutral-200, #e2e8f0));\n }\n\n .row__label {\n font-weight: var(--hx-font-weight-medium, 500);\n color: var(--hx-structured-list-label-color, var(--hx-color-neutral-700, #374151));\n font-size: var(--hx-font-size-sm, 0.875rem);\n }\n\n .row__value {\n color: var(--hx-structured-list-value-color, var(--hx-color-neutral-900, #111827));\n font-size: var(--hx-font-size-sm, 0.875rem);\n }\n\n .row__actions {\n display: flex;\n align-items: center;\n gap: var(--hx-space-2, 0.5rem);\n }\n\n .row__actions:empty {\n display: none;\n }\n`;\n","import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport {\n helixStructuredListStyles,\n helixStructuredListRowStyles,\n} from './hx-structured-list.styles.js';\n\n/**\n * Container for structured key-value data display. Renders as a description\n * list for accessible term/definition semantics. Use `hx-structured-list-row`\n * as direct children.\n *\n * @summary Key-value data display container for detail and summary views.\n *\n * @tag hx-structured-list\n *\n * @slot - One or more `hx-structured-list-row` elements.\n *\n * @csspart base - The root list element.\n *\n * @cssprop [--hx-structured-list-border-color=var(--hx-color-neutral-200)] - Border color when bordered.\n * @cssprop [--hx-structured-list-border-width=var(--hx-border-width-thin)] - Border width when bordered.\n * @cssprop [--hx-structured-list-stripe-bg=var(--hx-color-neutral-50)] - Stripe background color.\n * @cssprop [--hx-structured-list-padding-block=var(--hx-space-4)] - Row block padding.\n * @cssprop [--hx-structured-list-padding-inline=var(--hx-space-4)] - Row inline padding.\n * @cssprop [--hx-structured-list-condensed-padding-block=var(--hx-space-2)] - Row block padding (condensed).\n * @cssprop [--hx-structured-list-condensed-padding-inline=var(--hx-space-3)] - Row inline padding (condensed).\n */\n@customElement('hx-structured-list')\nexport class HelixStructuredList extends LitElement {\n static override styles = [tokenStyles, helixStructuredListStyles];\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Set role on the host element so the list/listitem relationship is\n // preserved in the light DOM tree, crossing shadow boundaries correctly.\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'list');\n }\n }\n\n /**\n * Renders a border around the entire list.\n * @attr bordered\n */\n @property({ type: Boolean, reflect: true })\n bordered = false;\n\n /**\n * Reduces row padding for denser layouts.\n * @attr condensed\n */\n @property({ type: Boolean, reflect: true })\n condensed = false;\n\n /**\n * Alternates row background colors for easier scanning.\n * @attr striped\n */\n @property({ type: Boolean, reflect: true })\n striped = false;\n\n override render() {\n return html`\n <div part=\"base\" class=\"list\">\n <slot></slot>\n </div>\n `;\n }\n}\n\n/**\n * A single row within an `hx-structured-list`. Renders a label/value pair\n * with an optional actions area.\n *\n * @summary A label-value row for use inside `hx-structured-list`.\n *\n * @tag hx-structured-list-row\n *\n * @slot label - The term or key label (`<dt>` semantics).\n * @slot - The value or definition (`<dd>` semantics).\n * @slot actions - Optional action controls (edit button, etc.).\n *\n * @csspart base - The root row element.\n * @csspart label - The label (`dt`) cell.\n * @csspart value - The value (`dd`) cell.\n * @csspart actions - The actions cell.\n *\n * @cssprop [--hx-structured-list-label-color=var(--hx-color-neutral-700)] - Label text color.\n * @cssprop [--hx-structured-list-value-color=var(--hx-color-neutral-900)] - Value text color.\n */\n@customElement('hx-structured-list-row')\nexport class HelixStructuredListRow extends LitElement {\n static override styles = [tokenStyles, helixStructuredListRowStyles];\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Set role on the host element so screen readers see listitem as a direct\n // child of the hx-structured-list host (which carries role=\"list\"),\n // preserving the list/listitem relationship across shadow boundaries.\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'listitem');\n }\n }\n\n override render() {\n return html`\n <div part=\"base\" class=\"row\">\n <div part=\"label\" class=\"row__label\">\n <slot name=\"label\"></slot>\n </div>\n <div part=\"value\" class=\"row__value\">\n <slot></slot>\n <div part=\"actions\" class=\"row__actions\">\n <slot name=\"actions\"></slot>\n </div>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-structured-list': HelixStructuredList;\n 'hx-structured-list-row': HelixStructuredListRow;\n }\n}\n"],"names":["helixStructuredListStyles","css","helixStructuredListRowStyles","HelixStructuredList","LitElement","html","tokenStyles","__decorateClass","property","customElement","HelixStructuredListRow"],"mappings":";;;AAEO,MAAMA,IAA4BC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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C3B,KAAK,aAAa,QAAQ,UAAU;AAAA,EAExC;AAAA,EAES,SAAS;AAChB,WAAOC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaT;AACF;AA5BaK,EACK,SAAS,CAACJ,GAAaJ,CAA4B;AADxDQ,IAANH,EAAA;AAAA,EADNE,EAAc,wBAAwB;AAAA,GAC1BC,CAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hx-switch-BgX8kuWt.js","sources":["../../src/components/hx-switch/hx-switch.styles.ts","../../src/components/hx-switch/hx-switch.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixSwitchStyles = 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 /* --- Layout --- */\n\n .switch {\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-1, 0.25rem);\n font-family: var(--hx-font-family-sans, sans-serif);\n }\n\n .switch__control-row {\n display: flex;\n align-items: center;\n gap: var(--hx-space-2, 0.5rem);\n }\n\n /* --- Track --- */\n\n .switch__track {\n position: relative;\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n border: none;\n padding: 0;\n border-radius: var(--hx-border-radius-full, 9999px);\n background-color: var(--hx-switch-track-bg, var(--hx-color-neutral-300, #ced4da));\n cursor: pointer;\n transition: background-color var(--hx-transition-fast, 150ms ease);\n outline: none;\n -webkit-appearance: none;\n appearance: none;\n }\n\n .switch__track:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-switch-focus-ring-color, var(--hx-focus-ring-color, #2563eb));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .switch--checked .switch__track {\n background-color: var(--hx-switch-track-checked-bg, var(--hx-color-primary-500, #2563eb));\n }\n\n /* --- Thumb --- */\n\n .switch__thumb {\n position: absolute;\n border-radius: var(--hx-border-radius-full, 9999px);\n background-color: var(--hx-switch-thumb-bg, var(--hx-color-neutral-0, #ffffff));\n box-shadow: var(--hx-switch-thumb-shadow, var(--hx-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05)));\n transition: transform var(--hx-transition-fast, 150ms ease);\n }\n\n /* --- Size: sm (track 32x18, thumb 14px) --- */\n\n .switch--sm .switch__track {\n width: var(--hx-switch-track-width-sm, var(--hx-size-8, 2rem));\n height: var(--hx-switch-track-height-sm, var(--hx-size-4-5, 1.125rem));\n }\n\n .switch--sm .switch__thumb {\n width: var(--hx-switch-thumb-size-sm, var(--hx-size-3-5, 0.875rem));\n height: var(--hx-switch-thumb-size-sm, var(--hx-size-3-5, 0.875rem));\n top: 50%;\n left: var(--hx-switch-thumb-offset, var(--hx-space-0-5, 0.125rem));\n transform: translateY(-50%);\n }\n\n .switch--sm.switch--checked .switch__thumb {\n transform: translateY(-50%)\n translateX(var(--hx-switch-thumb-size-sm, var(--hx-size-3-5, 0.875rem)));\n }\n\n /* --- Size: md (track 40x22, thumb 18px) --- */\n\n .switch--md .switch__track {\n width: var(--hx-switch-track-width-md, var(--hx-size-10, 2.5rem));\n height: var(--hx-switch-track-height-md, var(--hx-size-5-5, 1.375rem));\n }\n\n .switch--md .switch__thumb {\n width: var(--hx-switch-thumb-size-md, var(--hx-size-4-5, 1.125rem));\n height: var(--hx-switch-thumb-size-md, var(--hx-size-4-5, 1.125rem));\n top: 50%;\n left: var(--hx-switch-thumb-offset, var(--hx-space-0-5, 0.125rem));\n transform: translateY(-50%);\n }\n\n .switch--md.switch--checked .switch__thumb {\n transform: translateY(-50%)\n translateX(var(--hx-switch-thumb-size-md, var(--hx-size-4-5, 1.125rem)));\n }\n\n /* --- Size: lg (track 48x26, thumb 22px) --- */\n\n .switch--lg .switch__track {\n width: var(--hx-switch-track-width-lg, var(--hx-size-12, 3rem));\n height: var(--hx-switch-track-height-lg, var(--hx-size-6-5, 1.625rem));\n }\n\n .switch--lg .switch__thumb {\n width: var(--hx-switch-thumb-size-lg, var(--hx-size-5-5, 1.375rem));\n height: var(--hx-switch-thumb-size-lg, var(--hx-size-5-5, 1.375rem));\n top: 50%;\n left: var(--hx-switch-thumb-offset, var(--hx-space-0-5, 0.125rem));\n transform: translateY(-50%);\n }\n\n .switch--lg.switch--checked .switch__thumb {\n transform: translateY(-50%)\n translateX(var(--hx-switch-thumb-size-lg, var(--hx-size-5-5, 1.375rem)));\n }\n\n /* --- Label --- */\n\n .switch__label {\n font-size: var(--hx-font-size-sm, 0.875rem);\n font-weight: var(--hx-font-weight-medium, 500);\n color: var(--hx-switch-label-color, var(--hx-color-neutral-700, #343a40));\n line-height: var(--hx-line-height-normal, 1.5);\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .switch__required-marker {\n color: var(--hx-switch-error-color, var(--hx-color-error-text, #b91c1c));\n font-weight: var(--hx-font-weight-bold, 700);\n }\n\n /* --- Help Text & Error --- */\n\n .switch__help-text {\n font-size: var(--hx-font-size-xs, 0.75rem);\n color: var(--hx-switch-help-text-color, var(--hx-color-neutral-500, #6c757d));\n line-height: var(--hx-line-height-normal, 1.5);\n }\n\n .switch__error {\n font-size: var(--hx-font-size-xs, 0.75rem);\n color: var(--hx-switch-error-color, var(--hx-color-error-text, #b91c1c));\n line-height: var(--hx-line-height-normal, 1.5);\n }\n\n /* --- Reduced Motion --- */\n\n @media (prefers-reduced-motion: reduce) {\n .switch__track,\n .switch__thumb {\n transition: none;\n }\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixSwitchStyles } from './hx-switch.styles.js';\n\n/**\n * A toggle switch component for on/off states.\n *\n * Uses `role=\"switch\"` with `aria-checked` to convey toggle state.\n * Supports keyboard activation via Space key (per ARIA APG switch pattern).\n * Label association is handled through `aria-labelledby`, and\n * error/help text are linked via `aria-describedby`.\n *\n * @summary Form-associated toggle switch with label, error, and help text.\n *\n * @tag hx-switch\n *\n * @slot - Custom label content (overrides the label property).\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<{checked: boolean, value: string}>} hx-change - Dispatched when the switch is toggled.\n *\n * @csspart switch - The switch container (track + thumb wrapper).\n * @csspart track - The track background element.\n * @csspart thumb - The sliding thumb element.\n * @csspart label - The label text element.\n * @csspart help-text - The help text container.\n * @csspart error - The error message container.\n *\n * @cssprop [--hx-switch-track-bg=var(--hx-color-neutral-300)] - Track background color.\n * @cssprop [--hx-switch-track-checked-bg=var(--hx-color-primary-500)] - Track background when checked.\n * @cssprop [--hx-switch-thumb-bg=var(--hx-color-neutral-0)] - Thumb background color.\n * @cssprop [--hx-switch-thumb-shadow=var(--hx-shadow-sm)] - Thumb box shadow.\n * @cssprop [--hx-switch-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n * @cssprop [--hx-switch-label-color=var(--hx-color-neutral-700)] - Label text color.\n * @cssprop [--hx-switch-error-color=var(--hx-color-error-500)] - Error message color.\n * @cssprop [--hx-switch-help-text-color=var(--hx-color-neutral-500)] - Help text color.\n */\n@customElement('hx-switch')\nexport class HelixSwitch extends LitElement {\n static override styles = [tokenStyles, helixSwitchStyles];\n\n /** Monotonic counter for deterministic, unique IDs across instances. */\n /** @internal */\n private static _instanceCounter = 0;\n\n // ─── Form Association ───\n\n /** Enables the element to participate in form submission and validation. */\n static formAssociated = true;\n\n /** ElementInternals instance for form association, validation, and ARIA. */\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 * Whether the switch is toggled on.\n * @attr checked\n */\n @property({ type: Boolean, reflect: true })\n checked = false;\n\n /**\n * Whether the switch is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Whether the switch is required for form submission.\n * @attr required\n */\n @property({ type: Boolean, reflect: true })\n required = false;\n\n /**\n * The name of the switch, used for form submission.\n * @attr name\n */\n @property({ type: String })\n name = '';\n\n /**\n * The value submitted when the switch is checked.\n * @attr value\n */\n @property({ type: String })\n value = 'on';\n\n /**\n * The visible label text for the switch.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Size variant of the switch.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Error message to display. When set, the switch enters an error state.\n * @attr error\n */\n @property({ type: String })\n error = '';\n\n /**\n * Help text displayed below the switch for guidance.\n * @attr help-text\n */\n @property({ type: String, attribute: 'help-text' })\n helpText = '';\n\n /**\n * Validation message shown when the field is required but empty.\n * @attr required-message\n */\n @property({ attribute: 'required-message' })\n requiredMessage = 'This field is required.';\n\n // ─── Lifecycle ───\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('checked') || changedProperties.has('value')) {\n this._internals.setFormValue(this.checked ? this.value : null);\n this._updateValidity();\n }\n if (changedProperties.has('required')) {\n this._updateValidity();\n }\n }\n\n // ─── Form Integration ───\n\n /** Returns the associated form element, if any. */\n get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n /** Returns the validation message. */\n get validationMessage(): string {\n return this._internals.validationMessage;\n }\n\n /** Returns the ValidityState object. */\n get validity(): ValidityState {\n return this._internals.validity;\n }\n\n /** Checks whether the switch 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 /** Recalculates and sets the validity state based on required and checked. */\n /** @internal */\n private _updateValidity(): void {\n if (this.required && !this.checked) {\n this._internals.setValidity(\n { valueMissing: true },\n this.error || this.requiredMessage,\n this._trackEl ?? undefined,\n );\n } else {\n this._internals.setValidity({});\n }\n }\n\n /** Called by the form when it resets. */\n formResetCallback(): void {\n this.checked = false;\n this._internals.setFormValue(null);\n }\n\n /** Called when the form restores state (e.g., back/forward navigation). */\n formStateRestoreCallback(state: File | string | null, _mode: 'restore' | 'autocomplete'): void {\n if (typeof state === 'string') {\n this.checked = state === this.value;\n }\n }\n\n /** Called when a parent fieldset is disabled/enabled. */\n formDisabledCallback(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n /** Reference to the native button element acting as the switch track. * @internal\n */\n @query('.switch__track')\n private _trackEl: HTMLButtonElement | null | undefined;\n\n /** Whether the error slot has assigned content. */\n /** @internal */\n @state() private _hasErrorSlot = false;\n\n /** Whether the default slot has assigned content (slotted label). */\n /** @internal */\n @state() private _hasDefaultSlot = false;\n\n // ─── Slot Handlers ───\n\n /** Updates _hasErrorSlot when error slot content changes. */\n /** @internal */\n private _handleErrorSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasErrorSlot = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** Updates _hasDefaultSlot when default slot content changes. */\n /** @internal */\n private _handleDefaultSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasDefaultSlot = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n // ─── Event Handling ───\n\n /** Toggles checked state and dispatches hx-change event. */\n /** @internal */\n private _toggle(): void {\n if (this.disabled) return;\n this.checked = !this.checked;\n\n this.dispatchEvent(\n new CustomEvent<{ checked: boolean; value: string }>('hx-change', {\n bubbles: true,\n composed: true,\n detail: { checked: this.checked, value: this.value },\n }),\n );\n }\n\n /** Handles click events on the track. */\n /** @internal */\n private _handleClick(): void {\n this._toggle();\n }\n\n /** Handles keydown events — Space toggles the switch per ARIA APG. */\n /** @internal */\n private _handleKeyDown(e: KeyboardEvent): void {\n if (e.key === ' ') {\n e.preventDefault();\n this._toggle();\n }\n }\n\n // ─── Public Methods ───\n\n /** Moves focus to the switch track element. */\n override focus(options?: FocusOptions): void {\n this._trackEl?.focus(options);\n }\n\n // ─── Render ───\n\n /** Unique ID for this switch instance, used for ARIA associations. */\n /** @internal */\n private _switchId = `hx-switch-${++HelixSwitch._instanceCounter}`;\n /** ID for the label element, referenced by aria-labelledby. */\n /** @internal */\n private _labelId = `${this._switchId}-label`;\n /** ID for the help text element, referenced by aria-describedby. */\n /** @internal */\n private _helpTextId = `${this._switchId}-help`;\n /** ID for the error element, referenced by aria-describedby. */\n /** @internal */\n private _errorId = `${this._switchId}-error`;\n\n override render() {\n const hasError = !!this.error;\n const hasLabel = !!this.label || this._hasDefaultSlot;\n\n const containerClasses = {\n switch: true,\n 'switch--checked': this.checked,\n 'switch--disabled': this.disabled,\n 'switch--required': this.required,\n 'switch--error': hasError,\n [`switch--${this.size}`]: true,\n };\n\n const describedBy =\n [\n hasError || this._hasErrorSlot ? this._errorId : null,\n this.helpText && !hasError ? this._helpTextId : null,\n ]\n .filter(Boolean)\n .join(' ') || undefined;\n\n return html`\n <div part=\"switch\" class=${classMap(containerClasses)}>\n <div class=\"switch__control-row\">\n <button\n part=\"track\"\n class=\"switch__track\"\n id=${this._switchId}\n type=\"button\"\n role=\"switch\"\n aria-checked=${this.checked ? 'true' : 'false'}\n aria-labelledby=${ifDefined(hasLabel ? this._labelId : undefined)}\n aria-describedby=${ifDefined(describedBy)}\n aria-invalid=${hasError ? 'true' : nothing}\n aria-required=${this.required ? 'true' : nothing}\n ?disabled=${this.disabled}\n @click=${this._handleClick}\n @keydown=${this._handleKeyDown}\n >\n <span part=\"thumb\" class=\"switch__thumb\"></span>\n </button>\n\n <label part=\"label\" class=\"switch__label\" id=${this._labelId} for=${this._switchId}>\n <slot @slotchange=${this._handleDefaultSlotChange}>${this.label}</slot>${this.required\n ? html`<span class=\"switch__required-marker\" aria-hidden=\"true\">*</span>`\n : nothing}\n </label>\n </div>\n\n <slot name=\"error\" @slotchange=${this._handleErrorSlotChange}>\n ${hasError\n ? html`<div part=\"error\" class=\"switch__error\" id=${this._errorId} role=\"alert\">\n ${this.error}\n </div>`\n : nothing}\n </slot>\n\n ${this.helpText && !hasError\n ? html`\n <div part=\"help-text\" class=\"switch__help-text\" id=${this._helpTextId}>\n <slot name=\"help-text\">${this.helpText}</slot>\n </div>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-switch': HelixSwitch;\n }\n}\n\n/** @deprecated Use HxSwitch instead. */\nexport type WcSwitch = HelixSwitch;\nexport type HxSwitch = HelixSwitch;\n"],"names":["helixSwitchStyles","css","HelixSwitch","LitElement","changedProperties","state","_mode","disabled","e","slot","options","_a","hasError","hasLabel","containerClasses","describedBy","html","classMap","ifDefined","nothing","tokenStyles","__decorateClass","property","query","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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AOAmB,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,aAAa;AAAA,GApFvCpB,EAqFX,WAAA,YAAA,CAAA;AAOAmB,EAAA;AAAA,EADCC,EAAS,EAAE,WAAW,mBAAA,CAAoB;AAAA,GA3FhCpB,EA4FX,WAAA,mBAAA,CAAA;AA6EQmB,EAAA;AAAA,EADPE,EAAM,gBAAgB;AAAA,GAxKZrB,EAyKH,WAAA,YAAA,CAAA;AAISmB,EAAA;AAAA,EAAhBhB,EAAA;AAAM,GA7KIH,EA6KM,WAAA,iBAAA,CAAA;AAIAmB,EAAA;AAAA,EAAhBhB,EAAA;AAAM,GAjLIH,EAiLM,WAAA,mBAAA,CAAA;AAjLNA,IAANmB,EAAA;AAAA,EADNG,EAAc,WAAW;AAAA,GACbtB,CAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hx-tab-panel-DhOq67jj.js","sources":["../../src/components/hx-tabs/hx-tabs.styles.ts","../../src/components/hx-tabs/hx-tabs.ts","../../src/components/hx-tabs/hx-tab.styles.ts","../../src/components/hx-tabs/hx-tab.ts","../../src/components/hx-tabs/hx-tab-panel.styles.ts","../../src/components/hx-tabs/hx-tab-panel.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixTabsStyles = css`\n :host {\n display: block;\n font-family: var(--hx-font-family-sans, sans-serif);\n }\n\n * {\n box-sizing: border-box;\n }\n\n /* ─── Container ─── */\n\n .tabs {\n display: flex;\n flex-direction: column;\n gap: var(--hx-tabs-gap, 0);\n }\n\n :host([orientation='vertical']) .tabs {\n flex-direction: row;\n }\n\n /* ─── Tablist ─── */\n\n .tablist {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n gap: 0;\n border-bottom: var(--hx-tabs-border-width, 1px) solid\n var(--hx-tabs-border-color, var(--hx-color-neutral-200, #e9ecef));\n overflow-x: auto;\n scrollbar-width: none;\n }\n\n .tablist::-webkit-scrollbar {\n display: none;\n }\n\n /* ─── Vertical Orientation ─── */\n\n :host([orientation='vertical']) {\n --_tab-indicator-bottom: 0px;\n --_tab-indicator-end: var(--hx-tabs-indicator-size, 2px);\n --_tab-indicator-bottom-color: transparent;\n --_tab-indicator-end-color: var(\n --hx-tabs-indicator-color,\n var(--hx-color-primary-500, #2563eb)\n );\n }\n\n :host([orientation='vertical']) .tablist {\n flex-direction: column;\n border-bottom: none;\n border-inline-end: var(--hx-tabs-border-width, 1px) solid\n var(--hx-tabs-border-color, var(--hx-color-neutral-200, #e9ecef));\n overflow-x: visible;\n overflow-y: auto;\n min-width: var(--hx-tabs-vertical-width, 12rem);\n flex-shrink: 0;\n }\n\n /* ─── Panels Container ─── */\n\n .panels {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .tablist {\n scroll-behavior: auto;\n }\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixTabsStyles } from './hx-tabs.styles.js';\nimport type { HelixTab } from './hx-tab.js';\nimport type { HelixTabPanel } from './hx-tab-panel.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n// Module-level counter for stable, SSR-safe IDs (avoids Math.random() hydration mismatch)\nlet _hxTabsIdCounter = 0;\n\n/**\n * A tabbed content organizer that manages a set of `<hx-tab>` and `<hx-tab-panel>` children.\n * Supports horizontal and vertical orientations, automatic and manual activation modes,\n * and full keyboard navigation per the ARIA Authoring Practices Guide.\n *\n * @summary Tab container that organizes content into selectable panels.\n *\n * @tag hx-tabs\n *\n * @slot tab - Slot for `<hx-tab>` elements. Rendered inside the tablist.\n * @slot - Default slot for `<hx-tab-panel>` elements.\n *\n * @fires {CustomEvent<{tabId: string, index: number}>} hx-tab-change - Dispatched when the active tab changes.\n *\n * @csspart tablist - The tablist container element.\n * @csspart panels - The panel content container element.\n *\n * @cssprop [--hx-tabs-border-color=var(--hx-color-neutral-200, #e9ecef)] - Tablist border color.\n * @cssprop [--hx-tabs-border-width=1px] - Tablist border width.\n * @cssprop [--hx-tabs-vertical-width=12rem] - Width of the tablist in vertical orientation.\n * @cssprop [--hx-tabs-gap=0] - Gap between the tablist and panels container.\n * @cssprop [--hx-tabs-tab-color=var(--hx-color-neutral-600, #495057)] - Inactive tab text color.\n * @cssprop [--hx-tabs-tab-active-color=var(--hx-color-primary-600, #1d4ed8)] - Active tab text color.\n * @cssprop [--hx-tabs-tab-hover-color=var(--hx-color-neutral-800, #212529)] - Tab hover text color.\n * @cssprop [--hx-tabs-tab-hover-bg=var(--hx-color-neutral-50, #f8f9fa)] - Tab hover background.\n * @cssprop [--hx-tabs-tab-font-size=var(--hx-font-size-md, 1rem)] - Tab font size.\n * @cssprop [--hx-tabs-tab-font-weight=var(--hx-font-weight-medium, 500)] - Tab font weight.\n * @cssprop [--hx-tabs-tab-active-font-weight=var(--hx-font-weight-semibold, 600)] - Active tab font weight.\n * @cssprop [--hx-tabs-tab-padding-x=var(--hx-space-4, 1rem)] - Horizontal tab padding.\n * @cssprop [--hx-tabs-tab-padding-y=var(--hx-space-2, 0.5rem)] - Vertical tab padding.\n * @cssprop [--hx-tabs-indicator-color=var(--hx-color-primary-500, #2563eb)] - Active indicator color.\n * @cssprop [--hx-tabs-indicator-size=2px] - Active indicator thickness.\n * @cssprop [--hx-tabs-focus-ring-color=var(--hx-focus-ring-color, #2563eb)] - Focus ring color for tabs and panels.\n * @cssprop [--hx-tabs-panel-padding=var(--hx-space-4, 1rem)] - Panel inner padding.\n * @cssprop [--hx-tabs-panel-color=var(--hx-color-neutral-700, #343a40)] - Panel text color.\n */\n@customElement('hx-tabs')\nexport class HelixTabs extends LitElement {\n static override styles = [tokenStyles, helixTabsStyles];\n\n // ─── Internal ID ───\n\n /** @internal */\n private _id = `hx-tabs-${++_hxTabsIdCounter}`;\n\n // ─── Properties ───\n\n /**\n * The layout orientation of the tabs.\n * @attr orientation\n */\n @property({ type: String, reflect: true })\n orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Controls how keyboard navigation activates tabs.\n * In `automatic` mode, focus also activates the tab.\n * In `manual` mode, focus moves independently; Space or Enter activates.\n * @attr activation\n */\n @property({ type: String, attribute: 'activation', reflect: true })\n activation: 'manual' | 'automatic' = 'automatic';\n\n /**\n * Accessible label for the tablist. Rendered as `aria-label` on the tablist container.\n * Provide a brief description of what the tabs represent (e.g., \"Patient record sections\").\n * @attr label\n */\n @property({ type: String, reflect: true })\n label = '';\n\n // ─── State ───\n\n /** @internal */\n @state() private _activePanel = '';\n\n // ─── Child Accessors ───\n\n /** @internal */\n private _cachedTabs: HelixTab[] | null = null;\n /** @internal */\n private _cachedPanels: HelixTabPanel[] | null = null;\n /** @internal */\n private _observer: MutationObserver | null = null;\n\n // ─── Public API ───\n\n /**\n * Gets or sets the zero-based index of the currently selected tab.\n * Setting this programmatically activates the tab at the given index.\n */\n get selectedIndex(): number {\n return this._getTabs().findIndex((tab) => tab.panel === this._activePanel);\n }\n\n set selectedIndex(index: number) {\n const tab = this._getTabs()[index];\n if (tab && !tab.disabled) {\n this._activateTab(tab, true);\n }\n }\n\n /** @internal */\n private _getTabs(): HelixTab[] {\n if (!this._cachedTabs) {\n this._cachedTabs = Array.from(this.querySelectorAll(':scope > hx-tab')).filter(\n (el): el is HelixTab => el.tagName.toLowerCase() === 'hx-tab',\n );\n }\n return this._cachedTabs;\n }\n\n /** @internal */\n private _getPanels(): HelixTabPanel[] {\n if (!this._cachedPanels) {\n this._cachedPanels = Array.from(this.querySelectorAll(':scope > hx-tab-panel')).filter(\n (el): el is HelixTabPanel => el.tagName.toLowerCase() === 'hx-tab-panel',\n );\n }\n return this._cachedPanels;\n }\n\n /** @internal */\n private _getEnabledTabs(): HelixTab[] {\n return this._getTabs().filter((tab) => !tab.disabled);\n }\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('hx-tab-select', this._handleTabSelect);\n this.addEventListener('keydown', this._handleKeydown);\n // Watch for panel/name attribute changes on child tabs and panels\n this._observer = new MutationObserver(() => {\n this._cachedTabs = null;\n this._cachedPanels = null;\n this._syncTabsAndPanels();\n });\n this._observer.observe(this, {\n subtree: false,\n attributeFilter: ['panel', 'name'],\n });\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('hx-tab-select', this._handleTabSelect);\n this.removeEventListener('keydown', this._handleKeydown);\n this._observer?.disconnect();\n this._observer = null;\n }\n\n override firstUpdated(): void {\n if (this.label === '') {\n devWarn(\n 'hx-tabs',\n 'No accessible label provided. Set the `label` attribute on hx-tabs to describe what the tabs represent (e.g., \"Patient record sections\"). An unlabeled tablist violates WCAG 4.1.2.',\n );\n }\n\n this._syncTabsAndPanels();\n // Activate the first enabled tab if none is selected\n if (!this._activePanel) {\n const firstEnabled = this._getEnabledTabs()[0];\n if (firstEnabled) {\n this._activateTab(firstEnabled, false);\n }\n }\n }\n\n override updated(changedProperties: Map<PropertyKey, unknown>): void {\n super.updated(changedProperties);\n if (changedProperties.has('_activePanel')) {\n this._updateTabsAndPanels();\n }\n }\n\n // ─── Tab / Panel Sync ───\n\n /** @internal */\n private _syncTabsAndPanels(): void {\n const tabs = this._getTabs();\n const panels = this._getPanels();\n\n tabs.forEach((tab, i) => {\n const tabId = tab.id || `hx-tab-${this._id}-${i}`;\n tab.id = tabId;\n\n // Connect tab to its panel by aria-controls\n const panelName = tab.panel;\n const panel = panels.find((p) => p.name === panelName) ?? panels[i];\n if (panel) {\n const panelId = panel.id || `hx-panel-${this._id}-${i}`;\n panel.id = panelId;\n // Set controls on the tab so aria-controls lands on the inner button (role=\"tab\")\n tab.controls = panelId;\n // Use aria-label instead of aria-labelledby to avoid shadow boundary failures.\n // aria-labelledby pointing to hx-tab host IDs fails because the host element's\n // accessible text is inside its shadow DOM (the inner <button>), which AT cannot\n // traverse via aria-labelledby references across shadow roots.\n const tabLabel = tab.textContent?.trim() ?? '';\n if (tabLabel) {\n panel.setAttribute('aria-label', tabLabel);\n panel.removeAttribute('aria-labelledby');\n } else {\n // Fall back to aria-labelledby if no text content is yet available;\n // this will be corrected on slotchange once content is assigned.\n panel.setAttribute('aria-labelledby', tabId);\n }\n }\n });\n\n this._updateTabsAndPanels();\n }\n\n /** @internal */\n private _updateTabsAndPanels(): void {\n const tabs = this._getTabs();\n const panels = this._getPanels();\n\n tabs.forEach((tab) => {\n const isSelected = tab.panel === this._activePanel;\n tab.selected = isSelected;\n // Dual tabindex is intentional: the inner button in hx-tab manages its own tabindex\n // via the `selected` property. We also set it on the host element for the roving\n // tabindex pattern so document.activeElement comparisons work correctly when the\n // inner button is focused. This is safe because the inner button is the only\n // focusable element in hx-tab's shadow DOM (WCAG 2.4.3).\n tab.tabIndex = isSelected ? 0 : -1;\n });\n\n panels.forEach((panel) => {\n const isActive = panel.name === this._activePanel;\n if (isActive) {\n panel.removeAttribute('hidden');\n panel.setAttribute('tabindex', '0');\n } else {\n panel.setAttribute('hidden', '');\n panel.setAttribute('tabindex', '-1');\n }\n });\n }\n\n // ─── Tab Activation ───\n\n /** @internal */\n private _activateTab(tab: HelixTab, dispatchEvent = true): void {\n if (tab.disabled) {\n return;\n }\n\n const tabs = this._getTabs();\n const previousPanel = this._activePanel;\n this._activePanel = tab.panel;\n\n if (dispatchEvent && previousPanel !== this._activePanel) {\n const index = tabs.indexOf(tab);\n /**\n * Dispatched when the active tab changes.\n * @event hx-tab-change\n */\n this.dispatchEvent(\n new CustomEvent<{ tabId: string; index: number }>('hx-tab-change', {\n bubbles: true,\n composed: true,\n detail: { tabId: tab.id, index },\n }),\n );\n }\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleTabSelect = (e: Event): void => {\n if (!(e instanceof CustomEvent)) return;\n e.stopPropagation();\n const tab = e\n .composedPath()\n .find((el): el is HelixTab => el instanceof Element && el.tagName.toLowerCase() === 'hx-tab');\n if (tab) {\n this._activateTab(tab);\n }\n };\n\n /** @internal */\n private _warnInvalidSlotContent(): void {\n const tabSlot = this.shadowRoot?.querySelector<HTMLSlotElement>('slot[name=\"tab\"]');\n const panelSlot = this.shadowRoot?.querySelector<HTMLSlotElement>('slot:not([name])');\n if (tabSlot) {\n const invalid = tabSlot\n .assignedElements()\n .filter((el) => el.tagName.toLowerCase() !== 'hx-tab');\n if (invalid.length > 0) {\n devWarn(\n 'hx-tabs',\n `Slot \"tab\" expects <hx-tab> elements. Found unexpected: ${invalid.map((el) => `<${el.tagName.toLowerCase()}>`).join(', ')}`,\n );\n }\n }\n if (panelSlot) {\n const invalid = panelSlot\n .assignedElements()\n .filter((el) => el.tagName.toLowerCase() !== 'hx-tab-panel');\n if (invalid.length > 0) {\n devWarn(\n 'hx-tabs',\n `Default slot expects <hx-tab-panel> elements. Found unexpected: ${invalid.map((el) => `<${el.tagName.toLowerCase()}>`).join(', ')}`,\n );\n }\n }\n }\n\n /** @internal */\n private _handleSlotChange = (): void => {\n this._warnInvalidSlotContent();\n this._cachedTabs = null;\n this._cachedPanels = null;\n this._syncTabsAndPanels();\n // If the active panel was removed, fall back to the first enabled tab\n const panels = this._getPanels();\n const activePanelExists = panels.some((p) => p.name === this._activePanel);\n if (!activePanelExists) {\n const firstEnabled = this._getEnabledTabs()[0];\n if (firstEnabled) {\n this._activateTab(firstEnabled, false);\n } else {\n this._activePanel = '';\n }\n }\n };\n\n /** @internal */\n private _handleKeydown = (e: KeyboardEvent): void => {\n const enabledTabs = this._getEnabledTabs();\n if (enabledTabs.length === 0) {\n return;\n }\n\n const isHorizontal = this.orientation === 'horizontal';\n const prevKey = isHorizontal ? 'ArrowLeft' : 'ArrowUp';\n const nextKey = isHorizontal ? 'ArrowRight' : 'ArrowDown';\n\n const isNavigationKey = [prevKey, nextKey, 'Home', 'End', ' ', 'Enter'].includes(e.key);\n if (!isNavigationKey) {\n return;\n }\n\n // Determine focused tab — when a button inside shadow DOM is focused,\n // document.activeElement returns the shadow host (hx-tab), not the inner button.\n const focusedTab = enabledTabs.find((tab) => tab === document.activeElement);\n\n if (e.key === ' ' || e.key === 'Enter') {\n if (focusedTab) {\n e.preventDefault();\n this._activateTab(focusedTab);\n focusedTab.shadowRoot?.querySelector('button')?.focus();\n }\n return;\n }\n\n e.preventDefault();\n\n let currentIndex = focusedTab ? enabledTabs.indexOf(focusedTab) : -1;\n // Fall back to the active tab's index if nothing is focused yet\n if (currentIndex === -1) {\n const activeTab = enabledTabs.find((tab) => tab.panel === this._activePanel);\n currentIndex = activeTab ? enabledTabs.indexOf(activeTab) : 0;\n }\n\n let nextIndex: number;\n\n if (e.key === 'Home') {\n nextIndex = 0;\n } else if (e.key === 'End') {\n nextIndex = enabledTabs.length - 1;\n } else if (e.key === nextKey) {\n nextIndex = (currentIndex + 1) % enabledTabs.length;\n } else {\n // prevKey\n nextIndex = currentIndex <= 0 ? enabledTabs.length - 1 : currentIndex - 1;\n }\n\n const targetTab = enabledTabs[nextIndex];\n if (!targetTab) {\n return;\n }\n\n // Focus the tab button inside the shadow root\n targetTab.shadowRoot?.querySelector('button')?.focus();\n\n if (this.activation === 'automatic') {\n this._activateTab(targetTab);\n }\n };\n\n // ─── Render ───\n\n override render() {\n return html`\n <div class=\"tabs\">\n <div\n part=\"tablist\"\n class=\"tablist\"\n role=\"tablist\"\n aria-orientation=${this.orientation}\n aria-label=${this.label || nothing}\n >\n <slot name=\"tab\" @slotchange=${this._handleSlotChange}></slot>\n </div>\n <div part=\"panels\" class=\"panels\">\n <slot @slotchange=${this._handleSlotChange}></slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-tabs': HelixTabs;\n }\n}\n","import { css } from 'lit';\n\nexport const helixTabStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n opacity: var(--hx-opacity-disabled, 0.5);\n }\n\n * {\n box-sizing: border-box;\n }\n\n .tab {\n display: inline-flex;\n align-items: center;\n gap: var(--hx-space-2, 0.5rem);\n padding: var(--hx-tabs-tab-padding-y, var(--hx-space-2, 0.5rem))\n var(--hx-tabs-tab-padding-x, var(--hx-space-4, 1rem));\n border: none;\n border-bottom: var(--_tab-indicator-bottom, var(--hx-tabs-indicator-size, 2px)) solid\n transparent;\n border-inline-end: var(--_tab-indicator-end, 0px) solid transparent;\n background: none;\n font-family: var(--hx-tabs-tab-font-family, var(--hx-font-family-sans, sans-serif));\n font-size: var(--hx-tabs-tab-font-size, var(--hx-font-size-md, 1rem));\n font-weight: var(--hx-tabs-tab-font-weight, var(--hx-font-weight-medium, 500));\n color: var(--hx-tabs-tab-color, var(--hx-color-neutral-600, #495057));\n line-height: var(--hx-line-height-tight, 1.25);\n cursor: pointer;\n white-space: nowrap;\n user-select: none;\n -webkit-user-select: none;\n transition:\n color var(--hx-transition-fast, 150ms ease),\n border-color var(--hx-transition-fast, 150ms ease),\n border-inline-end-color var(--hx-transition-fast, 150ms ease),\n background-color var(--hx-transition-fast, 150ms ease);\n position: relative;\n }\n\n /* ─── Hover State ─── */\n\n .tab:not([aria-selected='true']):not([aria-disabled='true']):hover {\n color: var(--hx-tabs-tab-hover-color, var(--hx-color-neutral-800, #212529));\n background-color: var(--hx-tabs-tab-hover-bg, var(--hx-color-neutral-50, #f8f9fa));\n }\n\n /* ─── Selected State ─── */\n\n .tab[aria-selected='true'] {\n color: var(--hx-tabs-tab-active-color, var(--hx-color-primary-600, #1d4ed8));\n border-bottom-color: var(\n --_tab-indicator-bottom-color,\n var(--hx-tabs-indicator-color, var(--hx-color-primary-500, #2563eb))\n );\n border-inline-end-color: var(--_tab-indicator-end-color, transparent);\n font-weight: var(--hx-tabs-tab-active-font-weight, var(--hx-font-weight-semibold, 600));\n }\n\n /* ─── Focus State ─── */\n\n .tab:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-tabs-focus-ring-color, var(--hx-focus-ring-color, #2563eb));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n border-radius: var(--hx-border-radius-sm, 0.125rem);\n }\n\n /* ─── Disabled State ─── */\n\n .tab[aria-disabled='true'] {\n cursor: not-allowed;\n color: var(--hx-color-neutral-400, #adb5bd);\n }\n\n /* ─── Prefix / Suffix Slots ─── */\n\n .tab__prefix,\n .tab__suffix {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .tab {\n transition: none;\n }\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixTabStyles } from './hx-tab.styles.js';\n\n/**\n * An individual tab button, designed to be used inside an `<hx-tabs>` container.\n * Must be placed in the `tab` named slot of `<hx-tabs>`.\n *\n * @summary Presentational tab button that activates a corresponding panel.\n *\n * @tag hx-tab\n *\n * @slot - Default slot for the tab label text or content.\n * @slot prefix - Icon or content rendered before the label.\n * @slot suffix - Icon or content rendered after the label.\n *\n * @csspart tab - The underlying button element.\n * @csspart prefix - The container for prefix slot content (e.g. icons).\n * @csspart suffix - The container for suffix slot content (e.g. badges).\n *\n * @cssprop [--hx-tabs-tab-color=var(--hx-color-neutral-600, #495057)] - Inactive tab text color.\n * @cssprop [--hx-tabs-tab-active-color=var(--hx-color-primary-600, #1d4ed8)] - Active tab text color.\n * @cssprop [--hx-tabs-tab-hover-color=var(--hx-color-neutral-800, #212529)] - Tab hover text color.\n * @cssprop [--hx-tabs-tab-hover-bg=var(--hx-color-neutral-50, #f8f9fa)] - Tab hover background.\n * @cssprop [--hx-tabs-tab-font-size=var(--hx-font-size-md, 1rem)] - Tab font size.\n * @cssprop [--hx-tabs-tab-font-weight=var(--hx-font-weight-medium, 500)] - Tab font weight.\n * @cssprop [--hx-tabs-tab-active-font-weight=var(--hx-font-weight-semibold, 600)] - Active tab font weight.\n * @cssprop [--hx-tabs-tab-padding-x=var(--hx-space-4, 1rem)] - Horizontal tab padding.\n * @cssprop [--hx-tabs-tab-padding-y=var(--hx-space-2, 0.5rem)] - Vertical tab padding.\n * @cssprop [--hx-tabs-indicator-color=var(--hx-color-primary-500, #2563eb)] - Active indicator color.\n * @cssprop [--hx-tabs-indicator-size=2px] - Active indicator thickness.\n * @cssprop [--hx-tabs-focus-ring-color=var(--hx-focus-ring-color, #2563eb)] - Focus ring color.\n */\n@customElement('hx-tab')\nexport class HelixTab extends LitElement {\n static override styles = [tokenStyles, helixTabStyles];\n\n // ─── Properties ───\n\n /**\n * The name of the `<hx-tab-panel>` this tab controls. Must match the `name`\n * attribute on the corresponding `<hx-tab-panel>`.\n * @attr panel\n */\n @property({ type: String, reflect: true })\n panel = '';\n\n /**\n * Whether this tab is currently selected. Managed by the parent `<hx-tabs>`.\n * @attr selected\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * Whether this tab is disabled. Prevents selection and keyboard navigation.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * The id of the panel this tab controls. Set by the parent `<hx-tabs>` to establish the\n * aria-controls relationship on the inner button element (which carries role=\"tab\").\n * @internal\n */\n @property({ type: String, attribute: false })\n controls = '';\n\n // ─── Slot Visibility ───\n\n /** @internal */\n @state() private _hasPrefixSlot = false;\n /** @internal */\n @state() private _hasSuffixSlot = false;\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleClick(): void {\n if (this.disabled) {\n return;\n }\n /**\n * Internal event dispatched to signal tab selection to the parent container.\n * Not part of the public API.\n * @internal\n */\n this.dispatchEvent(\n new CustomEvent<{ panel: string }>('hx-tab-select', {\n bubbles: true,\n composed: true,\n detail: { panel: this.panel },\n }),\n );\n }\n\n /** @internal */\n private _handlePrefixSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasPrefixSlot = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** @internal */\n private _handleSuffixSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasSuffixSlot = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n // ─── Render ───\n\n override render() {\n return html`\n <button\n part=\"tab\"\n class=\"tab\"\n role=\"tab\"\n aria-selected=${this.selected ? 'true' : 'false'}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n aria-controls=${this.controls || nothing}\n tabindex=${this.selected ? '0' : '-1'}\n @click=${this._handleClick}\n >\n <span part=\"prefix\" class=\"tab__prefix\" ?hidden=${!this._hasPrefixSlot}>\n <slot name=\"prefix\" @slotchange=${this._handlePrefixSlotChange}></slot>\n </span>\n <slot></slot>\n <span part=\"suffix\" class=\"tab__suffix\" ?hidden=${!this._hasSuffixSlot}>\n <slot name=\"suffix\" @slotchange=${this._handleSuffixSlotChange}></slot>\n </span>\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-tab': HelixTab;\n }\n}\n","import { css } from 'lit';\n\nexport const helixTabPanelStyles = css`\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n * {\n box-sizing: border-box;\n }\n\n :host(:focus-visible) {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-tabs-focus-ring-color, var(--hx-focus-ring-color, #2563eb));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n border-radius: var(--hx-border-radius-sm, 0.125rem);\n }\n\n .panel {\n padding: var(--hx-tabs-panel-padding, var(--hx-space-4, 1rem));\n font-family: var(--hx-font-family-sans, sans-serif);\n font-size: var(--hx-font-size-md, 1rem);\n color: var(--hx-tabs-panel-color, var(--hx-color-neutral-700, #343a40));\n line-height: var(--hx-line-height-normal, 1.5);\n outline: none;\n }\n`;\n","import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixTabPanelStyles } from './hx-tab-panel.styles.js';\n\n/**\n * A content panel associated with an `<hx-tab>`, managed by a parent `<hx-tabs>`.\n *\n * @summary Tab content panel shown when its corresponding tab is selected.\n *\n * @tag hx-tab-panel\n *\n * @slot - Default slot for panel content.\n *\n * @csspart panel - The panel content wrapper.\n *\n * @cssprop [--hx-tabs-panel-padding=var(--hx-space-4, 1rem)] - Panel inner padding.\n * @cssprop [--hx-tabs-panel-color=var(--hx-color-neutral-700, #343a40)] - Panel text color.\n * @cssprop [--hx-tabs-focus-ring-color=var(--hx-focus-ring-color, #2563eb)] - Focus ring color.\n */\n@customElement('hx-tab-panel')\nexport class HelixTabPanel extends LitElement {\n static override styles = [tokenStyles, helixTabPanelStyles];\n\n // ─── Properties ───\n\n /**\n * The name that corresponds to the `panel` attribute on the associated `<hx-tab>`.\n * @attr name\n */\n @property({ type: String, reflect: true })\n name = '';\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('role', 'tabpanel');\n // tabindex is managed dynamically by the parent hx-tabs component:\n // active panels get tabindex=\"0\", hidden panels get tabindex=\"-1\"\n }\n\n // ─── Render ───\n\n override render() {\n return html`\n <div part=\"panel\" class=\"panel\">\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-tab-panel': HelixTabPanel;\n }\n}\n"],"names":["helixTabsStyles","css","_hxTabsIdCounter","HelixTabs","LitElement","e","tab","el","p","firstEnabled","enabledTabs","isHorizontal","prevKey","nextKey","focusedTab","_b","_a","currentIndex","activeTab","nextIndex","targetTab","_d","_c","index","changedProperties","tabs","panels","tabId","panelName","panel","panelId","tabLabel","isSelected","dispatchEvent","previousPanel","tabSlot","panelSlot","invalid","devWarn","html","nothing","tokenStyles","__decorateClass","property","state","customElement","helixTabStyles","HelixTab","slot","helixTabPanelStyles","HelixTabPanel"],"mappings":";;;;AAEO,MAAMA,IAAkBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AA;AAAA;AAAA;AAAA;AAAA,EAKT;AACF;AA9BaW,EACK,SAAS,CAACT,GAAaQ,CAAmB;AAS1DP,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAT9BO,EAUX,WAAA,QAAA,CAAA;AAVWA,IAANR,EAAA;AAAA,EADNG,EAAc,cAAc;AAAA,GAChBK,CAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hx-tag-CzOTDcXI.js","sources":["../../src/components/hx-tag/hx-tag.styles.ts","../../src/components/hx-tag/hx-tag.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixTagStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n opacity: 0.5;\n pointer-events: none;\n /* cursor: not-allowed is intentionally omitted — pointer-events: none prevents cursor display */\n }\n\n .tag {\n display: inline-flex;\n align-items: center;\n gap: var(--hx-space-1, 0.25rem);\n border-radius: var(--hx-tag-border-radius, var(--hx-border-radius-sm, 0.25rem));\n background-color: var(--hx-tag-bg, var(--hx-color-neutral-100, #f3f4f6));\n color: var(--hx-tag-color, var(--hx-color-neutral-700, #374151));\n font-family: var(--hx-tag-font-family, var(--hx-font-family-sans, sans-serif));\n font-weight: var(--hx-tag-font-weight, var(--hx-font-weight-medium, 500));\n line-height: var(--hx-line-height-tight, 1.25);\n white-space: nowrap;\n vertical-align: middle;\n border: 1px solid var(--hx-tag-border-color, var(--hx-color-neutral-200, #e5e7eb));\n }\n\n /* ─── Size Variants ─── */\n\n .tag--sm {\n font-size: var(--hx-tag-font-size, var(--hx-font-size-xs, 0.75rem));\n padding: var(--hx-tag-padding-y, var(--hx-space-0-5, 0.125rem))\n var(--hx-tag-padding-x, var(--hx-space-1-5, 0.375rem));\n }\n\n .tag--md {\n font-size: var(--hx-tag-font-size, var(--hx-font-size-sm, 0.875rem));\n padding: var(--hx-tag-padding-y, var(--hx-space-1, 0.25rem))\n var(--hx-tag-padding-x, var(--hx-space-2, 0.5rem));\n }\n\n .tag--lg {\n font-size: var(--hx-tag-font-size, var(--hx-font-size-base, 1rem));\n padding: var(--hx-tag-padding-y, var(--hx-space-1-5, 0.375rem))\n var(--hx-tag-padding-x, var(--hx-space-3, 0.75rem));\n }\n\n /* ─── Color Variants ─── */\n\n .tag--default {\n --hx-tag-bg: var(--hx-color-neutral-100, #f3f4f6);\n --hx-tag-color: var(--hx-color-neutral-700, #374151);\n --hx-tag-border-color: var(--hx-color-neutral-200, #e5e7eb);\n }\n\n .tag--primary {\n --hx-tag-bg: var(--hx-color-primary-50, #eff6ff);\n --hx-tag-color: var(--hx-color-primary-700, #1d4ed8);\n --hx-tag-border-color: var(--hx-color-primary-200, #bfdbfe);\n }\n\n .tag--success {\n --hx-tag-bg: var(--hx-color-success-50, #f0fdf4);\n --hx-tag-color: var(--hx-color-success-700, #15803d);\n --hx-tag-border-color: var(--hx-color-success-200, #bbf7d0);\n }\n\n .tag--warning {\n --hx-tag-bg: var(--hx-color-warning-50, #fffbeb);\n --hx-tag-color: var(--hx-color-warning-700, #b45309);\n --hx-tag-border-color: var(--hx-color-warning-200, #fde68a);\n }\n\n .tag--danger {\n --hx-tag-bg: var(--hx-color-error-50, #fef2f2);\n --hx-tag-color: var(--hx-color-error-700, #b91c1c);\n --hx-tag-border-color: var(--hx-color-error-200, #fecaca);\n }\n\n /* ─── Semantic Variant Label (WCAG 1.4.1) ─── */\n /* Visually hidden text prefix for semantic variants (success/warning/danger). */\n /* Ensures the variant state is not conveyed by color alone. */\n\n .tag__variant-label {\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: 0;\n }\n\n /* ─── Pill Mode ─── */\n\n /* Uses --hx-tag-border-radius-pill (separate from --hx-tag-border-radius) so consumer\n overrides to --hx-tag-border-radius don't break pill shape. */\n .tag--pill {\n border-radius: var(--hx-tag-border-radius-pill, var(--hx-border-radius-full, 9999px));\n }\n\n /* ─── Prefix / Suffix slots ─── */\n\n .tag__prefix,\n .tag__suffix {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n /* Hide wrappers when slots have no assigned content */\n .tag__prefix--hidden,\n .tag__suffix--hidden {\n display: none;\n }\n\n /* ─── Remove Button ─── */\n\n .tag__remove-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n /* WCAG 2.5.5 (healthcare mandate): minimum 44x44px touch target */\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n padding: 0;\n margin-inline-start: var(--hx-space-1, 0.25rem);\n cursor: pointer;\n color: inherit;\n opacity: 0.7;\n border-radius: var(--hx-border-radius-sm, 0.125rem);\n line-height: 0;\n }\n\n .tag__remove-button:hover {\n opacity: 1;\n }\n\n .tag__remove-button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, currentColor);\n outline-offset: var(--hx-focus-ring-offset, 1px);\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixTagStyles } from './hx-tag.styles.js';\n\n/**\n * A compact label for categorization, filtering, and selection.\n *\n * @summary Compact tag/chip for categorization, filtering, and selection.\n *\n * @tag hx-tag\n *\n * @slot - Default slot for tag label text.\n * @slot prefix - Icon or avatar rendered before the label.\n * @slot suffix - Content rendered after the label.\n *\n * @fires {CustomEvent<void>} hx-remove - Dispatched when the user clicks the remove button.\n *\n * @csspart base - The root tag element.\n * @csspart prefix - The prefix slot wrapper.\n * @csspart label - The label slot wrapper.\n * @csspart suffix - The suffix slot wrapper.\n * @csspart remove-button - The remove/dismiss button.\n *\n * @cssprop [--hx-tag-bg=var(--hx-color-neutral-100)] - Tag background color.\n * @cssprop [--hx-tag-color=var(--hx-color-neutral-700)] - Tag text color.\n * @cssprop [--hx-tag-border-color=var(--hx-color-neutral-200)] - Tag border color.\n * @cssprop [--hx-tag-font-size] - Tag font size (set per size variant).\n * @cssprop [--hx-tag-font-weight=var(--hx-font-weight-medium)] - Tag font weight.\n * @cssprop [--hx-tag-font-family=var(--hx-font-family-sans)] - Tag font family.\n * @cssprop [--hx-tag-border-radius=var(--hx-border-radius-sm)] - Tag border radius (non-pill mode).\n * @cssprop [--hx-tag-border-radius-pill=var(--hx-border-radius-full)] - Border radius in pill mode. Independent of --hx-tag-border-radius so consumer overrides don't break pill shape.\n * @cssprop [--hx-tag-padding-x] - Tag horizontal padding (set per size variant).\n * @cssprop [--hx-tag-padding-y] - Tag vertical padding (set per size variant).\n *\n * @note Visual style variants (filled/outlined/ghost) are not supported. This component\n * intentionally provides only filled-style tags with color variation via the `variant` prop.\n *\n * @note aria-live removal announcements are the consuming application's responsibility.\n * When a tag is removed from the DOM, applications should announce the change via their\n * own aria-live region to inform screen reader users of clinical data filter changes.\n */\n@customElement('hx-tag')\nexport class HelixTag extends LitElement {\n static override styles = [tokenStyles, helixTagStyles];\n\n /**\n * Visual style variant of the tag.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'primary' | 'success' | 'warning' | 'danger' = 'default';\n\n /**\n * Size of the tag.\n * @attr hx-size\n * @note The attribute name is `hx-size` (not `size`) to avoid conflict with the native\n * `size` attribute. Storybook autodocs controls bind to the property name `size`; when\n * writing HTML or Drupal Twig templates always use the `hx-size` attribute name.\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Whether the tag uses fully rounded (pill) styling.\n * @attr pill\n */\n @property({ type: Boolean, reflect: true })\n pill = false;\n\n /**\n * Whether the tag renders a dismiss button.\n * @attr removable\n */\n @property({ type: Boolean, reflect: true })\n removable = false;\n\n /**\n * Whether the tag is disabled. When disabled, interactions are suppressed.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n // ─── Internal State ───\n\n /**\n * Text from the default slot only (excludes prefix/suffix slotted content).\n * Used to build the remove button's aria-label without polluting it with icon text.\n * @internal\n */\n @state() private _defaultSlotText = '';\n\n /** @internal Whether the prefix slot has assigned content. */\n @state() private _hasPrefix = false;\n\n /** @internal Whether the suffix slot has assigned content. */\n @state() private _hasSuffix = false;\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleRemove(): void {\n if (this.disabled) return;\n this.dispatchEvent(\n new CustomEvent<void>('hx-remove', {\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n /** @internal Updates _defaultSlotText from only the default slot's text nodes. */\n private _onDefaultSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n const nodes = slot.assignedNodes({ flatten: true });\n this._defaultSlotText = nodes\n .filter((n): n is Text => n.nodeType === Node.TEXT_NODE)\n .map((n) => n.textContent ?? '')\n .join('')\n .trim();\n }\n\n /** @internal */\n private _onPrefixSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasPrefix = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** @internal */\n private _onSuffixSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasSuffix = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n // ─── WCAG 1.4.1: Semantic variant label map ───\n // Variants with semantic meaning require a non-color cue so users who cannot\n // distinguish variants by color alone (e.g. color-blind or high-contrast mode)\n // still receive the status context from assistive technology.\n\n /** @internal */\n private static readonly _SEMANTIC_VARIANT_LABELS: Partial<Record<HelixTag['variant'], string>> = {\n success: 'Success',\n warning: 'Warning',\n danger: 'Danger',\n };\n\n /** @internal */\n private get _semanticVariantLabel(): string {\n return HelixTag._SEMANTIC_VARIANT_LABELS[this.variant] ?? '';\n }\n\n // ─── Render ───\n\n override render() {\n const classes = {\n tag: true,\n [`tag--${this.variant}`]: true,\n [`tag--${this.size}`]: true,\n 'tag--pill': this.pill,\n };\n\n const prefixClasses = {\n tag__prefix: true,\n 'tag__prefix--hidden': !this._hasPrefix,\n };\n\n const suffixClasses = {\n tag__suffix: true,\n 'tag__suffix--hidden': !this._hasSuffix,\n };\n\n const variantLabel = this._semanticVariantLabel;\n\n return html`\n <span part=\"base\" class=${classMap(classes)}>\n ${variantLabel ? html`<span class=\"tag__variant-label\">${variantLabel}: </span>` : nothing}\n <span part=\"prefix\" class=${classMap(prefixClasses)}>\n <slot name=\"prefix\" @slotchange=${this._onPrefixSlotChange}></slot>\n </span>\n <span part=\"label\" class=\"tag__label\">\n <slot @slotchange=${this._onDefaultSlotChange}></slot>\n </span>\n <span part=\"suffix\" class=${classMap(suffixClasses)}>\n <slot name=\"suffix\" @slotchange=${this._onSuffixSlotChange}></slot>\n </span>\n ${this.removable\n ? html`<button\n part=\"remove-button\"\n class=\"tag__remove-button\"\n aria-label=${`Remove ${this._defaultSlotText || 'tag'}`}\n ?disabled=${this.disabled}\n @click=${this._handleRemove}\n >\n <svg viewBox=\"0 0 12 12\" aria-hidden=\"true\" width=\"10\" height=\"10\">\n <path\n d=\"M2.22 2.22a.75.75 0 011.06 0L6 4.94l2.72-2.72a.75.75 0 011.06 1.06L7.06 6l2.72 2.72a.75.75 0 01-1.06 1.06L6 7.06 3.28 9.78a.75.75 0 01-1.06-1.06L4.94 6 2.22 3.28a.75.75 0 010-1.06z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>`\n : nothing}\n </span>\n `;\n }\n}\n\nexport type HxTag = HelixTag;\n\n/** @deprecated Use {@link HxTag} instead. The `Wc` prefix was a legacy alias. */\nexport type WcTag = HelixTag;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-tag': HelixTag;\n }\n}\n"],"names":["helixTagStyles","css","HelixTag","LitElement","e","nodes","n","slot","classes","prefixClasses","suffixClasses","variantLabel","html","classMap","nothing","tokenStyles","__decorateClass","property","state","customElement"],"mappings":";;;;AAEO,MAAMA,IAAiBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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
|
1
|
-
{"version":3,"file":"hx-td-h6oeW6YC.js","sources":["../../src/components/hx-table/hx-table.styles.ts","../../src/components/hx-table/hx-table.ts","../../src/components/hx-table/hx-thead.ts","../../src/components/hx-table/hx-tbody.ts","../../src/components/hx-table/hx-tfoot.ts","../../src/components/hx-table/hx-tr.ts","../../src/components/hx-table/hx-th.ts","../../src/components/hx-table/hx-td.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixTableStyles = css`\n :host {\n display: block;\n overflow-x: auto;\n font-family: var(--hx-font-family-sans, sans-serif);\n font-size: var(--hx-font-size-sm, 0.875rem);\n }\n\n /* ─── Scroll Wrapper ─── */\n\n .table-wrapper {\n min-width: 0;\n width: 100%;\n }\n\n /* ─── Table ─── */\n\n table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n :host([full-width]) table {\n width: 100%;\n }\n\n /* ─── Caption ─── */\n\n caption {\n caption-side: top;\n text-align: left;\n padding: var(--hx-space-2, 0.5rem) var(--hx-space-4, 1rem);\n font-weight: var(--hx-font-weight-semibold, 600);\n color: var(--hx-table-header-color, var(--hx-color-neutral-700, #334155));\n font-size: var(--hx-font-size-base, 1rem);\n }\n\n /* ─── Slotted sub-component styling ─── */\n\n /*\n * ::slotted() only matches DIRECT slot assignees. hx-table's direct\n * slot children are hx-thead, hx-tbody, and hx-tfoot — never hx-tr,\n * hx-th, or hx-td. CSS custom properties inherit through shadow DOM\n * boundaries, so variables set on section elements cascade to their\n * slotted row and cell descendants automatically.\n */\n\n /* Header background via CSS vars that cascade through display:contents */\n ::slotted(hx-thead) {\n --_hx-table-cell-bg: var(--hx-table-header-bg, var(--hx-color-neutral-50, #f8fafc));\n }\n\n /* Striped variant: set stripe signal on hx-tbody (direct slotted child) so hx-tbody can apply to even rows */\n :host([variant='striped']) ::slotted(hx-tbody) {\n --_hx-table-row-stripe-bg: var(--hx-table-stripe-bg, var(--hx-color-neutral-50, #f8fafc));\n }\n\n /* Hover variant: set hover bg variable on direct slotted section elements */\n :host([variant='hover']) ::slotted(hx-tbody),\n :host([variant='hover']) ::slotted(hx-thead),\n :host([variant='striped']) ::slotted(hx-tbody),\n :host([variant='striped']) ::slotted(hx-thead),\n :host([variant='default']) ::slotted(hx-tbody),\n :host([variant='default']) ::slotted(hx-thead) {\n --_hx-table-row-hover-bg: var(--hx-table-row-hover-bg, var(--hx-color-neutral-50, #f8fafc));\n }\n\n /* Compact variant: reduced padding signal set on section elements that cascade to cells */\n :host([variant='compact']) ::slotted(hx-thead),\n :host([variant='compact']) ::slotted(hx-tbody),\n :host([variant='compact']) ::slotted(hx-tfoot) {\n --_hx-table-cell-padding: var(--hx-space-2, 0.5rem) var(--hx-space-3, 0.75rem);\n }\n\n /* ─── Sticky Header ─── */\n\n :host([sticky-header]) ::slotted(hx-thead) {\n --_hx-table-th-position: sticky;\n --_hx-table-th-top: 0;\n --_hx-table-th-z-index: 1;\n --_hx-table-th-bg: var(--hx-table-header-bg, var(--hx-color-neutral-50, #f8fafc));\n }\n\n /* ─── Focus ─── */\n\n ::slotted(:focus-visible) {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-focus-ring-color, var(--hx-color-primary-500, #2563eb));\n outline-offset: var(--hx-focus-ring-offset, -2px);\n }\n\n /* ─── Responsive Mobile Card Layout ─── */\n\n @media (max-width: 768px) {\n .table-wrapper {\n overflow-x: visible;\n }\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n ::slotted(*) {\n transition: none !important;\n }\n }\n`;\n\n/**\n * Styles shared by sub-components (hx-th, hx-td) for cell layout.\n * Exported so sub-components can import them directly.\n */\nexport const helixTableCellBaseStyles = css`\n :host {\n display: contents;\n }\n`;\n\nexport const helixTableRowBaseStyles = css`\n :host {\n display: contents;\n }\n`;\n\nexport const helixTableSectionBaseStyles = css`\n :host {\n display: contents;\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixTableStyles } from './hx-table.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * A semantic table container with variant styling and accessibility support.\n * Compose with `hx-thead`, `hx-tbody`, `hx-tfoot`, `hx-tr`, `hx-th`, and `hx-td`.\n *\n * @summary Semantic HTML table with variant styling, sticky header, and responsive layout.\n *\n * @tag hx-table\n *\n * @slot - Default slot for `hx-thead`, `hx-tbody`, and `hx-tfoot` sub-components.\n * @slot caption - Custom caption content rendered inside the `<caption>` element.\n *\n * @csspart table - The `<table>` element.\n * @csspart caption - The `<caption>` element.\n *\n * @cssprop [--hx-table-border-color=var(--hx-color-neutral-200, #e2e8f0)] - Cell border color.\n * @cssprop [--hx-table-header-bg=var(--hx-color-neutral-50, #f8fafc)] - Header row background.\n * @cssprop [--hx-table-header-color=var(--hx-color-neutral-700, #334155)] - Header text color.\n * @cssprop [--hx-table-cell-color=var(--hx-color-neutral-900, #0f172a)] - Cell text color.\n * @cssprop [--hx-table-row-hover-bg=var(--hx-color-neutral-50, #f8fafc)] - Row hover background.\n * @cssprop [--hx-table-stripe-bg=var(--hx-color-neutral-50, #f8fafc)] - Striped row background.\n */\n@customElement('hx-table')\nexport class HelixTable extends LitElement {\n static override styles = [tokenStyles, helixTableStyles];\n\n // ─── Public Properties ───\n\n /**\n * Accessible name for the table (WCAG 4.1.2 requirement).\n * Exposed via `aria-label` on the `<table>` element.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Visible caption text. When set, renders a `<caption>` element.\n * Use the `caption` slot for richer caption content.\n * @attr caption\n */\n @property({ type: String })\n caption = '';\n\n /**\n * Visual variant that controls row styling.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'striped' | 'hover' | 'compact' = 'default';\n\n /**\n * When true, the header row stays fixed while the table body scrolls.\n * @attr sticky-header\n */\n @property({ type: Boolean, reflect: true, attribute: 'sticky-header' })\n stickyHeader = false;\n\n /**\n * When true, the table expands to fill 100% of its container width.\n * @attr full-width\n */\n @property({ type: Boolean, reflect: true, attribute: 'full-width' })\n fullWidth = true;\n\n // ─── Internal State ───\n\n /** @internal */\n @state() private _hasCaptionSlot = false;\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n this._hasCaptionSlot = this.querySelector('[slot=\"caption\"]') !== null;\n }\n\n override willUpdate(changed: PropertyValues<this>): void {\n if (changed.has('label') && !this.label && changed.get('label') !== undefined) {\n devWarn(\n 'hx-table',\n 'No accessible name provided. Set the `label` attribute so screen readers can identify this table (WCAG 4.1.2).',\n );\n }\n }\n\n /** @internal */\n private _onCaptionSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasCaptionSlot = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n // ─── Render ───\n\n override render() {\n const hasCaption = this.caption || this._hasCaptionSlot;\n\n return html`\n <div class=\"table-wrapper\">\n <!-- role=\"table\" is required: sub-components use display:contents which can confuse assistive technology in Shadow DOM -->\n <table part=\"table\" role=\"table\" aria-label=${this.label || nothing}>\n ${hasCaption\n ? html`<caption part=\"caption\">\n <slot name=\"caption\" @slotchange=${this._onCaptionSlotChange}>${this.caption}</slot>\n </caption>`\n : nothing}\n <slot></slot>\n </table>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-table': HelixTable;\n }\n}\n","import { LitElement, html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { helixTableSectionBaseStyles } from './hx-table.styles.js';\n\n/**\n * Semantic table head section. Must be a direct child of `hx-table`.\n * Contains `hx-tr` rows with `hx-th` header cells.\n *\n * @summary Table head section (`<thead>`) for use inside `hx-table`.\n *\n * @tag hx-thead\n *\n * @slot - Default slot for `hx-tr` elements.\n *\n * @csspart thead - The `<thead>` element.\n */\n@customElement('hx-thead')\nexport class HelixTableHead extends LitElement {\n static override styles = [helixTableSectionBaseStyles];\n\n override render() {\n return html`<thead part=\"thead\" role=\"rowgroup\">\n <slot></slot>\n </thead>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-thead': HelixTableHead;\n }\n}\n","import { LitElement, html, css } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\n/**\n * Semantic table body section. Must be a direct child of `hx-table`.\n * Contains `hx-tr` rows with `hx-td` data cells.\n *\n * @summary Table body section (`<tbody>`) for use inside `hx-table`.\n *\n * @tag hx-tbody\n *\n * @slot - Default slot for `hx-tr` elements.\n *\n * @csspart tbody - The `<tbody>` element.\n */\n@customElement('hx-tbody')\nexport class HelixTableBody extends LitElement {\n static override styles = [\n css`\n :host {\n display: contents;\n }\n\n /*\n * Striped rows: only applies when the parent hx-table sets\n * --_hx-table-row-stripe-bg (via variant=\"striped\"). Falls back\n * to transparent so non-striped variants are unaffected.\n */\n ::slotted(hx-tr:nth-child(even)) {\n --_hx-table-row-bg: var(--_hx-table-row-stripe-bg, transparent);\n }\n `,\n ];\n\n override render() {\n return html`<tbody part=\"tbody\" role=\"rowgroup\">\n <slot></slot>\n </tbody>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-tbody': HelixTableBody;\n }\n}\n","import { LitElement, html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { helixTableSectionBaseStyles } from './hx-table.styles.js';\n\n/**\n * Semantic table foot section. Must be a direct child of `hx-table`.\n * Typically contains summary or totals rows.\n *\n * @summary Table foot section (`<tfoot>`) for use inside `hx-table`.\n *\n * @tag hx-tfoot\n *\n * @slot - Default slot for `hx-tr` elements.\n *\n * @csspart tfoot - The `<tfoot>` element.\n */\n@customElement('hx-tfoot')\nexport class HelixTableFoot extends LitElement {\n static override styles = [helixTableSectionBaseStyles];\n\n override render() {\n return html`<tfoot part=\"tfoot\" role=\"rowgroup\">\n <slot></slot>\n </tfoot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-tfoot': HelixTableFoot;\n }\n}\n","import { LitElement, html, nothing, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\n/**\n * Semantic table row. Must be a child of `hx-thead`, `hx-tbody`, or `hx-tfoot`.\n * Contains `hx-th` or `hx-td` cells.\n *\n * @summary Table row (`<tr>`) for use inside `hx-thead`, `hx-tbody`, or `hx-tfoot`.\n *\n * @tag hx-tr\n *\n * @slot - Default slot for `hx-th` and `hx-td` elements.\n *\n * @csspart row - The `<tr>` element.\n */\n@customElement('hx-tr')\nexport class HelixTableRow extends LitElement {\n static override styles = [\n css`\n :host {\n display: contents;\n }\n\n tr {\n background-color: var(--_hx-table-row-bg, transparent);\n transition: background-color var(--hx-transition-fast, 150ms ease);\n }\n\n tr:hover {\n background-color: var(--_hx-table-row-hover-bg, var(--hx-table-row-hover-bg, transparent));\n }\n\n :host([selected]) tr {\n background-color: var(--hx-table-row-selected-bg, var(--hx-color-primary-50, #eff6ff));\n }\n\n :host([disabled]) tr {\n opacity: 0.5;\n pointer-events: none;\n }\n\n @media (prefers-reduced-motion: reduce) {\n tr {\n transition: none;\n }\n }\n `,\n ];\n\n /**\n * When true, marks the row as selected and applies selected styling.\n * @attr selected\n */\n @property({ type: Boolean, reflect: true })\n selected = false;\n\n /**\n * When true, the row is visually disabled and non-interactive.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n override render() {\n return html`\n <tr\n part=\"row\"\n role=\"row\"\n aria-selected=${this.selected ? 'true' : nothing}\n aria-disabled=${this.disabled ? 'true' : nothing}\n >\n <slot></slot>\n </tr>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-tr': HelixTableRow;\n }\n}\n","import { LitElement, html, nothing, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\n/**\n * Detail type for `hx-sort` events dispatched from `hx-th`.\n */\nexport interface HxTableSortDetail {\n direction: 'asc' | 'desc';\n}\n\n/**\n * Semantic table header cell. Must be a child of `hx-tr`.\n * Supports sortable columns with accessible sort state.\n *\n * @summary Table header cell (`<th>`) with optional sort support.\n *\n * @tag hx-th\n *\n * @slot - Default slot for header label content.\n *\n * @fires {CustomEvent<HxTableSortDetail>} hx-sort - Dispatched when a sortable header is activated.\n *\n * @csspart header - The `<th>` element.\n * @csspart sort-icon - The sort indicator icon `<span>` inside sortable headers.\n */\n@customElement('hx-th')\nexport class HelixTableHeader extends LitElement {\n static override styles = [\n css`\n :host {\n display: contents;\n }\n\n th {\n padding: var(--_hx-table-cell-padding, var(--hx-space-3, 0.75rem) var(--hx-space-4, 1rem));\n text-align: left;\n font-weight: var(--hx-font-weight-semibold, 600);\n color: var(--hx-table-header-color, var(--hx-color-neutral-700, #334155));\n background-color: var(\n --_hx-table-cell-bg,\n var(--hx-table-header-bg, var(--hx-color-neutral-50, #f8fafc))\n );\n border-bottom: var(--hx-border-width-thin, 1px) solid\n var(--hx-table-border-color, var(--hx-color-neutral-200, #e2e8f0));\n white-space: nowrap;\n vertical-align: middle;\n position: var(--_hx-table-th-position, static);\n top: var(--_hx-table-th-top, auto);\n z-index: var(--_hx-table-th-z-index, auto);\n }\n\n :host([sortable]) th {\n cursor: pointer;\n }\n\n /* ─── Sort Button ─── */\n\n .sort-btn {\n display: inline-flex;\n align-items: center;\n gap: var(--hx-space-1, 0.25rem);\n background: none;\n border: none;\n padding: 0;\n font: inherit;\n font-weight: inherit;\n color: inherit;\n cursor: pointer;\n white-space: nowrap;\n width: 100%;\n }\n\n .sort-btn:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-focus-ring-color, var(--hx-color-primary-500, #2563eb));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n border-radius: var(--hx-border-radius-sm, 2px);\n }\n\n /* ─── Sort Icon ─── */\n\n .sort-icon {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n width: 1em;\n height: 1em;\n opacity: 0.4;\n transition:\n opacity var(--hx-transition-fast, 150ms ease),\n transform var(--hx-transition-fast, 150ms ease);\n }\n\n .sort-icon--active {\n opacity: 1;\n color: var(--hx-color-primary-500, #2563eb);\n }\n\n .sort-icon--desc {\n transform: rotate(180deg);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .sort-icon {\n transition: none;\n }\n }\n\n /* ─── Mobile card layout ─── */\n\n @media (max-width: 768px) {\n /*\n * Visually hide the header cell on mobile while keeping it in the\n * accessibility tree. Screen readers can then associate column\n * headers with data cells via the semantic table structure\n * (scope=\"col\", role=\"columnheader\"), satisfying WCAG 2.1 AA.\n * Using display:none would remove headers from the a11y tree entirely.\n */\n th {\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: 0;\n }\n }\n `,\n ];\n\n /**\n * When true, the header renders a sort button and emits `hx-sort` on activation.\n * @attr sortable\n */\n @property({ type: Boolean, reflect: true })\n sortable = false;\n\n /**\n * Current sort direction. Reflected for CSS targeting.\n * @attr sort-direction\n */\n @property({ type: String, reflect: true, attribute: 'sort-direction' })\n sortDirection: 'asc' | 'desc' | 'none' = 'none';\n\n /**\n * The `scope` attribute for the underlying `<th>` element.\n * @attr scope\n */\n @property({ type: String })\n scope: 'col' | 'row' | 'colgroup' | 'rowgroup' = 'col';\n\n /**\n * Number of columns this header spans.\n * @attr colspan\n */\n @property({ type: Number })\n colspan = 0;\n\n /**\n * Number of rows this header spans.\n * @attr rowspan\n */\n @property({ type: Number })\n rowspan = 0;\n\n // ─── Event Handlers ───\n\n /** @internal */\n private _handleSort(): void {\n const next: 'asc' | 'desc' = this.sortDirection === 'asc' ? 'desc' : 'asc';\n this.sortDirection = next;\n this.dispatchEvent(\n new CustomEvent<HxTableSortDetail>('hx-sort', {\n bubbles: true,\n composed: true,\n detail: { direction: next },\n }),\n );\n }\n\n // ─── Render Helpers ───\n\n /** @internal */\n private _renderSortIcon() {\n const isActive = this.sortDirection !== 'none';\n const iconClass = [\n 'sort-icon',\n isActive ? 'sort-icon--active' : '',\n this.sortDirection === 'desc' ? 'sort-icon--desc' : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return html`\n <span part=\"sort-icon\" class=${iconClass} aria-hidden=\"true\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 16\"\n fill=\"currentColor\"\n width=\"16\"\n height=\"16\"\n >\n <path d=\"M8 3L5 7h6L8 3zM8 13l3-4H5l3 4z\" fill-rule=\"evenodd\" />\n </svg>\n </span>\n `;\n }\n\n /** @internal */\n private _ariaSort(): 'ascending' | 'descending' | 'none' | typeof nothing {\n if (!this.sortable) return nothing;\n if (this.sortDirection === 'asc') return 'ascending';\n if (this.sortDirection === 'desc') return 'descending';\n return 'none';\n }\n\n /** @internal */\n private _sortLabel(): string {\n if (this.sortDirection === 'asc') return 'Sort descending';\n if (this.sortDirection === 'desc') return 'Sort ascending';\n return 'Sort';\n }\n\n override render() {\n return html`\n <th\n part=\"header\"\n role=\"columnheader\"\n scope=${this.scope}\n colspan=${ifDefined(this.colspan > 0 ? this.colspan : undefined)}\n rowspan=${ifDefined(this.rowspan > 0 ? this.rowspan : undefined)}\n aria-sort=${this._ariaSort()}\n >\n ${this.sortable\n ? html`\n <button class=\"sort-btn\" @click=${this._handleSort} aria-label=${this._sortLabel()}>\n <slot></slot>\n ${this._renderSortIcon()}\n </button>\n `\n : html`<slot></slot>`}\n </th>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-th': HelixTableHeader;\n }\n}\n","import { LitElement, html, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\n/**\n * Semantic table data cell. Must be a child of `hx-tr`.\n *\n * @summary Table data cell (`<td>`) for use inside `hx-tr`.\n *\n * @tag hx-td\n *\n * @slot - Default slot for cell content.\n *\n * @csspart cell - The `<td>` element.\n *\n * @cssprop [--hx-table-cell-color=var(--hx-color-neutral-900, #0f172a)] - Cell text color.\n */\n@customElement('hx-td')\nexport class HelixTableCell extends LitElement {\n static override styles = [\n css`\n :host {\n display: contents;\n }\n\n td {\n padding: var(--_hx-table-cell-padding, var(--hx-space-3, 0.75rem) var(--hx-space-4, 1rem));\n text-align: left;\n color: var(--hx-table-cell-color, var(--hx-color-neutral-900, #0f172a));\n border-bottom: var(--hx-border-width-thin, 1px) solid\n var(--hx-table-border-color, var(--hx-color-neutral-200, #e2e8f0));\n vertical-align: middle;\n }\n\n :host([align='center']) td {\n text-align: center;\n }\n\n :host([align='right']) td {\n text-align: right;\n }\n\n td:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-focus-ring-color, var(--hx-color-primary-500, #2563eb));\n outline-offset: var(--hx-focus-ring-offset, -2px);\n border-radius: var(--hx-border-radius-sm, 2px);\n }\n\n /* ─── Mobile card layout ─── */\n\n @media (max-width: 768px) {\n :host {\n display: block;\n }\n\n td {\n display: block;\n text-align: right;\n padding: var(--hx-space-2, 0.5rem) var(--hx-space-3, 0.75rem);\n border-bottom: none;\n position: relative;\n }\n\n td::before {\n content: attr(data-label);\n font-weight: var(--hx-font-weight-semibold, 600);\n float: left;\n color: var(--hx-table-header-color, var(--hx-color-neutral-700, #334155));\n }\n }\n `,\n ];\n\n /**\n * Horizontal alignment for cell content.\n * @attr align\n */\n @property({ type: String, reflect: true })\n align: 'left' | 'center' | 'right' = 'left';\n\n /**\n * Number of columns this cell spans.\n * @attr colspan\n */\n @property({ type: Number })\n colspan = 0;\n\n /**\n * Number of rows this cell spans.\n * @attr rowspan\n */\n @property({ type: Number })\n rowspan = 0;\n\n /**\n * Column header label for this cell. Forwarded as `data-label` on the native `<td>` for\n * the mobile card layout (`td::before { content: attr(data-label) }`) and as `aria-label`\n * so screen readers identify the column when the header row is hidden.\n * @attr label\n */\n @property({ type: String, attribute: 'label' })\n label = '';\n\n override render() {\n return html`\n <td\n part=\"cell\"\n role=\"cell\"\n data-label=${ifDefined(this.label || undefined)}\n colspan=${ifDefined(this.colspan > 0 ? this.colspan : undefined)}\n rowspan=${ifDefined(this.rowspan > 0 ? this.rowspan : undefined)}\n >\n <slot></slot>\n </td>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-td': HelixTableCell;\n }\n}\n"],"names":["helixTableStyles","css","helixTableSectionBaseStyles","HelixTable","LitElement","changed","e","slot","hasCaption","html","nothing","tokenStyles","__decorateClass","property","state","customElement","HelixTableHead","HelixTableBody","HelixTableFoot","HelixTableRow","HelixTableHeader","next","iconClass","ifDefined","HelixTableCell"],"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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgHQA;AAAA;AAAA;AAAA;AAAA;AAMDA;AAAA;AAAA;AAAA;AAAA;AAMhC,MAAMC,IAA8BD;AAAA;AAAA;AAAA;AAAA;;;;;;AClGpC,IAAME,IAAN,cAAyBC,EAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA,GAWL,KAAA,QAAQ,IAQR,KAAA,UAAU,IAOV,KAAA,UAAuD,W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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoDF;AAOAW,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GA5D9BW,EA6DX,WAAA,SAAA,CAAA;AAOAZ,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAnEfW,EAoEX,WAAA,WAAA,CAAA;AAOAZ,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA1EfW,EA2EX,WAAA,WAAA,CAAA;AASAZ,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,SAAS;AAAA,GAnFnCW,EAoFX,WAAA,SAAA,CAAA;AApFWA,IAANZ,EAAA;AAAA,EADNG,EAAc,OAAO;AAAA,GACTS,CAAA;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hx-text-DTXjiviE.js","sources":["../../src/components/hx-text/hx-text.styles.ts","../../src/components/hx-text/hx-text.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixTextStyles = css`\n :host {\n display: inline;\n }\n\n /* ─── Base ─── */\n\n .text {\n display: inline;\n font-family: var(--hx-font-family-sans, sans-serif);\n font-size: var(--hx-text-font-size);\n font-weight: var(--hx-text-font-weight);\n line-height: var(--hx-text-line-height);\n letter-spacing: var(--hx-text-letter-spacing);\n color: var(--hx-text-color);\n margin: 0;\n padding: 0;\n }\n\n /* ─── Variants ─── */\n\n .text--body {\n --hx-text-font-size: var(--hx-font-size-md, 1rem);\n --hx-text-font-weight: var(--hx-font-weight-regular, 400);\n --hx-text-line-height: var(--hx-line-height-normal, 1.5);\n --hx-text-letter-spacing: var(--hx-letter-spacing-normal, 0);\n }\n\n .text--body-sm {\n --hx-text-font-size: var(--hx-font-size-sm, 0.875rem);\n --hx-text-font-weight: var(--hx-font-weight-regular, 400);\n --hx-text-line-height: var(--hx-line-height-normal, 1.5);\n --hx-text-letter-spacing: var(--hx-letter-spacing-normal, 0);\n }\n\n .text--body-lg {\n --hx-text-font-size: var(--hx-font-size-lg, 1.125rem);\n --hx-text-font-weight: var(--hx-font-weight-regular, 400);\n --hx-text-line-height: var(--hx-line-height-normal, 1.5);\n --hx-text-letter-spacing: var(--hx-letter-spacing-normal, 0);\n }\n\n .text--label {\n --hx-text-font-size: var(--hx-font-size-md, 1rem);\n --hx-text-font-weight: var(--hx-font-weight-medium, 500);\n --hx-text-line-height: var(--hx-line-height-tight, 1.25);\n --hx-text-letter-spacing: var(--hx-letter-spacing-normal, 0);\n }\n\n .text--label-sm {\n --hx-text-font-size: var(--hx-font-size-sm, 0.875rem);\n --hx-text-font-weight: var(--hx-font-weight-medium, 500);\n --hx-text-line-height: var(--hx-line-height-tight, 1.25);\n --hx-text-letter-spacing: var(--hx-letter-spacing-normal, 0);\n }\n\n .text--caption {\n --hx-text-font-size: var(--hx-font-size-xs, 0.75rem);\n --hx-text-font-weight: var(--hx-font-weight-regular, 400);\n --hx-text-line-height: var(--hx-line-height-normal, 1.5);\n --hx-text-letter-spacing: var(--hx-letter-spacing-normal, 0);\n }\n\n .text--code {\n --hx-text-font-size: var(--hx-font-size-sm, 0.875rem);\n --hx-text-font-weight: var(--hx-font-weight-regular, 400);\n --hx-text-line-height: var(--hx-line-height-normal, 1.5);\n --hx-text-letter-spacing: var(--hx-letter-spacing-normal, 0);\n font-family: var(--hx-font-family-mono, monospace);\n }\n\n .text--overline {\n --hx-text-font-size: var(--hx-font-size-xs, 0.75rem);\n --hx-text-font-weight: var(--hx-font-weight-semibold, 600);\n --hx-text-line-height: var(--hx-line-height-tight, 1.25);\n --hx-text-letter-spacing: var(--hx-letter-spacing-wide, 0.05em);\n text-transform: uppercase;\n }\n\n /* ─── Colors ─── */\n\n .text--color-default {\n --hx-text-color: var(--hx-color-neutral-900, #0f172a);\n }\n\n .text--color-subtle {\n --hx-text-color: var(--hx-color-neutral-500, #64748b);\n }\n\n .text--color-disabled {\n --hx-text-color: var(--hx-color-neutral-400, #94a3b8);\n }\n\n .text--color-inverse {\n --hx-text-color: var(--hx-color-neutral-0, #ffffff);\n }\n\n .text--color-danger {\n --hx-text-color: var(--hx-color-error-600, #dc2626);\n }\n\n .text--color-success {\n --hx-text-color: var(--hx-color-success-600, #16a34a);\n }\n\n .text--color-warning {\n --hx-text-color: var(--hx-color-warning-600, #d97706);\n }\n\n /* ─── Weight Overrides ─── */\n\n .text--weight-regular {\n --hx-text-font-weight: var(--hx-font-weight-regular, 400);\n }\n\n .text--weight-medium {\n --hx-text-font-weight: var(--hx-font-weight-medium, 500);\n }\n\n .text--weight-semibold {\n --hx-text-font-weight: var(--hx-font-weight-semibold, 600);\n }\n\n .text--weight-bold {\n --hx-text-font-weight: var(--hx-font-weight-bold, 700);\n }\n\n /* ─── Truncation ─── */\n\n .text--truncate {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .text--clamp {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n :host([truncate]) {\n display: block;\n }\n\n :host([lines]:not([lines='0'])) {\n display: block;\n }\n`;\n","import { LitElement } from 'lit';\nimport { html as staticHtml, unsafeStatic } from 'lit/static-html.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixTextStyles } from './hx-text.styles.js';\n\n/**\n * A semantic typography wrapper that applies consistent text styles using design tokens.\n *\n * @summary Presentational text wrapper for consistent typography across variants, weights, and colors.\n *\n * @tag hx-text\n *\n * @slot - Default slot for text content.\n *\n * @csspart base - The inner element (tag determined by the `as` property).\n *\n * @cssprop [--hx-text-font-size] - Font size (set per variant).\n * @cssprop [--hx-text-font-weight] - Font weight (overridden by weight prop).\n * @cssprop [--hx-text-line-height] - Line height (set per variant).\n * @cssprop [--hx-text-letter-spacing] - Letter spacing (set per variant).\n * @cssprop [--hx-text-color] - Text color (set per color prop).\n *\n * @example\n * <!-- Drupal/Twig usage (CDN):\n * <hx-text variant=\"body\" color=\"default\">Patient name here</hx-text>\n * <hx-text variant=\"label\" weight=\"semibold\">Date of Birth</hx-text>\n * <hx-text variant=\"caption\" color=\"subtle\">Last reviewed on 2026-03-05</hx-text>\n * <!-- Truncate (boolean attr — omit to disable, include to enable): -->\n * <hx-text truncate>Long patient note that gets clipped</hx-text>\n * <!-- Multi-line clamp (numeric attr): -->\n * <hx-text lines=\"3\">Paragraph of clinical notes...</hx-text>\n * <!-- Semantic element override: -->\n * <hx-text as=\"p\" variant=\"body\">Paragraph-level content.</hx-text>\n * <hx-text as=\"strong\" variant=\"label\">Bold label</hx-text>\n * -->\n */\n@customElement('hx-text')\nexport class HelixText extends LitElement {\n static override styles = [tokenStyles, helixTextStyles];\n\n /**\n * Typography variant controlling font size, line height, and letter spacing.\n *\n * Note: The public variant set (body / body-sm / body-lg / label / label-sm / caption / code /\n * overline) intentionally extends the original audit spec (body / lead / small / caption /\n * overline). `lead` and `small` were replaced with the more granular `body-lg`, `body-sm`,\n * `label`, `label-sm`, and `code` variants to better serve healthcare UI density requirements.\n * There are no `lead` or `small` variants — consumers must use `body-lg` and `body-sm`\n * respectively.\n *\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'body' | 'body-sm' | 'body-lg' | 'label' | 'label-sm' | 'caption' | 'code' | 'overline' =\n 'body';\n\n /**\n * Font weight override. When unset, the variant's default weight is used.\n * @attr weight\n */\n @property({ type: String, reflect: true })\n weight: 'regular' | 'medium' | 'semibold' | 'bold' | undefined = undefined;\n\n /**\n * Semantic color intent.\n * @attr color\n */\n @property({ type: String, reflect: true })\n color: 'default' | 'subtle' | 'disabled' | 'inverse' | 'danger' | 'success' | 'warning' =\n 'default';\n\n /**\n * When true, clips text to a single line with an ellipsis overflow.\n * @attr truncate\n */\n @property({ type: Boolean, reflect: true })\n truncate = false;\n\n /**\n * Maximum number of lines to display before clamping with ellipsis.\n * When set, overrides `truncate`. Set to 0 to disable.\n * @attr lines\n */\n @property({ type: Number, reflect: true })\n lines = 0;\n\n /**\n * The HTML element to render as the inner base element.\n * Use to produce semantically appropriate markup (e.g., `p`, `strong`, `em`).\n * Defaults to `span` for inline usage.\n *\n * In Drupal Twig: `<hx-text as=\"p\" variant=\"body\">...</hx-text>`\n *\n * @attr as\n */\n @property({ type: String, reflect: true })\n as: 'span' | 'p' | 'strong' | 'em' | 'div' = 'span';\n\n /** Validates `as` against the allowed element list to prevent injection. */\n /** @internal */\n private get _safeTag(): string {\n const allowed = new Set(['span', 'p', 'strong', 'em', 'div']);\n return allowed.has(this.as) ? this.as : 'span';\n }\n\n override render() {\n const effectiveLines = Math.max(0, this.lines);\n const isTruncated = this.truncate && effectiveLines === 0;\n const isClamped = effectiveLines > 0;\n const classes = {\n text: true,\n [`text--${this.variant}`]: true,\n [`text--color-${this.color}`]: true,\n [`text--weight-${this.weight}`]: this.weight !== undefined,\n 'text--truncate': isTruncated,\n 'text--clamp': isClamped,\n };\n\n const inlineStyles = isClamped ? { '-webkit-line-clamp': String(effectiveLines) } : {};\n\n const titleText = isTruncated || isClamped ? this.textContent?.trim() : undefined;\n\n const tag = unsafeStatic(this._safeTag);\n\n return staticHtml`\n <${tag}\n part=\"base\"\n class=${classMap(classes)}\n style=${styleMap(inlineStyles)}\n title=${ifDefined(titleText || undefined)}\n >\n <slot></slot>\n </${tag}>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-text': HelixText;\n }\n}\n"],"names":["helixTextStyles","css","HelixText","LitElement","effectiveLines","isTruncated","isClamped","classes","inlineStyles","titleText","_a","tag","unsafeStatic","staticHtml","classMap","styleMap","ifDefined","tokenStyles","__decorateClass","property","customElement"],"mappings":";;;;;;;AAEO,MAAMA,IAAkBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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