@ebay/ui-core-react 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/README.md +186 -0
- package/common/component-utils/forwardRef.d.ts +3 -0
- package/common/component-utils/forwardRef.d.ts.map +1 -0
- package/common/component-utils/forwardRef.js +45 -0
- package/common/component-utils/index.d.ts +3 -0
- package/common/component-utils/index.d.ts.map +1 -0
- package/common/component-utils/index.js +14 -0
- package/common/component-utils/usePrevious.d.ts +2 -0
- package/common/component-utils/usePrevious.d.ts.map +1 -0
- package/common/component-utils/usePrevious.js +12 -0
- package/common/component-utils/utils.d.ts +6 -0
- package/common/component-utils/utils.d.ts.map +1 -0
- package/common/component-utils/utils.js +37 -0
- package/common/debounce.d.ts +2 -0
- package/common/debounce.d.ts.map +1 -0
- package/common/debounce.js +26 -0
- package/common/event-utils/index.d.ts +15 -0
- package/common/event-utils/index.d.ts.map +1 -0
- package/common/event-utils/index.js +118 -0
- package/common/event-utils/types.d.ts +6 -0
- package/common/event-utils/types.d.ts.map +1 -0
- package/common/event-utils/types.js +2 -0
- package/common/event-utils/use-key-press.d.ts +3 -0
- package/common/event-utils/use-key-press.d.ts.map +1 -0
- package/common/event-utils/use-key-press.js +35 -0
- package/common/event-utils/use-roving-index.d.ts +4 -0
- package/common/event-utils/use-roving-index.d.ts.map +1 -0
- package/common/event-utils/use-roving-index.js +44 -0
- package/common/notice-utils/notice-content.d.ts +9 -0
- package/common/notice-utils/notice-content.d.ts.map +1 -0
- package/common/notice-utils/notice-content.js +13 -0
- package/common/notice-utils/notice-footer.d.ts +8 -0
- package/common/notice-utils/notice-footer.d.ts.map +1 -0
- package/common/notice-utils/notice-footer.js +34 -0
- package/common/notice-utils/notice-title.d.ts +9 -0
- package/common/notice-utils/notice-title.d.ts.map +1 -0
- package/common/notice-utils/notice-title.js +35 -0
- package/common/random-id.d.ts +2 -0
- package/common/random-id.d.ts.map +1 -0
- package/common/random-id.js +4 -0
- package/common/tooltip-utils/constants-legacy.d.ts +10 -0
- package/common/tooltip-utils/constants-legacy.d.ts.map +1 -0
- package/common/tooltip-utils/constants-legacy.js +16 -0
- package/common/tooltip-utils/constants.d.ts +6 -0
- package/common/tooltip-utils/constants.d.ts.map +1 -0
- package/common/tooltip-utils/constants.js +86 -0
- package/common/tooltip-utils/index.d.ts +8 -0
- package/common/tooltip-utils/index.d.ts.map +1 -0
- package/common/tooltip-utils/index.js +16 -0
- package/common/tooltip-utils/tooltip-close-button.d.ts +8 -0
- package/common/tooltip-utils/tooltip-close-button.d.ts.map +1 -0
- package/common/tooltip-utils/tooltip-close-button.js +8 -0
- package/common/tooltip-utils/tooltip-content.d.ts +15 -0
- package/common/tooltip-utils/tooltip-content.d.ts.map +1 -0
- package/common/tooltip-utils/tooltip-content.js +33 -0
- package/common/tooltip-utils/tooltip-host.d.ts +8 -0
- package/common/tooltip-utils/tooltip-host.d.ts.map +1 -0
- package/common/tooltip-utils/tooltip-host.js +35 -0
- package/common/tooltip-utils/tooltip.d.ts +10 -0
- package/common/tooltip-utils/tooltip.d.ts.map +1 -0
- package/common/tooltip-utils/tooltip.js +74 -0
- package/common/tooltip-utils/types.d.ts +3 -0
- package/common/tooltip-utils/types.d.ts.map +1 -0
- package/common/tooltip-utils/types.js +2 -0
- package/common/tooltip-utils/use-tooltip.d.ts +13 -0
- package/common/tooltip-utils/use-tooltip.d.ts.map +1 -0
- package/common/tooltip-utils/use-tooltip.js +25 -0
- package/ebay-alert-dialog/README.md +32 -0
- package/ebay-alert-dialog/alert-dialog.d.ts +11 -0
- package/ebay-alert-dialog/alert-dialog.d.ts.map +1 -0
- package/ebay-alert-dialog/alert-dialog.js +62 -0
- package/ebay-alert-dialog/index.d.ts +2 -0
- package/ebay-alert-dialog/index.d.ts.map +1 -0
- package/ebay-alert-dialog/index.js +4 -0
- package/ebay-badge/README.md +36 -0
- package/ebay-badge/badge.d.ts +9 -0
- package/ebay-badge/badge.d.ts.map +1 -0
- package/ebay-badge/badge.js +36 -0
- package/ebay-badge/index.d.ts +2 -0
- package/ebay-badge/index.d.ts.map +1 -0
- package/ebay-badge/index.js +4 -0
- package/ebay-breadcrumbs/README.md +48 -0
- package/ebay-breadcrumbs/breadcrumb-item.d.ts +14 -0
- package/ebay-breadcrumbs/breadcrumb-item.d.ts.map +1 -0
- package/ebay-breadcrumbs/breadcrumb-item.js +38 -0
- package/ebay-breadcrumbs/breadcrumbs.d.ts +17 -0
- package/ebay-breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/ebay-breadcrumbs/breadcrumbs.js +71 -0
- package/ebay-breadcrumbs/index.d.ts +3 -0
- package/ebay-breadcrumbs/index.d.ts.map +1 -0
- package/ebay-breadcrumbs/index.js +6 -0
- package/ebay-button/README.md +57 -0
- package/ebay-button/button-cell.d.ts +8 -0
- package/ebay-button/button-cell.d.ts.map +1 -0
- package/ebay-button/button-cell.js +40 -0
- package/ebay-button/button-loading.d.ts +4 -0
- package/ebay-button/button-loading.d.ts.map +1 -0
- package/ebay-button/button-loading.js +11 -0
- package/ebay-button/button.d.ts +19 -0
- package/ebay-button/button.d.ts.map +1 -0
- package/ebay-button/button.js +83 -0
- package/ebay-button/index.d.ts +4 -0
- package/ebay-button/index.d.ts.map +1 -0
- package/ebay-button/index.js +6 -0
- package/ebay-button/types.d.ts +4 -0
- package/ebay-button/types.d.ts.map +1 -0
- package/ebay-button/types.js +2 -0
- package/ebay-checkbox/README.md +46 -0
- package/ebay-checkbox/checkbox.d.ts +10 -0
- package/ebay-checkbox/checkbox.d.ts.map +1 -0
- package/ebay-checkbox/checkbox.js +79 -0
- package/ebay-checkbox/index.d.ts +2 -0
- package/ebay-checkbox/index.d.ts.map +1 -0
- package/ebay-checkbox/index.js +4 -0
- package/ebay-confirm-dialog/README.md +34 -0
- package/ebay-confirm-dialog/confirm-dialog.d.ts +13 -0
- package/ebay-confirm-dialog/confirm-dialog.d.ts.map +1 -0
- package/ebay-confirm-dialog/confirm-dialog.js +63 -0
- package/ebay-confirm-dialog/index.d.ts +2 -0
- package/ebay-confirm-dialog/index.d.ts.map +1 -0
- package/ebay-confirm-dialog/index.js +4 -0
- package/ebay-cta-button/README.md +34 -0
- package/ebay-cta-button/cta-button.d.ts +12 -0
- package/ebay-cta-button/cta-button.d.ts.map +1 -0
- package/ebay-cta-button/cta-button.js +41 -0
- package/ebay-cta-button/index.d.ts +2 -0
- package/ebay-cta-button/index.d.ts.map +1 -0
- package/ebay-cta-button/index.js +4 -0
- package/ebay-dialog/README.md +4 -0
- package/ebay-dialog-base/README.md +36 -0
- package/ebay-dialog-base/components/animation.d.ts +14 -0
- package/ebay-dialog-base/components/animation.d.ts.map +1 -0
- package/ebay-dialog-base/components/animation.js +99 -0
- package/ebay-dialog-base/components/dialog-close-button.d.ts +4 -0
- package/ebay-dialog-base/components/dialog-close-button.d.ts.map +1 -0
- package/ebay-dialog-base/components/dialog-close-button.js +11 -0
- package/ebay-dialog-base/components/dialog-footer.d.ts +7 -0
- package/ebay-dialog-base/components/dialog-footer.d.ts.map +1 -0
- package/ebay-dialog-base/components/dialog-footer.js +11 -0
- package/ebay-dialog-base/components/dialog-header.d.ts +5 -0
- package/ebay-dialog-base/components/dialog-header.d.ts.map +1 -0
- package/ebay-dialog-base/components/dialog-header.js +33 -0
- package/ebay-dialog-base/components/dialogBase.d.ts +31 -0
- package/ebay-dialog-base/components/dialogBase.d.ts.map +1 -0
- package/ebay-dialog-base/components/dialogBase.js +149 -0
- package/ebay-dialog-base/dialog-base-with-state.d.ts +5 -0
- package/ebay-dialog-base/dialog-base-with-state.d.ts.map +1 -0
- package/ebay-dialog-base/dialog-base-with-state.js +68 -0
- package/ebay-dialog-base/index.d.ts +6 -0
- package/ebay-dialog-base/index.d.ts.map +1 -0
- package/ebay-dialog-base/index.js +10 -0
- package/ebay-drawer-dialog/README.md +60 -0
- package/ebay-drawer-dialog/components/drawer.d.ts +18 -0
- package/ebay-drawer-dialog/components/drawer.d.ts.map +1 -0
- package/ebay-drawer-dialog/components/drawer.js +120 -0
- package/ebay-drawer-dialog/index.d.ts +2 -0
- package/ebay-drawer-dialog/index.d.ts.map +1 -0
- package/ebay-drawer-dialog/index.js +4 -0
- package/ebay-eek/README.md +34 -0
- package/ebay-eek/eek-rating.d.ts +11 -0
- package/ebay-eek/eek-rating.d.ts.map +1 -0
- package/ebay-eek/eek-rating.js +25 -0
- package/ebay-eek/eek-util.d.ts +4 -0
- package/ebay-eek/eek-util.d.ts.map +1 -0
- package/ebay-eek/eek-util.js +33 -0
- package/ebay-eek/index.d.ts +2 -0
- package/ebay-eek/index.d.ts.map +1 -0
- package/ebay-eek/index.js +4 -0
- package/ebay-expand-button/README.md +36 -0
- package/ebay-expand-button/expand-button.d.ts +13 -0
- package/ebay-expand-button/expand-button.d.ts.map +1 -0
- package/ebay-expand-button/expand-button.js +73 -0
- package/ebay-expand-button/index.d.ts +2 -0
- package/ebay-expand-button/index.d.ts.map +1 -0
- package/ebay-expand-button/index.js +4 -0
- package/ebay-field/README.md +53 -0
- package/ebay-field/description.d.ts +9 -0
- package/ebay-field/description.d.ts.map +1 -0
- package/ebay-field/description.js +38 -0
- package/ebay-field/enums.d.ts +20 -0
- package/ebay-field/enums.d.ts.map +1 -0
- package/ebay-field/enums.js +27 -0
- package/ebay-field/field.d.ts +10 -0
- package/ebay-field/field.d.ts.map +1 -0
- package/ebay-field/field.js +13 -0
- package/ebay-field/index.d.ts +6 -0
- package/ebay-field/index.d.ts.map +1 -0
- package/ebay-field/index.js +12 -0
- package/ebay-field/label.d.ts +11 -0
- package/ebay-field/label.d.ts.map +1 -0
- package/ebay-field/label.js +40 -0
- package/ebay-field/types.d.ts +5 -0
- package/ebay-field/types.d.ts.map +1 -0
- package/ebay-field/types.js +2 -0
- package/ebay-floating-label/README.md +51 -0
- package/ebay-floating-label/floating-label.d.ts +10 -0
- package/ebay-floating-label/floating-label.d.ts.map +1 -0
- package/ebay-floating-label/floating-label.js +40 -0
- package/ebay-floating-label/hooks.d.ts +26 -0
- package/ebay-floating-label/hooks.d.ts.map +1 -0
- package/ebay-floating-label/hooks.js +135 -0
- package/ebay-floating-label/index.d.ts +3 -0
- package/ebay-floating-label/index.d.ts.map +1 -0
- package/ebay-floating-label/index.js +4 -0
- package/ebay-fullscreen-dialog/README.md +33 -0
- package/ebay-fullscreen-dialog/fullscreen-dialog.d.ts +11 -0
- package/ebay-fullscreen-dialog/fullscreen-dialog.d.ts.map +1 -0
- package/ebay-fullscreen-dialog/fullscreen-dialog.js +36 -0
- package/ebay-fullscreen-dialog/index.d.ts +2 -0
- package/ebay-fullscreen-dialog/index.d.ts.map +1 -0
- package/ebay-fullscreen-dialog/index.js +4 -0
- package/ebay-icon/README.md +21 -0
- package/ebay-icon/icon.d.ts +14 -0
- package/ebay-icon/icon.d.ts.map +1 -0
- package/ebay-icon/icon.js +87 -0
- package/ebay-icon/index.d.ts +3 -0
- package/ebay-icon/index.d.ts.map +1 -0
- package/ebay-icon/index.js +4 -0
- package/ebay-icon/types.d.ts +2 -0
- package/ebay-icon/types.d.ts.map +1 -0
- package/ebay-icon/types.js +3 -0
- package/ebay-icon-button/README.md +36 -0
- package/ebay-icon-button/icon-button.d.ts +15 -0
- package/ebay-icon-button/icon-button.d.ts.map +1 -0
- package/ebay-icon-button/icon-button.js +45 -0
- package/ebay-icon-button/index.d.ts +2 -0
- package/ebay-icon-button/index.d.ts.map +1 -0
- package/ebay-icon-button/index.js +4 -0
- package/ebay-infotip/README.md +82 -0
- package/ebay-infotip/ebay-infotip-content.d.ts +8 -0
- package/ebay-infotip/ebay-infotip-content.d.ts.map +1 -0
- package/ebay-infotip/ebay-infotip-content.js +15 -0
- package/ebay-infotip/ebay-infotip-heading.d.ts +5 -0
- package/ebay-infotip/ebay-infotip-heading.d.ts.map +1 -0
- package/ebay-infotip/ebay-infotip-heading.js +34 -0
- package/ebay-infotip/ebay-infotip-host.d.ts +14 -0
- package/ebay-infotip/ebay-infotip-host.d.ts.map +1 -0
- package/ebay-infotip/ebay-infotip-host.js +39 -0
- package/ebay-infotip/ebay-infotip.d.ts +21 -0
- package/ebay-infotip/ebay-infotip.d.ts.map +1 -0
- package/ebay-infotip/ebay-infotip.js +84 -0
- package/ebay-infotip/enums.d.ts +8 -0
- package/ebay-infotip/enums.d.ts.map +1 -0
- package/ebay-infotip/enums.js +10 -0
- package/ebay-infotip/index.d.ts +7 -0
- package/ebay-infotip/index.d.ts.map +1 -0
- package/ebay-infotip/index.js +12 -0
- package/ebay-infotip/types.d.ts +2 -0
- package/ebay-infotip/types.d.ts.map +1 -0
- package/ebay-infotip/types.js +2 -0
- package/ebay-inline-notice/README.md +44 -0
- package/ebay-inline-notice/index.d.ts +4 -0
- package/ebay-inline-notice/index.d.ts.map +1 -0
- package/ebay-inline-notice/index.js +6 -0
- package/ebay-inline-notice/inline-notice.d.ts +13 -0
- package/ebay-inline-notice/inline-notice.d.ts.map +1 -0
- package/ebay-inline-notice/inline-notice.js +62 -0
- package/ebay-inline-notice/types.d.ts +2 -0
- package/ebay-inline-notice/types.d.ts.map +1 -0
- package/ebay-inline-notice/types.js +2 -0
- package/ebay-legacy-floating-label/README.md +47 -0
- package/ebay-legacy-floating-label/index.d.ts +2 -0
- package/ebay-legacy-floating-label/index.d.ts.map +1 -0
- package/ebay-legacy-floating-label/index.js +4 -0
- package/ebay-legacy-floating-label/legacy-floating-label.d.ts +8 -0
- package/ebay-legacy-floating-label/legacy-floating-label.d.ts.map +1 -0
- package/ebay-legacy-floating-label/legacy-floating-label.js +91 -0
- package/ebay-lightbox-dialog/README.md +34 -0
- package/ebay-lightbox-dialog/index.d.ts +2 -0
- package/ebay-lightbox-dialog/index.d.ts.map +1 -0
- package/ebay-lightbox-dialog/index.js +4 -0
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts +12 -0
- package/ebay-lightbox-dialog/lightbox-dialog.d.ts.map +1 -0
- package/ebay-lightbox-dialog/lightbox-dialog.js +39 -0
- package/ebay-listbox-button/README.md +38 -0
- package/ebay-listbox-button/index.d.ts +3 -0
- package/ebay-listbox-button/index.d.ts.map +1 -0
- package/ebay-listbox-button/index.js +6 -0
- package/ebay-listbox-button/listbox-button-option.d.ts +10 -0
- package/ebay-listbox-button/listbox-button-option.d.ts.map +1 -0
- package/ebay-listbox-button/listbox-button-option.js +38 -0
- package/ebay-listbox-button/listbox-button.d.ts +12 -0
- package/ebay-listbox-button/listbox-button.d.ts.map +1 -0
- package/ebay-listbox-button/listbox-button.js +235 -0
- package/ebay-menu/README.md +54 -0
- package/ebay-menu/index.d.ts +5 -0
- package/ebay-menu/index.d.ts.map +1 -0
- package/ebay-menu/index.js +8 -0
- package/ebay-menu/menu-item-separator.d.ts +5 -0
- package/ebay-menu/menu-item-separator.d.ts.map +1 -0
- package/ebay-menu/menu-item-separator.js +34 -0
- package/ebay-menu/menu-item.d.ts +12 -0
- package/ebay-menu/menu-item.d.ts.map +1 -0
- package/ebay-menu/menu-item.js +65 -0
- package/ebay-menu/menu.d.ts +15 -0
- package/ebay-menu/menu.d.ts.map +1 -0
- package/ebay-menu/menu.js +127 -0
- package/ebay-menu/types.d.ts +3 -0
- package/ebay-menu/types.d.ts.map +1 -0
- package/ebay-menu/types.js +2 -0
- package/ebay-notice-base/components/ebay-notice-content/index.d.ts +2 -0
- package/ebay-notice-base/components/ebay-notice-content/index.d.ts.map +1 -0
- package/ebay-notice-base/components/ebay-notice-content/index.js +4 -0
- package/ebay-notice-base/components/ebay-notice-content/notice-content.d.ts +8 -0
- package/ebay-notice-base/components/ebay-notice-content/notice-content.d.ts.map +1 -0
- package/ebay-notice-base/components/ebay-notice-content/notice-content.js +4 -0
- package/ebay-notice-base/components/ebay-notice-title/index.d.ts +2 -0
- package/ebay-notice-base/components/ebay-notice-title/index.d.ts.map +1 -0
- package/ebay-notice-base/components/ebay-notice-title/index.js +4 -0
- package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts +4 -0
- package/ebay-notice-base/components/ebay-notice-title/notice-title.d.ts.map +1 -0
- package/ebay-notice-base/components/ebay-notice-title/notice-title.js +11 -0
- package/ebay-notice-base/index.d.ts +3 -0
- package/ebay-notice-base/index.d.ts.map +1 -0
- package/ebay-notice-base/index.js +6 -0
- package/ebay-notice-content/README.md +6 -0
- package/ebay-notice-content/index.d.ts +2 -0
- package/ebay-notice-content/index.d.ts.map +1 -0
- package/ebay-notice-content/index.js +4 -0
- package/ebay-page-notice/README.md +48 -0
- package/ebay-page-notice/index.d.ts +5 -0
- package/ebay-page-notice/index.d.ts.map +1 -0
- package/ebay-page-notice/index.js +10 -0
- package/ebay-page-notice/page-notice-footer.d.ts +8 -0
- package/ebay-page-notice/page-notice-footer.d.ts.map +1 -0
- package/ebay-page-notice/page-notice-footer.js +12 -0
- package/ebay-page-notice/page-notice-title.d.ts +8 -0
- package/ebay-page-notice/page-notice-title.d.ts.map +1 -0
- package/ebay-page-notice/page-notice-title.js +34 -0
- package/ebay-page-notice/page-notice.d.ts +8 -0
- package/ebay-page-notice/page-notice.d.ts.map +1 -0
- package/ebay-page-notice/page-notice.js +45 -0
- package/ebay-pagination/README.md +72 -0
- package/ebay-pagination/const.d.ts +3 -0
- package/ebay-pagination/const.d.ts.map +1 -0
- package/ebay-pagination/const.js +5 -0
- package/ebay-pagination/helpers.d.ts +11 -0
- package/ebay-pagination/helpers.d.ts.map +1 -0
- package/ebay-pagination/helpers.js +67 -0
- package/ebay-pagination/index.d.ts +4 -0
- package/ebay-pagination/index.d.ts.map +1 -0
- package/ebay-pagination/index.js +6 -0
- package/ebay-pagination/pagination-item.d.ts +23 -0
- package/ebay-pagination/pagination-item.d.ts.map +1 -0
- package/ebay-pagination/pagination-item.js +62 -0
- package/ebay-pagination/pagination.d.ts +17 -0
- package/ebay-pagination/pagination.d.ts.map +1 -0
- package/ebay-pagination/pagination.js +119 -0
- package/ebay-pagination/types.d.ts +3 -0
- package/ebay-pagination/types.d.ts.map +1 -0
- package/ebay-pagination/types.js +2 -0
- package/ebay-panel-dialog/README.md +34 -0
- package/ebay-panel-dialog/index.d.ts +2 -0
- package/ebay-panel-dialog/index.d.ts.map +1 -0
- package/ebay-panel-dialog/index.js +4 -0
- package/ebay-panel-dialog/panel-dialog.d.ts +13 -0
- package/ebay-panel-dialog/panel-dialog.d.ts.map +1 -0
- package/ebay-panel-dialog/panel-dialog.js +39 -0
- package/ebay-progress-bar/README.md +34 -0
- package/ebay-progress-bar/index.d.ts +2 -0
- package/ebay-progress-bar/index.d.ts.map +1 -0
- package/ebay-progress-bar/index.js +4 -0
- package/ebay-progress-bar/progress-bar.d.ts +7 -0
- package/ebay-progress-bar/progress-bar.d.ts.map +1 -0
- package/ebay-progress-bar/progress-bar.js +34 -0
- package/ebay-progress-spinner/README.md +33 -0
- package/ebay-progress-spinner/index.d.ts +2 -0
- package/ebay-progress-spinner/index.d.ts.map +1 -0
- package/ebay-progress-spinner/index.js +4 -0
- package/ebay-progress-spinner/progress-spinner.d.ts +10 -0
- package/ebay-progress-spinner/progress-spinner.d.ts.map +1 -0
- package/ebay-progress-spinner/progress-spinner.js +40 -0
- package/ebay-progress-stepper/README.md +84 -0
- package/ebay-progress-stepper/ebay-progress-step.d.ts +13 -0
- package/ebay-progress-stepper/ebay-progress-step.d.ts.map +1 -0
- package/ebay-progress-stepper/ebay-progress-step.js +82 -0
- package/ebay-progress-stepper/ebay-progress-stepper.d.ts +11 -0
- package/ebay-progress-stepper/ebay-progress-stepper.d.ts.map +1 -0
- package/ebay-progress-stepper/ebay-progress-stepper.js +77 -0
- package/ebay-progress-stepper/ebay-progress-title.d.ts +8 -0
- package/ebay-progress-stepper/ebay-progress-title.d.ts.map +1 -0
- package/ebay-progress-stepper/ebay-progress-title.js +8 -0
- package/ebay-progress-stepper/index.d.ts +5 -0
- package/ebay-progress-stepper/index.d.ts.map +1 -0
- package/ebay-progress-stepper/index.js +8 -0
- package/ebay-progress-stepper/types.d.ts +4 -0
- package/ebay-progress-stepper/types.d.ts.map +1 -0
- package/ebay-progress-stepper/types.js +2 -0
- package/ebay-radio/README.md +52 -0
- package/ebay-radio/index.d.ts +2 -0
- package/ebay-radio/index.d.ts.map +1 -0
- package/ebay-radio/index.js +4 -0
- package/ebay-radio/radio.d.ts +10 -0
- package/ebay-radio/radio.d.ts.map +1 -0
- package/ebay-radio/radio.js +76 -0
- package/ebay-section-notice/README.md +47 -0
- package/ebay-section-notice/index.d.ts +5 -0
- package/ebay-section-notice/index.d.ts.map +1 -0
- package/ebay-section-notice/index.js +10 -0
- package/ebay-section-notice/section-notice-footer.d.ts +8 -0
- package/ebay-section-notice/section-notice-footer.d.ts.map +1 -0
- package/ebay-section-notice/section-notice-footer.js +12 -0
- package/ebay-section-notice/section-notice-title.d.ts +8 -0
- package/ebay-section-notice/section-notice-title.d.ts.map +1 -0
- package/ebay-section-notice/section-notice-title.js +34 -0
- package/ebay-section-notice/section-notice.d.ts +10 -0
- package/ebay-section-notice/section-notice.d.ts.map +1 -0
- package/ebay-section-notice/section-notice.js +50 -0
- package/ebay-section-title/README.md +70 -0
- package/ebay-section-title/cta.d.ts +10 -0
- package/ebay-section-title/cta.d.ts.map +1 -0
- package/ebay-section-title/cta.js +41 -0
- package/ebay-section-title/index.d.ts +6 -0
- package/ebay-section-title/index.d.ts.map +1 -0
- package/ebay-section-title/index.js +12 -0
- package/ebay-section-title/info.d.ts +5 -0
- package/ebay-section-title/info.d.ts.map +1 -0
- package/ebay-section-title/info.js +34 -0
- package/ebay-section-title/overflow.d.ts +5 -0
- package/ebay-section-title/overflow.d.ts.map +1 -0
- package/ebay-section-title/overflow.js +34 -0
- package/ebay-section-title/section-title.d.ts +9 -0
- package/ebay-section-title/section-title.d.ts.map +1 -0
- package/ebay-section-title/section-title.js +49 -0
- package/ebay-section-title/subtitle.d.ts +5 -0
- package/ebay-section-title/subtitle.d.ts.map +1 -0
- package/ebay-section-title/subtitle.js +34 -0
- package/ebay-section-title/title.d.ts +5 -0
- package/ebay-section-title/title.d.ts.map +1 -0
- package/ebay-section-title/title.js +34 -0
- package/ebay-select/README.md +62 -0
- package/ebay-select/ebay-select-option.d.ts +7 -0
- package/ebay-select/ebay-select-option.d.ts.map +1 -0
- package/ebay-select/ebay-select-option.js +33 -0
- package/ebay-select/ebay-select.d.ts +13 -0
- package/ebay-select/ebay-select.d.ts.map +1 -0
- package/ebay-select/ebay-select.js +137 -0
- package/ebay-select/index.d.ts +3 -0
- package/ebay-select/index.d.ts.map +1 -0
- package/ebay-select/index.js +6 -0
- package/ebay-signal/README.md +35 -0
- package/ebay-signal/index.d.ts +2 -0
- package/ebay-signal/index.d.ts.map +1 -0
- package/ebay-signal/index.js +4 -0
- package/ebay-signal/signal.d.ts +8 -0
- package/ebay-signal/signal.d.ts.map +1 -0
- package/ebay-signal/signal.js +35 -0
- package/ebay-svg/README.md +19 -0
- package/ebay-svg/index.d.ts +2 -0
- package/ebay-svg/index.d.ts.map +1 -0
- package/ebay-svg/index.js +4 -0
- package/ebay-svg/svg.d.ts +4 -0
- package/ebay-svg/svg.d.ts.map +1 -0
- package/ebay-svg/svg.js +545 -0
- package/ebay-switch/README.md +33 -0
- package/ebay-switch/ebay-switch.d.ts +7 -0
- package/ebay-switch/ebay-switch.d.ts.map +1 -0
- package/ebay-switch/ebay-switch.js +64 -0
- package/ebay-switch/index.d.ts +2 -0
- package/ebay-switch/index.d.ts.map +1 -0
- package/ebay-switch/index.js +4 -0
- package/ebay-tab/README.md +1 -0
- package/ebay-tab/enums.d.ts +14 -0
- package/ebay-tab/enums.d.ts.map +1 -0
- package/ebay-tab/enums.js +17 -0
- package/ebay-tab/index.d.ts +6 -0
- package/ebay-tab/index.d.ts.map +1 -0
- package/ebay-tab/index.js +12 -0
- package/ebay-tabs/README.md +59 -0
- package/ebay-tabs/index.d.ts +5 -0
- package/ebay-tabs/index.d.ts.map +1 -0
- package/ebay-tabs/index.js +8 -0
- package/ebay-tabs/tab-panel.d.ts +9 -0
- package/ebay-tabs/tab-panel.d.ts.map +1 -0
- package/ebay-tabs/tab-panel.js +35 -0
- package/ebay-tabs/tab.d.ts +12 -0
- package/ebay-tabs/tab.d.ts.map +1 -0
- package/ebay-tabs/tab.js +36 -0
- package/ebay-tabs/tabs.d.ts +28 -0
- package/ebay-tabs/tabs.d.ts.map +1 -0
- package/ebay-tabs/tabs.js +137 -0
- package/ebay-tabs/types.d.ts +3 -0
- package/ebay-tabs/types.d.ts.map +1 -0
- package/ebay-tabs/types.js +2 -0
- package/ebay-textbox/README.md +72 -0
- package/ebay-textbox/index.d.ts +5 -0
- package/ebay-textbox/index.d.ts.map +1 -0
- package/ebay-textbox/index.js +8 -0
- package/ebay-textbox/postfix-icon.d.ts +5 -0
- package/ebay-textbox/postfix-icon.d.ts.map +1 -0
- package/ebay-textbox/postfix-icon.js +15 -0
- package/ebay-textbox/prefix-icon.d.ts +5 -0
- package/ebay-textbox/prefix-icon.d.ts.map +1 -0
- package/ebay-textbox/prefix-icon.js +12 -0
- package/ebay-textbox/textbox.d.ts +20 -0
- package/ebay-textbox/textbox.d.ts.map +1 -0
- package/ebay-textbox/textbox.js +106 -0
- package/ebay-textbox/types.d.ts +9 -0
- package/ebay-textbox/types.d.ts.map +1 -0
- package/ebay-textbox/types.js +2 -0
- package/ebay-toast-dialog/README.md +24 -0
- package/ebay-toast-dialog/components/toast.d.ts +8 -0
- package/ebay-toast-dialog/components/toast.d.ts.map +1 -0
- package/ebay-toast-dialog/components/toast.js +36 -0
- package/ebay-toast-dialog/index.d.ts +2 -0
- package/ebay-toast-dialog/index.d.ts.map +1 -0
- package/ebay-toast-dialog/index.js +4 -0
- package/ebay-tooltip/README.md +55 -0
- package/ebay-tooltip/ebay-tooltip-content.d.ts +8 -0
- package/ebay-tooltip/ebay-tooltip-content.d.ts.map +1 -0
- package/ebay-tooltip/ebay-tooltip-content.js +8 -0
- package/ebay-tooltip/ebay-tooltip-host.d.ts +8 -0
- package/ebay-tooltip/ebay-tooltip-host.d.ts.map +1 -0
- package/ebay-tooltip/ebay-tooltip-host.js +8 -0
- package/ebay-tooltip/ebay-tooltip.d.ts +12 -0
- package/ebay-tooltip/ebay-tooltip.d.ts.map +1 -0
- package/ebay-tooltip/ebay-tooltip.js +92 -0
- package/ebay-tooltip/index.d.ts +6 -0
- package/ebay-tooltip/index.d.ts.map +1 -0
- package/ebay-tooltip/index.js +13 -0
- package/index.d.ts +38 -0
- package/index.d.ts.map +1 -0
- package/index.js +114 -0
- package/package.json +106 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
30
|
+
var Label = function (_a) {
|
|
31
|
+
var className = _a.className, children = _a.children, _b = _a.stacked, stacked = _b === void 0 ? false : _b, _c = _a.required, required = _c === void 0 ? false : _c, _d = _a.position, position = _d === void 0 ? 'start' : _d, rest = __rest(_a, ["className", "children", "stacked", "required", "position"]);
|
|
32
|
+
var wrapperClassName = classnames_1.default("field__label", className, { 'field__label--stacked': stacked }, { 'field__label--end': position === 'end' });
|
|
33
|
+
var requiredMark = required ? react_1.default.createElement(react_1.default.Fragment, null,
|
|
34
|
+
" ",
|
|
35
|
+
react_1.default.createElement("sup", null, "*")) : null;
|
|
36
|
+
return react_1.default.createElement("label", __assign({ className: wrapperClassName }, rest),
|
|
37
|
+
children,
|
|
38
|
+
requiredMark);
|
|
39
|
+
};
|
|
40
|
+
exports.default = Label;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare type FieldLayoutType = 'inline' | 'block';
|
|
2
|
+
export declare type FieldDescriptionType = 'default' | 'confirmation' | 'information' | 'attention';
|
|
3
|
+
export declare type FieldDescriptionPosition = 'inline' | 'below' | 'above';
|
|
4
|
+
export declare type LabelPosition = 'start' | 'end';
|
|
5
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ebay-field/types.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEhD,oBAAY,oBAAoB,GAAG,SAAS,GAAG,cAAc,GAAG,aAAa,GAAG,WAAW,CAAA;AAE3F,oBAAY,wBAAwB,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAA;AAEnE,oBAAY,aAAa,GAAG,OAAO,GAAG,KAAK,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# ebay-floating-label [DEPRECATED]
|
|
2
|
+
|
|
3
|
+
Use `EbayTextbox` or `EbaySelect` with the `floatingLabel` attribute instead
|
|
4
|
+
|
|
5
|
+
## Demo
|
|
6
|
+
|
|
7
|
+
[Storybook](https://opensource.ebay.com/ebayui-core-react/main/?path=/story/ebay-floating-label--default-floating-label)
|
|
8
|
+
|
|
9
|
+
## Import JS
|
|
10
|
+
|
|
11
|
+
```jsx harmony
|
|
12
|
+
import { EbayFloatingLabel } from '@ebay/ui-core-react/ebay-floating-label'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Import following styles from SKIN
|
|
16
|
+
|
|
17
|
+
```jsx harmony
|
|
18
|
+
import "@ebay/skin/floating-label";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## or import styles using SCSS/CSS
|
|
22
|
+
|
|
23
|
+
```jsx harmony
|
|
24
|
+
import "@ebay/skin/floating-label.css";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
yarn add @ebay/ui-core-react
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```jsx harmony
|
|
34
|
+
<EbayFloatingLabel label="Search" value="Search for anything" />
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Attributes
|
|
38
|
+
|
|
39
|
+
| Name | Type | Stateful | Required | Description |
|
|
40
|
+
| ----------- | -------- | -------- | -------- | -------------------------------------------------------------------------- |
|
|
41
|
+
| `id` | String | No | Yes | ID for the input element, necessary for accessibility |
|
|
42
|
+
| `label` | String | No | No | Text of the label |
|
|
43
|
+
| `disabled` | Boolean | No | No | indicates the field is disabled if true |
|
|
44
|
+
| `invalid` | Boolean | No | No | indicates a field-level error with red border if true |
|
|
45
|
+
| `value` | String | No | No | Value of the input |
|
|
46
|
+
| `inputSize` | String | No | No | `default` (default), `large` |
|
|
47
|
+
| `elementType` | String | No | No | `textbox` (default), `select` |
|
|
48
|
+
| `onFocus` | Function | No | No | called when input gets focus, parameters passed: `originalEvent`, `value` |
|
|
49
|
+
| `onBlur` | Function | No | No | called when input loses focus, parameters passed: `originalEvent`, `value` |
|
|
50
|
+
|
|
51
|
+
It supports all the events supported by an input element (e.g. `onChange`, `onInput`, `onKeyDown`, `onKeyUp`)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EbayTextboxProps } from '../ebay-textbox';
|
|
3
|
+
import { EbaySelectProps } from '../ebay-select';
|
|
4
|
+
declare type Props = EbayTextboxProps & EbaySelectProps & {
|
|
5
|
+
label: string;
|
|
6
|
+
elementType?: 'textbox' | 'select';
|
|
7
|
+
};
|
|
8
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "form" | "label" | "slot" | "style" | "title" | "pattern" | "type" | "name" | "className" | "forwardedRef" | "color" | "height" | "id" | "lang" | "max" | "min" | "width" | "role" | "tabIndex" | "crossOrigin" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "list" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "step" | "size" | "fluid" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "borderless" | "invalid" | "checked" | "accept" | "alt" | "autoComplete" | "capture" | "cols" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "rows" | "src" | "wrap" | "underline" | "inputSize" | "dirName" | "multiline" | "onButtonClick" | "floatingLabel" | "elementType"> & React.RefAttributes<React.FC<Props>>>;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=floating-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-label.d.ts","sourceRoot":"","sources":["../../src/ebay-floating-label/floating-label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AACjC,OAAO,EAAe,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAE/D,OAAO,EAAc,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAE5D,aAAK,KAAK,GAAG,gBAAgB,GAAG,eAAe,GAAG;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CACrC,CAAC;;AA2BF,wBAAgD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var ebay_textbox_1 = require("../ebay-textbox");
|
|
30
|
+
var component_utils_1 = require("../common/component-utils");
|
|
31
|
+
var ebay_select_1 = require("../ebay-select");
|
|
32
|
+
var EbayFloatingLabel = function (_a) {
|
|
33
|
+
var label = _a.label, forwardedRef = _a.forwardedRef, _b = _a.elementType, elementType = _b === void 0 ? 'textbox' : _b, rest = __rest(_a, ["label", "forwardedRef", "elementType"]);
|
|
34
|
+
var inputRef = function () { return forwardedRef; };
|
|
35
|
+
if (elementType === 'select') {
|
|
36
|
+
return (react_1.default.createElement(ebay_select_1.EbaySelect, __assign({}, rest, { floatingLabel: label })));
|
|
37
|
+
}
|
|
38
|
+
return (react_1.default.createElement(ebay_textbox_1.EbayTextbox, __assign({}, rest, { ref: inputRef(), floatingLabel: label })));
|
|
39
|
+
};
|
|
40
|
+
exports.default = component_utils_1.withForwardRef(EbayFloatingLabel);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC, RefObject, ReactNode, ComponentProps } from 'react';
|
|
2
|
+
declare type InputRef = RefObject<HTMLSelectElement | HTMLTextAreaElement | HTMLInputElement> | any;
|
|
3
|
+
declare type FloatingLabelHookProps = {
|
|
4
|
+
inputId?: string;
|
|
5
|
+
ref?: InputRef;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
inputSize?: 'default' | 'large';
|
|
9
|
+
inputValue?: ComponentProps<'input'>['value'];
|
|
10
|
+
className?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
invalid?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare type FloatingLabelHookReturn = {
|
|
15
|
+
label: ReactNode;
|
|
16
|
+
onBlur: () => void;
|
|
17
|
+
onFocus: () => void;
|
|
18
|
+
Container: FC<{
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
}>;
|
|
21
|
+
ref: InputRef;
|
|
22
|
+
placeholder: string;
|
|
23
|
+
};
|
|
24
|
+
export declare function useFloatingLabel({ ref, inputId, className, disabled, label, inputSize, inputValue, placeholder, invalid }: FloatingLabelHookProps): FloatingLabelHookReturn;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/ebay-floating-label/hooks.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA+B,EAAE,EAAE,SAAS,EAAe,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAGjH,aAAK,QAAQ,GAAG,SAAS,CAAC,iBAAiB,GAAG,mBAAmB,GAAG,gBAAgB,CAAC,GAAG,GAAG,CAAA;AAC3F,aAAK,sBAAsB,GAAG;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAA;AAED,aAAK,uBAAuB,GAAG;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,EAAE,CAAC;QAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IACxC,GAAG,EAAE,QAAQ,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACvB,CAAA;AA4CD,wBAAgB,gBAAgB,CAAC,EAC7B,GAAG,EACH,OAAO,EACP,SAAS,EACT,QAAQ,EACR,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,OAAO,EACV,EAAG,sBAAsB,GAAG,uBAAuB,CA2EnD"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.useFloatingLabel = void 0;
|
|
26
|
+
var react_1 = __importStar(require("react"));
|
|
27
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
28
|
+
var classPrefix = 'floating-label__label';
|
|
29
|
+
// input background in Skin 12, used for autofill detection
|
|
30
|
+
var textboxElementBackgroundRGB = [
|
|
31
|
+
'rgb(245, 245, 245)',
|
|
32
|
+
'rgb(247, 247, 247)' // From skin version 12.6.0
|
|
33
|
+
];
|
|
34
|
+
// check for computed background color because of Chrome autofill bug
|
|
35
|
+
// https://stackoverflow.com/questions/35049555/chrome-autofill-autocomplete-no-value-for-password/35783761#35783761
|
|
36
|
+
var isAutofilled = function (input) {
|
|
37
|
+
return input && !textboxElementBackgroundRGB.includes(getComputedStyle(input).backgroundColor);
|
|
38
|
+
};
|
|
39
|
+
var hasValue = function (input) { var _a; return ((_a = input === null || input === void 0 ? void 0 : input.value) === null || _a === void 0 ? void 0 : _a.length) > 0; };
|
|
40
|
+
var isSelect = function (element) { return (element === null || element === void 0 ? void 0 : element.tagName) === "SELECT"; };
|
|
41
|
+
var setPlaceholder = function (element, value) {
|
|
42
|
+
// For select elements we need to temporary remove the text of the first option
|
|
43
|
+
// when the element is not focused, so only the label is shown. We still need to
|
|
44
|
+
// maintain the width of the input so we manually change the "min-width"
|
|
45
|
+
// Inspired by the marko implementation: https://github.com/makeup/makeup-js/blob/master/packages/makeup-floating-label/src/index.js
|
|
46
|
+
if (isSelect(element) && !hasValue(element.querySelector("option"))) {
|
|
47
|
+
element.style['min-width'] = '';
|
|
48
|
+
var beforeWidth = element.offsetWidth;
|
|
49
|
+
element.querySelector("option").text = value;
|
|
50
|
+
if (!value && beforeWidth > element.offsetWidth) {
|
|
51
|
+
element.style['min-width'] = beforeWidth + "px";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
var getPlaceholder = function (element) {
|
|
56
|
+
if (isSelect(element)) {
|
|
57
|
+
return element.querySelector("option").text;
|
|
58
|
+
}
|
|
59
|
+
return element === null || element === void 0 ? void 0 : element.placeholder;
|
|
60
|
+
};
|
|
61
|
+
function useFloatingLabel(_a) {
|
|
62
|
+
var _b;
|
|
63
|
+
var ref = _a.ref, inputId = _a.inputId, className = _a.className, disabled = _a.disabled, label = _a.label, inputSize = _a.inputSize, inputValue = _a.inputValue, placeholder = _a.placeholder, invalid = _a.invalid;
|
|
64
|
+
var _internalInputRef = react_1.useRef(null);
|
|
65
|
+
var inputRef = function () { return ref || _internalInputRef; };
|
|
66
|
+
var _c = react_1.useState(true), isFloating = _c[0], setFloating = _c[1];
|
|
67
|
+
var _d = react_1.useState(false), shouldAnimate = _d[0], setAnimate = _d[1];
|
|
68
|
+
var _e = react_1.useState(false), isFocused = _e[0], setFocused = _e[1];
|
|
69
|
+
var selectFirstOptionText = react_1.useRef("");
|
|
70
|
+
var onBlur = function () {
|
|
71
|
+
setAnimate(true);
|
|
72
|
+
setFloating(false);
|
|
73
|
+
setFocused(false);
|
|
74
|
+
setPlaceholder(inputRef().current, "");
|
|
75
|
+
};
|
|
76
|
+
var onFocus = function () {
|
|
77
|
+
var _a;
|
|
78
|
+
setAnimate(true);
|
|
79
|
+
setFloating(true);
|
|
80
|
+
setFocused(true);
|
|
81
|
+
setPlaceholder((_a = inputRef()) === null || _a === void 0 ? void 0 : _a.current, selectFirstOptionText.current);
|
|
82
|
+
};
|
|
83
|
+
react_1.useEffect(function () {
|
|
84
|
+
var _a, _b;
|
|
85
|
+
if (!label) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
selectFirstOptionText.current = getPlaceholder((_a = inputRef()) === null || _a === void 0 ? void 0 : _a.current);
|
|
89
|
+
setPlaceholder((_b = inputRef()) === null || _b === void 0 ? void 0 : _b.current, "");
|
|
90
|
+
}, []);
|
|
91
|
+
react_1.useEffect(function () {
|
|
92
|
+
var _a, _b;
|
|
93
|
+
if (!label) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
setFloating(isFocused || hasValue((_a = inputRef()) === null || _a === void 0 ? void 0 : _a.current) || isAutofilled((_b = inputRef()) === null || _b === void 0 ? void 0 : _b.current));
|
|
97
|
+
}, [isFocused, inputValue]);
|
|
98
|
+
var labelClassName = classnames_1.default(className, classPrefix, (_b = {},
|
|
99
|
+
_b[classPrefix + "--disabled"] = disabled,
|
|
100
|
+
_b[classPrefix + "--animate"] = shouldAnimate,
|
|
101
|
+
_b[classPrefix + "--inline"] = !isFloating,
|
|
102
|
+
_b[classPrefix + "--invalid"] = invalid,
|
|
103
|
+
_b));
|
|
104
|
+
var floatingLabelClassName = classnames_1.default("floating-label", {
|
|
105
|
+
'floating-label--large': inputSize === "large"
|
|
106
|
+
});
|
|
107
|
+
var FragmentContainer = react_1.useCallback(function (_a) {
|
|
108
|
+
var children = _a.children;
|
|
109
|
+
return react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
110
|
+
}, []);
|
|
111
|
+
var FloatingLabelContainer = react_1.useCallback(function (_a) {
|
|
112
|
+
var children = _a.children;
|
|
113
|
+
return react_1.default.createElement("span", { className: floatingLabelClassName }, children);
|
|
114
|
+
}, [floatingLabelClassName]);
|
|
115
|
+
if (!label) {
|
|
116
|
+
return {
|
|
117
|
+
label: null,
|
|
118
|
+
Container: FragmentContainer,
|
|
119
|
+
onBlur: function () { },
|
|
120
|
+
onFocus: function () { },
|
|
121
|
+
ref: inputRef(),
|
|
122
|
+
placeholder: placeholder
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
var labelElement = react_1.default.createElement("label", { htmlFor: inputId, className: labelClassName }, label);
|
|
126
|
+
return {
|
|
127
|
+
label: labelElement,
|
|
128
|
+
Container: FloatingLabelContainer,
|
|
129
|
+
onBlur: onBlur,
|
|
130
|
+
onFocus: onFocus,
|
|
131
|
+
ref: inputRef(),
|
|
132
|
+
placeholder: !isFloating ? null : placeholder
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
exports.useFloatingLabel = useFloatingLabel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-floating-label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# EbayFullscreenDialog
|
|
2
|
+
|
|
3
|
+
## Usage
|
|
4
|
+
|
|
5
|
+
```react
|
|
6
|
+
<EbayFullscreenDialog open a11yClosetext = "Close">
|
|
7
|
+
<EbayDialogHeader>Heading</EbayDialogHeader>
|
|
8
|
+
<p>Body content</p>
|
|
9
|
+
<EbayDialogFooter>Heading</EbayDialogHeader>
|
|
10
|
+
</EbayFullscreenDialog>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Attributes
|
|
14
|
+
|
|
15
|
+
Name | Type | Stateful | Required | Description
|
|
16
|
+
--- | --- | --- | --- | ---
|
|
17
|
+
`open` | Boolean | Yes | No | Whether dialog is open.
|
|
18
|
+
`focus` | String | No | No | An id for an element which will receive focus when the drawer opens (defaults to close button).
|
|
19
|
+
`a11yCloseText` | String | No | Yes | A11y text for close button and mask.
|
|
20
|
+
`animated` | Boolean | Yes | No | Renders the dialog with an animation. Note that the dialog will always be present in the DOM
|
|
21
|
+
|
|
22
|
+
## Events
|
|
23
|
+
|
|
24
|
+
Event | Data | Description
|
|
25
|
+
--- | --- | ---
|
|
26
|
+
`onOpen` | | Trigggered when dialog is opened
|
|
27
|
+
`onClose` | | Triggered when dialog is closed
|
|
28
|
+
|
|
29
|
+
## EbayDialogHeader
|
|
30
|
+
Will render a header content for fullscreen dialog. Will always render the header element even if this is not present
|
|
31
|
+
|
|
32
|
+
## EbayDialogFooter
|
|
33
|
+
Will render the footer content for fullscreen dialog. If not present then will not have any footer.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DialogBaseProps } from '../ebay-dialog-base';
|
|
3
|
+
export interface Props<T = any> extends DialogBaseProps<T> {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
sliding?: boolean;
|
|
6
|
+
onOpen?: () => void;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const EbayFullscreenDialog: FC<Props>;
|
|
10
|
+
export default EbayFullscreenDialog;
|
|
11
|
+
//# sourceMappingURL=fullscreen-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullscreen-dialog.d.ts","sourceRoot":"","sources":["../../src/ebay-fullscreen-dialog/fullscreen-dialog.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,eAAe,EAAuB,MAAM,qBAAqB,CAAA;AAI1E,MAAM,WAAW,KAAK,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAkB;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CAqBnC,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var react_1 = __importDefault(require("react"));
|
|
29
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
30
|
+
var ebay_dialog_base_1 = require("../ebay-dialog-base");
|
|
31
|
+
var classPrefix = 'fullscreen-dialog';
|
|
32
|
+
var EbayFullscreenDialog = function (_a) {
|
|
33
|
+
var open = _a.open, _b = _a.onClose, onClose = _b === void 0 ? function () { } : _b, _c = _a.onOpen, onOpen = _c === void 0 ? function () { } : _c, _d = _a.a11yCloseText, a11yCloseText = _d === void 0 ? 'Close Dialog' : _d, className = _a.className, animated = _a.animated, sliding = _a.sliding, rest = __rest(_a, ["open", "onClose", "onOpen", "a11yCloseText", "className", "animated", "sliding"]);
|
|
34
|
+
return (react_1.default.createElement(ebay_dialog_base_1.DialogBaseWithState, __assign({}, rest, { classPrefix: classPrefix, buttonPosition: "left", onCloseBtnClick: onClose, transitionElement: "window", animated: sliding || animated, className: classnames_1.default(className, classPrefix + "--mask-fade-slow"), windowClass: classnames_1.default(classPrefix + "__window", classPrefix + "__window--slide"), open: open })));
|
|
35
|
+
};
|
|
36
|
+
exports.default = EbayFullscreenDialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-fullscreen-dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var fullscreen_dialog_1 = require("./fullscreen-dialog");
|
|
4
|
+
Object.defineProperty(exports, "EbayFullscreenDialog", { enumerable: true, get: function () { return fullscreen_dialog_1.default; } });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ebay-icon
|
|
2
|
+
The component will include the actual SVG markup in the HTML and then reference the chosen icon.
|
|
3
|
+
|
|
4
|
+
## Usage
|
|
5
|
+
```jsx
|
|
6
|
+
import { EbayIcon } from '@ebay/ui-core-react/ebay-icon'
|
|
7
|
+
import '@ebay/skin/icon'
|
|
8
|
+
|
|
9
|
+
<EbayIcon name="arrowLeft" />
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### Notes
|
|
13
|
+
Make sure you use `<EbaySvg />` in your code (ideally on server side only), so that actual SVG icons exist inside HTML.
|
|
14
|
+
|
|
15
|
+
## Attributes
|
|
16
|
+
|
|
17
|
+
Name | Type | Stateful | Required | Description
|
|
18
|
+
--- | --- | --- | --- | ---
|
|
19
|
+
`name` | String | No | Yes | name of the icon from [Skin](./icon.tsx), transparent versions of colored icons has `-transparent` suffix
|
|
20
|
+
`noSkinClasses` | Boolean | No | No | Used for special cases where `icon` classes from Skin should not be applied
|
|
21
|
+
`a11yText` | String | No | Yes | text for non-decorative inline icon; icon is assumed to be decorative if this is not passed
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { Ref, SVGProps } from 'react';
|
|
2
|
+
import { Icon } from './types';
|
|
3
|
+
export declare type A11yVariant = 'label';
|
|
4
|
+
export declare type EbayIconProps = SVGProps<SVGSVGElement> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
name: Icon;
|
|
7
|
+
noSkinClasses?: boolean;
|
|
8
|
+
a11yText?: string;
|
|
9
|
+
a11yVariant?: A11yVariant;
|
|
10
|
+
forwardedRef?: Ref<SVGSVGElement>;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<EbayIconProps, "string" | "style" | "clipPath" | "filter" | "mask" | "path" | "type" | "overflow" | "name" | "className" | "noSkinClasses" | "a11yText" | "a11yVariant" | "forwardedRef" | "color" | "height" | "id" | "lang" | "max" | "media" | "method" | "min" | "target" | "width" | "role" | "tabIndex" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React.RefAttributes<React.FC<EbayIconProps>>>;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/ebay-icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,GAAG,EAAE,QAAQ,EAAuB,MAAM,OAAO,CAAA;AAIrE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAM9B,oBAAY,WAAW,GAAG,OAAO,CAAC;AAElC,oBAAY,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,YAAY,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;CACrC,CAAC;;AA8DF,wBAAuC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
|
+
var t = {};
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
37
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
39
|
+
t[p[i]] = s[p[i]];
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
42
|
+
};
|
|
43
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
44
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
var react_1 = __importStar(require("react"));
|
|
48
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
49
|
+
var component_utils_1 = require("../common/component-utils");
|
|
50
|
+
var random_id_1 = require("../common/random-id");
|
|
51
|
+
var SMALL_ICON_SIZE = 16;
|
|
52
|
+
var LARGE_ICON_SIZE = 64;
|
|
53
|
+
var DEFAULT_ICON_SIZE = 24;
|
|
54
|
+
var EbayIcon = function (_a) {
|
|
55
|
+
var _b;
|
|
56
|
+
var name = _a.name, extraClass = _a.className, _c = _a.noSkinClasses, noSkinClasses = _c === void 0 ? false : _c, a11yText = _a.a11yText, a11yVariant = _a.a11yVariant, forwardedRef = _a.forwardedRef, rest = __rest(_a, ["name", "className", "noSkinClasses", "a11yText", "a11yVariant", "forwardedRef"]);
|
|
57
|
+
var _d = react_1.useState(''), rId = _d[0], setRandomId = _d[1];
|
|
58
|
+
react_1.useEffect(function () {
|
|
59
|
+
setRandomId(random_id_1.randomId());
|
|
60
|
+
}, []);
|
|
61
|
+
var noTitle = a11yVariant === 'label';
|
|
62
|
+
var a11yTextId = a11yText && "icon-title-" + rId;
|
|
63
|
+
var a11yProps = a11yText ? {
|
|
64
|
+
'aria-labelledby': noTitle ? undefined : a11yTextId,
|
|
65
|
+
'aria-label': noTitle ? a11yText : undefined,
|
|
66
|
+
role: 'img'
|
|
67
|
+
} : {
|
|
68
|
+
'aria-hidden': true
|
|
69
|
+
};
|
|
70
|
+
var iconSize = getIconSize(name) + "px";
|
|
71
|
+
var kebabName = kebabCased(name);
|
|
72
|
+
var className = classnames_1.default(extraClass, { 'icon': !noSkinClasses }, (_b = {}, _b["icon--" + kebabName] = !noSkinClasses, _b));
|
|
73
|
+
return (react_1.default.createElement("svg", __assign({ height: iconSize, width: iconSize }, rest, { className: className, xmlns: "http://www.w3.org/2000/svg", focusable: false, ref: forwardedRef }, a11yProps),
|
|
74
|
+
a11yText && !noTitle && react_1.default.createElement("title", { id: a11yTextId }, a11yText),
|
|
75
|
+
react_1.default.createElement("use", { xlinkHref: "#icon-" + kebabName })));
|
|
76
|
+
};
|
|
77
|
+
function getIconSize(iconName) {
|
|
78
|
+
var sizeCandidate = iconName.split('-').slice(-1)[0];
|
|
79
|
+
return {
|
|
80
|
+
small: SMALL_ICON_SIZE,
|
|
81
|
+
large: LARGE_ICON_SIZE
|
|
82
|
+
}[sizeCandidate] || DEFAULT_ICON_SIZE;
|
|
83
|
+
}
|
|
84
|
+
function kebabCased(str) {
|
|
85
|
+
return str.replace(/([A-Z])/g, function (s, c) { return "-" + c.toLowerCase(); });
|
|
86
|
+
}
|
|
87
|
+
exports.default = component_utils_1.withForwardRef(EbayIcon);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ebay-icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA"}
|