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,77 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-back-top {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
background-color: transparent;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
transition: height .2s;
|
|
12
|
+
height: auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.o-back-top--fixed {
|
|
16
|
+
position: fixed;
|
|
17
|
+
right: var(--o-spacer,16rpx);
|
|
18
|
+
bottom: calc(var(--o-spacer-2,32rpx) + env(safe-area-inset-bottom));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.o-back-top--round,
|
|
22
|
+
.o-back-top--round-dark {
|
|
23
|
+
width: 96rpx;
|
|
24
|
+
height: 96rpx;
|
|
25
|
+
border-radius: var(--o-back-top-round-border-radius,var(--o-radius-circle,50%));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.o-back-top--half-round,
|
|
29
|
+
.o-back-top--round {
|
|
30
|
+
color: var(--o-back-top-round-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
31
|
+
border: 1rpx solid var(--o-back-top-round-border-color,var(--o-component-border,var(--o-gray-color-4,#dddddd)));
|
|
32
|
+
background-color: var(--o-back-top-round-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.o-back-top--half-round-dark,
|
|
36
|
+
.o-back-top--round-dark {
|
|
37
|
+
color: var(--o-back-top-round-dark-color,var(--o-text-color-anti,var(--o-font-white-1,#fff)));
|
|
38
|
+
background-color: var(--o-back-top-round-dark-bg-color,var(--o-gray-color-13,#242424));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.o-back-top--half-round,
|
|
42
|
+
.o-back-top--half-round-dark {
|
|
43
|
+
width: 120rpx;
|
|
44
|
+
height: 80rpx;
|
|
45
|
+
border-radius: 0;
|
|
46
|
+
border-top-left-radius: var(--o-back-top-half-round-border-radius,var(--o-radius-round,999px));
|
|
47
|
+
border-bottom-left-radius: var(--o-back-top-half-round-border-radius,var(--o-radius-round,999px));
|
|
48
|
+
flex-direction: row;
|
|
49
|
+
right: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.o-back-top__text--half-round,
|
|
53
|
+
.o-back-top__text--half-round-dark,
|
|
54
|
+
.o-back-top__text--round,
|
|
55
|
+
.o-back-top__text--round-dark {
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
font-size: var(--o-font-size,20rpx);
|
|
58
|
+
line-height: 24rpx;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.o-back-top__text--half-round,
|
|
62
|
+
.o-back-top__text--half-round-dark {
|
|
63
|
+
width: 48rpx;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.o-back-top__icon:not(:empty)+.o-back-top__text--half-round,
|
|
67
|
+
.o-back-top__icon:not(:empty)+.o-back-top__text--half-round-dark {
|
|
68
|
+
margin-left: calc(var(--o-spacer,16rpx)/ 2);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.o-back-top__icon {
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
font-size: 44rpx;
|
|
76
|
+
}
|
|
77
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./back-top";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={fixed:{type:Boolean,value:!0},icon:{type:null,value:!0},scrollTop:{type:Number,value:0},text:{type:String,value:""},theme:{type:String,value:"round"},visibilityHeight:{type:Number,value:200}};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{uniqueFactory,getRect}from"../common/utils";const{prefix:prefix}=config,name=`${prefix}-badge`,getUniqueID=uniqueFactory("badge");let Badge=class extends SuperComponent{constructor(){super(...arguments),this.options={multipleSlots:!0},this.externalClasses=[`${prefix}-class`,`${prefix}-class-count`,`${prefix}-class-content`],this.properties=props,this.data={prefix:prefix,classPrefix:name,value:"",labelID:"",descriptionID:"",useOuterClass:!1},this.lifetimes={ready(){const e=getUniqueID();this.setData({labelID:`${e}_label`,descriptionID:`${e}_description`}),this.checkForActualContent()}},this.methods={checkForActualContent(){if(!this.properties.content&&["ribbon","ribbon-right","ribbon-left","triangle-right","triangle-left"].includes(this.properties.shape))return getRect(this,`.${name}__content`).then(e=>{const t=e.width>0||e.height>0;this.setData({useOuterClass:!t})});this.setData({useOuterClass:!1})}}}};Badge=__decorate([wxComponent()],Badge);export default Badge;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="./badge.wxs" module="_this"/><wxs src="../common/utils.wxs" module="_"/><view style="{{_._style([style, customStyle])}}" class="{{classPrefix}} {{ useOuterClass? classPrefix + '__' + shape + '-outer': '' }} class {{prefix}}-class" aria-labelledby="{{labelID}}" aria-describedby="{{descriptionID}}" aria-role="{{ ariaRole || 'option'}}"><view id="{{labelID}}" class="{{classPrefix}}__content {{prefix}}-class-content" aria-hidden="true"><slot wx:if="{{!content}}" class="{{classPrefix}}__content-slot"/><text wx:else class="{{classPrefix}}__content-text">{{content}}</text></view><view aria-hidden="true" aria-label="{{ ariaLabel || _.getBadgeAriaLabel({dot, count, maxCount}) }}" wx:if="{{_this.isShowBadge({dot,count,showZero}) || count === null}}" id="{{descriptionID}}" class="{{_this.getBadgeInnerClass({classPrefix, dot, size, shape, count})}} {{prefix}}-has-count {{prefix}}-class-count" style="{{_._style([_this.getBadgeStyles({color, offset})])}}" aria-hidden="true" aria-label="{{ ariaLabel || _.getBadgeAriaLabel({dot, count, maxCount}) }}"><view class="{{classPrefix}}__count"><block wx:if="{{_this.isShowBadge({dot,count,showZero})}}">{{ _this.getBadgeValue({dot, count, maxCount}) }}</block><slot else name="count"/></view></view></view>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var getBadgeValue = function (props) {
|
|
2
|
+
if (props.dot) {
|
|
3
|
+
return '';
|
|
4
|
+
}
|
|
5
|
+
if (isNaN(props.count) || isNaN(props.maxCount)) {
|
|
6
|
+
return props.count;
|
|
7
|
+
}
|
|
8
|
+
return parseInt(props.count) > props.maxCount ? props.maxCount + '+' : props.count;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
var hasUnit = function (unit) {
|
|
12
|
+
return (
|
|
13
|
+
unit.indexOf('px') > 0 ||
|
|
14
|
+
unit.indexOf('rpx') > 0 ||
|
|
15
|
+
unit.indexOf('em') > 0 ||
|
|
16
|
+
unit.indexOf('rem') > 0 ||
|
|
17
|
+
unit.indexOf('%') > 0 ||
|
|
18
|
+
unit.indexOf('vh') > 0 ||
|
|
19
|
+
unit.indexOf('vm') > 0
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var getBadgeStyles = function (props) {
|
|
24
|
+
var styleStr = '';
|
|
25
|
+
if (props.color) {
|
|
26
|
+
styleStr += 'background:' + props.color + ';';
|
|
27
|
+
}
|
|
28
|
+
if (props.offset[0]) {
|
|
29
|
+
styleStr +=
|
|
30
|
+
'left: calc(100% + ' + (hasUnit(props.offset[0].toString()) ? props.offset[0] : props.offset[0] + 'px') + ');';
|
|
31
|
+
}
|
|
32
|
+
if (props.offset[1]) {
|
|
33
|
+
styleStr += 'top:' + (hasUnit(props.offset[1].toString()) ? props.offset[1] : props.offset[1] + 'px') + ';';
|
|
34
|
+
}
|
|
35
|
+
return styleStr;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var getBadgeInnerClass = function (props) {
|
|
39
|
+
var baseClass = props.classPrefix;
|
|
40
|
+
var classNames = [
|
|
41
|
+
baseClass + '--basic',
|
|
42
|
+
props.dot ? baseClass + '--dot' : '',
|
|
43
|
+
baseClass + '--' + props.size,
|
|
44
|
+
baseClass + '--' + props.shape,
|
|
45
|
+
!props.dot ? baseClass + '--count' : '',
|
|
46
|
+
];
|
|
47
|
+
return classNames.join(' ');
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var isShowBadge = function (props) {
|
|
51
|
+
if (props.dot) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
if (!props.showZero && !isNaN(props.count) && parseInt(props.count) === 0) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
if (props.count == null) return false;
|
|
58
|
+
return true;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
module.exports.getBadgeValue = getBadgeValue;
|
|
62
|
+
module.exports.getBadgeStyles = getBadgeStyles;
|
|
63
|
+
module.exports.getBadgeInnerClass = getBadgeInnerClass;
|
|
64
|
+
module.exports.isShowBadge = isShowBadge;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-badge {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: start;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.o-badge--basic {
|
|
10
|
+
z-index: 100;
|
|
11
|
+
padding: 0 var(--o-badge-basic-padding,calc(var(--o-spacer,16rpx)/ 2));
|
|
12
|
+
font: var(--o-badge-font,var(--o-font-mark-extraSmall,600 20rpx / 32rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
13
|
+
color: var(--o-badge-text-color,var(--o-text-color-anti,var(--o-font-white-1,#fff)));
|
|
14
|
+
background-color: var(--o-badge-bg-color,var(--o-error-color,var(--o-error-color-6,#cd3c14)));
|
|
15
|
+
text-align: center;
|
|
16
|
+
height: var(--o-badge-basic-height,32rpx);
|
|
17
|
+
border-radius: var(--o-badge-border-radius,4rpx);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.o-badge--dot {
|
|
21
|
+
height: var(--o-badge-dot-size,16rpx);
|
|
22
|
+
border-radius: var(--o-radius-circle,50%);
|
|
23
|
+
min-width: var(--o-badge-dot-size,16rpx);
|
|
24
|
+
padding: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.o-badge--count {
|
|
28
|
+
min-width: var(--o-badge-basic-width,32rpx);
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.o-badge--circle {
|
|
34
|
+
border-radius: calc(var(--o-badge-basic-height,32rpx)/ 2);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.o-badge__ribbon-left-outer,
|
|
38
|
+
.o-badge__ribbon-outer,
|
|
39
|
+
.o-badge__ribbon-right-outer,
|
|
40
|
+
.o-badge__triangle-left-outer,
|
|
41
|
+
.o-badge__triangle-right-outer {
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.o-badge__ribbon-outer,
|
|
47
|
+
.o-badge__ribbon-right-outer,
|
|
48
|
+
.o-badge__triangle-right-outer {
|
|
49
|
+
right: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.o-badge__ribbon-left-outer,
|
|
53
|
+
.o-badge__triangle-left-outer {
|
|
54
|
+
left: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.o-badge--bubble {
|
|
58
|
+
border-radius: var(--o-badge-bubble-border-radius,20rpx 20rpx 20rpx 1px);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.o-badge--ribbon,
|
|
62
|
+
.o-badge--ribbon-left,
|
|
63
|
+
.o-badge--ribbon-right,
|
|
64
|
+
.o-badge--triangle-left,
|
|
65
|
+
.o-badge--triangle-right {
|
|
66
|
+
width: calc(var(--o-badge-basic-height,32rpx) * 2);
|
|
67
|
+
height: calc(var(--o-badge-basic-height,32rpx) * 2);
|
|
68
|
+
border-radius: 0;
|
|
69
|
+
padding: 0;
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 0;
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.o-badge--ribbon,
|
|
79
|
+
.o-badge--ribbon-right {
|
|
80
|
+
background: linear-gradient(45deg,transparent 50%,var(--o-badge-bg-color,var(--o-error-color,var(--o-error-color-6,#cd3c14))) 50%,var(--o-badge-bg-color,var(--o-error-color,var(--o-error-color-6,#cd3c14))) 85%,transparent 85%);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.o-badge--triangle-right {
|
|
84
|
+
background: linear-gradient(45deg,transparent 50%,var(--o-badge-bg-color,var(--o-error-color,var(--o-error-color-6,#cd3c14))) 50%);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.o-badge--ribbon,
|
|
88
|
+
.o-badge--ribbon-right,
|
|
89
|
+
.o-badge--triangle-right {
|
|
90
|
+
right: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.o-badge--ribbon .o-badge__count,
|
|
94
|
+
.o-badge--ribbon-right .o-badge__count,
|
|
95
|
+
.o-badge--triangle-right .o-badge__count {
|
|
96
|
+
transform: rotate(45deg) translateY(calc(-1 * var(--o-line-height-mark-extraSmall,32rpx)/ 2 + 1rpx));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.o-badge--ribbon-left {
|
|
100
|
+
background: linear-gradient(-45deg,transparent 50%,var(--o-badge-bg-color,var(--o-error-color,var(--o-error-color-6,#cd3c14))) 50%,var(--o-badge-bg-color,var(--o-error-color,var(--o-error-color-6,#cd3c14))) 85%,transparent 85%);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.o-badge--triangle-left {
|
|
104
|
+
background: linear-gradient(-45deg,transparent 50%,var(--o-badge-bg-color,var(--o-error-color,var(--o-error-color-6,#cd3c14))) 50%);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.o-badge--ribbon-left,
|
|
108
|
+
.o-badge--triangle-left {
|
|
109
|
+
left: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.o-badge--ribbon-left .o-badge__count,
|
|
113
|
+
.o-badge--triangle-left .o-badge__count {
|
|
114
|
+
transform: rotate(-45deg) translateY(calc(-1 * var(--o-line-height-mark-extraSmall,32rpx)/ 2 + 1rpx));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.o-badge--large {
|
|
118
|
+
font: var(--o-badge-large-font,var(--o-font-mark-small,600 24rpx / 40rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
119
|
+
height: var(--o-badge-large-height,40rpx);
|
|
120
|
+
min-width: var(--o-badge-large-height,40rpx);
|
|
121
|
+
padding: 0 var(--o-badge-large-padding,10rpx);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.o-badge--large.o-badge--circle {
|
|
125
|
+
border-radius: calc(var(--o-badge-large-height,40rpx)/ 2);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.o-badge--large.o-badge--ribbon,
|
|
129
|
+
.o-badge--large.o-badge--ribbon-left,
|
|
130
|
+
.o-badge--large.o-badge--ribbon-right,
|
|
131
|
+
.o-badge--large.o-badge--triangle-left,
|
|
132
|
+
.o-badge--large.o-badge--triangle-right {
|
|
133
|
+
width: calc(var(--o-badge-large-height,40rpx) * 2);
|
|
134
|
+
height: calc(var(--o-badge-large-height,40rpx) * 2);
|
|
135
|
+
padding: 0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.o-badge--large.o-badge--ribbon .o-badge__count,
|
|
139
|
+
.o-badge--large.o-badge--ribbon-right .o-badge__count,
|
|
140
|
+
.o-badge--large.o-badge--triangle-right .o-badge__count {
|
|
141
|
+
transform: rotate(45deg) translateY(calc(-1 * var(--o-line-height-mark-small,40rpx)/ 2 + 3rpx));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.o-badge--large.o-badge--ribbon-left .o-badge__count,
|
|
145
|
+
.o-badge--large.o-badge--triangle-left .o-badge__count {
|
|
146
|
+
transform: rotate(-45deg) translateY(calc(-1 * var(--o-line-height-mark-small,40rpx)/ 2 + 3rpx));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.o-badge__content:not(:empty)+.o-badge--bubble.o-has-count,
|
|
150
|
+
.o-badge__content:not(:empty)+.o-badge--circle.o-has-count,
|
|
151
|
+
.o-badge__content:not(:empty)+.o-badge--square.o-has-count {
|
|
152
|
+
transform-origin: center center;
|
|
153
|
+
transform: translate(-50%,-50%);
|
|
154
|
+
position: absolute;
|
|
155
|
+
top: 0;
|
|
156
|
+
left: 100%;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.o-badge__content-text {
|
|
160
|
+
display: block;
|
|
161
|
+
font: var(--o-badge-content-text-font,var(--o-font-body-large,32rpx / 48rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
162
|
+
color: var(--o-badge-content-text-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.o-badge__count:empty {
|
|
166
|
+
display: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./badge";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={color:{type:String,value:""},content:{type:String,value:""},count:{type:null,value:0},dot:{type:Boolean,value:!1},maxCount:{type:Number,value:99},offset:{type:Array},shape:{type:String,value:"circle"},showZero:{type:Boolean,value:!1},size:{type:String,value:"medium"}};export default props;
|
|
@@ -0,0 +1,34 @@
|
|
|
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}-balance-card`;
|
|
8
|
+
|
|
9
|
+
let BalanceCard = class BalanceCard extends SuperComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.externalClasses = [`${prefix}-class`];
|
|
13
|
+
this.options = { multipleSlots: true };
|
|
14
|
+
this.properties = props;
|
|
15
|
+
// `hidden` is controlled when bound, otherwise starts from `defaultHidden`
|
|
16
|
+
this.controlledProps = [{ key: 'hidden', event: 'visible-change' }];
|
|
17
|
+
this.data = { prefix, classPrefix: name };
|
|
18
|
+
this.methods = {
|
|
19
|
+
onToggle() {
|
|
20
|
+
const hidden = !this.properties.hidden;
|
|
21
|
+
this._trigger('visible-change', { hidden });
|
|
22
|
+
},
|
|
23
|
+
onAction(e) {
|
|
24
|
+
const { index } = e.currentTarget.dataset;
|
|
25
|
+
this.triggerEvent('action', { index, action: this.properties.actions[index] });
|
|
26
|
+
},
|
|
27
|
+
onFooter() {
|
|
28
|
+
this.triggerEvent('footer-click', { footer: this.properties.footer });
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
BalanceCard = __decorate([wxComponent()], BalanceCard);
|
|
34
|
+
export default BalanceCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<view class="{{classPrefix}} class {{prefix}}-class" style="{{style}} {{customStyle}}">
|
|
2
|
+
<view class="{{classPrefix}}__body">
|
|
3
|
+
<view wx:if="{{title}}" class="{{classPrefix}}__title">{{title}}</view>
|
|
4
|
+
<view class="{{classPrefix}}__balance">
|
|
5
|
+
<text class="{{classPrefix}}__amount">{{hidden ? '******' : amount}}</text>
|
|
6
|
+
<text wx:if="{{currency}}" class="{{classPrefix}}__currency">{{currency}}</text>
|
|
7
|
+
<o-icon name="{{hidden ? 'browse' : 'browse-off'}}" o-class="{{classPrefix}}__eye" aria-role="button" aria-label="{{hidden ? 'Afficher le solde' : 'Masquer le solde'}}" bind:click="onToggle" />
|
|
8
|
+
</view>
|
|
9
|
+
<view wx:if="{{actions.length}}" class="{{classPrefix}}__actions">
|
|
10
|
+
<view wx:for="{{actions}}" wx:key="index" class="{{classPrefix}}__action" data-index="{{index}}" bind:tap="onAction">
|
|
11
|
+
<view class="{{classPrefix}}__action-icon">
|
|
12
|
+
<o-icon name="{{item.icon}}" size="56rpx" />
|
|
13
|
+
</view>
|
|
14
|
+
<text class="{{classPrefix}}__action-label">{{item.label}}</text>
|
|
15
|
+
</view>
|
|
16
|
+
</view>
|
|
17
|
+
<slot />
|
|
18
|
+
</view>
|
|
19
|
+
<view wx:if="{{footer}}" class="{{classPrefix}}__footer" bind:tap="onFooter">
|
|
20
|
+
<o-icon wx:if="{{footer.icon}}" name="{{footer.icon}}" o-class="{{classPrefix}}__footer-icon" />
|
|
21
|
+
<view class="{{classPrefix}}__footer-content">
|
|
22
|
+
<view wx:if="{{footer.label}}" class="{{classPrefix}}__footer-label">{{footer.label}}</view>
|
|
23
|
+
<view wx:if="{{footer.amount}}" class="{{classPrefix}}__footer-amount">
|
|
24
|
+
<text>{{hidden ? '******' : footer.amount}}</text>
|
|
25
|
+
<text class="{{classPrefix}}__footer-currency">{{footer.currency || currency}}</text>
|
|
26
|
+
</view>
|
|
27
|
+
</view>
|
|
28
|
+
<view wx:if="{{footer.action}}" class="{{classPrefix}}__footer-action">
|
|
29
|
+
<text>{{footer.action}}</text>
|
|
30
|
+
<o-icon name="chevron-right" />
|
|
31
|
+
</view>
|
|
32
|
+
</view>
|
|
33
|
+
</view>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
/* Balance card (Figma "Card_L_Balance"): 328px wide, radius 12px, surface primary-fixed (#242424),
|
|
4
|
+
* white texts, 56px shortcut buttons on primary-fixed-dim (#3e3e3e), footer row with an orange action. */
|
|
5
|
+
.o-balance-card {
|
|
6
|
+
display: block;
|
|
7
|
+
border-radius: var(--o-balance-card-radius, 24rpx);
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
background-color: var(--o-balance-card-bg-color, var(--o-static-primary-fixed, #242424));
|
|
10
|
+
color: var(--o-static-on-primary-fixed, #fff);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.o-balance-card__body {
|
|
14
|
+
padding: 32rpx 32rpx 24rpx;
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.o-balance-card__title {
|
|
19
|
+
font: var(--o-type-title-medium, 500 32rpx / 48rpx var(--o-font-family, Roboto, Arial));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.o-balance-card__balance {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: baseline;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
margin-top: 8rpx;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.o-balance-card__amount {
|
|
30
|
+
font: var(--o-type-headline-small-custom1, 700 48rpx / 64rpx var(--o-font-family, Roboto, Arial));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.o-balance-card__currency {
|
|
34
|
+
margin-left: 8rpx;
|
|
35
|
+
font: var(--o-type-label-large, 500 28rpx / 40rpx var(--o-font-family, Roboto, Arial));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.o-balance-card__eye {
|
|
39
|
+
margin-left: 24rpx;
|
|
40
|
+
font-size: 48rpx;
|
|
41
|
+
align-self: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.o-balance-card__actions {
|
|
45
|
+
display: flex;
|
|
46
|
+
justify-content: space-around;
|
|
47
|
+
margin-top: 32rpx;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.o-balance-card__action {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
align-items: center;
|
|
54
|
+
min-width: 0;
|
|
55
|
+
flex: 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.o-balance-card__action-icon {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
width: 112rpx;
|
|
63
|
+
height: 112rpx;
|
|
64
|
+
border-radius: 24rpx;
|
|
65
|
+
background-color: var(--o-balance-card-action-bg-color, var(--o-static-primary-fixed-dim, #3e3e3e));
|
|
66
|
+
color: var(--o-static-on-primary-fixed, #fff);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.o-balance-card__action-label {
|
|
70
|
+
margin-top: 12rpx;
|
|
71
|
+
font: var(--o-type-label-large, 500 28rpx / 40rpx var(--o-font-family, Roboto, Arial));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.o-balance-card__footer {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
padding: 20rpx 32rpx;
|
|
78
|
+
background-color: var(--o-balance-card-footer-bg-color, var(--o-static-primary-fixed-dim, #3e3e3e));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.o-balance-card__footer-icon {
|
|
82
|
+
font-size: 48rpx;
|
|
83
|
+
color: var(--o-brand-color, #f16e00);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.o-balance-card__footer-content {
|
|
87
|
+
flex: 1;
|
|
88
|
+
min-width: 0;
|
|
89
|
+
margin-left: 24rpx;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.o-balance-card__footer-label {
|
|
93
|
+
font: var(--o-type-body-small, 400 24rpx / 32rpx var(--o-font-family, Roboto, Arial));
|
|
94
|
+
color: var(--o-static-on-primary-fixed-variant, #dedede);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.o-balance-card__footer-amount {
|
|
98
|
+
font: var(--o-type-title-medium, 500 32rpx / 48rpx var(--o-font-family, Roboto, Arial));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.o-balance-card__footer-currency {
|
|
102
|
+
margin-left: 8rpx;
|
|
103
|
+
font: var(--o-type-label-medium, 500 24rpx / 32rpx var(--o-font-family, Roboto, Arial));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.o-balance-card__footer-action {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
color: var(--o-brand-color, #f16e00);
|
|
110
|
+
font: var(--o-type-title-medium, 500 32rpx / 48rpx var(--o-font-family, Roboto, Arial));
|
|
111
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// o-balance-card: balance card of the Max it design system (Figma "Card_L_Balance").
|
|
2
|
+
const props = {
|
|
3
|
+
title: { type: String, value: '' },
|
|
4
|
+
amount: { type: String, value: '' },
|
|
5
|
+
currency: { type: String, value: 'FCFA' },
|
|
6
|
+
// Amount masked ("******") with an eye button to show it
|
|
7
|
+
hidden: { type: Boolean, value: null },
|
|
8
|
+
defaultHidden: { type: Boolean, value: false },
|
|
9
|
+
// Shortcut buttons: [{ icon, label }]
|
|
10
|
+
actions: { type: Array, value: [] },
|
|
11
|
+
// Bottom row (last transaction...): { icon, label, amount, currency, action }
|
|
12
|
+
footer: { type: Object, value: null },
|
|
13
|
+
};
|
|
14
|
+
export default props;
|
|
@@ -0,0 +1,39 @@
|
|
|
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}-balance-thumb-card`;
|
|
8
|
+
|
|
9
|
+
// Derived data, recomputed when a property changes and once when attached
|
|
10
|
+
// (the runtime may skip observers for initial property values).
|
|
11
|
+
const observers = {
|
|
12
|
+
hidden(value) { this.setData({ _hidden: value }); },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
let BalanceThumbCard = class BalanceThumbCard extends SuperComponent {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.externalClasses = [`${prefix}-class`];
|
|
19
|
+
this.options = { multipleSlots: true };
|
|
20
|
+
this.properties = props;
|
|
21
|
+
this.data = { prefix, classPrefix: name, _hidden: false };
|
|
22
|
+
this.observers = observers;
|
|
23
|
+
this.lifetimes = {
|
|
24
|
+
attached() {
|
|
25
|
+
Object.keys(observers).forEach((key) => observers[key].call(this, this.properties[key]));
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
this.methods = {
|
|
29
|
+
onEye() {
|
|
30
|
+
const hidden = !this.data._hidden;
|
|
31
|
+
this.setData({ _hidden: hidden });
|
|
32
|
+
this.triggerEvent('visible-change', { hidden });
|
|
33
|
+
},
|
|
34
|
+
onTap() { this.triggerEvent('click'); },
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
BalanceThumbCard = __decorate([wxComponent()], BalanceThumbCard);
|
|
39
|
+
export default BalanceThumbCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<view class="o-surface o-surface--dark o-balance-thumb-card class {{prefix}}-class" style="{{style}} {{customStyle}}" bind:tap="onTap">
|
|
2
|
+
<view class="o-pad o-row o-row--top">
|
|
3
|
+
<view class="o-grow">
|
|
4
|
+
<view wx:if="{{tag}}" class="o-pill o-pill--green o-balance-thumb-card__tag">{{tag}}</view>
|
|
5
|
+
<view wx:if="{{overline}}" class="o-txt-small">{{overline}}</view>
|
|
6
|
+
<view class="o-txt-title o-txt-title--1">{{title}}</view>
|
|
7
|
+
<view class="o-row">
|
|
8
|
+
<o-icon wx:if="{{eye}}" name="{{_hidden ? 'browse-off' : 'browse'}}" o-class="o-balance-thumb-card__eye" catch:click="onEye" />
|
|
9
|
+
<text class="o-amount">{{_hidden ? '******' : amount}}</text>
|
|
10
|
+
<text wx:if="{{unit}}" class="o-amount__currency">{{unit}}</text>
|
|
11
|
+
</view>
|
|
12
|
+
<view wx:if="{{supporting}}" class="o-txt-small">{{supporting}}</view>
|
|
13
|
+
</view>
|
|
14
|
+
<view class="o-balance-thumb-card__thumb">
|
|
15
|
+
<image wx:if="{{thumbnail}}" class="o-thumb__image" src="{{thumbnail}}" mode="aspectFill" />
|
|
16
|
+
<o-icon wx:else name="{{thumbnailIcon}}" />
|
|
17
|
+
</view>
|
|
18
|
+
</view>
|
|
19
|
+
<view wx:if="{{validUntil || asOf}}" class="o-footer-bar">
|
|
20
|
+
<o-icon name="history" o-class="o-balance-thumb-card__history" />
|
|
21
|
+
<view class="o-grow o-txt-small">
|
|
22
|
+
<view wx:if="{{validUntil}}">{{validUntil}}</view>
|
|
23
|
+
<view wx:if="{{asOf}}">{{asOf}}</view>
|
|
24
|
+
</view>
|
|
25
|
+
</view>
|
|
26
|
+
</view>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
@import '../common/style/card.wxss';
|
|
3
|
+
|
|
4
|
+
/* Balance card with right thumbnail (Figma "Balance card_right thumbnail"): tag, amount with eye, validity footer. */
|
|
5
|
+
.o-balance-thumb-card__tag {
|
|
6
|
+
height: 40rpx;
|
|
7
|
+
margin-bottom: 12rpx;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.o-balance-thumb-card__eye {
|
|
11
|
+
margin-right: 12rpx;
|
|
12
|
+
font-size: 36rpx;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.o-balance-thumb-card__thumb {
|
|
16
|
+
flex: none;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
width: 112rpx;
|
|
21
|
+
height: 112rpx;
|
|
22
|
+
margin-left: 24rpx;
|
|
23
|
+
font-size: 72rpx;
|
|
24
|
+
border-radius: 16rpx;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.o-balance-thumb-card__history {
|
|
29
|
+
margin-right: 24rpx;
|
|
30
|
+
font-size: 48rpx;
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// o-balance-thumb-card: Balance card with right thumbnail (Figma "Balance card_right thumbnail"): tag, amount with eye, validity footer.
|
|
2
|
+
const props = {
|
|
3
|
+
tag: { type: String, value: '' },
|
|
4
|
+
overline: { type: String, value: '' },
|
|
5
|
+
title: { type: String, value: '' },
|
|
6
|
+
amount: { type: String, value: '' },
|
|
7
|
+
unit: { type: String, value: '' },
|
|
8
|
+
hidden: { type: Boolean, value: false },
|
|
9
|
+
// Eye button to show / hide the amount
|
|
10
|
+
eye: { type: Boolean, value: true },
|
|
11
|
+
supporting: { type: String, value: '' },
|
|
12
|
+
thumbnail: { type: String, value: '' },
|
|
13
|
+
thumbnailIcon: { type: String, value: 'image' },
|
|
14
|
+
validUntil: { type: String, value: '' },
|
|
15
|
+
asOf: { type: String, value: '' },
|
|
16
|
+
};
|
|
17
|
+
export default props;
|