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,501 @@
|
|
|
1
|
+
var K = Object.defineProperty;
|
|
2
|
+
var j = (i) => {
|
|
3
|
+
throw TypeError(i);
|
|
4
|
+
};
|
|
5
|
+
var Q = (i, o, t) => o in i ? K(i, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[o] = t;
|
|
6
|
+
var q = (i, o, t) => Q(i, typeof o != "symbol" ? o + "" : o, t), F = (i, o, t) => o.has(i) || j("Cannot " + t);
|
|
7
|
+
var e = (i, o, t) => (F(i, o, "read from private field"), t ? t.call(i) : o.get(i)), a = (i, o, t) => o.has(i) ? j("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, t), c = (i, o, t, s) => (F(i, o, "write to private field"), s ? s.call(i, t) : o.set(i, t), t);
|
|
8
|
+
import { B as U } from "./Base.js";
|
|
9
|
+
import { s as X } from "../css/ea-tab.style.js";
|
|
10
|
+
import { s as Y } from "../css/ea-tabs.style.js";
|
|
11
|
+
import { t as G } from "../utils/timeout.js";
|
|
12
|
+
import { s as Z } from "../css/ea-tab-panel.style.js";
|
|
13
|
+
var d, f, _, S, p, x;
|
|
14
|
+
class V extends U {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
a(this, d);
|
|
18
|
+
/** @type {HTMLElement} */
|
|
19
|
+
a(this, _);
|
|
20
|
+
/** @type {HTMLElement} */
|
|
21
|
+
a(this, S);
|
|
22
|
+
/** @type {AbortController} */
|
|
23
|
+
a(this, p, new AbortController());
|
|
24
|
+
q(this, "state", this.properties({
|
|
25
|
+
panel: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "",
|
|
28
|
+
observer: () => {
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
type: {
|
|
32
|
+
type: ["", "card", "border-card"],
|
|
33
|
+
default: () => {
|
|
34
|
+
var t;
|
|
35
|
+
return ((t = e(this, d, f)) == null ? void 0 : t.getAttribute("type")) || "";
|
|
36
|
+
},
|
|
37
|
+
observer: () => {
|
|
38
|
+
this.updateContainerClasslist();
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
disabled: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !1,
|
|
44
|
+
observer: () => {
|
|
45
|
+
this.updateContainerClasslist();
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
active: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !1,
|
|
51
|
+
observer: () => {
|
|
52
|
+
this.updateContainerClasslist();
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"tab-position": {
|
|
56
|
+
type: ["", "card", "border-card"],
|
|
57
|
+
default: () => {
|
|
58
|
+
var t;
|
|
59
|
+
return ((t = e(this, d, f)) == null ? void 0 : t.getAttribute("tab-position")) || "top";
|
|
60
|
+
},
|
|
61
|
+
observer: () => {
|
|
62
|
+
this.updateContainerClasslist();
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
editable: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: !1,
|
|
68
|
+
observer: () => {
|
|
69
|
+
this.updateContainerClasslist();
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
closable: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: !1,
|
|
75
|
+
observer: () => {
|
|
76
|
+
this.updateContainerClasslist();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
/**
|
|
81
|
+
* 关闭事件,为了避免click事件优先触发。
|
|
82
|
+
* @param {MouseEvent} e
|
|
83
|
+
*/
|
|
84
|
+
a(this, x, (t) => {
|
|
85
|
+
t.preventDefault(), t.stopImmediatePropagation(), this.emit("ea-tab-close-icon-click", {
|
|
86
|
+
detail: {
|
|
87
|
+
panel: this.panel
|
|
88
|
+
},
|
|
89
|
+
bubbles: !0
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
this.stylesheet = X, this.$render();
|
|
93
|
+
}
|
|
94
|
+
static get observedAttributes() {
|
|
95
|
+
return [
|
|
96
|
+
...super.observedAttributes,
|
|
97
|
+
"panel",
|
|
98
|
+
"type",
|
|
99
|
+
"disabled",
|
|
100
|
+
"active",
|
|
101
|
+
"tab-position",
|
|
102
|
+
"editable",
|
|
103
|
+
"closable"
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* 获取 classlist 列表
|
|
108
|
+
* @return {string} 属性值
|
|
109
|
+
*/
|
|
110
|
+
updateContainerClasslist() {
|
|
111
|
+
var l, n, h;
|
|
112
|
+
let t = (l = e(this, d, f)) == null ? void 0 : l.querySelectorAll("ea-tab");
|
|
113
|
+
t = (t == null ? void 0 : t.length) > 0 ? [...t] : [];
|
|
114
|
+
const s = this.computedClasslist(
|
|
115
|
+
"ea-tab",
|
|
116
|
+
{
|
|
117
|
+
["--" + this.type]: this.type === ((n = e(this, d, f)) == null ? void 0 : n.getAttribute("type")) || "",
|
|
118
|
+
["--" + this["tab-position"]]: this["tab-position"] === ((h = e(this, d, f)) == null ? void 0 : h.getAttribute("tab-position")) || "top"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
disabled: this.disabled,
|
|
122
|
+
active: this.active,
|
|
123
|
+
last: t.slice(-1)[0] === this,
|
|
124
|
+
first: t.slice(0)[0] === this,
|
|
125
|
+
closable: this.closable ? this.closable : this.editable
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
return e(this, _).className = s, s;
|
|
129
|
+
}
|
|
130
|
+
$render() {
|
|
131
|
+
this.shadowRoot.innerHTML = `
|
|
132
|
+
<div class='ea-tab' part='container'>
|
|
133
|
+
<slot></slot>
|
|
134
|
+
<ea-icon class="ea-tab__close-icon" icon="icon-cancel" part="close-icon"></ea-icon>
|
|
135
|
+
</div>
|
|
136
|
+
`, c(this, _, this.shadowRoot.querySelector(".ea-tab")), c(this, S, this.shadowRoot.querySelector(".ea-tab__close-icon")), this.updateContainerClasslist();
|
|
137
|
+
}
|
|
138
|
+
connectedCallback() {
|
|
139
|
+
var t;
|
|
140
|
+
super.connectedCallback(), (t = e(this, p)) == null || t.abort(), c(this, p, new AbortController()), e(this, S).addEventListener("click", e(this, x), {
|
|
141
|
+
signal: e(this, p).signal
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
$beforeUnmounted() {
|
|
145
|
+
e(this, p).abort();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
d = new WeakSet(), f = function() {
|
|
149
|
+
try {
|
|
150
|
+
return this.closest("ea-tabs");
|
|
151
|
+
} catch {
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
}, _ = new WeakMap(), S = new WeakMap(), p = new WeakMap(), x = new WeakMap();
|
|
155
|
+
window.customElements.get("ea-tab") || window.customElements.define("ea-tab", V);
|
|
156
|
+
var E, u, v, r, g, m, L, $, y, b, C, k, N, A, B, H, w, P, I, W, O;
|
|
157
|
+
class tt extends U {
|
|
158
|
+
constructor() {
|
|
159
|
+
super();
|
|
160
|
+
/** @type {HTMLElement} */
|
|
161
|
+
a(this, E);
|
|
162
|
+
/** @type {HTMLElement} */
|
|
163
|
+
a(this, u);
|
|
164
|
+
/** @type {HTMLElement} */
|
|
165
|
+
a(this, v);
|
|
166
|
+
/** @type {HTMLElement} */
|
|
167
|
+
a(this, r);
|
|
168
|
+
/** @type {HTMLSlotElement} */
|
|
169
|
+
a(this, g);
|
|
170
|
+
/** @type {HTMLElement} */
|
|
171
|
+
a(this, m);
|
|
172
|
+
/** @type {HTMLElement} */
|
|
173
|
+
a(this, L);
|
|
174
|
+
/** @type {HTMLElement} */
|
|
175
|
+
a(this, $);
|
|
176
|
+
/** @type {HTMLSlotElement} */
|
|
177
|
+
a(this, y);
|
|
178
|
+
/** @type {AbortController} */
|
|
179
|
+
a(this, b, new AbortController());
|
|
180
|
+
/** @type {ResizeObserver} */
|
|
181
|
+
a(this, C);
|
|
182
|
+
q(this, "state", this.properties({
|
|
183
|
+
type: {
|
|
184
|
+
type: ["", "card", "border-card"],
|
|
185
|
+
default: "",
|
|
186
|
+
observer: (t) => {
|
|
187
|
+
this.updateContainerClasslist(), [...e(this, y).assignedElements()].filter(
|
|
188
|
+
(s) => s.tagName.toLowerCase() === "ea-tab-panel" || s.tagName.toLowerCase() === "ea-tab"
|
|
189
|
+
).forEach((s) => s.setAttribute("type", t));
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
active: {
|
|
193
|
+
type: String,
|
|
194
|
+
default: () => {
|
|
195
|
+
const t = this.getAttribute("active");
|
|
196
|
+
if (t)
|
|
197
|
+
return t;
|
|
198
|
+
{
|
|
199
|
+
const s = this.querySelector("ea-tab");
|
|
200
|
+
return s ? s.getAttribute("panel") : "";
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
observer: (t) => {
|
|
204
|
+
e(this, A).call(this, t), this.emit("tabs-change", {
|
|
205
|
+
name: t
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"tab-position": {
|
|
210
|
+
type: ["top", "bottom", "left", "right"],
|
|
211
|
+
default: "top",
|
|
212
|
+
observer: (t) => {
|
|
213
|
+
this.updateContainerClasslist(), e(this, H).call(this, t), e(this, A).call(this, this.active), [...e(this, g).assignedElements()].filter(
|
|
214
|
+
(s) => s.tagName.toLowerCase() === "ea-tab-panel" || s.tagName.toLowerCase() === "ea-tab"
|
|
215
|
+
).forEach((s) => s.setAttribute("tab-position", t));
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
editable: {
|
|
219
|
+
type: Boolean,
|
|
220
|
+
default: !1,
|
|
221
|
+
observer: () => {
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}));
|
|
225
|
+
/**
|
|
226
|
+
* 更新指示器位置
|
|
227
|
+
* @param {HTMLElement} tabEl
|
|
228
|
+
* @param {HTMLElement} lineEl
|
|
229
|
+
* @param {HTMLElement} tabPosition
|
|
230
|
+
*/
|
|
231
|
+
a(this, k, (t, s = e(this, m), l = this["tab-position"]) => {
|
|
232
|
+
const n = l === "top" || l === "bottom", h = t.getBoundingClientRect(), T = s.getBoundingClientRect();
|
|
233
|
+
this.style.setProperty(
|
|
234
|
+
"--ea-tabs-indicator-size",
|
|
235
|
+
`${n ? t.offsetWidth : t.offsetHeight}px`
|
|
236
|
+
), this.style.setProperty(
|
|
237
|
+
"--ea-tabs-indicator-x",
|
|
238
|
+
`${n ? h.x - T.x : h.y - T.y}px`
|
|
239
|
+
);
|
|
240
|
+
});
|
|
241
|
+
/**
|
|
242
|
+
* 更新指示器位置
|
|
243
|
+
* @param {HTMLElement} tabEl
|
|
244
|
+
* @param {HTMLElement} [lineEl]
|
|
245
|
+
* @param {HTMLElement} [tabPosition]
|
|
246
|
+
*/
|
|
247
|
+
a(this, N, (t, s = e(this, m), l = this["tab-position"]) => {
|
|
248
|
+
const n = t.getBoundingClientRect();
|
|
249
|
+
e(this, r).scrollTo({
|
|
250
|
+
left: t.offsetLeft + n.width,
|
|
251
|
+
top: t.offsetTop + n.height,
|
|
252
|
+
behavior: "smooth"
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
/**
|
|
256
|
+
* 更新 tab 激活状态
|
|
257
|
+
* @param {String} activeName
|
|
258
|
+
*/
|
|
259
|
+
a(this, A, (t = this.active) => {
|
|
260
|
+
const s = [...this.querySelectorAll("ea-tab-panel")];
|
|
261
|
+
[...this.querySelectorAll("ea-tab")].forEach((n) => {
|
|
262
|
+
const h = n.getAttribute("panel") === t;
|
|
263
|
+
n.toggleAttribute("active", h), h && this.type === "" && e(this, k).call(this, n), h && e(this, N).call(this, n);
|
|
264
|
+
}), s.forEach((n) => {
|
|
265
|
+
n.toggleAttribute(
|
|
266
|
+
"active",
|
|
267
|
+
t === n.getAttribute("name")
|
|
268
|
+
);
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
/**
|
|
272
|
+
* 更新 tab 是否为可编辑状态
|
|
273
|
+
* @param {Boolean} isEditable
|
|
274
|
+
*/
|
|
275
|
+
a(this, B, (t = this.editable) => {
|
|
276
|
+
this.querySelectorAll("ea-tab").forEach((s) => {
|
|
277
|
+
s.toggleAttribute("editable", t);
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
/**
|
|
281
|
+
* @param {"top" | "bottom" | "left" | "right"} tabPosition
|
|
282
|
+
*/
|
|
283
|
+
a(this, H, (t = this["tab-position"]) => {
|
|
284
|
+
t === "left" || t === "right" ? (e(this, u).setAttribute("icon", "icon-arrow-left"), e(this, v).setAttribute("icon", "icon-arrow-right")) : (t === "top" || t === "bottom") && (e(this, u).setAttribute("icon", "icon-arrow-up"), e(this, v).setAttribute("icon", "icon-arrow-down"));
|
|
285
|
+
});
|
|
286
|
+
/**
|
|
287
|
+
* 当 tab slot 内容变化时触发
|
|
288
|
+
* @param {Event} e
|
|
289
|
+
*/
|
|
290
|
+
a(this, w, () => {
|
|
291
|
+
[...this.querySelectorAll("ea-tab")].forEach((s) => {
|
|
292
|
+
s.setAttribute("slot", "nav");
|
|
293
|
+
try {
|
|
294
|
+
s.updateContainerClasslist();
|
|
295
|
+
} catch {
|
|
296
|
+
}
|
|
297
|
+
}), e(this, A).call(this, this.active), e(this, B).call(this, this.editable), this.updateContainerClasslist(), G(() => {
|
|
298
|
+
const s = [...this.querySelectorAll("ea-tab")].find(
|
|
299
|
+
(n) => n.hasAttribute("active")
|
|
300
|
+
), l = s.getBoundingClientRect();
|
|
301
|
+
e(this, r).scrollTo({
|
|
302
|
+
left: s.offsetLeft + l.width,
|
|
303
|
+
top: s.offsetTop + l.height,
|
|
304
|
+
behavior: "smooth"
|
|
305
|
+
});
|
|
306
|
+
}, 0);
|
|
307
|
+
});
|
|
308
|
+
/**
|
|
309
|
+
* 标签切换事件
|
|
310
|
+
* @param {MouseEvent} e
|
|
311
|
+
*/
|
|
312
|
+
a(this, P, (t) => {
|
|
313
|
+
const s = t.target.closest("ea-tab");
|
|
314
|
+
if (!s || s != null && s.hasAttribute("disabled")) return;
|
|
315
|
+
const l = s.getAttribute("panel");
|
|
316
|
+
this.active = l, this.emit("tab-click", {
|
|
317
|
+
detail: {
|
|
318
|
+
name: l,
|
|
319
|
+
panel: this.querySelector(`ea-tab-panel[name="${l}"]`)
|
|
320
|
+
},
|
|
321
|
+
bubbles: !0
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
/**
|
|
325
|
+
* 滚动至上一视口
|
|
326
|
+
*/
|
|
327
|
+
a(this, I, () => {
|
|
328
|
+
e(this, r).scrollTo({
|
|
329
|
+
left: e(this, r).scrollLeft - e(this, r).offsetWidth,
|
|
330
|
+
top: e(this, r).scrollTop - e(this, r).offsetHeight,
|
|
331
|
+
behavior: "smooth"
|
|
332
|
+
});
|
|
333
|
+
});
|
|
334
|
+
/**
|
|
335
|
+
* 滚动至下一视口
|
|
336
|
+
*/
|
|
337
|
+
a(this, W, () => {
|
|
338
|
+
e(this, r).scrollTo({
|
|
339
|
+
left: e(this, r).scrollLeft + e(this, r).offsetWidth,
|
|
340
|
+
top: e(this, r).scrollTop + e(this, r).offsetHeight,
|
|
341
|
+
behavior: "smooth"
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
/**
|
|
345
|
+
* 删除标签
|
|
346
|
+
* @param {CustomEvent} e
|
|
347
|
+
*/
|
|
348
|
+
a(this, O, (t) => {
|
|
349
|
+
t.preventDefault(), t.stopImmediatePropagation();
|
|
350
|
+
const s = t.detail.panel, l = [...this.querySelectorAll("ea-tab")], n = t.target, h = l.indexOf(n), T = this.querySelector(`ea-tab-panel[name="${s}"]`), D = [...this.querySelectorAll("ea-tab")][h - 1 < 0 ? 0 : h - 1].getAttribute("panel");
|
|
351
|
+
this.setAttribute("active", D), T.remove(), n.remove(), this.emit("tab-remove", {
|
|
352
|
+
detail: {
|
|
353
|
+
name: D
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
this.stylesheet = Y, this.$render();
|
|
358
|
+
}
|
|
359
|
+
static get observedAttributes() {
|
|
360
|
+
return [
|
|
361
|
+
...super.observedAttributes,
|
|
362
|
+
"type",
|
|
363
|
+
"active",
|
|
364
|
+
"tab-position",
|
|
365
|
+
"editable"
|
|
366
|
+
];
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* 获取 classlist 列表
|
|
370
|
+
* @return {string} 属性值
|
|
371
|
+
*/
|
|
372
|
+
updateContainerClasslist() {
|
|
373
|
+
const t = e(this, r).scrollWidth > e(this, r).clientWidth || e(this, r).scrollHeight > e(this, r).clientHeight, s = this.computedClasslist(
|
|
374
|
+
"ea-tabs",
|
|
375
|
+
{
|
|
376
|
+
["--" + this.type]: this.type,
|
|
377
|
+
["--" + this["tab-position"]]: this["tab-position"]
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
overflow: t
|
|
381
|
+
}
|
|
382
|
+
);
|
|
383
|
+
return e(this, E).className = s, s;
|
|
384
|
+
}
|
|
385
|
+
$render() {
|
|
386
|
+
this.shadowRoot.innerHTML = `
|
|
387
|
+
<div class='ea-tabs' part='container'>
|
|
388
|
+
<nav class='ea-tabs__nav' part='nav'>
|
|
389
|
+
<ea-icon icon="icon-angle-left" class="ea-tabs__prev ea-tabs__scroll" part='prev'></ea-icon>
|
|
390
|
+
<slot name='nav'></slot>
|
|
391
|
+
<ea-icon icon="icon-angle-right" class="ea-tabs__next ea-tabs__scroll" part='next'></ea-icon>
|
|
392
|
+
</nav>
|
|
393
|
+
<div class="ea-tabs__line" part="line" tabindex="-1">
|
|
394
|
+
<span class="ea-tabs__indicator" part="indicator"></span>
|
|
395
|
+
</div>
|
|
396
|
+
<main class='ea-tabs__content' part='content'>
|
|
397
|
+
<slot></slot>
|
|
398
|
+
</main>
|
|
399
|
+
</div>
|
|
400
|
+
`, c(this, E, this.shadowRoot.querySelector(".ea-tabs")), c(this, u, this.shadowRoot.querySelector(".ea-tabs__prev")), c(this, v, this.shadowRoot.querySelector(".ea-tabs__next")), c(this, r, this.shadowRoot.querySelector(".ea-tabs__nav")), c(this, g, this.shadowRoot.querySelector(
|
|
401
|
+
".ea-tabs__nav > slot[name=nav]"
|
|
402
|
+
)), c(this, m, this.shadowRoot.querySelector(".ea-tabs__line")), c(this, L, this.shadowRoot.querySelector(".ea-tabs__indicator")), c(this, $, this.shadowRoot.querySelector(".ea-tabs__content")), c(this, y, this.shadowRoot.querySelector(
|
|
403
|
+
".ea-tabs__content > slot"
|
|
404
|
+
)), e(this, w).call(this);
|
|
405
|
+
}
|
|
406
|
+
connectedCallback() {
|
|
407
|
+
var t, s;
|
|
408
|
+
super.connectedCallback(), (t = e(this, b)) == null || t.abort(), c(this, b, new AbortController()), (s = e(this, C)) == null || s.unobserve(), e(this, r).addEventListener("click", e(this, P), {
|
|
409
|
+
signal: e(this, b).signal
|
|
410
|
+
}), e(this, g).addEventListener("slotchange", e(this, w), {
|
|
411
|
+
signal: e(this, b).signal
|
|
412
|
+
}), e(this, y).addEventListener("slotchange", e(this, w), {
|
|
413
|
+
signal: e(this, b).signal
|
|
414
|
+
}), e(this, u).addEventListener("click", e(this, I), {
|
|
415
|
+
signal: e(this, b).signal
|
|
416
|
+
}), e(this, v).addEventListener("click", e(this, W), {
|
|
417
|
+
signal: e(this, b).signal
|
|
418
|
+
}), this.addEventListener("ea-tab-close-icon-click", e(this, O), {
|
|
419
|
+
signal: e(this, b).signal
|
|
420
|
+
}), c(this, C, new ResizeObserver(() => {
|
|
421
|
+
this.updateContainerClasslist();
|
|
422
|
+
}).observe(e(this, r))), G(() => {
|
|
423
|
+
this.updateContainerClasslist();
|
|
424
|
+
}, 100);
|
|
425
|
+
}
|
|
426
|
+
$beforeUnmounted() {
|
|
427
|
+
var t, s;
|
|
428
|
+
(t = e(this, b)) == null || t.abort(), (s = e(this, C)) == null || s.unobserve();
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
E = new WeakMap(), u = new WeakMap(), v = new WeakMap(), r = new WeakMap(), g = new WeakMap(), m = new WeakMap(), L = new WeakMap(), $ = new WeakMap(), y = new WeakMap(), b = new WeakMap(), C = new WeakMap(), k = new WeakMap(), N = new WeakMap(), A = new WeakMap(), B = new WeakMap(), H = new WeakMap(), w = new WeakMap(), P = new WeakMap(), I = new WeakMap(), W = new WeakMap(), O = new WeakMap();
|
|
432
|
+
window.customElements.get("ea-tabs") || window.customElements.define("ea-tabs", tt);
|
|
433
|
+
var z, J, R, M;
|
|
434
|
+
class et extends U {
|
|
435
|
+
constructor() {
|
|
436
|
+
super();
|
|
437
|
+
a(this, z);
|
|
438
|
+
/** @type {HTMLElement} */
|
|
439
|
+
a(this, R);
|
|
440
|
+
/** @type {AbortController} */
|
|
441
|
+
a(this, M, new AbortController());
|
|
442
|
+
q(this, "state", this.properties({
|
|
443
|
+
name: {
|
|
444
|
+
type: String,
|
|
445
|
+
default: "",
|
|
446
|
+
observer: () => {
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
type: {
|
|
450
|
+
type: ["", "card", "border-card"],
|
|
451
|
+
default: () => {
|
|
452
|
+
var t;
|
|
453
|
+
return ((t = e(this, z, J)) == null ? void 0 : t.getAttribute("type")) || "";
|
|
454
|
+
},
|
|
455
|
+
observer: () => {
|
|
456
|
+
this.updateContainerClasslist();
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}));
|
|
460
|
+
this.stylesheet = Z, this.$render();
|
|
461
|
+
}
|
|
462
|
+
static get observedAttributes() {
|
|
463
|
+
return [...super.observedAttributes, "name", "type"];
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* 获取 classlist 列表
|
|
467
|
+
* @return {string} 属性值
|
|
468
|
+
*/
|
|
469
|
+
updateContainerClasslist() {
|
|
470
|
+
const t = this.computedClasslist("ea-tab-panel", {
|
|
471
|
+
["--" + this.type]: this.type
|
|
472
|
+
});
|
|
473
|
+
return e(this, R).className = t, t;
|
|
474
|
+
}
|
|
475
|
+
$render() {
|
|
476
|
+
this.shadowRoot.innerHTML = `
|
|
477
|
+
<div class='ea-tab-panel' part='container'>
|
|
478
|
+
<slot></slot>
|
|
479
|
+
</div>
|
|
480
|
+
`, c(this, R, this.shadowRoot.querySelector(".ea-tab-panel"));
|
|
481
|
+
}
|
|
482
|
+
connectedCallback() {
|
|
483
|
+
super.connectedCallback();
|
|
484
|
+
}
|
|
485
|
+
$beforeUnmounted() {
|
|
486
|
+
e(this, M).abort();
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
z = new WeakSet(), J = function() {
|
|
490
|
+
try {
|
|
491
|
+
return this.closest("ea-tabs");
|
|
492
|
+
} catch {
|
|
493
|
+
return null;
|
|
494
|
+
}
|
|
495
|
+
}, R = new WeakMap(), M = new WeakMap();
|
|
496
|
+
window.customElements.get("ea-tab-panel") || window.customElements.define("ea-tab-panel", et);
|
|
497
|
+
export {
|
|
498
|
+
V as EaTab,
|
|
499
|
+
et as EaTabPanel,
|
|
500
|
+
tt as EaTabs
|
|
501
|
+
};
|