@helixui/library 1.0.1 → 1.1.2-next.1
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 +6013 -11864
- 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 +10 -0
- package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
- package/dist/components/hx-accordion/hx-accordion.d.ts +7 -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 +12 -2
- 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 +31 -3
- 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 +8 -1
- package/dist/components/hx-avatar/hx-avatar.d.ts.map +1 -1
- package/dist/components/hx-avatar/index.js +1 -1
- package/dist/components/hx-badge/hx-badge.d.ts +8 -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 +25 -4
- 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.d.ts +24 -4
- 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 +16 -7
- 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 +14 -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 +2 -0
- package/dist/components/hx-carousel/hx-carousel-item.d.ts.map +1 -1
- package/dist/components/hx-carousel/hx-carousel-item.styles.d.ts +2 -0
- package/dist/components/hx-carousel/hx-carousel-item.styles.d.ts.map +1 -0
- package/dist/components/hx-carousel/hx-carousel.d.ts +29 -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 +34 -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 +27 -6
- 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 +126 -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 +10 -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 +84 -4
- package/dist/components/hx-color-picker/hx-color-picker.d.ts.map +1 -1
- package/dist/components/hx-color-picker/hx-color-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-color-picker/index.js +1 -1
- package/dist/components/hx-combobox/hx-combobox.d.ts +41 -6
- 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/index.js +1 -1
- package/dist/components/hx-copy-button/hx-copy-button.d.ts +17 -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 +32 -6
- 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 +27 -2
- 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 +101 -5
- 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 +34 -4
- package/dist/components/hx-dialog/hx-dialog.d.ts.map +1 -1
- package/dist/components/hx-dialog/hx-dialog.styles.d.ts.map +1 -1
- package/dist/components/hx-dialog/index.js +1 -1
- package/dist/components/hx-divider/hx-divider.d.ts +4 -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 +28 -10
- 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 +29 -3
- 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 +11 -3
- 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.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 +39 -3
- package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
- package/dist/components/hx-file-upload/hx-file-upload.styles.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 +8 -0
- 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 +14 -12
- 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/index.js +1 -1
- package/dist/components/hx-icon/hx-icon.d.ts +10 -2
- 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 +12 -0
- 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 +8 -0
- 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 +4 -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 +8 -2
- package/dist/components/hx-list/hx-list-item.d.ts.map +1 -1
- package/dist/components/hx-list/hx-list-item.styles.d.ts.map +1 -1
- package/dist/components/hx-list/hx-list.d.ts +6 -2
- 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-item.d.ts +11 -0
- package/dist/components/hx-menu/hx-menu-item.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu-item.styles.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu.d.ts +10 -1
- package/dist/components/hx-menu/hx-menu.d.ts.map +1 -1
- package/dist/components/hx-menu/index.js +1 -1
- package/dist/components/hx-meter/hx-meter.d.ts +10 -2
- package/dist/components/hx-meter/hx-meter.d.ts.map +1 -1
- package/dist/components/hx-meter/hx-meter.styles.d.ts.map +1 -1
- package/dist/components/hx-meter/index.js +1 -1
- package/dist/components/hx-nav/hx-nav.d.ts +15 -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 +51 -4
- 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 +18 -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 +38 -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 +105 -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 +72 -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 +77 -10
- 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 +13 -8
- package/dist/components/hx-popup/hx-popup.d.ts.map +1 -1
- package/dist/components/hx-popup/hx-popup.styles.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 +10 -2
- 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 +8 -2
- 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 +6 -3
- package/dist/components/hx-prose/hx-prose.d.ts.map +1 -1
- package/dist/components/hx-prose/index.js +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 +4 -2
- 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 +54 -2
- 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 +37 -12
- 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 +13 -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 +6 -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-slider/hx-slider.d.ts +26 -9
- 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 +17 -2
- 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 +22 -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 +32 -2
- 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/index.js +1 -1
- package/dist/components/hx-stat/hx-stat.d.ts +12 -3
- 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 +15 -14
- package/dist/components/hx-status-indicator/hx-status-indicator.d.ts.map +1 -1
- package/dist/components/hx-status-indicator/index.js +1 -1
- package/dist/components/hx-steps/hx-step.d.ts +7 -9
- 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 +3 -3
- 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 +25 -5
- 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 +8 -2
- package/dist/components/hx-table/hx-table.d.ts.map +1 -1
- package/dist/components/hx-table/hx-table.styles.d.ts.map +1 -1
- package/dist/components/hx-table/hx-th.d.ts +4 -0
- package/dist/components/hx-table/hx-th.d.ts.map +1 -1
- package/dist/components/hx-table/index.js +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 +4 -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 +8 -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 +2 -0
- 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 +1 -0
- 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 +22 -16
- 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 +13 -7
- 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 +84 -5
- 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 +24 -3
- package/dist/components/hx-time-picker/hx-time-picker.d.ts.map +1 -1
- package/dist/components/hx-time-picker/hx-time-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-time-picker/index.js +1 -1
- package/dist/components/hx-toast/hx-toast-stack.d.ts +1 -1
- package/dist/components/hx-toast/hx-toast-stack.d.ts.map +1 -1
- package/dist/components/hx-toast/hx-toast.d.ts +17 -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 +26 -2
- 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 +58 -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 +4 -0
- 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 +9 -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 +32 -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/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 +9581 -0
- package/dist/css/helix-core.css +1784 -0
- package/dist/css/helix-data.css +639 -0
- package/dist/css/helix-feedback.css +1239 -0
- package/dist/css/helix-forms.css +2498 -0
- package/dist/css/helix-layout.css +380 -0
- package/dist/css/helix-media.css +213 -0
- package/dist/css/helix-navigation.css +1122 -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 +117 -0
- package/dist/css/hx-badge.css +174 -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 +262 -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 +246 -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 +21 -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 +111 -0
- package/dist/css/hx-phi-field.css +85 -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 +268 -0
- package/dist/css/hx-side-nav.css +142 -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 +97 -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 +2696 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +266 -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/{hx-accordion-DT8qHOay.js → hx-accordion-_KeulaQR.js} +97 -57
- package/dist/shared/hx-accordion-_KeulaQR.js.map +1 -0
- package/dist/shared/{hx-action-bar-we_WJety.js → hx-action-bar-D4bulGQP.js} +38 -31
- package/dist/shared/hx-action-bar-D4bulGQP.js.map +1 -0
- package/dist/shared/{hx-alert-D6uok29t.js → hx-alert-DRZYP0Oo.js} +77 -52
- package/dist/shared/hx-alert-DRZYP0Oo.js.map +1 -0
- package/dist/shared/{hx-avatar-Cep6Urm3.js → hx-avatar-7p1cj3lG.js} +6 -2
- package/dist/shared/hx-avatar-7p1cj3lG.js.map +1 -0
- package/dist/shared/{hx-badge-BeuWuUj_.js → hx-badge-DCxvskdw.js} +60 -45
- package/dist/shared/hx-badge-DCxvskdw.js.map +1 -0
- package/dist/shared/{hx-banner-DnCBJtRR.js → hx-banner-2RS7Nux4.js} +102 -55
- package/dist/shared/hx-banner-2RS7Nux4.js.map +1 -0
- package/dist/shared/{hx-breadcrumb-item-Bj2UqhzR.js → hx-breadcrumb-item-B2rjepqy.js} +85 -72
- package/dist/shared/hx-breadcrumb-item-B2rjepqy.js.map +1 -0
- package/dist/shared/{hx-button-Cbhqpm5i.js → hx-button-6S3DwuIj.js} +96 -57
- package/dist/shared/hx-button-6S3DwuIj.js.map +1 -0
- package/dist/shared/{hx-button-group-CWjWv-wS.js → hx-button-group-ChTQsnQj.js} +10 -10
- package/dist/shared/hx-button-group-ChTQsnQj.js.map +1 -0
- package/dist/shared/{hx-card-B9j2SHyI.js → hx-card-dIKdcMhr.js} +41 -34
- package/dist/shared/hx-card-dIKdcMhr.js.map +1 -0
- package/dist/shared/{hx-carousel-item-Be0bC-7o.js → hx-carousel-item-Cm8a1nAi.js} +108 -91
- package/dist/shared/hx-carousel-item-Cm8a1nAi.js.map +1 -0
- package/dist/shared/{hx-checkbox-CuaJqEo7.js → hx-checkbox-_WUiuTo9.js} +75 -71
- package/dist/shared/hx-checkbox-_WUiuTo9.js.map +1 -0
- package/dist/shared/{hx-checkbox-group-ydUdV9Sx.js → hx-checkbox-group-B-ci-dxp.js} +62 -43
- package/dist/shared/hx-checkbox-group-B-ci-dxp.js.map +1 -0
- package/dist/shared/hx-clinical-status-De8yrA5I.js +467 -0
- package/dist/shared/hx-clinical-status-De8yrA5I.js.map +1 -0
- package/dist/shared/{hx-code-snippet-DBwIjl5p.js → hx-code-snippet-CQsyvthi.js} +72 -47
- package/dist/shared/hx-code-snippet-CQsyvthi.js.map +1 -0
- package/dist/shared/hx-color-picker-Dk2Myvaf.js +612 -0
- package/dist/shared/hx-color-picker-Dk2Myvaf.js.map +1 -0
- package/dist/shared/{hx-combobox-CNvY-es8.js → hx-combobox-CNAJXIxo.js} +100 -466
- package/dist/shared/hx-combobox-CNAJXIxo.js.map +1 -0
- package/dist/shared/{hx-container-DLUKnTi9.js → hx-container-7j16VuQE.js} +16 -16
- package/dist/shared/hx-container-7j16VuQE.js.map +1 -0
- package/dist/shared/{hx-copy-button-CLBA31to.js → hx-copy-button-B_ZHYO7_.js} +55 -40
- package/dist/shared/hx-copy-button-B_ZHYO7_.js.map +1 -0
- package/dist/shared/hx-counter-D_B7L9Pi.js +185 -0
- package/dist/shared/hx-counter-D_B7L9Pi.js.map +1 -0
- package/dist/shared/{hx-data-table-BwoJCFgs.js → hx-data-table-B1j4n4bm.js} +160 -90
- package/dist/shared/hx-data-table-B1j4n4bm.js.map +1 -0
- package/dist/shared/hx-date-picker-R-0kWFwr.js +627 -0
- package/dist/shared/hx-date-picker-R-0kWFwr.js.map +1 -0
- package/dist/shared/{hx-dialog-M7so0sRT.js → hx-dialog-U5d3s0Ps.js} +137 -108
- package/dist/shared/hx-dialog-U5d3s0Ps.js.map +1 -0
- package/dist/shared/{hx-divider-XgWIz4Mr.js → hx-divider-DdAN-_jB.js} +6 -5
- package/dist/shared/hx-divider-DdAN-_jB.js.map +1 -0
- package/dist/shared/{hx-drawer-CYxuhIQ0.js → hx-drawer-e0qeGxAD.js} +162 -93
- package/dist/shared/hx-drawer-e0qeGxAD.js.map +1 -0
- package/dist/shared/{hx-dropdown-7cfowTWv.js → hx-dropdown-DP_DNpEb.js} +71 -47
- package/dist/shared/hx-dropdown-DP_DNpEb.js.map +1 -0
- package/dist/shared/{hx-field-CDP8EXuj.js → hx-field-COM4KvMQ.js} +29 -21
- package/dist/shared/hx-field-COM4KvMQ.js.map +1 -0
- package/dist/shared/{hx-field-label-Bg-EWvqF.js → hx-field-label-BtZ9H9Yy.js} +8 -11
- package/dist/shared/hx-field-label-BtZ9H9Yy.js.map +1 -0
- package/dist/shared/{hx-file-upload-9HbONfqt.js → hx-file-upload-DbECypLe.js} +121 -91
- package/dist/shared/hx-file-upload-DbECypLe.js.map +1 -0
- package/dist/shared/hx-form-fJE-FJQV.js +262 -0
- package/dist/shared/hx-form-fJE-FJQV.js.map +1 -0
- package/dist/shared/{hx-format-date-BsVr8gpD.js → hx-format-date-C030ThSm.js} +20 -12
- package/dist/shared/hx-format-date-C030ThSm.js.map +1 -0
- package/dist/shared/{hx-grid-BsDBCTbt.js → hx-grid-DE8KM5Gf.js} +29 -22
- package/dist/shared/hx-grid-DE8KM5Gf.js.map +1 -0
- package/dist/shared/{hx-help-text-DaOPN1iB.js → hx-help-text-BAcEGRUE.js} +2 -2
- package/dist/shared/{hx-help-text-DaOPN1iB.js.map → hx-help-text-BAcEGRUE.js.map} +1 -1
- package/dist/shared/{hx-icon-button-iu0i_faq.js → hx-icon-button-Et9wq79n.js} +15 -1
- package/dist/shared/{hx-icon-button-iu0i_faq.js.map → hx-icon-button-Et9wq79n.js.map} +1 -1
- package/dist/shared/{hx-icon--xsJztDh.js → hx-icon-dYvrzvsO.js} +12 -7
- package/dist/shared/hx-icon-dYvrzvsO.js.map +1 -0
- package/dist/shared/{hx-image-xyb_tHCR.js → hx-image-DUsEi-oN.js} +20 -15
- package/dist/shared/hx-image-DUsEi-oN.js.map +1 -0
- package/dist/shared/{hx-link-DfNy_UU8.js → hx-link-Peg2LzOD.js} +19 -8
- package/dist/shared/hx-link-Peg2LzOD.js.map +1 -0
- package/dist/shared/{hx-list-CdRNgeoP.js → hx-list-DwInEX2H.js} +63 -37
- package/dist/shared/hx-list-DwInEX2H.js.map +1 -0
- package/dist/shared/{hx-menu-divider-DR8klkFT.js → hx-menu-divider-DR4G_rqw.js} +71 -40
- package/dist/shared/hx-menu-divider-DR4G_rqw.js.map +1 -0
- package/dist/shared/{hx-meter-CZ7lnMra.js → hx-meter-CVs4A649.js} +83 -67
- package/dist/shared/hx-meter-CVs4A649.js.map +1 -0
- package/dist/shared/{hx-nav-DM6-cGKF.js → hx-nav-D377Ngz4.js} +70 -54
- package/dist/shared/hx-nav-D377Ngz4.js.map +1 -0
- package/dist/shared/{hx-nav-item-D54-5eUM.js → hx-nav-item-ByU2N921.js} +84 -48
- package/dist/shared/hx-nav-item-ByU2N921.js.map +1 -0
- package/dist/shared/{hx-number-input-BP6TIA92.js → hx-number-input-BPgrlMLN.js} +97 -65
- package/dist/shared/hx-number-input-BPgrlMLN.js.map +1 -0
- package/dist/shared/{hx-overflow-menu-CobkjAb8.js → hx-overflow-menu-Bz02LPPk.js} +83 -67
- package/dist/shared/hx-overflow-menu-Bz02LPPk.js.map +1 -0
- package/dist/shared/{hx-pagination-10dpXS95.js → hx-pagination-DYhYPqDn.js} +119 -92
- package/dist/shared/hx-pagination-DYhYPqDn.js.map +1 -0
- package/dist/shared/hx-patient-banner-BoJHddAL.js +256 -0
- package/dist/shared/hx-patient-banner-BoJHddAL.js.map +1 -0
- package/dist/shared/hx-phi-field-EDWna59z.js +261 -0
- package/dist/shared/hx-phi-field-EDWna59z.js.map +1 -0
- package/dist/shared/{hx-popover-ULjonbaO.js → hx-popover-D6kYQkt3.js} +121 -89
- package/dist/shared/hx-popover-D6kYQkt3.js.map +1 -0
- package/dist/shared/{hx-popup-CYf9Q5sj.js → hx-popup-RQb6HUXc.js} +14 -2
- package/dist/shared/hx-popup-RQb6HUXc.js.map +1 -0
- package/dist/shared/{hx-progress-bar-CnTibV63.js → hx-progress-bar-ByEmxq1V.js} +77 -57
- package/dist/shared/hx-progress-bar-ByEmxq1V.js.map +1 -0
- package/dist/shared/{hx-progress-ring-BHJBaXNk.js → hx-progress-ring-CtVnNRQx.js} +36 -29
- package/dist/shared/hx-progress-ring-CtVnNRQx.js.map +1 -0
- package/dist/shared/hx-prose-Ml_L2zje.js +59 -0
- package/dist/shared/hx-prose-Ml_L2zje.js.map +1 -0
- package/dist/shared/{hx-radio-BnKcRuQu.js → hx-radio-jgeW92SV.js} +34 -34
- package/dist/shared/hx-radio-jgeW92SV.js.map +1 -0
- package/dist/shared/{hx-rating-Y_t7Z4qb.js → hx-rating-g_iy-DW_.js} +144 -81
- package/dist/shared/hx-rating-g_iy-DW_.js.map +1 -0
- package/dist/shared/{hx-select-C50lD7NS.js → hx-select-4-nHL0vd.js} +158 -208
- package/dist/shared/hx-select-4-nHL0vd.js.map +1 -0
- package/dist/shared/hx-skeleton-BHvALyd7.js.map +1 -1
- package/dist/shared/{hx-slider-CprSNrRi.js → hx-slider-7Q-e0_pc.js} +49 -28
- package/dist/shared/hx-slider-7Q-e0_pc.js.map +1 -0
- package/dist/shared/{hx-spinner-BOApJ-g9.js → hx-spinner-DEgrKsUo.js} +36 -28
- package/dist/shared/hx-spinner-DEgrKsUo.js.map +1 -0
- package/dist/shared/{hx-split-button-CHGy4FUc.js → hx-split-button-BA7P_ly5.js} +51 -31
- package/dist/shared/hx-split-button-BA7P_ly5.js.map +1 -0
- package/dist/shared/{hx-split-panel-DYtB45Tr.js → hx-split-panel-Bss54UN8.js} +68 -44
- package/dist/shared/hx-split-panel-Bss54UN8.js.map +1 -0
- package/dist/shared/{hx-stack-CfoW7jU7.js → hx-stack-BStY1RmV.js} +29 -29
- package/dist/shared/hx-stack-BStY1RmV.js.map +1 -0
- package/dist/shared/{hx-stat-C2wfph8W.js → hx-stat-CmkCUI8v.js} +49 -33
- package/dist/shared/hx-stat-CmkCUI8v.js.map +1 -0
- package/dist/shared/{hx-status-indicator-oYWOkWlD.js → hx-status-indicator-4ClvA5mU.js} +22 -19
- package/dist/shared/hx-status-indicator-4ClvA5mU.js.map +1 -0
- package/dist/shared/{hx-step-DYoIumpR.js → hx-step-DlANlr2A.js} +61 -89
- package/dist/shared/hx-step-DlANlr2A.js.map +1 -0
- package/dist/shared/{hx-structured-list-CMWllxGg.js → hx-structured-list-Db9rwLI_.js} +26 -23
- package/dist/shared/hx-structured-list-Db9rwLI_.js.map +1 -0
- package/dist/shared/hx-style-scope-BroUu83L.js +125 -0
- package/dist/shared/hx-style-scope-BroUu83L.js.map +1 -0
- package/dist/shared/{hx-switch-DkKchcuP.js → hx-switch-C0Lp5RGy.js} +19 -7
- package/dist/shared/hx-switch-C0Lp5RGy.js.map +1 -0
- package/dist/shared/{hx-tab-panel-BRNcLICw.js → hx-tab-panel-GGjk6Qg4.js} +139 -119
- package/dist/shared/hx-tab-panel-GGjk6Qg4.js.map +1 -0
- package/dist/shared/{hx-tag-B3N-vZ6B.js → hx-tag-K5fCjfqQ.js} +16 -14
- package/dist/shared/hx-tag-K5fCjfqQ.js.map +1 -0
- package/dist/shared/{hx-td-CVwCGBYf.js → hx-td-DZuILY3s.js} +64 -59
- package/dist/shared/hx-td-DZuILY3s.js.map +1 -0
- package/dist/shared/{hx-text-NjKoQATI.js → hx-text-DoEVOf47.js} +30 -29
- package/dist/shared/hx-text-DoEVOf47.js.map +1 -0
- package/dist/shared/{hx-text-input-CCZZbWQ9.js → hx-text-input-DTKWPVdy.js} +218 -86
- package/dist/shared/hx-text-input-DTKWPVdy.js.map +1 -0
- package/dist/shared/{hx-textarea-BsQdB1Rk.js → hx-textarea-BkSiU8oM.js} +35 -26
- package/dist/shared/hx-textarea-BkSiU8oM.js.map +1 -0
- package/dist/shared/hx-theme-Aag8QJvT.js +299 -0
- package/dist/shared/hx-theme-Aag8QJvT.js.map +1 -0
- package/dist/shared/{hx-time-picker-CJcIjH3C.js → hx-time-picker-BpCRsh_z.js} +101 -300
- package/dist/shared/hx-time-picker-BpCRsh_z.js.map +1 -0
- package/dist/shared/{hx-toggle-button-D4F1soEM.js → hx-toggle-button-CPFqs3eQ.js} +81 -41
- package/dist/shared/hx-toggle-button-CPFqs3eQ.js.map +1 -0
- package/dist/shared/{hx-tooltip-Bk1iQRHs.js → hx-tooltip-CrO4vzeX.js} +75 -53
- package/dist/shared/hx-tooltip-CrO4vzeX.js.map +1 -0
- package/dist/shared/{hx-top-nav-D2bQpns3.js → hx-top-nav-DYlnzDaU.js} +3 -1
- package/dist/shared/{hx-top-nav-D2bQpns3.js.map → hx-top-nav-DYlnzDaU.js.map} +1 -1
- package/dist/shared/{hx-tree-item-BobGN76x.js → hx-tree-item-DTDIBRrI.js} +140 -94
- package/dist/shared/hx-tree-item-DTDIBRrI.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-MvMMreTu.js → toast-factory-f184Gi70.js} +96 -73
- package/dist/shared/toast-factory-f184Gi70.js.map +1 -0
- package/dist/styles/shared-field.styles.d.ts +6 -0
- package/dist/styles/shared-field.styles.d.ts.map +1 -0
- package/dist/utilities/adoptedStylesheetRegistry.d.ts +47 -0
- package/dist/utilities/adoptedStylesheetRegistry.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 +26 -9
- package/dist/shared/hx-accordion-DT8qHOay.js.map +0 -1
- package/dist/shared/hx-action-bar-we_WJety.js.map +0 -1
- package/dist/shared/hx-alert-D6uok29t.js.map +0 -1
- package/dist/shared/hx-avatar-Cep6Urm3.js.map +0 -1
- package/dist/shared/hx-badge-BeuWuUj_.js.map +0 -1
- package/dist/shared/hx-banner-DnCBJtRR.js.map +0 -1
- package/dist/shared/hx-breadcrumb-item-Bj2UqhzR.js.map +0 -1
- package/dist/shared/hx-button-Cbhqpm5i.js.map +0 -1
- package/dist/shared/hx-button-group-CWjWv-wS.js.map +0 -1
- package/dist/shared/hx-card-B9j2SHyI.js.map +0 -1
- package/dist/shared/hx-carousel-item-Be0bC-7o.js.map +0 -1
- package/dist/shared/hx-checkbox-CuaJqEo7.js.map +0 -1
- package/dist/shared/hx-checkbox-group-ydUdV9Sx.js.map +0 -1
- package/dist/shared/hx-code-snippet-DBwIjl5p.js.map +0 -1
- package/dist/shared/hx-color-picker-Bb2UPVc3.js +0 -803
- package/dist/shared/hx-color-picker-Bb2UPVc3.js.map +0 -1
- package/dist/shared/hx-combobox-CNvY-es8.js.map +0 -1
- package/dist/shared/hx-container-DLUKnTi9.js.map +0 -1
- package/dist/shared/hx-copy-button-CLBA31to.js.map +0 -1
- package/dist/shared/hx-counter-D-1NXzGs.js +0 -138
- package/dist/shared/hx-counter-D-1NXzGs.js.map +0 -1
- package/dist/shared/hx-data-table-BwoJCFgs.js.map +0 -1
- package/dist/shared/hx-date-picker-DDcIBJir.js +0 -980
- package/dist/shared/hx-date-picker-DDcIBJir.js.map +0 -1
- package/dist/shared/hx-dialog-M7so0sRT.js.map +0 -1
- package/dist/shared/hx-divider-XgWIz4Mr.js.map +0 -1
- package/dist/shared/hx-drawer-CYxuhIQ0.js.map +0 -1
- package/dist/shared/hx-dropdown-7cfowTWv.js.map +0 -1
- package/dist/shared/hx-field-CDP8EXuj.js.map +0 -1
- package/dist/shared/hx-field-label-Bg-EWvqF.js.map +0 -1
- package/dist/shared/hx-file-upload-9HbONfqt.js.map +0 -1
- package/dist/shared/hx-form-BFv_N1dm.js +0 -1272
- package/dist/shared/hx-form-BFv_N1dm.js.map +0 -1
- package/dist/shared/hx-format-date-BsVr8gpD.js.map +0 -1
- package/dist/shared/hx-grid-BsDBCTbt.js.map +0 -1
- package/dist/shared/hx-icon--xsJztDh.js.map +0 -1
- package/dist/shared/hx-image-xyb_tHCR.js.map +0 -1
- package/dist/shared/hx-link-DfNy_UU8.js.map +0 -1
- package/dist/shared/hx-list-CdRNgeoP.js.map +0 -1
- package/dist/shared/hx-menu-divider-DR8klkFT.js.map +0 -1
- package/dist/shared/hx-meter-CZ7lnMra.js.map +0 -1
- package/dist/shared/hx-nav-DM6-cGKF.js.map +0 -1
- package/dist/shared/hx-nav-item-D54-5eUM.js.map +0 -1
- package/dist/shared/hx-number-input-BP6TIA92.js.map +0 -1
- package/dist/shared/hx-overflow-menu-CobkjAb8.js.map +0 -1
- package/dist/shared/hx-pagination-10dpXS95.js.map +0 -1
- package/dist/shared/hx-popover-ULjonbaO.js.map +0 -1
- package/dist/shared/hx-popup-CYf9Q5sj.js.map +0 -1
- package/dist/shared/hx-progress-bar-CnTibV63.js.map +0 -1
- package/dist/shared/hx-progress-ring-BHJBaXNk.js.map +0 -1
- package/dist/shared/hx-prose-DZh2KrMb.js +0 -876
- package/dist/shared/hx-prose-DZh2KrMb.js.map +0 -1
- package/dist/shared/hx-radio-BnKcRuQu.js.map +0 -1
- package/dist/shared/hx-rating-Y_t7Z4qb.js.map +0 -1
- package/dist/shared/hx-select-C50lD7NS.js.map +0 -1
- package/dist/shared/hx-slider-CprSNrRi.js.map +0 -1
- package/dist/shared/hx-spinner-BOApJ-g9.js.map +0 -1
- package/dist/shared/hx-split-button-CHGy4FUc.js.map +0 -1
- package/dist/shared/hx-split-panel-DYtB45Tr.js.map +0 -1
- package/dist/shared/hx-stack-CfoW7jU7.js.map +0 -1
- package/dist/shared/hx-stat-C2wfph8W.js.map +0 -1
- package/dist/shared/hx-status-indicator-oYWOkWlD.js.map +0 -1
- package/dist/shared/hx-step-DYoIumpR.js.map +0 -1
- package/dist/shared/hx-structured-list-CMWllxGg.js.map +0 -1
- package/dist/shared/hx-switch-DkKchcuP.js.map +0 -1
- package/dist/shared/hx-tab-panel-BRNcLICw.js.map +0 -1
- package/dist/shared/hx-tag-B3N-vZ6B.js.map +0 -1
- package/dist/shared/hx-td-CVwCGBYf.js.map +0 -1
- package/dist/shared/hx-text-NjKoQATI.js.map +0 -1
- package/dist/shared/hx-text-input-CCZZbWQ9.js.map +0 -1
- package/dist/shared/hx-textarea-BsQdB1Rk.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-CJcIjH3C.js.map +0 -1
- package/dist/shared/hx-toggle-button-D4F1soEM.js.map +0 -1
- package/dist/shared/hx-tooltip-Bk1iQRHs.js.map +0 -1
- package/dist/shared/hx-tree-item-BobGN76x.js.map +0 -1
- package/dist/shared/toast-factory-MvMMreTu.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
1
|
+
import { css as u, LitElement as p, html as i, nothing as d } from "lit";
|
|
2
|
+
import { property as s, state as v, customElement as f } from "lit/decorators.js";
|
|
3
3
|
import { classMap as x } from "lit/directives/class-map.js";
|
|
4
|
-
import { tokenStyles as
|
|
5
|
-
const
|
|
4
|
+
import { tokenStyles as b } from "@helixui/tokens/lit";
|
|
5
|
+
const g = u`
|
|
6
6
|
:host {
|
|
7
7
|
display: block;
|
|
8
8
|
}
|
|
@@ -55,7 +55,7 @@ const b = v`
|
|
|
55
55
|
|
|
56
56
|
.alert--accent {
|
|
57
57
|
border-width: 0;
|
|
58
|
-
border-
|
|
58
|
+
border-inline-start: var(--hx-alert-accent-width, 4px) solid
|
|
59
59
|
var(--hx-alert-border-color, var(--hx-color-info-200, #b3d9ef));
|
|
60
60
|
border-radius: 0;
|
|
61
61
|
}
|
|
@@ -138,7 +138,7 @@ const b = v`
|
|
|
138
138
|
flex-shrink: 0;
|
|
139
139
|
min-width: var(--hx-touch-target-size, 44px);
|
|
140
140
|
min-height: var(--hx-touch-target-size, 44px);
|
|
141
|
-
margin-
|
|
141
|
+
margin-inline-start: auto;
|
|
142
142
|
padding: 0;
|
|
143
143
|
border: none;
|
|
144
144
|
border-radius: var(--hx-border-radius-sm, 0.25rem);
|
|
@@ -150,18 +150,19 @@ const b = v`
|
|
|
150
150
|
transition:
|
|
151
151
|
background-color var(--hx-transition-fast, 150ms ease),
|
|
152
152
|
opacity var(--hx-transition-fast, 150ms ease);
|
|
153
|
-
opacity: 0.
|
|
153
|
+
opacity: var(--hx-opacity-75, 0.75);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
.alert__close-button:hover {
|
|
157
|
-
opacity: 1;
|
|
157
|
+
opacity: var(--hx-opacity-100, 1);
|
|
158
158
|
/* color-mix() is supported in Chrome 111+, Firefox 113+, Safari 16.2+. */
|
|
159
159
|
/* Falls back to transparent (no hover background) in older environments. */
|
|
160
160
|
background-color: color-mix(in srgb, currentColor 10%, transparent);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
.alert__close-button:focus-visible {
|
|
164
|
-
outline: var(--hx-focus-ring-width, 2px) solid
|
|
164
|
+
outline: var(--hx-focus-ring-width, 2px) solid
|
|
165
|
+
var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa));
|
|
165
166
|
outline-offset: var(--hx-focus-ring-offset, 2px);
|
|
166
167
|
opacity: 1;
|
|
167
168
|
}
|
|
@@ -172,6 +173,12 @@ const b = v`
|
|
|
172
173
|
fill: currentColor;
|
|
173
174
|
}
|
|
174
175
|
|
|
176
|
+
@media (prefers-reduced-motion: reduce) {
|
|
177
|
+
.alert__close-button {
|
|
178
|
+
transition: none;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
175
182
|
/* ─── Variant: info ─── */
|
|
176
183
|
|
|
177
184
|
:host([variant='info']) .alert,
|
|
@@ -209,17 +216,31 @@ const b = v`
|
|
|
209
216
|
--hx-alert-icon-color: var(--hx-color-error-500, #ef4444);
|
|
210
217
|
}
|
|
211
218
|
`;
|
|
212
|
-
var m = Object.defineProperty, _ = Object.getOwnPropertyDescriptor,
|
|
213
|
-
for (var
|
|
214
|
-
(
|
|
215
|
-
return
|
|
219
|
+
var m = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, o = (e, t, n, l) => {
|
|
220
|
+
for (var a = l > 1 ? void 0 : l ? _(t, n) : t, c = e.length - 1, h; c >= 0; c--)
|
|
221
|
+
(h = e[c]) && (a = (l ? h(t, n, a) : h(a)) || a);
|
|
222
|
+
return l && a && m(t, n, a), a;
|
|
216
223
|
};
|
|
217
224
|
let r = class extends p {
|
|
218
225
|
constructor() {
|
|
219
|
-
super(...arguments), this.variant = "info", this.dismissible = !1, this.heading = "", this.open = !1, this.showIcon = !1, this.accent = !1, this.returnFocusTo = null, this._hasActions = !1, this._hasTitle = !1, this._actionsSlotChangeHandler = null, this._titleSlotChangeHandler = null;
|
|
226
|
+
super(...arguments), this.variant = "info", this.dismissible = !1, this.heading = "", this.labelClose = "Close alert", this.open = !1, this.showIcon = !1, this.accent = !1, this.returnFocusTo = null, this._hasActions = !1, this._hasTitle = !1, this._actionsSlotChangeHandler = null, this._titleSlotChangeHandler = null;
|
|
220
227
|
}
|
|
221
228
|
// ─── Private Helpers ───
|
|
229
|
+
/** @internal */
|
|
230
|
+
_defaultSeverityLabel() {
|
|
231
|
+
return {
|
|
232
|
+
info: "Info:",
|
|
233
|
+
success: "Success:",
|
|
234
|
+
warning: "Warning:",
|
|
235
|
+
error: "Error:"
|
|
236
|
+
}[this.variant] ?? "";
|
|
237
|
+
}
|
|
238
|
+
/** @internal */
|
|
239
|
+
get _effectiveSeverityLabel() {
|
|
240
|
+
return this.severityLabel ?? this._defaultSeverityLabel();
|
|
241
|
+
}
|
|
222
242
|
/** Returns true when the variant requires assertive announcement. */
|
|
243
|
+
/** @internal */
|
|
223
244
|
get _isAssertive() {
|
|
224
245
|
return this.variant === "error";
|
|
225
246
|
}
|
|
@@ -228,6 +249,7 @@ let r = class extends p {
|
|
|
228
249
|
* role="alert" implies aria-live="assertive"; role="status" implies aria-live="polite".
|
|
229
250
|
* We do NOT set aria-live explicitly to avoid double-announcements in JAWS.
|
|
230
251
|
*/
|
|
252
|
+
/** @internal */
|
|
231
253
|
get _role() {
|
|
232
254
|
return this._isAssertive ? "alert" : "status";
|
|
233
255
|
}
|
|
@@ -256,16 +278,11 @@ let r = class extends p {
|
|
|
256
278
|
if (super.updated(e), e.has("variant") && this.setAttribute("role", this._role), e.has("open"))
|
|
257
279
|
if (this.open)
|
|
258
280
|
this.removeAttribute("aria-hidden"), e.get("open") === !1 && Promise.resolve().then(() => {
|
|
259
|
-
const
|
|
260
|
-
|
|
281
|
+
const n = this.renderRoot.querySelector(".sr-only");
|
|
282
|
+
n && (n.textContent = "", Promise.resolve().then(() => {
|
|
261
283
|
var c;
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
success: "Success:",
|
|
265
|
-
warning: "Warning:",
|
|
266
|
-
error: "Error:"
|
|
267
|
-
}[this.variant] ?? "", l = ((c = this.textContent) == null ? void 0 : c.trim()) ?? "";
|
|
268
|
-
s.textContent = o ? `${o} ${l}` : l;
|
|
284
|
+
const l = this._effectiveSeverityLabel, a = ((c = this.textContent) == null ? void 0 : c.trim()) ?? "";
|
|
285
|
+
n.textContent = l ? `${l} ${a}` : a;
|
|
269
286
|
}));
|
|
270
287
|
});
|
|
271
288
|
else {
|
|
@@ -275,6 +292,7 @@ let r = class extends p {
|
|
|
275
292
|
}
|
|
276
293
|
}
|
|
277
294
|
// ─── Default Icons ───
|
|
295
|
+
/** @internal */
|
|
278
296
|
_renderInfoIcon() {
|
|
279
297
|
return i`<svg viewBox="0 0 20 20" aria-hidden="true">
|
|
280
298
|
<path
|
|
@@ -282,6 +300,7 @@ let r = class extends p {
|
|
|
282
300
|
/>
|
|
283
301
|
</svg>`;
|
|
284
302
|
}
|
|
303
|
+
/** @internal */
|
|
285
304
|
_renderSuccessIcon() {
|
|
286
305
|
return i`<svg viewBox="0 0 20 20" aria-hidden="true">
|
|
287
306
|
<path
|
|
@@ -289,6 +308,7 @@ let r = class extends p {
|
|
|
289
308
|
/>
|
|
290
309
|
</svg>`;
|
|
291
310
|
}
|
|
311
|
+
/** @internal */
|
|
292
312
|
_renderWarningIcon() {
|
|
293
313
|
return i`<svg viewBox="0 0 20 20" aria-hidden="true">
|
|
294
314
|
<path
|
|
@@ -296,6 +316,7 @@ let r = class extends p {
|
|
|
296
316
|
/>
|
|
297
317
|
</svg>`;
|
|
298
318
|
}
|
|
319
|
+
/** @internal */
|
|
299
320
|
_renderErrorIcon() {
|
|
300
321
|
return i`<svg viewBox="0 0 20 20" aria-hidden="true">
|
|
301
322
|
<path
|
|
@@ -303,6 +324,7 @@ let r = class extends p {
|
|
|
303
324
|
/>
|
|
304
325
|
</svg>`;
|
|
305
326
|
}
|
|
327
|
+
/** @internal */
|
|
306
328
|
_renderDefaultIcon() {
|
|
307
329
|
switch (this.variant) {
|
|
308
330
|
case "success":
|
|
@@ -316,6 +338,7 @@ let r = class extends p {
|
|
|
316
338
|
return this._renderInfoIcon();
|
|
317
339
|
}
|
|
318
340
|
}
|
|
341
|
+
/** @internal */
|
|
319
342
|
_renderCloseIcon() {
|
|
320
343
|
return i`<svg viewBox="0 0 20 20" aria-hidden="true">
|
|
321
344
|
<path
|
|
@@ -324,6 +347,7 @@ let r = class extends p {
|
|
|
324
347
|
</svg>`;
|
|
325
348
|
}
|
|
326
349
|
// ─── Event Handling ───
|
|
350
|
+
/** @internal */
|
|
327
351
|
_handleDismiss() {
|
|
328
352
|
if (this.open = !1, this.dispatchEvent(
|
|
329
353
|
new CustomEvent("hx-close", {
|
|
@@ -347,12 +371,7 @@ let r = class extends p {
|
|
|
347
371
|
alert: !0,
|
|
348
372
|
[`alert--${this.variant}`]: !0,
|
|
349
373
|
"alert--accent": this.accent
|
|
350
|
-
},
|
|
351
|
-
info: "Info:",
|
|
352
|
-
success: "Success:",
|
|
353
|
-
warning: "Warning:",
|
|
354
|
-
error: "Error:"
|
|
355
|
-
}[this.variant] ?? "";
|
|
374
|
+
}, t = this._effectiveSeverityLabel;
|
|
356
375
|
return i`
|
|
357
376
|
<div
|
|
358
377
|
class="sr-only"
|
|
@@ -360,7 +379,7 @@ let r = class extends p {
|
|
|
360
379
|
aria-atomic="true"
|
|
361
380
|
></div>
|
|
362
381
|
<div part="alert" class=${x(e)}>
|
|
363
|
-
<span class="alert__severity-label">${
|
|
382
|
+
<span class="alert__severity-label">${t}</span>
|
|
364
383
|
${this.showIcon ? i`
|
|
365
384
|
<div part="icon" class="alert__icon">
|
|
366
385
|
<slot name="icon">${this._renderDefaultIcon()}</slot>
|
|
@@ -384,7 +403,7 @@ let r = class extends p {
|
|
|
384
403
|
<button
|
|
385
404
|
part="close-button"
|
|
386
405
|
class="alert__close-button"
|
|
387
|
-
aria-label=${
|
|
406
|
+
aria-label=${this.labelClose}
|
|
388
407
|
@click=${this._handleDismiss}
|
|
389
408
|
>
|
|
390
409
|
${this._renderCloseIcon()}
|
|
@@ -394,38 +413,44 @@ let r = class extends p {
|
|
|
394
413
|
`;
|
|
395
414
|
}
|
|
396
415
|
};
|
|
397
|
-
r.styles = [
|
|
398
|
-
|
|
399
|
-
|
|
416
|
+
r.styles = [b, g];
|
|
417
|
+
o([
|
|
418
|
+
s({ type: String, reflect: !0 })
|
|
400
419
|
], r.prototype, "variant", 2);
|
|
401
|
-
|
|
402
|
-
|
|
420
|
+
o([
|
|
421
|
+
s({ type: Boolean, reflect: !0 })
|
|
403
422
|
], r.prototype, "dismissible", 2);
|
|
404
|
-
|
|
405
|
-
|
|
423
|
+
o([
|
|
424
|
+
s({ type: String })
|
|
406
425
|
], r.prototype, "heading", 2);
|
|
407
|
-
|
|
408
|
-
|
|
426
|
+
o([
|
|
427
|
+
s({ attribute: "label-close" })
|
|
428
|
+
], r.prototype, "labelClose", 2);
|
|
429
|
+
o([
|
|
430
|
+
s({ type: Boolean, reflect: !0 })
|
|
409
431
|
], r.prototype, "open", 2);
|
|
410
|
-
|
|
411
|
-
|
|
432
|
+
o([
|
|
433
|
+
s({ type: Boolean, reflect: !0, attribute: "show-icon" })
|
|
412
434
|
], r.prototype, "showIcon", 2);
|
|
413
|
-
|
|
414
|
-
|
|
435
|
+
o([
|
|
436
|
+
s({ type: Boolean, reflect: !0 })
|
|
415
437
|
], r.prototype, "accent", 2);
|
|
416
|
-
|
|
417
|
-
|
|
438
|
+
o([
|
|
439
|
+
s({ attribute: "severity-label" })
|
|
440
|
+
], r.prototype, "severityLabel", 2);
|
|
441
|
+
o([
|
|
442
|
+
s({ type: String, attribute: "return-focus-to" })
|
|
418
443
|
], r.prototype, "returnFocusTo", 2);
|
|
419
|
-
|
|
420
|
-
|
|
444
|
+
o([
|
|
445
|
+
v()
|
|
421
446
|
], r.prototype, "_hasActions", 2);
|
|
422
|
-
|
|
423
|
-
|
|
447
|
+
o([
|
|
448
|
+
v()
|
|
424
449
|
], r.prototype, "_hasTitle", 2);
|
|
425
|
-
r =
|
|
450
|
+
r = o([
|
|
426
451
|
f("hx-alert")
|
|
427
452
|
], r);
|
|
428
453
|
export {
|
|
429
454
|
r as H
|
|
430
455
|
};
|
|
431
|
-
//# sourceMappingURL=hx-alert-
|
|
456
|
+
//# sourceMappingURL=hx-alert-DRZYP0Oo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-alert-DRZYP0Oo.js","sources":["../../src/components/hx-alert/hx-alert.styles.ts","../../src/components/hx-alert/hx-alert.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixAlertStyles = css`\n :host {\n display: block;\n }\n\n :host(:not([open])) {\n display: none;\n }\n\n /* ─── Screen-reader-only announcement region ─── */\n /* Always present in DOM so AT registers it before content is injected. */\n /* Visually hidden via clip-path technique (superior to display:none which */\n /* removes the element from the AT tree entirely). */\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: 0;\n }\n\n * {\n box-sizing: border-box;\n }\n\n /* ─── Alert Container ─── */\n\n .alert {\n display: flex;\n align-items: flex-start;\n gap: var(--hx-alert-gap, var(--hx-space-3, 0.75rem));\n padding: var(--hx-alert-padding, var(--hx-space-4, 1rem));\n border: var(--hx-alert-border-width, var(--hx-border-width-thin, 1px)) solid\n var(--hx-alert-border-color, var(--hx-color-info-200, #b3d9ef));\n border-radius: var(--hx-alert-border-radius, var(--hx-border-radius-md, 0.375rem));\n background-color: var(--hx-alert-bg, var(--hx-color-info-50, #e8f4fd));\n color: var(--hx-alert-color, var(--hx-color-info-800, #1a3a4a));\n font-family: var(--hx-alert-font-family, var(--hx-font-family-sans, sans-serif));\n font-size: var(--hx-font-size-sm, 0.875rem);\n line-height: var(--hx-line-height-normal, 1.5);\n }\n\n /* ─── Accent Variant (left border stripe) ─── */\n /* Removes full border and replaces with a left-side accent stripe. */\n /* Common healthcare/enterprise dashboard pattern for dense information UIs. */\n\n .alert--accent {\n border-width: 0;\n border-inline-start: var(--hx-alert-accent-width, 4px) solid\n var(--hx-alert-border-color, var(--hx-color-info-200, #b3d9ef));\n border-radius: 0;\n }\n\n /* ─── Severity Label (WCAG 1.4.1) ─── */\n /* Visually hidden — provides a non-color cue for screen readers and users */\n /* who cannot distinguish variants by color alone (e.g. color-blind users). */\n /* Always present regardless of showIcon so severity is never color-only. */\n\n .alert__severity-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 /* ─── Icon ─── */\n\n .alert__icon {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n color: var(--hx-alert-icon-color, var(--hx-color-info-500, #3b82f6));\n }\n\n .alert__icon svg {\n width: var(--hx-space-5, 1.25rem);\n height: var(--hx-space-5, 1.25rem);\n fill: currentColor;\n }\n\n /* ─── Title ─── */\n\n .alert__title {\n display: none;\n font-weight: var(--hx-font-weight-semibold, 600);\n margin-bottom: var(--hx-space-1, 0.25rem);\n }\n\n .alert__title--visible {\n display: block;\n }\n\n /* ─── Message ─── */\n\n .alert__message {\n flex: 1;\n min-width: 0;\n }\n\n /* ─── Actions ─── */\n /* Hidden by default; shown via JS slotchange detection to avoid invisible */\n /* margin-top spacing when no actions are slotted. */\n\n .alert__actions {\n display: none;\n align-items: center;\n gap: var(--hx-space-2, 0.5rem);\n margin-top: var(--hx-space-2, 0.5rem);\n }\n\n .alert__actions--visible {\n display: flex;\n }\n\n /* ─── Close Button ─── */\n /* Minimum 44px touch target per WCAG 2.5.8 (Target Size Minimum, AA) and */\n /* Apple HIG / Google Material guidelines. Uses absolute px units to ensure */\n /* the target size is independent of the consumer's base font size. */\n\n .alert__close-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n min-width: var(--hx-touch-target-size, 44px);\n min-height: var(--hx-touch-target-size, 44px);\n margin-inline-start: auto;\n padding: 0;\n border: none;\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n background: transparent;\n color: var(--hx-alert-color, var(--hx-color-info-800, #1a3a4a));\n cursor: pointer;\n font-size: var(--hx-font-size-md, 1rem);\n line-height: 1;\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n opacity var(--hx-transition-fast, 150ms ease);\n opacity: var(--hx-opacity-75, 0.75);\n }\n\n .alert__close-button:hover {\n opacity: var(--hx-opacity-100, 1);\n /* color-mix() is supported in Chrome 111+, Firefox 113+, Safari 16.2+. */\n /* Falls back to transparent (no hover background) in older environments. */\n background-color: color-mix(in srgb, currentColor 10%, transparent);\n }\n\n .alert__close-button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-focus-ring-color, var(--hx-color-primary-400, #60a5fa));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n opacity: 1;\n }\n\n .alert__close-button svg {\n width: var(--hx-space-4, 1rem);\n height: var(--hx-space-4, 1rem);\n fill: currentColor;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .alert__close-button {\n transition: none;\n }\n }\n\n /* ─── Variant: info ─── */\n\n :host([variant='info']) .alert,\n :host(:not([variant])) .alert {\n --hx-alert-bg: var(--hx-color-info-50, #e8f4fd);\n --hx-alert-border-color: var(--hx-color-info-200, #b3d9ef);\n --hx-alert-color: var(--hx-color-info-800, #1a3a4a);\n --hx-alert-icon-color: var(--hx-color-info-500, #3b82f6);\n }\n\n /* ─── Variant: success ─── */\n\n :host([variant='success']) .alert {\n --hx-alert-bg: var(--hx-color-success-50, #ecfdf5);\n --hx-alert-border-color: var(--hx-color-success-200, #a7f3d0);\n --hx-alert-color: var(--hx-color-success-800, #065f46);\n --hx-alert-icon-color: var(--hx-color-success-500, #10b981);\n }\n\n /* ─── Variant: warning ─── */\n\n :host([variant='warning']) .alert {\n --hx-alert-bg: var(--hx-color-warning-50, #fffbeb);\n --hx-alert-border-color: var(--hx-color-warning-200, #fde68a);\n --hx-alert-color: var(--hx-color-warning-800, #92400e);\n --hx-alert-icon-color: var(--hx-color-warning-500, #f59e0b);\n }\n\n /* ─── Variant: error ─── */\n\n :host([variant='error']) .alert {\n --hx-alert-bg: var(--hx-color-error-50, #fef2f2);\n --hx-alert-border-color: var(--hx-color-error-200, #fecaca);\n --hx-alert-color: var(--hx-color-error-800, #991b1b);\n --hx-alert-icon-color: var(--hx-color-error-500, #ef4444);\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } 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 { helixAlertStyles } from './hx-alert.styles.js';\n\n/** Alert variant determines visual styling and ARIA semantics. */\nexport type AlertVariant = 'info' | 'success' | 'warning' | 'error';\n\n/**\n * A feedback component for communicating status messages, warnings, and errors.\n * Critical for healthcare patient safety alerts.\n *\n * @summary Feedback alert for status messages with variant-based styling and ARIA live regions.\n *\n * @tag hx-alert\n *\n * @slot - Default slot for alert message content.\n * @slot title - Optional title/headline for the alert.\n * @slot icon - Custom icon to override the default variant icon.\n * @slot actions - Action buttons rendered within the alert.\n *\n * @attr {string} heading - Text used to build the close button's contextual aria-label\n * (e.g., \"Close Low blood pressure alert\"). When absent the label falls back to \"Close alert\".\n *\n * @fires {CustomEvent<{reason: string}>} hx-close - Dispatched when the user dismisses the alert.\n * @fires {CustomEvent} hx-after-close - Dispatched after the alert is dismissed.\n *\n * @csspart alert - The outer alert container.\n * @csspart title - The title/headline container.\n * @csspart icon - The icon container.\n * @csspart message - The message content area.\n * @csspart close-button - The dismiss button (only rendered when dismissible).\n * @csspart actions - The actions container.\n *\n * @cssprop [--hx-alert-bg=var(--hx-color-info-50)] - Alert background color.\n * @cssprop [--hx-alert-color=var(--hx-color-info-800)] - Alert text color.\n * @cssprop [--hx-alert-border-color=var(--hx-color-info-200)] - Alert border color.\n * @cssprop [--hx-alert-border-radius=var(--hx-border-radius-md)] - Alert border radius.\n * @cssprop [--hx-alert-border-width=var(--hx-border-width-thin)] - Alert border width.\n * @cssprop [--hx-alert-padding=var(--hx-space-4)] - Alert padding.\n * @cssprop [--hx-alert-gap=var(--hx-space-3)] - Gap between alert elements.\n * @cssprop [--hx-alert-icon-color=var(--hx-color-info-500)] - Alert icon color.\n * @cssprop [--hx-alert-font-family=var(--hx-font-family-sans)] - Alert font family.\n * @cssprop [--hx-touch-target-size=44px] - Minimum touch target size for the close button.\n * @cssprop [--hx-alert-accent-width=4px] - Width of the left border accent stripe.\n */\n@customElement('hx-alert')\nexport class HelixAlert extends LitElement {\n static override styles = [tokenStyles, helixAlertStyles];\n\n // ─── Properties ───\n\n /**\n * Visual variant of the alert that determines colors and ARIA semantics.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'info' | 'success' | 'warning' | 'error' = 'info';\n\n /**\n * Whether the alert can be dismissed by the user.\n * @attr dismissible\n */\n @property({ type: Boolean, reflect: true })\n dismissible = false;\n\n /**\n * Optional heading text that provides context for the close button's accessible label.\n * When provided, the close button is announced as \"Close [heading] alert\".\n * When absent, the close button falls back to \"Close alert\".\n * @attr heading\n */\n @property({ type: String })\n heading = '';\n\n /**\n * Accessible label for the close button. Override for i18n.\n * @attr label-close\n */\n @property({ attribute: 'label-close' }) labelClose = 'Close alert';\n\n /**\n * Whether the alert is visible. Add the `open` attribute to show the alert.\n * @attr open\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Whether to show the default variant icon. Add `show-icon` attribute to display the icon.\n * @attr show-icon\n */\n @property({ type: Boolean, reflect: true, attribute: 'show-icon' })\n showIcon = false;\n\n /**\n * When true, applies a left border accent stripe instead of a full border.\n * Common healthcare/enterprise dashboard pattern for visual distinction of alert types.\n * @attr accent\n */\n @property({ type: Boolean, reflect: true })\n accent = false;\n\n /**\n * Override for the severity prefix announced to screen readers (e.g., \"Info:\", \"Error:\").\n * When not set, defaults to the English label matching the current variant.\n * @attr severity-label\n */\n @property({ attribute: 'severity-label' })\n severityLabel: string | undefined;\n\n /**\n * CSS selector for the element to return focus to after the alert is dismissed.\n * When set, the component will find and focus the matching element after dismissal.\n * If not set, focus management is the caller's responsibility via the hx-after-close event.\n * @attr return-focus-to\n */\n @property({ type: String, attribute: 'return-focus-to' })\n returnFocusTo: string | null = null;\n\n // ─── State ───\n\n /** @internal */\n @state()\n private _hasActions = false;\n\n /** @internal */\n @state()\n private _hasTitle = false;\n\n // ─── Private Handler References ───\n\n /** @internal */\n private _actionsSlotChangeHandler: (() => void) | null = null;\n /** @internal */\n private _titleSlotChangeHandler: (() => void) | null = null;\n\n // ─── Private Helpers ───\n\n /** @internal */\n private _defaultSeverityLabel(): string {\n const labels: Record<string, string> = {\n info: 'Info:',\n success: 'Success:',\n warning: 'Warning:',\n error: 'Error:',\n };\n return labels[this.variant] ?? '';\n }\n\n /** @internal */\n private get _effectiveSeverityLabel(): string {\n return this.severityLabel ?? this._defaultSeverityLabel();\n }\n\n /** Returns true when the variant requires assertive announcement. */\n /** @internal */\n private get _isAssertive(): boolean {\n return this.variant === 'error';\n }\n\n /**\n * Returns the appropriate ARIA role based on variant.\n * role=\"alert\" implies aria-live=\"assertive\"; role=\"status\" implies aria-live=\"polite\".\n * We do NOT set aria-live explicitly to avoid double-announcements in JAWS.\n */\n /** @internal */\n private get _role(): string {\n return this._isAssertive ? 'alert' : 'status';\n }\n\n // ─── Lifecycle ───\n\n override connectedCallback(): void {\n super.connectedCallback();\n // Apply ARIA role to the host element for reliable screen reader support across\n // Shadow DOM boundaries. Placing role on a shadow-internal element has inconsistent\n // AT support in JAWS+Chrome and VoiceOver+Safari combinations (particularly pre-2024).\n this.setAttribute('role', this._role);\n if (!this.open) {\n this.setAttribute('aria-hidden', 'true');\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n const actionsSlot = this.renderRoot.querySelector<HTMLSlotElement>('slot[name=\"actions\"]');\n if (actionsSlot && this._actionsSlotChangeHandler) {\n actionsSlot.removeEventListener('slotchange', this._actionsSlotChangeHandler);\n }\n const titleSlot = this.renderRoot.querySelector<HTMLSlotElement>('slot[name=\"title\"]');\n if (titleSlot && this._titleSlotChangeHandler) {\n titleSlot.removeEventListener('slotchange', this._titleSlotChangeHandler);\n }\n }\n\n override firstUpdated(): void {\n // Track actions slot content to avoid invisible spacing when no actions are slotted.\n const actionsSlot = this.renderRoot.querySelector<HTMLSlotElement>('slot[name=\"actions\"]');\n if (actionsSlot) {\n this._actionsSlotChangeHandler = () => {\n this._hasActions = actionsSlot.assignedNodes({ flatten: true }).length > 0;\n };\n actionsSlot.addEventListener('slotchange', this._actionsSlotChangeHandler);\n }\n\n // Track title slot content so the title container doesn't create dead space when empty.\n const titleSlot = this.renderRoot.querySelector<HTMLSlotElement>('slot[name=\"title\"]');\n if (titleSlot) {\n this._titleSlotChangeHandler = () => {\n this._hasTitle = titleSlot.assignedNodes({ flatten: true }).length > 0;\n };\n titleSlot.addEventListener('slotchange', this._titleSlotChangeHandler);\n }\n }\n\n protected override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n if (changedProperties.has('variant')) {\n // Keep host ARIA role in sync with variant (assertive vs. polite).\n this.setAttribute('role', this._role);\n }\n if (changedProperties.has('open')) {\n // Manage aria-hidden in addition to display:none for reliable AT exclusion.\n // When open transitions from false→true, removing aria-hidden signals to AT\n // that the live region content should be announced.\n if (this.open) {\n this.removeAttribute('aria-hidden');\n // Trigger announcement via the sr-only polite live region for ATs (JAWS+Chrome,\n // NVDA) that do not re-announce existing content when aria-hidden is merely removed.\n // We inject text after a microtask so the DOM has settled and the live region\n // is registered by the AT before content arrives.\n const previousOpen = changedProperties.get('open');\n if (previousOpen === false) {\n Promise.resolve().then(() => {\n const announcer = this.renderRoot.querySelector<HTMLElement>('.sr-only');\n if (announcer) {\n announcer.textContent = '';\n // Second microtask ensures the clear is processed before re-injection,\n // guaranteeing the AT sees a content change rather than no-op.\n Promise.resolve().then(() => {\n const prefix = this._effectiveSeverityLabel;\n const message = this.textContent?.trim() ?? '';\n announcer.textContent = prefix ? `${prefix} ${message}` : message;\n });\n }\n });\n }\n } else {\n this.setAttribute('aria-hidden', 'true');\n // Clear the announcer when hidden so stale text is not re-read on next open.\n const announcer = this.renderRoot.querySelector<HTMLElement>('.sr-only');\n if (announcer) {\n announcer.textContent = '';\n }\n }\n }\n }\n\n // ─── Default Icons ───\n\n /** @internal */\n private _renderInfoIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm.75 4.75a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM9.25 9a.75.75 0 011.5 0v4a.75.75 0 01-1.5 0V9z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderSuccessIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm3.03 6.28a.75.75 0 00-1.06-1.06L9 10.19 7.78 8.97a.75.75 0 00-1.06 1.06l1.75 1.75a.75.75 0 001.06 0l3.5-3.5z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderWarningIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M8.49 2.92a1.75 1.75 0 013.02 0l6.25 10.83A1.75 1.75 0 0116.25 16H3.75a1.75 1.75 0 01-1.51-2.25L8.49 2.92zM10 7a.75.75 0 01.75.75v3a.75.75 0 01-1.5 0v-3A.75.75 0 0110 7zm0 7.5a.75.75 0 100-1.5.75.75 0 000 1.5z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderErrorIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M10 2a8 8 0 100 16 8 8 0 000-16zm-1.72 5.22a.75.75 0 011.06 0L10 7.94l.66-.72a.75.75 0 111.06 1.06L11.06 9l.66.72a.75.75 0 11-1.06 1.06L10 10.06l-.66.72a.75.75 0 01-1.06-1.06L8.94 9l-.66-.72a.75.75 0 010-1.06z\"\n />\n </svg>`;\n }\n\n /** @internal */\n private _renderDefaultIcon() {\n switch (this.variant) {\n case 'success':\n return this._renderSuccessIcon();\n case 'warning':\n return this._renderWarningIcon();\n case 'error':\n return this._renderErrorIcon();\n case 'info':\n default:\n return this._renderInfoIcon();\n }\n }\n\n /** @internal */\n private _renderCloseIcon() {\n return html`<svg viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n <path\n d=\"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z\"\n />\n </svg>`;\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleDismiss(): void {\n this.open = false;\n\n /**\n * Dispatched when the user dismisses the alert.\n * @event hx-close\n */\n this.dispatchEvent(\n new CustomEvent<{ reason: string }>('hx-close', {\n bubbles: true,\n composed: true,\n detail: { reason: 'user' },\n }),\n );\n\n /**\n * Dispatched after the alert is dismissed.\n * @event hx-after-close\n */\n this.dispatchEvent(\n new CustomEvent<void>('hx-after-close', {\n bubbles: true,\n composed: true,\n }),\n );\n\n // Return focus to a designated element if specified via returnFocusTo.\n if (this.returnFocusTo) {\n const target = document.querySelector(this.returnFocusTo);\n if (target instanceof HTMLElement) {\n target.focus();\n }\n }\n }\n\n // ─── Render ───\n\n override render() {\n const classes = {\n alert: true,\n [`alert--${this.variant}`]: true,\n 'alert--accent': this.accent,\n };\n\n // WCAG 1.4.1: Always render a visually-hidden severity label so the variant\n // is never conveyed by color alone, regardless of whether showIcon is set.\n const severityLabel = this._effectiveSeverityLabel;\n\n return html`\n <div\n class=\"sr-only\"\n aria-live=${this._isAssertive ? 'assertive' : 'polite'}\n aria-atomic=\"true\"\n ></div>\n <div part=\"alert\" class=${classMap(classes)}>\n <span class=\"alert__severity-label\">${severityLabel}</span>\n ${this.showIcon\n ? html`\n <div part=\"icon\" class=\"alert__icon\">\n <slot name=\"icon\">${this._renderDefaultIcon()}</slot>\n </div>\n `\n : nothing}\n\n <div part=\"message\" class=\"alert__message\">\n <div part=\"title\" class=\"alert__title ${this._hasTitle ? 'alert__title--visible' : ''}\">\n <slot name=\"title\"></slot>\n </div>\n <slot></slot>\n <div\n part=\"actions\"\n class=\"alert__actions ${this._hasActions ? 'alert__actions--visible' : ''}\"\n >\n <slot name=\"actions\"></slot>\n </div>\n </div>\n\n ${this.dismissible\n ? html`\n <button\n part=\"close-button\"\n class=\"alert__close-button\"\n aria-label=${this.labelClose}\n @click=${this._handleDismiss}\n >\n ${this._renderCloseIcon()}\n </button>\n `\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-alert': HelixAlert;\n }\n}\n\nexport type { HelixAlert as HxAlert };\n"],"names":["helixAlertStyles","css","HelixAlert","LitElement","actionsSlot","titleSlot","changedProperties","announcer","prefix","message","_a","html","target","classes","severityLabel","classMap","nothing","tokenStyles","__decorateClass","property","state","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;A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AAA,EADPE,EAAA;AAAM,GA5EIlB,EA6EH,WAAA,eAAA,CAAA;AAIAgB,EAAA;AAAA,EADPE,EAAA;AAAM,GAhFIlB,EAiFH,WAAA,aAAA,CAAA;AAjFGA,IAANgB,EAAA;AAAA,EADNG,EAAc,UAAU;AAAA,GACZnB,CAAA;"}
|
|
@@ -51,7 +51,7 @@ const w = _`
|
|
|
51
51
|
|
|
52
52
|
.avatar--lg {
|
|
53
53
|
--hx-avatar-size: var(--hx-size-12, 3rem);
|
|
54
|
-
--hx-avatar-font-size: var(--hx-font-size-
|
|
54
|
+
--hx-avatar-font-size: var(--hx-font-size-md, 1rem);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.avatar--xl {
|
|
@@ -148,10 +148,12 @@ let i = class extends y {
|
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
150
|
// ─── Slot Change Handling ───
|
|
151
|
+
/** @internal */
|
|
151
152
|
_handleSlotChange(t) {
|
|
152
153
|
const e = t.target.assignedNodes({ flatten: !0 });
|
|
153
154
|
this._hasDefaultSlot = e.some((a) => a.nodeType === Node.ELEMENT_NODE ? !0 : a.nodeType === Node.TEXT_NODE ? (a.textContent ?? "").trim().length > 0 : !1);
|
|
154
155
|
}
|
|
156
|
+
/** @internal */
|
|
155
157
|
_handleBadgeSlotChange(t) {
|
|
156
158
|
const e = t.target.assignedNodes({ flatten: !0 });
|
|
157
159
|
this._hasBadgeSlot = e.some((a) => a.nodeType === Node.ELEMENT_NODE ? !0 : a.nodeType === Node.TEXT_NODE ? (a.textContent ?? "").trim().length > 0 : !1), this._hasBadgeSlot && e.some((a) => {
|
|
@@ -163,10 +165,12 @@ let i = class extends y {
|
|
|
163
165
|
});
|
|
164
166
|
}
|
|
165
167
|
// ─── Image Error Handling ───
|
|
168
|
+
/** @internal */
|
|
166
169
|
_handleImgError() {
|
|
167
170
|
this._imgError = !0;
|
|
168
171
|
}
|
|
169
172
|
// ─── Fallback Icon ───
|
|
173
|
+
/** @internal */
|
|
170
174
|
_renderFallbackIcon() {
|
|
171
175
|
return v`
|
|
172
176
|
<svg
|
|
@@ -254,4 +258,4 @@ i = o([
|
|
|
254
258
|
export {
|
|
255
259
|
i as H
|
|
256
260
|
};
|
|
257
|
-
//# sourceMappingURL=hx-avatar-
|
|
261
|
+
//# sourceMappingURL=hx-avatar-7p1cj3lG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-avatar-7p1cj3lG.js","sources":["../../src/components/hx-avatar/hx-avatar.styles.ts","../../src/components/hx-avatar/hx-avatar.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixAvatarStyles = css`\n :host {\n display: inline-block;\n }\n\n /* P2-5: Respect the HTML hidden attribute — custom elements with explicit display ignore it otherwise. */\n :host([hidden]) {\n display: none !important;\n }\n\n /* P0-2: Wrapper provides the positioning context for the badge slot, outside overflow: hidden. */\n .avatar-wrapper {\n position: relative;\n display: inline-flex;\n }\n\n .avatar {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n width: var(--hx-avatar-size);\n height: var(--hx-avatar-size);\n background-color: var(--hx-avatar-bg, var(--hx-color-primary-100));\n color: var(--hx-avatar-color, var(--hx-color-primary-700));\n border-radius: var(--hx-avatar-border-radius);\n flex-shrink: 0;\n }\n\n /* ─── Size Variants ─── */\n\n .avatar--xs {\n --hx-avatar-size: var(--hx-size-6, 1.5rem);\n --hx-avatar-font-size: var(--hx-font-size-2xs, 0.625rem);\n }\n\n .avatar--sm {\n --hx-avatar-size: var(--hx-size-8, 2rem);\n --hx-avatar-font-size: var(--hx-font-size-xs, 0.75rem);\n }\n\n .avatar--md {\n --hx-avatar-size: var(--hx-size-10, 2.5rem);\n --hx-avatar-font-size: var(--hx-font-size-sm, 0.875rem);\n }\n\n .avatar--lg {\n --hx-avatar-size: var(--hx-size-12, 3rem);\n --hx-avatar-font-size: var(--hx-font-size-md, 1rem);\n }\n\n .avatar--xl {\n --hx-avatar-size: var(--hx-size-16, 4rem);\n --hx-avatar-font-size: var(--hx-font-size-lg, 1.125rem);\n }\n\n /* ─── Shape Variants ─── */\n\n .avatar--circle {\n --hx-avatar-border-radius: 50%;\n }\n\n .avatar--square {\n --hx-avatar-border-radius: var(--hx-border-radius-md, 0.375rem);\n }\n\n /* ─── Image ─── */\n\n .avatar__image {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n }\n\n /* ─── Initials ─── */\n\n .avatar__initials {\n font-family: var(--hx-font-family-sans, sans-serif);\n font-size: var(--hx-avatar-font-size);\n font-weight: var(--hx-font-weight-semibold, 600);\n line-height: 1;\n text-transform: uppercase;\n letter-spacing: var(--hx-letter-spacing-wide, 0.025em);\n user-select: none;\n }\n\n /* ─── Fallback Icon ─── */\n\n .avatar__fallback-icon {\n width: 60%;\n height: 60%;\n color: var(--hx-avatar-color, var(--hx-color-primary-700));\n }\n\n /* ─── Badge Slot ─── */\n\n /* P0-2: Positioned relative to .avatar-wrapper — outside the overflow: hidden on .avatar. */\n .avatar__badge {\n position: absolute;\n bottom: 0;\n right: 0;\n }\n\n /* P2-2: Hide the badge wrapper when no slot content is present, preserving slotchange detection. */\n .avatar__badge--hidden {\n display: none;\n }\n\n /* P1-B: Windows High Contrast Mode — avatar background is stripped by the system,\n leaving no visual boundary. Add a border so the avatar remains perceivable.\n WCAG 1.4.11 Non-text Contrast (Level AA). */\n @media (forced-colors: active) {\n .avatar {\n border: 2px solid ButtonText;\n }\n }\n`;\n","import { LitElement, html, nothing, type PropertyValues } 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 { helixAvatarStyles } from './hx-avatar.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * A user avatar component that displays an image, initials, or a fallback icon.\n * Supports a badge slot for status indicator overlays.\n *\n * @summary User avatar with image, initials, and fallback icon support for healthcare applications.\n *\n * @tag hx-avatar\n *\n * @slot - Default slot for custom avatar content. Overrides src and initials when slotted content is present.\n * @slot badge - Status indicator overlay, positioned at the bottom-right of the avatar container.\n *\n * @csspart avatar - The outer container element.\n * @csspart image - The img element shown when src is provided.\n * @csspart initials - The initials text span shown as a fallback.\n * @csspart fallback-icon - The SVG person silhouette shown when no src or initials are available.\n * @csspart badge - The badge slot container.\n *\n * @cssprop [--hx-avatar-size] - Computed width and height from the size variant.\n * @cssprop [--hx-avatar-border-radius] - Circle = 50%, Square = var(--hx-border-radius-md).\n * @cssprop [--hx-avatar-bg=var(--hx-color-primary-100)] - Background color of the avatar container.\n * @cssprop [--hx-avatar-color=var(--hx-color-primary-700)] - Text and icon color inside the avatar.\n * @cssprop [--hx-avatar-font-size] - Font size for the initials text, set per size variant.\n */\n@customElement('hx-avatar')\nexport class HelixAvatar extends LitElement {\n static override styles = [tokenStyles, helixAvatarStyles];\n\n /**\n * Image URL. When provided and successfully loaded, displays the image.\n * @attr src\n */\n @property({ type: String })\n src: string | undefined = undefined;\n\n /**\n * Accessible label for the image. Required when `src` is provided.\n * Used as the container's aria-label in image mode.\n * @attr alt\n */\n @property({ type: String })\n alt = '';\n\n /**\n * Human-readable accessible name for non-image states (initials, fallback icon).\n * In healthcare contexts, provide the full person name (e.g., \"Dr. Jane Doe\") rather than\n * relying on raw initials, which screen readers announce as individual letters.\n * When set, takes precedence over raw initials and the generic \"Avatar\" fallback.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Fallback initials text displayed when no image is available.\n * @attr initials\n */\n @property({ type: String })\n initials = '';\n\n /**\n * Size variant of the avatar.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'md';\n\n /**\n * Shape variant of the avatar.\n * @attr shape\n */\n @property({ type: String, reflect: true })\n shape: 'circle' | 'square' = 'circle';\n\n /**\n * Tracks whether the image failed to load, triggering the fallback chain.\n * @internal\n */\n @state()\n private _imgError = false;\n\n /**\n * Tracks whether the default slot has assigned content.\n * @internal\n */\n @state()\n private _hasDefaultSlot = false;\n\n /**\n * Tracks whether the badge slot has assigned content.\n * @internal\n */\n @state()\n private _hasBadgeSlot = false;\n\n // ─── Lifecycle ───\n\n // P1-A / P2-B: Use willUpdate() instead of updated() for property validation\n // and derived state. willUpdate() runs before render() and does not schedule\n // a second update cycle when @state() properties are mutated.\n override willUpdate(changedProperties: PropertyValues<this>): void {\n // P0-1: Reset image error state when src changes so a new valid src renders correctly.\n if (changedProperties.has('src')) {\n this._imgError = false;\n }\n\n // P1-2: Warn when src is provided without alt — silent accessibility failure in healthcare UIs.\n if (changedProperties.has('src') || changedProperties.has('alt')) {\n if (this.src && !this.alt) {\n devWarn(\n 'hx-avatar',\n 'Accessibility: \"alt\" attribute is required when \"src\" is provided. ' +\n 'Without alt text, screen readers announce a non-descriptive label. ' +\n 'Add alt=\"Full name or description\" to your hx-avatar element.',\n );\n }\n }\n\n // P2-A: Warn when initials are used without label — screen readers announce\n // raw initials as individual letters (e.g., \"J D\") instead of a name.\n if (changedProperties.has('initials') || changedProperties.has('label')) {\n if (this.initials && !this.label) {\n devWarn(\n 'hx-avatar',\n 'Accessibility: \"label\" attribute is recommended when \"initials\" is provided. ' +\n 'Without label, screen readers announce raw initials as individual letters. ' +\n 'Add label=\"Full Name\" to your hx-avatar element.',\n );\n }\n }\n\n // P2-1: Warn when invalid size or shape attribute values are used (e.g., from Twig templates).\n const validSizes: ReadonlyArray<string> = ['xs', 'sm', 'md', 'lg', 'xl'];\n if (changedProperties.has('size') && !validSizes.includes(this.size)) {\n devWarn(\n 'hx-avatar',\n `Invalid hx-size=\"${String(this.size)}\". Valid values: xs, sm, md, lg, xl. Rendering with \"md\".`,\n );\n }\n const validShapes: ReadonlyArray<string> = ['circle', 'square'];\n if (changedProperties.has('shape') && !validShapes.includes(this.shape)) {\n devWarn(\n 'hx-avatar',\n `Invalid shape=\"${String(this.shape)}\". Valid values: circle, square. Rendering with \"circle\".`,\n );\n }\n }\n\n // ─── Slot Change Handling ───\n\n /** @internal */\n private _handleSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n const nodes = slot.assignedNodes({ flatten: true });\n this._hasDefaultSlot = nodes.some((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) return true;\n if (node.nodeType === Node.TEXT_NODE) {\n return (node.textContent ?? '').trim().length > 0;\n }\n return false;\n });\n }\n\n /** @internal */\n private _handleBadgeSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n const nodes = slot.assignedNodes({ flatten: true });\n this._hasBadgeSlot = nodes.some((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) return true;\n if (node.nodeType === Node.TEXT_NODE) {\n return (node.textContent ?? '').trim().length > 0;\n }\n return false;\n });\n\n // P2-C: Warn when badge slot content lacks an accessible name.\n // A plain <span class=\"dot\"></span> badge is invisible to screen readers.\n if (this._hasBadgeSlot) {\n const hasAccessibleName = nodes.some((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const el = node as Element;\n return (\n el.hasAttribute('aria-label') ||\n el.hasAttribute('aria-labelledby') ||\n !!el.getAttribute('role')\n );\n }\n return false;\n });\n if (!hasAccessibleName) {\n devWarn(\n 'hx-avatar',\n 'Accessibility: badge slot content should have an accessible name ' +\n '(aria-label, role, etc.). Without it, the badge is invisible to screen readers.',\n );\n }\n }\n }\n\n // ─── Image Error Handling ───\n\n /** @internal */\n private _handleImgError(): void {\n this._imgError = true;\n }\n\n // ─── Fallback Icon ───\n\n /** @internal */\n private _renderFallbackIcon() {\n return html`\n <svg\n part=\"fallback-icon\"\n class=\"avatar__fallback-icon\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\"\n fill=\"currentColor\"\n >\n <path\n d=\"M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z\"\n />\n </svg>\n `;\n }\n\n // ─── Render ───\n\n override render() {\n const src = this.src;\n const showSlot = this._hasDefaultSlot;\n const showImage = !showSlot && !!src && !this._imgError;\n const showInitials = !showSlot && !showImage && !!this.initials.trim();\n const showFallback = !showSlot && !showImage && !showInitials;\n\n // P1-1 / P1-7: Use label property for human-readable accessible name in non-image states.\n const ariaLabel = showImage\n ? this.alt || this.label || 'Avatar'\n : showInitials\n ? this.label || this.initials\n : this.label || 'Avatar';\n\n // P2-1: Safe class fallback for invalid attribute values supplied via HTML/Twig.\n const validSizes: ReadonlyArray<string> = ['xs', 'sm', 'md', 'lg', 'xl'];\n const validShapes: ReadonlyArray<string> = ['circle', 'square'];\n const sizeClass = validSizes.includes(this.size) ? this.size : 'md';\n const shapeClass = validShapes.includes(this.shape) ? this.shape : 'circle';\n\n const classes = {\n avatar: true,\n [`avatar--${sizeClass}`]: true,\n [`avatar--${shapeClass}`]: true,\n };\n\n // P2-2: Badge wrapper is hidden (not removed) when empty so slotchange detection still works.\n const badgeClasses = {\n avatar__badge: true,\n 'avatar__badge--hidden': !this._hasBadgeSlot,\n };\n\n return html`\n <div class=\"avatar-wrapper\">\n <div\n part=\"avatar\"\n class=${classMap(classes)}\n role=${showSlot ? nothing : 'img'}\n aria-label=${showSlot ? nothing : ariaLabel}\n >\n <slot @slotchange=${this._handleSlotChange}></slot>\n ${showImage && src\n ? html`<img\n part=\"image\"\n class=\"avatar__image\"\n src=${src}\n alt=${this.alt}\n aria-hidden=\"true\"\n loading=\"lazy\"\n @error=${this._handleImgError}\n />`\n : nothing}\n ${showInitials\n ? html`<span part=\"initials\" class=\"avatar__initials\">${this.initials.trim()}</span>`\n : nothing}\n ${showFallback ? this._renderFallbackIcon() : nothing}\n </div>\n <span part=\"badge\" class=${classMap(badgeClasses)}>\n <slot name=\"badge\" @slotchange=${this._handleBadgeSlotChange}></slot>\n </span>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-avatar': HelixAvatar;\n }\n}\n"],"names":["helixAvatarStyles","css","HelixAvatar","LitElement","changedProperties","validSizes","devWarn","validShapes","e","nodes","node","el","html","src","showSlot","showImage","showInitials","showFallback","ariaLabel","sizeClass","shapeClass","classes","badgeClasses","classMap","nothing","tokenStyles","__decorateClass","property","state","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;;;;;;AC6B1B,IAAMC,IAAN,cAA0BC,EAAW;AAAA,EAArC,cAAA;AAAA,UAAA,GAAA,SAAA,GAQL,KAAA,MAA0B,QAQ1B,KAAA,MAAM,IAUN,KAAA,QAAQ,IAOR,KAAA,WAAW,IAOX,KAAA,OAAyC,MAOzC,KAAA,QAA6B,UAO7B,KAAQ,YAAY,IAOpB,KAAQ,kBAAkB,IAO1B,KAAQ,gBAAgB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;A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AoEH,WAAA,iBAAA,CAAA;AApEGA,IAANwB,EAAA;AAAA,EADNG,EAAc,WAAW;AAAA,GACb3B,CAAA;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as
|
|
1
|
+
import { css as c, LitElement as g, nothing as l, html as d } from "lit";
|
|
2
|
+
import { property as i, state as p, customElement as x } from "lit/decorators.js";
|
|
3
3
|
import { classMap as u } from "lit/directives/class-map.js";
|
|
4
4
|
import { tokenStyles as v } from "@helixui/tokens/lit";
|
|
5
|
-
const f =
|
|
5
|
+
const f = c`
|
|
6
6
|
:host {
|
|
7
7
|
display: inline-block;
|
|
8
8
|
}
|
|
@@ -112,8 +112,8 @@ const f = g`
|
|
|
112
112
|
/* ─── Dot Indicator (empty + pulse) ─── */
|
|
113
113
|
|
|
114
114
|
.badge--dot {
|
|
115
|
-
width: var(--hx-badge-dot-size, var(--hx-
|
|
116
|
-
height: var(--hx-badge-dot-size, var(--hx-
|
|
115
|
+
width: var(--hx-badge-dot-size, var(--hx-space-2, 0.5rem));
|
|
116
|
+
height: var(--hx-badge-dot-size, var(--hx-space-2, 0.5rem));
|
|
117
117
|
padding: 0;
|
|
118
118
|
border-radius: var(--hx-border-radius-full, 9999px);
|
|
119
119
|
}
|
|
@@ -125,21 +125,21 @@ const f = g`
|
|
|
125
125
|
|
|
126
126
|
/* ─── Pulse Animation ─── */
|
|
127
127
|
|
|
128
|
-
@keyframes
|
|
128
|
+
@keyframes hx-badge-pulse {
|
|
129
129
|
0%,
|
|
130
130
|
100% {
|
|
131
131
|
opacity: 1;
|
|
132
132
|
box-shadow: 0 0 0 0 var(--hx-badge-pulse-color, currentColor);
|
|
133
133
|
}
|
|
134
134
|
50% {
|
|
135
|
-
opacity: 0.
|
|
135
|
+
opacity: var(--hx-opacity-75, 0.75);
|
|
136
136
|
box-shadow: 0 0 0 4px transparent;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.badge--pulse {
|
|
141
|
-
animation:
|
|
142
|
-
var(--hx-badge-pulse-easing, var(--hx-
|
|
141
|
+
animation: hx-badge-pulse var(--hx-badge-pulse-duration, var(--hx-duration-slow, 2s))
|
|
142
|
+
var(--hx-badge-pulse-easing, var(--hx-easing-in-out, ease-in-out)) infinite;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -160,13 +160,16 @@ const f = g`
|
|
|
160
160
|
margin-inline-start: var(--hx-space-1, 0.25rem);
|
|
161
161
|
cursor: pointer;
|
|
162
162
|
color: inherit;
|
|
163
|
-
opacity: 0.
|
|
163
|
+
opacity: var(--hx-opacity-75, 0.75);
|
|
164
164
|
border-radius: var(--hx-border-radius-sm, 0.125rem);
|
|
165
165
|
line-height: 0;
|
|
166
|
+
/* WCAG 2.5.5: minimum 44×44px touch target */
|
|
167
|
+
min-width: var(--hx-touch-target-min, 2.75rem);
|
|
168
|
+
min-height: var(--hx-touch-target-min, 2.75rem);
|
|
166
169
|
}
|
|
167
170
|
|
|
168
171
|
.badge__remove-button:hover {
|
|
169
|
-
opacity: 1;
|
|
172
|
+
opacity: var(--hx-opacity-100, 1);
|
|
170
173
|
}
|
|
171
174
|
|
|
172
175
|
.badge__remove-button:focus-visible {
|
|
@@ -174,21 +177,29 @@ const f = g`
|
|
|
174
177
|
outline-offset: var(--hx-focus-ring-offset, 1px);
|
|
175
178
|
}
|
|
176
179
|
`;
|
|
177
|
-
var m = Object.defineProperty, y = Object.getOwnPropertyDescriptor,
|
|
178
|
-
for (var s = r > 1 ? void 0 : r ? y(
|
|
179
|
-
(b =
|
|
180
|
-
return r && s && m(
|
|
180
|
+
var m = Object.defineProperty, y = Object.getOwnPropertyDescriptor, t = (a, o, n, r) => {
|
|
181
|
+
for (var s = r > 1 ? void 0 : r ? y(o, n) : o, h = a.length - 1, b; h >= 0; h--)
|
|
182
|
+
(b = a[h]) && (s = (r ? b(o, n, s) : b(s)) || s);
|
|
183
|
+
return r && s && m(o, n, s), s;
|
|
181
184
|
};
|
|
182
|
-
let e = class extends
|
|
185
|
+
let e = class extends g {
|
|
183
186
|
constructor() {
|
|
184
187
|
super(...arguments), this.variant = "primary", this.size = "md", this.pill = !1, this.pulse = !1, this.removable = !1, this.count = void 0, this.max = 99, this.dotLabel = "", this.removeLabel = "Remove", this._hasSlotContent = !1;
|
|
185
188
|
}
|
|
189
|
+
// ─── Lifecycle ───
|
|
190
|
+
connectedCallback() {
|
|
191
|
+
super.connectedCallback();
|
|
192
|
+
const a = this.getAttribute("size");
|
|
193
|
+
a !== null && !this.hasAttribute("hx-size") && (this.size = a);
|
|
194
|
+
}
|
|
186
195
|
// ─── Slot Change Handling ───
|
|
187
|
-
|
|
188
|
-
|
|
196
|
+
/** @internal */
|
|
197
|
+
_handleSlotChange(a) {
|
|
198
|
+
const n = a.target.assignedNodes({ flatten: !0 });
|
|
189
199
|
this._hasSlotContent = n.some((r) => r.nodeType === Node.ELEMENT_NODE ? !0 : r.nodeType === Node.TEXT_NODE ? (r.textContent ?? "").trim().length > 0 : !1);
|
|
190
200
|
}
|
|
191
201
|
// ─── Event Handling ───
|
|
202
|
+
/** @internal */
|
|
192
203
|
_handleRemove() {
|
|
193
204
|
this.dispatchEvent(
|
|
194
205
|
new CustomEvent("hx-remove", {
|
|
@@ -198,33 +209,37 @@ let e = class extends c {
|
|
|
198
209
|
);
|
|
199
210
|
}
|
|
200
211
|
// ─── Count Display ───
|
|
212
|
+
/** @internal */
|
|
201
213
|
get _countDisplay() {
|
|
202
214
|
return this.count === void 0 ? "" : this.count > this.max ? `${this.max}+` : String(this.count);
|
|
203
215
|
}
|
|
216
|
+
/** @internal */
|
|
204
217
|
get _semanticVariantLabel() {
|
|
205
218
|
return e._SEMANTIC_VARIANT_LABELS[this.variant] ?? "";
|
|
206
219
|
}
|
|
207
220
|
// ─── Render ───
|
|
208
221
|
render() {
|
|
209
|
-
const
|
|
222
|
+
const a = this.count !== void 0, o = !this._hasSlotContent && !a && this.pulse;
|
|
223
|
+
o && this.dotLabel;
|
|
224
|
+
const n = {
|
|
210
225
|
badge: !0,
|
|
211
226
|
[`badge--${this.variant}`]: !0,
|
|
212
227
|
[`badge--${this.size}`]: !0,
|
|
213
228
|
"badge--pill": this.pill,
|
|
214
229
|
"badge--pulse": this.pulse,
|
|
215
|
-
"badge--dot":
|
|
230
|
+
"badge--dot": o
|
|
216
231
|
}, r = this._semanticVariantLabel;
|
|
217
232
|
return d`
|
|
218
233
|
<span
|
|
219
234
|
part="badge"
|
|
220
235
|
class=${u(n)}
|
|
221
|
-
role=${
|
|
222
|
-
aria-label=${
|
|
223
|
-
aria-live=${
|
|
236
|
+
role=${o && this.dotLabel ? "img" : l}
|
|
237
|
+
aria-label=${o && this.dotLabel ? this.dotLabel : l}
|
|
238
|
+
aria-live=${a ? "polite" : l}
|
|
224
239
|
>
|
|
225
240
|
${r ? d`<span class="badge__variant-label">${r}: </span>` : l}
|
|
226
241
|
<slot name="prefix"></slot>
|
|
227
|
-
${
|
|
242
|
+
${a ? this._countDisplay : d`<slot @slotchange=${this._handleSlotChange}></slot>`}
|
|
228
243
|
${this.removable ? d`<button
|
|
229
244
|
part="remove-button"
|
|
230
245
|
class="badge__remove-button"
|
|
@@ -249,40 +264,40 @@ e._SEMANTIC_VARIANT_LABELS = {
|
|
|
249
264
|
error: "Error",
|
|
250
265
|
info: "Info"
|
|
251
266
|
};
|
|
252
|
-
|
|
253
|
-
|
|
267
|
+
t([
|
|
268
|
+
i({ type: String, reflect: !0 })
|
|
254
269
|
], e.prototype, "variant", 2);
|
|
255
|
-
|
|
256
|
-
|
|
270
|
+
t([
|
|
271
|
+
i({ type: String, reflect: !0, attribute: "hx-size" })
|
|
257
272
|
], e.prototype, "size", 2);
|
|
258
|
-
|
|
259
|
-
|
|
273
|
+
t([
|
|
274
|
+
i({ type: Boolean, reflect: !0 })
|
|
260
275
|
], e.prototype, "pill", 2);
|
|
261
|
-
|
|
262
|
-
|
|
276
|
+
t([
|
|
277
|
+
i({ type: Boolean, reflect: !0 })
|
|
263
278
|
], e.prototype, "pulse", 2);
|
|
264
|
-
|
|
265
|
-
|
|
279
|
+
t([
|
|
280
|
+
i({ type: Boolean, reflect: !0 })
|
|
266
281
|
], e.prototype, "removable", 2);
|
|
267
|
-
|
|
268
|
-
|
|
282
|
+
t([
|
|
283
|
+
i({ type: Number, reflect: !0 })
|
|
269
284
|
], e.prototype, "count", 2);
|
|
270
|
-
|
|
271
|
-
|
|
285
|
+
t([
|
|
286
|
+
i({ type: Number, reflect: !0 })
|
|
272
287
|
], e.prototype, "max", 2);
|
|
273
|
-
|
|
274
|
-
|
|
288
|
+
t([
|
|
289
|
+
i({ type: String, attribute: "dot-label" })
|
|
275
290
|
], e.prototype, "dotLabel", 2);
|
|
276
|
-
|
|
277
|
-
|
|
291
|
+
t([
|
|
292
|
+
i({ type: String, attribute: "remove-label" })
|
|
278
293
|
], e.prototype, "removeLabel", 2);
|
|
279
|
-
|
|
294
|
+
t([
|
|
280
295
|
p()
|
|
281
296
|
], e.prototype, "_hasSlotContent", 2);
|
|
282
|
-
e =
|
|
297
|
+
e = t([
|
|
283
298
|
x("hx-badge")
|
|
284
299
|
], e);
|
|
285
300
|
export {
|
|
286
301
|
e as H
|
|
287
302
|
};
|
|
288
|
-
//# sourceMappingURL=hx-badge-
|
|
303
|
+
//# sourceMappingURL=hx-badge-DCxvskdw.js.map
|