@helixui/library 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1901 -8476
- package/dist/components/hx-accordion/hx-accordion-item.d.ts +27 -0
- package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
- package/dist/components/hx-accordion/hx-accordion.d.ts +3 -0
- package/dist/components/hx-accordion/hx-accordion.d.ts.map +1 -1
- package/dist/components/hx-accordion/index.js +1 -1
- package/dist/components/hx-action-bar/hx-action-bar.d.ts +13 -3
- package/dist/components/hx-action-bar/hx-action-bar.d.ts.map +1 -1
- package/dist/components/hx-action-bar/index.js +1 -1
- package/dist/components/hx-alert/hx-alert.d.ts +30 -0
- package/dist/components/hx-alert/hx-alert.d.ts.map +1 -1
- package/dist/components/hx-alert/hx-alert.styles.d.ts.map +1 -1
- package/dist/components/hx-alert/index.js +1 -1
- package/dist/components/hx-avatar/hx-avatar.d.ts +8 -1
- package/dist/components/hx-avatar/hx-avatar.d.ts.map +1 -1
- package/dist/components/hx-avatar/index.js +1 -1
- package/dist/components/hx-badge/hx-badge.d.ts +10 -1
- package/dist/components/hx-badge/hx-badge.d.ts.map +1 -1
- package/dist/components/hx-badge/hx-badge.styles.d.ts.map +1 -1
- package/dist/components/hx-badge/index.js +1 -1
- package/dist/components/hx-banner/hx-banner.d.ts +17 -0
- package/dist/components/hx-banner/hx-banner.d.ts.map +1 -1
- package/dist/components/hx-banner/index.js +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb-item.styles.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts +17 -2
- package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts.map +1 -1
- package/dist/components/hx-breadcrumb/index.js +1 -1
- package/dist/components/hx-button/hx-button.d.ts +6 -0
- package/dist/components/hx-button/hx-button.d.ts.map +1 -1
- package/dist/components/hx-button/hx-button.styles.d.ts.map +1 -1
- package/dist/components/hx-button/index.js +1 -1
- package/dist/components/hx-card/hx-card.d.ts +8 -0
- 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 -0
- package/dist/components/hx-carousel/hx-carousel-item.d.ts.map +1 -1
- package/dist/components/hx-carousel/hx-carousel-item.styles.d.ts +2 -0
- package/dist/components/hx-carousel/hx-carousel-item.styles.d.ts.map +1 -0
- package/dist/components/hx-carousel/hx-carousel.d.ts +27 -0
- 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 +18 -2
- package/dist/components/hx-checkbox/hx-checkbox.d.ts.map +1 -1
- package/dist/components/hx-checkbox/hx-checkbox.styles.d.ts.map +1 -1
- package/dist/components/hx-checkbox/index.js +1 -1
- package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts +20 -4
- package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts.map +1 -1
- package/dist/components/hx-checkbox-group/index.js +1 -1
- package/dist/components/hx-code-snippet/hx-code-snippet.d.ts +10 -0
- package/dist/components/hx-code-snippet/hx-code-snippet.d.ts.map +1 -1
- package/dist/components/hx-code-snippet/hx-code-snippet.styles.d.ts.map +1 -1
- package/dist/components/hx-code-snippet/index.js +1 -1
- package/dist/components/hx-color-picker/hx-color-picker.d.ts +114 -12
- package/dist/components/hx-color-picker/hx-color-picker.d.ts.map +1 -1
- package/dist/components/hx-color-picker/hx-color-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-color-picker/index.js +1 -1
- package/dist/components/hx-combobox/hx-combobox.d.ts +37 -2
- package/dist/components/hx-combobox/hx-combobox.d.ts.map +1 -1
- package/dist/components/hx-combobox/hx-combobox.styles.d.ts.map +1 -1
- package/dist/components/hx-combobox/index.js +1 -1
- package/dist/components/hx-copy-button/hx-copy-button.d.ts +11 -0
- package/dist/components/hx-copy-button/hx-copy-button.d.ts.map +1 -1
- package/dist/components/hx-copy-button/index.js +1 -1
- package/dist/components/hx-counter/hx-counter.d.ts +12 -3
- package/dist/components/hx-counter/hx-counter.d.ts.map +1 -1
- package/dist/components/hx-counter/index.js +1 -1
- package/dist/components/hx-data-table/hx-data-table.d.ts +27 -2
- package/dist/components/hx-data-table/hx-data-table.d.ts.map +1 -1
- package/dist/components/hx-data-table/hx-data-table.styles.d.ts.map +1 -1
- package/dist/components/hx-data-table/index.js +1 -1
- package/dist/components/hx-date-picker/hx-date-picker.d.ts +42 -3
- package/dist/components/hx-date-picker/hx-date-picker.d.ts.map +1 -1
- package/dist/components/hx-date-picker/hx-date-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-date-picker/index.js +1 -1
- package/dist/components/hx-dialog/hx-dialog.d.ts +31 -4
- package/dist/components/hx-dialog/hx-dialog.d.ts.map +1 -1
- package/dist/components/hx-dialog/hx-dialog.styles.d.ts.map +1 -1
- package/dist/components/hx-dialog/index.js +1 -1
- package/dist/components/hx-divider/hx-divider.d.ts +4 -1
- package/dist/components/hx-divider/hx-divider.d.ts.map +1 -1
- package/dist/components/hx-divider/index.js +1 -1
- package/dist/components/hx-drawer/hx-drawer.d.ts +25 -3
- 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 +35 -7
- package/dist/components/hx-dropdown/hx-dropdown.d.ts.map +1 -1
- package/dist/components/hx-dropdown/index.js +1 -1
- package/dist/components/hx-field/hx-field.d.ts +10 -2
- package/dist/components/hx-field/hx-field.d.ts.map +1 -1
- package/dist/components/hx-field/index.js +1 -1
- package/dist/components/hx-file-upload/hx-file-upload.d.ts +39 -2
- package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
- package/dist/components/hx-file-upload/hx-file-upload.styles.d.ts.map +1 -1
- package/dist/components/hx-file-upload/index.js +1 -1
- package/dist/components/hx-form/hx-form.d.ts.map +1 -1
- package/dist/components/hx-form/index.js +1 -1
- package/dist/components/hx-format-date/hx-format-date.d.ts +8 -0
- package/dist/components/hx-format-date/hx-format-date.d.ts.map +1 -1
- package/dist/components/hx-format-date/index.js +1 -1
- package/dist/components/hx-grid/hx-grid.d.ts +9 -3
- package/dist/components/hx-grid/hx-grid.d.ts.map +1 -1
- package/dist/components/hx-grid/index.js +1 -1
- package/dist/components/hx-help-text/index.js +1 -1
- package/dist/components/hx-icon/hx-icon.d.ts +10 -2
- package/dist/components/hx-icon/hx-icon.d.ts.map +1 -1
- package/dist/components/hx-icon/index.js +1 -1
- package/dist/components/hx-icon-button/hx-icon-button.d.ts +11 -0
- 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 +8 -0
- package/dist/components/hx-image/hx-image.d.ts.map +1 -1
- package/dist/components/hx-image/index.js +1 -1
- package/dist/components/hx-link/hx-link.d.ts +3 -0
- package/dist/components/hx-link/hx-link.d.ts.map +1 -1
- package/dist/components/hx-link/hx-link.styles.d.ts.map +1 -1
- package/dist/components/hx-link/index.js +1 -1
- package/dist/components/hx-list/hx-list-item.d.ts +8 -2
- package/dist/components/hx-list/hx-list-item.d.ts.map +1 -1
- package/dist/components/hx-list/hx-list-item.styles.d.ts.map +1 -1
- package/dist/components/hx-list/hx-list.d.ts +6 -2
- package/dist/components/hx-list/hx-list.d.ts.map +1 -1
- package/dist/components/hx-list/index.js +1 -1
- package/dist/components/hx-menu/hx-menu-item.d.ts +12 -0
- package/dist/components/hx-menu/hx-menu-item.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu-item.styles.d.ts.map +1 -1
- package/dist/components/hx-menu/hx-menu.d.ts +11 -1
- package/dist/components/hx-menu/hx-menu.d.ts.map +1 -1
- package/dist/components/hx-menu/index.js +1 -1
- package/dist/components/hx-meter/hx-meter.d.ts +9 -0
- package/dist/components/hx-meter/hx-meter.d.ts.map +1 -1
- package/dist/components/hx-meter/hx-meter.styles.d.ts.map +1 -1
- package/dist/components/hx-meter/index.js +1 -1
- package/dist/components/hx-nav/hx-nav.d.ts +15 -0
- 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.js +1 -1
- package/dist/components/hx-number-input/hx-number-input.d.ts +36 -1
- package/dist/components/hx-number-input/hx-number-input.d.ts.map +1 -1
- package/dist/components/hx-number-input/index.js +1 -1
- package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts +15 -0
- 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 +24 -0
- package/dist/components/hx-pagination/hx-pagination.d.ts.map +1 -1
- package/dist/components/hx-pagination/hx-pagination.styles.d.ts.map +1 -1
- package/dist/components/hx-pagination/index.js +1 -1
- package/dist/components/hx-popover/hx-popover.d.ts +94 -11
- 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 +8 -0
- package/dist/components/hx-popup/hx-popup.d.ts.map +1 -1
- package/dist/components/hx-popup/hx-popup.styles.d.ts.map +1 -1
- package/dist/components/hx-popup/index.js +1 -1
- package/dist/components/hx-progress-bar/hx-progress-bar.d.ts +10 -2
- package/dist/components/hx-progress-bar/hx-progress-bar.d.ts.map +1 -1
- package/dist/components/hx-progress-bar/hx-progress-bar.styles.d.ts.map +1 -1
- package/dist/components/hx-progress-bar/index.js +1 -1
- package/dist/components/hx-progress-ring/hx-progress-ring.d.ts +8 -2
- package/dist/components/hx-progress-ring/hx-progress-ring.d.ts.map +1 -1
- package/dist/components/hx-progress-ring/index.js +1 -1
- package/dist/components/hx-prose/hx-prose.d.ts +5 -3
- package/dist/components/hx-prose/hx-prose.d.ts.map +1 -1
- package/dist/components/hx-prose/index.js +1 -1
- package/dist/components/hx-radio-group/hx-radio-group.d.ts.map +1 -1
- package/dist/components/hx-radio-group/hx-radio.d.ts +4 -2
- package/dist/components/hx-radio-group/hx-radio.d.ts.map +1 -1
- package/dist/components/hx-radio-group/index.js +1 -1
- package/dist/components/hx-rating/hx-rating.d.ts +54 -2
- package/dist/components/hx-rating/hx-rating.d.ts.map +1 -1
- package/dist/components/hx-rating/index.js +1 -1
- package/dist/components/hx-select/hx-select.d.ts +22 -2
- package/dist/components/hx-select/hx-select.d.ts.map +1 -1
- package/dist/components/hx-select/hx-select.styles.d.ts.map +1 -1
- package/dist/components/hx-select/index.js +1 -1
- package/dist/components/hx-side-nav/hx-nav-item.d.ts +6 -0
- package/dist/components/hx-side-nav/hx-nav-item.d.ts.map +1 -1
- package/dist/components/hx-side-nav/hx-nav-item.styles.d.ts.map +1 -1
- package/dist/components/hx-side-nav/hx-side-nav.d.ts +6 -1
- package/dist/components/hx-side-nav/hx-side-nav.d.ts.map +1 -1
- package/dist/components/hx-side-nav/hx-side-nav.styles.d.ts.map +1 -1
- package/dist/components/hx-side-nav/index.js +1 -1
- package/dist/components/hx-slider/hx-slider.d.ts +22 -1
- package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
- package/dist/components/hx-slider/hx-slider.styles.d.ts.map +1 -1
- package/dist/components/hx-slider/index.js +1 -1
- package/dist/components/hx-spinner/hx-spinner.d.ts +3 -1
- package/dist/components/hx-spinner/hx-spinner.d.ts.map +1 -1
- package/dist/components/hx-spinner/index.js +1 -1
- package/dist/components/hx-split-button/hx-split-button.d.ts +12 -0
- package/dist/components/hx-split-button/hx-split-button.d.ts.map +1 -1
- package/dist/components/hx-split-button/index.js +1 -1
- package/dist/components/hx-split-panel/hx-split-panel.d.ts +72 -13
- package/dist/components/hx-split-panel/hx-split-panel.d.ts.map +1 -1
- package/dist/components/hx-split-panel/hx-split-panel.styles.d.ts.map +1 -1
- package/dist/components/hx-split-panel/index.js +1 -1
- package/dist/components/hx-stack/index.js +1 -1
- package/dist/components/hx-stat/hx-stat.d.ts +5 -1
- package/dist/components/hx-stat/hx-stat.d.ts.map +1 -1
- package/dist/components/hx-stat/index.js +1 -1
- package/dist/components/hx-status-indicator/hx-status-indicator.d.ts +13 -12
- package/dist/components/hx-status-indicator/hx-status-indicator.d.ts.map +1 -1
- package/dist/components/hx-status-indicator/index.js +1 -1
- package/dist/components/hx-steps/hx-step.d.ts +7 -9
- package/dist/components/hx-steps/hx-step.d.ts.map +1 -1
- package/dist/components/hx-steps/hx-step.styles.d.ts.map +1 -1
- package/dist/components/hx-steps/hx-steps.d.ts +3 -3
- package/dist/components/hx-steps/hx-steps.d.ts.map +1 -1
- package/dist/components/hx-steps/index.js +1 -1
- package/dist/components/hx-switch/hx-switch.d.ts +21 -1
- package/dist/components/hx-switch/hx-switch.d.ts.map +1 -1
- package/dist/components/hx-switch/index.js +1 -1
- package/dist/components/hx-table/hx-table.d.ts +7 -2
- package/dist/components/hx-table/hx-table.d.ts.map +1 -1
- package/dist/components/hx-table/hx-table.styles.d.ts.map +1 -1
- package/dist/components/hx-table/hx-th.d.ts +4 -0
- package/dist/components/hx-table/hx-th.d.ts.map +1 -1
- package/dist/components/hx-table/index.js +1 -1
- package/dist/components/hx-tabs/hx-tab.d.ts +3 -0
- package/dist/components/hx-tabs/hx-tab.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tabs.d.ts +6 -0
- package/dist/components/hx-tabs/hx-tabs.d.ts.map +1 -1
- package/dist/components/hx-tabs/index.js +1 -1
- package/dist/components/hx-tag/hx-tag.d.ts +4 -0
- package/dist/components/hx-tag/hx-tag.d.ts.map +1 -1
- package/dist/components/hx-tag/hx-tag.styles.d.ts.map +1 -1
- package/dist/components/hx-tag/index.js +1 -1
- package/dist/components/hx-text/hx-text.d.ts +1 -0
- package/dist/components/hx-text/hx-text.d.ts.map +1 -1
- package/dist/components/hx-text/index.js +1 -1
- package/dist/components/hx-text-input/hx-text-input.d.ts +9 -4
- package/dist/components/hx-text-input/hx-text-input.d.ts.map +1 -1
- package/dist/components/hx-text-input/index.js +1 -1
- package/dist/components/hx-textarea/hx-textarea.d.ts +9 -3
- package/dist/components/hx-textarea/hx-textarea.d.ts.map +1 -1
- package/dist/components/hx-textarea/hx-textarea.styles.d.ts.map +1 -1
- package/dist/components/hx-textarea/index.js +1 -1
- package/dist/components/hx-theme/hx-theme.d.ts +2 -2
- package/dist/components/hx-theme/hx-theme.d.ts.map +1 -1
- package/dist/components/hx-time-picker/hx-time-picker.d.ts +102 -22
- package/dist/components/hx-time-picker/hx-time-picker.d.ts.map +1 -1
- package/dist/components/hx-time-picker/hx-time-picker.styles.d.ts.map +1 -1
- package/dist/components/hx-time-picker/index.js +1 -1
- package/dist/components/hx-toast/hx-toast.d.ts +18 -0
- 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 +23 -0
- package/dist/components/hx-toggle-button/hx-toggle-button.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/index.js +1 -1
- package/dist/components/hx-tooltip/hx-tooltip.d.ts +57 -0
- package/dist/components/hx-tooltip/hx-tooltip.d.ts.map +1 -1
- package/dist/components/hx-tooltip/index.js +1 -1
- package/dist/components/hx-top-nav/hx-top-nav.d.ts +4 -0
- package/dist/components/hx-top-nav/hx-top-nav.d.ts.map +1 -1
- package/dist/components/hx-top-nav/index.js +1 -1
- package/dist/components/hx-tree-view/hx-tree-item.d.ts +13 -1
- 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 +12 -0
- package/dist/components/hx-tree-view/hx-tree-view.d.ts.map +1 -1
- package/dist/components/hx-tree-view/index.js +1 -1
- package/dist/index.js +70 -70
- package/dist/shared/{hx-accordion-Cyswa6J3.js → hx-accordion-D1kFhdeQ.js} +68 -39
- package/dist/shared/hx-accordion-D1kFhdeQ.js.map +1 -0
- package/dist/shared/{hx-action-bar-we_WJety.js → hx-action-bar-D4bulGQP.js} +38 -31
- package/dist/shared/hx-action-bar-D4bulGQP.js.map +1 -0
- package/dist/shared/{hx-alert-Cg-zxRiU.js → hx-alert-K5F8KeqI.js} +123 -40
- package/dist/shared/hx-alert-K5F8KeqI.js.map +1 -0
- package/dist/shared/{hx-avatar-Cep6Urm3.js → hx-avatar-Cun-O99h.js} +5 -1
- package/dist/shared/hx-avatar-Cun-O99h.js.map +1 -0
- package/dist/shared/{hx-badge-CjT0d8NK.js → hx-badge-CsFd2xtw.js} +83 -47
- package/dist/shared/hx-badge-CsFd2xtw.js.map +1 -0
- package/dist/shared/{hx-banner-lxAIJ2kR.js → hx-banner-BTV-X2xF.js} +58 -42
- package/dist/shared/hx-banner-BTV-X2xF.js.map +1 -0
- package/dist/shared/{hx-breadcrumb-item-C0rz0fzV.js → hx-breadcrumb-item-4IwaLgaO.js} +39 -23
- package/dist/shared/hx-breadcrumb-item-4IwaLgaO.js.map +1 -0
- package/dist/shared/{hx-button-Cbhqpm5i.js → hx-button-7k-KeCYU.js} +29 -15
- package/dist/shared/hx-button-7k-KeCYU.js.map +1 -0
- package/dist/shared/{hx-card-Bg4W4uXC.js → hx-card-0hT3G5hi.js} +24 -13
- package/dist/shared/hx-card-0hT3G5hi.js.map +1 -0
- package/dist/shared/{hx-carousel-item-BKpmFbUT.js → hx-carousel-item-DgeYyYZJ.js} +138 -107
- package/dist/shared/hx-carousel-item-DgeYyYZJ.js.map +1 -0
- package/dist/shared/{hx-checkbox-BMayOpAM.js → hx-checkbox-BvjO-O41.js} +15 -6
- package/dist/shared/hx-checkbox-BvjO-O41.js.map +1 -0
- package/dist/shared/{hx-checkbox-group-ydUdV9Sx.js → hx-checkbox-group-Z5VvWzcj.js} +50 -37
- package/dist/shared/hx-checkbox-group-Z5VvWzcj.js.map +1 -0
- package/dist/shared/{hx-code-snippet-B4hV7rWG.js → hx-code-snippet-DqzPkH4K.js} +27 -11
- package/dist/shared/hx-code-snippet-DqzPkH4K.js.map +1 -0
- package/dist/shared/hx-color-picker-Da8z6AlQ.js +596 -0
- package/dist/shared/hx-color-picker-Da8z6AlQ.js.map +1 -0
- package/dist/shared/{hx-combobox-BBi3izKJ.js → hx-combobox-CivfelTS.js} +67 -430
- package/dist/shared/hx-combobox-CivfelTS.js.map +1 -0
- package/dist/shared/{hx-copy-button-CLBA31to.js → hx-copy-button--0dymSvw.js} +9 -1
- package/dist/shared/{hx-copy-button-CLBA31to.js.map → hx-copy-button--0dymSvw.js.map} +1 -1
- package/dist/shared/{hx-counter-D-1NXzGs.js → hx-counter-Duf00H7p.js} +58 -49
- package/dist/shared/hx-counter-Duf00H7p.js.map +1 -0
- package/dist/shared/{hx-data-table-DNiDVWR2.js → hx-data-table-DujB9hSE.js} +173 -129
- package/dist/shared/hx-data-table-DujB9hSE.js.map +1 -0
- package/dist/shared/{hx-date-picker-D7yCK0nk.js → hx-date-picker-C8d2HtRV.js} +142 -505
- package/dist/shared/hx-date-picker-C8d2HtRV.js.map +1 -0
- package/dist/shared/{hx-dialog-Z7Ou_AZ9.js → hx-dialog-DkUSnVgw.js} +76 -49
- package/dist/shared/hx-dialog-DkUSnVgw.js.map +1 -0
- package/dist/shared/{hx-divider-XgWIz4Mr.js → hx-divider-DNNs4e8q.js} +2 -1
- package/dist/shared/{hx-divider-XgWIz4Mr.js.map → hx-divider-DNNs4e8q.js.map} +1 -1
- package/dist/shared/{hx-drawer-Dk-_xzy0.js → hx-drawer-CJcRZcns.js} +102 -66
- package/dist/shared/hx-drawer-CJcRZcns.js.map +1 -0
- package/dist/shared/{hx-dropdown-DnjLnkTj.js → hx-dropdown-Bo0KTM1A.js} +56 -47
- package/dist/shared/hx-dropdown-Bo0KTM1A.js.map +1 -0
- package/dist/shared/{hx-field-CDP8EXuj.js → hx-field-3MmzJ4kZ.js} +21 -13
- package/dist/shared/hx-field-3MmzJ4kZ.js.map +1 -0
- package/dist/shared/{hx-file-upload-CUORgnKc.js → hx-file-upload-ByjAgfNy.js} +131 -86
- package/dist/shared/hx-file-upload-ByjAgfNy.js.map +1 -0
- package/dist/shared/hx-form-BpS6v3Iu.js +258 -0
- package/dist/shared/hx-form-BpS6v3Iu.js.map +1 -0
- package/dist/shared/{hx-format-date-BsVr8gpD.js → hx-format-date-BdnWV2kX.js} +7 -1
- package/dist/shared/hx-format-date-BdnWV2kX.js.map +1 -0
- package/dist/shared/{hx-grid-BsDBCTbt.js → hx-grid-gEjuF0cR.js} +25 -18
- package/dist/shared/hx-grid-gEjuF0cR.js.map +1 -0
- package/dist/shared/{hx-help-text-DaOPN1iB.js → hx-help-text-BAcEGRUE.js} +2 -2
- package/dist/shared/{hx-help-text-DaOPN1iB.js.map → hx-help-text-BAcEGRUE.js.map} +1 -1
- package/dist/shared/{hx-icon--xsJztDh.js → hx-icon-CP6OnLoM.js} +6 -1
- package/dist/shared/hx-icon-CP6OnLoM.js.map +1 -0
- package/dist/shared/{hx-icon-button-C83bCR0K.js → hx-icon-button-DzH_bRtC.js} +53 -29
- package/dist/shared/hx-icon-button-DzH_bRtC.js.map +1 -0
- package/dist/shared/{hx-image-xyb_tHCR.js → hx-image-C6pGiI6c.js} +6 -1
- package/dist/shared/hx-image-C6pGiI6c.js.map +1 -0
- package/dist/shared/{hx-link-DfNy_UU8.js → hx-link-Tmk_YPvW.js} +46 -37
- package/dist/shared/hx-link-Tmk_YPvW.js.map +1 -0
- package/dist/shared/{hx-list-CdRNgeoP.js → hx-list-DwInEX2H.js} +63 -37
- package/dist/shared/hx-list-DwInEX2H.js.map +1 -0
- package/dist/shared/{hx-menu-divider-11Dp2VfM.js → hx-menu-divider-DR4G_rqw.js} +93 -56
- package/dist/shared/hx-menu-divider-DR4G_rqw.js.map +1 -0
- package/dist/shared/hx-meter-uXkTZq-W.js +238 -0
- package/dist/shared/hx-meter-uXkTZq-W.js.map +1 -0
- package/dist/shared/{hx-nav-DSpwWYUX.js → hx-nav-3JsN2Oak.js} +94 -75
- package/dist/shared/hx-nav-3JsN2Oak.js.map +1 -0
- package/dist/shared/{hx-nav-item-D54-5eUM.js → hx-nav-item-D3EJatzc.js} +40 -16
- package/dist/shared/hx-nav-item-D3EJatzc.js.map +1 -0
- package/dist/shared/{hx-number-input-BP6TIA92.js → hx-number-input-CAAibZ8X.js} +35 -7
- package/dist/shared/hx-number-input-CAAibZ8X.js.map +1 -0
- package/dist/shared/{hx-overflow-menu-C7k5wlZy.js → hx-overflow-menu-2kgOJ_ht.js} +86 -66
- package/dist/shared/hx-overflow-menu-2kgOJ_ht.js.map +1 -0
- package/dist/shared/{hx-pagination-BQ0cLTuB.js → hx-pagination-DBs-vmSv.js} +127 -103
- package/dist/shared/hx-pagination-DBs-vmSv.js.map +1 -0
- package/dist/shared/hx-popover-DxE67miP.js +274 -0
- package/dist/shared/hx-popover-DxE67miP.js.map +1 -0
- package/dist/shared/{hx-popup-CYf9Q5sj.js → hx-popup-Dg6n_PbY.js} +13 -1
- package/dist/shared/hx-popup-Dg6n_PbY.js.map +1 -0
- package/dist/shared/{hx-progress-bar-C_mdPVF-.js → hx-progress-bar-Dm_EHyng.js} +101 -73
- package/dist/shared/hx-progress-bar-Dm_EHyng.js.map +1 -0
- package/dist/shared/{hx-progress-ring-BHJBaXNk.js → hx-progress-ring-DpxBDD5d.js} +35 -28
- package/dist/shared/hx-progress-ring-DpxBDD5d.js.map +1 -0
- package/dist/shared/hx-prose-Ml_L2zje.js +59 -0
- package/dist/shared/hx-prose-Ml_L2zje.js.map +1 -0
- package/dist/shared/{hx-radio-Bqyi8re3.js → hx-radio-BywgVSEu.js} +16 -15
- package/dist/shared/hx-radio-BywgVSEu.js.map +1 -0
- package/dist/shared/{hx-rating-Y_t7Z4qb.js → hx-rating-CUWBQ0fZ.js} +131 -64
- package/dist/shared/hx-rating-CUWBQ0fZ.js.map +1 -0
- package/dist/shared/{hx-select-BBae2LqN.js → hx-select-BwDwxk-M.js} +110 -171
- package/dist/shared/hx-select-BwDwxk-M.js.map +1 -0
- package/dist/shared/hx-skeleton-BHvALyd7.js.map +1 -1
- package/dist/shared/{hx-slider-CpnxH2UP.js → hx-slider-D_0EKJyk.js} +25 -8
- package/dist/shared/hx-slider-D_0EKJyk.js.map +1 -0
- package/dist/shared/{hx-spinner-BOApJ-g9.js → hx-spinner-DMn4SChS.js} +35 -28
- package/dist/shared/hx-spinner-DMn4SChS.js.map +1 -0
- package/dist/shared/{hx-split-button-BvwoG8h2.js → hx-split-button-CypgLXw1.js} +23 -12
- package/dist/shared/{hx-split-button-BvwoG8h2.js.map → hx-split-button-CypgLXw1.js.map} +1 -1
- package/dist/shared/{hx-split-panel-Cxkeauwe.js → hx-split-panel-BPMWKPGu.js} +74 -42
- package/dist/shared/hx-split-panel-BPMWKPGu.js.map +1 -0
- package/dist/shared/{hx-stack-CfoW7jU7.js → hx-stack-BStY1RmV.js} +29 -29
- package/dist/shared/hx-stack-BStY1RmV.js.map +1 -0
- package/dist/shared/{hx-stat-C2wfph8W.js → hx-stat-CHntLHJM.js} +18 -10
- package/dist/shared/hx-stat-CHntLHJM.js.map +1 -0
- package/dist/shared/{hx-status-indicator-oYWOkWlD.js → hx-status-indicator-C1BwEvUw.js} +15 -12
- package/dist/shared/hx-status-indicator-C1BwEvUw.js.map +1 -0
- package/dist/shared/{hx-step-DYoIumpR.js → hx-step-BIVWSPxd.js} +45 -33
- package/dist/shared/hx-step-BIVWSPxd.js.map +1 -0
- package/dist/shared/{hx-switch-DkKchcuP.js → hx-switch-BgX8kuWt.js} +12 -3
- package/dist/shared/hx-switch-BgX8kuWt.js.map +1 -0
- package/dist/shared/{hx-tab-panel-CHB0u1zF.js → hx-tab-panel-DhOq67jj.js} +65 -53
- package/dist/shared/hx-tab-panel-DhOq67jj.js.map +1 -0
- package/dist/shared/{hx-tag-SJJtMlOS.js → hx-tag-CzOTDcXI.js} +81 -55
- package/dist/shared/hx-tag-CzOTDcXI.js.map +1 -0
- package/dist/shared/{hx-td-CVwCGBYf.js → hx-td-h6oeW6YC.js} +43 -41
- package/dist/shared/hx-td-h6oeW6YC.js.map +1 -0
- package/dist/shared/{hx-text-NjKoQATI.js → hx-text-DTXjiviE.js} +2 -1
- package/dist/shared/{hx-text-NjKoQATI.js.map → hx-text-DTXjiviE.js.map} +1 -1
- package/dist/shared/{hx-text-input-BrCjo4fJ.js → hx-text-input-CqEdDHMU.js} +87 -70
- package/dist/shared/hx-text-input-CqEdDHMU.js.map +1 -0
- package/dist/shared/{hx-textarea-BsQdB1Rk.js → hx-textarea-BgX7rxyo.js} +21 -12
- package/dist/shared/hx-textarea-BgX7rxyo.js.map +1 -0
- package/dist/shared/hx-theme-6GDoUG8j.js.map +1 -1
- package/dist/shared/{hx-time-picker-DRRAFuVd.js → hx-time-picker-DmLu7WUC.js} +77 -274
- package/dist/shared/hx-time-picker-DmLu7WUC.js.map +1 -0
- package/dist/shared/{hx-toggle-button-D4F1soEM.js → hx-toggle-button-D1jpDvSA.js} +75 -38
- package/dist/shared/hx-toggle-button-D1jpDvSA.js.map +1 -0
- package/dist/shared/{hx-tooltip-Bk1iQRHs.js → hx-tooltip-kh7QFPKu.js} +66 -49
- package/dist/shared/hx-tooltip-kh7QFPKu.js.map +1 -0
- package/dist/shared/{hx-top-nav-DzW7XLv-.js → hx-top-nav-DYlnzDaU.js} +4 -2
- package/dist/shared/{hx-top-nav-DzW7XLv-.js.map → hx-top-nav-DYlnzDaU.js.map} +1 -1
- package/dist/shared/{hx-tree-item-DdH6RbMs.js → hx-tree-item-BP6UF_H1.js} +137 -101
- package/dist/shared/hx-tree-item-BP6UF_H1.js.map +1 -0
- package/dist/shared/toast-factory-DTy-qN8r.js +521 -0
- package/dist/shared/toast-factory-DTy-qN8r.js.map +1 -0
- package/dist/styles/shared-field.styles.d.ts +6 -0
- package/dist/styles/shared-field.styles.d.ts.map +1 -0
- package/package.json +2 -5
- package/dist/shared/hx-accordion-Cyswa6J3.js.map +0 -1
- package/dist/shared/hx-action-bar-we_WJety.js.map +0 -1
- package/dist/shared/hx-alert-Cg-zxRiU.js.map +0 -1
- package/dist/shared/hx-avatar-Cep6Urm3.js.map +0 -1
- package/dist/shared/hx-badge-CjT0d8NK.js.map +0 -1
- package/dist/shared/hx-banner-lxAIJ2kR.js.map +0 -1
- package/dist/shared/hx-breadcrumb-item-C0rz0fzV.js.map +0 -1
- package/dist/shared/hx-button-Cbhqpm5i.js.map +0 -1
- package/dist/shared/hx-card-Bg4W4uXC.js.map +0 -1
- package/dist/shared/hx-carousel-item-BKpmFbUT.js.map +0 -1
- package/dist/shared/hx-checkbox-BMayOpAM.js.map +0 -1
- package/dist/shared/hx-checkbox-group-ydUdV9Sx.js.map +0 -1
- package/dist/shared/hx-code-snippet-B4hV7rWG.js.map +0 -1
- package/dist/shared/hx-color-picker-BvfJ_h16.js +0 -803
- package/dist/shared/hx-color-picker-BvfJ_h16.js.map +0 -1
- package/dist/shared/hx-combobox-BBi3izKJ.js.map +0 -1
- package/dist/shared/hx-counter-D-1NXzGs.js.map +0 -1
- package/dist/shared/hx-data-table-DNiDVWR2.js.map +0 -1
- package/dist/shared/hx-date-picker-D7yCK0nk.js.map +0 -1
- package/dist/shared/hx-dialog-Z7Ou_AZ9.js.map +0 -1
- package/dist/shared/hx-drawer-Dk-_xzy0.js.map +0 -1
- package/dist/shared/hx-dropdown-DnjLnkTj.js.map +0 -1
- package/dist/shared/hx-field-CDP8EXuj.js.map +0 -1
- package/dist/shared/hx-file-upload-CUORgnKc.js.map +0 -1
- package/dist/shared/hx-form-BFv_N1dm.js +0 -1272
- package/dist/shared/hx-form-BFv_N1dm.js.map +0 -1
- package/dist/shared/hx-format-date-BsVr8gpD.js.map +0 -1
- package/dist/shared/hx-grid-BsDBCTbt.js.map +0 -1
- package/dist/shared/hx-icon--xsJztDh.js.map +0 -1
- package/dist/shared/hx-icon-button-C83bCR0K.js.map +0 -1
- package/dist/shared/hx-image-xyb_tHCR.js.map +0 -1
- package/dist/shared/hx-link-DfNy_UU8.js.map +0 -1
- package/dist/shared/hx-list-CdRNgeoP.js.map +0 -1
- package/dist/shared/hx-menu-divider-11Dp2VfM.js.map +0 -1
- package/dist/shared/hx-meter-UinDQjl6.js +0 -190
- package/dist/shared/hx-meter-UinDQjl6.js.map +0 -1
- package/dist/shared/hx-nav-DSpwWYUX.js.map +0 -1
- package/dist/shared/hx-nav-item-D54-5eUM.js.map +0 -1
- package/dist/shared/hx-number-input-BP6TIA92.js.map +0 -1
- package/dist/shared/hx-overflow-menu-C7k5wlZy.js.map +0 -1
- package/dist/shared/hx-pagination-BQ0cLTuB.js.map +0 -1
- package/dist/shared/hx-popover-BQsgrJCW.js +0 -226
- package/dist/shared/hx-popover-BQsgrJCW.js.map +0 -1
- package/dist/shared/hx-popup-CYf9Q5sj.js.map +0 -1
- package/dist/shared/hx-progress-bar-C_mdPVF-.js.map +0 -1
- package/dist/shared/hx-progress-ring-BHJBaXNk.js.map +0 -1
- package/dist/shared/hx-prose-DZh2KrMb.js +0 -876
- package/dist/shared/hx-prose-DZh2KrMb.js.map +0 -1
- package/dist/shared/hx-radio-Bqyi8re3.js.map +0 -1
- package/dist/shared/hx-rating-Y_t7Z4qb.js.map +0 -1
- package/dist/shared/hx-select-BBae2LqN.js.map +0 -1
- package/dist/shared/hx-slider-CpnxH2UP.js.map +0 -1
- package/dist/shared/hx-spinner-BOApJ-g9.js.map +0 -1
- package/dist/shared/hx-split-panel-Cxkeauwe.js.map +0 -1
- package/dist/shared/hx-stack-CfoW7jU7.js.map +0 -1
- package/dist/shared/hx-stat-C2wfph8W.js.map +0 -1
- package/dist/shared/hx-status-indicator-oYWOkWlD.js.map +0 -1
- package/dist/shared/hx-step-DYoIumpR.js.map +0 -1
- package/dist/shared/hx-switch-DkKchcuP.js.map +0 -1
- package/dist/shared/hx-tab-panel-CHB0u1zF.js.map +0 -1
- package/dist/shared/hx-tag-SJJtMlOS.js.map +0 -1
- package/dist/shared/hx-td-CVwCGBYf.js.map +0 -1
- package/dist/shared/hx-text-input-BrCjo4fJ.js.map +0 -1
- package/dist/shared/hx-textarea-BsQdB1Rk.js.map +0 -1
- package/dist/shared/hx-time-picker-DRRAFuVd.js.map +0 -1
- package/dist/shared/hx-toggle-button-D4F1soEM.js.map +0 -1
- package/dist/shared/hx-tooltip-Bk1iQRHs.js.map +0 -1
- package/dist/shared/hx-tree-item-DdH6RbMs.js.map +0 -1
- package/dist/shared/toast-factory-B8jicczW.js +0 -426
- package/dist/shared/toast-factory-B8jicczW.js.map +0 -1
|
@@ -1,426 +0,0 @@
|
|
|
1
|
-
import { css as u, LitElement as d, nothing as b, html as m } from "lit";
|
|
2
|
-
import { property as l, customElement as f } from "lit/decorators.js";
|
|
3
|
-
import { classMap as x } from "lit/directives/class-map.js";
|
|
4
|
-
import { tokenStyles as v } from "@helixui/tokens/lit";
|
|
5
|
-
const g = u`
|
|
6
|
-
/* ─── hx-toast host ─── */
|
|
7
|
-
|
|
8
|
-
:host {
|
|
9
|
-
display: block;
|
|
10
|
-
pointer-events: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:host([open]) {
|
|
14
|
-
pointer-events: auto;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* ─── Toast base ─── */
|
|
18
|
-
|
|
19
|
-
.toast {
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: flex-start;
|
|
22
|
-
gap: var(--hx-space-3, 0.75rem);
|
|
23
|
-
padding: var(--hx-space-3, 0.75rem) var(--hx-space-4, 1rem);
|
|
24
|
-
border-radius: var(--hx-toast-border-radius, var(--hx-border-radius-md, 0.375rem));
|
|
25
|
-
background-color: var(--hx-toast-bg, var(--hx-color-neutral-900, #0f172a));
|
|
26
|
-
color: var(--hx-toast-color, var(--hx-color-neutral-0, #ffffff));
|
|
27
|
-
font-family: var(--hx-font-family-sans, sans-serif);
|
|
28
|
-
font-size: var(--hx-font-size-sm, 0.875rem);
|
|
29
|
-
line-height: var(--hx-line-height-normal, 1.5);
|
|
30
|
-
box-shadow: var(
|
|
31
|
-
--hx-toast-shadow,
|
|
32
|
-
0 4px 6px -1px rgb(0 0 0 / 0.1),
|
|
33
|
-
0 2px 4px -2px rgb(0 0 0 / 0.1)
|
|
34
|
-
);
|
|
35
|
-
opacity: 0;
|
|
36
|
-
transform: translateY(var(--hx-toast-enter-translate, var(--hx-space-2, 0.5rem)));
|
|
37
|
-
transition:
|
|
38
|
-
opacity var(--hx-transition-normal, 250ms ease),
|
|
39
|
-
transform var(--hx-transition-normal, 250ms ease);
|
|
40
|
-
width: var(--hx-toast-width, 20rem);
|
|
41
|
-
max-width: 100%;
|
|
42
|
-
pointer-events: auto;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:host([open]) .toast {
|
|
46
|
-
opacity: 1;
|
|
47
|
-
transform: translateY(0);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* ─── Variant overrides ─── */
|
|
51
|
-
|
|
52
|
-
.toast--success {
|
|
53
|
-
--hx-toast-bg: var(--hx-color-success-600, #16a34a);
|
|
54
|
-
--hx-toast-color: var(--hx-color-neutral-0, #ffffff);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.toast--warning {
|
|
58
|
-
--hx-toast-bg: var(--hx-color-warning-500, #f59e0b);
|
|
59
|
-
--hx-toast-color: var(--hx-color-neutral-900, #0f172a);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.toast--danger {
|
|
63
|
-
--hx-toast-bg: var(--hx-color-error-600, #dc2626);
|
|
64
|
-
--hx-toast-color: var(--hx-color-neutral-0, #ffffff);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.toast--info {
|
|
68
|
-
--hx-toast-bg: var(--hx-color-primary-600, #2563eb);
|
|
69
|
-
--hx-toast-color: var(--hx-color-neutral-0, #ffffff);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* ─── Icon ─── */
|
|
73
|
-
|
|
74
|
-
.toast__icon {
|
|
75
|
-
flex-shrink: 0;
|
|
76
|
-
display: inline-flex;
|
|
77
|
-
align-items: center;
|
|
78
|
-
line-height: 1;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.toast__icon:empty {
|
|
82
|
-
display: none;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/* ─── Message ─── */
|
|
86
|
-
|
|
87
|
-
.toast__message {
|
|
88
|
-
flex: 1 1 auto;
|
|
89
|
-
min-width: 0;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/* ─── Action slot ─── */
|
|
93
|
-
|
|
94
|
-
.toast__action {
|
|
95
|
-
flex-shrink: 0;
|
|
96
|
-
display: inline-flex;
|
|
97
|
-
align-items: center;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.toast__action:empty {
|
|
101
|
-
display: none;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/* ─── Close button ─── */
|
|
105
|
-
|
|
106
|
-
.toast__close {
|
|
107
|
-
flex-shrink: 0;
|
|
108
|
-
display: inline-flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
justify-content: center;
|
|
111
|
-
padding: var(--hx-space-1, 0.25rem);
|
|
112
|
-
background: transparent;
|
|
113
|
-
border: none;
|
|
114
|
-
border-radius: var(--hx-border-radius-sm, 0.25rem);
|
|
115
|
-
color: inherit;
|
|
116
|
-
cursor: pointer;
|
|
117
|
-
opacity: 0.7;
|
|
118
|
-
transition: opacity var(--hx-transition-fast, 150ms ease);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.toast__close:hover {
|
|
122
|
-
opacity: 1;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.toast__close:focus-visible {
|
|
126
|
-
outline: var(--hx-focus-ring-width, 2px) solid currentColor;
|
|
127
|
-
outline-offset: var(--hx-focus-ring-offset, 2px);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* ─── Reduced motion ─── */
|
|
131
|
-
|
|
132
|
-
@media (prefers-reduced-motion: reduce) {
|
|
133
|
-
.toast {
|
|
134
|
-
transition: none;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
`, y = u`
|
|
138
|
-
:host {
|
|
139
|
-
display: block;
|
|
140
|
-
position: fixed;
|
|
141
|
-
z-index: var(--hx-z-index-toast, 9000);
|
|
142
|
-
pointer-events: none;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.toast-stack {
|
|
146
|
-
display: flex;
|
|
147
|
-
flex-direction: column;
|
|
148
|
-
gap: var(--hx-space-3, 0.75rem);
|
|
149
|
-
padding: var(--hx-space-4, 1rem);
|
|
150
|
-
pointer-events: none;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/* ─── Placements ─── */
|
|
154
|
-
|
|
155
|
-
:host([placement='top-start']) {
|
|
156
|
-
top: 0;
|
|
157
|
-
left: 0;
|
|
158
|
-
right: auto;
|
|
159
|
-
bottom: auto;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
:host([placement='top-center']) {
|
|
163
|
-
top: 0;
|
|
164
|
-
left: 50%;
|
|
165
|
-
transform: translateX(-50%);
|
|
166
|
-
right: auto;
|
|
167
|
-
bottom: auto;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
:host([placement='top-end']) {
|
|
171
|
-
top: 0;
|
|
172
|
-
right: 0;
|
|
173
|
-
left: auto;
|
|
174
|
-
bottom: auto;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
:host([placement='bottom-start']) {
|
|
178
|
-
bottom: 0;
|
|
179
|
-
left: 0;
|
|
180
|
-
right: auto;
|
|
181
|
-
top: auto;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
:host([placement='bottom-center']) {
|
|
185
|
-
bottom: 0;
|
|
186
|
-
left: 50%;
|
|
187
|
-
transform: translateX(-50%);
|
|
188
|
-
right: auto;
|
|
189
|
-
top: auto;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
:host([placement='bottom-end']) {
|
|
193
|
-
bottom: 0;
|
|
194
|
-
right: 0;
|
|
195
|
-
left: auto;
|
|
196
|
-
top: auto;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/* ─── Bottom placements: reverse order so newest is on top ─── */
|
|
200
|
-
|
|
201
|
-
:host([placement^='bottom']) .toast-stack {
|
|
202
|
-
flex-direction: column-reverse;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/* ─── Slide direction by placement ─── */
|
|
206
|
-
|
|
207
|
-
:host([placement^='top']) ::slotted(hx-toast) {
|
|
208
|
-
--hx-toast-enter-translate: calc(var(--hx-space-2, 0.5rem) * -1);
|
|
209
|
-
}
|
|
210
|
-
`;
|
|
211
|
-
var w = Object.defineProperty, T = Object.getOwnPropertyDescriptor, h = (a, o, s, e) => {
|
|
212
|
-
for (var t = e > 1 ? void 0 : e ? T(o, s) : o, r = a.length - 1, i; r >= 0; r--)
|
|
213
|
-
(i = a[r]) && (t = (e ? i(o, s, t) : i(t)) || t);
|
|
214
|
-
return e && t && w(o, s, t), t;
|
|
215
|
-
};
|
|
216
|
-
let n = class extends d {
|
|
217
|
-
constructor() {
|
|
218
|
-
super(...arguments), this.variant = "default", this.duration = 3e3, this.closable = !1, this.open = !1, this.closeLabel = "Dismiss notification", this._timer = null, this._timerStartedAt = null, this._timerRemaining = null;
|
|
219
|
-
}
|
|
220
|
-
// ─── Lifecycle ───
|
|
221
|
-
updated(a) {
|
|
222
|
-
a.has("open") && (this.open ? (this.removeAttribute("aria-hidden"), this._emitShow(), this.duration > 0 && this._startTimer()) : (this.setAttribute("aria-hidden", "true"), this._clearTimer(), this._emitHide()));
|
|
223
|
-
}
|
|
224
|
-
disconnectedCallback() {
|
|
225
|
-
super.disconnectedCallback(), this._clearTimer();
|
|
226
|
-
}
|
|
227
|
-
// ─── Public API ───
|
|
228
|
-
/** Show the toast. */
|
|
229
|
-
show() {
|
|
230
|
-
this.open || (this.open = !0);
|
|
231
|
-
}
|
|
232
|
-
/** Hide the toast. */
|
|
233
|
-
hide() {
|
|
234
|
-
this.open && (this.open = !1);
|
|
235
|
-
}
|
|
236
|
-
// ─── Private Helpers ───
|
|
237
|
-
/** @internal */
|
|
238
|
-
_startTimer(a) {
|
|
239
|
-
this._clearTimerHandle();
|
|
240
|
-
const o = a ?? this.duration;
|
|
241
|
-
this._timerStartedAt = Date.now(), this._timerRemaining = o, this._timer = setTimeout(() => {
|
|
242
|
-
this.open = !1;
|
|
243
|
-
}, o);
|
|
244
|
-
}
|
|
245
|
-
/** @internal */
|
|
246
|
-
_pauseTimer() {
|
|
247
|
-
if (this._timer === null || this._timerStartedAt === null || this._timerRemaining === null)
|
|
248
|
-
return;
|
|
249
|
-
const a = Date.now() - this._timerStartedAt;
|
|
250
|
-
this._timerRemaining = Math.max(0, this._timerRemaining - a), this._clearTimerHandle();
|
|
251
|
-
}
|
|
252
|
-
/** @internal */
|
|
253
|
-
_clearTimerHandle() {
|
|
254
|
-
this._timer !== null && (clearTimeout(this._timer), this._timer = null);
|
|
255
|
-
}
|
|
256
|
-
/** @internal */
|
|
257
|
-
_clearTimer() {
|
|
258
|
-
this._clearTimerHandle(), this._timerStartedAt = null, this._timerRemaining = null;
|
|
259
|
-
}
|
|
260
|
-
/** @internal */
|
|
261
|
-
_emitShow() {
|
|
262
|
-
this.dispatchEvent(new CustomEvent("hx-show", { bubbles: !0, composed: !0 }));
|
|
263
|
-
}
|
|
264
|
-
/** @internal */
|
|
265
|
-
_emitHide() {
|
|
266
|
-
var e;
|
|
267
|
-
this.dispatchEvent(new CustomEvent("hx-hide", { bubbles: !0, composed: !0 }));
|
|
268
|
-
let a = !1;
|
|
269
|
-
const o = () => {
|
|
270
|
-
a || (a = !0, this.dispatchEvent(new CustomEvent("hx-after-hide", { bubbles: !0, composed: !0 })));
|
|
271
|
-
}, s = (e = this.shadowRoot) == null ? void 0 : e.querySelector(".toast");
|
|
272
|
-
s && s.addEventListener("transitionend", o, { once: !0 }), setTimeout(o, 300);
|
|
273
|
-
}
|
|
274
|
-
// ─── Event Handlers ───
|
|
275
|
-
/** @internal */
|
|
276
|
-
_handleMouseEnter() {
|
|
277
|
-
this._pauseTimer();
|
|
278
|
-
}
|
|
279
|
-
/** @internal */
|
|
280
|
-
_handleMouseLeave() {
|
|
281
|
-
this.open && this.duration > 0 && this._startTimer(this._timerRemaining ?? void 0);
|
|
282
|
-
}
|
|
283
|
-
/** @internal */
|
|
284
|
-
_handleFocusIn() {
|
|
285
|
-
this._pauseTimer();
|
|
286
|
-
}
|
|
287
|
-
/** @internal */
|
|
288
|
-
_handleFocusOut() {
|
|
289
|
-
this.open && this.duration > 0 && this._startTimer(this._timerRemaining ?? void 0);
|
|
290
|
-
}
|
|
291
|
-
/** @internal */
|
|
292
|
-
_handleClose() {
|
|
293
|
-
this.hide();
|
|
294
|
-
}
|
|
295
|
-
// ─── ARIA Helpers ───
|
|
296
|
-
/** @internal */
|
|
297
|
-
get _role() {
|
|
298
|
-
return this.variant === "danger" ? "alert" : "status";
|
|
299
|
-
}
|
|
300
|
-
/** @internal */
|
|
301
|
-
get _ariaLive() {
|
|
302
|
-
return this.variant === "danger" ? "assertive" : "polite";
|
|
303
|
-
}
|
|
304
|
-
// ─── Render ───
|
|
305
|
-
render() {
|
|
306
|
-
return m`
|
|
307
|
-
<div
|
|
308
|
-
part="base"
|
|
309
|
-
class=${x({
|
|
310
|
-
toast: !0,
|
|
311
|
-
[`toast--${this.variant}`]: !0
|
|
312
|
-
})}
|
|
313
|
-
role=${this._role}
|
|
314
|
-
aria-live=${this._ariaLive}
|
|
315
|
-
aria-atomic="true"
|
|
316
|
-
@mouseenter=${this._handleMouseEnter}
|
|
317
|
-
@mouseleave=${this._handleMouseLeave}
|
|
318
|
-
@focusin=${this._handleFocusIn}
|
|
319
|
-
@focusout=${this._handleFocusOut}
|
|
320
|
-
>
|
|
321
|
-
<span part="icon" class="toast__icon">
|
|
322
|
-
<slot name="icon"></slot>
|
|
323
|
-
</span>
|
|
324
|
-
<span part="message" class="toast__message">
|
|
325
|
-
<slot></slot>
|
|
326
|
-
</span>
|
|
327
|
-
<span part="action" class="toast__action">
|
|
328
|
-
<slot name="action"></slot>
|
|
329
|
-
</span>
|
|
330
|
-
${this.closable ? m`
|
|
331
|
-
<button
|
|
332
|
-
part="close-button"
|
|
333
|
-
class="toast__close"
|
|
334
|
-
aria-label=${this.closeLabel}
|
|
335
|
-
@click=${this._handleClose}
|
|
336
|
-
>
|
|
337
|
-
<svg
|
|
338
|
-
aria-hidden="true"
|
|
339
|
-
width="16"
|
|
340
|
-
height="16"
|
|
341
|
-
viewBox="0 0 24 24"
|
|
342
|
-
fill="none"
|
|
343
|
-
stroke="currentColor"
|
|
344
|
-
stroke-width="2"
|
|
345
|
-
stroke-linecap="round"
|
|
346
|
-
stroke-linejoin="round"
|
|
347
|
-
>
|
|
348
|
-
<path d="M18 6L6 18M6 6l12 12" />
|
|
349
|
-
</svg>
|
|
350
|
-
</button>
|
|
351
|
-
` : b}
|
|
352
|
-
</div>
|
|
353
|
-
`;
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
n.styles = [v, g];
|
|
357
|
-
h([
|
|
358
|
-
l({ type: String, reflect: !0 })
|
|
359
|
-
], n.prototype, "variant", 2);
|
|
360
|
-
h([
|
|
361
|
-
l({ type: Number })
|
|
362
|
-
], n.prototype, "duration", 2);
|
|
363
|
-
h([
|
|
364
|
-
l({ type: Boolean, reflect: !0 })
|
|
365
|
-
], n.prototype, "closable", 2);
|
|
366
|
-
h([
|
|
367
|
-
l({ type: Boolean, reflect: !0 })
|
|
368
|
-
], n.prototype, "open", 2);
|
|
369
|
-
h([
|
|
370
|
-
l({ attribute: "close-label" })
|
|
371
|
-
], n.prototype, "closeLabel", 2);
|
|
372
|
-
n = h([
|
|
373
|
-
f("hx-toast")
|
|
374
|
-
], n);
|
|
375
|
-
var k = Object.defineProperty, S = Object.getOwnPropertyDescriptor, p = (a, o, s, e) => {
|
|
376
|
-
for (var t = e > 1 ? void 0 : e ? S(o, s) : o, r = a.length - 1, i; r >= 0; r--)
|
|
377
|
-
(i = a[r]) && (t = (e ? i(o, s, t) : i(t)) || t);
|
|
378
|
-
return e && t && k(o, s, t), t;
|
|
379
|
-
};
|
|
380
|
-
let c = class extends d {
|
|
381
|
-
constructor() {
|
|
382
|
-
super(...arguments), this.placement = "bottom-end", this.stackLimit = 3;
|
|
383
|
-
}
|
|
384
|
-
render() {
|
|
385
|
-
return m`
|
|
386
|
-
<div
|
|
387
|
-
part="base"
|
|
388
|
-
class=${x({
|
|
389
|
-
"toast-stack": !0,
|
|
390
|
-
[`toast-stack--${this.placement}`]: !0
|
|
391
|
-
})}
|
|
392
|
-
>
|
|
393
|
-
<slot></slot>
|
|
394
|
-
</div>
|
|
395
|
-
`;
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
c.styles = [v, y];
|
|
399
|
-
p([
|
|
400
|
-
l({ type: String, reflect: !0 })
|
|
401
|
-
], c.prototype, "placement", 2);
|
|
402
|
-
p([
|
|
403
|
-
l({ type: Number, attribute: "stack-limit" })
|
|
404
|
-
], c.prototype, "stackLimit", 2);
|
|
405
|
-
c = p([
|
|
406
|
-
f("hx-toast-stack")
|
|
407
|
-
], c);
|
|
408
|
-
function A(a) {
|
|
409
|
-
var r;
|
|
410
|
-
const o = a.placement ?? "bottom-end", s = `hx-toast-stack[placement="${o}"]`;
|
|
411
|
-
let e = document.querySelector(s);
|
|
412
|
-
if (e || (e = document.createElement("hx-toast-stack"), e.placement = o, document.body.appendChild(e)), e.stackLimit > 0) {
|
|
413
|
-
const i = [...e.querySelectorAll("hx-toast")].filter((_) => _.open);
|
|
414
|
-
i.length >= e.stackLimit && ((r = i[0]) == null || r.hide());
|
|
415
|
-
}
|
|
416
|
-
const t = document.createElement("hx-toast");
|
|
417
|
-
return t.variant = a.variant ?? "default", t.duration = a.duration ?? 3e3, t.closable = !0, t.textContent = a.message, t.addEventListener("hx-after-hide", () => {
|
|
418
|
-
t.remove();
|
|
419
|
-
}), e.appendChild(t), t.show(), t;
|
|
420
|
-
}
|
|
421
|
-
export {
|
|
422
|
-
n as H,
|
|
423
|
-
c as a,
|
|
424
|
-
A as t
|
|
425
|
-
};
|
|
426
|
-
//# sourceMappingURL=toast-factory-B8jicczW.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toast-factory-B8jicczW.js","sources":["../../src/components/hx-toast/hx-toast.styles.ts","../../src/components/hx-toast/hx-toast.ts","../../src/components/hx-toast/hx-toast-stack.ts","../../src/components/hx-toast/toast-factory.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixToastStyles = css`\n /* ─── hx-toast host ─── */\n\n :host {\n display: block;\n pointer-events: none;\n }\n\n :host([open]) {\n pointer-events: auto;\n }\n\n /* ─── Toast base ─── */\n\n .toast {\n display: flex;\n align-items: flex-start;\n gap: var(--hx-space-3, 0.75rem);\n padding: var(--hx-space-3, 0.75rem) var(--hx-space-4, 1rem);\n border-radius: var(--hx-toast-border-radius, var(--hx-border-radius-md, 0.375rem));\n background-color: var(--hx-toast-bg, var(--hx-color-neutral-900, #0f172a));\n color: var(--hx-toast-color, var(--hx-color-neutral-0, #ffffff));\n font-family: var(--hx-font-family-sans, sans-serif);\n font-size: var(--hx-font-size-sm, 0.875rem);\n line-height: var(--hx-line-height-normal, 1.5);\n box-shadow: var(\n --hx-toast-shadow,\n 0 4px 6px -1px rgb(0 0 0 / 0.1),\n 0 2px 4px -2px rgb(0 0 0 / 0.1)\n );\n opacity: 0;\n transform: translateY(var(--hx-toast-enter-translate, var(--hx-space-2, 0.5rem)));\n transition:\n opacity var(--hx-transition-normal, 250ms ease),\n transform var(--hx-transition-normal, 250ms ease);\n width: var(--hx-toast-width, 20rem);\n max-width: 100%;\n pointer-events: auto;\n }\n\n :host([open]) .toast {\n opacity: 1;\n transform: translateY(0);\n }\n\n /* ─── Variant overrides ─── */\n\n .toast--success {\n --hx-toast-bg: var(--hx-color-success-600, #16a34a);\n --hx-toast-color: var(--hx-color-neutral-0, #ffffff);\n }\n\n .toast--warning {\n --hx-toast-bg: var(--hx-color-warning-500, #f59e0b);\n --hx-toast-color: var(--hx-color-neutral-900, #0f172a);\n }\n\n .toast--danger {\n --hx-toast-bg: var(--hx-color-error-600, #dc2626);\n --hx-toast-color: var(--hx-color-neutral-0, #ffffff);\n }\n\n .toast--info {\n --hx-toast-bg: var(--hx-color-primary-600, #2563eb);\n --hx-toast-color: var(--hx-color-neutral-0, #ffffff);\n }\n\n /* ─── Icon ─── */\n\n .toast__icon {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n line-height: 1;\n }\n\n .toast__icon:empty {\n display: none;\n }\n\n /* ─── Message ─── */\n\n .toast__message {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n /* ─── Action slot ─── */\n\n .toast__action {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n }\n\n .toast__action:empty {\n display: none;\n }\n\n /* ─── Close button ─── */\n\n .toast__close {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: var(--hx-space-1, 0.25rem);\n background: transparent;\n border: none;\n border-radius: var(--hx-border-radius-sm, 0.25rem);\n color: inherit;\n cursor: pointer;\n opacity: 0.7;\n transition: opacity var(--hx-transition-fast, 150ms ease);\n }\n\n .toast__close:hover {\n opacity: 1;\n }\n\n .toast__close:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid currentColor;\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n /* ─── Reduced motion ─── */\n\n @media (prefers-reduced-motion: reduce) {\n .toast {\n transition: none;\n }\n }\n`;\n\nexport const helixToastStackStyles = css`\n :host {\n display: block;\n position: fixed;\n z-index: var(--hx-z-index-toast, 9000);\n pointer-events: none;\n }\n\n .toast-stack {\n display: flex;\n flex-direction: column;\n gap: var(--hx-space-3, 0.75rem);\n padding: var(--hx-space-4, 1rem);\n pointer-events: none;\n }\n\n /* ─── Placements ─── */\n\n :host([placement='top-start']) {\n top: 0;\n left: 0;\n right: auto;\n bottom: auto;\n }\n\n :host([placement='top-center']) {\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n right: auto;\n bottom: auto;\n }\n\n :host([placement='top-end']) {\n top: 0;\n right: 0;\n left: auto;\n bottom: auto;\n }\n\n :host([placement='bottom-start']) {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n }\n\n :host([placement='bottom-center']) {\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n right: auto;\n top: auto;\n }\n\n :host([placement='bottom-end']) {\n bottom: 0;\n right: 0;\n left: auto;\n top: auto;\n }\n\n /* ─── Bottom placements: reverse order so newest is on top ─── */\n\n :host([placement^='bottom']) .toast-stack {\n flex-direction: column-reverse;\n }\n\n /* ─── Slide direction by placement ─── */\n\n :host([placement^='top']) ::slotted(hx-toast) {\n --hx-toast-enter-translate: calc(var(--hx-space-2, 0.5rem) * -1);\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixToastStyles } from './hx-toast.styles.js';\n\nexport type ToastVariant = 'default' | 'success' | 'warning' | 'danger' | 'info';\n\n/**\n * A transient notification message that auto-dismisses after a configurable duration.\n * Supports multiple visual variants, a closable button, icon/action slots, and full\n * ARIA live region semantics for screen readers.\n *\n * @summary Transient notification toast component.\n *\n * @tag hx-toast\n *\n * @slot - Default slot for the notification message.\n * @slot icon - Optional icon rendered before the message.\n * @slot action - Optional action button rendered after the message.\n *\n * @fires {CustomEvent} hx-show - Dispatched when the toast becomes visible.\n * @fires {CustomEvent} hx-hide - Dispatched when the toast begins hiding.\n * @fires {CustomEvent} hx-after-hide - Dispatched after the hide animation completes.\n *\n * @csspart base - The inner toast container div.\n * @csspart icon - The icon slot wrapper.\n * @csspart message - The message slot wrapper.\n * @csspart close-button - The dismiss button (only when closable).\n * @csspart action - The action slot wrapper.\n *\n * @cssprop [--hx-toast-bg=var(--hx-color-neutral-900)] - Toast background color.\n * @cssprop [--hx-toast-color=var(--hx-color-neutral-0)] - Toast text color.\n * @cssprop [--hx-toast-border-radius=var(--hx-border-radius-md)] - Toast border radius.\n * @cssprop [--hx-toast-shadow] - Toast box shadow.\n * @cssprop [--hx-toast-width=20rem] - Toast width.\n */\n@customElement('hx-toast')\nexport class HelixToast extends LitElement {\n static override styles = [tokenStyles, helixToastStyles];\n\n // ─── Public Properties ───\n\n /**\n * Visual style variant.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: ToastVariant = 'default';\n\n /**\n * Auto-dismiss duration in milliseconds. Set to 0 for persistent toasts.\n * @attr duration\n */\n @property({ type: Number })\n duration = 3000;\n\n /**\n * Whether to show a close button.\n * @attr closable\n */\n @property({ type: Boolean, reflect: true })\n closable = false;\n\n /**\n * Whether the toast is currently visible.\n * @attr open\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n /**\n * Accessible label for the close button. Override for localization.\n * @attr close-label\n */\n @property({ attribute: 'close-label' })\n closeLabel = 'Dismiss notification';\n\n // ─── Private State ───\n\n /** @internal */\n private _timer: ReturnType<typeof setTimeout> | null = null;\n\n /** @internal */\n private _timerStartedAt: number | null = null;\n\n /** @internal */\n private _timerRemaining: number | null = null;\n\n // ─── Lifecycle ───\n\n override updated(changedProperties: Map<PropertyKey, unknown>): void {\n if (changedProperties.has('open')) {\n if (this.open) {\n this.removeAttribute('aria-hidden');\n this._emitShow();\n if (this.duration > 0) {\n this._startTimer();\n }\n } else {\n this.setAttribute('aria-hidden', 'true');\n this._clearTimer();\n this._emitHide();\n }\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this._clearTimer();\n }\n\n // ─── Public API ───\n\n /** Show the toast. */\n show(): void {\n if (!this.open) {\n this.open = true;\n }\n }\n\n /** Hide the toast. */\n hide(): void {\n if (this.open) {\n this.open = false;\n }\n }\n\n // ─── Private Helpers ───\n\n /** @internal */\n private _startTimer(remaining?: number): void {\n this._clearTimerHandle();\n const delay = remaining ?? this.duration;\n this._timerStartedAt = Date.now();\n this._timerRemaining = delay;\n this._timer = setTimeout(() => {\n this.open = false;\n }, delay);\n }\n\n /** @internal */\n private _pauseTimer(): void {\n if (this._timer === null || this._timerStartedAt === null || this._timerRemaining === null) {\n return;\n }\n const elapsed = Date.now() - this._timerStartedAt;\n this._timerRemaining = Math.max(0, this._timerRemaining - elapsed);\n this._clearTimerHandle();\n }\n\n /** @internal */\n private _clearTimerHandle(): void {\n if (this._timer !== null) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n }\n\n /** @internal */\n private _clearTimer(): void {\n this._clearTimerHandle();\n this._timerStartedAt = null;\n this._timerRemaining = null;\n }\n\n /** @internal */\n private _emitShow(): void {\n this.dispatchEvent(new CustomEvent('hx-show', { bubbles: true, composed: true }));\n }\n\n /** @internal */\n private _emitHide(): void {\n this.dispatchEvent(new CustomEvent('hx-hide', { bubbles: true, composed: true }));\n\n let fired = false;\n const fireAfterHide = () => {\n if (fired) return;\n fired = true;\n this.dispatchEvent(new CustomEvent('hx-after-hide', { bubbles: true, composed: true }));\n };\n\n // Fire on transitionend if available; fallback ensures it fires in test environments\n // and when transitions are disabled (prefers-reduced-motion, no CSS transitions).\n const base = this.shadowRoot?.querySelector('.toast');\n if (base) {\n base.addEventListener('transitionend', fireAfterHide, { once: true });\n }\n // Fallback fires after the CSS transition duration (250ms) plus a small buffer.\n setTimeout(fireAfterHide, 300);\n }\n\n // ─── Event Handlers ───\n\n /** @internal */\n private _handleMouseEnter(): void {\n this._pauseTimer();\n }\n\n /** @internal */\n private _handleMouseLeave(): void {\n if (this.open && this.duration > 0) {\n this._startTimer(this._timerRemaining ?? undefined);\n }\n }\n\n /** @internal */\n private _handleFocusIn(): void {\n this._pauseTimer();\n }\n\n /** @internal */\n private _handleFocusOut(): void {\n if (this.open && this.duration > 0) {\n this._startTimer(this._timerRemaining ?? undefined);\n }\n }\n\n /** @internal */\n private _handleClose(): void {\n this.hide();\n }\n\n // ─── ARIA Helpers ───\n\n /** @internal */\n private get _role(): 'alert' | 'status' {\n return this.variant === 'danger' ? 'alert' : 'status';\n }\n\n /** @internal */\n private get _ariaLive(): 'assertive' | 'polite' {\n return this.variant === 'danger' ? 'assertive' : 'polite';\n }\n\n // ─── Render ───\n\n override render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n toast: true,\n [`toast--${this.variant}`]: true,\n })}\n role=${this._role}\n aria-live=${this._ariaLive}\n aria-atomic=\"true\"\n @mouseenter=${this._handleMouseEnter}\n @mouseleave=${this._handleMouseLeave}\n @focusin=${this._handleFocusIn}\n @focusout=${this._handleFocusOut}\n >\n <span part=\"icon\" class=\"toast__icon\">\n <slot name=\"icon\"></slot>\n </span>\n <span part=\"message\" class=\"toast__message\">\n <slot></slot>\n </span>\n <span part=\"action\" class=\"toast__action\">\n <slot name=\"action\"></slot>\n </span>\n ${this.closable\n ? html`\n <button\n part=\"close-button\"\n class=\"toast__close\"\n aria-label=${this.closeLabel}\n @click=${this._handleClose}\n >\n <svg\n aria-hidden=\"true\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <path d=\"M18 6L6 18M6 6l12 12\" />\n </svg>\n </button>\n `\n : nothing}\n </div>\n `;\n }\n}\n\n// ─── Declarative Global Types ───\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-toast': HelixToast;\n }\n}\n","import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixToastStackStyles } from './hx-toast.styles.js';\n\nexport type ToastStackPlacement =\n | 'top-start'\n | 'top-center'\n | 'top-end'\n | 'bottom-start'\n | 'bottom-center'\n | 'bottom-end';\n\n/**\n * A fixed-position container that stacks `hx-toast` elements at the specified\n * corner of the viewport. Enforces a maximum visible toast count via `stack-limit`.\n *\n * @summary Toast stack container managing position and count limits.\n *\n * @tag hx-toast-stack\n *\n * @slot - Accepts `hx-toast` elements.\n *\n * @csspart base - The inner stack container div.\n *\n * @cssprop [--hx-z-index-toast=9000] - Z-index for the fixed stack.\n */\n@customElement('hx-toast-stack')\nexport class HelixToastStack extends LitElement {\n static override styles = [tokenStyles, helixToastStackStyles];\n\n /**\n * Corner of the viewport where toasts appear.\n * @attr placement\n */\n @property({ type: String, reflect: true })\n placement: ToastStackPlacement = 'bottom-end';\n\n /**\n * Maximum number of simultaneously visible toasts. 0 = unlimited.\n * @attr stack-limit\n */\n @property({ type: Number, attribute: 'stack-limit' })\n stackLimit = 3;\n\n override render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n 'toast-stack': true,\n [`toast-stack--${this.placement}`]: true,\n })}\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\n// ─── Declarative Global Types ───\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-toast-stack': HelixToastStack;\n }\n}\n","import { HelixToast } from './hx-toast.js';\nimport { HelixToastStack } from './hx-toast-stack.js';\nimport type { ToastVariant } from './hx-toast.js';\nimport type { ToastStackPlacement } from './hx-toast-stack.js';\n\nexport interface ToastOptions {\n /** The notification message text. */\n message: string;\n /** Visual variant. Defaults to 'default'. */\n variant?: ToastVariant;\n /** Auto-dismiss duration in ms. 0 = persistent. Defaults to 3000. */\n duration?: number;\n /** Placement of the shared stack. Defaults to 'bottom-end'. */\n placement?: ToastStackPlacement;\n}\n\n/**\n * Imperatively create and display a toast notification.\n *\n * Creates a shared `hx-toast-stack` on `document.body` if one does not exist,\n * then appends a new `hx-toast` with the given options. Respects the stack's\n * `stackLimit` by hiding the oldest visible toast when the limit is exceeded.\n *\n * @example\n * import { toast } from '@helixui/library/components/hx-toast/index.js';\n * toast({ message: 'Patient record saved.', variant: 'success' });\n */\nexport function toast(options: ToastOptions): HelixToast {\n const placement = options.placement ?? 'bottom-end';\n\n // Find or create a dedicated stack for this placement\n const stackSelector = `hx-toast-stack[placement=\"${placement}\"]`;\n let stack = document.querySelector<HelixToastStack>(stackSelector);\n if (!stack) {\n stack = document.createElement('hx-toast-stack') as HelixToastStack;\n stack.placement = placement;\n // Intentional design decision: the toast stack is appended to document.body rather\n // than inserted near the caller. This is required so that the fixed-position overlay\n // is not clipped by an ancestor with `overflow: hidden`, `transform`, or `filter`\n // (all of which create a new stacking context and break fixed positioning).\n // Drupal compatibility note: Drupal's BigPipe / AJAX behaviors can re-attach the\n // document body without removing these stacks. The selector check above\n // (`document.querySelector`) ensures only one stack per placement is ever created,\n // preventing duplicates on re-attach cycles.\n document.body.appendChild(stack);\n }\n\n // Enforce stack limit: hide oldest open toast if at capacity\n if (stack.stackLimit > 0) {\n const openToasts = [...stack.querySelectorAll<HelixToast>('hx-toast')].filter((t) => t.open);\n if (openToasts.length >= stack.stackLimit) {\n openToasts[0]?.hide();\n }\n }\n\n // Create toast element\n const toastEl = document.createElement('hx-toast') as HelixToast;\n toastEl.variant = options.variant ?? 'default';\n toastEl.duration = options.duration ?? 3000;\n toastEl.closable = true;\n toastEl.textContent = options.message;\n\n // Remove from DOM after hiding\n toastEl.addEventListener('hx-after-hide', () => {\n toastEl.remove();\n });\n\n stack.appendChild(toastEl);\n toastEl.show();\n\n return toastEl;\n}\n"],"names":["helixToastStyles","css","helixToastStackStyles","HelixToast","LitElement","changedProperties","remaining","delay","elapsed","fired","fireAfterHide","base","_a","html","classMap","nothing","tokenStyles","__decorateClass","property","customElement","HelixToastStack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