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,312 @@
|
|
|
1
|
+
var x = Object.defineProperty;
|
|
2
|
+
var g = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var q = (e, s, t) => s in e ? x(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
6
|
+
var S = (e, s, t) => q(e, typeof s != "symbol" ? s + "" : s, t), A = (e, s, t) => s.has(e) || g("Cannot " + t);
|
|
7
|
+
var i = (e, s, t) => (A(e, s, "read from private field"), t ? t.call(e) : s.get(e)), a = (e, s, t) => s.has(e) ? g("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), c = (e, s, t, r) => (A(e, s, "write to private field"), r ? r.call(e, t) : s.set(e, t), t);
|
|
8
|
+
import { B as _ } from "./Base.js";
|
|
9
|
+
import { s as E } from "../css/ea-step.style.js";
|
|
10
|
+
import { s as R } from "../css/ea-steps.style.js";
|
|
11
|
+
var n, p, h, y, l, d, m, v;
|
|
12
|
+
class $ extends _ {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
a(this, n);
|
|
16
|
+
/** @type {HTMLElement} */
|
|
17
|
+
a(this, h);
|
|
18
|
+
/** @type {HTMLElement} */
|
|
19
|
+
a(this, y);
|
|
20
|
+
/** @type {HTMLElement} */
|
|
21
|
+
a(this, l);
|
|
22
|
+
/** @type {HTMLElement} */
|
|
23
|
+
a(this, d);
|
|
24
|
+
/** @type {HTMLElement} */
|
|
25
|
+
a(this, m);
|
|
26
|
+
/** @type {AbortController} */
|
|
27
|
+
a(this, v, new AbortController());
|
|
28
|
+
S(this, "state", this.properties({
|
|
29
|
+
title: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "",
|
|
32
|
+
observer: (t) => {
|
|
33
|
+
i(this, d).textContent = t;
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
description: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "",
|
|
39
|
+
observer: (t) => {
|
|
40
|
+
i(this, m).textContent = t;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
icon: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "",
|
|
46
|
+
observer: (t) => {
|
|
47
|
+
i(this, l).setAttribute("icon", t);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
status: {
|
|
51
|
+
type: ["", "wait", "process", "finish", "error", "success"],
|
|
52
|
+
default: "",
|
|
53
|
+
observer: (t) => {
|
|
54
|
+
var r;
|
|
55
|
+
this.updateContainerClasslist(), !this.icon && (t === ((r = i(this, n, p)) == null ? void 0 : r.getAttribute("finish-status")) ? (i(this, l).setAttribute("icon", "icon-ok"), i(this, l).textContent = "") : (i(this, l).setAttribute("icon", ""), i(this, l).textContent = this.index + 1));
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
index: {
|
|
59
|
+
type: Number,
|
|
60
|
+
default: () => {
|
|
61
|
+
var r;
|
|
62
|
+
const t = (r = i(this, n, p)) == null ? void 0 : r.querySelectorAll("ea-step");
|
|
63
|
+
return t ? Array.from(t).indexOf(this) : 0;
|
|
64
|
+
},
|
|
65
|
+
observer: () => {
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
simple: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: () => {
|
|
71
|
+
var t;
|
|
72
|
+
return !!((t = i(this, n, p)) != null && t.hasAttribute("simple"));
|
|
73
|
+
},
|
|
74
|
+
observer: () => {
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"align-center": {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: () => {
|
|
80
|
+
var t;
|
|
81
|
+
return !!((t = i(this, n, p)) != null && t.hasAttribute("align-center"));
|
|
82
|
+
},
|
|
83
|
+
observer: () => {
|
|
84
|
+
this.updateContainerClasslist();
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
direction: {
|
|
88
|
+
type: ["vertical", "horizontal"],
|
|
89
|
+
default: () => {
|
|
90
|
+
var t;
|
|
91
|
+
return ((t = i(this, n, p)) == null ? void 0 : t.getAttribute("direction")) || "horizontal";
|
|
92
|
+
},
|
|
93
|
+
observer: () => {
|
|
94
|
+
this.updateContainerClasslist();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}));
|
|
98
|
+
this.stylesheet = E, this.$render();
|
|
99
|
+
}
|
|
100
|
+
static get observedAttributes() {
|
|
101
|
+
return [
|
|
102
|
+
...super.observedAttributes,
|
|
103
|
+
"title",
|
|
104
|
+
"description",
|
|
105
|
+
"icon",
|
|
106
|
+
"status",
|
|
107
|
+
"index",
|
|
108
|
+
"active"
|
|
109
|
+
];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* 获取 classlist 列表
|
|
113
|
+
* @return {string} 属性值
|
|
114
|
+
*/
|
|
115
|
+
updateContainerClasslist() {
|
|
116
|
+
const t = this.computedClasslist(
|
|
117
|
+
"ea-step",
|
|
118
|
+
{
|
|
119
|
+
["--" + this.direction]: this.direction
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
[this.status]: this.status,
|
|
123
|
+
"align-center": this["align-center"],
|
|
124
|
+
icon: this.icon,
|
|
125
|
+
simple: this.simple,
|
|
126
|
+
last: (() => {
|
|
127
|
+
var o;
|
|
128
|
+
const r = (o = i(this, n, p)) == null ? void 0 : o.querySelectorAll("ea-step");
|
|
129
|
+
return r ? r.length - 1 === this.index : !1;
|
|
130
|
+
})(),
|
|
131
|
+
first: this.index === 0
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
return i(this, h) && (i(this, h).className = t), t;
|
|
135
|
+
}
|
|
136
|
+
$render() {
|
|
137
|
+
this.shadowRoot.innerHTML = `
|
|
138
|
+
<div class='ea-step' part='container'>
|
|
139
|
+
<section class="ea-step__head" part="head">
|
|
140
|
+
<div class="ea-step__icon-wrapper" part="icon-wrapper">
|
|
141
|
+
<slot name="icon">
|
|
142
|
+
<ea-icon class="ea-step__icon" part="icon"></ea-icon>
|
|
143
|
+
</slot>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="ea-step__tail" part="tail"></div>
|
|
146
|
+
</section>
|
|
147
|
+
<section class="ea-step__main" part="main">
|
|
148
|
+
<div class="ea-step__title" part="title">
|
|
149
|
+
<slot name="title"></slot>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="ea-step__description" part="description">
|
|
152
|
+
<slot name="description"></slot>
|
|
153
|
+
</div>
|
|
154
|
+
</section>
|
|
155
|
+
<span class="ea-step__simple-arrow" part="simple-arrow">
|
|
156
|
+
<slot name="simple-arrow"></slot>
|
|
157
|
+
</span>
|
|
158
|
+
</div>
|
|
159
|
+
`, c(this, h, this.shadowRoot.querySelector(".ea-step")), c(this, y, this.shadowRoot.querySelector('slot[name="icon"]')), c(this, l, this.shadowRoot.querySelector(".ea-step__icon")), c(this, d, this.shadowRoot.querySelector('slot[name="title"]')), c(this, m, this.shadowRoot.querySelector(
|
|
160
|
+
'slot[name="description"]'
|
|
161
|
+
)), this.updateContainerClasslist();
|
|
162
|
+
}
|
|
163
|
+
connectedCallback() {
|
|
164
|
+
super.connectedCallback();
|
|
165
|
+
}
|
|
166
|
+
$beforeUnmounted() {
|
|
167
|
+
i(this, v).abort();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
n = new WeakSet(), p = function() {
|
|
171
|
+
try {
|
|
172
|
+
return this.closest("ea-steps");
|
|
173
|
+
} catch {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
}, h = new WeakMap(), y = new WeakMap(), l = new WeakMap(), d = new WeakMap(), m = new WeakMap(), v = new WeakMap();
|
|
177
|
+
window.customElements.get("ea-step") || window.customElements.define("ea-step", $);
|
|
178
|
+
var b, w, C;
|
|
179
|
+
class B extends _ {
|
|
180
|
+
constructor() {
|
|
181
|
+
super();
|
|
182
|
+
/** @type {HTMLElement} */
|
|
183
|
+
a(this, b);
|
|
184
|
+
/** @type {AbortController} */
|
|
185
|
+
a(this, w, new AbortController());
|
|
186
|
+
S(this, "state", this.properties({
|
|
187
|
+
space: {
|
|
188
|
+
type: String,
|
|
189
|
+
default: "50%",
|
|
190
|
+
observer: (t) => {
|
|
191
|
+
this.style.setProperty("--ea-step-tail-spacing", t);
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
// TODO: 没写😋
|
|
195
|
+
// direction: {
|
|
196
|
+
// type: ["vertical", "horizontal"],
|
|
197
|
+
// default: "horizontal",
|
|
198
|
+
// observer: (newVal) => {
|
|
199
|
+
// this.updateContainerClasslist();
|
|
200
|
+
// },
|
|
201
|
+
// },
|
|
202
|
+
active: {
|
|
203
|
+
type: Number,
|
|
204
|
+
default: 0,
|
|
205
|
+
observer: (t) => {
|
|
206
|
+
i(this, C).call(this, t);
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"process-status": {
|
|
210
|
+
type: ["wait", "process", "finish", "error", "success"],
|
|
211
|
+
default: "process",
|
|
212
|
+
observer: () => {
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"finish-status": {
|
|
216
|
+
type: ["wait", "process", "finish", "error", "success"],
|
|
217
|
+
default: "finish",
|
|
218
|
+
observer: () => {
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"align-center": {
|
|
222
|
+
type: Boolean,
|
|
223
|
+
default: !1,
|
|
224
|
+
observer: () => {
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
simple: {
|
|
228
|
+
type: Boolean,
|
|
229
|
+
default: !1,
|
|
230
|
+
observer: (t) => {
|
|
231
|
+
const r = [...this.querySelectorAll("ea-step")];
|
|
232
|
+
t ? r.forEach((o) => {
|
|
233
|
+
var u;
|
|
234
|
+
try {
|
|
235
|
+
(u = o.querySelector('[slot="simple-arrow"]')) == null || u.remove();
|
|
236
|
+
} catch {
|
|
237
|
+
}
|
|
238
|
+
try {
|
|
239
|
+
const f = document.createElement("ea-icon");
|
|
240
|
+
f.setAttribute("slot", "simple-arrow"), f.setAttribute("icon", "icon-angle-right"), f.part = "simple-arrow", o.appendChild(f);
|
|
241
|
+
} catch {
|
|
242
|
+
}
|
|
243
|
+
}) : r.forEach((o) => {
|
|
244
|
+
var u;
|
|
245
|
+
try {
|
|
246
|
+
(u = o.querySelector('[slot="simple-arrow"]')) == null || u.remove();
|
|
247
|
+
} catch {
|
|
248
|
+
}
|
|
249
|
+
}), this.updateContainerClasslist();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}));
|
|
253
|
+
/**
|
|
254
|
+
* 更新步骤状态
|
|
255
|
+
* @param {number} active
|
|
256
|
+
*/
|
|
257
|
+
a(this, C, (t) => {
|
|
258
|
+
[...this.querySelectorAll("ea-step")].forEach((o) => {
|
|
259
|
+
o.index < t ? o.setAttribute("status", this["finish-status"]) : o.index > t ? o.setAttribute("status", "wait") : o.setAttribute("status", this["process-status"]);
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
this.stylesheet = R, this.$render();
|
|
263
|
+
}
|
|
264
|
+
static get observedAttributes() {
|
|
265
|
+
return [
|
|
266
|
+
...super.observedAttributes,
|
|
267
|
+
"space",
|
|
268
|
+
"direction",
|
|
269
|
+
"active",
|
|
270
|
+
"process-status",
|
|
271
|
+
"finish-status",
|
|
272
|
+
"align-center",
|
|
273
|
+
"simple"
|
|
274
|
+
];
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* 获取 classlist 列表
|
|
278
|
+
* @return {string} 属性值
|
|
279
|
+
*/
|
|
280
|
+
updateContainerClasslist() {
|
|
281
|
+
const t = this.computedClasslist(
|
|
282
|
+
"ea-steps",
|
|
283
|
+
{
|
|
284
|
+
// ["--" + this.direction]: this.direction,
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
simple: this.simple,
|
|
288
|
+
"align-center": this["align-center"]
|
|
289
|
+
}
|
|
290
|
+
);
|
|
291
|
+
return i(this, b).className = t, t;
|
|
292
|
+
}
|
|
293
|
+
$render() {
|
|
294
|
+
this.shadowRoot.innerHTML = `
|
|
295
|
+
<div class='ea-steps' part='container'>
|
|
296
|
+
<slot></slot>
|
|
297
|
+
</div>
|
|
298
|
+
`, c(this, b, this.shadowRoot.querySelector(".ea-steps"));
|
|
299
|
+
}
|
|
300
|
+
connectedCallback() {
|
|
301
|
+
super.connectedCallback();
|
|
302
|
+
}
|
|
303
|
+
$beforeUnmounted() {
|
|
304
|
+
i(this, w).abort();
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
b = new WeakMap(), w = new WeakMap(), C = new WeakMap();
|
|
308
|
+
window.customElements.get("ea-steps") || window.customElements.define("ea-steps", B);
|
|
309
|
+
export {
|
|
310
|
+
$ as EaStep,
|
|
311
|
+
B as EaSteps
|
|
312
|
+
};
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var m = (i) => {
|
|
3
|
+
throw TypeError(i);
|
|
4
|
+
};
|
|
5
|
+
var w = (i, a, t) => a in i ? y(i, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[a] = t;
|
|
6
|
+
var p = (i, a, t) => w(i, typeof a != "symbol" ? a + "" : a, t), f = (i, a, t) => a.has(i) || m("Cannot " + t);
|
|
7
|
+
var e = (i, a, t) => (f(i, a, "read from private field"), t ? t.call(i) : a.get(i)), l = (i, a, t) => a.has(i) ? m("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(i) : a.set(i, t), h = (i, a, t, s) => (f(i, a, "write to private field"), s ? s.call(i, t) : a.set(i, t), t);
|
|
8
|
+
import { F as S } from "../core/FormBase.js";
|
|
9
|
+
import { s as C } from "../css/ea-switch.style.js";
|
|
10
|
+
import { E as _ } from "../utils/Variables.js";
|
|
11
|
+
var n, r, d, c, v, b, o, u, g;
|
|
12
|
+
class N extends S {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
/** @type {HTMLElement} */
|
|
16
|
+
l(this, n);
|
|
17
|
+
/** @type {HTMLInputElement} */
|
|
18
|
+
l(this, r);
|
|
19
|
+
/** @type {HTMLElement} */
|
|
20
|
+
l(this, d);
|
|
21
|
+
/** @type {HTMLElement} */
|
|
22
|
+
l(this, c);
|
|
23
|
+
/** @type {HTMLElement} */
|
|
24
|
+
l(this, v);
|
|
25
|
+
/** @type {HTMLElement} */
|
|
26
|
+
l(this, b);
|
|
27
|
+
/** @type {AbortController} */
|
|
28
|
+
l(this, o);
|
|
29
|
+
/** @type {AbortController} */
|
|
30
|
+
l(this, u);
|
|
31
|
+
p(this, "state", this.properties({
|
|
32
|
+
label: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "",
|
|
35
|
+
observer: async (t) => {
|
|
36
|
+
e(this, b).textContent = t;
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
name: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "",
|
|
42
|
+
observer: (t) => {
|
|
43
|
+
e(this, n).setAttribute("for", t), e(this, r).setAttribute("name", t), e(this, r).setAttribute("id", t);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
value: {
|
|
47
|
+
type: {
|
|
48
|
+
Number: () => this.hasAttribute("active-value") && (this.getAttrNumber("active-value") || this.getAttrNumber("active-value") === 0 || this.getAttrNumber("inactive-value") || this.getAttrNumber("inactive-value") === 0),
|
|
49
|
+
String: () => this.hasAttribute("active-value") && (this.getAttrString("active-value") || this.getAttrString("active-value") === "" || this.getAttrString("inactive-value") || this.getAttrString("inactive-value") === ""),
|
|
50
|
+
Boolean: () => this.hasAttribute("active-value") || !this.hasAttribute("active-value") || this.hasAttribute("inactive-value") || !this.hasAttribute("inactive-value")
|
|
51
|
+
},
|
|
52
|
+
default: () => !1,
|
|
53
|
+
observer: (t) => {
|
|
54
|
+
const s = t === this["active-value"] ? this["active-value"] : this["inactive-value"];
|
|
55
|
+
e(this, r).value = s, e(this, r).toggleAttribute("checked", s), this.setValue(s), this.updateContainerClasslist();
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"active-value": {
|
|
59
|
+
type: {
|
|
60
|
+
Number: () => this.hasAttribute("active-value") && (this.getAttrNumber("active-value") || this.getAttrNumber("active-value") === 0),
|
|
61
|
+
String: () => this.hasAttribute("active-value") && (this.getAttrString("active-value") || this.getAttrString("active-value") === ""),
|
|
62
|
+
Boolean: () => this.hasAttribute("active-value") || !this.hasAttribute("active-value")
|
|
63
|
+
},
|
|
64
|
+
default: !0,
|
|
65
|
+
observer: () => {
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"inactive-value": {
|
|
69
|
+
type: {
|
|
70
|
+
Number: () => this.hasAttribute("inactive-value") && (this.getAttrNumber("inactive-value") || this.getAttrNumber("inactive-value") === 0),
|
|
71
|
+
String: () => this.hasAttribute("inactive-value") && (this.getAttrString("inactive-value") || this.getAttrString("inactive-value") === ""),
|
|
72
|
+
Boolean: () => this.hasAttribute("inactive-value") || !this.hasAttribute("inactive-value")
|
|
73
|
+
},
|
|
74
|
+
default: () => !1,
|
|
75
|
+
observer: () => {
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
size: {
|
|
79
|
+
type: _,
|
|
80
|
+
default: "default",
|
|
81
|
+
observer: () => {
|
|
82
|
+
this.updateContainerClasslist();
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"inactive-text": {
|
|
86
|
+
type: String,
|
|
87
|
+
default: "",
|
|
88
|
+
observer: (t) => {
|
|
89
|
+
e(this, v).innerText = t;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"inactive-color": {
|
|
93
|
+
type: String,
|
|
94
|
+
default: "",
|
|
95
|
+
observer: (t) => {
|
|
96
|
+
this.style.setProperty("--ea-switch-inactive-bg-color", t);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"active-text": {
|
|
100
|
+
type: String,
|
|
101
|
+
default: "",
|
|
102
|
+
observer: (t) => {
|
|
103
|
+
e(this, c).innerText = t;
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"active-color": {
|
|
107
|
+
type: String,
|
|
108
|
+
default: "",
|
|
109
|
+
observer: (t) => {
|
|
110
|
+
this.style.setProperty("--ea-switch-active-bg-color", t);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
disabled: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: !1,
|
|
116
|
+
observer: (t) => {
|
|
117
|
+
e(this, r).toggleAttribute("disabled", t), this.updateContainerClasslist();
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
required: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: !1,
|
|
123
|
+
observer: (t) => {
|
|
124
|
+
e(this, r).toggleAttribute("required", t);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}));
|
|
128
|
+
p(this, "funcState", this.properties({
|
|
129
|
+
beforeChange: {
|
|
130
|
+
props: !0,
|
|
131
|
+
type: Function,
|
|
132
|
+
default: null,
|
|
133
|
+
/**
|
|
134
|
+
* @param {() => Promise} cb
|
|
135
|
+
*/
|
|
136
|
+
observer: (t) => {
|
|
137
|
+
var s;
|
|
138
|
+
(s = e(this, u)) == null || s.abort(), h(this, u, new AbortController()), e(this, r).addEventListener(
|
|
139
|
+
"click",
|
|
140
|
+
async (A) => {
|
|
141
|
+
A.preventDefault(), A.stopImmediatePropagation(), t && t().then(() => {
|
|
142
|
+
e(this, r).checked = !this.value, e(this, r).dispatchEvent(new CustomEvent("change"));
|
|
143
|
+
}).catch(() => {
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
{ signal: e(this, u).signal }
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}));
|
|
151
|
+
/**
|
|
152
|
+
* 改变事件
|
|
153
|
+
* @param {Event} e
|
|
154
|
+
*/
|
|
155
|
+
l(this, g, (t) => {
|
|
156
|
+
t.preventDefault(), t.stopPropagation();
|
|
157
|
+
const s = t.target.checked ? this["active-value"] : this["inactive-value"];
|
|
158
|
+
this.setAttribute("value", s), this.emit("change", {
|
|
159
|
+
detail: { value: s },
|
|
160
|
+
bubbles: !0
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
this.stylesheet = C, this.$render();
|
|
164
|
+
}
|
|
165
|
+
static get observedAttributes() {
|
|
166
|
+
return [
|
|
167
|
+
...super.observedAttributes,
|
|
168
|
+
"name",
|
|
169
|
+
"value",
|
|
170
|
+
"active-value",
|
|
171
|
+
"inactive-value",
|
|
172
|
+
"label",
|
|
173
|
+
"size",
|
|
174
|
+
"inactive-text",
|
|
175
|
+
"inactive-color",
|
|
176
|
+
"active-text",
|
|
177
|
+
"active-color",
|
|
178
|
+
"disabled",
|
|
179
|
+
"required"
|
|
180
|
+
];
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* 获取 classlist 列表
|
|
184
|
+
* @return {string} 属性值
|
|
185
|
+
*/
|
|
186
|
+
updateContainerClasslist() {
|
|
187
|
+
const t = this.computedClasslist(
|
|
188
|
+
"ea-switch",
|
|
189
|
+
{
|
|
190
|
+
[`--${this.size}`]: this.size
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
checked: this.value === this["active-value"],
|
|
194
|
+
disabled: this.disabled || this.loading,
|
|
195
|
+
loading: this.loading
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
return e(this, n).className = t, t;
|
|
199
|
+
}
|
|
200
|
+
$render() {
|
|
201
|
+
this.shadowRoot.innerHTML = `
|
|
202
|
+
<label class="ea-switch-wrapper" part="wrapper">
|
|
203
|
+
<span class="ea-switch__form-label" part="label form-label"></span>
|
|
204
|
+
<section class="ea-switch" part="container">
|
|
205
|
+
<input class="ea-switch__original" type="checkbox" part="original" />
|
|
206
|
+
<span class="ea-switch__label label-left" part="label-left">
|
|
207
|
+
<slot name="inactive"></slot>
|
|
208
|
+
</span>
|
|
209
|
+
<span class="ea-switch__inner" part="switch"></span>
|
|
210
|
+
<span class="ea-switch__label label-right" part="label-right">
|
|
211
|
+
<slot name="active"></slot>
|
|
212
|
+
</span>
|
|
213
|
+
</section>
|
|
214
|
+
</label>
|
|
215
|
+
`, h(this, b, this.shadowRoot.querySelector(".ea-switch__form-label")), h(this, n, this.shadowRoot.querySelector(".ea-switch")), h(this, r, this.shadowRoot.querySelector(".ea-switch__original")), h(this, d, this.shadowRoot.querySelector(".ea-switch__inner")), h(this, v, this.shadowRoot.querySelector(
|
|
216
|
+
".ea-switch__label.label-left > slot[name='inactive']"
|
|
217
|
+
)), h(this, c, this.shadowRoot.querySelector(
|
|
218
|
+
".ea-switch__label.label-right slot[name='active']"
|
|
219
|
+
)), this.updateContainerClasslist();
|
|
220
|
+
}
|
|
221
|
+
connectedCallback() {
|
|
222
|
+
var t;
|
|
223
|
+
super.connectedCallback(), (t = e(this, o)) == null || t.abort(), h(this, o, new AbortController()), this.name || this.setAttribute("name", Math.random().toString(36).substring(2, 15)), this.setValue(
|
|
224
|
+
e(this, r).checked ? this["active-value"] : this["inactive-value"]
|
|
225
|
+
), e(this, r).addEventListener("change", e(this, g), {
|
|
226
|
+
signal: e(this, o).signal
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
$unmounted() {
|
|
230
|
+
var t, s;
|
|
231
|
+
(t = e(this, o)) == null || t.abort(), (s = e(this, u)) == null || s.abort();
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* 获取验证目标元素
|
|
235
|
+
* @returns {HTMLElement}
|
|
236
|
+
*/
|
|
237
|
+
get validationTarget() {
|
|
238
|
+
return e(this, n);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* 更新表单验证状态
|
|
242
|
+
* switch 的验证逻辑:当 required 为 true 时,必须处于选中状态(value 等于 active-value)
|
|
243
|
+
*/
|
|
244
|
+
updateValidity() {
|
|
245
|
+
const t = this.value === this["active-value"];
|
|
246
|
+
this.required && !t ? this.internals.setValidity(
|
|
247
|
+
{ valueMissing: !0 },
|
|
248
|
+
"请开启此选项",
|
|
249
|
+
e(this, n)
|
|
250
|
+
) : this.internals.setValidity({}, "", e(this, n));
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* 检查表单字段的有效性
|
|
254
|
+
* @returns {boolean}
|
|
255
|
+
*/
|
|
256
|
+
checkValidity() {
|
|
257
|
+
return this.updateValidity(), this.internals.validity.valid;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* 报告表单字段的有效性(显示验证提示)
|
|
261
|
+
* @returns {boolean}
|
|
262
|
+
*/
|
|
263
|
+
reportValidity() {
|
|
264
|
+
return this.internals.reportValidity();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
n = new WeakMap(), r = new WeakMap(), d = new WeakMap(), c = new WeakMap(), v = new WeakMap(), b = new WeakMap(), o = new WeakMap(), u = new WeakMap(), g = new WeakMap();
|
|
268
|
+
window.customElements.get("ea-switch") || window.customElements.define("ea-switch", N);
|
|
269
|
+
export {
|
|
270
|
+
N as EaSwitch
|
|
271
|
+
};
|