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,49 @@
|
|
|
1
|
+
/* typography 公共计算逻辑 */
|
|
2
|
+
|
|
3
|
+
/* 计算省略内容的内联样式 */
|
|
4
|
+
function ellipsisStyle(ellipsis, isExpanded) {
|
|
5
|
+
if (!ellipsis || isExpanded) return '';
|
|
6
|
+
var row = typeof ellipsis === 'object' && ellipsis.row ? ellipsis.row : 1;
|
|
7
|
+
return (
|
|
8
|
+
'overflow:hidden;text-overflow:ellipsis;white-space:normal;display:-webkit-box;-webkit-line-clamp:' +
|
|
9
|
+
row +
|
|
10
|
+
';-webkit-box-orient:vertical;'
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* 计算外层容器 class */
|
|
15
|
+
function wrapperClass(classPrefix, ellipsis) {
|
|
16
|
+
if (ellipsis) {
|
|
17
|
+
return classPrefix + '__ellipsis-wrapper';
|
|
18
|
+
}
|
|
19
|
+
return '';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* 根据装饰属性拼接内层 class */
|
|
23
|
+
function decorClass(classPrefix, strong, underline, del, code, mark, keyboard, italic) {
|
|
24
|
+
var list = [];
|
|
25
|
+
if (strong) list.push(classPrefix + '--strong');
|
|
26
|
+
if (underline) list.push(classPrefix + '--underline');
|
|
27
|
+
if (del) list.push(classPrefix + '--delete');
|
|
28
|
+
if (code) list.push(classPrefix + '--code');
|
|
29
|
+
if (mark) list.push(classPrefix + '--mark');
|
|
30
|
+
if (keyboard) list.push(classPrefix + '--keyboard');
|
|
31
|
+
if (italic) list.push(classPrefix + '--italic');
|
|
32
|
+
return list.join(' ');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* mark 自定义颜色 */
|
|
36
|
+
function markStyle(mark) {
|
|
37
|
+
if (!mark || mark === true || mark === 'true') return '';
|
|
38
|
+
if (mark && mark !== 'false' && mark !== false) {
|
|
39
|
+
return 'background-color:' + mark + ';';
|
|
40
|
+
}
|
|
41
|
+
return '';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
module.exports = {
|
|
45
|
+
ellipsisStyle: ellipsisStyle,
|
|
46
|
+
wrapperClass: wrapperClass,
|
|
47
|
+
decorClass: decorClass,
|
|
48
|
+
markStyle: markStyle,
|
|
49
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{prefix}from"./config";import{isString,isNumeric,isDef,isBoolean,isObject}from"./validator";import{getWindowInfo,getAppBaseInfo,getDeviceInfo}from"./wechat";export const systemInfo=getWindowInfo();export const appBaseInfo=getAppBaseInfo();export const deviceInfo=getDeviceInfo();export const debounce=function(e,t=500){let n;return function(...o){n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,o)},t)}};export const throttle=(e,t=100,n=null)=>{let o=0,r=null;return n||(n={leading:!0}),function(...c){const s=Date.now();o||n.leading||(o=s);const i=this;t-(s-o)<=0&&(r&&(clearTimeout(r),r=null),o=s,e.apply(i,c))}};export const classNames=function(...e){const t={}.hasOwnProperty,n=[];return e.forEach(e=>{if(!e)return;const o=typeof e;if("string"===o||"number"===o)n.push(e);else if(Array.isArray(e)&&e.length){const t=classNames(...e);t&&n.push(t)}else if("object"===o)for(const o in e)t.call(e,o)&&e[o]&&n.push(o)}),n.join(" ")};export const styles=function(e){return Object.keys(e).map(t=>`${t}: ${e[t]}`).join("; ")};export const getAnimationFrame=function(e,t){return e.createSelectorQuery().selectViewport().boundingClientRect().exec(()=>{t()})};export const getRect=function(e,t,n=!1){return new Promise((o,r)=>{e.createSelectorQuery()[n?"selectAll":"select"](t).boundingClientRect(e=>{e?o(e):r(e)}).exec()})};export const getTreeDepth=(e,t)=>e.reduce((e,n)=>n[null!=t?t:"children"]&&n[null!=t?t:"children"].length>0?Math.max(e,getTreeDepth(n[null!=t?t:"children"],t)+1):Math.max(e,1),0);export const isIOS=function(){var e;return!!((null===(e=null==deviceInfo?void 0:deviceInfo.system)||void 0===e?void 0:e.toLowerCase().search("ios"))+1)};export const isWxWork="wxwork"===(null==deviceInfo?void 0:deviceInfo.environment);export const isPC=["mac","windows"].includes(null==deviceInfo?void 0:deviceInfo.platform);export const addUnit=function(e){if(isDef(e))return e=String(e),isNumeric(e)?`${e}px`:e};export const getCharacterLength=(e,t,n)=>{const o=String(null!=t?t:"");if(0===o.length)return{length:0,characters:""};if("maxcharacter"===e){let e=0;for(let t=0;t<o.length;t+=1){let r=0;if(r=o.charCodeAt(t)>127||94===o.charCodeAt(t)?2:1,e+r>n)return{length:e,characters:o.slice(0,t)};e+=r}return{length:e,characters:o}}if("maxlength"===e){const e=o.length>n?n:o.length;return{length:e,characters:o.slice(0,e)}}return{length:o.length,characters:o}};export const chunk=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(n,o)=>e.slice(o*t,o*t+t));export const getInstance=function(e,t){if(!e){const t=getCurrentPages(),n=t[t.length-1];e=n.$$basePage||n}const n=e?e.selectComponent(t):null;return n||(console.warn("未找到组件,请检查selector是否正确"),null)};export const unitConvert=e=>{var t;return"string"==typeof e?e.includes("rpx")?parseInt(e,10)*(null!==(t=null==systemInfo?void 0:systemInfo.screenWidth)&&void 0!==t?t:750)/750:parseInt(e,10):null!=e?e:0};export const toCamel=e=>e.replace(/-(\w)/g,(e,t)=>t.toUpperCase());export function toKebabCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").replace(/([0-9])([a-zA-Z])/g,"$1-$2").toLowerCase()}export const getCurrentPage=function(){const e=getCurrentPages();return e[e.length-1]};export const uniqueFactory=e=>{let t=0;return()=>{const n=`${prefix}_${e}_${t}`;return t+=1,n}};export const calcIcon=(e,t)=>e&&(isBoolean(e)&&t||isString(e))?{name:isBoolean(e)?t:e}:isObject(e)?e:null;export const isOverSize=(e,t)=>{var n;if(!t)return!1;const o=1e3,r={B:1,KB:o,MB:1e6,GB:1e9};return e>("number"==typeof t?t*o:(null==t?void 0:t.size)*r[null!==(n=null==t?void 0:t.unit)&&void 0!==n?n:"KB"])};export const rpx2px=e=>Math.floor(systemInfo.windowWidth*e/750);export const nextTick=()=>new Promise(e=>{wx.nextTick(()=>{e()})});
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/* utils */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* addUnit */
|
|
5
|
+
// 为 css 添加单位
|
|
6
|
+
function addUnit(value) {
|
|
7
|
+
// prettier-ignore
|
|
8
|
+
var REGEXP = getRegExp('^-?\d+(.\d+)?$');
|
|
9
|
+
if (value == null) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
return REGEXP.test('' + value) ? value + 'px' : value;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function isString(string) {
|
|
16
|
+
return string && string.constructor === 'String';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function isArray(array) {
|
|
20
|
+
return array && array.constructor === 'Array';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function isObject(obj) {
|
|
24
|
+
return obj && obj.constructor === 'Object';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function isBoolean(value) {
|
|
28
|
+
return typeof value === 'boolean';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function isNoEmptyObj(obj) {
|
|
32
|
+
return isObject(obj) && JSON.stringify(obj) !== '{}';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function includes(arr, value) {
|
|
36
|
+
if (!arr || !isArray(arr)) return false;
|
|
37
|
+
|
|
38
|
+
var i = 0;
|
|
39
|
+
var len = arr.length;
|
|
40
|
+
|
|
41
|
+
for (; i < len; i++) {
|
|
42
|
+
if (arr[i] === value) return true;
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function cls(base, arr) {
|
|
48
|
+
var res = [base];
|
|
49
|
+
var i = 0;
|
|
50
|
+
for (var size = arr.length; i < size; i++) {
|
|
51
|
+
var item = arr[i];
|
|
52
|
+
|
|
53
|
+
if (item && item.constructor === 'Array') {
|
|
54
|
+
var key = arr[i][0];
|
|
55
|
+
var value = arr[i][1];
|
|
56
|
+
|
|
57
|
+
if (value) {
|
|
58
|
+
res.push(base + '--' + key);
|
|
59
|
+
}
|
|
60
|
+
} else if (typeof item === 'string' || typeof item === 'number') {
|
|
61
|
+
if (item) {
|
|
62
|
+
res.push(base + '--' + item);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return res.join(' ');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function getBadgeAriaLabel(options) {
|
|
70
|
+
var maxCount = options.maxCount || 99;
|
|
71
|
+
if (options.dot) {
|
|
72
|
+
return 'Nouveau message';
|
|
73
|
+
}
|
|
74
|
+
if (options.count === '...') {
|
|
75
|
+
return 'Nombreux messages';
|
|
76
|
+
}
|
|
77
|
+
if (isNaN(options.count)) {
|
|
78
|
+
return options.count;
|
|
79
|
+
}
|
|
80
|
+
var str1 = maxCount + '+ messages';
|
|
81
|
+
var str2 = options.count + (Number(options.count) > 1 ? ' messages' : ' message');
|
|
82
|
+
return Number(options.count) > maxCount ? str1 : str2;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function endsWith(str, endStr) {
|
|
86
|
+
return str.slice(-endStr.length) === endStr ? str : str + endStr;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function keys(obj) {
|
|
90
|
+
return JSON.stringify(obj)
|
|
91
|
+
.replace(getRegExp('{|}|"', 'g'), '')
|
|
92
|
+
.split(',')
|
|
93
|
+
.map(function (item) {
|
|
94
|
+
return item.split(':')[0];
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function kebabCase(str) {
|
|
99
|
+
return str
|
|
100
|
+
.replace(getRegExp('[A-Z]', 'g'), function (ele) {
|
|
101
|
+
return '-' + ele;
|
|
102
|
+
})
|
|
103
|
+
.toLowerCase();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function _style(styles) {
|
|
107
|
+
if (isArray(styles)) {
|
|
108
|
+
return styles
|
|
109
|
+
.filter(function (item) {
|
|
110
|
+
return item != null && item !== '';
|
|
111
|
+
})
|
|
112
|
+
.map(function (item) {
|
|
113
|
+
return isString(item) ? endsWith(item, ';') : _style(item);
|
|
114
|
+
})
|
|
115
|
+
.join(' ');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (isObject(styles)) {
|
|
119
|
+
return keys(styles)
|
|
120
|
+
.filter(function (key) {
|
|
121
|
+
return styles[key] != null && styles[key] !== '';
|
|
122
|
+
})
|
|
123
|
+
.map(function (key) {
|
|
124
|
+
return [kebabCase(key), [styles[key]]].join(':');
|
|
125
|
+
})
|
|
126
|
+
.join(';');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return styles;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function isValidIconName(str) {
|
|
133
|
+
// prettier-ignore
|
|
134
|
+
return getRegExp('^[A-Za-z0-9\-\_]+$').test(str);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
module.exports = {
|
|
138
|
+
addUnit: addUnit,
|
|
139
|
+
isString: isString,
|
|
140
|
+
isArray: isArray,
|
|
141
|
+
isObject: isObject,
|
|
142
|
+
isBoolean: isBoolean,
|
|
143
|
+
isNoEmptyObj: isNoEmptyObj,
|
|
144
|
+
includes: includes,
|
|
145
|
+
cls: cls,
|
|
146
|
+
getBadgeAriaLabel: getBadgeAriaLabel,
|
|
147
|
+
_style: _style,
|
|
148
|
+
isValidIconName: isValidIconName,
|
|
149
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function isFunction(t){return"function"==typeof t}export const isString=t=>"string"==typeof t;export const isNull=t=>null===t;export const isUndefined=t=>void 0===t;export function isDef(t){return!isUndefined(t)&&!isNull(t)}export function isInteger(t){return Number.isInteger(t)}export function isNumeric(t){return!Number.isNaN(Number(t))}export function isNumber(t){return"number"==typeof t}export function isBoolean(t){return"boolean"==typeof t}export function isObject(t){const e=typeof t;return null!==t&&("object"===e||"function"===e)}export function isPlainObject(t){return null!==t&&"object"==typeof t&&"[object Object]"===Object.prototype.toString.call(t)}export function isEmpty(t){return null==t||("string"==typeof t||Array.isArray(t)?0===t.length:t instanceof Map||t instanceof Set?0===t.size:"object"!=typeof t||0===Object.keys(t).length)}export function isDate(t,e){const r=Object.assign(Object.assign({},{format:"YYYY/MM/DD",delimiters:["/","-"],strictMode:!1}),e);if("string"==typeof t){const e=r.delimiters.find(t=>r.format.includes(t));if(!e)return!1;const n=r.format.split(e),i=t.split(e);if(n.length!==i.length)return!1;let o="",s="",u="";for(let t=0;t<n.length;t+=1){const e=n[t].toUpperCase(),r=i[t];e.includes("Y")?o=r:e.includes("M")?s=r:e.includes("D")&&(u=r)}if(1===s.length&&(s=`0${s}`),1===u.length&&(u=`0${u}`),2===o.length){const t=(new Date).getFullYear()%100;o=Number(o)<=t?`20${o}`:`19${o}`}const l=new Date(`${o}-${s}-${u}T00:00:00.000Z`);return l.getUTCFullYear()===Number(o)&&l.getUTCMonth()+1===Number(s)&&l.getUTCDate()===Number(u)}return!(r.strictMode||"[object Date]"!==Object.prototype.toString.call(t)||!Number.isFinite(t.getTime()))}export function isEmail(t){if("string"!=typeof t)return!1;if(t.length>254)return!1;const e=t.split("@");if(2!==e.length)return!1;const[r,n]=e;if(!r||r.length>64)return!1;if(!n)return!1;if(/^[-.]/.test(n)||/[-.]$/.test(n))return!1;if(!/^[a-zA-Z0-9.-]+$/.test(n))return!1;if(!n.includes("."))return!1;const i=n.split(".").pop();if(!i||i.length<2)return!1;return/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+$/.test(r)}export function isURL(t,e){if("string"!=typeof t)return!1;if(0===t.length||/\s/.test(t))return!1;if(t.length>2084)return!1;const r=Object.assign(Object.assign({},{protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,allow_protocol_relative_urls:!1}),e);let n=t;const i=n.match(/^([a-z][a-z0-9+\-.]*):\/\//i);if(i){const t=i[1].toLowerCase();if(!r.protocols.includes(t))return!1;n=n.slice(i[0].length)}else if(r.require_protocol){if(!r.allow_protocol_relative_urls||!t.startsWith("//"))return!1;n=n.slice(2)}else if(t.startsWith("//")){if(!r.allow_protocol_relative_urls)return!1;n=n.slice(2)}if(!n&&r.require_host)return!1;const[o]=n.split(/[/?#]/);if(!o&&r.require_host)return!1;let s=o;s.includes("@")&&(s=s.split("@").pop()||"");let u=s;const l=s.match(/:(\d+)$/);if(l){const t=Number(l[1]);if(t<0||t>65535)return!1;u=s.slice(0,s.lastIndexOf(":"))}if(!u)return!1;const c=u.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);if(c)return c.slice(1).every(t=>Number(t)>=0&&Number(t)<=255);if(u.startsWith("[")&&u.endsWith("]"))return!0;const f=u.split(".");if(r.require_tld&&f.length<2)return!1;if(f.some(t=>!t||t.length>63||(!/^[a-zA-Z0-9-]+$/.test(t)||!(!t.startsWith("-")&&!t.endsWith("-")))))return!1;if(r.require_tld){const t=f[f.length-1];if(/^\d+$/.test(t))return!1}return!0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getObserver=(e,t)=>new Promise(o=>{e.createIntersectionObserver({nativeMode:!0}).relativeToViewport().observe(t,e=>{o(e)})});export const getWindowInfo=()=>wx.getWindowInfo&&wx.getWindowInfo()||wx.getSystemInfoSync();export const getAppBaseInfo=()=>wx.getAppBaseInfo&&wx.getAppBaseInfo()||wx.getSystemInfoSync();export const getDeviceInfo=()=>wx.getDeviceInfo&&wx.getDeviceInfo()||wx.getSystemInfoSync();
|
|
@@ -0,0 +1,23 @@
|
|
|
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}-consumption-card`;
|
|
8
|
+
|
|
9
|
+
let ConsumptionCard = class ConsumptionCard 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
|
+
onAction() { this.triggerEvent('action'); },
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
ConsumptionCard = __decorate([wxComponent()], ConsumptionCard);
|
|
23
|
+
export default ConsumptionCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<view class="o-surface o-surface--outlined o-consumption-card o-consumption-card--{{color}} class {{prefix}}-class" style="{{style}} {{customStyle}}" bind:tap="onTap">
|
|
2
|
+
<view class="o-pad">
|
|
3
|
+
<view class="o-row">
|
|
4
|
+
<o-icon name="{{icon}}" o-class="o-consumption-card__icon" />
|
|
5
|
+
<view class="o-grow" />
|
|
6
|
+
<o-icon wx:if="{{actionIcon}}" name="{{actionIcon}}" o-class="o-consumption-card__action" catch:click="onAction" />
|
|
7
|
+
</view>
|
|
8
|
+
<view class="o-txt-title o-txt-title--1 o-consumption-card__title">{{title}}</view>
|
|
9
|
+
<view class="o-consumption-card__value">
|
|
10
|
+
<text class="o-consumption-card__number">{{value}}</text>
|
|
11
|
+
<text class="o-amount__currency">{{unit}}</text>
|
|
12
|
+
<text wx:if="{{total}}" class="o-consumption-card__total">/{{total}} {{unit}}</text>
|
|
13
|
+
</view>
|
|
14
|
+
<view wx:if="{{supporting}}" class="o-txt-small">{{supporting}}</view>
|
|
15
|
+
</view>
|
|
16
|
+
</view>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
@import '../common/style/card.wxss';
|
|
3
|
+
|
|
4
|
+
/* Consumption tile (Figma "Card_Consumption"): icon, title, used / total value, colored border. */
|
|
5
|
+
.o-consumption-card {
|
|
6
|
+
width: var(--o-consumption-card-width, 312rpx);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.o-consumption-card--blue { border-color: var(--o-static-azure, #4bb4e6); }
|
|
10
|
+
.o-consumption-card--orange { border-color: var(--o-scheme-primary, #f16e00); }
|
|
11
|
+
.o-consumption-card--pink { border-color: var(--o-static-sakura, #ffb4e6); }
|
|
12
|
+
.o-consumption-card--green { border-color: var(--o-static-jade, #50be87); }
|
|
13
|
+
.o-consumption-card--purple { border-color: var(--o-static-lilac, #a885d8); }
|
|
14
|
+
|
|
15
|
+
.o-consumption-card__icon {
|
|
16
|
+
font-size: 48rpx;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.o-consumption-card__action {
|
|
20
|
+
font-size: 40rpx;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.o-consumption-card__title {
|
|
24
|
+
margin-top: 16rpx;
|
|
25
|
+
font: var(--o-type-title-small, 500 28rpx / 40rpx var(--o-font-family, Roboto, Arial));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.o-consumption-card__number {
|
|
29
|
+
font: var(--o-type-headline-small-custom1, 700 48rpx / 64rpx var(--o-font-family, Roboto, Arial));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.o-consumption-card__total {
|
|
33
|
+
margin-left: 8rpx;
|
|
34
|
+
font: var(--o-type-label-large, 500 28rpx / 40rpx var(--o-font-family, Roboto, Arial));
|
|
35
|
+
color: var(--o-scheme-on-surface-variant, #444748);
|
|
36
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// o-consumption-card: Consumption tile (Figma "Card_Consumption"): icon, title, used / total value, colored border.
|
|
2
|
+
const props = {
|
|
3
|
+
// default | blue | orange | pink | green | purple (border color)
|
|
4
|
+
color: { type: String, value: 'default' },
|
|
5
|
+
icon: { type: String, value: 'image' },
|
|
6
|
+
title: { type: String, value: '' },
|
|
7
|
+
value: { type: String, value: '' },
|
|
8
|
+
total: { type: String, value: '' },
|
|
9
|
+
unit: { type: String, value: '' },
|
|
10
|
+
supporting: { type: String, value: '' },
|
|
11
|
+
// Icon button at the top right
|
|
12
|
+
actionIcon: { type: String, value: '' },
|
|
13
|
+
};
|
|
14
|
+
export default props;
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
function initials(name) {
|
|
7
|
+
return (name || '').split(' ').filter(Boolean).slice(0, 2).map((part) => part[0].toUpperCase()).join('');
|
|
8
|
+
}
|
|
9
|
+
const { prefix } = config;
|
|
10
|
+
const name = `${prefix}-contact-list`;
|
|
11
|
+
|
|
12
|
+
// Derived data, recomputed when a property changes and once when attached
|
|
13
|
+
// (the runtime may skip observers for initial property values).
|
|
14
|
+
const observers = {
|
|
15
|
+
contacts(list) {
|
|
16
|
+
const groups = {};
|
|
17
|
+
(list || []).slice().sort((a, b) => a.name.localeCompare(b.name)).forEach((contact) => {
|
|
18
|
+
const letter = (contact.name[0] || '#').toUpperCase();
|
|
19
|
+
(groups[letter] = groups[letter] || []).push({ ...contact, initials: initials(contact.name) });
|
|
20
|
+
});
|
|
21
|
+
this.setData({ _groups: Object.keys(groups).map((letter) => ({ letter, items: groups[letter] })) });
|
|
22
|
+
},
|
|
23
|
+
recent(list) {
|
|
24
|
+
this.setData({ _recent: (list || []).map((contact) => ({ ...contact, initials: initials(contact.name) })) });
|
|
25
|
+
},
|
|
26
|
+
value(list) {
|
|
27
|
+
this.setData({ _selected: (list || []).reduce((map, number) => ({ ...map, [number]: true }), {}) });
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
let ContactList = class ContactList extends SuperComponent {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
this.externalClasses = [`${prefix}-class`];
|
|
35
|
+
this.options = { multipleSlots: true };
|
|
36
|
+
this.properties = props;
|
|
37
|
+
this.data = { prefix, classPrefix: name, _groups: [], _recent: [], _selected: {} };
|
|
38
|
+
this.observers = observers;
|
|
39
|
+
this.lifetimes = {
|
|
40
|
+
attached() {
|
|
41
|
+
Object.keys(observers).forEach((key) => observers[key].call(this, this.properties[key]));
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
this.methods = {
|
|
45
|
+
onSelect(e) {
|
|
46
|
+
const { number, disabled } = e.currentTarget.dataset;
|
|
47
|
+
if (disabled) return;
|
|
48
|
+
const contact = this.properties.contacts.find((item) => item.number === number)
|
|
49
|
+
|| this.properties.recent.find((item) => item.number === number);
|
|
50
|
+
this.triggerEvent('select', { contact });
|
|
51
|
+
if (!this.properties.selectable) return;
|
|
52
|
+
const selected = { ...this.data._selected, [number]: !this.data._selected[number] };
|
|
53
|
+
this.setData({ _selected: selected });
|
|
54
|
+
this.triggerEvent('change', { value: Object.keys(selected).filter((key) => selected[key]) });
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
ContactList = __decorate([wxComponent()], ContactList);
|
|
60
|
+
export default ContactList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-section-title":"../section-title/section-title","o-checkbox":"../checkbox/checkbox"}}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<view class="o-contact-list class {{prefix}}-class" style="{{style}} {{customStyle}}">
|
|
2
|
+
<o-section-title wx:if="{{title}}" title="{{title}}" />
|
|
3
|
+
<block wx:if="{{_recent.length}}">
|
|
4
|
+
<view class="o-txt-small o-contact-list__letter">{{recentTitle}}</view>
|
|
5
|
+
<view class="o-contact-list__recent">
|
|
6
|
+
<view wx:for="{{_recent}}" wx:key="number" class="o-contact-list__recent-item" data-number="{{item.number}}" bind:tap="onSelect">
|
|
7
|
+
<view class="o-contact-list__avatar o-contact-list__avatar--big">{{item.initials}}</view>
|
|
8
|
+
<text class="o-txt-small o-contact-list__recent-name">{{item.name}}</text>
|
|
9
|
+
</view>
|
|
10
|
+
</view>
|
|
11
|
+
</block>
|
|
12
|
+
<view wx:for="{{_groups}}" wx:for-item="group" wx:key="letter">
|
|
13
|
+
<view class="o-contact-list__letter">{{group.letter}}</view>
|
|
14
|
+
<view wx:for="{{group.items}}" wx:key="number" class="o-row o-contact-list__item {{item.disabled ? 'o-contact-list__item--disabled' : ''}}" data-number="{{item.number}}" data-disabled="{{item.disabled}}" bind:tap="onSelect">
|
|
15
|
+
<view class="o-contact-list__avatar">{{item.initials}}</view>
|
|
16
|
+
<view class="o-grow">
|
|
17
|
+
<view class="o-contact-list__name">{{item.name}}</view>
|
|
18
|
+
<view class="o-txt-small">{{item.number}}</view>
|
|
19
|
+
<view wx:if="{{item.disabled}}" class="o-contact-list__unavailable">Numéro indisponible</view>
|
|
20
|
+
</view>
|
|
21
|
+
<o-checkbox wx:if="{{selectable}}" checked="{{_selected[item.number]}}" disabled="{{item.disabled}}" />
|
|
22
|
+
</view>
|
|
23
|
+
</view>
|
|
24
|
+
</view>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
@import '../common/style/card.wxss';
|
|
3
|
+
|
|
4
|
+
/* Contact list (Figma "Contact"): recent contacts, alphabetical groups, optional multi-selection. */
|
|
5
|
+
.o-contact-list {
|
|
6
|
+
display: block;
|
|
7
|
+
color: var(--o-scheme-on-surface, #1c1b1f);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.o-contact-list__letter {
|
|
11
|
+
margin: 24rpx 0 8rpx;
|
|
12
|
+
font: var(--o-type-title-medium, 500 32rpx / 48rpx var(--o-font-family, Roboto, Arial));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.o-contact-list__recent {
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: 24rpx;
|
|
18
|
+
overflow-x: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.o-contact-list__recent-item {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex: none;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
width: 128rpx;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.o-contact-list__recent-name {
|
|
30
|
+
width: 100%;
|
|
31
|
+
margin-top: 8rpx;
|
|
32
|
+
text-align: center;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
text-overflow: ellipsis;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.o-contact-list__item {
|
|
39
|
+
padding: 16rpx 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.o-contact-list__item--disabled {
|
|
43
|
+
opacity: .5;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.o-contact-list__avatar {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex: none;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
width: 80rpx;
|
|
52
|
+
height: 80rpx;
|
|
53
|
+
margin-right: 24rpx;
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
background-color: var(--o-scheme-primary, #f16e00);
|
|
56
|
+
color: var(--o-scheme-on-primary, #000);
|
|
57
|
+
font: var(--o-type-title-small, 500 28rpx / 40rpx var(--o-font-family, Roboto, Arial));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.o-contact-list__avatar--big {
|
|
61
|
+
width: 104rpx;
|
|
62
|
+
height: 104rpx;
|
|
63
|
+
margin-right: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.o-contact-list__name {
|
|
67
|
+
font: var(--o-type-body-large, 400 32rpx / 48rpx var(--o-font-family, Roboto, Arial));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.o-contact-list__unavailable {
|
|
71
|
+
font: var(--o-type-label-small, 500 22rpx / 32rpx var(--o-font-family, Roboto, Arial));
|
|
72
|
+
color: var(--o-scheme-error, #cd3c14);
|
|
73
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// o-contact-list: Contact list (Figma "Contact"): recent contacts, alphabetical groups, optional multi-selection.
|
|
2
|
+
const props = {
|
|
3
|
+
title: { type: String, value: '' },
|
|
4
|
+
// [{ name, number, disabled }]
|
|
5
|
+
contacts: { type: Array, value: [] },
|
|
6
|
+
// Contacts shown in a horizontal row at the top
|
|
7
|
+
recent: { type: Array, value: [] },
|
|
8
|
+
recentTitle: { type: String, value: 'Récents' },
|
|
9
|
+
// Checkbox on each contact, selected numbers in `value`
|
|
10
|
+
selectable: { type: Boolean, value: false },
|
|
11
|
+
value: { type: Array, value: [] },
|
|
12
|
+
};
|
|
13
|
+
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}-description-tile`;
|
|
8
|
+
|
|
9
|
+
let DescriptionTile = class DescriptionTile 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
|
+
DescriptionTile = __decorate([wxComponent()], DescriptionTile);
|
|
22
|
+
export default DescriptionTile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon"}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<view class="o-surface o-surface--outlined o-description-tile o-description-tile--{{type}} class {{prefix}}-class" style="{{style}} {{customStyle}}" bind:tap="onTap">
|
|
2
|
+
<view class="o-pad">
|
|
3
|
+
<view class="o-description-tile__icon"><o-icon name="{{icon}}" /></view>
|
|
4
|
+
<view class="o-txt-title o-txt-title--3">{{title}}</view>
|
|
5
|
+
<view wx:if="{{supporting}}" class="o-txt-body">{{supporting}}</view>
|
|
6
|
+
<block wx:if="{{type === 'wide' && text}}">
|
|
7
|
+
<view class="o-hr" />
|
|
8
|
+
<view class="o-txt-body o-description-tile__text">{{text}}</view>
|
|
9
|
+
</block>
|
|
10
|
+
</view>
|
|
11
|
+
</view>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@import '../common/style/index.wxss';
|
|
2
|
+
@import '../common/style/card.wxss';
|
|
3
|
+
|
|
4
|
+
/* Description tile (Figma "Card_Description"): icon, title up to 3 lines, supporting text, paragraph. */
|
|
5
|
+
.o-description-tile {
|
|
6
|
+
width: var(--o-description-tile-width, 400rpx);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.o-description-tile--condensed {
|
|
10
|
+
width: var(--o-description-tile-condensed-width, 280rpx);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.o-description-tile__icon {
|
|
14
|
+
margin-bottom: 16rpx;
|
|
15
|
+
text-align: center;
|
|
16
|
+
font-size: 64rpx;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.o-description-tile__text {
|
|
20
|
+
color: var(--o-scheme-on-surface, #1c1b1f);
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// o-description-tile: Description tile (Figma "Card_Description"): icon, title up to 3 lines, supporting text, paragraph.
|
|
2
|
+
const props = {
|
|
3
|
+
// wide (paragraph shown) or condensed
|
|
4
|
+
type: { type: String, value: 'wide' },
|
|
5
|
+
icon: { type: String, value: 'image' },
|
|
6
|
+
title: { type: String, value: '' },
|
|
7
|
+
supporting: { type: String, value: '' },
|
|
8
|
+
text: { type: String, value: '' },
|
|
9
|
+
};
|
|
10
|
+
export default props;
|
|
@@ -0,0 +1,38 @@
|
|
|
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}-details-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
|
+
dots(count) { this.setData({ _dots: Array.from({ length: count || 0 }, (v, i) => i) }); },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
let DetailsCard = class DetailsCard 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, _dots: [] };
|
|
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
|
+
onTap() { this.triggerEvent('click'); },
|
|
30
|
+
onPlay() { this.triggerEvent('play'); },
|
|
31
|
+
onButton() { this.triggerEvent('primary'); },
|
|
32
|
+
onSecondary() { this.triggerEvent('secondary'); },
|
|
33
|
+
onLink() { this.triggerEvent('link'); },
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
DetailsCard = __decorate([wxComponent()], DetailsCard);
|
|
38
|
+
export default DetailsCard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"o-icon":"../icon/icon","o-button":"../button/button"}}
|