@ebay/ui-core-react 8.5.2 → 8.6.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/README.md +103 -84
- package/common/__mocks__/random-id.d.ts.map +1 -1
- package/common/component-utils/forwardRef.d.ts +1 -1
- package/common/component-utils/forwardRef.d.ts.map +1 -1
- package/common/component-utils/index.d.ts +2 -2
- package/common/component-utils/index.d.ts.map +1 -1
- package/common/component-utils/utils.d.ts +2 -2
- package/common/component-utils/utils.d.ts.map +1 -1
- package/common/debounce.d.ts.map +1 -1
- package/common/dropdown.d.ts +10 -10
- package/common/dropdown.d.ts.map +1 -1
- package/common/event-utils/index.d.ts +2 -2
- package/common/event-utils/index.d.ts.map +1 -1
- package/common/event-utils/types.d.ts +4 -4
- package/common/event-utils/types.d.ts.map +1 -1
- package/common/event-utils/use-key-press.d.ts.map +1 -1
- package/common/event-utils/use-roving-index.d.ts +1 -1
- package/common/event-utils/use-roving-index.d.ts.map +1 -1
- package/common/floating-label-utils/hooks.d.ts +6 -6
- package/common/floating-label-utils/hooks.d.ts.map +1 -1
- package/common/notice-utils/notice-content.d.ts +2 -2
- package/common/notice-utils/notice-content.d.ts.map +1 -1
- package/common/notice-utils/notice-cta.d.ts +2 -2
- package/common/notice-utils/notice-cta.d.ts.map +1 -1
- package/common/notice-utils/notice-footer.d.ts +2 -2
- package/common/notice-utils/notice-footer.d.ts.map +1 -1
- package/common/notice-utils/notice-title.d.ts +3 -3
- package/common/notice-utils/notice-title.d.ts.map +1 -1
- package/common/random-id.d.ts.map +1 -1
- package/common/range.d.ts.map +1 -1
- package/common/tooltip-utils/constants.d.ts +2 -2
- package/common/tooltip-utils/constants.d.ts.map +1 -1
- package/common/tooltip-utils/index.d.ts +7 -7
- package/common/tooltip-utils/index.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip-close-button.d.ts +1 -1
- package/common/tooltip-utils/tooltip-close-button.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip-content.d.ts +2 -2
- package/common/tooltip-utils/tooltip-content.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip-footer.d.ts +2 -2
- package/common/tooltip-utils/tooltip-footer.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip-host.d.ts +1 -1
- package/common/tooltip-utils/tooltip-host.d.ts.map +1 -1
- package/common/tooltip-utils/tooltip.d.ts +3 -3
- package/common/tooltip-utils/tooltip.d.ts.map +1 -1
- package/common/tooltip-utils/types.d.ts +2 -2
- package/common/tooltip-utils/types.d.ts.map +1 -1
- package/common/tooltip-utils/use-tooltip.d.ts +1 -1
- package/common/tooltip-utils/use-tooltip.d.ts.map +1 -1
- package/dialog-previous-button-B1dTCOv2.js +1 -0
- package/ebay-accordion/accordion.d.ts +5 -5
- package/ebay-accordion/accordion.d.ts.map +1 -1
- package/ebay-accordion/index.d.ts +2 -2
- package/ebay-accordion/index.d.ts.map +1 -1
- package/ebay-accordion/index.js +2 -2
- package/ebay-alert-dialog/README.md +14 -11
- package/ebay-alert-dialog/alert-dialog.d.ts +2 -2
- package/ebay-alert-dialog/alert-dialog.d.ts.map +1 -1
- package/ebay-alert-dialog/index.d.ts +1 -1
- package/ebay-alert-dialog/index.d.ts.map +1 -1
- package/ebay-alert-dialog/index.js +1 -1
- package/ebay-avatar/avatar-image.d.ts +2 -2
- package/ebay-avatar/avatar-image.d.ts.map +1 -1
- package/ebay-avatar/avatar.d.ts +3 -3
- package/ebay-avatar/avatar.d.ts.map +1 -1
- package/ebay-avatar/index.d.ts +3 -3
- package/ebay-avatar/index.d.ts.map +1 -1
- package/ebay-avatar/types.d.ts +1 -1
- package/ebay-avatar/utils.d.ts +1 -1
- package/ebay-avatar/utils.d.ts.map +1 -1
- package/ebay-badge/README.md +13 -8
- package/ebay-badge/badge.d.ts +3 -3
- package/ebay-badge/badge.d.ts.map +1 -1
- package/ebay-badge/index.d.ts +1 -1
- package/ebay-badge/index.d.ts.map +1 -1
- package/ebay-breadcrumbs/README.md +18 -13
- package/ebay-breadcrumbs/breadcrumb-item.d.ts +3 -3
- package/ebay-breadcrumbs/breadcrumb-item.d.ts.map +1 -1
- package/ebay-breadcrumbs/breadcrumbs.d.ts +3 -3
- package/ebay-breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/ebay-breadcrumbs/index.d.ts +2 -2
- package/ebay-breadcrumbs/index.d.ts.map +1 -1
- package/ebay-button/README.md +34 -23
- package/ebay-button/button-cell.d.ts +3 -3
- package/ebay-button/button-cell.d.ts.map +1 -1
- package/ebay-button/button-expand.d.ts +1 -1
- package/ebay-button/button-expand.d.ts.map +1 -1
- package/ebay-button/button-loading.d.ts +1 -1
- package/ebay-button/button-loading.d.ts.map +1 -1
- package/ebay-button/button-text.d.ts +2 -2
- package/ebay-button/button-text.d.ts.map +1 -1
- package/ebay-button/button.d.ts +3 -3
- package/ebay-button/button.d.ts.map +1 -1
- package/ebay-button/index.d.ts +3 -3
- package/ebay-button/index.d.ts.map +1 -1
- package/ebay-button/types.d.ts +5 -5
- package/ebay-button/types.d.ts.map +1 -1
- package/ebay-calendar/README.md +23 -20
- package/ebay-calendar/calendar.d.ts +2 -2
- package/ebay-calendar/calendar.d.ts.map +1 -1
- package/ebay-calendar/date-utils.d.ts +1 -1
- package/ebay-calendar/date-utils.d.ts.map +1 -1
- package/ebay-calendar/index.d.ts +1 -1
- package/ebay-calendar/index.d.ts.map +1 -1
- package/ebay-carousel/README.md +21 -22
- package/ebay-carousel/carousel-control-button.d.ts +2 -2
- package/ebay-carousel/carousel-control-button.d.ts.map +1 -1
- package/ebay-carousel/carousel-item.d.ts +3 -3
- package/ebay-carousel/carousel-item.d.ts.map +1 -1
- package/ebay-carousel/carousel-list.d.ts +2 -2
- package/ebay-carousel/carousel-list.d.ts.map +1 -1
- package/ebay-carousel/carousel.d.ts +2 -2
- package/ebay-carousel/carousel.d.ts.map +1 -1
- package/ebay-carousel/helpers.d.ts +5 -5
- package/ebay-carousel/helpers.d.ts.map +1 -1
- package/ebay-carousel/index.d.ts +2 -2
- package/ebay-carousel/index.d.ts.map +1 -1
- package/ebay-carousel/index.js +1 -1
- package/ebay-carousel/scroll-to-transition.d.ts.map +1 -1
- package/ebay-carousel/types.d.ts +5 -5
- package/ebay-carousel/types.d.ts.map +1 -1
- package/ebay-ccd/README.md +11 -17
- package/ebay-ccd/ccd.d.ts +4 -4
- package/ebay-ccd/ccd.d.ts.map +1 -1
- package/ebay-ccd/index.d.ts +1 -1
- package/ebay-character-count/README.md +6 -6
- package/ebay-character-count/character-count.d.ts +3 -3
- package/ebay-character-count/character-count.d.ts.map +1 -1
- package/ebay-character-count/index.d.ts +2 -2
- package/ebay-checkbox/README.md +14 -9
- package/ebay-checkbox/checkbox.d.ts +3 -3
- package/ebay-checkbox/checkbox.d.ts.map +1 -1
- package/ebay-checkbox/index.d.ts +2 -2
- package/ebay-checkbox/index.d.ts.map +1 -1
- package/ebay-checkbox/types.d.ts +2 -2
- package/ebay-checkbox/types.d.ts.map +1 -1
- package/ebay-chip/README.md +6 -10
- package/ebay-chip/chip.d.ts +3 -3
- package/ebay-chip/chip.d.ts.map +1 -1
- package/ebay-chip/index.d.ts +1 -1
- package/ebay-chip/index.d.ts.map +1 -1
- package/ebay-chips-combobox/chips-combobox.d.ts +4 -4
- package/ebay-chips-combobox/chips-combobox.d.ts.map +1 -1
- package/ebay-chips-combobox/index.d.ts +3 -3
- package/ebay-chips-combobox/index.d.ts.map +1 -1
- package/ebay-chips-combobox/types.d.ts +1 -1
- package/ebay-chips-combobox/types.d.ts.map +1 -1
- package/ebay-combobox/combobox-button.d.ts +2 -2
- package/ebay-combobox/combobox-button.d.ts.map +1 -1
- package/ebay-combobox/combobox-option.d.ts +2 -2
- package/ebay-combobox/combobox-option.d.ts.map +1 -1
- package/ebay-combobox/combobox.d.ts +3 -3
- package/ebay-combobox/combobox.d.ts.map +1 -1
- package/ebay-combobox/index.d.ts +4 -4
- package/ebay-combobox/index.d.ts.map +1 -1
- package/ebay-combobox/types.d.ts +4 -4
- package/ebay-combobox/types.d.ts.map +1 -1
- package/ebay-confirm-dialog/README.md +17 -13
- package/ebay-confirm-dialog/confirm-dialog.d.ts +3 -3
- package/ebay-confirm-dialog/confirm-dialog.d.ts.map +1 -1
- package/ebay-confirm-dialog/index.d.ts +1 -1
- package/ebay-confirm-dialog/index.d.ts.map +1 -1
- package/ebay-confirm-dialog/index.js +1 -1
- package/ebay-cta-button/README.md +15 -9
- package/ebay-cta-button/cta-button.d.ts +3 -3
- package/ebay-cta-button/cta-button.d.ts.map +1 -1
- package/ebay-cta-button/index.d.ts +1 -1
- package/ebay-cta-button/index.d.ts.map +1 -1
- package/ebay-date-textbox/README.md +25 -24
- package/ebay-date-textbox/date-textbox.d.ts +4 -4
- package/ebay-date-textbox/date-textbox.d.ts.map +1 -1
- package/ebay-date-textbox/index.d.ts +1 -1
- package/ebay-date-textbox/index.d.ts.map +1 -1
- package/ebay-details/ebay-details.d.ts +5 -6
- package/ebay-details/ebay-details.d.ts.map +1 -1
- package/ebay-details/index.d.ts +1 -1
- package/ebay-details/index.d.ts.map +1 -1
- package/ebay-details/index.js +1 -1
- package/ebay-details-BuPepKYE.js +1 -0
- package/ebay-dialog-base/README.md +2 -6
- package/ebay-dialog-base/components/animation.d.ts +2 -2
- package/ebay-dialog-base/components/animation.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialog-actions.d.ts +1 -1
- package/ebay-dialog-base/components/dialog-actions.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialog-close-button.d.ts +1 -1
- package/ebay-dialog-base/components/dialog-close-button.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialog-footer.d.ts +1 -1
- package/ebay-dialog-base/components/dialog-footer.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialog-header.d.ts +2 -2
- package/ebay-dialog-base/components/dialog-header.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialog-previous-button.d.ts +2 -2
- package/ebay-dialog-base/components/dialog-previous-button.d.ts.map +1 -1
- package/ebay-dialog-base/components/dialogBase.d.ts +8 -8
- package/ebay-dialog-base/components/dialogBase.d.ts.map +1 -1
- package/ebay-dialog-base/dialog-base-with-state.d.ts +2 -2
- package/ebay-dialog-base/dialog-base-with-state.d.ts.map +1 -1
- package/ebay-dialog-base/index.d.ts +9 -9
- package/ebay-dialog-base/index.d.ts.map +1 -1
- package/ebay-dialog-base/index.js +1 -1
- package/ebay-dialog-base/types.d.ts +1 -1
- package/ebay-dialog-base/types.d.ts.map +1 -1
- package/ebay-drawer-dialog-deprecated/README.md +18 -8
- package/ebay-drawer-dialog-deprecated/components/drawer.d.ts +2 -2
- package/ebay-drawer-dialog-deprecated/components/drawer.d.ts.map +1 -1
- package/ebay-drawer-dialog-deprecated/index.d.ts +1 -1
- package/ebay-drawer-dialog-deprecated/index.d.ts.map +1 -1
- package/ebay-drawer-dialog-deprecated/index.js +1 -1
- package/ebay-education-notice/README.md +6 -9
- package/ebay-education-notice/education-notice-footer.d.ts +1 -1
- package/ebay-education-notice/education-notice-footer.d.ts.map +1 -1
- package/ebay-education-notice/education-notice-title.d.ts +2 -2
- package/ebay-education-notice/education-notice-title.d.ts.map +1 -1
- package/ebay-education-notice/education-notice.d.ts +6 -6
- package/ebay-education-notice/education-notice.d.ts.map +1 -1
- package/ebay-education-notice/index.d.ts +4 -4
- package/ebay-education-notice/index.d.ts.map +1 -1
- package/ebay-education-notice/types.d.ts +1 -1
- package/ebay-education-notice/types.d.ts.map +1 -1
- package/ebay-eek/README.md +13 -8
- package/ebay-eek/eek-rating.d.ts +1 -1
- package/ebay-eek/eek-rating.d.ts.map +1 -1
- package/ebay-eek/eek-util.d.ts +1 -1
- package/ebay-eek/eek-util.d.ts.map +1 -1
- package/ebay-eek/index.d.ts +1 -1
- package/ebay-eek/index.d.ts.map +1 -1
- package/ebay-fake-link/fake-link.d.ts +4 -4
- package/ebay-fake-link/fake-link.d.ts.map +1 -1
- package/ebay-fake-link/index.d.ts +1 -1
- package/ebay-fake-link/index.d.ts.map +1 -1
- package/ebay-fake-menu/README.md +23 -15
- package/ebay-fake-menu/index.d.ts +3 -3
- package/ebay-fake-menu/index.d.ts.map +1 -1
- package/ebay-fake-menu/menu-item-separator.d.ts +2 -2
- package/ebay-fake-menu/menu-item-separator.d.ts.map +1 -1
- package/ebay-fake-menu/menu-item.d.ts +3 -3
- package/ebay-fake-menu/menu-item.d.ts.map +1 -1
- package/ebay-fake-menu/menu.d.ts +3 -3
- package/ebay-fake-menu/menu.d.ts.map +1 -1
- package/ebay-fake-menu-button/README.md +34 -31
- package/ebay-fake-menu-button/index.d.ts +4 -4
- package/ebay-fake-menu-button/index.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button-item.d.ts +2 -2
- package/ebay-fake-menu-button/menu-button-item.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button-label.d.ts +1 -1
- package/ebay-fake-menu-button/menu-button-label.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button-separator.d.ts +2 -2
- package/ebay-fake-menu-button/menu-button-separator.d.ts.map +1 -1
- package/ebay-fake-menu-button/menu-button.d.ts +5 -5
- package/ebay-fake-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-fake-tabs/README.md +14 -9
- package/ebay-fake-tabs/fake-tabs.d.ts +2 -2
- package/ebay-fake-tabs/fake-tabs.d.ts.map +1 -1
- package/ebay-fake-tabs/index.d.ts +2 -2
- package/ebay-fake-tabs/index.d.ts.map +1 -1
- package/ebay-fake-tabs/tab.d.ts +3 -3
- package/ebay-fake-tabs/tab.d.ts.map +1 -1
- package/ebay-field/README.md +30 -21
- package/ebay-field/description.d.ts +3 -3
- package/ebay-field/description.d.ts.map +1 -1
- package/ebay-field/field.d.ts +2 -2
- package/ebay-field/field.d.ts.map +1 -1
- package/ebay-field/index.d.ts +4 -4
- package/ebay-field/index.d.ts.map +1 -1
- package/ebay-field/label.d.ts +3 -3
- package/ebay-field/label.d.ts.map +1 -1
- package/ebay-field/types.d.ts +4 -4
- package/ebay-field/types.d.ts.map +1 -1
- package/ebay-file-input/README.md +4 -8
- package/ebay-file-input/file-input.d.ts +3 -3
- package/ebay-file-input/file-input.d.ts.map +1 -1
- package/ebay-file-input/index.d.ts +1 -1
- package/ebay-file-input/index.d.ts.map +1 -1
- package/ebay-file-input/types.d.ts +1 -1
- package/ebay-file-preview-card/README.md +25 -8
- package/ebay-file-preview-card/ebay-file-preview-card-action.d.ts +6 -0
- package/ebay-file-preview-card/ebay-file-preview-card-action.d.ts.map +1 -0
- package/ebay-file-preview-card/file-preview-action.d.ts +10 -7
- package/ebay-file-preview-card/file-preview-action.d.ts.map +1 -1
- package/ebay-file-preview-card/file-preview-card.d.ts +9 -7
- package/ebay-file-preview-card/file-preview-card.d.ts.map +1 -1
- package/ebay-file-preview-card/file-preview-content.d.ts +3 -3
- package/ebay-file-preview-card/file-preview-content.d.ts.map +1 -1
- package/ebay-file-preview-card/file-preview-label.d.ts +2 -2
- package/ebay-file-preview-card/file-preview-label.d.ts.map +1 -1
- package/ebay-file-preview-card/index.d.ts +3 -2
- package/ebay-file-preview-card/index.d.ts.map +1 -1
- package/ebay-file-preview-card/index.js +1 -1
- package/ebay-file-preview-card/types.d.ts +2 -2
- package/ebay-file-preview-card/types.d.ts.map +1 -1
- package/ebay-file-preview-card-group/README.md +5 -4
- package/ebay-file-preview-card-group/file-preview-card-group.d.ts +6 -5
- package/ebay-file-preview-card-group/file-preview-card-group.d.ts.map +1 -1
- package/ebay-file-preview-card-group/index.d.ts +1 -1
- package/ebay-file-preview-card-group/index.d.ts.map +1 -1
- package/ebay-file-preview-card-group/index.js +1 -1
- package/ebay-file-preview-card-group/types.d.ts +2 -2
- package/ebay-file-preview-card-group/types.d.ts.map +1 -1
- package/ebay-filter/filter.d.ts +3 -3
- package/ebay-filter/filter.d.ts.map +1 -1
- package/ebay-filter/index.d.ts +2 -2
- package/ebay-filter/index.d.ts.map +1 -1
- package/ebay-filter/types.d.ts +1 -1
- package/ebay-filter/types.d.ts.map +1 -1
- package/ebay-filter-menu/filter-menu-footer-button.d.ts +4 -4
- package/ebay-filter-menu/filter-menu-footer-button.d.ts.map +1 -1
- package/ebay-filter-menu/filter-menu-item.d.ts +4 -4
- package/ebay-filter-menu/filter-menu-item.d.ts.map +1 -1
- package/ebay-filter-menu/filter-menu.d.ts +3 -3
- package/ebay-filter-menu/filter-menu.d.ts.map +1 -1
- package/ebay-filter-menu/index.d.ts +4 -4
- package/ebay-filter-menu/index.d.ts.map +1 -1
- package/ebay-filter-menu/types.d.ts +3 -3
- package/ebay-filter-menu/types.d.ts.map +1 -1
- package/ebay-filter-menu-button/README.md +5 -5
- package/ebay-filter-menu-button/filter-menu-button.d.ts +2 -2
- package/ebay-filter-menu-button/filter-menu-button.d.ts.map +1 -1
- package/ebay-filter-menu-button/index.d.ts +2 -2
- package/ebay-filter-menu-button/index.d.ts.map +1 -1
- package/ebay-fullscreen-dialog-deprecated/README.md +13 -10
- package/ebay-fullscreen-dialog-deprecated/fullscreen-dialog.d.ts +3 -3
- package/ebay-fullscreen-dialog-deprecated/fullscreen-dialog.d.ts.map +1 -1
- package/ebay-fullscreen-dialog-deprecated/index.d.ts +1 -1
- package/ebay-fullscreen-dialog-deprecated/index.d.ts.map +1 -1
- package/ebay-fullscreen-dialog-deprecated/index.js +1 -1
- package/ebay-icon/README.md +13 -9
- package/ebay-icon/icon.d.ts +5 -5
- package/ebay-icon/icon.d.ts.map +1 -1
- package/ebay-icon/index.d.ts +2 -2
- package/ebay-icon/index.d.ts.map +1 -1
- package/ebay-icon-button/README.md +23 -15
- package/ebay-icon-button/icon-button.d.ts +5 -5
- package/ebay-icon-button/icon-button.d.ts.map +1 -1
- package/ebay-icon-button/index.d.ts +1 -1
- package/ebay-icon-button/index.d.ts.map +1 -1
- package/ebay-image-placeholder/README.md +1 -6
- package/ebay-image-placeholder/image-placeholder.d.ts +1 -1
- package/ebay-image-placeholder/image-placeholder.d.ts.map +1 -1
- package/ebay-image-placeholder/index.d.ts +1 -1
- package/ebay-image-placeholder/index.d.ts.map +1 -1
- package/ebay-infotip/README.md +17 -20
- package/ebay-infotip/ebay-infotip-content.d.ts +3 -3
- package/ebay-infotip/ebay-infotip-content.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip-heading.d.ts +2 -2
- package/ebay-infotip/ebay-infotip-heading.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip-host.d.ts +4 -4
- package/ebay-infotip/ebay-infotip-host.d.ts.map +1 -1
- package/ebay-infotip/ebay-infotip.d.ts +5 -5
- package/ebay-infotip/ebay-infotip.d.ts.map +1 -1
- package/ebay-infotip/index.d.ts +5 -5
- package/ebay-infotip/index.d.ts.map +1 -1
- package/ebay-infotip/index.js +1 -1
- package/ebay-infotip/types.d.ts +1 -1
- package/ebay-infotip/types.d.ts.map +1 -1
- package/ebay-inline-notice/README.md +8 -8
- package/ebay-inline-notice/index.d.ts +3 -3
- package/ebay-inline-notice/index.d.ts.map +1 -1
- package/ebay-inline-notice/inline-notice.d.ts +4 -4
- package/ebay-inline-notice/inline-notice.d.ts.map +1 -1
- package/ebay-inline-notice/types.d.ts +1 -1
- package/ebay-inline-notice/types.d.ts.map +1 -1
- package/ebay-lightbox-dialog/README.md +17 -13
- package/ebay-lightbox-dialog/index.d.ts +1 -1
- package/ebay-lightbox-dialog/index.d.ts.map +1 -1
- package/ebay-lightbox-dialog/index.js +1 -1
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts +7 -7
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts.map +1 -1
- package/ebay-listbox/README.md +16 -26
- package/ebay-listbox/index.d.ts +3 -3
- package/ebay-listbox/index.d.ts.map +1 -1
- package/ebay-listbox/listbox-option-description.d.ts +2 -2
- package/ebay-listbox/listbox-option-description.d.ts.map +1 -1
- package/ebay-listbox/listbox-option.d.ts +2 -2
- package/ebay-listbox/listbox-option.d.ts.map +1 -1
- package/ebay-listbox/listbox.d.ts +5 -5
- package/ebay-listbox/listbox.d.ts.map +1 -1
- package/ebay-listbox-button/README.md +17 -9
- package/ebay-listbox-button/index.d.ts +2 -2
- package/ebay-listbox-button/index.d.ts.map +1 -1
- package/ebay-listbox-button/listbox-button-option.d.ts +3 -3
- package/ebay-listbox-button/listbox-button-option.d.ts.map +1 -1
- package/ebay-listbox-button/listbox-button.d.ts +3 -3
- package/ebay-listbox-button/listbox-button.d.ts.map +1 -1
- package/ebay-menu/README.md +24 -20
- package/ebay-menu/index.d.ts +4 -4
- package/ebay-menu/index.d.ts.map +1 -1
- package/ebay-menu/menu-item-separator.d.ts +2 -2
- package/ebay-menu/menu-item-separator.d.ts.map +1 -1
- package/ebay-menu/menu-item.d.ts +3 -3
- package/ebay-menu/menu-item.d.ts.map +1 -1
- package/ebay-menu/menu.d.ts +2 -2
- package/ebay-menu/menu.d.ts.map +1 -1
- package/ebay-menu/types.d.ts +7 -7
- package/ebay-menu/types.d.ts.map +1 -1
- package/ebay-menu-button/README.md +33 -30
- package/ebay-menu-button/index.d.ts +5 -5
- package/ebay-menu-button/index.d.ts.map +1 -1
- package/ebay-menu-button/menu-button-item.d.ts +1 -1
- package/ebay-menu-button/menu-button-item.d.ts.map +1 -1
- package/ebay-menu-button/menu-button-label.d.ts +1 -1
- package/ebay-menu-button/menu-button-label.d.ts.map +1 -1
- package/ebay-menu-button/menu-button-separator.d.ts +2 -2
- package/ebay-menu-button/menu-button-separator.d.ts.map +1 -1
- package/ebay-menu-button/menu-button.d.ts +2 -2
- package/ebay-menu-button/menu-button.d.ts.map +1 -1
- package/ebay-menu-button/types.d.ts +6 -6
- package/ebay-menu-button/types.d.ts.map +1 -1
- package/ebay-notice-base/components/ebay-notice-content/index.d.ts +1 -1
- package/ebay-notice-base/components/ebay-notice-content/index.d.ts.map +1 -1
- package/ebay-notice-base/components/ebay-notice-content/notice-content.d.ts +3 -3
- package/ebay-notice-base/components/ebay-notice-content/notice-content.d.ts.map +1 -1
- package/ebay-notice-base/components/ebay-notice-title/index.d.ts +1 -1
- package/ebay-notice-base/components/ebay-notice-title/index.d.ts.map +1 -1
- package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts +1 -1
- package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts.map +1 -1
- package/ebay-notice-base/index.d.ts +2 -2
- package/ebay-notice-base/index.d.ts.map +1 -1
- package/ebay-page-notice/README.md +13 -11
- package/ebay-page-notice/index.d.ts +5 -5
- package/ebay-page-notice/index.d.ts.map +1 -1
- package/ebay-page-notice/page-notice-cta.d.ts +1 -1
- package/ebay-page-notice/page-notice-cta.d.ts.map +1 -1
- package/ebay-page-notice/page-notice-footer.d.ts +1 -1
- package/ebay-page-notice/page-notice-footer.d.ts.map +1 -1
- package/ebay-page-notice/page-notice-title.d.ts +2 -2
- package/ebay-page-notice/page-notice-title.d.ts.map +1 -1
- package/ebay-page-notice/page-notice.d.ts +4 -4
- package/ebay-page-notice/page-notice.d.ts.map +1 -1
- package/ebay-pagination/README.md +29 -23
- package/ebay-pagination/const.d.ts.map +1 -1
- package/ebay-pagination/helpers.d.ts +1 -1
- package/ebay-pagination/helpers.d.ts.map +1 -1
- package/ebay-pagination/index.d.ts +3 -3
- package/ebay-pagination/index.d.ts.map +1 -1
- package/ebay-pagination/pagination-item.d.ts +4 -4
- package/ebay-pagination/pagination-item.d.ts.map +1 -1
- package/ebay-pagination/pagination.d.ts +4 -4
- package/ebay-pagination/pagination.d.ts.map +1 -1
- package/ebay-pagination/types.d.ts +2 -2
- package/ebay-pagination/types.d.ts.map +1 -1
- package/ebay-panel-dialog/README.md +14 -11
- package/ebay-panel-dialog/index.d.ts +1 -1
- package/ebay-panel-dialog/index.d.ts.map +1 -1
- package/ebay-panel-dialog/index.js +1 -1
- package/ebay-panel-dialog/panel-dialog.d.ts +4 -4
- package/ebay-panel-dialog/panel-dialog.d.ts.map +1 -1
- package/ebay-progress-bar/README.md +13 -8
- package/ebay-progress-bar/index.d.ts +1 -1
- package/ebay-progress-bar/index.d.ts.map +1 -1
- package/ebay-progress-bar/progress-bar.d.ts +2 -2
- package/ebay-progress-bar/progress-bar.d.ts.map +1 -1
- package/ebay-progress-bar-expressive/README.md +12 -9
- package/ebay-progress-bar-expressive/index.d.ts +2 -2
- package/ebay-progress-bar-expressive/index.d.ts.map +1 -1
- package/ebay-progress-bar-expressive/progress-bar-expressive-message.d.ts +2 -2
- package/ebay-progress-bar-expressive/progress-bar-expressive-message.d.ts.map +1 -1
- package/ebay-progress-bar-expressive/progress-bar-expressive.d.ts +3 -3
- package/ebay-progress-bar-expressive/progress-bar-expressive.d.ts.map +1 -1
- package/ebay-progress-spinner/README.md +12 -7
- package/ebay-progress-spinner/index.d.ts +1 -1
- package/ebay-progress-spinner/index.d.ts.map +1 -1
- package/ebay-progress-spinner/progress-spinner.d.ts +4 -4
- package/ebay-progress-spinner/progress-spinner.d.ts.map +1 -1
- package/ebay-progress-stepper/README.md +13 -12
- package/ebay-progress-stepper/ebay-progress-step.d.ts +2 -2
- package/ebay-progress-stepper/ebay-progress-step.d.ts.map +1 -1
- package/ebay-progress-stepper/ebay-progress-stepper.d.ts +2 -2
- package/ebay-progress-stepper/ebay-progress-stepper.d.ts.map +1 -1
- package/ebay-progress-stepper/ebay-progress-title.d.ts +1 -1
- package/ebay-progress-stepper/ebay-progress-title.d.ts.map +1 -1
- package/ebay-progress-stepper/index.d.ts +4 -4
- package/ebay-progress-stepper/index.d.ts.map +1 -1
- package/ebay-progress-stepper/types.d.ts +2 -2
- package/ebay-radio/README.md +19 -11
- package/ebay-radio/index.d.ts +1 -1
- package/ebay-radio/index.d.ts.map +1 -1
- package/ebay-radio/radio.d.ts +4 -4
- package/ebay-radio/radio.d.ts.map +1 -1
- package/ebay-section-notice/README.md +15 -13
- package/ebay-section-notice/index.d.ts +5 -5
- package/ebay-section-notice/index.d.ts.map +1 -1
- package/ebay-section-notice/section-notice-cta.d.ts +1 -1
- package/ebay-section-notice/section-notice-cta.d.ts.map +1 -1
- package/ebay-section-notice/section-notice-footer.d.ts +1 -1
- package/ebay-section-notice/section-notice-footer.d.ts.map +1 -1
- package/ebay-section-notice/section-notice-title.d.ts +2 -2
- package/ebay-section-notice/section-notice-title.d.ts.map +1 -1
- package/ebay-section-notice/section-notice.d.ts +6 -6
- package/ebay-section-notice/section-notice.d.ts.map +1 -1
- package/ebay-section-title/README.md +23 -16
- package/ebay-section-title/cta.d.ts +2 -2
- package/ebay-section-title/cta.d.ts.map +1 -1
- package/ebay-section-title/index.d.ts +5 -5
- package/ebay-section-title/index.d.ts.map +1 -1
- package/ebay-section-title/info.d.ts +2 -2
- package/ebay-section-title/info.d.ts.map +1 -1
- package/ebay-section-title/overflow.d.ts +2 -2
- package/ebay-section-title/overflow.d.ts.map +1 -1
- package/ebay-section-title/section-title.d.ts +2 -2
- package/ebay-section-title/section-title.d.ts.map +1 -1
- package/ebay-section-title/subtitle.d.ts +2 -2
- package/ebay-section-title/subtitle.d.ts.map +1 -1
- package/ebay-section-title/title.d.ts +2 -2
- package/ebay-section-title/title.d.ts.map +1 -1
- package/ebay-segmented-buttons/README.md +11 -8
- package/ebay-segmented-buttons/button.d.ts +2 -2
- package/ebay-segmented-buttons/button.d.ts.map +1 -1
- package/ebay-segmented-buttons/index.d.ts +3 -3
- package/ebay-segmented-buttons/index.d.ts.map +1 -1
- package/ebay-segmented-buttons/segmented-buttons.d.ts +2 -2
- package/ebay-segmented-buttons/segmented-buttons.d.ts.map +1 -1
- package/ebay-segmented-buttons/types.d.ts +5 -5
- package/ebay-segmented-buttons/types.d.ts.map +1 -1
- package/ebay-select/README.md +38 -27
- package/ebay-select/ebay-select-option.d.ts +2 -2
- package/ebay-select/ebay-select-option.d.ts.map +1 -1
- package/ebay-select/ebay-select.d.ts +4 -4
- package/ebay-select/ebay-select.d.ts.map +1 -1
- package/ebay-select/index.d.ts +2 -2
- package/ebay-select/index.d.ts.map +1 -1
- package/ebay-signal/README.md +13 -6
- package/ebay-signal/index.d.ts +1 -1
- package/ebay-signal/index.d.ts.map +1 -1
- package/ebay-signal/signal.d.ts +3 -3
- package/ebay-signal/signal.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-avatar.d.ts +2 -2
- package/ebay-skeleton/ebay-skeleton-avatar.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-button.d.ts +3 -3
- package/ebay-skeleton/ebay-skeleton-button.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-image.d.ts +2 -2
- package/ebay-skeleton/ebay-skeleton-image.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-text.d.ts +3 -3
- package/ebay-skeleton/ebay-skeleton-text.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton-textbox.d.ts +2 -2
- package/ebay-skeleton/ebay-skeleton-textbox.d.ts.map +1 -1
- package/ebay-skeleton/ebay-skeleton.d.ts +3 -3
- package/ebay-skeleton/ebay-skeleton.d.ts.map +1 -1
- package/ebay-skeleton/index.d.ts +6 -6
- package/ebay-skeleton/index.d.ts.map +1 -1
- package/ebay-skeleton/types.d.ts +4 -4
- package/ebay-skeleton/types.d.ts.map +1 -1
- package/ebay-snackbar-dialog/README.md +21 -16
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.d.ts +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog-action.d.ts.map +1 -1
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.d.ts +4 -4
- package/ebay-snackbar-dialog/components/ebay-snackbar-dialog.d.ts.map +1 -1
- package/ebay-snackbar-dialog/index.d.ts +2 -2
- package/ebay-snackbar-dialog/index.d.ts.map +1 -1
- package/ebay-snackbar-dialog/index.js +1 -1
- package/ebay-split-button/README.md +29 -23
- package/ebay-split-button/index.d.ts +2 -2
- package/ebay-split-button/index.d.ts.map +1 -1
- package/ebay-split-button/split-button.d.ts +2 -2
- package/ebay-split-button/split-button.d.ts.map +1 -1
- package/ebay-split-button/types.d.ts +5 -5
- package/ebay-split-button/types.d.ts.map +1 -1
- package/ebay-star-rating/README.md +13 -7
- package/ebay-star-rating/index.d.ts +1 -1
- package/ebay-star-rating/index.d.ts.map +1 -1
- package/ebay-star-rating/star-rating.d.ts +2 -2
- package/ebay-star-rating/star-rating.d.ts.map +1 -1
- package/ebay-star-rating-select/README.md +20 -14
- package/ebay-star-rating-select/index.d.ts +1 -1
- package/ebay-star-rating-select/index.d.ts.map +1 -1
- package/ebay-star-rating-select/star-rating-select.d.ts +3 -3
- package/ebay-star-rating-select/star-rating-select.d.ts.map +1 -1
- package/ebay-svg/README.md +11 -8
- package/ebay-svg/index.d.ts +1 -1
- package/ebay-svg/index.d.ts.map +1 -1
- package/ebay-svg/svg.d.ts +2 -2
- package/ebay-svg/svg.d.ts.map +1 -1
- package/ebay-switch/README.md +13 -6
- package/ebay-switch/ebay-switch.d.ts +3 -3
- package/ebay-switch/ebay-switch.d.ts.map +1 -1
- package/ebay-switch/index.d.ts +1 -1
- package/ebay-switch/index.d.ts.map +1 -1
- package/ebay-table/index.d.ts +5 -5
- package/ebay-table/index.d.ts.map +1 -1
- package/ebay-table/table-cell.d.ts +3 -3
- package/ebay-table/table-cell.d.ts.map +1 -1
- package/ebay-table/table-header.d.ts +3 -3
- package/ebay-table/table-header.d.ts.map +1 -1
- package/ebay-table/table-row.d.ts +4 -4
- package/ebay-table/table-row.d.ts.map +1 -1
- package/ebay-table/table.d.ts +4 -4
- package/ebay-table/table.d.ts.map +1 -1
- package/ebay-table/types.d.ts +7 -7
- package/ebay-table/types.d.ts.map +1 -1
- package/ebay-tabs/README.md +16 -10
- package/ebay-tabs/index.d.ts +4 -4
- package/ebay-tabs/index.d.ts.map +1 -1
- package/ebay-tabs/tab-panel.d.ts +2 -2
- package/ebay-tabs/tab-panel.d.ts.map +1 -1
- package/ebay-tabs/tab.d.ts +2 -2
- package/ebay-tabs/tab.d.ts.map +1 -1
- package/ebay-tabs/tabs.d.ts +2 -2
- package/ebay-tabs/tabs.d.ts.map +1 -1
- package/ebay-tabs/types.d.ts +4 -4
- package/ebay-tabs/types.d.ts.map +1 -1
- package/ebay-textbox/README.md +38 -29
- package/ebay-textbox/index.d.ts +6 -6
- package/ebay-textbox/index.d.ts.map +1 -1
- package/ebay-textbox/postfix-icon.d.ts +2 -2
- package/ebay-textbox/postfix-icon.d.ts.map +1 -1
- package/ebay-textbox/postfix-text.d.ts +2 -2
- package/ebay-textbox/postfix-text.d.ts.map +1 -1
- package/ebay-textbox/prefix-icon.d.ts +2 -2
- package/ebay-textbox/prefix-icon.d.ts.map +1 -1
- package/ebay-textbox/prefix-text.d.ts +2 -2
- package/ebay-textbox/prefix-text.d.ts.map +1 -1
- package/ebay-textbox/textbox.d.ts +5 -5
- package/ebay-textbox/textbox.d.ts.map +1 -1
- package/ebay-textbox/types.d.ts +6 -6
- package/ebay-textbox/types.d.ts.map +1 -1
- package/ebay-toast-dialog/README.md +7 -6
- package/ebay-toast-dialog/components/toast.d.ts +3 -3
- package/ebay-toast-dialog/components/toast.d.ts.map +1 -1
- package/ebay-toast-dialog/index.d.ts +1 -1
- package/ebay-toast-dialog/index.d.ts.map +1 -1
- package/ebay-toast-dialog/index.js +1 -1
- package/ebay-toggle-button/index.d.ts +2 -2
- package/ebay-toggle-button/index.d.ts.map +1 -1
- package/ebay-toggle-button/toggle-button.d.ts +2 -2
- package/ebay-toggle-button/toggle-button.d.ts.map +1 -1
- package/ebay-toggle-button/types.d.ts +5 -5
- package/ebay-toggle-button/types.d.ts.map +1 -1
- package/ebay-toggle-button-group/README.md +12 -12
- package/ebay-toggle-button-group/index.d.ts +2 -2
- package/ebay-toggle-button-group/index.d.ts.map +1 -1
- package/ebay-toggle-button-group/toggle-button-group.d.ts +2 -2
- package/ebay-toggle-button-group/toggle-button-group.d.ts.map +1 -1
- package/ebay-toggle-button-group/types.d.ts +5 -5
- package/ebay-toggle-button-group/types.d.ts.map +1 -1
- package/ebay-tooltip/README.md +10 -7
- package/ebay-tooltip/ebay-tooltip-content.d.ts +3 -3
- package/ebay-tooltip/ebay-tooltip-content.d.ts.map +1 -1
- package/ebay-tooltip/ebay-tooltip-host.d.ts +3 -3
- package/ebay-tooltip/ebay-tooltip-host.d.ts.map +1 -1
- package/ebay-tooltip/ebay-tooltip.d.ts +3 -3
- package/ebay-tooltip/ebay-tooltip.d.ts.map +1 -1
- package/ebay-tooltip/index.d.ts +5 -5
- package/ebay-tooltip/index.d.ts.map +1 -1
- package/ebay-tourtip/README.md +23 -26
- package/ebay-tourtip/ebay-tourtip-content.d.ts +3 -3
- package/ebay-tourtip/ebay-tourtip-content.d.ts.map +1 -1
- package/ebay-tourtip/ebay-tourtip-footer.d.ts +2 -2
- package/ebay-tourtip/ebay-tourtip-footer.d.ts.map +1 -1
- package/ebay-tourtip/ebay-tourtip-heading.d.ts +2 -2
- package/ebay-tourtip/ebay-tourtip-heading.d.ts.map +1 -1
- package/ebay-tourtip/ebay-tourtip-host.d.ts +3 -3
- package/ebay-tourtip/ebay-tourtip-host.d.ts.map +1 -1
- package/ebay-tourtip/ebay-tourtip.d.ts +4 -4
- package/ebay-tourtip/ebay-tourtip.d.ts.map +1 -1
- package/ebay-tourtip/index.d.ts +6 -6
- package/ebay-tourtip/index.d.ts.map +1 -1
- package/ebay-tri-state-checkbox/Readme.md +15 -12
- package/ebay-tri-state-checkbox/index.d.ts +2 -2
- package/ebay-tri-state-checkbox/index.d.ts.map +1 -1
- package/ebay-tri-state-checkbox/tri-state-checkbox.d.ts +3 -3
- package/ebay-tri-state-checkbox/tri-state-checkbox.d.ts.map +1 -1
- package/ebay-tri-state-checkbox/types.d.ts +3 -3
- package/ebay-tri-state-checkbox/types.d.ts.map +1 -1
- package/ebay-video/README.md +24 -19
- package/ebay-video/const.d.ts.map +1 -1
- package/ebay-video/controls.d.ts.map +1 -1
- package/ebay-video/index.d.ts +3 -3
- package/ebay-video/index.d.ts.map +1 -1
- package/ebay-video/reportButton.d.ts +1 -1
- package/ebay-video/reportButton.d.ts.map +1 -1
- package/ebay-video/source.d.ts +2 -2
- package/ebay-video/source.d.ts.map +1 -1
- package/ebay-video/types.d.ts +3 -3
- package/ebay-video/types.d.ts.map +1 -1
- package/ebay-video/video.d.ts +4 -4
- package/ebay-video/video.d.ts.map +1 -1
- package/events/index.d.ts +4 -4
- package/events/index.d.ts.map +1 -1
- package/file-preview-card-BD6TIsY7.js +1 -0
- package/{lightbox-dialog-B19PMyMY.js → lightbox-dialog-DqcQsTSy.js} +1 -1
- package/package.json +79 -78
- package/utils/index.d.ts +6 -6
- package/utils/index.d.ts.map +1 -1
- package/dialog-previous-button-DR6Ujner.js +0 -1
- package/ebay-details-CwOA53up.js +0 -1
- package/file-preview-card-D4qnvGtF.js +0 -1
package/ebay-button/README.md
CHANGED
|
@@ -1,33 +1,43 @@
|
|
|
1
1
|
# EbayButton
|
|
2
2
|
|
|
3
3
|
## Demo
|
|
4
|
+
|
|
4
5
|
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/buttons-ebay-button--default)
|
|
5
6
|
|
|
6
7
|
## Usage
|
|
7
8
|
|
|
8
9
|
### Import JS
|
|
10
|
+
|
|
9
11
|
```jsx harmony
|
|
10
|
-
import { EbayButton } from
|
|
12
|
+
import { EbayButton } from "@ebay/ui-core-react/ebay-button";
|
|
11
13
|
```
|
|
14
|
+
|
|
12
15
|
### Import following styles from SKIN
|
|
16
|
+
|
|
13
17
|
```jsx harmony
|
|
14
|
-
import "@ebay/skin/button"
|
|
18
|
+
import "@ebay/skin/button";
|
|
15
19
|
```
|
|
20
|
+
|
|
16
21
|
### If tokens haven't been added to the project at a higher level, make sure to import
|
|
22
|
+
|
|
17
23
|
```jsx harmony
|
|
18
|
-
import
|
|
24
|
+
import "@ebay/skin/tokens";
|
|
19
25
|
```
|
|
26
|
+
|
|
20
27
|
### Or import styles using SCSS/CSS
|
|
28
|
+
|
|
21
29
|
```jsx harmony
|
|
22
|
-
import
|
|
30
|
+
import "@ebay/skin/button.css";
|
|
23
31
|
```
|
|
24
32
|
|
|
25
33
|
### Big button
|
|
34
|
+
|
|
26
35
|
```jsx harmony
|
|
27
36
|
<EbayButton size="large">I'm a big button!</EbayButton>
|
|
28
37
|
```
|
|
29
38
|
|
|
30
39
|
### Icon button
|
|
40
|
+
|
|
31
41
|
```jsx
|
|
32
42
|
<EbayButton aria-label="Menu button">
|
|
33
43
|
<EbayIcon name="menu20" />
|
|
@@ -35,9 +45,10 @@ import '@ebay/skin/button.css'
|
|
|
35
45
|
```
|
|
36
46
|
|
|
37
47
|
### Complex button
|
|
48
|
+
|
|
38
49
|
```jsx
|
|
39
50
|
<EbayButton priority="primary" fluid>
|
|
40
|
-
<EbayButtonCell style={{ justifyContent:
|
|
51
|
+
<EbayButtonCell style={{ justifyContent: "space-between" }}>
|
|
41
52
|
<span>Label</span>
|
|
42
53
|
<span>Filter</span>
|
|
43
54
|
</EbayButtonCell>
|
|
@@ -46,21 +57,21 @@ import '@ebay/skin/button.css'
|
|
|
46
57
|
|
|
47
58
|
## Attributes
|
|
48
59
|
|
|
49
|
-
Name
|
|
50
|
-
|
|
51
|
-
`priority`
|
|
52
|
-
`variant`
|
|
53
|
-
`size`
|
|
54
|
-
`bodyState`
|
|
55
|
-
`href`
|
|
56
|
-
`fluid`
|
|
57
|
-
`disabled`
|
|
58
|
-
`partiallyDisabled` | Boolean
|
|
59
|
-
`transparent`
|
|
60
|
-
`truncate`
|
|
61
|
-
`borderless`
|
|
62
|
-
`fixedHeight`
|
|
63
|
-
`onClick`
|
|
64
|
-
`onEscape`
|
|
65
|
-
`onFocus`
|
|
66
|
-
`onBlur`
|
|
60
|
+
| Name | Type | Stateful | Required | Description | Data |
|
|
61
|
+
| ------------------- | -------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------- | ------------------------ | --------------- |
|
|
62
|
+
| `priority` | String | No | No | `primary`, `secondary` (default), `tertiary`, `none` |
|
|
63
|
+
| `variant` | String | Yes | No | `standard` (default), `destructive`, `form` |
|
|
64
|
+
| `size` | String | No | No | `small` or `large` |
|
|
65
|
+
| `bodyState` | String | No | No | `loading`, `expand` |
|
|
66
|
+
| `href` | String | No | No | for link that looks like a button |
|
|
67
|
+
| `fluid` | Boolean | No | No | takes the whole width of the parent element |
|
|
68
|
+
| `disabled` | Boolean | Yes | No |
|
|
69
|
+
| `partiallyDisabled` | Boolean | No | No | sets `aria-disabled` but not `disabled` prop |
|
|
70
|
+
| `transparent` | Boolean | Yes | No | transparent background color (overrides `priority` prop) |
|
|
71
|
+
| `truncate` | Boolean | No | No | will truncate the text of the button onto a single line, and adds an ellipsis, when the button's text overflows |
|
|
72
|
+
| `borderless` | Boolean | No | No | shows button without border |
|
|
73
|
+
| `fixedHeight` | Boolean | No | No | fixes the height based on `size` |
|
|
74
|
+
| `onClick` | Function | - | No | click or action key pressed (`Space` / `Enter`) | `(event: MouseEvent | KeyboardEvent)` |
|
|
75
|
+
| `onEscape` | Function | - | No | `Esc`-key pressed | `(event: KeyboardEvent)` |
|
|
76
|
+
| `onFocus` | Function | - | No | triggered on focus | `(event: FocusEvent)` |
|
|
77
|
+
| `onBlur` | Function | - | No | triggered on blur | `(event: FocusEvent)` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentProps, FC } from
|
|
2
|
-
type ButtonType =
|
|
3
|
-
type Props = ComponentProps<
|
|
1
|
+
import { ComponentProps, FC } from "react";
|
|
2
|
+
type ButtonType = "cta" | "fake" | "expand" | "default";
|
|
3
|
+
type Props = ComponentProps<"span"> & {
|
|
4
4
|
type?: ButtonType;
|
|
5
5
|
};
|
|
6
6
|
declare const EbayButtonCell: FC<Props>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-cell.d.ts","sourceRoot":"","sources":["../../src/ebay-button/button-cell.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"button-cell.d.ts","sourceRoot":"","sources":["../../src/ebay-button/button-cell.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAElD,KAAK,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AACxD,KAAK,KAAK,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IAClC,IAAI,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AASF,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,KAAK,CAI7B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-expand.d.ts","sourceRoot":"","sources":["../../src/ebay-button/button-expand.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"button-expand.d.ts","sourceRoot":"","sources":["../../src/ebay-button/button-expand.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK7C,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,CAQ9C,CAAC;AAEN,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-loading.d.ts","sourceRoot":"","sources":["../../src/ebay-button/button-loading.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"button-loading.d.ts","sourceRoot":"","sources":["../../src/ebay-button/button-loading.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIlC,QAAA,MAAM,iBAAiB,EAAE,EAIxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentProps, FC } from
|
|
2
|
-
type Props = ComponentProps<
|
|
1
|
+
import { ComponentProps, FC } from "react";
|
|
2
|
+
type Props = ComponentProps<"span">;
|
|
3
3
|
declare const EbayButtonText: FC<Props>;
|
|
4
4
|
export default EbayButtonText;
|
|
5
5
|
//# sourceMappingURL=button-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-text.d.ts","sourceRoot":"","sources":["../../src/ebay-button/button-text.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"button-text.d.ts","sourceRoot":"","sources":["../../src/ebay-button/button-text.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlD,KAAK,KAAK,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAEpC,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,KAAK,CAE7B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/ebay-button/button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { ComponentProps, KeyboardEvent, MouseEvent, RefObject } from
|
|
2
|
-
import { Priority, Size, BodyState, Variant, Split } from
|
|
1
|
+
import React, { ComponentProps, KeyboardEvent, MouseEvent, RefObject } from "react";
|
|
2
|
+
import { Priority, Size, BodyState, Variant, Split } from "./types";
|
|
3
3
|
export type EbayButtonProps = {
|
|
4
4
|
fluid?: boolean;
|
|
5
5
|
partiallyDisabled?: boolean;
|
|
@@ -17,7 +17,7 @@ export type EbayButtonProps = {
|
|
|
17
17
|
borderless?: boolean;
|
|
18
18
|
fixedHeight?: boolean;
|
|
19
19
|
};
|
|
20
|
-
type Props = ComponentProps<
|
|
20
|
+
type Props = ComponentProps<"button"> & ComponentProps<"a"> & EbayButtonProps;
|
|
21
21
|
declare const _default: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<React.FC<Props>>>;
|
|
22
22
|
export default _default;
|
|
23
23
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ebay-button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEV,cAAc,EAEd,aAAa,EACb,UAAU,EAGV,SAAS,EACZ,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ebay-button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEV,cAAc,EAEd,aAAa,EACb,UAAU,EAGV,SAAS,EACZ,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAKpE,MAAM,MAAM,eAAe,GAAG;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC7E,YAAY,CAAC,EAAE,SAAS,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC;IAChE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,KAAK,KAAK,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC;;AAoH9E,wBAA0C"}
|
package/ebay-button/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as EbayButton, type EbayButtonProps } from
|
|
2
|
-
export { default as EbayButtonCell } from
|
|
3
|
-
export type { Size, Priority } from
|
|
1
|
+
export { default as EbayButton, type EbayButtonProps } from "./button";
|
|
2
|
+
export { default as EbayButtonCell } from "./button-cell";
|
|
3
|
+
export type { Size, Priority } from "./types";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAC1D,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC"}
|
package/ebay-button/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type Priority =
|
|
2
|
-
export type Variant =
|
|
3
|
-
export type Size =
|
|
4
|
-
export type BodyState =
|
|
5
|
-
export type Split =
|
|
1
|
+
export type Priority = "primary" | "secondary" | "tertiary" | "none";
|
|
2
|
+
export type Variant = "standard" | "destructive" | "form";
|
|
3
|
+
export type Size = "small" | "large";
|
|
4
|
+
export type BodyState = "loading" | "expand" | "reset" | "none";
|
|
5
|
+
export type Split = "start" | "end";
|
|
6
6
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-button/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-button/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;AAErE,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,aAAa,GAAG,MAAM,CAAC;AAE1D,MAAM,MAAM,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC;AAErC,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhE,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC"}
|
package/ebay-calendar/README.md
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
# EbayCalendar
|
|
2
2
|
|
|
3
3
|
## Demo
|
|
4
|
+
|
|
4
5
|
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/building-blocks-ebay-calendar--default)
|
|
5
6
|
|
|
6
7
|
## Usage
|
|
7
8
|
|
|
8
9
|
### Import JS
|
|
10
|
+
|
|
9
11
|
```jsx harmony
|
|
10
|
-
import { EbayCalendar } from
|
|
12
|
+
import { EbayCalendar } from "@ebay/ui-core-react/ebay-calendar";
|
|
11
13
|
```
|
|
12
14
|
|
|
13
15
|
### Import following styles from SKIN
|
|
16
|
+
|
|
14
17
|
```jsx harmony
|
|
15
18
|
import "@ebay/skin/calendar";
|
|
16
19
|
```
|
|
@@ -23,25 +26,25 @@ import "@ebay/skin/calendar";
|
|
|
23
26
|
|
|
24
27
|
| Name | Type | Stateful | Description | Data |
|
|
25
28
|
| ---------------------- | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
|
|
26
|
-
| `navigable` | Boolean | No | If true, a header is included that allows for navigation between months |
|
|
27
|
-
| `interactive` | Boolean | No | Date cells are contained in buttons for interactive calendars, and spans otherwise |
|
|
28
|
-
| `numMonths` | Number | No | Number of months to be displayed at once |
|
|
29
|
-
| `range` | Boolean | No | True if selecting a range, false if a single value |
|
|
30
|
-
| `selected` | Date, Date[] | No | Date or list of dates that are selected, represented as an ISO string or an array of ISO strings |
|
|
31
|
-
| `locale` | String | No | Locale of the date picker, default to `navigator.language` |
|
|
32
|
-
| `disableBefore` | Date | No | First date that may be selected |
|
|
33
|
-
| `disableAfter` | Date | No | Last date that may be selected |
|
|
34
|
-
| `disableWeekdays` | Number[] | No | List of weekdays that are disabled. Must be an array of numbers, where Sunday is `0` and Saturday is `6` |
|
|
35
|
-
| `disableList` | String[], Date[] | No | List of specific days that are disabled. Should be a list of ISO strings, but also accepts timestamps or `Date` objects |
|
|
36
|
-
| `linkBuilder` | Function | No | Function used to build the href for each date. The function is passed the date as a `Date` object, and should return a url string. For dates that don't have a link, the function should return a falsy value |
|
|
37
|
-
| `getA11yShowMonthText` | Function | No | Function used to get the text for showing previous and next months, defaults to `Show ${monthName}` |
|
|
38
|
-
| `a11ySelectedText` | String | No | Text to be read by screen readers when a date is selected, defaults to `Selected` |
|
|
39
|
-
| `a11yRangeStartText` | String | No | Text to be read by screen readers when a date is the start of a range, defaults to `Start of range` |
|
|
40
|
-
| `a11yInRangeText` | String | No | Text to be read by screen readers when a date is in a range, defaults to `in range` |
|
|
41
|
-
| `a11yRangeEndText` | String | No | Text to be read by screen readers when a date is the end of a range, defaults to `End of range` |
|
|
42
|
-
| `a11yTodayText` | String | No | Text to be read by screen readers when a date is the current date, defaults to `Today` |
|
|
43
|
-
| `a11yDisabledText` | String | No | Text to be read by screen readers when a date is disabled, defaults to `inactive` |
|
|
44
|
-
| `a11ySeparator` | String | No | Text to be read by screen readers to separate properties, defaults to `-` |
|
|
29
|
+
| `navigable` | Boolean | No | If true, a header is included that allows for navigation between months | |
|
|
30
|
+
| `interactive` | Boolean | No | Date cells are contained in buttons for interactive calendars, and spans otherwise | |
|
|
31
|
+
| `numMonths` | Number | No | Number of months to be displayed at once | |
|
|
32
|
+
| `range` | Boolean | No | True if selecting a range, false if a single value | |
|
|
33
|
+
| `selected` | Date, Date[] | No | Date or list of dates that are selected, represented as an ISO string or an array of ISO strings | |
|
|
34
|
+
| `locale` | String | No | Locale of the date picker, default to `navigator.language` | |
|
|
35
|
+
| `disableBefore` | Date | No | First date that may be selected | |
|
|
36
|
+
| `disableAfter` | Date | No | Last date that may be selected | |
|
|
37
|
+
| `disableWeekdays` | Number[] | No | List of weekdays that are disabled. Must be an array of numbers, where Sunday is `0` and Saturday is `6` | |
|
|
38
|
+
| `disableList` | String[], Date[] | No | List of specific days that are disabled. Should be a list of ISO strings, but also accepts timestamps or `Date` objects | |
|
|
39
|
+
| `linkBuilder` | Function | No | Function used to build the href for each date. The function is passed the date as a `Date` object, and should return a url string. For dates that don't have a link, the function should return a falsy value | |
|
|
40
|
+
| `getA11yShowMonthText` | Function | No | Function used to get the text for showing previous and next months, defaults to `Show ${monthName}` | |
|
|
41
|
+
| `a11ySelectedText` | String | No | Text to be read by screen readers when a date is selected, defaults to `Selected` | |
|
|
42
|
+
| `a11yRangeStartText` | String | No | Text to be read by screen readers when a date is the start of a range, defaults to `Start of range` | |
|
|
43
|
+
| `a11yInRangeText` | String | No | Text to be read by screen readers when a date is in a range, defaults to `in range` | |
|
|
44
|
+
| `a11yRangeEndText` | String | No | Text to be read by screen readers when a date is the end of a range, defaults to `End of range` | |
|
|
45
|
+
| `a11yTodayText` | String | No | Text to be read by screen readers when a date is the current date, defaults to `Today` | |
|
|
46
|
+
| `a11yDisabledText` | String | No | Text to be read by screen readers when a date is disabled, defaults to `inactive` | |
|
|
47
|
+
| `a11ySeparator` | String | No | Text to be read by screen readers to separate properties, defaults to `-` | |
|
|
45
48
|
| `onFocus` | Function | - | Triggered when a day is focused on, typically via keyboard events | `(event: FocusEvent, { iso })` |
|
|
46
49
|
| `onSelect` | Function | - | Triggered when a day is selected | `(event: Event, { iso })` |
|
|
47
50
|
| `onMonthChange` | Function | - | Triggered during month navigation | `(event: Event, { iso })` |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC, FocusEvent, KeyboardEvent, MouseEvent } from
|
|
2
|
-
import { DayISO } from
|
|
1
|
+
import { FC, FocusEvent, KeyboardEvent, MouseEvent } from "react";
|
|
2
|
+
import { DayISO } from "./date-utils";
|
|
3
3
|
export type EbayCalendarProps = {
|
|
4
4
|
selected?: DayISO | DayISO[];
|
|
5
5
|
numMonths?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/ebay-calendar/calendar.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAA+B,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/ebay-calendar/calendar.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAA+B,MAAM,OAAO,CAAC;AAEtG,OAAO,EAAE,MAAM,EAA6D,MAAM,cAAc,CAAC;AAGjG,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IACtD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,aAAa,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,aAAa,GAAG,UAAU,EAAE,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7F,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACpE,CAAC;AASF,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAqZvC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -5,7 +5,7 @@ type WeekdayInfo = {
|
|
|
5
5
|
weekdayLabels: string[];
|
|
6
6
|
};
|
|
7
7
|
export declare function getWeekdayInfo(localeName: string): WeekdayInfo;
|
|
8
|
-
export declare function dateArgToISO(arg?: DateConstructor[
|
|
8
|
+
export declare function dateArgToISO(arg?: DateConstructor["arguments"]): DayISO;
|
|
9
9
|
export declare function toISO(date: Date): DayISO;
|
|
10
10
|
export declare function fromISO(iso: DayISO): Date;
|
|
11
11
|
export declare function offsetISO(iso: DayISO, days: number): DayISO;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../src/ebay-calendar/date-utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAErD,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAW7D;AAED,KAAK,WAAW,GAAG;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B,
|
|
1
|
+
{"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../src/ebay-calendar/date-utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAErD,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAW7D;AAED,KAAK,WAAW,GAAG;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAEF,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAiB9D;AAED,wBAAgB,YAAY,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,GAAG,MAAM,CAIvE;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAGxC;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAEzC;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAI3D;AAED,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
package/ebay-calendar/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as EbayCalendar } from
|
|
1
|
+
export { default as EbayCalendar } from "./calendar";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-calendar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC"}
|
package/ebay-carousel/README.md
CHANGED
|
@@ -1,42 +1,41 @@
|
|
|
1
1
|
# EbayCarousel
|
|
2
2
|
|
|
3
3
|
## Demo
|
|
4
|
+
|
|
4
5
|
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/navigation-disclosure-ebay-carousel--continuous)
|
|
5
6
|
|
|
6
7
|
## Usage
|
|
7
8
|
|
|
8
9
|
```jsx
|
|
9
10
|
<EbayCarousel>
|
|
10
|
-
<CarouselItem>
|
|
11
|
-
Item 1
|
|
12
|
-
</CarouselItem>
|
|
11
|
+
<CarouselItem>Item 1</CarouselItem>
|
|
13
12
|
</EbayCarousel>
|
|
14
13
|
```
|
|
15
14
|
|
|
16
15
|
## Attributes
|
|
17
16
|
|
|
18
|
-
Name
|
|
19
|
-
|
|
20
|
-
`gap`
|
|
21
|
-
`index`
|
|
22
|
-
`itemsPerSlide`
|
|
23
|
-
`autoplay`
|
|
24
|
-
`a11yPreviousText` | String
|
|
25
|
-
`a11yNextText`
|
|
26
|
-
`a11yPauseText`
|
|
27
|
-
`a11yPlayText`
|
|
17
|
+
| Name | Type | Stateful | Required | Description |
|
|
18
|
+
| ------------------ | ----------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| `gap` | Number | Yes | No | margin between carousel items in pixels. |
|
|
20
|
+
| `index` | Number | Yes | No | 0 - based index position. It sets the current slide to be displayed |
|
|
21
|
+
| `itemsPerSlide` | Number | Yes | No | number of items for each carousel slide and enable slide controls. If set to a whole number, will default to x.1 where x is the whole number set. |
|
|
22
|
+
| `autoplay` | Boolean or Number | No | No | If true, will automatically scroll through the carousel. If a number is provided, will set the interval in milliseconds. |
|
|
23
|
+
| `a11yPreviousText` | String | No | Yes | A11y text for previous button and mask. |
|
|
24
|
+
| `a11yNextText` | String | No | Yes | A11y text for next button and mask. |
|
|
25
|
+
| `a11yPauseText` | String | No | Yes | A11y text for pause button. |
|
|
26
|
+
| `a11yPlayText` | String | No | Yes | A11y text for play button. |
|
|
28
27
|
|
|
29
28
|
## Events
|
|
30
29
|
|
|
31
|
-
Event
|
|
32
|
-
|
|
33
|
-
`onNext`
|
|
34
|
-
`onPrevious` | Event | Triggered when previous slide button is clicked
|
|
35
|
-
`onScroll`
|
|
36
|
-
`onSlide`
|
|
37
|
-
`onPause`
|
|
38
|
-
`onPlay`
|
|
39
|
-
|
|
30
|
+
| Event | Data | Description |
|
|
31
|
+
| ------------ | ----- | ----------------------------------------------- |
|
|
32
|
+
| `onNext` | Event | Trigggered when next slide button is clicked |
|
|
33
|
+
| `onPrevious` | Event | Triggered when previous slide button is clicked |
|
|
34
|
+
| `onScroll` | Event | Triggered when scrolling slides |
|
|
35
|
+
| `onSlide` | Event | new slide is navigated to (by controls or API) |
|
|
36
|
+
| `onPause` | Event | Triggered when autoplay is paused |
|
|
37
|
+
| `onPlay` | Event | Triggered when autoplay is resumed |
|
|
40
38
|
|
|
41
39
|
## CarouselItem
|
|
40
|
+
|
|
42
41
|
Will render slides content
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-control-button.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/carousel-control-button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"carousel-control-button.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/carousel-control-button.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,mBAAmB,EAAqB,MAAM,SAAS,CAAC;AAEjE,KAAK,oBAAoB,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,iBAAiB,CAAC,EAAE,EAAE,SAAS,EAAE;;KAAA,KAAK,IAAI,CAAC;CAC9E,CAAC;AAYF,QAAA,MAAM,qBAAqB,EAAE,EAAE,CAAC,oBAAoB,CAqBnD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { ComponentPropsWithoutRef, RefCallback, RefObject } from
|
|
2
|
-
import { ListItemRef } from
|
|
3
|
-
export type CarouselItemProps = ComponentPropsWithoutRef<
|
|
1
|
+
import React, { ComponentPropsWithoutRef, RefCallback, RefObject } from "react";
|
|
2
|
+
import { ListItemRef } from "./types";
|
|
3
|
+
export type CarouselItemProps = ComponentPropsWithoutRef<"li"> & {
|
|
4
4
|
slideWidth?: number;
|
|
5
5
|
offset?: number;
|
|
6
6
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-item.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/carousel-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACV,wBAAwB,EAExB,WAAW,EACX,SAAS,EAIZ,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"carousel-item.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/carousel-item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACV,wBAAwB,EAExB,WAAW,EACX,SAAS,EAIZ,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,IAAI,CAAC,GAAG;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAC/B,YAAY,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;CACzC,CAAC;;AA6BF,wBAAgD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-list.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/carousel-list.tsx"],"names":[],"mappings":"AAAA,OAAc,
|
|
1
|
+
{"version":3,"file":"carousel-list.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/carousel-list.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAA+B,SAAS,EAAyB,MAAM,OAAO,CAAC;AAI5G,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,KAAK,iBAAiB,GAAG;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC;IAChD,QAAQ,EAAE,SAAS,CAAC;IACpB,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE;;KAAA,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAmFvC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { ComponentProps, FC } from
|
|
2
|
-
export type CarouselProps = ComponentProps<
|
|
1
|
+
import React, { ComponentProps, FC } from "react";
|
|
2
|
+
export type CarouselProps = ComponentProps<"div"> & {
|
|
3
3
|
className?: string;
|
|
4
4
|
gap?: number;
|
|
5
5
|
index?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,cAAc,EAAE,EAAE,EAA+C,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,cAAc,EAAE,EAAE,EAA+C,MAAM,OAAO,CAAC;AAczG,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IAC/C,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE;;KAAA,KAAK,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE;;KAAA,KAAK,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IAC/C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,aAAa,CAwMnC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ReactElement, ReactNode, RefObject } from
|
|
3
|
-
import { ListItemRef, MovementDirection, RelativeRect } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactElement, ReactNode, RefObject } from "react";
|
|
3
|
+
import { ListItemRef, MovementDirection, RelativeRect } from "./types";
|
|
4
4
|
export declare function getRelativeRects(el: Element): RelativeRect;
|
|
5
5
|
export declare const isNativeScrolling: (el: Element) => boolean;
|
|
6
6
|
export declare const getMaxOffset: (items: ListItemRef[], slideWidth: number) => number;
|
|
@@ -16,8 +16,8 @@ export declare const getClosestIndex: (scrollLeft: number, items: ListItemRef[],
|
|
|
16
16
|
/**
|
|
17
17
|
* This function will animate the carousel to loop back to the first slide and vice versa
|
|
18
18
|
*/
|
|
19
|
-
export declare function animateCarouselLoop({ direction, nextIndex, currentIndex, itemsRef, slideWidth, gap, onAnimationStart, onAnimationEnd }: {
|
|
20
|
-
direction:
|
|
19
|
+
export declare function animateCarouselLoop({ direction, nextIndex, currentIndex, itemsRef, slideWidth, gap, onAnimationStart, onAnimationEnd, }: {
|
|
20
|
+
direction: "RIGHT" | "LEFT";
|
|
21
21
|
nextIndex: number;
|
|
22
22
|
currentIndex: number;
|
|
23
23
|
itemsRef: React.MutableRefObject<ListItemRef[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA0B,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,OAAO,GAAG,YAAY,CAS1D;AAED,eAAO,MAAM,iBAAiB,GAAI,IAAI,OAAO,KAAG,OAAuD,CAAC;AAExG,eAAO,MAAM,YAAY,GAAI,OAAO,WAAW,EAAE,EAAE,YAAY,MAAM,KAAG,MAOvE,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,WAAW,EAAE,EAAE,OAAO,MAAM,EAAE,YAAY,MAAM,KAAG,MAMnF,CAAC;AAEF,eAAO,MAAM,aAAa,GACtB,UAAU,SAAS,EACnB,UAAU,SAAS,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,EAC9C,gBAAgB,MAAM,EACtB,aAAa,MAAM,EACnB,SAAS,MAAM,EACf,MAAM,MAAM,KACb,YAAY,EAwBT,CAAC;AAgBP;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,aAAa,MAAM,EAAE,gBAAgB,MAAM,EAAE,kBAAuB,KAAG,SAAS,GAAG,MAM3G,CAAC;AAIF,eAAO,MAAM,YAAY,GACrB,WAAW,iBAAiB,EAC5B,aAAa,MAAM,EACnB,QAAQ,WAAW,EAAE,EACrB,aAAa,MAAM,EACnB,gBAAgB,MAAM,KACvB,MAyBF,CAAC;AAEF,eAAO,MAAM,eAAe,GACxB,YAAY,MAAM,EAClB,OAAO,WAAW,EAAE,EACpB,YAAY,MAAM,EAClB,sBAAiB,EACjB,MAAM,MAAM,KACb,MA0BF,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAChC,SAAS,EACT,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,GAAG,EACH,gBAAgB,EAChB,cAAc,GACjB,EAAE;IACC,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,IAAI,CAAC;CAC9B,GAAG,IAAI,CAoFP"}
|
package/ebay-carousel/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as EbayCarousel, type CarouselProps } from
|
|
2
|
-
export { default as EbayCarouselItem } from
|
|
1
|
+
export { default as EbayCarousel, type CarouselProps } from "./carousel";
|
|
2
|
+
export { default as EbayCarouselItem } from "./carousel-item";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/ebay-carousel/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("../tslib.es6-C4EgNkz1.js"),s=require("react"),q=require("classnames"),ee=require("../icon-C-bWGO-9.js"),W=require("../debounce-BQsYxxOL.js"),le=require("react-dom");require("../array.polyfill.flat-5BAolFdk.js");const ae=require("../reduced-motion-CMIhlQVx.js"),ce=require("../forwardRef-DBQKIlPy.js"),ie={prev:"chevronLeft16",next:"chevronRight16"},ue={prev:"LEFT",next:"RIGHT"},Y=({type:e,label:n,hidden:t,disabled:r,onClick:a})=>{const c=l=>{a(l,{direction:ue[e]})};return s.createElement("button",{className:q("carousel__control",`carousel__control--${e}`),"aria-label":n,"aria-disabled":r,disabled:r,onClick:c},s.createElement(ee.EbayIcon,{className:q("icon",`icon--carousel-${e}`),focusable:!1,name:ie[e],"aria-hidden":t}))};function fe(e){const n=e.parentElement,t=n?n.firstElementChild.getBoundingClientRect().left:0,{left:r,right:a}=e.getBoundingClientRect();return{left:r-t,right:a-t}}const de=e=>getComputedStyle(e).overflowX!=="visible",I=(e,n)=>{if(!e.length)return 0;const t=e[e.length-1];return Math.max(t.right-n,0)||0},he=(e,n,t)=>e.length&&Math.min(e[n].left,I(e,t))||0,me=(e,n,t,r,a,c)=>s.Children.map(e,(l,u)=>{const{style:f={}}=l.props;let i;if(t){const o=t+t%1;i=`calc(${100/o}% - ${(o-1)*c/o}px)`}const d=t?u%t===0:!0;return s.cloneElement(l,{slideWidth:r,offset:a,ref:o=>{n.current[u]=o},className:d?"carousel__snap-point":l.props.className,style:Object.assign(Object.assign({},f),{width:i||f.width,marginRight:c&&u!==s.Children.count(e)-1?`${c}px`:f.marginRight})})}),te=(e,n,t)=>{if(e>0){let r=e;return r%=n.length||1,r-=r%(t||1),r=Math.abs(r),r}return 0},ye=(e,n,t=e)=>{if(n)return Math.ceil(t/n)},Ee=e=>e==="LEFT"?-1:1,ge=(e,n,t,r,a)=>{let c=n,l;if(e==="LEFT"&&c===0)c=t.length-1;else{do{const u=Ee(e);l=t[c+=u]}while(l&&l.fullyVisible);if(e==="LEFT"&&!a){const u=l.right-r;do l=t[--c];while(l&&l.left>=u);c+=1}}return te(c,t,a)},pe=(e,n,t,r=1,a)=>{let c;if(e>=I(n,t)-a)c=n.length-1;else{const l=n.length;let u=0,f=Math.ceil(l/r)-1;for(;f-u>1;){const o=Math.floor((u+f)/2);e>n[o*r].left?u=o:f=o}const i=Math.abs(e-n[u*r].left),d=Math.abs(e-n[f*r].left);c=te((i>d?f:u)*r,n,r)}return c};function be({direction:e,nextIndex:n,currentIndex:t,itemsRef:r,slideWidth:a,gap:c,onAnimationStart:l,onAnimationEnd:u}){if(e==="RIGHT"&&n<t){let i=r.current[t].element.closest("ul");i.style.transition="none";const d=I(r.current,a)+a+c;for(let o=t;o>n;o--)r.current[o].element.style.transform=`translateX(${-d}px)`;i.style.transform=`translate3d(${a+c}px, 0, 0)`,l(),requestAnimationFrame(()=>{i.style.transition="",i.style.transform="translate3d(0, 0, 0)",i=null}),i.addEventListener("transitionend",()=>{requestAnimationFrame(()=>{for(let o=t;o>n;o--)r.current[o].element.style.transform="";u()})},{once:!0})}else if(e==="LEFT"&&n>t){let i=r.current[t].element.closest("ul");i.style.transition="none";const d=I(r.current,a)+a+c;for(let o=t;o<n;o++)r.current[o].element.style.transform=`translateX(${d}px)`;i.style.transform=`translate3d(${-d}px, 0, 0)`,l(),requestAnimationFrame(()=>{i.style.transition="",i.style.transform=`translate3d(${-d+a+c}px, 0, 0)`,i=null}),i.addEventListener("transitionend",()=>{requestAnimationFrame(()=>{for(let o=t;o<n;o++)r.current[o].element.style.transform="";u()})},{once:!0})}}const ve=(e,n)=>{let t,r,a;return function c(){const{scrollLeft:l}=e;if(a!==l){a=l,t=setTimeout(()=>{r=requestAnimationFrame(c)},90);return}n(a)}(),()=>{clearTimeout(t),cancelAnimationFrame(r)}},Se=typeof window<"u"&&"scrollBehavior"in document.body.style;function ne(e,n,t){if(Se)return e.scrollTo({left:n}),ve(e,t);let r,a,c=requestAnimationFrame(o=>{const{scrollLeft:L}=e,x=n-L,R=450;(function w(p){const b=p-o;if(b>R)return e.scrollLeft=n,l(),t();e.scrollLeft=Te(b/R)*x+L,c=requestAnimationFrame(w)})(o)});return e.addEventListener("touchstart",u),l;function l(){cancelAnimationFrame(c),r===void 0?i():(a&&a(),d())}function u(){l(),r=e.scrollLeft,e.addEventListener("touchend",f)}function f(){d(),r===e.scrollLeft&&(a=ne(e,n,t))}function i(){e.removeEventListener("touchstart",u)}function d(){e.removeEventListener("touchend",f)}}function Te(e){return e<.5?2*e*e:-1+(4-2*e)*e}const Ce=({gap:e=16,itemsPerSlide:n,slideWidth:t,offset:r,activeIndex:a,nextControlDisabled:c,isAutoplayEnabled:l,className:u,itemsRef:f,children:i,onSetActiveIndex:d,onScroll:o})=>{const[L,x]=s.useState(0),[R,w]=s.useState(!1),[p,b]=s.useState(!1),m=s.useRef(null),v=s.useRef(null);s.useEffect(()=>{if(!s.Children.count(i)||!m.current)return;if(R){w(!1);return}const E=m.current;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("../tslib.es6-C4EgNkz1.js"),s=require("react"),q=require("classnames"),ee=require("../icon-C-bWGO-9.js"),W=require("../debounce-BQsYxxOL.js"),le=require("react-dom");require("../array.polyfill.flat-5BAolFdk.js");const ae=require("../reduced-motion-CMIhlQVx.js"),ce=require("../forwardRef-DBQKIlPy.js"),ie={prev:"chevronLeft16",next:"chevronRight16"},ue={prev:"LEFT",next:"RIGHT"},Y=({type:e,label:n,hidden:t,disabled:r,onClick:a})=>{const c=l=>{a(l,{direction:ue[e]})};return s.createElement("button",{className:q("carousel__control",`carousel__control--${e}`),"aria-label":n,"aria-disabled":r,disabled:r,onClick:c},s.createElement(ee.EbayIcon,{className:q("icon",`icon--carousel-${e}`),focusable:!1,name:ie[e],"aria-hidden":t}))};function fe(e){const n=e.parentElement,t=n?n.firstElementChild.getBoundingClientRect().left:0,{left:r,right:a}=e.getBoundingClientRect();return{left:r-t,right:a-t}}const de=e=>getComputedStyle(e).overflowX!=="visible",I=(e,n)=>{if(!e.length)return 0;const t=e[e.length-1];return Math.max(t.right-n,0)||0},he=(e,n,t)=>e.length&&Math.min(e[n].left,I(e,t))||0,me=(e,n,t,r,a,c)=>s.Children.map(e,(l,u)=>{const{style:f={}}=l.props;let i;if(t){const o=t+t%1;i=`calc(${100/o}% - ${(o-1)*c/o}px)`}const d=t?u%t===0:!0;return s.cloneElement(l,{slideWidth:r,offset:a,ref:o=>{n.current[u]=o},className:d?"carousel__snap-point":l.props.className,style:Object.assign(Object.assign({},f),{width:i||f.width,marginRight:c&&u!==s.Children.count(e)-1?`${c}px`:f.marginRight})})}),te=(e,n,t)=>{if(e>0){let r=e;return r%=n.length||1,r-=r%(t||1),r=Math.abs(r),r}return 0},ye=(e,n,t=e)=>{if(n)return Math.ceil(t/n)},Ee=e=>e==="LEFT"?-1:1,ge=(e,n,t,r,a)=>{let c=n,l;if(e==="LEFT"&&c===0)c=t.length-1;else{do{const u=Ee(e);l=t[c+=u]}while(l&&l.fullyVisible);if(e==="LEFT"&&!a){const u=l.right-r;do l=t[--c];while(l&&l.left>=u);c+=1}}return te(c,t,a)},pe=(e,n,t,r=1,a)=>{let c;if(e>=I(n,t)-a)c=n.length-1;else{const l=n.length;let u=0,f=Math.ceil(l/r)-1;for(;f-u>1;){const o=Math.floor((u+f)/2);e>n[o*r].left?u=o:f=o}const i=Math.abs(e-n[u*r].left),d=Math.abs(e-n[f*r].left);c=te((i>d?f:u)*r,n,r)}return c};function be({direction:e,nextIndex:n,currentIndex:t,itemsRef:r,slideWidth:a,gap:c,onAnimationStart:l,onAnimationEnd:u}){if(e==="RIGHT"&&n<t){let i=r.current[t].element.closest("ul");i.style.transition="none";const d=I(r.current,a)+a+c;for(let o=t;o>n;o--)r.current[o].element.style.transform=`translateX(${-d}px)`;i.style.transform=`translate3d(${a+c}px, 0, 0)`,l(),requestAnimationFrame(()=>{i.style.transition="",i.style.transform="translate3d(0, 0, 0)",i=null}),i.addEventListener("transitionend",()=>{requestAnimationFrame(()=>{for(let o=t;o>n;o--)r.current[o].element.style.transform="";u()})},{once:!0})}else if(e==="LEFT"&&n>t){let i=r.current[t].element.closest("ul");i.style.transition="none";const d=I(r.current,a)+a+c;for(let o=t;o<n;o++)r.current[o].element.style.transform=`translateX(${d}px)`;i.style.transform=`translate3d(${-d}px, 0, 0)`,l(),requestAnimationFrame(()=>{i.style.transition="",i.style.transform=`translate3d(${-d+a+c}px, 0, 0)`,i=null}),i.addEventListener("transitionend",()=>{requestAnimationFrame(()=>{for(let o=t;o<n;o++)r.current[o].element.style.transform="";u()})},{once:!0})}}const ve=(e,n)=>{let t,r,a;return function c(){const{scrollLeft:l}=e;if(a!==l){a=l,t=setTimeout(()=>{r=requestAnimationFrame(c)},90);return}n(a)}(),()=>{clearTimeout(t),cancelAnimationFrame(r)}},Se=typeof window<"u"&&"scrollBehavior"in document.body.style;function ne(e,n,t){if(Se)return e.scrollTo({left:n}),ve(e,t);let r,a,c=requestAnimationFrame(o=>{const{scrollLeft:L}=e,x=n-L,R=450;(function w(p){const b=p-o;if(b>R)return e.scrollLeft=n,l(),t();e.scrollLeft=Te(b/R)*x+L,c=requestAnimationFrame(w)})(o)});return e.addEventListener("touchstart",u),l;function l(){cancelAnimationFrame(c),r===void 0?i():(a&&a(),d())}function u(){l(),r=e.scrollLeft,e.addEventListener("touchend",f)}function f(){d(),r===e.scrollLeft&&(a=ne(e,n,t))}function i(){e.removeEventListener("touchstart",u)}function d(){e.removeEventListener("touchend",f)}}function Te(e){return e<.5?2*e*e:-1+(4-2*e)*e}const Ce=({gap:e=16,itemsPerSlide:n,slideWidth:t,offset:r,activeIndex:a,nextControlDisabled:c,isAutoplayEnabled:l,className:u,itemsRef:f,children:i,onSetActiveIndex:d,onScroll:o})=>{const[L,x]=s.useState(0),[R,w]=s.useState(!1),[p,b]=s.useState(!1),m=s.useRef(null),v=s.useRef(null);s.useEffect(()=>{if(!s.Children.count(i)||!m.current)return;if(R){w(!1);return}const E=m.current;de(E)?(b(!0),ne(E,r,()=>b(!1))):x(r)},[r]);const y=s.useCallback(()=>{const _=m.current.scrollLeft,E=pe(_,f.current,t,n,e);E!==a&&(w(!0),d(E),o({index:E}))},[m.current,t,a,d]),M=()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{p||y()},640)};return s.createElement("div",{className:q("carousel__viewport",{"carousel__viewport--mask":!c&&!l},u)},s.createElement("ul",{className:"carousel__list",ref:m,onScroll:M,style:{transform:`translate3d(${-L}px, 0, 0)`}},me(i,f,n,t,r,e)))},Le=le.flushSync||(e=>e()),Re=e=>{var{gap:n=16,index:t=0,itemsPerSlide:r,a11yPreviousText:a,a11yNextText:c,a11yPauseText:l,a11yPlayText:u,autoplay:f,onScroll:i=()=>{},onNext:d=()=>{},onPrevious:o=()=>{},onSlide:L=()=>{},onPlay:x=()=>{},onPause:R=()=>{},className:w,children:p}=e,b=Z.__rest(e,["gap","index","itemsPerSlide","a11yPreviousText","a11yNextText","a11yPauseText","a11yPlayText","autoplay","onScroll","onNext","onPrevious","onSlide","onPlay","onPause","className","children"]);const[m,v]=s.useState(t),[y,M]=s.useState(0),[_,E]=s.useState(0),[k,D]=s.useState(!1),F=s.useRef(null),S=s.useRef([]),O=s.Children.count(p),T=Math.floor(r)||void 0,j=O<=T,g=!!f,re=j||_===0&&!g,H=j||_===I(S.current,y)&&!g,V=()=>{if(!F.current)return;const{width:h}=F.current.getBoundingClientRect();M(h)};s.useEffect(()=>(window.addEventListener("resize",W.debounce(V,16)),()=>{window.removeEventListener("resize",W.debounce(V,16))}),[]);const[G,X]=s.useState(!1);s.useEffect(()=>{G||E(he(S.current,m,y))},[m,y,G]),s.useEffect(()=>{t>=0&&t<=O-1&&v(t)},[t]),s.useEffect(()=>{S.current=S.current.splice(0,O)},[p]),s.useEffect(()=>{const{width:h}=F.current.getBoundingClientRect();M(h)},[F.current]);const A=ae.useReducedMotion(),[N,U]=s.useState(A);s.useEffect(()=>{U(A)},[A]);const se=h=>{U(!N),N?x(h):R(h)},J=s.useRef(m);J.current=m;const K=(h,C)=>{const P=J.current,z=ge(h,P,S.current,y,C),oe=ye(P,C,z);L({slide:oe}),g&&be({direction:h,nextIndex:z,currentIndex:P,itemsRef:S,slideWidth:y,gap:n,onAnimationStart:()=>X(!0),onAnimationEnd:()=>X(!1)}),Le(()=>v(z))};s.useEffect(()=>{if(!g||N||k)return;const C=setInterval(()=>{K("RIGHT",T)},typeof f=="number"?f:4e3);return()=>clearInterval(C)},[g,N,T,k]);const Q=(h,{direction:C})=>{K(C,T),C==="LEFT"?o(h):d(h)},$=()=>D(!0),B=()=>D(!1);return s.createElement("div",Object.assign({className:q("carousel",w,{"carousel--slides":T,"carousel--peek":T%1===0,carousel__autoplay:g})},b),s.createElement("div",{ref:F,className:"carousel__container",onFocusCapture:$,onMouseEnter:$,onTouchStartCapture:$,onBlurCapture:B,onMouseLeave:B,onTouchEndCapture:B},s.createElement(Y,{label:a,type:"prev",disabled:re,onClick:Q}),s.createElement(Ce,{itemsRef:S,offset:_,gap:n,itemsPerSlide:T,nextControlDisabled:H,isAutoplayEnabled:g,activeIndex:m,onScroll:i,onSetActiveIndex:v,slideWidth:y},p),s.createElement(Y,{type:"next",label:c,disabled:H,onClick:Q}),g?s.createElement("button",{className:"carousel__playback",type:"button",onClick:se,"aria-label":N?u:l},s.createElement(ee.EbayIcon,{name:N?"play24":"pause24"})):null))},we=e=>{var{slideWidth:n,offset:t,forwardedRef:r,children:a}=e,c=Z.__rest(e,["slideWidth","offset","forwardedRef","children"]);const l=s.useRef(null),[u,f]=s.useState(!1);return s.useImperativeHandle(r,()=>{if(!l.current)return;const{left:i,right:d}=fe(l.current),o=i===void 0||i-t>=-.01&&d-t<=n+.01;return f(o),{element:l.current,left:i,right:d,fullyVisible:o}},[n,t]),s.createElement("li",Object.assign({},c,{ref:l,"aria-hidden":!u}),a)},_e=ce.withForwardRef(we);exports.EbayCarousel=Re;exports.EbayCarouselItem=_e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-to-transition.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/scroll-to-transition.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,KAAK,kBAAkB,GAAG,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"scroll-to-transition.d.ts","sourceRoot":"","sources":["../../src/ebay-carousel/scroll-to-transition.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,KAAK,kBAAkB,GAAG,MAAM,IAAI,CAAC;AA2BrC;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,kBAAkB,CAgEhG"}
|