maxit-cli 0.1.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 +49 -0
- package/README.md +56 -0
- package/bin/maxit.js +75 -0
- package/lib/commands.js +142 -0
- package/lib/project.js +58 -0
- package/lib/registry.js +50 -0
- package/package.json +30 -0
- package/registry/components/action-sheet/action-sheet.js +1 -0
- package/registry/components/action-sheet/action-sheet.json +1 -0
- package/registry/components/action-sheet/action-sheet.wxml +1 -0
- package/registry/components/action-sheet/action-sheet.wxs +34 -0
- package/registry/components/action-sheet/action-sheet.wxss +197 -0
- package/registry/components/action-sheet/index.js +1 -0
- package/registry/components/action-sheet/props.js +1 -0
- package/registry/components/action-sheet/show.js +1 -0
- package/registry/components/action-sheet/template/grid.wxml +1 -0
- package/registry/components/avatar/avatar.js +1 -0
- package/registry/components/avatar/avatar.json +1 -0
- package/registry/components/avatar/avatar.wxml +1 -0
- package/registry/components/avatar/avatar.wxs +30 -0
- package/registry/components/avatar/avatar.wxss +105 -0
- package/registry/components/avatar/index.js +1 -0
- package/registry/components/avatar/props.js +1 -0
- package/registry/components/avatar-group/avatar-group.js +1 -0
- package/registry/components/avatar-group/avatar-group.json +1 -0
- package/registry/components/avatar-group/avatar-group.wxml +1 -0
- package/registry/components/avatar-group/avatar-group.wxss +248 -0
- package/registry/components/avatar-group/index.js +1 -0
- package/registry/components/avatar-group/props.js +1 -0
- package/registry/components/back-top/back-top.js +1 -0
- package/registry/components/back-top/back-top.json +1 -0
- package/registry/components/back-top/back-top.wxml +1 -0
- package/registry/components/back-top/back-top.wxss +77 -0
- package/registry/components/back-top/index.js +1 -0
- package/registry/components/back-top/props.js +1 -0
- package/registry/components/badge/badge.js +1 -0
- package/registry/components/badge/badge.json +1 -0
- package/registry/components/badge/badge.wxml +1 -0
- package/registry/components/badge/badge.wxs +64 -0
- package/registry/components/badge/badge.wxss +168 -0
- package/registry/components/badge/index.js +1 -0
- package/registry/components/badge/props.js +1 -0
- package/registry/components/balance-card/balance-card.js +34 -0
- package/registry/components/balance-card/balance-card.json +1 -0
- package/registry/components/balance-card/balance-card.wxml +33 -0
- package/registry/components/balance-card/balance-card.wxss +111 -0
- package/registry/components/balance-card/index.js +2 -0
- package/registry/components/balance-card/props.js +14 -0
- package/registry/components/balance-thumb-card/balance-thumb-card.js +39 -0
- package/registry/components/balance-thumb-card/balance-thumb-card.json +1 -0
- package/registry/components/balance-thumb-card/balance-thumb-card.wxml +26 -0
- package/registry/components/balance-thumb-card/balance-thumb-card.wxss +31 -0
- package/registry/components/balance-thumb-card/index.js +2 -0
- package/registry/components/balance-thumb-card/props.js +17 -0
- package/registry/components/bill-card/bill-card.js +23 -0
- package/registry/components/bill-card/bill-card.json +1 -0
- package/registry/components/bill-card/bill-card.wxml +30 -0
- package/registry/components/bill-card/bill-card.wxss +33 -0
- package/registry/components/bill-card/index.js +2 -0
- package/registry/components/bill-card/props.js +18 -0
- package/registry/components/button/button.js +1 -0
- package/registry/components/button/button.json +1 -0
- package/registry/components/button/button.wxml +1 -0
- package/registry/components/button/button.wxss +775 -0
- package/registry/components/button/index.js +1 -0
- package/registry/components/button/props.js +1 -0
- package/registry/components/calendar/calendar-header.wxml +1 -0
- package/registry/components/calendar/calendar.js +1 -0
- package/registry/components/calendar/calendar.json +1 -0
- package/registry/components/calendar/calendar.wxml +1 -0
- package/registry/components/calendar/calendar.wxs +44 -0
- package/registry/components/calendar/calendar.wxss +246 -0
- package/registry/components/calendar/index.js +1 -0
- package/registry/components/calendar/props.js +1 -0
- package/registry/components/calendar/template.wxml +1 -0
- package/registry/components/calendar/utils.js +1 -0
- package/registry/components/card/card.js +24 -0
- package/registry/components/card/card.json +1 -0
- package/registry/components/card/card.wxml +23 -0
- package/registry/components/card/card.wxss +103 -0
- package/registry/components/card/index.js +2 -0
- package/registry/components/card/props.js +16 -0
- package/registry/components/card-list/card-list.js +22 -0
- package/registry/components/card-list/card-list.json +1 -0
- package/registry/components/card-list/card-list.wxml +7 -0
- package/registry/components/card-list/card-list.wxss +30 -0
- package/registry/components/card-list/index.js +2 -0
- package/registry/components/card-list/props.js +16 -0
- package/registry/components/cascader/cascader.js +1 -0
- package/registry/components/cascader/cascader.json +1 -0
- package/registry/components/cascader/cascader.wxml +1 -0
- package/registry/components/cascader/cascader.wxss +178 -0
- package/registry/components/cascader/index.js +1 -0
- package/registry/components/cascader/props.js +1 -0
- package/registry/components/category-filter/category-filter.js +50 -0
- package/registry/components/category-filter/category-filter.json +1 -0
- package/registry/components/category-filter/category-filter.wxml +16 -0
- package/registry/components/category-filter/category-filter.wxss +47 -0
- package/registry/components/category-filter/index.js +2 -0
- package/registry/components/category-filter/props.js +10 -0
- package/registry/components/cell/cell.js +1 -0
- package/registry/components/cell/cell.json +1 -0
- package/registry/components/cell/cell.wxml +1 -0
- package/registry/components/cell/cell.wxss +136 -0
- package/registry/components/cell/index.js +1 -0
- package/registry/components/cell/props.js +1 -0
- package/registry/components/check-tag/check-tag.js +1 -0
- package/registry/components/check-tag/check-tag.json +1 -0
- package/registry/components/check-tag/check-tag.wxml +1 -0
- package/registry/components/check-tag/check-tag.wxss +275 -0
- package/registry/components/check-tag/index.js +1 -0
- package/registry/components/check-tag/props.js +1 -0
- package/registry/components/checkbox/checkbox.js +1 -0
- package/registry/components/checkbox/checkbox.json +1 -0
- package/registry/components/checkbox/checkbox.wxml +1 -0
- package/registry/components/checkbox/checkbox.wxss +230 -0
- package/registry/components/checkbox/index.js +1 -0
- package/registry/components/checkbox/props.js +1 -0
- package/registry/components/checkbox-group/checkbox-group.js +1 -0
- package/registry/components/checkbox-group/checkbox-group.json +1 -0
- package/registry/components/checkbox-group/checkbox-group.wxml +1 -0
- package/registry/components/checkbox-group/checkbox-group.wxss +7 -0
- package/registry/components/checkbox-group/index.js +1 -0
- package/registry/components/checkbox-group/props.js +1 -0
- package/registry/components/collapse/collapse.js +1 -0
- package/registry/components/collapse/collapse.json +1 -0
- package/registry/components/collapse/collapse.wxml +1 -0
- package/registry/components/collapse/collapse.wxss +8 -0
- package/registry/components/collapse/index.js +1 -0
- package/registry/components/collapse/props.js +1 -0
- package/registry/components/collapse-panel/collapse-panel.js +1 -0
- package/registry/components/collapse-panel/collapse-panel.json +1 -0
- package/registry/components/collapse-panel/collapse-panel.wxml +1 -0
- package/registry/components/collapse-panel/collapse-panel.wxss +186 -0
- package/registry/components/collapse-panel/index.js +1 -0
- package/registry/components/collapse-panel/props.js +1 -0
- package/registry/components/color-picker/color-picker.js +1 -0
- package/registry/components/color-picker/color-picker.json +1 -0
- package/registry/components/color-picker/color-picker.wxml +1 -0
- package/registry/components/color-picker/color-picker.wxss +312 -0
- package/registry/components/color-picker/constants.js +1 -0
- package/registry/components/color-picker/index.js +1 -0
- package/registry/components/color-picker/interfaces.js +1 -0
- package/registry/components/color-picker/props.js +1 -0
- package/registry/components/color-picker/template.wxml +1 -0
- package/registry/components/color-picker/utils.js +1 -0
- package/registry/components/common/bus.js +1 -0
- package/registry/components/common/config.js +1 -0
- package/registry/components/common/libs/tinycolor.js +1 -0
- package/registry/components/common/locale.js +20 -0
- package/registry/components/common/mixins/page-scroll.js +1 -0
- package/registry/components/common/mixins/touch.js +1 -0
- package/registry/components/common/mixins/transition.js +1 -0
- package/registry/components/common/mixins/using-config.js +24 -0
- package/registry/components/common/mixins/using-custom-navbar.js +1 -0
- package/registry/components/common/shared/calendar/index.js +1 -0
- package/registry/components/common/shared/color-picker/cmyk.js +1 -0
- package/registry/components/common/shared/color-picker/color.js +1 -0
- package/registry/components/common/shared/color-picker/gradient.js +1 -0
- package/registry/components/common/shared/color-picker/index.js +1 -0
- package/registry/components/common/shared/date.js +1 -0
- package/registry/components/common/shared/qrcode/qrcodegen.js +1 -0
- package/registry/components/common/shared/qrcode/utils.js +1 -0
- package/registry/components/common/src/control.js +1 -0
- package/registry/components/common/src/flatTool.js +1 -0
- package/registry/components/common/src/index.js +1 -0
- package/registry/components/common/src/instantiationDecorator.js +1 -0
- package/registry/components/common/src/superComponent.js +1 -0
- package/registry/components/common/style/card.wxss +245 -0
- package/registry/components/common/style/index.wxss +3 -0
- package/registry/components/common/style/tokens.wxss +233 -0
- package/registry/components/common/template/badge.wxml +1 -0
- package/registry/components/common/template/button.wxml +1 -0
- package/registry/components/common/template/icon.wxml +1 -0
- package/registry/components/common/template/image.wxml +1 -0
- package/registry/components/common/tslib.js +2 -0
- package/registry/components/common/typography/ellipsis.wxml +1 -0
- package/registry/components/common/typography/typography.wxs +49 -0
- package/registry/components/common/utils.js +1 -0
- package/registry/components/common/utils.wxs +149 -0
- package/registry/components/common/validator.js +1 -0
- package/registry/components/common/wechat.js +1 -0
- package/registry/components/consumption-card/consumption-card.js +23 -0
- package/registry/components/consumption-card/consumption-card.json +1 -0
- package/registry/components/consumption-card/consumption-card.wxml +16 -0
- package/registry/components/consumption-card/consumption-card.wxss +36 -0
- package/registry/components/consumption-card/index.js +2 -0
- package/registry/components/consumption-card/props.js +14 -0
- package/registry/components/contact-list/contact-list.js +60 -0
- package/registry/components/contact-list/contact-list.json +1 -0
- package/registry/components/contact-list/contact-list.wxml +24 -0
- package/registry/components/contact-list/contact-list.wxss +73 -0
- package/registry/components/contact-list/index.js +2 -0
- package/registry/components/contact-list/props.js +13 -0
- package/registry/components/description-tile/description-tile.js +22 -0
- package/registry/components/description-tile/description-tile.json +1 -0
- package/registry/components/description-tile/description-tile.wxml +11 -0
- package/registry/components/description-tile/description-tile.wxss +21 -0
- package/registry/components/description-tile/index.js +2 -0
- package/registry/components/description-tile/props.js +10 -0
- package/registry/components/details-card/details-card.js +38 -0
- package/registry/components/details-card/details-card.json +1 -0
- package/registry/components/details-card/details-card.wxml +37 -0
- package/registry/components/details-card/details-card.wxss +119 -0
- package/registry/components/details-card/index.js +2 -0
- package/registry/components/details-card/props.js +22 -0
- package/registry/components/dialog/dialog.js +1 -0
- package/registry/components/dialog/dialog.json +1 -0
- package/registry/components/dialog/dialog.wxml +1 -0
- package/registry/components/dialog/dialog.wxs +13 -0
- package/registry/components/dialog/dialog.wxss +123 -0
- package/registry/components/dialog/index.js +1 -0
- package/registry/components/dialog/props.js +1 -0
- package/registry/components/divider/divider.js +1 -0
- package/registry/components/divider/divider.json +1 -0
- package/registry/components/divider/divider.wxml +1 -0
- package/registry/components/divider/divider.wxss +69 -0
- package/registry/components/divider/index.js +1 -0
- package/registry/components/divider/props.js +1 -0
- package/registry/components/drawer/drawer.js +1 -0
- package/registry/components/drawer/drawer.json +1 -0
- package/registry/components/drawer/drawer.wxml +1 -0
- package/registry/components/drawer/drawer.wxss +75 -0
- package/registry/components/drawer/index.js +1 -0
- package/registry/components/drawer/props.js +1 -0
- package/registry/components/dropdown-item/dropdown-item.js +1 -0
- package/registry/components/dropdown-item/dropdown-item.json +1 -0
- package/registry/components/dropdown-item/dropdown-item.wxml +1 -0
- package/registry/components/dropdown-item/dropdown-item.wxss +116 -0
- package/registry/components/dropdown-item/index.js +1 -0
- package/registry/components/dropdown-item/index.wxs +9 -0
- package/registry/components/dropdown-item/props.js +1 -0
- package/registry/components/dropdown-menu/dropdown-menu.js +1 -0
- package/registry/components/dropdown-menu/dropdown-menu.json +1 -0
- package/registry/components/dropdown-menu/dropdown-menu.wxml +1 -0
- package/registry/components/dropdown-menu/dropdown-menu.wxss +72 -0
- package/registry/components/dropdown-menu/index.js +1 -0
- package/registry/components/dropdown-menu/props.js +1 -0
- package/registry/components/empty/empty.js +1 -0
- package/registry/components/empty/empty.json +1 -0
- package/registry/components/empty/empty.wxml +1 -0
- package/registry/components/empty/empty.wxss +28 -0
- package/registry/components/empty/index.js +1 -0
- package/registry/components/empty/props.js +1 -0
- package/registry/components/entry-card/entry-card.js +23 -0
- package/registry/components/entry-card/entry-card.json +1 -0
- package/registry/components/entry-card/entry-card.wxml +14 -0
- package/registry/components/entry-card/entry-card.wxss +30 -0
- package/registry/components/entry-card/index.js +2 -0
- package/registry/components/entry-card/props.js +11 -0
- package/registry/components/file-drop/file-drop.js +23 -0
- package/registry/components/file-drop/file-drop.json +1 -0
- package/registry/components/file-drop/file-drop.wxml +13 -0
- package/registry/components/file-drop/file-drop.wxss +35 -0
- package/registry/components/file-drop/index.js +2 -0
- package/registry/components/file-drop/props.js +9 -0
- package/registry/components/grid/grid.js +1 -0
- package/registry/components/grid/grid.json +1 -0
- package/registry/components/grid/grid.wxml +1 -0
- package/registry/components/grid/grid.wxss +18 -0
- package/registry/components/grid/index.js +1 -0
- package/registry/components/grid/props.js +1 -0
- package/registry/components/grid-item/grid-item.js +1 -0
- package/registry/components/grid-item/grid-item.json +1 -0
- package/registry/components/grid-item/grid-item.wxml +1 -0
- package/registry/components/grid-item/grid-item.wxss +130 -0
- package/registry/components/grid-item/index.js +1 -0
- package/registry/components/grid-item/props.js +1 -0
- package/registry/components/guide/content.wxml +1 -0
- package/registry/components/guide/guide.js +1 -0
- package/registry/components/guide/guide.json +1 -0
- package/registry/components/guide/guide.wxml +1 -0
- package/registry/components/guide/guide.wxss +79 -0
- package/registry/components/guide/index.js +1 -0
- package/registry/components/guide/props.js +1 -0
- package/registry/components/icon/icon.js +1 -0
- package/registry/components/icon/icon.json +1 -0
- package/registry/components/icon/icon.wxml +1 -0
- package/registry/components/icon/icon.wxss +2361 -0
- package/registry/components/icon/index.js +1 -0
- package/registry/components/icon/props.js +1 -0
- package/registry/components/image/image.js +1 -0
- package/registry/components/image/image.json +1 -0
- package/registry/components/image/image.wxml +1 -0
- package/registry/components/image/image.wxss +55 -0
- package/registry/components/image/index.js +1 -0
- package/registry/components/image/props.js +1 -0
- package/registry/components/image-viewer/image-viewer.js +1 -0
- package/registry/components/image-viewer/image-viewer.json +1 -0
- package/registry/components/image-viewer/image-viewer.wxml +1 -0
- package/registry/components/image-viewer/image-viewer.wxs +7 -0
- package/registry/components/image-viewer/image-viewer.wxss +90 -0
- package/registry/components/image-viewer/index.js +1 -0
- package/registry/components/image-viewer/props.js +1 -0
- package/registry/components/info-card/index.js +2 -0
- package/registry/components/info-card/info-card.js +22 -0
- package/registry/components/info-card/info-card.json +1 -0
- package/registry/components/info-card/info-card.wxml +14 -0
- package/registry/components/info-card/info-card.wxss +56 -0
- package/registry/components/info-card/props.js +11 -0
- package/registry/components/input/index.js +1 -0
- package/registry/components/input/input.js +1 -0
- package/registry/components/input/input.json +1 -0
- package/registry/components/input/input.wxml +1 -0
- package/registry/components/input/input.wxs +16 -0
- package/registry/components/input/input.wxss +313 -0
- package/registry/components/input/props.js +1 -0
- package/registry/components/insight-card/index.js +2 -0
- package/registry/components/insight-card/insight-card.js +19 -0
- package/registry/components/insight-card/insight-card.json +1 -0
- package/registry/components/insight-card/insight-card.wxml +17 -0
- package/registry/components/insight-card/insight-card.wxss +35 -0
- package/registry/components/insight-card/props.js +12 -0
- package/registry/components/link/index.js +1 -0
- package/registry/components/link/link.js +1 -0
- package/registry/components/link/link.json +1 -0
- package/registry/components/link/link.wxml +1 -0
- package/registry/components/link/link.wxss +155 -0
- package/registry/components/link/props.js +1 -0
- package/registry/components/list-item/index.js +2 -0
- package/registry/components/list-item/list-item.js +39 -0
- package/registry/components/list-item/list-item.json +1 -0
- package/registry/components/list-item/list-item.wxml +22 -0
- package/registry/components/list-item/list-item.wxss +110 -0
- package/registry/components/list-item/props.js +22 -0
- package/registry/components/loading/index.js +1 -0
- package/registry/components/loading/loading.js +1 -0
- package/registry/components/loading/loading.json +1 -0
- package/registry/components/loading/loading.wxml +1 -0
- package/registry/components/loading/loading.wxss +281 -0
- package/registry/components/loading/props.js +1 -0
- package/registry/components/main-card/index.js +2 -0
- package/registry/components/main-card/main-card.js +23 -0
- package/registry/components/main-card/main-card.json +1 -0
- package/registry/components/main-card/main-card.wxml +37 -0
- package/registry/components/main-card/main-card.wxss +63 -0
- package/registry/components/main-card/props.js +24 -0
- package/registry/components/media-card/index.js +2 -0
- package/registry/components/media-card/media-card.js +23 -0
- package/registry/components/media-card/media-card.json +1 -0
- package/registry/components/media-card/media-card.wxml +11 -0
- package/registry/components/media-card/media-card.wxss +51 -0
- package/registry/components/media-card/props.js +8 -0
- package/registry/components/message/index.js +1 -0
- package/registry/components/message/message.interface.js +1 -0
- package/registry/components/message/message.js +1 -0
- package/registry/components/message/message.json +1 -0
- package/registry/components/message/message.wxml +1 -0
- package/registry/components/message/message.wxss +2 -0
- package/registry/components/message/props.js +1 -0
- package/registry/components/message-item/index.js +1 -0
- package/registry/components/message-item/message-item.js +1 -0
- package/registry/components/message-item/message-item.json +1 -0
- package/registry/components/message-item/message-item.wxml +1 -0
- package/registry/components/message-item/message-item.wxs +31 -0
- package/registry/components/message-item/message-item.wxss +141 -0
- package/registry/components/navbar/index.js +1 -0
- package/registry/components/navbar/navbar.js +1 -0
- package/registry/components/navbar/navbar.json +1 -0
- package/registry/components/navbar/navbar.wxml +1 -0
- package/registry/components/navbar/navbar.wxss +126 -0
- package/registry/components/navbar/props.js +1 -0
- package/registry/components/notice-bar/index.js +1 -0
- package/registry/components/notice-bar/notice-bar.js +1 -0
- package/registry/components/notice-bar/notice-bar.json +1 -0
- package/registry/components/notice-bar/notice-bar.wxml +1 -0
- package/registry/components/notice-bar/notice-bar.wxss +95 -0
- package/registry/components/notice-bar/props.js +1 -0
- package/registry/components/notification-item/index.js +2 -0
- package/registry/components/notification-item/notification-item.js +35 -0
- package/registry/components/notification-item/notification-item.json +1 -0
- package/registry/components/notification-item/notification-item.wxml +14 -0
- package/registry/components/notification-item/notification-item.wxss +47 -0
- package/registry/components/notification-item/props.js +10 -0
- package/registry/components/offer-card/index.js +2 -0
- package/registry/components/offer-card/offer-card.js +22 -0
- package/registry/components/offer-card/offer-card.json +1 -0
- package/registry/components/offer-card/offer-card.wxml +33 -0
- package/registry/components/offer-card/offer-card.wxss +37 -0
- package/registry/components/offer-card/props.js +21 -0
- package/registry/components/om-card/index.js +2 -0
- package/registry/components/om-card/om-card.js +40 -0
- package/registry/components/om-card/om-card.json +1 -0
- package/registry/components/om-card/om-card.wxml +35 -0
- package/registry/components/om-card/om-card.wxss +90 -0
- package/registry/components/om-card/props.js +14 -0
- package/registry/components/overlay/index.js +1 -0
- package/registry/components/overlay/overlay.js +1 -0
- package/registry/components/overlay/overlay.json +1 -0
- package/registry/components/overlay/overlay.wxml +1 -0
- package/registry/components/overlay/overlay.wxss +22 -0
- package/registry/components/overlay/props.js +1 -0
- package/registry/components/paragraph/index.js +1 -0
- package/registry/components/paragraph/paragraph.js +1 -0
- package/registry/components/paragraph/paragraph.json +1 -0
- package/registry/components/paragraph/paragraph.wxml +1 -0
- package/registry/components/paragraph/paragraph.wxss +151 -0
- package/registry/components/paragraph/props.js +1 -0
- package/registry/components/picker/index.js +1 -0
- package/registry/components/picker/picker.js +1 -0
- package/registry/components/picker/picker.json +1 -0
- package/registry/components/picker/picker.wxml +1 -0
- package/registry/components/picker/picker.wxs +9 -0
- package/registry/components/picker/picker.wxss +84 -0
- package/registry/components/picker/props.js +1 -0
- package/registry/components/picker/template.wxml +1 -0
- package/registry/components/picker-item/index.js +1 -0
- package/registry/components/picker-item/picker-item.js +1 -0
- package/registry/components/picker-item/picker-item.json +1 -0
- package/registry/components/picker-item/picker-item.wxml +1 -0
- package/registry/components/picker-item/picker-item.wxss +41 -0
- package/registry/components/picker-item/props.js +1 -0
- package/registry/components/popover/index.js +1 -0
- package/registry/components/popover/popover.js +1 -0
- package/registry/components/popover/popover.json +1 -0
- package/registry/components/popover/popover.wxml +1 -0
- package/registry/components/popover/popover.wxss +336 -0
- package/registry/components/popover/props.js +1 -0
- package/registry/components/popup/index.js +1 -0
- package/registry/components/popup/popup.js +1 -0
- package/registry/components/popup/popup.json +1 -0
- package/registry/components/popup/popup.wxml +1 -0
- package/registry/components/popup/popup.wxs +21 -0
- package/registry/components/popup/popup.wxss +96 -0
- package/registry/components/popup/props.js +1 -0
- package/registry/components/post-item/index.js +2 -0
- package/registry/components/post-item/post-item.js +22 -0
- package/registry/components/post-item/post-item.json +1 -0
- package/registry/components/post-item/post-item.wxml +5 -0
- package/registry/components/post-item/post-item.wxss +37 -0
- package/registry/components/post-item/props.js +7 -0
- package/registry/components/progress/index.js +1 -0
- package/registry/components/progress/progress.js +1 -0
- package/registry/components/progress/progress.json +1 -0
- package/registry/components/progress/progress.wxml +1 -0
- package/registry/components/progress/progress.wxs +80 -0
- package/registry/components/progress/progress.wxss +161 -0
- package/registry/components/progress/props.js +1 -0
- package/registry/components/progress/utils.js +1 -0
- package/registry/components/purchase-card/index.js +2 -0
- package/registry/components/purchase-card/props.js +13 -0
- package/registry/components/purchase-card/purchase-card.js +40 -0
- package/registry/components/purchase-card/purchase-card.json +1 -0
- package/registry/components/purchase-card/purchase-card.wxml +22 -0
- package/registry/components/purchase-card/purchase-card.wxss +19 -0
- package/registry/components/qrcode/components/qrcode-canvas/props.js +1 -0
- package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.js +1 -0
- package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.json +1 -0
- package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.wxml +1 -0
- package/registry/components/qrcode/components/qrcode-canvas/qrcode-canvas.wxss +10 -0
- package/registry/components/qrcode/components/qrcode-status/props.js +1 -0
- package/registry/components/qrcode/components/qrcode-status/qrcode-status.js +1 -0
- package/registry/components/qrcode/components/qrcode-status/qrcode-status.json +1 -0
- package/registry/components/qrcode/components/qrcode-status/qrcode-status.wxml +1 -0
- package/registry/components/qrcode/components/qrcode-status/qrcode-status.wxss +32 -0
- package/registry/components/qrcode/hooks/useQRCode.js +1 -0
- package/registry/components/qrcode/index.js +1 -0
- package/registry/components/qrcode/props.js +1 -0
- package/registry/components/qrcode/qrcode.js +1 -0
- package/registry/components/qrcode/qrcode.json +1 -0
- package/registry/components/qrcode/qrcode.wxml +1 -0
- package/registry/components/qrcode/qrcode.wxss +36 -0
- package/registry/components/quick-action/index.js +2 -0
- package/registry/components/quick-action/props.js +10 -0
- package/registry/components/quick-action/quick-action.js +22 -0
- package/registry/components/quick-action/quick-action.json +1 -0
- package/registry/components/quick-action/quick-action.wxml +15 -0
- package/registry/components/quick-action/quick-action.wxss +80 -0
- package/registry/components/radio/index.js +1 -0
- package/registry/components/radio/props.js +1 -0
- package/registry/components/radio/radio.js +1 -0
- package/registry/components/radio/radio.json +1 -0
- package/registry/components/radio/radio.wxml +1 -0
- package/registry/components/radio/radio.wxss +219 -0
- package/registry/components/radio-group/index.js +1 -0
- package/registry/components/radio-group/props.js +1 -0
- package/registry/components/radio-group/radio-group.js +1 -0
- package/registry/components/radio-group/radio-group.json +1 -0
- package/registry/components/radio-group/radio-group.wxml +1 -0
- package/registry/components/radio-group/radio-group.wxss +7 -0
- package/registry/components/rate/index.js +1 -0
- package/registry/components/rate/props.js +1 -0
- package/registry/components/rate/rate.js +1 -0
- package/registry/components/rate/rate.json +1 -0
- package/registry/components/rate/rate.wxml +1 -0
- package/registry/components/rate/rate.wxs +65 -0
- package/registry/components/rate/rate.wxss +99 -0
- package/registry/components/rating-card/index.js +2 -0
- package/registry/components/rating-card/props.js +12 -0
- package/registry/components/rating-card/rating-card.js +42 -0
- package/registry/components/rating-card/rating-card.json +1 -0
- package/registry/components/rating-card/rating-card.wxml +24 -0
- package/registry/components/rating-card/rating-card.wxss +49 -0
- package/registry/components/recap-card/index.js +2 -0
- package/registry/components/recap-card/props.js +21 -0
- package/registry/components/recap-card/recap-card.js +38 -0
- package/registry/components/recap-card/recap-card.json +1 -0
- package/registry/components/recap-card/recap-card.wxml +43 -0
- package/registry/components/recap-card/recap-card.wxss +60 -0
- package/registry/components/result/illustrations.js +2 -0
- package/registry/components/result/index.js +1 -0
- package/registry/components/result/props.js +1 -0
- package/registry/components/result/result.js +1 -0
- package/registry/components/result/result.json +1 -0
- package/registry/components/result/result.wxml +1 -0
- package/registry/components/result/result.wxss +97 -0
- package/registry/components/review-item/index.js +2 -0
- package/registry/components/review-item/props.js +13 -0
- package/registry/components/review-item/review-item.js +38 -0
- package/registry/components/review-item/review-item.json +1 -0
- package/registry/components/review-item/review-item.wxml +19 -0
- package/registry/components/review-item/review-item.wxss +65 -0
- package/registry/components/search/index.js +1 -0
- package/registry/components/search/props.js +1 -0
- package/registry/components/search/search.js +1 -0
- package/registry/components/search/search.json +1 -0
- package/registry/components/search/search.wxml +1 -0
- package/registry/components/search/search.wxs +6 -0
- package/registry/components/search/search.wxss +100 -0
- package/registry/components/section-title/index.js +2 -0
- package/registry/components/section-title/props.js +6 -0
- package/registry/components/section-title/section-title.js +22 -0
- package/registry/components/section-title/section-title.json +1 -0
- package/registry/components/section-title/section-title.wxml +6 -0
- package/registry/components/section-title/section-title.wxss +19 -0
- package/registry/components/segmented/index.js +1 -0
- package/registry/components/segmented/props.js +1 -0
- package/registry/components/segmented/segmented.js +1 -0
- package/registry/components/segmented/segmented.json +1 -0
- package/registry/components/segmented/segmented.wxml +1 -0
- package/registry/components/segmented/segmented.wxss +113 -0
- package/registry/components/selection-card/index.js +2 -0
- package/registry/components/selection-card/props.js +11 -0
- package/registry/components/selection-card/selection-card.js +25 -0
- package/registry/components/selection-card/selection-card.json +1 -0
- package/registry/components/selection-card/selection-card.wxml +7 -0
- package/registry/components/selection-card/selection-card.wxss +27 -0
- package/registry/components/shortcut-chip/index.js +2 -0
- package/registry/components/shortcut-chip/props.js +7 -0
- package/registry/components/shortcut-chip/shortcut-chip.js +24 -0
- package/registry/components/shortcut-chip/shortcut-chip.json +1 -0
- package/registry/components/shortcut-chip/shortcut-chip.wxml +4 -0
- package/registry/components/shortcut-chip/shortcut-chip.wxss +29 -0
- package/registry/components/skeleton/index.js +1 -0
- package/registry/components/skeleton/props.js +1 -0
- package/registry/components/skeleton/skeleton.js +1 -0
- package/registry/components/skeleton/skeleton.json +1 -0
- package/registry/components/skeleton/skeleton.wxml +1 -0
- package/registry/components/skeleton/skeleton.wxss +92 -0
- package/registry/components/slider/index.js +1 -0
- package/registry/components/slider/props.js +1 -0
- package/registry/components/slider/slider.js +1 -0
- package/registry/components/slider/slider.json +1 -0
- package/registry/components/slider/slider.wxml +1 -0
- package/registry/components/slider/slider.wxs +10 -0
- package/registry/components/slider/slider.wxss +287 -0
- package/registry/components/slider/tool.js +1 -0
- package/registry/components/step-item/index.js +1 -0
- package/registry/components/step-item/props.js +1 -0
- package/registry/components/step-item/step-item.js +1 -0
- package/registry/components/step-item/step-item.json +1 -0
- package/registry/components/step-item/step-item.wxml +1 -0
- package/registry/components/step-item/step-item.wxs +7 -0
- package/registry/components/step-item/step-item.wxss +226 -0
- package/registry/components/stepper/index.js +1 -0
- package/registry/components/stepper/props.js +1 -0
- package/registry/components/stepper/stepper.js +1 -0
- package/registry/components/stepper/stepper.json +1 -0
- package/registry/components/stepper/stepper.wxml +1 -0
- package/registry/components/stepper/stepper.wxss +130 -0
- package/registry/components/steps/index.js +1 -0
- package/registry/components/steps/props.js +1 -0
- package/registry/components/steps/steps.js +1 -0
- package/registry/components/steps/steps.json +1 -0
- package/registry/components/steps/steps.wxml +1 -0
- package/registry/components/steps/steps.wxss +27 -0
- package/registry/components/sticky/index.js +1 -0
- package/registry/components/sticky/props.js +1 -0
- package/registry/components/sticky/sticky.js +1 -0
- package/registry/components/sticky/sticky.json +1 -0
- package/registry/components/sticky/sticky.wxml +1 -0
- package/registry/components/sticky/sticky.wxss +6 -0
- package/registry/components/story-item/index.js +2 -0
- package/registry/components/story-item/props.js +8 -0
- package/registry/components/story-item/story-item.js +22 -0
- package/registry/components/story-item/story-item.json +1 -0
- package/registry/components/story-item/story-item.wxml +9 -0
- package/registry/components/story-item/story-item.wxss +43 -0
- package/registry/components/swipe-cell/index.js +1 -0
- package/registry/components/swipe-cell/props.js +1 -0
- package/registry/components/swipe-cell/swipe-cell.js +1 -0
- package/registry/components/swipe-cell/swipe-cell.json +1 -0
- package/registry/components/swipe-cell/swipe-cell.wxml +1 -0
- package/registry/components/swipe-cell/swipe-cell.wxs +185 -0
- package/registry/components/swipe-cell/swipe-cell.wxss +40 -0
- package/registry/components/swiper/index.js +1 -0
- package/registry/components/swiper/index.wxs +25 -0
- package/registry/components/swiper/props.js +1 -0
- package/registry/components/swiper/swiper.js +1 -0
- package/registry/components/swiper/swiper.json +1 -0
- package/registry/components/swiper/swiper.wxml +1 -0
- package/registry/components/swiper/swiper.wxss +28 -0
- package/registry/components/swiper-nav/index.js +1 -0
- package/registry/components/swiper-nav/props.js +1 -0
- package/registry/components/swiper-nav/swiper-nav.js +1 -0
- package/registry/components/swiper-nav/swiper-nav.json +1 -0
- package/registry/components/swiper-nav/swiper-nav.wxml +1 -0
- package/registry/components/swiper-nav/swiper-nav.wxss +155 -0
- package/registry/components/switch/index.js +1 -0
- package/registry/components/switch/props.js +1 -0
- package/registry/components/switch/switch.js +1 -0
- package/registry/components/switch/switch.json +1 -0
- package/registry/components/switch/switch.wxml +1 -0
- package/registry/components/switch/switch.wxss +169 -0
- package/registry/components/tab-bar/index.js +1 -0
- package/registry/components/tab-bar/props.js +1 -0
- package/registry/components/tab-bar/tab-bar.js +1 -0
- package/registry/components/tab-bar/tab-bar.json +1 -0
- package/registry/components/tab-bar/tab-bar.wxml +1 -0
- package/registry/components/tab-bar/tab-bar.wxss +50 -0
- package/registry/components/tab-bar-item/index.js +1 -0
- package/registry/components/tab-bar-item/props.js +1 -0
- package/registry/components/tab-bar-item/tab-bar-item.js +1 -0
- package/registry/components/tab-bar-item/tab-bar-item.json +1 -0
- package/registry/components/tab-bar-item/tab-bar-item.wxml +1 -0
- package/registry/components/tab-bar-item/tab-bar-item.wxss +177 -0
- package/registry/components/tab-panel/index.js +1 -0
- package/registry/components/tab-panel/props.js +1 -0
- package/registry/components/tab-panel/tab-panel.js +1 -0
- package/registry/components/tab-panel/tab-panel.json +1 -0
- package/registry/components/tab-panel/tab-panel.wxml +1 -0
- package/registry/components/tab-panel/tab-panel.wxss +20 -0
- package/registry/components/tabs/index.js +1 -0
- package/registry/components/tabs/props.js +1 -0
- package/registry/components/tabs/tabs.js +1 -0
- package/registry/components/tabs/tabs.json +1 -0
- package/registry/components/tabs/tabs.wxml +1 -0
- package/registry/components/tabs/tabs.wxs +30 -0
- package/registry/components/tabs/tabs.wxss +233 -0
- package/registry/components/tag/index.js +1 -0
- package/registry/components/tag/props.js +1 -0
- package/registry/components/tag/tag.js +1 -0
- package/registry/components/tag/tag.json +1 -0
- package/registry/components/tag/tag.wxml +1 -0
- package/registry/components/tag/tag.wxss +268 -0
- package/registry/components/text/index.js +1 -0
- package/registry/components/text/props.js +1 -0
- package/registry/components/text/text.js +1 -0
- package/registry/components/text/text.json +1 -0
- package/registry/components/text/text.wxml +1 -0
- package/registry/components/text/text.wxss +151 -0
- package/registry/components/textarea/index.js +1 -0
- package/registry/components/textarea/props.js +1 -0
- package/registry/components/textarea/textarea.js +1 -0
- package/registry/components/textarea/textarea.json +1 -0
- package/registry/components/textarea/textarea.wxml +1 -0
- package/registry/components/textarea/textarea.wxs +15 -0
- package/registry/components/textarea/textarea.wxss +151 -0
- package/registry/components/ticket/index.js +2 -0
- package/registry/components/ticket/props.js +19 -0
- package/registry/components/ticket/ticket.js +19 -0
- package/registry/components/ticket/ticket.json +1 -0
- package/registry/components/ticket/ticket.wxml +31 -0
- package/registry/components/ticket/ticket.wxss +57 -0
- package/registry/components/title/index.js +1 -0
- package/registry/components/title/props.js +1 -0
- package/registry/components/title/title.js +1 -0
- package/registry/components/title/title.json +1 -0
- package/registry/components/title/title.wxml +1 -0
- package/registry/components/title/title.wxss +151 -0
- package/registry/components/toast/index.js +1 -0
- package/registry/components/toast/props.js +1 -0
- package/registry/components/toast/toast.js +1 -0
- package/registry/components/toast/toast.json +1 -0
- package/registry/components/toast/toast.wxml +1 -0
- package/registry/components/toast/toast.wxss +87 -0
- package/registry/components/toggle-card/index.js +2 -0
- package/registry/components/toggle-card/props.js +7 -0
- package/registry/components/toggle-card/toggle-card.js +37 -0
- package/registry/components/toggle-card/toggle-card.json +1 -0
- package/registry/components/toggle-card/toggle-card.wxml +12 -0
- package/registry/components/toggle-card/toggle-card.wxss +11 -0
- package/registry/components/top-item/index.js +2 -0
- package/registry/components/top-item/props.js +10 -0
- package/registry/components/top-item/top-item.js +22 -0
- package/registry/components/top-item/top-item.json +1 -0
- package/registry/components/top-item/top-item.wxml +8 -0
- package/registry/components/top-item/top-item.wxss +37 -0
- package/registry/components/transaction-card/index.js +2 -0
- package/registry/components/transaction-card/props.js +25 -0
- package/registry/components/transaction-card/transaction-card.js +43 -0
- package/registry/components/transaction-card/transaction-card.json +1 -0
- package/registry/components/transaction-card/transaction-card.wxml +44 -0
- package/registry/components/transaction-card/transaction-card.wxss +45 -0
- package/registry/components/transfer-item/index.js +2 -0
- package/registry/components/transfer-item/props.js +18 -0
- package/registry/components/transfer-item/transfer-item.js +40 -0
- package/registry/components/transfer-item/transfer-item.json +1 -0
- package/registry/components/transfer-item/transfer-item.wxml +34 -0
- package/registry/components/transfer-item/transfer-item.wxss +66 -0
- package/registry/components/upload/drag.wxs +242 -0
- package/registry/components/upload/index.js +1 -0
- package/registry/components/upload/props.js +1 -0
- package/registry/components/upload/upload.js +1 -0
- package/registry/components/upload/upload.json +1 -0
- package/registry/components/upload/upload.wxml +1 -0
- package/registry/components/upload/upload.wxs +129 -0
- package/registry/components/upload/upload.wxss +354 -0
- package/registry/components/wheel-select/index.js +2 -0
- package/registry/components/wheel-select/props.js +8 -0
- package/registry/components/wheel-select/wheel-select.js +38 -0
- package/registry/components/wheel-select/wheel-select.json +1 -0
- package/registry/components/wheel-select/wheel-select.wxml +9 -0
- package/registry/components/wheel-select/wheel-select.wxss +22 -0
- package/registry/registry.json +1033 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-stepper {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
color: var(--o-stepper-input-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.o-stepper__input {
|
|
10
|
+
margin: 0 calc(var(--o-spacer,16rpx)/ 2);
|
|
11
|
+
text-align: center;
|
|
12
|
+
vertical-align: top;
|
|
13
|
+
height: inherit;
|
|
14
|
+
min-height: inherit;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.o-stepper__minus,
|
|
18
|
+
.o-stepper__plus {
|
|
19
|
+
padding: calc(var(--o-spacer,16rpx)/ 2);
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.o-stepper__input,
|
|
24
|
+
.o-stepper__minus-icon,
|
|
25
|
+
.o-stepper__plus-icon {
|
|
26
|
+
color: inherit;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.o-stepper__input--filled,
|
|
30
|
+
.o-stepper__input--normal,
|
|
31
|
+
.o-stepper__input--outline {
|
|
32
|
+
height: inherit;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.o-stepper--small {
|
|
37
|
+
height: 40rpx;
|
|
38
|
+
font-size: var(--o-font-size-xs,var(--o-font-size,20rpx));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.o-stepper--medium {
|
|
42
|
+
height: 48rpx;
|
|
43
|
+
font-size: var(--o-font-size-s,24rpx);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.o-stepper--large {
|
|
47
|
+
height: 56rpx;
|
|
48
|
+
font-size: var(--o-font-size-m,32rpx);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.o-stepper__input--small {
|
|
52
|
+
width: 68rpx;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.o-stepper__input--medium {
|
|
56
|
+
height: 48rpx;
|
|
57
|
+
width: 76rpx;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.o-stepper__input--large {
|
|
61
|
+
width: 90rpx;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.o-stepper__icon--small {
|
|
65
|
+
width: 40rpx;
|
|
66
|
+
height: 40rpx;
|
|
67
|
+
font-size: 24rpx;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.o-stepper__icon--medium {
|
|
71
|
+
width: 48rpx;
|
|
72
|
+
height: 48rpx;
|
|
73
|
+
font-size: 32rpx;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.o-stepper__icon--large {
|
|
77
|
+
width: 56rpx;
|
|
78
|
+
height: 56rpx;
|
|
79
|
+
font-size: 40rpx;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.o-stepper__minus--outline,
|
|
83
|
+
.o-stepper__plus--outline {
|
|
84
|
+
border: 2rpx solid var(--o-stepper-border-color,var(--o-component-border,var(--o-gray-color-4,#dddddd)));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.o-stepper__input--outline {
|
|
88
|
+
border: none;
|
|
89
|
+
border-top: 2rpx solid var(--o-stepper-border-color,var(--o-component-border,var(--o-gray-color-4,#dddddd)));
|
|
90
|
+
border-bottom: 2rpx solid var(--o-stepper-border-color,var(--o-component-border,var(--o-gray-color-4,#dddddd)));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.o-stepper__minus--filled,
|
|
94
|
+
.o-stepper__minus--outline {
|
|
95
|
+
border-radius: 0;
|
|
96
|
+
border-top-left-radius: var(--o-stepper-border-radius,var(--o-radius-small,6rpx));
|
|
97
|
+
border-bottom-left-radius: var(--o-stepper-border-radius,var(--o-radius-small,6rpx));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.o-stepper__plus--filled,
|
|
101
|
+
.o-stepper__plus--outline {
|
|
102
|
+
border-radius: 0;
|
|
103
|
+
border-top-right-radius: var(--o-stepper-border-radius,var(--o-radius-small,6rpx));
|
|
104
|
+
border-bottom-right-radius: var(--o-stepper-border-radius,var(--o-radius-small,6rpx));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.o-stepper__minus--filled,
|
|
108
|
+
.o-stepper__plus--filled {
|
|
109
|
+
background-color: var(--o-bg-color-secondarycontainer,var(--o-gray-color-1,#eeeeee));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.o-stepper__input--filled {
|
|
113
|
+
background-color: var(--o-bg-color-secondarycontainer,var(--o-gray-color-1,#eeeeee));
|
|
114
|
+
margin: 0 calc(var(--o-spacer,16rpx)/ 2);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.o-stepper__input--filled .o-stepper__input {
|
|
118
|
+
margin: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.o-stepper--normal-disabled {
|
|
122
|
+
color: var(--o-stepper-input-disabled-color,var(--o-text-color-disabled,var(--o-font-gray-4,rgba(0,0,0,.26))));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.o-stepper--filled-disabled,
|
|
126
|
+
.o-stepper--outline-disabled {
|
|
127
|
+
color: var(--o-stepper-input-disabled-color,var(--o-text-color-disabled,var(--o-font-gray-4,rgba(0,0,0,.26))));
|
|
128
|
+
background-color: var(--o-stepper-input-disabled-bg,var(--o-bg-color-component-disabled,var(--o-gray-color-2,#eee)));
|
|
129
|
+
}
|
|
130
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./steps";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={current:{type:null,value:null},defaultCurrent:{type:null},currentStatus:{type:String,value:"process"},layout:{type:String,value:"horizontal"},readonly:{type:null,value:void 0},sequence:{type:String,value:"positive"},theme:{type:String,value:"default"}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{wxComponent,SuperComponent}from"../common/src/index";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-steps`;let Steps=class extends SuperComponent{constructor(){super(...arguments),this.relations={"../step-item/step-item":{type:"descendant",linked(e){this.updateChildren();const{readonly:t}=this.data;e.setData({readonly:t})},unlinked(){this.updateLastChid()}}},this.externalClasses=[`${prefix}-class`],this.properties=props,this.controlledProps=[{key:"current",event:"change"}],this.data={prefix:prefix,classPrefix:name},this.observers={"current, theme, sequence"(){this.updateChildren()}},this.methods={updateChildren(){const e=this.$children;e.forEach((t,s)=>{t.updateStatus(Object.assign({index:s,items:e},this.data))})},updateLastChid(){const e=this.$children;e.forEach((t,s)=>t.setData({isLastChild:s===e.length-1}))},handleClick(e){if(!this.data.readonly){const t=this.data.current;this._trigger("change",{previous:t,current:e})}}}}};Steps=__decorate([wxComponent()],Steps);export default Steps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-step":"../step-item/step-item"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="../common/utils.wxs" module="_"/><view style="{{_._style([style, customStyle])}}" class="{{_.cls(classPrefix, [layout, ['readonly', readonly], sequence])}} class {{prefix}}-class"><slot/></view>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
display: flex;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.o-step--vertical {
|
|
8
|
+
padding-right: var(--o-spacer-2,32rpx);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.o-steps {
|
|
12
|
+
display: flex;
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.o-steps--vertical {
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.o-steps--reverse {
|
|
21
|
+
flex-direction: row-reverse;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.o-steps--vertical.o-steps--reverse {
|
|
25
|
+
flex-direction: column-reverse;
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./sticky";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={container:{type:null},disabled:{type:Boolean,value:!1},offsetTop:{type:null,value:0},zIndex:{type:Number,value:99}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import props from"./props";import config from"../common/config";import pageScrollMixin from"../common/mixins/page-scroll";import{getRect}from"../common/utils";const{prefix:prefix}=config,name=`${prefix}-sticky`,ContainerClass=`.${name}`;let Sticky=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`,`${prefix}-class-content`],this.properties=props,this.behaviors=[pageScrollMixin()],this.observers={"offsetTop, disabled, container"(){this.onScroll()}},this.data={prefix:prefix,classPrefix:name,containerStyle:"",contentStyle:""},this.methods={onScroll(t){const{scrollTop:e}=t||{},{container:i,offsetTop:o,disabled:s}=this.properties;s?this.setDataAfterDiff({isFixed:!1,transform:0}):(this.scrollTop=e||this.scrollTop,"function"!=typeof i?getRect(this,ContainerClass).then(t=>{t&&(o>=t.top?(this.setDataAfterDiff({isFixed:!0,height:t.height}),this.transform=0):this.setDataAfterDiff({isFixed:!1}))}):Promise.all([getRect(this,ContainerClass),this.getContainerRect()]).then(([t,e])=>{t&&e&&(o+t.height>e.height+e.top?this.setDataAfterDiff({isFixed:!1,transform:e.height-t.height}):o>=t.top?this.setDataAfterDiff({isFixed:!0,height:t.height,transform:0}):this.setDataAfterDiff({isFixed:!1,transform:0}))}))},setDataAfterDiff(t){const{offsetTop:e}=this.properties,{containerStyle:i,contentStyle:o}=this.data,{isFixed:s,height:r,transform:n}=t;wx.nextTick(()=>{let t="",a="";if(s&&(t+=`height:${r}px;`,a+=`position:fixed;top:${e}px;left:0;right:0;`),n){const t=`translate3d(0, ${n}px, 0)`;a+=`-webkit-transform:${t};transform:${t};`}i===t&&o===a||this.setData({containerStyle:t,contentStyle:a}),this.triggerEvent("scroll",{scrollTop:this.scrollTop,isFixed:s})})},getContainerRect(){const t=this.properties.container();return new Promise(e=>t.boundingClientRect(e).exec())}}}ready(){this.onScroll()}};Sticky=__decorate([wxComponent()],Sticky);export default Sticky;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="../common/utils.wxs" module="_"/><view class="{{classPrefix}} class {{prefix}}-class" style="{{_._style(['z-index:' + zIndex, containerStyle, style, customStyle])}}"><view class="{{classPrefix}}__content {{prefix}}-class-content" style="{{_._style(['z-index:' + zIndex, contentStyle]) }}"><slot/></view></view>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// o-story-item: Story (Figma "Story Carousel"): round picture with an orange ring (gray once seen) and a label.
|
|
2
|
+
const props = {
|
|
3
|
+
image: { type: String, value: '' },
|
|
4
|
+
icon: { type: String, value: 'image' },
|
|
5
|
+
label: { type: String, value: '' },
|
|
6
|
+
seen: { type: Boolean, value: false },
|
|
7
|
+
};
|
|
8
|
+
export default props;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __decorate } from '../common/tslib';
|
|
2
|
+
import { SuperComponent, wxComponent } from '../common/src/index';
|
|
3
|
+
import config from '../common/config';
|
|
4
|
+
import props from './props';
|
|
5
|
+
|
|
6
|
+
const { prefix } = config;
|
|
7
|
+
const name = `${prefix}-story-item`;
|
|
8
|
+
|
|
9
|
+
let StoryItem = class StoryItem extends SuperComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.externalClasses = [`${prefix}-class`];
|
|
13
|
+
this.options = { multipleSlots: true };
|
|
14
|
+
this.properties = props;
|
|
15
|
+
this.data = { prefix, classPrefix: name };
|
|
16
|
+
this.methods = {
|
|
17
|
+
onTap() { this.triggerEvent('click'); },
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
StoryItem = __decorate([wxComponent()], StoryItem);
|
|
22
|
+
export default StoryItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<view class="o-story-item class {{prefix}}-class" style="{{style}} {{customStyle}}" bind:tap="onTap">
|
|
2
|
+
<view class="o-story-item__ring {{seen ? 'o-story-item__ring--seen' : ''}}">
|
|
3
|
+
<view class="o-story-item__picture">
|
|
4
|
+
<image wx:if="{{image}}" class="o-thumb__image" src="{{image}}" mode="aspectFill" />
|
|
5
|
+
<o-icon wx:else name="{{icon}}" />
|
|
6
|
+
</view>
|
|
7
|
+
</view>
|
|
8
|
+
<text class="o-story-item__label">{{label}}</text>
|
|
9
|
+
</view>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
@import '../common/style/card.wxss';
|
|
3
|
+
|
|
4
|
+
/* Story (Figma "Story Carousel"): round picture with an orange ring (gray once seen) and a label. */
|
|
5
|
+
.o-story-item {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
align-items: center;
|
|
9
|
+
width: 144rpx;
|
|
10
|
+
color: var(--o-scheme-on-surface, #1c1b1f);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.o-story-item__ring {
|
|
14
|
+
padding: 4rpx;
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
border: 4rpx solid var(--o-scheme-primary, #f16e00);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.o-story-item__ring--seen {
|
|
20
|
+
border-color: var(--o-scheme-outline-variant, #ddd);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.o-story-item__picture {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
width: 112rpx;
|
|
28
|
+
height: 112rpx;
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
background-color: var(--o-scheme-surface-variant, #eee);
|
|
32
|
+
font-size: 48rpx;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.o-story-item__label {
|
|
36
|
+
width: 100%;
|
|
37
|
+
margin-top: 8rpx;
|
|
38
|
+
text-align: center;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
font: var(--o-type-label-medium, 500 24rpx / 32rpx var(--o-font-family, Roboto, Arial));
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./swipe-cell";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={disabled:{type:Boolean},left:{type:Array},opened:{type:null,value:!1},right:{type:Array}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";import{getRect}from"../common/utils";import{getObserver}from"../common/wechat";let ARRAY=[];const{prefix:prefix}=config,name=`${prefix}-swipe-cell`,ContainerClass=`.${name}`;let SwiperCell=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`],this.options={multipleSlots:!0},this.properties=props,this.data={prefix:prefix,wrapperStyle:"",closed:!0,classPrefix:name,skipMove:!1},this.observers={"left, right"(){this.setSwipeWidth()}},this.lifetimes={attached(){ARRAY.push(this)},ready(){this.setSwipeWidth()},detached(){ARRAY=ARRAY.filter(e=>e!==this)}}}setSwipeWidth(){Promise.all([getRect(this,`${ContainerClass}__left`),getRect(this,`${ContainerClass}__right`)]).then(([e,t])=>{0!==e.width||0!==t.width||this._hasObserved||(this._hasObserved=!0,getObserver(this,`.${name}`).then(()=>{this.setSwipeWidth()})),this.setData({leftWidth:e.width,rightWidth:t.width})})}skipMove(){this.data.skipMove||this.setData({skipMove:!0})}catchMove(){this.data.skipMove&&this.setData({skipMove:!1})}open(){this.setData({opened:!0})}close(){this.setData({opened:!1})}closeOther(){ARRAY.filter(e=>e!==this).forEach(e=>e.close())}onTap(){this.close()}onActionTap(e){const{currentTarget:{dataset:{action:t}}}=e;this.triggerEvent("click",t)}};SwiperCell=__decorate([wxComponent()],SwiperCell);export default SwiperCell;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<import src="../common/template/icon.wxml"/><wxs src="./swipe-cell.wxs" module="swipe"></wxs><wxs src="../common/utils.wxs" module="_"/><view class="class {{prefix}}-class {{classPrefix}}" style="{{_._style([style, customStyle])}}" data-key="cell" bind:tap="onTap" bind:touchstart="{{disabled || swipe.startDrag}}" bind:touchmove="{{skipMove ? '' : disabled || swipe.onDrag}}" bind:touchend="{{skipMove ? '' : disabled || swipe.endDrag}}" bind:touchcancel="{{disabled || swipe.endDrag}}" opened="{{opened}}" change:opened="{{swipe.onOpenedChange}}" leftWidth="{{leftWidth}}" rightWidth="{{rightWidth}}" change:leftWidth="{{swipe.initLeftWidth}}" change:rightWidth="{{swipe.initRightWidth}}"><view id="wrapper"><view class="{{classPrefix}}__left" data-key="left"><slot name="left"/><view wx:for="{{left}}" class="{{classPrefix}}__content {{item.className}}" style="{{item.style}}" wx:key="index" data-action="{{item}}" bind:tap="onActionTap"><template wx:if="{{item.icon}}" is="icon" data="{{oClass: classPrefix + '__icon', name: item.icon, ...item.icon}}"></template><text wx:if="{{item.text}}" class="{{classPrefix}}__text">{{item.text}}</text></view></view><slot/><view class="{{classPrefix}}__right" data-key="right"><slot name="right"/><view wx:for="{{right}}" class="{{classPrefix}}__content {{item.className}}" style="{{item.style}}" wx:key="index" data-action="{{item}}" bind:tap="onActionTap"><template wx:if="{{item.icon}}" is="icon" data="{{oClass: classPrefix + '__icon', name: item.icon, ...item.icon}}"></template><text wx:if="{{item.text}}" class="{{classPrefix}}__text">{{item.text}}</text></view></view></view></view>
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
var THRESHOLD = 0.3;
|
|
2
|
+
var MIN_DISTANCE = 10;
|
|
3
|
+
var owner;
|
|
4
|
+
var state;
|
|
5
|
+
|
|
6
|
+
var getState = function (ownerInstance) {
|
|
7
|
+
owner = ownerInstance;
|
|
8
|
+
state = owner.getState();
|
|
9
|
+
state.leftWidth = state.leftWidth || 0;
|
|
10
|
+
state.rightWidth = state.rightWidth || 0;
|
|
11
|
+
state.offset = state.offset || 0;
|
|
12
|
+
state.startOffset = state.startOffset || 0;
|
|
13
|
+
state.opened = state.opened || false;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
var initRightWidth = function (newVal, oldVal, ownerInstance) {
|
|
17
|
+
getState(ownerInstance);
|
|
18
|
+
state.rightWidth = newVal;
|
|
19
|
+
initOpen(ownerInstance);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var initLeftWidth = function (newVal, oldVal, ownerInstance) {
|
|
23
|
+
getState(ownerInstance);
|
|
24
|
+
state.leftWidth = newVal;
|
|
25
|
+
initOpen(ownerInstance);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var initOpen = function (ownerInstance) {
|
|
29
|
+
getState(ownerInstance);
|
|
30
|
+
if (state.opened.constructor === 'Boolean') {
|
|
31
|
+
// opened为boolean类型,判断默认打开
|
|
32
|
+
if (state.opened && state.rightWidth > 0) {
|
|
33
|
+
swipeMove(-state.rightWidth);
|
|
34
|
+
} else if (state.opened && state.leftWidth > 0) {
|
|
35
|
+
swipeMove(state.leftWidth);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (state.opened.constructor === 'Array') {
|
|
40
|
+
// opened为array类型,判断默认打开,同时设定左右action时优先打开右边
|
|
41
|
+
if (state.opened[1] && state.rightWidth > 0) {
|
|
42
|
+
swipeMove(-state.rightWidth);
|
|
43
|
+
} else if (state.opened[0] && state.leftWidth > 0) {
|
|
44
|
+
swipeMove(state.leftWidth);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
var resetTouchStatus = function () {
|
|
50
|
+
state.direction = '';
|
|
51
|
+
state.deltaX = 0;
|
|
52
|
+
state.deltaY = 0;
|
|
53
|
+
state.offsetX = 0;
|
|
54
|
+
state.offsetY = 0;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var touchMove = function (event) {
|
|
58
|
+
var touchPoint = event.touches[0];
|
|
59
|
+
state.deltaX = touchPoint.clientX - state.startX;
|
|
60
|
+
state.deltaY = touchPoint.clientY - state.startY;
|
|
61
|
+
state.offsetX = Math.abs(state.deltaX);
|
|
62
|
+
state.offsetY = Math.abs(state.deltaY);
|
|
63
|
+
state.direction = state.direction || getDirection(state.offsetX, state.offsetY);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var getDirection = function (x, y) {
|
|
67
|
+
if (x > y && x > MIN_DISTANCE) {
|
|
68
|
+
return 'horizontal';
|
|
69
|
+
}
|
|
70
|
+
if (y > x && y > MIN_DISTANCE) {
|
|
71
|
+
return 'vertical';
|
|
72
|
+
}
|
|
73
|
+
return '';
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
var range = function (num, min, max) {
|
|
77
|
+
return Math.min(Math.max(num, min), max);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var swipeMove = function (_offset) {
|
|
81
|
+
if (_offset === undefined) _offset = 0;
|
|
82
|
+
state.offset = range(_offset, -state.rightWidth, +state.leftWidth);
|
|
83
|
+
var transform = 'translate3d(' + state.offset + 'px, 0, 0)';
|
|
84
|
+
var transition = state.dragging ? 'none' : 'transform .6s cubic-bezier(0.18, 0.89, 0.32, 1)';
|
|
85
|
+
owner.selectComponent('#wrapper').setStyle({
|
|
86
|
+
'-webkit-transform': transform,
|
|
87
|
+
'-webkit-transition': transition,
|
|
88
|
+
transform: transform,
|
|
89
|
+
transition: transition,
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var close = function () {
|
|
94
|
+
swipeMove(0);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
var onCloseChange = function (newVal, oldVal, ownerInstance) {
|
|
98
|
+
getState(ownerInstance);
|
|
99
|
+
if (newVal === oldVal) return;
|
|
100
|
+
if (newVal) {
|
|
101
|
+
close();
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
var onOpenedChange = function (newVal, oldVal, ownerInstance) {
|
|
106
|
+
getState(ownerInstance);
|
|
107
|
+
state.opened = newVal;
|
|
108
|
+
if (newVal === oldVal) return;
|
|
109
|
+
if (!newVal) {
|
|
110
|
+
close();
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var touchStart = function (event) {
|
|
115
|
+
resetTouchStatus();
|
|
116
|
+
state.startOffset = state.offset;
|
|
117
|
+
var touchPoint = event.touches[0];
|
|
118
|
+
state.startX = touchPoint.clientX;
|
|
119
|
+
state.startY = touchPoint.clientY;
|
|
120
|
+
owner.callMethod('closeOther');
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
var startDrag = function (event, ownerInstance) {
|
|
124
|
+
ownerInstance.callMethod('catchMove');
|
|
125
|
+
getState(ownerInstance);
|
|
126
|
+
touchStart(event);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
var onDrag = function (event, ownerInstance) {
|
|
130
|
+
getState(ownerInstance);
|
|
131
|
+
touchMove(event);
|
|
132
|
+
if (state.direction === 'vertical') {
|
|
133
|
+
ownerInstance.callMethod('skipMove');
|
|
134
|
+
}
|
|
135
|
+
if (state.direction !== 'horizontal') {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (!state.dragging) {
|
|
139
|
+
ownerInstance.triggerEvent('dragstart');
|
|
140
|
+
}
|
|
141
|
+
state.dragging = true;
|
|
142
|
+
swipeMove(state.startOffset + state.deltaX);
|
|
143
|
+
return false;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
var open = function (position) {
|
|
147
|
+
var _offset = position === 'left' ? +state.leftWidth : -state.rightWidth;
|
|
148
|
+
owner.callMethod('open', { position: position });
|
|
149
|
+
swipeMove(_offset);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
var endDrag = function (event, ownerInstance) {
|
|
153
|
+
getState(ownerInstance);
|
|
154
|
+
state.dragging = false;
|
|
155
|
+
// 左/右侧有可滑动区域,且当前不是已open状态,且滑动幅度超过阈值时open左/右侧(滚动到该侧的最边上)
|
|
156
|
+
if (
|
|
157
|
+
+state.rightWidth > 0 &&
|
|
158
|
+
-state.startOffset < +state.rightWidth &&
|
|
159
|
+
-state.offset > +state.rightWidth * THRESHOLD
|
|
160
|
+
) {
|
|
161
|
+
open('right');
|
|
162
|
+
} else if (
|
|
163
|
+
+state.leftWidth > 0 &&
|
|
164
|
+
state.startOffset < +state.leftWidth &&
|
|
165
|
+
state.offset > +state.leftWidth * THRESHOLD
|
|
166
|
+
) {
|
|
167
|
+
open('left');
|
|
168
|
+
} else {
|
|
169
|
+
// 仅在有发生侧滑的情况下自动关闭(由js控制是否异步关闭)
|
|
170
|
+
if (state.startOffset !== state.offset) {
|
|
171
|
+
close();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
ownerInstance.triggerEvent('dragend');
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
module.exports = {
|
|
178
|
+
initLeftWidth: initLeftWidth,
|
|
179
|
+
initRightWidth: initRightWidth,
|
|
180
|
+
startDrag: startDrag,
|
|
181
|
+
onDrag: onDrag,
|
|
182
|
+
endDrag: endDrag,
|
|
183
|
+
onCloseChange: onCloseChange,
|
|
184
|
+
onOpenedChange: onOpenedChange,
|
|
185
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-swipe-cell {
|
|
4
|
+
position: relative;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.o-swipe-cell__left,
|
|
9
|
+
.o-swipe-cell__right {
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 0;
|
|
12
|
+
height: 100%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.o-swipe-cell__left {
|
|
16
|
+
left: 0;
|
|
17
|
+
transform: translate3d(-100%,0,0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.o-swipe-cell__right {
|
|
21
|
+
right: 0;
|
|
22
|
+
transform: translate3d(100%,0,0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.o-swipe-cell__content {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
padding: 0 var(--o-spacer-2,32rpx);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.o-swipe-cell__icon {
|
|
33
|
+
font-size: var(--o-font-size-xl,40rpx);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.o-swipe-cell__icon+.o-swipe-cell__text:not(:empty) {
|
|
37
|
+
margin-left: var(--o-spacer,16rpx);
|
|
38
|
+
font: var(--o-font-body-medium,28rpx / 44rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial));
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./swiper";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
function isPrev(current, index, list) {
|
|
2
|
+
return (current - 1 + list.length) % list.length === index;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
function isNext(current, index, list) {
|
|
6
|
+
return (current + 1 + list.length) % list.length === index;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function getImageClass(prefix, current, index, list) {
|
|
10
|
+
var arr = [prefix + '-swiper__image-host', prefix + '-swiper__image', prefix + '-class-image'];
|
|
11
|
+
|
|
12
|
+
if (isPrev(current, index, list)) {
|
|
13
|
+
arr.push(prefix + '-class-prev-image');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (isNext(current, index, list)) {
|
|
17
|
+
arr.push(prefix + '-class-next-image');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return arr.join(' ');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports.isPrev = isPrev;
|
|
24
|
+
module.exports.isNext = isNext;
|
|
25
|
+
module.exports.getImageClass = getImageClass;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={autoplay:{type:Boolean,value:!0},current:{type:Number,value:0},direction:{type:String,value:"horizontal"},displayMultipleItems:{type:Number,value:1},duration:{type:Number,value:300},easingFunction:{type:String,value:"default"},height:{type:null,value:192},imageProps:{type:Object},interval:{type:Number,value:5e3},list:{type:Array},loop:{type:Boolean,value:!0},navigation:{type:null,value:!0},nextMargin:{type:null,value:0},paginationPosition:{type:String,value:"bottom"},previousMargin:{type:null,value:0},snapToEdge:{type:Boolean,value:!1}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-swiper`;let Swiper=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`,`${prefix}-class-nav`,`${prefix}-class-image`,`${prefix}-class-prev-image`,`${prefix}-class-next-image`],this.options={multipleSlots:!0,pureDataPattern:/^_/},this.properties=props,this.observers={navCurrent(t){this.updateNav(t)}},this.$nav=null,this.relations={"../swiper-nav/swiper-nav":{type:"descendant"}},this.data={prefix:prefix,classPrefix:name,_source:""},this.lifetimes={ready(){const{current:t}=this.properties;this.setData({navCurrent:t})}},this.methods={updateNav(t){var e;if(this.data.navigation)return;const r=null===(e=this.getRelationNodes("./swiper-nav"))||void 0===e?void 0:e[0];if(!r)return;const{direction:i,paginationPosition:n,list:s}=this.properties;r.setData({current:t,total:s.length,direction:i,paginationPosition:n})},onTap(t){const{index:e}=t.currentTarget.dataset;this.triggerEvent("click",{index:e})},onChange(t){const{current:e,source:r}=t.detail;r&&(this.setData({navCurrent:e,_source:r}),this.triggerEvent("change",{current:e,source:r}))},onAnimationFinish(t){const{current:e,source:r}=t.detail;this.triggerEvent("animationfinish",{current:e,source:r||this.data._source})},onNavBtnChange(t){const{dir:e,source:r}=t.detail;this.doNavBtnChange(e,r)},doNavBtnChange(t,e){const{current:r,list:i,loop:n}=this.data,s=i.length;let o="next"===t?r+1:r-1;o=n?"next"===t?(r+1)%s:(r-1+s)%s:o<0||o>=s?r:o,o!==r&&(this.setData({current:o,_source:e}),this.triggerEvent("change",{current:o,source:e}))},onImageLoad(t){this.triggerEvent("image-load",{index:t.target.dataset.custom})}}}};Swiper=__decorate([wxComponent()],Swiper);export default Swiper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-swiper-nav":"../swiper-nav/swiper-nav","o-image":"../image/image"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="./index.wxs" module="_this"/><wxs src="../common/utils.wxs" module="_"/><import src="../common/template/image.wxml"/><view class="class {{prefix}}-class {{classPrefix}}" style="{{_._style([style, customStyle])}}"><swiper class="{{classPrefix}}-host" autoplay="{{autoplay}}" current="{{current}}" interval="{{interval}}" duration="{{duration}}" circular="{{loop}}" vertical="{{direction == 'vertical'}}" easing-function="{{easingFunction}}" previous-margin="{{previousMargin}}" next-margin="{{nextMargin}}" snap-to-edge="{{snapToEdge}}" display-multiple-items="{{displayMultipleItems}}" style="height: {{_.addUnit(height)}}" bindchange="onChange" bindanimationfinish="onAnimationFinish"><swiper-item wx:for="{{list}}" wx:key="index" class="{{_.cls(classPrefix + '__item', [['preview', _this.isPrev(navCurrent, index, list)], ['next', _this.isNext(navCurrent, index, list)]])}}" data-index="{{index}}" bind:tap="onTap" aria-hidden="{{navCurrent !== index}}" aria-role="image" aria-label="{{_.isObject(item) ? item.ariaLabel : ''}}"><template is="image" data="{{oClass: _this.getImageClass(prefix, navCurrent, index, list), style: 'height: ' + _.addUnit(height), src: _.isObject(item) ? item.value : item, mode: 'aspectFill', dataset: index, ...imageProps, bindload: 'onImageLoad' }}"/></swiper-item></swiper><o-swiper-nav wx:if="{{navigation}}" o-class="{{prefix}}-class-nav" type="{{navigation.type || 'dots'}}" current="{{navCurrent || 0}}" total="{{list.length || 0}}" direction="{{direction || 'horizontal'}}" pagination-position="{{paginationPosition || 'bottom'}}" min-show-num="{{navigation.minShowNum || 2}}" show-controls="{{navigation.showControls || false}}" bind:nav-btn-change="onNavBtnChange"/><slot name="navigation"/><slot name="nav"/></view>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-swiper {
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.o-swiper-host {
|
|
8
|
+
border-radius: var(--o-swiper-radius,var(--o-radius-large,18rpx));
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
transform: translateY(0);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.o-swiper__item {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
padding: var(--o-swiper-item-padding,0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.o-swiper__image {
|
|
21
|
+
width: 100%;
|
|
22
|
+
transition: all .3s ease;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.o-swiper__image-host {
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./swiper-nav";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={current:{type:Number,value:0},direction:{type:String,value:"horizontal"},minShowNum:{type:Number,value:2},paginationPosition:{type:String,value:"bottom"},showControls:{type:Boolean,value:!1},total:{type:Number,value:0},type:{type:String,value:"dots"}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../common/tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";const{prefix:prefix}=config,name=`${prefix}-swiper-nav`;let SwiperNav=class extends SuperComponent{constructor(){super(...arguments),this.externalClasses=[`${prefix}-class`],this.properties={current:{type:Number,value:0},total:{type:Number,value:0},type:{type:String,value:"dots"},minShowNum:{type:Number,value:2},showControls:{type:Boolean,value:!1},direction:{type:String,value:"horizontal"},paginationPosition:{type:String,value:"bottom"}},this.relations={"../swiper/swiper":{type:"ancestor"}},this.data={prefix:prefix,classPrefix:name},this.methods={nav(e){var t;const{dir:r}=e.target.dataset;this.triggerEvent("nav-btn-change",{dir:r,source:"nav"}),this.$parent&&(null===(t=this.$parent)||void 0===t||t.doNavBtnChange(r,"nav"))}}}};SwiperNav=__decorate([wxComponent()],SwiperNav);export default SwiperNav;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="../common/utils.wxs" module="_"/><view wx:if="{{showControls}}" class="class {{prefix}}-class {{classPrefix}}__btn" style="{{_._style([style, customStyle])}}"><view class="{{classPrefix}}__btn--prev" bind:tap="nav" data-dir="prev" aria-role="button" aria-label="Image précédente"/><view class="{{classPrefix}}__btn--next" bind:tap="nav" data-dir="next" aria-role="button" aria-label="Image suivante"/></view><view wx:if="{{total >= minShowNum}}" style="{{_._style([style, customStyle])}}" class="class {{prefix}}-class {{classPrefix}} {{classPrefix}}--{{direction}} {{classPrefix}}__{{type}} {{classPrefix}}--{{paginationPosition}}"><block wx:if="{{ type === 'dots' || type === 'dots-bar'}}"><view wx:for="{{total}}" wx:for-index="idx" wx:key="idx" class="{{_.cls(classPrefix + '__' + type + '-item', [['active', current === idx], direction])}}"/></block><block wx:if="{{ type === 'fraction'}}">{{current + 1}}/{{total}}</block></view>
|