easy-component-ui 2.0.5 → 2.1.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 -0
- package/README.md +90 -0
- package/build/components/Base.js +1 -0
- package/build/components/ea-alert/index.js +1 -0
- package/build/components/ea-alert/src/style/stylesheet.js +1 -0
- package/build/components/ea-aside/index.js +1 -0
- package/build/components/ea-avatar/index.js +1 -0
- package/build/components/ea-avatar/src/assets/defaultAvatar.js +1 -0
- package/build/components/ea-avatar/src/assets/errorAvatar.js +1 -0
- package/build/components/ea-avatar/src/assets/iconAndTextAvatar.js +1 -0
- package/build/components/ea-avatar/src/style/stylesheet.js +1 -0
- package/build/components/ea-backtop/index.js +1 -0
- package/build/components/ea-backtop/src/style/stylesheet.js +1 -0
- package/build/components/ea-badge/index.js +1 -0
- package/build/components/ea-badge/src/style/stylesheet.js +1 -0
- package/build/components/ea-breadcrumb/index.js +1 -0
- package/build/components/ea-breadcrumb/src/style/stylesheet.js +1 -0
- package/build/components/ea-breadcrumb-item/index.js +1 -0
- package/build/components/ea-breadcrumb-item/src/style/style.js +1 -0
- package/build/components/ea-button/index.js +1 -0
- package/build/components/ea-button/src/components/ButtonComm.js +1 -0
- package/build/components/ea-button/src/components/HrefComm.js +1 -0
- package/build/components/ea-button/src/style/stylesheet.js +1 -0
- package/build/components/ea-button-group/index.js +1 -0
- package/build/components/ea-button-group/src/style/stylesheet.js +1 -0
- package/build/components/ea-calendar/index.js +1 -0
- package/build/components/ea-calendar/src/style/stylesheet.js +1 -0
- package/build/components/ea-calendar/src/utils/createChangerElement.js +1 -0
- package/build/components/ea-calendar/src/utils/createThead.js +1 -0
- package/build/components/ea-calendar/src/utils/getDate.js +1 -0
- package/build/components/ea-calendar/src/utils/getUserWeekStart.js +1 -0
- package/build/components/ea-card/index.js +1 -0
- package/build/components/ea-card/src/style/stylesheet.js +1 -0
- package/build/components/ea-carousel/index.js +1 -0
- package/build/components/ea-carousel/src/style/stylesheet.js +1 -0
- package/build/components/ea-carousel/src/utils/handleIndexOverflow.js +1 -0
- package/build/components/ea-carousel-item/index.js +1 -0
- package/build/components/ea-carousel-item/src/style/stylesheet.js +1 -0
- package/build/components/ea-checkbox/index.js +1 -0
- package/build/components/ea-checkbox/src/style/stylesheet.js +1 -0
- package/build/components/ea-checkbox-group/index.js +1 -0
- package/build/components/ea-checkbox-group/src/style/stylesheet.js +1 -0
- package/build/components/ea-collapse/index.js +1 -0
- package/build/components/ea-collapse-item/index.js +1 -0
- package/build/components/ea-collapse-item/src/style/stylesheet.js +1 -0
- package/build/components/ea-container/index.js +1 -0
- package/build/components/ea-date-picker/index.js +1 -0
- package/build/components/ea-date-picker/src/style/stylesheet.js +1 -0
- package/build/components/ea-descriptions/index.js +1 -0
- package/build/components/ea-descriptions/src/components/contentTemplate.js +1 -0
- package/build/components/ea-descriptions/src/components/getTdTemplate_border.js +1 -0
- package/build/components/ea-descriptions/src/components/getTdTemplate_direction.js +1 -0
- package/build/components/ea-descriptions/src/components/getThTemplate_direction.js +1 -0
- package/build/components/ea-descriptions/src/components/getThTemplate_normal.js +1 -0
- package/build/components/ea-descriptions/src/style/stylesheet.js +1 -0
- package/build/components/ea-descriptions-item/index.js +1 -0
- package/build/components/ea-descriptions-item/src/stylesheet.js +1 -0
- package/build/components/ea-drawer/index.js +1 -0
- package/build/components/ea-drawer/src/style/stylesheet.js +1 -0
- package/build/components/ea-empty/index.js +1 -0
- package/build/components/ea-empty/src/assets/emptyStatusSVG.js +1 -0
- package/build/components/ea-empty/src/style/stylesheet.js +1 -0
- package/build/components/ea-footer/index.js +1 -0
- package/build/components/ea-form/index.js +1 -0
- package/build/components/ea-form-item/index.js +1 -0
- package/build/components/ea-form-item/src/style/stylesheet.js +1 -0
- package/build/components/ea-header/index.js +1 -0
- package/build/components/ea-icon/config.json +1030 -0
- package/{components/ea-icon/css/fontello-codes.css → build/components/ea-icon/css/fontello.css} +312 -123
- package/build/components/ea-icon/font/fontello.eot +0 -0
- package/build/components/ea-icon/font/fontello.svg +350 -0
- 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 +1 -0
- package/build/components/ea-icon/index.js +1 -0
- package/build/components/ea-image/index.js +1 -0
- package/build/components/ea-image/src/assets/errorImage.js +1 -0
- package/build/components/ea-image/src/style/stylesheet.js +1 -0
- package/build/components/ea-image/src/utils/createPreviewTools.js +1 -0
- package/build/components/ea-infinite-scroll/index.js +1 -0
- package/build/components/ea-infinite-scroll-item/index.js +1 -0
- package/build/components/ea-input/index.js +1 -0
- package/build/components/ea-input/src/components/createFixIcon.js +1 -0
- package/build/components/ea-input/src/components/createSuggestionBoard.js +1 -0
- package/build/components/ea-input/src/components/createWordLimitElement.js +1 -0
- package/build/components/ea-input/src/style/stylesheet.js +1 -0
- package/build/components/ea-input/src/utils/dispatchEvent.js +1 -0
- package/build/components/ea-input/src/utils/handleSearchResult.js +1 -0
- package/build/components/ea-input/src/utils/handleSuggestionBoardTrigger.js +1 -0
- package/build/components/ea-input-number/index.js +1 -0
- package/build/components/ea-input-number/src/style/stylesheet.js +1 -0
- package/build/components/ea-input-number/src/utils/handleCustomEvent.js +1 -0
- package/build/components/ea-link/index.js +1 -0
- package/build/components/ea-link/src/style/stylesheet.js +1 -0
- package/build/components/ea-loading/index.js +1 -0
- package/build/components/ea-loading/src/style/stylesheet.js +1 -0
- package/build/components/ea-main/index.js +1 -0
- package/build/components/ea-menu/index.js +1 -0
- package/build/components/ea-menu/src/style/stylesheet.js +1 -0
- package/build/components/ea-menu/src/utils/handleMenuItemEvent.js +1 -0
- package/build/components/ea-menu-item/index.js +1 -0
- package/build/components/ea-menu-item/src/style/stylesheet.js +1 -0
- package/build/components/ea-menu-item-group/index.js +1 -0
- package/build/components/ea-menu-item-group/src/style/stylesheet.js +1 -0
- package/build/components/ea-message/index.js +1 -0
- package/build/components/ea-message/src/style/stylesheet.js +1 -0
- package/build/components/ea-message/src/utils/MessageClass.js +1 -0
- package/build/components/ea-message-box/index.js +1 -0
- package/build/components/ea-message-box/src/style/stylesheet.js +1 -0
- package/build/components/ea-message-box/src/utils/EaMessageBoxClass.js +1 -0
- package/build/components/ea-option/index.js +1 -0
- package/build/components/ea-option/src/style/stylesheet.js +1 -0
- package/build/components/ea-option-gropu/index.js +1 -0
- package/build/components/ea-page-header/index.js +1 -0
- package/build/components/ea-page-header/src/style/stylesheet.js +1 -0
- package/build/components/ea-pagination/index.js +1 -0
- package/build/components/ea-pagination/src/components/getMoreItem.js +1 -0
- package/build/components/ea-pagination/src/components/getPageItem.js +1 -0
- package/build/components/ea-pagination/src/components/getShowTotalItem.js +1 -0
- package/build/components/ea-pagination/src/style/stylesheet.js +1 -0
- package/build/components/ea-pane/index.js +1 -0
- package/build/components/ea-pane/src/stylesheet.js +1 -0
- package/build/components/ea-progress/index.js +1 -0
- package/build/components/ea-progress/src/components/SVGComm.js +1 -0
- package/build/components/ea-progress/src/style/stylesheet.js +1 -0
- package/build/components/ea-radio/index.js +1 -0
- package/build/components/ea-radio/src/style/stylesheet.js +1 -0
- package/build/components/ea-radio-group/index.js +1 -0
- package/build/components/ea-rate/index.js +1 -0
- package/build/components/ea-rate/src/components/rateComm.js +1 -0
- package/build/components/ea-rate/src/style/stylesheet.js +1 -0
- package/build/components/ea-result/index.js +1 -0
- package/build/components/ea-result/src/style/stylesheet.js +1 -0
- package/build/components/ea-select/index.js +1 -0
- package/build/components/ea-select/src/style/stylesheet.js +1 -0
- package/build/components/ea-skeleton/index.js +1 -0
- package/build/components/ea-skeleton/src/style/stylesheet.js +1 -0
- package/build/components/ea-skeleton/src/utils/createSkeletonElement.js +1 -0
- package/build/components/ea-skeleton-item/index.js +1 -0
- package/build/components/ea-skeleton-item/src/assets/imageSVG.js +1 -0
- package/build/components/ea-skeleton-item/src/style/stylesheet.js +1 -0
- package/build/components/ea-step/index.js +1 -0
- package/build/components/ea-step/src/style/stylesheet.js +1 -0
- package/build/components/ea-steps/index.js +1 -0
- package/build/components/ea-steps/src/style/stylesheet.js +1 -0
- package/build/components/ea-submenu/index.js +1 -0
- package/build/components/ea-submenu/src/style/stylesheet.js +1 -0
- package/build/components/ea-switch/index.js +1 -0
- package/build/components/ea-switch/src/style/stylesheet.js +1 -0
- package/build/components/ea-tab/index.js +1 -0
- package/build/components/ea-tab/src/style/stylesheet.js +1 -0
- package/build/components/ea-table/index.js +1 -0
- package/build/components/ea-table/src/style/stylesheet.js +1 -0
- package/build/components/ea-table-column/index.js +1 -0
- package/build/components/ea-tabs/index.js +1 -0
- package/build/components/ea-tabs/src/style/stylesheet.js +1 -0
- package/build/components/ea-tag/index.js +1 -0
- package/build/components/ea-tag/src/style/stylesheet.js +1 -0
- package/build/components/ea-textarea/index.js +1 -0
- package/build/components/ea-textarea/src/style/stylesheet.js +1 -0
- package/build/components/ea-time-picker/index.js +1 -0
- package/build/components/ea-time-picker/src/style/stylesheet.js +1 -0
- package/build/components/ea-timeline/index.js +1 -0
- package/build/components/ea-timeline/style/stylesheet.js +1 -0
- package/build/components/ea-timeline-item/index.js +1 -0
- package/build/components/ea-timeline-item/src/style/stylesheet.js +1 -0
- package/build/components/globalConfig.js +1 -0
- package/build/components/index.js +1 -0
- package/build/utils/Validator.js +1 -0
- package/build/utils/createElement.js +1 -0
- package/build/utils/handleDefaultAttrIsTrue.js +1 -0
- package/build/utils/handleTemplate.js +1 -0
- package/build/utils/setStyle.js +1 -0
- package/build/utils/timeout.js +1 -0
- package/components/Base.js +75 -1
- package/components/ea-alert/index.css +91 -0
- package/components/ea-alert/index.js +210 -1
- package/components/ea-alert/index.scss +108 -0
- package/components/ea-alert/src/style/stylesheet.js +85 -1
- package/components/ea-aside/index.css +9 -0
- package/components/ea-aside/index.js +54 -1
- package/components/ea-aside/index.scss +12 -0
- package/components/ea-avatar/index.css +66 -0
- package/components/ea-avatar/index.js +156 -1
- package/components/ea-avatar/index.scss +59 -0
- package/components/ea-avatar/src/assets/defaultAvatar.js +12 -1
- package/components/ea-avatar/src/assets/errorAvatar.js +9 -1
- package/components/ea-avatar/src/assets/iconAndTextAvatar.js +18 -1
- package/components/ea-avatar/src/style/stylesheet.js +61 -1
- package/components/ea-backtop/index.css +27 -0
- package/components/ea-backtop/index.js +167 -1
- package/components/ea-backtop/index.scss +29 -0
- package/components/ea-backtop/src/style/stylesheet.js +21 -1
- package/components/ea-badge/index.css +49 -0
- package/components/ea-badge/index.js +103 -1
- package/components/ea-badge/index.scss +56 -0
- package/components/ea-badge/src/style/stylesheet.js +43 -1
- package/components/ea-breadcrumb/index.css +6 -0
- package/components/ea-breadcrumb/index.js +90 -1
- package/components/ea-breadcrumb/index.scss +7 -0
- package/components/ea-breadcrumb/src/style/stylesheet.js +8 -1
- package/components/ea-breadcrumb-item/index.css +10 -0
- package/components/ea-breadcrumb-item/index.js +23 -1
- package/components/ea-breadcrumb-item/index.scss +12 -0
- package/components/ea-breadcrumb-item/src/style/style.js +12 -1
- package/components/ea-button/index.css +206 -0
- package/components/ea-button/index.js +198 -1
- package/components/ea-button/index.scss +143 -0
- package/components/ea-button/src/components/ButtonComm.js +5 -1
- package/components/ea-button/src/components/HrefComm.js +5 -1
- package/components/ea-button/src/style/stylesheet.js +208 -1
- package/components/ea-button-group/index.css +16 -0
- package/components/ea-button-group/index.js +44 -1
- package/components/ea-button-group/index.scss +20 -0
- package/components/ea-button-group/src/style/stylesheet.js +18 -1
- package/components/ea-calendar/index.css +72 -0
- package/components/ea-calendar/index.js +298 -1
- package/components/ea-calendar/index.scss +106 -0
- package/components/ea-calendar/src/style/stylesheet.js +74 -1
- package/components/ea-calendar/src/utils/createChangerElement.js +10 -1
- package/components/ea-calendar/src/utils/createThead.js +18 -1
- package/components/ea-calendar/src/utils/getDate.js +11 -1
- package/components/ea-calendar/src/utils/getUserWeekStart.js +11 -1
- package/components/ea-card/index.css +25 -0
- package/components/ea-card/index.js +51 -1
- package/components/ea-card/index.scss +24 -0
- package/components/ea-card/src/style/stylesheet.js +19 -1
- package/components/ea-carousel/index.css +103 -0
- package/components/ea-carousel/index.js +222 -1
- package/components/ea-carousel/index.scss +140 -0
- package/components/ea-carousel/src/style/stylesheet.js +105 -1
- package/components/ea-carousel/src/utils/handleIndexOverflow.js +9 -1
- package/components/ea-carousel-item/index.css +20 -0
- package/components/ea-carousel-item/index.js +23 -1
- package/components/ea-carousel-item/index.scss +26 -0
- package/components/ea-carousel-item/src/style/stylesheet.js +22 -1
- package/components/ea-checkbox/index.css +108 -0
- package/components/ea-checkbox/index.js +160 -1
- package/components/ea-checkbox/index.scss +141 -0
- package/components/ea-checkbox/src/style/stylesheet.js +110 -1
- package/components/ea-checkbox-group/index.css +6 -0
- package/components/ea-checkbox-group/index.js +120 -1
- package/components/ea-checkbox-group/index.scss +7 -0
- package/components/ea-checkbox-group/src/style/stylesheet.js +8 -1
- package/components/ea-collapse/index.css +0 -0
- package/components/ea-collapse/index.js +109 -1
- package/components/ea-collapse/index.scss +4 -0
- package/components/ea-collapse-item/index.css +31 -0
- package/components/ea-collapse-item/index.js +111 -1
- package/components/ea-collapse-item/index.scss +46 -0
- package/components/ea-collapse-item/src/style/stylesheet.js +33 -1
- package/components/ea-container/index.css +14 -0
- package/components/ea-container/index.js +85 -1
- package/components/ea-container/index.scss +18 -0
- package/components/ea-date-picker/index.css +17 -0
- package/components/ea-date-picker/index.js +191 -1
- package/components/ea-date-picker/index.scss +29 -0
- package/components/ea-date-picker/src/style/stylesheet.js +19 -1
- package/components/ea-descriptions/index.css +33 -0
- package/components/ea-descriptions/index.js +171 -1
- package/components/ea-descriptions/index.scss +45 -0
- package/components/ea-descriptions/src/components/contentTemplate.js +11 -1
- package/components/ea-descriptions/src/components/getTdTemplate_border.js +6 -1
- package/components/ea-descriptions/src/components/getTdTemplate_direction.js +7 -1
- package/components/ea-descriptions/src/components/getThTemplate_direction.js +7 -1
- package/components/ea-descriptions/src/components/getThTemplate_normal.js +8 -1
- package/components/ea-descriptions/src/style/stylesheet.js +35 -1
- package/components/ea-descriptions-item/index.css +21 -0
- package/components/ea-descriptions-item/index.js +71 -1
- package/components/ea-descriptions-item/index.scss +29 -0
- package/components/ea-descriptions-item/src/stylesheet.js +23 -1
- package/components/ea-drawer/index.css +138 -0
- package/components/ea-drawer/index.js +251 -1
- package/components/ea-drawer/index.scss +208 -0
- package/components/ea-drawer/src/style/stylesheet.js +141 -1
- package/components/ea-empty/index.css +30 -0
- package/components/ea-empty/index.js +93 -1
- package/components/ea-empty/index.scss +30 -0
- package/components/ea-empty/src/assets/emptyStatusSVG.js +6 -1
- package/components/ea-empty/src/style/stylesheet.js +24 -1
- package/components/ea-footer/index.css +7 -0
- package/components/ea-footer/index.js +57 -1
- package/components/ea-footer/index.scss +10 -0
- package/components/ea-form/index.css +0 -0
- package/components/ea-form/index.js +121 -1
- package/components/ea-form/index.scss +0 -0
- package/components/ea-form-item/index.css +62 -0
- package/components/ea-form-item/index.js +152 -1
- package/components/ea-form-item/index.scss +83 -0
- package/components/ea-form-item/src/style/stylesheet.js +64 -1
- package/components/ea-header/index.css +7 -0
- package/components/ea-header/index.js +55 -1
- package/components/ea-header/index.scss +10 -0
- package/components/ea-icon/css/fontello.css +312 -226
- package/components/ea-icon/index.css +1 -2
- package/components/ea-icon/index.js +84 -1
- package/components/ea-image/index.css +84 -0
- package/components/ea-image/index.js +182 -1
- package/components/ea-image/index.scss +111 -0
- package/components/ea-image/src/assets/errorImage.js +9 -1
- package/components/ea-image/src/assets/errorImage.svg +7 -0
- package/components/ea-image/src/style/stylesheet.js +86 -1
- package/components/ea-image/src/utils/createPreviewTools.js +140 -1
- package/components/ea-infinite-scroll/index.css +0 -0
- package/components/ea-infinite-scroll/index.js +119 -1
- 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 +18 -1
- package/components/ea-infinite-scroll-item/index.scss +0 -0
- package/components/ea-input/index.css +139 -0
- package/components/ea-input/index.js +398 -1
- package/components/ea-input/index.scss +178 -0
- package/components/ea-input/src/components/createFixIcon.js +108 -1
- package/components/ea-input/src/components/createSuggestionBoard.js +43 -1
- package/components/ea-input/src/components/createWordLimitElement.js +18 -1
- package/components/ea-input/src/style/stylesheet.js +141 -1
- package/components/ea-input/src/utils/dispatchEvent.js +9 -1
- package/components/ea-input/src/utils/handleSearchResult.js +9 -1
- package/components/ea-input/src/utils/handleSuggestionBoardTrigger.js +31 -1
- package/components/ea-input-number/index.css +120 -0
- package/components/ea-input-number/index.js +308 -1
- package/components/ea-input-number/index.scss +132 -0
- package/components/ea-input-number/src/style/stylesheet.js +122 -1
- package/components/ea-input-number/src/utils/handleCustomEvent.js +5 -1
- package/components/ea-link/index.css +48 -0
- package/components/ea-link/index.js +122 -1
- package/components/ea-link/index.scss +36 -0
- package/components/ea-link/src/style/stylesheet.js +50 -1
- package/components/ea-loading/index.css +38 -0
- package/components/ea-loading/index.js +166 -1
- package/components/ea-loading/index.scss +55 -0
- package/components/ea-loading/src/style/stylesheet.js +40 -1
- package/components/ea-main/index.css +8 -0
- package/components/ea-main/index.js +32 -1
- package/components/ea-main/index.scss +11 -0
- package/components/ea-menu/index.css +19 -0
- package/components/ea-menu/index.js +131 -1
- package/components/ea-menu/index.scss +22 -0
- package/components/ea-menu/src/style/stylesheet.js +21 -1
- package/components/ea-menu/src/utils/handleMenuItemEvent.js +32 -1
- package/components/ea-menu-item/index.css +48 -0
- package/components/ea-menu-item/index.js +130 -1
- package/components/ea-menu-item/index.scss +62 -0
- package/components/ea-menu-item/src/style/stylesheet.js +50 -1
- package/components/ea-menu-item-group/index.css +42 -0
- package/components/ea-menu-item-group/index.js +130 -1
- package/components/ea-menu-item-group/index.scss +60 -0
- package/components/ea-menu-item-group/src/style/stylesheet.js +44 -1
- package/components/ea-message/index.css +47 -0
- package/components/ea-message/index.js +171 -1
- package/components/ea-message/index.scss +70 -0
- package/components/ea-message/src/style/stylesheet.js +48 -1
- package/components/ea-message/src/utils/MessageClass.js +67 -1
- package/components/ea-message-box/index.css +85 -0
- package/components/ea-message-box/index.js +211 -1
- package/components/ea-message-box/index.scss +113 -0
- package/components/ea-message-box/src/style/stylesheet.js +87 -1
- package/components/ea-message-box/src/utils/EaMessageBoxClass.js +60 -1
- package/components/ea-option/index.css +24 -0
- package/components/ea-option/index.js +74 -1
- package/components/ea-option/index.scss +31 -0
- package/components/ea-option/src/style/stylesheet.js +26 -1
- package/components/ea-option-gropu/index.css +6 -0
- package/components/ea-option-gropu/index.js +57 -1
- package/components/ea-option-gropu/index.scss +8 -0
- package/components/ea-page-header/index.css +33 -0
- package/components/ea-page-header/index.js +91 -1
- package/components/ea-page-header/index.scss +44 -0
- package/components/ea-page-header/src/style/stylesheet.js +35 -1
- package/components/ea-pagination/index.css +69 -0
- package/components/ea-pagination/index.js +305 -1
- package/components/ea-pagination/index.scss +89 -0
- package/components/ea-pagination/src/components/getMoreItem.js +20 -1
- package/components/ea-pagination/src/components/getPageItem.js +11 -1
- package/components/ea-pagination/src/components/getShowTotalItem.js +7 -1
- package/components/ea-pagination/src/style/stylesheet.js +71 -1
- package/components/ea-pane/index.css +6 -0
- package/components/ea-pane/index.js +52 -1
- package/components/ea-pane/index.scss +7 -0
- package/components/ea-pane/src/stylesheet.js +8 -1
- package/components/ea-progress/index.css +61 -0
- package/components/ea-progress/index.js +249 -1
- package/components/ea-progress/index.scss +74 -0
- package/components/ea-progress/src/components/SVGComm.js +18 -1
- package/components/ea-progress/src/style/stylesheet.js +55 -1
- package/components/ea-radio/index.css +82 -0
- package/components/ea-radio/index.js +137 -1
- package/components/ea-radio/index.scss +119 -0
- package/components/ea-radio/src/style/stylesheet.js +84 -1
- package/components/ea-radio-group/index.css +3 -0
- package/components/ea-radio-group/index.js +96 -1
- package/components/ea-radio-group/index.scss +3 -0
- package/components/ea-rate/index.css +44 -0
- package/components/ea-rate/index.js +243 -1
- package/components/ea-rate/index.scss +55 -0
- package/components/ea-rate/src/components/rateComm.js +20 -1
- package/components/ea-rate/src/style/stylesheet.js +45 -1
- package/components/ea-result/index.css +37 -0
- package/components/ea-result/index.js +109 -1
- package/components/ea-result/index.scss +46 -0
- package/components/ea-result/src/style/stylesheet.js +39 -1
- package/components/ea-select/index.css +47 -0
- package/components/ea-select/index.js +312 -1
- package/components/ea-select/index.scss +70 -0
- package/components/ea-select/src/style/stylesheet.js +49 -1
- package/components/ea-skeleton/index.css +12 -0
- package/components/ea-skeleton/index.js +148 -1
- package/components/ea-skeleton/index.scss +16 -0
- package/components/ea-skeleton/src/style/stylesheet.js +14 -1
- package/components/ea-skeleton/src/utils/createSkeletonElement.js +7 -1
- package/components/ea-skeleton-item/index.css +69 -0
- package/components/ea-skeleton-item/index.js +82 -1
- package/components/ea-skeleton-item/index.scss +107 -0
- package/components/ea-skeleton-item/src/assets/imageSVG.js +8 -1
- package/components/ea-skeleton-item/src/style/stylesheet.js +71 -1
- package/components/ea-step/index.css +84 -0
- package/components/ea-step/index.js +230 -1
- package/components/ea-step/index.scss +110 -0
- package/components/ea-step/src/style/stylesheet.js +86 -1
- package/components/ea-steps/index.css +19 -0
- package/components/ea-steps/index.js +104 -1
- package/components/ea-steps/index.scss +23 -0
- package/components/ea-steps/src/style/stylesheet.js +21 -1
- package/components/ea-submenu/index.css +65 -0
- package/components/ea-submenu/index.js +141 -1
- package/components/ea-submenu/index.scss +88 -0
- package/components/ea-submenu/src/style/stylesheet.js +67 -1
- package/components/ea-switch/index.css +90 -0
- package/components/ea-switch/index.js +189 -1
- package/components/ea-switch/index.scss +117 -0
- package/components/ea-switch/src/style/stylesheet.js +92 -1
- package/components/ea-tab/index.css +68 -0
- package/components/ea-tab/index.js +138 -1
- package/components/ea-tab/index.scss +96 -0
- package/components/ea-tab/src/style/stylesheet.js +70 -1
- package/components/ea-table/index.css +98 -0
- package/components/ea-table/index.js +555 -1
- package/components/ea-table/index.scss +90 -0
- package/components/ea-table/src/style/stylesheet.js +100 -1
- package/components/ea-table-column/index.css +0 -0
- package/components/ea-table-column/index.js +164 -1
- package/components/ea-table-column/index.scss +0 -0
- package/components/ea-tabs/index.css +45 -0
- package/components/ea-tabs/index.js +245 -1
- package/components/ea-tabs/index.scss +64 -0
- package/components/ea-tabs/src/style/stylesheet.js +47 -1
- package/components/ea-tag/index.css +90 -0
- package/components/ea-tag/index.js +107 -1
- package/components/ea-tag/index.scss +71 -0
- package/components/ea-tag/src/style/stylesheet.js +92 -1
- package/components/ea-textarea/index.css +37 -0
- package/components/ea-textarea/index.js +277 -1
- package/components/ea-textarea/index.scss +48 -0
- package/components/ea-textarea/src/style/stylesheet.js +39 -1
- package/components/ea-time-picker/index.css +82 -0
- package/components/ea-time-picker/index.js +379 -1
- package/components/ea-time-picker/index.scss +110 -0
- package/components/ea-time-picker/src/style/stylesheet.js +84 -1
- package/components/ea-timeline/index.css +0 -0
- package/components/ea-timeline/index.js +74 -1
- package/components/ea-timeline/index.scss +1 -0
- package/components/ea-timeline/style/stylesheet.js +3 -1
- package/components/ea-timeline-item/index.css +79 -0
- package/components/ea-timeline-item/index.js +146 -1
- package/components/ea-timeline-item/index.scss +92 -0
- package/components/ea-timeline-item/src/style/stylesheet.js +81 -1
- package/components/ea-ui-base-style.css +0 -0
- package/components/ea-ui-base-style.scss +153 -0
- package/components/globalConfig.js +10 -0
- package/components/index.js +67 -0
- package/package.json +2 -2
- package/public/logo.png +0 -0
- package/utils/Validator.js +16 -1
- package/utils/createElement.js +30 -1
- package/utils/handleDefaultAttrIsTrue.js +11 -1
- package/utils/handleTemplate.js +19 -1
- package/utils/setStyle.js +8 -1
- package/utils/timeout.js +16 -1
- package/components/ea-icon/css/animation.css +0 -85
- package/components/ea-icon/css/fontello-embedded.css +0 -181
- package/components/ea-icon/css/fontello-ie7-codes.css +0 -123
- package/components/ea-icon/css/fontello-ie7.css +0 -134
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
.ea-carousel_wrap {
|
|
2
|
+
position: relative;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
}
|
|
5
|
+
.ea-carousel_wrap .ea-carousel_content-container {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
color: #fff;
|
|
9
|
+
text-align: center;
|
|
10
|
+
height: 300px;
|
|
11
|
+
transition: transform 0.5s;
|
|
12
|
+
}
|
|
13
|
+
.ea-carousel_wrap .ea-carousel_content-container ::slotted(ea-carousel-item) {
|
|
14
|
+
flex: 0 0 100%;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
.ea-carousel_wrap .ea-carousel-item_arrow {
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 50%;
|
|
20
|
+
transform: translateY(-50%);
|
|
21
|
+
opacity: 0;
|
|
22
|
+
width: 1.5rem;
|
|
23
|
+
height: 1.5rem;
|
|
24
|
+
line-height: 1.5;
|
|
25
|
+
font-weight: 800;
|
|
26
|
+
text-align: center;
|
|
27
|
+
border-radius: 50%;
|
|
28
|
+
background-color: rgba(31, 45, 61, 0.11);
|
|
29
|
+
color: #fff;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
user-select: none;
|
|
32
|
+
transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
|
|
33
|
+
}
|
|
34
|
+
.ea-carousel_wrap .ea-carousel-item_arrow.ea-carousel-item_arrow--left {
|
|
35
|
+
left: 0;
|
|
36
|
+
transform: translate(-100%, -50%);
|
|
37
|
+
}
|
|
38
|
+
.ea-carousel_wrap .ea-carousel-item_arrow.ea-carousel-item_arrow--right {
|
|
39
|
+
right: 0;
|
|
40
|
+
transform: translate(100%, -50%);
|
|
41
|
+
}
|
|
42
|
+
.ea-carousel_wrap .ea-carousel-item_arrow:hover {
|
|
43
|
+
background-color: rgba(31, 45, 61, 0.3);
|
|
44
|
+
}
|
|
45
|
+
.ea-carousel_wrap .ea-carousel-indicator_wrap {
|
|
46
|
+
position: absolute;
|
|
47
|
+
bottom: 1rem;
|
|
48
|
+
left: 50%;
|
|
49
|
+
transform: translateX(-50%);
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: row;
|
|
52
|
+
align-items: center;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
}
|
|
55
|
+
.ea-carousel_wrap .ea-carousel-indicator_wrap .ea-carousel-item_indicator {
|
|
56
|
+
width: 0.5rem;
|
|
57
|
+
height: 0.5rem;
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
background-color: rgba(255, 255, 255, 0.4);
|
|
60
|
+
margin: 0.25rem;
|
|
61
|
+
transition: background-color 0.3s;
|
|
62
|
+
}
|
|
63
|
+
.ea-carousel_wrap .ea-carousel-indicator_wrap .ea-carousel-item_indicator.ea-carousel-item_indicator--active {
|
|
64
|
+
background-color: #fff;
|
|
65
|
+
}
|
|
66
|
+
.ea-carousel_wrap ::slotted(ea-carousel-item:nth-child(odd)) {
|
|
67
|
+
--odd-bgc: #d3dce6;
|
|
68
|
+
}
|
|
69
|
+
.ea-carousel_wrap.hover-trigger:hover .ea-carousel-item_arrow.ea-carousel-item_arrow--left {
|
|
70
|
+
left: 0;
|
|
71
|
+
transform: translate(50%, -50%);
|
|
72
|
+
opacity: 1;
|
|
73
|
+
}
|
|
74
|
+
.ea-carousel_wrap.hover-trigger:hover .ea-carousel-item_arrow.ea-carousel-item_arrow--right {
|
|
75
|
+
right: 0;
|
|
76
|
+
transform: translate(-50%, -50%);
|
|
77
|
+
opacity: 1;
|
|
78
|
+
}
|
|
79
|
+
.ea-carousel_wrap.always-show-arrow .ea-carousel-item_arrow.ea-carousel-item_arrow--left {
|
|
80
|
+
left: 0;
|
|
81
|
+
transform: translate(50%, -50%);
|
|
82
|
+
opacity: 1;
|
|
83
|
+
}
|
|
84
|
+
.ea-carousel_wrap.always-show-arrow .ea-carousel-item_arrow.ea-carousel-item_arrow--right {
|
|
85
|
+
right: 0;
|
|
86
|
+
transform: translate(-50%, -50%);
|
|
87
|
+
opacity: 1;
|
|
88
|
+
}
|
|
89
|
+
.ea-carousel_wrap.ea-carousel--horizontal .ea-carousel_content-container {
|
|
90
|
+
flex-direction: row;
|
|
91
|
+
}
|
|
92
|
+
.ea-carousel_wrap.ea-carousel--vertical .ea-carousel_content-container {
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
}
|
|
95
|
+
.ea-carousel_wrap.ea-carousel--vertical .ea-carousel-item_arrow {
|
|
96
|
+
display: none;
|
|
97
|
+
}
|
|
98
|
+
.ea-carousel_wrap.ea-carousel--vertical .ea-carousel-indicator_wrap {
|
|
99
|
+
left: 100%;
|
|
100
|
+
bottom: 50%;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
transform: translate(-200%, 50%);
|
|
103
|
+
}
|
|
@@ -1 +1,222 @@
|
|
|
1
|
-
import Base from
|
|
1
|
+
import Base from '../Base.js';
|
|
2
|
+
import "../ea-carousel-item/index.js"
|
|
3
|
+
|
|
4
|
+
import { createElement } from '../../utils/createElement.js';
|
|
5
|
+
|
|
6
|
+
import { handleIndexOverflow } from './src/utils/handleIndexOverflow.js';
|
|
7
|
+
|
|
8
|
+
import { stylesheet } from './src/style/stylesheet.js'
|
|
9
|
+
|
|
10
|
+
export class EaCarousel extends Base {
|
|
11
|
+
#container;
|
|
12
|
+
|
|
13
|
+
#contentContainer;
|
|
14
|
+
|
|
15
|
+
#indicatorWrap;
|
|
16
|
+
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
|
|
20
|
+
const shadowRoot = this.attachShadow({ mode: 'open' });
|
|
21
|
+
shadowRoot.innerHTML = `
|
|
22
|
+
<div class='ea-carousel_wrap' part='container'>
|
|
23
|
+
<div class='ea-carousel_content-container' part='content-wrap'>
|
|
24
|
+
<slot></slot>
|
|
25
|
+
</div>
|
|
26
|
+
<div class='ea-carousel-indicator_wrap' part='indicator-wrap'></div>
|
|
27
|
+
</div>
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
this.#container = shadowRoot.querySelector('.ea-carousel_wrap');
|
|
31
|
+
this.#contentContainer = shadowRoot.querySelector('.ea-carousel_content-container');
|
|
32
|
+
this.#indicatorWrap = shadowRoot.querySelector('.ea-carousel-indicator_wrap');
|
|
33
|
+
|
|
34
|
+
this.build(shadowRoot, stylesheet);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// ------- direction 轮播图方向 -------
|
|
38
|
+
// #region
|
|
39
|
+
get direction() {
|
|
40
|
+
const direction = this.getAttribute('direction');
|
|
41
|
+
return ["horizontal", "vertical"].includes(direction) ? direction : "horizontal";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
set direction(value) {
|
|
45
|
+
this.setAttribute('direction', value);
|
|
46
|
+
|
|
47
|
+
this.#container.classList.add(`ea-carousel--${value}`);
|
|
48
|
+
}
|
|
49
|
+
// #endregion
|
|
50
|
+
// ------- end -------
|
|
51
|
+
|
|
52
|
+
// ------- index 轮播图索引 -------
|
|
53
|
+
// #region
|
|
54
|
+
get index() {
|
|
55
|
+
return this.getAttrNumber('index') || 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
set index(value) {
|
|
59
|
+
const length = this.querySelectorAll('ea-carousel-item').length - 1;
|
|
60
|
+
const index = handleIndexOverflow(length, value);
|
|
61
|
+
|
|
62
|
+
this.setAttribute('index', index);
|
|
63
|
+
|
|
64
|
+
const itemInfo = this.#container.getBoundingClientRect();
|
|
65
|
+
const direction = this.direction === "horizontal" ? `X` : `Y`;
|
|
66
|
+
const moveStep = this.direction === "horizontal" ? itemInfo.width : itemInfo.height;
|
|
67
|
+
|
|
68
|
+
this.#contentContainer.style.transform = `translate${direction}(-${index * moveStep}px)`;
|
|
69
|
+
|
|
70
|
+
try {
|
|
71
|
+
const indicators = this.#indicatorWrap.querySelectorAll(`.ea-carousel-item_indicator`);
|
|
72
|
+
indicators.forEach(item => {
|
|
73
|
+
item.classList.remove('ea-carousel-item_indicator--active');
|
|
74
|
+
});
|
|
75
|
+
indicators[index].classList.add('ea-carousel-item_indicator--active');
|
|
76
|
+
} catch (e) { }
|
|
77
|
+
}
|
|
78
|
+
// #endregion
|
|
79
|
+
// ------- end -------
|
|
80
|
+
|
|
81
|
+
// ------- trigger 轮播图指示器触发方式 -------
|
|
82
|
+
// #region
|
|
83
|
+
get trigger() {
|
|
84
|
+
const trigger = this.getAttribute('trigger') || "hover";
|
|
85
|
+
return ["click", "hover"].includes(trigger) ? trigger : "click";
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
set trigger(value) {
|
|
89
|
+
this.setAttribute('trigger', value);
|
|
90
|
+
}
|
|
91
|
+
// #endregion
|
|
92
|
+
// ------- end -------
|
|
93
|
+
|
|
94
|
+
// ------- interval 轮播图自动播放间隔时间 -------
|
|
95
|
+
// #region
|
|
96
|
+
get interval() {
|
|
97
|
+
return this.getAttrNumber('interval') || 3;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
set interval(value) {
|
|
101
|
+
this.setAttribute('interval', value);
|
|
102
|
+
}
|
|
103
|
+
// #endregion
|
|
104
|
+
// ------- end -------
|
|
105
|
+
|
|
106
|
+
// ------- arrow 轮播图是否一直显示箭头 -------
|
|
107
|
+
// #region
|
|
108
|
+
get arrow() {
|
|
109
|
+
const arrow = this.getAttribute('arrow') || "hover";
|
|
110
|
+
return ["always", "hover", "never"].includes(arrow) ? arrow : "hover";
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
set arrow(value) {
|
|
114
|
+
this.setAttribute('arrow', value);
|
|
115
|
+
}
|
|
116
|
+
// #endregion
|
|
117
|
+
// ------- end -------
|
|
118
|
+
|
|
119
|
+
#initIndicators() {
|
|
120
|
+
const length = this.querySelectorAll('ea-carousel-item').length;
|
|
121
|
+
|
|
122
|
+
for (let i = 0; i < length; i++) {
|
|
123
|
+
const indicator = createElement('div', 'ea-carousel-item_indicator');
|
|
124
|
+
indicator.part = 'indicator';
|
|
125
|
+
this.#indicatorWrap.appendChild(indicator);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const indicators = this.#indicatorWrap.querySelectorAll('.ea-carousel-item_indicator');
|
|
129
|
+
indicators[0].classList.add('ea-carousel-item_indicator--active');
|
|
130
|
+
indicators.forEach((indicator, index) => {
|
|
131
|
+
indicator.addEventListener(this.trigger === 'click' ? 'click' : 'mouseenter', () => {
|
|
132
|
+
this.index = index;
|
|
133
|
+
|
|
134
|
+
indicators.forEach((item) => {
|
|
135
|
+
item.classList.remove('ea-carousel-item_active');
|
|
136
|
+
})
|
|
137
|
+
indicator.classList.add('ea-carousel-item_active');
|
|
138
|
+
})
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
#initCarouselAutoPlay() {
|
|
143
|
+
let timer = setInterval(() => {
|
|
144
|
+
this.index = this.index + 1;
|
|
145
|
+
}, this.interval * 1000);
|
|
146
|
+
|
|
147
|
+
// 当鼠标进入轮播图区域时,停止自动播放
|
|
148
|
+
this.addEventListener('mouseenter', () => {
|
|
149
|
+
clearInterval(timer);
|
|
150
|
+
timer = null;
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
// 当鼠标离开轮播图区域时,恢复自动播放
|
|
154
|
+
this.addEventListener('mouseleave', () => {
|
|
155
|
+
timer = setInterval(() => {
|
|
156
|
+
this.index = this.index + 1;
|
|
157
|
+
}, this.interval * 1000)
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
#createArrowItem(arrow) {
|
|
162
|
+
let throttle = false;
|
|
163
|
+
const arrowItem = createElement('div', `ea-carousel-item_arrow ea-carousel-item_arrow--${arrow}`);
|
|
164
|
+
arrowItem.part = 'arrow';
|
|
165
|
+
|
|
166
|
+
arrowItem.innerHTML = arrow === "left" ? `<` : `>`;
|
|
167
|
+
|
|
168
|
+
switch (this.arrow) {
|
|
169
|
+
case "always":
|
|
170
|
+
this.#container.classList.add('always-show-arrow');
|
|
171
|
+
break;
|
|
172
|
+
case "hover":
|
|
173
|
+
this.#container.classList.add('hover-trigger');
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
arrowItem.addEventListener('click', () => {
|
|
178
|
+
if (throttle) return;
|
|
179
|
+
this.index = arrow === "left" ? --this.index : ++this.index;
|
|
180
|
+
})
|
|
181
|
+
|
|
182
|
+
this.#contentContainer.addEventListener('transitionstart', () => {
|
|
183
|
+
throttle = true;
|
|
184
|
+
})
|
|
185
|
+
this.#contentContainer.addEventListener('transitionend', () => {
|
|
186
|
+
throttle = false;
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
return arrowItem;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
connectedCallback() {
|
|
193
|
+
this.direction = this.direction;
|
|
194
|
+
|
|
195
|
+
this.trigger = this.trigger;
|
|
196
|
+
|
|
197
|
+
this.interval = this.interval;;
|
|
198
|
+
|
|
199
|
+
this.arrow = this.arrow;
|
|
200
|
+
|
|
201
|
+
this.index = this.index;
|
|
202
|
+
|
|
203
|
+
this.#initIndicators();
|
|
204
|
+
this.#initCarouselAutoPlay();
|
|
205
|
+
|
|
206
|
+
if (this.arrow !== "never" || this.direction !== "vertical") {
|
|
207
|
+
const leftArrowItem = this.#createArrowItem("left");
|
|
208
|
+
const rightArrowItem = this.#createArrowItem("right");
|
|
209
|
+
|
|
210
|
+
this.#container.appendChild(leftArrowItem);
|
|
211
|
+
this.#container.appendChild(rightArrowItem);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
window.addEventListener('resize', () => {
|
|
215
|
+
this.index = this.index;
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (!customElements.get('ea-carousel')) {
|
|
221
|
+
customElements.define('ea-carousel', EaCarousel);
|
|
222
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
@import "../ea-ui-base-style.scss";
|
|
2
|
+
|
|
3
|
+
@mixin carousel-item-arrow {
|
|
4
|
+
&.ea-carousel-item_arrow--left {
|
|
5
|
+
left: 0;
|
|
6
|
+
transform: translate(50%, -50%);
|
|
7
|
+
opacity: 1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.ea-carousel-item_arrow--right {
|
|
11
|
+
right: 0;
|
|
12
|
+
transform: translate(-50%, -50%);
|
|
13
|
+
opacity: 1;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ea-carousel_wrap {
|
|
18
|
+
position: relative;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
|
|
21
|
+
.ea-carousel_content-container {
|
|
22
|
+
position: relative;
|
|
23
|
+
|
|
24
|
+
display: flex;
|
|
25
|
+
|
|
26
|
+
color: #fff;
|
|
27
|
+
|
|
28
|
+
text-align: center;
|
|
29
|
+
height: 300px;
|
|
30
|
+
transition: transform 0.5s;
|
|
31
|
+
|
|
32
|
+
::slotted(ea-carousel-item) {
|
|
33
|
+
flex: 0 0 100%;
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ea-carousel-item_arrow {
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 50%;
|
|
41
|
+
transform: translateY(-50%);
|
|
42
|
+
opacity: 0;
|
|
43
|
+
|
|
44
|
+
width: 1.5rem;
|
|
45
|
+
height: 1.5rem;
|
|
46
|
+
line-height: 1.5;
|
|
47
|
+
font-weight: 800;
|
|
48
|
+
text-align: center;
|
|
49
|
+
border-radius: 50%;
|
|
50
|
+
background-color: rgba(31, 45, 61, 0.11);
|
|
51
|
+
color: #fff;
|
|
52
|
+
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
user-select: none;
|
|
55
|
+
|
|
56
|
+
transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
|
|
57
|
+
|
|
58
|
+
&.ea-carousel-item_arrow--left {
|
|
59
|
+
left: 0;
|
|
60
|
+
transform: translate(-100%, -50%);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.ea-carousel-item_arrow--right {
|
|
64
|
+
right: 0;
|
|
65
|
+
transform: translate(100%, -50%);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:hover {
|
|
69
|
+
background-color: rgba(31, 45, 61, 0.3);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ea-carousel-indicator_wrap {
|
|
74
|
+
position: absolute;
|
|
75
|
+
bottom: 1rem;
|
|
76
|
+
left: 50%;
|
|
77
|
+
transform: translateX(-50%);
|
|
78
|
+
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: row;
|
|
81
|
+
align-items: center;
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
|
|
84
|
+
.ea-carousel-item_indicator {
|
|
85
|
+
width: 0.5rem;
|
|
86
|
+
height: 0.5rem;
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
background-color: rgba(255, 255, 255, 0.4);
|
|
89
|
+
margin: 0.25rem;
|
|
90
|
+
transition: background-color 0.3s;
|
|
91
|
+
|
|
92
|
+
&.ea-carousel-item_indicator--active {
|
|
93
|
+
background-color: #fff;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
::slotted(ea-carousel-item:nth-child(odd)) {
|
|
99
|
+
--odd-bgc: #d3dce6;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.hover-trigger {
|
|
103
|
+
&:hover {
|
|
104
|
+
.ea-carousel-item_arrow {
|
|
105
|
+
@include carousel-item-arrow;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&.always-show-arrow {
|
|
111
|
+
.ea-carousel-item_arrow {
|
|
112
|
+
@include carousel-item-arrow;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&.ea-carousel--horizontal {
|
|
117
|
+
.ea-carousel_content-container {
|
|
118
|
+
flex-direction: row;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&.ea-carousel--vertical {
|
|
123
|
+
.ea-carousel_content-container {
|
|
124
|
+
flex-direction: column;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.ea-carousel-item_arrow {
|
|
128
|
+
display: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.ea-carousel-indicator_wrap {
|
|
132
|
+
left: 100%;
|
|
133
|
+
bottom: 50%;
|
|
134
|
+
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
|
|
137
|
+
transform: translate(-200%, 50%);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -1 +1,105 @@
|
|
|
1
|
-
export const stylesheet=
|
|
1
|
+
export const stylesheet = `
|
|
2
|
+
.ea-carousel_wrap {
|
|
3
|
+
position: relative;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
}
|
|
6
|
+
.ea-carousel_wrap .ea-carousel_content-container {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: flex;
|
|
9
|
+
color: #fff;
|
|
10
|
+
text-align: center;
|
|
11
|
+
height: 300px;
|
|
12
|
+
transition: transform 0.5s;
|
|
13
|
+
}
|
|
14
|
+
.ea-carousel_wrap .ea-carousel_content-container ::slotted(ea-carousel-item) {
|
|
15
|
+
flex: 0 0 100%;
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
.ea-carousel_wrap .ea-carousel-item_arrow {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 50%;
|
|
21
|
+
transform: translateY(-50%);
|
|
22
|
+
opacity: 0;
|
|
23
|
+
width: 1.5rem;
|
|
24
|
+
height: 1.5rem;
|
|
25
|
+
line-height: 1.5;
|
|
26
|
+
font-weight: 800;
|
|
27
|
+
text-align: center;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
background-color: rgba(31, 45, 61, 0.11);
|
|
30
|
+
color: #fff;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
user-select: none;
|
|
33
|
+
transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
|
|
34
|
+
}
|
|
35
|
+
.ea-carousel_wrap .ea-carousel-item_arrow.ea-carousel-item_arrow--left {
|
|
36
|
+
left: 0;
|
|
37
|
+
transform: translate(-100%, -50%);
|
|
38
|
+
}
|
|
39
|
+
.ea-carousel_wrap .ea-carousel-item_arrow.ea-carousel-item_arrow--right {
|
|
40
|
+
right: 0;
|
|
41
|
+
transform: translate(100%, -50%);
|
|
42
|
+
}
|
|
43
|
+
.ea-carousel_wrap .ea-carousel-item_arrow:hover {
|
|
44
|
+
background-color: rgba(31, 45, 61, 0.3);
|
|
45
|
+
}
|
|
46
|
+
.ea-carousel_wrap .ea-carousel-indicator_wrap {
|
|
47
|
+
position: absolute;
|
|
48
|
+
bottom: 1rem;
|
|
49
|
+
left: 50%;
|
|
50
|
+
transform: translateX(-50%);
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: row;
|
|
53
|
+
align-items: center;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
.ea-carousel_wrap .ea-carousel-indicator_wrap .ea-carousel-item_indicator {
|
|
57
|
+
width: 0.5rem;
|
|
58
|
+
height: 0.5rem;
|
|
59
|
+
border-radius: 50%;
|
|
60
|
+
background-color: rgba(255, 255, 255, 0.4);
|
|
61
|
+
margin: 0.25rem;
|
|
62
|
+
transition: background-color 0.3s;
|
|
63
|
+
}
|
|
64
|
+
.ea-carousel_wrap .ea-carousel-indicator_wrap .ea-carousel-item_indicator.ea-carousel-item_indicator--active {
|
|
65
|
+
background-color: #fff;
|
|
66
|
+
}
|
|
67
|
+
.ea-carousel_wrap ::slotted(ea-carousel-item:nth-child(odd)) {
|
|
68
|
+
--odd-bgc: #d3dce6;
|
|
69
|
+
}
|
|
70
|
+
.ea-carousel_wrap.hover-trigger:hover .ea-carousel-item_arrow.ea-carousel-item_arrow--left {
|
|
71
|
+
left: 0;
|
|
72
|
+
transform: translate(50%, -50%);
|
|
73
|
+
opacity: 1;
|
|
74
|
+
}
|
|
75
|
+
.ea-carousel_wrap.hover-trigger:hover .ea-carousel-item_arrow.ea-carousel-item_arrow--right {
|
|
76
|
+
right: 0;
|
|
77
|
+
transform: translate(-50%, -50%);
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
.ea-carousel_wrap.always-show-arrow .ea-carousel-item_arrow.ea-carousel-item_arrow--left {
|
|
81
|
+
left: 0;
|
|
82
|
+
transform: translate(50%, -50%);
|
|
83
|
+
opacity: 1;
|
|
84
|
+
}
|
|
85
|
+
.ea-carousel_wrap.always-show-arrow .ea-carousel-item_arrow.ea-carousel-item_arrow--right {
|
|
86
|
+
right: 0;
|
|
87
|
+
transform: translate(-50%, -50%);
|
|
88
|
+
opacity: 1;
|
|
89
|
+
}
|
|
90
|
+
.ea-carousel_wrap.ea-carousel--horizontal .ea-carousel_content-container {
|
|
91
|
+
flex-direction: row;
|
|
92
|
+
}
|
|
93
|
+
.ea-carousel_wrap.ea-carousel--vertical .ea-carousel_content-container {
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
}
|
|
96
|
+
.ea-carousel_wrap.ea-carousel--vertical .ea-carousel-item_arrow {
|
|
97
|
+
display: none;
|
|
98
|
+
}
|
|
99
|
+
.ea-carousel_wrap.ea-carousel--vertical .ea-carousel-indicator_wrap {
|
|
100
|
+
left: 100%;
|
|
101
|
+
bottom: 50%;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
transform: translate(-200%, 50%);
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--odd-bgc: #99a9bf;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.ea-carousel-item_wrap {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
z-index: 0;
|
|
11
|
+
background-color: var(--odd-bgc);
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
}
|
|
16
|
+
.ea-carousel-item_wrap ::slotted(img) {
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
object-fit: cover;
|
|
20
|
+
}
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import Base from '../Base.js';
|
|
3
|
+
|
|
4
|
+
import { stylesheet } from './src/style/stylesheet.js';
|
|
5
|
+
|
|
6
|
+
export class EaCarouselItem extends Base {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
|
|
10
|
+
const shadowRoot = this.attachShadow({ mode: 'open' });
|
|
11
|
+
shadowRoot.innerHTML = `
|
|
12
|
+
<div class='ea-carousel-item_wrap' part='container'>
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</div>
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
this.build(shadowRoot, stylesheet);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (!customElements.get('ea-carousel-item')) {
|
|
22
|
+
customElements.define('ea-carousel-item', EaCarouselItem);
|
|
23
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--odd-bgc: #99a9bf;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.ea-carousel-item_wrap {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
z-index: 0;
|
|
13
|
+
|
|
14
|
+
background-color: var(--odd-bgc);
|
|
15
|
+
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
|
|
20
|
+
::slotted(img) {
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
|
|
24
|
+
object-fit: cover;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
export const stylesheet=
|
|
1
|
+
export const stylesheet = `
|
|
2
|
+
:host {
|
|
3
|
+
--odd-bgc: #99a9bf;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.ea-carousel-item_wrap {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
z-index: 0;
|
|
12
|
+
background-color: var(--odd-bgc);
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
}
|
|
17
|
+
.ea-carousel-item_wrap ::slotted(img) {
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
object-fit: cover;
|
|
21
|
+
}
|
|
22
|
+
`;
|