@helixui/library 2.1.2-next.52 → 2.1.2-next.54
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 +1110 -1249
- package/dist/base/helix-element.d.ts +20 -8
- package/dist/base/helix-element.d.ts.map +1 -1
- package/dist/components/hx-accordion/hx-accordion-item.d.ts +7 -4
- package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
- package/dist/components/hx-accordion/hx-accordion-item.styles.d.ts.map +1 -1
- package/dist/components/hx-accordion/hx-accordion.d.ts +3 -2
- package/dist/components/hx-accordion/hx-accordion.d.ts.map +1 -1
- package/dist/components/hx-accordion/hx-accordion.styles.d.ts.map +1 -1
- package/dist/components/hx-accordion/index.d.ts +1 -0
- package/dist/components/hx-accordion/index.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 +2 -11
- package/dist/components/hx-action-bar/hx-action-bar.d.ts.map +1 -1
- package/dist/components/hx-action-bar/hx-action-bar.styles.d.ts.map +1 -1
- package/dist/components/hx-action-bar/index.js +1 -1
- package/dist/components/hx-alert/hx-alert.d.ts +7 -2
- 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.d.ts +1 -0
- package/dist/components/hx-alert/index.d.ts.map +1 -1
- package/dist/components/hx-alert/index.js +1 -1
- package/dist/components/hx-avatar/hx-avatar.d.ts +3 -2
- 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 +2 -9
- 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.d.ts +1 -1
- package/dist/components/hx-badge/index.d.ts.map +1 -1
- package/dist/components/hx-badge/index.js +1 -1
- package/dist/components/hx-banner/hx-banner.d.ts +3 -2
- package/dist/components/hx-banner/hx-banner.d.ts.map +1 -1
- package/dist/components/hx-banner/hx-banner.styles.d.ts.map +1 -1
- package/dist/components/hx-banner/index.js +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb-item.d.ts +2 -2
- package/dist/components/hx-breadcrumb/hx-breadcrumb-item.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb-item.styles.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts +9 -19
- package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb.styles.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/index.js +1 -1
- package/dist/components/hx-button/hx-button.d.ts +31 -9
- 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.d.ts +1 -0
- package/dist/components/hx-button/index.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 +4 -6
- package/dist/components/hx-button-group/hx-button-group.d.ts.map +1 -1
- package/dist/components/hx-button-group/hx-button-group.styles.d.ts.map +1 -1
- package/dist/components/hx-button-group/index.js +1 -1
- package/dist/components/hx-card/hx-card.d.ts +19 -2
- package/dist/components/hx-card/hx-card.d.ts.map +1 -1
- package/dist/components/hx-card/hx-card.styles.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 -2
- package/dist/components/hx-carousel/hx-carousel-item.d.ts.map +1 -1
- package/dist/components/hx-carousel/hx-carousel-item.styles.d.ts.map +1 -1
- package/dist/components/hx-carousel/hx-carousel.d.ts +2 -2
- package/dist/components/hx-carousel/hx-carousel.d.ts.map +1 -1
- package/dist/components/hx-carousel/hx-carousel.styles.d.ts.map +1 -1
- package/dist/components/hx-carousel/index.js +1 -1
- package/dist/components/hx-checkbox/hx-checkbox.d.ts +52 -5
- 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.d.ts +1 -0
- package/dist/components/hx-checkbox/index.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 +14 -20
- package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts.map +1 -1
- package/dist/components/hx-checkbox-group/hx-checkbox-group.styles.d.ts.map +1 -1
- package/dist/components/hx-checkbox-group/index.d.ts +1 -0
- package/dist/components/hx-checkbox-group/index.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 +0 -7
- package/dist/components/hx-clinical-status/hx-clinical-status.d.ts.map +1 -1
- package/dist/components/hx-clinical-status/hx-clinical-status.styles.d.ts.map +1 -1
- package/dist/components/hx-clinical-status/index.js +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/hx-color-picker.d.ts +8 -11
- 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.d.ts +1 -0
- package/dist/components/hx-color-picker/index.d.ts.map +1 -1
- package/dist/components/hx-color-picker/index.js +1 -1
- package/dist/components/hx-combobox/hx-combobox.d.ts +45 -22
- 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.d.ts +1 -0
- package/dist/components/hx-combobox/index.d.ts.map +1 -1
- package/dist/components/hx-combobox/index.js +1 -1
- package/dist/components/hx-container/hx-container.d.ts +2 -4
- package/dist/components/hx-container/hx-container.d.ts.map +1 -1
- package/dist/components/hx-container/hx-container.styles.d.ts.map +1 -1
- package/dist/components/hx-container/index.d.ts +0 -1
- package/dist/components/hx-container/index.d.ts.map +1 -1
- package/dist/components/hx-container/index.js +1 -1
- package/dist/components/hx-copy-button/hx-copy-button.d.ts +2 -2
- package/dist/components/hx-copy-button/hx-copy-button.d.ts.map +1 -1
- package/dist/components/hx-copy-button/hx-copy-button.styles.d.ts.map +1 -1
- package/dist/components/hx-copy-button/index.js +1 -1
- package/dist/components/hx-counter/hx-counter.d.ts +3 -2
- 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 +46 -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.d.ts +1 -0
- package/dist/components/hx-data-table/index.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 +35 -35
- 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.d.ts +1 -0
- package/dist/components/hx-date-picker/index.d.ts.map +1 -1
- package/dist/components/hx-date-picker/index.js +1 -1
- package/dist/components/hx-dialog/hx-dialog.d.ts +44 -5
- 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 +3 -4
- package/dist/components/hx-divider/hx-divider.d.ts.map +1 -1
- package/dist/components/hx-divider/hx-divider.styles.d.ts.map +1 -1
- package/dist/components/hx-divider/index.d.ts +0 -1
- package/dist/components/hx-divider/index.d.ts.map +1 -1
- package/dist/components/hx-divider/index.js +1 -1
- package/dist/components/hx-drawer/hx-drawer.d.ts +39 -2
- 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 +11 -7
- package/dist/components/hx-dropdown/hx-dropdown.d.ts.map +1 -1
- package/dist/components/hx-dropdown/hx-dropdown.styles.d.ts.map +1 -1
- package/dist/components/hx-dropdown/index.js +1 -1
- package/dist/components/hx-field/hx-field.d.ts +4 -3
- package/dist/components/hx-field/hx-field.d.ts.map +1 -1
- package/dist/components/hx-field/hx-field.styles.d.ts.map +1 -1
- package/dist/components/hx-field/index.js +1 -1
- package/dist/components/hx-field-label/hx-field-label.d.ts +2 -2
- package/dist/components/hx-field-label/hx-field-label.d.ts.map +1 -1
- package/dist/components/hx-field-label/hx-field-label.styles.d.ts.map +1 -1
- package/dist/components/hx-field-label/index.js +1 -1
- package/dist/components/hx-file-upload/hx-file-upload.d.ts +39 -21
- package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
- package/dist/components/hx-file-upload/index.d.ts +1 -0
- package/dist/components/hx-file-upload/index.d.ts.map +1 -1
- package/dist/components/hx-file-upload/index.js +1 -1
- package/dist/components/hx-form/hx-form.d.ts +2 -2
- package/dist/components/hx-form/hx-form.d.ts.map +1 -1
- package/dist/components/hx-form/hx-form.styles.d.ts +8 -0
- package/dist/components/hx-form/hx-form.styles.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 +2 -2
- package/dist/components/hx-format-date/hx-format-date.d.ts.map +1 -1
- package/dist/components/hx-format-date/hx-format-date.styles.d.ts.map +1 -1
- package/dist/components/hx-format-date/index.js +1 -1
- package/dist/components/hx-grid/hx-grid.d.ts +4 -3
- package/dist/components/hx-grid/hx-grid.d.ts.map +1 -1
- package/dist/components/hx-grid/hx-grid.styles.d.ts.map +1 -1
- package/dist/components/hx-grid/index.js +1 -1
- package/dist/components/hx-help-text/hx-help-text.d.ts +2 -4
- package/dist/components/hx-help-text/hx-help-text.d.ts.map +1 -1
- package/dist/components/hx-help-text/hx-help-text.styles.d.ts.map +1 -1
- package/dist/components/hx-help-text/index.js +1 -1
- package/dist/components/hx-icon/hx-icon.d.ts +17 -2
- package/dist/components/hx-icon/hx-icon.d.ts.map +1 -1
- package/dist/components/hx-icon/hx-icon.styles.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 +10 -14
- package/dist/components/hx-icon-button/hx-icon-button.d.ts.map +1 -1
- package/dist/components/hx-icon-button/hx-icon-button.styles.d.ts.map +1 -1
- package/dist/components/hx-icon-button/index.js +1 -1
- package/dist/components/hx-image/hx-image.d.ts +2 -2
- package/dist/components/hx-image/hx-image.d.ts.map +1 -1
- package/dist/components/hx-image/hx-image.styles.d.ts.map +1 -1
- package/dist/components/hx-image/index.js +1 -1
- package/dist/components/hx-link/hx-link.d.ts +2 -2
- 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 +3 -2
- package/dist/components/hx-list/hx-list-item.d.ts.map +1 -1
- package/dist/components/hx-list/hx-list.d.ts +3 -2
- package/dist/components/hx-list/hx-list.d.ts.map +1 -1
- package/dist/components/hx-list/hx-list.styles.d.ts.map +1 -1
- package/dist/components/hx-list/index.js +1 -1
- package/dist/components/hx-menu/hx-menu-divider.d.ts +2 -2
- package/dist/components/hx-menu/hx-menu-divider.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu-divider.styles.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu-item.d.ts +2 -2
- package/dist/components/hx-menu/hx-menu-item.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu-item.styles.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu.d.ts +2 -2
- package/dist/components/hx-menu/hx-menu.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu.styles.d.ts.map +1 -1
- package/dist/components/hx-menu/index.js +1 -1
- package/dist/components/hx-meter/hx-meter.d.ts +3 -4
- 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 +2 -4
- package/dist/components/hx-nav/hx-nav.d.ts.map +1 -1
- package/dist/components/hx-nav/hx-nav.styles.d.ts.map +1 -1
- package/dist/components/hx-nav/index.d.ts +1 -1
- package/dist/components/hx-nav/index.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 +14 -20
- package/dist/components/hx-number-input/hx-number-input.d.ts.map +1 -1
- package/dist/components/hx-number-input/hx-number-input.styles.d.ts.map +1 -1
- package/dist/components/hx-number-input/index.d.ts +1 -0
- package/dist/components/hx-number-input/index.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 +2 -2
- 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 +10 -2
- package/dist/components/hx-pagination/hx-pagination.d.ts.map +1 -1
- package/dist/components/hx-pagination/index.d.ts +1 -0
- package/dist/components/hx-pagination/index.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 +47 -5
- package/dist/components/hx-patient-banner/hx-patient-banner.d.ts.map +1 -1
- package/dist/components/hx-patient-banner/hx-patient-banner.styles.d.ts.map +1 -1
- package/dist/components/hx-patient-banner/index.js +1 -1
- package/dist/components/hx-phi-field/hx-phi-field.d.ts +85 -5
- package/dist/components/hx-phi-field/hx-phi-field.d.ts.map +1 -1
- package/dist/components/hx-phi-field/hx-phi-field.styles.d.ts.map +1 -1
- package/dist/components/hx-phi-field/index.js +1 -1
- package/dist/components/hx-popover/hx-popover.d.ts +4 -2
- package/dist/components/hx-popover/hx-popover.d.ts.map +1 -1
- package/dist/components/hx-popover/hx-popover.styles.d.ts.map +1 -1
- package/dist/components/hx-popover/index.js +1 -1
- package/dist/components/hx-popup/hx-popup.d.ts +7 -2
- 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 +3 -4
- package/dist/components/hx-progress-bar/hx-progress-bar.d.ts.map +1 -1
- package/dist/components/hx-progress-bar/index.js +1 -1
- package/dist/components/hx-progress-ring/hx-progress-ring.d.ts +3 -2
- package/dist/components/hx-progress-ring/hx-progress-ring.d.ts.map +1 -1
- package/dist/components/hx-progress-ring/hx-progress-ring.styles.d.ts.map +1 -1
- package/dist/components/hx-progress-ring/index.js +1 -1
- package/dist/components/hx-prose/hx-prose.d.ts +3 -2
- package/dist/components/hx-prose/hx-prose.d.ts.map +1 -1
- package/dist/components/hx-prose/hx-prose.styles.d.ts +8 -0
- package/dist/components/hx-prose/hx-prose.styles.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 +14 -39
- package/dist/components/hx-radio-group/hx-radio-group.d.ts.map +1 -1
- package/dist/components/hx-radio-group/hx-radio-group.styles.d.ts.map +1 -1
- package/dist/components/hx-radio-group/hx-radio.d.ts +19 -4
- 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.d.ts +1 -0
- package/dist/components/hx-radio-group/index.d.ts.map +1 -1
- package/dist/components/hx-radio-group/index.js +1 -1
- package/dist/components/hx-rating/hx-rating.d.ts +9 -20
- 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.d.ts +1 -0
- package/dist/components/hx-rating/index.d.ts.map +1 -1
- package/dist/components/hx-rating/index.js +1 -1
- package/dist/components/hx-select/hx-select.d.ts +26 -17
- 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.d.ts +1 -0
- package/dist/components/hx-select/index.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 +2 -5
- 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 +3 -2
- 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 +3 -2
- package/dist/components/hx-skeleton/hx-skeleton.d.ts.map +1 -1
- package/dist/components/hx-skeleton/hx-skeleton.styles.d.ts.map +1 -1
- package/dist/components/hx-skeleton/index.js +1 -1
- package/dist/components/hx-slider/hx-slider.d.ts +18 -22
- 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.d.ts +1 -0
- package/dist/components/hx-slider/index.d.ts.map +1 -1
- package/dist/components/hx-slider/index.js +1 -1
- package/dist/components/hx-spinner/hx-spinner.d.ts +2 -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 +10 -4
- package/dist/components/hx-split-button/hx-split-button.d.ts.map +1 -1
- package/dist/components/hx-split-button/hx-split-button.styles.d.ts.map +1 -1
- package/dist/components/hx-split-button/index.js +1 -1
- package/dist/components/hx-split-panel/hx-split-panel.d.ts +12 -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/hx-stack.d.ts +2 -2
- package/dist/components/hx-stack/hx-stack.d.ts.map +1 -1
- package/dist/components/hx-stack/hx-stack.styles.d.ts.map +1 -1
- package/dist/components/hx-stack/index.js +1 -1
- package/dist/components/hx-stat/hx-stat.d.ts +4 -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 +3 -2
- package/dist/components/hx-status-indicator/hx-status-indicator.d.ts.map +1 -1
- package/dist/components/hx-status-indicator/hx-status-indicator.styles.d.ts.map +1 -1
- package/dist/components/hx-status-indicator/index.js +1 -1
- package/dist/components/hx-steps/hx-step.d.ts +3 -2
- 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 +11 -4
- package/dist/components/hx-steps/hx-steps.d.ts.map +1 -1
- package/dist/components/hx-steps/hx-steps.styles.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 +3 -3
- package/dist/components/hx-structured-list/hx-structured-list.d.ts.map +1 -1
- package/dist/components/hx-structured-list/hx-structured-list.styles.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 +3 -2
- package/dist/components/hx-style-scope/hx-style-scope.d.ts.map +1 -1
- package/dist/components/hx-style-scope/hx-style-scope.styles.d.ts.map +1 -1
- package/dist/components/hx-style-scope/index.js +1 -1
- package/dist/components/hx-switch/hx-switch.d.ts +25 -29
- 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.d.ts +2 -1
- package/dist/components/hx-switch/index.d.ts.map +1 -1
- package/dist/components/hx-switch/index.js +1 -1
- package/dist/components/hx-table/hx-table.d.ts +3 -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-tbody.d.ts +2 -2
- package/dist/components/hx-table/hx-tbody.d.ts.map +1 -1
- package/dist/components/hx-table/hx-td.d.ts +2 -2
- package/dist/components/hx-table/hx-td.d.ts.map +1 -1
- package/dist/components/hx-table/hx-tfoot.d.ts +2 -2
- package/dist/components/hx-table/hx-tfoot.d.ts.map +1 -1
- package/dist/components/hx-table/hx-th.d.ts +2 -2
- package/dist/components/hx-table/hx-th.d.ts.map +1 -1
- package/dist/components/hx-table/hx-thead.d.ts +2 -2
- package/dist/components/hx-table/hx-thead.d.ts.map +1 -1
- package/dist/components/hx-table/hx-tr.d.ts +2 -2
- package/dist/components/hx-table/hx-tr.d.ts.map +1 -1
- package/dist/components/hx-table/index.js +1 -1
- package/dist/components/hx-tabs/hx-tab-panel.d.ts +2 -2
- package/dist/components/hx-tabs/hx-tab-panel.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tab-panel.styles.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tab.d.ts +2 -2
- package/dist/components/hx-tabs/hx-tab.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tab.styles.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tabs.d.ts +14 -2
- package/dist/components/hx-tabs/hx-tabs.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tabs.styles.d.ts.map +1 -1
- package/dist/components/hx-tabs/index.d.ts +1 -0
- package/dist/components/hx-tabs/index.d.ts.map +1 -1
- package/dist/components/hx-tabs/index.js +1 -1
- package/dist/components/hx-tag/hx-tag.d.ts +2 -4
- 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.d.ts +0 -2
- package/dist/components/hx-tag/index.d.ts.map +1 -1
- package/dist/components/hx-tag/index.js +1 -1
- package/dist/components/hx-text/hx-text.d.ts +2 -2
- package/dist/components/hx-text/hx-text.d.ts.map +1 -1
- package/dist/components/hx-text/hx-text.styles.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 +34 -7
- 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.d.ts +1 -0
- package/dist/components/hx-text-input/index.d.ts.map +1 -1
- package/dist/components/hx-text-input/index.js +1 -1
- package/dist/components/hx-textarea/hx-textarea.d.ts +41 -25
- 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.d.ts +1 -0
- package/dist/components/hx-textarea/index.d.ts.map +1 -1
- package/dist/components/hx-textarea/index.js +1 -1
- package/dist/components/hx-theme/hx-theme.d.ts +3 -11
- package/dist/components/hx-theme/hx-theme.d.ts.map +1 -1
- package/dist/components/hx-theme/hx-theme.styles.d.ts.map +1 -1
- package/dist/components/hx-theme/index.d.ts +0 -2
- package/dist/components/hx-theme/index.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 +13 -31
- 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.d.ts +1 -0
- package/dist/components/hx-time-picker/index.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 +2 -2
- package/dist/components/hx-toast/hx-toast-stack.d.ts.map +1 -1
- package/dist/components/hx-toast/hx-toast.d.ts +3 -2
- 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-toggle-button/hx-toggle-button.d.ts +10 -13
- 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.d.ts +1 -0
- package/dist/components/hx-toggle-button/index.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/index.js +1 -1
- package/dist/components/hx-tooltip/hx-tooltip.d.ts +2 -2
- package/dist/components/hx-tooltip/hx-tooltip.d.ts.map +1 -1
- package/dist/components/hx-tooltip/hx-tooltip.styles.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 +2 -2
- package/dist/components/hx-top-nav/hx-top-nav.d.ts.map +1 -1
- package/dist/components/hx-top-nav/hx-top-nav.styles.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 +2 -4
- package/dist/components/hx-tree-view/hx-tree-item.d.ts.map +1 -1
- package/dist/components/hx-tree-view/hx-tree-item.styles.d.ts.map +1 -1
- package/dist/components/hx-tree-view/hx-tree-view.d.ts +2 -4
- 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.d.ts +0 -4
- package/dist/components/hx-tree-view/index.d.ts.map +1 -1
- package/dist/components/hx-tree-view/index.js +1 -1
- package/dist/components/hx-visually-hidden/hx-visually-hidden.d.ts +2 -2
- package/dist/components/hx-visually-hidden/hx-visually-hidden.d.ts.map +1 -1
- package/dist/components/hx-visually-hidden/hx-visually-hidden.styles.d.ts.map +1 -1
- package/dist/components/hx-visually-hidden/index.js +1 -1
- package/dist/css/helix-all.css +3600 -790
- package/dist/css/helix-core.css +244 -50
- package/dist/css/helix-data.css +86 -7
- package/dist/css/helix-feedback.css +159 -61
- package/dist/css/helix-forms.css +2054 -105
- package/dist/css/helix-layout.css +53 -1
- package/dist/css/helix-media.css +40 -16
- package/dist/css/helix-navigation.css +209 -48
- package/dist/css/helix-overlay.css +99 -12
- package/dist/css/helix-tokens.css +30 -11
- package/dist/css/helix-utility.css +118 -9
- package/dist/css/hx-accordion.css +9 -1
- package/dist/css/hx-action-bar.css +17 -3
- package/dist/css/hx-alert.css +39 -18
- package/dist/css/hx-avatar.css +1 -1
- package/dist/css/hx-badge.css +31 -15
- package/dist/css/hx-banner.css +35 -18
- package/dist/css/hx-breadcrumb.css +27 -0
- package/dist/css/hx-button-group.css +13 -0
- package/dist/css/hx-button.css +6 -3
- package/dist/css/hx-card.css +18 -6
- package/dist/css/hx-carousel.css +40 -16
- package/dist/css/hx-checkbox-group.css +36 -4
- package/dist/css/hx-checkbox.css +74 -8
- package/dist/css/hx-clinical-status.css +46 -23
- package/dist/css/hx-code-snippet.css +25 -3
- package/dist/css/hx-color-picker.css +276 -1
- package/dist/css/hx-combobox.css +391 -1
- package/dist/css/hx-container.css +10 -0
- package/dist/css/hx-copy-button.css +31 -3
- package/dist/css/hx-counter.css +11 -1
- package/dist/css/hx-data-table.css +24 -1
- package/dist/css/hx-date-picker.css +437 -1
- package/dist/css/hx-dialog.css +23 -2
- package/dist/css/hx-divider.css +8 -0
- package/dist/css/hx-drawer.css +22 -1
- package/dist/css/hx-dropdown.css +10 -1
- package/dist/css/hx-field-label.css +18 -2
- package/dist/css/hx-field.css +39 -3
- package/dist/css/hx-file-upload.css +12 -12
- package/dist/css/hx-format-date.css +11 -0
- package/dist/css/hx-grid.css +10 -0
- package/dist/css/hx-help-text.css +25 -5
- package/dist/css/hx-icon-button.css +27 -0
- package/dist/css/hx-icon.css +8 -0
- package/dist/css/hx-image.css +11 -3
- package/dist/css/hx-link.css +23 -5
- package/dist/css/hx-list.css +10 -0
- package/dist/css/hx-menu.css +10 -2
- package/dist/css/hx-meter.css +22 -9
- package/dist/css/hx-nav.css +27 -12
- package/dist/css/hx-number-input.css +78 -0
- package/dist/css/hx-overflow-menu.css +41 -10
- package/dist/css/hx-pagination.css +13 -13
- package/dist/css/hx-patient-banner.css +30 -10
- package/dist/css/hx-phi-field.css +5 -2
- package/dist/css/hx-popover.css +16 -4
- package/dist/css/hx-popup.css +12 -0
- package/dist/css/hx-progress-bar.css +1 -1
- package/dist/css/hx-progress-ring.css +23 -1
- package/dist/css/hx-radio-group.css +35 -3
- package/dist/css/hx-rating.css +45 -4
- package/dist/css/hx-select.css +89 -7
- package/dist/css/hx-side-nav.css +26 -0
- package/dist/css/hx-skeleton.css +12 -0
- package/dist/css/hx-slider.css +16 -11
- package/dist/css/hx-spinner.css +12 -0
- package/dist/css/hx-split-button.css +37 -2
- package/dist/css/hx-split-panel.css +14 -0
- package/dist/css/hx-stack.css +10 -0
- package/dist/css/hx-stat.css +5 -5
- package/dist/css/hx-status-indicator.css +15 -2
- package/dist/css/hx-steps.css +12 -0
- package/dist/css/hx-structured-list.css +18 -2
- package/dist/css/hx-style-scope.css +11 -0
- package/dist/css/hx-switch.css +66 -4
- package/dist/css/hx-table.css +9 -1
- package/dist/css/hx-tabs.css +15 -3
- package/dist/css/hx-tag.css +24 -12
- package/dist/css/hx-text-input.css +71 -9
- package/dist/css/hx-text.css +38 -5
- package/dist/css/hx-textarea.css +71 -15
- package/dist/css/hx-theme.css +11 -0
- package/dist/css/hx-time-picker.css +224 -1
- package/dist/css/hx-toast.css +19 -7
- package/dist/css/hx-toggle-button.css +41 -4
- package/dist/css/hx-tooltip.css +16 -4
- package/dist/css/hx-top-nav.css +29 -8
- package/dist/css/hx-tree-view.css +9 -0
- package/dist/css/hx-visually-hidden.css +12 -0
- package/dist/css/index.css +1 -1
- package/dist/css/manifest.json +42 -9
- package/dist/form-test-utils.d.ts +45 -0
- package/dist/form-test-utils.d.ts.map +1 -0
- package/dist/index.d.ts +28 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +189 -177
- package/dist/index.js.map +1 -1
- package/dist/mixins/FormMixin.d.ts +24 -5
- package/dist/mixins/FormMixin.d.ts.map +1 -1
- package/dist/mixins/aria-delegation.d.ts +1 -1
- package/dist/mixins/aria-delegation.d.ts.map +1 -1
- package/dist/mixins/index.d.ts +3 -1
- package/dist/mixins/index.d.ts.map +1 -1
- package/dist/shared/{FormMixin-Bjvw20G5.js → FormMixin-B8PXk5RQ.js} +31 -14
- package/dist/shared/FormMixin-B8PXk5RQ.js.map +1 -0
- package/dist/shared/{aria-delegation-CBP9eQ0M.js → aria-delegation-Doq6RRUy.js} +6 -6
- package/dist/shared/aria-delegation-Doq6RRUy.js.map +1 -0
- package/dist/shared/{helix-element-CZvaIEQP.js → helix-element-BNEYeiys.js} +30 -27
- package/dist/shared/helix-element-BNEYeiys.js.map +1 -0
- package/dist/shared/{hx-accordion-CpfO0YQo.js → hx-accordion-Wt52OOZD.js} +127 -80
- package/dist/shared/hx-accordion-Wt52OOZD.js.map +1 -0
- package/dist/shared/{hx-action-bar-CNLYufVd.js → hx-action-bar-BKMADbHj.js} +89 -85
- package/dist/shared/hx-action-bar-BKMADbHj.js.map +1 -0
- package/dist/shared/{hx-alert-CHOjTBds.js → hx-alert-D7n94HwI.js} +47 -26
- package/dist/shared/hx-alert-D7n94HwI.js.map +1 -0
- package/dist/shared/{hx-avatar-an-WsuLl.js → hx-avatar-iLYzu8MJ.js} +10 -10
- package/dist/shared/hx-avatar-iLYzu8MJ.js.map +1 -0
- package/dist/shared/{hx-badge-RPzd-t5l.js → hx-badge-CVCmMPyW.js} +43 -27
- package/dist/shared/hx-badge-CVCmMPyW.js.map +1 -0
- package/dist/shared/{hx-banner-B-WEDiq7.js → hx-banner-C_He7Tr4.js} +60 -43
- package/dist/shared/hx-banner-C_He7Tr4.js.map +1 -0
- package/dist/shared/{hx-breadcrumb-item-jLAKK038.js → hx-breadcrumb-item-CldCwD1d.js} +123 -83
- package/dist/shared/hx-breadcrumb-item-CldCwD1d.js.map +1 -0
- package/dist/shared/{hx-button-DoN8jjQT.js → hx-button-Ddl-T6T-.js} +117 -92
- package/dist/shared/hx-button-Ddl-T6T-.js.map +1 -0
- package/dist/shared/{hx-button-group-BXlMQTt_.js → hx-button-group-BJOGWoMa.js} +33 -21
- package/dist/shared/hx-button-group-BJOGWoMa.js.map +1 -0
- package/dist/shared/{hx-card-BgXZXDuc.js → hx-card-ycveujjL.js} +64 -38
- package/dist/shared/hx-card-ycveujjL.js.map +1 -0
- package/dist/shared/{hx-carousel-item-Dwt9Pphz.js → hx-carousel-item-D_dCv61-.js} +76 -41
- package/dist/shared/hx-carousel-item-D_dCv61-.js.map +1 -0
- package/dist/shared/{hx-checkbox-C82GjRXe.js → hx-checkbox-DkkoWoye.js} +163 -80
- package/dist/shared/hx-checkbox-DkkoWoye.js.map +1 -0
- package/dist/shared/{hx-checkbox-group-DThZeN5d.js → hx-checkbox-group-C3poJ-Zw.js} +105 -79
- package/dist/shared/hx-checkbox-group-C3poJ-Zw.js.map +1 -0
- package/dist/shared/{hx-clinical-status-BjtT5c0M.js → hx-clinical-status-BS5lcddT.js} +60 -38
- package/dist/shared/hx-clinical-status-BS5lcddT.js.map +1 -0
- package/dist/shared/{hx-code-snippet-DcVENSuC.js → hx-code-snippet-B7wUKzyb.js} +32 -11
- package/dist/shared/hx-code-snippet-B7wUKzyb.js.map +1 -0
- package/dist/shared/{hx-color-picker-C6EIuS9t.js → hx-color-picker-DBaKTVLr.js} +380 -119
- package/dist/shared/hx-color-picker-DBaKTVLr.js.map +1 -0
- package/dist/shared/hx-combobox-BmgYT7Ar.js +929 -0
- package/dist/shared/hx-combobox-BmgYT7Ar.js.map +1 -0
- package/dist/shared/{hx-container-BwWbMPTH.js → hx-container-DVI7sxfX.js} +25 -15
- package/dist/shared/hx-container-DVI7sxfX.js.map +1 -0
- package/dist/shared/{hx-copy-button-BoM0WsMd.js → hx-copy-button-8deNUdwP.js} +68 -40
- package/dist/shared/hx-copy-button-8deNUdwP.js.map +1 -0
- package/dist/shared/{hx-counter-B5NgKlw4.js → hx-counter-CKfl_g8K.js} +32 -22
- package/dist/shared/hx-counter-CKfl_g8K.js.map +1 -0
- package/dist/shared/{hx-data-table-D5Ne-goy.js → hx-data-table-B6h0RPn0.js} +203 -132
- package/dist/shared/hx-data-table-B6h0RPn0.js.map +1 -0
- package/dist/shared/hx-date-picker-Dq2Nb68_.js +1077 -0
- package/dist/shared/hx-date-picker-Dq2Nb68_.js.map +1 -0
- package/dist/shared/{hx-dialog-D4ubstxx.js → hx-dialog-CvIlY0Tc.js} +85 -52
- package/dist/shared/hx-dialog-CvIlY0Tc.js.map +1 -0
- package/dist/shared/{hx-divider-BBtOLHRP.js → hx-divider-DwpOrzMW.js} +23 -15
- package/dist/shared/hx-divider-DwpOrzMW.js.map +1 -0
- package/dist/shared/{hx-drawer--WDLuWtS.js → hx-drawer-Cx2ZJhBe.js} +101 -66
- package/dist/shared/hx-drawer-Cx2ZJhBe.js.map +1 -0
- package/dist/shared/{hx-dropdown-n5-XSmiV.js → hx-dropdown-BjDrPUq5.js} +55 -46
- package/dist/shared/hx-dropdown-BjDrPUq5.js.map +1 -0
- package/dist/shared/{hx-field-CwT9tki1.js → hx-field-Dp3qQMut.js} +61 -25
- package/dist/shared/hx-field-Dp3qQMut.js.map +1 -0
- package/dist/shared/{hx-field-label-CcOK9VU3.js → hx-field-label-BC8QViXv.js} +41 -25
- package/dist/shared/hx-field-label-BC8QViXv.js.map +1 -0
- package/dist/shared/{hx-file-upload-Di_vpQaG.js → hx-file-upload-B6Yl1u0i.js} +110 -102
- package/dist/shared/hx-file-upload-B6Yl1u0i.js.map +1 -0
- package/dist/shared/{hx-form-BM6PHsw3.js → hx-form-ButQFt9A.js} +12 -11
- package/dist/shared/hx-form-ButQFt9A.js.map +1 -0
- package/dist/shared/{hx-format-date-B7L9odbA.js → hx-format-date-CKnlQOmV.js} +20 -9
- package/dist/shared/hx-format-date-CKnlQOmV.js.map +1 -0
- package/dist/shared/{hx-grid-BIAR5h9m.js → hx-grid-CXZf3jeK.js} +28 -18
- package/dist/shared/hx-grid-CXZf3jeK.js.map +1 -0
- package/dist/shared/{hx-help-text-Bmb80bP4.js → hx-help-text-D7eytSim.js} +45 -25
- package/dist/shared/hx-help-text-D7eytSim.js.map +1 -0
- package/dist/shared/{hx-icon-BKHs3OLu.js → hx-icon-CcyDPDYY.js} +104 -62
- package/dist/shared/hx-icon-CcyDPDYY.js.map +1 -0
- package/dist/shared/{hx-icon-button-CJuy9xbw.js → hx-icon-button-BHneqPCU.js} +58 -42
- package/dist/shared/hx-icon-button-BHneqPCU.js.map +1 -0
- package/dist/shared/{hx-image-ztiXumZB.js → hx-image-2gt14zZd.js} +34 -26
- package/dist/shared/hx-image-2gt14zZd.js.map +1 -0
- package/dist/shared/{hx-link-CN7AvGOW.js → hx-link-BESrWK8M.js} +51 -33
- package/dist/shared/hx-link-BESrWK8M.js.map +1 -0
- package/dist/shared/{hx-list-Dnei26t4.js → hx-list-_9qVv02L.js} +32 -22
- package/dist/shared/hx-list-_9qVv02L.js.map +1 -0
- package/dist/shared/{hx-menu-divider-DRT8yHRZ.js → hx-menu-divider-Ck-9Os1t.js} +103 -60
- package/dist/shared/hx-menu-divider-Ck-9Os1t.js.map +1 -0
- package/dist/shared/{hx-meter-BcVC9yrt.js → hx-meter-TbROk-dw.js} +57 -43
- package/dist/shared/hx-meter-TbROk-dw.js.map +1 -0
- package/dist/shared/{hx-nav-l0Rp7WPW.js → hx-nav-BcYDmjf7.js} +71 -56
- package/dist/shared/hx-nav-BcYDmjf7.js.map +1 -0
- package/dist/shared/{hx-nav-item-CJN4VDrf.js → hx-nav-item-pqPasRUm.js} +67 -23
- package/dist/shared/hx-nav-item-pqPasRUm.js.map +1 -0
- package/dist/shared/{hx-number-input-0Waw7Z7u.js → hx-number-input-mOIZ3-46.js} +169 -96
- package/dist/shared/hx-number-input-mOIZ3-46.js.map +1 -0
- package/dist/shared/{hx-overflow-menu-DElwFSCd.js → hx-overflow-menu-Dprb9lnT.js} +70 -38
- package/dist/shared/hx-overflow-menu-Dprb9lnT.js.map +1 -0
- package/dist/shared/{hx-pagination-BNtx-LG6.js → hx-pagination-AguTQjYC.js} +35 -35
- package/dist/shared/hx-pagination-AguTQjYC.js.map +1 -0
- package/dist/shared/{hx-patient-banner-BKiN7nIE.js → hx-patient-banner-uE6gqLpT.js} +67 -47
- package/dist/shared/hx-patient-banner-uE6gqLpT.js.map +1 -0
- package/dist/shared/{hx-phi-field-DD1qcBSO.js → hx-phi-field-BC_XowhC.js} +138 -56
- package/dist/shared/hx-phi-field-BC_XowhC.js.map +1 -0
- package/dist/shared/{hx-popover-CydNuVkT.js → hx-popover-B2_203ct.js} +44 -30
- package/dist/shared/hx-popover-B2_203ct.js.map +1 -0
- package/dist/shared/{hx-popup-DbzezTOd.js → hx-popup-DZXpsJ1R.js} +89 -64
- package/dist/shared/hx-popup-DZXpsJ1R.js.map +1 -0
- package/dist/shared/{hx-progress-bar-Cm0VihTN.js → hx-progress-bar-KjEkEJLy.js} +21 -20
- package/dist/shared/hx-progress-bar-KjEkEJLy.js.map +1 -0
- package/dist/shared/{hx-progress-ring-Cs0WgWDJ.js → hx-progress-ring-3zMwvrwD.js} +53 -31
- package/dist/shared/hx-progress-ring-3zMwvrwD.js.map +1 -0
- package/dist/shared/{hx-prose-Ml_L2zje.js → hx-prose-BCtK7YL6.js} +48 -15
- package/dist/shared/{hx-prose-Ml_L2zje.js.map → hx-prose-BCtK7YL6.js.map} +1 -1
- package/dist/shared/{hx-radio-f8c5ggHG.js → hx-radio-BBC5qZgE.js} +202 -123
- package/dist/shared/hx-radio-BBC5qZgE.js.map +1 -0
- package/dist/shared/{hx-rating-qRJZXskm.js → hx-rating-C3E3ENJb.js} +92 -69
- package/dist/shared/hx-rating-C3E3ENJb.js.map +1 -0
- package/dist/shared/{hx-select-CgcgsHU5.js → hx-select-CixTo7jp.js} +206 -135
- package/dist/shared/hx-select-CixTo7jp.js.map +1 -0
- package/dist/shared/{hx-skeleton-tiYvKO-t.js → hx-skeleton-LxkI0pxr.js} +39 -27
- package/dist/shared/hx-skeleton-LxkI0pxr.js.map +1 -0
- package/dist/shared/{hx-slider-BvXtvxmN.js → hx-slider-DFHuzF3N.js} +79 -91
- package/dist/shared/hx-slider-DFHuzF3N.js.map +1 -0
- package/dist/shared/{hx-spinner-D6nzuGmj.js → hx-spinner-BKjuCdZB.js} +32 -20
- package/dist/shared/hx-spinner-BKjuCdZB.js.map +1 -0
- package/dist/shared/{hx-split-button-CPndTJlC.js → hx-split-button-CGcJMmCG.js} +59 -22
- package/dist/shared/hx-split-button-CGcJMmCG.js.map +1 -0
- package/dist/shared/{hx-split-panel-Dx72NaET.js → hx-split-panel-C-1R10Mc.js} +71 -47
- package/dist/shared/hx-split-panel-C-1R10Mc.js.map +1 -0
- package/dist/shared/{hx-stack-B76_1O6g.js → hx-stack-DGfcOfWJ.js} +21 -11
- package/dist/shared/hx-stack-DGfcOfWJ.js.map +1 -0
- package/dist/shared/{hx-stat-DKlyBL_K.js → hx-stat-BTpykQAt.js} +14 -14
- package/dist/shared/hx-stat-BTpykQAt.js.map +1 -0
- package/dist/shared/{hx-status-indicator-ClWpK6zz.js → hx-status-indicator-X2QEWNFt.js} +36 -23
- package/dist/shared/hx-status-indicator-X2QEWNFt.js.map +1 -0
- package/dist/shared/{hx-step-C2Jk4mHa.js → hx-step-CRNQlmSo.js} +83 -32
- package/dist/shared/hx-step-CRNQlmSo.js.map +1 -0
- package/dist/shared/{hx-structured-list-DKlrv7kS.js → hx-structured-list-CqNbaEXg.js} +32 -16
- package/dist/shared/hx-structured-list-CqNbaEXg.js.map +1 -0
- package/dist/shared/hx-style-scope-TDnR8H4O.js +251 -0
- package/dist/shared/hx-style-scope-TDnR8H4O.js.map +1 -0
- package/dist/shared/{hx-switch-BzMN37PV.js → hx-switch-DqOD9JR7.js} +122 -81
- package/dist/shared/hx-switch-DqOD9JR7.js.map +1 -0
- package/dist/shared/{hx-tab-panel-J58zOSjq.js → hx-tab-panel-BIzKfW5i.js} +156 -102
- package/dist/shared/hx-tab-panel-BIzKfW5i.js.map +1 -0
- package/dist/shared/{hx-tag-F0ZcYj9b.js → hx-tag-CgnrNnte.js} +30 -18
- package/dist/shared/hx-tag-CgnrNnte.js.map +1 -0
- package/dist/shared/{hx-td-CNCvzBwY.js → hx-td-Bra35cH4.js} +55 -47
- package/dist/shared/hx-td-Bra35cH4.js.map +1 -0
- package/dist/shared/{hx-text-DcWBqZwx.js → hx-text-DMC2CPlL.js} +74 -41
- package/dist/shared/hx-text-DMC2CPlL.js.map +1 -0
- package/dist/shared/{hx-text-input-Zuodg9s_.js → hx-text-input--q0GH78x.js} +123 -62
- package/dist/shared/hx-text-input--q0GH78x.js.map +1 -0
- package/dist/shared/{hx-textarea-BfSJJtA1.js → hx-textarea-CK621vSL.js} +124 -89
- package/dist/shared/hx-textarea-CK621vSL.js.map +1 -0
- package/dist/shared/{hx-theme-pc1V7dyL.js → hx-theme-DfEy-SJA.js} +72 -64
- package/dist/shared/hx-theme-DfEy-SJA.js.map +1 -0
- package/dist/shared/{hx-time-picker-CZvmihHD.js → hx-time-picker-tPUfgElQ.js} +300 -82
- package/dist/shared/hx-time-picker-tPUfgElQ.js.map +1 -0
- package/dist/shared/{hx-toggle-button-BZUQUULm.js → hx-toggle-button-L-uBJr-a.js} +72 -42
- package/dist/shared/hx-toggle-button-L-uBJr-a.js.map +1 -0
- package/dist/shared/{hx-tooltip-Ny4i1Idj.js → hx-tooltip-B_zfKvwc.js} +44 -31
- package/dist/shared/hx-tooltip-B_zfKvwc.js.map +1 -0
- package/dist/shared/{hx-top-nav-CC4FW2Hp.js → hx-top-nav-CATbRvIv.js} +53 -30
- package/dist/shared/hx-top-nav-CATbRvIv.js.map +1 -0
- package/dist/shared/{hx-tree-item-CPQ9dJiK.js → hx-tree-item-A45WCiBu.js} +37 -9
- package/dist/shared/hx-tree-item-A45WCiBu.js.map +1 -0
- package/dist/shared/hx-visually-hidden-0bZKOWgT.js +66 -0
- package/dist/shared/hx-visually-hidden-0bZKOWgT.js.map +1 -0
- package/dist/shared/id-counter-DuX8vsui.js +11 -0
- package/dist/shared/{id-counter-PTgF-zcG.js.map → id-counter-DuX8vsui.js.map} +1 -1
- package/dist/shared/{toast-factory-CEMNOt1T.js → toast-factory-BPPnG3mM.js} +58 -46
- package/dist/shared/toast-factory-BPPnG3mM.js.map +1 -0
- package/dist/utilities/injectLightStyles.d.ts.map +1 -1
- package/dist/utilities/sanitizeCss.d.ts +43 -0
- package/dist/utilities/sanitizeCss.d.ts.map +1 -0
- package/package.json +29 -13
- package/dist/shared/FormMixin-Bjvw20G5.js.map +0 -1
- package/dist/shared/aria-delegation-CBP9eQ0M.js.map +0 -1
- package/dist/shared/document-token-adoption-DuYNKd4k.js +0 -21
- package/dist/shared/document-token-adoption-DuYNKd4k.js.map +0 -1
- package/dist/shared/helix-element-CZvaIEQP.js.map +0 -1
- package/dist/shared/hx-accordion-CpfO0YQo.js.map +0 -1
- package/dist/shared/hx-action-bar-CNLYufVd.js.map +0 -1
- package/dist/shared/hx-alert-CHOjTBds.js.map +0 -1
- package/dist/shared/hx-avatar-an-WsuLl.js.map +0 -1
- package/dist/shared/hx-badge-RPzd-t5l.js.map +0 -1
- package/dist/shared/hx-banner-B-WEDiq7.js.map +0 -1
- package/dist/shared/hx-breadcrumb-item-jLAKK038.js.map +0 -1
- package/dist/shared/hx-button-DoN8jjQT.js.map +0 -1
- package/dist/shared/hx-button-group-BXlMQTt_.js.map +0 -1
- package/dist/shared/hx-card-BgXZXDuc.js.map +0 -1
- package/dist/shared/hx-carousel-item-Dwt9Pphz.js.map +0 -1
- package/dist/shared/hx-checkbox-C82GjRXe.js.map +0 -1
- package/dist/shared/hx-checkbox-group-DThZeN5d.js.map +0 -1
- package/dist/shared/hx-clinical-status-BjtT5c0M.js.map +0 -1
- package/dist/shared/hx-code-snippet-DcVENSuC.js.map +0 -1
- package/dist/shared/hx-color-picker-C6EIuS9t.js.map +0 -1
- package/dist/shared/hx-combobox-BJ4lQocO.js +0 -544
- package/dist/shared/hx-combobox-BJ4lQocO.js.map +0 -1
- package/dist/shared/hx-container-BwWbMPTH.js.map +0 -1
- package/dist/shared/hx-copy-button-BoM0WsMd.js.map +0 -1
- package/dist/shared/hx-counter-B5NgKlw4.js.map +0 -1
- package/dist/shared/hx-data-table-D5Ne-goy.js.map +0 -1
- package/dist/shared/hx-date-picker-Cd3I3WkX.js +0 -627
- package/dist/shared/hx-date-picker-Cd3I3WkX.js.map +0 -1
- package/dist/shared/hx-dialog-D4ubstxx.js.map +0 -1
- package/dist/shared/hx-divider-BBtOLHRP.js.map +0 -1
- package/dist/shared/hx-drawer--WDLuWtS.js.map +0 -1
- package/dist/shared/hx-dropdown-n5-XSmiV.js.map +0 -1
- package/dist/shared/hx-field-CwT9tki1.js.map +0 -1
- package/dist/shared/hx-field-label-CcOK9VU3.js.map +0 -1
- package/dist/shared/hx-file-upload-Di_vpQaG.js.map +0 -1
- package/dist/shared/hx-form-BM6PHsw3.js.map +0 -1
- package/dist/shared/hx-format-date-B7L9odbA.js.map +0 -1
- package/dist/shared/hx-grid-BIAR5h9m.js.map +0 -1
- package/dist/shared/hx-help-text-Bmb80bP4.js.map +0 -1
- package/dist/shared/hx-icon-BKHs3OLu.js.map +0 -1
- package/dist/shared/hx-icon-button-CJuy9xbw.js.map +0 -1
- package/dist/shared/hx-image-ztiXumZB.js.map +0 -1
- package/dist/shared/hx-link-CN7AvGOW.js.map +0 -1
- package/dist/shared/hx-list-Dnei26t4.js.map +0 -1
- package/dist/shared/hx-menu-divider-DRT8yHRZ.js.map +0 -1
- package/dist/shared/hx-meter-BcVC9yrt.js.map +0 -1
- package/dist/shared/hx-nav-item-CJN4VDrf.js.map +0 -1
- package/dist/shared/hx-nav-l0Rp7WPW.js.map +0 -1
- package/dist/shared/hx-number-input-0Waw7Z7u.js.map +0 -1
- package/dist/shared/hx-overflow-menu-DElwFSCd.js.map +0 -1
- package/dist/shared/hx-pagination-BNtx-LG6.js.map +0 -1
- package/dist/shared/hx-patient-banner-BKiN7nIE.js.map +0 -1
- package/dist/shared/hx-phi-field-DD1qcBSO.js.map +0 -1
- package/dist/shared/hx-popover-CydNuVkT.js.map +0 -1
- package/dist/shared/hx-popup-DbzezTOd.js.map +0 -1
- package/dist/shared/hx-progress-bar-Cm0VihTN.js.map +0 -1
- package/dist/shared/hx-progress-ring-Cs0WgWDJ.js.map +0 -1
- package/dist/shared/hx-radio-f8c5ggHG.js.map +0 -1
- package/dist/shared/hx-rating-qRJZXskm.js.map +0 -1
- package/dist/shared/hx-select-CgcgsHU5.js.map +0 -1
- package/dist/shared/hx-skeleton-tiYvKO-t.js.map +0 -1
- package/dist/shared/hx-slider-BvXtvxmN.js.map +0 -1
- package/dist/shared/hx-spinner-D6nzuGmj.js.map +0 -1
- package/dist/shared/hx-split-button-CPndTJlC.js.map +0 -1
- package/dist/shared/hx-split-panel-Dx72NaET.js.map +0 -1
- package/dist/shared/hx-stack-B76_1O6g.js.map +0 -1
- package/dist/shared/hx-stat-DKlyBL_K.js.map +0 -1
- package/dist/shared/hx-status-indicator-ClWpK6zz.js.map +0 -1
- package/dist/shared/hx-step-C2Jk4mHa.js.map +0 -1
- package/dist/shared/hx-structured-list-DKlrv7kS.js.map +0 -1
- package/dist/shared/hx-style-scope-CsQ2Phf_.js +0 -126
- package/dist/shared/hx-style-scope-CsQ2Phf_.js.map +0 -1
- package/dist/shared/hx-switch-BzMN37PV.js.map +0 -1
- package/dist/shared/hx-tab-panel-J58zOSjq.js.map +0 -1
- package/dist/shared/hx-tag-F0ZcYj9b.js.map +0 -1
- package/dist/shared/hx-td-CNCvzBwY.js.map +0 -1
- package/dist/shared/hx-text-DcWBqZwx.js.map +0 -1
- package/dist/shared/hx-text-input-Zuodg9s_.js.map +0 -1
- package/dist/shared/hx-textarea-BfSJJtA1.js.map +0 -1
- package/dist/shared/hx-theme-pc1V7dyL.js.map +0 -1
- package/dist/shared/hx-time-picker-CZvmihHD.js.map +0 -1
- package/dist/shared/hx-toggle-button-BZUQUULm.js.map +0 -1
- package/dist/shared/hx-tooltip-Ny4i1Idj.js.map +0 -1
- package/dist/shared/hx-top-nav-CC4FW2Hp.js.map +0 -1
- package/dist/shared/hx-tree-item-CPQ9dJiK.js.map +0 -1
- package/dist/shared/hx-visually-hidden-vKX8QjeX.js +0 -54
- package/dist/shared/hx-visually-hidden-vKX8QjeX.js.map +0 -1
- package/dist/shared/id-counter-PTgF-zcG.js +0 -15
- package/dist/shared/toast-factory-CEMNOt1T.js.map +0 -1
- package/dist/tools/cem-a11y-analyzer/analyzers/aria-analyzer.d.ts +0 -12
- package/dist/tools/cem-a11y-analyzer/analyzers/aria-analyzer.d.ts.map +0 -1
- package/dist/tools/cem-a11y-analyzer/analyzers/focus-analyzer.d.ts +0 -13
- package/dist/tools/cem-a11y-analyzer/analyzers/focus-analyzer.d.ts.map +0 -1
- package/dist/tools/cem-a11y-analyzer/analyzers/form-analyzer.d.ts +0 -13
- package/dist/tools/cem-a11y-analyzer/analyzers/form-analyzer.d.ts.map +0 -1
- package/dist/tools/cem-a11y-analyzer/analyzers/keyboard-analyzer.d.ts +0 -12
- package/dist/tools/cem-a11y-analyzer/analyzers/keyboard-analyzer.d.ts.map +0 -1
- package/dist/tools/cem-a11y-analyzer/analyzers/label-analyzer.d.ts +0 -13
- package/dist/tools/cem-a11y-analyzer/analyzers/label-analyzer.d.ts.map +0 -1
- package/dist/tools/cem-a11y-analyzer/analyzers/motion-analyzer.d.ts +0 -12
- package/dist/tools/cem-a11y-analyzer/analyzers/motion-analyzer.d.ts.map +0 -1
- package/dist/tools/cem-a11y-analyzer/index.d.ts +0 -14
- package/dist/tools/cem-a11y-analyzer/index.d.ts.map +0 -1
- package/dist/tools/cem-a11y-analyzer/reporter.d.ts +0 -6
- package/dist/tools/cem-a11y-analyzer/reporter.d.ts.map +0 -1
- package/dist/tools/cem-a11y-analyzer/scorer.d.ts +0 -22
- package/dist/tools/cem-a11y-analyzer/scorer.d.ts.map +0 -1
- package/dist/tools/cem-a11y-analyzer/types.d.ts +0 -171
- package/dist/tools/cem-a11y-analyzer/types.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { css as _,
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
1
|
+
import { css as _, nothing as o, html as g } from "lit";
|
|
2
|
+
import { property as c, state as u, customElement as S } from "lit/decorators.js";
|
|
3
|
+
import { unsafeHTML as x } from "lit/directives/unsafe-html.js";
|
|
4
|
+
import { H as y } from "./helix-element-BNEYeiys.js";
|
|
5
|
+
const b = _`
|
|
6
6
|
:host {
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
align-items: center;
|
|
@@ -75,15 +75,23 @@ const y = _`
|
|
|
75
75
|
fill: currentColor;
|
|
76
76
|
display: block;
|
|
77
77
|
}
|
|
78
|
+
|
|
79
|
+
/* ─── Forced Colors (Windows High Contrast) ─── */
|
|
80
|
+
|
|
81
|
+
@media (forced-colors: active) {
|
|
82
|
+
:host {
|
|
83
|
+
color: CanvasText;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
78
86
|
`;
|
|
79
|
-
var
|
|
80
|
-
for (var t =
|
|
81
|
-
(
|
|
82
|
-
return
|
|
87
|
+
var z = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, a = (e, i, r, n) => {
|
|
88
|
+
for (var t = n > 1 ? void 0 : n ? $(i, r) : i, l = e.length - 1, f; l >= 0; l--)
|
|
89
|
+
(f = e[l]) && (t = (n ? f(i, r, t) : f(t)) || t);
|
|
90
|
+
return n && t && z(i, r, t), t;
|
|
83
91
|
};
|
|
84
|
-
let s = class extends
|
|
92
|
+
let s = class extends y {
|
|
85
93
|
constructor() {
|
|
86
|
-
super(...arguments), this.name = "", this.src = void 0, this.spriteUrl = void 0, this.size = "md", this.label = "", this._inlineSvg = "", this._fetchedSrc = void 0, this._fetchSeq = 0;
|
|
94
|
+
super(...arguments), this.name = "", this.src = void 0, this.spriteUrl = void 0, this.size = "md", this.label = "", this.allowedOrigins = "", this._inlineSvg = "", this._fetchedSrc = void 0, this._fetchSeq = 0;
|
|
87
95
|
}
|
|
88
96
|
// ─── Lifecycle ───
|
|
89
97
|
updated(e) {
|
|
@@ -97,20 +105,42 @@ let s = class extends S {
|
|
|
97
105
|
this._inlineSvg = "", this._fetchedSrc = void 0;
|
|
98
106
|
return;
|
|
99
107
|
}
|
|
108
|
+
if (!this._isAllowedOrigin(e)) {
|
|
109
|
+
console.warn(
|
|
110
|
+
`[hx-icon] Blocked cross-origin SVG fetch: "${e}". Only same-origin URLs are allowed by default. Set the allowed-origins attribute to permit specific external origins.`
|
|
111
|
+
), this._inlineSvg = "", this._fetchedSrc = void 0;
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
100
114
|
try {
|
|
101
|
-
let r =
|
|
102
|
-
r || (r = fetch(e).then(async (
|
|
103
|
-
const
|
|
115
|
+
let r = d.get(e);
|
|
116
|
+
r || (r = fetch(e).then(async (l) => l.ok ? l.text() : (d.delete(e), "")), d.set(e, r));
|
|
117
|
+
const n = await r;
|
|
104
118
|
if (i !== this._fetchSeq) return;
|
|
105
|
-
if (!
|
|
119
|
+
if (!n) {
|
|
106
120
|
this._inlineSvg = "", this._fetchedSrc = void 0;
|
|
107
121
|
return;
|
|
108
122
|
}
|
|
109
|
-
const t = this._sanitizeSvg(
|
|
123
|
+
const t = this._sanitizeSvg(n);
|
|
110
124
|
this._inlineSvg = t, this._fetchedSrc = e;
|
|
111
125
|
} catch {
|
|
112
126
|
if (i !== this._fetchSeq) return;
|
|
113
|
-
|
|
127
|
+
d.delete(e), this._inlineSvg = "", this._fetchedSrc = void 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Checks whether a URL is same-origin or matches the configured allowedOrigins.
|
|
132
|
+
* Relative URLs and data: URIs are always allowed. Cross-origin URLs are blocked
|
|
133
|
+
* unless their origin appears in the allowedOrigins list.
|
|
134
|
+
* @internal
|
|
135
|
+
*/
|
|
136
|
+
_isAllowedOrigin(e) {
|
|
137
|
+
if (e.startsWith("/") || e.startsWith("./") || e.startsWith("../"))
|
|
138
|
+
return !0;
|
|
139
|
+
try {
|
|
140
|
+
const i = new URL(e, window.location.href);
|
|
141
|
+
return i.origin === window.location.origin ? !0 : this.allowedOrigins ? this.allowedOrigins.split(",").map((n) => n.trim().toLowerCase()).filter(Boolean).includes(i.origin.toLowerCase()) : !1;
|
|
142
|
+
} catch {
|
|
143
|
+
return !1;
|
|
114
144
|
}
|
|
115
145
|
}
|
|
116
146
|
/**
|
|
@@ -132,27 +162,36 @@ let s = class extends S {
|
|
|
132
162
|
const t = r.querySelector("svg");
|
|
133
163
|
if (!t)
|
|
134
164
|
return "";
|
|
135
|
-
|
|
136
|
-
|
|
165
|
+
const l = [
|
|
166
|
+
"script",
|
|
167
|
+
"foreignObject",
|
|
168
|
+
"style",
|
|
169
|
+
"animate",
|
|
170
|
+
"animateTransform",
|
|
171
|
+
"animateMotion",
|
|
172
|
+
"set"
|
|
173
|
+
];
|
|
174
|
+
t.querySelectorAll(l.join(", ")).forEach((h) => {
|
|
175
|
+
h.remove();
|
|
137
176
|
});
|
|
138
|
-
const
|
|
139
|
-
return [t, ...Array.from(t.querySelectorAll("*"))].forEach((
|
|
140
|
-
Array.from(
|
|
141
|
-
const
|
|
142
|
-
if (
|
|
143
|
-
|
|
177
|
+
const f = /* @__PURE__ */ new Set(["href", "xlink:href", "src", "action", "formaction"]), w = /* @__PURE__ */ new Set(["role", "aria-label", "aria-labelledby", "aria-hidden"]);
|
|
178
|
+
return [t, ...Array.from(t.querySelectorAll("*"))].forEach((h) => {
|
|
179
|
+
Array.from(h.attributes).forEach((p) => {
|
|
180
|
+
const v = p.name.toLowerCase();
|
|
181
|
+
if (v.startsWith("on")) {
|
|
182
|
+
h.removeAttribute(p.name);
|
|
144
183
|
return;
|
|
145
184
|
}
|
|
146
|
-
if (
|
|
147
|
-
|
|
185
|
+
if (v === "style") {
|
|
186
|
+
h.removeAttribute(p.name);
|
|
148
187
|
return;
|
|
149
188
|
}
|
|
150
|
-
if (
|
|
151
|
-
const
|
|
152
|
-
(
|
|
189
|
+
if (f.has(v)) {
|
|
190
|
+
const m = p.value.replace(/\s/g, "").toLowerCase();
|
|
191
|
+
(m.startsWith("javascript:") || m.startsWith("data:")) && h.removeAttribute(p.name);
|
|
153
192
|
}
|
|
154
193
|
});
|
|
155
|
-
}),
|
|
194
|
+
}), w.forEach((h) => t.removeAttribute(h)), t.setAttribute("focusable", "false"), t.outerHTML;
|
|
156
195
|
}
|
|
157
196
|
// ─── Render Helpers ───
|
|
158
197
|
/**
|
|
@@ -170,18 +209,18 @@ let s = class extends S {
|
|
|
170
209
|
/** @internal */
|
|
171
210
|
_renderSprite() {
|
|
172
211
|
const e = !this.label.trim();
|
|
173
|
-
return
|
|
212
|
+
return g`
|
|
174
213
|
<svg
|
|
175
214
|
part="svg"
|
|
176
215
|
class="icon__svg"
|
|
177
216
|
viewBox="0 0 24 24"
|
|
178
217
|
xmlns="http://www.w3.org/2000/svg"
|
|
179
|
-
role=${e ?
|
|
180
|
-
aria-label=${e ?
|
|
181
|
-
aria-hidden=${e ? "true" :
|
|
218
|
+
role=${e ? o : "img"}
|
|
219
|
+
aria-label=${e ? o : this.label}
|
|
220
|
+
aria-hidden=${e ? "true" : o}
|
|
182
221
|
focusable="false"
|
|
183
222
|
>
|
|
184
|
-
${e ?
|
|
223
|
+
${e ? o : g`<title>${this.label}</title>`}
|
|
185
224
|
<use href=${this._spriteHref()}></use>
|
|
186
225
|
</svg>
|
|
187
226
|
`;
|
|
@@ -189,52 +228,55 @@ let s = class extends S {
|
|
|
189
228
|
/** @internal */
|
|
190
229
|
_renderInline() {
|
|
191
230
|
if (!this._inlineSvg)
|
|
192
|
-
return
|
|
231
|
+
return o;
|
|
193
232
|
const e = !this.label.trim();
|
|
194
|
-
return
|
|
233
|
+
return g`
|
|
195
234
|
<span
|
|
196
235
|
part="svg"
|
|
197
236
|
class="icon__inline"
|
|
198
|
-
role=${e ?
|
|
199
|
-
aria-label=${e ?
|
|
200
|
-
aria-hidden=${e ? "true" :
|
|
237
|
+
role=${e ? o : "img"}
|
|
238
|
+
aria-label=${e ? o : this.label}
|
|
239
|
+
aria-hidden=${e ? "true" : o}
|
|
201
240
|
>
|
|
202
|
-
${
|
|
241
|
+
${x(this._inlineSvg)}
|
|
203
242
|
</span>
|
|
204
243
|
`;
|
|
205
244
|
}
|
|
206
245
|
// ─── Render ───
|
|
207
246
|
render() {
|
|
208
|
-
return typeof this.src == "string" && this.src.trim().length > 0 ? this._renderInline() : this.name ? this._renderSprite() :
|
|
247
|
+
return typeof this.src == "string" && this.src.trim().length > 0 ? this._renderInline() : this.name ? this._renderSprite() : o;
|
|
209
248
|
}
|
|
210
249
|
};
|
|
211
|
-
s.styles = [
|
|
212
|
-
|
|
213
|
-
|
|
250
|
+
s.styles = [b];
|
|
251
|
+
a([
|
|
252
|
+
c({ type: String })
|
|
214
253
|
], s.prototype, "name", 2);
|
|
215
|
-
|
|
216
|
-
|
|
254
|
+
a([
|
|
255
|
+
c({ type: String })
|
|
217
256
|
], s.prototype, "src", 2);
|
|
218
|
-
|
|
219
|
-
|
|
257
|
+
a([
|
|
258
|
+
c({ type: String, attribute: "sprite-url" })
|
|
220
259
|
], s.prototype, "spriteUrl", 2);
|
|
221
|
-
|
|
222
|
-
|
|
260
|
+
a([
|
|
261
|
+
c({ type: String, reflect: !0, attribute: "hx-size" })
|
|
223
262
|
], s.prototype, "size", 2);
|
|
224
|
-
|
|
225
|
-
|
|
263
|
+
a([
|
|
264
|
+
c({ type: String })
|
|
226
265
|
], s.prototype, "label", 2);
|
|
227
|
-
|
|
228
|
-
|
|
266
|
+
a([
|
|
267
|
+
c({ type: String, attribute: "allowed-origins" })
|
|
268
|
+
], s.prototype, "allowedOrigins", 2);
|
|
269
|
+
a([
|
|
270
|
+
u()
|
|
229
271
|
], s.prototype, "_inlineSvg", 2);
|
|
230
|
-
|
|
231
|
-
|
|
272
|
+
a([
|
|
273
|
+
u()
|
|
232
274
|
], s.prototype, "_fetchedSrc", 2);
|
|
233
|
-
s =
|
|
234
|
-
|
|
275
|
+
s = a([
|
|
276
|
+
S("hx-icon")
|
|
235
277
|
], s);
|
|
236
|
-
const
|
|
278
|
+
const d = /* @__PURE__ */ new Map();
|
|
237
279
|
export {
|
|
238
280
|
s as H
|
|
239
281
|
};
|
|
240
|
-
//# sourceMappingURL=hx-icon-
|
|
282
|
+
//# sourceMappingURL=hx-icon-CcyDPDYY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-icon-CcyDPDYY.js","sources":["../../src/components/hx-icon/hx-icon.styles.ts","../../src/components/hx-icon/hx-icon.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixIconStyles = css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n /* vertical-align: middle ensures the icon aligns to the visual centre of\n adjacent inline text rather than the text baseline. */\n vertical-align: middle;\n /* overflow: hidden prevents malformed or oversized icons from painting\n outside the component boundary. The inner SVG may still set\n overflow: visible for its own viewBox content. */\n overflow: hidden;\n width: var(--hx-icon-size, var(--hx-size-6, 1.5rem));\n height: var(--hx-icon-size, var(--hx-size-6, 1.5rem));\n color: var(--hx-icon-color, currentColor);\n flex-shrink: 0;\n }\n\n /* ─── Size Variants ───\n Fallback pixel values mirror the design token values at time of writing.\n If token values are updated the fallbacks should be updated to match. */\n\n :host([hx-size='xs']) {\n --hx-icon-size: var(--hx-size-4, 1rem);\n }\n\n :host([hx-size='sm']) {\n --hx-icon-size: var(--hx-size-5, 1.25rem);\n }\n\n :host([hx-size='md']) {\n --hx-icon-size: var(--hx-size-6, 1.5rem);\n }\n\n :host([hx-size='lg']) {\n --hx-icon-size: var(--hx-size-8, 2rem);\n }\n\n :host([hx-size='xl']) {\n --hx-icon-size: var(--hx-size-10, 2.5rem);\n }\n\n /* ─── SVG (sprite mode) ───\n In sprite mode [part=\"svg\"] is an actual <svg> element. The selector\n targets it specifically. In inline mode the part is applied to a <span>\n wrapper — see .icon__inline below. */\n\n svg[part='svg'] {\n width: 100%;\n height: 100%;\n fill: currentColor;\n display: block;\n overflow: visible;\n }\n\n /* ─── Inline SVG wrapper ───\n In inline mode [part=\"svg\"] is a <span> that wraps the fetched SVG.\n The inner <svg> is sized to fill the wrapper. */\n\n .icon__inline {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n .icon__inline svg {\n width: 100%;\n height: 100%;\n fill: currentColor;\n display: block;\n }\n\n /* ─── Forced Colors (Windows High Contrast) ─── */\n\n @media (forced-colors: active) {\n :host {\n color: CanvasText;\n }\n }\n`;\n","import { html, nothing, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { HelixElement } from '../../base/index.js';\nimport { helixIconStyles } from './hx-icon.styles.js';\n\n/**\n * An icon component that supports inline SVG fetching and SVG sprite sheet references.\n * Decorative icons are automatically hidden from assistive technology.\n * When a label is provided the icon is announced as an image with that label.\n *\n * **Render modes:**\n * - **Sprite mode** (recommended for Drupal/SSR): Set `name` and optionally `sprite-url`.\n * Renders an `<svg><use href=\"...#name\">` — works server-side without JavaScript.\n * - **Inline mode**: Set `src` to a URL of a standalone SVG file. The component fetches,\n * sanitizes, and embeds the SVG markup. Requires JavaScript; not server-side renderable.\n * For Drupal/Twig templates use sprite mode to avoid content shift before hydration.\n *\n * @summary SVG icon with sprite and inline fetch modes for healthcare applications.\n *\n * @tag hx-icon\n *\n * @csspart svg - The SVG element rendered in sprite mode, or the inline SVG container\n * in inline mode. In sprite mode this is an `<svg>` element; in inline mode it is a\n * `<span>` element wrapping the fetched SVG. Both expose the same `part` name for\n * consistent external styling via `::part(svg)`.\n *\n * @cssprop [--hx-icon-size=var(--hx-size-6,1.5rem)] - Width and height of the icon.\n * @cssprop [--hx-icon-color=currentColor] - Icon color.\n */\n@customElement('hx-icon')\nexport class HelixIcon extends HelixElement {\n static override styles = [helixIconStyles];\n\n /**\n * Icon name used as the fragment identifier when referencing a sprite sheet.\n * For sprite mode provide the bare symbol id (e.g. `check`). The component\n * will build the full href as `${spriteUrl}#${name}`. If `name` already\n * starts with `#` it is used as-is (inline sprite reference without a base\n * URL).\n * @attr name\n */\n @property({ type: String })\n name = '';\n\n /**\n * URL of a standalone SVG file to fetch and render inline. Takes precedence\n * over sprite mode when both `src` and `spriteUrl`/`name` are set.\n *\n * **Note:** Inline mode requires browser JavaScript (`fetch` + `DOMParser`).\n * It is not server-side renderable. For Drupal/Twig use sprite mode instead.\n * @attr src\n */\n @property({ type: String })\n src: string | undefined = undefined;\n\n /**\n * Base URL of the SVG sprite sheet. Used together with `name` to construct\n * the `<use>` href: `${spriteUrl}#${name}`.\n * @attr sprite-url\n */\n @property({ type: String, attribute: 'sprite-url' })\n spriteUrl: string | undefined = undefined;\n\n /**\n * Size variant of the icon.\n *\n * Set via the `hx-size` HTML attribute (e.g. `hx-size=\"lg\"`) or via the\n * `size` JavaScript property (e.g. `el.size = 'lg'`). Both are equivalent —\n * the `attribute: 'hx-size'` mapping is used to avoid colliding with the\n * native `<input>` `size` attribute in Drupal attribute-passthrough scenarios.\n * The CEM exposes both the JS property name (`size`) and the HTML attribute\n * name (`hx-size`).\n *\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 * Accessible label for the icon. When non-empty, `role=\"img\"` and\n * `aria-label` are applied so assistive technology announces the icon.\n * When empty the icon is treated as decorative and `aria-hidden=\"true\"` is\n * applied.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Comma-separated list of allowed origins for cross-origin SVG fetches.\n * By default, only same-origin URLs are permitted. Set this to allow\n * specific CDN or asset server origins (e.g., \"https://cdn.example.com,https://assets.example.com\").\n * @attr allowed-origins\n */\n @property({ type: String, attribute: 'allowed-origins' })\n allowedOrigins = '';\n\n /**\n * Stores the sanitized inner markup of an externally fetched SVG.\n * @internal\n */\n @state()\n private _inlineSvg = '';\n\n /**\n * Tracks the `src` URL that was last successfully fetched so that we only\n * refetch when it genuinely changes.\n * @internal\n */\n @state()\n private _fetchedSrc: string | undefined = undefined;\n\n /**\n * Monotonically-increasing sequence number. Incremented before each fetch so\n * that stale out-of-order responses can be discarded.\n */\n /** @internal */\n private _fetchSeq = 0;\n\n // ─── Lifecycle ───\n\n override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n if (changed.has('src') && this.src !== this._fetchedSrc) {\n void this._fetchInlineSvg(this.src);\n }\n }\n\n // ─── Inline SVG Fetch ───\n\n /** @internal */\n private async _fetchInlineSvg(url: string | undefined): Promise<void> {\n const seq = ++this._fetchSeq;\n\n if (!url) {\n this._inlineSvg = '';\n this._fetchedSrc = undefined;\n return;\n }\n\n // Validate URL origin — only allow same-origin or data: URIs by default.\n // Cross-origin SVGs are blocked unless explicitly allowed via allowedOrigins.\n if (!this._isAllowedOrigin(url)) {\n console.warn(\n `[hx-icon] Blocked cross-origin SVG fetch: \"${url}\". ` +\n 'Only same-origin URLs are allowed by default. ' +\n 'Set the allowed-origins attribute to permit specific external origins.',\n );\n this._inlineSvg = '';\n this._fetchedSrc = undefined;\n return;\n }\n\n // Use module-level cache to avoid duplicate network requests for the same URL.\n // Multiple hx-icon instances sharing the same src will share one in-flight fetch.\n try {\n let pending = _svgCache.get(url);\n if (!pending) {\n pending = fetch(url).then(async (response) => {\n if (!response.ok) {\n _svgCache.delete(url);\n return '';\n }\n return response.text();\n });\n _svgCache.set(url, pending);\n }\n\n const text = await pending;\n if (seq !== this._fetchSeq) return;\n\n if (!text) {\n this._inlineSvg = '';\n this._fetchedSrc = undefined;\n return;\n }\n\n const sanitized = this._sanitizeSvg(text);\n this._inlineSvg = sanitized;\n this._fetchedSrc = url;\n } catch {\n if (seq !== this._fetchSeq) return;\n _svgCache.delete(url);\n this._inlineSvg = '';\n this._fetchedSrc = undefined;\n }\n }\n\n /**\n * Checks whether a URL is same-origin or matches the configured allowedOrigins.\n * Relative URLs and data: URIs are always allowed. Cross-origin URLs are blocked\n * unless their origin appears in the allowedOrigins list.\n * @internal\n */\n private _isAllowedOrigin(url: string): boolean {\n // Relative URLs are always same-origin\n if (url.startsWith('/') || url.startsWith('./') || url.startsWith('../')) {\n return true;\n }\n\n try {\n const parsed = new URL(url, window.location.href);\n\n // Same-origin is always allowed\n if (parsed.origin === window.location.origin) {\n return true;\n }\n\n // Check configured allowlist\n if (this.allowedOrigins) {\n const allowed = this.allowedOrigins\n .split(',')\n .map((o) => o.trim().toLowerCase())\n .filter(Boolean);\n return allowed.includes(parsed.origin.toLowerCase());\n }\n\n return false;\n } catch {\n // Unparseable URL — block it\n return false;\n }\n }\n\n /**\n * Parses the raw SVG text, strips dangerous content (script elements,\n * foreignObject, on* event-handler attributes, javascript:/data: URIs,\n * and style attributes that could carry CSS injection payloads), and\n * returns the outer SVG markup safe for rendering via `unsafeHTML`.\n *\n * Additionally injects `focusable=\"false\"` on the root SVG element to\n * prevent IE11/old-Edge from making the SVG keyboard-focusable, and strips\n * any ARIA attributes from the inner SVG to prevent conflicts with the\n * wrapper's own ARIA semantics.\n */\n /** @internal */\n private _sanitizeSvg(raw: string): string {\n const parser = new DOMParser();\n const doc = parser.parseFromString(raw, 'image/svg+xml');\n\n const parseError = doc.querySelector('parsererror');\n if (parseError) {\n return '';\n }\n\n const svgEl = doc.querySelector('svg');\n if (!svgEl) {\n return '';\n }\n\n // Remove dangerous embedded elements:\n // - script: arbitrary code execution\n // - foreignObject: can embed arbitrary HTML including scripts\n // - style: CSS injection (url() payloads, expression(), external references)\n // - animate, animateTransform, animateMotion, set: SMIL animation elements\n // can trigger event handlers and modify attributes to bypass sanitization\n const dangerousElements = [\n 'script',\n 'foreignObject',\n 'style',\n 'animate',\n 'animateTransform',\n 'animateMotion',\n 'set',\n ];\n svgEl.querySelectorAll(dangerousElements.join(', ')).forEach((s) => {\n s.remove();\n });\n\n // URL-bearing attributes that can carry javascript:/data: payloads.\n const urlAttrs = new Set(['href', 'xlink:href', 'src', 'action', 'formaction']);\n\n // ARIA attributes that may conflict with the wrapper element's own semantics.\n // The wrapper <span part=\"svg\"> owns role/aria-label/aria-hidden — the inner\n // SVG must not duplicate or contradict these.\n const ariaAttrs = new Set(['role', 'aria-label', 'aria-labelledby', 'aria-hidden']);\n\n // Sanitize every element including the root svg.\n const allElements: Element[] = [svgEl, ...Array.from(svgEl.querySelectorAll('*'))];\n allElements.forEach((el) => {\n const attrs = Array.from(el.attributes);\n attrs.forEach((attr) => {\n const attrName = attr.name.toLowerCase();\n // Strip event-handler attributes.\n if (attrName.startsWith('on')) {\n el.removeAttribute(attr.name);\n return;\n }\n // Strip style attributes — CSS can carry injection payloads via\n // url(javascript:...), expression(), or external filter/clip-path references.\n if (attrName === 'style') {\n el.removeAttribute(attr.name);\n return;\n }\n // Strip javascript: and data: URIs from URL-bearing attributes.\n if (urlAttrs.has(attrName)) {\n const val = attr.value.replace(/\\s/g, '').toLowerCase();\n if (val.startsWith('javascript:') || val.startsWith('data:')) {\n el.removeAttribute(attr.name);\n }\n }\n });\n });\n\n // Strip ARIA attributes from the root SVG only — they conflict with the\n // wrapper element's ARIA. Child elements' ARIA is left intact.\n ariaAttrs.forEach((a) => svgEl.removeAttribute(a));\n\n // Inject focusable=\"false\" so IE11/old-Edge do not tab into the SVG.\n svgEl.setAttribute('focusable', 'false');\n\n return svgEl.outerHTML;\n }\n\n // ─── Render Helpers ───\n\n /**\n * Returns the href used in the `<use>` element for sprite mode.\n * If `name` already begins with `#` it is treated as an inline reference.\n */\n /** @internal */\n private _spriteHref(): string {\n const n = this.name;\n if (n.startsWith('#')) {\n return n;\n }\n const base = this.spriteUrl ?? '';\n return base ? `${base}#${n}` : `#${n}`;\n }\n\n /** @internal */\n private _renderSprite() {\n const isDecorative = !this.label.trim();\n\n return html`\n <svg\n part=\"svg\"\n class=\"icon__svg\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=${isDecorative ? nothing : 'img'}\n aria-label=${isDecorative ? nothing : this.label}\n aria-hidden=${isDecorative ? 'true' : nothing}\n focusable=\"false\"\n >\n ${isDecorative ? nothing : html`<title>${this.label}</title>`}\n <use href=${this._spriteHref()}></use>\n </svg>\n `;\n }\n\n /** @internal */\n private _renderInline() {\n if (!this._inlineSvg) {\n return nothing;\n }\n\n const isDecorative = !this.label.trim();\n\n // The fetched SVG is rendered inside a wrapper span that carries the\n // csspart and ARIA semantics. The inner SVG from unsafeHTML fills the\n // container via the `.icon__inline svg` CSS rule. ARIA attributes and\n // focusable=\"false\" are injected into the inner SVG by _sanitizeSvg.\n return html`\n <span\n part=\"svg\"\n class=\"icon__inline\"\n role=${isDecorative ? nothing : 'img'}\n aria-label=${isDecorative ? nothing : this.label}\n aria-hidden=${isDecorative ? 'true' : nothing}\n >\n ${unsafeHTML(this._inlineSvg)}\n </span>\n `;\n }\n\n // ─── Render ───\n\n override render() {\n // Inline fetch mode takes precedence when src is a non-empty string.\n if (typeof this.src === 'string' && this.src.trim().length > 0) {\n return this._renderInline();\n }\n\n // Sprite mode: requires at least a name.\n if (this.name) {\n return this._renderSprite();\n }\n\n return nothing;\n }\n}\n\n/**\n * Module-level SVG fetch cache. Shared across all `hx-icon` instances so that\n * multiple icons sharing the same `src` URL issue only one network request.\n * The cache stores in-flight `Promise<string>` values — resolved entries remain\n * cached for the lifetime of the page to prevent redundant re-fetches.\n */\nconst _svgCache = new Map<string, Promise<string>>();\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-icon': HelixIcon;\n }\n}\n"],"names":["helixIconStyles","css","HelixIcon","HelixElement","changed","url","seq","pending","_svgCache","response","text","sanitized","parsed","o","raw","doc","svgEl","dangerousElements","s","urlAttrs","ariaAttrs","el","attr","attrName","val","a","n","base","isDecorative","html","nothing","unsafeHTML","__decorateClass","property","state","customElement"],"mappings":";;;;AAEO,MAAMA,IAAkBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AC8BxB,IAAMC,IAAN,cAAwBC,EAAa;AAAA,EAArC,cAAA;AAAA,UAAA,GAAA,SAAA,GAYL,KAAA,OAAO,IAWP,KAAA,MAA0B,QAQ1B,KAAA,YAAgC,QAehC,KAAA,OAAyC,MAUzC,KAAA,QAAQ,IASR,KAAA,iBAAiB,IAOjB,KAAQ,aAAa,IAQrB,KAAQ,cAAkC,QAO1C,KAAQ,YAAY;AAAA,EAAA;AAAA;AAAA,EAIX,QAAQC,GAAqC;AACpD,UAAM,QAAQA,CAAO,G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A,EAGnC;AAAA;AAAA,EAIS,SAAS;AAEhB,WAAI,OAAO,KAAK,OAAQ,YAAY,KAAK,IAAI,KAAA,EAAO,SAAS,IACpD,KAAK,cAAA,IAIV,KAAK,OACA,KAAK,cAAA,IAGPD;AAAA,EACT;AACF;AAzWa5B,EACK,SAAS,CAACF,CAAe;AAWzCgC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAXf/B,EAYX,WAAA,QAAA,CAAA;AAWA8B,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAtBf/B,EAuBX,WAAA,OAAA,CAAA;AAQA8B,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,cAAc;AAAA,GA9BxC/B,EA+BX,WAAA,aAAA,CAAA;AAeA8B,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM,WAAW,WAAW;AAAA,GA7CpD/B,EA8CX,WAAA,QAAA,CAAA;AAUA8B,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAvDf/B,EAwDX,WAAA,SAAA,CAAA;AASA8B,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,mBAAmB;AAAA,GAhE7C/B,EAiEX,WAAA,kBAAA,CAAA;AAOQ8B,EAAA;AAAA,EADPE,EAAA;AAAM,GAvEIhC,EAwEH,WAAA,cAAA,CAAA;AAQA8B,EAAA;AAAA,EADPE,EAAA;AAAM,GA/EIhC,EAgFH,WAAA,eAAA,CAAA;AAhFGA,IAAN8B,EAAA;AAAA,EADNG,EAAc,SAAS;AAAA,GACXjC,CAAA;AAiXb,MAAMM,wBAAgB,IAAA;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import "
|
|
3
|
-
import { property as e, customElement as x } from "lit/decorators.js";
|
|
1
|
+
import { css as x, html as c, nothing as u } from "lit";
|
|
2
|
+
import { property as e, customElement as p } from "lit/decorators.js";
|
|
4
3
|
import { classMap as d } from "lit/directives/class-map.js";
|
|
5
4
|
import { ifDefined as b } from "lit/directives/if-defined.js";
|
|
6
|
-
|
|
5
|
+
import { H as v } from "./helix-element-BNEYeiys.js";
|
|
6
|
+
const m = x`
|
|
7
7
|
:host {
|
|
8
8
|
display: inline-block;
|
|
9
9
|
}
|
|
@@ -155,28 +155,44 @@ const m = v`
|
|
|
155
155
|
transition: none;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
+
|
|
159
|
+
/* ─── High Contrast Mode (forced-colors) ─── */
|
|
160
|
+
|
|
161
|
+
@media (forced-colors: active) {
|
|
162
|
+
.button {
|
|
163
|
+
forced-color-adjust: none;
|
|
164
|
+
background-color: ButtonFace;
|
|
165
|
+
color: ButtonText;
|
|
166
|
+
border: 2px solid ButtonText;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.button:focus-visible {
|
|
170
|
+
outline: 3px solid Highlight;
|
|
171
|
+
outline-offset: 2px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.button[disabled] {
|
|
175
|
+
background-color: ButtonFace;
|
|
176
|
+
color: GrayText;
|
|
177
|
+
border-color: GrayText;
|
|
178
|
+
opacity: 1;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:host([disabled]) {
|
|
182
|
+
opacity: 1;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
158
185
|
`;
|
|
159
|
-
var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor,
|
|
186
|
+
var f = Object.defineProperty, g = Object.getOwnPropertyDescriptor, r = (t, n, s, a) => {
|
|
160
187
|
for (var i = a > 1 ? void 0 : a ? g(n, s) : n, h = t.length - 1, l; h >= 0; h--)
|
|
161
188
|
(l = t[h]) && (i = (a ? l(n, s, i) : l(i)) || i);
|
|
162
189
|
return a && i && f(n, s, i), i;
|
|
163
190
|
};
|
|
164
|
-
let
|
|
191
|
+
let o = class extends v {
|
|
165
192
|
constructor() {
|
|
166
|
-
super(), this.label = "", this.variant = "ghost", this.size = "md", this.type = "button", this.disabled = !1, this.href = void 0, this.name = void 0, this.value = void 0
|
|
167
|
-
}
|
|
168
|
-
/** Returns the associated form element, if any. */
|
|
169
|
-
get form() {
|
|
170
|
-
return this._internals.form;
|
|
171
|
-
}
|
|
172
|
-
/** @internal */
|
|
173
|
-
formResetCallback() {
|
|
174
|
-
}
|
|
175
|
-
/** @internal */
|
|
176
|
-
formStateRestoreCallback(t, n) {
|
|
193
|
+
super(...arguments), this.label = "", this.variant = "ghost", this.size = "md", this.type = "button", this.disabled = !1, this.href = void 0, this.name = void 0, this.value = void 0;
|
|
177
194
|
}
|
|
178
|
-
|
|
179
|
-
formDisabledCallback(t) {
|
|
195
|
+
_onFormDisabled(t) {
|
|
180
196
|
this.disabled = t;
|
|
181
197
|
}
|
|
182
198
|
// ─── Event Handling ───
|
|
@@ -244,36 +260,36 @@ let r = class extends p {
|
|
|
244
260
|
` : u;
|
|
245
261
|
}
|
|
246
262
|
};
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
263
|
+
o.styles = [m];
|
|
264
|
+
o.formAssociated = !0;
|
|
265
|
+
r([
|
|
250
266
|
e({ type: String })
|
|
251
|
-
],
|
|
252
|
-
|
|
267
|
+
], o.prototype, "label", 2);
|
|
268
|
+
r([
|
|
253
269
|
e({ type: String, reflect: !0 })
|
|
254
|
-
],
|
|
255
|
-
|
|
270
|
+
], o.prototype, "variant", 2);
|
|
271
|
+
r([
|
|
256
272
|
e({ type: String, reflect: !0, attribute: "hx-size" })
|
|
257
|
-
],
|
|
258
|
-
|
|
273
|
+
], o.prototype, "size", 2);
|
|
274
|
+
r([
|
|
259
275
|
e({ type: String })
|
|
260
|
-
],
|
|
261
|
-
|
|
276
|
+
], o.prototype, "type", 2);
|
|
277
|
+
r([
|
|
262
278
|
e({ type: Boolean, reflect: !0 })
|
|
263
|
-
],
|
|
264
|
-
|
|
279
|
+
], o.prototype, "disabled", 2);
|
|
280
|
+
r([
|
|
265
281
|
e({ type: String })
|
|
266
|
-
],
|
|
267
|
-
|
|
282
|
+
], o.prototype, "href", 2);
|
|
283
|
+
r([
|
|
268
284
|
e({ type: String })
|
|
269
|
-
],
|
|
270
|
-
|
|
285
|
+
], o.prototype, "name", 2);
|
|
286
|
+
r([
|
|
271
287
|
e({ type: String })
|
|
272
|
-
],
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
],
|
|
288
|
+
], o.prototype, "value", 2);
|
|
289
|
+
o = r([
|
|
290
|
+
p("hx-icon-button")
|
|
291
|
+
], o);
|
|
276
292
|
export {
|
|
277
|
-
|
|
293
|
+
o as H
|
|
278
294
|
};
|
|
279
|
-
//# sourceMappingURL=hx-icon-button-
|
|
295
|
+
//# sourceMappingURL=hx-icon-button-BHneqPCU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-icon-button-BHneqPCU.js","sources":["../../src/components/hx-icon-button/hx-icon-button.styles.ts","../../src/components/hx-icon-button/hx-icon-button.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixIconButtonStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled);\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: var(--hx-border-width-thin) solid var(--hx-icon-button-border-color);\n border-radius: var(--hx-icon-button-border-radius, var(--hx-border-radius-md));\n background-color: var(--hx-icon-button-bg);\n color: var(--hx-icon-button-color, var(--hx-color-primary-500));\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast),\n color var(--hx-transition-fast),\n border-color var(--hx-transition-fast),\n box-shadow var(--hx-transition-fast);\n text-decoration: none;\n user-select: none;\n -webkit-user-select: none;\n flex-shrink: 0;\n }\n\n .button:focus-visible {\n outline: var(--hx-focus-ring-width) solid\n var(--hx-icon-button-focus-ring-color, var(--hx-focus-ring-color));\n outline-offset: var(--hx-focus-ring-offset);\n }\n\n .button:active {\n filter: brightness(var(--hx-filter-brightness-active, 0.8));\n }\n\n /* ─── Size Variants ─── */\n\n /* WCAG 2.5.5 (healthcare mandate): minimum 44x44px touch target for all sizes.\n min-width/min-height override the explicit size tokens when they fall below\n the 2.75rem (44px) threshold, preserving the visual icon size via font-size. */\n\n .button--sm {\n padding: var(--hx-space-1);\n width: var(--hx-icon-button-size, var(--hx-size-8));\n height: var(--hx-icon-button-size, var(--hx-size-8));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-sm);\n }\n\n .button--md {\n padding: var(--hx-space-2);\n width: var(--hx-icon-button-size, var(--hx-size-10));\n height: var(--hx-icon-button-size, var(--hx-size-10));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-md);\n }\n\n .button--lg {\n padding: var(--hx-space-3);\n width: var(--hx-icon-button-size, var(--hx-size-12));\n height: var(--hx-icon-button-size, var(--hx-size-12));\n min-width: var(--hx-touch-target-min, 2.75rem);\n min-height: var(--hx-touch-target-min, 2.75rem);\n font-size: var(--hx-font-size-lg);\n }\n\n /* ─── Style Variants ─── */\n\n .button--primary {\n --hx-icon-button-bg: var(--hx-color-primary-500);\n --hx-icon-button-color: var(--hx-color-neutral-0);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--primary:hover {\n --hx-icon-button-bg: var(--hx-color-primary-600);\n }\n\n .button--secondary {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-primary-500);\n --hx-icon-button-border-color: var(--hx-color-primary-500);\n }\n\n .button--secondary:hover {\n --hx-icon-button-bg: var(--hx-color-primary-50);\n }\n\n .button--tertiary {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-neutral-700);\n --hx-icon-button-border-color: var(--hx-color-neutral-300);\n }\n\n .button--tertiary:hover {\n --hx-icon-button-bg: var(--hx-color-neutral-100);\n }\n\n .button--danger {\n --hx-icon-button-bg: var(--hx-color-error-500);\n --hx-icon-button-color: var(--hx-color-neutral-0);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--danger:hover {\n --hx-icon-button-bg: var(--hx-color-error-600);\n }\n\n .button--ghost {\n --hx-icon-button-bg: transparent;\n --hx-icon-button-color: var(--hx-color-primary-500);\n --hx-icon-button-border-color: transparent;\n }\n\n .button--ghost:hover {\n --hx-icon-button-bg: var(--hx-color-neutral-100);\n }\n\n /* ─── Icon Container ─── */\n\n .icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1em;\n height: 1em;\n line-height: 1;\n pointer-events: none;\n }\n\n /* ─── Disabled ─── */\n\n .button[disabled] {\n cursor: not-allowed;\n /* P1-02 fix: opacity is set only on :host([disabled]) above to prevent\n multiplicative stacking (0.5 * 0.5 = 0.25). Do not add opacity here. */\n }\n\n /* ─── Reduced Motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .button {\n transition: none;\n }\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n .button {\n forced-color-adjust: none;\n background-color: ButtonFace;\n color: ButtonText;\n border: 2px solid ButtonText;\n }\n\n .button:focus-visible {\n outline: 3px solid Highlight;\n outline-offset: 2px;\n }\n\n .button[disabled] {\n background-color: ButtonFace;\n color: GrayText;\n border-color: GrayText;\n opacity: 1;\n }\n\n :host([disabled]) {\n opacity: 1;\n }\n }\n`;\n","import { html, nothing } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { HelixElement } from '../../base/index.js';\nimport { helixIconButtonStyles } from './hx-icon-button.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * An icon-only button component for compact, accessible actions.\n * Renders a square button or anchor element containing a single icon.\n * The `label` property is required and provides the accessible name\n * via `aria-label` and a native tooltip via the `title` attribute.\n *\n * @summary Icon-only action button with full accessibility support.\n *\n * @tag hx-icon-button\n *\n * @slot - Icon element to display (hx-icon, svg, or img).\n *\n * @fires {CustomEvent<{originalEvent: MouseEvent}>} hx-click - Dispatched when the button is clicked (not disabled).\n *\n * @csspart button - The native button or anchor element.\n * @csspart icon - The icon container span wrapping the default slot.\n *\n * @cssprop [--hx-icon-button-bg=transparent] - Button background color.\n * @cssprop [--hx-icon-button-color=var(--hx-color-primary-500)] - Icon color.\n * @cssprop [--hx-icon-button-border-color=transparent] - Button border color.\n * @cssprop [--hx-icon-button-border-radius=var(--hx-border-radius-md)] - Button border radius.\n * @cssprop [--hx-icon-button-size] - Explicit width and height override for the button.\n * @cssprop [--hx-icon-button-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n */\n@customElement('hx-icon-button')\nexport class HelixIconButton extends HelixElement {\n static override styles = [helixIconButtonStyles];\n\n /**\n * Accessible name for the button. Required. Rendered as `aria-label` and\n * `title` on the underlying element. The component renders nothing when absent,\n * and a console warning is emitted to alert developers during authoring.\n * @attr label\n */\n @property({ type: String })\n label = '';\n\n /**\n * Visual style variant of the button.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'ghost' = 'ghost';\n\n /**\n * Size of the button.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * The type attribute for the underlying button element.\n * Has no effect when `href` is set.\n * @attr type\n */\n @property({ type: String })\n type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * Whether the button is disabled.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * When set, renders an `<a>` element instead of a `<button>`.\n * @attr href\n */\n @property({ type: String })\n href: string | undefined = undefined;\n\n /**\n * Name submitted with form data. Only applicable when rendering as a button.\n * @attr name\n */\n @property({ type: String })\n name: string | undefined = undefined;\n\n /**\n * Value submitted with form data. Only applicable when rendering as a button.\n * @attr value\n */\n @property({ type: String })\n value: string | undefined = undefined;\n\n // ─── Form Association ───\n\n /** Marks this element as form-associated for ElementInternals support. @internal */\n static override formAssociated = true;\n\n protected override _onFormDisabled(disabled: boolean): void {\n this.disabled = disabled;\n }\n\n // ─── Event Handling ───\n\n /** @internal */\n private _handleClick(e: MouseEvent): void {\n if (this.disabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n /**\n * Dispatched when the button is clicked.\n * @event hx-click\n */\n this.dispatchEvent(\n new CustomEvent<{ originalEvent: MouseEvent }>('hx-click', {\n bubbles: true,\n composed: true,\n detail: { originalEvent: e },\n }),\n );\n\n // Handle form submission/reset if form-associated and not in href/link mode\n if (!this.href) {\n if (this.type === 'submit' && this._internals.form) {\n this._internals.form.requestSubmit();\n } else if (this.type === 'reset' && this._internals.form) {\n this._internals.form.reset();\n }\n }\n }\n\n // ─── Render Helpers ───\n\n /** @internal */\n private _normalizedLabel(): string {\n return this.label.trim();\n }\n\n /** @internal */\n private _classes() {\n return {\n button: true,\n [`button--${this.variant}`]: true,\n [`button--${this.size}`]: true,\n };\n }\n\n /** @internal */\n private _iconSlot() {\n return html`<span part=\"icon\" class=\"icon\"><slot></slot></span>`;\n }\n\n // ─── Render ───\n\n override render() {\n const normalizedLabel = this._normalizedLabel();\n if (!normalizedLabel) {\n devWarn(\n 'hx-icon-button',\n 'The `label` property is required for accessibility. Render suppressed.',\n );\n return nothing;\n }\n\n if (this.href !== undefined) {\n // P1-03 fix: disabled anchor must set tabindex=\"-1\" explicitly — an <a>\n // without href is non-focusable by default in most browsers, but this is\n // browser-dependent. Explicit tabindex=\"-1\" guarantees keyboard exclusion\n // across all conforming browsers.\n // P1-07 note: aria-disabled IS required on the anchor branch because\n // <a> elements have no native disabled attribute; aria-disabled is the\n // only AT signal available.\n return html`\n <a\n part=\"button\"\n class=${classMap(this._classes())}\n href=${ifDefined(this.disabled ? undefined : this.href)}\n aria-label=${normalizedLabel}\n title=${normalizedLabel}\n aria-disabled=${this.disabled ? 'true' : nothing}\n tabindex=${this.disabled ? '-1' : nothing}\n @click=${this._handleClick}\n >\n ${this._iconSlot()}\n </a>\n `;\n }\n\n // P1-07 fix: aria-disabled is redundant on a natively disabled <button>.\n // The native disabled attribute already exposes aria-disabled=\"true\"\n // implicitly in the accessibility tree. Duplicate explicit aria-disabled\n // creates ambiguity about design intent. Keep only native ?disabled.\n return html`\n <button\n part=\"button\"\n class=${classMap(this._classes())}\n ?disabled=${this.disabled}\n type=${this.type}\n aria-label=${normalizedLabel}\n title=${normalizedLabel}\n name=${ifDefined(this.name)}\n value=${ifDefined(this.value)}\n @click=${this._handleClick}\n >\n ${this._iconSlot()}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-icon-button': HelixIconButton;\n }\n interface HTMLElementEventMap {\n 'hx-click': CustomEvent<{ originalEvent: MouseEvent }>;\n }\n}\n"],"names":["helixIconButtonStyles","css","HelixIconButton","HelixElement","disabled","e","html","normalizedLabel","classMap","ifDefined","nothing","__decorateClass","property","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAwBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAhB9BV,EAiBX,WAAA,WAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM,WAAW,WAAW;AAAA,GAvBpDV,EAwBX,WAAA,QAAA,CAAA;AAQAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA/BfV,EAgCX,WAAA,QAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAtC/BV,EAuCX,WAAA,YAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA7CfV,EA8CX,WAAA,QAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GApDfV,EAqDX,WAAA,QAAA,CAAA;AAOAS,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA3DfV,EA4DX,WAAA,SAAA,CAAA;AA5DWA,IAANS,EAAA;AAAA,EADNE,EAAc,gBAAgB;AAAA,GAClBX,CAAA;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { css as g,
|
|
2
|
-
import "
|
|
3
|
-
import { property as r, state as p, customElement as _ } from "lit/decorators.js";
|
|
1
|
+
import { css as g, html as p, nothing as h } from "lit";
|
|
2
|
+
import { property as r, state as d, customElement as f } from "lit/decorators.js";
|
|
4
3
|
import { classMap as m } from "lit/directives/class-map.js";
|
|
5
4
|
import { styleMap as u } from "lit/directives/style-map.js";
|
|
5
|
+
import { H as _ } from "./helix-element-BNEYeiys.js";
|
|
6
6
|
const v = g`
|
|
7
7
|
:host {
|
|
8
8
|
display: block;
|
|
@@ -23,8 +23,8 @@ const v = g`
|
|
|
23
23
|
align-items: center;
|
|
24
24
|
justify-content: center;
|
|
25
25
|
min-height: var(--hx-image-fallback-min-height, 3rem);
|
|
26
|
-
background-color: var(--hx-color-neutral-100, #
|
|
27
|
-
color: var(--hx-color-neutral-500, #
|
|
26
|
+
background-color: var(--hx-color-neutral-100, #f1f5f9);
|
|
27
|
+
color: var(--hx-color-neutral-500, #64748b);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.image__img {
|
|
@@ -37,20 +37,28 @@ const v = g`
|
|
|
37
37
|
.image__caption {
|
|
38
38
|
display: none;
|
|
39
39
|
padding: var(--hx-image-caption-padding, 0.5rem 0 0);
|
|
40
|
-
color: var(--hx-image-caption-color, var(--hx-color-neutral-600, #
|
|
40
|
+
color: var(--hx-image-caption-color, var(--hx-color-neutral-600, #475569));
|
|
41
41
|
font-size: var(--hx-image-caption-font-size, 0.875rem);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.image__caption--visible {
|
|
45
45
|
display: block;
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
/* ─── Forced Colors (Windows High Contrast) ─── */
|
|
49
|
+
|
|
50
|
+
@media (forced-colors: active) {
|
|
51
|
+
.image__container--error {
|
|
52
|
+
border: 1px solid GrayText;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
47
55
|
`;
|
|
48
|
-
var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, e = (s, o, a,
|
|
49
|
-
for (var i =
|
|
50
|
-
(c = s[n]) && (i = (
|
|
51
|
-
return
|
|
56
|
+
var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, e = (s, o, a, l) => {
|
|
57
|
+
for (var i = l > 1 ? void 0 : l ? b(o, a) : o, n = s.length - 1, c; n >= 0; n--)
|
|
58
|
+
(c = s[n]) && (i = (l ? c(o, a, i) : c(i)) || i);
|
|
59
|
+
return l && i && y(o, a, i), i;
|
|
52
60
|
};
|
|
53
|
-
let t = class extends
|
|
61
|
+
let t = class extends _ {
|
|
54
62
|
constructor() {
|
|
55
63
|
super(...arguments), this.src = "", this.alt = void 0, this.decorative = !1, this.width = void 0, this.height = void 0, this.loading = "lazy", this.fit = void 0, this.ratio = void 0, this.rounded = void 0, this.fallbackSrc = void 0, this.srcset = void 0, this.sizes = void 0, this._error = !1, this._usedFallbackSrc = !1, this._hasCaptionSlot = !1;
|
|
56
64
|
}
|
|
@@ -84,14 +92,14 @@ let t = class extends f {
|
|
|
84
92
|
}
|
|
85
93
|
render() {
|
|
86
94
|
!this.decorative && this.alt;
|
|
87
|
-
const s = this.decorative || this.alt === "", o = s ? "" : this.alt ?? "", a = this._computeBorderRadius(),
|
|
95
|
+
const s = this.decorative || this.alt === "", o = s ? "" : this.alt ?? "", a = this._computeBorderRadius(), l = this._hasCaptionSlot, i = {
|
|
88
96
|
...this.ratio ? { "--_ratio": this.ratio } : {},
|
|
89
97
|
...this.fit ? { "--_fit": this.fit } : {},
|
|
90
98
|
...a ? { "--_radius": a } : {},
|
|
91
99
|
...this.width != null ? { width: typeof this.width == "number" ? `${this.width}px` : this.width } : {},
|
|
92
100
|
...this.height != null ? { height: typeof this.height == "number" ? `${this.height}px` : this.height } : {}
|
|
93
101
|
};
|
|
94
|
-
return this._error ?
|
|
102
|
+
return this._error ? p`
|
|
95
103
|
<figure
|
|
96
104
|
class="image__container image__container--error"
|
|
97
105
|
style=${u(i)}
|
|
@@ -99,25 +107,25 @@ let t = class extends f {
|
|
|
99
107
|
>
|
|
100
108
|
<slot name="fallback"></slot>
|
|
101
109
|
</figure>
|
|
102
|
-
` :
|
|
110
|
+
` : p`
|
|
103
111
|
<figure class="image__container" style=${u(i)}>
|
|
104
112
|
<img
|
|
105
113
|
part="base"
|
|
106
114
|
class="image__img"
|
|
107
|
-
src=${this._currentSrc() ||
|
|
115
|
+
src=${this._currentSrc() || h}
|
|
108
116
|
alt=${o}
|
|
109
|
-
role=${s ? "presentation" :
|
|
117
|
+
role=${s ? "presentation" : h}
|
|
110
118
|
loading=${this.loading}
|
|
111
|
-
width=${this.width != null ? this.width :
|
|
112
|
-
height=${this.height != null ? this.height :
|
|
113
|
-
srcset=${this.srcset ??
|
|
114
|
-
sizes=${this.sizes ??
|
|
119
|
+
width=${this.width != null ? this.width : h}
|
|
120
|
+
height=${this.height != null ? this.height : h}
|
|
121
|
+
srcset=${this.srcset ?? h}
|
|
122
|
+
sizes=${this.sizes ?? h}
|
|
115
123
|
@load=${this._handleLoad}
|
|
116
124
|
@error=${this._handleError}
|
|
117
125
|
/>
|
|
118
126
|
<figcaption
|
|
119
127
|
part="caption"
|
|
120
|
-
class=${m({ image__caption: !0, "image__caption--visible":
|
|
128
|
+
class=${m({ image__caption: !0, "image__caption--visible": l })}
|
|
121
129
|
>
|
|
122
130
|
<slot name="caption" @slotchange=${this._onCaptionSlotChange}></slot>
|
|
123
131
|
</figcaption>
|
|
@@ -163,18 +171,18 @@ e([
|
|
|
163
171
|
r({ type: String, reflect: !0 })
|
|
164
172
|
], t.prototype, "sizes", 2);
|
|
165
173
|
e([
|
|
166
|
-
|
|
174
|
+
d()
|
|
167
175
|
], t.prototype, "_error", 2);
|
|
168
176
|
e([
|
|
169
|
-
|
|
177
|
+
d()
|
|
170
178
|
], t.prototype, "_usedFallbackSrc", 2);
|
|
171
179
|
e([
|
|
172
|
-
|
|
180
|
+
d()
|
|
173
181
|
], t.prototype, "_hasCaptionSlot", 2);
|
|
174
182
|
t = e([
|
|
175
|
-
|
|
183
|
+
f("hx-image")
|
|
176
184
|
], t);
|
|
177
185
|
export {
|
|
178
186
|
t as H
|
|
179
187
|
};
|
|
180
|
-
//# sourceMappingURL=hx-image-
|
|
188
|
+
//# sourceMappingURL=hx-image-2gt14zZd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-image-2gt14zZd.js","sources":["../../src/components/hx-image/hx-image.styles.ts","../../src/components/hx-image/hx-image.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixImageStyles = css`\n :host {\n display: block;\n }\n\n .image__container {\n position: relative;\n display: block;\n overflow: hidden;\n margin: 0;\n padding: 0;\n aspect-ratio: var(--_ratio, var(--hx-image-aspect-ratio));\n border-radius: var(--_radius, var(--hx-image-border-radius, 0));\n }\n\n .image__container--error {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: var(--hx-image-fallback-min-height, 3rem);\n background-color: var(--hx-color-neutral-100, #f1f5f9);\n color: var(--hx-color-neutral-500, #64748b);\n }\n\n .image__img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: var(--_fit, var(--hx-image-object-fit, cover));\n }\n\n .image__caption {\n display: none;\n padding: var(--hx-image-caption-padding, 0.5rem 0 0);\n color: var(--hx-image-caption-color, var(--hx-color-neutral-600, #475569));\n font-size: var(--hx-image-caption-font-size, 0.875rem);\n }\n\n .image__caption--visible {\n display: block;\n }\n\n /* ─── Forced Colors (Windows High Contrast) ─── */\n\n @media (forced-colors: active) {\n .image__container--error {\n border: 1px solid GrayText;\n }\n }\n`;\n","import { html, nothing } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { HelixElement } from '../../base/index.js';\nimport { helixImageStyles } from './hx-image.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * An accessible image wrapper with lazy loading, fallback support, aspect ratio control,\n * responsive image (srcset/sizes) support, and optional caption.\n *\n * @summary Accessible image wrapper with lazy loading, fallback, srcset, and aspect ratio control.\n *\n * @tag hx-image\n *\n * @slot fallback - Custom content shown when the image fails to load and no fallback-src is set.\n * @slot caption - Optional caption content rendered in a figcaption element below the image.\n *\n * @csspart base - The inner img element.\n * @csspart caption - The figcaption element (visible only when caption content is present).\n *\n * @cssprop [--hx-image-object-fit] - Controls how the image fills its container. Maps to object-fit.\n * @cssprop [--hx-image-border-radius] - Border radius of the image. Overridden by the `rounded` prop.\n * @cssprop [--hx-image-aspect-ratio] - Aspect ratio of the image container. Overridden by the `ratio` prop.\n * @cssprop [--hx-image-caption-color] - Text color for the caption.\n * @cssprop [--hx-image-caption-font-size] - Font size for the caption.\n * @cssprop [--hx-image-caption-padding] - Padding for the caption.\n * @cssprop [--hx-image-fallback-min-height] - Minimum height of the error/fallback container.\n *\n * @fires hx-load - Dispatched when the image has successfully loaded.\n * @fires hx-error - Dispatched when the image fails to load (including after fallback-src also fails).\n */\n@customElement('hx-image')\nexport class HelixImage extends HelixElement {\n static override styles = [helixImageStyles];\n\n /**\n * The URL of the image to display.\n * @attr src\n */\n @property({ type: String, reflect: true })\n src = '';\n\n /**\n * Accessible text description of the image.\n * Required for informative images. Use the `decorative` prop for decorative images\n * instead of setting this to an empty string — explicit decorative intent is preferred.\n * @attr alt\n */\n @property({ type: String, reflect: true })\n alt: string | undefined = undefined;\n\n /**\n * Marks the image as decorative (hidden from screen readers).\n * Use this instead of `alt=\"\"` to make decorative intent explicit in markup.\n * When set, the inner img receives `alt=\"\"` and `role=\"presentation\"`.\n * @attr decorative\n */\n @property({ type: Boolean, reflect: true })\n decorative = false;\n\n /**\n * Width of the image element.\n * @attr width\n */\n @property({ reflect: true })\n width: number | string | undefined = undefined;\n\n /**\n * Height of the image element.\n * @attr height\n */\n @property({ reflect: true })\n height: number | string | undefined = undefined;\n\n /**\n * Loading strategy for the image.\n * @attr loading\n */\n @property({ type: String, reflect: true })\n loading: 'lazy' | 'eager' = 'lazy';\n\n /**\n * How the image should be resized to fit its container.\n * Maps to CSS object-fit.\n * @attr fit\n */\n @property({ type: String, reflect: true })\n fit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' | undefined = undefined;\n\n /**\n * CSS aspect-ratio value (e.g. \"16/9\", \"1\", \"4/3\").\n * When set, the container maintains this ratio.\n * @attr ratio\n */\n @property({ type: String, reflect: true })\n ratio: string | undefined = undefined;\n\n /**\n * Border radius for the image.\n * Boolean attribute (or `true`) applies the theme's medium radius token.\n * A string value is used directly as a CSS border-radius value (e.g. \"1rem\", \"50%\").\n *\n * Note: When set as an HTML attribute (`<hx-image rounded>`), Lit receives the value as\n * an empty string (`''`). When set programmatically (`el.rounded = true`), it receives\n * a boolean. Both forms apply the theme radius token.\n *\n * @attr rounded\n */\n @property({ type: String, reflect: true })\n rounded: boolean | string | undefined = undefined;\n\n /**\n * Fallback image URL shown when the primary src fails to load.\n * @attr fallback-src\n */\n @property({ type: String, attribute: 'fallback-src', reflect: true })\n fallbackSrc: string | undefined = undefined;\n\n /**\n * A comma-separated list of image candidates for responsive images.\n * Passed directly to the inner img's srcset attribute.\n * Enables Drupal responsive image styles and browser-native image selection.\n * @attr srcset\n */\n @property({ type: String, reflect: true })\n srcset: string | undefined = undefined;\n\n /**\n * Media conditions indicating which image size to use alongside srcset.\n * Works in conjunction with the `srcset` attribute.\n * @attr sizes\n */\n @property({ type: String, reflect: true })\n sizes: string | undefined = undefined;\n\n /** @internal */\n @state()\n private _error = false;\n\n /** @internal */\n @state()\n private _usedFallbackSrc = false;\n\n /** @internal */\n @state()\n private _hasCaptionSlot = false;\n\n /** @internal */\n private _handleLoad(): void {\n this.dispatchEvent(new CustomEvent<void>('hx-load', { bubbles: true, composed: true }));\n }\n\n /** @internal */\n private _handleError(): void {\n if (!this._error && this.fallbackSrc && !this._usedFallbackSrc) {\n // Try the fallback-src before showing the fallback slot\n this._usedFallbackSrc = true;\n return;\n }\n this._error = true;\n this.dispatchEvent(new CustomEvent<void>('hx-error', { bubbles: true, composed: true }));\n }\n\n /** @internal */\n private _onCaptionSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasCaptionSlot = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n /** @internal */\n private _computeBorderRadius(): string | undefined {\n if (this.rounded === true || this.rounded === '' || this.rounded === 'true') {\n return 'var(--hx-border-radius-md, 0.375rem)';\n }\n if (typeof this.rounded === 'string' && this.rounded.length > 0 && this.rounded !== 'false') {\n return this.rounded;\n }\n return undefined;\n }\n\n /** @internal */\n private _currentSrc(): string {\n if (this._usedFallbackSrc && this.fallbackSrc) {\n return this.fallbackSrc;\n }\n return this.src;\n }\n\n override render() {\n if (!this.decorative && !this.alt) {\n devWarn(\n 'hx-image',\n 'Informative images require an `alt` attribute for accessibility (WCAG 1.1.1). ' +\n 'Provide a descriptive `alt` value, or set the `decorative` attribute if the image is decorative.',\n );\n }\n const isDecorative = this.decorative || this.alt === '';\n const altText = isDecorative ? '' : (this.alt ?? '');\n const borderRadius = this._computeBorderRadius();\n const showCaption = this._hasCaptionSlot;\n\n const containerStyles = {\n ...(this.ratio ? { '--_ratio': this.ratio } : {}),\n ...(this.fit ? { '--_fit': this.fit } : {}),\n ...(borderRadius ? { '--_radius': borderRadius } : {}),\n ...(this.width != null\n ? { width: typeof this.width === 'number' ? `${this.width}px` : this.width }\n : {}),\n ...(this.height != null\n ? { height: typeof this.height === 'number' ? `${this.height}px` : this.height }\n : {}),\n };\n\n if (this._error) {\n return html`\n <figure\n class=\"image__container image__container--error\"\n style=${styleMap(containerStyles)}\n role=\"alert\"\n >\n <slot name=\"fallback\"></slot>\n </figure>\n `;\n }\n\n return html`\n <figure class=\"image__container\" style=${styleMap(containerStyles)}>\n <img\n part=\"base\"\n class=\"image__img\"\n src=${this._currentSrc() || nothing}\n alt=${altText}\n role=${isDecorative ? 'presentation' : nothing}\n loading=${this.loading}\n width=${this.width != null ? this.width : nothing}\n height=${this.height != null ? this.height : nothing}\n srcset=${this.srcset ?? nothing}\n sizes=${this.sizes ?? nothing}\n @load=${this._handleLoad}\n @error=${this._handleError}\n />\n <figcaption\n part=\"caption\"\n class=${classMap({ image__caption: true, 'image__caption--visible': showCaption })}\n >\n <slot name=\"caption\" @slotchange=${this._onCaptionSlotChange}></slot>\n </figcaption>\n </figure>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-image': HelixImage;\n }\n}\n"],"names":["helixImageStyles","css","HelixImage","HelixElement","e","slot","isDecorative","altText","borderRadius","showCaption","containerStyles","html","styleMap","nothing","classMap","__decorateClass","property","state","customElement"],"mappings":";;;;;AA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