@helixui/library 0.3.4 → 1.0.0
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 +13562 -12579
- package/dist/components/hx-accordion/hx-accordion-item.d.ts +2 -0
- package/dist/components/hx-accordion/hx-accordion-item.d.ts.map +1 -1
- package/dist/components/hx-accordion/hx-accordion.d.ts +8 -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.map +1 -1
- package/dist/components/hx-action-bar/index.js +1 -1
- package/dist/components/hx-alert/hx-alert.d.ts +2 -5
- package/dist/components/hx-alert/hx-alert.d.ts.map +1 -1
- package/dist/components/hx-alert/index.js +1 -1
- package/dist/components/hx-avatar/hx-avatar.d.ts.map +1 -1
- package/dist/components/hx-avatar/index.js +1 -1
- package/dist/components/hx-banner/hx-banner.d.ts +99 -0
- package/dist/components/hx-banner/hx-banner.d.ts.map +1 -0
- package/dist/components/hx-banner/hx-banner.styles.d.ts +2 -0
- package/dist/components/hx-banner/hx-banner.styles.d.ts.map +1 -0
- package/dist/components/hx-banner/index.d.ts +3 -0
- package/dist/components/hx-banner/index.d.ts.map +1 -0
- package/dist/components/hx-banner/index.js +5 -0
- package/dist/components/hx-banner/index.js.map +1 -0
- package/dist/components/hx-breadcrumb/hx-breadcrumb.d.ts +5 -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.d.ts +17 -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-button-group/hx-button-group.d.ts +8 -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-card/hx-card.d.ts +16 -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.d.ts +122 -0
- package/dist/components/hx-carousel/hx-carousel.d.ts.map +1 -1
- package/dist/components/hx-carousel/index.js +1 -1
- package/dist/components/hx-checkbox/hx-checkbox.d.ts +3 -1
- package/dist/components/hx-checkbox/hx-checkbox.d.ts.map +1 -1
- package/dist/components/hx-checkbox-group/hx-checkbox-group.d.ts +5 -1
- 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 +21 -6
- package/dist/components/hx-code-snippet/hx-code-snippet.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 +13 -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 +24 -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-container/hx-container.d.ts +3 -1
- package/dist/components/hx-container/hx-container.d.ts.map +1 -1
- package/dist/components/hx-copy-button/hx-copy-button.d.ts +6 -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 +79 -0
- package/dist/components/hx-counter/hx-counter.d.ts.map +1 -0
- package/dist/components/hx-counter/hx-counter.styles.d.ts +2 -0
- package/dist/components/hx-counter/hx-counter.styles.d.ts.map +1 -0
- package/dist/components/hx-counter/index.d.ts +3 -0
- package/dist/components/hx-counter/index.d.ts.map +1 -0
- package/dist/components/hx-counter/index.js +5 -0
- package/dist/components/hx-counter/index.js.map +1 -0
- package/dist/components/hx-data-table/hx-data-table.d.ts +6 -0
- package/dist/components/hx-data-table/hx-data-table.d.ts.map +1 -1
- package/dist/components/hx-data-table/hx-data-table.styles.d.ts.map +1 -1
- package/dist/components/hx-data-table/index.js +1 -1
- package/dist/components/hx-date-picker/hx-date-picker.d.ts +124 -0
- package/dist/components/hx-date-picker/hx-date-picker.d.ts.map +1 -1
- package/dist/components/hx-date-picker/index.js +1 -1
- package/dist/components/hx-dialog/hx-dialog.d.ts.map +1 -1
- package/dist/components/hx-dialog/index.js +1 -1
- package/dist/components/hx-divider/hx-divider.d.ts +3 -0
- package/dist/components/hx-divider/hx-divider.d.ts.map +1 -1
- package/dist/components/hx-drawer/hx-drawer.d.ts +54 -1
- package/dist/components/hx-drawer/hx-drawer.d.ts.map +1 -1
- package/dist/components/hx-drawer/index.js +1 -1
- package/dist/components/hx-dropdown/hx-dropdown.d.ts +5 -0
- package/dist/components/hx-dropdown/hx-dropdown.d.ts.map +1 -1
- package/dist/components/hx-field/hx-field.d.ts +31 -1
- package/dist/components/hx-field/hx-field.d.ts.map +1 -1
- package/dist/components/hx-field/index.js +1 -1
- package/dist/components/hx-file-upload/hx-file-upload.d.ts +12 -0
- package/dist/components/hx-file-upload/hx-file-upload.d.ts.map +1 -1
- package/dist/components/hx-file-upload/index.js +1 -1
- package/dist/components/hx-form/hx-form.d.ts +24 -0
- 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-help-text/hx-help-text.d.ts +3 -0
- package/dist/components/hx-help-text/hx-help-text.d.ts.map +1 -1
- package/dist/components/hx-icon-button/hx-icon-button.d.ts.map +1 -1
- package/dist/components/hx-icon-button/index.js +1 -1
- package/dist/components/hx-list/hx-list.d.ts.map +1 -1
- package/dist/components/hx-list/index.js +1 -1
- package/dist/components/hx-menu/hx-menu.d.ts +12 -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-meter/hx-meter.d.ts +2 -0
- package/dist/components/hx-meter/hx-meter.d.ts.map +1 -1
- package/dist/components/hx-meter/index.js +1 -1
- package/dist/components/hx-nav/hx-nav.d.ts +15 -1
- package/dist/components/hx-nav/hx-nav.d.ts.map +1 -1
- package/dist/components/hx-nav/index.js +1 -1
- package/dist/components/hx-number-input/hx-number-input.d.ts +2 -0
- 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 +14 -0
- package/dist/components/hx-overflow-menu/hx-overflow-menu.d.ts.map +1 -1
- package/dist/components/hx-overflow-menu/index.js +1 -1
- package/dist/components/hx-pagination/hx-pagination.d.ts +5 -0
- package/dist/components/hx-pagination/hx-pagination.d.ts.map +1 -1
- package/dist/components/hx-pagination/index.js +1 -1
- package/dist/components/hx-popover/hx-popover.d.ts +10 -38
- package/dist/components/hx-popover/hx-popover.d.ts.map +1 -1
- package/dist/components/hx-popover/index.js +1 -1
- package/dist/components/hx-progress-bar/hx-progress-bar.d.ts +10 -0
- package/dist/components/hx-progress-bar/hx-progress-bar.d.ts.map +1 -1
- package/dist/components/hx-progress-bar/index.js +1 -1
- package/dist/components/hx-progress-ring/hx-progress-ring.d.ts.map +1 -1
- package/dist/components/hx-progress-ring/index.js +1 -1
- package/dist/components/hx-radio-group/hx-radio-group.d.ts +75 -3
- package/dist/components/hx-radio-group/hx-radio-group.d.ts.map +1 -1
- package/dist/components/hx-radio-group/hx-radio.d.ts +3 -1
- 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 +18 -3
- 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 +9 -0
- package/dist/components/hx-select/hx-select.d.ts.map +1 -1
- package/dist/components/hx-select/index.js +1 -1
- package/dist/components/hx-side-nav/hx-side-nav.d.ts.map +1 -1
- package/dist/components/hx-side-nav/index.js +1 -1
- package/dist/components/hx-slider/hx-slider.d.ts +2 -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 +16 -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 +11 -0
- package/dist/components/hx-split-panel/hx-split-panel.d.ts.map +1 -1
- package/dist/components/hx-stat/hx-stat.d.ts +71 -0
- package/dist/components/hx-stat/hx-stat.d.ts.map +1 -0
- package/dist/components/hx-stat/hx-stat.styles.d.ts +2 -0
- package/dist/components/hx-stat/hx-stat.styles.d.ts.map +1 -0
- package/dist/components/hx-stat/index.d.ts +3 -0
- package/dist/components/hx-stat/index.d.ts.map +1 -0
- package/dist/components/hx-stat/index.js +5 -0
- package/dist/components/hx-stat/index.js.map +1 -0
- package/dist/components/hx-steps/hx-steps.d.ts +5 -0
- package/dist/components/hx-steps/hx-steps.d.ts.map +1 -1
- package/dist/components/hx-steps/index.js +1 -1
- package/dist/components/hx-structured-list/hx-structured-list.d.ts +2 -0
- package/dist/components/hx-structured-list/hx-structured-list.d.ts.map +1 -1
- package/dist/components/hx-structured-list/index.js +1 -1
- package/dist/components/hx-switch/hx-switch.d.ts +2 -0
- 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 +60 -0
- package/dist/components/hx-table/hx-table.d.ts.map +1 -0
- package/dist/components/hx-table/hx-table.styles.d.ts +9 -0
- package/dist/components/hx-table/hx-table.styles.d.ts.map +1 -0
- package/dist/components/hx-table/hx-tbody.d.ts +23 -0
- package/dist/components/hx-table/hx-tbody.d.ts.map +1 -0
- package/dist/components/hx-table/hx-td.d.ts +46 -0
- package/dist/components/hx-table/hx-td.d.ts.map +1 -0
- package/dist/components/hx-table/hx-tfoot.d.ts +23 -0
- package/dist/components/hx-table/hx-tfoot.d.ts.map +1 -0
- package/dist/components/hx-table/hx-th.d.ts +61 -0
- package/dist/components/hx-table/hx-th.d.ts.map +1 -0
- package/dist/components/hx-table/hx-thead.d.ts +23 -0
- package/dist/components/hx-table/hx-thead.d.ts.map +1 -0
- package/dist/components/hx-table/hx-tr.d.ts +33 -0
- package/dist/components/hx-table/hx-tr.d.ts.map +1 -0
- package/dist/components/hx-table/index.d.ts +9 -0
- package/dist/components/hx-table/index.d.ts.map +1 -0
- package/dist/components/hx-table/index.js +11 -0
- package/dist/components/hx-table/index.js.map +1 -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-text-input/hx-text-input.d.ts +1 -0
- 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 +14 -0
- 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-time-picker/hx-time-picker.d.ts +22 -1
- package/dist/components/hx-time-picker/hx-time-picker.d.ts.map +1 -1
- package/dist/components/hx-time-picker/index.js +1 -1
- package/dist/components/hx-toast/hx-toast-stack.d.ts +36 -0
- package/dist/components/hx-toast/hx-toast-stack.d.ts.map +1 -0
- package/dist/components/hx-toast/hx-toast.d.ts +0 -52
- package/dist/components/hx-toast/hx-toast.d.ts.map +1 -1
- package/dist/components/hx-toast/index.d.ts +6 -2
- package/dist/components/hx-toast/index.d.ts.map +1 -1
- package/dist/components/hx-toast/index.js +1 -1
- package/dist/components/hx-toast/toast-factory.d.ts +25 -0
- package/dist/components/hx-toast/toast-factory.d.ts.map +1 -0
- package/dist/components/hx-toggle-button/hx-toggle-button.d.ts +1 -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 +1 -45
- package/dist/components/hx-tooltip/hx-tooltip.d.ts.map +1 -1
- package/dist/components/hx-tooltip/index.js +1 -1
- package/dist/components/hx-top-nav/hx-top-nav.d.ts.map +1 -1
- package/dist/components/hx-top-nav/index.js +1 -1
- package/dist/components/hx-tree-view/hx-tree-item.d.ts +50 -0
- package/dist/components/hx-tree-view/hx-tree-item.d.ts.map +1 -1
- package/dist/components/hx-tree-view/hx-tree-view.d.ts +15 -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.d.ts +20 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +168 -154
- package/dist/index.js.map +1 -1
- package/dist/shared/body-scroll-lock-VBa5TFP-.js +12 -0
- package/dist/shared/body-scroll-lock-VBa5TFP-.js.map +1 -0
- package/dist/shared/dev-warn-YlwPHjtX.js +6 -0
- package/dist/shared/dev-warn-YlwPHjtX.js.map +1 -0
- package/dist/shared/{hx-accordion-D95XSAft.js → hx-accordion-Cyswa6J3.js} +46 -43
- package/dist/shared/hx-accordion-Cyswa6J3.js.map +1 -0
- package/dist/shared/{hx-action-bar-B4i9tBCP.js → hx-action-bar-we_WJety.js} +41 -40
- package/dist/shared/hx-action-bar-we_WJety.js.map +1 -0
- package/dist/shared/{hx-alert-BQpT4gL3.js → hx-alert-Cg-zxRiU.js} +2 -2
- package/dist/shared/hx-alert-Cg-zxRiU.js.map +1 -0
- package/dist/shared/{hx-avatar-yHjmNdtf.js → hx-avatar-Cep6Urm3.js} +62 -65
- package/dist/shared/hx-avatar-Cep6Urm3.js.map +1 -0
- package/dist/shared/hx-banner-lxAIJ2kR.js +349 -0
- package/dist/shared/hx-banner-lxAIJ2kR.js.map +1 -0
- package/dist/shared/{hx-breadcrumb-item-DtSxRZ_W.js → hx-breadcrumb-item-C0rz0fzV.js} +46 -44
- package/dist/shared/hx-breadcrumb-item-C0rz0fzV.js.map +1 -0
- package/dist/shared/{hx-button-CtiJsmOg.js → hx-button-Cbhqpm5i.js} +111 -28
- package/dist/shared/hx-button-Cbhqpm5i.js.map +1 -0
- package/dist/shared/{hx-button-group-BMV5qFs4.js → hx-button-group-CWjWv-wS.js} +10 -10
- package/dist/shared/hx-button-group-CWjWv-wS.js.map +1 -0
- package/dist/shared/{hx-card-DAkEfpJd.js → hx-card-Bg4W4uXC.js} +16 -16
- package/dist/shared/hx-card-Bg4W4uXC.js.map +1 -0
- package/dist/shared/{hx-carousel-item-C2yBnM0r.js → hx-carousel-item-BKpmFbUT.js} +101 -63
- package/dist/shared/hx-carousel-item-BKpmFbUT.js.map +1 -0
- package/dist/shared/hx-checkbox-BMayOpAM.js.map +1 -1
- package/dist/shared/{hx-checkbox-group-DTS9iT4b.js → hx-checkbox-group-ydUdV9Sx.js} +7 -7
- package/dist/shared/hx-checkbox-group-ydUdV9Sx.js.map +1 -0
- package/dist/shared/{hx-code-snippet-DdEqy-1B.js → hx-code-snippet-B4hV7rWG.js} +65 -53
- package/dist/shared/hx-code-snippet-B4hV7rWG.js.map +1 -0
- package/dist/shared/{hx-color-picker-K2x_dyeG.js → hx-color-picker-BvfJ_h16.js} +100 -90
- package/dist/shared/hx-color-picker-BvfJ_h16.js.map +1 -0
- package/dist/shared/{hx-combobox-DjMigccw.js → hx-combobox-BBi3izKJ.js} +80 -44
- package/dist/shared/hx-combobox-BBi3izKJ.js.map +1 -0
- package/dist/shared/hx-container-DLUKnTi9.js.map +1 -1
- package/dist/shared/{hx-copy-button-BXL1xkxb.js → hx-copy-button-CLBA31to.js} +45 -50
- package/dist/shared/hx-copy-button-CLBA31to.js.map +1 -0
- package/dist/shared/hx-counter-D-1NXzGs.js +138 -0
- package/dist/shared/hx-counter-D-1NXzGs.js.map +1 -0
- package/dist/shared/{hx-data-table-D3NZvc3P.js → hx-data-table-DNiDVWR2.js} +100 -95
- package/dist/shared/hx-data-table-DNiDVWR2.js.map +1 -0
- package/dist/shared/{hx-date-picker-CIHwx9b3.js → hx-date-picker-D7yCK0nk.js} +17 -12
- package/dist/shared/hx-date-picker-D7yCK0nk.js.map +1 -0
- package/dist/shared/{hx-dialog-e4CSD8xX.js → hx-dialog-Z7Ou_AZ9.js} +37 -36
- package/dist/shared/hx-dialog-Z7Ou_AZ9.js.map +1 -0
- package/dist/shared/hx-divider-XgWIz4Mr.js.map +1 -1
- package/dist/shared/{hx-drawer-bTF0nbrg.js → hx-drawer-Dk-_xzy0.js} +59 -58
- package/dist/shared/hx-drawer-Dk-_xzy0.js.map +1 -0
- package/dist/shared/hx-dropdown-DnjLnkTj.js.map +1 -1
- package/dist/shared/{hx-field-Dz-7M_SC.js → hx-field-CDP8EXuj.js} +22 -19
- package/dist/shared/hx-field-CDP8EXuj.js.map +1 -0
- package/dist/shared/{hx-file-upload-DnYiIhyN.js → hx-file-upload-CUORgnKc.js} +17 -14
- package/dist/shared/hx-file-upload-CUORgnKc.js.map +1 -0
- package/dist/shared/{hx-form-BJeLK34m.js → hx-form-BFv_N1dm.js} +9 -1
- package/dist/shared/{hx-form-BJeLK34m.js.map → hx-form-BFv_N1dm.js.map} +1 -1
- package/dist/shared/hx-help-text-DaOPN1iB.js.map +1 -1
- package/dist/shared/{hx-icon-button-C_fsUJW4.js → hx-icon-button-C83bCR0K.js} +2 -4
- package/dist/shared/hx-icon-button-C83bCR0K.js.map +1 -0
- package/dist/shared/{hx-list-CF-AAnp-.js → hx-list-CdRNgeoP.js} +7 -9
- package/dist/shared/{hx-list-CF-AAnp-.js.map → hx-list-CdRNgeoP.js.map} +1 -1
- package/dist/shared/{hx-menu-divider-Buc5XA9E.js → hx-menu-divider-11Dp2VfM.js} +50 -48
- package/dist/shared/hx-menu-divider-11Dp2VfM.js.map +1 -0
- package/dist/shared/{hx-meter-qcXl0zCL.js → hx-meter-UinDQjl6.js} +43 -37
- package/dist/shared/hx-meter-UinDQjl6.js.map +1 -0
- package/dist/shared/{hx-nav-CWwByFdq.js → hx-nav-DSpwWYUX.js} +81 -81
- package/dist/shared/hx-nav-DSpwWYUX.js.map +1 -0
- package/dist/shared/{hx-nav-item-DItaMWl0.js → hx-nav-item-D54-5eUM.js} +12 -12
- package/dist/shared/hx-nav-item-D54-5eUM.js.map +1 -0
- package/dist/shared/{hx-number-input-CS6_w1lT.js → hx-number-input-BP6TIA92.js} +5 -1
- package/dist/shared/hx-number-input-BP6TIA92.js.map +1 -0
- package/dist/shared/{hx-overflow-menu-CAS1Mlus.js → hx-overflow-menu-C7k5wlZy.js} +39 -34
- package/dist/shared/hx-overflow-menu-C7k5wlZy.js.map +1 -0
- package/dist/shared/{hx-pagination-DNFgXQm3.js → hx-pagination-BQ0cLTuB.js} +65 -62
- package/dist/shared/hx-pagination-BQ0cLTuB.js.map +1 -0
- package/dist/shared/{hx-popover-BjAyLbzp.js → hx-popover-BQsgrJCW.js} +7 -7
- package/dist/shared/hx-popover-BQsgrJCW.js.map +1 -0
- package/dist/shared/{hx-progress-bar-b3_m1hna.js → hx-progress-bar-C_mdPVF-.js} +61 -52
- package/dist/shared/hx-progress-bar-C_mdPVF-.js.map +1 -0
- package/dist/shared/{hx-progress-ring-wOSv2y_I.js → hx-progress-ring-BHJBaXNk.js} +2 -4
- package/dist/shared/hx-progress-ring-BHJBaXNk.js.map +1 -0
- package/dist/shared/{hx-radio-CGtFKls2.js → hx-radio-Bqyi8re3.js} +44 -12
- package/dist/shared/hx-radio-Bqyi8re3.js.map +1 -0
- package/dist/shared/{hx-rating-C4kTOyHF.js → hx-rating-Y_t7Z4qb.js} +104 -67
- package/dist/shared/hx-rating-Y_t7Z4qb.js.map +1 -0
- package/dist/shared/{hx-select-D9bYJcDv.js → hx-select-BBae2LqN.js} +16 -10
- package/dist/shared/hx-select-BBae2LqN.js.map +1 -0
- package/dist/shared/{hx-slider-Duzmuid9.js → hx-slider-CpnxH2UP.js} +9 -5
- package/dist/shared/{hx-slider-Duzmuid9.js.map → hx-slider-CpnxH2UP.js.map} +1 -1
- package/dist/shared/{hx-split-button-DhncgAtZ.js → hx-split-button-BvwoG8h2.js} +14 -13
- package/dist/shared/hx-split-button-BvwoG8h2.js.map +1 -0
- package/dist/shared/hx-split-panel-Cxkeauwe.js.map +1 -1
- package/dist/shared/hx-stat-C2wfph8W.js +212 -0
- package/dist/shared/hx-stat-C2wfph8W.js.map +1 -0
- package/dist/shared/{hx-step-nMT0fHEn.js → hx-step-DYoIumpR.js} +29 -29
- package/dist/shared/hx-step-DYoIumpR.js.map +1 -0
- package/dist/shared/{hx-structured-list-CMja1VXz.js → hx-structured-list-CMWllxGg.js} +23 -17
- package/dist/shared/{hx-structured-list-CMja1VXz.js.map → hx-structured-list-CMWllxGg.js.map} +1 -1
- package/dist/shared/{hx-switch-BPvIcDpM.js → hx-switch-DkKchcuP.js} +8 -3
- package/dist/shared/{hx-switch-BPvIcDpM.js.map → hx-switch-DkKchcuP.js.map} +1 -1
- package/dist/shared/{hx-tab-panel-C7h5lRpw.js → hx-tab-panel-CHB0u1zF.js} +91 -85
- package/dist/shared/hx-tab-panel-CHB0u1zF.js.map +1 -0
- package/dist/shared/hx-td-CVwCGBYf.js +604 -0
- package/dist/shared/hx-td-CVwCGBYf.js.map +1 -0
- package/dist/shared/{hx-text-input-BUMgOQHX.js → hx-text-input-BrCjo4fJ.js} +5 -1
- package/dist/shared/hx-text-input-BrCjo4fJ.js.map +1 -0
- package/dist/shared/{hx-textarea-B_nmxzhC.js → hx-textarea-BsQdB1Rk.js} +51 -18
- package/dist/shared/hx-textarea-BsQdB1Rk.js.map +1 -0
- package/dist/shared/{hx-time-picker-a-BCkecJ.js → hx-time-picker-DRRAFuVd.js} +62 -54
- package/dist/shared/hx-time-picker-DRRAFuVd.js.map +1 -0
- package/dist/shared/{hx-toggle-button--xCXWRJW.js → hx-toggle-button-D4F1soEM.js} +34 -22
- package/dist/shared/{hx-toggle-button--xCXWRJW.js.map → hx-toggle-button-D4F1soEM.js.map} +1 -1
- package/dist/shared/{hx-tooltip-DN6lMlP5.js → hx-tooltip-Bk1iQRHs.js} +23 -23
- package/dist/shared/hx-tooltip-Bk1iQRHs.js.map +1 -0
- package/dist/shared/{hx-top-nav-8lDKNZUj.js → hx-top-nav-DzW7XLv-.js} +42 -29
- package/dist/shared/{hx-top-nav-8lDKNZUj.js.map → hx-top-nav-DzW7XLv-.js.map} +1 -1
- package/dist/shared/{hx-tree-item-Cesh_du5.js → hx-tree-item-DdH6RbMs.js} +170 -111
- package/dist/shared/hx-tree-item-DdH6RbMs.js.map +1 -0
- package/dist/shared/{hx-toast-ikwh9Y03.js → toast-factory-B8jicczW.js} +69 -66
- package/dist/shared/toast-factory-B8jicczW.js.map +1 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/aria-analyzer.d.ts +12 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/aria-analyzer.d.ts.map +1 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/focus-analyzer.d.ts +13 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/focus-analyzer.d.ts.map +1 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/form-analyzer.d.ts +13 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/form-analyzer.d.ts.map +1 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/keyboard-analyzer.d.ts +12 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/keyboard-analyzer.d.ts.map +1 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/label-analyzer.d.ts +13 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/label-analyzer.d.ts.map +1 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/motion-analyzer.d.ts +12 -0
- package/dist/tools/cem-a11y-analyzer/analyzers/motion-analyzer.d.ts.map +1 -0
- package/dist/tools/cem-a11y-analyzer/index.d.ts +14 -0
- package/dist/tools/cem-a11y-analyzer/index.d.ts.map +1 -0
- package/dist/tools/cem-a11y-analyzer/reporter.d.ts +6 -0
- package/dist/tools/cem-a11y-analyzer/reporter.d.ts.map +1 -0
- package/dist/tools/cem-a11y-analyzer/scorer.d.ts +22 -0
- package/dist/tools/cem-a11y-analyzer/scorer.d.ts.map +1 -0
- package/dist/tools/cem-a11y-analyzer/types.d.ts +171 -0
- package/dist/tools/cem-a11y-analyzer/types.d.ts.map +1 -0
- package/dist/utils/body-scroll-lock.d.ts +34 -0
- package/dist/utils/body-scroll-lock.d.ts.map +1 -0
- package/dist/utils/dev-warn.d.ts +19 -0
- package/dist/utils/dev-warn.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/shared/hx-accordion-D95XSAft.js.map +0 -1
- package/dist/shared/hx-action-bar-B4i9tBCP.js.map +0 -1
- package/dist/shared/hx-alert-BQpT4gL3.js.map +0 -1
- package/dist/shared/hx-avatar-yHjmNdtf.js.map +0 -1
- package/dist/shared/hx-breadcrumb-item-DtSxRZ_W.js.map +0 -1
- package/dist/shared/hx-button-CtiJsmOg.js.map +0 -1
- package/dist/shared/hx-button-group-BMV5qFs4.js.map +0 -1
- package/dist/shared/hx-card-DAkEfpJd.js.map +0 -1
- package/dist/shared/hx-carousel-item-C2yBnM0r.js.map +0 -1
- package/dist/shared/hx-checkbox-group-DTS9iT4b.js.map +0 -1
- package/dist/shared/hx-code-snippet-DdEqy-1B.js.map +0 -1
- package/dist/shared/hx-color-picker-K2x_dyeG.js.map +0 -1
- package/dist/shared/hx-combobox-DjMigccw.js.map +0 -1
- package/dist/shared/hx-copy-button-BXL1xkxb.js.map +0 -1
- package/dist/shared/hx-data-table-D3NZvc3P.js.map +0 -1
- package/dist/shared/hx-date-picker-CIHwx9b3.js.map +0 -1
- package/dist/shared/hx-dialog-e4CSD8xX.js.map +0 -1
- package/dist/shared/hx-drawer-bTF0nbrg.js.map +0 -1
- package/dist/shared/hx-field-Dz-7M_SC.js.map +0 -1
- package/dist/shared/hx-file-upload-DnYiIhyN.js.map +0 -1
- package/dist/shared/hx-icon-button-C_fsUJW4.js.map +0 -1
- package/dist/shared/hx-menu-divider-Buc5XA9E.js.map +0 -1
- package/dist/shared/hx-meter-qcXl0zCL.js.map +0 -1
- package/dist/shared/hx-nav-CWwByFdq.js.map +0 -1
- package/dist/shared/hx-nav-item-DItaMWl0.js.map +0 -1
- package/dist/shared/hx-number-input-CS6_w1lT.js.map +0 -1
- package/dist/shared/hx-overflow-menu-CAS1Mlus.js.map +0 -1
- package/dist/shared/hx-pagination-DNFgXQm3.js.map +0 -1
- package/dist/shared/hx-popover-BjAyLbzp.js.map +0 -1
- package/dist/shared/hx-progress-bar-b3_m1hna.js.map +0 -1
- package/dist/shared/hx-progress-ring-wOSv2y_I.js.map +0 -1
- package/dist/shared/hx-radio-CGtFKls2.js.map +0 -1
- package/dist/shared/hx-rating-C4kTOyHF.js.map +0 -1
- package/dist/shared/hx-select-D9bYJcDv.js.map +0 -1
- package/dist/shared/hx-split-button-DhncgAtZ.js.map +0 -1
- package/dist/shared/hx-step-nMT0fHEn.js.map +0 -1
- package/dist/shared/hx-tab-panel-C7h5lRpw.js.map +0 -1
- package/dist/shared/hx-text-input-BUMgOQHX.js.map +0 -1
- package/dist/shared/hx-textarea-B_nmxzhC.js.map +0 -1
- package/dist/shared/hx-time-picker-a-BCkecJ.js.map +0 -1
- package/dist/shared/hx-toast-ikwh9Y03.js.map +0 -1
- package/dist/shared/hx-tooltip-DN6lMlP5.js.map +0 -1
- package/dist/shared/hx-tree-item-Cesh_du5.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as e, customElement as
|
|
3
|
-
import { classMap as
|
|
4
|
-
import { ifDefined as
|
|
5
|
-
import { tokenStyles as
|
|
6
|
-
const
|
|
1
|
+
import { css as p, LitElement as c, html as h, nothing as n } from "lit";
|
|
2
|
+
import { property as e, customElement as x } from "lit/decorators.js";
|
|
3
|
+
import { classMap as d } from "lit/directives/class-map.js";
|
|
4
|
+
import { ifDefined as v } from "lit/directives/if-defined.js";
|
|
5
|
+
import { tokenStyles as f } from "@helixui/tokens/lit";
|
|
6
|
+
const g = p`
|
|
7
7
|
:host {
|
|
8
8
|
display: inline-block;
|
|
9
9
|
}
|
|
@@ -13,6 +13,16 @@ const m = d`
|
|
|
13
13
|
opacity: var(--hx-opacity-disabled, 0.5);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
:host([full]) {
|
|
17
|
+
display: block;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host([full]) .button {
|
|
22
|
+
width: 100%;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
16
26
|
/* ─── Base Button ─── */
|
|
17
27
|
|
|
18
28
|
.button {
|
|
@@ -88,7 +98,7 @@ const m = d`
|
|
|
88
98
|
}
|
|
89
99
|
|
|
90
100
|
.button--secondary:hover {
|
|
91
|
-
--hx-button-bg: var(--hx-color-primary-50);
|
|
101
|
+
--hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-primary-50));
|
|
92
102
|
}
|
|
93
103
|
|
|
94
104
|
.button--tertiary {
|
|
@@ -98,7 +108,7 @@ const m = d`
|
|
|
98
108
|
}
|
|
99
109
|
|
|
100
110
|
.button--tertiary:hover {
|
|
101
|
-
--hx-button-bg: var(--hx-color-neutral-200);
|
|
111
|
+
--hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-neutral-200));
|
|
102
112
|
}
|
|
103
113
|
|
|
104
114
|
.button--danger {
|
|
@@ -108,7 +118,7 @@ const m = d`
|
|
|
108
118
|
}
|
|
109
119
|
|
|
110
120
|
.button--danger:hover {
|
|
111
|
-
--hx-button-bg: var(--hx-color-error-600);
|
|
121
|
+
--hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-error-600));
|
|
112
122
|
}
|
|
113
123
|
|
|
114
124
|
.button--ghost {
|
|
@@ -118,7 +128,7 @@ const m = d`
|
|
|
118
128
|
}
|
|
119
129
|
|
|
120
130
|
.button--ghost:hover {
|
|
121
|
-
--hx-button-bg: var(--hx-color-neutral-100);
|
|
131
|
+
--hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-neutral-100));
|
|
122
132
|
}
|
|
123
133
|
|
|
124
134
|
.button--outline {
|
|
@@ -128,7 +138,11 @@ const m = d`
|
|
|
128
138
|
}
|
|
129
139
|
|
|
130
140
|
.button--outline:hover {
|
|
131
|
-
--hx-button-bg: var(--hx-color-neutral-50);
|
|
141
|
+
--hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-neutral-50));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.button--primary:hover {
|
|
145
|
+
--hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-primary-500));
|
|
132
146
|
}
|
|
133
147
|
|
|
134
148
|
/* ─── Disabled ─── */
|
|
@@ -166,6 +180,69 @@ const m = d`
|
|
|
166
180
|
}
|
|
167
181
|
}
|
|
168
182
|
|
|
183
|
+
/* ─── Inverted Mode ─── */
|
|
184
|
+
|
|
185
|
+
/* Override text color and filter-based hover/active for all variants */
|
|
186
|
+
:host([inverted]) .button {
|
|
187
|
+
color: var(--hx-button-inverted-color, #ffffff);
|
|
188
|
+
filter: none;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:host([inverted]) .button:hover {
|
|
192
|
+
filter: none;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:host([inverted]) .button:active {
|
|
196
|
+
filter: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
:host([inverted]) .button:focus-visible {
|
|
200
|
+
outline-color: var(--hx-button-inverted-focus-ring-color, rgba(255, 255, 255, 0.5));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Primary inverted — slight transparent white overlay on hover */
|
|
204
|
+
:host([inverted]) .button--primary:hover {
|
|
205
|
+
--hx-button-bg: var(--hx-color-primary-400, #3b82f6);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Secondary inverted — white border and text */
|
|
209
|
+
:host([inverted]) .button--secondary {
|
|
210
|
+
--hx-button-border-color: rgba(255, 255, 255, 0.7);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
:host([inverted]) .button--secondary:hover {
|
|
214
|
+
--hx-button-bg: rgba(255, 255, 255, 0.15);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Tertiary inverted */
|
|
218
|
+
:host([inverted]) .button--tertiary {
|
|
219
|
+
--hx-button-bg: rgba(255, 255, 255, 0.15);
|
|
220
|
+
--hx-button-border-color: transparent;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:host([inverted]) .button--tertiary:hover {
|
|
224
|
+
--hx-button-bg: rgba(255, 255, 255, 0.25);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Ghost inverted — transparent base, white hover bg */
|
|
228
|
+
:host([inverted]) .button--ghost {
|
|
229
|
+
--hx-button-bg: transparent;
|
|
230
|
+
--hx-button-border-color: transparent;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
:host([inverted]) .button--ghost:hover {
|
|
234
|
+
--hx-button-bg: var(--hx-button-inverted-ghost-hover-bg, rgba(255, 255, 255, 0.15));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* Outline inverted — white border */
|
|
238
|
+
:host([inverted]) .button--outline {
|
|
239
|
+
--hx-button-border-color: rgba(255, 255, 255, 0.7);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
:host([inverted]) .button--outline:hover {
|
|
243
|
+
--hx-button-bg: rgba(255, 255, 255, 0.15);
|
|
244
|
+
}
|
|
245
|
+
|
|
169
246
|
/* ─── Prefix / Suffix / Label ─── */
|
|
170
247
|
|
|
171
248
|
.button__prefix,
|
|
@@ -179,14 +256,14 @@ const m = d`
|
|
|
179
256
|
flex: 1 1 auto;
|
|
180
257
|
}
|
|
181
258
|
`;
|
|
182
|
-
var
|
|
183
|
-
for (var a = s > 1 ? void 0 : s ? y(i,
|
|
184
|
-
(
|
|
185
|
-
return s && a &&
|
|
259
|
+
var m = Object.defineProperty, y = Object.getOwnPropertyDescriptor, r = (o, i, l, s) => {
|
|
260
|
+
for (var a = s > 1 ? void 0 : s ? y(i, l) : i, b = o.length - 1, u; b >= 0; b--)
|
|
261
|
+
(u = o[b]) && (a = (s ? u(i, l, a) : u(a)) || a);
|
|
262
|
+
return s && a && m(i, l, a), a;
|
|
186
263
|
};
|
|
187
|
-
let t = class extends
|
|
264
|
+
let t = class extends c {
|
|
188
265
|
constructor() {
|
|
189
|
-
super(), this.variant = "primary", this.size = "md", this.disabled = !1, this.loading = !1, this.type = "button", this.href = void 0, this.target = void 0, this.name = void 0, this.value = void 0, this.ariaLabel = null, this._internals = this.attachInternals();
|
|
266
|
+
super(), this.variant = "primary", this.size = "md", this.disabled = !1, this.loading = !1, this.type = "button", this.href = void 0, this.target = void 0, this.name = void 0, this.value = void 0, this.full = !1, this.inverted = !1, this.ariaLabel = null, this._internals = this.attachInternals();
|
|
190
267
|
}
|
|
191
268
|
// ─── Form API ───
|
|
192
269
|
/** Returns the associated form element, if any. */
|
|
@@ -211,7 +288,7 @@ let t = class extends x {
|
|
|
211
288
|
// ─── Render Helpers ───
|
|
212
289
|
/** @private */
|
|
213
290
|
_renderSpinner() {
|
|
214
|
-
return
|
|
291
|
+
return h`
|
|
215
292
|
<svg
|
|
216
293
|
class="button__spinner"
|
|
217
294
|
part="spinner"
|
|
@@ -240,7 +317,7 @@ let t = class extends x {
|
|
|
240
317
|
}
|
|
241
318
|
/** @private */
|
|
242
319
|
_renderInner() {
|
|
243
|
-
return
|
|
320
|
+
return h`
|
|
244
321
|
${this.loading ? this._renderSpinner() : n}
|
|
245
322
|
<span part="prefix" class="button__prefix">
|
|
246
323
|
<slot name="prefix"></slot>
|
|
@@ -261,12 +338,12 @@ let t = class extends x {
|
|
|
261
338
|
[`button--${this.size}`]: !0,
|
|
262
339
|
"button--loading": this.loading
|
|
263
340
|
};
|
|
264
|
-
return this.href !== void 0 ?
|
|
341
|
+
return this.href !== void 0 ? h`
|
|
265
342
|
<a
|
|
266
343
|
part="button"
|
|
267
|
-
class=${
|
|
268
|
-
href=${this.disabled || this.loading ? n :
|
|
269
|
-
target=${
|
|
344
|
+
class=${d(o)}
|
|
345
|
+
href=${this.disabled || this.loading ? n : v(this.href)}
|
|
346
|
+
target=${v(this.target)}
|
|
270
347
|
rel=${this.target === "_blank" ? "noopener noreferrer" : n}
|
|
271
348
|
aria-label=${this.ariaLabel ?? n}
|
|
272
349
|
aria-disabled=${this.disabled ? "true" : n}
|
|
@@ -275,10 +352,10 @@ let t = class extends x {
|
|
|
275
352
|
>
|
|
276
353
|
${this._renderInner()}
|
|
277
354
|
</a>
|
|
278
|
-
` :
|
|
355
|
+
` : h`
|
|
279
356
|
<button
|
|
280
357
|
part="button"
|
|
281
|
-
class=${
|
|
358
|
+
class=${d(o)}
|
|
282
359
|
?disabled=${this.disabled}
|
|
283
360
|
type=${this.type}
|
|
284
361
|
aria-label=${this.ariaLabel ?? n}
|
|
@@ -290,7 +367,7 @@ let t = class extends x {
|
|
|
290
367
|
`;
|
|
291
368
|
}
|
|
292
369
|
};
|
|
293
|
-
t.styles = [
|
|
370
|
+
t.styles = [f, g];
|
|
294
371
|
t.formAssociated = !0;
|
|
295
372
|
r([
|
|
296
373
|
e({ type: String, reflect: !0 })
|
|
@@ -319,13 +396,19 @@ r([
|
|
|
319
396
|
r([
|
|
320
397
|
e({ type: String })
|
|
321
398
|
], t.prototype, "value", 2);
|
|
399
|
+
r([
|
|
400
|
+
e({ type: Boolean, reflect: !0 })
|
|
401
|
+
], t.prototype, "full", 2);
|
|
402
|
+
r([
|
|
403
|
+
e({ type: Boolean, reflect: !0 })
|
|
404
|
+
], t.prototype, "inverted", 2);
|
|
322
405
|
r([
|
|
323
406
|
e({ type: String, reflect: !0, attribute: "aria-label" })
|
|
324
407
|
], t.prototype, "ariaLabel", 2);
|
|
325
408
|
t = r([
|
|
326
|
-
|
|
409
|
+
x("hx-button")
|
|
327
410
|
], t);
|
|
328
411
|
export {
|
|
329
412
|
t as H
|
|
330
413
|
};
|
|
331
|
-
//# sourceMappingURL=hx-button-
|
|
414
|
+
//# sourceMappingURL=hx-button-Cbhqpm5i.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-button-Cbhqpm5i.js","sources":["../../src/components/hx-button/hx-button.styles.ts","../../src/components/hx-button/hx-button.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixButtonStyles = css`\n :host {\n display: inline-block;\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: var(--hx-opacity-disabled, 0.5);\n }\n\n :host([full]) {\n display: block;\n width: 100%;\n }\n\n :host([full]) .button {\n width: 100%;\n justify-content: center;\n }\n\n /* ─── Base Button ─── */\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--hx-space-2, 0.5rem);\n border: var(--hx-border-width-thin, 1px) solid var(--hx-button-border-color, transparent);\n border-radius: var(--hx-button-border-radius, var(--hx-border-radius-md, 0.375rem));\n background-color: var(--hx-button-bg, var(--hx-color-primary-500, #2563eb));\n color: var(--hx-button-color, var(--hx-color-neutral-0, #ffffff));\n font-family: var(--hx-button-font-family, var(--hx-font-family-sans, sans-serif));\n font-weight: var(--hx-button-font-weight, var(--hx-font-weight-semibold, 600));\n line-height: var(--hx-line-height-tight, 1.25);\n cursor: pointer;\n transition:\n background-color var(--hx-transition-fast, 150ms ease),\n color var(--hx-transition-fast, 150ms ease),\n border-color var(--hx-transition-fast, 150ms ease),\n box-shadow var(--hx-transition-fast, 150ms ease);\n text-decoration: none;\n white-space: nowrap;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .button:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid\n var(--hx-button-focus-ring-color, var(--hx-focus-ring-color, var(--hx-color-primary-500)));\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .button:hover {\n filter: brightness(var(--hx-filter-brightness-hover, 0.9));\n }\n\n .button:active {\n filter: brightness(var(--hx-filter-brightness-active, 0.8));\n }\n\n /* ─── Size Variants ─── */\n\n .button--sm {\n padding: var(--hx-space-1, 0.25rem) var(--hx-space-3, 0.75rem);\n font-size: var(--hx-font-size-sm, 0.875rem);\n min-height: var(--hx-size-8, 2rem);\n }\n\n .button--md {\n padding: var(--hx-space-2, 0.5rem) var(--hx-space-4, 1rem);\n font-size: var(--hx-font-size-md, 1rem);\n min-height: var(--hx-size-10, 2.5rem);\n }\n\n .button--lg {\n padding: var(--hx-space-3, 0.75rem) var(--hx-space-6, 1.5rem);\n font-size: var(--hx-font-size-lg, 1.125rem);\n min-height: var(--hx-size-12, 3rem);\n }\n\n /* ─── Style Variants ─── */\n\n .button--primary {\n --hx-button-bg: var(--hx-color-primary-500);\n --hx-button-color: var(--hx-color-neutral-0);\n --hx-button-border-color: transparent;\n }\n\n .button--secondary {\n --hx-button-bg: transparent;\n --hx-button-color: var(--hx-color-primary-500);\n --hx-button-border-color: var(--hx-color-primary-500);\n }\n\n .button--secondary:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-primary-50));\n }\n\n .button--tertiary {\n --hx-button-bg: var(--hx-color-neutral-100);\n --hx-button-color: var(--hx-color-neutral-900);\n --hx-button-border-color: transparent;\n }\n\n .button--tertiary:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-neutral-200));\n }\n\n .button--danger {\n --hx-button-bg: var(--hx-color-error-500);\n --hx-button-color: var(--hx-color-neutral-0);\n --hx-button-border-color: transparent;\n }\n\n .button--danger:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-error-600));\n }\n\n .button--ghost {\n --hx-button-bg: transparent;\n --hx-button-color: var(--hx-color-primary-500);\n --hx-button-border-color: transparent;\n }\n\n .button--ghost:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-neutral-100));\n }\n\n .button--outline {\n --hx-button-bg: transparent;\n --hx-button-color: var(--hx-color-neutral-900);\n --hx-button-border-color: var(--hx-color-neutral-300);\n }\n\n .button--outline:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-neutral-50));\n }\n\n .button--primary:hover {\n --hx-button-bg: var(--hx-button-hover-bg, var(--hx-color-primary-500));\n }\n\n /* ─── Disabled ─── */\n\n /* Note: opacity is applied on :host([disabled]) above — do NOT add opacity here.\n Stacking opacity on both :host and .button[disabled] would multiply to 0.25. */\n .button[disabled] {\n cursor: not-allowed;\n }\n\n /* ─── Loading State ─── */\n\n .button--loading {\n position: relative;\n cursor: wait;\n }\n\n .button__spinner {\n width: 1em;\n height: 1em;\n flex-shrink: 0;\n animation: hx-spin var(--hx-duration-spinner, 750ms) linear infinite;\n }\n\n @keyframes hx-spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .button__spinner {\n animation: none;\n opacity: var(--hx-opacity-muted, 0.6);\n }\n }\n\n /* ─── Inverted Mode ─── */\n\n /* Override text color and filter-based hover/active for all variants */\n :host([inverted]) .button {\n color: var(--hx-button-inverted-color, #ffffff);\n filter: none;\n }\n\n :host([inverted]) .button:hover {\n filter: none;\n }\n\n :host([inverted]) .button:active {\n filter: none;\n }\n\n :host([inverted]) .button:focus-visible {\n outline-color: var(--hx-button-inverted-focus-ring-color, rgba(255, 255, 255, 0.5));\n }\n\n /* Primary inverted — slight transparent white overlay on hover */\n :host([inverted]) .button--primary:hover {\n --hx-button-bg: var(--hx-color-primary-400, #3b82f6);\n }\n\n /* Secondary inverted — white border and text */\n :host([inverted]) .button--secondary {\n --hx-button-border-color: rgba(255, 255, 255, 0.7);\n }\n\n :host([inverted]) .button--secondary:hover {\n --hx-button-bg: rgba(255, 255, 255, 0.15);\n }\n\n /* Tertiary inverted */\n :host([inverted]) .button--tertiary {\n --hx-button-bg: rgba(255, 255, 255, 0.15);\n --hx-button-border-color: transparent;\n }\n\n :host([inverted]) .button--tertiary:hover {\n --hx-button-bg: rgba(255, 255, 255, 0.25);\n }\n\n /* Ghost inverted — transparent base, white hover bg */\n :host([inverted]) .button--ghost {\n --hx-button-bg: transparent;\n --hx-button-border-color: transparent;\n }\n\n :host([inverted]) .button--ghost:hover {\n --hx-button-bg: var(--hx-button-inverted-ghost-hover-bg, rgba(255, 255, 255, 0.15));\n }\n\n /* Outline inverted — white border */\n :host([inverted]) .button--outline {\n --hx-button-border-color: rgba(255, 255, 255, 0.7);\n }\n\n :host([inverted]) .button--outline:hover {\n --hx-button-bg: rgba(255, 255, 255, 0.15);\n }\n\n /* ─── Prefix / Suffix / Label ─── */\n\n .button__prefix,\n .button__suffix {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n .button__label {\n flex: 1 1 auto;\n }\n`;\n","import { LitElement, html, nothing, type TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixButtonStyles } from './hx-button.styles.js';\n\n/**\n * A production-grade button component for user interaction. Supports multiple\n * visual variants, sizes, loading state, prefix/suffix slots, anchor rendering,\n * and full ElementInternals form association.\n *\n * @summary Primary interactive element for triggering actions and form submission.\n *\n * @tag hx-button\n *\n * @slot - Default slot for button label text or content.\n * @slot prefix - Icon or content rendered before the label.\n * @slot suffix - Icon or content rendered after the label.\n *\n * @fires {CustomEvent<{originalEvent: MouseEvent}>} hx-click - Dispatched when\n * the button is clicked and is neither disabled nor loading.\n *\n * @csspart button - The native button or anchor element.\n * @csspart label - The label text wrapper span.\n * @csspart prefix - The prefix slot container span.\n * @csspart suffix - The suffix slot container span.\n * @csspart spinner - The loading spinner SVG element.\n *\n * @cssprop [--hx-button-bg=var(--hx-color-primary-500)] - Button background color.\n * @cssprop [--hx-button-hover-bg] - Hover background color override. When set, overrides the variant default hover background from outside the shadow DOM.\n * @cssprop [--hx-button-color=var(--hx-color-neutral-0)] - Button text color.\n * @cssprop [--hx-button-border-color=transparent] - Button border color.\n * @cssprop [--hx-button-border-radius=var(--hx-border-radius-md)] - Button border radius.\n * @cssprop [--hx-button-font-family=var(--hx-font-family-sans)] - Button font family.\n * @cssprop [--hx-button-font-weight=var(--hx-font-weight-semibold)] - Button font weight.\n * @cssprop [--hx-button-focus-ring-color=var(--hx-focus-ring-color)] - Focus ring color.\n *\n * @cssprop [--hx-button-inverted-color=#ffffff] - Text color when inverted.\n * @cssprop [--hx-button-inverted-ghost-hover-bg=rgba(255,255,255,0.15)] - Ghost hover bg when inverted.\n * @cssprop [--hx-button-inverted-focus-ring-color=rgba(255,255,255,0.5)] - Focus ring color when inverted.\n */\n@customElement('hx-button')\nexport class HelixButton extends LitElement {\n static override styles = [tokenStyles, helixButtonStyles];\n\n // ─── Form Association ───\n\n static formAssociated = true;\n\n private _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n // ─── Public Properties ───\n\n /**\n * Visual style variant of the button.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'ghost' | 'outline' = 'primary';\n\n /**\n * Size of the button.\n * @attr hx-size\n */\n @property({ type: String, reflect: true, attribute: 'hx-size' })\n size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * Whether the button is disabled. Prevents all interaction and form actions.\n * @attr disabled\n */\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n /**\n * Whether the button is in a loading state. Shows spinner, prevents interaction,\n * and sets aria-busy. Does not set the disabled attribute.\n * @attr loading\n */\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n /**\n * The type attribute for the underlying button element. Ignored when href is set.\n * @attr type\n */\n @property({ type: String })\n type: 'button' | 'submit' | 'reset' = 'button';\n\n /**\n * When set, renders an anchor element instead of a button.\n * @attr href\n */\n @property({ type: String })\n href: string | undefined = undefined;\n\n /**\n * Anchor target attribute. Only used when href is set.\n * @attr target\n */\n @property({ type: String })\n target: string | undefined = undefined;\n\n /**\n * Form field name submitted via ElementInternals.setFormValue on submit.\n * @attr name\n */\n @property({ type: String })\n name: string | undefined = undefined;\n\n /**\n * Form field value submitted via ElementInternals.setFormValue on submit.\n * @attr value\n */\n @property({ type: String })\n value: string | undefined = undefined;\n\n /**\n * When true, the button stretches to fill its container width.\n * Sets the host to `display: block` and the inner element to `width: 100%`.\n * @attr full\n */\n @property({ type: Boolean, reflect: true })\n full = false;\n\n /**\n * When true, flips button colors for placement on dark or gradient backgrounds.\n * Forces text to white and adjusts hover/focus ring colors across all variants.\n * @attr inverted\n */\n @property({ type: Boolean, reflect: true })\n inverted = false;\n\n /**\n * Accessible label forwarded to the inner button/anchor. Required for icon-only usage.\n * @attr aria-label\n */\n @property({ type: String, reflect: true, attribute: 'aria-label' })\n override ariaLabel: string | null = null;\n\n // ─── Form API ───\n\n /** Returns the associated form element, if any. */\n get form(): HTMLFormElement | null {\n return this._internals.form;\n }\n\n // ─── Event Handling ───\n\n /** @private */\n private _handleClick(e: MouseEvent): void {\n if (this.disabled || this.loading) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n\n /**\n * Dispatched when the button is clicked.\n * @event hx-click\n */\n this.dispatchEvent(\n new CustomEvent('hx-click', {\n bubbles: true,\n composed: true,\n detail: { originalEvent: e },\n }),\n );\n\n // Handle form submission/reset if form-associated and not in anchor mode\n if (this.href === undefined && this.type === 'submit' && this._internals.form) {\n if (this.name !== undefined && this.value !== undefined) {\n this._internals.setFormValue(this.value);\n }\n this._internals.form.requestSubmit();\n } else if (this.href === undefined && this.type === 'reset' && this._internals.form) {\n this._internals.form.reset();\n }\n }\n\n // ─── Render Helpers ───\n\n /** @private */\n private _renderSpinner(): TemplateResult {\n return html`\n <svg\n class=\"button__spinner\"\n part=\"spinner\"\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <circle\n class=\"button__spinner-track\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n opacity=\"0.3\"\n />\n <path\n class=\"button__spinner-arc\"\n d=\"M12 2a10 10 0 0 1 10 10\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n />\n </svg>\n `;\n }\n\n /** @private */\n private _renderInner(): TemplateResult {\n return html`\n ${this.loading ? this._renderSpinner() : nothing}\n <span part=\"prefix\" class=\"button__prefix\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot name=\"suffix\"></slot>\n </span>\n `;\n }\n\n // ─── Render ───\n\n override render() {\n const classes = {\n button: true,\n [`button--${this.variant}`]: true,\n [`button--${this.size}`]: true,\n 'button--loading': this.loading,\n };\n\n if (this.href !== undefined) {\n return html`\n <a\n part=\"button\"\n class=${classMap(classes)}\n href=${this.disabled || this.loading ? nothing : ifDefined(this.href)}\n target=${ifDefined(this.target)}\n rel=${this.target === '_blank' ? 'noopener noreferrer' : nothing}\n aria-label=${this.ariaLabel ?? nothing}\n aria-disabled=${this.disabled ? 'true' : nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n @click=${this._handleClick}\n >\n ${this._renderInner()}\n </a>\n `;\n }\n\n return html`\n <button\n part=\"button\"\n class=${classMap(classes)}\n ?disabled=${this.disabled}\n type=${this.type}\n aria-label=${this.ariaLabel ?? nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n @click=${this._handleClick}\n >\n ${this._renderInner()}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-button': HelixButton;\n }\n}\n"],"names":["helixButtonStyles","css","HelixButton","LitElement","e","html","nothing","classes","classMap","ifDefined","tokenStyles","__decorateClass","property","customElement"],"mappings":";;;;;AAEO,MAAMA,IAAoBC;AAAA;AAAA;AA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,SAAS,IAAM,WAAW,cAAc;AAAA,GApGvDV,EAqGF,WAAA,aAAA,CAAA;AArGEA,IAANS,EAAA;AAAA,EADNE,EAAc,WAAW;AAAA,GACbX,CAAA;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css as h, LitElement as u, html as c } from "lit";
|
|
2
|
-
import { property as
|
|
2
|
+
import { property as n, customElement as p } from "lit/decorators.js";
|
|
3
3
|
import { classMap as b } from "lit/directives/class-map.js";
|
|
4
4
|
import { tokenStyles as m } from "@helixui/tokens/lit";
|
|
5
5
|
const x = h`
|
|
@@ -94,10 +94,10 @@ const x = h`
|
|
|
94
94
|
position: relative;
|
|
95
95
|
}
|
|
96
96
|
`;
|
|
97
|
-
var g = Object.defineProperty, f = Object.getOwnPropertyDescriptor, l = (r,
|
|
98
|
-
for (var t =
|
|
99
|
-
(
|
|
100
|
-
return
|
|
97
|
+
var g = Object.defineProperty, f = Object.getOwnPropertyDescriptor, l = (r, e, s, i) => {
|
|
98
|
+
for (var t = i > 1 ? void 0 : i ? f(e, s) : e, a = r.length - 1, d; a >= 0; a--)
|
|
99
|
+
(d = r[a]) && (t = (i ? d(e, s, t) : d(t)) || t);
|
|
100
|
+
return i && t && g(e, s, t), t;
|
|
101
101
|
};
|
|
102
102
|
let o = class extends u {
|
|
103
103
|
// ─── Constructor ───
|
|
@@ -108,7 +108,7 @@ let o = class extends u {
|
|
|
108
108
|
return this._orientation;
|
|
109
109
|
}
|
|
110
110
|
set orientation(r) {
|
|
111
|
-
r !== "horizontal" && r !== "vertical" && (
|
|
111
|
+
r !== "horizontal" && r !== "vertical" && (r = "horizontal"), this._orientation = r;
|
|
112
112
|
}
|
|
113
113
|
// ─── Lifecycle ───
|
|
114
114
|
updated(r) {
|
|
@@ -135,13 +135,13 @@ let o = class extends u {
|
|
|
135
135
|
};
|
|
136
136
|
o.styles = [m, x];
|
|
137
137
|
l([
|
|
138
|
-
|
|
138
|
+
n({ type: String, reflect: !0 })
|
|
139
139
|
], o.prototype, "orientation", 1);
|
|
140
140
|
l([
|
|
141
|
-
|
|
141
|
+
n({ type: String, reflect: !0, attribute: "hx-size" })
|
|
142
142
|
], o.prototype, "size", 2);
|
|
143
143
|
l([
|
|
144
|
-
|
|
144
|
+
n({ type: String })
|
|
145
145
|
], o.prototype, "label", 2);
|
|
146
146
|
o = l([
|
|
147
147
|
p("hx-button-group")
|
|
@@ -149,4 +149,4 @@ o = l([
|
|
|
149
149
|
export {
|
|
150
150
|
o as H
|
|
151
151
|
};
|
|
152
|
-
//# sourceMappingURL=hx-button-group-
|
|
152
|
+
//# sourceMappingURL=hx-button-group-CWjWv-wS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-button-group-CWjWv-wS.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-left: calc(-1 * var(--hx-border-width-thin, 1px));\n }\n\n /* ─── No Double Borders: Vertical ─── */\n\n .group--vertical ::slotted(*:not(:first-child)) {\n margin-top: 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(--hx-border-radius-md, 0.375rem);\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(--hx-border-radius-md, 0.375rem) 0 0\n 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 var(--hx-border-radius-md, 0.375rem)\n 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(--hx-border-radius-md, 0.375rem);\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(--hx-border-radius-md, 0.375rem)\n 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 var(--hx-border-radius-md, 0.375rem)\n 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: 1;\n position: relative;\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 { helixButtonGroupStyles } from './hx-button-group.styles.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 */\n@customElement('hx-button-group')\nexport class HelixButtonGroup extends LitElement {\n static override styles = [tokenStyles, helixButtonGroupStyles];\n\n /**\n * ElementInternals instance for ARIA role and label management via the Accessibility Object Model.\n * @internal\n */\n private internals: ElementInternals;\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 via ElementInternals.\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 // ─── Constructor ───\n\n constructor() {\n super();\n this.internals = this.attachInternals();\n this.internals.role = 'group';\n }\n\n // ─── Lifecycle ───\n\n override updated(changedProperties: Map<PropertyKey, unknown>): 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 this.internals.ariaLabel = this.label || null;\n }\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n this.style.setProperty('--hx-button-group-size', this.size);\n if (this.label) {\n this.internals.ariaLabel = this.label;\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></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-button-group': HelixButtonGroup;\n }\n}\n"],"names":["helixButtonGroupStyles","css","HelixButtonGroup","LitElement","value","changedProperties","html","classMap","tokenStyles","__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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;ACwB/B,IAAMC,IAAN,cAA+BC,EAAW;AAAA;AAAA,EAkD/C,cAAc;AACZ,UAAA,GAvBF,KAAQ,eAA0C,cAQlD,KAAA,OAA2B,MAU3B,KAAA,QAAgB,IAMd,KAAK,YAAY,KAAK,gBAAA,GACtB,KAAK,UAAU,OAAO;AAAA,EACxB;AAAA,EAxCA,IAAI,cAAyC;AAC3C,WAAO,KAAK;AAAA,EACd;AAAA,EACA,IAAI,YAAYC,GAAe;AAC7B,IAAIA,MAAU,gBAAgBA,MAAU,eAEtCA,IAAQ,eAEV,KAAK,eAAeA;AAAA,EACtB;AAAA;AAAA,EAmCS,QAAQC,GAAoD;AACnE,UAAM,QAAQA,CAAiB,GAE3BA,EAAkB,IAAI,MAAM,KAC9B,KAAK,MAAM,YAAY,0BAA0B,KAAK,IAAI,GAGxDA,EAAkB,IAAI,OAAO,MAC/B,KAAK,UAAU,YAAY,KAAK,SAAS;AAAA,EAE7C;AAAA,EAES,oBAA0B;AACjC,UAAM,kBAAA,GACN,KAAK,MAAM,YAAY,0BAA0B,KAAK,IAAI,GACtD,KAAK,UACP,KAAK,UAAU,YAAY,KAAK;AAAA,EAEpC;AAAA;AAAA,EAIS,SAAS;AAChB,WAAOC;AAAA;AAAA;AAAA,gBAGKC,EAAS;AAAA,MACf,OAAO;AAAA,MACP,qBAAqB,KAAK,gBAAgB;AAAA,MAC1C,mBAAmB,KAAK,gBAAgB;AAAA,IAAA,CACzC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKR;AACF;AA9FaL,EACK,SAAS,CAACM,GAAaR,CAAsB;AAazDS,EAAA;AAAA,EADHC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GAb9BR,EAcP,WAAA,eAAA,CAAA;AAsBJO,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM,WAAW,WAAW;AAAA,GAnCpDR,EAoCX,WAAA,QAAA,CAAA;AAUAO,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GA7CfR,EA8CX,WAAA,SAAA,CAAA;AA9CWA,IAANO,EAAA;AAAA,EADNE,EAAc,iBAAiB;AAAA,GACnBT,CAAA;"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { css as g, LitElement as p, nothing as l, html as v } from "lit";
|
|
2
|
-
import { property as
|
|
2
|
+
import { property as d, state as s, customElement as x } from "lit/decorators.js";
|
|
3
3
|
import { classMap as f } from "lit/directives/class-map.js";
|
|
4
4
|
import { tokenStyles as m } from "@helixui/tokens/lit";
|
|
5
5
|
const _ = g`
|
|
6
6
|
:host {
|
|
7
7
|
display: block;
|
|
8
|
+
color: var(--hx-card-color, var(--hx-color-neutral-800, #212529));
|
|
9
|
+
background-color: var(--hx-card-bg, var(--hx-color-neutral-0, #ffffff));
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
.card {
|
|
@@ -161,10 +163,10 @@ const _ = g`
|
|
|
161
163
|
margin-top: auto;
|
|
162
164
|
}
|
|
163
165
|
`;
|
|
164
|
-
var
|
|
165
|
-
for (var o = i > 1 ? void 0 : i ?
|
|
166
|
+
var u = Object.defineProperty, b = Object.getOwnPropertyDescriptor, t = (a, r, n, i) => {
|
|
167
|
+
for (var o = i > 1 ? void 0 : i ? b(r, n) : r, h = a.length - 1, c; h >= 0; h--)
|
|
166
168
|
(c = a[h]) && (o = (i ? c(r, n, o) : c(o)) || o);
|
|
167
|
-
return i && o &&
|
|
169
|
+
return i && o && u(r, n, o), o;
|
|
168
170
|
};
|
|
169
171
|
let e = class extends p {
|
|
170
172
|
constructor() {
|
|
@@ -184,9 +186,7 @@ let e = class extends p {
|
|
|
184
186
|
}
|
|
185
187
|
_onActionsSlotChange(a) {
|
|
186
188
|
const r = a.target;
|
|
187
|
-
this._hasActions = r.assignedNodes({ flatten: !0 }).length > 0, this._hasActions && this.hxHref
|
|
188
|
-
'[hx-card] Using hx-href (interactive card) together with the actions slot is an ARIA anti-pattern: interactive controls cannot be nested inside role="link". Use either hx-href or the actions slot, not both.'
|
|
189
|
-
);
|
|
189
|
+
this._hasActions = r.assignedNodes({ flatten: !0 }).length > 0, this._hasActions && this.hxHref;
|
|
190
190
|
}
|
|
191
191
|
// ─── Event Handling ───
|
|
192
192
|
_dispatchCardClick(a) {
|
|
@@ -251,28 +251,28 @@ e.shadowRootOptions = {
|
|
|
251
251
|
};
|
|
252
252
|
e.styles = [m, _];
|
|
253
253
|
t([
|
|
254
|
-
|
|
254
|
+
d({ type: String, reflect: !0 })
|
|
255
255
|
], e.prototype, "variant", 2);
|
|
256
256
|
t([
|
|
257
|
-
|
|
257
|
+
d({ type: String, reflect: !0 })
|
|
258
258
|
], e.prototype, "elevation", 2);
|
|
259
259
|
t([
|
|
260
|
-
|
|
260
|
+
d({ type: String, attribute: "hx-href" })
|
|
261
261
|
], e.prototype, "hxHref", 2);
|
|
262
262
|
t([
|
|
263
|
-
|
|
263
|
+
d({ type: String, attribute: "hx-aria-label" })
|
|
264
264
|
], e.prototype, "hxAriaLabel", 2);
|
|
265
265
|
t([
|
|
266
|
-
|
|
266
|
+
s()
|
|
267
267
|
], e.prototype, "_hasImage", 2);
|
|
268
268
|
t([
|
|
269
|
-
|
|
269
|
+
s()
|
|
270
270
|
], e.prototype, "_hasHeading", 2);
|
|
271
271
|
t([
|
|
272
|
-
|
|
272
|
+
s()
|
|
273
273
|
], e.prototype, "_hasFooter", 2);
|
|
274
274
|
t([
|
|
275
|
-
|
|
275
|
+
s()
|
|
276
276
|
], e.prototype, "_hasActions", 2);
|
|
277
277
|
e = t([
|
|
278
278
|
x("hx-card")
|
|
@@ -280,4 +280,4 @@ e = t([
|
|
|
280
280
|
export {
|
|
281
281
|
e as H
|
|
282
282
|
};
|
|
283
|
-
//# sourceMappingURL=hx-card-
|
|
283
|
+
//# sourceMappingURL=hx-card-Bg4W4uXC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hx-card-Bg4W4uXC.js","sources":["../../src/components/hx-card/hx-card.styles.ts","../../src/components/hx-card/hx-card.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const helixCardStyles = css`\n :host {\n display: block;\n color: var(--hx-card-color, var(--hx-color-neutral-800, #212529));\n background-color: var(--hx-card-bg, var(--hx-color-neutral-0, #ffffff));\n }\n\n .card {\n display: flex;\n flex-direction: column;\n gap: var(--hx-card-gap, var(--hx-space-4, 1rem));\n background-color: var(--hx-card-bg, var(--hx-color-neutral-0, #ffffff));\n color: var(--hx-card-color, var(--hx-color-neutral-800, #212529));\n border: var(--hx-border-width-thin, 1px) solid\n var(--hx-card-border-color, var(--hx-color-neutral-200, #dee2e6));\n border-radius: var(--hx-card-border-radius, var(--hx-border-radius-lg, 0.5rem));\n overflow: hidden;\n font-family: var(--hx-font-family-sans, sans-serif);\n transition:\n box-shadow var(--hx-transition-normal, 250ms ease),\n transform var(--hx-transition-normal, 250ms ease);\n }\n\n /* ─── Elevation Variants ─── */\n\n .card--flat {\n box-shadow: none;\n }\n\n .card--raised {\n box-shadow: var(--hx-shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1));\n }\n\n .card--floating {\n box-shadow: var(--hx-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1));\n }\n\n /* ─── Style Variants ─── */\n\n .card--default {\n /* Default styling — uses base styles */\n }\n\n .card--featured {\n border-color: var(--hx-color-primary-500, #2563eb);\n border-width: var(--hx-border-width-medium, 2px);\n }\n\n .card--compact .card__body {\n padding: var(--hx-space-3, 0.75rem);\n }\n\n .card--compact .card__heading {\n padding-top: var(--hx-space-3, 0.75rem);\n padding-right: var(--hx-space-3, 0.75rem);\n padding-left: var(--hx-space-3, 0.75rem);\n }\n\n .card--compact .card__footer {\n padding-right: var(--hx-space-3, 0.75rem);\n padding-bottom: var(--hx-space-3, 0.75rem);\n padding-left: var(--hx-space-3, 0.75rem);\n }\n\n .card--compact .card__actions {\n padding-right: var(--hx-space-3, 0.75rem);\n padding-bottom: var(--hx-space-3, 0.75rem);\n padding-left: var(--hx-space-3, 0.75rem);\n }\n\n /* ─── Interactive ─── */\n\n .card--interactive {\n cursor: pointer;\n }\n\n .card--interactive:hover {\n box-shadow: var(--hx-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));\n transform: translateY(var(--hx-lift-md, -2px));\n }\n\n .card--interactive:focus-visible {\n outline: var(--hx-focus-ring-width, 2px) solid var(--hx-focus-ring-color, #2563eb);\n outline-offset: var(--hx-focus-ring-offset, 2px);\n }\n\n .card--interactive:active {\n transform: translateY(0);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .card {\n transition: none;\n }\n\n .card--interactive:hover {\n transform: none;\n }\n\n .card--interactive:active {\n transform: none;\n }\n }\n\n /* ─── Hidden empty slot wrappers ─── */\n\n [hidden] {\n display: none !important;\n }\n\n /* ─── Sections ─── */\n\n .card__image {\n overflow: hidden;\n line-height: 0;\n }\n\n .card__image ::slotted(img) {\n width: 100%;\n aspect-ratio: var(--hx-card-image-aspect-ratio, 16 / 9);\n display: block;\n object-fit: cover;\n }\n\n .card__heading {\n padding-top: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-right: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-bottom: 0;\n padding-left: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n font-size: var(--hx-font-size-xl, 1.25rem);\n font-weight: var(--hx-font-weight-semibold, 600);\n line-height: var(--hx-line-height-tight, 1.25);\n }\n\n .card__body {\n padding: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n flex: 1;\n font-size: var(--hx-font-size-md, 1rem);\n line-height: var(--hx-line-height-normal, 1.5);\n color: var(--hx-color-neutral-600, #495057);\n }\n\n .card__footer {\n padding-top: 0;\n padding-right: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-bottom: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-left: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n }\n\n .card__actions {\n display: flex;\n gap: var(--hx-space-2, 0.5rem);\n padding-top: var(--hx-space-4, 1rem);\n padding-right: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-bottom: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n padding-left: var(--hx-card-padding, var(--hx-space-6, 1.5rem));\n border-top: var(--hx-border-width-thin, 1px) solid\n var(--hx-card-border-color, var(--hx-color-neutral-200, #dee2e6));\n margin-top: auto;\n }\n`;\n","import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { tokenStyles } from '@helixui/tokens/lit';\nimport { helixCardStyles } from './hx-card.styles.js';\nimport { devWarn } from '../../utils/dev-warn.js';\n\n/**\n * A flexible card component for displaying grouped content.\n *\n * @summary Content container with image, heading, body, footer, and action slots.\n *\n * @tag hx-card\n *\n * @slot image - Optional image or media content at the top of the card.\n * @slot heading - The card heading/title content. Use a semantic heading element (h2, h3, etc.) for proper accessibility.\n * @slot - Default slot for the card body content.\n * @slot footer - Optional footer content below the body.\n * @slot actions - Optional action buttons, rendered with a top border separator. Do NOT use together with hx-href (interactive card + focusable actions is an ARIA anti-pattern).\n *\n * @fires {CustomEvent<{href: string, originalEvent: MouseEvent | KeyboardEvent}>} hx-click - Dispatched when an interactive card (with hx-href) is clicked.\n *\n * @csspart card - The outer card container element.\n * @csspart image - The image slot container.\n * @csspart heading - The heading slot container.\n * @csspart body - The body slot container.\n * @csspart footer - The footer slot container.\n * @csspart actions - The actions slot container.\n *\n * @cssprop [--hx-card-bg=var(--hx-color-neutral-0)] - Card background color.\n * @cssprop [--hx-card-color=var(--hx-color-neutral-800)] - Card text color.\n * @cssprop [--hx-card-border-color=var(--hx-color-neutral-200)] - Card border color.\n * @cssprop [--hx-card-border-radius=var(--hx-border-radius-lg)] - Card border radius.\n * @cssprop [--hx-card-padding=var(--hx-space-6)] - Internal padding for card sections.\n * @cssprop [--hx-card-gap=var(--hx-space-4)] - Gap between card sections.\n * @cssprop [--hx-card-image-aspect-ratio=16/9] - Aspect ratio for the image slot.\n */\n@customElement('hx-card')\nexport class HelixCard extends LitElement {\n /** Enable delegatesFocus so :focus on the host works when the inner card div has focus. */\n static override shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n\n static override styles = [tokenStyles, helixCardStyles];\n\n /**\n * Visual style variant of the card.\n * @attr variant\n */\n @property({ type: String, reflect: true })\n variant: 'default' | 'featured' | 'compact' = 'default';\n\n /**\n * Elevation (shadow depth) of the card.\n * @attr elevation\n */\n @property({ type: String, reflect: true })\n elevation: 'flat' | 'raised' | 'floating' = 'flat';\n\n /**\n * Optional URL. When set, the card becomes interactive (clickable)\n * and navigates to this URL on click.\n * Uses hx-href to avoid conflicting with the native HTML href attribute.\n * @attr hx-href\n */\n @property({ type: String, attribute: 'hx-href' })\n hxHref: string | undefined = undefined;\n\n /**\n * Accessible label for interactive cards. Use this to provide a meaningful\n * description of the card's purpose rather than exposing the raw URL.\n * Only applies when hx-href is set.\n * @attr hx-aria-label\n */\n @property({ type: String, attribute: 'hx-aria-label' })\n hxAriaLabel: string | undefined = undefined;\n\n // ─── Slot Detection ───\n\n /**\n * Tracks whether any content is assigned to the image slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasImage = false;\n\n /**\n * Tracks whether any content is assigned to the heading slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasHeading = false;\n\n /**\n * Tracks whether any content is assigned to the footer slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasFooter = false;\n\n /**\n * Tracks whether any content is assigned to the actions slot, controlling slot container visibility.\n * @internal\n */\n @state() private _hasActions = false;\n\n private _onImageSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasImage = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n private _onHeadingSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasHeading = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n private _onFooterSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasFooter = slot.assignedNodes({ flatten: true }).length > 0;\n }\n\n private _onActionsSlotChange(e: Event): void {\n const slot = e.target as HTMLSlotElement;\n this._hasActions = slot.assignedNodes({ flatten: true }).length > 0;\n if (this._hasActions && this.hxHref) {\n devWarn(\n 'hx-card',\n 'Using hx-href (interactive card) together with the actions slot is an ARIA anti-pattern: ' +\n 'interactive controls cannot be nested inside role=\"link\". ' +\n 'Use either hx-href or the actions slot, not both.',\n );\n }\n }\n\n // ─── Event Handling ───\n\n private _dispatchCardClick(originalEvent: MouseEvent | KeyboardEvent): void {\n if (!this.hxHref) return;\n\n /**\n * Dispatched when an interactive card is clicked.\n * Includes the target href in the detail.\n * @event hx-click\n */\n this.dispatchEvent(\n new CustomEvent<{ href: string; originalEvent: MouseEvent | KeyboardEvent }>('hx-click', {\n bubbles: true,\n composed: true,\n detail: { href: this.hxHref, originalEvent },\n }),\n );\n }\n\n private _handleClick(e: MouseEvent): void {\n this._dispatchCardClick(e);\n }\n\n private _handleKeyDown(e: KeyboardEvent): void {\n if (!this.hxHref) return;\n\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n this._dispatchCardClick(e);\n }\n }\n\n // ─── Render ───\n\n override render() {\n const isInteractive = !!this.hxHref;\n\n const classes = {\n card: true,\n [`card--${this.variant}`]: true,\n [`card--${this.elevation}`]: true,\n 'card--interactive': isInteractive,\n };\n\n return html`\n <div\n part=\"card\"\n class=${classMap(classes)}\n role=${isInteractive ? 'link' : nothing}\n tabindex=${isInteractive ? '0' : nothing}\n aria-label=${isInteractive && this.hxAriaLabel ? this.hxAriaLabel : nothing}\n @click=${this._handleClick}\n @keydown=${this._handleKeyDown}\n >\n <div class=\"card__image\" part=\"image\" ?hidden=${!this._hasImage}>\n <slot name=\"image\" @slotchange=${this._onImageSlotChange}></slot>\n </div>\n\n <div class=\"card__heading\" part=\"heading\" ?hidden=${!this._hasHeading}>\n <slot name=\"heading\" @slotchange=${this._onHeadingSlotChange}></slot>\n </div>\n\n <div class=\"card__body\" part=\"body\">\n <slot></slot>\n </div>\n\n <div class=\"card__footer\" part=\"footer\" ?hidden=${!this._hasFooter}>\n <slot name=\"footer\" @slotchange=${this._onFooterSlotChange}></slot>\n </div>\n\n <div class=\"card__actions\" part=\"actions\" ?hidden=${!this._hasActions}>\n <slot name=\"actions\" @slotchange=${this._onActionsSlotChange}></slot>\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'hx-card': HelixCard;\n }\n}\n"],"names":["helixCardStyles","css","HelixCard","LitElement","e","slot","originalEvent","isInteractive","classes","html","classMap","nothing","tokenStyles","__decorateClass","property","state","customElement"],"mappings":";;;;AAEO,MAAMA,IAAkBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;ACoCxB,IAAMC,IAAN,cAAwBC,EAAW;AAAA,EAAnC,cAAA;AAAA,UAAA,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