easy-component-ui 2.1.1 → 3.0.1
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 +301 -12
- 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,196 @@
|
|
|
1
|
+
var w = Object.defineProperty;
|
|
2
|
+
var y = (t) => {
|
|
3
|
+
throw TypeError(t);
|
|
4
|
+
};
|
|
5
|
+
var C = (t, s, e) => s in t ? w(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
6
|
+
var m = (t, s, e) => C(t, typeof s != "symbol" ? s + "" : s, e), _ = (t, s, e) => s.has(t) || y("Cannot " + e);
|
|
7
|
+
var o = (t, s, e) => (_(t, s, "read from private field"), e ? e.call(t) : s.get(t)), i = (t, s, e) => s.has(t) ? y("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), r = (t, s, e, c) => (_(t, s, "write to private field"), c ? c.call(t, e) : s.set(t, e), e);
|
|
8
|
+
import { B as g } from "./Base.js";
|
|
9
|
+
import { s as S } from "../css/ea-alert.style.js";
|
|
10
|
+
import { t as b } from "../utils/timeout.js";
|
|
11
|
+
var a, h, f, p, d, l, n, u;
|
|
12
|
+
class L extends g {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
/** @type {HTMLElement} */
|
|
16
|
+
i(this, a);
|
|
17
|
+
/** @type {HTMLElement} */
|
|
18
|
+
i(this, h);
|
|
19
|
+
/** @type {HTMLElement} */
|
|
20
|
+
i(this, f);
|
|
21
|
+
/** @type {HTMLElement} */
|
|
22
|
+
i(this, p);
|
|
23
|
+
/** @type {HTMLElement} */
|
|
24
|
+
i(this, d);
|
|
25
|
+
/** @type {HTMLElement} */
|
|
26
|
+
i(this, l);
|
|
27
|
+
/** @type {AbortController} */
|
|
28
|
+
i(this, n);
|
|
29
|
+
m(this, "state", this.properties({
|
|
30
|
+
title: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "",
|
|
33
|
+
observer: (e) => {
|
|
34
|
+
o(this, p).innerHTML = e || '<slot name="title"></slot>';
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
description: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "",
|
|
40
|
+
observer: (e) => {
|
|
41
|
+
o(this, d).innerHTML = e || "<slot></slot>";
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
type: {
|
|
45
|
+
type: ["primary", "info", "success", "warning", "error"],
|
|
46
|
+
default: "info",
|
|
47
|
+
observer: (e) => {
|
|
48
|
+
o(this, a).className = this.updateContainerClasslist();
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
effect: {
|
|
52
|
+
type: ["light", "dark"],
|
|
53
|
+
default: "light",
|
|
54
|
+
observer: (e) => {
|
|
55
|
+
o(this, a).className = this.updateContainerClasslist();
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"close-text": {
|
|
59
|
+
type: String,
|
|
60
|
+
default: "",
|
|
61
|
+
observer: (e) => {
|
|
62
|
+
try {
|
|
63
|
+
o(this, l).textContent = e;
|
|
64
|
+
} catch {
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
closable: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: !0,
|
|
71
|
+
observer: (e) => {
|
|
72
|
+
o(this, l).innerHTML = e ? this["close-text"] ? this["close-text"] : '<ea-icon class="ea-alert__close-icon" icon="icon-cancel" part="close-icon"></ea-icon>' : "";
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"show-icon": {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: !1,
|
|
78
|
+
observer: (e) => {
|
|
79
|
+
const c = {
|
|
80
|
+
primary: "info",
|
|
81
|
+
success: "ok-circled",
|
|
82
|
+
info: "info",
|
|
83
|
+
warning: "attention-alt",
|
|
84
|
+
error: "cancel-circled"
|
|
85
|
+
}, v = this.querySelector("[slot=icon]");
|
|
86
|
+
o(this, h).innerHTML = e && !v ? `<ea-icon class="ea-alert__icon" icon="icon-${c[this.type]}" part="icon"></ea-icon>` : '<slot name="icon"></slot>';
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
center: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: !1,
|
|
92
|
+
observer: () => {
|
|
93
|
+
o(this, a).className = this.updateContainerClasslist();
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"show-after": {
|
|
97
|
+
type: Number,
|
|
98
|
+
default: 0,
|
|
99
|
+
observer: (e) => {
|
|
100
|
+
e = Math.abs(e), o(this, a).classList.toggle("ea-alert--hide", e > 0), b(() => {
|
|
101
|
+
this.emit("open"), o(this, a).classList.remove("ea-alert--hide");
|
|
102
|
+
}, e);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"hide-after": {
|
|
106
|
+
type: Number,
|
|
107
|
+
default: 300,
|
|
108
|
+
observer: (e) => {
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"auto-close": {
|
|
112
|
+
type: Number,
|
|
113
|
+
default: 0,
|
|
114
|
+
observer: (e) => {
|
|
115
|
+
e && this.isMounted && b(() => o(this, u).call(this), this["auto-close"]);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}));
|
|
119
|
+
i(this, u, (e) => {
|
|
120
|
+
b(() => {
|
|
121
|
+
o(this, n).abort(), o(this, a).classList.add("ea-alert--before-close"), o(this, a).addEventListener(
|
|
122
|
+
"transitionend",
|
|
123
|
+
() => {
|
|
124
|
+
this.emit("close", {
|
|
125
|
+
detail: {
|
|
126
|
+
visible: !1
|
|
127
|
+
}
|
|
128
|
+
}), this.remove();
|
|
129
|
+
},
|
|
130
|
+
{ once: !0 }
|
|
131
|
+
);
|
|
132
|
+
}, this["hide-after"]);
|
|
133
|
+
});
|
|
134
|
+
this.$render(), this.stylesheet = S;
|
|
135
|
+
}
|
|
136
|
+
static get observedAttributes() {
|
|
137
|
+
return [
|
|
138
|
+
"title",
|
|
139
|
+
"description",
|
|
140
|
+
"type",
|
|
141
|
+
"effect",
|
|
142
|
+
"closable",
|
|
143
|
+
"close-text",
|
|
144
|
+
"show-icon",
|
|
145
|
+
"center",
|
|
146
|
+
"description",
|
|
147
|
+
"show-after",
|
|
148
|
+
"hide-after",
|
|
149
|
+
"auto-close"
|
|
150
|
+
];
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* 获取 classlist 列表
|
|
154
|
+
* @return {string} 属性值
|
|
155
|
+
*/
|
|
156
|
+
updateContainerClasslist() {
|
|
157
|
+
return this.computedClasslist("ea-alert", {
|
|
158
|
+
["--" + this.type]: this.type,
|
|
159
|
+
["--" + this.effect]: this.effect,
|
|
160
|
+
"--center": this.center
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
$render() {
|
|
164
|
+
this.shadowRoot.innerHTML = `
|
|
165
|
+
<div class='ea-alert' part='container'>
|
|
166
|
+
<span class="ea-alert__icon-wrap" part='icon-wrap'>
|
|
167
|
+
<slot name='icon'></slot>
|
|
168
|
+
</span>
|
|
169
|
+
<div class="ea-alert__content" part='content-wrap'>
|
|
170
|
+
<span class="ea-alert__title" part='title'></span>
|
|
171
|
+
<p class="ea-alert__description" part='description'>
|
|
172
|
+
<slot></slot>
|
|
173
|
+
</p>
|
|
174
|
+
<span class="ea-alert__close-btn" part="close-btn">
|
|
175
|
+
${this.closable ? this["close-text"] ? this["close-text"] : '<ea-icon class="ea-alert__close-icon" icon="icon-cancel" part="close-icon"></ea-icon>' : ""}
|
|
176
|
+
</span>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
`, r(this, a, this.shadowRoot.querySelector(".ea-alert")), r(this, h, this.shadowRoot.querySelector(".ea-alert__icon-wrap")), r(this, f, this.shadowRoot.querySelector(".ea-alert__content")), r(this, p, this.shadowRoot.querySelector(".ea-alert__title")), r(this, d, this.shadowRoot.querySelector(
|
|
180
|
+
".ea-alert__description"
|
|
181
|
+
)), r(this, l, this.shadowRoot.querySelector(".ea-alert__close-btn"));
|
|
182
|
+
}
|
|
183
|
+
connectedCallback() {
|
|
184
|
+
super.connectedCallback(), r(this, n, new AbortController()), this.closable && o(this, l).addEventListener("click", o(this, u), {
|
|
185
|
+
signal: o(this, n).signal
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
$beforeUnmounted() {
|
|
189
|
+
o(this, n).abort();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
a = new WeakMap(), h = new WeakMap(), f = new WeakMap(), p = new WeakMap(), d = new WeakMap(), l = new WeakMap(), n = new WeakMap(), u = new WeakMap();
|
|
193
|
+
window.customElements.get("ea-alert") || window.customElements.define("ea-alert", L);
|
|
194
|
+
export {
|
|
195
|
+
L as EaAlert
|
|
196
|
+
};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
var u = Object.defineProperty;
|
|
2
|
+
var v = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var g = (e, a, t) => a in e ? u(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
|
|
6
|
+
var f = (e, a, t) => g(e, typeof a != "symbol" ? a + "" : a, t), p = (e, a, t) => a.has(e) || v("Cannot " + t);
|
|
7
|
+
var r = (e, a, t) => (p(e, a, "read from private field"), t ? t.call(e) : a.get(e)), n = (e, a, t) => a.has(e) ? v("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, t), h = (e, a, t, s) => (p(e, a, "write to private field"), s ? s.call(e, t) : a.set(e, t), t);
|
|
8
|
+
import { B as m } from "./Base.js";
|
|
9
|
+
import { E as w } from "../utils/Utils.js";
|
|
10
|
+
import { s as y } from "../css/ea-avatar.style.js";
|
|
11
|
+
const b = `
|
|
12
|
+
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
|
13
|
+
<defs>
|
|
14
|
+
<clipPath id="a">
|
|
15
|
+
<path d="M0 30h90v45H0z" />
|
|
16
|
+
</clipPath>
|
|
17
|
+
</defs>
|
|
18
|
+
<path fill="#c0c4cc" d="M0 0h100v100H0z" />
|
|
19
|
+
<circle cx="50" cy="35" r="15" fill="#fff" />
|
|
20
|
+
<circle cx="50" cy="82.5" r="30" fill="#fff" clip-path="url(#a)" />
|
|
21
|
+
</svg>
|
|
22
|
+
`, S = `
|
|
23
|
+
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
|
24
|
+
<path fill="#c0c4cc" d="M0 0h100v100H0z" />
|
|
25
|
+
<path fill="#fff" d="M20 25h60v50H20z" />
|
|
26
|
+
<circle r="7" cx="35" cy="40" fill="#c0c4cc" />
|
|
27
|
+
<path d="M35 55L25 70h-5 30z" fill="#c0c4cc" />
|
|
28
|
+
<path d="M55 45L40 70h5 30z" fill="#c0c4cc" />
|
|
29
|
+
</svg>
|
|
30
|
+
`;
|
|
31
|
+
var i, l;
|
|
32
|
+
class C extends m {
|
|
33
|
+
constructor() {
|
|
34
|
+
super();
|
|
35
|
+
/** @type {HTMLElement} */
|
|
36
|
+
n(this, i);
|
|
37
|
+
/** @type {AbortController} */
|
|
38
|
+
n(this, l);
|
|
39
|
+
f(this, "state", this.properties({
|
|
40
|
+
icon: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "",
|
|
43
|
+
observer: (t) => {
|
|
44
|
+
r(this, i).innerHTML = `<ea-icon class="ea-avatar__icon" icon="${t}" part="icon-avatar"></ea-icon>`;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
shape: {
|
|
48
|
+
type: ["circle", "square"],
|
|
49
|
+
default: "circle",
|
|
50
|
+
observer: () => {
|
|
51
|
+
r(this, i).className = this.updateContainerClasslist();
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
size: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "default",
|
|
57
|
+
observer: (t) => {
|
|
58
|
+
const s = w.Enum.hasEnum(
|
|
59
|
+
["default", "small", "large"],
|
|
60
|
+
t
|
|
61
|
+
), c = CSS.supports("width", t);
|
|
62
|
+
if (!s && !c)
|
|
63
|
+
return this.size = "default", console.warn(
|
|
64
|
+
"[ea-avatar] Please set size to one of [default, small, large] or a valid CSS width value"
|
|
65
|
+
);
|
|
66
|
+
this.style.setProperty(
|
|
67
|
+
"--ea-avatar-size",
|
|
68
|
+
s ? `var(--ea-avatar-size-${t})` : t
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
src: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: "",
|
|
75
|
+
observer: (t) => {
|
|
76
|
+
var c;
|
|
77
|
+
(c = r(this, l)) == null || c.abort(), h(this, l, new AbortController());
|
|
78
|
+
const s = new Image();
|
|
79
|
+
s.src = t, s.addEventListener(
|
|
80
|
+
"load",
|
|
81
|
+
() => {
|
|
82
|
+
var o;
|
|
83
|
+
r(this, i).innerHTML = `<img class="ea-avatar__img" src="${t}" alt="${this.alt}" srcset="${this["src-set"]}" part="img-avatar" />`, (o = r(this, l)) == null || o.abort();
|
|
84
|
+
},
|
|
85
|
+
{ signal: r(this, l).signal }
|
|
86
|
+
), s.addEventListener(
|
|
87
|
+
"error",
|
|
88
|
+
() => {
|
|
89
|
+
var d;
|
|
90
|
+
const o = r(this, i).querySelector("slot");
|
|
91
|
+
o && (o.innerHTML = S), this.emit("error"), (d = r(this, l)) == null || d.abort();
|
|
92
|
+
},
|
|
93
|
+
{ signal: r(this, l).signal }
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"src-set": {
|
|
98
|
+
type: String,
|
|
99
|
+
default: "",
|
|
100
|
+
observer: (t) => {
|
|
101
|
+
const s = this.shadowRoot.querySelector(".ea-avatar__img");
|
|
102
|
+
s && (s.srcset = t);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
alt: {
|
|
106
|
+
type: String,
|
|
107
|
+
default: "",
|
|
108
|
+
observer: (t) => {
|
|
109
|
+
const s = this.shadowRoot.querySelector(".ea-avatar__img");
|
|
110
|
+
s && (s.alt = t);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
fit: {
|
|
114
|
+
type: ["fill", "contain", "cover", "none", "scale-down"],
|
|
115
|
+
default: "cover",
|
|
116
|
+
observer: (t) => {
|
|
117
|
+
this.style.setProperty("--ea-avatar-fit", t);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}));
|
|
121
|
+
this.stylesheet = y, this.$render();
|
|
122
|
+
}
|
|
123
|
+
static get observedAttributes() {
|
|
124
|
+
return [
|
|
125
|
+
...super.observedAttributes,
|
|
126
|
+
"icon",
|
|
127
|
+
"shape",
|
|
128
|
+
"size",
|
|
129
|
+
"src",
|
|
130
|
+
"src-set",
|
|
131
|
+
"alt",
|
|
132
|
+
"fit"
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* 获取 classlist 列表
|
|
137
|
+
* @return {string} 属性值
|
|
138
|
+
*/
|
|
139
|
+
updateContainerClasslist() {
|
|
140
|
+
return this.computedClasslist("ea-avatar", {
|
|
141
|
+
["--" + this.shape]: this.shape
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
$render() {
|
|
145
|
+
this.shadowRoot.innerHTML = `
|
|
146
|
+
<div class="ea-avatar" part='container'>
|
|
147
|
+
<slot>${b}</slot>
|
|
148
|
+
</div>
|
|
149
|
+
`, h(this, i, this.shadowRoot.querySelector(".ea-avatar"));
|
|
150
|
+
}
|
|
151
|
+
connectedCallback() {
|
|
152
|
+
super.connectedCallback(), r(this, i).className = this.updateContainerClasslist();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
i = new WeakMap(), l = new WeakMap();
|
|
156
|
+
window.customElements.get("ea-avatar") || window.customElements.define("ea-avatar", C);
|
|
157
|
+
export {
|
|
158
|
+
C as EaAvatar
|
|
159
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var p = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var v = (e, s, t) => s in e ? m(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
6
|
+
var u = (e, s, t) => v(e, typeof s != "symbol" ? s + "" : s, t), g = (e, s, t) => s.has(e) || p("Cannot " + t);
|
|
7
|
+
var o = (e, s, t) => (g(e, s, "read from private field"), t ? t.call(e) : s.get(e)), a = (e, s, t) => s.has(e) ? p("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), c = (e, s, t, i) => (g(e, s, "write to private field"), i ? i.call(e, t) : s.set(e, t), t);
|
|
8
|
+
import { B as y } from "./Base.js";
|
|
9
|
+
import { s as f } from "../css/ea-backtop.style.js";
|
|
10
|
+
var r, l, n, h, d, b;
|
|
11
|
+
class w extends y {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
/** @type {HTMLElement} */
|
|
15
|
+
a(this, r);
|
|
16
|
+
/** @type {AbortController} */
|
|
17
|
+
a(this, l);
|
|
18
|
+
/** @type {AbortController} */
|
|
19
|
+
a(this, n);
|
|
20
|
+
u(this, "state", this.properties({
|
|
21
|
+
target: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "window",
|
|
24
|
+
observer: () => {
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"visibility-height": {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 200,
|
|
30
|
+
observer: () => {
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
right: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "40px",
|
|
36
|
+
observer: (t) => {
|
|
37
|
+
this.style.setProperty("--ea-backtop-right", t);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
bottom: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "40px",
|
|
43
|
+
observer: (t) => {
|
|
44
|
+
this.style.setProperty("--ea-backtop-bottom", t);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
smooth: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: !0,
|
|
50
|
+
observer: () => {
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
/**
|
|
55
|
+
* 获取当前滚动位置
|
|
56
|
+
* @return {number} 滚动位置
|
|
57
|
+
*/
|
|
58
|
+
a(this, h, () => {
|
|
59
|
+
const t = document.querySelector(this.target);
|
|
60
|
+
return t ? t.scrollTop : window.scrollY;
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* 点击事件处理
|
|
64
|
+
*/
|
|
65
|
+
a(this, d, () => {
|
|
66
|
+
(document.querySelector(this.target) || window).scrollTo({
|
|
67
|
+
top: 0,
|
|
68
|
+
behavior: this.smooth ? "smooth" : "auto"
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* 滚动事件处理
|
|
73
|
+
*/
|
|
74
|
+
a(this, b, async () => {
|
|
75
|
+
var i;
|
|
76
|
+
o(this, h).call(this) > this["visibility-height"] ? (o(this, r).classList.add("before-enter"), o(this, r).offsetWidth, this.updateContainerClasslist()) : ((i = o(this, n)) == null || i.abort(), c(this, n, new AbortController()), o(this, r).classList.add("before-leave"), o(this, r).addEventListener(
|
|
77
|
+
"transitionend",
|
|
78
|
+
() => {
|
|
79
|
+
this.updateContainerClasslist();
|
|
80
|
+
},
|
|
81
|
+
{ once: !0, signal: o(this, n).signal }
|
|
82
|
+
));
|
|
83
|
+
});
|
|
84
|
+
this.stylesheet = f, this.$render();
|
|
85
|
+
}
|
|
86
|
+
static get observedAttributes() {
|
|
87
|
+
return [
|
|
88
|
+
...super.observedAttributes,
|
|
89
|
+
"target",
|
|
90
|
+
"visibility-height",
|
|
91
|
+
"right",
|
|
92
|
+
"bottom",
|
|
93
|
+
"smooth"
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 获取 classlist 列表
|
|
98
|
+
* @return {string} 属性值
|
|
99
|
+
*/
|
|
100
|
+
updateContainerClasslist() {
|
|
101
|
+
const t = o(this, h).call(this), i = this.computedClasslist(
|
|
102
|
+
"ea-backtop",
|
|
103
|
+
{
|
|
104
|
+
// ['--' + this.type]: this.type,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
visible: t > this["visibility-height"]
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
return o(this, r).className = i, i;
|
|
111
|
+
}
|
|
112
|
+
$render() {
|
|
113
|
+
this.shadowRoot.innerHTML = `
|
|
114
|
+
<div class='ea-backtop' part='container'>
|
|
115
|
+
<slot></slot>
|
|
116
|
+
</div>
|
|
117
|
+
`, c(this, r, this.shadowRoot.querySelector(".ea-backtop"));
|
|
118
|
+
}
|
|
119
|
+
connectedCallback() {
|
|
120
|
+
var i;
|
|
121
|
+
super.connectedCallback(), (i = o(this, l)) == null || i.abort(), c(this, l, new AbortController()), this.addEventListener("click", o(this, d), {
|
|
122
|
+
signal: o(this, l).signal
|
|
123
|
+
}), (document.querySelector(this.target) || window).addEventListener("scroll", o(this, b), {
|
|
124
|
+
signal: o(this, l).signal
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
$beforeUnmounted() {
|
|
128
|
+
var t, i;
|
|
129
|
+
(t = o(this, l)) == null || t.abort(), (i = o(this, n)) == null || i.abort();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
r = new WeakMap(), l = new WeakMap(), n = new WeakMap(), h = new WeakMap(), d = new WeakMap(), b = new WeakMap();
|
|
133
|
+
window.customElements.get("ea-backtop") || window.customElements.define("ea-backtop", w);
|
|
134
|
+
export {
|
|
135
|
+
w as EaBacktop
|
|
136
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
var b = Object.defineProperty;
|
|
2
|
+
var c = (t) => {
|
|
3
|
+
throw TypeError(t);
|
|
4
|
+
};
|
|
5
|
+
var y = (t, s, e) => s in t ? b(t, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[s] = e;
|
|
6
|
+
var p = (t, s, e) => y(t, typeof s != "symbol" ? s + "" : s, e), f = (t, s, e) => s.has(t) || c("Cannot " + e);
|
|
7
|
+
var a = (t, s, e) => (f(t, s, "read from private field"), e ? e.call(t) : s.get(t)), u = (t, s, e) => s.has(t) ? c("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, e), h = (t, s, e, i) => (f(t, s, "write to private field"), i ? i.call(t, e) : s.set(t, e), e);
|
|
8
|
+
import { B as v } from "./Base.js";
|
|
9
|
+
import { s as g } from "../css/ea-badge.style.js";
|
|
10
|
+
import { E as C } from "../utils/Utils.js";
|
|
11
|
+
var o, r;
|
|
12
|
+
class x extends v {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
/** @type {HTMLElement} */
|
|
16
|
+
u(this, o);
|
|
17
|
+
/** @type {HTMLElement} */
|
|
18
|
+
u(this, r);
|
|
19
|
+
p(this, "state", this.properties({
|
|
20
|
+
value: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "",
|
|
23
|
+
observer: (e) => {
|
|
24
|
+
if (this["is-dot"]) return;
|
|
25
|
+
const i = this.shadowRoot.querySelector("[data-value]"), n = this.querySelector("[slot='content']"), l = () => !this["show-zero"] && Number(e) === 0 ? (a(this, o).className = this.updateContainerClasslist(), "") : C.Number.isNumber(e) && e > this.max ? `${this.max}+` : e;
|
|
26
|
+
if (i)
|
|
27
|
+
i.textContent = l();
|
|
28
|
+
else if (n) {
|
|
29
|
+
const d = document.createElement("template");
|
|
30
|
+
if (n.querySelector("[data-value]")) {
|
|
31
|
+
d.innerHTML = n.innerHTML;
|
|
32
|
+
const m = d.content.querySelector("[data-value]");
|
|
33
|
+
m.innerText = l();
|
|
34
|
+
}
|
|
35
|
+
a(this, r).innerHTML = d.innerHTML;
|
|
36
|
+
} else
|
|
37
|
+
a(this, r).textContent = l();
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
max: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 1 / 0,
|
|
43
|
+
observer: () => {
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
type: {
|
|
47
|
+
type: ["primary", "success", "warning", "danger", "info"],
|
|
48
|
+
default: "danger",
|
|
49
|
+
observer: () => {
|
|
50
|
+
a(this, o).className = this.updateContainerClasslist();
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
color: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: "",
|
|
56
|
+
observer: (e) => {
|
|
57
|
+
this.style.setProperty("--ea-badge-color", e);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"is-dot": {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: !1,
|
|
63
|
+
observer: () => {
|
|
64
|
+
a(this, o).className = this.updateContainerClasslist();
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"data-hidden": {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: !1,
|
|
70
|
+
observer: (e) => {
|
|
71
|
+
a(this, r).ariaHidden = e, a(this, r).hidden = e, a(this, o).className = this.updateContainerClasslist();
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"offset-x": {
|
|
75
|
+
type: Number,
|
|
76
|
+
default: 0,
|
|
77
|
+
observer: (e) => {
|
|
78
|
+
this.style.setProperty("--ea-badge-offset-x", -e + "px");
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"offset-y": {
|
|
82
|
+
type: Number,
|
|
83
|
+
default: 0,
|
|
84
|
+
observer: (e) => {
|
|
85
|
+
this.style.setProperty("--ea-badge-offset-y", e + "px");
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"show-zero": {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: !0,
|
|
91
|
+
observer: () => {
|
|
92
|
+
a(this, o).className = this.updateContainerClasslist();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}));
|
|
96
|
+
this.stylesheet = g, this.$render();
|
|
97
|
+
}
|
|
98
|
+
static get observedAttributes() {
|
|
99
|
+
return [
|
|
100
|
+
...super.observedAttributes,
|
|
101
|
+
"value",
|
|
102
|
+
"max",
|
|
103
|
+
"is-dot",
|
|
104
|
+
"data-hidden",
|
|
105
|
+
"type",
|
|
106
|
+
"show-zero",
|
|
107
|
+
"color",
|
|
108
|
+
"offset-x",
|
|
109
|
+
"offset-y"
|
|
110
|
+
];
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* 获取 classlist 列表
|
|
114
|
+
* @return {string} 属性值
|
|
115
|
+
*/
|
|
116
|
+
updateContainerClasslist() {
|
|
117
|
+
return this.computedClasslist(
|
|
118
|
+
"ea-badge",
|
|
119
|
+
{
|
|
120
|
+
["--" + this.type]: this.type
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
dot: this["is-dot"],
|
|
124
|
+
hidden: this["data-hidden"] || !this["show-zero"] && Number(this.value) === 0
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
$render() {
|
|
129
|
+
this.shadowRoot.innerHTML = `
|
|
130
|
+
<div class='ea-badge' part='container'>
|
|
131
|
+
<sup class="ea-badge__content" part='content'></sup>
|
|
132
|
+
<slot></slot>
|
|
133
|
+
</div>
|
|
134
|
+
`, h(this, o, this.shadowRoot.querySelector(".ea-badge")), h(this, r, this.shadowRoot.querySelector(".ea-badge__content"));
|
|
135
|
+
}
|
|
136
|
+
connectedCallback() {
|
|
137
|
+
super.connectedCallback();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
o = new WeakMap(), r = new WeakMap();
|
|
141
|
+
window.customElements.get("ea-badge") || window.customElements.define("ea-badge", x);
|
|
142
|
+
export {
|
|
143
|
+
x as EaBadge
|
|
144
|
+
};
|