@helixui/library 3.7.0 → 3.8.0-next.145
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/README.md +41 -0
- package/aaa-verdicts.json +2036 -0
- package/custom-elements.json +1657 -71
- 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/index.js +1 -1
- package/dist/components/hx-action-bar/hx-action-bar.d.ts +18 -0
- 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 +0 -8
- 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 +4 -1
- package/dist/components/hx-avatar/hx-avatar.d.ts.map +1 -1
- package/dist/components/hx-avatar/hx-avatar.styles.d.ts.map +1 -1
- package/dist/components/hx-avatar/index.js +1 -1
- package/dist/components/hx-badge/hx-badge.d.ts.map +1 -1
- package/dist/components/hx-badge/hx-badge.styles.d.ts.map +1 -1
- package/dist/components/hx-badge/index.js +1 -1
- package/dist/components/hx-banner/hx-banner.d.ts +19 -8
- 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.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 +18 -0
- 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.styles.d.ts.map +1 -1
- package/dist/components/hx-button/index.js +1 -1
- package/dist/components/hx-button-group/hx-button-group.d.ts +47 -0
- package/dist/components/hx-button-group/hx-button-group.d.ts.map +1 -1
- package/dist/components/hx-button-group/index.js +1 -1
- package/dist/components/hx-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.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 +36 -0
- 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.js +1 -1
- package/dist/components/hx-clinical-status/hx-clinical-status.d.ts +26 -9
- 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-color-picker/hx-color-picker.d.ts +18 -0
- 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 +18 -0
- 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 +18 -0
- 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-date-picker/hx-date-picker.d.ts +18 -0
- 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-drawer/hx-drawer.d.ts +18 -0
- 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 +18 -0
- 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 +17 -0
- package/dist/components/hx-field/hx-field.d.ts.map +1 -1
- package/dist/components/hx-field-label/hx-field-label.d.ts +17 -0
- package/dist/components/hx-field-label/hx-field-label.d.ts.map +1 -1
- package/dist/components/hx-file-upload/hx-file-upload.d.ts +46 -0
- 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 +19 -0
- package/dist/components/hx-form/hx-form.d.ts.map +1 -1
- package/dist/components/hx-help-text/hx-help-text.d.ts +17 -0
- 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 +108 -12
- 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 +18 -0
- package/dist/components/hx-icon-button/hx-icon-button.d.ts.map +1 -1
- package/dist/components/hx-link/hx-link.d.ts.map +1 -1
- package/dist/components/hx-link/hx-link.styles.d.ts.map +1 -1
- package/dist/components/hx-link/index.js +1 -1
- package/dist/components/hx-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 +18 -0
- 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-nav/hx-nav.d.ts +18 -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 +18 -0
- 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.js +1 -1
- package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts +23 -1
- 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-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 +18 -0
- 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 +18 -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-radio-group/hx-radio-group.d.ts +18 -0
- 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.styles.d.ts.map +1 -1
- package/dist/components/hx-radio-group/index.js +1 -1
- package/dist/components/hx-rating/hx-rating.d.ts +19 -0
- package/dist/components/hx-rating/hx-rating.d.ts.map +1 -1
- package/dist/components/hx-rating/hx-rating.styles.d.ts.map +1 -1
- package/dist/components/hx-rating/index.js +1 -1
- package/dist/components/hx-select/hx-select.d.ts +18 -0
- package/dist/components/hx-select/hx-select.d.ts.map +1 -1
- 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 +18 -0
- 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 +47 -0
- package/dist/components/hx-slider/hx-slider.d.ts.map +1 -1
- package/dist/components/hx-slider/index.js +1 -1
- package/dist/components/hx-split-button/hx-split-button.d.ts +18 -0
- 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-stat/hx-stat.d.ts.map +1 -1
- package/dist/components/hx-stat/hx-stat.styles.d.ts.map +1 -1
- package/dist/components/hx-stat/index.js +1 -1
- 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/index.js +1 -1
- package/dist/components/hx-switch/hx-switch.d.ts +18 -0
- package/dist/components/hx-switch/hx-switch.d.ts.map +1 -1
- package/dist/components/hx-switch/hx-switch.styles.d.ts.map +1 -1
- package/dist/components/hx-switch/index.js +1 -1
- package/dist/components/hx-tabs/hx-tab.styles.d.ts.map +1 -1
- package/dist/components/hx-tabs/hx-tabs.d.ts +18 -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.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-input/hx-text-input.styles.d.ts.map +1 -1
- package/dist/components/hx-text-input/index.js +1 -1
- package/dist/components/hx-textarea/hx-textarea.d.ts +18 -0
- package/dist/components/hx-textarea/hx-textarea.d.ts.map +1 -1
- package/dist/components/hx-time-picker/hx-time-picker.d.ts +18 -0
- 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 +19 -8
- 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 +18 -0
- package/dist/components/hx-toggle-button/hx-toggle-button.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/hx-toggle-button.styles.d.ts.map +1 -1
- package/dist/components/hx-toggle-button/index.js +1 -1
- package/dist/components/hx-tooltip/hx-tooltip.d.ts +18 -0
- 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 +18 -0
- 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.map +1 -1
- package/dist/components/hx-tree-view/hx-tree-item.styles.d.ts.map +1 -1
- package/dist/components/hx-tree-view/index.js +1 -1
- package/dist/css/helix-all.css +355 -84
- package/dist/css/helix-core.css +23 -5
- package/dist/css/helix-feedback.css +15 -18
- package/dist/css/helix-forms.css +139 -27
- package/dist/css/helix-media.css +6 -3
- package/dist/css/helix-navigation.css +59 -9
- package/dist/css/helix-overlay.css +63 -0
- package/dist/css/helix-tokens.css +16 -14
- package/dist/css/helix-utility.css +44 -12
- package/dist/css/hx-action-bar.css +12 -0
- package/dist/css/hx-alert.css +4 -8
- package/dist/css/hx-avatar.css +1 -2
- package/dist/css/hx-badge.css +5 -0
- package/dist/css/hx-banner.css +4 -8
- package/dist/css/hx-button.css +4 -1
- package/dist/css/hx-carousel.css +6 -3
- package/dist/css/hx-checkbox-group.css +11 -0
- package/dist/css/hx-checkbox.css +14 -9
- package/dist/css/hx-clinical-status.css +4 -7
- package/dist/css/hx-color-picker.css +14 -1
- package/dist/css/hx-combobox.css +8 -0
- package/dist/css/hx-copy-button.css +5 -2
- package/dist/css/hx-date-picker.css +11 -1
- package/dist/css/hx-drawer.css +5 -0
- package/dist/css/hx-dropdown.css +18 -0
- package/dist/css/hx-file-upload.css +4 -0
- package/dist/css/hx-help-text.css +5 -0
- package/dist/css/hx-icon.css +7 -0
- package/dist/css/hx-link.css +1 -2
- package/dist/css/hx-nav.css +31 -2
- package/dist/css/hx-number-input.css +10 -11
- package/dist/css/hx-overflow-menu.css +5 -0
- package/dist/css/hx-phi-field.css +2 -3
- package/dist/css/hx-popover.css +13 -0
- package/dist/css/hx-popup.css +14 -0
- package/dist/css/hx-radio-group.css +10 -0
- package/dist/css/hx-rating.css +6 -0
- package/dist/css/hx-side-nav.css +10 -5
- package/dist/css/hx-split-button.css +27 -10
- package/dist/css/hx-stat.css +1 -2
- package/dist/css/hx-switch.css +19 -1
- package/dist/css/hx-tag.css +5 -0
- package/dist/css/hx-text-input.css +4 -1
- package/dist/css/hx-time-picker.css +12 -2
- package/dist/css/hx-toast.css +6 -0
- package/dist/css/hx-toggle-button.css +11 -1
- package/dist/css/hx-tooltip.css +13 -0
- package/dist/css/hx-top-nav.css +13 -2
- package/dist/css/index.css +1 -1
- package/dist/css/manifest.json +43 -12
- package/dist/index.js +47 -47
- package/dist/shared/{hx-accordion-ZVzgDzTG.js → hx-accordion-DR--Ev4t.js} +48 -54
- package/dist/shared/hx-accordion-DR--Ev4t.js.map +1 -0
- package/dist/shared/{hx-action-bar-CitgcpGv.js → hx-action-bar-BlEG4aZv.js} +41 -29
- package/dist/shared/hx-action-bar-BlEG4aZv.js.map +1 -0
- package/dist/shared/{hx-alert-Bto8-TIi.js → hx-alert-C0axS32J.js} +40 -79
- package/dist/shared/hx-alert-C0axS32J.js.map +1 -0
- package/dist/shared/{hx-avatar-C9hOmlAb.js → hx-avatar-ChAYWnK8.js} +22 -24
- package/dist/shared/hx-avatar-ChAYWnK8.js.map +1 -0
- package/dist/shared/{hx-badge-DFL35nzi.js → hx-badge-vX-1cuLA.js} +16 -11
- package/dist/shared/hx-badge-vX-1cuLA.js.map +1 -0
- package/dist/shared/{hx-banner-fpRnciIO.js → hx-banner-PbHwFNSb.js} +51 -90
- package/dist/shared/hx-banner-PbHwFNSb.js.map +1 -0
- package/dist/shared/{hx-breadcrumb-item-3tKppF9h.js → hx-breadcrumb-item-D8xYqe3s.js} +56 -43
- package/dist/shared/hx-breadcrumb-item-D8xYqe3s.js.map +1 -0
- package/dist/shared/{hx-button-rRNmD4fd.js → hx-button-DOZTZnz-.js} +18 -15
- package/dist/shared/hx-button-DOZTZnz-.js.map +1 -0
- package/dist/shared/hx-button-group-D3QUmSzl.js +248 -0
- package/dist/shared/hx-button-group-D3QUmSzl.js.map +1 -0
- package/dist/shared/{hx-carousel-item-z1Lc24op.js → hx-carousel-item-BVIKgQ4i.js} +72 -102
- package/dist/shared/hx-carousel-item-BVIKgQ4i.js.map +1 -0
- package/dist/shared/{hx-checkbox-hPlIw6Lb.js → hx-checkbox-DDSXXhps.js} +33 -30
- package/dist/shared/hx-checkbox-DDSXXhps.js.map +1 -0
- package/dist/shared/{hx-checkbox-group-D5piJLY8.js → hx-checkbox-group-C0q6HDqn.js} +101 -58
- package/dist/shared/hx-checkbox-group-C0q6HDqn.js.map +1 -0
- package/dist/shared/{hx-clinical-status-D3XQIOqX.js → hx-clinical-status-ZSVEc3Qg.js} +68 -87
- package/dist/shared/hx-clinical-status-ZSVEc3Qg.js.map +1 -0
- package/dist/shared/{hx-color-picker-DBwJzT5f.js → hx-color-picker-CYjx8i8R.js} +97 -84
- package/dist/shared/hx-color-picker-CYjx8i8R.js.map +1 -0
- package/dist/shared/{hx-combobox-NgJaLbs2.js → hx-combobox-Be-mqOv4.js} +35 -45
- package/dist/shared/hx-combobox-Be-mqOv4.js.map +1 -0
- package/dist/shared/{hx-copy-button-sUVuikyH.js → hx-copy-button-DJirFCUL.js} +18 -15
- package/dist/shared/hx-copy-button-DJirFCUL.js.map +1 -0
- package/dist/shared/{hx-date-picker-DSKDkCy1.js → hx-date-picker-CziP3Hm1.js} +80 -82
- package/dist/shared/hx-date-picker-CziP3Hm1.js.map +1 -0
- package/dist/shared/{hx-drawer-CM_upadk.js → hx-drawer-BlU2oX8-.js} +32 -36
- package/dist/shared/hx-drawer-BlU2oX8-.js.map +1 -0
- package/dist/shared/{hx-dropdown-D626S2ZG.js → hx-dropdown-DREqpIpm.js} +51 -33
- package/dist/shared/hx-dropdown-DREqpIpm.js.map +1 -0
- package/dist/shared/hx-field-label-BVRyyKeh.js.map +1 -1
- package/dist/shared/hx-field-zw0U1KVi.js.map +1 -1
- package/dist/shared/{hx-file-upload-D3rKROK5.js → hx-file-upload-CU5QGZSP.js} +137 -80
- package/dist/shared/hx-file-upload-CU5QGZSP.js.map +1 -0
- package/dist/shared/hx-form-CkChEATa.js.map +1 -1
- package/dist/shared/hx-help-text-CNaZ82LT.js +137 -0
- package/dist/shared/hx-help-text-CNaZ82LT.js.map +1 -0
- package/dist/shared/hx-icon-button-B2BdVdyK.js.map +1 -1
- package/dist/shared/hx-icon-bxz9eB9a.js +386 -0
- package/dist/shared/hx-icon-bxz9eB9a.js.map +1 -0
- package/dist/shared/{hx-link-CMnZRUtQ.js → hx-link-BURSdYLp.js} +19 -26
- package/dist/shared/hx-link-BURSdYLp.js.map +1 -0
- package/dist/shared/{hx-menu-divider-A6Guuzi_.js → hx-menu-divider-g0grbWV9.js} +19 -31
- package/dist/shared/hx-menu-divider-g0grbWV9.js.map +1 -0
- package/dist/shared/{hx-nav-ldFM3Fle.js → hx-nav-GTsAZGOx.js} +94 -85
- package/dist/shared/hx-nav-GTsAZGOx.js.map +1 -0
- package/dist/shared/{hx-nav-item-CODtUlew.js → hx-nav-item-CxE7Mp3M.js} +46 -41
- package/dist/shared/hx-nav-item-CxE7Mp3M.js.map +1 -0
- package/dist/shared/{hx-number-input-yUzFOSC1.js → hx-number-input-Bvyc9kOi.js} +59 -64
- package/dist/shared/hx-number-input-Bvyc9kOi.js.map +1 -0
- package/dist/shared/{hx-overflow-menu-DFjJAziP.js → hx-overflow-menu-LrTteeR1.js} +32 -39
- package/dist/shared/{hx-overflow-menu-DFjJAziP.js.map → hx-overflow-menu-LrTteeR1.js.map} +1 -1
- package/dist/shared/{hx-phi-field-C19oxlrr.js → hx-phi-field-sZt_rYIL.js} +46 -66
- package/dist/shared/hx-phi-field-sZt_rYIL.js.map +1 -0
- package/dist/shared/{hx-popover-BAlAFOH9.js → hx-popover-BjB0nkcq.js} +51 -38
- package/dist/shared/hx-popover-BjB0nkcq.js.map +1 -0
- package/dist/shared/{hx-popup-COUXXZ9X.js → hx-popup-BiV_2evC.js} +59 -45
- package/dist/shared/hx-popup-BiV_2evC.js.map +1 -0
- package/dist/shared/{hx-radio-CY4kQfZw.js → hx-radio-BD_c9NJy.js} +83 -70
- package/dist/shared/hx-radio-BD_c9NJy.js.map +1 -0
- package/dist/shared/{hx-rating-C3QP53k9.js → hx-rating-BGK4AxvI.js} +45 -71
- package/dist/shared/hx-rating-BGK4AxvI.js.map +1 -0
- package/dist/shared/hx-select-DahFehiZ.js.map +1 -1
- package/dist/shared/{hx-slider-Blmv_rwS.js → hx-slider-CkOk5BCY.js} +83 -23
- package/dist/shared/hx-slider-CkOk5BCY.js.map +1 -0
- package/dist/shared/{hx-split-button-Ddle8iVx.js → hx-split-button-Bg9FHrFK.js} +73 -65
- package/dist/shared/hx-split-button-Bg9FHrFK.js.map +1 -0
- package/dist/shared/{hx-stat-Gtw_SpK8.js → hx-stat-wKxbyep6.js} +22 -55
- package/dist/shared/hx-stat-wKxbyep6.js.map +1 -0
- package/dist/shared/{hx-step-CUzliIK_.js → hx-step-CyGQAuiB.js} +5 -25
- package/dist/shared/hx-step-CyGQAuiB.js.map +1 -0
- package/dist/shared/{hx-switch-TvKGvZJz.js → hx-switch-BCXuNxEH.js} +42 -24
- package/dist/shared/hx-switch-BCXuNxEH.js.map +1 -0
- package/dist/shared/{hx-tab-panel-DzsX8BHV.js → hx-tab-panel-BfisavKo.js} +47 -32
- package/dist/shared/hx-tab-panel-BfisavKo.js.map +1 -0
- package/dist/shared/{hx-tag-C5aCUpVi.js → hx-tag-BqO6HY6V.js} +26 -21
- package/dist/shared/hx-tag-BqO6HY6V.js.map +1 -0
- package/dist/shared/{hx-text-input-D6FlOZM-.js → hx-text-input-V5sQOpDh.js} +5 -2
- package/dist/shared/hx-text-input-V5sQOpDh.js.map +1 -0
- package/dist/shared/hx-textarea-CNG590KY.js.map +1 -1
- package/dist/shared/{hx-time-picker-Bo7FWzmf.js → hx-time-picker-if5Cl0Ei.js} +42 -43
- package/dist/shared/hx-time-picker-if5Cl0Ei.js.map +1 -0
- package/dist/shared/{hx-toggle-button-DSJeFlb0.js → hx-toggle-button-xNVYeA3X.js} +37 -27
- package/dist/shared/hx-toggle-button-xNVYeA3X.js.map +1 -0
- package/dist/shared/{hx-tooltip-DVqtKPCD.js → hx-tooltip-CamO-9nd.js} +24 -11
- package/dist/shared/hx-tooltip-CamO-9nd.js.map +1 -0
- package/dist/shared/{hx-top-nav-DP6OFS8C.js → hx-top-nav-vP6oDWMV.js} +42 -44
- package/dist/shared/hx-top-nav-vP6oDWMV.js.map +1 -0
- package/dist/shared/{hx-tree-item-CXyspGxI.js → hx-tree-item-D8hwKd5m.js} +54 -57
- package/dist/shared/hx-tree-item-D8hwKd5m.js.map +1 -0
- package/dist/shared/{toast-factory-Dht3pVsw.js → toast-factory-DgnbFxVs.js} +127 -153
- package/dist/shared/toast-factory-DgnbFxVs.js.map +1 -0
- package/figma-inventory.json +1166 -411
- package/package.json +8 -4
- package/dist/shared/hx-accordion-ZVzgDzTG.js.map +0 -1
- package/dist/shared/hx-action-bar-CitgcpGv.js.map +0 -1
- package/dist/shared/hx-alert-Bto8-TIi.js.map +0 -1
- package/dist/shared/hx-avatar-C9hOmlAb.js.map +0 -1
- package/dist/shared/hx-badge-DFL35nzi.js.map +0 -1
- package/dist/shared/hx-banner-fpRnciIO.js.map +0 -1
- package/dist/shared/hx-breadcrumb-item-3tKppF9h.js.map +0 -1
- package/dist/shared/hx-button-group-4NUBpkyC.js +0 -181
- package/dist/shared/hx-button-group-4NUBpkyC.js.map +0 -1
- package/dist/shared/hx-button-rRNmD4fd.js.map +0 -1
- package/dist/shared/hx-carousel-item-z1Lc24op.js.map +0 -1
- package/dist/shared/hx-checkbox-group-D5piJLY8.js.map +0 -1
- package/dist/shared/hx-checkbox-hPlIw6Lb.js.map +0 -1
- package/dist/shared/hx-clinical-status-D3XQIOqX.js.map +0 -1
- package/dist/shared/hx-color-picker-DBwJzT5f.js.map +0 -1
- package/dist/shared/hx-combobox-NgJaLbs2.js.map +0 -1
- package/dist/shared/hx-copy-button-sUVuikyH.js.map +0 -1
- package/dist/shared/hx-date-picker-DSKDkCy1.js.map +0 -1
- package/dist/shared/hx-drawer-CM_upadk.js.map +0 -1
- package/dist/shared/hx-dropdown-D626S2ZG.js.map +0 -1
- package/dist/shared/hx-file-upload-D3rKROK5.js.map +0 -1
- package/dist/shared/hx-help-text-Xb2Yr8x2.js +0 -156
- package/dist/shared/hx-help-text-Xb2Yr8x2.js.map +0 -1
- package/dist/shared/hx-icon-fuVm4-bk.js +0 -283
- package/dist/shared/hx-icon-fuVm4-bk.js.map +0 -1
- package/dist/shared/hx-link-CMnZRUtQ.js.map +0 -1
- package/dist/shared/hx-menu-divider-A6Guuzi_.js.map +0 -1
- package/dist/shared/hx-nav-item-CODtUlew.js.map +0 -1
- package/dist/shared/hx-nav-ldFM3Fle.js.map +0 -1
- package/dist/shared/hx-number-input-yUzFOSC1.js.map +0 -1
- package/dist/shared/hx-phi-field-C19oxlrr.js.map +0 -1
- package/dist/shared/hx-popover-BAlAFOH9.js.map +0 -1
- package/dist/shared/hx-popup-COUXXZ9X.js.map +0 -1
- package/dist/shared/hx-radio-CY4kQfZw.js.map +0 -1
- package/dist/shared/hx-rating-C3QP53k9.js.map +0 -1
- package/dist/shared/hx-slider-Blmv_rwS.js.map +0 -1
- package/dist/shared/hx-split-button-Ddle8iVx.js.map +0 -1
- package/dist/shared/hx-stat-Gtw_SpK8.js.map +0 -1
- package/dist/shared/hx-step-CUzliIK_.js.map +0 -1
- package/dist/shared/hx-switch-TvKGvZJz.js.map +0 -1
- package/dist/shared/hx-tab-panel-DzsX8BHV.js.map +0 -1
- package/dist/shared/hx-tag-C5aCUpVi.js.map +0 -1
- package/dist/shared/hx-text-input-D6FlOZM-.js.map +0 -1
- package/dist/shared/hx-time-picker-Bo7FWzmf.js.map +0 -1
- package/dist/shared/hx-toggle-button-DSJeFlb0.js.map +0 -1
- package/dist/shared/hx-tooltip-DVqtKPCD.js.map +0 -1
- package/dist/shared/hx-top-nav-DP6OFS8C.js.map +0 -1
- package/dist/shared/hx-tree-item-CXyspGxI.js.map +0 -1
- package/dist/shared/toast-factory-Dht3pVsw.js.map +0 -1
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { css as b, html as f } from "lit";
|
|
2
|
+
import { property as h, customElement as p } from "lit/decorators.js";
|
|
3
|
+
import { classMap as m } from "lit/directives/class-map.js";
|
|
4
|
+
import { f as g } from "./forced-colors-CTEDFRGa.js";
|
|
5
|
+
import { H as x } from "./helix-element-BNEYeiys.js";
|
|
6
|
+
const v = b`
|
|
7
|
+
:host {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
contain: layout style;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.group {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: stretch;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* ─── Orientation Variants ─── */
|
|
18
|
+
|
|
19
|
+
.group--horizontal {
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.group--vertical {
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* ─── No Double Borders: Horizontal ─── */
|
|
28
|
+
|
|
29
|
+
.group--horizontal ::slotted(*:not(:first-child)) {
|
|
30
|
+
margin-inline-start: var(
|
|
31
|
+
--hx-button-group-divider-offset,
|
|
32
|
+
calc(-1 * var(--hx-border-width-thin, 1px))
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ─── No Double Borders: Vertical ─── */
|
|
37
|
+
|
|
38
|
+
.group--vertical ::slotted(*:not(:first-child)) {
|
|
39
|
+
margin-top: var(--hx-button-group-divider-offset, calc(-1 * var(--hx-border-width-thin, 1px)));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* ─── Border Radius: Horizontal — Single child keeps all corners ─── */
|
|
43
|
+
|
|
44
|
+
.group--horizontal ::slotted(:only-child) {
|
|
45
|
+
--hx-button-border-radius: var(
|
|
46
|
+
--hx-button-group-border-radius,
|
|
47
|
+
var(--hx-border-radius-md, 0.375rem)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* ─── Border Radius: Horizontal — First child keeps left corners ─── */
|
|
52
|
+
|
|
53
|
+
.group--horizontal ::slotted(:first-child:not(:only-child)) {
|
|
54
|
+
--hx-button-border-radius: var(
|
|
55
|
+
--hx-button-group-border-radius,
|
|
56
|
+
var(--hx-border-radius-md, 0.375rem)
|
|
57
|
+
)
|
|
58
|
+
0 0 var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* ─── Border Radius: Horizontal — Last child keeps right corners ─── */
|
|
62
|
+
|
|
63
|
+
.group--horizontal ::slotted(:last-child:not(:only-child)) {
|
|
64
|
+
--hx-button-border-radius: 0
|
|
65
|
+
var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem))
|
|
66
|
+
var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem)) 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* ─── Border Radius: Horizontal — Middle children have no radius ─── */
|
|
70
|
+
|
|
71
|
+
.group--horizontal ::slotted(:not(:first-child):not(:last-child)) {
|
|
72
|
+
--hx-button-border-radius: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* ─── Border Radius: Vertical — Single child keeps all corners ─── */
|
|
76
|
+
|
|
77
|
+
.group--vertical ::slotted(:only-child) {
|
|
78
|
+
--hx-button-border-radius: var(
|
|
79
|
+
--hx-button-group-border-radius,
|
|
80
|
+
var(--hx-border-radius-md, 0.375rem)
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ─── Border Radius: Vertical — First child keeps top corners ─── */
|
|
85
|
+
|
|
86
|
+
.group--vertical ::slotted(:first-child:not(:only-child)) {
|
|
87
|
+
--hx-button-border-radius: var(
|
|
88
|
+
--hx-button-group-border-radius,
|
|
89
|
+
var(--hx-border-radius-md, 0.375rem)
|
|
90
|
+
)
|
|
91
|
+
var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem)) 0 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* ─── Border Radius: Vertical — Last child keeps bottom corners ─── */
|
|
95
|
+
|
|
96
|
+
.group--vertical ::slotted(:last-child:not(:only-child)) {
|
|
97
|
+
--hx-button-border-radius: 0 0
|
|
98
|
+
var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem))
|
|
99
|
+
var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* ─── Border Radius: Vertical — Middle children have no radius ─── */
|
|
103
|
+
|
|
104
|
+
.group--vertical ::slotted(:not(:first-child):not(:last-child)) {
|
|
105
|
+
--hx-button-border-radius: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* ─── Z-index: Raise focused child above siblings to show full focus ring ─── */
|
|
109
|
+
|
|
110
|
+
.group ::slotted(:focus-within) {
|
|
111
|
+
z-index: var(--hx-button-group-focus-z-index, 1);
|
|
112
|
+
position: relative;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* ─── High Contrast Mode (forced-colors) ─── */
|
|
116
|
+
|
|
117
|
+
@media (forced-colors: active) {
|
|
118
|
+
/*
|
|
119
|
+
* In forced-colors mode, negative margins that collapse borders between grouped
|
|
120
|
+
* buttons can obscure focus rings. Raise focused children so the Highlight
|
|
121
|
+
* outline from hx-button's own forced-colors block is fully visible.
|
|
122
|
+
*/
|
|
123
|
+
.group ::slotted(:focus-within) {
|
|
124
|
+
z-index: var(--hx-button-group-focus-z-index-hc, 2);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
128
|
+
var _ = Object.defineProperty, y = Object.getOwnPropertyDescriptor, u = (t, e, o, i) => {
|
|
129
|
+
for (var r = i > 1 ? void 0 : i ? y(e, o) : e, n = t.length - 1, s; n >= 0; n--)
|
|
130
|
+
(s = t[n]) && (r = (i ? s(e, o, r) : s(r)) || r);
|
|
131
|
+
return i && r && _(e, o, r), r;
|
|
132
|
+
};
|
|
133
|
+
let l = class extends x {
|
|
134
|
+
constructor() {
|
|
135
|
+
super(...arguments), this._orientation = "horizontal", this.size = "md", this.label = "", this._consumerAriaLabel = null, this._consumerRole = null, this._emptyLabelWarnEmitted = !1, this._focusableCache = null, this._handleKeydown = (t) => {
|
|
136
|
+
var r, n;
|
|
137
|
+
const e = this._orientation === "vertical", o = e ? "ArrowDown" : "ArrowRight", i = e ? "ArrowUp" : "ArrowLeft";
|
|
138
|
+
if (t.key === o)
|
|
139
|
+
t.preventDefault(), this._moveFocus("next");
|
|
140
|
+
else if (t.key === i)
|
|
141
|
+
t.preventDefault(), this._moveFocus("prev");
|
|
142
|
+
else if (t.key === "Home") {
|
|
143
|
+
t.preventDefault();
|
|
144
|
+
const s = this._getFocusableItems();
|
|
145
|
+
s.length && (s.forEach((a, d) => a.setAttribute("tabindex", d === 0 ? "0" : "-1")), (r = s[0]) == null || r.focus());
|
|
146
|
+
} else if (t.key === "End") {
|
|
147
|
+
t.preventDefault();
|
|
148
|
+
const s = this._getFocusableItems(), a = s.length - 1;
|
|
149
|
+
s.length && (s.forEach((d, c) => d.setAttribute("tabindex", c === a ? "0" : "-1")), (n = s[a]) == null || n.focus());
|
|
150
|
+
}
|
|
151
|
+
}, this._handleSlotChange = () => {
|
|
152
|
+
this._initRovingTabindex();
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
get orientation() {
|
|
156
|
+
return this._orientation;
|
|
157
|
+
}
|
|
158
|
+
set orientation(t) {
|
|
159
|
+
t !== "horizontal" && t !== "vertical" && (t = "horizontal"), this._orientation = t;
|
|
160
|
+
}
|
|
161
|
+
updated(t) {
|
|
162
|
+
super.updated(t), t.has("size") && this.style.setProperty("--hx-button-group-size", this.size), t.has("label") && (this.label ? this.setAttribute("aria-label", this.label) : this._consumerAriaLabel !== null ? this.setAttribute("aria-label", this._consumerAriaLabel) : this.removeAttribute("aria-label"));
|
|
163
|
+
}
|
|
164
|
+
/** @internal */
|
|
165
|
+
_isFocusable(t) {
|
|
166
|
+
if (t.hasAttribute("disabled") || t.disabled === !0) return !1;
|
|
167
|
+
if (t.tabIndex >= 0) return !0;
|
|
168
|
+
const o = t.tagName.toLowerCase();
|
|
169
|
+
return o === "button" || o === "input" || o === "select" || o === "textarea";
|
|
170
|
+
}
|
|
171
|
+
/** @internal */
|
|
172
|
+
_getFocusableItems() {
|
|
173
|
+
var o;
|
|
174
|
+
if (this._focusableCache) return this._focusableCache;
|
|
175
|
+
const t = (o = this.shadowRoot) == null ? void 0 : o.querySelector("slot"), e = [];
|
|
176
|
+
if (t) {
|
|
177
|
+
const i = t.assignedElements({ flatten: !0 });
|
|
178
|
+
for (const r of i)
|
|
179
|
+
if (r instanceof HTMLElement)
|
|
180
|
+
if (this._isFocusable(r))
|
|
181
|
+
e.push(r);
|
|
182
|
+
else {
|
|
183
|
+
const n = r.querySelectorAll("*");
|
|
184
|
+
for (const s of Array.from(n))
|
|
185
|
+
this._isFocusable(s) && e.push(s);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return this._focusableCache = e, e;
|
|
189
|
+
}
|
|
190
|
+
/** @internal */
|
|
191
|
+
_initRovingTabindex() {
|
|
192
|
+
this._focusableCache = null;
|
|
193
|
+
const t = this._getFocusableItems();
|
|
194
|
+
if (!t.length) return;
|
|
195
|
+
const e = t.findIndex((i) => i.getAttribute("tabindex") === "0"), o = e === -1 ? 0 : e;
|
|
196
|
+
t.forEach((i, r) => i.setAttribute("tabindex", r === o ? "0" : "-1"));
|
|
197
|
+
}
|
|
198
|
+
/** @internal */
|
|
199
|
+
_moveFocus(t) {
|
|
200
|
+
var n;
|
|
201
|
+
const e = this._getFocusableItems();
|
|
202
|
+
if (!e.length) return;
|
|
203
|
+
const o = document.activeElement, i = e.indexOf(o);
|
|
204
|
+
let r;
|
|
205
|
+
t === "next" ? r = i < e.length - 1 ? i + 1 : 0 : r = i > 0 ? i - 1 : e.length - 1, e.forEach((s, a) => s.setAttribute("tabindex", a === r ? "0" : "-1")), (n = e[r]) == null || n.focus();
|
|
206
|
+
}
|
|
207
|
+
firstUpdated() {
|
|
208
|
+
this._initRovingTabindex();
|
|
209
|
+
}
|
|
210
|
+
disconnectedCallback() {
|
|
211
|
+
super.disconnectedCallback(), this.removeEventListener("keydown", this._handleKeydown);
|
|
212
|
+
}
|
|
213
|
+
connectedCallback() {
|
|
214
|
+
super.connectedCallback(), this.addEventListener("keydown", this._handleKeydown), this._consumerAriaLabel === null && this.hasAttribute("aria-label") && (this._consumerAriaLabel = this.getAttribute("aria-label")), this._consumerRole === null && this.hasAttribute("role") && (this._consumerRole = this.getAttribute("role")), this._consumerRole ? this._internals.role = this._consumerRole : (this._internals.role = "group", this.setAttribute("role", "group")), this.style.setProperty("--hx-button-group-size", this.size), this.label ? this.setAttribute("aria-label", this.label) : this._consumerAriaLabel !== null || this._emptyLabelWarnEmitted || (this._emptyLabelWarnEmitted = !0);
|
|
215
|
+
}
|
|
216
|
+
// ─── Render ───
|
|
217
|
+
render() {
|
|
218
|
+
return f`
|
|
219
|
+
<div
|
|
220
|
+
part="group"
|
|
221
|
+
class=${m({
|
|
222
|
+
group: !0,
|
|
223
|
+
"group--horizontal": this.orientation === "horizontal",
|
|
224
|
+
"group--vertical": this.orientation === "vertical"
|
|
225
|
+
})}
|
|
226
|
+
>
|
|
227
|
+
<slot @slotchange=${this._handleSlotChange}></slot>
|
|
228
|
+
</div>
|
|
229
|
+
`;
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
l.styles = [v, g];
|
|
233
|
+
u([
|
|
234
|
+
h({ type: String, reflect: !0 })
|
|
235
|
+
], l.prototype, "orientation", 1);
|
|
236
|
+
u([
|
|
237
|
+
h({ type: String, reflect: !0, attribute: "hx-size" })
|
|
238
|
+
], l.prototype, "size", 2);
|
|
239
|
+
u([
|
|
240
|
+
h({ type: String })
|
|
241
|
+
], l.prototype, "label", 2);
|
|
242
|
+
l = u([
|
|
243
|
+
p("hx-button-group")
|
|
244
|
+
], l);
|
|
245
|
+
export {
|
|
246
|
+
l as H
|
|
247
|
+
};
|
|
248
|
+
//# sourceMappingURL=hx-button-group-D3QUmSzl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-button-group-D3QUmSzl.js","sources":["../../src/components/hx-button-group/hx-button-group.styles.ts","../../src/components/hx-button-group/hx-button-group.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixButtonGroupStyles = css`\n :host {\n display: inline-flex;\n contain: layout style;\n }\n\n .group {\n display: inline-flex;\n align-items: stretch;\n }\n\n /* ─── Orientation Variants ─── */\n\n .group--horizontal {\n flex-direction: row;\n }\n\n .group--vertical {\n flex-direction: column;\n }\n\n /* ─── No Double Borders: Horizontal ─── */\n\n .group--horizontal ::slotted(*:not(:first-child)) {\n margin-inline-start: var(\n --hx-button-group-divider-offset,\n calc(-1 * var(--hx-border-width-thin, 1px))\n );\n }\n\n /* ─── No Double Borders: Vertical ─── */\n\n .group--vertical ::slotted(*:not(:first-child)) {\n margin-top: var(--hx-button-group-divider-offset, calc(-1 * var(--hx-border-width-thin, 1px)));\n }\n\n /* ─── Border Radius: Horizontal — Single child keeps all corners ─── */\n\n .group--horizontal ::slotted(:only-child) {\n --hx-button-border-radius: var(\n --hx-button-group-border-radius,\n var(--hx-border-radius-md, 0.375rem)\n );\n }\n\n /* ─── Border Radius: Horizontal — First child keeps left corners ─── */\n\n .group--horizontal ::slotted(:first-child:not(:only-child)) {\n --hx-button-border-radius: var(\n --hx-button-group-border-radius,\n var(--hx-border-radius-md, 0.375rem)\n )\n 0 0 var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem));\n }\n\n /* ─── Border Radius: Horizontal — Last child keeps right corners ─── */\n\n .group--horizontal ::slotted(:last-child:not(:only-child)) {\n --hx-button-border-radius: 0\n var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem))\n var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem)) 0;\n }\n\n /* ─── Border Radius: Horizontal — Middle children have no radius ─── */\n\n .group--horizontal ::slotted(:not(:first-child):not(:last-child)) {\n --hx-button-border-radius: 0;\n }\n\n /* ─── Border Radius: Vertical — Single child keeps all corners ─── */\n\n .group--vertical ::slotted(:only-child) {\n --hx-button-border-radius: var(\n --hx-button-group-border-radius,\n var(--hx-border-radius-md, 0.375rem)\n );\n }\n\n /* ─── Border Radius: Vertical — First child keeps top corners ─── */\n\n .group--vertical ::slotted(:first-child:not(:only-child)) {\n --hx-button-border-radius: var(\n --hx-button-group-border-radius,\n var(--hx-border-radius-md, 0.375rem)\n )\n var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem)) 0 0;\n }\n\n /* ─── Border Radius: Vertical — Last child keeps bottom corners ─── */\n\n .group--vertical ::slotted(:last-child:not(:only-child)) {\n --hx-button-border-radius: 0 0\n var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem))\n var(--hx-button-group-border-radius, var(--hx-border-radius-md, 0.375rem));\n }\n\n /* ─── Border Radius: Vertical — Middle children have no radius ─── */\n\n .group--vertical ::slotted(:not(:first-child):not(:last-child)) {\n --hx-button-border-radius: 0;\n }\n\n /* ─── Z-index: Raise focused child above siblings to show full focus ring ─── */\n\n .group ::slotted(:focus-within) {\n z-index: var(--hx-button-group-focus-z-index, 1);\n position: relative;\n }\n\n /* ─── High Contrast Mode (forced-colors) ─── */\n\n @media (forced-colors: active) {\n /*\n * In forced-colors mode, negative margins that collapse borders between grouped\n * buttons can obscure focus rings. Raise focused children so the Highlight\n * outline from hx-button's own forced-colors block is fully visible.\n */\n .group ::slotted(:focus-within) {\n z-index: var(--hx-button-group-focus-z-index-hc, 2);\n }\n }\n`;\n","import { html, type PropertyValues } from 'lit';\nimport '../../utilities/document-token-adoption.js';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HelixElement } from '../../base/index.js';\nimport { helixButtonGroupStyles } from './hx-button-group.styles.js';\nimport { forcedColorsInteractive } from '../../styles/forced-colors.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * A container component that groups related hx-button elements into a cohesive\n * horizontal or vertical action set. Eliminates double borders between adjacent\n * buttons and squares off inner border-radius for a unified visual appearance.\n *\n * **Accessibility:** Always provide an accessible label via `aria-label` or\n * `aria-labelledby` so screen readers can announce the group purpose.\n *\n * @summary Groups hx-button elements into a horizontal or vertical action set with shared borders.\n *\n * @tag hx-button-group\n *\n * @slot - Default slot accepting hx-button children.\n *\n * @csspart group - The container div element wrapping all slotted buttons.\n *\n * @cssprop [--hx-button-group-size=md] - Size token forwarded to child buttons. Accepts 'sm', 'md', or 'lg'.\n * @cssprop [--hx-border-width-thin] - Width.\n * @cssprop [--hx-border-radius-md] - CSS custom property.\n * @aaa-certified 2026-05-08\n * @aaa-criteria 1.4.6, 1.4.9, 2.1.3, 2.3.3, 2.4.12, 2.4.13, 2.5.5, 3.2.5, 3.3.6, forced-colors, apg-keyboard\n * @aaa-audit src/components/hx-button-group/AAA-AUDIT.md\n * @keyboard-contract navigate=Arrow; activate=Enter,Space; disabled-suppresses=true\n * @aria-pattern toolbar\n * @aria-pattern-source https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/\n * @forced-colors-supported true\n * @stability stable\n * @since 3.7.0\n * @form-associated false\n * @theme-aware true\n * @brand-aware true\n * @drupal-sdc-eligible true\n * @react-wrapper-status complete\n * @figma-component-name hx-button-group\n * @priority-tier P0\n * @phi-handles false\n * @clinical-context none\n */\n@customElement('hx-button-group')\nexport class HelixButtonGroup extends HelixElement {\n static override styles = [helixButtonGroupStyles, forcedColorsInteractive];\n\n /**\n * Layout orientation of the button group.\n * @attr orientation\n */\n @property({ type: String, reflect: true })\n get orientation(): 'horizontal' | 'vertical' {\n return this._orientation;\n }\n set orientation(value: string) {\n if (value !== 'horizontal' && value !== 'vertical') {\n devWarn('hx-button-group', `Invalid orientation \"${value}\", defaulting to \"horizontal\".`);\n value = 'horizontal';\n }\n this._orientation = value as 'horizontal' | 'vertical';\n }\n /**\n * Backing store for the orientation property, holding the validated orientation value.\n * @internal\n */\n private _orientation: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Size applied to the button group and cascaded to child buttons via\n * the --hx-button-group-size CSS custom property.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Accessible label for the button group. Sets aria-label on the host element.\n * **Strongly recommended** for WCAG 2.1 AA compliance — without it, screen\n * readers announce an unnamed \"group\". For Drupal/Twig compatibility, prefer\n * applying `aria-label` directly as an HTML attribute instead.\n * @attr label\n */\n @property({ type: String })\n label: string = '';\n\n // ─── Lifecycle ───\n\n /**\n * Tracks whether the consumer set `aria-label` directly as an HTML attribute\n * BEFORE the `label` property fired. Used to avoid clobbering consumer-set\n * aria-label when `label` is empty.\n * @internal\n */\n private _consumerAriaLabel: string | null = null;\n\n /**\n * Snapshot of the consumer-set `role` attribute taken at connect time.\n * When non-null, the consumer has explicitly set a role (e.g. `toolbar`,\n * `radiogroup`) and the host-canonical mirror MUST defer to that role\n * rather than overwriting `internals.role` with the default `\"group\"`.\n * Mirrors the `_consumerAriaLabel` snapshot pattern above.\n * @internal\n */\n private _consumerRole: string | null = null;\n\n /**\n * Tracks whether the no-label devWarn has already fired for this instance,\n * so disconnect/reconnect cycles do not spam the console.\n * @internal\n */\n private _emptyLabelWarnEmitted = false;\n\n override updated(changedProperties: PropertyValues<this>): void {\n super.updated(changedProperties);\n\n if (changedProperties.has('size')) {\n this.style.setProperty('--hx-button-group-size', this.size);\n }\n\n if (changedProperties.has('label')) {\n if (this.label) {\n this.setAttribute('aria-label', this.label);\n } else if (this._consumerAriaLabel !== null) {\n // Restore consumer-set aria-label rather than removing it. The\n // consumer's HTML attribute is the documented Drupal/Twig path\n // (lines 67-68 narrative) and must not be clobbered by an empty\n // `label` property.\n this.setAttribute('aria-label', this._consumerAriaLabel);\n } else {\n this.removeAttribute('aria-label');\n }\n }\n }\n\n /**\n * Cached list of focusable items inside the group. Invalidated on\n * slotchange. Used by the roving-tabindex keyboard contract.\n * @internal\n */\n private _focusableCache: HTMLElement[] | null = null;\n\n /**\n * APG toolbar pattern roving-tabindex keyboard handler.\n * Reference: https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/\n *\n * - ArrowRight / ArrowDown (vertical): focus next item, wrap.\n * - ArrowLeft / ArrowUp (vertical): focus prev item, wrap.\n * - Home: focus first item.\n * - End: focus last item.\n * @internal\n */\n private _handleKeydown = (e: KeyboardEvent): void => {\n const isVertical = this._orientation === 'vertical';\n const nextKey = isVertical ? 'ArrowDown' : 'ArrowRight';\n const prevKey = isVertical ? 'ArrowUp' : 'ArrowLeft';\n\n if (e.key === nextKey) {\n e.preventDefault();\n this._moveFocus('next');\n } else if (e.key === prevKey) {\n e.preventDefault();\n this._moveFocus('prev');\n } else if (e.key === 'Home') {\n e.preventDefault();\n const items = this._getFocusableItems();\n if (items.length) {\n items.forEach((el, i) => el.setAttribute('tabindex', i === 0 ? '0' : '-1'));\n items[0]?.focus();\n }\n } else if (e.key === 'End') {\n e.preventDefault();\n const items = this._getFocusableItems();\n const last = items.length - 1;\n if (items.length) {\n items.forEach((el, i) => el.setAttribute('tabindex', i === last ? '0' : '-1'));\n items[last]?.focus();\n }\n }\n };\n\n /** @internal */\n private _isFocusable(el: HTMLElement): boolean {\n if (el.hasAttribute('disabled')) return false;\n const elWithDisabled = el as HTMLElement & { disabled?: boolean };\n if (elWithDisabled.disabled === true) return false;\n if (el.tabIndex >= 0) return true;\n const tag = el.tagName.toLowerCase();\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n }\n\n /** @internal */\n private _getFocusableItems(): HTMLElement[] {\n if (this._focusableCache) return this._focusableCache;\n const slot = this.shadowRoot?.querySelector('slot');\n const items: HTMLElement[] = [];\n if (slot) {\n const assigned = (slot as HTMLSlotElement).assignedElements({ flatten: true });\n for (const el of assigned) {\n if (!(el instanceof HTMLElement)) continue;\n if (this._isFocusable(el)) {\n items.push(el);\n } else {\n const descendants = el.querySelectorAll<HTMLElement>('*');\n for (const d of Array.from(descendants)) {\n if (this._isFocusable(d)) items.push(d);\n }\n }\n }\n }\n this._focusableCache = items;\n return items;\n }\n\n /** @internal */\n private _initRovingTabindex(): void {\n this._focusableCache = null;\n const items = this._getFocusableItems();\n if (!items.length) return;\n const activeIndex = items.findIndex((el) => el.getAttribute('tabindex') === '0');\n const targetIndex = activeIndex === -1 ? 0 : activeIndex;\n items.forEach((el, i) => el.setAttribute('tabindex', i === targetIndex ? '0' : '-1'));\n }\n\n /** @internal */\n private _moveFocus(direction: 'next' | 'prev'): void {\n const items = this._getFocusableItems();\n if (!items.length) return;\n const focused = document.activeElement as HTMLElement | null;\n const currentIndex = items.indexOf(focused as HTMLElement);\n let nextIndex: number;\n if (direction === 'next') {\n nextIndex = currentIndex < items.length - 1 ? currentIndex + 1 : 0;\n } else {\n nextIndex = currentIndex > 0 ? currentIndex - 1 : items.length - 1;\n }\n items.forEach((el, i) => el.setAttribute('tabindex', i === nextIndex ? '0' : '-1'));\n items[nextIndex]?.focus();\n }\n\n /** @internal */\n private _handleSlotChange = (): void => {\n this._initRovingTabindex();\n };\n\n override firstUpdated(): void {\n this._initRovingTabindex();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('keydown', this._handleKeydown);\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('keydown', this._handleKeydown);\n // Capture any consumer-set aria-label BEFORE the `label` property writes\n // overwrite it. This snapshot wins back the host attribute when `label`\n // is later cleared.\n if (this._consumerAriaLabel === null && this.hasAttribute('aria-label')) {\n this._consumerAriaLabel = this.getAttribute('aria-label');\n }\n // CodeRabbit SHOULD-FIX (PR #1649 follow-up): snapshot the consumer's\n // explicit `role` BEFORE the host-canonical mirror overwrites it. When\n // a consumer sets `role=\"toolbar\"` (or `radiogroup`, etc.), the mirror\n // must defer to that role; otherwise two surfaces disagree (host attr\n // says toolbar, internals says group) and AT picks one inconsistently.\n if (this._consumerRole === null && this.hasAttribute('role')) {\n this._consumerRole = this.getAttribute('role');\n }\n // Host-canonical role: use ElementInternals so the role survives in the\n // a11y tree even if a consumer attribute-strips the host. Mirror to the\n // host attribute as well for older AT/devtools that walk attributes.\n if (this._consumerRole) {\n // Defer to the consumer's role on both surfaces.\n this._internals.role = this._consumerRole;\n } else {\n this._internals.role = 'group';\n this.setAttribute('role', 'group');\n }\n this.style.setProperty('--hx-button-group-size', this.size);\n if (this.label) {\n this.setAttribute('aria-label', this.label);\n } else if (this._consumerAriaLabel !== null) {\n // Consumer-set aria-label is fine — no warning needed.\n } else if (!this._emptyLabelWarnEmitted) {\n this._emptyLabelWarnEmitted = true;\n devWarn(\n 'hx-button-group',\n 'Missing accessible label. Provide a `label` attribute so screen readers can announce the group purpose (WCAG 4.1.2).',\n );\n }\n }\n\n // ─── Render ───\n\n override render() {\n return html`\n <div\n part=\"group\"\n class=${classMap({\n group: true,\n 'group--horizontal': this.orientation === 'horizontal',\n 'group--vertical': this.orientation === 'vertical',\n })}\n >\n <slot @slotchange=${this._handleSlotChange}></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-button-group': HelixButtonGroup;\n }\n}\n"],"names":["helixButtonGroupStyles","css","HelixButtonGroup","HelixElement","e","isVertical","nextKey","prevKey","items","el","i","_a","last","_b","value","changedProperties","tag","slot","assigned","descendants","d","activeIndex","targetIndex","direction","focused","currentIndex","nextIndex","html","classMap","forcedColorsInteractive","__decorateClass","property","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAyBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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A,CAAA;AAxCWA,IAAN4B,EAAA;AAAA,EADNE,EAAc,iBAAiB;AAAA,GACnB9B,CAAA;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { css as g, nothing as p, html as l } from "lit";
|
|
2
2
|
import { property as n, state as c, customElement as f } from "lit/decorators.js";
|
|
3
3
|
import { classMap as x } from "lit/directives/class-map.js";
|
|
4
|
-
import { f as
|
|
4
|
+
import { f as y } from "./forced-colors-CTEDFRGa.js";
|
|
5
5
|
import { H as _ } from "./helix-element-BNEYeiys.js";
|
|
6
|
-
const
|
|
6
|
+
const m = g`
|
|
7
7
|
:host {
|
|
8
8
|
display: block;
|
|
9
9
|
position: relative;
|
|
@@ -76,9 +76,12 @@ const y = g`
|
|
|
76
76
|
cursor: not-allowed;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
.nav-btn
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
.nav-btn .carousel__nav-glyph {
|
|
80
|
+
--hx-icon-size: 1.25em;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.play-pause-btn .carousel__autoplay-glyph {
|
|
84
|
+
--hx-icon-size: 1em;
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
/* ─── Play/Pause ─── */
|
|
@@ -243,75 +246,42 @@ const y = g`
|
|
|
243
246
|
}
|
|
244
247
|
}
|
|
245
248
|
`;
|
|
246
|
-
var b = Object.defineProperty,
|
|
247
|
-
for (var
|
|
248
|
-
(u = t[h]) && (
|
|
249
|
-
return r &&
|
|
249
|
+
var b = Object.defineProperty, P = Object.getOwnPropertyDescriptor, s = (t, e, i, r) => {
|
|
250
|
+
for (var a = r > 1 ? void 0 : r ? P(e, i) : e, h = t.length - 1, u; h >= 0; h--)
|
|
251
|
+
(u = t[h]) && (a = (r ? u(e, i, a) : u(a)) || a);
|
|
252
|
+
return r && a && b(e, i, a), a;
|
|
250
253
|
};
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
stroke="currentColor"
|
|
256
|
-
stroke-width="2"
|
|
257
|
-
stroke-linecap="round"
|
|
258
|
-
stroke-linejoin="round"
|
|
254
|
+
const w = l`<hx-icon
|
|
255
|
+
class="carousel__nav-glyph"
|
|
256
|
+
library="helix"
|
|
257
|
+
name="chevron-left"
|
|
259
258
|
aria-hidden="true"
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
viewBox="0 0 24 24"
|
|
265
|
-
fill="none"
|
|
266
|
-
stroke="currentColor"
|
|
267
|
-
stroke-width="2"
|
|
268
|
-
stroke-linecap="round"
|
|
269
|
-
stroke-linejoin="round"
|
|
259
|
+
></hx-icon>`, I = l`<hx-icon
|
|
260
|
+
class="carousel__nav-glyph"
|
|
261
|
+
library="helix"
|
|
262
|
+
name="chevron-up"
|
|
270
263
|
aria-hidden="true"
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
viewBox="0 0 24 24"
|
|
276
|
-
fill="none"
|
|
277
|
-
stroke="currentColor"
|
|
278
|
-
stroke-width="2"
|
|
279
|
-
stroke-linecap="round"
|
|
280
|
-
stroke-linejoin="round"
|
|
264
|
+
></hx-icon>`, M = l`<hx-icon
|
|
265
|
+
class="carousel__nav-glyph"
|
|
266
|
+
library="helix"
|
|
267
|
+
name="chevron-right"
|
|
281
268
|
aria-hidden="true"
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
viewBox="0 0 24 24"
|
|
287
|
-
fill="none"
|
|
288
|
-
stroke="currentColor"
|
|
289
|
-
stroke-width="2"
|
|
290
|
-
stroke-linecap="round"
|
|
291
|
-
stroke-linejoin="round"
|
|
269
|
+
></hx-icon>`, T = l`<hx-icon
|
|
270
|
+
class="carousel__nav-glyph"
|
|
271
|
+
library="helix"
|
|
272
|
+
name="chevron-down"
|
|
292
273
|
aria-hidden="true"
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
viewBox="0 0 24 24"
|
|
298
|
-
fill="currentColor"
|
|
274
|
+
></hx-icon>`, S = l`<hx-icon
|
|
275
|
+
class="carousel__autoplay-glyph"
|
|
276
|
+
library="fa-free"
|
|
277
|
+
name="play"
|
|
299
278
|
aria-hidden="true"
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
</svg>`, T = l`<svg
|
|
305
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
306
|
-
viewBox="0 0 24 24"
|
|
307
|
-
fill="currentColor"
|
|
279
|
+
></hx-icon>`, $ = l`<hx-icon
|
|
280
|
+
class="carousel__autoplay-glyph"
|
|
281
|
+
library="fa-free"
|
|
282
|
+
name="pause"
|
|
308
283
|
aria-hidden="true"
|
|
309
|
-
|
|
310
|
-
height="1em"
|
|
311
|
-
>
|
|
312
|
-
<rect x="6" y="4" width="4" height="16"></rect>
|
|
313
|
-
<rect x="14" y="4" width="4" height="16"></rect>
|
|
314
|
-
</svg>`;
|
|
284
|
+
></hx-icon>`;
|
|
315
285
|
let o = class extends _ {
|
|
316
286
|
constructor() {
|
|
317
287
|
super(...arguments), this.label = "Carousel", this.loop = !1, this.autoplay = !1, this.autoplayInterval = 3e3, this.slidesPerPage = 1, this.slidesPerMove = 1, this.orientation = "horizontal", this.mouseDragging = !1, this.labelPrevSlide = "Previous slide", this.labelNextSlide = "Next slide", this.labelPauseAutoplay = "Pause autoplay", this.labelPlayAutoplay = "Play autoplay", this.labelSlideOf = (t, e) => `Slide ${t} of ${e}`, this._currentIndex = 0, this._slides = [], this._isPlaying = !1, this._liveText = "", this._livePolite = !0, this._autoplayTimer = null, this._reducedMotion = !1, this._mql = null, this._isHovered = !1, this._isFocused = !1, this._dragStartCoord = 0, this._isDragging = !1, this._dragMoved = !1, this._touchStartCoord = 0, this._touchMoved = !1, this._autoplayTick = () => {
|
|
@@ -348,8 +318,8 @@ let o = class extends _ {
|
|
|
348
318
|
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector("slot:not([name])");
|
|
349
319
|
if (!t) return;
|
|
350
320
|
const e = t.assignedElements({ flatten: !0 }).filter((r) => r.tagName.toLowerCase() === "hx-carousel-item");
|
|
351
|
-
this._slides = e, e.forEach((r,
|
|
352
|
-
r.slideIndex =
|
|
321
|
+
this._slides = e, e.forEach((r, a) => {
|
|
322
|
+
r.slideIndex = a, r.totalSlides = e.length;
|
|
353
323
|
const h = `${100 / this.slidesPerPage}%`;
|
|
354
324
|
r.style.setProperty("--_hx-carousel-slide-width", h);
|
|
355
325
|
}), this._currentIndex >= e.length && (this._currentIndex = Math.max(0, e.length - 1));
|
|
@@ -445,8 +415,8 @@ let o = class extends _ {
|
|
|
445
415
|
if (!this._isDragging) return;
|
|
446
416
|
const e = t.changedTouches[0];
|
|
447
417
|
if (!e) return;
|
|
448
|
-
const r = (this.orientation === "horizontal" ? e.clientX : e.clientY) - this._touchStartCoord,
|
|
449
|
-
this._touchMoved && (r >
|
|
418
|
+
const r = (this.orientation === "horizontal" ? e.clientX : e.clientY) - this._touchStartCoord, a = 50;
|
|
419
|
+
this._touchMoved && (r > a ? this.previous() : r < -a && this.next()), this._isDragging = !1, this._touchMoved = !1;
|
|
450
420
|
}
|
|
451
421
|
/** @internal */
|
|
452
422
|
_goToManual(t) {
|
|
@@ -549,19 +519,19 @@ let o = class extends _ {
|
|
|
549
519
|
}
|
|
550
520
|
/** @internal */
|
|
551
521
|
_renderPrevIcon() {
|
|
552
|
-
return this.orientation === "horizontal" ?
|
|
522
|
+
return this.orientation === "horizontal" ? w : I;
|
|
553
523
|
}
|
|
554
524
|
/** @internal */
|
|
555
525
|
_renderNextIcon() {
|
|
556
|
-
return this.orientation === "horizontal" ?
|
|
526
|
+
return this.orientation === "horizontal" ? M : T;
|
|
557
527
|
}
|
|
558
528
|
/** @internal */
|
|
559
529
|
_renderPlayIcon() {
|
|
560
|
-
return
|
|
530
|
+
return S;
|
|
561
531
|
}
|
|
562
532
|
/** @internal */
|
|
563
533
|
_renderPauseIcon() {
|
|
564
|
-
return
|
|
534
|
+
return $;
|
|
565
535
|
}
|
|
566
536
|
// ─── Render ───
|
|
567
537
|
render() {
|
|
@@ -606,65 +576,65 @@ let o = class extends _ {
|
|
|
606
576
|
`;
|
|
607
577
|
}
|
|
608
578
|
};
|
|
609
|
-
o.styles = [
|
|
610
|
-
|
|
579
|
+
o.styles = [m, y];
|
|
580
|
+
s([
|
|
611
581
|
n({ type: String, reflect: !0 })
|
|
612
582
|
], o.prototype, "label", 2);
|
|
613
|
-
|
|
583
|
+
s([
|
|
614
584
|
n({ type: Boolean, reflect: !0 })
|
|
615
585
|
], o.prototype, "loop", 2);
|
|
616
|
-
|
|
586
|
+
s([
|
|
617
587
|
n({ type: Boolean, reflect: !0 })
|
|
618
588
|
], o.prototype, "autoplay", 2);
|
|
619
|
-
|
|
589
|
+
s([
|
|
620
590
|
n({ type: Number, attribute: "autoplay-interval" })
|
|
621
591
|
], o.prototype, "autoplayInterval", 2);
|
|
622
|
-
|
|
592
|
+
s([
|
|
623
593
|
n({ type: Number, attribute: "slides-per-page" })
|
|
624
594
|
], o.prototype, "slidesPerPage", 2);
|
|
625
|
-
|
|
595
|
+
s([
|
|
626
596
|
n({ type: Number, attribute: "slides-per-move" })
|
|
627
597
|
], o.prototype, "slidesPerMove", 2);
|
|
628
|
-
|
|
598
|
+
s([
|
|
629
599
|
n({ type: String, reflect: !0 })
|
|
630
600
|
], o.prototype, "orientation", 2);
|
|
631
|
-
|
|
601
|
+
s([
|
|
632
602
|
n({ type: Boolean, attribute: "mouse-dragging", reflect: !0 })
|
|
633
603
|
], o.prototype, "mouseDragging", 2);
|
|
634
|
-
|
|
604
|
+
s([
|
|
635
605
|
n({ type: String, attribute: "label-prev-slide" })
|
|
636
606
|
], o.prototype, "labelPrevSlide", 2);
|
|
637
|
-
|
|
607
|
+
s([
|
|
638
608
|
n({ type: String, attribute: "label-next-slide" })
|
|
639
609
|
], o.prototype, "labelNextSlide", 2);
|
|
640
|
-
|
|
610
|
+
s([
|
|
641
611
|
n({ type: String, attribute: "label-pause-autoplay" })
|
|
642
612
|
], o.prototype, "labelPauseAutoplay", 2);
|
|
643
|
-
|
|
613
|
+
s([
|
|
644
614
|
n({ type: String, attribute: "label-play-autoplay" })
|
|
645
615
|
], o.prototype, "labelPlayAutoplay", 2);
|
|
646
|
-
|
|
616
|
+
s([
|
|
647
617
|
n({ attribute: !1 })
|
|
648
618
|
], o.prototype, "labelSlideOf", 2);
|
|
649
|
-
|
|
619
|
+
s([
|
|
650
620
|
c()
|
|
651
621
|
], o.prototype, "_currentIndex", 2);
|
|
652
|
-
|
|
622
|
+
s([
|
|
653
623
|
c()
|
|
654
624
|
], o.prototype, "_slides", 2);
|
|
655
|
-
|
|
625
|
+
s([
|
|
656
626
|
c()
|
|
657
627
|
], o.prototype, "_isPlaying", 2);
|
|
658
|
-
|
|
628
|
+
s([
|
|
659
629
|
c()
|
|
660
630
|
], o.prototype, "_liveText", 2);
|
|
661
|
-
|
|
631
|
+
s([
|
|
662
632
|
c()
|
|
663
633
|
], o.prototype, "_livePolite", 2);
|
|
664
|
-
o =
|
|
634
|
+
o = s([
|
|
665
635
|
f("hx-carousel")
|
|
666
636
|
], o);
|
|
667
|
-
const
|
|
637
|
+
const C = g`
|
|
668
638
|
:host {
|
|
669
639
|
display: block;
|
|
670
640
|
flex-shrink: 0;
|
|
@@ -691,10 +661,10 @@ const S = g`
|
|
|
691
661
|
}
|
|
692
662
|
}
|
|
693
663
|
`;
|
|
694
|
-
var
|
|
695
|
-
for (var
|
|
696
|
-
(u = t[h]) && (
|
|
697
|
-
return r &&
|
|
664
|
+
var D = Object.defineProperty, k = Object.getOwnPropertyDescriptor, v = (t, e, i, r) => {
|
|
665
|
+
for (var a = r > 1 ? void 0 : r ? k(e, i) : e, h = t.length - 1, u; h >= 0; h--)
|
|
666
|
+
(u = t[h]) && (a = (r ? u(e, i, a) : u(a)) || a);
|
|
667
|
+
return r && a && D(e, i, a), a;
|
|
698
668
|
};
|
|
699
669
|
let d = class extends _ {
|
|
700
670
|
constructor() {
|
|
@@ -709,7 +679,7 @@ let d = class extends _ {
|
|
|
709
679
|
`;
|
|
710
680
|
}
|
|
711
681
|
};
|
|
712
|
-
d.styles = [
|
|
682
|
+
d.styles = [C];
|
|
713
683
|
v([
|
|
714
684
|
n({ type: Number, attribute: "slide-index" })
|
|
715
685
|
], d.prototype, "slideIndex", 2);
|
|
@@ -723,4 +693,4 @@ export {
|
|
|
723
693
|
o as H,
|
|
724
694
|
d as a
|
|
725
695
|
};
|
|
726
|
-
//# sourceMappingURL=hx-carousel-item-
|
|
696
|
+
//# sourceMappingURL=hx-carousel-item-BVIKgQ4i.js.map
|