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 @@
|
|
|
1
|
+
<import src="../common/template/icon.wxml"/><wxs src="../common/utils.wxs" module="_"/><wxs src="./progress.wxs" module="_this"/><view style="{{_._style([style, customStyle])}}" class="{{classPrefix}} class"><view wx:if="{{theme === _this.PRO_THEME.LINE}}" class="{{classPrefix }}--thin {{classPrefix}}--status--{{status || computedStatus}} {{prefix}}-class"><view aria-role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="{{computedProgress}}" aria-label="{{ ariaLabel || (isIOS ? _this.getIOSAriaLabel(status) : _this.getAndroidAriaLabel(status)) }}" aria-live="polite" class="{{classPrefix }}__bar" style="height: {{heightBar}}px;border-radius: {{heightBar}}px;background-color: {{bgColorBar}}"><view class="{{classPrefix }}__inner {{prefix}}-class-bar" style="background: {{colorBar}}; width: {{computedProgress + '%'}}"></view></view><view wx:if="{{label}}" class="{{classPrefix}}__info {{prefix}}-class-label" aria-hidden="{{ true }}"><template wx:if="{{_.includes(_this.STATUS, status)}}" is="icon" data="{{oClass: classPrefix + '__icon', size:'44rpx', name: _this.LINE_STATUS_ICON[status]}}"></template><text wx:else>{{ _.isString(label)? label: computedProgress + '%' }}</text></view><slot name="label"/></view><view aria-role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="{{computedProgress}}" aria-label="{{ ariaLabel || (isIOS ? _this.getIOSAriaLabel(status) : _this.getAndroidAriaLabel(status)) }}" aria-live="polite" wx:if="{{theme === _this.PRO_THEME.PLUMP}}" class="{{classPrefix}}__bar {{classPrefix}}--plump {{computedProgress > 10 ? classPrefix + '--over-ten': classPrefix + '--under-ten'}} {{classPrefix}}--status--{{status || computedStatus}} {{prefix}}-class" style="height: {{heightBar}}px;border-radius: {{heightBar}}px;background-color: {{bgColorBar}}"><view class="{{classPrefix}}__inner {{prefix}}-class-bar" style="background: {{colorBar}}; width: {{computedProgress}}%"><view wx:if="{{label && computedProgress > 10}}" class="{{classPrefix }}__info {{prefix}}-class-label"><text>{{ _.isString(label)? label: computedProgress + '%' }}</text></view><slot wx:if="{{computedProgress > 10}}" name="label"/></view><view wx:if="{{label && computedProgress <= 10}}" class="{{ classPrefix }}__info {{prefix}}-class-label" aria-hidden="{{ true }}"><text>{{ _.isString(label)? label: computedProgress + '%' }}</text></view><slot wx:if="{{computedProgress <= 10}}" name="label"/></view><view wx:if="{{theme === _this.PRO_THEME.CIRCLE}}" class="{{classPrefix}}--status--{{status || computedStatus}} {{prefix}}-class"><view aria-role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="{{computedProgress}}" aria-label="{{ ariaLabel || (isIOS ? _this.getIOSAriaLabel(status) : _this.getAndroidAriaLabel(status)) }}" aria-live="polite" class="{{_.cls(classPrefix + '__canvas--circle', [size])}}" style="{{_this.getCircleStyle(size, heightBar)}}; background-image: conic-gradient(from var(--o-progress-circle-from), {{colorCircle || _this.STATUS_COLOR[status] || 'var(--o-progress-inner-bg-color)'}} {{computedProgress}}%, {{bgColorBar || 'var(--o-progress-track-bg-color)'}} 0%);"><view class="{{classPrefix}}__canvas--inner {{prefix}}-class-bar"><view wx:if="{{label}}" class="{{classPrefix}}__info {{prefix}}-class-label" aria-hidden="{{ true }}"><template wx:if="{{_.includes(_this.STATUS, status)}}" is="icon" data="{{oClass: classPrefix + '__icon', size:'96rpx', name: _this.CIRCLE_STATUS_ICON[status]}}"></template><text wx:else>{{ _.isString(label)? label: computedProgress + '%' }}</text></view><slot name="label"/></view></view></view></view>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var utils = require('../common/utils.wxs');
|
|
2
|
+
|
|
3
|
+
var STATUS = ['success', 'error', 'warning'];
|
|
4
|
+
var STATUS_TEXT = ['success', 'error', 'warning', 'active'];
|
|
5
|
+
|
|
6
|
+
var PRO_THEME = {
|
|
7
|
+
LINE: 'line',
|
|
8
|
+
PLUMP: 'plump',
|
|
9
|
+
CIRCLE: 'circle',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
var STATUS_COLOR = {
|
|
13
|
+
success: '#00a870',
|
|
14
|
+
error: '#e34d59',
|
|
15
|
+
warning: '#ed7b2f',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
var LINE_STATUS_ICON = {
|
|
19
|
+
success: 'check-circle-filled',
|
|
20
|
+
error: 'error-circle-filled',
|
|
21
|
+
warning: 'error-circle-filled',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var CIRCLE_STATUS_ICON = {
|
|
25
|
+
success: 'check',
|
|
26
|
+
error: 'close',
|
|
27
|
+
warning: 'error',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* 1. getIOSAriaLabel, getAndroidAriaLabel 两个函数的初衷是处理progress异常情况的文案识别。
|
|
33
|
+
* 2. iOS可以识别%,而安卓不会识别%,如 80, iOS可以识别成 80%, 而安卓只会80,因此android部分做了一个% 拼接,后续看是否有更好的方案去解决。
|
|
34
|
+
* 3. 安卓 talkback 版本为 8.1.0.278818032 ,只会读一次 80, 最新版本talkback 会读 80.0, 80。(目前也是一个痛点,啰嗦了)
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
function getIOSAriaLabel(status) {
|
|
39
|
+
if (status === 'error') {
|
|
40
|
+
return 'Échec';
|
|
41
|
+
}
|
|
42
|
+
if (status === 'warning') {
|
|
43
|
+
return 'Anomalie';
|
|
44
|
+
}
|
|
45
|
+
return '';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function getAndroidAriaLabel(status) {
|
|
49
|
+
if (status === 'error') {
|
|
50
|
+
return '%' + ', échec';
|
|
51
|
+
}
|
|
52
|
+
if (status === 'warning') {
|
|
53
|
+
return '%' + ', anomalie';
|
|
54
|
+
}
|
|
55
|
+
return '%';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function getCircleStyle(size, strokeWidth) {
|
|
59
|
+
var styles = {
|
|
60
|
+
'--o-progress-stroke-circle-width': utils.addUnit(strokeWidth),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
if (!utils.includes(['default', 'micro'], size)) {
|
|
64
|
+
styles['--o-progress-circle-width'] = utils.addUnit(size);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return utils._style(styles);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
module.exports = {
|
|
71
|
+
STATUS: STATUS,
|
|
72
|
+
STATUS_TEXT: STATUS_TEXT,
|
|
73
|
+
PRO_THEME: PRO_THEME,
|
|
74
|
+
STATUS_COLOR: STATUS_COLOR,
|
|
75
|
+
LINE_STATUS_ICON: LINE_STATUS_ICON,
|
|
76
|
+
CIRCLE_STATUS_ICON: CIRCLE_STATUS_ICON,
|
|
77
|
+
getAndroidAriaLabel: getAndroidAriaLabel,
|
|
78
|
+
getIOSAriaLabel: getIOSAriaLabel,
|
|
79
|
+
getCircleStyle: getCircleStyle,
|
|
80
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-progress {
|
|
4
|
+
--o-progress-inner-bg-color: var(--o-brand-color, var(--o-primary-color-7, #f16e00));
|
|
5
|
+
--o-progress-track-bg-color: var(--o-bg-color-component, var(--o-gray-color-3, #dddddd));
|
|
6
|
+
--o-progress-circle-from: 0deg;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.o-progress__inner {
|
|
10
|
+
position: relative;
|
|
11
|
+
height: 100%;
|
|
12
|
+
background: var(--o-progress-inner-bg-color,var(--o-brand-color,var(--o-primary-color-7,#f16e00)));
|
|
13
|
+
border-radius: var(--o-radius-round,999px);
|
|
14
|
+
transition: all var(--o-anim-duration-base,.2s) var(--o-anim-time-fn-easing,cubic-bezier(.38,0,.24,1));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.o-progress__bar {
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: var(--o-progress-line-stroke-width,12rpx);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
background: var(--o-progress-track-bg-color,var(--o-bg-color-component,var(--o-gray-color-3,#dddddd)));
|
|
22
|
+
border-radius: var(--o-radius-round,999px);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.o-progress__info {
|
|
26
|
+
padding-left: var(--o-spacer,16rpx);
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
color: var(--o-progress-info-dark-color,var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f)));
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.o-progress--thin {
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
align-items: center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.o-progress--thin .o-progress__icon {
|
|
40
|
+
font-size: calc(var(--o-font-size-base,28rpx) + 2px);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.o-progress--plump {
|
|
44
|
+
height: var(--o-progress-stroke-plump-width,40rpx);
|
|
45
|
+
border-radius: calc(var(--o-progress-stroke-plump-width,40rpx)/ 2);
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.o-progress--plump .o-progress__info {
|
|
51
|
+
font: var(--o-font-body-small,24rpx / 40rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.o-progress--over-ten .o-progress__info {
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 50%;
|
|
57
|
+
right: var(--o-spacer,16rpx);
|
|
58
|
+
color: var(--o-progress-info-light-color,var(--o-text-color-anti,var(--o-font-white-1,#fff)));
|
|
59
|
+
transform: translateY(-50%);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.o-progress--under-ten .o-progress__info,
|
|
63
|
+
.o-progress--under-ten .o-progress__inner {
|
|
64
|
+
display: inline-block;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.o-progress--under-ten .o-progress__info {
|
|
68
|
+
vertical-align: top;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.o-progress__canvas--circle {
|
|
72
|
+
position: relative;
|
|
73
|
+
width: var(--o-progress-circle-width,224rpx);
|
|
74
|
+
height: var(--o-progress-circle-width,224rpx);
|
|
75
|
+
border-radius: var(--o-radius-circle,50%);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.o-progress__canvas--circle .o-progress__canvas--inner {
|
|
79
|
+
position: absolute;
|
|
80
|
+
left: 50%;
|
|
81
|
+
top: 50%;
|
|
82
|
+
transform: translate(-50%,-50%);
|
|
83
|
+
width: calc(100% - var(--o-progress-stroke-circle-width,12rpx)*2);
|
|
84
|
+
height: calc(100% - var(--o-progress-stroke-circle-width,12rpx)*2);
|
|
85
|
+
border-radius: var(--o-radius-circle,50%);
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: row;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
align-items: center;
|
|
90
|
+
background-color: var(--o-progress-circle-inner-bg-color,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.o-progress__canvas--circle .o-progress__info {
|
|
94
|
+
margin: 0;
|
|
95
|
+
padding: 0;
|
|
96
|
+
font: var(--o-progress-circle-label-font,var(--o-font-title-extraLarge,600 40rpx / 56rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial)));
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
text-overflow: ellipsis;
|
|
99
|
+
display: -webkit-box;
|
|
100
|
+
-webkit-box-orient: vertical;
|
|
101
|
+
-webkit-line-clamp: 2;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.o-progress__canvas--circle--micro {
|
|
105
|
+
--o-progress-circle-width: 48rpx;
|
|
106
|
+
--o-progress-stroke-circle-width: 4rpx;
|
|
107
|
+
--o-progress-circle-icon-size: 40rpx;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.o-progress--status--active .o-progress__inner::before {
|
|
111
|
+
position: absolute;
|
|
112
|
+
top: 0;
|
|
113
|
+
right: 0;
|
|
114
|
+
bottom: 0;
|
|
115
|
+
left: 0;
|
|
116
|
+
z-index: 1;
|
|
117
|
+
content: '';
|
|
118
|
+
animation: progress-active-animation 2s cubic-bezier(.23,.99,.86,.2) infinite;
|
|
119
|
+
background: var(--o-progress-inner-bg-color-active,var(--o-bg-color-container,var(--o-font-white-1,#fff)));
|
|
120
|
+
opacity: .2;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.o-progress--status--success .o-progress__inner {
|
|
124
|
+
background: var(--o-progress-inner-bg-color-success,var(--o-success-color,var(--o-success-color-5,#028702)));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.o-progress--status--success .o-progress__icon {
|
|
128
|
+
color: var(--o-success-color,var(--o-success-color-5,#028702));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.o-progress--status--warning .o-progress__inner {
|
|
132
|
+
background: var(--o-progress-inner-bg-color-warning,var(--o-warning-color,var(--o-warning-color-5,#e37318)));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.o-progress--status--warning .o-progress__icon {
|
|
136
|
+
color: var(--o-warning-color,var(--o-warning-color-5,#e37318));
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.o-progress--status--error .o-progress__inner {
|
|
140
|
+
background: var(--o-progress-inner-bg-color-error,var(--o-error-color,var(--o-error-color-6,#cd3c14)));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.o-progress--status--error .o-progress__icon {
|
|
144
|
+
color: var(--o-error-color,var(--o-error-color-6,#cd3c14));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@keyframes progress-active-animation {
|
|
148
|
+
0% {
|
|
149
|
+
width: 0;
|
|
150
|
+
opacity: .1;
|
|
151
|
+
}
|
|
152
|
+
35% {
|
|
153
|
+
width: 50%;
|
|
154
|
+
opacity: .4;
|
|
155
|
+
}
|
|
156
|
+
100% {
|
|
157
|
+
width: 100%;
|
|
158
|
+
opacity: 0;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={color:{type:null,value:""},label:{type:null,value:!0},percentage:{type:Number,value:0},size:{type:null,value:"default"},status:{type:String},strokeWidth:{type:null},theme:{type:String,value:"line"},trackColor:{type:String,value:""}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__rest}from"../common/tslib";export function getBackgroundColor(r){if("string"==typeof r)return r;if(Array.isArray(r))return r[0]&&"#"===r[0][0]&&r.unshift("90deg"),`linear-gradient( ${r.join(",")} )`;const{from:t,to:e,direction:n="to right"}=r,i=__rest(r,["from","to","direction"]);let o=Object.keys(i);if(o.length){o=o.sort((r,t)=>parseFloat(r.substr(0,r.length-1))-parseFloat(t.substr(0,t.length-1)));return`linear-gradient(${n}, ${o.map(r=>`${i[r]} ${r}`).join(",")})`}return`linear-gradient(${n}, ${t}, ${e})`}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// o-purchase-card: Purchase detail card (Figma "Purchase Detail card"): service, event or favorite.
|
|
2
|
+
const props = {
|
|
3
|
+
// service | event | favorite
|
|
4
|
+
type: { type: String, value: 'service' },
|
|
5
|
+
thumbnail: { type: String, value: '' },
|
|
6
|
+
title: { type: String, value: '' },
|
|
7
|
+
subtitle: { type: String, value: '' },
|
|
8
|
+
// Left text of the bottom line (status, date)
|
|
9
|
+
info: { type: String, value: '' },
|
|
10
|
+
link: { type: String, value: '' },
|
|
11
|
+
favorite: { type: Boolean, value: true },
|
|
12
|
+
};
|
|
13
|
+
export default props;
|
|
@@ -0,0 +1,40 @@
|
|
|
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}-purchase-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
|
+
favorite(value) { this.setData({ _favorite: value }); },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
let PurchaseCard = class PurchaseCard 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, _favorite: true };
|
|
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
|
+
onMenu() { this.triggerEvent('menu'); },
|
|
30
|
+
onLink() { this.triggerEvent('link'); },
|
|
31
|
+
onFavorite() {
|
|
32
|
+
const favorite = !this.data._favorite;
|
|
33
|
+
this.setData({ _favorite: favorite });
|
|
34
|
+
this.triggerEvent('favorite-change', { favorite });
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
PurchaseCard = __decorate([wxComponent()], PurchaseCard);
|
|
40
|
+
export default PurchaseCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<view class="o-surface o-surface--outlined o-purchase-card class {{prefix}}-class" style="{{style}} {{customStyle}}">
|
|
2
|
+
<view class="o-pad">
|
|
3
|
+
<view class="o-row o-row--top">
|
|
4
|
+
<view class="o-thumb o-purchase-card__thumb">
|
|
5
|
+
<image wx:if="{{thumbnail}}" class="o-thumb__image" src="{{thumbnail}}" mode="aspectFill" />
|
|
6
|
+
</view>
|
|
7
|
+
<view class="o-grow">
|
|
8
|
+
<view class="o-txt-title">{{title}}</view>
|
|
9
|
+
<view wx:if="{{subtitle}}" class="o-txt-small">{{subtitle}}</view>
|
|
10
|
+
</view>
|
|
11
|
+
<o-icon wx:if="{{type === 'favorite'}}" name="{{_favorite ? 'heart-filled' : 'heart'}}" o-class="o-purchase-card__heart" bind:click="onFavorite" />
|
|
12
|
+
<o-icon wx:else name="more" o-class="o-purchase-card__menu" bind:click="onMenu" />
|
|
13
|
+
</view>
|
|
14
|
+
<block wx:if="{{type !== 'favorite' && (info || link)}}">
|
|
15
|
+
<view class="o-hr" />
|
|
16
|
+
<view class="o-row">
|
|
17
|
+
<view class="o-grow o-txt-small">{{info}}</view>
|
|
18
|
+
<view wx:if="{{link}}" class="o-link" bind:tap="onLink">{{link}}</view>
|
|
19
|
+
</view>
|
|
20
|
+
</block>
|
|
21
|
+
</view>
|
|
22
|
+
</view>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
@import '../common/style/card.wxss';
|
|
3
|
+
|
|
4
|
+
/* Purchase detail card (Figma "Purchase Detail card"): service, event or favorite. */
|
|
5
|
+
.o-purchase-card__thumb {
|
|
6
|
+
width: 80rpx;
|
|
7
|
+
height: 80rpx;
|
|
8
|
+
margin-right: 24rpx;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.o-purchase-card__menu,
|
|
12
|
+
.o-purchase-card__heart {
|
|
13
|
+
margin-left: 16rpx;
|
|
14
|
+
font-size: 44rpx;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.o-purchase-card__heart {
|
|
18
|
+
color: var(--o-scheme-primary, #f16e00);
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DEFAULT_MARGIN_SIZE,DEFAULT_NEED_MARGIN,DEFAULT_BACKGROUND_COLOR,DEFAULT_FRONT_COLOR}from"../../../common/shared/qrcode/utils";export default{value:{type:String,value:""},icon:{type:String,value:""},size:{type:Number,value:160},iconSize:{type:null,value:40},level:{type:String,value:"M"},bgColor:{type:String,value:DEFAULT_BACKGROUND_COLOR},color:{type:String,value:DEFAULT_FRONT_COLOR},includeMargin:{type:Boolean,value:DEFAULT_NEED_MARGIN},marginSize:{type:Number,value:DEFAULT_MARGIN_SIZE}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter,__decorate}from"../../../common/tslib";import props from"./props";import useQRCode from"../../hooks/useQRCode";import{SuperComponent,wxComponent}from"../../../common/src/index";import{DEFAULT_MINVERSION,excavateModules}from"../../../common/shared/qrcode/utils";let QRCode=class extends SuperComponent{constructor(){super(...arguments),this.properties=props,this.lifetimes={ready(){this.checkDefaultValue(),this.initCanvas()}},this.observers={"**":function(){this.checkDefaultValue(),this.initCanvas()}},this.methods={initCanvas(){return __awaiter(this,void 0,void 0,function*(){this.createSelectorQuery().select("#qrcodeCanvas").fields({node:!0,size:!0}).exec(e=>__awaiter(this,void 0,void 0,function*(){var t;if(!(null===(t=e[0])||void 0===t?void 0:t.node))return;const i=e[0].node,o=i.getContext("2d");yield this.drawQrcode(i,o)}))})},drawQrcode(e,t){var i;return __awaiter(this,void 0,void 0,function*(){if(!t)return;const{value:o,icon:r,size:a,iconSize:l,level:s,bgColor:n,color:c,includeMargin:d,marginSize:h}=this.properties,u=this.getSizeProp(l);try{const l=useQRCode({value:o,level:s,minVersion:DEFAULT_MINVERSION,includeMargin:d,marginSize:h,size:a,imageSettings:r?{src:r,width:u.width,height:u.height,excavate:!0}:void 0}),g=wx.getWindowInfo().pixelRatio||1;e.width=a*g,e.height=a*g;const m=a*g/l.numCells;t.scale(m,m),t.fillStyle=n,t.fillRect(0,0,l.numCells,l.numCells);let v=l.cells;if(r&&(null===(i=l.calculatedImageSettings)||void 0===i?void 0:i.excavation)&&(v=excavateModules(l.cells,l.calculatedImageSettings.excavation)),t.fillStyle=c,v.forEach((e,i)=>{e.forEach((e,o)=>{e&&t.fillRect(o+l.margin,i+l.margin,1.05,1.05)})}),r&&l.calculatedImageSettings){const i=e.createImage();yield new Promise((e,t)=>{i.onload=e,i.onerror=t,i.src=this.properties.icon}),t.drawImage(i,l.calculatedImageSettings.x+l.margin,l.calculatedImageSettings.y+l.margin,l.calculatedImageSettings.w,l.calculatedImageSettings.h)}this.triggerEvent("drawCompleted")}catch(e){this.triggerEvent("drawError",{error:e})}})},getSizeProp:e=>e?"number"==typeof e?{width:e,height:e}:{width:e.width,height:e.height}:{width:0,height:0},checkDefaultValue(){const e={bgColor:"",color:""};let t=!1;const{bgColor:i,color:o}=this.properties,{bgColor:r,color:a}=props;""===i&&r.value&&(e.bgColor=r.value,t=!0),""===o&&a.value&&(e.color=a.value,t=!0),t&&this.setData(e)},getCanvasNode(){return new Promise(e=>{this.createSelectorQuery().select("#qrcodeCanvas").fields({node:!0,size:!0}).exec(t=>{var i;e(null===(i=t[0])||void 0===i?void 0:i.node)})})}}}};QRCode=__decorate([wxComponent()],QRCode);export default QRCode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<canvas type="2d" class="o-qrcode__canvas class" id="qrcodeCanvas"></canvas>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default{status:{type:String,value:""},locale:{type:Object,value:{expiredText:"QR code expiré",refreshText:"Actualiser",scannedText:"Scanné"}},statusRender:{type:Boolean,value:!1}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__decorate}from"../../../common/tslib";import props from"./props";import config from"../../../common/config";import{SuperComponent,wxComponent}from"../../../common/src/index";const{prefix:prefix}=config,name=`${prefix}-qrcode`;let QRCode=class extends SuperComponent{constructor(){super(...arguments),this.options={multipleSlots:!0},this.properties=Object.assign(Object.assign({},props),{statusRender:{type:Boolean,value:!1}}),this.data={prefix:prefix,classPrefix:name,isSkyline:!1},this.lifetimes={attached(){this.setData({isSkyline:"skyline"===this.renderer})}},this.methods={handleRefresh(){this.triggerEvent("refresh")}}}};QRCode=__decorate([wxComponent()],QRCode);export default QRCode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"usingComponents":{"o-loading":"../../../loading/loading","o-icon":"../../../icon/icon"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<block wx:if="{{statusRender}}"><slot name="statusRender"/></block><block wx:else><view wx:if="{{status === 'expired'}}" class="{{prefix}}-expired"><view class="{{prefix}}-expired__text">{{locale.expiredText}}<view class="{{prefix}}-expired__button" bindtap="handleRefresh"><o-icon name="refresh" size="36rpx"/>{{locale.refreshText}}</view></view></view><view wx:elif="{{status === 'loading'}}" class="{{prefix}}-loading-container"><o-loading size="64rpx" theme="{{isSkyline ? 'spinner' : 'circular'}}"/></view><view wx:elif="{{status === 'scanned'}}" class="{{prefix}}-scanned"><o-icon name="check-circle-filled" class="{{prefix}}-scanned__icon" size="44rpx"/>{{locale.scannedText}}</view></block>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@import '../../../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-expired__text {
|
|
4
|
+
color: var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f));
|
|
5
|
+
font-weight: 600;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.o-expired__button {
|
|
9
|
+
display: flex;
|
|
10
|
+
color: var(--o-brand-color,var(--o-primary-color-7,#f16e00));
|
|
11
|
+
box-shadow: none;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
column-gap: 8px;
|
|
14
|
+
align-items: center;
|
|
15
|
+
height: 32px;
|
|
16
|
+
transition: all .2s cubic-bezier(.215,.61,.355,1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.o-expired__button:hover {
|
|
20
|
+
color: var(--o-brand-color-active,var(--o-primary-color-8,#cd5e00));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.o-scanned {
|
|
24
|
+
display: flex;
|
|
25
|
+
column-gap: 8px;
|
|
26
|
+
align-items: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.o-scanned__icon {
|
|
30
|
+
color: var(--o-success-color,var(--o-success-color-5,#028702));
|
|
31
|
+
}
|
|
32
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{QrCode,QrSegment}from"../../common/shared/qrcode/qrcodegen";import{ERROR_LEVEL_MAP,getImageSettings,getMarginSize}from"../../common/shared/qrcode/utils";const useQRCode=e=>{const{value:t,level:n,minVersion:r,includeMargin:g,marginSize:o,imageSettings:m,size:i}=e,s=(()=>{const e=QrSegment.makeSegments(t);return QrCode.encodeSegments(e,ERROR_LEVEL_MAP[n],r)})(),a=s.getModules(),d=getMarginSize(g,o),c=getImageSettings(a,i,d,m);return{cells:a,margin:d,numCells:a.length+2*d,calculatedImageSettings:c,qrcode:s}};export default useQRCode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./qrcode";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={bgColor:{type:String,value:""},borderless:{type:Boolean,value:!1},color:{type:String,value:""},icon:{type:String,value:""},iconSize:{type:null,value:40},level:{type:String,value:"M"},size:{type:Number,value:160},status:{type:String,value:"active"},value:{type:String,value:""}};export default props;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter,__decorate}from"../common/tslib";import props from"./props";import config from"../common/config";import{SuperComponent,wxComponent}from"../common/src/index";import usingConfig from"../common/mixins/using-config";const{prefix:prefix}=config,componentName="qrcode";let QRCode=class extends SuperComponent{constructor(){super(...arguments),this.behaviors=[usingConfig({componentName:"qrcode"})],this.externalClasses=[`${prefix}-class`,`${prefix}-class-canvas`],this.options={multipleSlots:!0},this.properties=Object.assign(Object.assign({},props),{statusRender:{type:Boolean,value:!1}}),this.data={prefix:prefix,showMask:!1,classPrefix:`${prefix}-qrcode`,canvasReady:!1},this.lifetimes={ready(){return __awaiter(this,void 0,void 0,function*(){const e=this.selectComponent("#qrcodeCanvas"),s=yield e.getCanvasNode();this.setData({canvasNode:s})})},attached(){this.setData({showMask:"active"!==this.properties.status})}},this.observers={status:function(e){this.setData({showMask:"active"!==e})}},this.methods={init(){const e=this.selectComponent("#qrcodeCanvas");e&&e.initCanvas()},handleDrawCompleted(){this.setData({canvasReady:!0})},handleDrawError(e){console.error("Échec du dessin du QR code",e)},handleRefresh(){this.triggerEvent("refresh")},handleDownload(){return __awaiter(this,void 0,void 0,function*(){this.data.canvasNode?wx.canvasToTempFilePath({canvas:this.data.canvasNode,success:e=>{wx.saveImageToPhotosAlbum({filePath:e.tempFilePath})},fail:e=>{console.error("canvasToTempFilePath failed",e)}},this):console.error("Élément canvas introuvable")})}}}};QRCode=__decorate([wxComponent()],QRCode);export default QRCode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"qrcode-canvas":"./components/qrcode-canvas/qrcode-canvas","qrcode-status":"./components/qrcode-status/qrcode-status"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<wxs src="../common/utils.wxs" module="_"/><view style="{{_._style([style, customStyle])}} width:{{size}}px; height: {{size}}px; background-color: {{bgColor}};" class="{{classPrefix}} {{borderless ? prefix+'-'+'borderless' : ''}} class {{prefix}}-class"><qrcode-canvas id="qrcodeCanvas" class="{{prefix}}-class-canvas" size="{{size}}" value="{{value}}" level="{{level}}" color="{{color}}" bg-color="{{bgColor}}" icon="{{icon}}" icon-size="{{iconSize}}" bind:drawError="handleDrawError" bind:drawCompleted="handleDrawCompleted"></qrcode-canvas><block wx:if="{{showMask && canvasReady}}"><view class="{{prefix}}-mask"><qrcode-status status="{{status}}" bind:refresh="handleRefresh" status-render="{{statusRender}}" locale="{{globalConfig}}"><slot name="statusRender" slot="statusRender"></slot></qrcode-status></view></block></view>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
|
|
3
|
+
.o-qrcode {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
background-color: var(--o-bg-color-container,var(--o-font-white-1,#fff));
|
|
8
|
+
padding: var(--o-spacer-1,24rpx);
|
|
9
|
+
border-radius: var(--o-radius-default,12rpx);
|
|
10
|
+
border: 1px solid var(--o-component-border,var(--o-gray-color-4,#dddddd));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.o-qrcode.o-borderless {
|
|
14
|
+
border-color: transparent;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.o-qrcode .o-mask {
|
|
18
|
+
left: 0;
|
|
19
|
+
top: 0;
|
|
20
|
+
position: absolute;
|
|
21
|
+
inset-block-start: 0;
|
|
22
|
+
inset-inline-start: 0;
|
|
23
|
+
z-index: 300;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
align-items: center;
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100%;
|
|
30
|
+
color: var(--o-text-color-primary,var(--o-font-gray-1,#1c1b1f));
|
|
31
|
+
background-color: var(--o-mask-background,rgba(255,255,255,.96));
|
|
32
|
+
text-align: center;
|
|
33
|
+
border-radius: var(--o-radius-default,12rpx);
|
|
34
|
+
font: var(--o-font-body-medium,28rpx / 44rpx var(--o-font-family,Roboto,PingFang SC,Microsoft YaHei,Arial));
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// o-quick-action: Quick action (Figma "Quick actions"): gray icon tile with a label, big illustration tile or dark banner.
|
|
2
|
+
const props = {
|
|
3
|
+
// tile | big | banner
|
|
4
|
+
variant: { type: String, value: 'tile' },
|
|
5
|
+
icon: { type: String, value: 'image' },
|
|
6
|
+
image: { type: String, value: '' },
|
|
7
|
+
label: { type: String, value: '' },
|
|
8
|
+
badge: { type: String, value: '' },
|
|
9
|
+
};
|
|
10
|
+
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}-quick-action`;
|
|
8
|
+
|
|
9
|
+
let QuickAction = class QuickAction 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
|
+
QuickAction = __decorate([wxComponent()], QuickAction);
|
|
22
|
+
export default QuickAction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<view class="o-quick-action o-quick-action--{{variant}} class {{prefix}}-class" style="{{style}} {{customStyle}}" bind:tap="onTap">
|
|
2
|
+
<block wx:if="{{variant === 'banner'}}">
|
|
3
|
+
<view class="o-quick-action__banner-deco" />
|
|
4
|
+
<o-icon name="{{icon}}" o-class="o-quick-action__banner-icon" />
|
|
5
|
+
<text class="o-quick-action__banner-label">{{label}}</text>
|
|
6
|
+
</block>
|
|
7
|
+
<block wx:else>
|
|
8
|
+
<view class="o-quick-action__box">
|
|
9
|
+
<image wx:if="{{image}}" class="o-thumb__image" src="{{image}}" mode="aspectFill" />
|
|
10
|
+
<o-icon wx:else name="{{icon}}" />
|
|
11
|
+
<view wx:if="{{badge}}" class="o-quick-action__badge">{{badge}}</view>
|
|
12
|
+
</view>
|
|
13
|
+
<text class="o-quick-action__label">{{label}}</text>
|
|
14
|
+
</block>
|
|
15
|
+
</view>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
@import '../common/style/card.wxss';
|
|
3
|
+
|
|
4
|
+
/* Quick action (Figma "Quick actions"): gray icon tile with a label, big illustration tile or dark banner. */
|
|
5
|
+
.o-quick-action {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: center;
|
|
10
|
+
color: var(--o-scheme-on-surface, #1c1b1f);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.o-quick-action__box {
|
|
14
|
+
position: relative;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
width: 112rpx;
|
|
19
|
+
height: 112rpx;
|
|
20
|
+
border-radius: 24rpx;
|
|
21
|
+
background-color: var(--o-scheme-surface-variant, #eee);
|
|
22
|
+
color: var(--o-scheme-on-surface-variant, #444748);
|
|
23
|
+
font-size: 64rpx;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.o-quick-action--big .o-quick-action__box {
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 320rpx;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.o-quick-action__badge {
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: -8rpx;
|
|
34
|
+
right: -8rpx;
|
|
35
|
+
min-width: 32rpx;
|
|
36
|
+
height: 32rpx;
|
|
37
|
+
padding: 0 8rpx;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
border-radius: 999px;
|
|
40
|
+
background-color: var(--o-static-canary, #fc0);
|
|
41
|
+
color: var(--o-static-on-canary, #000);
|
|
42
|
+
text-align: center;
|
|
43
|
+
font: var(--o-type-label-small, 500 22rpx / 32rpx var(--o-font-family, Roboto, Arial));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.o-quick-action__label {
|
|
47
|
+
margin-top: 8rpx;
|
|
48
|
+
text-align: center;
|
|
49
|
+
font: var(--o-type-label-medium, 500 24rpx / 32rpx var(--o-font-family, Roboto, Arial));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.o-quick-action--banner {
|
|
53
|
+
flex-direction: row;
|
|
54
|
+
height: 160rpx;
|
|
55
|
+
padding: 0 32rpx;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
border-radius: 24rpx;
|
|
58
|
+
background-color: var(--o-static-primary-fixed, #242424);
|
|
59
|
+
color: #fff;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.o-quick-action__banner-deco {
|
|
63
|
+
position: absolute;
|
|
64
|
+
right: -40rpx;
|
|
65
|
+
top: -40rpx;
|
|
66
|
+
width: 120rpx;
|
|
67
|
+
height: 120rpx;
|
|
68
|
+
border-radius: 50%;
|
|
69
|
+
background-color: var(--o-scheme-primary, #f16e00);
|
|
70
|
+
opacity: .8;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.o-quick-action__banner-icon {
|
|
74
|
+
margin-right: 16rpx;
|
|
75
|
+
font-size: 64rpx;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.o-quick-action__banner-label {
|
|
79
|
+
font: var(--o-type-title-medium, 500 32rpx / 48rpx var(--o-font-family, Roboto, Arial));
|
|
80
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"./props";export*from"./radio";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const props={allowUncheck:{type:Boolean,value:!1},block:{type:Boolean,value:!0},checked:{type:Boolean,value:null},defaultChecked:{type:Boolean,value:!1},content:{type:String},contentDisabled:{type:Boolean,value:!1},disabled:{type:null,value:void 0},icon:{type:null,value:"circle"},label:{type:String},maxContentRow:{type:Number,value:5},maxLabelRow:{type:Number,value:3},name:{type:String,value:""},placement:{type:String},readonly:{type:null,value:void 0},value:{type:null,value:!1}};export default props;
|