easy-component-ui 2.1.0 → 3.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/LICENSE +21 -21
- package/README.md +162 -90
- package/dist/assets/icon.css +1 -0
- package/dist/components/Base.js +872 -0
- package/dist/components/ea-alert.js +196 -0
- package/dist/components/ea-avatar.js +159 -0
- package/dist/components/ea-backtop.js +136 -0
- package/dist/components/ea-badge.js +144 -0
- package/dist/components/ea-breadcrumb.js +148 -0
- package/dist/components/ea-button.js +261 -0
- package/dist/components/ea-calendar.js +10 -0
- package/dist/components/ea-calendar2.js +673 -0
- package/dist/components/ea-card.js +85 -0
- package/dist/components/ea-carousel.js +374 -0
- package/dist/components/ea-checkbox.js +446 -0
- package/dist/components/ea-collapse.js +293 -0
- package/dist/components/ea-color-picker.js +888 -0
- package/dist/components/ea-container.js +177 -0
- package/dist/components/ea-countdown.js +121 -0
- package/dist/components/ea-date-picker.js +649 -0
- package/dist/components/ea-descriptions.js +411 -0
- package/dist/components/ea-dialog.js +249 -0
- package/dist/components/ea-drawer.js +194 -0
- package/dist/components/ea-dropdown.js +228 -0
- package/dist/components/ea-empty.js +85 -0
- package/dist/components/ea-icon.js +68 -0
- package/dist/components/ea-image-preview.js +488 -0
- package/dist/components/ea-image.js +302 -0
- package/dist/components/ea-infinite-scroll.js +109 -0
- package/dist/components/ea-input-number.js +367 -0
- package/dist/components/ea-input.js +588 -0
- package/dist/components/ea-layout.js +125 -0
- package/dist/components/ea-link.js +95 -0
- package/dist/components/ea-loading.js +151 -0
- package/dist/components/ea-menu.js +417 -0
- package/dist/components/ea-message-box.js +624 -0
- package/dist/components/ea-message.js +251 -0
- package/dist/components/ea-notification.js +331 -0
- package/dist/components/ea-overlay.js +161 -0
- package/dist/components/ea-page-header.js +108 -0
- package/dist/components/ea-pagination.js +480 -0
- package/dist/components/ea-popconfirm.js +220 -0
- package/dist/components/ea-popover.js +123 -0
- package/dist/components/ea-popper.js +203 -0
- package/dist/components/ea-progress.js +269 -0
- package/dist/components/ea-radio.js +364 -0
- package/dist/components/ea-rate.js +241 -0
- package/dist/components/ea-result.js +100 -0
- package/dist/components/ea-scrollbar.js +235 -0
- package/dist/components/ea-segmented.js +215 -0
- package/dist/components/ea-select.js +598 -0
- package/dist/components/ea-skeleton.js +246 -0
- package/dist/components/ea-slider.js +421 -0
- package/dist/components/ea-space.js +109 -0
- package/dist/components/ea-splitter.js +217 -0
- package/dist/components/ea-statistic.js +6 -0
- package/dist/components/ea-statistic2.js +83 -0
- package/dist/components/ea-steps.js +312 -0
- package/dist/components/ea-switch.js +271 -0
- package/dist/components/ea-table.js +1007 -0
- package/dist/components/ea-tabs.js +501 -0
- package/dist/components/ea-tag.js +234 -0
- package/dist/components/ea-text.js +103 -0
- package/dist/components/ea-time-picker.js +514 -0
- package/dist/components/ea-timeline.js +186 -0
- package/dist/components/ea-tooltip.js +121 -0
- package/dist/components/ea-tour.js +544 -0
- package/dist/components/ea-transfer.js +949 -0
- package/dist/components/ea-tree.js +1088 -0
- package/dist/components/index.js +61 -0
- package/dist/core/FormBase.js +238 -0
- package/dist/css/ea-alert.style.js +4 -0
- package/dist/css/ea-aside.style.js +4 -0
- package/dist/css/ea-avatar.style.js +4 -0
- package/dist/css/ea-backtop.style.js +4 -0
- package/dist/css/ea-badge.style.js +4 -0
- package/dist/css/ea-breadcrumb-item.style.js +4 -0
- package/dist/css/ea-breadcrumb.style.js +4 -0
- package/dist/css/ea-button-group.style.js +4 -0
- package/dist/css/ea-button.style.js +4 -0
- package/dist/css/ea-calendar.style.js +4 -0
- package/dist/css/ea-card.style.js +4 -0
- package/dist/css/ea-carousel-item.style.js +4 -0
- package/dist/css/ea-carousel.style.js +4 -0
- package/dist/css/ea-check-tag.style.js +4 -0
- package/dist/css/ea-checkbox-group.style.js +4 -0
- package/dist/css/ea-checkbox.style.js +4 -0
- package/dist/css/ea-col.style.js +4 -0
- package/dist/css/ea-collapse-item.style.js +4 -0
- package/dist/css/ea-collapse.style.js +4 -0
- package/dist/css/ea-color-picker-panel.style.js +4 -0
- package/dist/css/ea-color-picker.style.js +4 -0
- package/dist/css/ea-container.style.js +4 -0
- package/dist/css/ea-date-picker.style.js +4 -0
- package/dist/css/ea-descriptions-item.style.js +4 -0
- package/dist/css/ea-descriptions.style.js +4 -0
- package/dist/css/ea-dialog.style.js +4 -0
- package/dist/css/ea-drawer.style.js +4 -0
- package/dist/css/ea-dropdown-item.style.js +4 -0
- package/dist/css/ea-dropdown-menu.style.js +4 -0
- package/dist/css/ea-dropdown.style.js +4 -0
- package/dist/css/ea-empty.style.js +4 -0
- package/dist/css/ea-footer.style.js +4 -0
- package/dist/css/ea-header.style.js +4 -0
- package/dist/css/ea-icon.style.js +4 -0
- package/dist/css/ea-image-preview.style.js +4 -0
- package/dist/css/ea-image.style.js +4 -0
- package/dist/css/ea-infinite-scroll.style.js +4 -0
- package/dist/css/ea-input-number.style.js +4 -0
- package/dist/css/ea-input.style.js +4 -0
- package/dist/css/ea-link.style.js +4 -0
- package/dist/css/ea-main.style.js +4 -0
- package/dist/css/ea-menu-item-group.style.js +4 -0
- package/dist/css/ea-menu-item.style.js +4 -0
- package/dist/css/ea-menu.style.js +4 -0
- package/dist/css/ea-message-box.style.js +4 -0
- package/dist/css/ea-message.style.js +4 -0
- package/dist/css/ea-notification.style.js +4 -0
- package/dist/css/ea-option-gropu.style.js +4 -0
- package/dist/css/ea-option.style.js +4 -0
- package/dist/css/ea-overlay.style.js +4 -0
- package/dist/css/ea-page-header.style.js +4 -0
- package/dist/css/ea-pagination.style.js +4 -0
- package/dist/css/ea-popconfirm.style.js +4 -0
- package/dist/css/ea-popover.style.js +4 -0
- package/dist/css/ea-popper.style.js +4 -0
- package/dist/css/ea-progress.style.js +4 -0
- package/dist/css/ea-radio-group.style.js +4 -0
- package/dist/css/ea-radio.style.js +4 -0
- package/dist/css/ea-rate.style.js +4 -0
- package/dist/css/ea-result.style.js +4 -0
- package/dist/css/ea-row.style.js +4 -0
- package/dist/css/ea-scrollbar.style.js +4 -0
- package/dist/css/ea-segmented.style.js +4 -0
- package/dist/css/ea-select.style.js +4 -0
- package/dist/css/ea-skeleton-item.style.js +4 -0
- package/dist/css/ea-skeleton.style.js +4 -0
- package/dist/css/ea-slider.style.js +4 -0
- package/dist/css/ea-space.style.js +4 -0
- package/dist/css/ea-splitter-bar.style.js +4 -0
- package/dist/css/ea-splitter-panel.style.js +4 -0
- package/dist/css/ea-splitter.style.js +4 -0
- package/dist/css/ea-statistic.style.js +4 -0
- package/dist/css/ea-step.style.js +4 -0
- package/dist/css/ea-steps.style.js +4 -0
- package/dist/css/ea-sub-menu.style.js +4 -0
- package/dist/css/ea-switch.style.js +4 -0
- package/dist/css/ea-tab-panel.style.js +4 -0
- package/dist/css/ea-tab.style.js +4 -0
- package/dist/css/ea-table.style.js +4 -0
- package/dist/css/ea-tabs.style.js +4 -0
- package/dist/css/ea-tag.style.js +4 -0
- package/dist/css/ea-text.style.js +4 -0
- package/dist/css/ea-time-picker.style.js +4 -0
- package/dist/css/ea-timeline-item.style.js +4 -0
- package/dist/css/ea-timeline.style.js +4 -0
- package/dist/css/ea-tooltip.style.js +4 -0
- package/dist/css/ea-tour-step.style.js +4 -0
- package/dist/css/ea-tour.style.js +4 -0
- package/dist/css/ea-transfer.style.js +5 -0
- package/dist/css/ea-tree.style.js +6 -0
- package/dist/css/ea-ui-component.style.js +4 -0
- package/dist/favicon.ico +0 -0
- package/dist/utils/Color.js +439 -0
- package/dist/utils/I18nManager.js +218 -0
- package/dist/utils/Utils.js +65 -0
- package/dist/utils/Variables.js +19 -0
- package/dist/utils/timeout.js +9 -0
- package/package.json +294 -11
- package/build/components/Base.js +0 -1
- package/build/components/ea-alert/index.js +0 -1
- package/build/components/ea-alert/src/style/stylesheet.js +0 -1
- package/build/components/ea-aside/index.js +0 -1
- package/build/components/ea-avatar/index.js +0 -1
- package/build/components/ea-avatar/src/assets/defaultAvatar.js +0 -1
- package/build/components/ea-avatar/src/assets/errorAvatar.js +0 -1
- package/build/components/ea-avatar/src/assets/iconAndTextAvatar.js +0 -1
- package/build/components/ea-avatar/src/style/stylesheet.js +0 -1
- package/build/components/ea-backtop/index.js +0 -1
- package/build/components/ea-backtop/src/style/stylesheet.js +0 -1
- package/build/components/ea-badge/index.js +0 -1
- package/build/components/ea-badge/src/style/stylesheet.js +0 -1
- package/build/components/ea-breadcrumb/index.js +0 -1
- package/build/components/ea-breadcrumb/src/style/stylesheet.js +0 -1
- package/build/components/ea-breadcrumb-item/index.js +0 -1
- package/build/components/ea-breadcrumb-item/src/style/style.js +0 -1
- package/build/components/ea-button/index.js +0 -1
- package/build/components/ea-button/src/components/ButtonComm.js +0 -1
- package/build/components/ea-button/src/components/HrefComm.js +0 -1
- package/build/components/ea-button/src/style/stylesheet.js +0 -1
- package/build/components/ea-button-group/index.js +0 -1
- package/build/components/ea-button-group/src/style/stylesheet.js +0 -1
- package/build/components/ea-calendar/index.js +0 -1
- package/build/components/ea-calendar/src/style/stylesheet.js +0 -1
- package/build/components/ea-calendar/src/utils/createChangerElement.js +0 -1
- package/build/components/ea-calendar/src/utils/createThead.js +0 -1
- package/build/components/ea-calendar/src/utils/getDate.js +0 -1
- package/build/components/ea-calendar/src/utils/getUserWeekStart.js +0 -1
- package/build/components/ea-card/index.js +0 -1
- package/build/components/ea-card/src/style/stylesheet.js +0 -1
- package/build/components/ea-carousel/index.js +0 -1
- package/build/components/ea-carousel/src/style/stylesheet.js +0 -1
- package/build/components/ea-carousel/src/utils/handleIndexOverflow.js +0 -1
- package/build/components/ea-carousel-item/index.js +0 -1
- package/build/components/ea-carousel-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-checkbox/index.js +0 -1
- package/build/components/ea-checkbox/src/style/stylesheet.js +0 -1
- package/build/components/ea-checkbox-group/index.js +0 -1
- package/build/components/ea-checkbox-group/src/style/stylesheet.js +0 -1
- package/build/components/ea-collapse/index.js +0 -1
- package/build/components/ea-collapse-item/index.js +0 -1
- package/build/components/ea-collapse-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-container/index.js +0 -1
- package/build/components/ea-date-picker/index.js +0 -1
- package/build/components/ea-date-picker/src/style/stylesheet.js +0 -1
- package/build/components/ea-descriptions/index.js +0 -1
- package/build/components/ea-descriptions/src/components/contentTemplate.js +0 -1
- package/build/components/ea-descriptions/src/components/getTdTemplate_border.js +0 -1
- package/build/components/ea-descriptions/src/components/getTdTemplate_direction.js +0 -1
- package/build/components/ea-descriptions/src/components/getThTemplate_direction.js +0 -1
- package/build/components/ea-descriptions/src/components/getThTemplate_normal.js +0 -1
- package/build/components/ea-descriptions/src/style/stylesheet.js +0 -1
- package/build/components/ea-descriptions-item/index.js +0 -1
- package/build/components/ea-descriptions-item/src/stylesheet.js +0 -1
- package/build/components/ea-drawer/index.js +0 -1
- package/build/components/ea-drawer/src/style/stylesheet.js +0 -1
- package/build/components/ea-empty/index.js +0 -1
- package/build/components/ea-empty/src/assets/emptyStatusSVG.js +0 -1
- package/build/components/ea-empty/src/style/stylesheet.js +0 -1
- package/build/components/ea-footer/index.js +0 -1
- package/build/components/ea-form/index.js +0 -1
- package/build/components/ea-form-item/index.js +0 -1
- package/build/components/ea-form-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-header/index.js +0 -1
- package/build/components/ea-icon/config.json +0 -1030
- package/build/components/ea-icon/css/fontello.css +0 -312
- package/build/components/ea-icon/font/fontello.eot +0 -0
- package/build/components/ea-icon/font/fontello.svg +0 -350
- package/build/components/ea-icon/font/fontello.ttf +0 -0
- package/build/components/ea-icon/font/fontello.woff +0 -0
- package/build/components/ea-icon/font/fontello.woff2 +0 -0
- package/build/components/ea-icon/index.css +0 -1
- package/build/components/ea-icon/index.js +0 -1
- package/build/components/ea-image/index.js +0 -1
- package/build/components/ea-image/src/assets/errorImage.js +0 -1
- package/build/components/ea-image/src/style/stylesheet.js +0 -1
- package/build/components/ea-image/src/utils/createPreviewTools.js +0 -1
- package/build/components/ea-infinite-scroll/index.js +0 -1
- package/build/components/ea-infinite-scroll-item/index.js +0 -1
- package/build/components/ea-input/index.js +0 -1
- package/build/components/ea-input/src/components/createFixIcon.js +0 -1
- package/build/components/ea-input/src/components/createSuggestionBoard.js +0 -1
- package/build/components/ea-input/src/components/createWordLimitElement.js +0 -1
- package/build/components/ea-input/src/style/stylesheet.js +0 -1
- package/build/components/ea-input/src/utils/dispatchEvent.js +0 -1
- package/build/components/ea-input/src/utils/handleSearchResult.js +0 -1
- package/build/components/ea-input/src/utils/handleSuggestionBoardTrigger.js +0 -1
- package/build/components/ea-input-number/index.js +0 -1
- package/build/components/ea-input-number/src/style/stylesheet.js +0 -1
- package/build/components/ea-input-number/src/utils/handleCustomEvent.js +0 -1
- package/build/components/ea-link/index.js +0 -1
- package/build/components/ea-link/src/style/stylesheet.js +0 -1
- package/build/components/ea-loading/index.js +0 -1
- package/build/components/ea-loading/src/style/stylesheet.js +0 -1
- package/build/components/ea-main/index.js +0 -1
- package/build/components/ea-menu/index.js +0 -1
- package/build/components/ea-menu/src/style/stylesheet.js +0 -1
- package/build/components/ea-menu/src/utils/handleMenuItemEvent.js +0 -1
- package/build/components/ea-menu-item/index.js +0 -1
- package/build/components/ea-menu-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-menu-item-group/index.js +0 -1
- package/build/components/ea-menu-item-group/src/style/stylesheet.js +0 -1
- package/build/components/ea-message/index.js +0 -1
- package/build/components/ea-message/src/style/stylesheet.js +0 -1
- package/build/components/ea-message/src/utils/MessageClass.js +0 -1
- package/build/components/ea-message-box/index.js +0 -1
- package/build/components/ea-message-box/src/style/stylesheet.js +0 -1
- package/build/components/ea-message-box/src/utils/EaMessageBoxClass.js +0 -1
- package/build/components/ea-option/index.js +0 -1
- package/build/components/ea-option/src/style/stylesheet.js +0 -1
- package/build/components/ea-option-gropu/index.js +0 -1
- package/build/components/ea-page-header/index.js +0 -1
- package/build/components/ea-page-header/src/style/stylesheet.js +0 -1
- package/build/components/ea-pagination/index.js +0 -1
- package/build/components/ea-pagination/src/components/getMoreItem.js +0 -1
- package/build/components/ea-pagination/src/components/getPageItem.js +0 -1
- package/build/components/ea-pagination/src/components/getShowTotalItem.js +0 -1
- package/build/components/ea-pagination/src/style/stylesheet.js +0 -1
- package/build/components/ea-pane/index.js +0 -1
- package/build/components/ea-pane/src/stylesheet.js +0 -1
- package/build/components/ea-progress/index.js +0 -1
- package/build/components/ea-progress/src/components/SVGComm.js +0 -1
- package/build/components/ea-progress/src/style/stylesheet.js +0 -1
- package/build/components/ea-radio/index.js +0 -1
- package/build/components/ea-radio/src/style/stylesheet.js +0 -1
- package/build/components/ea-radio-group/index.js +0 -1
- package/build/components/ea-rate/index.js +0 -1
- package/build/components/ea-rate/src/components/rateComm.js +0 -1
- package/build/components/ea-rate/src/style/stylesheet.js +0 -1
- package/build/components/ea-result/index.js +0 -1
- package/build/components/ea-result/src/style/stylesheet.js +0 -1
- package/build/components/ea-select/index.js +0 -1
- package/build/components/ea-select/src/style/stylesheet.js +0 -1
- package/build/components/ea-skeleton/index.js +0 -1
- package/build/components/ea-skeleton/src/style/stylesheet.js +0 -1
- package/build/components/ea-skeleton/src/utils/createSkeletonElement.js +0 -1
- package/build/components/ea-skeleton-item/index.js +0 -1
- package/build/components/ea-skeleton-item/src/assets/imageSVG.js +0 -1
- package/build/components/ea-skeleton-item/src/style/stylesheet.js +0 -1
- package/build/components/ea-step/index.js +0 -1
- package/build/components/ea-step/src/style/stylesheet.js +0 -1
- package/build/components/ea-steps/index.js +0 -1
- package/build/components/ea-steps/src/style/stylesheet.js +0 -1
- package/build/components/ea-submenu/index.js +0 -1
- package/build/components/ea-submenu/src/style/stylesheet.js +0 -1
- package/build/components/ea-switch/index.js +0 -1
- package/build/components/ea-switch/src/style/stylesheet.js +0 -1
- package/build/components/ea-tab/index.js +0 -1
- package/build/components/ea-tab/src/style/stylesheet.js +0 -1
- package/build/components/ea-table/index.js +0 -1
- package/build/components/ea-table/src/style/stylesheet.js +0 -1
- package/build/components/ea-table-column/index.js +0 -1
- package/build/components/ea-tabs/index.js +0 -1
- package/build/components/ea-tabs/src/style/stylesheet.js +0 -1
- package/build/components/ea-tag/index.js +0 -1
- package/build/components/ea-tag/src/style/stylesheet.js +0 -1
- package/build/components/ea-textarea/index.js +0 -1
- package/build/components/ea-textarea/src/style/stylesheet.js +0 -1
- package/build/components/ea-time-picker/index.js +0 -1
- package/build/components/ea-time-picker/src/style/stylesheet.js +0 -1
- package/build/components/ea-timeline/index.js +0 -1
- package/build/components/ea-timeline/style/stylesheet.js +0 -1
- package/build/components/ea-timeline-item/index.js +0 -1
- package/build/components/ea-timeline-item/src/style/stylesheet.js +0 -1
- package/build/components/globalConfig.js +0 -1
- package/build/components/index.js +0 -1
- package/build/utils/Validator.js +0 -1
- package/build/utils/createElement.js +0 -1
- package/build/utils/handleDefaultAttrIsTrue.js +0 -1
- package/build/utils/handleTemplate.js +0 -1
- package/build/utils/setStyle.js +0 -1
- package/build/utils/timeout.js +0 -1
- package/components/Base.js +0 -75
- package/components/ea-alert/index.css +0 -91
- package/components/ea-alert/index.js +0 -210
- package/components/ea-alert/index.scss +0 -108
- package/components/ea-alert/src/style/stylesheet.js +0 -85
- package/components/ea-aside/index.css +0 -9
- package/components/ea-aside/index.js +0 -54
- package/components/ea-aside/index.scss +0 -12
- package/components/ea-avatar/index.css +0 -66
- package/components/ea-avatar/index.js +0 -156
- package/components/ea-avatar/index.scss +0 -59
- package/components/ea-avatar/src/assets/defaultAvatar.js +0 -12
- package/components/ea-avatar/src/assets/errorAvatar.js +0 -9
- package/components/ea-avatar/src/assets/iconAndTextAvatar.js +0 -18
- package/components/ea-avatar/src/style/stylesheet.js +0 -61
- package/components/ea-backtop/index.css +0 -27
- package/components/ea-backtop/index.js +0 -167
- package/components/ea-backtop/index.scss +0 -29
- package/components/ea-backtop/src/style/stylesheet.js +0 -21
- package/components/ea-badge/index.css +0 -49
- package/components/ea-badge/index.js +0 -103
- package/components/ea-badge/index.scss +0 -56
- package/components/ea-badge/src/style/stylesheet.js +0 -43
- package/components/ea-breadcrumb/index.css +0 -6
- package/components/ea-breadcrumb/index.js +0 -90
- package/components/ea-breadcrumb/index.scss +0 -7
- package/components/ea-breadcrumb/src/style/stylesheet.js +0 -8
- package/components/ea-breadcrumb-item/index.css +0 -10
- package/components/ea-breadcrumb-item/index.js +0 -23
- package/components/ea-breadcrumb-item/index.scss +0 -12
- package/components/ea-breadcrumb-item/src/style/style.js +0 -12
- package/components/ea-button/index.css +0 -206
- package/components/ea-button/index.js +0 -198
- package/components/ea-button/index.scss +0 -143
- package/components/ea-button/src/components/ButtonComm.js +0 -5
- package/components/ea-button/src/components/HrefComm.js +0 -5
- package/components/ea-button/src/style/stylesheet.js +0 -208
- package/components/ea-button-group/index.css +0 -16
- package/components/ea-button-group/index.js +0 -44
- package/components/ea-button-group/index.scss +0 -20
- package/components/ea-button-group/src/style/stylesheet.js +0 -18
- package/components/ea-calendar/index.css +0 -72
- package/components/ea-calendar/index.js +0 -298
- package/components/ea-calendar/index.scss +0 -106
- package/components/ea-calendar/src/style/stylesheet.js +0 -74
- package/components/ea-calendar/src/utils/createChangerElement.js +0 -10
- package/components/ea-calendar/src/utils/createThead.js +0 -18
- package/components/ea-calendar/src/utils/getDate.js +0 -11
- package/components/ea-calendar/src/utils/getUserWeekStart.js +0 -11
- package/components/ea-card/index.css +0 -25
- package/components/ea-card/index.js +0 -51
- package/components/ea-card/index.scss +0 -24
- package/components/ea-card/src/style/stylesheet.js +0 -19
- package/components/ea-carousel/index.css +0 -103
- package/components/ea-carousel/index.js +0 -222
- package/components/ea-carousel/index.scss +0 -140
- package/components/ea-carousel/src/style/stylesheet.js +0 -105
- package/components/ea-carousel/src/utils/handleIndexOverflow.js +0 -9
- package/components/ea-carousel-item/index.css +0 -20
- package/components/ea-carousel-item/index.js +0 -23
- package/components/ea-carousel-item/index.scss +0 -26
- package/components/ea-carousel-item/src/style/stylesheet.js +0 -22
- package/components/ea-checkbox/index.css +0 -108
- package/components/ea-checkbox/index.js +0 -160
- package/components/ea-checkbox/index.scss +0 -141
- package/components/ea-checkbox/src/style/stylesheet.js +0 -110
- package/components/ea-checkbox-group/index.css +0 -6
- package/components/ea-checkbox-group/index.js +0 -120
- package/components/ea-checkbox-group/index.scss +0 -7
- package/components/ea-checkbox-group/src/style/stylesheet.js +0 -8
- package/components/ea-collapse/index.css +0 -0
- package/components/ea-collapse/index.js +0 -109
- package/components/ea-collapse/index.scss +0 -4
- package/components/ea-collapse-item/index.css +0 -31
- package/components/ea-collapse-item/index.js +0 -111
- package/components/ea-collapse-item/index.scss +0 -46
- package/components/ea-collapse-item/src/style/stylesheet.js +0 -33
- package/components/ea-container/index.css +0 -14
- package/components/ea-container/index.js +0 -85
- package/components/ea-container/index.scss +0 -18
- package/components/ea-date-picker/index.css +0 -17
- package/components/ea-date-picker/index.js +0 -191
- package/components/ea-date-picker/index.scss +0 -29
- package/components/ea-date-picker/src/style/stylesheet.js +0 -19
- package/components/ea-descriptions/index.css +0 -33
- package/components/ea-descriptions/index.js +0 -171
- package/components/ea-descriptions/index.scss +0 -45
- package/components/ea-descriptions/src/components/contentTemplate.js +0 -11
- package/components/ea-descriptions/src/components/getTdTemplate_border.js +0 -6
- package/components/ea-descriptions/src/components/getTdTemplate_direction.js +0 -7
- package/components/ea-descriptions/src/components/getThTemplate_direction.js +0 -7
- package/components/ea-descriptions/src/components/getThTemplate_normal.js +0 -8
- package/components/ea-descriptions/src/style/stylesheet.js +0 -35
- package/components/ea-descriptions-item/index.css +0 -21
- package/components/ea-descriptions-item/index.js +0 -71
- package/components/ea-descriptions-item/index.scss +0 -29
- package/components/ea-descriptions-item/src/stylesheet.js +0 -23
- package/components/ea-drawer/index.css +0 -138
- package/components/ea-drawer/index.js +0 -251
- package/components/ea-drawer/index.scss +0 -208
- package/components/ea-drawer/src/style/stylesheet.js +0 -141
- package/components/ea-empty/index.css +0 -30
- package/components/ea-empty/index.js +0 -93
- package/components/ea-empty/index.scss +0 -30
- package/components/ea-empty/src/assets/emptyStatusSVG.js +0 -6
- package/components/ea-empty/src/style/stylesheet.js +0 -24
- package/components/ea-footer/index.css +0 -7
- package/components/ea-footer/index.js +0 -57
- package/components/ea-footer/index.scss +0 -10
- package/components/ea-form/index.css +0 -0
- package/components/ea-form/index.js +0 -121
- package/components/ea-form/index.scss +0 -0
- package/components/ea-form-item/index.css +0 -62
- package/components/ea-form-item/index.js +0 -152
- package/components/ea-form-item/index.scss +0 -83
- package/components/ea-form-item/src/style/stylesheet.js +0 -64
- package/components/ea-header/index.css +0 -7
- package/components/ea-header/index.js +0 -55
- package/components/ea-header/index.scss +0 -10
- package/components/ea-icon/config.json +0 -1030
- package/components/ea-icon/css/fontello.css +0 -312
- package/components/ea-icon/font/fontello.eot +0 -0
- package/components/ea-icon/font/fontello.svg +0 -350
- package/components/ea-icon/font/fontello.ttf +0 -0
- package/components/ea-icon/font/fontello.woff +0 -0
- package/components/ea-icon/font/fontello.woff2 +0 -0
- package/components/ea-icon/index.css +0 -1
- package/components/ea-icon/index.js +0 -84
- package/components/ea-image/index.css +0 -84
- package/components/ea-image/index.js +0 -182
- package/components/ea-image/index.scss +0 -111
- package/components/ea-image/src/assets/errorImage.js +0 -9
- package/components/ea-image/src/assets/errorImage.svg +0 -7
- package/components/ea-image/src/style/stylesheet.js +0 -86
- package/components/ea-image/src/utils/createPreviewTools.js +0 -140
- package/components/ea-infinite-scroll/index.css +0 -0
- package/components/ea-infinite-scroll/index.js +0 -119
- package/components/ea-infinite-scroll/index.scss +0 -0
- package/components/ea-infinite-scroll-item/index.css +0 -0
- package/components/ea-infinite-scroll-item/index.js +0 -18
- package/components/ea-infinite-scroll-item/index.scss +0 -0
- package/components/ea-input/index.css +0 -139
- package/components/ea-input/index.js +0 -398
- package/components/ea-input/index.scss +0 -178
- package/components/ea-input/src/components/createFixIcon.js +0 -108
- package/components/ea-input/src/components/createSuggestionBoard.js +0 -43
- package/components/ea-input/src/components/createWordLimitElement.js +0 -18
- package/components/ea-input/src/style/stylesheet.js +0 -141
- package/components/ea-input/src/utils/dispatchEvent.js +0 -9
- package/components/ea-input/src/utils/handleSearchResult.js +0 -9
- package/components/ea-input/src/utils/handleSuggestionBoardTrigger.js +0 -31
- package/components/ea-input-number/index.css +0 -120
- package/components/ea-input-number/index.js +0 -308
- package/components/ea-input-number/index.scss +0 -132
- package/components/ea-input-number/src/style/stylesheet.js +0 -122
- package/components/ea-input-number/src/utils/handleCustomEvent.js +0 -5
- package/components/ea-link/index.css +0 -48
- package/components/ea-link/index.js +0 -122
- package/components/ea-link/index.scss +0 -36
- package/components/ea-link/src/style/stylesheet.js +0 -50
- package/components/ea-loading/index.css +0 -38
- package/components/ea-loading/index.js +0 -166
- package/components/ea-loading/index.scss +0 -55
- package/components/ea-loading/src/style/stylesheet.js +0 -40
- package/components/ea-main/index.css +0 -8
- package/components/ea-main/index.js +0 -32
- package/components/ea-main/index.scss +0 -11
- package/components/ea-menu/index.css +0 -19
- package/components/ea-menu/index.js +0 -131
- package/components/ea-menu/index.scss +0 -22
- package/components/ea-menu/src/style/stylesheet.js +0 -21
- package/components/ea-menu/src/utils/handleMenuItemEvent.js +0 -32
- package/components/ea-menu-item/index.css +0 -48
- package/components/ea-menu-item/index.js +0 -130
- package/components/ea-menu-item/index.scss +0 -62
- package/components/ea-menu-item/src/style/stylesheet.js +0 -50
- package/components/ea-menu-item-group/index.css +0 -42
- package/components/ea-menu-item-group/index.js +0 -130
- package/components/ea-menu-item-group/index.scss +0 -60
- package/components/ea-menu-item-group/src/style/stylesheet.js +0 -44
- package/components/ea-message/index.css +0 -47
- package/components/ea-message/index.js +0 -171
- package/components/ea-message/index.scss +0 -70
- package/components/ea-message/src/style/stylesheet.js +0 -48
- package/components/ea-message/src/utils/MessageClass.js +0 -67
- package/components/ea-message-box/index.css +0 -85
- package/components/ea-message-box/index.js +0 -211
- package/components/ea-message-box/index.scss +0 -113
- package/components/ea-message-box/src/style/stylesheet.js +0 -87
- package/components/ea-message-box/src/utils/EaMessageBoxClass.js +0 -60
- package/components/ea-option/index.css +0 -24
- package/components/ea-option/index.js +0 -74
- package/components/ea-option/index.scss +0 -31
- package/components/ea-option/src/style/stylesheet.js +0 -26
- package/components/ea-option-gropu/index.css +0 -6
- package/components/ea-option-gropu/index.js +0 -57
- package/components/ea-option-gropu/index.scss +0 -8
- package/components/ea-page-header/index.css +0 -33
- package/components/ea-page-header/index.js +0 -91
- package/components/ea-page-header/index.scss +0 -44
- package/components/ea-page-header/src/style/stylesheet.js +0 -35
- package/components/ea-pagination/index.css +0 -69
- package/components/ea-pagination/index.js +0 -305
- package/components/ea-pagination/index.scss +0 -89
- package/components/ea-pagination/src/components/getMoreItem.js +0 -20
- package/components/ea-pagination/src/components/getPageItem.js +0 -11
- package/components/ea-pagination/src/components/getShowTotalItem.js +0 -7
- package/components/ea-pagination/src/style/stylesheet.js +0 -71
- package/components/ea-pane/index.css +0 -6
- package/components/ea-pane/index.js +0 -52
- package/components/ea-pane/index.scss +0 -7
- package/components/ea-pane/src/stylesheet.js +0 -8
- package/components/ea-progress/index.css +0 -61
- package/components/ea-progress/index.js +0 -249
- package/components/ea-progress/index.scss +0 -74
- package/components/ea-progress/src/components/SVGComm.js +0 -18
- package/components/ea-progress/src/style/stylesheet.js +0 -55
- package/components/ea-radio/index.css +0 -82
- package/components/ea-radio/index.js +0 -137
- package/components/ea-radio/index.scss +0 -119
- package/components/ea-radio/src/style/stylesheet.js +0 -84
- package/components/ea-radio-group/index.css +0 -3
- package/components/ea-radio-group/index.js +0 -96
- package/components/ea-radio-group/index.scss +0 -3
- package/components/ea-rate/index.css +0 -44
- package/components/ea-rate/index.js +0 -243
- package/components/ea-rate/index.scss +0 -55
- package/components/ea-rate/src/components/rateComm.js +0 -20
- package/components/ea-rate/src/style/stylesheet.js +0 -45
- package/components/ea-result/index.css +0 -37
- package/components/ea-result/index.js +0 -109
- package/components/ea-result/index.scss +0 -46
- package/components/ea-result/src/style/stylesheet.js +0 -39
- package/components/ea-select/index.css +0 -47
- package/components/ea-select/index.js +0 -312
- package/components/ea-select/index.scss +0 -70
- package/components/ea-select/src/style/stylesheet.js +0 -49
- package/components/ea-skeleton/index.css +0 -12
- package/components/ea-skeleton/index.js +0 -148
- package/components/ea-skeleton/index.scss +0 -16
- package/components/ea-skeleton/src/style/stylesheet.js +0 -14
- package/components/ea-skeleton/src/utils/createSkeletonElement.js +0 -7
- package/components/ea-skeleton-item/index.css +0 -69
- package/components/ea-skeleton-item/index.js +0 -82
- package/components/ea-skeleton-item/index.scss +0 -107
- package/components/ea-skeleton-item/src/assets/imageSVG.js +0 -8
- package/components/ea-skeleton-item/src/style/stylesheet.js +0 -71
- package/components/ea-step/index.css +0 -84
- package/components/ea-step/index.js +0 -230
- package/components/ea-step/index.scss +0 -110
- package/components/ea-step/src/style/stylesheet.js +0 -86
- package/components/ea-steps/index.css +0 -19
- package/components/ea-steps/index.js +0 -104
- package/components/ea-steps/index.scss +0 -23
- package/components/ea-steps/src/style/stylesheet.js +0 -21
- package/components/ea-submenu/index.css +0 -65
- package/components/ea-submenu/index.js +0 -141
- package/components/ea-submenu/index.scss +0 -88
- package/components/ea-submenu/src/style/stylesheet.js +0 -67
- package/components/ea-switch/index.css +0 -90
- package/components/ea-switch/index.js +0 -189
- package/components/ea-switch/index.scss +0 -117
- package/components/ea-switch/src/style/stylesheet.js +0 -92
- package/components/ea-tab/index.css +0 -68
- package/components/ea-tab/index.js +0 -138
- package/components/ea-tab/index.scss +0 -96
- package/components/ea-tab/src/style/stylesheet.js +0 -70
- package/components/ea-table/index.css +0 -98
- package/components/ea-table/index.js +0 -555
- package/components/ea-table/index.scss +0 -90
- package/components/ea-table/src/style/stylesheet.js +0 -100
- package/components/ea-table-column/index.css +0 -0
- package/components/ea-table-column/index.js +0 -164
- package/components/ea-table-column/index.scss +0 -0
- package/components/ea-tabs/index.css +0 -45
- package/components/ea-tabs/index.js +0 -245
- package/components/ea-tabs/index.scss +0 -64
- package/components/ea-tabs/src/style/stylesheet.js +0 -47
- package/components/ea-tag/index.css +0 -90
- package/components/ea-tag/index.js +0 -107
- package/components/ea-tag/index.scss +0 -71
- package/components/ea-tag/src/style/stylesheet.js +0 -92
- package/components/ea-textarea/index.css +0 -37
- package/components/ea-textarea/index.js +0 -277
- package/components/ea-textarea/index.scss +0 -48
- package/components/ea-textarea/src/style/stylesheet.js +0 -39
- package/components/ea-time-picker/index.css +0 -82
- package/components/ea-time-picker/index.js +0 -379
- package/components/ea-time-picker/index.scss +0 -110
- package/components/ea-time-picker/src/style/stylesheet.js +0 -84
- package/components/ea-timeline/index.css +0 -0
- package/components/ea-timeline/index.js +0 -74
- package/components/ea-timeline/index.scss +0 -1
- package/components/ea-timeline/style/stylesheet.js +0 -3
- package/components/ea-timeline-item/index.css +0 -79
- package/components/ea-timeline-item/index.js +0 -146
- package/components/ea-timeline-item/index.scss +0 -92
- package/components/ea-timeline-item/src/style/stylesheet.js +0 -81
- package/components/ea-ui-base-style.css +0 -0
- package/components/ea-ui-base-style.scss +0 -153
- package/components/globalConfig.js +0 -10
- package/components/index.js +0 -67
- package/public/logo.png +0 -0
- package/utils/Validator.js +0 -16
- package/utils/createElement.js +0 -30
- package/utils/handleDefaultAttrIsTrue.js +0 -11
- package/utils/handleTemplate.js +0 -19
- package/utils/setStyle.js +0 -8
- package/utils/timeout.js +0 -16
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var h = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var f = (e, s, t) => s in e ? p(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
6
|
+
var l = (e, s, t) => f(e, typeof s != "symbol" ? s + "" : s, t), u = (e, s, t) => s.has(e) || h("Cannot " + t);
|
|
7
|
+
var d = (e, s, t) => (u(e, s, "read from private field"), t ? t.call(e) : s.get(e)), i = (e, s, t) => s.has(e) ? h("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), n = (e, s, t, c) => (u(e, s, "write to private field"), c ? c.call(e, t) : s.set(e, t), t);
|
|
8
|
+
import { B as m } from "./Base.js";
|
|
9
|
+
import { s as v } from "../css/ea-card.style.js";
|
|
10
|
+
var a, r, o;
|
|
11
|
+
class w extends m {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
/** @type {HTMLElement} */
|
|
15
|
+
i(this, a);
|
|
16
|
+
/** @type {HTMLElement} */
|
|
17
|
+
i(this, r);
|
|
18
|
+
/** @type {HTMLElement} */
|
|
19
|
+
i(this, o);
|
|
20
|
+
l(this, "state", this.properties({
|
|
21
|
+
shadow: {
|
|
22
|
+
type: ["always", "never", "hover"],
|
|
23
|
+
default: "always",
|
|
24
|
+
observer: () => {
|
|
25
|
+
this.updateContainerClasslist();
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
header: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "",
|
|
31
|
+
observer: (t) => {
|
|
32
|
+
d(this, r).innerText = t;
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
footer: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "",
|
|
38
|
+
observer: (t) => {
|
|
39
|
+
d(this, o).innerText = t;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}));
|
|
43
|
+
this.stylesheet = v, this.$render();
|
|
44
|
+
}
|
|
45
|
+
static get observedAttributes() {
|
|
46
|
+
return [...super.observedAttributes, "shadow", "header", "footer"];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 获取 classlist 列表
|
|
50
|
+
* @return {string} 属性值
|
|
51
|
+
*/
|
|
52
|
+
updateContainerClasslist() {
|
|
53
|
+
const t = this.computedClasslist("ea-card", {
|
|
54
|
+
[`--${this.shadow}-shadow`]: this.shadow
|
|
55
|
+
});
|
|
56
|
+
return d(this, a).className = t, t;
|
|
57
|
+
}
|
|
58
|
+
$render() {
|
|
59
|
+
this.shadowRoot.innerHTML = `
|
|
60
|
+
<div class="ea-card" part="container">
|
|
61
|
+
<div class="ea-card__header" part="header">
|
|
62
|
+
<slot name="header"></slot>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="ea-card__content" part="content">
|
|
65
|
+
<slot></slot>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="ea-card__footer" part="footer">
|
|
68
|
+
<slot name="footer"></slot>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
`, n(this, a, this.shadowRoot.querySelector(".ea-card")), n(this, r, this.shadowRoot.querySelector(
|
|
72
|
+
".ea-card__header > slot[name='header']"
|
|
73
|
+
)), n(this, o, this.shadowRoot.querySelector(
|
|
74
|
+
".ea-card__footer > slot[name='footer']"
|
|
75
|
+
));
|
|
76
|
+
}
|
|
77
|
+
connectedCallback() {
|
|
78
|
+
super.connectedCallback();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
a = new WeakMap(), r = new WeakMap(), o = new WeakMap();
|
|
82
|
+
window.customElements.get("ea-card") || window.customElements.define("ea-card", w);
|
|
83
|
+
export {
|
|
84
|
+
w as EaCard
|
|
85
|
+
};
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
var B = Object.defineProperty;
|
|
2
|
+
var $ = (s) => {
|
|
3
|
+
throw TypeError(s);
|
|
4
|
+
};
|
|
5
|
+
var P = (s, r, e) => r in s ? B(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
|
|
6
|
+
var k = (s, r, e) => P(s, typeof r != "symbol" ? r + "" : r, e), H = (s, r, e) => r.has(s) || $("Cannot " + e);
|
|
7
|
+
var t = (s, r, e) => (H(s, r, "read from private field"), e ? e.call(s) : r.get(s)), n = (s, r, e) => r.has(s) ? $("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, e), v = (s, r, e, i) => (H(s, r, "write to private field"), i ? i.call(s, e) : r.set(s, e), e), p = (s, r, e) => (H(s, r, "access private method"), e);
|
|
8
|
+
import { B as N } from "./Base.js";
|
|
9
|
+
import { s as O } from "../css/ea-carousel-item.style.js";
|
|
10
|
+
import { s as U } from "../css/ea-carousel.style.js";
|
|
11
|
+
class j extends N {
|
|
12
|
+
static get observedAttributes() {
|
|
13
|
+
return [...super.observedAttributes];
|
|
14
|
+
}
|
|
15
|
+
constructor() {
|
|
16
|
+
super(), this.stylesheet = O, this.$render();
|
|
17
|
+
}
|
|
18
|
+
$render() {
|
|
19
|
+
this.shadowRoot.innerHTML = `
|
|
20
|
+
<div class='ea-carousel-item' part='container'>
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</div>
|
|
23
|
+
`;
|
|
24
|
+
}
|
|
25
|
+
connectedCallback() {
|
|
26
|
+
super.connectedCallback();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
window.customElements.get("ea-carousel-item") || window.customElements.define("ea-carousel-item", j);
|
|
30
|
+
var f, w, C, y, g, d, h, c, o, E, _, l, z, b, R, M, m, A, x, L, S, T, I;
|
|
31
|
+
class W extends N {
|
|
32
|
+
constructor() {
|
|
33
|
+
super();
|
|
34
|
+
n(this, l);
|
|
35
|
+
/** @type {HTMLElement} */
|
|
36
|
+
n(this, f);
|
|
37
|
+
/** @type {HTMLElement} */
|
|
38
|
+
n(this, w);
|
|
39
|
+
/** @type {HTMLElement} */
|
|
40
|
+
n(this, C);
|
|
41
|
+
/** @type {HTMLElement} */
|
|
42
|
+
n(this, y);
|
|
43
|
+
/** @type {HTMLElement} */
|
|
44
|
+
n(this, g);
|
|
45
|
+
/** @type {HTMLElement[]} */
|
|
46
|
+
n(this, d, []);
|
|
47
|
+
/** @type {AbortController} */
|
|
48
|
+
n(this, h);
|
|
49
|
+
n(this, c, {
|
|
50
|
+
triggerAbortControllers: new AbortController()
|
|
51
|
+
});
|
|
52
|
+
n(this, o, {
|
|
53
|
+
prevIndex: 0,
|
|
54
|
+
originLength: 0,
|
|
55
|
+
timer: null,
|
|
56
|
+
pause: !1,
|
|
57
|
+
isMouseEnter: !1,
|
|
58
|
+
isEnd: !1
|
|
59
|
+
});
|
|
60
|
+
k(this, "state", this.properties({
|
|
61
|
+
height: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "100%",
|
|
64
|
+
observer: (e) => {
|
|
65
|
+
this.style.setProperty("--ea-carousel-height", e);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
direction: {
|
|
69
|
+
type: ["horizontal", "vertical"],
|
|
70
|
+
default: "horizontal",
|
|
71
|
+
observer: () => {
|
|
72
|
+
this.updateContainerClasslist();
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
index: {
|
|
76
|
+
type: Number,
|
|
77
|
+
default: 0,
|
|
78
|
+
observer: (e, i) => {
|
|
79
|
+
if (t(this, b).call(this, e), t(this, o).isEnd) return t(this, o).isEnd = !1;
|
|
80
|
+
e < 0 ? (e = t(this, d).length - 1, i = 0, t(this, o).isEnd = !0) : e > t(this, d).length - 1 && (i = t(this, d).length - 1, e = 0, t(this, o).isEnd = !0), t(this, o).prevIndex = i, this.emit("change", {
|
|
81
|
+
detail: {
|
|
82
|
+
current: e,
|
|
83
|
+
prev: i
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
trigger: {
|
|
89
|
+
type: ["click", "hover"],
|
|
90
|
+
default: "hover",
|
|
91
|
+
/** @param {'click' | 'hover'} newVal */
|
|
92
|
+
observer: (e) => {
|
|
93
|
+
var i;
|
|
94
|
+
(i = t(this, c).triggerAbortControllers) == null || i.abort(), t(this, c).triggerAbortControllers = new AbortController(), t(this, g).addEventListener(
|
|
95
|
+
e === "hover" ? "mouseover" : "click",
|
|
96
|
+
t(this, L),
|
|
97
|
+
{
|
|
98
|
+
signal: t(this, c).triggerAbortControllers.signal
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
interval: {
|
|
104
|
+
type: Number,
|
|
105
|
+
default: 3e3,
|
|
106
|
+
observer: () => {
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
arrow: {
|
|
110
|
+
type: ["never", "always", "hover"],
|
|
111
|
+
default: "hover",
|
|
112
|
+
observer: () => {
|
|
113
|
+
this.updateContainerClasslist();
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
autoplay: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: !0,
|
|
119
|
+
observer: (e) => {
|
|
120
|
+
e ? p(this, l, m).call(this) : p(this, l, M).call(this);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
loop: {
|
|
124
|
+
type: Boolean,
|
|
125
|
+
default: !0,
|
|
126
|
+
observer: () => {
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"pause-on-hover": {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: !0,
|
|
132
|
+
observer: () => {
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"indicator-position": {
|
|
136
|
+
type: ["", "none", "outside"],
|
|
137
|
+
default: "",
|
|
138
|
+
observer: () => {
|
|
139
|
+
this.updateContainerClasslist();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}));
|
|
143
|
+
/**
|
|
144
|
+
* 处理 index 溢出的情况
|
|
145
|
+
* @return {number}
|
|
146
|
+
*/
|
|
147
|
+
n(this, E, () => this.index === t(this, d).length ? 0 : this.index === -1 ? t(this, d).length - 1 : this.index);
|
|
148
|
+
/**
|
|
149
|
+
* 渲染 轮播图指示器,为了避免vue组件缓存,所以在初始化和组件挂载时都进行渲染
|
|
150
|
+
*/
|
|
151
|
+
n(this, _, () => {
|
|
152
|
+
const e = Array.from(
|
|
153
|
+
this.querySelectorAll("ea-carousel-item"),
|
|
154
|
+
(i, a) => `<button class='ea-carousel__indicator' part='indicator' tabindex="1" data-index="${a}"></button>`
|
|
155
|
+
).join("");
|
|
156
|
+
t(this, g).innerHTML = e, v(this, d, [
|
|
157
|
+
...t(this, g).querySelectorAll(".ea-carousel__indicator")
|
|
158
|
+
]);
|
|
159
|
+
});
|
|
160
|
+
/**
|
|
161
|
+
* 更新轮播图位置
|
|
162
|
+
* @param {number} index
|
|
163
|
+
*/
|
|
164
|
+
n(this, b, (e = 0) => {
|
|
165
|
+
const { width: i, height: a } = t(this, f).getBoundingClientRect(), u = this.direction === "horizontal" ? "X" : "Y", q = this.direction === "horizontal" ? i : a;
|
|
166
|
+
this.style.setProperty(
|
|
167
|
+
"--ea-carousel-transform",
|
|
168
|
+
`translate${u}(-${(e + 1) * q}px)`
|
|
169
|
+
), t(this, R).call(this);
|
|
170
|
+
});
|
|
171
|
+
/**
|
|
172
|
+
* 更新指示器位置
|
|
173
|
+
*/
|
|
174
|
+
n(this, R, () => {
|
|
175
|
+
t(this, d).forEach((e, i) => {
|
|
176
|
+
e.classList.toggle("is-active", i === t(this, E).call(this));
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
/**
|
|
180
|
+
* 开启轮播图过渡属性
|
|
181
|
+
*/
|
|
182
|
+
n(this, A, () => {
|
|
183
|
+
this.clientHeight, this.style.removeProperty("--ea-carousel-transition");
|
|
184
|
+
});
|
|
185
|
+
/**
|
|
186
|
+
* 关闭轮播图过渡属性
|
|
187
|
+
*/
|
|
188
|
+
n(this, x, () => {
|
|
189
|
+
this.style.setProperty("--ea-carousel-transition", "none"), this.clientHeight;
|
|
190
|
+
});
|
|
191
|
+
/**
|
|
192
|
+
* 指示器 处理事件,需要按照 `this.trigger` 来确定事件名
|
|
193
|
+
* @param {MouseEvent} e
|
|
194
|
+
*/
|
|
195
|
+
n(this, L, (e) => {
|
|
196
|
+
const i = t(this, g).querySelectorAll(
|
|
197
|
+
".ea-carousel__indicator"
|
|
198
|
+
), a = e.target.closest(".ea-carousel__indicator");
|
|
199
|
+
a && i.forEach((u, q) => {
|
|
200
|
+
u.classList.toggle("is-active", u === a), u === a && (this.index = q);
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
/**
|
|
204
|
+
* 轮播图切换结束事件,即能确保轮播图在视觉上连续
|
|
205
|
+
*/
|
|
206
|
+
n(this, S, () => {
|
|
207
|
+
t(this, x).call(this), this.autoplay && !t(this, o).isMouseEnter && p(this, l, M).call(this), this.index = t(this, E).call(this), this.autoplay && !t(this, o).isMouseEnter && p(this, l, m).call(this), t(this, A).call(this), t(this, o).pause = !1;
|
|
208
|
+
});
|
|
209
|
+
/**
|
|
210
|
+
* 箭头显示事件
|
|
211
|
+
*/
|
|
212
|
+
n(this, T, () => {
|
|
213
|
+
const e = () => {
|
|
214
|
+
t(this, o).isMouseEnter = !1, this["pause-on-hover"] && p(this, l, m).call(this), this.updateContainerClasslist();
|
|
215
|
+
};
|
|
216
|
+
t(this, o).isMouseEnter = !0, this["pause-on-hover"] && p(this, l, M).call(this), this.updateContainerClasslist(), t(this, f).addEventListener("mouseleave", e, {
|
|
217
|
+
signal: t(this, h).signal,
|
|
218
|
+
once: !0
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
/**
|
|
222
|
+
* 当窗口大小变化时,更新轮播图位置
|
|
223
|
+
*/
|
|
224
|
+
n(this, I, () => {
|
|
225
|
+
let e = null;
|
|
226
|
+
return {
|
|
227
|
+
listener: () => {
|
|
228
|
+
clearTimeout(e), e = null, e = setTimeout(() => {
|
|
229
|
+
t(this, b).call(this, this.index);
|
|
230
|
+
}, 100);
|
|
231
|
+
},
|
|
232
|
+
unsetHandler: () => {
|
|
233
|
+
clearTimeout(e), e = null;
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
});
|
|
237
|
+
/**
|
|
238
|
+
* 上一张轮播图
|
|
239
|
+
*/
|
|
240
|
+
k(this, "prev", () => {
|
|
241
|
+
t(this, o).pause || (this.index--, t(this, o).pause = !0);
|
|
242
|
+
});
|
|
243
|
+
/**
|
|
244
|
+
* 下一张轮播图
|
|
245
|
+
*/
|
|
246
|
+
k(this, "next", () => {
|
|
247
|
+
t(this, o).pause || (this.index++, t(this, o).pause = !0);
|
|
248
|
+
});
|
|
249
|
+
this.stylesheet = U, this.$render();
|
|
250
|
+
}
|
|
251
|
+
static get observedAttributes() {
|
|
252
|
+
return [
|
|
253
|
+
...super.observedAttributes,
|
|
254
|
+
"height",
|
|
255
|
+
"index",
|
|
256
|
+
"trigger",
|
|
257
|
+
"autoplay",
|
|
258
|
+
"interval",
|
|
259
|
+
"indicator-position",
|
|
260
|
+
"arrow",
|
|
261
|
+
// "type",
|
|
262
|
+
// "card-scale",
|
|
263
|
+
"loop",
|
|
264
|
+
"direction",
|
|
265
|
+
"pause-on-hover"
|
|
266
|
+
// "motion-blur",
|
|
267
|
+
];
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* 获取 classlist 列表
|
|
271
|
+
* @return {string} 属性值
|
|
272
|
+
*/
|
|
273
|
+
updateContainerClasslist() {
|
|
274
|
+
const e = this.computedClasslist(
|
|
275
|
+
"ea-carousel",
|
|
276
|
+
{
|
|
277
|
+
["--" + this.direction]: this.direction
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
["arrow-" + this.arrow]: this.arrow === "always" || this.arrow === "never" || t(this, o).isMouseEnter,
|
|
281
|
+
[this["indicator-position"] + "-indicator"]: this["indicator-position"]
|
|
282
|
+
}
|
|
283
|
+
);
|
|
284
|
+
return t(this, f).className = e, e;
|
|
285
|
+
}
|
|
286
|
+
$render() {
|
|
287
|
+
this.shadowRoot.innerHTML = `
|
|
288
|
+
<div class='ea-carousel' part='container'>
|
|
289
|
+
<button class="ea-carousel__arrow arrow-left" part="arrow-left">
|
|
290
|
+
<ea-icon icon="icon-angle-left" part="arrow-left-icon"></ea-icon>
|
|
291
|
+
</button>
|
|
292
|
+
<button class="ea-carousel__arrow arrow-right" part="arrow-right">
|
|
293
|
+
<ea-icon icon="icon-angle-right" part="arrow-right-icon"></ea-icon>
|
|
294
|
+
</button>
|
|
295
|
+
<ul class="ea-carousel__content" part="content">
|
|
296
|
+
<slot></slot>
|
|
297
|
+
</ul>
|
|
298
|
+
<footer class="ea-carousel__indicator-wrap" part="indicator-wrap">
|
|
299
|
+
|
|
300
|
+
</footer>
|
|
301
|
+
</div>
|
|
302
|
+
`, v(this, f, this.shadowRoot.querySelector(".ea-carousel")), v(this, w, this.shadowRoot.querySelector(".ea-carousel__content")), v(this, g, this.shadowRoot.querySelector(
|
|
303
|
+
".ea-carousel__indicator-wrap"
|
|
304
|
+
)), v(this, C, this.shadowRoot.querySelector(
|
|
305
|
+
".ea-carousel__arrow.arrow-left"
|
|
306
|
+
)), v(this, y, this.shadowRoot.querySelector(
|
|
307
|
+
".ea-carousel__arrow.arrow-right"
|
|
308
|
+
)), t(this, _).call(this), this.updateContainerClasslist();
|
|
309
|
+
}
|
|
310
|
+
connectedCallback() {
|
|
311
|
+
var e, i;
|
|
312
|
+
super.connectedCallback(), (e = t(this, h)) == null || e.abort(), v(this, h, new AbortController());
|
|
313
|
+
for (const a in t(this, c))
|
|
314
|
+
(i = t(this, c)[a]) == null || i.abort(), t(this, c)[a] = new AbortController();
|
|
315
|
+
t(this, x).call(this), t(this, _).call(this), p(this, l, z).call(this), this.autoplay && p(this, l, m).call(this), t(this, g).addEventListener(
|
|
316
|
+
this.trigger === "hover" ? "mouseover" : "click",
|
|
317
|
+
t(this, L),
|
|
318
|
+
{
|
|
319
|
+
signal: t(this, c).triggerAbortControllers.signal
|
|
320
|
+
}
|
|
321
|
+
), t(this, w).addEventListener(
|
|
322
|
+
"transitionend",
|
|
323
|
+
t(this, S),
|
|
324
|
+
{ signal: t(this, h).signal }
|
|
325
|
+
), this.arrow !== "never" && this.direction !== "vertical" && (t(this, C).addEventListener("click", this.prev, {
|
|
326
|
+
signal: t(this, h).signal
|
|
327
|
+
}), t(this, y).addEventListener("click", this.next, {
|
|
328
|
+
signal: t(this, h).signal
|
|
329
|
+
})), t(this, f).addEventListener("mouseenter", t(this, T), {
|
|
330
|
+
signal: t(this, h).signal
|
|
331
|
+
}), window.addEventListener("resize", t(this, I).call(this).listener, {
|
|
332
|
+
signal: t(this, h).signal
|
|
333
|
+
}), queueMicrotask(() => {
|
|
334
|
+
t(this, A).call(this);
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
$beforeUnmounted() {
|
|
338
|
+
var e, i, a;
|
|
339
|
+
(e = t(this, h)) == null || e.abort();
|
|
340
|
+
for (const u in t(this, c))
|
|
341
|
+
(i = t(this, c)[u]) == null || i.abort();
|
|
342
|
+
(a = t(this, I).call(this)) == null || a.unsetHandler();
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
f = new WeakMap(), w = new WeakMap(), C = new WeakMap(), y = new WeakMap(), g = new WeakMap(), d = new WeakMap(), h = new WeakMap(), c = new WeakMap(), o = new WeakMap(), E = new WeakMap(), _ = new WeakMap(), l = new WeakSet(), /**
|
|
346
|
+
* 初始化 `轮播图元素` 结构
|
|
347
|
+
*/
|
|
348
|
+
z = function() {
|
|
349
|
+
try {
|
|
350
|
+
this.childNodes.forEach((u) => {
|
|
351
|
+
u.tagName !== "EA-CAROUSEL-ITEM" && u.remove();
|
|
352
|
+
});
|
|
353
|
+
const e = this.children, i = e[0].cloneNode(!0), a = e[e.length - 1].cloneNode(!0);
|
|
354
|
+
t(this, o).originLength = e.length, this.insertBefore(a, this.firstChild), this.appendChild(i), queueMicrotask(() => {
|
|
355
|
+
t(this, b).call(this);
|
|
356
|
+
});
|
|
357
|
+
} catch {
|
|
358
|
+
}
|
|
359
|
+
}, b = new WeakMap(), R = new WeakMap(), /**
|
|
360
|
+
* 清除轮播图自动播放
|
|
361
|
+
*/
|
|
362
|
+
M = function() {
|
|
363
|
+
t(this, o).timer && (clearInterval(t(this, o).timer), t(this, o).timer = null);
|
|
364
|
+
}, /**
|
|
365
|
+
* 处理轮播图自动播放
|
|
366
|
+
*/
|
|
367
|
+
m = function() {
|
|
368
|
+
this.autoplay && (t(this, o).timer = setInterval(this.next, this.interval));
|
|
369
|
+
}, A = new WeakMap(), x = new WeakMap(), L = new WeakMap(), S = new WeakMap(), T = new WeakMap(), I = new WeakMap();
|
|
370
|
+
window.customElements.get("ea-carousel") || window.customElements.define("ea-carousel", W);
|
|
371
|
+
export {
|
|
372
|
+
W as EaCarousel,
|
|
373
|
+
j as EaCarouselItem
|
|
374
|
+
};
|